/**
 * DRUNKEN FOOTBALL MASTER — 2026
 * One stylesheet for the whole app.
 *
 * The DFM identity, carried over from the seasons before it:
 *   - the golden-hour stadium photograph behind everything
 *   - deep field-green translucent panels with thin white borders
 *   - Graduate (varsity letterman) type for names and rank stamps,
 *     tilted slightly like hand-stamped numbers
 *   - gold points, orange-ringed avatar faces
 *   - the navy ESPN-style ticker band
 *
 * It's one file driven by custom properties (the 2025 site spread this
 * across four stylesheets plus inline styles injected from JS). Built
 * mobile-first — the same pages work on a phone, which is what kills the
 * old desktop/mobile fork.
 */

@import url('https://fonts.googleapis.com/css2?family=Unica+One&family=Graduate&family=Open+Sans:wght@400;600;700&display=swap');

:root {
  /* Brand */
  --dfm-red:       #ef3a3a;
  --dfm-red-dark:  #c62b2b;
  --dfm-gold:      #ffd700;
  --dfm-amber:     #ffb100;
  --dfm-orange:    #f39c12;
  --dfm-green:     #2fbf71;
  --dfm-green-dk:  #1d8f52;
  --ticker-navy:   #002244;

  /* Surfaces — the field-green world */
  --panel:         rgba(30, 95, 15, 0.84);   /* the classic DFM panel, a pinch see-through */
  --panel-deep:    rgba(8, 18, 1, 0.71);     /* leaderboard rows */
  --panel-deeper:  rgba(6, 14, 1, 0.88);
  --surface-2:     rgba(14, 44, 8, 0.85);
  --surface-3:     rgba(42, 110, 26, 0.85);
  --line:          rgba(255, 255, 255, 0.85); /* thin white borders */
  --line-faint:    rgba(255, 255, 255, 0.18);

  /* Ink */
  --ink:           #f2f6fc;
  --ink-dim:       #d9e4d2;
  --ink-faint:     #a7bb9e;

  /* Type */
  --font-display:  'Unica One', system-ui, sans-serif;
  --font-stamp:    'Graduate', 'Unica One', serif;
  --font-body:     'Open Sans', system-ui, -apple-system, sans-serif;

  --radius:    15px;
  --radius-sm: 9px;
  --shadow:    0 10px 30px rgba(0, 0, 0, .5);
  --maxw:      1180px;
}

*, *::before, *::after { box-sizing: border-box; }

/* The whole app runs ~6% smaller than browser default — everything is
   rem-based, so this one line is the "reduce it all a nudge" dial. */
html { -webkit-text-size-adjust: 100%; font-size: 94%; }

/* TEXT SIZE setting (Me page). Normal = no attribute, so the 94% above
   stands. The inline <head> hook on every page sets html[data-text] from
   localStorage before this sheet loads; dfm-core owns the apply. The
   --text-scale var lets the few fixed-size pieces (podium stickers) opt out. */
html[data-text="lg"] { font-size: 108%; --text-scale: 1.15; }   /* Large ≈ +15% */
html[data-text="xl"] { font-size: 122%; --text-scale: 1.30; }
html[data-text="xxl"] { font-size: 136%; --text-scale: 1.45; }   /* Huge — for the reading-glasses crowd */   /* Extra large ≈ +30% */

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    linear-gradient(rgba(0, 10, 0, 0.25), rgba(0, 14, 0, 0.45)),
    url('../assets/images/dfmbg.jpg') no-repeat center center fixed,
    #0a1a06;
  background-size: cover, cover, auto;
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

/* The faint drifting bokeh from the old site — very subtle, never blocks clicks */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-repeat: no-repeat;
  background-size: 55% 55%, 60% 60%, 50% 50%, 65% 65%;
  background-position: 10% 20%, 85% 15%, 20% 80%, 75% 75%;
  opacity: .10;
  animation: bokehDrift 48s ease-in-out infinite alternate;
  background-image:
    radial-gradient(circle at center, rgba(255,255,255,.25) 0%, transparent 60%),
    radial-gradient(circle at center, rgba(255,240,180,.22) 0%, transparent 60%),
    radial-gradient(circle at center, rgba(190,240,200,.20) 0%, transparent 60%),
    radial-gradient(circle at center, rgba(190,210,255,.22) 0%, transparent 60%);
}

@keyframes bokehDrift {
  0%   { background-position: 10% 20%, 85% 15%, 20% 80%, 75% 75%; opacity: .08; }
  50%  { background-position: 14% 16%, 80% 22%, 24% 76%, 70% 82%; opacity: .12; }
  100% { background-position:  8% 24%, 88% 10%, 16% 84%, 78% 70%; opacity: .10; }
}

main, .nav { position: relative; z-index: 1; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  /* Unica One ships exactly one weight. Without this the browser fake-bolds
     it and the wordmark comes out looking like a different (wrong) font. */
  font-weight: 400;
  letter-spacing: .02em;
  line-height: 1.15;
  margin: 0 0 .5em;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, .4);
}

h1 { font-size: clamp(1.9rem, 5vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3.4vw, 2rem); }

a { color: var(--dfm-gold); }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(12px, 3vw, 28px);
}

/* ---------------------------------------------------------------- *
 * LOGO
 * ---------------------------------------------------------------- */

.site-logo {
  display: block;
  margin: 14px auto 4px;
  width: clamp(120px, 22vw, 180px);
  height: auto;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .5));
}

/* The crest, parked in the upper-left corner like the old site */
.corner-logo {
  position: absolute;
  top: 116px;                /* clears the sticky nav + ticker band */
  left: clamp(10px, 2vw, 30px);
  width: clamp(84px, 9vw, 140px);
  height: auto;
  z-index: 5;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .55));
  pointer-events: none;
}
@media (max-width: 1150px) { .corner-logo { display: none; } }

/* ---------------------------------------------------------------- *
 * NAV
 * ---------------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(6, 22, 2, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-faint);
  /* Home-screen app mode draws edge-to-edge under the iPhone status bar
     (clock/battery/Wi-Fi). This pushes the wordmark down past it — the bar
     floats over our dark green instead of over the logo. Apple's suggested
     inset is roomy, so we claw back 15px to tuck the header right beneath
     the bar; max() keeps it at zero in ordinary browsers. */
  padding-top: max(0px, calc(env(safe-area-inset-top, 0px) - 15px));
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 58px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-inner::-webkit-scrollbar { display: none; }

.nav-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-size: 1.18rem;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  margin-right: 6px;
}
.nav-brand img { width: 34px; height: auto; }
.nav-brand b { color: var(--dfm-gold); }

.nav a.nav-link {
  color: var(--ink-dim);
  text-decoration: none;
  font-size: .87rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.nav a.nav-link:hover { color: var(--ink); background: var(--surface-2); }
.nav a.nav-link[aria-current='page'] { color: var(--dfm-gold); background: var(--surface-2); }

.nav-spacer { flex: 1; }

/* ---------------------------------------------------------------- *
 * CARDS — the classic DFM green panel
 * ---------------------------------------------------------------- */

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(16px, 3vw, 26px);
  margin: 18px 0;
}

