/* Flood War — DonutSMP-themed dark UI.
   Signature: the DonutSMP donut blue (#00b4ff) on a deep near-black ground,
   playful rounded display type (Fredoka), sprinkle accents. Factions read as
   water-blue (Flooders) vs warm-red (Drainers). 8px spacing rhythm. */

:root {
  --paper: #0d1015;      /* deep near-black page */
  --paper-2: #12161d;    /* slightly lifted band */
  --surface: #171d27;    /* cards */
  --surface-2: #1e2632;  /* raised surface */
  --ink: #eef4fb;        /* near-white primary text */
  --ink-hover: #ffffff;
  --ink-2: #a6b3c4;      /* secondary text */
  --ink-3: #6f7a8b;      /* tertiary / labels */
  --line: #242d3a;       /* hairline */
  --line-2: #1a212b;
  --line-ink: #33404f;   /* stronger hairline */

  --brand: #00b4ff;      /* DonutSMP donut blue */
  --brand-2: #5fd0ff;    /* lighter blue */
  --brand-ink: #04121c;  /* dark text on bright-blue fills */

  --flood: #00b4ff;      /* Flooders — donut/water blue */
  --flood-soft: rgba(0, 180, 255, .14);
  --drain: #ff5d4d;      /* Drainers — warm red */
  --drain-soft: rgba(255, 93, 77, .14);

  --ok: #34d17e;
  --ok-soft: rgba(52, 209, 126, .14);
  --bad: #ff6a5a;
  --gold: #ffcf4d;       /* prize / sprinkle gold */

  /* sprinkle palette (playful accents) */
  --spr-pink: #ff6fb3;
  --spr-mint: #34d17e;
  --spr-gold: #ffcf4d;
  --spr-lilac: #b98cff;

  /* donut mark colors */
  --donut-glaze: #00b4ff;
  --donut-dough: #e7b478;
  --donut-outline: #0a0d12;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 999px;

  --shadow: 0 8px 26px rgba(0, 0, 0, .40), 0 2px 6px rgba(0, 0, 0, .30);
  --glow: 0 0 24px rgba(0, 180, 255, .35);

  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Fredoka', 'Inter', system-ui, sans-serif; /* playful rounded display */
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { font-weight: 600; letter-spacing: -0.01em; }

.serif { font-family: var(--serif); }
.muted { color: var(--ink-2); }
.tnum { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1; }
.hidden { display: none !important; }

::selection { background: rgba(0, 180, 255, .32); color: #fff; }

a { color: inherit; }

/* ---------- layout ---------- */
.page { max-width: 940px; margin: 0 auto; padding: 0 24px; }
.page.narrow { max-width: 460px; }

.masthead {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; padding: 28px 0 24px; border-bottom: 1px solid var(--line);
}
.wordmark {
  font-family: var(--serif); font-weight: 600; font-size: 26px;
  letter-spacing: -0.02em; line-height: 1;
}
.wordmark .amp { color: var(--ink-3); font-style: italic; }

.label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-3);
}

/* ---------- countdown ---------- */
.countdown { text-align: right; display: flex; flex-direction: column; gap: 3px; }
.cd-clock {
  font-size: clamp(22px, 4vw, 30px); font-weight: 600; letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1; line-height: 1;
}
.countdown.closed .cd-clock { color: var(--drain); }

/* ---------- scoreboard ---------- */
main { padding: 56px 0 80px; }

.board {
  display: grid; grid-template-columns: 1fr 1px 1fr;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.board .divider { background: var(--line); }
.side { padding: 32px 28px; }
.side + .side { }
.side-head { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.mark { width: 9px; height: 9px; border-radius: 2px; flex: none; }
.flooders .mark { background: var(--flood); }
.drainers .mark { background: var(--drain); }
.side-name { font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); }
.side-count {
  font-size: clamp(46px, 8vw, 76px); font-weight: 600; line-height: 0.95;
  letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
  transition: transform .15s cubic-bezier(.2,.7,.3,1); transform-origin: left center;
}
.side-sub { margin-top: 10px; font-size: 13.5px; color: var(--ink-2); }
.side-sub b { color: var(--gold); font-weight: 600; }

.lead {
  margin-left: auto; font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; padding: 3px 8px; border-radius: var(--radius-pill);
}
.flooders .lead { color: var(--flood); background: var(--flood-soft); }
.drainers .lead { color: var(--drain); background: var(--drain-soft); }
.side.leading .side-name { color: var(--ink); }

/* allocation bar */
.alloc {
  display: flex; height: 6px; margin: 14px 2px 0; border-radius: var(--radius-pill);
  overflow: hidden; background: var(--line-2);
}
.alloc span { display: block; transition: width .5s cubic-bezier(.2,.7,.3,1); }
.alloc-f { background: var(--flood); }
.alloc-d { background: var(--drain); }
.alloc-key { display: flex; gap: 20px; margin: 12px 2px 0; }
.alloc-key span { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-2); }
.alloc-key i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }

/* primary call to action — deliberately heavy whitespace */
.cta { margin: 56px 0 8px; }
.cta .note { margin: 16px 2px 0; font-size: 13px; color: var(--ink-3); }

