/* xx studio. Paper, ink, and one colour world per app (apps.css is generated from site.json).
   Performance: loop animations only on transform and opacity; no blur filters, blend modes or backdrop filters;
   sections out of view get .idle and their animations pause. */

@font-face { font-family: "Instrument Serif"; src: url("../fonts/InstrumentSerif-Regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../fonts/InstrumentSerif-Italic.woff") format("woff"); font-weight: 400; font-style: italic; font-display: swap; }
/* Noto Serif SC Bold, cut down to the characters the headings use. Declared at 400 so nothing is synthesised. */
@font-face {
  font-family: "Studio Serif SC"; src: url("../fonts/studio-serif-sc.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+3000-303F, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FF00-FFEF;
}

:root {
  --paper: #f3eee4;
  --paper-2: #fbf8f2;
  --ink: #1d1a17;
  --ink-soft: rgba(29, 26, 23, 0.66);
  --ink-faint: rgba(29, 26, 23, 0.32);
  --hair: rgba(29, 26, 23, 0.1);
  --vermilion: #e2512b;
  --night: #1b1814;

  --font-ui: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Segoe UI", "Microsoft YaHei", Roboto, "Helvetica Neue", sans-serif;
  --font-latin: "Instrument Serif", "New York", Georgia, serif;
  --font-display: "Instrument Serif", "Studio Serif SC", "Songti SC", "Noto Serif SC", "Source Han Serif SC", serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --font-num: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --nav-h: 76px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.55, 0, 1, 0.45);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; min-height: 100vh;
  background: var(--paper) url("../img/grain.png") repeat;
  color: var(--ink);
  font: 16px/1.6 var(--font-ui);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, p, dl, dd, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }
:focus-visible { outline: 2px solid var(--vermilion); outline-offset: 3px; border-radius: 6px; }
::selection { background: #f6d860; color: var(--ink); }

.skip { position: fixed; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 99px; background: var(--ink); color: var(--paper); }
.skip:focus { top: 12px; }

.phrase { display: inline-block; }
h1, h2, .card-tagline, .card-name, .way h3, .footer-tagline, .ls-what, .td-place, .bh-meta b, .hd-head b { font-feature-settings: "palt"; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 12.5px/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft);
}
.eyebrow .count { color: var(--vermilion); letter-spacing: 0; }
.seal { width: 14px; height: 14px; border-radius: 4px; background: var(--vermilion); transform: rotate(8deg); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35); }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 24px; border-radius: 99px;
  background: var(--ink); color: var(--paper);
  font-size: 15px; font-weight: 600; letter-spacing: 0.01em;
  transition: transform 0.35s var(--ease-spring);
}
.btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.35s var(--ease-spring); }
.btn:hover { transform: translateY(-2px); }
.btn:hover svg { transform: translateY(2px); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }

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

[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease-out), transform 1.1s var(--ease-out); }
[data-reveal].in { opacity: 1; transform: none; }
[data-split] .phrase, [data-split].solo { opacity: 0; transform: translateY(0.45em); transition: opacity 0.8s var(--ease-out), transform 1.1s var(--ease-out); transition-delay: var(--d, 0s); }
[data-split].in .phrase, [data-split].solo.in { opacity: 1; transform: none; }

/* ---------- Nav ---------- */

.nav { position: fixed; top: 12px; left: 0; right: 0; z-index: 50; display: flex; justify-content: center; padding: 0 var(--gutter); pointer-events: none; }
.nav-pill {
  pointer-events: auto; width: 100%; max-width: 1320px; height: 52px;
  display: flex; align-items: center; gap: 6px; padding: 0 7px 0 20px;
  background: rgba(246, 242, 234, 0.95); border: 1px solid rgba(29, 26, 23, 0.08); border-radius: 99px;
  box-shadow: 0 12px 30px -20px rgba(30, 20, 10, 0.45);
}
.brand { display: inline-flex; align-items: baseline; gap: 5px; margin-right: auto; font-family: var(--font-latin); font-size: 25px; line-height: 1; }
.brand-mark { font-style: italic; color: var(--vermilion); }
.nav-links { display: flex; gap: 2px; }
.nav-links a { padding: 8px 14px; border-radius: 99px; font-size: 14px; color: var(--ink-soft); transition: background-color 0.25s, color 0.25s; }
.nav-links a:hover, .nav-links a.on { color: var(--ink); background: rgba(29, 26, 23, 0.07); }
.lang { margin-left: 4px; padding: 9px 15px; border-radius: 99px; background: var(--ink); color: var(--paper); font-size: 13px; font-weight: 600; line-height: 1.1; }

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

.hero {
  position: relative; overflow: hidden;
  min-height: max(700px, 100svh);
  padding: calc(var(--nav-h) + 5vh) var(--gutter) 7vh;
  display: flex; align-items: center;
}
.hero::before { /* a warm pool of light behind the icons */
  content: ""; position: absolute; right: -14vw; top: 8%; width: 70vw; aspect-ratio: 1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(246, 207, 140, 0.5), rgba(246, 207, 140, 0.16) 55%, transparent);
}
.hero-copy { position: relative; z-index: 2; width: min(660px, 54vw); margin-left: max(0px, calc((100vw - 1320px) / 2 - var(--gutter))); }
.hero-title {
  margin: 26px 0 0;
  font: 400 clamp(56px, 8.3vw, 132px)/1.02 var(--font-display);
  letter-spacing: -0.015em;
}
:lang(zh-Hans) .hero-title { font-size: clamp(44px, 5.9vw, 92px); line-height: 1.16; letter-spacing: 0; }
/* Chinese has no italic: a slanted CJK glyph is a fake. Colour carries the emphasis instead. */
:lang(zh-Hans) .hero-title .phrase:nth-child(n), :lang(zh-Hans) .section-head h2 .phrase:nth-child(n) { font-style: normal; }
.hero-title .phrase:nth-child(2) { color: var(--vermilion); font-style: italic; }
.hero-lead { margin-top: 28px; max-width: 30em; font-size: clamp(16px, 1.35vw, 18.5px); line-height: 1.8; color: var(--ink-soft); }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 22px; margin-top: 34px; }
.hero-hint { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-soft); }
.hero-hint svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; animation: nudge 2.4s var(--ease-out) infinite; }
@keyframes nudge { 0%, 60%, 100% { transform: none; } 30% { transform: translate(5px, -3px) rotate(8deg); } }
.hero-stats { display: flex; gap: clamp(22px, 3vw, 44px); margin-top: clamp(36px, 6vh, 64px); padding-top: 22px; border-top: 1px solid var(--hair); }
.hero-stats div { display: grid; gap: 4px; }
.hero-stats dt { font: 400 clamp(40px, 4vw, 56px)/0.9 var(--font-latin); }
.hero-stats div:last-child dt { color: var(--vermilion); font-style: italic; }
.hero-stats dd { font-size: 13px; color: var(--ink-soft); }