.card-tight { padding: clamp(12px, 2vw, 16px); }

.row      { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row-tight{ display: flex; gap: 8px;  align-items: center; }
.between  { justify-content: space-between; }
.grow     { flex: 1; }

.muted  { color: var(--ink-dim); }
.faint  { color: var(--ink-faint); font-size: .85rem; }
.center { text-align: center; }

/* ---------------------------------------------------------------- *
 * BUTTONS + CONTROLS
 * ---------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: 2px solid rgba(255, 255, 255, .9);
  border-radius: 10px;
  background: var(--surface-3);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform .1s, background .15s, opacity .15s;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, .35);
}
.btn:hover:not(:disabled) { background: rgba(56, 138, 36, .95); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary { background: var(--dfm-red); }
.btn-primary:hover:not(:disabled) { background: var(--dfm-red-dark); }

.btn-go { background: var(--dfm-green-dk); }
.btn-go:hover:not(:disabled) { background: var(--dfm-green); }

.btn-gold { background: var(--dfm-gold); color: #221a00; border-color: #fff; text-shadow: none; }
.btn-gold:hover:not(:disabled) { background: var(--dfm-amber); }

.btn-ghost { background: rgba(0, 0, 0, .25); border-color: rgba(255, 255, 255, .5); }
.btn-ghost:hover:not(:disabled) { background: rgba(0, 0, 0, .4); }

.btn-sm { padding: 7px 13px; font-size: .84rem; border-width: 1px; }

select, input[type='text'], input[type='email'],
input[type='password'], input[type='number'], textarea {
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, .55);
  background: rgba(0, 20, 0, .55);
  color: var(--ink);
  font: inherit;
  min-height: 42px;
}
select:focus, input:focus, textarea:focus { outline: 2px solid var(--dfm-gold); outline-offset: 1px; }

/* Our own chevron, with room to breathe — the native arrow renders jammed
   against the edge on some browsers. */
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23ffffff' stroke-opacity='.7' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 12px 8px;
}

/* A button riding in a form row matches the fields it sits beside; the
   select gives up width first so nothing ever runs off a phone screen. */
.row-tight .btn {
  white-space: nowrap;
  flex: 0 0 auto;
  min-height: 42px;
  padding: 10px 14px;
  font-size: .95rem;
  font-weight: 600;
  border-radius: 9px;
  border-width: 1px;
}
.row-tight select { flex: 1 1 auto; min-width: 0; }
/* Phones: a control row under a heading takes the full line and flexes
   INSIDE the page gutters instead of poking past the screen edge. */
@media (max-width: 860px) {
  .row.between > .row-tight { width: 100%; min-width: 0; }
}

label { font-size: .85rem; color: var(--ink-dim); font-weight: 600; }

/* ---------------------------------------------------------------- *
 * STATUS BANNERS
 * ---------------------------------------------------------------- */

.banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-faint);
  border-left: 4px solid var(--surface-3);
  background: var(--panel-deeper);
  margin: 12px 0;
  font-size: .93rem;
}
.banner-open   { border-left-color: var(--dfm-green); }
.banner-soon   { border-left-color: var(--dfm-gold); }
.banner-locked { border-left-color: var(--dfm-red); }
.banner-icon   { font-size: 1.3rem; line-height: 1; }

@media (max-width: 560px) {
  .banner { flex-wrap: wrap; }
  .banner .grow { flex-basis: calc(100% - 40px); }
}

.countdown {
  font-family: var(--font-stamp);
  font-size: 1.18rem;
  color: var(--dfm-gold);
  letter-spacing: .04em;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, .5);
}
.countdown.urgent { color: var(--dfm-red); }

/* ---------------------------------------------------------------- *
 * THE LOCK CLOCK — big scoreboard countdown
 * ---------------------------------------------------------------- *
 * Green while there's time, gold inside 2 days, pulsing red inside 1.
 * The colons blink like a real stadium clock.
 */

.clock {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  font-family: var(--font-display);
  line-height: 1;
  user-select: none;
}
.clock .seg { text-align: center; min-width: 2.1ch; }
.clock .seg b {
  display: block;
  font-weight: 400;
  font-size: 2.2rem;
  text-shadow: 0 0 16px currentColor, 1px 1px 2px rgba(0, 0, 0, .6);
  font-variant-numeric: tabular-nums;
}
.clock .seg small {
  display: block;
  font-family: var(--font-body);
  font-size: .55rem;
  letter-spacing: .12em;
  color: var(--ink-faint);
  margin-top: 3px;
}
/* Static colons — with the seconds already ticking, blinking was too busy */
.clock .colon {
  font-size: 1.9rem;
  padding-top: 1px;
  opacity: .65;
}

.clock.green { color: var(--dfm-green); }
.clock.amber { color: var(--dfm-gold); }
.clock.red   { color: var(--dfm-red); }
.clock.red .seg b { animation: redPulse 1s ease-in-out infinite; }
@keyframes redPulse { 50% { opacity: .5; } }

@media (max-width: 560px) {
  .clock .seg b { font-size: 1.5rem; }
  .clock .colon { font-size: 1.25rem; }
}

/* The locked state: a strip right across the bar */
.banner.lock-strip {
  display: block;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);          /* the same thin white frame as every card */
  background:
    repeating-linear-gradient(-45deg,
      rgba(239, 58, 58, .16) 0 14px, rgba(0, 0, 0, .28) 14px 28px),
    var(--panel-deeper);
}
.banner.lock-strip::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, .09) 50%, transparent 58%);
  background-size: 260% 100%;
  animation: lockSheen 5.5s linear infinite;
  pointer-events: none;
}
@keyframes lockSheen { from { background-position: 130% 0; } to { background-position: -130% 0; } }

.lock-strip-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.lock-title {
  font-family: var(--font-stamp);
  font-size: 1.08rem;
  letter-spacing: .05em;
  color: #fff;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, .7);
}
.lock-sub { font-size: .78rem; color: var(--ink-dim); }

/* ---------------------------------------------------------------- *
 * THE TICKER BAND
 * ---------------------------------------------------------------- */

.ticker-frame {
  display: block;
  width: 100%;
  height: 2.9rem;
  border: 0;
  border-top: 1px solid var(--line-faint);
  border-bottom: 1px solid var(--line-faint);
  background: var(--ticker-navy);
}

/* ---------------------------------------------------------------- *
 * THE PICK SHEET
 * ---------------------------------------------------------------- */

.day-header {
  font-family: var(--font-stamp);
  font-size: 1rem;
  color: var(--dfm-gold);
  text-transform: uppercase;
  letter-spacing: .09em;
  margin: 22px 0 9px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line-faint);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, .5);
}

