/* ═══════════════════════════════════════════════════════
   FLUX AHEAD — same structure as KeyglowWeb, PiClimbWeb and HairDiaryWeb, in the game's look
   (Sources/FluxApp/Style.swift, Palette): warm amber light on a dark control panel, brass and glass.
   Always dark, as the game is. Headings use the system's rounded face (SF Pro Rounded on Apple
   devices), like the game's buttons; text uses the system sans. No web fonts.
   ═══════════════════════════════════════════════════════ */

/* 1. VARIABLES
   ─────────────────────────────────────────────────────── */
:root {
  color-scheme: dark;

  /* Palette in Style.swift */
  --panel-top:    #22211f;   /* panelTop */
  --panel-bottom: #121110;   /* panelBottom */
  --amber:        #ff9e33;   /* amber */
  --amber-hot:    #ffdb94;   /* amberHot */
  --ink:          #dbd1bf;   /* ink */
  --ink-dim:      #8c857a;   /* inkDim */
  --socket:       #0f0f0f;   /* socket */
  --plate:        #3d3b37;   /* plate */

  --bg:        #161514;
  --bg-2:      #1c1a19;
  --surface:   #211f1d;
  --surface-2: #2a2826;
  --header-bg: rgba(22, 21, 20, 0.86);

  --accent:      var(--amber);
  --accent-soft: rgba(255, 158, 51, 0.12);
  --accent-line: rgba(255, 158, 51, 0.30);
  --accent-glow: rgba(255, 158, 51, 0.45);
  --link:        #ffb862;
  --on-accent:   #401f05;   /* the PrimaryKey's label colour */

  --text:   #f3ece0;
  --text-2: var(--ink);
  --text-3: var(--ink-dim);
  --border: rgba(255, 255, 255, 0.08);
  --error:  #ff8f80;

  --display: ui-rounded, 'SF Pro Rounded', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', 'Hiragino Sans', 'Apple SD Gothic Neo', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --sans:    -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', 'Helvetica Neue', 'Hiragino Sans', 'Apple SD Gothic Neo', 'PingFang SC', 'Microsoft YaHei', sans-serif;

  --pad:   clamp(16px, 5vw, 80px);
  --max-w: 1200px;

  --r1: 12px;
  --r2: 16px;
  --r3: 22px;

  --sh1: 0 1px 3px rgba(0,0,0,.4);
  --sh3: 0 18px 48px rgba(0,0,0,.55), 0 4px 16px rgba(0,0,0,.35);

  /* The PrimaryKey: amberHot to amber, top to bottom. */
  --key: linear-gradient(180deg, var(--amber-hot) 0%, var(--amber) 100%);
  --panel: linear-gradient(180deg, var(--panel-top) 0%, var(--panel-bottom) 100%);
}

/* 2. RESET & BASE
   ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100dvh;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; }
textarea { resize: vertical; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 4px; }

.visually-hidden-focusable {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}
.visually-hidden-focusable:focus {
  position: static; width: auto; height: auto;
  overflow: visible; clip: auto; white-space: normal;
  background: var(--accent); color: var(--on-accent);
  padding: 8px 16px; border-radius: 4px; z-index: 9999;
}

/* 3. HEADER (body > header: pages have their own <header> elements)
   ─────────────────────────────────────────────────────── */
