:root {
  --bg: #000;
  --fg: #fff;
  --mid: #8a9fb5;
  --dim: #4a5a72;
  --gold: #c9a227;
  --goldi: #f0c844;
  --cyan: #22c9b0;
  --rose: #e8456b;
  --bank-red: #c9272d;
  --line: rgba(255, 255, 255, .11);
  --line-gold: rgba(201, 162, 39, .42);
  --sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Source Han Sans CN", sans-serif;
  --mono: "Space Mono", "Courier New", monospace;
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button { font-family: inherit; }

.wrap {
  position: fixed;
  left: 50%;
  top: 50%;
  width: min(100dvw, 177.78dvh);
  aspect-ratio: 16 / 9;
  transform: translate(-50%, -50%);
  overflow: hidden;
  background: var(--bg);
  container-type: size;
  container-name: deck;
  --safe-y: max(20px, 3cqh);
  --safe-x: 6cqw;
  --title-xl: clamp(56px, 8cqw, 112px);
  --title-lg: clamp(44px, 6.1cqw, 84px);
  --title-md: clamp(24px, 2.75cqw, 39px);
  --body: clamp(18px, 1.75cqw, 26px);
  --note: clamp(14px, 1.15cqw, 18px);
  --mono-size: clamp(13px, 1.12cqw, 17px);
}

.stars {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.star {
  position: absolute;
  width: var(--s);
  height: var(--s);
  left: var(--x);
  top: var(--y);
  border-radius: 50%;
  opacity: var(--o);
  background: var(--c);
  animation: twinkle var(--d) ease-in-out infinite;
  animation-delay: var(--delay);
}

@keyframes twinkle {
  0%, 100% { opacity: var(--o); transform: scale(1); }
  45% { opacity: .12; transform: scale(.45); }
  70% { opacity: .85; transform: scale(1.25); }
}

.slide {
  position: absolute;
  inset: 0;
  display: none;
  min-width: 100%;
  min-height: 100%;
  padding: var(--safe-y) var(--safe-x);
  overflow: hidden;
  background:
    radial-gradient(ellipse 34% 50% at 82% 48%, rgba(201, 162, 39, .055), transparent 62%),
    radial-gradient(ellipse 30% 38% at 18% 24%, rgba(68, 136, 255, .06), transparent 66%),
    #000;
}

.slide.active { display: block; }

.slide > * {
  position: relative;
  z-index: 2;
}

.deck-top {
  position: absolute;
  left: var(--safe-x);
  right: var(--safe-x);
  top: var(--safe-y);
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 28px;
  font-family: var(--mono);
  color: var(--mid);
  font-size: var(--mono-size);
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.deck-top::before {
  content: "";
  width: 40px;
  height: 1px;
  background: var(--gold);
  flex: 0 0 auto;
}

.deck-top .right {
  margin-left: auto;
  color: var(--gold);
}

.nav {
  position: absolute;
  right: max(28px, 3cqw);
  bottom: max(20px, 3cqh);
  z-index: 7;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 16px;
  border: 1px solid rgba(201, 162, 39, .18);
  border-radius: 999px;
  color: rgba(201, 162, 39, .9);
  background: rgba(0, 0, 0, .35);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .16em;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.title-xl {
  font-size: var(--title-xl);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: 0;
}

.title-lg {
  font-size: var(--title-lg);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: 0;
}

.title-md {
  font-size: var(--title-md);
  line-height: 1.35;
  font-weight: 900;
  letter-spacing: 0;
}

.body {
  color: #b9c8d9;
  font-size: var(--body);
  line-height: 1.85;
  font-weight: 500;
  letter-spacing: 0;
}

.body strong {
  color: #fff;
  font-weight: 900;
}

.gold { color: var(--gold); }
.cyan { color: var(--cyan); }

.mono {
  font-family: var(--mono);
  letter-spacing: .18em;
  text-transform: uppercase;
  line-height: 1.8;
}

.cover-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  margin: 0;
  pointer-events: none;
}

.cover-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.08) contrast(1.04);
}

.cover-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0,0,0,.98) 0%, rgba(0,0,0,.92) 30%, rgba(0,0,0,.40) 58%, rgba(0,0,0,.16) 100%),
    linear-gradient(0deg, rgba(0,0,0,.42) 0%, transparent 26%, rgba(0,0,0,.28) 100%);
}