.game {
  display: grid;
  grid-template-columns: 1fr minmax(46px, auto) 1fr;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 10px;
}

.side {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 2px solid rgba(255, 255, 255, .35);
  /* Nearly opaque — the sunset background must never wash out the sheet */
  background: rgba(7, 16, 2, .93);
  cursor: pointer;
  transition: border-color .14s, background .14s, transform .1s;
  text-align: left;
  font: inherit;
  color: var(--ink);
  width: 100%;
  min-height: 62px;
}
.side:hover:not(:disabled) { border-color: rgba(255, 255, 255, .8); }
.side:active:not(:disabled) { transform: scale(.99); }

/* Your pick reads SOLID: filled green, gold edge, no ambiguity at a glance */
.side.picked {
  border-color: var(--dfm-gold);
  border-width: 2px;
  background: linear-gradient(135deg, #1d6b32 0%, #14501f 100%);
  box-shadow: 0 0 0 1px rgba(255, 215, 0, .35), 0 3px 10px rgba(0, 0, 0, .45);
}
.side.picked .side-name { color: #fff; }
.side.picked .side-pts { background: rgba(0, 0, 0, .5); }

/* The team you passed on: still fully readable, just clearly dimmed */
.side.faded {
  opacity: 1;
  background: rgba(7, 16, 2, .82);
  border-color: rgba(255, 255, 255, .14);
}
.side.faded .side-name, .side.faded .side-rec { color: var(--ink-faint); }
.side.faded .side-pts { color: var(--ink-faint); }
.side.faded .side-logo { filter: grayscale(.8) brightness(.7); }
.side:disabled { cursor: default; }

.side.home { flex-direction: row-reverse; text-align: right; }

.side-logo { width: 34px; height: 34px; object-fit: contain; flex-shrink: 0; }

.side-name { font-weight: 700; font-size: .95rem; line-height: 1.2; }
.side-rec  { font-size: .76rem; color: var(--ink-faint); }

.side-pts {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 3px 7px;
  border-radius: 8px;
  background: rgba(0, 0, 0, .4);
  font-family: var(--font-stamp);
  font-size: 1.22rem;
  line-height: 1;
  color: var(--dfm-gold);
}
.side.home .side-pts { margin-left: 0; margin-right: auto; }
.side-pts small {
  font-family: var(--font-body);
  font-size: .54rem;
  letter-spacing: .07em;
  color: var(--ink-faint);
  margin-top: 2px;
}
.side-pts.big { color: var(--dfm-red); }

.vs {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--ink-dim);
  font-family: var(--font-display);
  font-size: 1rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, .5);
}
.vs .kick { font-family: var(--font-body); font-size: .62rem; margin-top: 3px; white-space: nowrap; }

.side.won  { border-color: var(--dfm-green); }
.side.lost { opacity: .5; }
.side-score {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--ink);
  min-width: 28px;
  text-align: center;
}

@media (max-width: 560px) {
  .game { grid-template-columns: 1fr minmax(38px, auto) 1fr; gap: 6px; }
  .side { padding: 10px; gap: 7px; min-height: 58px; }
  .side-name { font-size: .81rem; }
  .side-logo { width: 27px; height: 27px; }
  .side-pts { font-size: 1.05rem; min-width: 34px; }
}

/* ---------------------------------------------------------------- *
 * STICKY SUBMIT BAR
 * ---------------------------------------------------------------- */

.submitbar {
  position: sticky;
  bottom: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 13px clamp(12px, 3vw, 20px);
  margin-top: 18px;
  background: rgba(6, 22, 2, .96);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line-faint);
  border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
}

/* The points-at-stake counter: its own big boxed number that pulses
   every time a pick changes what's on the line. */
.tally-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  padding: 6px 16px 8px;
  border-radius: 12px;
  border: 2px solid var(--dfm-gold);
  background: rgba(0, 0, 0, .5);
  box-shadow: 0 0 12px rgba(255, 215, 0, .15);
}
.tally-box #tallyPts {
  font-family: var(--font-display);
  font-size: 2.5rem;
  line-height: 1;
  color: var(--dfm-gold);
  text-shadow: 0 0 14px rgba(255, 215, 0, .35);
}
.tally-box small {
  font-family: var(--font-body);
  font-size: .6rem;
  letter-spacing: .1em;
  color: var(--ink-faint);
  margin-top: 3px;
}
.tally-box.tick #tallyPts { animation: tallyTick .45s ease-out; }
@keyframes tallyTick {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.22); color: #fff; text-shadow: 0 0 20px rgba(255, 215, 0, .9); }
  100% { transform: scale(1); }
}

.progress {
  flex: 1;
  min-width: 110px;
  height: 7px;
  border-radius: 4px;
  background: rgba(0, 0, 0, .45);
  overflow: hidden;
}
.progress > i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--dfm-gold);
  transition: width .25s;
}

/* ---------------------------------------------------------------- *
 * LEADERBOARD — the classic look: stamps, faces, gold points
 * ---------------------------------------------------------------- */

.board { display: flex; flex-direction: column; gap: 4px; }

.board-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 8px;
  border-radius: 3px;
  background: var(--panel-deep);
  transition: background .2s;
  min-height: 34px;
}
.board-row:hover { background: var(--panel-deeper); }
.board-row.me { outline: 1px solid rgba(255, 215, 0, .55); }

/* The hand-stamped rank: Graduate, gold, tilted. JS assigns each row a
   random tilt via --tilt, like the old site's rotate(±8deg). Never wraps —
   a two-line "T-1ST" is what made the old rows balloon. */
.board-rank {
  font-family: var(--font-stamp);
  font-size: .98rem;
  color: var(--dfm-gold);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, .6);
  flex: 0 0 3.8em;
  text-align: center;
  white-space: nowrap;
  transform: rotate(var(--tilt, -8deg));
}

.board-face {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex: 0 0 24px;
  border: 1.5px solid var(--dfm-orange);
  object-fit: cover;
  cursor: pointer;
  background: #0a1a06;
}

.board-name {
  font-family: var(--font-stamp);
  font-size: .98rem;
  color: #ecf0f1;
  /* The cant stays — the translateY is an optical correction: Graduate's
     glyphs sit low in their box, so a mathematically centered name LOOKS
     sunk beside the round face. Two pixels of lift re-centers the eye. */
  transform: rotate(-2deg) translateY(-4px);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, .6);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  line-height: 1.2;
}

.board-sub { font-size: .72rem; color: var(--ink-faint); font-family: var(--font-body); }

.board-pts {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--dfm-amber);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, .6);
  flex: 0 0 auto;
  text-align: right;
  line-height: 1;
}

/* ---------------------------------------------------------------- *
 * THE PODIUM — top five, down on the field
 * ---------------------------------------------------------------- *
 * Faithful port of the old site's favourite feature: the week's top five
 * standing on a night field under the lights. 1st is front and center and
 * biggest; 2nd–5th stagger back smaller on alternating sides.
 */