/* winner */
.result { margin-top: 48px; padding-top: 40px; border-top: 1px solid var(--line); }
.result h1 { font-family: var(--serif); font-size: clamp(30px, 5vw, 46px); margin: 0 0 8px; }
.result p { margin: 0; font-size: 15px; color: var(--ink-2); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-size: 14.5px; font-weight: 600; line-height: 1;
  padding: 12px 20px; border-radius: var(--radius-sm); border: 1px solid var(--brand);
  background: var(--brand); color: var(--brand-ink); cursor: pointer; text-decoration: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.btn:hover { background: var(--brand-2); border-color: var(--brand-2); box-shadow: var(--glow); }
.btn:active { transform: translateY(0.5px); }
.btn:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.btn.block { display: flex; width: 100%; }
.btn.lg { padding: 15px 30px; font-size: 15.5px; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-ink); }
.btn.ghost:hover { background: var(--surface-2); border-color: var(--ink-3); box-shadow: none; }
.btn.small { padding: 8px 13px; font-size: 13px; border-radius: var(--radius-sm); }
.btn.flood { background: var(--flood); border-color: var(--flood); color: var(--brand-ink); }
.btn.flood:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn.drain { background: var(--drain); border-color: var(--drain); color: #2a0906; }
.btn.drain:hover { background: #ff7a6d; border-color: #ff7a6d; box-shadow: 0 0 24px rgba(255,93,77,.35); }
.btn.approve { background: var(--ok); border-color: var(--ok); color: #05230f; }
.btn.approve:hover { background: #4fe294; border-color: #4fe294; box-shadow: none; }
.btn.deny { background: transparent; color: var(--bad); border-color: var(--line-ink); }
.btn.deny:hover { background: var(--drain-soft); border-color: var(--bad); box-shadow: none; }

/* ---------- surface / forms ---------- */
.surface {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px;
}
.form-head { margin: 0 0 4px; }
.form-head h1 { font-family: var(--serif); font-size: 27px; margin: 0; }
.form-sub { margin: 6px 0 0; color: var(--ink-2); font-size: 13.5px; }

.field { display: block; margin: 22px 0 7px; font-size: 12.5px; font-weight: 600;
  letter-spacing: 0.02em; color: var(--ink-2); }
.inp {
  width: 100%; font-family: var(--sans); font-size: 15.5px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-ink);
  border-radius: var(--radius-sm); padding: 12px 13px; transition: border-color .15s, box-shadow .15s;
}
.inp::placeholder { color: var(--ink-3); }
.inp:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--flood-soft); }
.inp.code {
  text-align: center; letter-spacing: 0.5em; font-size: 30px; font-weight: 600;
  font-variant-numeric: tabular-nums; padding-left: 0.5em;
}

.help { margin: 8px 2px 0; font-size: 12.5px; color: var(--ink-3); }
.err { margin: 9px 2px 0; font-size: 12.5px; color: var(--bad); min-height: 16px; }

/* progress dots */
.dots { display: flex; gap: 6px; margin-bottom: 24px; }
.dots i { height: 3px; flex: 1; border-radius: 2px; background: var(--line-ink); transition: background .2s; }
.dots i.on { background: var(--brand); }

/* processing */
.processing { text-align: center; padding: 20px 0 8px; }
.spinner {
  width: 34px; height: 34px; margin: 0 auto 20px; border-radius: 50%;
  border: 2.5px solid var(--line-ink); border-top-color: var(--brand);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.processing h1 { font-family: var(--serif); font-size: 24px; margin: 0 0 6px; }
.proc-msg { color: var(--ink-2); font-size: 13.5px; margin: 0; }

/* result marks (drawn, not emoji) */
.mark-icon { width: 40px; height: 40px; margin: 0 auto 16px; display: block; }

/* centered outcome */
.outcome { text-align: center; padding: 12px 0 4px; }
.outcome h1 { font-family: var(--serif); font-size: 26px; margin: 0 0 6px; }
.outcome p { color: var(--ink-2); font-size: 13.5px; margin: 0 0 24px; }

/* ---------- vote picks ---------- */
.vote-title { font-size: 28px; margin: 0 0 20px; text-align: center; }
.picks { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0 0 18px; }
.pick {
  position: relative; cursor: pointer; display: flex; flex-direction: column; align-items: center;
  gap: 12px; padding: 30px 18px; font-family: var(--sans);
  background: var(--surface); border: 1.5px solid var(--line-ink); border-radius: 12px;
  color: var(--ink); transition: transform .16s cubic-bezier(.2,.7,.3,1), border-color .16s, background .16s, box-shadow .16s;
}
.pick:hover { transform: translateY(-2px); }
.pick.flooders:hover { border-color: var(--flood); }
.pick.drainers:hover { border-color: var(--drain); }
.pick .pick-ico { color: var(--ink-3); transition: color .16s, transform .16s; display: flex; }
.pick.flooders .pick-ico { color: var(--flood); }
.pick.drainers .pick-ico { color: var(--drain); }
.pick .pick-name { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.pick .pick-check {
  position: absolute; top: 12px; right: 12px; width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: #fff;
  background: rgba(255,255,255,.25); opacity: 0; transform: scale(.6); transition: opacity .16s, transform .16s;
}
/* selected — the tile fills with the team color */
.pick.sel { color: #fff; transform: translateY(-2px); }
.pick.sel .pick-ico { color: #fff; transform: scale(1.06); }
.pick.sel .pick-check { opacity: 1; transform: scale(1); }
.pick.sel.flooders { background: var(--flood); border-color: var(--flood); box-shadow: 0 8px 22px rgba(47,108,174,.28); }
.pick.sel.drainers { background: var(--drain); border-color: var(--drain); box-shadow: 0 8px 22px rgba(180,84,56,.28); }
/* dim the unpicked tile once a choice is made */
.picks.has-sel .pick:not(.sel) { opacity: .5; }
.picks.has-sel .pick:not(.sel):hover { opacity: .8; }

.guard { text-align: center; }
.guard h1 { font-family: var(--serif); font-size: 24px; margin: 8px 0 6px; }

/* ---------- prize bonus callout ---------- */
.bonus {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  padding: 16px 18px; margin: 0 0 24px;
  background: linear-gradient(180deg, rgba(255,207,77,.10), rgba(255,207,77,.04)); border: 1px solid rgba(255,207,77,.30);
  border-left: 3px solid var(--gold); border-radius: var(--radius);
}
.bonus-amt {
  font-size: 24px; font-weight: 700; color: var(--gold);
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1;
}
.bonus-text { font-size: 14px; color: var(--ink-2); line-height: 1.45; }

/* ---------- verification: page shell ---------- */
.auth-page { max-width: 424px; margin: 0 auto; padding: 7vh 20px 64px; }
.auth-brand { text-align: center; margin-bottom: 26px; }
.auth-brand .wordmark { font-size: 24px; }
.auth-brand-sub {
  margin: 5px 0 0; font-size: 12px; font-weight: 500; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-3);
}
.auth-card { padding: 32px 30px 30px; }
.auth-title { font-size: 25px; margin: 0 0 6px; letter-spacing: -0.015em; }
.auth-sub { margin: 0 0 4px; font-size: 13.5px; color: var(--ink-2); line-height: 1.5; }
.auth-card .field { margin-top: 20px; }
.auth-card .btn { margin-top: 10px; }
.auth-foot { text-align: center; }

/* assurance — one plain-spoken statement, not a badge/checklist */
.assurance {
  display: flex; gap: 11px; align-items: flex-start;
  margin-top: 20px; padding: 0 4px;
}
.assurance-ic {
  flex: none; margin-top: 1px; color: var(--ink-3);
}
.assurance-text {
  margin: 0; font-size: 12.5px; line-height: 1.6; color: var(--ink-2);
}
.assurance-text a {
  color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px;
  text-decoration-color: var(--line-ink);
}
.assurance-text a:hover { color: var(--ink); text-decoration-color: var(--ink-3); }

/* ---------- prose (privacy) ---------- */
.prose { padding: 38px 36px; }
.prose-kicker { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brand); margin-bottom: 8px; }
.prose h1 { font-family: var(--serif); font-size: clamp(26px, 4vw, 33px); margin: 0 0 16px; letter-spacing: -0.015em; }
.prose .lede {
  font-size: 15px; line-height: 1.62; color: var(--ink); margin: 0 0 6px;
  padding: 14px 16px; background: var(--flood-soft); border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.prose h2 {
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-2); margin: 30px 0 12px; padding-top: 22px; border-top: 1px solid var(--line-2);
}
.prose p { font-size: 14px; line-height: 1.66; color: var(--ink-2); margin: 0 0 10px; }
.prose ul { margin: 0; padding: 0; list-style: none; }
.prose li { position: relative; padding-left: 20px; font-size: 14px; line-height: 1.6; color: var(--ink-2); margin-bottom: 9px; }
.prose li::before { content: ''; position: absolute; left: 4px; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); opacity: .5; }
.prose strong { color: var(--ink); font-weight: 600; }
.tos-doc p { font-size: 14px; line-height: 1.7; color: var(--ink-2); margin: 0 0 13px; }
.prose-foot {
  margin-top: 30px !important; padding: 15px 0 0; border-top: 1px solid var(--line-2);
  font-size: 12.5px !important; color: var(--ink-3) !important;
}
.stepper { list-style: none; display: flex; align-items: center; gap: 0; margin: 0 0 22px; padding: 0; }
.stp { display: flex; align-items: center; gap: 9px; color: var(--ink-3); font-size: 12.5px; font-weight: 600; }
.stp:not(:last-child) { flex: 1; }
.stp:not(:last-child)::after {
  content: ''; flex: 1; height: 1.5px; background: var(--line-ink); margin: 0 12px; border-radius: 2px; transition: background .2s;
}
.stp-dot {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; background: var(--surface); border: 1.5px solid var(--line-ink); color: var(--ink-3);
  transition: background .2s, border-color .2s, color .2s;
}
.stp.on { color: var(--ink); }
.stp.on .stp-dot { border-color: var(--brand); color: var(--brand); box-shadow: 0 0 0 3px var(--flood-soft); }
.stp.done { color: var(--ink-2); }
.stp.done .stp-dot { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.stp.done:not(:last-child)::after { background: var(--brand); }
.stp-label { white-space: nowrap; }

/* ---------- verification: OTP boxes ---------- */
.otp { display: flex; gap: 8px; justify-content: center; margin-top: 20px; }
.otp-box {
  width: 50px; height: 58px; text-align: center; font-family: var(--sans);
  font-size: 24px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums;
  background: var(--paper-2); border: 1.5px solid var(--line-ink); border-radius: var(--radius-sm);
  transition: border-color .12s, box-shadow .12s, background .12s;
}
.otp-box.filled { background: var(--surface-2); border-color: var(--brand); color: var(--brand-2); }
.otp-box:focus {
  outline: none; background: var(--surface-2); border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--flood-soft);
}
@media (max-width: 420px) { .otp { gap: 6px; } .otp-box { width: 42px; height: 50px; font-size: 21px; } }

/* secure note */
.secure-note {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  margin: 16px 0 0; color: var(--ink-3); font-size: 12px;
}
.secure-note svg { flex: none; }

/* ---------- admin: toggle switch ---------- */
.switch { display: inline-flex; align-items: center; gap: 11px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track {
  position: relative; width: 42px; height: 24px; border-radius: 999px;
  background: var(--line-ink); transition: background .18s;
}
.switch .thumb {
  position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .18s;
}
.switch input:checked + .track { background: var(--ok); }
.switch input:checked + .track .thumb { transform: translateX(18px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px rgba(25,26,29,.12); }
.switch-label { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.switch-label.on { color: var(--ok); }

/* ---------- footer ---------- */
.foot { padding: 28px 0 40px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 12.5px; }
.foot a { color: var(--ink-2); text-decoration: none; }
.foot a:hover { color: var(--ink); }
.backlink { display: inline-block; margin-top: 22px; color: var(--ink-2); text-decoration: none; font-size: 13px; }
.backlink:hover { color: var(--ink); }

/* =====================================================================
   ADMIN — dense operator dashboard
   ===================================================================== */
.admin-shell { max-width: 1120px; margin: 0 auto; padding: 0 24px 64px; }
.admin-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 0; border-bottom: 1px solid var(--line); margin-bottom: 28px;
}
.admin-bar .wordmark { font-size: 20px; }
.admin-bar .tag-admin { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }

/* stat strip — bordered, not floating cards */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  overflow: hidden; margin-bottom: 28px;
}
.stat { padding: 16px 18px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat .n { font-size: 30px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em; transition: transform .15s ease; transform-origin: left center; }
.stat .k { margin-top: 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.stat.flood .n { color: var(--flood); }
.stat.drain .n { color: var(--drain); }

.admin-grid { display: grid; grid-template-columns: 288px 1fr; gap: 28px; align-items: start; }

.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.panel + .panel { margin-top: 18px; }
.panel h3 { margin: 0; padding: 14px 18px; font-size: 13px; font-weight: 600; border-bottom: 1px solid var(--line-2); }
.panel .body { padding: 16px 18px; }
.panel .body p { margin: 0 0 12px; font-size: 12.5px; color: var(--ink-2); }
.ctrl-row { display: flex; gap: 8px; margin-bottom: 10px; }
.ctrl-row:last-child { margin-bottom: 0; }
.ctrl-row .inp { min-width: 0; }
.mini-label { margin: 0 0 6px !important; font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); }
.deadline-note { margin: 2px 0 0 !important; font-size: 12px; color: var(--ink-3); min-height: 15px; }
.deadline-note.set { color: var(--ok); font-weight: 600; }
input[type="datetime-local"].inp { font-family: var(--sans); }
.ctrl-row .inp { padding: 9px 11px; font-size: 14px; }

/* login */
.admin-login { max-width: 380px; margin: 8vh auto 0; }

/* submissions feed */
.feed-head { display: flex; align-items: baseline; justify-content: space-between; }
.feed-head .count { font-size: 12.5px; color: var(--ink-3); font-weight: 400; }
.queue { display: flex; flex-direction: column; }
.q-empty { padding: 40px 18px; text-align: center; color: var(--ink-3); font-size: 13px; }

.profile {
  display: flex; align-items: center; gap: 16px; padding: 14px 18px;
  border-top: 1px solid var(--line-2);
}
.profile:first-child { border-top: 0; }
.profile.pending { background: rgba(255,207,77,.08); box-shadow: inset 3px 0 0 var(--gold); }
.profile .who { min-width: 0; flex: 1; }
.profile .em { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile .meta { margin-top: 3px; font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 8px; }
.profile .codebox {
  font-size: 21px; font-weight: 600; letter-spacing: 0.14em; font-variant-numeric: tabular-nums;
  color: var(--ink-3); padding-right: 2px;
}
.profile .codebox.match { color: var(--ok); }
.profile .actions { display: flex; gap: 8px; flex: none; }

.tag {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 2px 7px; border-radius: var(--radius-pill);
}
.tag.awaiting-code { background: var(--paper-2); color: var(--ink-2); }
.tag.pending { background: rgba(255,207,77,.16); color: var(--gold); }
.tag.approved { background: var(--ok-soft); color: var(--ok); }
.tag.denied { background: var(--drain-soft); color: var(--bad); }
.tag.voted-f { background: var(--flood-soft); color: var(--flood); }
.tag.voted-d { background: var(--drain-soft); color: var(--drain); }

.report-row { padding: 7px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; display: flex; justify-content: space-between; gap: 12px; }
.report-row:last-child { border-bottom: 0; }
.report-row .amt { color: var(--gold); font-variant-numeric: tabular-nums; }

/* generated access key + approved list */
.keyval {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11.5px; letter-spacing: 0.02em; color: var(--ink);
  background: var(--paper-2); border: 1px solid var(--line-2);
  padding: 1px 6px; border-radius: 4px; white-space: nowrap;
}
.ap-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 0;
  border-bottom: 1px solid var(--line-2);
}
.ap-row:last-child { border-bottom: 0; }
.ap-email { flex: 1; min-width: 0; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-code { font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--ink-2); letter-spacing: 0.04em; }

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  .admin-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(3), .stat:nth-child(4) { border-top: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .page { padding: 0 18px; }
  main { padding: 40px 0 64px; }
  .board { grid-template-columns: 1fr; }
  .board .divider { height: 1px; width: auto; }
  .picks { grid-template-columns: 1fr; }
  .masthead { padding: 22px 0 18px; }
  .cta { margin: 40px 0 8px; }
}

/* ============================================================
   DonutSMP theme layer — donut blue, dark ground, sprinkles
   ============================================================ */

/* atmospheric glow behind the dark page */
body {
  background:
    radial-gradient(1000px 560px at 50% -10%, rgba(0, 180, 255, .10), transparent 62%),
    radial-gradient(760px 520px at 100% 2%, rgba(255, 95, 77, .06), transparent 58%),
    var(--paper);
  background-attachment: fixed;
}

/* brand wordmark carries the DonutSMP donut */
.masthead { align-items: center; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; }
.auth-brand .wordmark { justify-content: center; }
.donut-logo { width: 30px; height: 30px; flex: none; object-fit: contain; display: block; }
.auth-brand .donut-logo { width: 40px; height: 40px; }

/* countdown clock glows donut-blue */
.cd-clock { color: var(--brand); }
.countdown.closed .cd-clock { color: var(--drain); }

/* board — team-colored scores + a soft tint on the leading side */
.board { box-shadow: var(--shadow); }
.flooders .side-count { color: var(--flood); }
.drainers .side-count { color: var(--drain); }
.side { transition: background .25s ease; }
.side.leading.flooders { background: var(--flood-soft); }
.side.leading.drainers { background: var(--drain-soft); }

/* prize amount pops */
.bonus-amt { color: var(--gold); text-shadow: 0 0 20px rgba(255, 207, 77, .28); }

/* winner banner */
.result h1, .result h2 { font-family: var(--serif); font-size: clamp(28px, 5vw, 40px); margin: 0 0 8px; }
.result { margin-top: 30px; }


/* ============================================================
   FLOOD WARS landing — versus-battle art direction (no nav bar)
   ============================================================ */

/* ---- HERO / CREST: logo front & centre ---- */
.crest { position: relative; text-align: center; max-width: 840px; margin: 0 auto; padding: 70px 24px 54px; }
.crest-emblem { position: relative; width: 116px; height: 116px; margin: 0 auto 24px; }
.crest-emblem::before {
  content: ''; position: absolute; inset: -18px; border-radius: 50%;
  background: radial-gradient(circle, rgba(0,180,255,.38), transparent 68%); filter: blur(6px);
}
.crest-emblem img { position: relative; width: 116px; height: 116px; object-fit: contain; filter: drop-shadow(0 8px 20px rgba(0,0,0,.55)); }
.crest-title {
  font-family: var(--serif); font-weight: 700; font-size: clamp(50px, 13vw, 122px);
  line-height: 0.84; letter-spacing: -0.01em; margin: 0; color: var(--ink);
  text-shadow: 0 0 46px rgba(0,180,255,.30);
}
.crest-official { display: flex; align-items: center; justify-content: center; gap: 15px; margin: 16px 0 0; }
.crest-official span {
  font-size: 13px; font-weight: 700; letter-spacing: 0.44em; text-transform: uppercase;
  color: var(--brand); padding-left: 0.44em;
}
.crest-official::before, .crest-official::after { content: ''; height: 1px; width: 48px; }
.crest-official::before { background: linear-gradient(90deg, transparent, var(--brand)); }
.crest-official::after { background: linear-gradient(90deg, var(--brand), transparent); }
.crest-tag { max-width: 540px; margin: 24px auto 0; font-size: clamp(15px, 2vw, 17px); line-height: 1.6; color: var(--ink-2); }
.crest-clock { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; margin: 34px 0 4px; }
.crest-clock .cd-clock { font-size: clamp(34px, 7vw, 52px); }
.crest-cta { margin-top: 26px; }
.result { margin: 30px auto 0; max-width: 520px; }

/* ---- VERSUS BOARD ---- */
.battle-wrap { max-width: 940px; margin: 0 auto; padding: 22px 24px 68px; }
.battle {
  position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  background:
    linear-gradient(107deg,
      rgba(0,180,255,.17) 0 45%,
      rgba(13,16,21,0) 45% 55%,
      rgba(255,93,77,.17) 55% 100%),
    var(--surface);
}
.battle-side { display: flex; flex-direction: column; gap: 4px; padding: 42px 30px 36px; }
.battle-side.flooders { align-items: flex-start; text-align: left; }
.battle-side.drainers { align-items: flex-end; text-align: right; }
.battle-mark { font-size: 26px; line-height: 1; }
.battle-team { font-family: var(--serif); font-weight: 600; font-size: 20px; letter-spacing: 0.01em; }
.flooders .battle-team { color: var(--flood); }
.drainers .battle-team { color: var(--drain); }
.battle-count {
  font-family: var(--serif); font-weight: 700; font-size: clamp(52px, 11vw, 94px);
  line-height: 0.9; letter-spacing: -0.02em; transition: transform .16s cubic-bezier(.2,.7,.3,1);
}
.flooders .battle-count { color: var(--flood); text-shadow: 0 0 32px rgba(0,180,255,.38); transform-origin: left center; }
.drainers .battle-count { color: var(--drain); text-shadow: 0 0 32px rgba(255,93,77,.38); transform-origin: right center; }
.battle-votes { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.battle-lead {
  margin-top: 12px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 4px 11px; border-radius: var(--radius-pill);
}
.flooders .battle-lead { color: var(--flood); background: var(--flood-soft); }
.drainers .battle-lead { color: var(--drain); background: var(--drain-soft); }
.battle-vs { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 4px; }
.battle-donut { width: 56px; height: 56px; object-fit: contain; filter: drop-shadow(0 4px 14px rgba(0,0,0,.55)); }
.vs-text { margin-top: 6px; font-family: var(--serif); font-weight: 700; font-size: 20px; letter-spacing: 0.08em; color: var(--ink); }

.alloc { display: flex; height: 8px; border-radius: var(--radius-pill); overflow: hidden; background: var(--line-2); border: 1px solid var(--line); }
.alloc-f { background: var(--flood); transition: width .45s cubic-bezier(.3,.7,.3,1); }
.alloc-d { background: var(--drain); transition: width .45s cubic-bezier(.3,.7,.3,1); }
.battle-bar { margin-top: 16px; }
.battle-note { text-align: center; margin: 14px 0 0; font-size: 12.5px; color: var(--ink-3); }

/* ---- THE STORY (video), asymmetric ---- */
.strip-kicker { font-size: 12px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--brand); }
.strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper-2); }
.strip-inner { max-width: 1000px; margin: 0 auto; padding: 58px 24px; display: grid; grid-template-columns: 290px 1fr; gap: 44px; align-items: center; }
.strip-label h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(26px, 3vw, 34px); margin: 10px 0 10px; }
.strip-label p { color: var(--ink-2); font-size: 14.5px; line-height: 1.55; margin: 0; }
.broadcast { position: relative; }
.broadcast-tab {
  position: absolute; top: -12px; left: 18px; z-index: 3;
  background: var(--brand); color: var(--brand-ink); font-size: 12px; font-weight: 700;
  letter-spacing: 0.03em; padding: 5px 13px; border-radius: 7px; box-shadow: 0 5px 14px rgba(0,0,0,.45);
}
.video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.broadcast .video { border: 2px solid var(--brand); box-shadow: 0 0 0 5px rgba(0,180,255,.10), var(--shadow); }

/* ---- BATTLE PLAN (how to join): vertical timeline ---- */
.plan-wrap { max-width: 720px; margin: 0 auto; padding: 68px 24px; }
.plan-head { margin-bottom: 30px; }
.plan-head h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(27px, 4vw, 38px); margin: 8px 0 0; }
.plan { list-style: none; margin: 0; padding: 0; position: relative; }
.plan::before { content: ''; position: absolute; left: 27px; top: 30px; bottom: 30px; width: 2px; background: linear-gradient(180deg, var(--flood), var(--drain)); opacity: 0.55; }
.plan-step { position: relative; display: grid; grid-template-columns: 56px 1fr; gap: 22px; padding: 14px 0; }
.plan-n {
  position: relative; z-index: 1; width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 2px solid var(--brand); color: var(--brand);
  font-family: var(--serif); font-weight: 700; font-size: 20px; box-shadow: 0 0 0 7px var(--paper);
}
.plan-body { padding-top: 5px; }
.plan-body h3 { font-family: var(--serif); font-size: 19px; margin: 0 0 5px; }
.plan-body p { font-size: 14px; line-height: 1.6; color: var(--ink-2); margin: 0; }

