/* GTASidekick. System fonts only (see ASSETS.md). */
:root {
  --ink: #130f22;
  --ink-2: #19132c;
  --surface: #211b33;
  --surface-2: #2b2443;
  --line: rgba(255, 243, 230, 0.1);
  --line-2: rgba(255, 243, 230, 0.18);
  --text: #fff3e6;
  --muted: #c1b6cc;
  --pink: #ff66b3;
  --coral: #ff956e;
  --lilac: #c2a6ff;
  --teal: #53ddd0;
  --gold: #ffcb8f;
  --warn-bg: rgba(255, 203, 143, 0.14);
  --display: "Avenir Next Condensed", "Bahnschrift", "Roboto Condensed", "Arial Narrow", "Helvetica Neue", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 22px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.32, 0.5, 1);
  --nav-h: 0px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 400 16px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
h1, h2, h3, h4, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--teal); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 8px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 16px;
  background: var(--teal); color: var(--ink); font-weight: 700; border-radius: 10px; text-decoration: none;
}
.skip:focus { top: 12px; }

.display {
  font-family: var(--display);
  font-stretch: condensed;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  line-height: 0.92;
  text-wrap: balance;
}
.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold);
}

/* ---------- Top bar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(16px, 3vw, 36px);
  transition: background-color 220ms ease, box-shadow 220ms ease;
}
.topbar.is-solid { background: var(--ink); box-shadow: 0 1px 0 var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; min-height: 44px; }
.brand-mark { width: 34px; height: 34px; }
.wordmark { font-family: var(--display); font-stretch: condensed; font-weight: 800; font-size: 24px; letter-spacing: 0.01em; }
.wordmark span {
  background: linear-gradient(90deg, var(--gold), var(--pink));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.badge {
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gold); background: rgba(19, 15, 34, 0.6); border: 1px solid rgba(255, 203, 143, 0.35);
  padding: 7px 11px; border-radius: 999px; white-space: nowrap;
}

.tablist { position: relative; display: flex; gap: 4px; padding: 5px; border-radius: 999px; background: rgba(19, 15, 34, 0.72); border: 1px solid var(--line-2); }
/* Sliding highlight, positioned by app.js. The selected tab keeps its own fill until it is ready. */
.tablist::before {
  content: ""; position: absolute; left: 0; top: 0; z-index: 0; pointer-events: none;
  width: var(--ink-w, 0px); height: var(--ink-h, 0px); transform: translate(var(--ink-x, 0px), var(--ink-y, 0px));
  border-radius: 999px; background: linear-gradient(100deg, var(--coral), var(--pink));
  box-shadow: 0 8px 26px -8px rgba(255, 102, 179, 0.8); opacity: 0;
}
.tablist.has-ink::before { opacity: 1; }
.tablist.ink-ready::before { transition: transform 360ms var(--spring), width 360ms var(--spring), height 360ms var(--ease); }
.tablist.has-ink .tab[aria-selected="true"] { background: transparent; }
.tab {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border: 0; border-radius: 999px; background: transparent; color: var(--muted);
  font-weight: 650; font-size: 15px; cursor: pointer; white-space: nowrap;
  transition: background-color 180ms ease, color 180ms ease, transform 120ms ease;
}
.tab { position: relative; z-index: 1; }
.tab svg { width: 18px; height: 18px; flex: none; transition: transform 360ms var(--spring); }
.tab[aria-selected="true"] svg { transform: scale(1.12) rotate(-6deg); }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { background: linear-gradient(100deg, var(--coral), var(--pink)); color: var(--ink); }
.tab:active { transform: scale(0.96); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: clamp(620px, 86vh, 860px);
  display: flex; align-items: center;
  /* Fallback sky if scripts do not run. */
  background: linear-gradient(180deg, #1c1238 0%, #47296b 22%, #9c4590 40%, #ff6c8f 52%, #ff9a6c 60%, #ffcb8f 64%, #3a2050 64.5%, #1a1027 80%, var(--ink) 100%);
}
.hero-art { position: absolute; inset: 0; z-index: -1; animation: art-in 1800ms var(--ease) both; }
.plane { position: absolute; inset: -5% -4%; will-change: transform; }
.plane svg { width: 100%; height: 100%; }
.hero-light {
  position: absolute; inset: 0 -60%; z-index: 2; pointer-events: none;
  background: linear-gradient(100deg, transparent 34%, rgba(255, 206, 160, 0.16) 46%, rgba(255, 120, 170, 0.1) 53%, transparent 66%);
  mix-blend-mode: screen;
  animation: light-pass 26s ease-in-out infinite alternate;
}
/* Film grain jitters in place, stepped so it reads as grain rather than movement. */
.hero-grain {
  position: absolute; inset: -8%; z-index: 3; pointer-events: none;
  background: url("../assets/grain.svg") repeat; background-size: 220px 220px;
  opacity: 0.2; mix-blend-mode: overlay; animation: grain 900ms steps(1, end) infinite;
}
.hero-scrim {
  position: absolute; inset: 0; z-index: 4; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(19, 15, 34, 0.88) 0%, rgba(19, 15, 34, 0.66) 34%, rgba(19, 15, 34, 0.2) 60%, rgba(19, 15, 34, 0) 74%),
    linear-gradient(180deg, rgba(19, 15, 34, 0.5) 0%, rgba(19, 15, 34, 0) 16%, rgba(19, 15, 34, 0) 78%, var(--ink) 100%);
}
.p-clouds svg { animation: drift 90s ease-in-out infinite alternate; }
.p-sun svg { animation: sunset 70s ease-in-out infinite alternate; }
.p-shimmer svg { animation: shimmer 6.5s ease-in-out infinite alternate; transform-origin: 68% 70%; }
/* Loops below touch only opacity on the plane, or transform on an inner element:
   the plane transform belongs to the parallax. */