.podium-container {
  position: relative;
  width: min(76%, 800px);
  aspect-ratio: 800 / 130;
  background: url('../assets/images/podium.png') no-repeat center center;
  background-size: 100% 100%;
  border-radius: 40px;
  margin: 18px auto 6px;
  border: 1px solid rgba(255, 255, 255, .9);
  overflow: visible;
  box-shadow: var(--shadow);
}

.podium-profile {
  position: absolute;
  border-radius: 50%;
  border: 2px solid var(--dfm-gold);
  background-color: #123;
  background-size: cover;
  background-position: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, .5);
  cursor: pointer;
  /* scale() only — position comes from left/right/top, never transform,
     so the hover can't shove anyone sideways */
  transition: scale .15s;
}
.podium-profile:hover { scale: 1.06; }

/* Name tags: art-directed into each slot's negative space, like stickers
   slapped around the trophy case. Base style here; placement per slot. */
.podium-name {
  position: absolute;
  color: #fff;
  font-family: var(--font-stamp);
  font-size: calc(.62rem / var(--text-scale, 1));
  text-align: center;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, .7);
  background: rgba(0, 0, 0, .78);
  padding: 1px 8px;
  border-radius: 3px;
  white-space: nowrap;
  z-index: 6;
}

/* Percent-based versions of the old pixel layout, so it scales.
   p1 is centred with left/margin, NOT a transform (see hover note above). */
.podium-p1 { width: 15%;   aspect-ratio: 1; top: 4%;  left: 42.5%; z-index: 5; }
.podium-p2 { width: 12.5%; aspect-ratio: 1; top: 12%; left: 28%;   z-index: 4; }
.podium-p3 { width: 11%;   aspect-ratio: 1; top: 22%; right: 27%;  z-index: 3; }
.podium-p4 { width: 9%;    aspect-ratio: 1; top: 34%; left: 15%;   z-index: 2; }
.podium-p5 { width: 7.5%;  aspect-ratio: 1; top: 46%; right: 15%;  z-index: 1; }

/* 1st (center): bigger, laid across the front at the bottom — presenting */
.podium-p1 .podium-name {
  left: 50%;
  bottom: 2%;
  transform: translateX(-50%) rotate(-3deg);
  font-size: calc(.82rem / var(--text-scale, 1));
  max-width: 160%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 2nd (inner left): tag hangs under the circle, clear of 1st's photo */
.podium-p2 .podium-name {
  left: 50%;
  bottom: -16%;
  transform: translateX(-54%) rotate(4deg);
  max-width: 150%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 3rd (inner right): same, mirrored */
.podium-p3 .podium-name {
  left: 50%;
  bottom: -16%;
  transform: translateX(-46%) rotate(-4deg);
  max-width: 150%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 4th (far left): up and to the LEFT, kept short so it never reaches 2nd */
.podium-p4 .podium-name {
  right: 55%;
  top: -10%;
  transform: rotate(-6deg);
  max-width: 150%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 5th (far right): spelled out fully in the open field to the right */
.podium-p5 .podium-name {
  left: 96%;
  top: 38%;
  transform: rotate(-4deg);
  max-width: none;
}

@media (max-width: 700px) {
  .podium-container { width: 94%; border-radius: 22px; }
  .podium-name { font-size: calc(.48rem / var(--text-scale, 1)); }
  .podium-p1 .podium-name { font-size: calc(.6rem / var(--text-scale, 1)); }
}

/* Profile pop-up when a face is clicked */
.profile-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .7);
  opacity: 0;
  transition: opacity .2s;
}
.profile-modal.show { opacity: 1; }
.profile-modal .modal-content {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
  max-width: 320px;
  position: relative;
  /* Phones: a 16-game receipt is tall — cap it to the screen and scroll
     inside, and always leave the ✕ reachable. */
  max-height: 86vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.profile-modal img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--dfm-orange);
}
.profile-modal p {
  font-family: var(--font-stamp);
  font-size: 1.2rem;
  margin: 12px 0 0;
}

/* ---------------------------------------------------------------- *
 * SMACK TALK — text-message style
 * ---------------------------------------------------------------- *
 * Your messages sit on the RIGHT in your own color, everyone else's on the
 * left with their tiny leaderboard face. Usernames, never real names.
 */

.chat-box {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.chat-scroll {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 6px 4px 2px;
  min-height: 0;
}
.chat-scroll::-webkit-scrollbar { width: 7px; }
.chat-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,.25); border-radius: 4px; }

.chat-msg {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  max-width: 86%;
}
.chat-msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.chat-msg.theirs { align-self: flex-start; }

.chat-face {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--dfm-orange);
  object-fit: cover;
  flex: 0 0 22px;
  background: #0a1a06;
  margin-bottom: 2px;
}

.bubble {
  border-radius: 14px;
  padding: 7px 12px 6px;
  font-size: .89rem;
  overflow-wrap: anywhere;
  min-width: 0;
}
.chat-msg.theirs .bubble {
  background: var(--panel-deep);
  border: 1px solid var(--line-faint);
  border-bottom-left-radius: 4px;
}
.chat-msg.mine .bubble {
  background: linear-gradient(135deg, #1d6b32, #14501f);
  border: 1px solid rgba(255, 215, 0, .35);
  border-bottom-right-radius: 4px;
}

.bubble .who {
  display: block;
  font-family: var(--font-stamp);
  font-size: .72rem;
  color: var(--dfm-gold);
  margin-bottom: 2px;
}
.chat-msg.mine .bubble .who { color: #8ff0bb; text-align: right; }

.bubble .when {
  display: block;
  font-size: .62rem;
  color: var(--ink-faint);
  margin-top: 3px;
  text-align: right;
}

.bubble .chat-media {
  display: block;
  max-width: min(240px, 100%);
  max-height: 240px;
  border-radius: 9px;
  margin-top: 4px;
  cursor: pointer;
}

/* Placeholder box painted while the snapshot's stripped photo waits for the
   live feed — same footprint as a small photo so the feed doesn't jump. */
.bubble .chat-media-loading {
  width: 140px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: rgba(0, 0, 0, .25);
  border: 1px dashed rgba(255, 255, 255, .18);
  cursor: default;
  animation: chatMediaPulse 1.2s ease-in-out infinite;
}
@keyframes chatMediaPulse { 50% { opacity: .55; } }

/* History controls pinned at the top of the feed. */
.chat-more {
  align-self: center;
  margin: 2px auto 8px;
  display: block;
  font-family: 'Graduate', serif;
  font-size: .72rem;
  letter-spacing: .06em;
  color: var(--ink-faint);
  background: rgba(0, 0, 0, .28);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
}
.chat-more:disabled { opacity: .55; cursor: wait; }

.chat-top-note {
  text-align: center;
  font-family: Georgia, serif;
  font-style: italic;
  font-size: .72rem;
  color: var(--ink-faint);
  margin: 4px 0 10px;
}

/* ---------------------------------------------------------------- *
 * SCROLLBARS — the wide tables scroll in DFM colors, not OS gray
 * ---------------------------------------------------------------- */

.scroll-x { scrollbar-width: thin; scrollbar-color: rgba(255, 215, 0, .45) rgba(0, 0, 0, .3); }
.scroll-x::-webkit-scrollbar { height: 8px; }
.scroll-x::-webkit-scrollbar-track { background: rgba(0, 0, 0, .3); border-radius: 999px; }
.scroll-x::-webkit-scrollbar-thumb {
  background: rgba(255, 215, 0, .45);
  border-radius: 999px;
  border: 2px solid rgba(6, 22, 2, .8);
}
.scroll-x::-webkit-scrollbar-thumb:hover { background: rgba(255, 215, 0, .7); }

/* Everyone's Picks grid: the little faces ride with the names */
.grid-who { white-space: nowrap; }
.grid-face {
  width: 22px; height: 22px; border-radius: 50%; object-fit: cover;
  border: 1.5px solid var(--dfm-orange); vertical-align: -6px; margin-right: 6px;
  background: #0a1a06;
}

/* ---------------------------------------------------------------- *
 * DASHBOARD CALLOUT — status left, clock + action stacked right
 * ---------------------------------------------------------------- */

.callout2 {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: space-between;
  gap: 14px;
}
.callout2 .co-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}
.callout2 .co-status { font-size: 1.04rem; }
.callout2 .co-lock { font-size: .8rem; line-height: 1.4; }
.callout2 .co-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 9px;
  flex: 0 0 auto;
}
.callout2 .co-right .btn { min-width: 112px; text-align: center; }
.callout2 .clock .seg b { font-size: 1.35rem; }
.callout2 .clock .colon { font-size: 1rem; }

