/* =========================================================
   归墟 DREAM — 星辰科创
   卡通绘本 × 像素 RPG。粗描边、奶油纸、贴纸和对话框。
   ========================================================= */

:root {
  color-scheme: light;
  --sky: #9ed3f5;
  --sky-pale: #dff2ff;
  --sky-deep: #4f9ed6;
  --cream: #fff8e8;
  --cream-deep: #ffe9c2;
  --paper: #fffdf6;
  --ink: #33241c;
  --ink-soft: #7c6653;
  --wood: #a6622b;
  --roof: #e25b4c;
  --leaf: #7ec87a;
  --leaf-deep: #2f7a4a;
  --mint: #e7f6df;
  --lilac: #ece7fb;
  --gold: #f4bd45;
  --gold-deep: #d99a1f;
  --dream: #5b4fc7;
  --dream-soft: #dfd9ff;
  --pink: #ffd0c8;
  --line: #33241c;
  --stroke: 3px;
  --shadow-sm: 4px 4px 0 var(--line);
  --shadow: 6px 6px 0 var(--line);
  --shadow-lg: 9px 9px 0 var(--line);
  --radius: 20px;
  --gutter: clamp(18px, 4.5vw, 72px);
  --max: 1160px;
  --header-h: 76px;
  --font-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-pixel: "ZCOOL KuaiLe", "Noto Sans SC", cursive;
  --font-dot: "DotGothic16", "Courier New", monospace;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 18px);
}

body {
  margin: 0;
  overflow-x: hidden;
  background-color: var(--cream);
  background-image: radial-gradient(rgba(51, 36, 28, 0.05) 1.3px, transparent 1.3px);
  background-size: 22px 22px;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16.5px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.menu-open { overflow: hidden; }

::selection { background: var(--gold); color: var(--ink); }

a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
p, h1, h2, h3, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }

.container {
  width: min(var(--max), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
}

.skip-link {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 300;
  padding: 8px 16px;
  background: var(--gold);
  color: var(--ink);
  border: var(--stroke) solid var(--line);
  border-radius: 999px;
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}
.skip-link:focus { transform: none; }

/* 统一的卡通描边盒子 */
.chunk {
  background: #fff;
  border: var(--stroke) solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---------------------------------------------------------
   顶部进度条
   --------------------------------------------------------- */

.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 260;
  height: 6px;
  background: repeating-linear-gradient(90deg, var(--roof) 0 14px, var(--gold) 14px 28px, var(--leaf) 28px 42px, var(--sky-deep) 42px 56px);
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}

/* ---------------------------------------------------------
   Header
   --------------------------------------------------------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 200;
  height: var(--header-h);
  background: rgba(255, 248, 232, 0.94);
  border-bottom: var(--stroke) solid transparent;
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(255, 248, 232, 0.98);
  box-shadow: 0 5px 0 rgba(51, 36, 28, 0.1);
}

.nav-wrap {
  display: flex;
  align-items: center;
  gap: 26px;
  width: 100%;
  height: 100%;
  padding-inline: var(--gutter);
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: var(--gold);
  border: var(--stroke) solid var(--line);
  border-radius: 12px;
  box-shadow: 3px 3px 0 var(--line);
  transform: rotate(-7deg);
  transition: transform 0.25s var(--ease-out);
}
.brand-mark svg { width: 21px; height: 21px; color: var(--ink); }
.brand:hover .brand-mark { transform: rotate(7deg) scale(1.06); }

.brand-type { display: flex; flex-direction: column; gap: 1px; }
.brand-type strong {
  font-family: var(--font-pixel);
  font-size: 21px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.05em;
}
.brand-type small {
  color: var(--ink-soft);
  font-family: var(--font-dot);
  font-size: 8px;
  line-height: 1.3;
  letter-spacing: 0.14em;
}

.desktop-nav { display: flex; gap: 6px; margin-left: auto; }
.desktop-nav a {
  padding: 6px 13px;
  border: 2px solid transparent;
  border-radius: 999px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  opacity: 0.62;
  transition: opacity 0.2s, background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.desktop-nav a:hover {
  background: #fff;
  border-color: var(--line);
  box-shadow: 2px 2px 0 var(--line);
  opacity: 1;
  transform: translateY(-1px);
}
.desktop-nav a.is-active {
  background: var(--gold);
  border-color: var(--line);
  box-shadow: 2px 2px 0 var(--line);
  opacity: 1;
}

.nav-actions { display: flex; align-items: center; gap: 14px; }
.nav-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
  white-space: nowrap;
}
.live-dot {
  width: 10px;
  height: 10px;
  flex: none;
  border: 2px solid var(--line);
  border-radius: 3px;
  background: var(--leaf);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 15px;
  background: #fff;
  border: var(--stroke) solid var(--line);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--line);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  transition: transform 0.15s, box-shadow 0.15s, background 0.2s;
}
.nav-cta .icon { width: 16px; height: 16px; }
.nav-cta:hover { background: var(--gold); transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--line); }
.nav-cta:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--line); }

.menu-toggle {
  display: none;
  position: relative;
  width: 42px;
  height: 42px;
  border: var(--stroke) solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 3px 3px 0 var(--line);
}
.menu-toggle span {
  position: absolute;
  left: 9px;
  right: 9px;
  height: 3px;
  border-radius: 3px;
  background: var(--line);
  transition: transform 0.25s var(--ease-out), top 0.25s, bottom 0.25s;
}
.menu-toggle span:first-child { top: 12px; }
.menu-toggle span:last-child { bottom: 12px; }
.menu-toggle[aria-expanded="true"] span:first-child { top: 18px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { bottom: 18px; transform: rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 190;
  padding: 24px var(--gutter) 30px;
  background: var(--cream);
  border-top: var(--stroke) solid var(--line);
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-12px);
  transition: opacity 0.25s, transform 0.3s var(--ease-out), visibility 0.25s;
}
.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}
.mobile-menu-inner { display: flex; flex-direction: column; gap: 10px; min-height: 100%; }
.mobile-menu a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 4px;
  border-bottom: 3px dashed var(--cream-deep);
  font-family: var(--font-pixel);
  font-size: clamp(26px, 7vw, 34px);
}
.mobile-menu a span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 30px;
  flex: none;
  background: var(--gold);
  border: 2px solid var(--line);
  border-radius: 999px;
  box-shadow: 2px 2px 0 var(--line);
  font-family: var(--font-dot);
  font-size: 11px;
}
.mobile-menu-foot {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: auto;
  padding-top: 24px;
  color: var(--ink-soft);
  font-size: 12px;
}
.mobile-menu-foot p { display: flex; align-items: center; gap: 6px; }

/* ---------------------------------------------------------
   Hero
   --------------------------------------------------------- */

.hero {
  --hero-scene: url("../art/park.webp");
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding: calc(var(--header-h) + 34px) 0 88px;
  overflow: hidden;
  isolation: isolate;
  background-color: #a9dcf8;
  background-image:
    linear-gradient(90deg, rgba(255, 248, 232, 0.98) 0%, rgba(255, 248, 232, 0.97) 34%, rgba(255, 248, 232, 0.9) 48%, rgba(255, 248, 232, 0.55) 64%, rgba(255, 248, 232, 0.12) 82%, rgba(255, 248, 232, 0) 100%),
    linear-gradient(180deg, rgba(255, 248, 232, 0.82) 0%, rgba(255, 248, 232, 0.16) 16%, rgba(255, 248, 232, 0) 55%, rgba(255, 248, 232, 0.42) 100%),
    var(--hero-scene);
  background-position: 0 0, 0 0, 50% 50%;
  background-size: cover, cover, cover;
  background-repeat: no-repeat;
  image-rendering: pixelated;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 72% 42%, transparent 0 36%, rgba(51, 36, 28, 0.14) 100%),
    repeating-linear-gradient(180deg, rgba(51, 36, 28, 0.045) 0 1px, transparent 1px 4px);
  opacity: 0.65;
}