.cover-copy {
  position: absolute;
  left: var(--safe-x);
  top: 18cqh;
  width: 58cqw;
  z-index: 3;
}

.cover-copy > .mono {
  margin-bottom: 2.4cqh;
}

.cover-sub {
  margin-top: 7cqh;
  max-width: 58cqw;
}

.cover-sub p { margin-top: 1.2cqh; }

.cover-foot {
  position: absolute;
  left: var(--safe-x);
  bottom: max(24px, 4cqh);
  display: flex;
  gap: 28px;
  align-items: center;
  z-index: 4;
  color: var(--mid);
  font-family: var(--mono);
  font-size: var(--mono-size);
  letter-spacing: .18em;
}

.cover-foot strong { color: var(--gold); }

.content-grid {
  display: grid;
  grid-template-columns: 47cqw 1fr;
  gap: 5cqw;
  padding-top: 13cqh;
  align-items: center;
}

.content-grid.wide {
  grid-template-columns: 42cqw 1fr;
}

.claim .body,
.slide-copy .body {
  margin-top: 4cqh;
  max-width: 64cqw;
}

.source-tag {
  display: inline-flex;
  align-items: center;
  margin-top: 3cqh;
  padding: .7cqh 1cqw;
  border-left: 3px solid var(--gold);
  color: var(--gold);
  background: rgba(201, 162, 39, .08);
  font-family: var(--mono);
  font-size: var(--mono-size);
  font-weight: 700;
  letter-spacing: .12em;
}

.visual {
  position: relative;
  min-height: 54cqh;
  border-top: 1px solid rgba(201, 162, 39, .35);
  border-bottom: 1px solid rgba(255,255,255,.08);
  overflow: visible;
}

.visual::before {
  content: "";
  position: absolute;
  inset: 8%;
  border: 1px solid rgba(255,255,255,.08);
  background:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle, #000 30%, transparent 76%);
}

.visual-title {
  position: absolute;
  left: 0;
  top: 2cqh;
  color: var(--mid);
  font-family: var(--mono);
  font-size: var(--mono-size);
  font-weight: 700;
  letter-spacing: .18em;
}

.orbit {
  position: absolute;
  left: 50%;
  top: 52%;
  width: 31cqw;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(201, 162, 39, .32);
  border-radius: 50%;
  box-shadow: 0 0 80px rgba(201, 162, 39, .10);
}

.orbit::before,
.orbit::after {
  content: "";
  position: absolute;
  inset: 16%;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
}

.orbit::after {
  inset: 34%;
  background: radial-gradient(circle, rgba(240,200,68,.85), rgba(201,162,39,.12) 48%, transparent 70%);
  border-color: rgba(201, 162, 39, .54);
}

.node-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--goldi);
  box-shadow: 0 0 20px rgba(240,200,68,.72);
}