/* ---------------------------------------------------------------- *
 * ADD-TO-HOME-SCREEN COACH (js/add-to-home.js) — iPhone browsers only
 * ---------------------------------------------------------------- */

.a2hs {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(78px + env(safe-area-inset-bottom, 0px));
  z-index: 120;
  background: rgba(6, 22, 2, .97);
  border: 1px solid var(--dfm-gold);
  border-radius: 14px;
  padding: 12px 40px 13px 15px;
  box-shadow: 0 10px 34px rgba(0, 0, 0, .55);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .35s, transform .35s;
}
.a2hs.show { opacity: 1; transform: none; }
.a2hs-title {
  font-family: var(--font-stamp);
  font-size: .95rem;
  letter-spacing: .04em;
  color: var(--dfm-gold);
}
.a2hs-body {
  margin-top: 4px;
  font-size: .84rem;
  line-height: 1.5;
  color: var(--ink-dim);
}
.a2hs-share {
  width: 16px;
  height: 16px;
  vertical-align: -3px;
  color: #58a6ff;   /* iOS share-button blue, so eyes match the glyph */
}
.a2hs-close {
  position: absolute;
  top: 4px;
  right: 4px;
  background: none;
  border: 0;
  color: var(--ink-faint);
  font-size: 1rem;
  padding: 8px;
  cursor: pointer;
}
.a2hs-arrow {
  position: absolute;
  left: 50%;
  bottom: -40px;
  line-height: 0;
  color: var(--dfm-gold);   /* the SVG inherits this — no emoji substitution */
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .85));
  animation: a2hsBounce 1.15s ease-in-out infinite;
}
@keyframes a2hsBounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 9px); }
}
@media (prefers-reduced-motion: reduce) { .a2hs-arrow { animation: none; } }

/* ---------------------------------------------------------------- *
 * DFM DIALOGS (js/dfm-modal.js) — in-app confirm/prompt
 * ---------------------------------------------------------------- */

.dfm-dialog .dlg-title {
  font-family: var(--font-stamp);
  font-size: 1.15rem;
  letter-spacing: .04em;
  margin: 0 0 8px;
}
.dfm-dialog .dlg-body {
  color: var(--ink-dim);
  font-size: .88rem;
  line-height: 1.45;
  margin: 0 0 12px;
}
.dfm-dialog .dlg-input {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 14px;
}
.dfm-dialog .dlg-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.dfm-dialog .dlg-danger {
  background: var(--dfm-red);
  border-color: var(--dfm-red);
  color: #fff;
}

.chat-form { display: flex; gap: 7px; margin-top: 10px; align-items: center; }
.chat-form input[type='text'] { flex: 1; min-width: 0; }

.attach-btn {
  flex: 0 0 auto;
  font-size: 1.15rem;
  padding: 8px 11px;
  line-height: 1;
}

.attach-preview {
  display: none;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 9px;
  background: var(--panel-deep);
  font-size: .78rem;
  color: var(--ink-dim);
}
.attach-preview.show { display: flex; }
.attach-preview img { width: 38px; height: 38px; border-radius: 6px; object-fit: cover; }
.attach-preview .x { margin-left: auto; cursor: pointer; color: var(--dfm-red); font-weight: 700; }

/* Leaderboard + chat panels: both start at the same classic height, and on
   desktop each one can be pulled taller from its bottom-right corner. They
   resize independently — stretching one never inflates the other. */
.dash-split {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.dash-split > .card {
  display: flex;
  flex-direction: column;
  height: 640px;
  margin: 0;
}
@media (min-width: 861px) {
  .dash-split { flex-direction: row; align-items: flex-start; }
  .dash-split > .card.lb {
    resize: both;
    overflow: hidden;
    width: 48%;
    min-width: 300px;
    max-width: 72vw;
    min-height: 420px;
    max-height: 88vh;
    height: 670px;   /* a touch taller than the chat — more faces above the fold */
  }
  .dash-split > .card.st {
    flex: 1;
    min-width: 260px;
    resize: vertical;
    overflow: hidden;
    min-height: 420px;
    max-height: 88vh;
  }
}
@media (max-width: 860px) {
  .dash-split > .card { height: auto; max-height: 560px; }
}
.board-scroll {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding-right: 4px;
}
.board-scroll::-webkit-scrollbar { width: 7px; }
.board-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,.25); border-radius: 4px; }

/* ---------------------------------------------------------------- *
 * MINI PICK CARDS — the receipt
 * ---------------------------------------------------------------- *
 * A shrunken pick-sheet row: both teams, the chosen side lit up, the value,
 * and a ✓/✗ once the game is final. Used on the profile's week history and
 * in the player pop-up on the leaderboard after lock.
 */

.mini-game {
  display: grid;
  grid-template-columns: 1fr 22px 1fr 52px;
  gap: 6px;
  align-items: center;
  padding: 4px 2px;
  border-bottom: 1px solid var(--line-faint);
}
.mini-game:last-child { border-bottom: 0; }

