:root {
  --bg: #f4f0e7;
  --panel: rgba(255, 255, 255, 0.78);
  --panel-strong: rgba(255, 255, 255, 0.92);
  --ink: #111111;
  --muted: #626262;
  --line: rgba(17, 17, 17, 0.12);
  --accent: #0f766e;
  --accent-2: #155eef;
  --shadow: 0 32px 80px rgba(18, 23, 31, 0.16);
  --poster: linear-gradient(135deg, #f6f2ea 0%, #ffffff 56%, #edf4ff 100%);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    linear-gradient(180deg, rgba(17, 17, 17, 0.06), transparent 18%),
    linear-gradient(120deg, rgba(21, 94, 239, 0.08), transparent 28%),
    linear-gradient(240deg, rgba(15, 118, 110, 0.07), transparent 30%),
    var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body.video-mode {
  overflow: hidden;
}

.page-shell {
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 28px 48px;
}

body.video-mode .page-shell {
  max-width: none;
  width: 100vw;
  min-height: 100vh;
  padding: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

body.video-mode .topbar,
body.video-mode .summary-band,
body.video-mode .variants-grid,
body.video-mode .proof-grid {
  display: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: var(--ink);
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.brand-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.6rem;
}

.brand-sub {
  color: var(--muted);
  font-size: 0.92rem;
}

.toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.toolbar-item {
  display: grid;
  gap: 6px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.toolbar-item select {
  min-width: 176px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  color: var(--ink);
}

.dashboard {
  display: grid;
  gap: 22px;
}

.summary-band {
  display: grid;
  grid-template-columns: 1.7fr 0.9fr;
  gap: 16px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  font-size: 0.75rem;
}

#hero-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 3vw, 3.7rem);
  line-height: 0.96;
  max-width: 16ch;
}

.hero-dek {
  margin: 12px 0 0;
  max-width: 70ch;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.summary-side {
  display: grid;
  gap: 12px;
  align-content: center;
}

.lab-note {
  padding: 18px 18px 16px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 248, 248, 0.8));
  border: 1px solid var(--line);
}

.lab-note span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.lab-note strong {
  display: block;
  margin-top: 8px;
  font-size: 1.2rem;
}

.metric-ribbon {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric-card {
  padding: 18px;
  border-radius: 20px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.metric-card-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.metric-card-value {
  margin: 10px 0 6px;
  font-size: clamp(1.55rem, 2vw, 2.3rem);
  font-weight: 700;
  line-height: 1;
}

.metric-card-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.stage-panel {
  border-radius: 32px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

body.video-mode .stage-panel {
  border-radius: 0;
  border: 0;
  min-height: 100vh;
  box-shadow: none;
}

.stage {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--poster);
  overflow: hidden;
  isolation: isolate;
}

body.video-mode .stage {
  width: 100vw;
  height: 100vh;
  aspect-ratio: auto;
}

.stage-grid,
.stage-rails {
  position: absolute;
  inset: 0;
}

.stage-grid {
  background-image:
    linear-gradient(rgba(17, 17, 17, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 17, 17, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.1), black 18%, black 86%, rgba(0, 0, 0, 0.05));
}

.stage-rails {
  opacity: 0.82;
}

.stage-rails-a {
  background:
    linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.66) 30.8%, transparent 31.6%),
    linear-gradient(145deg, transparent 52%, rgba(17, 17, 17, 0.08) 52.7%, transparent 53.4%);
}

.stage-rails-b {
  background:
    linear-gradient(270deg, transparent 48%, rgba(21, 94, 239, 0.11) 48.7%, transparent 49.4%),
    linear-gradient(180deg, transparent 72%, rgba(15, 118, 110, 0.09) 72.7%, transparent 73.3%);
}

.stage-monolith {
  position: absolute;
  right: 12%;
  top: 16%;
  width: 31%;
  height: 62%;
  transform-style: preserve-3d;
  transform: perspective(1300px) rotateY(var(--mono-rotate-y, -19deg)) rotateX(var(--mono-rotate-x, 7deg)) translate3d(var(--mono-x, 0), var(--mono-y, 0), 0);
}

.monolith-slice,
.monolith-core {
  position: absolute;
  inset: 0;
  border-radius: 28px;
}

.slice-a {
  border: 1px solid rgba(17, 17, 17, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.18));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
  transform: translateZ(18px) translateX(-20px);
}

.slice-b {
  border: 1px solid rgba(17, 17, 17, 0.09);
  background: linear-gradient(180deg, rgba(237, 244, 255, 0.68), rgba(196, 226, 255, 0.18));
  transform: translateZ(-18px) translateX(22px) translateY(16px);
}

.monolith-core {
  inset: 8%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.2)),
    repeating-linear-gradient(180deg, rgba(17, 17, 17, 0.08), rgba(17, 17, 17, 0.08) 2px, transparent 2px, transparent 22px);
  border: 1px solid rgba(17, 17, 17, 0.12);
  box-shadow:
    0 30px 60px rgba(17, 17, 17, 0.16),
    inset 0 0 0 1px rgba(255, 255, 255, 0.44);
}