.tiles { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.tile {
  position: absolute; left: 0; top: 0; width: var(--s, 140px); height: var(--s, 140px);
  pointer-events: auto; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent; opacity: 0; will-change: transform;
}
.tiles.ready .tile { opacity: 1; }
.tile-face {
  display: block; width: 100%; height: 100%; border-radius: 23%; overflow: hidden; position: relative;
  box-shadow: 0 22px 40px -18px rgba(60, 40, 20, 0.45), 0 3px 8px rgba(60, 40, 20, 0.12);
  transition: transform 0.4s var(--ease-spring);
}
/* Each tile bobs on its own clock. The separate translate property keeps this off the transform the physics sets. */
.tiles.ready .tile-face { animation: tile-bob var(--bob, 3.4s) ease-in-out infinite alternate; animation-delay: var(--bob-delay, 0s); }
.tile:nth-child(2) { --bob: 3.9s; --bob-delay: -1.1s; } .tile:nth-child(3) { --bob: 3.1s; --bob-delay: -2.3s; }
.tile:nth-child(4) { --bob: 4.2s; --bob-delay: -0.6s; } .tile:nth-child(5) { --bob: 3.6s; --bob-delay: -1.9s; }
.tile:nth-child(6) { --bob: 3.3s; --bob-delay: -2.8s; } .tile:nth-child(7) { --bob: 4s; --bob-delay: -1.4s; }
.tile:nth-child(8) { --bob: 3.5s; --bob-delay: -3s; } .tile:nth-child(9) { --bob: 3.8s; --bob-delay: -0.3s; }
@keyframes tile-bob { from { translate: -3px -6px; } to { translate: 3px 7px; } }
.tile-face::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 0 0 1px rgba(0, 0, 0, 0.06); pointer-events: none; }
.tile img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.tile:hover .tile-face, .tile:focus-visible .tile-face { transform: scale(1.06); }
.tile.dragging { cursor: grabbing; }
.tile.dragging .tile-face { transform: scale(1.12); }
.tile-name {
  position: absolute; left: 50%; top: 100%; transform: translate(-50%, 4px);
  padding: 5px 11px; border-radius: 99px; background: var(--ink); color: var(--paper);
  font-size: 12.5px; font-weight: 600; white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity 0.25s, transform 0.35s var(--ease-out);
}
.tile:hover .tile-name, .tile:focus-visible .tile-name, .tile.dragging .tile-name { opacity: 1; transform: translate(-50%, 12px); }
.tile:focus-visible { outline: none; }
.tile:focus-visible .tile-face { outline: 3px solid var(--vermilion); outline-offset: 4px; }

/* ---------- Tape ---------- */

.tape { position: relative; z-index: 4; overflow: hidden; margin: -36px 0 0; padding: 26px 0; }
.tape-band {
  width: 108vw; margin-left: -4vw; transform: rotate(-2deg);
  background: #f4d35e repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.07) 0 3px, transparent 3px 9px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), inset 0 -1px 0 rgba(120, 90, 0, 0.18);
  padding: 13px 0; overflow: hidden;
}
.tape-track { display: flex; align-items: center; width: max-content; animation: tape 52s linear infinite; }
.tape-track span { padding: 0 22px; font: 400 27px/1 var(--font-display); white-space: nowrap; }
.tape-track i { font-style: normal; color: var(--vermilion); font-size: 15px; }
@keyframes tape { to { transform: translateX(-50%); } }

/* ---------- Section heads ---------- */

.section-head {
  max-width: 1320px; margin: 0 auto;
  padding: clamp(100px, 14vw, 180px) var(--gutter) clamp(40px, 6vw, 76px);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 26em); align-items: end; gap: 22px 48px;
}
.section-head .eyebrow { grid-column: 1 / -1; }
.section-head h2 { font: 400 clamp(52px, 8.4vw, 128px)/0.98 var(--font-display); letter-spacing: -0.015em; }
:lang(zh-Hans) .section-head h2 { font-size: clamp(44px, 7vw, 104px); line-height: 1.1; letter-spacing: 0; }
.section-head h2 .phrase:nth-child(2) { font-style: italic; }
:lang(zh-Hans) .section-head h2 .phrase:nth-child(2) { color: var(--vermilion); }
.section-lead { font-size: 17px; line-height: 1.8; color: var(--ink-soft); padding-bottom: 10px; }

/* ---------- Deck of app cards ---------- */

.deck { max-width: 1400px; margin: 0 auto; padding: 0 var(--gutter) clamp(40px, 8vh, 100px); }
.card {
  --i: 0;
  position: relative; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  margin-bottom: 22px; border-radius: clamp(26px, 3vw, 40px); overflow: hidden;
  background: var(--bg); color: var(--ink);
  box-shadow: 0 40px 70px -50px rgba(30, 20, 10, 0.55);
  transform-origin: 50% 0;
  isolation: isolate;
}
.card-anchor { display: block; height: 0; }
.card-shade { position: absolute; inset: 0; z-index: 8; background: #0b0a09; opacity: 0; pointer-events: none; }
.card-copy { position: relative; z-index: 2; display: flex; flex-direction: column; gap: clamp(14px, 2.2vh, 22px); padding: clamp(26px, 3.6vw, 56px); min-width: 0; }
.card-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; font: 500 12px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--soft); }
.card-index { font: italic 400 22px/1 var(--font-latin); letter-spacing: 0; text-transform: none; color: var(--ink); }
.card-index em { margin-left: 5px; font-size: 15px; font-style: normal; color: var(--soft); }
.status { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 99px; }
.status i { width: 7px; height: 7px; border-radius: 50%; background: #39b86a; box-shadow: 0 0 0 3px rgba(57, 184, 106, 0.18); }
.status-soon i { background: #f0a230; box-shadow: 0 0 0 3px rgba(240, 162, 48, 0.2); }
.card-id { display: flex; align-items: center; gap: 16px; margin-top: auto; }
.card-icon { width: 64px; height: 64px; border-radius: 23%; box-shadow: 0 12px 24px -12px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 0, 0, 0.05); }
.card-name { font: 400 30px/1.1 var(--font-display); }
.card-latin { display: block; margin-top: 3px; font: italic 400 19px/1 var(--font-latin); color: var(--soft); }
.card-tagline { font: 400 clamp(34px, 4vw, 62px)/1.08 var(--font-display); letter-spacing: -0.01em; }
:lang(zh-Hans) .card-tagline { font-size: clamp(30px, 3.4vw, 52px); line-height: 1.2; letter-spacing: 0; }
.card-desc { max-width: 33em; font-size: 15.5px; line-height: 1.8; color: var(--soft); }
.card-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 20px; margin-top: auto; }
.visit {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 99px;
  background: var(--accent); color: var(--on-accent); font-size: 15px; font-weight: 600;
  transition: transform 0.35s var(--ease-spring);
}
.visit svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.35s var(--ease-spring); }
.visit:hover { transform: translateY(-2px); }
.visit:hover svg { transform: translate(2px, -2px); }
.platforms { font: 500 12.5px var(--font-mono); color: var(--soft); }
.card-stage { position: relative; min-width: 0; overflow: hidden; container-type: size; }
.scene { position: absolute; inset: 0; display: grid; place-items: center; }

@media (min-width: 900px) and (min-height: 640px) {
  .card {
    position: sticky; top: calc(var(--nav-h) + 8px + var(--i) * 7px);
    height: calc(100svh - var(--nav-h) - 8px - 56px - 24px); min-height: 560px; max-height: 860px;
    margin-bottom: 6vh;
  }
  .card:nth-of-type(2) { --i: 1; } .card:nth-of-type(3) { --i: 2; } .card:nth-of-type(4) { --i: 3; } .card:nth-of-type(5) { --i: 4; }
  .card:nth-of-type(6) { --i: 5; } .card:nth-of-type(7) { --i: 6; } .card:nth-of-type(8) { --i: 7; } .card:nth-of-type(9) { --i: 8; }
}
@media (max-width: 899.98px), (max-height: 639.98px) {
  .card { grid-template-columns: 1fr; }
  .card-stage { order: -1; height: min(112vw, 560px); }
  .card-id { margin-top: 6px; }
}

/* ---------- Scene: TouchFish ---------- */

