/* Road to VI — sunset-over-Vice-City look. No external fonts or assets. */
:root {
  --night: #140a24; --panel: #1f1235; --panel2: #2a1947; --line: #3a2660;
  --text: #f6efff; --muted: #b3a3cf;
  --pink: #ff4f9a; --teal: #2fe0c8; --amber: #ffc857; --orange: #ff8a5c;
  --good: #3ddc97; --bad: #ff6b6b;
  --display: "Avenir Next Condensed", "Roboto Condensed", "sans-serif-condensed", Impact, "Arial Narrow", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --radius: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--night); color: var(--text); font: 16px/1.5 var(--body); }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
.muted { color: var(--muted); }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; text-align: center;
  background: linear-gradient(180deg, #1a0b2e 0%, #3b1260 38%, #8a1f6b 66%, #e2466f 88%, #ff8a5c 100%);
  padding: calc(28px + env(safe-area-inset-top, 0px)) 16px 34px; }
.sun { position: absolute; left: 50%; bottom: -150px; width: 420px; height: 420px; transform: translateX(-50%);
  border-radius: 50%; background: linear-gradient(180deg, #ffe08a 0%, #ffb35c 35%, #ff4f9a 100%); opacity: .55;
  -webkit-mask-image: repeating-linear-gradient(180deg, #000 0 18px, transparent 18px 26px);
          mask-image: repeating-linear-gradient(180deg, #000 0 18px, transparent 18px 26px); }
.hero-inner { position: relative; max-width: 720px; margin: 0 auto; }
.eyebrow { font: 600 12.5px/1 var(--body); letter-spacing: .22em; text-transform: uppercase; color: var(--amber); }
h1 { font: italic 900 clamp(54px, 15vw, 104px)/.92 var(--display); text-transform: uppercase; letter-spacing: -.01em;
  margin: 10px 0 8px; text-shadow: 4px 4px 0 var(--pink), 8px 8px 0 rgba(20, 10, 36, .55); }
.launch { display: inline-block; font-weight: 600; padding: 3px 12px; border-radius: 999px; background: rgba(20, 10, 36, .55); }
.countdown { display: flex; justify-content: center; gap: 8px; margin: 18px 0 20px; flex-wrap: wrap; }
.countdown .unit { min-width: 72px; padding: 10px 6px 8px; border-radius: 12px; background: rgba(20, 10, 36, .72);
  border: 1px solid rgba(255, 255, 255, .14); }
.countdown b { display: block; font: 800 34px/1 var(--display); font-variant-numeric: tabular-nums; }
.countdown span { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.countdown.out { font: italic 900 34px/1.1 var(--display); text-transform: uppercase; }
.cta, .btn { display: inline-block; cursor: pointer; border: 0; border-radius: 999px; padding: 13px 26px;
  background: var(--amber); color: #2a1500; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  text-decoration: none; box-shadow: 0 6px 0 rgba(20, 10, 36, .5); }
.cta:active, .btn:active { transform: translateY(2px); box-shadow: 0 4px 0 rgba(20, 10, 36, .5); }
.btn.small { padding: 9px 18px; font-size: 14px; box-shadow: none; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); box-shadow: none; }
.btn[disabled] { opacity: .5; cursor: default; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }

/* ---------- layout ---------- */
main { max-width: 760px; margin: 0 auto; padding: 8px 16px 32px; }
section { margin-top: 30px; scroll-margin-top: 12px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap;
  margin-bottom: 12px; }
h2 { font: italic 800 28px/1 var(--display); text-transform: uppercase; letter-spacing: .01em; }
.legend { display: flex; gap: 12px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.legend span { white-space: nowrap; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; }
.sw.trivia, .seg.trivia { background: var(--pink); }
.sw.games, .seg.games { background: var(--teal); }
.sw.checkins, .seg.checkins { background: var(--amber); }
.link { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; padding: 4px; }

/* ---------- leaderboard ---------- */
.board { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.row { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.row.me { border-color: var(--amber); }
.row-top { display: flex; align-items: center; gap: 12px; }
.avatar { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  font: 900 20px/1 var(--display); background: var(--panel2); border: 2px solid var(--line); }
.row.first .avatar { border-color: var(--amber); color: var(--amber); }
.who { flex: 1; min-width: 0; }
.who .name { font: 800 21px/1.1 var(--display); text-transform: uppercase; letter-spacing: .02em; }
.who .rank { font-size: 13px; color: var(--muted); }
.pct { font: 800 30px/1 var(--display); font-variant-numeric: tabular-nums; }
.pct small { font-size: 16px; color: var(--muted); }
.bar { display: flex; height: 14px; margin-top: 10px; border-radius: 999px; overflow: hidden; background: #120821;
  box-shadow: inset 0 0 0 1px var(--line); }
.seg { height: 100%; width: 0; transition: width .7s cubic-bezier(.2, .8, .2, 1); }
.seg + .seg { box-shadow: -2px 0 0 #120821; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { font-size: 12px; padding: 2px 9px; border-radius: 999px; background: var(--panel2); color: var(--muted); }
.chip.on { color: var(--good); }

/* ---------- panel ---------- */
.panel { display: grid; gap: 12px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card h3 { font: 800 20px/1.1 var(--display); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 4px; }
.card .sub { color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.names { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.names button { cursor: pointer; padding: 14px 10px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--panel2); font: 800 19px/1 var(--display); text-transform: uppercase; }
.names button:hover { border-color: var(--amber); }
.names small { display: block; margin-top: 5px; font: 400 11.5px/1 var(--body); color: var(--muted); text-transform: none; }
.pinform { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pinform input { width: 150px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: #120821; font-size: 20px; letter-spacing: .3em; text-align: center; }
.msg { margin-top: 10px; font-size: 14px; }
.msg.bad { color: var(--bad); } .msg.good { color: var(--good); }

/* trivia */
.qmeta { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.tag { color: var(--teal); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 12px; }
.question { font-size: 19px; font-weight: 650; line-height: 1.35; margin-bottom: 12px; }
.options { display: grid; gap: 8px; }
.options button { cursor: pointer; text-align: left; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--panel2); }
.options button:hover:not([disabled]) { border-color: var(--amber); }
.options button[disabled] { cursor: default; opacity: .75; }
.options button.right { border-color: var(--good); background: rgba(61, 220, 151, .16); opacity: 1; }
.options button.wrong { border-color: var(--bad); background: rgba(255, 107, 107, .14); opacity: 1; }
.fact { margin: 12px 0; padding: 10px 12px; border-left: 3px solid var(--amber); background: #120821;
  border-radius: 0 10px 10px 0; font-size: 14.5px; }
.fact b.ok { color: var(--good); } .fact b.no { color: var(--bad); }
.dots { display: flex; gap: 5px; margin-bottom: 12px; }
.dot { flex: 1; height: 5px; border-radius: 3px; background: var(--line); }
.dot.right { background: var(--good); } .dot.wrong { background: var(--bad); } .dot.now { background: var(--amber); }
.score { font: 800 40px/1 var(--display); margin: 4px 0; }

/* check-in + games */
.checkin-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
select { padding: 11px 12px; border-radius: 12px; border: 1px solid var(--line); background: #120821; max-width: 100%; }
.gamelist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.gamelist label { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line); background: var(--panel2); }
.gamelist input { width: 20px; height: 20px; accent-color: var(--teal); flex: none; }
.gamelist .gname { flex: 1; min-width: 0; }
.gamelist .gyear { color: var(--muted); font-size: 13px; }
.gamelist .gpts { font: 800 16px/1 var(--display); color: var(--teal); white-space: nowrap; }

/* feed + how */
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.feed li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; border-radius: 10px;
  background: var(--panel); font-size: 14.5px; }
.feed b { font-weight: 700; }
.feed time { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.how ul { margin: 0; padding-left: 20px; color: var(--muted); font-size: 14.5px; display: grid; gap: 4px; }
.how b { color: var(--text); }
footer { text-align: center; color: var(--muted); font-size: 12px; padding: 18px 16px calc(24px + env(safe-area-inset-bottom, 0px)); }

@media (max-width: 420px) {
  .countdown .unit { min-width: 64px; } .countdown b { font-size: 28px; }
  .pct { font-size: 26px; } h2 { font-size: 25px; }
}
@media (prefers-reduced-motion: reduce) { .seg { transition: none; } html { scroll-behavior: auto; } }