.node-dot:nth-child(2) { left: 17%; top: 22%; }
.node-dot:nth-child(3) { right: 10%; top: 35%; background: var(--cyan); }
.node-dot:nth-child(4) { left: 28%; bottom: 10%; background: #fff; }

.matrix {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.3cqh 1.4cqw;
  margin-top: 8cqh;
}

.matrix div,
.mini-card {
  padding: 1.8cqh 1.3cqw;
  border-top: 1px solid rgba(201, 162, 39, .34);
  color: #b9c8d9;
  font-size: clamp(15px, 1.25cqw, 20px);
  line-height: 1.65;
}

.matrix b,
.mini-card b {
  display: block;
  margin-bottom: .6cqh;
  color: #fff;
  font-size: clamp(19px, 1.85cqw, 28px);
  line-height: 1.35;
}

.chain {
  display: grid;
  gap: 1.6cqh;
  margin-top: 7cqh;
}

.chain-row {
  display: grid;
  grid-template-columns: 9cqw 1fr 7cqw;
  gap: 1.5cqw;
  align-items: center;
  padding: 1.6cqh 0;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.chain-row b {
  color: var(--gold);
  font-size: clamp(18px, 1.75cqw, 26px);
}

.chain-row span {
  color: #b9c8d9;
  font-size: clamp(15px, 1.25cqw, 20px);
  line-height: 1.7;
}

.chain-row em {
  color: var(--mid);
  font-family: var(--mono);
  font-style: normal;
  text-align: right;
  letter-spacing: .14em;
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin-top: 7cqh;
  border-top: 1px solid var(--line-gold);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.pipeline .step {
  min-height: 21cqh;
  padding: 2cqh 1.2cqw 0;
  border-left: 1px solid rgba(255,255,255,.1);
}

.pipeline .step:first-child { border-left: 0; }

.step .mono {
  color: var(--gold);
  font-size: var(--mono-size);
  font-weight: 700;
}

.step h3 {
  margin-top: 1.3cqh;
  font-size: clamp(19px, 1.85cqw, 29px);
  line-height: 1.35;
}

.step p {
  margin-top: 1cqh;
  color: var(--mid);
  font-size: clamp(14px, 1.18cqw, 19px);
  line-height: 1.85;
}

.case-stack {
  display: grid;
  gap: 1.7cqh;
  margin-top: 5cqh;
}

.case-line {
  padding: 1.55cqh 0 1.55cqh 1.4cqw;
  border-left: 5px solid var(--gold);
  border-bottom: 1px solid rgba(255,255,255,.1);
  font-size: clamp(16px, 1.55cqw, 24px);
  line-height: 1.55;
  font-weight: 800;
}

.case-line:nth-child(2) { border-left-color: var(--cyan); }
.case-line:nth-child(3) { border-left-color: var(--rose); }
.case-line:nth-child(4) { border-left-color: #fff; }

.dense-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.6cqw;
  margin-top: 5cqh;
}

.dense-card {
  padding-top: 1.8cqh;
  border-top: 1px solid rgba(201, 162, 39, .36);
}

.dense-card .mono {
  color: var(--gold);
  font-size: var(--mono-size);
  font-weight: 700;
}

.dense-card h3 {
  margin-top: 1.2cqh;
  font-size: clamp(21px, 2.1cqw, 32px);
  line-height: 1.35;
}

.dense-card p {
  margin-top: 1cqh;
  color: #b9c8d9;
  font-size: clamp(15px, 1.25cqw, 20px);
  line-height: 1.85;
}

.risk-note {
  position: absolute;
  left: var(--safe-x);
  right: calc(var(--safe-x) + 12cqw);
  bottom: max(56px, 7cqh);
  color: var(--mid);
  font-size: clamp(14px, 1.1cqw, 17px);
  line-height: 1.8;
  border-top: 1px solid rgba(201,162,39,.26);
  padding-top: 1.4cqh;
}

.edit-toolbar {
  position: fixed;
  top: 14px;
  left: 50%;
  z-index: 30;
  display: none;
  transform: translateX(-50%);
  gap: 8px;
  align-items: center;
  padding: 9px;
  border: 1px solid rgba(240, 200, 68, .35);
  background: rgba(0, 0, 0, .86);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 12px;
  backdrop-filter: blur(14px);
}

body.edit-mode .edit-toolbar { display: flex; }

.edit-toolbar button {
  height: 32px;
  min-width: 40px;
  border: 1px solid rgba(138, 159, 181, .4);
  background: rgba(6, 10, 18, .9);
  color: var(--fg);
  font: inherit;
  cursor: pointer;
}

.edit-toolbar button:hover {
  color: var(--goldi);
  border-color: var(--goldi);
}

.edit-toolbar button.is-active {
  color: #000;
  border-color: var(--goldi);
  background: var(--goldi);
}

.edit-status {
  min-width: 170px;
  color: var(--mid);
  text-align: center;
}

body.edit-mode .ppt-editable {
  outline: 1px dashed rgba(240, 200, 68, .7);
  outline-offset: 6px;
  transform: translate(var(--move-x, 0px), var(--move-y, 0px));
}

body.edit-mode .ppt-editable[contenteditable="true"] { cursor: text; }

body.edit-mode .ppt-editable[contenteditable="true"]:focus {
  outline: 2px solid var(--goldi);
  background: rgba(240, 200, 68, .08);
}

body.edit-mode.move-mode .ppt-editable {
  outline: 1px solid rgba(34, 201, 176, .78);
  cursor: move;
  user-select: none;
  touch-action: none;
}

body.edit-mode.move-mode .ppt-editable:focus { background: transparent; }

body.edit-mode.move-mode.dragging .ppt-editable.is-dragging {
  outline: 2px solid var(--goldi);
  background: rgba(34, 201, 176, .08);
  z-index: 12;
}
