/* ==========================================================================
   Nanaho Timer website — "The Instrument over the World"
   Two themes via CSS custom properties: dark is the default (the night
   stage is the brand), html[data-theme="light"] is the explicit override.
   The hero stage is theme-independent night: the real overlay floating
   over the game's world.
   ========================================================================== */

@font-face {
  font-family: "Inter Timer";
  src: url("/assets/font/InterBold-timer.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Inter Site";
  src: url("/assets/font/InterBold-latin.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
/* Display serif — Noto Serif JP/TC/SC subsets covering only the glyphs the
   headings use (regenerate via scripts/subset_site_fonts.py when heading
   copy changes). Han unification means the three scripts need distinct
   families; html[lang] picks the right one. */
@font-face {
  font-family: "Nanaho Serif JP";
  src: url("/assets/font/NanahoSerifJP-display.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Nanaho Serif TC";
  src: url("/assets/font/NanahoSerifTC-display.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Nanaho Serif SC";
  src: url("/assets/font/NanahoSerifSC-display.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --font-body: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue",
    "PingFang TC", "PingFang SC", "Hiragino Kaku Gothic ProN", "Microsoft JhengHei",
    "Microsoft YaHei", "Yu Gothic UI", sans-serif;
  --font-head: "Inter Site", var(--font-body);
  --font-timer: "Inter Timer", "Consolas", monospace;
  /* en rides the JP face's Latin glyphs; per-lang overrides below. */
  --font-display: "Nanaho Serif JP", "Yu Mincho", "Hiragino Mincho ProN", Georgia, serif;

  --bg: #0a101d;
  --surface: #121b2e;
  --surface-2: #0f1728;
  --ink: #e8eef9;
  --muted: #93a3bd;
  --line: rgba(232, 238, 249, 0.1);
  --accent: #5b8cff;
  --accent-ink: #85aaff;
  --accent-soft: rgba(91, 140, 255, 0.14);
  --on-accent: #071022;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px -12px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 2px 8px rgba(0, 0, 0, 0.45), 0 28px 64px -22px rgba(0, 0, 0, 0.7);

  /* The night stage (theme-independent): hero + overlay box. */
  --stage-bg: #070d1c;
  --stage-ink: #f2f6ff;
  --stage-muted: #b7c5e2;
  --stage-soft: #98a7c4;
  --stage-line: rgba(255, 255, 255, 0.16);
  --overlay-bg: #0d1526;
  --overlay-text: #f4f7ff;
  --overlay-colon: #9db4e8;
  --overlay-border: rgba(255, 255, 255, 0.16);

  --chip-green-bg: rgba(34, 197, 94, 0.16); --chip-green-ink: #4ade80;
  --chip-yellow-bg: rgba(234, 179, 8, 0.16); --chip-yellow-ink: #facc15;
  --chip-red-bg: rgba(239, 68, 68, 0.16); --chip-red-ink: #f87171;
  --chip-amber-bg: rgba(249, 115, 22, 0.16); --chip-amber-ink: #fb923c;
  --chip-gray-bg: rgba(148, 163, 184, 0.16); --chip-gray-ink: #b0bdd1;

  color-scheme: dark;
}

:root:lang(zh-Hant) {
  --font-display: "Nanaho Serif TC", "Noto Serif TC", PMingLiU, "Yu Mincho", serif;
}
:root:lang(zh-Hans) {
  --font-display: "Nanaho Serif SC", "Noto Serif SC", "Songti SC", SimSun, serif;
}
:root:lang(ja) {
  --font-display: "Nanaho Serif JP", "Yu Mincho", "Hiragino Mincho ProN", serif;
}

:root[data-theme="light"] {
  --bg: #eef1fa;
  --surface: #ffffff;
  --surface-2: #f6f8fe;
  --ink: #101828;
  --muted: #5a6b86;
  --line: rgba(16, 24, 40, 0.1);
  --accent: #2563eb;
  --accent-ink: #1d4fd7;
  --accent-soft: rgba(37, 99, 235, 0.1);
  --on-accent: #ffffff;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 10px 32px -12px rgba(16, 24, 40, 0.16);
  --shadow-lg: 0 2px 6px rgba(16, 24, 40, 0.06), 0 24px 60px -20px rgba(16, 24, 40, 0.28);
  --overlay-border: rgba(255, 255, 255, 0.14);
  --chip-green-bg: #dcfce7; --chip-green-ink: #15803d;
  --chip-yellow-bg: #fef9c3; --chip-yellow-ink: #a16207;
  --chip-red-bg: #fee2e2; --chip-red-ink: #b91c1c;
  --chip-amber-bg: #ffedd5; --chip-amber-ink: #c2410c;
  --chip-gray-bg: #e5e9f2; --chip-gray-ink: #475569;
  color-scheme: light;
}

/* ------------------------------------------------------------------ base */
* { box-sizing: border-box; }
:root {
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}
/* scroll-padding keeps anchor jumps from hiding section heads under the
   sticky 64px header. */
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.25; margin: 0 0 0.5em; }
h1, h2 { text-wrap: balance; }
p { margin: 0 0 1em; }
.shell { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.shell.narrow { max-width: 780px; }
section { padding: 72px 0; }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head h2, .why h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.2vw, 2.35rem);
  line-height: 1.3;
}
html[lang="en"] .section-head h2, html[lang="en"] .why h2 { letter-spacing: -0.01em; }
.section-head p { color: var(--muted); font-size: 1.06rem; margin: 0; }

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 60;
  background: var(--accent); color: var(--on-accent);
  padding: 10px 18px; border-radius: 0 0 10px 10px; font-weight: 600;
  transition: top 0.15s ease;
}
.skip-link:focus-visible { top: 0; text-decoration: none; }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s ease, border-color 0.3s ease;
}
.header-row { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); flex: none; }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 8px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--font-head); font-size: 1.02rem; letter-spacing: -0.01em; white-space: nowrap; }
.brand-text small { color: var(--muted); font-size: 0.68rem; letter-spacing: 0.04em; white-space: nowrap; }
.site-nav { display: flex; gap: 4px; margin-left: auto; }
.site-nav a {
  color: var(--muted); font-size: 0.92rem; padding: 7px 9px; border-radius: 9px;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.site-nav a:hover { color: var(--ink); background: var(--accent-soft); text-decoration: none; }
.site-nav a.active { color: var(--ink); background: var(--accent-soft); }
.site-nav a.nav-cta { color: var(--accent-ink); font-weight: 600; }
.header-tools { display: flex; align-items: center; gap: 8px; }
.tool-btn {
  position: relative;
  display: grid; place-items: center; width: 38px; height: 38px;
  border: 1px solid var(--line); border-radius: 11px; background: var(--surface);
  color: var(--ink); cursor: pointer; padding: 0;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.tool-btn:hover { border-color: var(--accent); color: var(--accent-ink); }
.tool-btn:active { transform: scale(0.94); }
.tool-btn .ico { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.tool-btn .ico .fill { fill: currentColor; stroke: none; }
/* theme icons crossfade + quarter-turn in place */
#themeToggle .ico {
  grid-area: 1 / 1;
  opacity: 0; transform: rotate(-50deg) scale(0.7);
  transition: opacity 0.28s var(--ease-out-quart), transform 0.28s var(--ease-out-quart);
}
html[data-theme="light"] #themeToggle .ico-sun,
html:not([data-theme="light"]) #themeToggle .ico-moon { opacity: 1; transform: none; }
/* burger/close icons keep the plain swap */
.nav-toggle .ico { display: none; }
/* Language control: a custom listbox, not a native <select>. A select in
   the sticky header let Safari scroll the page to the header's static
   position on focus, and its chrome ignored the on-stage skin. */
.lang-wrap { position: relative; display: flex; align-items: center; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 11px 0 10px; white-space: nowrap;
  border: 1px solid var(--line); border-radius: 11px; background: var(--surface);
  color: var(--ink); font-family: var(--font-body); font-size: 0.9rem; cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.lang-btn:hover { border-color: var(--accent); }
.lang-btn .globe { width: 17px; height: 17px; fill: none; stroke: var(--muted); stroke-width: 1.5; }
.lang-btn .chev {
  width: 10px; height: 6px; fill: none; stroke: var(--muted);
  stroke-width: 1.6; stroke-linecap: round;
  transition: transform 0.2s var(--ease-out-quart);
}
.lang-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.lang-menu {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 5;
  min-width: 100%; padding: 6px;
  display: flex; flex-direction: column; gap: 2px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 13px;
  box-shadow: var(--shadow-lg);
  animation: lang-menu-in 0.16s var(--ease-out-quart);
}
.lang-menu[hidden] { display: none; }
@keyframes lang-menu-in {
  from { opacity: 0; transform: translateY(-4px); }
}
.lang-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 9px 11px; border: 0; border-radius: 7px; background: none;
  color: var(--ink); font-family: var(--font-body); font-size: 0.92rem;
  cursor: pointer; text-align: left; white-space: nowrap;
}
.lang-opt:hover, .lang-opt:focus-visible { background: var(--accent-soft); }
/* Honest selection mark: the check only ever sits on the active locale. */
.lang-opt::after { content: "\2713"; font-weight: 700; color: var(--accent-ink); opacity: 0; }
.lang-opt[aria-selected="true"]::after { opacity: 1; }

/* Over the hero stage the header dresses for the night: translucent dark,
   light ink. JS toggles .on-stage while the stage is behind it. */
.site-header.on-stage {
  background: linear-gradient(180deg, rgba(7, 13, 28, 0.62), rgba(7, 13, 28, 0.34));
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
.site-header.on-stage .brand,
.site-header.on-stage .brand-text strong { color: var(--stage-ink); }
.site-header.on-stage .brand-text small { color: var(--stage-muted); }
.site-header.on-stage .site-nav a { color: var(--stage-muted); }
.site-header.on-stage .site-nav a:hover,
.site-header.on-stage .site-nav a.active { color: var(--stage-ink); background: rgba(255, 255, 255, 0.1); }
.site-header.on-stage .site-nav a.nav-cta { color: #9db9ff; }
.site-header.on-stage .tool-btn,
.site-header.on-stage .lang-btn {
  background: rgba(13, 21, 38, 0.6); border-color: rgba(255, 255, 255, 0.18);
  color: var(--stage-ink);
}
.site-header.on-stage .lang-btn .globe,
.site-header.on-stage .lang-btn .chev { stroke: var(--stage-muted); }
.site-header.on-stage .lang-menu {
  background: rgba(10, 17, 32, 0.96); border-color: rgba(255, 255, 255, 0.14);
}
.site-header.on-stage .lang-opt { color: var(--stage-ink); }
.site-header.on-stage .lang-opt:hover,
.site-header.on-stage .lang-opt:focus-visible { background: rgba(255, 255, 255, 0.1); }
.site-header.on-stage .lang-opt::after { color: #9db9ff; }

/* Mobile navigation: the inline nav hides below 1120px; the burger opens a
   sheet under the sticky header with the same links. */
.nav-toggle { display: none; }
.nav-toggle .ico-burger { display: block; }
.nav-toggle .ico-close { display: none; }
.nav-toggle[aria-expanded="true"] .ico-burger { display: none; }
.nav-toggle[aria-expanded="true"] .ico-close { display: block; }
.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 6px 16px 14px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
}
.site-header.on-stage .mobile-nav { background: rgba(7, 13, 28, 0.92); border-top-color: rgba(255, 255, 255, 0.1); }
.site-header.on-stage .mobile-nav a { color: var(--stage-ink); }
.site-header.on-stage .mobile-nav a.nav-cta { color: #9db9ff; }
.mobile-nav a {
  color: var(--ink); font-size: 1rem; font-weight: 500;
  padding: 12px 10px; border-radius: 10px;
}
.mobile-nav a:hover { background: var(--accent-soft); text-decoration: none; }
.mobile-nav a.nav-cta { color: var(--accent-ink); font-weight: 600; }

/* ------------------------------------------------------------------ hero */
/* Theme-independent night stage: the 正義執行！ card animation lives behind
   an instrument veil; the live overlay floats over it — the product doing
   exactly what it does over the real game. */
.hero { position: relative; overflow: hidden; padding: 108px 0 88px; background: var(--stage-bg); }
.hero-stage { position: absolute; inset: 0; z-index: 0; }
.hero-cg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 60% 24%;
  filter: saturate(0.94) brightness(0.9);
  /* the poster is the loop's frame 0, so play starts seamlessly; the resting
     zoom lives here so the JS parallax varies only translateY from a matched
     baseline (no reframe at init) */
  transform: scale(1.1);
  transform-origin: 50% 100%;
  will-change: transform;
}
/* Phones never load the loop; the poster holds the same resting frame the
   desktop parallax starts from (a slow drift was tried and read as broken). */
.hero-veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(92deg, rgba(7, 13, 28, 0.93) 0%, rgba(7, 13, 28, 0.78) 30%,
      rgba(7, 13, 28, 0.34) 56%, rgba(7, 13, 28, 0.34) 100%),
    linear-gradient(180deg, rgba(7, 13, 28, 0.6) 0%, rgba(7, 13, 28, 0.12) 20%,
      rgba(7, 13, 28, 0) 55%, var(--bg) 100%);
}
.hero-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 56px; align-items: center;
}
.hero-badge {
  display: inline-block; padding: 5px 13px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.1); color: #dbe6ff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.02em; margin: 0 0 22px;
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------- hero entrance (once) */
/* The page's one rehearsed entrance: copy rises in sequence while the demo
   replays the app's real cold start (SEARCHING -> SYNCING -> LOCKED).
   Everything is visible by default; the .entrance class (added by JS before
   first paint, motion-allowed only) arms the choreography. */
.hero.entrance .hero-badge,
.hero.entrance .hero-title,
.hero.entrance .hero-sub,
.hero.entrance .hero-ctas,
.hero.entrance .platform-row {
  animation: rise-in 0.64s var(--ease-out-quint) both;
}
.hero.entrance .hero-badge { animation-delay: 0.05s; }
.hero.entrance .hero-title { animation-delay: 0.14s; }
.hero.entrance .hero-sub { animation-delay: 0.26s; }
.hero.entrance .hero-ctas { animation-delay: 0.36s; }
.hero.entrance .platform-row { animation-delay: 0.44s; }
.hero.entrance .demo-float { animation: rise-in 0.7s var(--ease-out-quint) 0.3s both; }
@keyframes rise-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* The lock-in: digits render soft until the clock locks, then sharpen and
   the chip settles with a single pulse. States driven by main.js. */
.hero .overlay-box { transition: filter 0.5s var(--ease-out-quart), opacity 0.5s var(--ease-out-quart); }
.hero.pre-lock .overlay-box { filter: blur(1.6px); opacity: 0.82; }
.hero .sync-chip { transition: background 0.4s ease, color 0.4s ease; }
.hero.locked-pulse .demo-chiprow .sync-chip { animation: lock-settle 0.5s var(--ease-out-quart); }
@keyframes lock-settle {
  0% { transform: scale(1); }
  40% { transform: scale(1.08); }
  100% { transform: scale(1); }
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.55rem, 5.4vw, 3.8rem);
  line-height: 1.18; color: #ffffff;
  margin: 0 0 20px; white-space: pre-line;
  text-shadow: 0 2px 28px rgba(4, 10, 26, 0.6);
}
html[lang="en"] .hero-title { letter-spacing: -0.015em; line-height: 1.12; }
.hero-sub { color: #cfdaf1; font-size: 1.13rem; max-width: 34em; margin-bottom: 30px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 26px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 24px; border-radius: 13px; font-weight: 600; font-size: 1rem;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.12s var(--ease-out-quart), box-shadow 0.12s var(--ease-out-quart),
    border-color 0.15s ease, color 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.985); transition-duration: 0.08s; }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 8px 24px -8px color-mix(in srgb, var(--accent) 55%, transparent); }