.mini-side {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 7px;
  border: 1.5px solid transparent;
  font-size: .8rem;
  color: var(--ink-faint);
  min-width: 0;
}
.mini-side.home { flex-direction: row-reverse; text-align: right; }
.mini-side img { width: 20px; height: 20px; object-fit: contain; flex-shrink: 0; }
.mini-side b { font-weight: 700; }
.mini-side i {
  font-style: normal;
  font-family: var(--font-display);
  font-size: .85rem;
  margin-left: 3px;
}

.mini-side.picked {
  background: linear-gradient(135deg, #1d6b32, #14501f);
  border-color: rgba(255, 215, 0, .55);
  color: #fff;
}
.mini-side.picked.won  { border-color: var(--dfm-green); }
/* A wrong pick bleeds red INSIDE the chip, not just at the border —
 * right and wrong must read from across the bar. */
.mini-side.picked.lost {
  background: linear-gradient(135deg, #7a1f1f, #4d1212);
  border-color: rgba(239, 58, 58, .7);
  opacity: .9;
}

.mini-at {
  text-align: center;
  color: var(--ink-faint);
  font-size: .7rem;
}

.mini-mark {
  text-align: right;
  font-family: var(--font-display);
  font-size: .95rem;
}
.mini-mark.hit     { color: var(--dfm-green); }
.mini-mark.miss    { color: var(--dfm-red); }
.mini-mark.tie     { color: var(--dfm-gold); font-size: .7rem; }
.mini-mark.worth   { color: var(--dfm-gold); }
.mini-mark.worth small { font-size: .55rem; color: var(--ink-faint); margin-left: 2px; }
.mini-mark.pending, .mini-mark.none { color: var(--ink-faint); }

/* The player receipt pop-up (leaderboard click, post-lock) */
.receipt-modal .modal-content {
  max-width: min(94vw, 430px);
  width: 100%;
  text-align: left;
  max-height: 84vh;
  overflow-y: auto;
}
.receipt-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.receipt-head img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--dfm-orange);
}
.receipt-head .rname { font-family: var(--font-stamp); font-size: 1.15rem; }
.receipt-head .rsub  { font-size: .75rem; color: var(--ink-faint); }

/* ---------------------------------------------------------------- *
 * TABLES
 * ---------------------------------------------------------------- */

.tbl { width: 100%; border-collapse: collapse; font-size: .89rem; }
.tbl th {
  text-align: left;
  padding: 9px 11px;
  color: var(--ink-dim);
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  border-bottom: 1px solid rgba(255, 255, 255, .4);
  white-space: nowrap;
}
.tbl td { padding: 9px 11px; border-bottom: 1px solid var(--line-faint); }
.tbl tr:hover td { background: rgba(0, 0, 0, .25); }

.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  background: rgba(0, 0, 0, .4);
  color: var(--ink-dim);
}
.pill-go   { background: rgba(47, 191, 113, .25); color: #8ff0bb; }
.pill-stop { background: rgba(239, 58, 58, .25);  color: #ffabab; }
.pill-wait { background: rgba(255, 215, 0, .18);  color: var(--dfm-gold); }
.pill-pre  { background: rgba(120, 140, 255, .22); color: #b9c4ff; }

/* ---------------------------------------------------------------- *
 * MISC
 * ---------------------------------------------------------------- */

/* ---------------------------------------------------------------- *
 * SUBMIT SPLASH — the big collegiate stamp
 * ---------------------------------------------------------------- *
 * Slams in over a dimmed, blurred board when picks go in. Click, or wait
 * a couple of seconds, and you're carried back to the leaderboard.
 */

.submit-splash {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 12, 2, .55);
  backdrop-filter: blur(6px) saturate(.8);
  -webkit-backdrop-filter: blur(6px) saturate(.8);
  cursor: pointer;
  animation: splashDim .25s ease-out;
}
@keyframes splashDim { from { background: rgba(4, 12, 2, 0); backdrop-filter: blur(0); } }

.splash-stamp {
  /* --tilt is randomized per submit by the page, so every stamp lands
     at its own angle */
  transform: rotate(var(--tilt, -7deg));
  text-align: center;
  padding: 26px 44px;
  border: 5px double var(--dfm-gold);
  border-radius: 14px;
  background: rgba(10, 40, 6, .92);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .65), 0 0 40px rgba(255, 215, 0, .18);
  animation: stampSlam .5s cubic-bezier(.2, 1.4, .4, 1);
}
@keyframes stampSlam {
  0%   { transform: rotate(calc(var(--tilt, -7deg) - 13deg)) scale(3.2); opacity: 0; }
  60%  { transform: rotate(calc(var(--tilt, -7deg) + 2deg)) scale(.95); opacity: 1; }
  100% { transform: rotate(var(--tilt, -7deg)) scale(1); }
}
.splash-stamp .line1 {
  font-family: var(--font-stamp);
  font-size: clamp(1.6rem, 5.5vw, 3rem);
  letter-spacing: .06em;
  color: var(--dfm-gold);
  text-shadow: 2px 3px 0 rgba(0, 0, 0, .6);
}
.splash-stamp .line2 {
  font-family: var(--font-body);
  font-size: .8rem;
  color: var(--ink-dim);
  margin-top: 8px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 400;
  padding: 13px 22px;
  border-radius: 11px;
  background: var(--surface-3);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font-weight: 700;
  animation: rise .25s ease-out;
}
.toast-bad  { background: var(--dfm-red-dark); }
.toast-good { background: var(--dfm-green-dk); }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 14px); } }

/* The spinner stays INVISIBLE for its first 400ms. Anything painting from
   the session cache lands well inside that window, so tab hops never blink
   a loading circle — the ring only ever appears for a genuine network wait. */
