/* ============================================================
   NFLSuicide Pool — design-token stylesheet
   Palette:  #111 base, #0c0c0c deep, #C61717 accent red
   Type:     Bebas Neue (display) / Roboto (body)

   CONVENTIONS (see README "UI conventions"):
   - Never hardcode hex colors in component rules. Use tokens.
   - Semantic tokens (--text, --ok, --gold, ...) are what
     components consume; [data-theme="light"] overrides them.
   - rgba() overlays use the --tint / --red-rgb / --gold-rgb /
     --ok-rgb triplets so themes flip automatically.
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Roboto:wght@300;400;500;700&display=swap');

:root {
  /* surfaces */
  --bg: #111111;
  --bg-deep: #0c0c0c;
  --surface-2: #161616;            /* scrollbars, tracks */
  --surface-3: #181818;            /* table headers */
  --nav-bg: rgba(0,0,0,0.92);
  --overlay-scrim: rgba(8,10,14,0.65);
  --code-bg: #000;

  /* lines & borders */
  --line: #2a2a2a;
  --border-strong: #3a3a3a;

  /* text */
  --text: #f5f5f5;
  --text-soft: #c9c9c9;
  --muted: #9a9a9a;
  --on-accent: #fff;               /* text on red/gold fills */
  --on-gold: #111;

  /* brand red */
  --red: #C61717;
  --red-dark: #9a1010;
  --red-bright: #ff5c5c;           /* hovers, links on dark */
  --danger: #e53935;
  --link: #e05a5a;
  --red-dim: #3d0f0f;              /* elimbox border */

  /* gold accents */
  --gold: #ffb300;                 /* ties, pushes, champion glow */
  --gold-strong: #e6a817;          /* warnings, confirm, acting-as */
  --gold-deep: #d4940e;
  --gold-dark: #b8860b;
  --gold-dim: #6b4e00;             /* champbox border */

  /* status greens */
  --ok: #2e9e4f;
  --ok-bright: #4caf50;

  /* warning banner (fake-time notice) */
  --warn-bg: #4a1d00;
  --warn-text: #ffb347;
  --warn-border: #ff9800;

  /* rgb triplets for translucent overlays */
  --tint: 255,255,255;             /* flips to 0,0,0 in light theme */
  --red-rgb: 198,23,23;
  --gold-rgb: 255,179,0;
  --ok-rgb: 76,175,80;
}

/* ---------- Light theme ---------- */
[data-theme="light"] {
  --bg: #eeeae3;
  --bg-deep: #fbfaf7;
  --surface-2: #e2ddd4;
  --surface-3: #e8e4dc;
  --nav-bg: rgba(252,250,246,0.95);
  --overlay-scrim: rgba(20,20,25,0.45);
  --code-bg: #edeae3;

  --line: #d5cfc5;
  --border-strong: #b9b2a6;

  --text: #1a1a1e;
  --text-soft: #44444a;
  --muted: #70707a;
  --on-accent: #fff;
  --on-gold: #111;

  --red: #C61717;
  --red-dark: #9a1010;
  --red-bright: #b32020;
  --danger: #c62828;
  --link: #b32424;
  --red-dim: #f3d5d5;

  --gold: #9a6b00;
  --gold-strong: #8a6508;
  --gold-deep: #7d5a07;
  --gold-dark: #b8860b;
  --gold-dim: #d9c48a;

  --ok: #1e7a34;
  --ok-bright: #1e7a34;

  --warn-bg: #fff3dc;
  --warn-text: #7a5200;
  --warn-border: #e08900;

  --tint: 0,0,0;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 300;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image:
    repeating-linear-gradient(45deg, transparent 0 14px, rgba(var(--tint),0.012) 14px 15px);
}

/* ---------- Top accent line ---------- */
.topline {
  height: 4px;
  background: linear-gradient(90deg, var(--red) 0%, var(--red-dark) 60%, transparent 100%);
}