.scene-touchfish .tf-sun { position: absolute; width: 74cqmin; aspect-ratio: 1; border-radius: 50%; right: -16cqmin; top: -10cqmin; background: radial-gradient(closest-side, #ffd6a0, rgba(255, 214, 160, 0)); }
.tf-receipt {
  position: relative; width: min(80cqmin, 420px); padding: clamp(20px, 6cqmin, 36px);
  background: var(--surface); border-radius: 24px; transform: rotate(-2.5deg);
  box-shadow: 0 30px 60px -34px rgba(90, 55, 20, 0.55), 0 0 0 1px rgba(34, 48, 77, 0.06);
}
.tf-top { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.tf-cat { width: 34px; height: 31px; }
.tf-cat .fur { fill: #fff1dc; stroke: var(--ink); stroke-width: 2.2; stroke-linejoin: round; }
.tf-cat .line { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; }
.tf-cat .blush { fill: #f59c88; opacity: 0.8; }
.tf-live { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font: 700 11px var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.tf-live i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: blink 1.2s steps(2, jump-none) infinite; }
@keyframes blink { 50% { opacity: 0.2; } }
.tf-amount { display: flex; align-items: baseline; margin: clamp(12px, 4cqmin, 24px) 0 6px; font: 700 min(15cqmin, 78px)/1 var(--font-num); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.tf-cur { font-size: 0.46em; margin-right: 0.12em; color: var(--accent); }
.tf-digits { display: inline-flex; align-items: flex-start; height: 1em; overflow: hidden; }
.tf-col { display: flex; flex-direction: column; transition: transform 0.8s var(--ease-out); }
.tf-col span, .tf-sep { display: block; height: 1em; line-height: 1; }
.tf-rate { font: 500 12px var(--font-mono); color: var(--soft); }
.tf-bar { height: 10px; margin-top: clamp(14px, 4.5cqmin, 26px); border-radius: 99px; background: rgba(34, 48, 77, 0.08); overflow: hidden; }
.tf-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ffbf6b, var(--accent)); transform-origin: 0 50%; transform: scaleX(0.4); transition: transform 1s linear; }
.tf-until { display: flex; justify-content: space-between; align-items: baseline; margin-top: 10px; font-size: 13px; color: var(--soft); }
.tf-clock { font: 700 15px var(--font-mono); color: var(--ink); }
.tf-coins { position: absolute; inset: 0; pointer-events: none; }
.tf-coin {
  position: absolute; left: 50%; top: 34%; padding: 5px 10px; border-radius: 99px;
  background: #fff; color: var(--accent); font: 700 13px var(--font-mono);
  box-shadow: 0 8px 16px -10px rgba(90, 55, 20, 0.5);
  animation: coin 1.7s var(--ease-out) forwards;
}
@keyframes coin { from { opacity: 0; transform: translate(var(--cx), 14px) scale(0.8); } 18% { opacity: 1; } to { opacity: 0; transform: translate(var(--cx), -64px) scale(1); } }
.tf-swim { position: absolute; left: 0; bottom: 7%; width: 100%; animation: swim 16s linear infinite; }
@keyframes swim { from { transform: translateX(-90px); } to { transform: translateX(calc(100cqw + 20px)); } }
.tf-bob { width: 66px; animation: bob 1.6s ease-in-out infinite alternate; }
@keyframes bob { from { transform: translateY(-7px) rotate(-5deg); } to { transform: translateY(7px) rotate(5deg); } }
.tf-fish { width: 66px; transform: scaleX(-1); }
.tf-fish .body { fill: var(--accent); }
.tf-fish .tail { fill: #f48c6e; }
.tf-fish .fin { fill: none; stroke: #f48c6e; stroke-width: 4; stroke-linecap: round; }
.tf-fish .stripe { fill: none; stroke: #fff1e0; stroke-width: 3; opacity: 0.55; }
.tf-fish .eye { fill: var(--ink); }
.tf-fish .mouth { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; }

/* ---------- Scene: Haloday ---------- */

.scene-haloday { background: radial-gradient(60% 60% at 50% 50%, rgba(245, 154, 70, 0.14), transparent); }
.scene-haloday .defs { position: absolute; width: 0; height: 0; }
.hd-paper {
  position: relative; width: min(86cqmin, 460px); padding: clamp(18px, 5.5cqmin, 34px);
  background: var(--surface); color: #2b2420; border-radius: 20px; transform: rotate(1.5deg);
  box-shadow: 0 34px 70px -34px rgba(0, 0, 0, 0.75);
}
.hd-tape { position: absolute; top: -13px; left: 50%; width: 112px; height: 26px; margin-left: -56px; transform: rotate(-3deg); background: rgba(245, 154, 70, 0.62); }
.hd-head { display: flex; align-items: baseline; gap: 10px; }
.hd-head b { font: 400 26px/1 var(--font-display); }
.hd-date { font-size: 13px; color: rgba(43, 36, 32, 0.55); }
.hd-count { margin-left: auto; font: 600 13px var(--font-mono); color: rgba(43, 36, 32, 0.6); }
.hd-count i { font-style: normal; color: #e07d28; }
.hd-rings { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(10px, 3.4cqmin, 22px) 8px; margin: clamp(14px, 4.4cqmin, 26px) 0 clamp(8px, 2.6cqmin, 16px); }
.hd-ring {
  display: grid; justify-items: center; gap: 6px; padding: 0; border: 0; background: none; cursor: pointer;
  font-size: 13px; font-weight: 500; -webkit-tap-highlight-color: transparent; touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
.hd-dial { position: relative; display: grid; place-items: center; width: min(18cqmin, 88px); aspect-ratio: 1; }
.hd-dial > * { grid-area: 1 / 1; }
.hd-dial .ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.hd-track { fill: none; stroke: rgba(43, 36, 32, 0.09); stroke-width: 7; }
.hd-arc { fill: none; stroke: #f08a35; stroke-width: 7; stroke-linecap: round; stroke-dasharray: 207.35; stroke-dashoffset: 207.35; transition: stroke-dashoffset 0.3s ease-out; }
.hd-ring.hold .hd-arc { stroke-dashoffset: 0; transition: stroke-dashoffset 0.85s linear; }
.hd-ring.done .hd-arc { stroke-dashoffset: 0; transition: none; }
.hd-dial .flower { width: 58%; height: 58%; transform: scale(0) rotate(-80deg); transition: transform 0.55s var(--ease-spring); }
.hd-ring.done .flower { transform: none; }
.hd-ring:active .hd-dial { transform: scale(0.96); }
.hd-hint { text-align: center; font-size: 12.5px; color: rgba(43, 36, 32, 0.55); min-height: 1.6em; }
.hd-hint.cheer { color: #d9721f; font-weight: 600; }
.hd-book { display: flex; align-items: center; gap: 12px; margin-top: clamp(10px, 3cqmin, 18px); padding-top: clamp(10px, 3cqmin, 18px); border-top: 1px dashed rgba(43, 36, 32, 0.2); font-size: 12px; color: rgba(43, 36, 32, 0.6); }
.hd-stickers { display: flex; flex-wrap: wrap; gap: 3px; min-height: 22px; }
.hd-sticker { width: 22px; height: 22px; animation: pop 0.55s var(--ease-spring) both; }
.hd-stickers.clear .hd-sticker { animation: fade-out 0.4s ease-in both; }
@keyframes pop { from { transform: scale(0) rotate(-40deg); } }
@keyframes fade-out { to { opacity: 0; transform: scale(0.6); } }

/* ---------- Scene: BeadHalo ---------- */

.scene-beadhalo { display: flex; align-items: center; justify-content: center; gap: clamp(18px, 5cqmin, 40px); padding: 6cqmin; }
.bh-board {
  flex: none; width: min(64cqmin, 430px); aspect-ratio: 1; padding: 3.4cqmin;
  background: var(--surface); border-radius: 26px; transform: rotate(-2deg); cursor: pointer; touch-action: manipulation;
  box-shadow: 0 34px 60px -38px rgba(60, 40, 120, 0.6), inset 0 0 0 1px rgba(42, 35, 64, 0.06);
}
.bh-svg { width: 100%; height: 100%; overflow: visible; }
.bh-peg { fill: rgba(42, 35, 64, 0.14); }
.bh-bead > g { transform-box: fill-box; transform-origin: center; animation: bead-in 0.5s var(--ease-spring) both; animation-delay: var(--d, 0s); }
.bh-bead.out > g { animation: bead-out 0.32s var(--ease-in) both; animation-delay: var(--d, 0s); }
.bh-bead .hole { fill: rgba(0, 0, 0, 0.2); }
.bh-bead .shine { fill: rgba(255, 255, 255, 0.45); }
@keyframes bead-in { from { transform: scale(0); } }
@keyframes bead-out { to { transform: scale(0); } }
.bh-side { display: grid; gap: 14px; width: min(30cqmin, 200px); }
.bh-meta b { display: block; font: 400 30px/1.1 var(--font-display); }
.bh-stat { font: 500 12px var(--font-mono); color: var(--soft); }
.bh-palette { display: flex; flex-wrap: wrap; gap: 8px; }
.bh-swatch { position: relative; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; background: var(--c); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.14); }
.bh-swatch::after { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: rgba(0, 0, 0, 0.2); }
.bh-swatch[aria-pressed="true"] { outline: 2px solid var(--ink); outline-offset: 3px; }
.bh-hint { font-size: 13px; line-height: 1.6; color: var(--soft); }
.bh-tweezers { position: absolute; width: 30cqmin; right: 3%; top: 7%; fill: #b8a6f0; transform: rotate(-30deg); animation: tweeze 3.2s ease-in-out infinite alternate; pointer-events: none; }
@keyframes tweeze { to { transform: rotate(-25deg) translate(-10px, 8px); } }
@container (max-aspect-ratio: 1 / 1) {
  .scene-beadhalo { flex-direction: column; gap: 4cqmin; }
  .bh-board { width: min(72cqmin, 400px); }
  .bh-side { width: auto; grid-template-columns: auto auto; align-items: center; justify-content: center; gap: 8px 18px; text-align: left; }
  .bh-hint { display: none; }
  .bh-meta b { font-size: 24px; }
}

/* ---------- Scene: PicLoom ---------- */

.pl-frame {
  position: relative; z-index: 1; width: min(80cqmin, 480px); padding: 3.4cqmin 3.4cqmin 2.2cqmin;
  background: var(--surface); border-radius: 10px; transform: rotate(-3deg);
  box-shadow: 0 34px 60px -34px rgba(90, 55, 0, 0.6);
}
.pl-photo { position: relative; aspect-ratio: 10 / 7; overflow: hidden; border-radius: 4px; cursor: ew-resize; touch-action: pan-y; --split: 50%; }
.pl-before, .pl-after, .pl-after-inner { position: absolute; inset: 0; }
.pl-art { position: absolute; inset: 0; display: block; background: linear-gradient(#ffe3a6, #ffb98c 52%, #ff9c78); }
.pl-art svg { width: 100%; height: 100%; }
.pl-before .pl-art { filter: saturate(0.16) brightness(0.8) contrast(0.84) sepia(0.22); }
.pl-after { overflow: hidden; transform: translateX(var(--split)); will-change: transform; }
.pl-after-inner { transform: translateX(calc(var(--split) * -1)); will-change: transform; }
.pl-handle { position: absolute; inset: 0; transform: translateX(var(--split)); pointer-events: none; will-change: transform; }
.pl-handle::before { content: ""; position: absolute; left: -1px; top: 0; bottom: 0; width: 2px; background: #fff; }
.pl-handle i { position: absolute; left: -19px; top: 50%; width: 38px; height: 38px; margin-top: -19px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.45); }
.pl-handle svg { width: 18px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pl-tag { position: absolute; top: 10px; padding: 5px 9px; border-radius: 99px; background: rgba(20, 14, 8, 0.5); color: #fff; font: 600 11px/1 var(--font-mono); letter-spacing: 0.06em; }
.pl-tag-l { left: 10px; }
.pl-tag-r { right: 10px; background: var(--accent); }
.pl-caption { margin-top: 2.2cqmin; text-align: center; font-size: 13px; color: rgba(42, 30, 18, 0.6); }
.pl-sun { position: absolute; z-index: 2; width: 21cqmin; top: 6%; right: 7%; pointer-events: none; }
.pl-sun .rays { fill: none; stroke: #f07f22; stroke-width: 7; stroke-linecap: round; transform-box: view-box; transform-origin: 0 0; animation: spin 16s linear infinite; }
.pl-sun circle { fill: #ffbf2e; stroke: #2a1e12; stroke-width: 3.5; }
.pl-sun .eye { fill: #2a1e12; stroke: none; }
.pl-sun .smile { fill: none; stroke: #2a1e12; stroke-width: 3.5; stroke-linecap: round; }
.pl-star { position: absolute; z-index: 2; width: 13cqmin; left: 6%; bottom: 9%; fill: #ff5d8f; stroke: #2a1e12; stroke-width: 4; stroke-linejoin: round; animation: wobble 3.6s ease-in-out infinite alternate; pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes wobble { from { transform: rotate(-12deg) scale(0.95); } to { transform: rotate(10deg) scale(1.05); } }

/* ---------- Scene: Sumory ---------- */

.scene-sumory { display: flex; align-items: center; justify-content: center; gap: clamp(16px, 5cqmin, 40px); padding: 5cqmin; }
.sm-machine { position: relative; z-index: 1; width: min(44cqmin, 280px); flex: none; }
.sm-printer { position: relative; z-index: 2; height: max(44px, 9cqmin); border-radius: 16px; background: #1d2f73; box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.25), 0 18px 34px -18px rgba(0, 0, 0, 0.6); }
.sm-slot { position: absolute; left: 9%; right: 9%; bottom: 10px; height: 6px; border-radius: 4px; background: #0d1844; }
.sm-led { position: absolute; right: 16px; top: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: blink 1s steps(2, jump-none) infinite; }
.sm-feed { position: relative; height: min(66cqmin, 410px); margin: -14px 9% 0; overflow: hidden; }
.sm-receipt {
  padding: 30px 16px 22px; background: #fbf3e3; color: #2b2b2b; font: 500 12px/1.75 var(--font-mono);
  transform: translateY(-101%);
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - 7px) no-repeat, conic-gradient(from -45deg at bottom, transparent, #000 1deg 89deg, transparent 90deg) bottom / 12px 7px repeat-x;
  mask: linear-gradient(#000 0 0) top / 100% calc(100% - 7px) no-repeat, conic-gradient(from -45deg at bottom, transparent, #000 1deg 89deg, transparent 90deg) bottom / 12px 7px repeat-x;
}
.sm-shop { text-align: center; font: 400 17px/1.3 var(--font-display); }
.sm-date { text-align: center; font-size: 10.5px; color: #8a8478; padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px dashed #c9c0ae; }
.sm-items li { display: flex; justify-content: space-between; gap: 10px; opacity: 0; transition: opacity 0.3s; }
.sm-total { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 8px; border-top: 1px dashed #c9c0ae; font-size: 14px; font-weight: 700; opacity: 0; transition: opacity 0.3s; }
.sm-barcode { height: 28px; margin-top: 12px; opacity: 0.85; background: repeating-linear-gradient(90deg, #2b2b2b 0 2px, transparent 2px 4px, #2b2b2b 4px 5px, transparent 5px 8px, #2b2b2b 8px 11px, transparent 11px 12px, #2b2b2b 12px 13px, transparent 13px 16px); }
.scene-sumory.print .sm-receipt { transform: none; transition: transform 2s steps(16, end); }
.scene-sumory.print .sm-items li, .scene-sumory.print .sm-total { opacity: 1; }
.scene-sumory.print .sm-items li:nth-child(1) { transition-delay: 0.9s; }
.scene-sumory.print .sm-items li:nth-child(2) { transition-delay: 1.15s; }
.scene-sumory.print .sm-items li:nth-child(3) { transition-delay: 1.4s; }
.scene-sumory.print .sm-items li:nth-child(4) { transition-delay: 1.65s; }
.scene-sumory.print .sm-total { transition-delay: 2s; }
.scene-sumory.tear .sm-receipt { transform: translate(14%, 40%) rotate(9deg); opacity: 0; transition: transform 0.7s var(--ease-in), opacity 0.6s 0.1s; }
.sm-split { position: relative; z-index: 1; display: grid; gap: 10px; width: min(40cqmin, 240px); }
.sm-split-label { font: 600 12px var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--soft); opacity: 0; transition: opacity 0.4s; }
.sm-person {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 9px 14px 9px 9px;
  border-radius: 16px; background: rgba(251, 243, 227, 0.12); border: 1px solid var(--line);
  opacity: 0; transform: translateX(22px); transition: opacity 0.4s, transform 0.6s var(--ease-spring);
}
.sm-person i { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: 14px; background: var(--accent); color: #1d2f73; }
.sm-person:nth-child(2) i { background: #ff9d8a; }
.sm-person:nth-child(3) i { background: #8fe1c2; }
.sm-person span { font-size: 14px; }
.sm-person b { font: 700 13.5px var(--font-mono); }
.scene-sumory.split .sm-split-label, .scene-sumory.split .sm-person { opacity: 1; transform: none; }
.scene-sumory.split .sm-person:nth-child(2) { transition-delay: 0.12s; }
.scene-sumory.split .sm-person:nth-child(3) { transition-delay: 0.24s; }
.sm-ghost { position: absolute; left: 5%; top: 8%; width: 14cqmin; animation: float 3.2s ease-in-out infinite alternate; }
.sm-ghost .sheet { fill: #fbf3e3; stroke: #1d2f73; stroke-width: 2.4; stroke-linejoin: round; }
.sm-ghost .fold { fill: #e8d9bd; stroke: #1d2f73; stroke-width: 2.4; stroke-linejoin: round; }
.sm-ghost .tag { fill: #ff7a59; }
.sm-ghost .eyes { fill: #1d2f73; transform-box: fill-box; transform-origin: center; animation: eyes 4.2s infinite; }
@keyframes float { from { transform: translateY(-8px) rotate(-6deg); } to { transform: translateY(8px) rotate(4deg); } }
@keyframes eyes { 0%, 92%, 100% { transform: none; } 95% { transform: scaleY(0.12); } }
@container (max-aspect-ratio: 1 / 1) {
  .scene-sumory { gap: 0; }
  .sm-machine { width: min(56cqmin, 280px); }
  .sm-feed { height: min(80cqmin, 440px); }
  .sm-split { position: absolute; right: 5%; bottom: 7%; width: min(46cqmin, 220px); }
  .sm-person { background: #2a4fc4; }
}

/* ---------- Scene: Scanora ---------- */

.scene-scanora { background: radial-gradient(50% 50% at 50% 45%, rgba(99, 218, 155, 0.16), transparent); }
.sc-stage { position: relative; width: min(52cqmin, 330px); aspect-ratio: 0.74; margin-bottom: 8cqmin; }
.sc-page {
  position: absolute; inset: 7%; padding: 10% 10%; overflow: hidden; border-radius: 6px;
  background: #fff; color: #1c2a24; transform: rotate(-1.5deg);
  box-shadow: 0 34px 60px -30px rgba(0, 0, 0, 0.8);
  transition: transform 0.8s var(--ease-out);
}
.sc-title { margin-bottom: 9%; font: 400 min(4.6cqmin, 21px)/1.2 var(--font-display); }
.sc-lines { display: grid; gap: min(1.6cqmin, 9px); }
.sc-lines i { position: relative; display: block; height: min(1.5cqmin, 8px); border-radius: 4px; background: #dfe6e2; overflow: hidden; }
.sc-lines i::after { content: ""; position: absolute; inset: 0; background: #4fcf8b; opacity: 0; transition: opacity 0.25s; }
.sc-lines i:nth-child(1) { --n: 0; } .sc-lines i:nth-child(2) { --n: 1; width: 92%; } .sc-lines i:nth-child(3) { --n: 2; width: 97%; }
.sc-lines i:nth-child(4) { --n: 3; width: 68%; } .sc-lines i:nth-child(5) { --n: 4; } .sc-lines i:nth-child(6) { --n: 5; width: 86%; }
.sc-lines i:nth-child(7) { --n: 6; width: 94%; } .sc-lines i:nth-child(8) { --n: 7; width: 58%; } .sc-lines i:nth-child(9) { --n: 8; width: 40%; }
.scene-scanora.scan .sc-lines i::after { opacity: 0.85; transition-delay: calc(0.55s + var(--n) * 0.13s); }
.sc-sign { width: 46%; margin-top: 12%; fill: none; stroke: #2d5b9a; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.sc-seal { position: absolute; right: 12%; bottom: 9%; width: 20%; aspect-ratio: 1; border-radius: 50%; border: 3px solid rgba(220, 64, 52, 0.72); transform: rotate(-12deg); }
.sc-beam { position: absolute; left: 0; right: 0; top: 0; height: 16%; opacity: 0; background: linear-gradient(rgba(99, 218, 155, 0), rgba(99, 218, 155, 0.5) 88%, #a8f7cd); }
.scene-scanora.scan .sc-beam { animation: beam 1.8s 0.4s cubic-bezier(0.45, 0.05, 0.55, 0.95) both; }
@keyframes beam { 0% { opacity: 1; transform: translateY(-100%); } 92% { opacity: 1; } 100% { opacity: 0; transform: translateY(620%); } }
.sc-corner { --fx: -1; --fy: -1; position: absolute; width: 23%; aspect-ratio: 1; border: 0 solid #7fe5b2; transition: opacity 0.4s; }
.sc-corner.tl { left: 0; top: 0; border-width: 7px 0 0 7px; border-top-left-radius: 26px; }
.sc-corner.tr { --fx: 1; right: 0; top: 0; border-width: 7px 7px 0 0; border-top-right-radius: 26px; }
.sc-corner.bl { --fy: 1; left: 0; bottom: 0; border-width: 0 0 7px 7px; border-bottom-left-radius: 26px; }
.sc-corner.br { --fx: 1; --fy: 1; right: 0; bottom: 0; border-width: 0 7px 7px 0; border-bottom-right-radius: 26px; }
.scene-scanora.scan .sc-corner { animation: focus 0.7s var(--ease-spring) both; }
@keyframes focus { from { opacity: 0.2; transform: translate(calc(var(--fx) * 16px), calc(var(--fy) * 16px)); } }
.scene-scanora.done .sc-page { transform: scale(0.95); }
.scene-scanora.done .sc-corner { opacity: 0.35; }
.sc-chips { position: absolute; left: 0; right: 0; bottom: 7%; display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; padding: 0 16px; }
.sc-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 99px; white-space: nowrap;
  background: rgba(232, 251, 240, 0.08); border: 1px solid rgba(99, 218, 155, 0.35); font-size: 12.5px;
  opacity: 0; transform: translateY(10px); transition: opacity 0.4s, transform 0.5s var(--ease-spring);
}
.sc-chip svg { width: 14px; height: 14px; fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.sc-chip-pdf b { padding: 2px 5px; border-radius: 4px; background: #e5483f; color: #fff; font-size: 10px; letter-spacing: 0.04em; }
.scene-scanora.done .sc-chip { opacity: 1; transform: none; }
.scene-scanora.done .sc-chip + .sc-chip { transition-delay: 0.15s; }

/* ---------- Scene: LifeStub ---------- */

.scene-lifestub { background: radial-gradient(55% 55% at 50% 42%, #fff4ef, transparent); }
.ls-petals i {
  position: absolute; top: -20px; left: var(--x); width: 12px; height: 9px; border-radius: 12px 0 12px 0;
  background: #f3a5b3; opacity: 0.85; animation: fall var(--t) linear infinite; animation-delay: var(--d);
}
.ls-petals i:nth-child(1) { --x: 8%; --t: 9s; --d: -1s; } .ls-petals i:nth-child(2) { --x: 22%; --t: 11s; --d: -6s; }
.ls-petals i:nth-child(3) { --x: 37%; --t: 8.5s; --d: -3s; } .ls-petals i:nth-child(4) { --x: 51%; --t: 12s; --d: -9s; }
.ls-petals i:nth-child(5) { --x: 64%; --t: 9.5s; --d: -2s; } .ls-petals i:nth-child(6) { --x: 76%; --t: 10.5s; --d: -7s; }
.ls-petals i:nth-child(7) { --x: 88%; --t: 8s; --d: -4.5s; } .ls-petals i:nth-child(8) { --x: 95%; --t: 13s; --d: -10s; }
@keyframes fall { from { transform: translate3d(0, 0, 0) rotate(0); } to { transform: translate3d(46px, calc(100cqh + 40px), 0) rotate(560deg); } }
.ls-stack { position: relative; width: min(74cqmin, 400px); aspect-ratio: 1.62; margin-bottom: 9cqmin; }
.ls-ticket {
  position: absolute; inset: 0; border-radius: 16px; background: var(--surface);
  box-shadow: 0 22px 40px -26px rgba(100, 40, 30, 0.5);
  -webkit-mask: radial-gradient(circle 12px at 0 50%, transparent 97%, #000) left / 51% 100% no-repeat, radial-gradient(circle 12px at 100% 50%, transparent 97%, #000) right / 51% 100% no-repeat;
  mask: radial-gradient(circle 12px at 0 50%, transparent 97%, #000) left / 51% 100% no-repeat, radial-gradient(circle 12px at 100% 50%, transparent 97%, #000) right / 51% 100% no-repeat;
}
.ls-u1 { transform: rotate(4deg) translate(10px, 8px); background: #fde8df; }
.ls-u2 { transform: rotate(-5deg) translate(-12px, 12px); background: #f8d3c8; }
.ls-front { display: flex; flex-direction: column; padding: 7% 9% 7% 9%; }
.ls-front::before { content: ""; position: absolute; top: 12%; bottom: 12%; right: 27%; border-left: 2px dashed rgba(59, 35, 32, 0.16); }
.ls-row { display: flex; justify-content: space-between; align-items: baseline; font: 500 12px var(--font-mono); color: var(--soft); max-width: 70%; }
.ls-no b { font-size: 16px; color: var(--accent); }
.ls-what { margin-top: auto; max-width: 66%; font: 400 min(6.4cqmin, 30px)/1.22 var(--font-display); text-wrap: balance; }
.ls-foot { margin-top: 8px; font-size: 12.5px; color: var(--soft); }
.ls-stamp { position: absolute; right: 4%; top: 50%; width: 29%; aspect-ratio: 1; margin-top: -14.5%; color: var(--accent); opacity: 0; }
.ls-stamp svg { width: 100%; height: 100%; }
.ls-stamp .ring { fill: none; stroke: currentColor; stroke-width: 4; }
.ls-stamp .ring.thin { stroke-width: 1.6; }
.ls-stamp .cat { fill: none; stroke: currentColor; stroke-width: 3; stroke-linejoin: round; }
.ls-stamp .face { fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.ls-stamp text { fill: currentColor; font: 700 11px var(--font-ui); letter-spacing: 0.14em; }
.ls-front.stamped .ls-stamp { animation: slam 0.55s cubic-bezier(0.2, 0.9, 0.3, 1.2) forwards; }
.ls-front.stamped { animation: jolt 0.5s 0.18s ease-out; }
.ls-front.leave { animation: leave 0.6s var(--ease-in) forwards; }
.ls-front.enter { animation: enter 0.65s var(--ease-out) both; }
@keyframes slam { 0% { opacity: 0; transform: scale(1.9) rotate(-30deg); } 55% { opacity: 0.95; transform: scale(0.93) rotate(-10deg); } 75% { transform: scale(1.03) rotate(-11deg); } 100% { opacity: 0.9; transform: scale(1) rotate(-11deg); } }
@keyframes jolt { 40% { transform: translateY(3px) scale(0.995); } }
@keyframes leave { to { opacity: 0; transform: translate(-125%, 24px) rotate(-14deg); } }
@keyframes enter { from { opacity: 0; transform: translate(55%, -12px) rotate(9deg); } }
.ls-btn {
  position: absolute; bottom: 7%; left: 50%; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border: 0; border-radius: 99px;
  background: var(--ink); color: var(--surface); font-size: 14px; font-weight: 600; cursor: pointer;
  transition: transform 0.3s var(--ease-spring);
}
.ls-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.ls-btn:hover { transform: translateX(-50%) translateY(-2px); }
.ls-btn:active { transform: translateX(-50%) scale(0.95); }

/* ---------- Scene: ZeroDust ---------- */

.scene-zerodust { background: radial-gradient(55% 55% at 58% 42%, rgba(124, 182, 234, 0.13), transparent); }
.zd-motes i { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); border-radius: 50%; background: rgba(238, 243, 247, 0.3); animation: mote var(--t) ease-in-out infinite alternate; animation-delay: var(--d); }
.zd-motes i:nth-child(1) { --x: 10%; --y: 18%; --s: 4px; --t: 7s; --d: -1s; --dx: 18px; --dy: -26px; }
.zd-motes i:nth-child(2) { --x: 22%; --y: 72%; --s: 3px; --t: 9s; --d: -4s; --dx: -14px; --dy: -30px; }
.zd-motes i:nth-child(3) { --x: 34%; --y: 10%; --s: 5px; --t: 8s; --d: -2s; --dx: 20px; --dy: 18px; }
.zd-motes i:nth-child(4) { --x: 46%; --y: 88%; --s: 3px; --t: 10s; --d: -6s; --dx: 12px; --dy: -34px; }
.zd-motes i:nth-child(5) { --x: 60%; --y: 14%; --s: 4px; --t: 7.5s; --d: -3s; --dx: -18px; --dy: 22px; }
.zd-motes i:nth-child(6) { --x: 72%; --y: 80%; --s: 6px; --t: 11s; --d: -8s; --dx: -22px; --dy: -20px; }
.zd-motes i:nth-child(7) { --x: 84%; --y: 30%; --s: 3px; --t: 8.5s; --d: -5s; --dx: 16px; --dy: 26px; }
.zd-motes i:nth-child(8) { --x: 92%; --y: 62%; --s: 4px; --t: 9.5s; --d: -2.5s; --dx: -12px; --dy: -28px; }
.zd-motes i:nth-child(9) { --x: 6%; --y: 48%; --s: 3px; --t: 10s; --d: -7s; --dx: 24px; --dy: 12px; }
.zd-motes i:nth-child(10) { --x: 52%; --y: 50%; --s: 2px; --t: 6.5s; --d: -1.5s; --dx: -10px; --dy: -18px; }
.zd-motes i:nth-child(11) { --x: 28%; --y: 40%; --s: 2px; --t: 12s; --d: -9s; --dx: 14px; --dy: -22px; }
.zd-motes i:nth-child(12) { --x: 78%; --y: 6%; --s: 3px; --t: 9s; --d: -3.5s; --dx: -16px; --dy: 30px; }
@keyframes mote { to { transform: translate(var(--dx), var(--dy)); opacity: 0.4; } }
.zd-card {
  position: relative; z-index: 1; width: min(82cqmin, 430px); padding: clamp(18px, 5cqmin, 30px); overflow: hidden;
  border-radius: 26px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.9);
}
.zd-row { display: flex; align-items: center; gap: 12px; }
.zd-thumb { flex: none; width: 48px; height: 48px; border-radius: 14px; background: #2a3846; display: grid; place-items: center; }
.zd-thumb svg { width: 30px; fill: none; stroke: #eef3f7; stroke-width: 2.6; stroke-linecap: round; }
.zd-thumb rect { fill: var(--accent); stroke: none; }
.zd-what { min-width: 0; }
.zd-what b { display: block; font-size: 15px; line-height: 1.3; }
.zd-what span { font: 600 13px var(--font-mono); color: var(--soft); }
.zd-day { flex: none; margin-left: auto; padding: 5px 9px; border: 1px solid var(--line); border-radius: 99px; font-size: 11.5px; color: var(--soft); white-space: nowrap; }
.zd-temp { display: flex; align-items: flex-start; margin-top: clamp(14px, 4.5cqmin, 26px); }
.zd-deg { font: 700 min(22cqmin, 108px)/0.9 var(--font-num); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; color: #f37b3b; }
.zd-unit { margin-top: 4px; font-size: 30px; font-weight: 700; color: var(--soft); }
.zd-state { margin-left: auto; align-self: center; font-size: 13px; color: var(--soft); }
.zd-gauge { position: relative; height: 12px; margin-top: clamp(12px, 3.6cqmin, 22px); border-radius: 99px; background: linear-gradient(90deg, #7cb6ea, #b7d6ef 42%, #f6b27c 70%, #f37b3b); }
.zd-knob-track { position: absolute; inset: 0; transform: translateX(92%); will-change: transform; }
.zd-knob { position: absolute; left: -11px; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45), inset 0 0 0 5px var(--surface); }
.zd-ask { margin-top: clamp(14px, 4cqmin, 24px); opacity: 0; transform: translateY(8px); transition: opacity 0.4s, transform 0.5s var(--ease-out); pointer-events: none; }
.zd-ask p { font-size: 15px; }
.zd-btns { display: flex; gap: 10px; margin-top: 12px; }
.zd-btns button { flex: 1; padding: 11px 0; border-radius: 14px; border: 1px solid var(--line); background: transparent; font-size: 14px; font-weight: 600; cursor: pointer; transition: transform 0.25s var(--ease-spring); }
.zd-btns button:active { transform: scale(0.96); }
.zd-btns [data-choice="keep"] { border-color: transparent; background: var(--accent); color: var(--on-accent); }
.zd-result { position: absolute; left: clamp(18px, 5cqmin, 30px); right: clamp(18px, 5cqmin, 30px); bottom: clamp(18px, 5cqmin, 30px); padding: 14px; border-radius: 14px; background: #263442; text-align: center; font-size: 14px; font-weight: 600; opacity: 0; transform: translateY(10px); transition: opacity 0.4s, transform 0.5s var(--ease-out); pointer-events: none; }
.zd-frost { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(60% 50% at 15% 0%, rgba(124, 182, 234, 0.3), transparent), radial-gradient(50% 50% at 100% 100%, rgba(124, 182, 234, 0.2), transparent); }
.scene-zerodust.ask .zd-ask { opacity: 1; transform: none; pointer-events: auto; }
.scene-zerodust.result .zd-ask { opacity: 0; pointer-events: none; }
.scene-zerodust.result .zd-result { opacity: 1; transform: none; }
.zd-spark { position: absolute; width: 7cqmin; top: 12%; right: 11%; fill: var(--accent); animation: twinkle 2.4s ease-in-out infinite; }
.zd-spark.s2 { width: 4cqmin; top: auto; right: auto; bottom: 14%; left: 10%; fill: #7cb6ea; animation-delay: -1.2s; }
@keyframes twinkle { 50% { opacity: 0.45; transform: scale(0.6) rotate(45deg); } }

/* ---------- Scene: TerraDrift ---------- */

.scene-terradrift { background: radial-gradient(50% 50% at 50% 50%, rgba(80, 120, 255, 0.14), transparent); }
.td-stars { position: absolute; inset: 0; }
.td-stars i { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #fff; }
.td-stars i.tw { animation: twinkle 3s ease-in-out infinite; }
.td-globe {
  position: relative; width: min(66cqmin, 450px); aspect-ratio: 1; padding: 0; border: 0; border-radius: 50%; overflow: hidden; cursor: pointer;
  background: #0a1430; isolation: isolate; -webkit-mask-image: radial-gradient(#fff, #000); mask-image: radial-gradient(#fff, #000);
  box-shadow: 0 0 0 1px rgba(160, 190, 255, 0.2), 0 0 70px rgba(80, 130, 255, 0.3);
  -webkit-tap-highlight-color: transparent;
}
.td-globe:focus-visible { outline: 3px solid var(--accent); outline-offset: 6px; }
.td-map { position: absolute; top: 0; left: 0; display: flex; width: 400%; height: 100%; animation: drift 100s linear infinite; }
@keyframes drift { to { transform: translateX(-50%); } }
.td-face { position: relative; flex: none; width: 50%; height: 100%; }
.td-face img { width: 100%; height: 100%; }
.td-lights { position: absolute; inset: 0; }
.td-light { position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: radial-gradient(circle, #fff7da 0 16%, #ffbd68 34%, rgba(255, 189, 104, 0) 70%); animation: glow 2.6s ease-in-out infinite alternate; }
.td-light.new { animation: light 1s var(--ease-spring) both, glow 2.6s 1s ease-in-out infinite alternate; }
@keyframes glow { to { transform: scale(1.4); opacity: 0.75; } }
@keyframes light { from { transform: scale(0); } 55% { transform: scale(2.6); } to { transform: scale(1); } }
.td-shade {
  position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.13), transparent 36%),
    radial-gradient(circle at 50% 50%, transparent 50%, rgba(2, 4, 12, 0.5) 68%, rgba(2, 4, 12, 0.96) 100%),
    rgba(4, 8, 24, 0.55);
  box-shadow: inset 0 0 0 1px rgba(170, 200, 255, 0.16), inset 10px -8px 40px rgba(100, 150, 255, 0.18);
}
.td-ticket {
  position: absolute; right: 6%; bottom: 9%; display: grid; gap: 3px; min-width: 190px; padding: 14px 20px 14px 22px;
  background: #f7f0e1; color: #221f1c; border-radius: 10px; transform: rotate(-4deg);
  box-shadow: 0 22px 44px -22px rgba(0, 0, 0, 0.9);
  -webkit-mask: radial-gradient(circle 8px at 0 50%, transparent 96%, #000) left / 51% 100% no-repeat, radial-gradient(circle 8px at 100% 50%, transparent 96%, #000) right / 51% 100% no-repeat;
  mask: radial-gradient(circle 8px at 0 50%, transparent 96%, #000) left / 51% 100% no-repeat, radial-gradient(circle 8px at 100% 50%, transparent 96%, #000) right / 51% 100% no-repeat;
}
.td-ticket.flip { animation: ticket 0.7s var(--ease-out); }
@keyframes ticket { from { opacity: 0; transform: rotate(-4deg) translateY(18px); } }
.td-ticket-label { font: 600 10.5px var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: rgba(34, 31, 28, 0.55); }
.td-place { max-width: 13em; font: 400 19px/1.25 var(--font-display); text-wrap: balance; }
.td-lit { justify-self: start; margin-top: 4px; padding: 3px 8px; border: 2px solid #127366; border-radius: 6px; color: #127366; font-size: 11px; font-weight: 700; transform: rotate(-3deg); }
.td-hint { position: absolute; left: 7%; top: 7%; max-width: 40%; font-size: 12.5px; line-height: 1.5; color: var(--soft); }
@container (max-aspect-ratio: 1 / 1) {
  .td-globe { width: min(74cqmin, 420px); margin-bottom: 10cqmin; }
  .td-ticket { right: 5%; bottom: 5%; min-width: 0; }
  .td-hint { max-width: 60%; }
}

/* ---------- Ways ---------- */

.ways-list { max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2vw, 26px); }
.way {
  position: relative; display: flex; flex-direction: column; min-height: 320px; padding: clamp(26px, 3.6vw, 50px);
  border-radius: 30px; background: var(--paper-2); border: 1px solid var(--hair); overflow: hidden;
}
.way:nth-child(2) { transition-delay: 0.08s; } .way:nth-child(3) { transition-delay: 0.04s; } .way:nth-child(4) { transition-delay: 0.12s; }
.emblem { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; background: var(--c); transform: rotate(-8deg); transition: transform 0.6s var(--ease-spring); }
.way:hover .emblem { transform: rotate(6deg) scale(1.06); }
.emblem svg { width: 54px; height: 54px; fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.emblem .fill { fill: var(--ink); }
.way-1 { --c: #f4d35e; } .way-2 { --c: #a9dcc9; } .way-3 { --c: #f6a999; } .way-4 { --c: #cbbff4; }
.way-num { position: absolute; top: 24px; right: 32px; font: italic 400 68px/1 var(--font-latin); color: var(--ink-faint); }
.way h3 { margin-top: auto; padding-top: 46px; font: 400 clamp(28px, 3vw, 44px)/1.15 var(--font-display); }
.way p { margin-top: 14px; max-width: 30em; font-size: 16px; line-height: 1.8; color: var(--ink-soft); }

/* ---------- Year ---------- */

.timeline { max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter) clamp(90px, 12vw, 170px); }
.tl-track { position: relative; height: 470px; }
.tl-line { position: absolute; left: 0; top: 50%; width: 100%; height: 20px; margin-top: -10px; overflow: visible; }
.tl-line path { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 2.4s var(--ease-out) 0.2s; }
.timeline.in .tl-line path { stroke-dashoffset: 0; }
.tl-months { position: absolute; left: 0; right: 0; top: calc(50% + 20px); }
.tl-month { position: absolute; font: 500 12px var(--font-mono); color: var(--ink-soft); white-space: nowrap; }
.tl-month::before { content: ""; position: absolute; left: 0; top: -24px; width: 1.5px; height: 11px; background: var(--ink-faint); }
.tl-month.m7 { left: 3%; } .tl-month.m8 { left: 15.87%; } .tl-month.m9 { left: 28.75%; } .tl-month.m10 { left: 41.2%; } .tl-month.m11 { left: 54.08%; } .tl-month.m12 { left: 66.54%; }
.tl-item { position: absolute; left: var(--x); top: 50%; z-index: 1; }
.tl-item::before { content: ""; position: absolute; left: -7px; top: -7px; z-index: 1; width: 14px; height: 14px; border-radius: 50%; background: var(--paper); border: 2.5px solid var(--ink); }
.tl-stem { position: absolute; left: -1px; width: 2px; background: var(--ink); }
.tl-card {
  position: absolute; left: -30px; display: flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; white-space: nowrap;
  border-radius: 18px; background: var(--paper-2); border: 1px solid var(--hair); box-shadow: 0 14px 30px -22px rgba(30, 20, 10, 0.5);
  transition: transform 0.4s var(--ease-spring);
}
.tl-item:hover .tl-card { transform: translateY(-3px) rotate(-1deg); }
.tl-card img { width: 44px; height: 44px; border-radius: 23%; }
.tl-text b { display: block; font-size: 15px; line-height: 1.3; }
.tl-text time { font: 500 12px var(--font-mono); color: var(--ink-soft); }
.lane1 .tl-stem { bottom: 0; height: 68px; } .lane1 .tl-card { bottom: 68px; }
.lane2 .tl-stem { bottom: 0; height: 150px; } .lane2 .tl-card { bottom: 150px; }
.lane-1 .tl-stem { top: 0; height: 68px; } .lane-1 .tl-card { top: 68px; }
.lane-2 .tl-stem { top: 0; height: 150px; } .lane-2 .tl-card { top: 150px; }
.tl-today { position: absolute; left: var(--x); top: 50%; z-index: 0; }
.tl-today i { position: absolute; left: -1px; top: -190px; height: 380px; border-left: 2px dashed var(--vermilion); }
.tl-today em { position: absolute; left: 0; top: 200px; transform: translateX(-50%); font: italic 400 22px/1 var(--font-latin); color: var(--vermilion); white-space: nowrap; }
:lang(zh-Hans) .tl-today em { font: 600 14px/1 var(--font-ui); top: 202px; }
.tl-next {
  position: absolute; right: 0; top: 50%; z-index: 2; transform: translateY(-50%) rotate(1.5deg);
  display: grid; gap: 10px; width: 19%; min-width: 190px; padding: 18px 20px;
  border: 2px dashed var(--ink-faint); border-radius: 24px; background: var(--paper);
}
.tl-next-label { font: 400 24px/1.1 var(--font-display); }
.tl-next-item { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.tl-next-item img { width: 36px; height: 36px; border-radius: 23%; }
.tl-next-note { font: 500 12px var(--font-mono); color: var(--ink-soft); }

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

.footer { --accent-studio: #f39a6b; background: var(--night); color: #f3eee4; padding: clamp(64px, 9vw, 120px) var(--gutter) 30px; border-radius: clamp(28px, 4vw, 56px) clamp(28px, 4vw, 56px) 0 0; overflow: hidden; }
.footer-top, .footer-label, .footer-apps, .footer-bottom { max-width: 1320px; margin-left: auto; margin-right: auto; }
.footer-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.footer-tagline { font: 400 clamp(34px, 4.8vw, 68px)/1.1 var(--font-display); }
.footer-up { display: inline-flex; align-items: center; gap: 8px; flex: none; font-size: 14px; color: rgba(243, 238, 228, 0.7); }
.footer-up svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.footer-up:hover { color: #f3eee4; }
.footer-label { margin-top: clamp(48px, 7vw, 80px); margin-bottom: 14px; font: 500 12px var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: rgba(243, 238, 228, 0.5); }
.footer-apps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 28px; border-top: 1px solid rgba(243, 238, 228, 0.12); }
.footer-apps a { display: flex; align-items: center; gap: 14px; padding: 15px 2px; border-bottom: 1px solid rgba(243, 238, 228, 0.12); }
.footer-apps img { width: 40px; height: 40px; border-radius: 23%; }
.footer-apps b { display: block; font-size: 15px; font-weight: 600; }
.footer-apps em { font: italic 400 15px/1.2 var(--font-latin); color: rgba(243, 238, 228, 0.55); }
.footer-apps svg { width: 14px; height: 14px; margin-left: auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: 0.45; transition: opacity 0.25s, transform 0.35s var(--ease-spring); }
.footer-apps a:hover svg { opacity: 1; transform: translate(2px, -2px); }
.wordmark { max-width: 1400px; margin: clamp(50px, 8vw, 110px) auto 0; text-align: center; white-space: nowrap; font: italic 400 clamp(84px, 20.5vw, 330px)/0.82 var(--font-latin); letter-spacing: -0.035em; }
.wordmark span { color: var(--accent-studio); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 28px; margin-top: 34px; font-size: 13px; color: rgba(243, 238, 228, 0.55); }
.footer-bottom a { text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom a:hover { color: #f3eee4; }

/* ---------- Language suggestion ---------- */

.suggest {
  position: fixed; left: 12px; right: 12px; bottom: max(18px, env(safe-area-inset-bottom)); z-index: 60;
  width: fit-content; max-width: 560px; margin: 0 auto;
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 18px;
  border-radius: 99px; background: var(--ink); color: var(--paper); font-size: 14px;
  box-shadow: 0 16px 40px -16px rgba(0, 0, 0, 0.6);
  animation: rise 0.6s var(--ease-out) both;
}
.suggest[hidden] { display: none; }
.suggest-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest-yes { flex: none; padding: 8px 14px; border-radius: 99px; background: var(--paper); color: var(--ink); font-weight: 600; }
.suggest-no { flex: none; padding: 8px 10px; border: 0; background: none; color: rgba(243, 238, 228, 0.6); cursor: pointer; }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } }

/* ---------- 404 ---------- */

body.lost { display: grid; place-items: center; min-height: 100svh; padding: var(--gutter); }
.lost-main { max-width: 560px; text-align: center; }
.lost-code { font: italic 400 clamp(120px, 30vw, 240px)/0.8 var(--font-latin); letter-spacing: -0.04em; }
.lost-code span { color: var(--vermilion); }
.lost-main section { margin-top: 30px; }
.lost-main section + section { padding-top: 26px; border-top: 1px solid var(--hair); }
.lost-main h1, .lost-main h2 { font: 400 30px/1.2 var(--font-display); }
.lost-main p { margin: 8px 0 18px; color: var(--ink-soft); }

/* ---------- Narrow screens ---------- */

@media (max-width: 899.98px) {
  .hero { display: block; padding-bottom: 380px; }
  .hero::before { width: 120vw; right: -40vw; top: auto; bottom: -10%; }
  .hero-copy { width: auto; }
  .hero-stats { margin-top: 32px; }
  .section-head { grid-template-columns: 1fr; }
  .ways-list { grid-template-columns: 1fr; }
  .way { min-height: 0; }
  .footer-apps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tl-track { height: auto; padding-left: 34px; }
  .tl-track::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; border-left: 2px solid var(--ink); }
  .tl-line, .tl-months, .tl-today, .tl-stem { display: none; }
  .tl-item { position: relative; left: auto; top: auto; display: block; margin-bottom: 14px; }
  .tl-item::before { left: -32px; top: 26px; }
  .tl-card { position: relative; left: auto; top: auto !important; bottom: auto !important; display: inline-flex; }
  .tl-next { position: relative; right: auto; top: auto; width: auto; transform: none; margin-top: 26px; }
}
@media (max-width: 560px) {
  :root { --nav-h: 68px; }
  .nav { top: 8px; }
  .nav-pill { height: 48px; padding-left: 16px; }
  .brand { font-size: 22px; }
  .nav-links a { padding: 7px 9px; font-size: 13.5px; }
  .lang { padding: 8px 12px; }
  .hero { padding-bottom: 330px; }
  .hero-lead { font-size: 15.5px; }
  .tape-track span { font-size: 22px; padding: 0 16px; }
  .card-tagline { font-size: 34px; }
  :lang(zh-Hans) .card-tagline { font-size: 30px; }
  .footer-apps { grid-template-columns: 1fr; }
  .footer-top { flex-direction: column; align-items: flex-start; }
  .suggest { padding-left: 16px; font-size: 13.5px; }
  .suggest-text { white-space: normal; }
}

/* ---------- Quiet ---------- */

.idle, .idle *, .idle *::before, .idle *::after { animation-play-state: paused !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  [data-reveal], [data-split] .phrase, [data-split].solo { opacity: 1; transform: none; }
}