.spinner {
  width: 26px; height: 26px;
  border: 3px solid rgba(255, 255, 255, .25);
  border-top-color: var(--dfm-gold);
  border-radius: 50%;
  opacity: 0;
  animation: spin .8s linear infinite, spinnerReveal .3s ease .4s forwards;
  margin: 34px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spinnerReveal { to { opacity: 1; } }

.empty { text-align: center; padding: 40px 20px; color: var(--ink-dim); }

/* ---------------------------------------------------------------- *
 * THE PHONE EXPERIENCE
 * ---------------------------------------------------------------- *
 * Same pages, phone-native feel: a thumb-reach bottom tab bar (injected by
 * js/tabbar.js), a compact top bar, and the dashboard showing ONE panel at
 * a time — leaderboard on Board, full-height chat on Talk — recreating the
 * old mobile app's sliding-panel simplicity without a separate codebase.
 */

.tabbar { display: none; }

@media (max-width: 860px) {

  /* Bottom tab bar — the old app's fat action buttons, thumb edition */
  .tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    background: rgba(4, 14, 1, .97);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--line-faint);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  .tabbar .tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 0 9px;
    text-decoration: none;
    color: var(--ink-faint);
    -webkit-tap-highlight-color: transparent;
  }
  .tabbar .tab-icon { font-size: 1.25rem; line-height: 1; }
  .tabbar .tab-label {
    font-family: var(--font-stamp);
    font-size: .56rem;
    letter-spacing: .06em;
  }
  .tabbar .tab.active { color: var(--dfm-gold); }

  /* Unread pip on the Huddle tab */
  .tabbar .tab { position: relative; }
  .tabbar .tab-dot {
    position: absolute;
    top: 5px;
    left: calc(50% + 9px);
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--dfm-red);
    border: 1.5px solid rgba(4, 14, 1, .97);
    box-shadow: 0 0 7px rgba(239, 58, 58, .9);
    /* A slow, quiet breath — enough to catch the corner of an eye,
       not enough to nag. */
    animation: dotPulse 2.2s ease-in-out infinite;
  }
  @keyframes dotPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.35); opacity: .7; }
  }
  @media (prefers-reduced-motion: reduce) { .tabbar .tab-dot { animation: none; } }
  .tabbar .tab.active .tab-icon { transform: scale(1.12); }
  .tabbar .tab:active .tab-icon { transform: scale(.9); }

  /* Content clears the bar */
  body.has-tabbar { padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px)); }

  /* The submit bar is FIXED on phones — welded to the top of the tab bar,
     never riding up with the content the way sticky did (that was the
     "gap at the bottom of picks" bug). picks-page.js measures the real
     bar + tabbar heights and sets the exact bottom padding. */
  body.has-tabbar .submitbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(57px + env(safe-area-inset-bottom, 0px));
    margin: 0;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }
  body.has-tabbar:has(.submitbar) {
    padding-bottom: calc(170px + env(safe-area-inset-bottom, 0px));
  }

  /* Phone: the submit button is the whole bottom row — one big thumb target. */
  body.has-tabbar .submitbar #submitBtn {
    flex: 1 1 100%;
    width: 100%;
    padding: 14px 0;
    font-size: 1.05rem;
  }

  /* Compact top bar: crest + wordmark + the few things tabs don't cover.
     Page links live in the tab bar now. */
  body.has-tabbar .nav a.nav-link { display: none; }
  body.has-tabbar .nav a.nav-link.nav-keep { display: block; }
  .nav-brand { font-size: 1.02rem; }
  .nav-inner { min-height: 50px; }

  /* Dashboard: one panel at a time, like the old sliding panels */
  body.has-tabbar:not(.view-talk) .dash-split > .card.st { display: none; }
  body.has-tabbar.view-talk .dash-split > .card.lb { display: none; }
  body.has-tabbar.view-talk .podium-container { display: none; }
  body.has-tabbar.view-talk #callout { display: none; }
  body.has-tabbar.view-talk .wkbtn { display: none; }

  /* Talk view: a real messaging screen. Height is set by JS from the
     visualViewport (iOS's dvh ignores the keyboard); this is the fallback. */
  body.has-tabbar.view-talk .dash-split > .card.st {
    display: flex;
    height: calc(100dvh - 152px);
    max-height: none;
    margin: 6px 0 0;
    padding: 8px 10px 10px;
  }

  /* Keyboard up: tab bar out of the way, composer rides the keys,
     no phantom padding below. */
  body.kb-open .tabbar { display: none; }
  body.kb-open.has-tabbar { padding-bottom: 0; }
  body.has-tabbar.view-talk .card.st h2 {
    font-size: 1.05rem;
    margin-bottom: 4px;
  }
  body.has-tabbar.view-talk main.wrap { padding-left: 8px; padding-right: 8px; }
  body.has-tabbar.view-talk { padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px)); }

  /* Composer: tight, text-thread proportions */
  .chat-form { margin-top: 6px; gap: 6px; }
  .chat-form input[type='text'] { min-height: 38px; padding: 8px 12px; border-radius: 999px; }
  .chat-form .btn { padding: 8px 14px; }
  .attach-btn { padding: 8px 10px; }

  /* The Weekly button under the panels duplicates the tab bar — gone */
  .wkbtn { display: none; }

  /* The status callout: same facts, half the height. One tight row of
     status + a compact clock, nothing sprawling. */
  #callout.banner {
    padding: 8px 11px;
    gap: 8px;
    margin: 8px 0;
    font-size: .8rem;
  }
  #callout .banner-icon { font-size: 1rem; }
  #callout strong { font-size: .82rem; }
  #callout .faint { font-size: .68rem; }
  #callout .pill { font-size: .58rem; padding: 1px 6px; }
  #callout .btn { padding: 6px 10px; font-size: .76rem; }
  #callout .clock .seg b { font-size: 1.15rem; }
  #callout .clock .seg small { font-size: .42rem; margin-top: 1px; }
  #callout .clock .colon { font-size: .85rem; }
  #callout .clock { gap: 3px; }

  /* Phone-size polish */
  .site-logo { width: clamp(96px, 26vw, 130px); margin-top: 8px; }
  .card { border-radius: 12px; margin: 12px 0; }
  h1 { font-size: clamp(1.5rem, 6.5vw, 2rem); }
  .ticker-frame { height: 2.66rem; }
  .clock .seg b { font-size: 1.35rem; }
  .clock .colon { font-size: 1.05rem; }
  .tally-box #tallyPts { font-size: 1.9rem; }
  .splash-stamp { padding: 18px 26px; margin: 0 14px; }
  .receipt-modal .modal-content { max-height: 78vh; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}


/* ✕ on the pop-up cards (receipt / player card) — a guaranteed way back */
.profile-modal .modal-x {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .35);
  background: rgba(0, 0, 0, .45);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}


/* Huddle: an author we haven't resolved yet (cold device, dead radio) — a
   quiet dash instead of a wrong word; the self-heal names them in a beat. */
.bubble .who-pending { opacity: .45; letter-spacing: .08em; }


/* ------------------------------------------------------------------ *
 * ADMIN HEALTH & RECORDS — print sheet
 * ------------------------------------------------------------------ *
 * The Pick Vault record is meant to be printed / filed. On paper: white
 * page, black ink, real table borders, no nav or buttons, no stadium photo.
 * body.print-vault (toggled by the 🖨 button) prints ONLY the record card.
 */