.hero-dust {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  opacity: 0.7;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  flex: 1;
  width: min(var(--max), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

.hero-copy {
  width: 100%;
  max-width: 640px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 16px 5px 6px;
  background: #fff;
  border: var(--stroke) solid var(--line);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--line);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.hero-kicker-star {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  background: var(--gold);
  border: 2px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  font-size: 14px;
}

.hero-title { margin-top: 22px; }
.hero-title-cn {
  display: inline-block;
  color: var(--ink);
  font-family: var(--font-pixel);
  font-size: clamp(84px, 10vw, 136px);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: 0.05em;
  text-shadow: 4px 4px 0 #fff, 9px 9px 0 rgba(51, 36, 28, 0.13);
  transform: rotate(-2deg);
  transform-origin: left center;
}

.hero-logo-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.hero-logo {
  width: min(360px, 58vw);
  height: auto;
  image-rendering: pixelated;
  filter: drop-shadow(3px 3px 0 rgba(51, 36, 28, 0.16));
}
.hero-logo-stamp {
  padding: 3px 12px;
  background: var(--dream-soft);
  border: var(--stroke) solid var(--line);
  border-radius: 999px;
  box-shadow: 2px 2px 0 var(--line);
  color: var(--dream);
  font-family: var(--font-pixel);
  font-size: 14px;
  letter-spacing: 0.05em;
  transform: rotate(-4deg);
}

.hero-tagline {
  margin-top: 24px;
  color: var(--ink-soft);
  font-size: clamp(18px, 2vw, 23px);
  font-weight: 500;
  line-height: 1.85;
  letter-spacing: 0.02em;
}
.hero-tagline strong {
  color: var(--ink);
  font-weight: 900;
  background: linear-gradient(transparent 58%, var(--gold) 58%, var(--gold) 92%, transparent 92%);
  padding-inline: 2px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 26px;
  background: #fff;
  border: var(--stroke) solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.03em;
  transition: transform 0.15s, box-shadow 0.15s, background 0.2s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--line); }
.btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--line); }
.btn-primary { background: var(--gold); }
.btn-ghost { background: #fff; }
.btn-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-right: -10px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--ink);
  color: var(--cream);
  transition: transform 0.25s var(--ease-out);
}
.btn-icon svg { width: 16px; height: 16px; }
.btn:hover .btn-icon { transform: rotate(-8deg) scale(1.05); }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}
.hero-meta div {
  padding: 6px 14px;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 12px;
  box-shadow: 2px 2px 0 var(--line);
}
.hero-meta dt {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
}
.hero-meta dd {
  font-family: var(--font-pixel);
  font-size: 17px;
  line-height: 1.3;
}

.hero-hud {
  position: absolute;
  top: calc(var(--header-h) + 32px);
  right: 5%;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
}
.hero-hud-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  background: rgba(255, 248, 232, 0.94);
  border: var(--stroke) solid var(--line);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--line);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--ink-soft);
  font-family: var(--font-dot);
  font-size: 12px;
  letter-spacing: 0.05em;
}
.hero-hud-title {
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
}
.hero-hud-time { color: var(--ink-soft); }

.game-dots { display: inline-flex; gap: 4px; }
.game-dots i {
  width: 9px;
  height: 9px;
  border: 2px solid var(--line);
  border-radius: 50%;
}
.game-dots i:nth-child(1) { background: var(--roof); }
.game-dots i:nth-child(2) { background: var(--gold); }
.game-dots i:nth-child(3) { background: var(--leaf); }

.hero-hud-sticker {
  margin-right: 10px;
  padding: 5px 12px;
  background: var(--roof);
  border: var(--stroke) solid var(--line);
  border-radius: 10px;
  box-shadow: 2px 2px 0 var(--line);
  color: #fff;
  font-family: var(--font-dot);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  transform: rotate(3deg);
  animation: wiggle 6s ease-in-out infinite;
}
.hero-hud-sticker span { margin-right: 4px; color: var(--gold); }

.hero-note {
  position: absolute;
  right: 6%;
  bottom: 12%;
  z-index: 4;
  width: 220px;
  padding: 16px 18px 14px;
  background: #fff3b8;
  border: var(--stroke) solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  transform: rotate(-4deg);
  animation: float 5.5s ease-in-out infinite;
}
.hero-note p {
  font-family: var(--font-pixel);
  font-size: 16px;
  line-height: 1.55;
}
.note-pin {
  position: absolute;
  top: -8px;
  left: 50%;
  width: 14px;
  height: 14px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--roof);
  transform: translateX(-50%);
  box-shadow: 1px 1px 0 var(--line);
}

.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: 20px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--cream);
  border: var(--stroke) solid var(--line);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--line);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  transform: translateX(-50%);
  transition: transform 0.2s, background 0.2s;
}
.hero-scroll:hover {
  background: var(--gold);
  transform: translateX(-50%) translateY(-2px);
}
.hero-scroll svg { animation: bob 1.4s steps(2, end) infinite; }

