/* Bar Bytes — warm tavern dark theme built around the
   house rust/terracotta (#db594b) from thedistricttavern.com. */

:root {
  --bg:        #14100e;
  --bg-grain:  #191412;
  --surface:   #1f1a17;
  --surface-2: #2a2320;
  --surface-3: #362d29;
  --line:      #3d322d;
  --line-soft: #2e2724;

  --ink:       #f4ede7;
  --ink-dim:   #c3b3a8;
  --ink-mute:  #948379;

  --rust:      #db594b;
  --rust-deep: #b23f36;
  --rust-glow: rgba(219, 89, 75, 0.18);
  --amber:     #e0a458;
  --green:     #59a97b;
  --green-dim: rgba(89, 169, 123, 0.16);
  --red:       #c44e42;
  --red-dim:   rgba(196, 78, 66, 0.14);
  --blue:      #5b9bd5;
  --blue-dim:  rgba(91, 155, 213, 0.16);

  --radius:    14px;
  --radius-sm: 9px;
  --shadow:    0 10px 30px rgba(0, 0, 0, 0.45);

  --display: "Barlow Condensed", "Oswald", "Haettenschweiler",
             "Arial Narrow", system-ui, sans-serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
          Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background:
    radial-gradient(1100px 520px at 50% -12%, rgba(219, 89, 75, 0.13), transparent 70%),
    linear-gradient(180deg, var(--bg-grain), var(--bg) 45%);
  background-attachment: fixed;
}

a { color: var(--rust); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, .display {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.05;
  margin: 0 0 0.4em;
  text-transform: uppercase;
}

h1 { font-size: clamp(2rem, 6vw, 3.1rem); }
h2 { font-size: clamp(1.4rem, 3.6vw, 2rem); }
h3 { font-size: 1.15rem; letter-spacing: 0.04em; }

.wrap { max-width: 940px; margin: 0 auto; padding: 0 18px 72px; }
.stack > * + * { margin-top: 18px; }
.muted { color: var(--ink-mute); }
.dim { color: var(--ink-dim); }
.small { font-size: 0.86rem; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }

/* ------------------------------------------------------------ header */

.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(20, 16, 14, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}

.topbar-inner {
  max-width: 940px; margin: 0 auto; padding: 10px 18px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand:hover { text-decoration: none; }

.brand-mark {
  width: 36px; height: 36px; flex: none;
  display: grid; place-items: center;
  border: 2px solid var(--rust); border-radius: 8px;
  font-family: var(--display); font-size: 1.15rem; font-weight: 700;
  color: var(--rust); letter-spacing: -0.02em;
}

.brand-text { line-height: 1.05; }
.brand-name {
  font-family: var(--display); font-size: 1.24rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink);
}
.brand-sub {
  font-size: 0.68rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--rust);
}

nav.mainnav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }

nav.mainnav a {
  padding: 7px 12px; border-radius: 999px;
  font-family: var(--display); font-size: 1rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-dim);
}
nav.mainnav a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
nav.mainnav a.on { background: var(--rust); color: #fff; }

/* staff dashboard: every staff tool as a button */
.staff-tools {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
.staff-tools .btn { justify-content: center; text-align: center; }

/* --------------------------------------------- staff pick editor */
.pickrow { display: flex; gap: 8px; flex-wrap: wrap; }
.pickopt {
  position: relative; flex: 1 1 0; min-width: 5.5em; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 11px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface-2);
  font-family: var(--display); letter-spacing: 0.04em; color: var(--ink-dim);
  text-transform: uppercase;
}
.pickopt input { position: absolute; opacity: 0; width: 0; height: 0; }
.pickopt:hover { border-color: var(--rust); color: var(--ink); }
.pickopt.on { border-color: var(--rust); background: var(--rust); color: #fff; }
.pickopt.none { flex: 0 0 auto; min-width: 0; }

/* Staff: daily / weekly QR check-in switch */
.modepick { display: grid; gap: 10px; justify-items: start; }
.modeopt {
  display: flex; gap: 12px; align-items: flex-start; width: 100%;
  padding: 12px 14px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface-2);
  text-transform: none; letter-spacing: normal; font-family: var(--body, inherit);
  font-size: 0.95rem; font-weight: 400; color: var(--ink); margin: 0;
}
.modeopt strong { font-family: var(--display); letter-spacing: 0.06em; text-transform: uppercase; }
.modeopt input { margin-top: 4px; accent-color: var(--rust); }
.modeopt:hover { border-color: var(--rust); }
.modeopt.on, .modeopt:has(input:checked) { border-color: var(--rust); background: var(--rust-glow); }

.whoami {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.84rem; color: var(--ink-mute);
}
.whoami form { display: inline; }

/* ------------------------------------------------------------- cards */

.card {
  background: linear-gradient(180deg, var(--surface), #1b1613);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.card + .card { margin-top: 18px; }
.card-head {
  display: flex; align-items: baseline; gap: 12px;
  flex-wrap: wrap; margin-bottom: 14px;
}
.card-head h2, .card-head h3 { margin: 0; }
.card-head .spacer { margin-left: auto; }

.hero { text-align: center; padding: 30px 20px 26px; }
.hero .kicker {
  font-family: var(--display); letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--rust); font-size: 0.9rem; margin-bottom: 6px;
}
.hero p { color: var(--ink-dim); max-width: 46ch; margin: 0 auto; }

.rule {
  height: 1px; border: 0; margin: 22px 0;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

/* ------------------------------------------------------------ pieces */

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--surface-3); color: var(--ink-dim);
  border: 1px solid var(--line);
}
.pill.live { background: var(--rust); color: #fff; border-color: var(--rust); }
.pill.good { background: var(--green-dim); color: var(--green); border-color: var(--green); }
.pill.warn { background: var(--rust-glow); color: var(--rust); border-color: var(--rust-deep); }
.pill.gold { background: rgba(224, 164, 88, 0.14); color: var(--amber); border-color: #7a5a2e; }

/* My-picks result colors: green/right, red/wrong, grey/no-pick-on-a-past-game,
   blue/live-not-decided-yet, amber/picked-but-not-started-yet. */
.pill.wrong { background: var(--red-dim); color: var(--red); border-color: var(--red); }
.pill.miss { background: var(--surface-3); color: var(--ink-mute); border-color: var(--line); }
.pill.inplay { background: var(--blue-dim); color: var(--blue); border-color: var(--blue); }
.pill.pending { background: rgba(224, 164, 88, 0.14); color: var(--amber); border-color: #7a5a2e; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border: 0; border-radius: 999px; cursor: pointer;
  font-family: var(--display); font-size: 1.05rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  background: var(--rust); color: #fff;
  transition: transform 0.08s ease, background 0.15s ease;
}
.btn:hover { background: var(--rust-deep); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--ink-dim); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn.small { padding: 7px 14px; font-size: 0.86rem; letter-spacing: 0.06em; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.btn.danger { color: #c44e42; border-color: #c44e42; }
.btn.danger:hover { background: var(--red-dim); color: #c44e42; }

.btnrow { display: flex; gap: 10px; flex-wrap: wrap; }

/* ------------------------------------------------------------- forms */

label { display: block; font-size: 0.8rem; letter-spacing: 0.1em;
        text-transform: uppercase; color: var(--ink-mute); margin-bottom: 6px; }

input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="tel"], input[type="search"], select {
  width: 100%; padding: 12px 14px;
  background: #171310; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: 1rem; font-family: var(--body);
}
input:focus, select:focus {
  outline: none; border-color: var(--rust);
  box-shadow: 0 0 0 3px var(--rust-glow);
}

.field + .field { margin-top: 14px; }
.form-narrow { max-width: 420px; margin: 0 auto; }

.field-row { display: flex; gap: 14px; align-items: flex-start; }
.field-row .field { flex: 1 1 0; min-width: 0; margin-top: 0; }
.field-row + .field { margin-top: 14px; }

textarea {
  width: 100%; padding: 12px 14px;
  background: #171310; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: 1rem; font-family: var(--body); resize: vertical;
}
textarea:focus {
  outline: none; border-color: var(--rust);
  box-shadow: 0 0 0 3px var(--rust-glow);
}

/* Opt-in consent block: the box is unchecked by default and the disclosure
   sits right underneath it, not behind a link. */
.field.consent {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 13px 14px;
}

label.checkline {
  display: flex; align-items: center; gap: 10px; margin: 0; cursor: pointer;
  font-size: 0.98rem; letter-spacing: 0; text-transform: none;
  color: var(--ink); font-weight: 500;
}
label.checkline input[type="checkbox"] {
  width: 20px; height: 20px; flex: none; margin: 0;
  accent-color: var(--rust); cursor: pointer;
}

.staff-door { border-color: var(--rust-deep); }
.staff-door .brand-mark { width: 44px; height: 44px; font-size: 1.4rem; }

.code-input {
  font-family: var(--display); font-size: 2.2rem; letter-spacing: 0.35em;
  text-align: center; text-transform: uppercase;
}

/* ------------------------------------------------------- flash notes */

.flashes { margin: 16px 0 0; padding: 0; list-style: none; }
.flashes li {
  padding: 11px 16px; border-radius: var(--radius-sm);
  border-left: 3px solid var(--rust); background: var(--surface-2);
  font-size: 0.94rem; margin-bottom: 8px;
}
.flashes li.ok { border-left-color: var(--green); }

/* ------------------------------------------------------- pick sheet */

.game {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); overflow: hidden; margin-bottom: 12px;
}

.game-top {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 14px; background: var(--surface-2);
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.78rem; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--ink-mute);
}
.game-top .spacer { margin-left: auto; }

.matchup { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; }

.side {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 16px 14px; cursor: pointer; border: 0; background: none;
  text-align: left; width: 100%; color: inherit; font: inherit;
  transition: background 0.14s ease;
}
.side:hover { background: var(--surface-2); }
.side.right { flex-direction: row-reverse; text-align: right; }

.side input { position: absolute; opacity: 0; pointer-events: none; }

.side .logo { width: 42px; height: 42px; flex: none; object-fit: contain; }
.side .abbr {
  font-family: var(--display); font-size: 1.5rem; line-height: 1;
  letter-spacing: 0.03em;
}
.side .team { font-size: 0.78rem; color: var(--ink-mute); }
.side .rec { font-size: 0.74rem; color: var(--ink-mute); }

.side.picked { background: var(--rust-glow); box-shadow: inset 0 0 0 2px var(--rust); }
.side.picked .abbr { color: var(--rust); }
/* Once a game has a pick, the other side fades back; on a decided game with
   no pick, both do. Green is reserved for a pick that came in — the actual
   winner is marked with a "Winner" tag instead, picked or not. */
.game.has-pick .side:not(.picked),
.game.decided:not(.has-pick) .side {
  opacity: 0.42; filter: grayscale(1);
  transition: opacity 0.14s ease, filter 0.14s ease;
}
/* ...but a greyed-out winner stays readable enough to carry its tag. */
.game.has-pick .side.won:not(.picked),
.game.decided:not(.has-pick) .side.won { opacity: 0.8; }
.game.has-pick:not(.locked) .side:not(.picked):hover { opacity: 0.8; filter: none; }

.side.correct { box-shadow: inset 0 0 0 2px var(--green); background: var(--green-dim); }
.side.correct .abbr { color: var(--green); }
.side.wrong { box-shadow: inset 0 0 0 2px var(--red); background: var(--red-dim); }
.side.wrong .abbr { color: var(--red); }
.game.locked .side.correct:hover { background: var(--green-dim); }
.game.locked .side.wrong:hover { background: var(--red-dim); }

.wintag {
  display: inline-block; vertical-align: middle; margin: 0 6px;
  padding: 2px 7px; border-radius: 999px;
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; line-height: 1.3;
  color: var(--ink); background: var(--surface-3); border: 1px solid var(--ink-mute);
}
.side.correct .wintag { color: var(--green); border-color: var(--green); background: none; }

/* Not checked in yet: the matchup sits behind a frosted lock until the
   bar's QR or code is scanned. */
.matchwrap { position: relative; }
.game.gated .matchup { filter: blur(3px) grayscale(0.7); opacity: 0.55; pointer-events: none; user-select: none; }
.lockveil {
  position: absolute; inset: 0; padding: 0 12px; text-align: center;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: repeating-linear-gradient(-45deg,
    rgba(20, 16, 14, 0.55) 0 10px, rgba(20, 16, 14, 0.35) 10px 20px);
  color: var(--ink); text-decoration: none;
  font-family: var(--display); font-size: 1rem; letter-spacing: 0.1em;
  text-transform: uppercase;
}
a.lockveil:hover { text-decoration: none; background: rgba(219, 89, 75, 0.16); }
a.lockveil:hover .lockicon { stroke: #fff; background: var(--rust); }
.lockicon {
  width: 38px; height: 38px; padding: 8px; border-radius: 50%;
  fill: none; stroke: var(--rust); stroke-width: 2.2;
  stroke-linecap: round; stroke-linejoin: round;
  background: var(--surface); border: 1px solid var(--rust-deep);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}
div.lockveil { color: var(--ink-dim); }
div.lockveil .lockicon { stroke: var(--ink-mute); border-color: var(--line); }

.vs {
  display: grid; place-items: center; padding: 0 6px;
  font-family: var(--display); color: var(--ink-mute); font-size: 0.9rem;
  border-left: 1px solid var(--line-soft); border-right: 1px solid var(--line-soft);
  min-width: 54px;
}
.vs .score { font-size: 1.3rem; color: var(--ink); }

.game.locked .side { cursor: default; }
.game.locked .side:hover { background: none; }
.game.locked .side.picked:hover { background: var(--rust-glow); }

/* Day headers on the pick sheet — the slate is now read one day at a time. */
.daybar {
  display: flex; align-items: baseline; gap: 10px;
  margin: 22px 0 10px; padding: 8px 14px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-left: 3px solid var(--line);
  border-radius: var(--radius-sm);
}
.daybar.now { border-left-color: var(--rust); background: var(--rust-glow); }
.daybar-day {
  font-family: var(--display); font-size: 1.25rem;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.daybar .spacer { margin-left: auto; }

.daynote { margin: -4px 0 10px; padding: 0 4px; }

.game.locked .side.picked { opacity: 1; }

.sticky-save {
  position: sticky; bottom: 0; z-index: 30;
  margin: 18px -18px -18px; padding: 14px 18px;
  background: linear-gradient(180deg, rgba(20, 16, 14, 0), rgba(20, 16, 14, 0.96) 30%);
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.sticky-save .btn { flex: 1 1 auto; }

/* ---------------------------------------------------- results tabs */
/* CSS-only tabs (radio + label), so "All games" / "My picks" toggle
   without any JS. */

.tabgroup { position: relative; }
.tabradio { position: absolute; opacity: 0; pointer-events: none; }

.tabbar { display: flex; gap: 8px; margin-bottom: 14px; }
.tab {
  cursor: pointer; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent;
  font-family: var(--display); font-size: 0.86rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-dim); margin: 0;
}
.tab:hover { background: var(--surface-2); color: var(--ink); }

.tabpanel { display: none; }
#tab-all:checked ~ .tabbar label[for="tab-all"],
#tab-mine:checked ~ .tabbar label[for="tab-mine"] {
  background: var(--rust); color: #fff; border-color: var(--rust);
}
#tab-all:checked ~ #panel-all { display: block; }
#tab-mine:checked ~ #panel-mine { display: block; }

/* ------------------------------------------------------ leaderboard */

table.board { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
table.board th {
  text-align: left; padding: 8px 10px;
  font-family: var(--display); font-size: 0.86rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-mute);
  border-bottom: 1px solid var(--line);
}
table.board td { padding: 11px 10px; border-bottom: 1px solid var(--line-soft); }
table.board tr:last-child td { border-bottom: 0; }
table.board tr.me { background: var(--rust-glow); }
table.board td.num, table.board th.num { text-align: right; }

.rank {
  display: inline-grid; place-items: center;
  width: 28px; height: 28px; border-radius: 50%;
  font-family: var(--display); font-size: 1rem;
  background: var(--surface-3); color: var(--ink-dim);
}
.rank.r1 { background: var(--amber); color: #24190a; }
.rank.r2 { background: #b9b2ab; color: #1d1a17; }
.rank.r3 { background: #a5714a; color: #1d1108; }

.pts { font-family: var(--display); font-size: 1.35rem; }
/* Provisional points from games still in progress (live boards only). */
.livenote { margin: 10px 0 0; }
.tv-board .livepts { font-size: 0.85rem; }
.livepts {
  display: block; margin-top: 1px; white-space: nowrap;
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--blue);
}

.empty { text-align: center; padding: 34px 12px; color: var(--ink-mute); }

/* ------------------------------------------------------------ stats */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.stat {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px 14px;
}
.stat .n { font-family: var(--display); font-size: 1.9rem; line-height: 1; }
.stat .l {
  font-size: 0.7rem; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--ink-mute); margin-top: 4px;
}

/* -------------------------------------------------------- QR / codes */

.qr-card { text-align: center; }
.qr-card img { width: min(300px, 74vw); height: auto; border-radius: 10px; background: #fff; padding: 10px; }
.bigcode {
  font-family: var(--display); font-size: clamp(2rem, 7vw, 4.2rem);
  letter-spacing: 0.18em; color: var(--amber); margin: 6px 0 0;
  /* letter-spacing adds a trailing gap; pull it back so the code stays centred */
  padding-left: 0.18em;
  white-space: nowrap; overflow-wrap: normal;
}

/* ----------------------------------------------------- TV / display */

body.tv { overflow: hidden; }
body.tv main.wrap {
  max-width: none; padding: 0;
  display: flex; flex-direction: column; height: 100vh;
}
.tv-banner {
  flex: 0 0 auto; text-align: center; padding: 18px 0 0;
  font-family: var(--display); font-size: clamp(1.8rem, 4.2vw, 3.1rem);
  font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--amber); text-shadow: 0 0 18px rgba(224, 164, 88, 0.45);
}
.tv-pitch {
  margin: 4px 0 6px; padding-bottom: 14px; border-bottom: 1px solid var(--line);
}
.tv-pitch-title {
  font-family: var(--display); font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink); font-size: clamp(1.1rem, 1.8vw, 1.5rem);
  margin-bottom: 8px;
}
.tv-pitch-free {
  margin-top: 8px; font-family: var(--display); font-size: 0.78rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--amber);
}
.tv-qr { justify-content: center; }
.tv-qr img {
  width: 100%; max-width: 340px; margin: 0 auto;
  background: #fff; padding: 12px; border-radius: 12px;
}
.tv-qr .bigcode {
  font-size: clamp(1.6rem, 2.6vw, 2.9rem);
  letter-spacing: 0.14em; padding-left: 0.14em;
}
.tv-board { overflow: hidden; }
.tv-board .rank { width: 26px; height: 26px; font-size: 0.95rem; }

.tv-prizes {
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line);
  width: 100%;
}
.tv-prize-intro {
  margin: 0 0 10px; text-align: center; color: var(--ink-dim);
  font-size: 0.92rem; font-style: italic;
}
.tv-prize-line {
  margin: 0 0 6px; text-align: center; font-size: 1rem; color: var(--ink);
}
.tv-prize-label {
  display: inline-block; margin-right: 8px; padding: 2px 9px;
  border-radius: 999px; background: var(--amber); color: #24190a;
  font-family: var(--display); font-size: 0.72rem; letter-spacing: 0.1em;
  text-transform: uppercase; vertical-align: middle;
}

/* Prize box: 1st/2nd/3rd, shown under a standings board (season.html) and,
   in a more compact form, on the TV display next to the QR code. Reuses the
   .rank r1/r2/r3 medal colors so a prize tier reads as the same idea as a
   leaderboard rank. */
.prizebox {
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line);
}
.prizebox-title {
  font-family: var(--display); font-size: 0.86rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-dim); margin-bottom: 10px;
}
.prizebox-rows { display: flex; flex-direction: column; gap: 8px; }
.prizebox-row { display: flex; align-items: center; gap: 10px; }
.prizebox-row .rank { flex: none; width: 26px; height: 26px; font-size: 0.9rem; }
.prizebox-text { color: var(--ink); }