.stage-copy {
  position: absolute;
  left: 6.2%;
  top: 10%;
  width: min(43%, 620px);
}

.stage-kicker {
  margin: 0 0 12px;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.stage-copy h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4.6vw, 4.5rem);
  line-height: 0.92;
}

.stage-body {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.45vw, 1.2rem);
  line-height: 1.6;
  max-width: 44ch;
}

.stage-proof {
  position: absolute;
  left: 6.2%;
  bottom: 8.4%;
  width: min(42%, 620px);
  padding: 18px 18px 16px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(17, 17, 17, 0.12);
  box-shadow: 0 18px 60px rgba(17, 17, 17, 0.12);
}

.proof-head {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

#proof-tag {
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

#proof-path {
  color: var(--muted);
  font-size: 0.82rem;
  word-break: break-all;
}

.stage-proof pre {
  margin: 0;
  max-height: 210px;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.78rem;
  line-height: 1.5;
  font-family: "Cascadia Code", Consolas, monospace;
  white-space: pre-wrap;
}

.stage-shot {
  position: absolute;
  right: 4.8%;
  bottom: 7%;
  width: 32%;
  padding: 14px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(17, 17, 17, 0.12);
  box-shadow: 0 20px 50px rgba(17, 17, 17, 0.14);
}

.stage-shot img {
  display: block;
  width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(17, 17, 17, 0.08);
}

.variant-badge {
  position: absolute;
  right: 4.8%;
  top: 6.6%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  font-size: 0.86rem;
  color: var(--muted);
}

#variant-code {
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

#variant-name {
  font-size: 1rem;
  color: var(--ink);
}

.scene-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 8px;
  background: rgba(17, 17, 17, 0.08);
}

.scene-progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.variants-grid,
.proof-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.variant-tile,
.proof-card {
  padding: 18px;
  border-radius: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.variant-tile button {
  width: 100%;
  padding: 18px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(236, 242, 255, 0.82));
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.variant-tile button.active {
  box-shadow: inset 0 0 0 2px var(--accent);
}

.variant-tile small,
.proof-card small {
  display: block;
  color: var(--muted);
  margin-top: 6px;
}

.variant-tile strong,
.proof-card strong {
  display: block;
  font-size: 1.08rem;
}

.proof-card pre {
  margin: 12px 0 0;
  font-size: 0.76rem;
  line-height: 1.5;
  font-family: "Cascadia Code", Consolas, monospace;
  white-space: pre-wrap;
  max-height: 220px;
  overflow: auto;
}

body.theme-02,
body.theme-06,
body.theme-10 {
  --bg: #111319;
  --panel: rgba(23, 27, 37, 0.82);
  --panel-strong: rgba(20, 24, 34, 0.94);
  --ink: #f5f5f3;
  --muted: #b7bfcb;
  --line: rgba(255, 255, 255, 0.1);
  --shadow: 0 32px 80px rgba(0, 0, 0, 0.34);
}

body.theme-02 .brand-mark,
body.theme-06 .brand-mark,
body.theme-10 .brand-mark {
  background: #ffffff;
  color: #111319;
}

body.theme-02 .stage-proof,
body.theme-06 .stage-proof,
body.theme-10 .stage-proof,
body.theme-02 .stage-shot,
body.theme-06 .stage-shot,
body.theme-10 .stage-shot {
  background: rgba(17, 20, 28, 0.78);
}

body.theme-02 .slice-a,
body.theme-06 .slice-a,
body.theme-10 .slice-a {
  border-color: rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(46, 54, 78, 0.8), rgba(22, 26, 37, 0.2));
}

body.theme-02 .slice-b,
body.theme-06 .slice-b,
body.theme-10 .slice-b {
  border-color: rgba(255, 255, 255, 0.09);
  background: linear-gradient(180deg, rgba(34, 68, 117, 0.62), rgba(13, 18, 28, 0.18));
}

body.theme-02 .monolith-core,
body.theme-06 .monolith-core,
body.theme-10 .monolith-core {
  background:
    linear-gradient(180deg, rgba(46, 53, 76, 0.8), rgba(17, 20, 29, 0.24)),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.06) 2px, transparent 2px, transparent 22px);
  border-color: rgba(255, 255, 255, 0.12);
}

@media (max-width: 980px) {
  .page-shell {
    padding: 18px;
  }

  .summary-band,
  .metric-ribbon,
  .variants-grid,
  .proof-grid {
    grid-template-columns: 1fr;
  }

  .stage-copy,
  .stage-proof,
  .stage-shot {
    width: auto;
    left: 4.8%;
    right: 4.8%;
  }

  .stage-copy {
    top: 6%;
  }

  .stage-monolith {
    top: 26%;
    right: 10%;
    width: 56%;
    height: 34%;
  }

  .stage-proof {
    bottom: 22%;
  }

  .stage-shot {
    bottom: 4.8%;
  }
}