/* Hero entrance */
.js .hero-copy > * {
  opacity: 0;
  animation: rise 0.8s var(--ease-out) forwards;
}
.js .hero-copy > :nth-child(1) { animation-delay: 0.08s; }
.js .hero-copy > :nth-child(2) { animation-delay: 0.16s; }
.js .hero-copy > :nth-child(3) { animation-delay: 0.28s; }
.js .hero-copy > :nth-child(4) { animation-delay: 0.38s; }
.js .hero-copy > :nth-child(5) { animation-delay: 0.48s; }
.js .hero-hud {
  opacity: 0;
  animation: rise 0.8s var(--ease-out) 0.35s forwards;
}
.js .hero-scroll { opacity: 0; animation: riseCenter 0.8s var(--ease-out) 0.7s forwards; }

/* ---------------------------------------------------------
   Sections
   --------------------------------------------------------- */

.section {
  position: relative;
  padding-block: clamp(78px, 9vw, 126px);
  border-top: 4px solid var(--line);
}

.section-story,
.section-play {
  background-color: var(--cream);
  background-image: radial-gradient(rgba(51, 36, 28, 0.055) 1.3px, transparent 1.3px);
  background-size: 22px 22px;
}

.section-mint {
  background-color: var(--mint);
  background-image: radial-gradient(rgba(63, 157, 98, 0.16) 1.6px, transparent 1.6px);
  background-size: 22px 22px;
}

.section-lilac {
  background-color: var(--lilac);
  background-image: radial-gradient(rgba(91, 79, 199, 0.14) 1.6px, transparent 1.6px);
  background-size: 22px 22px;
}

.section-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: clamp(36px, 4.5vw, 56px);
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
  padding: 3px 15px 3px 5px;
  background: var(--gold);
  border: var(--stroke) solid var(--line);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--line);
  font-family: var(--font-pixel);
  font-size: 15px;
  letter-spacing: 0.08em;
}
.section-tag span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 50%;
  font-family: var(--font-dot);
  font-size: 10px;
}

.section-head h2 {
  font-family: var(--font-pixel);
  font-size: clamp(36px, 4.8vw, 58px);
  font-weight: 400;
  line-height: 1.28;
  letter-spacing: 0.01em;
  text-wrap: balance;
}
.section-head h2::after {
  content: "";
  display: inline-block;
  width: 0.42em;
  height: 0.42em;
  margin-left: 0.3em;
  background: var(--gold);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  vertical-align: 0.38em;
  transform: rotate(9deg);
}
.section-note {
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 14px;
}

/* ---------------------------------------------------------
   Story
   --------------------------------------------------------- */

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

.story-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 300px;
  padding: clamp(26px, 3vw, 38px);
  background: var(--paper);
  transition: transform 0.2s, box-shadow 0.2s;
}
.story-card::before {
  content: "";
  position: absolute;
  top: -13px;
  left: 50%;
  width: 92px;
  height: 24px;
  background: rgba(244, 189, 69, 0.72);
  border: 2px solid var(--line);
  border-radius: 3px;
  transform: translateX(-50%) rotate(-2deg);
}
.story-card:hover { transform: translateY(-4px); box-shadow: 8px 8px 0 var(--line); }

.story-card-dream {
  background: #f7f4ff;
}
.story-card-dream::before { background: rgba(145, 133, 232, 0.35); }

.story-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.story-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: none;
  background: var(--gold);
  border: var(--stroke) solid var(--line);
  border-radius: 16px;
  box-shadow: 3px 3px 0 var(--line);
}
.story-icon svg { width: 27px; height: 27px; }
.story-card-dream .story-icon { background: var(--dream-soft); color: var(--dream); }

.story-when {
  display: inline-block;
  padding: 2px 12px;
  background: var(--cream-deep);
  border: 2px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.story-card-dream .story-when { background: var(--dream-soft); color: var(--dream); }

.story-card h3 {
  margin-bottom: 12px;
  font-family: var(--font-pixel);
  font-size: 30px;
  font-weight: 400;
  line-height: 1.3;
}
.story-card p {
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.9;
}
.story-aside {
  margin-top: auto;
  padding-top: 20px;
  color: var(--wood);
  font-family: var(--font-pixel);
  font-size: 19px;
}
.story-card-dream .story-aside { color: var(--dream); }

.story-quote {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 22px;
  margin-top: 38px;
  padding: clamp(26px, 3.4vw, 40px);
  background: var(--paper);
}
.story-quote::before {
  content: "";
  position: absolute;
  left: 58px;
  bottom: -15px;
  width: 26px;
  height: 26px;
  background: var(--paper);
  border-right: var(--stroke) solid var(--line);
  border-bottom: var(--stroke) solid var(--line);
  border-bottom-right-radius: 4px;
  transform: rotate(45deg);
}
.story-quote::after {
  content: "“";
  position: absolute;
  top: -0.18em;
  right: 22px;
  color: var(--gold);
  font-family: var(--font-pixel);
  font-size: clamp(100px, 12vw, 170px);
  line-height: 1;
  opacity: 0.38;
  pointer-events: none;
}
.story-quote-avatar {
  width: 94px;
  height: 94px;
  flex: none;
  overflow: hidden;
  border: var(--stroke) solid var(--line);
  border-radius: 50%;
  background: var(--sky-pale);
  box-shadow: 3px 3px 0 var(--line);
}
.story-quote-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 7%;
}
.story-quote-body { position: relative; z-index: 1; }
.story-quote-body p {
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.85;
}
.story-quote-body footer {
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 700;
}