/* ---------- Nav ---------- */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 48px;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.9rem;
  letter-spacing: 3px;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand .dot {
  width: 10px; height: 10px;
  background: var(--red);
  display: inline-block;
  transform: rotate(45deg);
}
.brand em { color: var(--red); font-style: normal; }
.nav-right { display: flex; align-items: center; gap: 24px; }
.nav-links { display: flex; gap: 32px; }
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: color .2s;
  position: relative;
  padding-bottom: 4px;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--red);
  transition: width .25s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); text-decoration: none; }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--muted);
  cursor: pointer;
  padding: 5px 10px;
  line-height: 1.2;
  font-size: 1rem;
  letter-spacing: 0;
  text-transform: none;
  transform: none;
}
.theme-toggle:hover { color: var(--text); border-color: var(--text); background: transparent; transform: none; }

/* ---------- Main / cards ---------- */
main {
  flex: 1;
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 24px 60px;
  width: 100%;
  position: relative;
  background:
    radial-gradient(ellipse at 50% 120%, rgba(var(--red-rgb),0.14) 0%, transparent 55%),
    radial-gradient(ellipse at 50% -20%, rgba(var(--tint),0.04) 0%, transparent 60%);
}
h1, h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-weight: 400;
  letter-spacing: 3px;
  line-height: 1;
}
h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); margin-bottom: 22px; }
h1::after {
  content: '';
  display: block;
  width: 90px; height: 3px;
  background: var(--red);
  margin-top: 12px;
}
h2 { font-size: 1.15rem; letter-spacing: 2px; margin-bottom: 14px; }
.card {
  background: var(--bg-deep);
  border: 1px solid var(--line);
  border-top: 3px solid var(--red);
  padding: 20px 24px;
  margin-bottom: 18px;
}
.center { text-align: center; }
.muted { color: var(--muted); }
.eliminated { border-top-color: var(--muted); border-left: none; }
.eliminated strong { color: var(--red); }

/* ---------- Games ---------- */
.games { display: grid; gap: 16px; margin-bottom: 18px; }
.matchup {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.7rem;
  letter-spacing: 2px;
  display: flex; gap: 0.7rem; align-items: baseline;
}
.at { color: var(--red); font-size: 1rem; }
.kickoff {
  color: var(--muted); font-size: 0.72rem;
  letter-spacing: 3px; text-transform: uppercase;
  margin: 4px 0 14px;
}
.pickform { display: flex; gap: 12px; }
.pickbtn {
  flex: 1; padding: 13px 10px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.05rem; letter-spacing: 2px;
  background: transparent; color: var(--text);
  border: 1px solid var(--border-strong); cursor: pointer;
  transition: all .2s ease;
}
.pickbtn:hover:not(:disabled) { border-color: var(--text); transform: translateY(-2px); }
.pickbtn.picked { background: var(--red); border-color: var(--red); color: var(--on-accent); }
.pickbtn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }
.mypick { margin-top: 10px; font-size: 0.85rem; color: var(--muted); letter-spacing: 1px; }
.mypick strong { color: var(--text); }
.result { font-weight: 500; font-size: 0.95rem; }