/* Compact variant for the TV display: two prize boxes side by side. */
.tv-prizes-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line);
}
.tv-prizes-grid .prizebox { margin-top: 0; padding-top: 0; border-top: none; }
.tv-prizes-grid .prizebox-title { text-align: center; }
.tv-prizes-grid .prizebox-row { font-size: 0.88rem; }
.tv-prizes-grid .prizebox-row .rank { width: 22px; height: 22px; font-size: 0.78rem; }

/* --------------------------------------------------------- printing */

@media print {
  body { background: #fff; color: #000; }
  .topbar, .noprint, footer { display: none !important; }
  .card { border: 0; box-shadow: none; background: #fff; color: #000; }
  .print-sign { text-align: center; }
  .print-sign img { width: 62vw; max-width: 460px; }
  .print-sign .bigcode { color: #000; }
  .print-sign h1 { color: #b23f36; }
}

/* ---------------------------------------------------------- footer */

footer {
  border-top: 1px solid var(--line-soft); margin-top: 40px; padding: 22px 18px 40px;
  text-align: center; color: var(--ink-mute); font-size: 0.84rem;
}

/* ---------------------------------------------------------- mobile */

@media (max-width: 600px) {
  .topbar-inner { padding: 8px 12px; gap: 8px; }
  .wrap { padding: 0 12px 80px; }
  .card { padding: 16px 14px; border-radius: 12px; }
  nav.mainnav { order: 3; width: 100%; margin-left: 0; justify-content: space-between; }
  nav.mainnav a { padding: 6px 9px; font-size: 0.94rem; }
  .whoami { margin-left: auto; }
  .side { padding: 13px 10px; gap: 9px; }
  .side .logo { width: 34px; height: 34px; }
  .side .abbr { font-size: 1.25rem; }
  .side .team { display: none; }
  .vs { min-width: 44px; font-size: 0.8rem; }
  .sticky-save { margin: 14px -14px -16px; }
  .field-row { flex-direction: column; gap: 14px; }
  .field-row .field + .field { margin-top: 0; }
  .tv-prizes-grid { grid-template-columns: 1fr; gap: 14px; }
}

@media (max-width: 1100px) {
  body.tv { overflow: auto; }
}

/* ------------------------------------------- TV display: score ticker */

@keyframes tkr-scroll {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(calc(-1 * var(--tkr-shift, 0px)), 0, 0); }
}
@keyframes tkr-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.28; }
}

/* ---------------------------------------------- District Tavern logo */

.brand-logo {
  width: 44px; height: 44px; object-fit: contain;
}
.staff-door .brand-logo { width: 44px; height: 44px; }

/* ------------------------- TV display: standings fill, prizes pinned below */
.tv-board .prizebox {
  flex: 0 0 auto; margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line);
}
.tv-board .prizebox-title { color: var(--amber); }
.tv-board .prizebox-row { font-size: 0.98rem; }
.tv-board .prizebox-row .rank { width: 24px; height: 24px; font-size: 0.85rem; }