/* ---------------------------------------------------------
   Cast
   --------------------------------------------------------- */

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

.cast-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s;
}
.cast-card:hover {
  transform: translateY(-6px) rotate(-1deg);
  box-shadow: 8px 8px 0 var(--line);
}

.cast-index {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  padding: 1px 9px;
  background: var(--cream);
  border: 2px solid var(--line);
  border-radius: 999px;
  box-shadow: 2px 2px 0 var(--line);
  font-family: var(--font-dot);
  font-size: 11px;
}

.cast-card figure {
  position: relative;
  margin: 0;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-bottom: var(--stroke) solid var(--line);
  background: linear-gradient(180deg, #efe7ff, #d9ceff);
}
.cast-card:nth-child(2) figure { background: linear-gradient(180deg, #fff0c9, #ffd9e0); }
.cast-card:nth-child(3) figure { background: linear-gradient(180deg, #e6edfa, #c9d7ee); }
.cast-card:nth-child(4) figure { background: linear-gradient(180deg, #fff4c9, #ffe0a0); }
.cast-card:nth-child(5) figure { background: linear-gradient(180deg, #e3e0ff, #d8ecff); }
.cast-card figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0%;
  transition: transform 0.4s var(--ease-out);
}
.cast-card:hover figure img { transform: scale(1.035); }

/* 角色卡：叠加游戏内的卡牌边框，头像裁切进主画面 */
.cast-grid > .cast-card:not(.cast-card-missing) {
  border-radius: 12px;
  background: var(--cream);
}
.cast-grid > .cast-card:not(.cast-card-missing) figure {
  aspect-ratio: 262 / 372;
  border-bottom: 0;
  background: var(--cream) url("../art/card-frame.png") center / 100% 100% no-repeat;
}
.cast-grid > .cast-card:not(.cast-card-missing) figure img {
  position: absolute;
  left: 12.98%;
  top: 8.33%;
  width: 71.76%;
  height: 64.78%;
  object-fit: cover;
  object-position: 50% 0%;
  border-radius: 1px;
}
.cast-grid > .cast-card:not(.cast-card-missing):hover figure img { transform: none; }
.cast-grid > .cast-card:not(.cast-card-missing) .cast-body { background: var(--cream); }

.cast-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 18px 18px 24px;
}
.cast-role {
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 6px;
  padding: 1px 10px;
  background: var(--cream-deep);
  border: 2px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.cast-body h3 {
  margin-bottom: 8px;
  font-family: var(--font-pixel);
  font-size: 26px;
  font-weight: 400;
  line-height: 1.25;
}
.cast-body p {
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.8;
}

.cast-card-missing {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  min-height: 360px;
  background: repeating-linear-gradient(135deg, #fbf9ff 0 12px, #ece7fb 12px 24px);
  border-color: var(--dream);
  box-shadow: 6px 6px 0 var(--dream);
}
.cast-card-missing:hover { transform: translateY(-4px); box-shadow: 8px 8px 0 var(--dream); }
.cast-card-missing .cast-index { color: var(--dream); }
.cast-card-missing figure {
  height: 100%;
  min-height: 360px;
  aspect-ratio: auto;
  border-bottom: 0;
  border-right: var(--stroke) solid var(--dream);
}
.cast-card-missing .cast-body {
  justify-content: center;
  padding: clamp(24px, 3.6vw, 44px);
  background: rgba(255, 255, 255, 0.82);
}
.cast-card-missing .cast-body h3 { font-size: clamp(32px, 3.6vw, 46px); }
.cast-card-missing .cast-body p {
  max-width: 620px;
  font-size: 15.5px;
}
.cast-card-missing .cast-whisper {
  margin-top: 16px;
  font-family: var(--font-pixel);
  font-size: 19px;
}
.cast-card-missing figure figcaption {
  position: absolute;
  top: 12px;
  right: 10px;
  z-index: 2;
  padding: 2px 10px;
  background: #fff;
  border: 2px solid var(--dream);
  border-radius: 999px;
  color: var(--dream);
  font-size: 12px;
  font-weight: 700;
}
.cast-whisper {
  margin-top: 12px;
  color: var(--dream) !important;
  font-weight: 700;
}

/* ---------------------------------------------------------
   Gameplay
   --------------------------------------------------------- */

.play-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}
.play-item {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px 26px 32px;
  background: #fff;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s;
}
.play-item:hover {
  transform: translateY(-5px);
  box-shadow: 8px 8px 0 var(--line);
}

.play-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.play-no {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  flex: none;
  background: var(--gold);
  border: var(--stroke) solid var(--line);
  border-radius: 16px;
  box-shadow: 3px 3px 0 var(--line);
  font-family: var(--font-pixel);
  font-size: 28px;
  line-height: 1;
}
.play-item:nth-child(2) .play-no { background: var(--dream-soft); color: var(--dream); }
.play-item:nth-child(3) .play-no { background: var(--pink); }

.play-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 2px dashed var(--line);
  border-radius: 50%;
  background: var(--cream);
  color: var(--ink-soft);
}
.play-icon svg { width: 22px; height: 22px; }

.play-item h3 {
  margin-bottom: 8px;
  font-family: var(--font-pixel);
  font-size: 26px;
  font-weight: 400;
  line-height: 1.3;
}
.play-item p {
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.85;
}

.play-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  padding: 14px 20px;
  background: #fff;
  border: var(--stroke) dashed var(--dream);
  border-radius: 16px;
  color: var(--dream);
  font-size: 15px;
  font-weight: 700;
}
.play-foot > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  background: var(--dream);
  border: 2px solid var(--line);
  border-radius: 50%;
  color: #fff;
  font-family: var(--font-dot);
  font-size: 14px;
}

/* ---------------------------------------------------------
   Dev log
   --------------------------------------------------------- */

.log-list { display: grid; gap: 18px; }

.log-row {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  padding: 20px 24px;
  background: #fff;
  transition: transform 0.2s, box-shadow 0.2s;
}
.log-row:hover { transform: translateX(4px); box-shadow: 7px 7px 0 var(--line); }

.log-date {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 10px;
  background: var(--leaf);
  border: var(--stroke) solid var(--line);
  border-radius: 14px;
  box-shadow: 3px 3px 0 var(--line);
  font-family: var(--font-pixel);
  font-size: 17px;
  line-height: 1.2;
  text-align: center;
}
.log-date span {
  display: grid;
  place-items: center;
  width: 25px;
  height: 20px;
  flex: none;
  background: rgba(255, 255, 255, 0.66);
  border: 2px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-dot);
  font-size: 9px;
}
.log-row:nth-child(2) .log-date { background: var(--gold); }
.log-row:nth-child(3) .log-date { background: var(--pink); }
.log-row:nth-child(4) .log-date { background: var(--dream-soft); color: var(--dream); }

.log-row h3 {
  margin-bottom: 4px;
  font-family: var(--font-pixel);
  font-size: 23px;
  font-weight: 400;
  line-height: 1.3;
}
.log-row p {
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.8;
}

/* ---------------------------------------------------------
   Follow
   --------------------------------------------------------- */

.follow-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: 42px;
  padding: clamp(30px, 4.5vw, 56px);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-lg);
}
.follow-inner::before {
  content: "";
  position: absolute;
  top: -90px;
  right: -80px;
  width: 230px;
  height: 230px;
  border: 3px dashed var(--cream-deep);
  border-radius: 50%;
  pointer-events: none;
}

.follow-copy .section-tag { margin-bottom: 14px; }
.follow-copy { min-width: 0; }
.follow-copy h2 {
  margin-bottom: 14px;
  font-family: var(--font-pixel);
  font-size: clamp(30px, 3.8vw, 46px);
  font-weight: 400;
  line-height: 1.3;
}
.follow-copy > p {
  max-width: 480px;
  color: var(--ink-soft);
  line-height: 1.9;
}
.follow-note {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
  margin-top: 18px;
  padding: 4px 13px;
  background: var(--mint);
  border: 2px solid var(--line);
  border-radius: 999px;
  color: var(--leaf-deep) !important;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.7 !important;
}
.follow-note .icon { width: 16px; height: 16px; }

.follow-mail {
  position: relative;
  min-width: 0;
  padding: 28px 22px 20px;
  background: var(--cream);
  border: var(--stroke) solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  transform: rotate(1deg);
}
.follow-stamp {
  position: absolute;
  top: -17px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 11px;
  background: var(--roof);
  border: var(--stroke) solid var(--line);
  border-radius: 10px;
  box-shadow: 2px 2px 0 var(--line);
  color: #fff;
  font-family: var(--font-dot);
  font-size: 11px;
  letter-spacing: 0.1em;
  transform: rotate(4deg);
}
.follow-stamp svg { width: 14px; height: 14px; color: var(--gold); }

.follow-form {
  position: relative;
  display: flex;
  gap: 10px;
}
.follow-form input {
  flex: 1;
  min-width: 0;
  padding: 11px 17px;
  background: #fff;
  border: var(--stroke) solid var(--line);
  border-radius: 999px;
  box-shadow: inset 2px 2px 0 rgba(51, 36, 28, 0.07);
  font-size: 15px;
}
.follow-form input::placeholder { color: var(--ink-soft); opacity: 0.8; }
.follow-form .btn { padding: 9px 22px; font-size: 15px; }
.follow-form.has-error input { background: #fff0ec; border-color: var(--roof); }
.field-error {
  position: absolute;
  top: calc(100% + 7px);
  left: 16px;
  color: var(--roof);
  font-size: 13px;
  font-weight: 700;
}
.follow-small {
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 12px;
  letter-spacing: 0.04em;
}

/* ---------------------------------------------------------
   Footer
   --------------------------------------------------------- */

.site-footer {
  padding: 58px 0 26px;
  background-color: var(--ink);
  background-image:
    radial-gradient(rgba(255, 248, 232, 0.09) 1.5px, transparent 1.5px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 40%);
  background-size: 26px 26px, 100% 100%;
  border-top: 4px solid var(--gold);
  color: var(--cream);
}

.footer-main {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}

.footer-word {
  color: var(--gold);
  font-family: var(--font-pixel);
  font-size: 52px;
  line-height: 1;
  text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.35);
}
.footer-en {
  margin-top: 8px;
  font-family: var(--font-dot);
  font-size: 13px;
  letter-spacing: 0.4em;
  opacity: 0.65;
}
.footer-nav { display: flex; flex-direction: column; gap: 8px; }
.footer-nav a {
  width: fit-content;
  font-size: 15px;
  font-weight: 700;
  opacity: 0.78;
  transition: color 0.2s, opacity 0.2s, transform 0.2s;
}
.footer-nav a:hover { color: var(--gold); opacity: 1; transform: translateX(3px); }

.footer-contact { text-align: right; }
.footer-contact p {
  margin-bottom: 6px;
  font-family: var(--font-pixel);
  font-size: 20px;
}
.footer-contact a {
  color: var(--gold);
  font-size: 14px;
  word-break: break-all;
}
.footer-contact a:hover { text-decoration: underline; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 42px;
  padding-top: 18px;
  border-top: 2px dashed rgba(255, 248, 232, 0.28);
  font-size: 13px;
  opacity: 0.78;
}
.back-top {
  padding: 4px 13px;
  background: transparent;
  border: 2px solid rgba(255, 248, 232, 0.35);
  border-radius: 999px;
  color: var(--cream);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.back-top:hover { color: var(--ink); background: var(--gold); border-color: var(--gold); }

/* ---------------------------------------------------------
   Toast
   --------------------------------------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 400;
  max-width: calc(100% - 36px);
  padding: 12px 24px;
  background: var(--ink);
  border: var(--stroke) solid var(--gold);
  border-radius: 999px;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.25);
  color: var(--cream);
  font-size: 14px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: opacity 0.3s, transform 0.3s var(--ease-out);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------------------------------------
   Reveal
   --------------------------------------------------------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.65s ease, transform 0.65s var(--ease-out);
}
.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------------------------------------------------------
   Keyframes
   --------------------------------------------------------- */

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

@keyframes riseCenter {
  from { opacity: 0; transform: translate(-50%, 18px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes pop {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

@keyframes bob {
  50% { transform: translateY(5px); }
}

@keyframes float {
  0%, 100% { transform: rotate(-4deg) translateY(0); }
  50% { transform: rotate(-2deg) translateY(-8px); }
}

@keyframes drift {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(12px); }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.35; transform: scale(0.85) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.1) rotate(12deg); }
}

@keyframes wiggle {
  0%, 100% { transform: rotate(7deg); }
  50% { transform: rotate(3deg); }
}

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */

@media (max-width: 1080px) {
  .hero {
    padding-top: calc(var(--header-h) + 40px);
    padding-bottom: 120px;
    background-image:
      linear-gradient(180deg, rgba(255, 248, 232, 0.97) 0%, rgba(255, 248, 232, 0.94) 45%, rgba(255, 248, 232, 0.74) 68%, rgba(255, 248, 232, 0.18) 90%, rgba(255, 248, 232, 0) 100%),
      var(--hero-scene);
    background-position: 0 0, 50% 50%;
    background-size: cover, cover;
  }
  .hero-copy { max-width: 620px; }
  .hero-hud { top: calc(var(--header-h) + 30px); right: var(--gutter); }
  .hero-note { right: var(--gutter); bottom: 16%; }
  .cast-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .play-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .desktop-nav { display: none; }
  .nav-status { display: none; }
  .nav-actions { margin-left: auto; }
  .menu-toggle { display: block; }
  .story-grid { grid-template-columns: minmax(0, 1fr); }
  .follow-inner { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .footer-main { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-contact { text-align: left; grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .hero { padding-bottom: 100px; }
  .hero-note { display: none; }
  .hero-hud {
    top: auto;
    right: var(--gutter);
    bottom: 30px;
  }
  .hero-scroll { display: none; }
  .play-list { grid-template-columns: minmax(0, 1fr); }
  .log-row { grid-template-columns: 1fr; gap: 12px; }
  .log-date { justify-content: flex-start; width: fit-content; padding-inline: 12px; }
  .footer-main { grid-template-columns: minmax(0, 1fr); }
  .footer-contact { grid-column: auto; }
}

@media (max-width: 640px) {
  :root { --header-h: 70px; --stroke: 3px; }
  .nav-cta { display: none; }
  .brand-mark { width: 36px; height: 36px; }
  .brand-type strong { font-size: 19px; }
  .hero { padding-top: calc(var(--header-h) + 26px); }
  .hero-kicker { font-size: 12px; }
  .hero-title-cn { font-size: clamp(72px, 22vw, 96px); }
  .hero-logo-row { gap: 10px; }
  .hero-logo { width: min(290px, 74vw); }
  .hero-logo-stamp { font-size: 12px; }
  .hero-actions { gap: 12px; }
  .hero-actions .btn { flex: 1; min-width: 150px; }
  .hero-meta div { flex: 1; padding: 6px 10px; }
  .hero-meta dd { font-size: 14px; }
  .hero-meta dt { font-size: 9px; }
  .cast-grid { grid-template-columns: minmax(0, 1fr); }
  .cast-card-missing {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  .cast-card-missing figure {
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 3 / 4;
    border-right: 0;
    border-bottom: var(--stroke) solid var(--dream);
  }
  .cast-card-missing .cast-body { padding: 20px 20px 26px; }
  .cast-card-missing .cast-body h3 { font-size: 30px; }
  .cast-card-missing .cast-body p { font-size: 14.5px; }
  .cast-card-missing .cast-whisper { font-size: 17px; }
  .story-card { min-height: 0; }
  .story-quote { flex-direction: column; }
  .story-quote-avatar { width: 76px; height: 76px; }
  .follow-form { flex-direction: column; }
  .follow-form .btn { width: 100%; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 420px) {
  .hero-title-cn { font-size: 68px; }
  .hero-tagline { font-size: 17px; }
  .nav-wrap { gap: 12px; }
  .brand-type small { display: none; }
  .section-head h2 { font-size: 33px; }
  .follow-inner { padding-inline: 20px; }
  .hero-hud-bar {
    gap: 7px;
    padding: 6px 10px;
    font-size: 10px;
  }
  .hero-hud-sticker {
    padding: 4px 9px;
    font-size: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  html { scroll-behavior: auto; }
  .js [data-reveal],
  .js .hero-copy > *,
  .js .hero-hud {
    opacity: 1;
    transform: none;
  }
  .js .hero-scroll {
    opacity: 1;
    transform: translateX(-50%);
  }
}