/* ---- SPOILS (prize) ---- */
.spoils { border-top: 1px solid var(--line); background: radial-gradient(720px 300px at 50% 0%, rgba(255,207,77,.11), transparent 70%), var(--paper-2); }
.spoils-inner { max-width: 640px; margin: 0 auto; padding: 66px 24px; text-align: center; }
.spoils-label { font-size: 12px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }
.spoils-amt {
  font-family: var(--serif); font-weight: 700; font-size: clamp(46px, 11vw, 84px); line-height: 1;
  color: var(--gold); letter-spacing: -0.02em; margin: 12px 0 6px; text-shadow: 0 0 36px rgba(255,207,77,.34);
}
.spoils-unit { font-size: 15px; color: var(--ink-2); }
.spoils-sub { max-width: 480px; margin: 22px auto 0; font-size: 13.5px; line-height: 1.62; color: var(--ink-3); }

/* ---- FOOTER ---- */
.ftr { text-align: center; padding: 48px 24px; border-top: 1px solid var(--line); }
.ftr-logo { width: 42px; height: 42px; object-fit: contain; }
.ftr-name { font-family: var(--serif); font-weight: 600; font-size: 15px; letter-spacing: 0.05em; margin: 10px 0 0; }
.ftr-links { display: flex; gap: 22px; justify-content: center; margin: 16px 0 14px; flex-wrap: wrap; }
.ftr-links a { font-size: 13px; color: var(--ink-2); text-decoration: none; }
.ftr-links a:hover { color: var(--ink); }
.ftr-fine { max-width: 480px; margin: 0 auto; font-size: 12px; line-height: 1.55; color: var(--ink-3); }

