:root {
  --story-bg: #0b0907;
  --story-panel: #15110d;
  --story-paper: #eee4d0;
  --story-ink: #17110c;
  --story-muted: #a49b8e;
  --story-line: rgba(238, 228, 208, .16);
  --story-accent: #ff6a00;
  --story-accent-rgb: 255, 106, 0;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--story-paper);
  background:
    radial-gradient(circle at 72% 5%, rgba(var(--story-accent-rgb), .12), transparent 35rem),
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px),
    var(--story-bg);
  background-size: auto, 64px 64px, 64px 64px, auto;
  font-family: "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

button, a { font: inherit; }
a { color: inherit; }
button { color: inherit; }

.story-page { min-height: 100vh; overflow: hidden; }
.story-shell { width: min(1500px, calc(100% - 64px)); margin: 0 auto; }
.story-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 12px 32px;
  border-bottom: 1px solid var(--story-line);
  background: rgba(11, 9, 7, .88);
  backdrop-filter: blur(18px);
}
.story-back, .story-jump {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid var(--story-line);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}
.story-jump { border-color: rgba(var(--story-accent-rgb), .65); color: var(--story-accent); }
.story-code, .story-kicker, .story-label, .proof-index, .story-stat span {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.story-code { color: var(--story-muted); font-size: 12px; }

.story-hero {
  display: grid;
  grid-template-columns: minmax(320px, .75fr) minmax(580px, 1.25fr);
  gap: clamp(34px, 5vw, 84px);
  align-items: center;
  min-height: calc(100svh - 64px);
  padding: 48px 0;
}
.story-hero > * { min-width: 0; }
.story-kicker { color: var(--story-accent); font-size: 12px; font-weight: 800; }
.story-title {
  max-width: 12ch;
  margin: 20px 0 18px;
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(48px, 5.5vw, 92px);
  font-weight: 700;
  line-height: .98;
  letter-spacing: -.05em;
}
.story-title em { color: var(--story-accent); font-style: normal; }
.story-lead { max-width: 34em; margin: 0; color: #d1c7b8; font-size: clamp(18px, 1.45vw, 23px); }
.story-manifesto {
  margin: 30px 0 0;
  padding: 20px 22px;
  border-left: 4px solid var(--story-accent);
  background: rgba(var(--story-accent-rgb), .07);
  font-family: "Songti SC", "STSong", serif;
  font-size: 18px;
}
.story-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.story-action {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 10px 17px;
  border: 1px solid var(--story-line);
  text-decoration: none;
  font-weight: 800;
}
.story-action.primary { background: var(--story-accent); color: #100c08; border-color: var(--story-accent); }

.story-proof {
  position: relative;
  min-width: 0;
  border: 1px solid rgba(var(--story-accent-rgb), .55);
  background: #050403;
  box-shadow: 22px 22px 0 rgba(var(--story-accent-rgb), .1);
}
.story-proof::before {
  content: "REAL PRODUCT / LIVE FRAME";
  position: absolute;
  z-index: 2;
  top: -16px;
  right: 24px;
  padding: 6px 10px;
  color: #0b0806;
  background: var(--story-accent);
  font: 800 10px/1 ui-monospace, monospace;
  letter-spacing: .14em;
}
.proof-frame {
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #0b0907;
}
.proof-frame img { display: block; width: 100%; height: 100%; object-fit: contain; }
.proof-caption {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 16px;
  border-top: 1px solid var(--story-line);
  color: var(--story-muted);
  font-size: 13px;
}
.proof-caption strong { color: var(--story-paper); }
.proof-tabs { display: grid; grid-template-columns: repeat(var(--tab-count, 4), 1fr); border-top: 1px solid var(--story-line); }
.proof-tab {
  min-height: 50px;
  padding: 9px 10px;
  border: 0;
  border-right: 1px solid var(--story-line);
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-size: 12px;
}
.proof-tab:last-child { border-right: 0; }
.proof-tab.is-active { color: #110c08; background: var(--story-accent); }
.proof-index { display: block; margin-bottom: 2px; opacity: .68; font-size: 9px; }

.story-section { padding: 104px 0; border-top: 1px solid var(--story-line); }
.story-section-head { display: grid; grid-template-columns: .55fr 1.45fr; gap: 40px; margin-bottom: 44px; }
.story-label { color: var(--story-accent); font-size: 11px; font-weight: 800; }
.story-section h2 {
  max-width: 18ch;
  margin: 0;
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(34px, 4vw, 62px);
  line-height: 1.12;
  letter-spacing: -.035em;
}
.story-section h2 em { color: var(--story-accent); font-style: normal; }
.story-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--story-line); border: 1px solid var(--story-line); }
.story-card { min-height: 230px; padding: 28px; background: var(--story-panel); }
.story-card-num { color: var(--story-accent); font: 800 14px/1 ui-monospace, monospace; }
.story-card h3 { margin: 48px 0 12px; font-size: 23px; line-height: 1.25; }
.story-card p { margin: 0; color: var(--story-muted); }
.story-card strong { color: var(--story-paper); }

.story-rail { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.story-stop { padding-top: 18px; border-top: 3px solid var(--story-accent); }
.story-stop b { display: block; margin-bottom: 8px; font-size: 19px; }
.story-stop p { margin: 0; color: var(--story-muted); font-size: 14px; }

.story-stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--story-line); }
.story-stat { min-height: 150px; padding: 26px; border-right: 1px solid var(--story-line); }
.story-stat:last-child { border-right: 0; }
.story-stat strong { display: block; color: var(--story-accent); font-size: clamp(34px, 4vw, 58px); line-height: 1; }
.story-stat span { display: block; margin-top: 16px; color: var(--story-muted); font-size: 10px; }

.story-final { display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: end; padding: 88px 0 120px; }
.story-final p { max-width: 44em; color: var(--story-muted); }
.story-final-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.theme-inkpanda { --story-accent: #b9f33d; --story-accent-rgb: 185, 243, 61; }
.theme-lian { --story-accent: #ff3b81; --story-accent-rgb: 255, 59, 129; }

/* InkPanda opens like a live programme: a controlled three-beat headline
   beside the actual product, rather than a poster-sized block of type. */
.theme-inkpanda .story-hero {
  position: relative;
  grid-template-columns: minmax(360px, .82fr) minmax(520px, 1.18fr);
  gap: clamp(48px, 6vw, 104px);
  align-items: center;
  min-height: auto;
  padding: clamp(88px, 9vw, 132px) 0 clamp(96px, 10vw, 148px);
}
.theme-inkpanda .story-hero::before {
  content: "ACT 01  /  MEMORY CHECK";
  position: absolute;
  left: 0;
  top: 48px;
  color: rgba(238, 228, 208, .38);
  font: 800 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .22em;
}
.theme-inkpanda .story-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 48px;
  height: 1px;
  background: linear-gradient(90deg, var(--story-accent) 0 86px, var(--story-line) 86px 100%);
}
.theme-inkpanda .story-hero-copy {
  position: relative;
  z-index: 2;
  padding-left: clamp(18px, 2vw, 30px);
  border-left: 1px solid rgba(var(--story-accent-rgb), .48);
}
.theme-inkpanda .story-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  margin-bottom: 24px;
}
.theme-inkpanda .story-kicker span {
  padding: 7px 9px 6px;
  background: var(--story-accent);
  color: #0b0907;
  letter-spacing: .15em;
}
.theme-inkpanda .story-kicker i {
  color: #b9b0a3;
  font-style: normal;
  letter-spacing: .12em;
}
.theme-inkpanda .story-title {
  max-width: 11.5em;
  margin: 0 0 24px;
  font-size: clamp(42px, 4.25vw, 68px);
  font-weight: 650;
  line-height: 1.04;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.theme-inkpanda .story-title span,
.theme-inkpanda .story-title em { display: block; }
.theme-inkpanda .story-title span + span { margin-top: .08em; }
.theme-inkpanda .story-title b {
  color: var(--story-accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08em;
  font-weight: 500;
  letter-spacing: -.06em;
}
.theme-inkpanda .story-title em {
  width: fit-content;
  margin-top: .16em;
  padding: .1em .15em .12em .09em;
  background: var(--story-accent);
  color: #0b0907;
  font-size: .78em;
  line-height: 1.08;
  transform: rotate(-.6deg);
  box-shadow: 8px 8px 0 rgba(var(--story-accent-rgb), .12);
}
.theme-inkpanda .story-lead {
  max-width: 31em;
  padding-top: 18px;
  border-top: 1px solid var(--story-line);
  color: #d8cfc0;
  font-size: clamp(16px, 1.15vw, 19px);
  line-height: 1.82;
}
.theme-inkpanda .story-manifesto {
  margin-top: 24px;
  padding: 0 0 0 17px;
  border-left-width: 3px;
  background: transparent;
  color: #aaa194;
  font-size: 15px;
  line-height: 1.85;
}
.theme-inkpanda .story-actions { margin-top: 24px; }
.theme-inkpanda .story-proof {
  z-index: 1;
  margin: 38px 14px 0 0;
  transform: rotate(.45deg);
  box-shadow: 18px 20px 0 rgba(var(--story-accent-rgb), .09), -18px -18px 0 rgba(238, 228, 208, .025);
}
.theme-inkpanda .story-proof::after {
  content: "ON STAGE  /  REAL PRODUCT";
  position: absolute;
  left: -22px;
  bottom: 72px;
  padding: 6px 8px;
  border: 1px solid rgba(var(--story-accent-rgb), .55);
  background: #0b0907;
  color: var(--story-accent);
  font: 800 9px/1 ui-monospace, monospace;
  letter-spacing: .14em;
  transform: rotate(-90deg);
  transform-origin: left bottom;
}

@media (max-width: 1000px) {
  .story-shell { width: min(100% - 36px, 820px); }
  .story-hero { grid-template-columns: 1fr; min-height: auto; padding: 72px 0 84px; }
  .story-title { max-width: 14ch; }
  .story-section-head { grid-template-columns: 1fr; gap: 12px; }
  .story-grid { grid-template-columns: 1fr; }
  .story-card { min-height: 0; }
  .story-card h3 { margin-top: 30px; }
  .story-rail, .story-stats { grid-template-columns: repeat(2, 1fr); }
  .story-stat:nth-child(2) { border-right: 0; }
  .story-stat:nth-child(-n+2) { border-bottom: 1px solid var(--story-line); }
  .story-final { grid-template-columns: 1fr; align-items: start; }
  .theme-inkpanda .story-hero {
    grid-template-columns: 1fr;
    gap: 64px;
    padding: 92px 0 112px;
  }
  .theme-inkpanda .story-title { max-width: 12.5em; font-size: clamp(42px, 7vw, 60px); }
  .theme-inkpanda .story-proof { width: calc(100% - 18px); margin: 0 0 0 18px; }
}

@media (max-width: 620px) {
  .story-shell { width: calc(100% - 28px); }
  .story-topbar { min-height: 56px; gap: 8px; padding: 9px 10px; }
  .story-back, .story-jump { min-width: 0; min-height: 36px; padding: 6px 8px; font-size: 11px; white-space: nowrap; }
  .story-code { display: none; }
  .story-hero { padding-top: 56px; gap: 54px; }
  .story-title { font-size: clamp(43px, 14vw, 64px); }
  .story-lead { font-size: 17px; }
  .story-manifesto { font-size: 16px; }
  .proof-frame { aspect-ratio: 4 / 3; }
  .proof-tabs { grid-template-columns: repeat(2, 1fr); }
  .proof-tab:nth-child(2) { border-right: 0; }
  .proof-tab:nth-child(-n+2) { border-bottom: 1px solid var(--story-line); }
  .story-section { padding: 72px 0; }
  .story-rail, .story-stats { grid-template-columns: 1fr; }
  .story-stat { border-right: 0; border-bottom: 1px solid var(--story-line); }
  .story-stat:last-child { border-bottom: 0; }
  .story-final { padding: 72px 0 96px; }
  .theme-inkpanda .story-hero { gap: 48px; padding: 76px 0 92px; }
  .theme-inkpanda .story-hero::before { top: 34px; }
  .theme-inkpanda .story-hero::after { bottom: 36px; }
  .theme-inkpanda .story-hero-copy { padding-left: 14px; }
  .theme-inkpanda .story-kicker { margin-bottom: 20px; }
  .theme-inkpanda .story-kicker i { font-size: 10px; }
  .theme-inkpanda .story-title { max-width: none; font-size: clamp(34px, 9.4vw, 43px); line-height: 1.08; }
  .theme-inkpanda .story-title em { font-size: .75em; }
  .theme-inkpanda .story-proof { width: calc(100% - 10px); margin-left: 10px; transform: none; }
  .theme-inkpanda .story-proof::after { display: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .proof-frame img { transition: opacity .18s ease, transform .3s ease; }
  .proof-frame.is-switching img { opacity: .25; transform: scale(.985); }
  .proof-tab, .story-action { transition: background .18s ease, color .18s ease, transform .18s ease; }
  .proof-tab:hover, .story-action:hover { transform: translateY(-2px); }
}
