:root {
  --bg: #0B0B0F;
  --panel: #16161D;
  --line: #26262F;
  --text: #F4F4F6;
  --muted: #9A9AA6;
  --mil: #E8B931;
  --genz: #8B5CF6;
  --display: "Anton", Impact, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font-family: "Inter", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
main { max-width: 720px; margin: 0 auto; padding: 0 16px 64px; }

.top { display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0;
  background: rgba(11,11,15,.92); backdrop-filter: blur(8px); z-index: 5; }
.brand { font-family: var(--display); letter-spacing: .06em; font-size: 20px; }
.week { font-family: var(--mono); font-size: 12px; color: var(--muted); }

.hero { text-align: center; padding: 36px 0 20px; }
.kicker { font-size: 12px; letter-spacing: .2em; color: var(--muted); margin: 0 0 10px; }
h1 { font-family: var(--display); font-weight: 400; font-size: clamp(34px, 8vw, 60px);
  line-height: 1.02; margin: 0 0 18px; text-transform: uppercase; }
.clock { font-family: var(--mono); color: var(--muted); font-size: 14px; }
.clock b { color: var(--text); font-size: 20px; margin-left: 6px; }
.overtime { color: #FF5A5A; font-weight: 800; font-size: 14px; }

html, body { overflow-x: clip; }
.sub { color: var(--muted); margin: -6px 0 16px; font-size: 15px; }
.sub b { color: var(--text); }

/* breaking-news ticker */
.ticker { background: #FF3B3B; color: #000; overflow: hidden; white-space: nowrap;
  font: 800 13px "Inter", sans-serif; letter-spacing: .04em; padding: 7px 0; }
.ticker-track { display: inline-block; padding-left: 16px; animation: tick 45s linear infinite; }
@keyframes tick { to { transform: translateX(-50%); } }

/* scoreboard: tug of war */
.board { background: var(--panel); border: 1px solid var(--line); border-radius: 18px;
  padding: 18px 18px 16px; margin-top: 12px; }
.tug-cols { display: grid; gap: 12px; }
.tug-team { min-width: 0; }
.tug-team.right { text-align: right; }
.tug-team .name { font-family: var(--display); font-size: clamp(20px, 5.5vw, 28px); letter-spacing: .03em;
  color: var(--c); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tug-team.right .name { justify-content: flex-end; }
.tug-team .amt { font-family: var(--mono); font-size: clamp(34px, 11vw, 64px); line-height: 1.05; margin: 4px 0; }
.tug-team.leader .amt { color: var(--c); }
.tug-team .meta { color: var(--muted); font-size: 12px; }
.tug-bar { display: flex; height: 18px; border-radius: 999px; overflow: hidden; margin-top: 16px; gap: 3px; background: var(--bg); }
.tug-bar .seg { flex-basis: 0; transition: flex-grow .9s cubic-bezier(.2,.8,.2,1); }
.badge { font-size: 10px; font-weight: 800; letter-spacing: .1em; background: var(--c); color: #000;
  padding: 3px 7px; border-radius: 6px; font-family: "Inter"; }

/* lead change flash */
.flash { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; pointer-events: none;
  background: color-mix(in srgb, var(--c) 92%, #000); }
.flash[hidden] { display: none; }
.flash div { font-family: var(--display); color: #000; font-size: clamp(44px, 12vw, 120px); text-align: center;
  line-height: .95; padding: 0 16px; }
.flash.go { animation: flash 2.2s ease forwards; }
@keyframes flash { 0% { opacity: 0; transform: scale(1.2); } 12% { opacity: 1; transform: scale(1); }
  80% { opacity: 1; } 100% { opacity: 0; } }
.bump { animation: bump .6s ease; }
@keyframes bump { 30% { transform: scale(1.06); } }

.gap { text-align: center; color: var(--muted); font-size: 15px; min-height: 22px; margin: 14px 0 4px; }
.gap b { color: var(--text); }

.vote { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0 28px;
  position: sticky; bottom: 0; z-index: 4; padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 70%, transparent); }
.vote button:disabled { opacity: .4; cursor: not-allowed; }
.vote button, .cta { font: 800 16px "Inter", sans-serif; border: 0; border-radius: 12px;
  padding: 16px 12px; cursor: pointer; color: #000; background: var(--c, #fff); }
.vote button small { display: block; font-weight: 600; font-size: 12px; opacity: .75; margin-top: 2px; }
.vote button:active, .cta:active { transform: translateY(1px); }

.tops { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.top-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.top-card .lbl { font-size: 11px; letter-spacing: .14em; color: var(--muted); }
.top-card .who { font-weight: 800; margin-top: 6px; word-break: break-word; }
.top-card .how { font-family: var(--mono); color: var(--c); }

h2 { font-family: var(--display); font-weight: 400; letter-spacing: .05em; font-size: 26px; margin: 36px 0 12px; }
.wall-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.wall-list li { background: var(--panel); border-left: 3px solid var(--c); border-radius: 10px;
  padding: 10px 14px; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; }
.wall-list .n { font-weight: 800; word-break: break-word; }
.wall-list .a { font-family: var(--mono); color: var(--c); }
.wall-list .m { grid-column: 1 / -1; color: var(--muted); font-size: 14px; word-break: break-word; }
.wall-empty { color: var(--muted); }

.faq p { color: #CFCFD6; line-height: 1.5; }
.fine { color: var(--muted) !important; font-size: 12px; }

/* dialogs */
dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 18px;
  padding: 22px; width: min(420px, calc(100% - 32px)); }
dialog::backdrop { background: rgba(0,0,0,.7); }
dialog h3 { font-family: var(--display); font-weight: 400; font-size: 28px; margin: 0 0 14px; color: var(--c, #fff); }
.packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.packs button { background: transparent; color: var(--text); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 4px; font: 700 15px var(--mono); cursor: pointer; }
.packs button small { display: block; font: 600 11px "Inter"; color: var(--muted); }
.packs button.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 18%, transparent); }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
input { display: block; width: 100%; margin-top: 4px; padding: 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); font: 16px "Inter"; }
.cta { width: 100%; margin-top: 6px; }
.ghost { width: 100%; margin-top: 8px; background: transparent; color: var(--muted); border: 0; padding: 10px; cursor: pointer; font: 600 14px "Inter"; }
.err { color: #FF6B6B; font-size: 13px; min-height: 16px; margin: 4px 0; }
.thanks-body { text-align: center; }
#card { width: 100%; max-width: 240px; height: auto; border-radius: 12px; margin: 8px auto 12px; display: block; }

@media (prefers-reduced-motion: reduce) {
  .bump, .flash.go { animation: none; } .tug-bar .seg { transition: none; }
  .ticker-track { animation: none; padding-left: 16px; }
}

/* week result + season */
.result { font-family: var(--display); font-size: clamp(22px, 6vw, 32px); color: var(--c); margin: 14px 0 0; }
.wins { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.win-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; align-items: baseline; gap: 10px; }
.win-card b { font-family: var(--mono); font-size: 34px; color: var(--c); }
.win-card span { font-size: 12px; letter-spacing: .12em; color: var(--muted); font-weight: 800; }
.weeks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.weeks li { background: var(--panel); border-left: 3px solid var(--c); border-radius: 10px; padding: 10px 14px; display: grid; gap: 2px; }
.weeks .wk { font-size: 11px; letter-spacing: .14em; color: var(--c); font-weight: 800; }
.weeks .q { font-weight: 800; }
.weeks .sc { font-family: var(--mono); font-size: 13px; color: var(--muted); }

.custom { display: flex; align-items: center; gap: 10px; margin: -4px 0 14px; }
.custom input { width: 110px; text-align: center; font-weight: 800; }

/* legal pages */
.legal { padding-top: 24px; line-height: 1.6; color: #D8D8DE; }
.legal h1 { font-family: var(--display); font-weight: 400; font-size: 40px; color: var(--text); margin: 8px 0 4px; letter-spacing: .5px; }
.legal h2 { font-size: 17px; color: var(--text); margin: 28px 0 6px; }
.legal ul { padding-left: 20px; } .legal li { margin: 6px 0; }
.legal .muted { color: var(--muted); font-size: 13px; }
.legal a { color: var(--mil); }
.legal .links { margin-top: 36px; font-size: 14px; }

/* captains */
.recruit { text-align: center; font: 800 13px "Inter"; letter-spacing: .04em; padding: 8px 12px;
  background: color-mix(in srgb, var(--c) 22%, var(--bg)); color: var(--text); border-bottom: 1px solid var(--c); }
.captains { margin-top: 28px; }
.captains h2 { font-family: var(--display); font-weight: 400; font-size: 28px; margin: 0 0 4px; }
.cap-sub, .cap-note { color: var(--muted); font-size: 13px; margin: 0 0 12px; line-height: 1.5; }
.cap-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cap-col { background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--c); border-radius: 14px; padding: 10px 12px; min-width: 0; }
.cap-team { font-family: var(--display); font-size: 20px; color: var(--c); margin-bottom: 6px; }
.cap-col ol { list-style: none; margin: 0; padding: 0; }
.cap-col li { display: flex; align-items: center; gap: 6px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 14px; min-width: 0; }
.cap-col li:first-child { border-top: 0; }
.cap-col .r { width: 18px; color: var(--muted); font-family: var(--mono); font-size: 12px; flex: none; }
.cap-col .h { font-weight: 800; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cap-col .gen { font: 800 9px "Inter"; letter-spacing: .1em; background: var(--c); color: #000; padding: 2px 5px; border-radius: 4px; flex: none; }
.cap-col .v { margin-left: auto; font-family: var(--mono); color: var(--c); flex: none; }
.cap-empty { color: var(--muted); font-size: 13px; padding: 6px 0; }
.cap-apply { width: 100%; margin-top: 10px; padding: 12px; border-radius: 12px; border: 1px dashed var(--line);
  background: transparent; color: var(--text); font: 800 14px "Inter"; cursor: pointer; }
.for-cap { font-size: 13px; color: var(--c, var(--text)); margin: -4px 0 10px; font-weight: 700; }
select { display: block; width: 100%; margin-top: 4px; padding: 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); font: inherit; }
@media (max-width: 420px) { .cap-cols { grid-template-columns: 1fr; } }