/* ---------- Standings table ---------- */
.standings { width: 100%; border-collapse: separate; border-spacing: 0; }
.standings th, .standings td {
  text-align: left; padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.standings thead th {
  color: var(--muted); font-size: 0.68rem;
  letter-spacing: 3px; text-transform: uppercase;
}
tr.out td { color: rgba(var(--tint),0.42); }
tr.out td .win, tr.out td .loss { opacity: 0.5; }
.win { color: var(--ok-bright); } .loss { color: var(--red); } .push { color: var(--gold); }

/* ---------- Flash ---------- */
.flash {
  padding: 12px 20px; margin-bottom: 18px;
  background: var(--bg-deep);
  border-left: 3px solid var(--red);
  font-size: 0.9rem;
}
.flash.ok { border-left-color: var(--ok-bright); }
.flash.error { border-left-color: var(--danger); }
.flash.inline-block { display: inline-block; }

/* ---------- Forms ---------- */
.rowform { display: flex; flex-wrap: wrap; gap: 16px; align-items: end; }
input[type="date"], input[type="datetime-local"] { min-width: 180px; }
label {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 0.7rem; letter-spacing: 2px;
  text-transform: uppercase; color: var(--muted);
}
label.choice {
  flex-direction: row; align-items: center; gap: 6px;
  text-transform: none; letter-spacing: 0.5px;
  font-size: 0.9rem; color: var(--text);
  margin-left: 1rem;
}
input, select {
  background: var(--bg); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: 0;
  padding: 10px 12px; font-size: 0.95rem;
  font-family: inherit; font-weight: 400;
}
input:focus, select:focus { outline: none; border-color: var(--red); }

button, .btn {
  display: inline-block;
  padding: 12px 28px;
  font-size: 0.8rem; font-weight: 500;
  letter-spacing: 2px; text-transform: uppercase;
  font-family: 'Roboto', sans-serif;
  background: var(--red); color: var(--on-accent);
  border: 1px solid var(--red);
  cursor: pointer; text-decoration: none;
  transition: all .2s ease;
}
button:hover, .btn:hover { background: var(--red-dark); border-color: var(--red-dark); transform: translateY(-2px); }
.btn-ghost { background: transparent; border: 1px solid var(--border-strong); color: var(--text); }
.btn-ghost:hover { background: transparent; border-color: var(--text); }
.gold { color: var(--gold-strong) !important; }
button.danger {
  background: transparent; border: 1px solid var(--border-strong);
  color: var(--muted); padding: 4px 14px; font-size: 0.7rem;
}
button.danger:hover { border-color: var(--red); color: var(--red); background: transparent; transform: none; }
.inline { display: inline; }
.btn-sm { padding: 4px 14px !important; font-size: 0.7rem !important; }

/* layout utilities (replace inline styles) */
.mt8 { margin-top: 8px; }
.mt12 { margin-top: 12px; }
.table-narrow { max-width: 480px; }
.input-short { max-width: 120px; }
.input-wide { min-width: 240px; }
.textarea-grid { width: 100%; font-family: monospace; font-size: 14px; }

.champ-list { display: flex; flex-direction: column; gap: 10px; margin: 12px 0 4px; }
.champ-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px;
  font-size: 0.95rem; background: rgba(var(--tint),0.02);
}
.champ-name { font-size: 1rem; }
.allowlist { list-style: none; padding: 0; }
.allowlist li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

/* ---------- Footer ---------- */
footer {
  text-align: center;
  padding: 26px 20px 34px;
  border-top: 1px solid var(--line);
  background: var(--bg-deep);
}
footer .tagline {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.15rem;
  letter-spacing: 2px;
  color: var(--text);
}
footer .tagline em { color: var(--red); font-style: normal; }
footer .meta {
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 1px;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  nav { padding: 14px 20px; }
  .nav-links { gap: 18px; }
  .nav-links a { font-size: 0.75rem; letter-spacing: 1px; }
  .brand { font-size: 1.5rem; }
  main { padding: 26px 16px 46px; }
  .matchup { font-size: 1.35rem; }
}

/* auth pages */
.authwrap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  max-width: 820px;
  margin: 0 auto;
}
.loginform { display: flex; flex-direction: column; gap: 8px; }
.loginform button { margin-top: 12px; }
.authcard { max-width: 440px; margin: 24px auto; }
.authcard a { color: var(--red); }