/* ------------------------------------------ Staff: offline TV sign preview */

.tvsign-preview { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: #000; }
.tvsign-preview canvas { display: block; width: 100%; height: auto; }
.tvsign-status { padding: 8px 12px; border-top: 1px solid var(--line); background: var(--surface-2); }

/* ------------------------------------------------ Last week's winners */

.winners-card { border-color: #7a5a2e; }
.winners-list { display: flex; flex-direction: column; gap: 10px; }
.winner-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2);
}
.winner-row.me { outline: 1px solid var(--rust); }
.winner-row .rank { flex: none; }
.winner-name { font-weight: 600; flex: 1 1 auto; min-width: 0; }
.winner-prize { color: var(--amber); }

/* ---------------------------------------------------- Winner notices */

.prize-notice {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin: 16px 0 0; padding: 12px 16px; border-radius: var(--radius-sm);
  border: 1px solid #7a5a2e; background: rgba(224, 164, 88, 0.12);
}
.prize-notice-text { flex: 1 1 260px; }
.prize-notice strong { color: var(--amber); }

.prize-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.prize-item {
  padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--line);
}
.prize-item.ready { border-color: #7a5a2e; }
.prize-item-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.prize-item-title { font-weight: 600; flex: 1 1 auto; }
.prize-code {
  font-family: var(--display); font-weight: 700; letter-spacing: 0.14em;
  font-size: 1.5rem; color: var(--amber);
}
#prizes { scroll-margin-top: 90px; }  /* clear the sticky top bar when linked to */
