:root {
  --bg: #fbf5ec; --card: #ffffff; --ink: #1e1712; --muted: #7a6b5e; --line: #efe4d5; --soft: #f5ecdf;
  --green: #1f6b4f; --mint: #dcf3e7; --terra: #e2562f; --peach: #fde3d6; --sun: #f6a938; --butter: #fff1cf;
  --sea: #2f7fa6; --sky: #dceffa; --plum: #6b3fa0; --lilac: #ece2fa; --night: #14162b;
  --shadow: 0 1px 2px rgba(60, 40, 20, .06), 0 8px 24px rgba(60, 40, 20, .08);
  --round: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r: 22px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #110f17; --card: #1c1924; --ink: #f6f0e8; --muted: #a59bb0; --line: #2c2838; --soft: #24202e;
    --green: #5fd3a1; --mint: #173b2e; --terra: #ff8a65; --peach: #43231a; --sun: #ffc260; --butter: #3a2e14;
    --sea: #7cc4ea; --sky: #16283a; --plum: #b996ff; --lilac: #2a2140;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 var(--sans); }
body { padding-bottom: calc(84px + env(safe-area-inset-bottom)); overscroll-behavior-y: none; }
a { color: inherit; }
h1, h2, h3, .round { font-family: var(--round); letter-spacing: -.01em; margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
input { font: inherit; color: var(--ink); }
.muted { color: var(--muted); }
main { max-width: 560px; margin: 0 auto; }
.pad { padding: 0 16px; }
.section { margin: 22px 16px 0; }
.section > h3 { font-size: 1.05rem; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.page-title { padding: calc(18px + env(safe-area-inset-top)) 16px 4px; }
.page-title h1 { font-size: 2rem; }
.page-title p { margin: 4px 0 0; color: var(--muted); }

/* ---------- bottom nav ---------- */
.tabs { position: fixed; z-index: 20; left: 50%; transform: translateX(-50%); bottom: calc(10px + env(safe-area-inset-bottom));
  width: min(420px, calc(100% - 24px)); display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px;
  background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line); border-radius: 26px; box-shadow: var(--shadow); }
.tabs button { border: 0; background: none; border-radius: 20px; padding: 8px 2px 6px; display: grid; justify-items: center; gap: 1px;
  font: 700 .72rem var(--round); color: var(--muted); transition: background .2s, color .2s, transform .15s; }
.tabs button span { font-size: 1.35rem; line-height: 1.1; transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.tabs button.on { background: var(--ink); color: var(--bg); }
.tabs button.on span { transform: translateY(-1px) scale(1.12); }
.tabs button:active { transform: scale(.94); }

/* ---------- ride scene ---------- */
.scene { position: relative; height: 270px; overflow: hidden; border-radius: 0 0 34px 34px; color: #fff; }
.scene svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene stop { transition: stop-color 1.2s ease; }
.scene .sunmoon { transition: transform 1.2s ease; }
.scene .stars { transition: opacity 1.2s ease; }
.scene .glow { transition: fill 1.2s ease; }
.loop { animation: slide var(--speed, 30s) linear infinite; }
@keyframes slide { to { transform: translateX(-800px); } }
.sleepers { animation: sleep .5s linear infinite; }
@keyframes sleep { to { stroke-dashoffset: -28; } }
.train { animation: bob 1.1s ease-in-out infinite; transform-origin: center; }
@keyframes bob { 50% { transform: translateY(-1.2px); } }
.twinkle { animation: twinkle 3s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .25; } }
.scene.stopped .loop, .scene.stopped .sleepers, .scene.stopped .train { animation-play-state: paused; }
.scene-top { position: absolute; z-index: 2; left: 0; right: 0; top: 0; padding: calc(14px + env(safe-area-inset-top)) 16px 0;
  display: flex; justify-content: space-between; align-items: flex-start; text-shadow: 0 1px 8px rgba(0, 0, 0, .25); }
.scene-top .brand { font: 800 1.05rem var(--round); }
.scene-top .brand small { display: block; font: 600 .78rem var(--sans); opacity: .85; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; font: 700 .78rem var(--round);
  background: rgba(255, 255, 255, .22); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: #fff; border: 1px solid rgba(255, 255, 255, .3); text-shadow: none; }
.bars { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; }
.bars i { width: 3px; border-radius: 1px; background: currentColor; opacity: .3; }
.bars i:nth-child(1) { height: 4px; } .bars i:nth-child(2) { height: 7px; } .bars i:nth-child(3) { height: 10px; } .bars i:nth-child(4) { height: 12px; }
.bars i.on { opacity: 1; }

/* ---------- status card ---------- */
.status { position: relative; z-index: 3; margin: -22px 16px 0; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow);
  padding: 18px; border: 1px solid var(--line); }
.mode { display: inline-flex; align-items: center; gap: 6px; font: 800 .78rem var(--round); letter-spacing: .06em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px; }
.m-good { background: var(--mint); color: var(--green); }
.m-patchy { background: var(--butter); color: #a86a00; }
.m-dead { background: var(--peach); color: var(--terra); }
.m-pre { background: var(--sky); color: var(--sea); }
@media (prefers-color-scheme: dark) { .m-patchy { color: var(--sun); } }
.status h1 { font-size: 1.75rem; line-height: 1.1; margin: 10px 0 6px; }
.status p { margin: 0; color: var(--muted); }
.status .row { display: flex; gap: 14px; align-items: center; }
.ring { flex: none; position: relative; width: 74px; height: 74px; }
.ring svg { width: 74px; height: 74px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 7; stroke-linecap: round; }
.ring .track { stroke: var(--soft); }
.ring .val { transition: stroke-dashoffset .8s ease; }
.ring b { position: absolute; inset: 0; display: grid; place-content: center; font: 800 1rem/1 var(--round); text-align: center; }
.ring b small { display: block; font: 700 .62rem var(--sans); color: var(--muted); margin-top: 2px; }
.next-line { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); display: flex; align-items: center; gap: 10px; font-weight: 600; }
.next-line .ico { font-size: 1.3rem; }
.big-count { font: 800 2.6rem/1 var(--round); margin: 8px 0; letter-spacing: -.02em; }

/* ---------- route ---------- */
.route { position: relative; height: 58px; }
.route .bar { position: absolute; left: 0; right: 0; top: 14px; height: 12px; border-radius: 99px; overflow: hidden; display: flex; }
.route .bar span { height: 100%; }
.route .dot { position: absolute; top: 0; transform: translateX(-50%); font-size: 1.5rem; line-height: 1; transition: left .8s ease;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .25)); }
.route .labels { position: absolute; left: 0; right: 0; top: 34px; font: 700 .7rem var(--round); color: var(--muted); }
.route .labels span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.route .labels span:first-child { transform: none; } .route .labels span:last-child { transform: translateX(-100%); }
.legend { display: flex; gap: 14px; font: 600 .78rem var(--sans); color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* ---------- timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 22px; top: 10px; bottom: 10px; width: 2px; background: var(--line); }
.timeline li { position: relative; display: grid; grid-template-columns: 46px 1fr; gap: 10px; padding: 8px 0; }
.timeline .ico { position: relative; z-index: 1; width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center; font-size: 1.35rem;
  background: var(--card); border: 1px solid var(--line); }
.timeline li.past { opacity: .45; }
.timeline li.now .ico { background: var(--ink); border-color: var(--ink); box-shadow: 0 0 0 5px color-mix(in srgb, var(--terra) 30%, transparent); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--terra) 12%, transparent); } }
.timeline .t { font: 700 .76rem var(--round); color: var(--muted); display: flex; gap: 8px; align-items: center; }
.timeline b { font: 700 1rem var(--round); display: block; }
.timeline .d { font-size: .88rem; color: var(--muted); display: none; margin-top: 2px; }
.timeline li.open .d, .timeline li.now .d { display: block; }
.sig { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.s-good { background: var(--green); } .s-patchy { background: var(--sun); } .s-dead { background: var(--terra); }

/* ---------- generic cards & buttons ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); }
.btn { border: 0; border-radius: 16px; padding: 13px 18px; font: 800 1rem var(--round); background: var(--soft); color: var(--ink);
  transition: transform .12s, filter .2s; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn:active { transform: scale(.96); }
.btn.dark { background: var(--ink); color: var(--bg); }
.btn.go { background: var(--green); color: #fff; }
.btn.hot { background: var(--terra); color: #fff; }
.btn.block { width: 100%; }
.btn.small { padding: 8px 12px; font-size: .85rem; border-radius: 12px; }
.pillbtn { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 8px 14px; font: 700 .85rem var(--round); }
.pillbtn.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.field { width: 100%; padding: 14px 16px; border-radius: 16px; border: 2px solid var(--line); background: var(--soft); font: 700 1.05rem var(--round); outline: none; }
.field:focus { border-color: var(--ink); }
.hscroll { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 2px 16px 6px; margin: 0 -16px; scroll-snap-type: x mandatory; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; }
.settings { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- play tiles ---------- */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { position: relative; overflow: hidden; border: 0; text-align: left; border-radius: 24px; padding: 16px; min-height: 148px;
  display: flex; flex-direction: column; justify-content: space-between; color: #fff; box-shadow: var(--shadow); transition: transform .15s; }
.tile:active { transform: scale(.96); }
.tile .emo { font-size: 2.4rem; line-height: 1; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .2)); }
.tile b { font: 800 1.12rem/1.15 var(--round); display: block; }
.tile small { opacity: .88; font-weight: 600; font-size: .78rem; }
.tile.wide { grid-column: span 2; min-height: 120px; flex-direction: row; align-items: center; gap: 14px; justify-content: flex-start; }
.tile::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.g1 { background: linear-gradient(135deg, #1b1f3b, #5a2a6e); }
.g2 { background: linear-gradient(135deg, #8a1c1c, #e2562f); }
.g3 { background: linear-gradient(135deg, #6b3fa0, #c06bd6); }
.g4 { background: linear-gradient(135deg, #0f1430, #3b4a7a); }
.g5 { background: linear-gradient(135deg, #1f6b4f, #7cc576); }
.g6 { background: linear-gradient(135deg, #c77a00, #f6c14f); }
.badge-live { position: absolute; top: 12px; right: 12px; z-index: 1; font: 800 .65rem var(--round); background: rgba(255, 255, 255, .25); padding: 4px 8px; border-radius: 99px; letter-spacing: .05em; }

/* ---------- sheet ---------- */
.sheet-back { position: fixed; inset: 0; z-index: 40; background: rgba(10, 8, 15, .45); opacity: 0; pointer-events: none; transition: opacity .25s; }
.sheet-back.open { opacity: 1; pointer-events: auto; }
.sheet { position: fixed; z-index: 41; left: 0; right: 0; bottom: 0; max-height: 92vh; overflow-y: auto; background: var(--bg);
  border-radius: 30px 30px 0 0; transform: translateY(105%); transition: transform .35s cubic-bezier(.2, .9, .25, 1);
  padding: 10px 18px calc(24px + env(safe-area-inset-bottom)); max-width: 560px; margin: 0 auto; }
.sheet.open { transform: none; }
.sheet .grab { width: 44px; height: 5px; border-radius: 9px; background: var(--line); margin: 4px auto 10px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.sheet-head h2 { font-size: 1.6rem; display: flex; gap: 10px; align-items: center; }
.x { border: 0; background: var(--soft); width: 38px; height: 38px; border-radius: 50%; font-size: 1.1rem; }
.stack > * + * { margin-top: 12px; }

/* ---------- hold-to-reveal card ---------- */
.reveal { perspective: 900px; user-select: none; -webkit-user-select: none; touch-action: none; }
.reveal .inner { position: relative; height: 210px; transform-style: preserve-3d; transition: transform .45s cubic-bezier(.3, 1.3, .5, 1); }
.reveal.show .inner { transform: rotateY(180deg); }
.reveal .face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 24px;
  display: grid; place-items: center; text-align: center; padding: 18px; }
.reveal .front { background: repeating-linear-gradient(45deg, var(--ink), var(--ink) 12px, color-mix(in srgb, var(--ink) 88%, var(--terra)) 12px, color-mix(in srgb, var(--ink) 88%, var(--terra)) 24px);
  color: var(--bg); font: 800 1.1rem var(--round); }
.reveal .front span { font-size: 2.6rem; display: block; margin-bottom: 6px; }
.reveal .back { transform: rotateY(180deg); background: var(--card); border: 2px solid var(--ink); }
.reveal .back .huge { font: 900 2.4rem/1.05 var(--round); }
.reveal .back .emo { font-size: 2.8rem; }

/* ---------- tunnel ---------- */
.tunnel-btn { width: 210px; height: 210px; border-radius: 50%; border: 0; margin: 10px auto; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 40%, #3b4a7a, #0f1430 70%); color: #fff; font: 900 1.25rem/1.2 var(--round);
  box-shadow: 0 0 0 10px var(--soft), 0 18px 40px rgba(15, 20, 48, .4); transition: transform .15s; }
.tunnel-btn:active { transform: scale(.95); }
.tunnel-btn span { font-size: 3rem; display: block; }
.dark-mode { position: fixed; inset: 0; z-index: 60; background: #000; color: #fff; display: grid; place-items: center; text-align: center;
  padding: 30px; animation: fadein .6s ease; }
@keyframes fadein { from { opacity: 0; } }
.dark-mode .prompt { font: 900 2rem/1.2 var(--round); text-shadow: 0 0 24px rgba(255, 210, 120, .7); color: #ffe7b8; }
.dark-mode .timer { font: 800 3.4rem var(--round); margin: 26px 0; color: #fff; opacity: .9; font-variant-numeric: tabular-nums; }

/* ---------- bingo ---------- */
.bingo { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.bingo button { aspect-ratio: 1; border: 1px solid var(--line); border-radius: 14px; background: var(--card); padding: 3px;
  font: 700 .64rem/1.12 var(--round); transition: transform .2s cubic-bezier(.3, 1.6, .5, 1), background .2s; }
.bingo button.hit { background: var(--green); color: #fff; border-color: var(--green); transform: rotate(-3deg) scale(1.03); }
.bingo button.free { background: var(--sun); color: #3a2400; border-color: var(--sun); }

/* ---------- quiz ---------- */
.qcard { border-radius: 26px; padding: 22px; min-height: 230px; display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(135deg, #c77a00, #f6c14f); color: #2a1a00; }
.qcard .q { font: 800 1.45rem/1.2 var(--round); }
.qcard .a { font: 800 1.15rem var(--round); background: rgba(255, 255, 255, .6); border-radius: 16px; padding: 12px 14px; }
.dots { display: flex; gap: 5px; justify-content: center; margin-top: 12px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.dots i.on { background: var(--ink); width: 18px; border-radius: 9px; }

/* ---------- build ---------- */
.hero-card { border-radius: 28px; padding: 22px; color: #fff; background: linear-gradient(135deg, #1f6b4f, #2f7fa6); position: relative; overflow: hidden; box-shadow: var(--shadow); }
.hero-card.offline { background: linear-gradient(135deg, #5a2a6e, #e2562f); }
.hero-card h2 { font-size: 1.9rem; }
.hero-card .big-count { margin: 6px 0 2px; }
.hero-card::after { content: "🚂"; position: absolute; right: -8px; bottom: -14px; font-size: 6rem; opacity: .18; transform: rotate(-8deg); }
.tracks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.track { border: 2px solid var(--line); background: var(--card); border-radius: 20px; padding: 14px; text-align: left; transition: transform .15s, border-color .2s; }
.track .emo { font-size: 1.8rem; }
.track b { display: block; font: 800 .98rem/1.2 var(--round); margin-top: 6px; }
.track small { color: var(--muted); font-size: .78rem; }
.track.on { border-color: var(--ink); background: var(--soft); transform: scale(1.02); }
.perk { display: flex; align-items: center; gap: 14px; border-radius: 22px; padding: 16px; color: #fff; text-decoration: none; box-shadow: var(--shadow); transition: transform .15s; }
.perk:active { transform: scale(.97); }
.perk .emo { font-size: 2.2rem; width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: rgba(255, 255, 255, .2); flex: none; }
.perk b { font: 800 1.15rem var(--round); display: block; }
.perk small { opacity: .9; }
.perk .go { margin-left: auto; font: 800 1.3rem var(--round); }
.p-wispr { background: linear-gradient(135deg, #6b3fa0, #9d6bf0); }
.p-riffle { background: linear-gradient(135deg, #e2562f, #f6a938); }
.check { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px dashed var(--line); font-weight: 600; background: none; border-left: 0; border-right: 0; border-top: 0; width: 100%; text-align: left; }
.check:last-child { border-bottom: 0; }
.check .box { width: 28px; height: 28px; border-radius: 9px; border: 2px solid var(--line); display: grid; place-items: center; flex: none;
  transition: background .2s, transform .25s cubic-bezier(.3, 1.6, .5, 1); color: #fff; font-size: .9rem; }
.check.on .box { background: var(--green); border-color: var(--green); transform: scale(1.1); }
.check.on span { text-decoration: line-through; color: var(--muted); }

/* ---------- boarding pass ---------- */
.pass { border-radius: 28px; overflow: hidden; box-shadow: var(--shadow); background: var(--card); border: 1px solid var(--line); }
.pass .top { background: linear-gradient(135deg, #14162b, #3b2a5e 60%, #e2562f); color: #fff; padding: 20px; position: relative; }
.pass .top .route-big { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }
.pass .code { font: 900 2.4rem/1 var(--round); }
.pass .city { font-size: .78rem; opacity: .85; font-weight: 600; }
.pass .mid-ico { font-size: 1.6rem; flex: 1; text-align: center; position: relative; }
.pass .mid-ico::before { content: ""; position: absolute; left: 10%; right: 10%; top: 50%; border-top: 2px dashed rgba(255, 255, 255, .45); z-index: 0; }
.pass .mid-ico span { position: relative; z-index: 1; background: transparent; padding: 0 6px; }
.pass .name { width: 100%; background: transparent; border: 0; border-bottom: 2px dashed rgba(255, 255, 255, .35); color: #fff; font: 800 1.3rem var(--round); padding: 4px 0; outline: none; }
.pass .name::placeholder { color: rgba(255, 255, 255, .6); }
.pass .perf { height: 22px; position: relative; background: radial-gradient(circle at 0 50%, var(--bg) 11px, transparent 12px), radial-gradient(circle at 100% 50%, var(--bg) 11px, transparent 12px); }
.pass .perf::after { content: ""; position: absolute; left: 20px; right: 20px; top: 50%; border-top: 2px dashed var(--line); }
.pass .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 4px 20px 20px; }
.pass .grid small { display: block; color: var(--muted); font: 700 .68rem var(--round); text-transform: uppercase; letter-spacing: .06em; }
.pass .grid b { font: 800 1.15rem var(--round); }
.list-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-row .emo { font-size: 1.4rem; width: 30px; text-align: center; flex: none; }
.link-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px dashed var(--line); font-weight: 700; text-decoration: none; }
.link-row:last-child { border-bottom: 0; }

/* ---------- seat grid ---------- */
.seatmap { overflow-x: auto; padding: 6px 2px 10px; }
.seatgrid { display: grid; grid-auto-flow: column; grid-template-rows: repeat(3, 38px) 22px repeat(2, 38px); gap: 5px; width: max-content; }
.seatgrid button { width: 38px; height: 38px; border-radius: 11px; border: 0; background: var(--mint); color: var(--green); font: 800 .8rem var(--round); padding: 0; transition: transform .2s cubic-bezier(.3, 1.6, .5, 1); }
.seatgrid button.me { background: var(--terra); color: #fff; transform: scale(1.12); }
.seatgrid button:disabled { opacity: .25; }
.seatgrid .gap { width: 38px; }

/* ---------- misc ---------- */
.toast { position: fixed; z-index: 80; left: 50%; top: calc(14px + env(safe-area-inset-top)); transform: translate(-50%, -140%); background: var(--ink); color: var(--bg);
  padding: 11px 18px; border-radius: 999px; font: 800 .92rem var(--round); box-shadow: var(--shadow); transition: transform .35s cubic-bezier(.2, 1.2, .3, 1); max-width: calc(100% - 32px); text-align: center; }
.toast.show { transform: translate(-50%, 0); }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 90; }
.empty { text-align: center; padding: 22px 10px; }
.empty .emo { font-size: 2.6rem; }
.kills { display: flex; flex-wrap: wrap; gap: 6px; }
.kills span { background: var(--peach); color: var(--terra); border-radius: 99px; padding: 4px 10px; font: 800 .78rem var(--round); }
details.how { margin-top: 4px; } details.how summary { font: 700 .92rem var(--round); color: var(--muted); cursor: pointer; padding: 6px 0; }
details.how ol, details.how ul { margin: 6px 0 0; padding-left: 20px; color: var(--muted); font-size: .92rem; }
.preview-bar { margin: 14px 16px 0; padding: 12px 14px; border-radius: 18px; background: var(--lilac); }
.preview-bar input { width: 100%; accent-color: var(--plum); }
.preview-bar .row { display: flex; justify-content: space-between; align-items: center; font: 800 .9rem var(--round); color: var(--plum); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ================= Brand layer: Edge BlockTrain poster ================= */
@font-face { font-family: "Archivo Wide"; src: url("assets/archivo-black-wide.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }
:root {
  --orange: #ff6f37; --maroon: #4c1314; --yellow: #ffdb22; --cream: #fff8ee;
  --bg: #fdf4e8; --card: #fffdf9; --ink: #2b1112; --muted: #7d5f55; --line: #f0dfcc; --soft: #f8eadb;
  --terra: #ff6f37; --peach: #ffe2d4; --sun: #ffb627; --butter: #fff3c4; --green: #1d6b45; --mint: #dcf1e2;
  --display: "Archivo Wide", "Arial Black", system-ui, sans-serif;
  --round: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #160909; --card: #231112; --ink: #fff1e4; --muted: #c4a597; --line: #3d2020; --soft: #2e1617;
    --peach: #47201a; --butter: #3a2f0e; --mint: #12301f; --green: #5fd39a; --terra: #ff7d47;
  }
}
h1, h2, .big-count, .tile b, .pass .code, .qcard .q, .ring b, .display { font-family: var(--display); letter-spacing: 0; }
.page-title h1 { text-transform: uppercase; color: var(--orange); font-size: 2.1rem; line-height: 1; -webkit-text-stroke: 1px var(--maroon); paint-order: stroke fill; }
@media (prefers-color-scheme: dark) { .page-title h1 { -webkit-text-stroke: 0; } }
.status h1 { font-size: 1.32rem; line-height: 1.15; }
.sheet-head h2 { font-size: 1.25rem; text-transform: uppercase; }
.section > h3 { font-weight: 800; text-transform: uppercase; letter-spacing: .04em; font-size: .9rem; color: var(--muted); }
.mode { font-family: var(--round); font-weight: 800; }

/* brand pill: GOA ---> MUMBAI */
.brandpill { display: inline-flex; align-items: center; gap: 8px; background: var(--maroon); color: var(--orange); border-radius: 999px;
  padding: 6px 14px 6px 12px; font: 900 .8rem var(--display); text-transform: uppercase; box-shadow: 0 4px 14px rgba(0, 0, 0, .18); }
.brandpill .arrow { display: inline-block; width: 34px; height: 2px; border-top: 2px dashed var(--yellow); position: relative; }
.brandpill .arrow::after { content: "›"; position: absolute; right: -5px; top: -11px; color: var(--yellow); font: 900 1rem/1 var(--round); }
.brandpill .to { font-size: .55rem; color: var(--orange); }
.scene-top { text-shadow: none; }
.scene-top .brand { font: 900 1.75rem/0.92 var(--display); color: var(--orange); text-transform: uppercase; -webkit-text-stroke: 1.2px var(--maroon); paint-order: stroke fill;
  filter: drop-shadow(0 2px 0 rgba(76, 19, 20, .35)); }
.scene-top .brand .brandpill { margin-top: 8px; -webkit-text-stroke: 0; filter: none; }
.chip { background: rgba(76, 19, 20, .55); border-color: rgba(255, 219, 34, .35); }

/* buttons & nav */
.btn.dark { background: var(--maroon); color: var(--cream); }
.btn.hot { background: var(--orange); color: var(--maroon); }
.pillbtn.on { background: var(--maroon); color: var(--cream); border-color: var(--maroon); }
.tabs button.on { background: var(--maroon); color: var(--orange); }
@media (prefers-color-scheme: dark) { .tabs button.on { background: var(--orange); color: var(--maroon); } .pillbtn.on { background: var(--orange); color: var(--maroon); border-color: var(--orange); } }
.toast { background: var(--maroon); color: var(--cream); border: 1px solid rgba(255, 219, 34, .3); }
.field:focus { border-color: var(--orange); }
.timeline li.now .ico { background: var(--maroon); border-color: var(--maroon); box-shadow: 0 0 0 5px color-mix(in srgb, var(--orange) 35%, transparent); }
.dots i.on { background: var(--orange); }
.preview-bar { background: color-mix(in srgb, var(--yellow) 30%, var(--card)); }
.preview-bar .row { color: var(--maroon); }
.preview-bar input { accent-color: var(--orange); }
@media (prefers-color-scheme: dark) { .preview-bar .row { color: var(--yellow); } }

/* cards */
.hero-card { background: var(--maroon); }
.hero-card .big-count { color: var(--orange); }
.hero-card.offline { background: var(--orange); color: var(--maroon); }
.hero-card.offline .big-count { color: var(--maroon); }
.hero-card.offline .mode { background: rgba(76, 19, 20, .15) !important; color: var(--maroon) !important; }
.pass .top { background: var(--maroon); }
.pass .code { color: var(--orange); font-size: 2.1rem; }
.pass .mid-ico::before { border-top-color: var(--yellow); }
.reveal .front { background: repeating-linear-gradient(45deg, var(--maroon), var(--maroon) 14px, #5e1a1a 14px, #5e1a1a 28px); color: var(--orange); }
.reveal .front div { font-family: var(--display); text-transform: uppercase; }
.reveal .back { border-color: var(--orange); }
.qcard { background: var(--yellow); color: var(--maroon); }
.qcard .q { font-size: 1.2rem; line-height: 1.25; }

/* game tiles in poster colors */
.g1 { background: linear-gradient(135deg, #4c1314, #8a2a1c); }
.g2 { background: linear-gradient(135deg, #ff6f37, #ff9b4a); color: #4c1314; }
.g3 { background: linear-gradient(135deg, #1b5f86, #48a9d4); }
.g4 { background: linear-gradient(135deg, #0f1430, #36457a); }
.g5 { background: linear-gradient(135deg, #1d6b45, #6dbb5e); }
.g6 { background: linear-gradient(135deg, #ffdb22, #ffb627); color: #4c1314; }
.tile b { font-size: .98rem; text-transform: uppercase; line-height: 1.15; }
.tile.wide b { font-size: 1.15rem; }

/* partner logos */
.partners { background: var(--cream); border-radius: var(--r); border: 1px solid var(--line); padding: 16px; display: flex; align-items: center; justify-content: space-around; gap: 14px; flex-wrap: wrap; }
.partners img { height: 34px; width: auto; display: block; }
.partners img.devfolio { height: 24px; }
.partners-label { text-align: center; font: 800 .68rem var(--round); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }

/* quiz, host mode, announcements */
.qround { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.card.qround { padding: 14px 16px; }
.qa { display: grid; gap: 6px; }
.qa button { text-align: left; border: 2px solid var(--line); background: var(--soft); border-radius: 14px; padding: 11px 12px; font: 600 .95rem var(--round); color: var(--ink); }
.qa button b { color: var(--orange); margin-right: 6px; }
.qa button:disabled { cursor: default; opacity: .75; }
.qa button.picked { border-color: var(--maroon); background: var(--peach); opacity: 1; }
.qa button.right { border-color: var(--green); background: var(--mint); color: var(--green); opacity: 1; }
.qa button.wrong { border-color: var(--terra); background: var(--peach); color: var(--terra); opacity: 1; }
@media (prefers-color-scheme: dark) { .qa button.picked { border-color: var(--orange); } }
.hcode { font: 800 .95rem ui-monospace, Menlo, monospace; background: var(--maroon); color: var(--yellow); padding: 4px 9px; border-radius: 8px; white-space: nowrap; }
ol.hq { margin: 8px 0 0; padding-left: 20px; font-size: .9rem; }
ol.hq li { margin-bottom: 6px; }
.announce { position: sticky; top: 0; z-index: 30; display: flex; gap: 10px; align-items: center; justify-content: space-between;
  background: var(--yellow); color: var(--maroon); font: 800 .95rem var(--round); padding: calc(10px + env(safe-area-inset-top)) 16px 10px; }
.announce button { border: 0; background: rgba(76, 19, 20, .12); border-radius: 50%; width: 30px; height: 30px; flex: none; }
textarea.field { resize: vertical; font-weight: 600; }
/* toasts sit at the top and never catch taps, so the tab bar and buttons stay usable */
.toast { pointer-events: none; }
.seatro .seatgrid button:disabled { opacity: 1; cursor: default; }
.seatro .seatgrid button:not(.me) { opacity: .45; }
.linkbtn { border: 0; background: none; padding: 0; color: var(--orange); font: inherit; font-weight: 700; text-decoration: underline; }
details.howto { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 4px 14px; margin: 0 0 14px; }
details.howto summary { color: var(--ink); }
details.howto ol { padding-left: 18px; } details.howto li { margin-bottom: 6px; } details.howto p { font-size: .92rem; }

/* seat map: who sits where */
.mapbtn { width: 100%; text-align: left; display: flex; gap: 12px; align-items: center; }
.mapbtn .go { margin-left: auto; font: 800 1.4rem var(--round); color: var(--muted); }
.coachpick, .maphits { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.coachpick .pillbtn.on { background: var(--ink); color: var(--bg); }
.coachpick small { opacity: .7; }
.smap { display: grid; grid-template-columns: repeat(3, 1fr) 10px repeat(2, 1fr); gap: 4px; }
.smap .sm { min-height: 44px; border-radius: 9px; border: 1.5px dashed var(--line); padding: 3px 4px; font: 700 .68rem/1.15 var(--round); color: var(--muted);
  overflow-wrap: anywhere; hyphens: auto; overflow: hidden; min-width: 0; }
.smap .sm b { display: block; font-size: .64rem; opacity: .7; }
.smap .sm.on { background: var(--mint); color: var(--green); border: 0; }
.smap .sm.org { background: var(--butter); color: var(--ink); border: 0; }
.smap .sm.me { background: var(--terra); color: #fff; border: 0; }
.smap .sm.hl { outline: 3px solid var(--ink); outline-offset: 1px; }
.key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: -1px; margin-left: 4px; }
.key.on { background: var(--mint); outline: 1px solid var(--green); } .key.org { background: var(--butter); outline: 1px solid var(--sun); } .key.me { background: var(--terra); }