/* ---------- off-season page ---------- */
.welcomebox {
  max-width: 640px; margin: 0 auto 26px; padding: 14px 22px; text-align: center;
  font-size: 1.05rem; line-height: 1.6;
  background: linear-gradient(180deg, rgba(var(--gold-rgb),0.12), rgba(var(--gold-rgb),0.04));
  border: 1px solid rgba(var(--gold-rgb),0.45);
}
.offseason .hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 90px 24px 70px;
  background:
    radial-gradient(ellipse at 50% 120%, rgba(var(--red-rgb),0.14) 0%, transparent 55%),
    radial-gradient(ellipse at 50% -20%, rgba(var(--tint),0.04) 0%, transparent 60%);
}
.offseason .kicker {
  font-size: 0.8rem; font-weight: 500; letter-spacing: 4px;
  text-transform: uppercase; color: var(--muted); margin-bottom: 22px;
}
.offseason .kicker .season { color: var(--text); }
.offseason h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(4rem, 12vw, 8.5rem);
  line-height: 0.95; letter-spacing: 4px; font-weight: 400; overflow: hidden;
}
.offseason h1 .line2 { color: var(--red); display: block; }
.offseason .rule { width: 120px; height: 3px; background: var(--red); margin: 30px auto 26px; }
.offseason .lede { max-width: 520px; font-size: 1.05rem; color: var(--text-soft); margin-bottom: 48px; }
.offseason .countdown { display: flex; gap: 14px; justify-content: center; margin-bottom: 48px; }
.offseason .countdown .unit {
  min-width: 86px; padding: 18px 10px;
  background: var(--bg-deep); border: 1px solid var(--line);
}
.offseason .countdown .num {
  font-family: 'Bebas Neue', sans-serif; font-size: 2.6rem; line-height: 1; color: var(--text);
}
.offseason .countdown .label {
  font-size: 0.7rem; letter-spacing: 3px; text-transform: uppercase;
  color: var(--muted); margin-top: 8px;
}
.offseason .cta-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.btn-primary { background: var(--red); border-color: var(--red); color: var(--on-accent); }
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); }
.offseason .ostats {
  display: flex; justify-content: center; gap: 60px; flex-wrap: wrap;
  padding: 46px 24px; border-top: 1px solid var(--line);
}
.offseason .ostats .stat { text-align: center; }
.offseason .ostats .n {
  font-family: 'Bebas Neue', sans-serif; font-size: 2.4rem; color: var(--red); letter-spacing: 2px;
}
.offseason .ostats .n span { color: var(--text); font-size: 1.4rem; }
.offseason .ostats .t {
  font-size: 0.75rem; letter-spacing: 3px; text-transform: uppercase; color: var(--muted); margin-top: 6px;
}

.fakebanner {
  background: var(--warn-bg); color: var(--warn-text); border-bottom: 2px solid var(--warn-border);
  padding: 8px 16px; font-size: 0.85rem; text-align: center; font-weight: 600;
  letter-spacing: 0.3px;
}

.offseasonbanner {
  background: #efe6d4; color: #3a2f14; border-bottom: 2px solid #b89b52;
  padding: 10px 16px; font-size: 0.85rem; text-align: center; font-weight: 600;
  letter-spacing: 0.3px;
}
[data-theme="dark"] .offseasonbanner { background: #2b2417; color: #e8d9ae; border-bottom-color: #8a7434; }
.offseasonbanner a { color: inherit; }

.smsbanner {
  background: #1f2a3d; color: #e8ecf4; border-bottom: 2px solid #4a6fa5;
  padding: 10px 16px; font-size: 0.85rem; text-align: center; font-weight: 600;
  letter-spacing: 0.3px;
}
[data-theme="light"] .smsbanner { background: #dce7f5; color: #16233a; border-bottom-color: #7a9cc6; }

/* ---------- Global scrollbars (visible on any theme) ---------- */
html { scrollbar-width: thin; scrollbar-color: var(--red) var(--surface-2); }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--surface-2); }
::-webkit-scrollbar-thumb { background: var(--red); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--red-bright); }

/* ---------- Admin games table ---------- */
.tablewrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--red) var(--surface-2);
}
.tablewrap::-webkit-scrollbar { height: 12px; }
.tablewrap::-webkit-scrollbar-track { background: var(--surface-2); border-radius: 8px; }
.tablewrap::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; }
.tablewrap::-webkit-scrollbar-thumb:hover { background: var(--red); }