.btn-primary:hover { box-shadow: 0 12px 28px -8px color-mix(in srgb, var(--accent) 65%, transparent); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-ink); }
/* Secondary CTA on the night stage. */
.btn-night { background: rgba(13, 21, 38, 0.5); color: #ffffff; border-color: rgba(255, 255, 255, 0.3); }
.btn-night:hover { border-color: #9db9ff; color: #dbe6ff; }
/* The hero's primary rides the stage, not the theme: constant Signal Blue. */
.hero .btn-primary { background: #2563eb; color: #ffffff; box-shadow: 0 8px 24px -8px rgba(37, 99, 235, 0.55); }
.platform-row { display: flex; gap: 8px; flex-wrap: wrap; }
.plat {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.05em;
  color: var(--stage-muted); border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px; padding: 3px 12px;
}

/* hero demo: no card chrome — the overlay itself floats over the world,
   anchored low so the character stays unobstructed. */
.hero-demo { display: flex; justify-content: flex-end; align-self: end; padding-top: 150px; }
.demo-float { width: 100%; max-width: 400px; text-align: center; }
.demo-chiprow { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 8px; }
.phase-chip {
  font-family: var(--font-head); font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 4px 12px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-ink);
}
.phase-chip[data-phase="PREP"] { background: var(--chip-yellow-bg); color: var(--chip-yellow-ink); }
.phase-chip[data-phase="WAITING"] { background: var(--chip-gray-bg); color: var(--chip-gray-ink); }
/* Chips inside the hero always use the night palette (stage is theme-free).
   Opaque night ground + ringed edge keeps them legible over the art's
   brightest regions - translucent tints wash out on the CG. */
.hero .phase-chip,
.hero .demo-chiprow .sync-chip {
  background: rgba(7, 13, 28, 0.62);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.hero .phase-chip { color: #9db9ff; }
.hero .phase-chip[data-phase="PREP"] { color: #facc15; }
.hero .phase-chip[data-phase="WAITING"] { color: #b0bdd1; }
.hero .demo-chiprow .sync-green { color: #4ade80; }
.hero .demo-chiprow .sync-yellow { color: #facc15; }
.hero .demo-chiprow .sync-gray { color: #b0bdd1; }
.sync-chip {
  display: inline-block; font-family: var(--font-timer);
  font-size: 0.76rem; font-weight: 700; letter-spacing: 0.04em;
  padding: 4px 11px; border-radius: 999px; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.sync-green { background: var(--chip-green-bg); color: var(--chip-green-ink); }
.sync-yellow { background: var(--chip-yellow-bg); color: var(--chip-yellow-ink); }
.sync-red { background: var(--chip-red-bg); color: var(--chip-red-ink); }
.sync-amber { background: var(--chip-amber-bg); color: var(--chip-amber-ink); }
.sync-gray { background: var(--chip-gray-bg); color: var(--chip-gray-ink); }

.overlay-box {
  background: var(--overlay-bg);
  border: 1px solid var(--overlay-border);
  border-radius: 10px;
  color: var(--overlay-text);
  font-family: var(--font-timer);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  text-align: center;
  padding: 14px 10px 16px;
  font-size: clamp(3rem, 8.6vw, 4.2rem);
  line-height: 1;
  letter-spacing: 0.01em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 18px 44px -18px rgba(4, 10, 26, 0.7);
}
.overlay-box .colon { color: var(--overlay-colon); font-size: 0.9em; padding: 0 0.02em; }
.demo-caption { color: var(--muted); font-size: 0.85rem; margin: 14px 2px 0; }
/* One line at desktop width; if a narrow viewport forces a wrap, balance
   the two lines instead of orphaning the last word. */
.hero .demo-caption { color: var(--stage-muted); text-shadow: 0 1px 12px rgba(4, 10, 26, 0.7); text-wrap: balance; }

/* ------------------------------------------------------------ spec strip */
/* Measured facts on an instrument's spec plate: one hairline band, no cards. */
.specs { padding: 30px 0 6px; }
.spec-strip {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-block: 1px solid var(--line); padding: 20px 0;
}
.spec { padding: 4px 26px; border-left: 1px solid var(--line); }
.spec:first-child { border-left: none; padding-left: 0; }
.spec strong {
  display: block; font-family: var(--font-head); font-size: 1.4rem;
  letter-spacing: -0.01em; margin-bottom: 3px;
  font-variant-numeric: tabular-nums;
}
.spec strong.timer-face { font-family: var(--font-timer); }
.spec span { color: var(--muted); font-size: 0.85rem; line-height: 1.45; display: block; }

/* ------------------------------------------------------------------ film */
.film { padding: 44px 0 24px; }
.film-card {
  position: relative; display: block; width: 100%; padding: 0;
  border: 1px solid var(--line); border-radius: 22px; overflow: hidden;
  cursor: pointer; background: var(--overlay-bg); box-shadow: var(--shadow-lg);
  text-align: left; font: inherit;
}
.film-card img {
  display: block; width: 100%; cursor: pointer;
  transition: transform 0.5s var(--ease-out-quart);
}
.film-card:hover img { transform: scale(1.015); }
.film-scrim {
  position: absolute; inset: 0;
  background: radial-gradient(90% 70% at 50% 45%, transparent 55%, rgba(4, 8, 18, 0.4) 100%);
}
.film-btn {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 86px; height: 86px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  transition: transform 0.18s ease, background 0.18s ease;
}
/* the triangle carries its own optical offset (+0.6 viewBox units); no margin */
.film-btn svg { width: 40px; height: 40px; fill: #fff; display: block; }
.film-card:hover .film-btn { transform: translate(-50%, -50%) scale(1.08); background: rgba(255, 255, 255, 0.26); }
.film-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.film-meta {
  position: absolute; left: 22px; bottom: 18px;
  display: flex; align-items: center; gap: 10px;
  color: #eef3ff; font-weight: 600; font-size: 0.98rem;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}
.film-dur {
  font-family: var(--font-timer); font-size: 0.78rem; padding: 3px 10px;
  border-radius: 999px; background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
}
.filmbox { border: none; padding: 0; background: transparent; max-width: min(94vw, 1500px); }
.filmbox::backdrop { background: rgba(5, 9, 20, 0.88); backdrop-filter: blur(6px); }
.filmbox video { display: block; width: min(94vw, 1500px); max-height: 88vh; border-radius: 12px; background: #000; }

/* ------------------------------------------------------------------- why */
.why { padding-bottom: 24px; }
.why h2 { font-size: clamp(1.65rem, 3vw, 2.2rem); }
.why p { color: var(--muted); font-size: 1.1rem; margin: 0; }

/* -------------------------------------------------------------- features */
.feature-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}

/* Bento layout: every feature gets a focused visual stage. */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.bento-sync { grid-column: span 3; }
.bento-overlay { grid-column: span 3; }
.bento-daily { grid-column: span 4; }
.bento-cs { grid-column: span 2; }
.bento-offsets { grid-column: span 3; }
.bento-cal { grid-column: span 3; }
.bento-fps { grid-column: span 3; }
.bento-priv { grid-column: span 3; }

.bento .feat {
  display: flex; flex-direction: column;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.bento .feat:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  box-shadow: var(--shadow-lg);
}
.bento .feat h3 { margin-top: 18px; }
.bento .feat p { flex: 1; }
.feat-vis {
  position: relative;
  height: 118px; border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex: none;
}

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(20px); }
.reveal.in-view {
  opacity: 1; transform: none;
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

/* sync visual */
.vis-sync { flex-direction: column; gap: 14px; }
.vis-sync .sync-chip { font-size: 0.86rem; padding: 6px 16px; transition: background 0.4s ease, color 0.4s ease; }
.unc-track {
  width: 62%; height: 6px; border-radius: 999px;
  background: color-mix(in srgb, var(--line) 60%, transparent);
  overflow: hidden;
}
.unc-fill {
  height: 100%; width: 90%; border-radius: 999px;
  background: var(--chip-green-ink);
  transition: width 1.4s cubic-bezier(0.3, 0.8, 0.3, 1), background 0.5s ease;
}

/* overlay-over-game visual */
/* The "game underneath" is the real game's world, veiled per the Stage
   Rule - not an abstract gradient. */
.game-plate {
  position: absolute; inset: 12px;
  border-radius: 10px; overflow: hidden;
  background:
    linear-gradient(rgba(7, 13, 28, 0.55), rgba(7, 13, 28, 0.62)),
    url("/assets/img/seigi-cg-still-960-v1.webp") center 30% / cover no-repeat;
  filter: saturate(0.9);
}
.overlay-box.micro {
  position: relative;
  font-size: 1.45rem; padding: 7px 16px 8px; border-radius: 7px;
  box-shadow: 0 10px 26px -8px rgba(4, 10, 26, 0.7);
}
.floaty { animation: floaty 4.2s ease-in-out infinite; }
@keyframes floaty {
  0%, 100% { transform: translateY(-4px); }
  50% { transform: translateY(4px); }
}

/* phase track visual */
.vis-phases { padding: 0 22px; }
.phase-track {
  position: relative; width: 100%; height: 46px;
  display: grid; grid-template-columns: 1.2fr 2fr 6fr; gap: 6px;
  align-items: stretch;
}
.phase-seg {
  border-radius: 9px; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-size: 0.72rem; letter-spacing: 0.06em;
  color: var(--muted); background: color-mix(in srgb, var(--line) 45%, transparent);
  transition: background 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
}
.phase-seg.live-wait { background: var(--chip-gray-bg); color: var(--chip-gray-ink); }
.phase-seg.live-prep { background: var(--chip-yellow-bg); color: var(--chip-yellow-ink); }
.phase-seg.live-battle { background: var(--accent-soft); color: var(--accent-ink); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent); }
.phase-marker {
  position: absolute; top: -7px; bottom: -7px; width: 2px; border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 70%, transparent);
  left: 0; transition: left 0.5s linear;
}

/* centisecond visual */
.timer-face {
  font-family: var(--font-timer); font-weight: 700;
  font-variant-numeric: tabular-nums; font-feature-settings: "tnum";
}
.vis-cs { font-size: 1.9rem; color: var(--ink); letter-spacing: 0.01em; }

/* offsets visual */
.vis-offsets .overlay-box.wide {
  display: grid; grid-template-columns: auto;
  padding: 8px 18px 20px;
}
.vis-offsets .main-line { font-size: 1.5rem; line-height: 1; }
.vis-offsets .off {
  position: absolute; bottom: 5px; font-size: 0.72rem; color: var(--overlay-colon);
  font-family: var(--font-timer); font-variant-numeric: tabular-nums;
}
.vis-offsets .off-l { left: 10px; }
.vis-offsets .off-r { right: 10px; }

/* calibration visual */
.vis-cal { flex-direction: column; gap: 14px; }
.cal-track {
  position: relative; width: 64%; height: 6px; border-radius: 999px;
  background: color-mix(in srgb, var(--line) 60%, transparent);
}
.cal-zero {
  position: absolute; left: 50%; top: -5px; width: 2px; height: 16px;
  background: var(--muted); border-radius: 2px; transform: translateX(-50%);
}
.cal-thumb {
  position: absolute; top: 50%; left: 50%;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 55%, transparent);
  transform: translate(-50%, -50%);
  animation: calnudge 5s ease-in-out infinite;
}
.cal-value { font-size: 0.85rem; color: var(--muted); }
@keyframes calnudge {
  0%, 18% { left: 50%; }
  32%, 48% { left: 63%; }
  62%, 78% { left: 42%; }
  92%, 100% { left: 50%; }
}

/* fps visual */
.vis-fps { gap: 8px; flex-wrap: wrap; padding: 0 18px; }
.fps-pill {
  font-family: var(--font-head); font-size: 0.8rem; font-weight: 700;
  color: var(--muted); border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 13px; transition: all 0.2s ease;
}
.fps-pill.active {
  background: var(--accent); border-color: var(--accent); color: var(--on-accent);
  box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--accent) 60%, transparent);
}
.bento-fps:hover .fps-pill:not(.active) { color: var(--ink); }

/* privacy visual */
.vis-priv { gap: 20px; }
.priv-shield {
  width: 44px; height: 44px; fill: none;
  stroke: var(--chip-green-ink); stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.priv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.priv-list li {
  font-size: 0.82rem; color: var(--muted); position: relative; padding-left: 18px;
}
.priv-list li::before {
  content: "✓"; position: absolute; left: 0; color: var(--chip-green-ink); font-weight: 700;
}

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  padding: 22px; box-shadow: var(--shadow);
}
.feat h3 { font-size: 1.04rem; margin: 0 0 8px; letter-spacing: -0.01em; }
.feat p { color: var(--muted); font-size: 0.92rem; margin: 0; }

/* ------------------------------------------------------------------ sync */
.sync { background: var(--surface-2); border-block: 1px solid var(--line); }
.sync-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 40px; align-items: start; }
.sync-steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 22px; }
.sync-steps li { counter-increment: step; position: relative; padding-left: 58px; }
/* Quiet dial markers: a hairline ring, not a blue block — Signal Blue stays
   reserved for truth (CTAs, sync states, focus). */
.sync-steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 2px;
  width: 40px; height: 40px; border-radius: 999px;
  display: grid; place-items: center;
  background: var(--surface); color: var(--muted);
  border: 1px solid var(--line);
  font-family: var(--font-timer); font-weight: 700; font-size: 1rem;
}
.sync-steps h3 { font-size: 1.06rem; margin-bottom: 5px; }
.sync-steps p { color: var(--muted); font-size: 0.94rem; margin: 0; }
.chips-card h3 { font-size: 1.02rem; margin-bottom: 14px; }
.chip-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.chip-list li { display: grid; grid-template-columns: 132px 1fr; gap: 12px; align-items: center; }
.chip-list li > span:last-child { color: var(--muted); font-size: 0.88rem; line-height: 1.45; }
.chip-list .sync-chip { text-align: center; }
.sync-demo { margin-top: 52px; text-align: center; }
.sync-demo h3 { font-size: 1.2rem; }
.device-row { display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; margin: 20px 0 6px; }
.mini-device { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.mini-label { color: var(--muted); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.05em; }
.overlay-box.mini { font-size: 2rem; padding: 10px 22px 12px; border-radius: 9px; min-width: 190px; }
.sync-demo .demo-caption { max-width: 46em; margin-inline: auto; }

/* --------------------------------------------------------------- screens */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 26px; }
.tab {
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  font-family: var(--font-body); font-size: 0.95rem; font-weight: 600;
  padding: 9px 20px; border-radius: 999px; cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.tab:hover { color: var(--ink); border-color: var(--accent); }
.tab.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeup 0.35s ease; }
@keyframes fadeup { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.shot-grid { display: grid; gap: 20px; }
.win-grid { grid-template-columns: 1fr 1fr 1fr; align-items: start; }
.mac-grid { grid-template-columns: 1fr 1fr; }
.phone-grid { grid-template-columns: repeat(3, minmax(0, 300px)); justify-content: center; }
/* iOS tab has two shots - keep the pair centred like the 3-up Android row. */
.phone-grid:has(> .phone:nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 300px)); }
.locale-grid { grid-template-columns: repeat(4, 1fr); align-items: start; }
.shot { margin: 0; }
.shot img {
  border-radius: 14px; border: 1px solid var(--line);
  box-shadow: var(--shadow); width: 100%;
  cursor: zoom-in;
  background: var(--surface-2);
}
.shot.phone img { border-radius: 26px; border-width: 4px; border-color: color-mix(in srgb, var(--ink) 82%, var(--bg)); }
.shot figcaption { color: var(--muted); font-size: 0.85rem; margin-top: 10px; line-height: 1.45; }
.shot-stack { display: grid; gap: 20px; align-content: start; }
.shot-overlay img { width: auto; max-width: 100%; cursor: default; }
.locales-strip { margin-top: 58px; }
.locales-strip h3 { font-size: 1.2rem; margin-bottom: 4px; }
.locales-strip > p { color: var(--muted); margin-bottom: 20px; }

/* ---------------------------------------------------------------- orders */
.orders { background: var(--surface-2); border-block: 1px solid var(--line); }
.badge {
  display: inline-block; vertical-align: 0.35em; margin-left: 10px;
  background: var(--accent-soft); color: var(--accent-ink);
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.04em;
  padding: 3px 10px; border-radius: 999px;
  font-family: var(--font-head);
}
.orders-hero { margin: 0 0 26px; }
.orders-hero img { border-radius: 16px; box-shadow: var(--shadow-lg); }
/* Same width as the tracker capture above it, so the edges align. */
.orders-grid { grid-template-columns: repeat(2, 1fr); }

/* ----------------------------------------------------------------- guide */
/* Guide steps share the sync section's quiet dial treatment - one numbered
   voice on the page, no card boxes. */
.steps { list-style: none; counter-reset: gstep; margin: 0; padding: 0; display: grid; gap: 24px; max-width: 760px; }
.steps li {
  counter-increment: gstep; position: relative; padding: 2px 0 2px 58px;
}
.steps li::before {
  content: counter(gstep);
  position: absolute; left: 0; top: 2px;
  width: 40px; height: 40px; border-radius: 999px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  background: var(--surface); color: var(--muted);
  font-family: var(--font-timer); font-weight: 700; font-size: 1rem;
}
.steps h3 { font-size: 1.02rem; margin-bottom: 4px; }
.steps p { color: var(--muted); font-size: 0.93rem; margin: 0; }
.steps-continue { margin-top: 18px; }
.guide-intro { max-width: 760px; color: var(--muted); }
.method-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 980px; }
.method h3 { font-size: 1rem; margin-bottom: 6px; }
.method p { color: var(--muted); font-size: 0.9rem; margin: 0; }
.method.recommended { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }

/* Steps and FAQ share a two-column band on wide screens; the FAQ stacks
   back under the steps on narrow ones. */
.guide-cols {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 44px; align-items: start;
}
.faq { max-width: 820px; }
.faq h3 { font-size: 1.2rem; margin-bottom: 16px; }
.faq details {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 0 20px; margin-bottom: 10px; box-shadow: var(--shadow);
}
/* smooth accordion where the platform supports height-to-auto interpolation */
@supports (interpolate-size: allow-keywords) {
  .faq details { interpolate-size: allow-keywords; }
  .faq details::details-content {
    block-size: 0; overflow: hidden;
    transition: block-size 0.3s var(--ease-out-quart), content-visibility 0.3s allow-discrete;
  }
  .faq details[open]::details-content { block-size: auto; }
}
.faq summary {
  cursor: pointer; font-weight: 600; padding: 15px 0; list-style: none; position: relative; padding-right: 30px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
  color: var(--accent-ink); font-family: var(--font-head); font-size: 1.2rem;
  transition: transform 0.25s var(--ease-out-quart);
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { color: var(--muted); font-size: 0.93rem; margin: 0 0 16px; }

/* -------------------------------------------------------------- download */
.dl-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 18px; align-items: stretch;
}
.dl-card { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 28px; }
.dl-card h3 { font-size: 1.15rem; margin: 0; }
.dl-card p { color: var(--muted); font-size: 0.94rem; flex: 1; }
.dl-web { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); box-shadow: var(--shadow-lg); }
.dl-web p { flex: 1; }
.dl-web .btn { margin-top: auto; }
.dl-tag {
  font-size: 0.76rem; font-weight: 700; letter-spacing: 0.03em;
  background: var(--accent-soft); color: var(--accent-ink);
  border-radius: 999px; padding: 4px 12px; margin: 0 0 14px;
}
/* .dl-card p gets flex:1 for the description; the tag pill must not
   stretch (matches .dl-card p specificity, so it must carry its own). */
.dl-card p.dl-tag { flex: none; }
.dl-secondary { display: grid; gap: 18px; grid-auto-rows: 1fr; }
/* Body stretches to the card so both mini buttons share one bottom edge
   (the description's flex:1 pushes the button down). */
.dl-mini { flex-direction: row; align-items: stretch; gap: 16px; padding: 20px 22px; }
.dl-mini .dl-ico { margin: 2px 0 0; flex: none; }
.dl-mini-body { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.dl-mini-body h3 { font-size: 1.02rem; }
.dl-mini-body p { font-size: 0.88rem; margin-bottom: 8px; }
.dl-mini .btn { padding: 8px 16px; font-size: 0.9rem; align-self: flex-start; }
.dl-ico { width: 20px; height: 20px; fill: none; stroke: var(--accent-ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 8px; }
.dl-ico path[d^="M12 2.5a9.6"] { fill: var(--accent-ink); stroke: none; }
.dl-note { color: var(--muted); font-size: 0.88rem; margin: 20px 0 0; max-width: 46em; }

/* ---------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--line); padding: 52px 0 56px; background: var(--surface-2); }
.foot-close {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  margin-bottom: 48px;
}
.foot-close::before, .foot-close::after {
  content: ""; width: 44px; height: 1px; background: var(--line); flex: none;
}
.foot-made {
  font-family: var(--font-display); font-size: 1.35rem; color: var(--ink);
  margin: 0;
}
.foot-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; font-family: var(--font-head); flex-wrap: wrap; }
.foot-brand img { border-radius: 7px; }
.foot-ver { color: var(--muted); font-size: 0.82rem; border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; }
.foot-links {
  display: flex; gap: 18px; margin-left: auto; font-size: 0.88rem;
  font-family: var(--font-body); font-weight: 500;
}
.foot-small { color: var(--muted); font-size: 0.82rem; max-width: 66em; line-height: 1.6; }

/* -------------------------------------------------------------- lightbox */
.lightbox {
  border: none; padding: 0; background: transparent; max-width: min(94vw, 1400px); max-height: 92vh;
}
.lightbox::backdrop { background: rgba(5, 9, 20, 0.82); backdrop-filter: blur(6px); }
.lightbox img { max-width: min(94vw, 1400px); max-height: 88vh; width: auto; height: auto; border-radius: 12px; margin: 0 auto; }
.lightbox-close {
  position: fixed; top: 14px; right: 20px; z-index: 2;
  width: 42px; height: 42px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 1.5rem; line-height: 1;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.26); }

/* ------------------------------------------------------------ responsive */
/* The inline nav needs ~1100px once CJK locales lengthen the labels; hand
   over to the burger before it can collide with the header tools. */
@media (max-width: 1120px) {
  .site-nav { display: none; }
  .nav-toggle { display: grid; }
  .mobile-nav:not([hidden]) { display: flex; }
}
@media (max-width: 1020px) {
  .guide-cols { grid-template-columns: 1fr; gap: 0; }
  .faq { margin-top: 56px; }
  .feature-grid, .orders-grid { grid-template-columns: repeat(2, 1fr); }
  .bento { grid-template-columns: 1fr 1fr; }
  .bento > .feat { grid-column: auto; }
  .win-grid { grid-template-columns: 1fr 1fr; }
  .shot-stack { grid-column: span 2; grid-template-columns: repeat(3, auto); justify-content: start; }
  .locale-grid { grid-template-columns: repeat(2, 1fr); }
  .sync-grid { grid-template-columns: 1fr; }
  .spec-strip { grid-template-columns: 1fr 1fr; row-gap: 18px; }
  .spec { border-left: none; padding-left: 0; padding-right: 16px; }
  .method-grid { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero { padding: 76px 0 64px; }
  /* Copy spans the full width here: deepen the veil so text wins over art. */
  .hero-veil {
    background:
      linear-gradient(rgba(7, 13, 28, 0.52), rgba(7, 13, 28, 0.52)),
      linear-gradient(180deg, rgba(7, 13, 28, 0.66) 0%, rgba(7, 13, 28, 0.28) 30%,
        rgba(7, 13, 28, 0.14) 60%, var(--bg) 100%);
  }
  .dl-grid { grid-template-columns: 1fr; }
  /* Stacked cards must share one left edge: the minis adopt the web card's
     column skeleton (icon above the heading) and its 28px inset. */
  .dl-mini { flex-direction: column; gap: 4px; padding: 28px; }
  .dl-mini .dl-ico { margin: 0 0 8px; }
}
@media (max-width: 620px) {
  section { padding: 52px 0; }
  .film { padding: 36px 0 12px; }
  .film-btn { width: 62px; height: 62px; }
  .film-btn svg { width: 28px; height: 28px; }
  .film-meta { left: 14px; bottom: 12px; font-size: 0.88rem; }
  .feature-grid, .orders-grid, .win-grid, .mac-grid, .locale-grid { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr; }
  .phone-grid { grid-template-columns: 1fr 1fr; }
  .shot-stack { grid-column: auto; grid-template-columns: 1fr; }
  .spec-strip { grid-template-columns: 1fr 1fr; }
  .chip-list li { grid-template-columns: 1fr; gap: 4px; }
  .chip-list .sync-chip { justify-self: start; }
  .overlay-box.mini { min-width: 160px; font-size: 1.7rem; }
  .device-row { flex-direction: column; align-items: center; }
  .brand-text small { display: none; }
  /* At phone width the crop centres the character under the headline. */
  .hero-cg { object-position: 50% 20%; }
  .foot-links { margin-left: 0; }
  /* the live demo must reach the first paint: tighten the copy column and
     let the spec strip carry the platform list */
  .hero { padding: 60px 0 48px; }
  .hero-sub { margin-bottom: 20px; }
  .hero-ctas { margin-bottom: 16px; }
  .platform-row { display: none; }
  .hero-grid { gap: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tab-panel.active { animation: none; }
  .btn, .btn:hover, .btn:active { transform: none; transition: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .floaty, .cal-thumb { animation: none; }
  .bento .feat, .bento .feat:hover { transform: none; }
  .site-header { transition: none; }
  .hero.entrance .hero-badge, .hero.entrance .hero-title, .hero.entrance .hero-sub,
  .hero.entrance .hero-ctas, .hero.entrance .platform-row, .hero.entrance .demo-float,
  .hero.locked-pulse .demo-chiprow .sync-chip { animation: none; }
  .hero.pre-lock .overlay-box { filter: none; opacity: 1; }
  .hero-cg { transition: none; transform: scale(1.1); }
  #themeToggle .ico { transition: none; }
  .lang-menu { animation: none; }
  .lang-btn .chev { transition: none; }
  .faq details::details-content { transition: none; }
  .tool-btn:active { transform: none; }
}