@media (max-width: 720px) {
  .strip-inner { grid-template-columns: 1fr; gap: 22px; }
}
@media (max-width: 560px) {
  .battle-side { padding: 26px 16px; }
  .battle-count { font-size: clamp(40px, 15vw, 62px); }
  .battle-donut { width: 42px; height: 42px; }
  .vs-text { font-size: 16px; }
  .crest { padding: 50px 20px 40px; }
  .plan-step { gap: 16px; }
}

/* ============================================================
   Registration — full-page "enlist" split
   ============================================================ */
.enlist-body { min-height: 100vh; }
.enlist { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100vh; }

/* left brand / proof panel */
.enlist-brand {
  position: relative; display: flex; flex-direction: column; justify-content: space-between;
  padding: 40px 48px; overflow: hidden;
  background:
    radial-gradient(680px 460px at 22% 18%, rgba(0,180,255,.20), transparent 62%),
    radial-gradient(520px 420px at 90% 100%, rgba(255,93,77,.12), transparent 60%),
    var(--paper-2);
  border-right: 1px solid var(--line);
}
.enlist-brand::after {  /* faint oversized donut watermark */
  content: ''; position: absolute; right: -140px; top: 50%; width: 460px; height: 460px;
  transform: translateY(-50%);
  background: url('/logo.webp') center / contain no-repeat; opacity: .05; filter: grayscale(.2);
  pointer-events: none;
}
.enlist-back { position: relative; z-index: 1; font-size: 13px; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.enlist-back:hover { color: var(--ink); }
.enlist-brand-mid { position: relative; z-index: 1; margin: auto 0; }
.enlist-emblem { position: relative; width: 88px; height: 88px; margin-bottom: 22px; }
.enlist-emblem::before { content: ''; position: absolute; inset: -14px; border-radius: 50%; background: radial-gradient(circle, rgba(0,180,255,.4), transparent 66%); filter: blur(5px); }
.enlist-emblem img { position: relative; width: 88px; height: 88px; object-fit: contain; filter: drop-shadow(0 6px 16px rgba(0,0,0,.5)); }
.enlist-title { font-family: var(--serif); font-weight: 700; font-size: clamp(40px, 5vw, 62px); line-height: .86; letter-spacing: -0.01em; margin: 0; text-shadow: 0 0 38px rgba(0,180,255,.28); }
.enlist-official { display: flex; align-items: center; gap: 13px; margin: 14px 0 0; }
.enlist-official span { font-size: 12px; font-weight: 700; letter-spacing: 0.4em; text-transform: uppercase; color: var(--brand); padding-left: .4em; }
.enlist-official::before { content: ''; height: 1px; width: 40px; background: linear-gradient(90deg, transparent, var(--brand)); }
.enlist-pitch { max-width: 400px; margin: 22px 0 0; font-size: 15.5px; line-height: 1.62; color: var(--ink-2); }
.enlist-trust { position: relative; z-index: 1; list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.enlist-trust li { position: relative; padding-left: 22px; font-size: 12.5px; line-height: 1.5; color: var(--ink-3); }
.enlist-trust li::before { content: ''; position: absolute; left: 4px; top: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); opacity: .7; }

/* right form panel */
.enlist-panel { display: flex; align-items: center; justify-content: center; padding: 40px 32px; }
.enlist-card { width: 100%; max-width: 400px; }
.enlist-card .stepper { margin-bottom: 26px; }
.enlist-stage {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 30px 30px 32px; min-height: 250px;
  display: flex; flex-direction: column; justify-content: center;
}
.enlist-card .secure-note { margin-top: 16px; }
.enlist-card .secure-note a { color: var(--ink-2); }

@media (max-width: 860px) {
  .enlist { grid-template-columns: 1fr; }
  .enlist-brand { padding: 26px 26px 30px; border-right: 0; border-bottom: 1px solid var(--line); }
  .enlist-brand::after { display: none; }
  .enlist-brand-mid { margin: 20px 0 18px; }
  .enlist-emblem, .enlist-emblem img { width: 64px; height: 64px; }
  .enlist-emblem { margin-bottom: 16px; }
  .enlist-pitch { display: none; }
  .enlist-trust { grid-auto-flow: column; grid-template-columns: none; gap: 16px; font-size: 11px; overflow-x: auto; }
  .enlist-trust li { padding-left: 16px; white-space: nowrap; }
  .enlist-panel { padding: 30px 20px 44px; align-items: flex-start; }
}

/* "start over" escape on the verification page */
.startover {
  display: block; width: 100%; margin: 14px auto 0; padding: 4px;
  background: none; border: 0; cursor: pointer; font-family: var(--sans);
  font-size: 12.5px; color: var(--ink-3); text-decoration: underline; text-underline-offset: 3px;
  transition: color .15s;
}
.startover:hover { color: var(--ink); }

/* "Is this legit?" verification section */
.verify { border-top: 1px solid var(--line); background: var(--paper-2); }
.verify-card { max-width: 640px; margin: 0 auto; padding: 60px 24px; text-align: center; }
.verify-card h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(26px, 4vw, 34px); margin: 8px 0 12px; }
.verify-card > p { max-width: 500px; margin: 0 auto; font-size: 14.5px; line-height: 1.62; color: var(--ink-2); }
.verify-links { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 24px 0 0; }
.verify-btn {
  display: inline-flex; align-items: center; gap: 9px; padding: 12px 20px;
  border-radius: var(--radius-sm); font-family: var(--sans); font-weight: 600; font-size: 14.5px;
  text-decoration: none; transition: background .15s, border-color .15s, transform .1s;
}
.verify-btn:active { transform: translateY(1px); }
.verify-btn.discord { background: #5865F2; color: #fff; }
.verify-btn.discord:hover { background: #4752c4; }
.verify-btn.site { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line-ink); }
.verify-btn.site:hover { border-color: var(--ink-3); }
.verify-note { max-width: 440px; margin: 20px auto 0; font-size: 12.5px; line-height: 1.55; color: var(--ink-3); }

/* ============================================================
   Live board header + history chart
   ============================================================ */
/* a touch more restrained board (professional) */
.battle { background: linear-gradient(107deg, rgba(0,180,255,.12) 0 45%, rgba(13,16,21,0) 45% 55%, rgba(255,93,77,.12) 55% 100%), var(--surface); }
.flooders .battle-count { text-shadow: 0 0 22px rgba(0,180,255,.26); }
.drainers .battle-count { text-shadow: 0 0 22px rgba(255,93,77,.26); }

.battle-head { display: flex; align-items: center; justify-content: space-between; margin: 0 2px 12px; }
.live-badge { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }


/* ============================================================
   Prize + verify — restrained, editorial (no decoration)
   ============================================================ */
.prize-section, .verify-section { display: block; }

.prize-band {
  max-width: 900px; margin: 0 auto;
  display: grid; grid-template-columns: auto 1fr; gap: 48px; align-items: center;
  padding: 44px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.prize-eyebrow { display: block; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.prize-number { font-family: var(--serif); font-weight: 700; font-size: clamp(44px, 8vw, 78px); line-height: 1; letter-spacing: -.02em; color: var(--gold); margin: 10px 0 8px; }
.prize-unit { font-size: 14.5px; color: var(--ink-2); }
.prize-note { font-size: 14px; line-height: 1.66; color: var(--ink-2); max-width: 340px; margin: 0; }
@media (max-width: 660px) { .prize-band { grid-template-columns: 1fr; gap: 20px; padding: 34px 0; } .prize-note { max-width: none; } }

.verify-inner { max-width: 540px; margin: 0 auto; text-align: center; }
.verify-inner h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(24px, 3.4vw, 31px); margin: 0 0 12px; }
.verify-inner > p { max-width: 460px; margin: 0 auto; font-size: 14.5px; line-height: 1.62; color: var(--ink-2); }

/* register: turnstile widget + "verify us" link */
.ts-widget { margin: 16px 0 4px; min-height: 66px; }
.enlist-verify { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; margin-top: 20px; font-size: 12.5px; font-weight: 600; color: var(--brand); text-decoration: none; }
.enlist-verify svg { flex: none; }
.enlist-verify:hover { text-decoration: underline; }

/* FAQ — clean two-column Q&A */
.faq-head { text-align: center; margin-bottom: 30px; }
.faq-head h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(26px, 4vw, 34px); margin: 0; }
.faq-grid { max-width: 900px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 26px 44px; }
.faq-item h3 { font-size: 15.5px; font-weight: 600; margin: 0 0 7px; color: var(--ink); }
.faq-item p { font-size: 13.5px; line-height: 1.62; color: var(--ink-2); margin: 0; }
@media (max-width: 640px) { .faq-grid { grid-template-columns: 1fr; gap: 22px; } }

/* how to join DonutSMP */
.join-grid { max-width: 1000px; margin: 0 auto; display: grid; grid-template-columns: 1.1fr 1fr; gap: 42px; align-items: center; }
.join-list { margin: 0; padding-left: 20px; display: grid; gap: 12px; }
.join-list li { font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
.join-list b { color: var(--ink); font-weight: 600; }
.ip { display: inline-block; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13.5px; color: var(--brand); background: var(--flood-soft); border: 1px solid rgba(0,180,255,.25); border-radius: 6px; padding: 2px 8px; }
.copy-ip { margin-left: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 6px; border: 1px solid var(--line-ink); background: var(--surface); color: var(--ink-2); cursor: pointer; transition: color .12s, border-color .12s; }
.copy-ip:hover { color: var(--ink); border-color: var(--ink-3); }
.join-note { margin: 18px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--ink-3); }
.join-note a { color: var(--ink-2); }
@media (max-width: 720px) { .join-grid { grid-template-columns: 1fr; gap: 22px; } }

/* Terms agreement row + review modal + admin editor */
.linklike { cursor: pointer; }
.agree-row {
  display: flex; align-items: flex-start; gap: 10px; margin: 18px 0 4px; cursor: pointer;
  font-size: 13px; line-height: 1.5; color: var(--ink-2); user-select: none;
}
.agree-row input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; flex: none; width: 18px; height: 18px; margin: 1px 0 0;
  border: 1.5px solid var(--line-ink); border-radius: 5px; background: var(--surface); position: relative; pointer-events: none;
}
.agree-row input[type="checkbox"]:checked { background: var(--brand); border-color: var(--brand); }
.agree-row input[type="checkbox"]:checked::after {
  content: ''; position: absolute; left: 5px; top: 1px; width: 5px; height: 9px;
  border: solid var(--brand-ink); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.agree-row .linklike { color: var(--brand); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.agree-row:hover .linklike { color: var(--brand-2); }

.tos-modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; }
.tos-backdrop { position: absolute; inset: 0; background: rgba(6,9,14,.72); backdrop-filter: blur(3px); }
.tos-panel { position: relative; z-index: 1; width: 100%; max-width: 560px; max-height: 86vh; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 24px 70px rgba(0,0,0,.6); overflow: hidden; }
.tos-top { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line-2); }
.tos-top h2 { font-family: var(--serif); font-weight: 600; font-size: 19px; margin: 0; }
.tos-close { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line-ink); background: transparent; color: var(--ink-2); cursor: pointer; font-size: 12px; }
.tos-close:hover { color: var(--ink); border-color: var(--ink-3); }
.tos-body { overflow-y: auto; padding: 20px 22px; flex: 1 1 auto; }
.tos-body p { font-size: 13.5px; line-height: 1.7; color: var(--ink-2); margin: 0 0 12px; }
.tos-loading { color: var(--ink-3); }
.tos-jump { position: absolute; right: 22px; bottom: 86px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-ink); background: var(--surface-2); color: var(--brand); font-size: 17px; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.45); display: grid; place-items: center; transition: transform .12s, border-color .12s; }
.tos-jump:hover { transform: translateY(-1px); border-color: var(--brand); }
.tos-foot { padding: 14px 22px 18px; border-top: 1px solid var(--line-2); flex: none; }

.tos-editor { width: 100%; min-height: 130px; resize: vertical; font-family: var(--sans); font-size: 12.5px; line-height: 1.5; padding: 10px 12px; }
.tos-viewlink { display: inline-block; margin-top: 9px; font-size: 12px; color: var(--ink-3); text-decoration: none; }
.tos-viewlink:hover { color: var(--ink-2); }