.p-tw-a { animation: twinkle 5.2s ease-in-out infinite alternate; }
.p-tw-b { animation: twinkle 7.4s ease-in-out -3.1s infinite alternate; }
.p-neon { animation: neon-breathe 3.8s ease-in-out infinite alternate; }
.p-glow { animation: breathe 11s ease-in-out infinite alternate; }
.p-shimmer { animation: glint 2.6s ease-in-out infinite alternate; }
.p-shimmer-b { animation: glint 2.6s ease-in-out infinite alternate-reverse; }
.p-fog svg { animation: fog-drift 46s ease-in-out infinite alternate; }
.p-birds svg { animation: flock 68s linear infinite; }
.plane .track { position: absolute; inset: 0; width: 200%; display: flex; will-change: transform; }
.plane .track svg { width: 50%; height: 100%; flex: none; }
.track-l { animation: lane-l 40s linear infinite; }
.track-r { animation: lane-r 31s linear infinite; }

.hero-inner {
  position: relative; z-index: 5;
  width: min(1240px, 100%); margin: 0 auto;
  padding: 120px clamp(20px, 4vw, 48px) 72px;
}
.hero h1 { font-size: clamp(64px, 9.2vw, 136px); margin: 18px 0 22px; text-shadow: 0 2px 30px rgba(19, 15, 34, 0.35); }
.hero h1 > .line { display: block; }
.hot {
  background: linear-gradient(95deg, var(--gold) 0%, var(--coral) 35%, var(--pink) 75%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: none; filter: drop-shadow(0 2px 16px rgba(19, 15, 34, 0.5));
}
/* Staggered word entrance. Each gradient word carries its own slice of the line gradient,
   because background-clip: text does not reach transformed children. */
.hero h1 .w { display: inline-block; animation: word-in 1100ms var(--ease) both; }
.hero h1 .line.hot { background: none; filter: none; color: inherit; }
.hero h1 .hot .w {
  background: linear-gradient(95deg, var(--gold) 0%, var(--coral) 40%, var(--pink) 85%); background-size: 240% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 16px rgba(19, 15, 34, 0.5));
}
.hero h1 .hot .w3 { background-position: 0% 0; }
.hero h1 .hot .w4 { background-position: 100% 0; }
.w1 { animation-delay: 120ms; } .w2 { animation-delay: 210ms; } .w3 { animation-delay: 360ms; } .w4 { animation-delay: 450ms; }
.lede { max-width: 33ch; font-size: clamp(17px, 1.5vw, 20px); color: #f3e6ee; }
.hero-search {
  display: flex; align-items: center; gap: 8px; margin-top: 28px; max-width: 560px;
  padding: 6px 6px 6px 16px; border-radius: 999px;
  background: rgba(255, 243, 230, 0.96); color: var(--ink);
  box-shadow: 0 18px 50px rgba(19, 15, 34, 0.45);
  transition: box-shadow 180ms ease;
}
.hero-search:focus-within { box-shadow: 0 0 0 3px rgba(83, 221, 208, 0.75), 0 18px 50px rgba(19, 15, 34, 0.45); }
.hero-search svg { width: 20px; height: 20px; flex: none; color: #5a4a6e; }
.hero-search input[type="search"] {
  flex: 1; min-width: 0; min-height: 48px; padding: 0 4px; border: 0; border-radius: 0; background: transparent; color: var(--ink); font-size: 17px; outline: none; box-shadow: none;
}
.hero-search input::placeholder { color: #6e6180; }
.hero-note { margin-top: 14px; font-size: 13px; color: #ddd3e4; }
/* Eyebrows that sit on artwork get a backplate, so contrast holds over bright water and sky. */
.hero .eyebrow, .banner .eyebrow {
  display: inline-block; padding: 6px 12px 5px; border-radius: 999px;
  background: rgba(19, 15, 34, 0.66); box-shadow: 0 0 0 1px rgba(255, 203, 143, 0.18);
}

.motion-toggle {
  position: absolute; z-index: 6; right: clamp(16px, 3vw, 36px); bottom: 26px;
  width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--line-2); background: rgba(19, 15, 34, 0.55); color: var(--text); cursor: pointer;
}
.motion-toggle svg { width: 18px; height: 18px; fill: currentColor; }
.motion-toggle .i-play { display: none; }
.motion-toggle[aria-pressed="true"] .i-play { display: block; }
.motion-toggle[aria-pressed="true"] .i-pause { display: none; }
.art-credit {
  position: absolute; z-index: 6; right: calc(clamp(16px, 3vw, 36px) + 56px); bottom: 36px;
  font-size: 11px; letter-spacing: 0.06em; color: rgba(255, 243, 230, 0.82);
  padding: 4px 10px; border-radius: 999px; background: rgba(19, 15, 34, 0.5);
}

/* Entrance: CSS only, so content stays visible if scripts fail. */
.rise { animation: rise 760ms var(--ease) both; }
.r1 { animation-delay: 60ms; } .r2 { animation-delay: 140ms; } .r3 { animation-delay: 230ms; }
.r4 { animation-delay: 560ms; } .r5 { animation-delay: 680ms; }

/* Motion off: paused by the person, offscreen or hidden tab. */
/* Loops live on descendants; the one-time fade-in on .hero-art itself must never be frozen at 0. */
.motion-off .hero-art * { animation-play-state: paused !important; }
.user-paused .banner-art *, .banner-art.is-off * { animation-play-state: paused !important; }

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes light-pass { from { transform: translateX(-18%); } to { transform: translateX(18%); } }
@keyframes drift { to { transform: translateX(-2.2%); } }
@keyframes sunset { to { transform: translateY(1.4%); } }
@keyframes shimmer { from { transform: scaleX(0.985) translateX(-0.3%); opacity: 0.82; } to { transform: scaleX(1.015) translateX(0.3%); opacity: 1; } }
@keyframes panel-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes panel-fwd { from { opacity: 0; transform: translateX(32px); } to { opacity: 1; transform: none; } }
@keyframes panel-back { from { opacity: 0; transform: translateX(-32px); } to { opacity: 1; transform: none; } }
@keyframes word-in { from { opacity: 0; transform: translateY(0.5em) rotate(3deg) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes art-in { from { opacity: 0; transform: scale(1.06); } to { opacity: 1; transform: none; } }
@keyframes twinkle { from { opacity: 1; } to { opacity: 0.16; } }
@keyframes neon-breathe { from { opacity: 1; } to { opacity: 0.5; } }
@keyframes breathe { from { opacity: 1; } to { opacity: 0.66; } }
@keyframes glint { from { opacity: 1; } to { opacity: 0.22; } }
@keyframes fog-drift { from { transform: translateX(-3%); } to { transform: translateX(3%); } }
@keyframes flock {
  0% { transform: translate3d(16%, 3%, 0); opacity: 0; }
  8% { opacity: 1; } 86% { opacity: 1; }
  100% { transform: translate3d(-44%, -5%, 0); opacity: 0; }
}
@keyframes lane-l { to { transform: translateX(-50%); } }
@keyframes lane-r { from { transform: translateX(-50%); } to { transform: none; } }
@keyframes grain {
  0% { transform: translate(0, 0); } 17% { transform: translate(-3%, 2%); } 33% { transform: translate(2%, -3%); }
  50% { transform: translate(-2%, -1%); } 67% { transform: translate(3%, 3%); } 83% { transform: translate(-1%, 3%); } 100% { transform: translate(1%, -2%); }
}
@keyframes sweep { from { transform: rotate(-24deg); } to { transform: rotate(24deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bulbs { from { opacity: 1; } to { opacity: 0.25; } }
@keyframes burst {
  0% { opacity: 0; transform: scale(0.25); } 14% { opacity: 1; }
  62% { opacity: 0.8; transform: scale(1); } 100% { opacity: 0; transform: scale(1.06) translateY(5%); }
}
@keyframes deal { from { opacity: 0.35; transform: perspective(1000px) rotateY(-14deg) translateX(22px) scale(0.95); } to { opacity: 1; } }

/* ---------- Tools ---------- */
.tools {
  position: relative; max-width: 1240px; margin: 0 auto; overflow-x: clip;
  padding: 40px clamp(16px, 4vw, 48px) 96px; outline: none; scroll-margin-top: 0;
}
.panel { outline: none; border-radius: 28px; }
.panel:focus-visible { outline: 3px solid var(--teal); outline-offset: 8px; }
.panel:not([hidden]) { animation: panel-in 220ms var(--ease); }
[data-dir="fwd"] .panel:not([hidden]) { animation: panel-fwd 280ms var(--ease); }
[data-dir="back"] .panel:not([hidden]) { animation: panel-back 280ms var(--ease); }
.panel > * + *, .fun-stage > * + * { margin-top: 20px; }
.panel-head .sub { color: var(--muted); max-width: 54ch; font-size: 17px; margin-top: 18px; }

/* Art-directed section headers: one city, three moments of the evening. */
.banner {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: flex-end; min-height: clamp(230px, 24vw, 310px);
  padding: clamp(20px, 3vw, 34px); border-radius: 28px;
  background: linear-gradient(180deg, #2c2257 0%, #b65592 56%, #1a1027 64%, #0b0817 100%);
  box-shadow: 0 34px 70px -42px rgba(255, 102, 179, 0.6), 0 0 0 1px var(--line);
}
.banner-fun { background: linear-gradient(180deg, #47296b 0%, #ff8a86 56%, #3a2050 64%, #130c21 100%); }
.banner-play { background: linear-gradient(180deg, #100c27 0%, #6b3c86 58%, #120b20 64%, #0b0817 100%); }
.banner-art { position: absolute; inset: 0; z-index: -2; transition: transform 1800ms var(--ease); }
.banner-art > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.banner::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(19, 15, 34, 0) 28%, rgba(19, 15, 34, 0.5) 60%, rgba(19, 15, 34, 0.94) 100%),
    linear-gradient(90deg, rgba(19, 15, 34, 0.5) 0%, rgba(19, 15, 34, 0) 58%);
}
.banner-copy { position: relative; max-width: 100%; }
.banner h2 { font-size: clamp(40px, 4.6vw, 66px); margin-top: 10px; text-shadow: 0 2px 26px rgba(19, 15, 34, 0.65); }
.banner .banner-toggle { top: 14px; right: 14px; bottom: auto; background: rgba(19, 15, 34, 0.6); }
.beam { transform-box: fill-box; transform-origin: 50% 100%; animation: sweep 12s ease-in-out infinite alternate; }
.beam-1 { animation-duration: 13s; animation-delay: -4s; }
.beam-2 { animation-duration: 10s; animation-delay: -7s; animation-direction: alternate-reverse; }
.beam-3 { animation-duration: 15s; animation-delay: -2s; }
.wheel { transform-box: fill-box; transform-origin: center; animation: spin 90s linear infinite; }
.bulbs-a { animation: bulbs 1.8s ease-in-out infinite alternate; }
.bulbs-b { animation: bulbs 1.8s ease-in-out infinite alternate-reverse; }
.burst { transform-box: fill-box; transform-origin: center; animation: burst 6.6s cubic-bezier(0.1, 0.6, 0.3, 1) infinite; }
.burst-2 { animation-delay: -2.2s; }
.burst-3 { animation-delay: -4.4s; }

/* Scroll reveal. Only active once app.js adds .reveal-on, so content never depends on it. */
.reveal-on [data-reveal] { transition: opacity 800ms var(--ease), transform 800ms var(--ease); }
.reveal-on [data-reveal]:not(.is-in) { opacity: 0; transform: translateY(28px); }
.reveal-on .d2 { transition-delay: 110ms; }
.reveal-on .d3 { transition-delay: 220ms; }
.reveal-on .banner:not(.is-in) .banner-art { transform: scale(1.1); }

.card {
  background: linear-gradient(180deg, rgba(43, 36, 67, 0.75), rgba(33, 27, 51, 0.9));
  border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 2.4vw, 26px);
  box-shadow: 0 24px 60px -44px rgba(0, 0, 0, 0.9);
}
.card, .reveal-on .card[data-reveal] { transition: opacity 800ms var(--ease), transform 800ms var(--ease), border-color 220ms ease, box-shadow 220ms ease; }
/* Forms get a quiet teal edge while in use instead of moving around. */
.card:focus-within { border-color: rgba(83, 221, 208, 0.38); box-shadow: 0 0 0 1px rgba(83, 221, 208, 0.16), 0 26px 60px -40px rgba(83, 221, 208, 0.45); }
.field-label { display: block; font-size: 13px; font-weight: 650; color: var(--muted); margin: 18px 0 8px; letter-spacing: 0.02em; }
.card > .field-label:first-child, .card > div > .field-label:first-child { margin-top: 0; }
.opt { font-weight: 400; color: #9d92ab; }
.hint { font-size: 13px; color: var(--muted); margin-top: 8px; }
.fine { font-size: 12px; color: #a99fb8; margin-top: 12px; }
.status { font-size: 14px; color: var(--teal); min-height: 1.4em; margin-top: 10px; }
.status.is-warn { color: var(--gold); }

input[type="text"], input[type="search"], input[type="url"], textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 14px;
  border: 1px solid var(--line-2); background: rgba(19, 15, 34, 0.7); color: var(--text);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
textarea { resize: vertical; line-height: 1.45; }
input:focus, textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(83, 221, 208, 0.22); }
input::placeholder, textarea::placeholder { color: #8f84a0; }
input[type="file"] { width: 100%; font-size: 14px; color: var(--muted); }
input[type="file"]::file-selector-button {
  min-height: 44px; margin-right: 12px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--surface-2); color: var(--text); font-weight: 650; cursor: pointer;
}
.search-field { position: relative; }
.search-field svg { position: absolute; left: 14px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--muted); }
.search-field input { padding-left: 44px; font-size: 17px; }

.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text);
  font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap;
  transition: transform 160ms var(--ease), background-color 160ms ease, filter 160ms ease, box-shadow 200ms ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: #352d50; transform: translateY(-1px); }
.btn:active { transform: scale(0.95); filter: brightness(0.9); transition-duration: 60ms; }
.btn-primary { border: 0; background: linear-gradient(100deg, var(--coral), var(--pink)); color: var(--ink); box-shadow: 0 10px 28px -12px rgba(255, 102, 179, 0.85); }
.btn-primary:hover { background: linear-gradient(100deg, #ffa585, #ff7dbf); box-shadow: 0 14px 34px -12px rgba(255, 102, 179, 1); }
.btn-ghost { background: transparent; }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: 14px; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.card .actions { margin-top: 16px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.04em; white-space: nowrap; flex: none;
  background: rgba(194, 166, 255, 0.14); color: #e2d6ff;
}
.chip-sm { padding: 3px 8px; font-size: 11px; vertical-align: middle; }
.chip-warn { background: var(--warn-bg); color: var(--gold); }
.chip-teal { background: rgba(83, 221, 208, 0.14); color: #9ff1e8; }
.chip-ok { background: rgba(83, 221, 208, 0.16); color: #9ff1e8; }
.chip-bad { background: rgba(255, 102, 179, 0.16); color: #ffb3d9; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.row-between h4 { font-size: 18px; }

/* Segmented radio groups: native radios, large targets. */
.seg { border: 0; padding: 0; margin: 0; min-width: 0; }
.seg + .seg { margin-top: 18px; }
.seg legend { font-size: 13px; font-weight: 650; color: var(--muted); margin-bottom: 8px; padding: 0; }
.seg-row { display: flex; flex-wrap: wrap; gap: 8px; }
.seg label { position: relative; flex: 1 1 auto; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span {
  display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 16px; border-radius: 14px;
  border: 1px solid var(--line-2); background: rgba(19, 15, 34, 0.55); color: var(--text); font-weight: 650; text-align: center;
  transition: background-color 160ms ease, color 160ms ease, transform 120ms ease;
}
.seg input:checked + span { background: linear-gradient(100deg, var(--coral), var(--pink)); color: var(--ink); border-color: transparent; }
.seg input:focus-visible + span { outline: 3px solid var(--teal); outline-offset: 2px; }
.seg label:active span { transform: scale(0.97); }
.seg-sm span { min-height: 44px; font-size: 14px; padding: 0 12px; }

.help-controls { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-top: 18px; }
.switch { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; position: relative; }
.switch input { position: absolute; opacity: 0; width: 44px; height: 26px; margin: 0; cursor: pointer; }
.switch-track { width: 46px; height: 28px; border-radius: 999px; background: #3a3256; position: relative; transition: background-color 180ms ease; flex: none; }
.switch-track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--text); transition: transform 180ms var(--ease);
}
.switch input:checked + .switch-track { background: var(--pink); }
.switch input:checked + .switch-track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-track { outline: 3px solid var(--teal); outline-offset: 3px; }
.switch-text { font-weight: 650; font-size: 15px; }
.platform-note { margin-top: 14px; padding: 10px 14px; border-radius: 12px; background: var(--warn-bg); color: var(--gold); font-size: 13px; }

.answers { margin-top: 10px; }
.answer { border-top: 1px solid var(--line); }
.answer summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  min-height: 56px; padding: 12px 10px; margin: 0 -10px; border-radius: 14px; font-weight: 650; font-size: 16px;
  transition: background-color 160ms ease, transform 120ms ease;
}
.answer summary:hover { background: rgba(255, 243, 230, 0.05); }
.answer summary:active { transform: scale(0.99); }
.answer[open] summary { color: var(--gold); }
.answer summary::-webkit-details-marker { display: none; }
.answer summary::after {
  content: ""; width: 10px; height: 10px; flex: none; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); transition: transform 180ms ease; margin-right: 6px;
}
.answer[open] summary::after { transform: rotate(-135deg); border-color: var(--gold); }
.answer[open] .answer-body { animation: panel-in 260ms var(--ease); }
.answer-body { padding: 0 2px 16px; }
.answer-body p { color: #e9dfe9; }
.answer-body .chip-row + p { margin-top: 10px; }
.empty-title { font-weight: 700; }
.answer-spoiler { margin-top: 10px; padding: 10px 12px; border-left: 3px solid var(--pink); background: rgba(255, 102, 179, 0.08); border-radius: 0 10px 10px 0; font-size: 14px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 12px; color: #a99fb8; }
.meta b { color: var(--muted); font-weight: 650; }
.empty { padding: 18px; border-radius: 16px; border: 1px dashed var(--line-2); margin-top: 10px; }
.empty p + p { margin-top: 8px; }
.suggest { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.note { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; border-radius: var(--radius); background: linear-gradient(120deg, rgba(83, 221, 208, 0.1), rgba(194, 166, 255, 0.05)); border: 1px solid rgba(83, 221, 208, 0.2); }
.note p { color: var(--muted); font-size: 14px; }
.note strong { color: var(--text); }

/* Challenge card */
.challenge {
  position: relative; overflow: hidden; border-radius: 28px; padding: clamp(24px, 3vw, 36px);
  min-height: 300px; color: var(--ink);
  background: linear-gradient(140deg, #ffd3a1 0%, #ff9f86 38%, #ff73b0 78%, #d58ff0 100%);
  box-shadow: 0 30px 60px -30px rgba(255, 102, 179, 0.55);
}
/* Signature: the card leans toward the pointer and is dealt in on every new pick. */
.challenge, .reveal-on .challenge.is-in {
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 380ms var(--ease), box-shadow 300ms ease, opacity 800ms var(--ease);
}
.challenge:hover { box-shadow: 0 44px 80px -34px rgba(255, 102, 179, 0.8); }
.challenge.is-dealt { animation: deal 600ms var(--ease); }
.challenge::after {
  content: ""; position: absolute; right: -40px; bottom: -70px; width: 260px; height: 130px; pointer-events: none;
  border-radius: 260px 260px 0 0; opacity: 0.3;
  background: repeating-linear-gradient(180deg, rgba(255, 246, 226, 0.95) 0 9px, transparent 9px 15px);
}
.challenge-glow {
  position: absolute; right: -80px; top: -80px; width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 246, 226, 0.75), rgba(255, 246, 226, 0) 70%);
  pointer-events: none; transform: translate(var(--gx, 0px), var(--gy, 0px)); transition: transform 500ms var(--ease);
}
.challenge-body { position: relative; transition: opacity 140ms ease, transform 140ms ease; }
.challenge-body.is-swapping { opacity: 0; transform: translateY(6px); }
.challenge .chip { background: rgba(19, 15, 34, 0.86); color: var(--text); }
.challenge .chip-warn { background: var(--ink); color: var(--gold); }
.challenge h3 { font-size: clamp(40px, 5vw, 64px); margin: 22px 0 14px; overflow-wrap: anywhere; }
.challenge p { max-width: 44ch; font-size: 18px; color: #2a1630; }
.challenge .fine { color: #4b2a45; font-size: 13px; margin-top: 18px; }

.mini-title { font-size: 15px; font-weight: 750; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.saved { margin-top: 28px; }
.saved-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.saved-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 10px 10px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line);
}
.saved-list li { transition: border-color 200ms ease, transform 200ms var(--ease); }
.saved-list strong { display: block; }
.saved-list small { color: var(--muted); }

/* Play Along */
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.steps li {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px;
  background: linear-gradient(160deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); font-weight: 650; font-size: 14px;
  transition: border-color 200ms ease, transform 200ms var(--ease);
}
.steps span {
  display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 50%;
  background: var(--teal); color: var(--ink); font-weight: 800; box-shadow: 0 0 0 4px rgba(83, 221, 208, 0.16);
  transition: transform 520ms var(--spring);
}
.steps li:nth-child(2) span { background: var(--lilac); box-shadow: 0 0 0 4px rgba(194, 166, 255, 0.18); transition-delay: 140ms; }
.steps li:nth-child(3) span { background: var(--coral); box-shadow: 0 0 0 4px rgba(255, 149, 110, 0.18); transition-delay: 280ms; }
.reveal-on .steps:not(.is-in) span { transform: scale(0); }
.current { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.current .field-label { margin: 0 0 4px; }
.current-title { font-family: var(--display); font-stretch: condensed; font-weight: 800; font-size: 26px; text-transform: uppercase; line-height: 1; overflow-wrap: anywhere; }
.play-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.profile-view { display: flex; gap: 14px; align-items: center; padding-bottom: 6px; }
.profile-alias { font-weight: 800; font-size: 20px; overflow-wrap: anywhere; }
.profile-bio { font-size: 14px; color: #e9dfe9; margin-top: 4px; overflow-wrap: anywhere; }
.profile-bio:empty { display: none; }
.avatar { display: block; width: 44px; height: 44px; border-radius: 50%; overflow: hidden; flex: none; }
.avatar svg { width: 100%; height: 100%; }
.avatar-lg { width: 60px; height: 60px; }
.avatars { border: 0; padding: 0; margin: 0; min-width: 0; }
.avatars legend { padding: 0; }
.avatar-row { display: flex; flex-wrap: wrap; gap: 8px; }
.avatar-row label { position: relative; cursor: pointer; }
.avatar-row input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.avatar-row .avatar { width: 48px; height: 48px; box-shadow: 0 0 0 2px transparent; transition: box-shadow 160ms ease, transform 120ms ease; }
.avatar-row input:checked + .avatar { box-shadow: 0 0 0 3px var(--ink), 0 0 0 5px var(--pink); }
.avatar-row input:focus-visible + .avatar { box-shadow: 0 0 0 3px var(--ink), 0 0 0 5px var(--teal); }
.avatar-row label:active .avatar { transform: scale(0.93); }

.share-frame {
  width: min(100%, 300px); margin: 0 auto; aspect-ratio: 9 / 16; border-radius: 22px; overflow: hidden;
  background: var(--ink-2); box-shadow: 0 30px 60px -26px rgba(255, 102, 179, 0.45), 0 0 0 1px var(--line);
  transform: rotate(-1.5deg); transition: transform 420ms var(--spring);
}
.share-frame:hover { transform: rotate(0deg) scale(1.02); }
.share-frame canvas { width: 100%; height: 100%; }
.share .actions { justify-content: center; }
.share .status, .share .fine { text-align: center; }
.review-head { margin-top: 36px; }
.review-head .hint { max-width: 62ch; }
#clip-form .btn { margin-top: 12px; }
.queue { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.queue li { padding: 12px 14px; border-radius: 14px; background: rgba(19, 15, 34, 0.6); border: 1px solid var(--line); }
.queue .url { display: block; font-size: 13px; color: #e9dfe9; overflow-wrap: anywhere; margin: 6px 0 8px; }
.queue .actions { gap: 8px; }
.image-preview { margin-top: 14px; }
.image-preview:empty { display: none; }
.image-preview img { width: 100%; max-height: 240px; object-fit: contain; border-radius: 14px; background: var(--ink-2); }

/* Desktop: the tools use the full width. Help gets a side column, Find Something Fun puts
   controls and saves beside the card. [hidden] must win, so layouts only apply to the open panel. */
@media (min-width: 1081px) {
  #panel-help:not([hidden]), #panel-fun:not([hidden]) { display: grid; gap: 24px 32px; align-items: start; }
  #panel-help > *, #panel-fun > * { margin-top: 0; }
  #panel-help .panel-head, #panel-fun .panel-head { grid-column: 1 / -1; }
  #panel-help { grid-template-columns: minmax(0, 1fr) 320px; }
  #panel-help .note { position: sticky; top: 104px; flex-direction: column; }
  #panel-fun { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-rows: auto auto 1fr; }
  #panel-fun > .card { grid-column: 1; grid-row: 2; }
  #panel-fun .fun-stage { grid-column: 2; grid-row: 2 / 4; }
  #panel-fun .saved { grid-column: 1; grid-row: 3; }
  #panel-fun .actions .btn { flex: 1 1 auto; }
}

/* Lower page: night panorama, house rules, closing sunset */
.rules { position: relative; background: linear-gradient(180deg, var(--ink), #1a1230); }
.rules-art { position: relative; isolation: isolate; height: clamp(240px, 28vw, 400px); overflow: hidden; }
.rules-art .banner-art { z-index: 0; transition: none; }
.rules-art::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, var(--ink) 0%, rgba(19, 15, 34, 0) 26%, rgba(19, 15, 34, 0) 55%, var(--ink) 100%);
}
.rules-inner { position: relative; max-width: 1240px; margin: -64px auto 0; padding: 0 clamp(16px, 4vw, 48px) 88px; display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 2fr); gap: 40px; }
.rules h2 { font-size: clamp(48px, 5.4vw, 80px); margin-top: 10px; }
.neon-line {
  display: block; width: 150px; height: 4px; margin-top: 18px; border-radius: 4px;
  background: linear-gradient(90deg, var(--gold), var(--coral), var(--pink), var(--lilac));
  box-shadow: 0 0 18px rgba(255, 102, 179, 0.7); transform-origin: left center;
  transition: transform 1200ms var(--ease) 250ms;
}
.reveal-on .rules-head:not(.is-in) .neon-line { transform: scaleX(0); }
.rules-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.rules-list li {
  display: grid; grid-template-columns: 72px 1fr; gap: 16px; padding: 22px 22px 22px 18px; border-radius: 22px;
  border: 1px solid transparent; background: linear-gradient(100deg, rgba(43, 36, 67, 0.55), rgba(43, 36, 67, 0) 85%);
}
.reveal-on .rules-list li { transition: opacity 800ms var(--ease), transform 800ms var(--ease), border-color 200ms ease; }
.rules-list .num {
  font-family: var(--display); font-stretch: condensed; font-weight: 800; font-size: 46px; line-height: 0.9;
  background: linear-gradient(180deg, var(--gold), var(--coral) 55%, var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.rules-list h3 { font-size: 21px; margin-bottom: 6px; }
.rules-list p { color: var(--muted); max-width: 56ch; }
@media (hover: hover) {
  .rules-list li:hover { border-color: var(--line-2); }
  .steps li:hover, .saved-list li:hover { border-color: var(--line-2); transform: translateY(-2px); }
}

.outro {
  position: relative; overflow: hidden; isolation: isolate; text-align: center;
  padding: clamp(84px, 10vw, 140px) clamp(16px, 4vw, 48px) clamp(120px, 13vw, 190px);
  background: linear-gradient(180deg, #1a1230 0%, #2a1740 52%, #4a2050 100%);
}
.outro::before {
  content: ""; position: absolute; z-index: -2; left: 50%; bottom: -30%; width: 1400px; height: 900px; margin-left: -700px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 140, 150, 0.4), rgba(255, 102, 179, 0.14) 55%, rgba(255, 102, 179, 0) 100%);
}
.outro-sun {
  position: absolute; z-index: -1; left: 0; right: 0; bottom: 0; margin: 0 auto;
  width: min(680px, 96vw); aspect-ratio: 2 / 1; border-radius: 680px 680px 0 0;
  left: 50%; right: auto; margin: 0 0 0 calc(min(680px, 96vw) / -2);
  background: linear-gradient(180deg, #ffd8a2 0%, #ff956e 42%, #ff66b3 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 0 52%, transparent 52% 56%, #000 56% 66%, transparent 66% 71%, #000 71% 79%, transparent 79% 86%, #000 86% 91%, transparent 91%);
  mask-image: linear-gradient(180deg, #000 0 52%, transparent 52% 56%, #000 56% 66%, transparent 66% 71%, #000 71% 79%, transparent 79% 86%, #000 86% 91%, transparent 91%);
  opacity: 0.62;
}
/* The closing sun rises into place when the section arrives. */
.reveal-on .outro-sun { transition: transform 1800ms var(--ease), opacity 1800ms var(--ease); }
.reveal-on .outro-sun:not(.is-in) { opacity: 0; transform: translateY(30%); }
.outro-inner { position: relative; max-width: 900px; margin: 0 auto; }
.outro h2 { font-size: clamp(44px, 6.4vw, 92px); text-shadow: 0 4px 40px rgba(19, 15, 34, 0.6); }
.outro h2 .hot { display: inline-block; }
.outro-actions { justify-content: center; margin-top: 30px; }
.footer {
  border-top: 1px solid var(--line);
  max-width: 1240px; margin: 0 auto; padding: 28px clamp(16px, 4vw, 48px) calc(36px + var(--nav-h));
  display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; font-size: 13px; color: #a99fb8;
}
.disclaimer { max-width: 84ch; }
.disclaimer p + p { margin-top: 8px; }
.disclaimer strong { color: var(--text); }
.built { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; color: var(--muted); font-size: 12px; white-space: nowrap; text-decoration: underline; text-underline-offset: 3px; }
.built:hover { color: var(--text); }

/* 404: same closing sunset, no scripts needed. */
.notfound { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding-top: 140px; }
.notfound h1 { font-size: clamp(52px, 8vw, 110px); text-shadow: 0 4px 40px rgba(19, 15, 34, 0.6); }
.notfound h1 .hot { display: inline-block; }
.notfound .lede { margin: 22px auto 0; }
.notfound .actions { justify-content: center; margin-top: 30px; }

/* ---------- Tablet ---------- */
@media (max-width: 1080px) {
  .tab { padding: 0 14px; }
}
@media (max-width: 860px) {
  .badge { display: none; }
  .play-grid { grid-template-columns: minmax(0, 1fr); }
  .rules-inner { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .footer { flex-direction: column; gap: 8px; }
}

/* ---------- Phone: vertical art, bottom tab bar ---------- */
@media (max-width: 720px) {
  :root { --nav-h: calc(66px + env(safe-area-inset-bottom)); }
  html { scroll-padding-top: 16px; scroll-padding-bottom: var(--nav-h); }
  .topbar { position: absolute; padding: 10px 16px; }
  .topbar.is-solid { background: transparent; box-shadow: none; }
  .badge { display: inline-block; font-size: 10px; padding: 6px 9px; }
  .wordmark { font-size: 22px; }
  .tabs {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: rgba(19, 15, 34, 0.97); border-top: 1px solid var(--line-2);
  }
  .tablist { border: 0; background: none; padding: 0; gap: 4px; border-radius: 0; }
  .tab { flex: 1; flex-direction: column; gap: 3px; min-height: 54px; padding: 4px 6px; border-radius: 14px; font-size: 12px; }
  .tablist::before { border-radius: 14px; }
  .tab .long { display: none; }
  .tab svg { width: 20px; height: 20px; }

  .hero { min-height: max(560px, calc(100svh - var(--nav-h))); align-items: flex-end; }
  .hero-scrim {
    background: linear-gradient(180deg, rgba(19, 15, 34, 0.45) 0%, rgba(19, 15, 34, 0) 18%, rgba(19, 15, 34, 0) 40%, rgba(19, 15, 34, 0.72) 64%, var(--ink) 100%);
  }
  .hero-inner { padding: 96px 20px 34px; }
  .hero h1 { font-size: clamp(48px, 13.5vw, 72px); margin: 12px 0 14px; }
  .lede { font-size: 16px; }
  .hero-search { margin-top: 20px; padding-left: 14px; }
  .hero-search .btn { padding: 0 16px; }
  .motion-toggle { top: 64px; bottom: auto; right: 16px; }
  .art-credit { top: 76px; bottom: auto; left: 16px; right: auto; font-size: 10px; }
  .tools { scroll-margin-top: 0; }
  .credit-extra { display: none; }

  .tools { padding-top: 28px; }
  .panel-head h2 { font-size: clamp(38px, 11vw, 52px); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .help-controls { flex-direction: column; align-items: stretch; }
  .challenge { min-height: 0; }
  .actions .btn { flex: 1 1 auto; }
  .rules-list li { grid-template-columns: 52px 1fr; gap: 12px; padding: 18px 16px 18px 12px; }
  .rules-list .num { font-size: 38px; }
  .rules-inner { margin-top: -48px; padding-bottom: 60px; }
  .banner { min-height: 236px; border-radius: 24px; padding: 20px; }
  .banner h2 { font-size: clamp(36px, 10.4vw, 48px); }
  .outro-actions { flex-direction: column; align-items: stretch; max-width: 360px; margin-left: auto; margin-right: auto; }
}
@media (max-width: 380px) {
  .hero h1 { font-size: 48px; }
  .badge { display: none; }
  .seg span { padding: 0 10px; }
  .hero-search { gap: 4px; padding-left: 12px; }
  .hero-search input[type="search"] { font-size: 16px; }
  .hero-search .btn { padding: 0 14px; }
}

/* ---------- Reduced motion: static art, no parallax, no loops ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; animation-delay: 0ms !important;
    transition-duration: 0.01ms !important; scroll-behavior: auto !important;
  }
  .hero-light { display: none; }
  .motion-toggle { display: none; }
  .challenge { transform: none !important; }
}