/* ---------- Pinned first columns (standings) ---------- */
table.pin th:nth-child(1), table.pin td:nth-child(1) {
  position: sticky; left: 0; z-index: 3;
  width: 150px; min-width: 150px; max-width: 150px;
  background: var(--bg-deep);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
table.pin th:nth-child(2), table.pin td:nth-child(2) {
  position: sticky; left: 150px; z-index: 3;
  width: 84px; min-width: 84px;
  background: var(--bg-deep);
}
table.pin td:nth-child(2) { box-shadow: 4px 0 8px -3px rgba(0,0,0,0.7); }
.weekfilter { margin-bottom: 14px; }

/* ---------- Player accordion (admin) ---------- */
.playerlist { list-style: none; padding: 0; margin: 0; }
.playerlist li { border-bottom: 1px solid var(--line); }
.playerlist li:last-child { border-bottom: none; }
.playerlist details { padding: 4px 0; }
.playerlist summary {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 6px; cursor: pointer; list-style: none;
}
.playerlist summary::-webkit-details-marker { display: none; }
.playerlist summary::before {
  content: '+'; color: var(--red); font-family: monospace; font-weight: bold; width: 14px;
}
.playerlist details[open] summary::before { content: '\2212'; }
.playerlist .pname { font-size: 1rem; }
.archived-summary {
  font-size: 0.95rem; color: var(--muted); cursor: pointer;
  padding: 6px 2px; list-style: none;
}
.archived-summary::-webkit-details-marker { display: none; }
.archived-summary::before { content: '\25B8\00A0\00A0'; }
details[open] > .archived-summary::before { content: '\25BE\00A0\00A0'; }
.badge {
  display: inline-block; padding: 2px 8px;
  border: 1px solid var(--border-strong); font-size: 0.62rem;
  letter-spacing: 2px; text-transform: uppercase;
}
.playeractions { padding: 8px 6px 12px 20px; }

/* ---------- Admin tabs ---------- */
.admintabs { display: flex; gap: 6px; margin-bottom: 18px; }
.tablink {
  display: inline-block; padding: 10px 26px;
  background: var(--bg-deep); color: var(--muted);
  border: 1px solid var(--line);
  font-family: 'Bebas Neue', sans-serif; font-size: 1rem; letter-spacing: 2px;
}
.tablink.active { color: var(--text); background: var(--bg); box-shadow: inset 0 3px 0 var(--red); }
.tablink:hover { color: var(--text); }

.tbdlab { flex-direction: row !important; align-items: center; gap: 8px; text-transform: none; letter-spacing: 1px; font-size: 0.8rem; color: var(--text-soft); }
.tbdlab .switch { margin-left: auto; }

/* ---------- Rules page ---------- */
.rules { list-style: none; padding: 0; margin: 0; }
.rules li { padding: 8px 0 8px 22px; position: relative; border-bottom: 1px solid var(--line); }
.rules li:last-child { border-bottom: none; }
.rules li::before { content: '\25C6'; color: var(--red); position: absolute; left: 2px; font-size: 0.7rem; top: 12px; }

/* ---------- Eliminated banner ---------- */
.elimbox {
  text-align: center; padding: 44px 24px 38px; margin-bottom: 26px;
  position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse at 50% -20%, rgba(var(--red-rgb),0.22), transparent 62%),
    var(--bg-deep);
  border: 1px solid var(--red-dim);
}
.elimbox::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(45deg,
    transparent 0 14px, rgba(var(--red-rgb),0.035) 14px 28px);
}
.elim-skull { font-size: 3rem; filter: grayscale(0.15); }
.elim-title {
  font-family: 'Bebas Neue', sans-serif; font-weight: 400;
  font-size: clamp(2.6rem, 7vw, 4rem); letter-spacing: 7px;
  color: var(--text); margin: 10px 0 6px; line-height: 1;
}
.elim-title span {
  color: var(--red);
  text-shadow: 0 0 22px rgba(var(--red-rgb),0.6);
  animation: elimpulse 2.4s ease-in-out infinite;
}
@keyframes elimpulse { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
.elim-sub { color: var(--muted); line-height: 1.7; margin-bottom: 20px; }

/* ---------- Global links ---------- */
a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-bright); text-decoration: underline; }

/* ---------- Champion banner ---------- */
.champbanner {
  padding: 14px 22px; margin-bottom: 22px;
  text-align: center; font-size: 1.05rem;
  background: linear-gradient(180deg, rgba(var(--gold-rgb),0.12), rgba(var(--gold-rgb),0.04));
  border: 1px solid rgba(var(--gold-rgb),0.45);
}