body > header {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 20px;
  padding: 0 var(--pad);
  height: 64px;
  background: var(--header-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.header-brand { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.brand-logo { border-radius: 8px; box-shadow: var(--sh1); }
.brand-name {
  font-family: var(--display);
  font-size: 21px; font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.header-nav { display: flex; align-items: center; gap: 2px; flex: 1; }
.nav-link {
  padding: 7px 13px;
  border-radius: 100px;
  font-size: 14px; font-weight: 500;
  color: var(--text-2);
  transition: color .15s, background .15s;
  white-space: nowrap;
}
.nav-link:hover   { color: var(--link); background: var(--accent-soft); }
.nav-link--active { color: var(--link); font-weight: 600; }

.nav-toggle {
  display: none;
  background: none;
  padding: 8px; border-radius: var(--r1);
  color: var(--text);
  margin-left: auto;
  transition: background .15s;
}
.nav-toggle:hover { background: var(--accent-soft); }

/* Language picker */
.lang-picker { position: relative; flex-shrink: 0; }
.lang-trigger {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 10px; border-radius: 100px;
  font-size: 13px; font-weight: 500;
  color: var(--text-2);
  cursor: pointer; background: none; border: none;
  list-style: none;
  transition: color .15s, background .15s;
  user-select: none;
}
.lang-trigger::-webkit-details-marker { display: none; }
.lang-trigger:hover { color: var(--link); background: var(--accent-soft); }
.lang-code { font-weight: 600; font-size: 12px; letter-spacing: .04em; }
.lang-chevron { transition: transform .2s; }
details[open] .lang-chevron { transform: rotate(180deg); }

.lang-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  box-shadow: var(--sh3);
  padding: 8px; min-width: 300px; z-index: 200;
}
.lang-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; list-style: none; }
.lang-option {
  display: block;
  padding: 8px 10px; border-radius: var(--r1);
  font-size: 13px; color: var(--text-2);
  transition: color .15s, background .15s; white-space: nowrap;
}
.lang-option:hover   { color: var(--link); background: var(--accent-soft); }
.lang-option--active { color: var(--link); font-weight: 600; background: var(--accent-soft); }

/* 4. BUTTONS
   ─────────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 26px;
  background: var(--key); color: var(--on-accent);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 16px;
  font-family: var(--display);
  font-size: 16px; font-weight: 800; letter-spacing: .02em;
  transition: transform .15s, box-shadow .2s, filter .2s;
  box-shadow: 0 0 22px var(--accent-glow);
}
.btn-primary:hover  { filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 0 32px var(--accent-glow); }
.btn-primary:active { transform: scale(.97); }
/* Placeholder until the App Store link exists: looks like the key, but unlit and not clickable. */
.btn-primary--soon {
  background: linear-gradient(180deg, var(--plate), #2c2a27);
  color: var(--amber-hot);
  border-color: var(--accent-line);
  box-shadow: none; cursor: default;
}
.btn-primary--soon:hover { filter: none; transform: none; box-shadow: none; }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 13px 22px;
  color: var(--link);
  border-radius: 16px; font-size: 15px; font-weight: 600;
  border: 1.5px solid var(--accent-line);
  transition: border-color .2s, background .2s;
}
.btn-ghost:hover { border-color: var(--link); background: var(--accent-soft); }

/* 5. HERO
   ─────────────────────────────────────────────────────── */
.hero {
  position: relative;
  background:
    radial-gradient(ellipse 60% 55% at 72% 45%, rgba(255,158,51,.16), transparent 70%),
    var(--panel);
  overflow: hidden;
}
.hero::after {   /* the game's vignette */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,.45) 100%);
}
.hero-inner {
  position: relative; z-index: 1;
  max-width: var(--max-w); margin: 0 auto;
  padding: 72px var(--pad) 88px;
  display: grid; grid-template-columns: 1.05fr .95fr;
  align-items: center; gap: 56px;
  /* Fills the first screen, but never more: a tall window (or a full-page screenshot) must not stretch it. */
  min-height: min(calc(100dvh - 64px - 72px), 820px);
}
.hero-content { max-width: 580px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 6px 14px 6px 6px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  border-radius: 100px; margin-bottom: 26px;
}
.hero-badge-icon { border-radius: 7px; }
.hero-badge-text {
  font-family: var(--display); font-weight: 700; font-size: 14px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--amber-hot);
}
.hero-headline {
  font-family: var(--display);
  font-size: clamp(38px, 5.4vw, 66px);
  font-weight: 800; line-height: 1.04;
  letter-spacing: -.025em;
  color: var(--text);
  margin-bottom: 22px;
  text-wrap: balance;
}
.hero-sub {
  font-size: 18px; line-height: 1.65;
  color: var(--text-2);
  max-width: 520px; margin-bottom: 36px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* The panel the board sits on: the app icon's glass plate with four screws. */
.panel {
  position: relative;
  justify-self: center;
  width: min(100%, 460px);
  padding: 22px;
  background: linear-gradient(160deg, #3a3835 0%, #262422 45%, #1b1a18 100%);
  border-radius: 34px;
  border: 1px solid rgba(255,255,255,.07);
  box-shadow: 0 0 0 10px #0d0c0c, 0 30px 80px rgba(0,0,0,.6), 0 0 120px rgba(255,158,51,.10);
}
.screw {
  position: absolute; width: 12px; height: 12px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #3b3936, #161514);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.5);
}
.screw::after {
  content: ""; position: absolute; left: 2px; right: 2px; top: 5px; height: 2px;
  background: #0b0b0a; transform: rotate(-40deg); border-radius: 1px;
}
.screw--tl { top: 9px; left: 9px; }
.screw--tr { top: 9px; right: 9px; }
.screw--bl { bottom: 9px; left: 9px; }
.screw--br { bottom: 9px; right: 9px; }

/* 6. THE BOARD (Pages/Shared/_Board.cshtml)
   ─────────────────────────────────────────────────────── */
.board-svg { width: 100%; height: auto; overflow: visible; }
.board-svg .cell { fill: var(--socket); stroke: rgba(255,255,255,.035); stroke-width: 1; }
.board-svg .cell--wall { fill: url(#hatch); stroke: rgba(0,0,0,.5); }
.board-svg .parts rect, .board-svg .drop-plate { fill: #1d1b19; stroke: rgba(255,255,255,.06); }
.board-svg .wire path, .board-svg .drop-wire {
  fill: none; stroke: #5a4128; stroke-width: 14; stroke-linecap: butt;
}
.board-svg .lit path {
  fill: none; stroke: var(--amber); stroke-width: 7; stroke-linecap: butt;
  stroke-dasharray: 1 1; stroke-dashoffset: 0;
}
.board-svg .lit .lit-south, .board-svg .lit .lit-last { stroke: #ffb04d; }
.board-svg .splitter-hub { fill: var(--amber-hot); }
.board-svg .generator { fill: url(#bulb-lit); stroke: #ffcf7a; stroke-width: 2; }
.board-svg .bolt { fill: #5a2c06; }
.board-svg .bulb-off { stroke: rgba(255,255,255,.12); stroke-width: 1.5; }
.board-svg .tap { fill: none; stroke: var(--amber-hot); stroke-width: 2.5; opacity: 0; transform-box: fill-box; transform-origin: center; }
.board-svg .drop { transform-box: fill-box; transform-origin: center; }
.board-svg .tray-plate { fill: #0d0c0c; stroke: rgba(255,255,255,.05); }
.board-svg .tray-socket { fill: #1d1b19; stroke: var(--accent-line); stroke-width: 1.5; }
.board-svg .tray-next { stroke: #6b4b2a; stroke-width: 12; fill: none; }
.board-svg .tray-queue path { stroke: #4b3826; stroke-width: 7; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.board-svg .tray-rotate { stroke: var(--ink-dim); stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* The story on a loop: trunk, then both branches; the lower branch waits for its last part,
   which drops in from the tray just before the current arrives; then both lamps light. */
@media (prefers-reduced-motion: no-preference) {
  .board-svg .lit-trunk { animation: lit-trunk 7s linear infinite; }
  .board-svg .lit-north { animation: lit-north 7s linear infinite; }
  .board-svg .lit-south { animation: lit-south 7s linear infinite; }
  .board-svg .lit-last  { animation: lit-last  7s linear infinite; }
  .board-svg .splitter-hub { animation: hub 7s linear infinite; }
  .board-svg .drop      { animation: drop      7s ease-out infinite; }
  .board-svg .tap       { animation: tap       7s ease-out infinite; }
  .board-svg .tray-next { animation: tray-next 7s linear infinite; }
  .board-svg .lamp--north .bulb-on, .board-svg .lamp--north .bulb-halo { animation: lamp-north 7s ease-out infinite; }
  .board-svg .lamp--south .bulb-on, .board-svg .lamp--south .bulb-halo { animation: lamp-south 7s ease-out infinite; }
}
@keyframes lit-trunk { 0% { stroke-dashoffset: 1; opacity: 1; } 16% { stroke-dashoffset: 0; } 90% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes lit-north { 0%, 16% { stroke-dashoffset: 1; opacity: 1; } 46% { stroke-dashoffset: 0; } 90% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes lit-south { 0%, 16% { stroke-dashoffset: 1; opacity: 1; } 34% { stroke-dashoffset: 0; } 90% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes lit-last  { 0%, 36% { stroke-dashoffset: 1; opacity: 1; } 52% { stroke-dashoffset: 0; } 90% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes hub       { 0%, 15% { opacity: 0; } 17% { opacity: 1; } 90% { opacity: 1; } 100% { opacity: 0; } }
@keyframes drop      { 0%, 27% { opacity: 0; transform: scale(1.3); } 31% { opacity: 1; transform: scale(1); } 90% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1); } }
@keyframes tap       { 0%, 26% { opacity: 0; transform: scale(.6); } 28% { opacity: .9; transform: scale(.8); } 36% { opacity: 0; transform: scale(1.5); } 100% { opacity: 0; } }
@keyframes tray-next { 0%, 26% { opacity: 1; } 28%, 94% { opacity: 0; } 100% { opacity: 1; } }
@keyframes lamp-north { 0%, 45% { opacity: 0; } 49% { opacity: 1; } 90% { opacity: 1; } 100% { opacity: 0; } }
@keyframes lamp-south { 0%, 51% { opacity: 0; } 55% { opacity: 1; } 90% { opacity: 1; } 100% { opacity: 0; } }

/* 7. STATS BAR
   ─────────────────────────────────────────────────────── */
.stats-bar {
  background: linear-gradient(180deg, #2b2724, #1d1a18);
  border-top: 1px solid rgba(255,158,51,.25);
  border-bottom: 1px solid var(--border);
  padding: 18px var(--pad);
}
.stats-bar-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  gap: 14px 44px; flex-wrap: wrap;
  list-style: none;
}
.stat-item { display: flex; align-items: center; gap: 10px; color: var(--text); }
.stat-icon {
  width: 34px; height: 34px;
  background: var(--accent-soft); color: var(--amber);
  border-radius: var(--r1);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-label { font-size: 14px; font-weight: 500; }

/* 8. SECTIONS
   ─────────────────────────────────────────────────────── */
.how, .chapters, .shots, .modes, .pricing {
  padding: 100px var(--pad);
  max-width: var(--max-w); margin: 0 auto;
}
.section-header { text-align: center; margin-bottom: 56px; }
.section-kicker {
  display: inline-block;
  font-size: 11px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--amber); margin-bottom: 12px;
}
.section-title {
  font-family: var(--display);
  font-size: clamp(30px, 4vw, 50px);
  font-weight: 800; line-height: 1.1;
  color: var(--text); letter-spacing: -.02em;
  text-wrap: balance;
}
.section-sub {
  font-size: 16px; color: var(--text-2); line-height: 1.65;
  margin-top: 14px; max-width: 580px;
  margin-left: auto; margin-right: auto;
}

/* How it plays */
.steps {
  list-style: none;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r3);
  padding: 30px 28px 28px;
}
.step-number {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--key); color: var(--on-accent);
  font-family: var(--display); font-weight: 800; font-size: 18px;
  box-shadow: 0 0 18px var(--accent-glow);
  margin-bottom: 18px;
}
.step-title {
  font-family: var(--display);
  font-size: 24px; font-weight: 700; color: var(--text);
  margin-bottom: 8px; line-height: 1.2;
}
.step-text { font-size: 15px; line-height: 1.65; color: var(--text-2); }
.how-note {
  max-width: 720px; margin: 36px auto 0;
  text-align: center; font-size: 15px; color: var(--text-2); line-height: 1.7;
}
.how-stars {
  display: block; margin-bottom: 6px;
  color: var(--amber-hot); font-size: 22px; letter-spacing: .2em;
  text-shadow: 0 0 12px var(--accent-glow);
}

/* Chapters */
.chapters { max-width: none; background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.chapter-grid {
  list-style: none;
  max-width: var(--max-w); margin: 0 auto;
  /* Seven cards: a centred flex row, so the last row of three sits in the middle instead of leaving a hole. */
  display: flex; flex-wrap: wrap; justify-content: center; gap: 18px;
}
.chapter-card {
  flex: 0 1 calc((100% - 3 * 18px) / 4);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r3);
  padding: 26px 24px;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.chapter-card:hover { transform: translateY(-4px); border-color: var(--accent-line); box-shadow: 0 10px 40px rgba(255,158,51,.08); }
.chapter-icon {
  display: flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: var(--r2);
  background: var(--socket); color: var(--amber);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
  filter: drop-shadow(0 0 6px rgba(255,158,51,.35));
  margin-bottom: 18px;
}
.chapter-label {
  display: block;
  font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-dim); margin-bottom: 4px;
}
.chapter-name {
  font-family: var(--display);
  font-size: 22px; font-weight: 700; color: var(--amber-hot);
  margin-bottom: 8px; line-height: 1.2;
}
.chapter-text { font-size: 14.5px; line-height: 1.6; color: var(--text-2); }

/* Screenshots */
.shot-row {
  list-style: none;
  display: flex; justify-content: center; gap: 28px; flex-wrap: wrap;
}
.phone {
  width: 250px; aspect-ratio: 600 / 1304;
  border-radius: 40px; padding: 9px;
  background: #0b0b0a;
  box-shadow: 0 0 0 1.5px #3a3835, var(--sh3);
  overflow: hidden;
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 32px; }
.phone:nth-child(2) { transform: translateY(-24px); }
.phone-placeholder {
  height: 100%; border-radius: 32px;
  border: 2px dashed rgba(255,158,51,.5);
  background: repeating-linear-gradient(135deg, #1a1816 0 14px, #1f1d1b 14px 28px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 24px; text-align: center;
  color: var(--text-2); font-size: 13px; line-height: 1.5;
}
.phone-placeholder strong {
  font-family: var(--display); font-size: 13px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--amber);
}
.phone-placeholder code { font-size: 11px; color: var(--ink-dim); word-break: break-all; }

/* Daily Circuit, Endless, Game Center */
.modes { display: flex; flex-direction: column; gap: 20px; }
.mode {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r3);
  padding: 36px;
}
.mode--daily {
  display: grid; grid-template-columns: 340px 1fr; gap: 44px; align-items: center;
  background: radial-gradient(ellipse 50% 90% at 15% 50%, rgba(255,158,51,.10), transparent 70%), var(--surface);
}
.mode-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.mode-title {
  font-family: var(--display);
  font-size: clamp(24px, 2.6vw, 32px); font-weight: 800; line-height: 1.15;
  color: var(--text); margin-bottom: 12px; letter-spacing: -.01em;
  text-wrap: balance;
}
.mode-text { font-size: 15.5px; line-height: 1.7; color: var(--text-2); }

.daily-card, .endless-card, .gc-card {
  background: var(--panel);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--r3);
  box-shadow: var(--sh3);
}
.daily-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 30px 22px;
  text-align: center;
}
.daily-kicker {
  font-family: var(--display); font-size: 12px; font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-dim);
}
.daily-time {
  font-family: var(--display); font-size: 72px; font-weight: 900; line-height: 1.05;
  font-variant-numeric: tabular-nums;
  background: var(--key); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 14px rgba(255,158,51,.55));
}
.daily-tries { font-family: var(--display); font-weight: 600; font-size: 15px; color: var(--ink); }
.daily-streak {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 14px;
  margin-top: 10px; font-family: var(--display); font-weight: 700; font-size: 14px; color: var(--amber-hot);
}
.freeze { color: #9fd3ff; font-weight: 600; }

.endless-card, .gc-card { padding: 20px 22px; margin-bottom: 26px; }
.endless-card { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.endless-count {
  font-family: var(--display); font-size: 54px; font-weight: 900; line-height: 1;
  color: var(--amber-hot); text-shadow: 0 0 16px var(--accent-glow);
}
.endless-label { font-family: var(--display); font-weight: 600; color: var(--ink); }
.endless-best { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--ink-dim); }
.gc-card { display: flex; flex-direction: column; gap: 8px; }
.gc-row {
  display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 12px;
  padding: 7px 10px; border-radius: 10px;
  font-family: var(--display); font-weight: 700; font-size: 14px; color: var(--ink);
}
.gc-row b { color: var(--ink-dim); }
.gc-row i { height: 8px; border-radius: 4px; background: var(--plate); }
.gc-row em { font-style: normal; font-variant-numeric: tabular-nums; }
.gc-row--me { background: var(--accent-soft); color: var(--amber-hot); box-shadow: inset 0 0 0 1px var(--accent-line); }
.gc-row--me i { background: linear-gradient(90deg, var(--amber), rgba(255,158,51,.2)); }

/* Free and Remove Ads */
.pricing { padding-top: 40px; }
.pricing-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
  max-width: 940px; margin: 0 auto;
}
.plan {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r3);
  padding: 34px 32px;
}
.plan--pro {
  border-color: var(--accent-line);
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(255,158,51,.12), transparent 70%), var(--surface);
}
.plan-name {
  font-family: var(--display); font-size: 26px; font-weight: 800; color: var(--text);
}
.plan--pro .plan-name { color: var(--amber-hot); }
.plan-price { font-size: 14px; font-weight: 600; color: var(--amber); margin: 4px 0 18px; letter-spacing: .02em; }
.plan-lead { font-size: 15px; color: var(--text-2); margin: -8px 0 16px; }
.plan-points { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.plan-points li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.5; color: var(--text-2); }
.check {
  flex-shrink: 0; margin-top: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent-soft); color: var(--amber);
  display: inline-flex; align-items: center; justify-content: center;
}
.plan-note {
  margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border);
  font-size: 13.5px; line-height: 1.6; color: var(--text-3);
}

/* Privacy band */
.privacy-band {
  padding: 90px var(--pad);
  background: var(--bg-2);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  text-align: center;
}
.privacy-band-inner { max-width: 720px; margin: 0 auto; }
.privacy-band .btn-ghost { margin-top: 28px; }

/* Download CTA */
.download-cta {
  padding: 100px var(--pad);
  text-align: center;
  background: radial-gradient(ellipse 50% 60% at 50% 30%, rgba(255,158,51,.14), transparent 70%), var(--panel);
}
.download-cta-inner { max-width: 600px; margin: 0 auto; }
.download-icon {
  margin: 0 auto 28px; border-radius: 26px;
  box-shadow: 0 0 60px rgba(255,158,51,.25), var(--sh3);
}
.download-cta-title {
  font-family: var(--display);
  font-size: clamp(34px, 4.5vw, 54px);
  font-weight: 800; line-height: 1.1; letter-spacing: -.02em;
  color: var(--text); margin-bottom: 16px;
  text-wrap: balance;
}
.download-cta-sub { font-size: 17px; color: var(--text-2); margin-bottom: 36px; line-height: 1.65; }
.appstore-badge {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 13px 26px;
  background: #000; color: #fff;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 16px;
  transition: transform .2s, box-shadow .2s;
}
.appstore-badge:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(255,158,51,.18); }
.appstore-badge--soon { cursor: default; opacity: .75; border-style: dashed; }
.appstore-badge--soon:hover { transform: none; box-shadow: none; }
.appstore-badge-text { text-align: left; }
.appstore-badge-line1 { display: block; font-size: 11px; opacity: .75; letter-spacing: .02em; }
.appstore-badge-line2 { display: block; font-size: 21px; font-weight: 600; letter-spacing: -.01em; line-height: 1.15; }
.download-note { margin-top: 18px; font-size: 14px; color: var(--text-3); }

/* 9. PROSE (Support, Privacy)
   ─────────────────────────────────────────────────────── */
.prose-page { max-width: 760px; margin: 0 auto; padding: 60px var(--pad) 100px; }
.prose-header { margin-bottom: 40px; }
.prose-header h1 {
  font-family: var(--display);
  font-size: clamp(34px, 4.5vw, 52px);
  font-weight: 800; line-height: 1.1; letter-spacing: -.02em;
  color: var(--text); margin-bottom: 12px;
}
.prose-meta { font-size: 14px; color: var(--text-3); }
.prose-meta a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }

.support-intro { font-size: 17px; color: var(--text-2); line-height: 1.65; }
.support-grid  { display: flex; flex-direction: column; gap: 24px; }
.support-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r3);
  padding: 36px;
  scroll-margin-top: 80px;
}
.support-card h2 {
  font-family: var(--display);
  font-size: 26px; font-weight: 700;
  color: var(--text); margin-bottom: 20px;
}
.contact-row { display: flex; gap: 12px; flex-wrap: wrap; font-size: 15px; align-items: center; }
.contact-label { color: var(--text-3); font-weight: 500; }
.contact-row a { color: var(--link); transition: opacity .15s; overflow-wrap: anywhere; }
.contact-row a:hover { opacity: .7; }