@media print {
  body.admin-health {
    background: #fff !important;
    color: #000 !important;
    min-height: auto;
  }
  body.admin-health::after { display: none !important; }
  body.admin-health .nav,
  body.admin-health .btn,
  body.admin-health .no-print,
  body.admin-health button,
  body.admin-health select { display: none !important; }
  body.admin-health .wrap { max-width: none; padding: 0; }
  body.admin-health .card {
    background: #fff !important;
    border: 0 !important;
    box-shadow: none !important;
    color: #000 !important;
    padding: 0 !important;
    margin: 0 0 18px !important;
    page-break-inside: auto;
  }
  body.admin-health h1,
  body.admin-health h2,
  body.admin-health h3,
  body.admin-health .faint,
  body.admin-health .pill { color: #000 !important; background: none !important; text-shadow: none !important; }
  body.admin-health .scroll-x { overflow: visible !important; }
  body.admin-health .tbl { font-size: 10pt; border-collapse: collapse; width: 100%; }
  body.admin-health .tbl th,
  body.admin-health .tbl td {
    border: 1px solid #000 !important;
    padding: 3px 5px !important;
    color: #000 !important;
    background: #fff !important;
  }
  body.admin-health .tbl tr { page-break-inside: avoid; }
  body.admin-health .tbl thead { display: table-header-group; }
  body.admin-health .print-only { display: block !important; }
  /* 🖨 from the vault card: the record alone, nothing else on the page */
  body.admin-health.print-vault .card:not(#vaultCard) { display: none !important; }
  body.admin-health.print-vault h1 { display: none !important; }
}


/* ---- Huddle reactions ---- */
.bubble { position: relative; }
/* Reactions are TACKED onto the bubble's corner, a little askew — like a
   sticker slapped on, not a row underneath. Theirs: top-right. Yours: top-left. */
.react-row {
  position: absolute; top: -13px; z-index: 2;
  display: flex; gap: 3px; pointer-events: none;
}
.chat-msg.theirs .react-row { right: -10px; transform: rotate(-7deg); }
.chat-msg.mine   .react-row { left: -10px;  transform: rotate(6deg); }
.chat-msg.has-react { margin-top: 8px; }
.react-chip {
  pointer-events: auto;
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 7px; border-radius: 999px; min-height: 0; line-height: 1.25;
  font-size: .86rem; font-family: var(--font-body);
  background: #0d2a12; border: 1.5px solid rgba(255, 215, 0, .45);
  color: #f2f7ee; cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .45);
}
.react-chip .rc { font-size: .66rem; opacity: .85; font-family: var(--font-stamp); color: var(--dfm-gold); }
.react-chip.txt .rg { font-family: var(--font-stamp); font-weight: 700; letter-spacing: .04em; font-size: .72rem; color: var(--dfm-gold); }
.react-chip.mine { background: #3a2f05; border-color: var(--dfm-gold); }
.react-chip:hover { filter: brightness(1.15); }

/* The tapback popover: a bar of reactions that pops up next to the bubble. */
.react-pop {
  position: fixed; z-index: 1200;
  background: #0f2a14; border: 1px solid rgba(255, 215, 0, .45); border-radius: 16px;
  padding: 6px; box-shadow: 0 10px 30px rgba(0, 0, 0, .55);
  transform: scale(.9); opacity: 0; transition: transform .14s ease, opacity .14s ease;
  transform-origin: bottom left; max-width: min(96vw, 360px);
}
.react-pop.from-me { transform-origin: bottom right; }
.react-pop.below { transform-origin: top left; }
.react-pop.below.from-me { transform-origin: top right; }
.react-pop.show { transform: scale(1); opacity: 1; }
.react-bar { display: flex; flex-wrap: wrap; gap: 4px; max-width: 336px; }
.react-pick {
  min-height: 0; width: 38px; height: 38px; border-radius: 10px; font-size: 1.3rem; line-height: 1;
  background: rgba(255, 255, 255, .06); border: 1px solid transparent; color: #fff; cursor: pointer; padding: 0;
}
.react-pick.txt { font-family: var(--font-stamp); font-size: .74rem; font-weight: 700; letter-spacing: .03em; color: var(--dfm-gold); }
.react-pick.mine { background: rgba(255, 215, 0, .22); border-color: rgba(255, 215, 0, .7); }
.react-pick:hover { background: rgba(255, 255, 255, .16); transform: scale(1.12); }
.react-acts { display: flex; gap: 6px; margin-top: 6px; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 6px; }
.react-act {
  flex: 1; min-height: 0; padding: 7px 10px; border-radius: 10px; font-size: .82rem; font-family: var(--font-body);
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); color: #fff; cursor: pointer;
}
.react-act.danger { color: #ffb3b3; border-color: rgba(255, 120, 120, .35); }
/* Phones: a press-and-hold is OUR gesture — keep iOS's text-selection loupe
   and callout out of the way on bubbles. */
@media (hover: none) {
  .bubble { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
}

/* ---- DFM Matrix Board (dfm-board.js) — an overlay on the lock strip ---- */
.mx-host { position: relative; }
.mx-board {
  position: absolute; inset: 0; z-index: 2; border-radius: inherit; overflow: hidden;
  background: linear-gradient(180deg, #1a1e22, #14171a 30%, #0e1013);   /* the housing */
  padding: 5px 8px; opacity: 0; pointer-events: none;
  transition: opacity .9s ease;
}
.mx-bezel { width: 100%; height: 100%; background: #000; border-radius: 4px; box-shadow: inset 0 0 0 1px #1c2024, inset 0 5px 14px rgba(0, 0, 0, .9); overflow: hidden; }
.mx-host.mx-on .mx-board.show { opacity: 1; pointer-events: auto; cursor: pointer; }
/* While the board is on, the strip's frame goes charcoal — red is the plain banner's color. */
.banner.lock-strip.mx-on { border-color: var(--line); }
.mx-canvas { display: block; width: 100%; height: 100%; }
.banner.lock-strip.mx-on::after { animation: none; }             /* no sheen repaints under the bulbs */
.mx-host .lock-strip-inner { padding-right: 28px; }               /* room for the power button */
.mx-host.mx-on { min-height: 68px; }                              /* 16 rows of bulbs need a little height */
.mx-power {
  position: absolute; top: 3px; right: 4px; z-index: 3;
  width: 28px; height: 28px; min-height: 0; padding: 0; border-radius: 50%;
  font-size: 13px; line-height: 22px; text-align: center;
  color: #ffd84d; background: rgba(0, 0, 0, .45); border: 1px solid rgba(255, 216, 77, .35);
  opacity: .35; cursor: pointer; transition: opacity .2s ease;
}
.mx-power:hover, .mx-power:focus-visible { opacity: 1; outline: none; }
.mx-power.is-off { color: rgba(255, 255, 255, .75); border-color: rgba(255, 255, 255, .3); }
.mx-power.demo { background: rgba(255, 216, 77, .75); color: #1a1400; opacity: 1; }   /* demo mode on (hold ⏻) */
@media (hover: none) { .mx-power { opacity: .5; } }


/* ---- "Desktop site" trap hint (Android per-site toggle) ---- */
.desk-hint {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%);
  z-index: 3000; max-width: min(92vw, 460px);
  display: flex; align-items: flex-start; gap: 10px;
  background: #10240f; border: 1px solid var(--dfm-gold, #ffd84d); border-radius: 12px;
  padding: 12px 14px; font-size: .95rem; line-height: 1.45; color: #f2f7ee;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .55);
}
.desk-hint b { color: var(--dfm-gold, #ffd84d); }
.desk-hint button {
  min-height: 0; flex: 0 0 auto; width: 26px; height: 26px; padding: 0;
  border-radius: 50%; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .25);
  color: #fff; cursor: pointer;
}