/* ---------- Champion screen (winner's own dashboard) ---------- */
.champbox {
  text-align: center; padding: 44px 24px 38px; margin-bottom: 26px;
  position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse at 50% -20%, rgba(var(--gold-rgb),0.25), transparent 62%),
    var(--bg-deep);
  border: 1px solid var(--gold-dim);
}
.champbox::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(45deg,
    transparent 0 14px, rgba(var(--gold-rgb),0.04) 14px 28px);
}
.champ-trophy { font-size: 3rem; filter: drop-shadow(0 0 18px rgba(var(--gold-rgb),0.55)); }
.champ-title {
  font-family: 'Bebas Neue', sans-serif; font-weight: 400;
  font-size: clamp(2.6rem, 7vw, 4rem); letter-spacing: 7px;
  color: var(--text); margin: 10px 0 6px; line-height: 1;
}
.champ-title span {
  color: var(--gold);
  text-shadow: 0 0 22px rgba(var(--gold-rgb),0.65);
  animation: champglow 2.4s ease-in-out infinite;
}
@keyframes champglow { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } }
.champ-sub { color: var(--muted); line-height: 1.7; margin-bottom: 20px; }

/* ---------- Past champions (off-season) ---------- */
.pastwinners { max-width: 560px; margin: 34px auto 0; text-align: left; }
.pastwinners h2 {
  font-family: 'Bebas Neue', sans-serif; letter-spacing: 4px;
  font-size: 1.3rem; color: var(--red); margin-bottom: 10px;
}
.pwrow { padding: 8px 0; border-bottom: 1px solid rgba(var(--tint),0.08); }
.pwy { display: inline-block; width: 64px; color: var(--muted); letter-spacing: 2px; }

/* roster checklist (season rollover / delete confirm) */
.rosterbox { border: 1px solid rgba(var(--tint),0.12); border-radius: 8px; padding: 12px 16px; margin-top: 14px; max-height: 320px; overflow-y: scroll; }
.rosterbox legend { color: var(--muted); font-size: 0.85rem; letter-spacing: 2px; text-transform: uppercase; padding: 0 8px; }
.rosterbox { scrollbar-width: thin; scrollbar-color: var(--red) var(--surface-2); }
.rosterbox::-webkit-scrollbar { width: 12px; }
.rosterbox::-webkit-scrollbar-track { background: var(--surface-2); border-radius: 8px; }
.rosterbox::-webkit-scrollbar-thumb { background: var(--red); border-radius: 8px; border: 2px solid var(--surface-2); }
.rosterbox::-webkit-scrollbar-thumb:hover { background: var(--red-bright); }
.rosterbox { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); column-gap: 24px; }
.rosterbox legend { grid-column: 1 / -1; }
.rosterbox .muted { grid-column: 1 / -1; }
.rosterrow { display: flex; align-items: center; gap: 10px; padding: 6px 2px; cursor: pointer; min-width: 0; flex-wrap: wrap; }
.rosterrow .switch { cursor: default; }