.faq { display: flex; flex-direction: column; }
.faq-item { border-top: 1px solid var(--border); }
.faq-item:last-child { border-bottom: 1px solid var(--border); }
.faq-item summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px 0;
  font-size: 16px; font-weight: 600; color: var(--text);
  cursor: pointer; list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 22px; font-weight: 400; line-height: 1;
  color: var(--amber); flex-shrink: 0;
  transition: transform .2s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 0 18px; font-size: 15px; line-height: 1.7; color: var(--text-2); }

/* 10. FORMS
   ─────────────────────────────────────────────────────── */
.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.form-field label {
  font-size: 14px; font-weight: 600; color: var(--text);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.form-field input,
.form-field textarea {
  padding: 12px 16px;
  background: var(--socket);
  border: 1.5px solid var(--border);
  border-radius: var(--r1);
  font-family: var(--sans); font-size: 16px; color: var(--text);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.form-field input::placeholder, .form-field textarea::placeholder { color: #6b655d; }
.form-field input:focus,
.form-field textarea:focus { border-color: var(--amber); box-shadow: 0 0 0 3px var(--accent-soft); }
.form-field textarea { min-height: 140px; }
.form-field--trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-submit {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px;
  background: var(--key); color: var(--on-accent);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 16px;
  font-family: var(--display); font-size: 16px; font-weight: 800;
  transition: transform .15s, filter .2s;
  box-shadow: 0 0 18px var(--accent-glow);
}
.form-submit:hover { filter: brightness(1.06); transform: translateY(-1px); }
.field-error { color: var(--error); font-size: 12px; font-weight: 500; }
.alert-success {
  padding: 12px 16px;
  background: rgba(115,242,158,.08);
  border: 1px solid rgba(115,242,158,.28);
  border-radius: var(--r1); font-size: 14px; color: var(--text);
  margin-bottom: 20px;
}
.alert-error {
  padding: 12px 16px;
  background: rgba(255,143,128,.08);
  border: 1px solid rgba(255,143,128,.28);
  border-radius: var(--r1); font-size: 14px; color: var(--error);
  margin-bottom: 20px;
}
.alert-error ul { padding-left: 18px; }

/* Privacy policy (rendered Markdown) */
.privacy-content { line-height: 1.75; }
.privacy-content > p:first-child { font-size: 14px; color: var(--text-3); margin-bottom: 28px; }
.privacy-content h2 {
  font-family: var(--display);
  font-size: 25px; font-weight: 700;
  margin-top: 44px; margin-bottom: 12px; color: var(--amber-hot);
  line-height: 1.25;
}
.privacy-content p  { margin-bottom: 16px; font-size: 16px; color: var(--text-2); }
.privacy-content ul { padding-left: 20px; margin-bottom: 16px; font-size: 16px; color: var(--text-2); }
.privacy-content li { margin-bottom: 6px; }
.privacy-content li::marker { color: var(--amber); }
.privacy-content a  { color: var(--link); text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.privacy-content strong { color: var(--text); }

/* 11. ERROR PAGES
   ─────────────────────────────────────────────────────── */
.error-page {
  min-height: min(calc(100dvh - 64px - 90px), 640px);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 60px var(--pad);
}
.error-code {
  font-family: var(--display);
  font-size: 96px; font-weight: 900;
  color: var(--accent-line); line-height: 1; margin-bottom: 16px;
}
.error-title { font-family: var(--display); font-size: 32px; font-weight: 700; color: var(--text); margin-bottom: 12px; }
.error-sub { font-size: 16px; color: var(--text-2); margin-bottom: 32px; }

/* 12. FOOTER
   ─────────────────────────────────────────────────────── */
footer { border-top: 1px solid var(--border); padding: 28px var(--pad); background: var(--panel-bottom); }
.footer-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.footer-brand {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--display); font-size: 17px; font-weight: 700; color: var(--text);
}
.footer-brand img { border-radius: 6px; }
.footer-copy { font-size: 13px; color: var(--text-3); }
.footer-links { display: flex; gap: 20px; list-style: none; }
.footer-links a { font-size: 13px; color: var(--text-2); transition: color .15s; }
.footer-links a:hover { color: var(--link); }

/* 13. SCROLL ANIMATION
   ─────────────────────────────────────────────────────── */
[data-animate] {
  opacity: 0; transform: translateY(22px);
  transition: opacity .55s ease, transform .55s ease;
}
[data-animate].is-visible { opacity: 1; transform: none; }
.phone:nth-child(2)[data-animate].is-visible { transform: translateY(-24px); }
[data-animate][data-delay="1"] { transition-delay: .08s; }
[data-animate][data-delay="2"] { transition-delay: .16s; }
[data-animate][data-delay="3"] { transition-delay: .24s; }
[data-animate][data-delay="4"] { transition-delay: .32s; }

/* 14. RESPONSIVE
   ─────────────────────────────────────────────────────── */
@media (max-width: 1060px) {
  .chapter-card { flex-basis: calc((100% - 18px) / 2); }
  .mode--daily { grid-template-columns: 300px 1fr; gap: 32px; }
}
@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center; justify-items: center;
    padding-top: 48px; min-height: auto; gap: 48px;
  }
  .hero-content { max-width: 640px; }
  .hero-sub     { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .steps { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }
  .mode--daily { grid-template-columns: 1fr; }
  .daily-card { max-width: 360px; width: 100%; margin: 0 auto; }
  .mode-pair { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 560px; }
}
@media (max-width: 600px) {
  body > header { gap: 8px; }
  .header-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg);
    flex-direction: column; align-items: stretch;
    padding: 8px 0 16px; gap: 0; z-index: 50;
    border-top: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(0,0,0,.5);
  }
  .header-nav.nav-open { display: flex; }
  .nav-toggle { display: flex; align-items: center; justify-content: center; }
  .nav-link { padding: 13px var(--pad); font-size: 16px; width: 100%; border-radius: 0; }
  .lang-dropdown { position: fixed; top: 64px; left: 16px; right: 16px; min-width: 0; }

  .hero-inner { padding-top: 36px; padding-bottom: 64px; gap: 40px; }
  .hero-sub { font-size: 16.5px; }
  .panel { padding: 14px; border-radius: 26px; box-shadow: 0 0 0 7px #0d0c0c, 0 20px 50px rgba(0,0,0,.6); }
  .screw { width: 9px; height: 9px; }
  .screw::after { top: 3.5px; }
  .screw--tl, .screw--tr { top: 5px; } .screw--bl, .screw--br { bottom: 5px; }
  .screw--tl, .screw--bl { left: 5px; } .screw--tr, .screw--br { right: 5px; }

  .stats-bar-inner { justify-content: flex-start; gap: 12px 24px; }
  .stat-item { width: calc(50% - 12px); }
  .stat-label { font-size: 13px; line-height: 1.35; }

  .how, .chapters, .shots, .modes, .pricing, .privacy-band, .download-cta { padding-top: 72px; padding-bottom: 72px; }
  .pricing { padding-top: 24px; }
  .chapter-card { flex-basis: 100%; }
  .step, .mode, .plan { padding: 26px 22px; }
  .shot-row { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; scroll-snap-type: x mandatory; padding: 28px 4px 8px; margin: 0 calc(-1 * var(--pad)); padding-left: var(--pad); padding-right: var(--pad); }
  .phone { flex: 0 0 220px; width: 220px; scroll-snap-align: center; }
  .phone:nth-child(2), .phone:nth-child(2)[data-animate].is-visible { transform: none; }
  .daily-time { font-size: 60px; }
  .support-card { padding: 24px 20px; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .footer-links { gap: 14px; flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-animate] { opacity: 1; transform: none; transition: none; }
  .phone:nth-child(2)[data-animate] { transform: translateY(-24px); }
  .chapter-card, .btn-primary, .appstore-badge { transition: none; }
}
@media (prefers-reduced-motion: reduce) and (max-width: 600px) {
  .phone:nth-child(2)[data-animate] { transform: none; }
}