/* admin games — uniform result buttons */
.resrow { display: inline-flex; gap: 6px; flex-wrap: nowrap; }
.resrow input[type="hidden"] { display: none; }
.resbtn {
  flex: 0 0 auto; min-width: 84px;
  padding: 4px 12px !important; font-size: 0.7rem !important;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: transparent; border: 1px solid var(--border-strong); color: var(--text);
  letter-spacing: 1px; text-transform: none; cursor: pointer;
  transition: all .2s ease;
}
.resbtn:hover { border-color: var(--text); }
.resbtn-cancel { color: var(--muted); }
.resbtn-cancel:hover { border-color: var(--red); color: var(--red); }
.resbtn-clear { min-width: 0; padding: 4px 14px !important; color: var(--muted); }
.resbtn-clear:hover { border-color: var(--red); color: var(--red); }
/* Game rows: player-style accordion (whole row is the summary, actions drop below) */
.gamerow { border-bottom: 1px solid var(--line); padding: 2px 0; }
.gamerow:last-of-type { border-bottom: none; }
.gamerow-sum {
  display: grid; grid-template-columns: 26px 48px minmax(0,1fr) 190px 200px;
  align-items: center; gap: 10px;
  padding: 10px 6px; cursor: pointer; list-style: none; user-select: none;
}
.gamerow-sum::-webkit-details-marker { display: none; }
.gamerow-caret { font-family: monospace; font-weight: bold; color: var(--red); width: 14px; text-align: center; }
.gamerow-caret::before { content: '+'; }
.gamerow[open] .gamerow-caret::before { content: '\2212'; }
.gamerow-sum:hover .gamerow-caret::before { color: var(--text); }
.gamerow-cell { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gamerow-cell.c-ko { white-space: normal; overflow: visible; text-overflow: clip; }
/* resolved result badge: consistent style + centered for team / tie / canceled */
.c-res .resval { display: inline-block; min-width: 72px; text-align: center; padding: 3px 10px; border-radius: 8px; font-size: 0.72rem; letter-spacing: 1px; text-transform: uppercase; font-weight: 700; }
.resval-win { color: var(--ok-bright); border: 1px solid rgba(var(--ok-rgb),0.5); background: rgba(var(--ok-rgb),0.10); }
.resval-tie { color: var(--gold); border: 1px solid rgba(var(--gold-rgb),0.5); background: rgba(var(--gold-rgb),0.10); }
.resval-canceled { color: var(--muted); border: 1px solid var(--line); background: rgba(var(--tint),0.04); }
.c-res { text-align: center; }
.gamerow-body {
  display: none; grid-column: 2 / -1;
  padding: 4px 6px 12px 36px;
  align-items: center; gap: 8px;
}
.gamerow[open] .gamerow-body { display: flex; flex-wrap: wrap; }
.gamerow .resrow { margin: 0; }
/* non-pickable games: dimmed row + small tag in the matchup cell */
.gamerow.gp-nopick .gamerow-sum { opacity: 0.55; }
.gamerow.gp-nopick .gamerow-sum:hover { opacity: 0.85; }
.nopick-tag { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 8px; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.5px; color: var(--muted); border: 1px solid var(--line); background: rgba(var(--tint),0.05); }
/* games list container + header row (replaces the table) */
.games-grid { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.gamerow-head {
  display: grid; grid-template-columns: 26px 48px minmax(0,1fr) 190px 200px;
  gap: 10px; padding: 8px 6px;
  font-size: 0.62rem; letter-spacing: 2px; text-transform: uppercase; color: var(--muted);
  border-bottom: 1px solid var(--line); background: rgba(var(--tint),0.02);
}
.gamerow-head .gamerow-cell { white-space: nowrap; overflow: visible; text-overflow: clip; }


/* two-step delete confirmation — centered modal, no JS */
.card.confirmbox {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1200;
  width: min(460px, calc(100vw - 2rem));
  margin: 0;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
}
.confirmbox { border-color: var(--gold-strong) !important; }
.confirmbox h2 { color: var(--gold-strong); margin-top: 0; }
body:has(.card.confirmbox)::before {
  content: '';
  position: fixed;
  inset: 0;
  background: var(--overlay-scrim);
  z-index: 1100;
}
/* password-change dialog: centered modal, red-trimmed; scrim only while open */
.pwdlg {
  border-color: var(--red) !important;
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1200;
  width: min(460px, calc(100vw - 2rem));
  margin: 0;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
}
.pwdlg h2 { color: var(--red); margin-top: 0; }
body:has(#pwdialog:not([hidden]))::before {
  content: '';
  position: fixed;
  inset: 0;
  background: var(--overlay-scrim);
  z-index: 1100;
}
.cancelbtn { display: inline-block; background: transparent; border: 1px solid var(--border-strong); border-radius: 0; text-decoration: none; color: var(--text-soft); }
.cancelbtn:hover { background: rgba(var(--tint),0.08); border-color: var(--muted); color: var(--text); }

/* player-edit dialog: centered modal, gold-trimmed */
.editdlg {
  border-color: var(--gold-strong) !important;
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1200;
  width: min(420px, calc(100vw - 2rem));
  margin: 0;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
}
.editdlg h2 { color: var(--gold-strong); margin-top: 0; }
body:has(#editdlg:not([hidden]))::before {
  content: '';
  position: fixed;
  inset: 0;
  background: var(--overlay-scrim);
  z-index: 1100;
}
.editdlg .fld {
  display: block;
  margin: .6em 0;
  font-size: .85em;
  color: var(--muted);
}
.editdlg .fld input {
  display: block;
  width: 100%;
  margin-top: .25em;
  padding: .4em .6em;
  font-size: 1em;
  color: var(--text);
  background: var(--card-bg, rgba(255,255,255,.03));
  border: 1px solid var(--border-strong);
  border-radius: 3px;
}

/* ---------- Guide (markdown handbook) ---------- */
.mdoc { line-height: 1.6; }
.mdoc h1 { font-family: 'Bebas Neue', sans-serif; color: var(--red); letter-spacing: 1px; margin: 1.2em 0 .4em; }
.mdoc h2 { font-family: 'Bebas Neue', sans-serif; letter-spacing: 1px; border-bottom: 2px solid var(--red); padding-bottom: .25em; margin: 1.6em 0 .5em; }
.mdoc h3 { margin: 1.3em 0 .4em; color: var(--text-soft); }
.mdoc p { margin: .6em 0; }
.mdoc ul, .mdoc ol { margin: .5em 0 .9em 1.3em; }
.mdoc li { margin: .3em 0; }
.mdoc code { background: var(--code-bg); border: 1px solid var(--border-strong); border-radius: 3px; padding: .1em .35em; font-size: .92em; }
.mdoc a { color: var(--link); }
.mdoc hr { border: none; border-top: 1px solid var(--border-strong); margin: 1.8em 0; }
.mdoc table { border-collapse: collapse; width: 100%; margin: .8em 0 1.2em; }
.mdoc th, .mdoc td { border: 1px solid var(--border-strong); padding: .45em .7em; text-align: left; }
.mdoc th { background: var(--surface-3); font-weight: 500; text-transform: uppercase; font-size: .85em; letter-spacing: .04em; }

/* ---------- Acting-as banner ---------- */
.acting-banner {
  background: linear-gradient(90deg, var(--gold-strong) 0%, var(--gold-deep) 100%);
  color: var(--on-gold);
  padding: 12px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 500;
  font-size: 0.95em;
  border-bottom: 1px solid var(--gold-dark);
}
.acting-banner .acting-text { display: flex; align-items: center; gap: 10px; }
.acting-banner .acting-text strong { font-weight: 700; }
.acting-banner .stop-btn {
  background: rgba(0,0,0,0.2);
  color: var(--on-gold);
  border: 1px solid rgba(0,0,0,0.3);
  border-radius: 6px;
  padding: 6px 14px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9em;
}
.acting-banner .stop-btn:hover { background: rgba(0,0,0,0.3); }
.acting-pick-btn { border-color: var(--gold-strong) !important; }

/* ---------- settings toggles (pure-CSS switch) ---------- */
.setrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(var(--tint),0.03);
}
.setrow .settext p { margin: 4px 0 0; }
.switch { position: relative; display: inline-block; width: 52px; height: 28px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; inset: 0; cursor: pointer;
  background: rgba(var(--tint),0.15); border-radius: 28px;
  transition: background 0.2s;
}
.switch .slider::before {
  content: '';
  position: absolute; left: 3px; top: 3px;
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
}
.switch input:checked + .slider { background: var(--ok); }
.switch input:checked + .slider::before { transform: translateX(24px); }
.switch input:focus-visible + .slider { outline: 2px solid var(--gold-strong); }

/* pickable column + row toggle */
.pkval { font-weight: 600; font-size: 0.85em; }
.pkval.pk-yes { color: var(--ok); }
.pkval.pk-no { color: var(--danger); }
.pickrow { align-items: center; gap: 10px; }
.pickrow-label { font-weight: 600; color: var(--muted); font-size: 0.9em; }
