:root {
  /* Team colors on the field. Playoff games swap in the computer team's own
     colors (playoffs-ui.js); everything else stays red and blue. */
  --team-red: var(--red);
  --team-blue: var(--blue);
  --cream: #f3eddf;
  --ink: #151a19;
  --red: #b82a2d;
  --red-dark: #741619;
  --blue: #173f73;
  --blue-dark: #0b284c;
  --gold: #e8ba57;
  --field: #2f684d;
  --white: #fffdf7;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(circle at 10% 0%, rgba(232,186,87,.16), transparent 28rem),
    repeating-linear-gradient(0deg, rgba(16,28,25,.025) 0 1px, transparent 1px 4px),
    var(--cream);
}
button { font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 4px solid var(--gold);
  outline-offset: 3px;
}
/* Older TV-browser engines (some Tizen/webOS builds) don't support
   :focus-visible - fall back to a plain :focus ring there so a remote's
   D-pad selection is still visible without affecting mouse/desktop users. */
html.tv-mode button:focus, html.tv-mode a:focus, html.tv-mode input:focus, html.tv-mode [tabindex]:focus {
  outline: 4px solid var(--gold);
  outline-offset: 3px;
}
/* Couch-distance viewing on a TV needs everything noticeably larger than a
   desktop/phone screen held at arm's length. zoom (not transform: scale)
   keeps layout and click hit-testing correct - the same approach already
   used for .field.short-play below. */
html.tv-mode body { zoom: 1.4; }
@media (min-width: 3000px) {
  html.tv-mode body { zoom: 2; }
}
main { width: min(1180px, calc(100% - 32px)); margin: auto; padding: 28px 0 56px; }
.masthead { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 18px; }
.eyebrow { margin: 0 0 6px; font-size: .72rem; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; color: #6e6c62; }
h1 { margin: 0; font: 900 clamp(2rem, 5vw, 4.4rem)/.88 Impact, Haettenschweiler, sans-serif; letter-spacing: -.02em; text-transform: uppercase; }
h1 span { color: var(--red); }
.scorebug { display: flex; align-items: stretch; color: white; background: var(--ink); border: 3px solid var(--ink); box-shadow: none; }
.scorebug > div { display: grid; grid-template-columns: auto auto; align-items: center; gap: 14px; padding: 9px 13px; }
.scorebug b { font-size: .72rem; letter-spacing: .1em; }
.scorebug strong { font-size: 1.55rem; }
.scorebug .clock { grid-template-columns: 1fr; gap: 0; text-align: center; background: var(--white); color: var(--ink); }
.scorebug .clock span { font-size: .72rem; font-weight: 900; }
.scorebug .clock strong { font-size: .86rem; font-variant-numeric: tabular-nums; }
.game-tools { display: flex; justify-content: flex-end; gap: 10px; margin: -12px 0 22px; }
.game-tools button, .level-notice button, .development-panel button { padding: 9px 13px; border: 2px solid var(--ink); background: var(--white); font-weight: 900; cursor: pointer; }
#endGame { color: white; background: var(--red); border-color: var(--red-dark); }
.level-notice { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; padding: 15px 18px; color: white; background: var(--blue); border-left: 7px solid var(--gold); box-shadow: 5px 5px 0 rgba(21,26,25,.18); }
.level-notice small { display: block; color: var(--gold); font-size: .62rem; font-weight: 900; letter-spacing: .12em; }
.level-notice strong { display: block; margin-top: 3px; }
.development-panel { position: fixed; z-index: 1000; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(8,12,11,.72); }
.development-card { position: relative; width: min(92vw, 820px); max-height: 88vh; overflow-y: auto; padding: 24px; background: var(--white); border: 1px solid #cfc8b9; border-top: 7px solid var(--gold); box-shadow: 12px 12px 0 rgba(0,0,0,.32); }
.development-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.development-actions { display: flex; gap: 9px; }
#startNextGame { color: white; background: var(--field); }
.development-header h2 { margin: 0; font: 900 clamp(1.8rem,4vw,3rem)/1 Georgia,serif; }
.development-explainer { max-width: 850px; color: #67655e; line-height: 1.5; }
.matchmaking-notice { font-weight: 900; color: var(--blue); }
.development-grid { display: grid; grid-template-columns: minmax(0,1fr); gap: 18px; max-width: 720px; margin: 20px auto 0; }
.development-team { padding: 18px; border: 2px solid var(--team-color); }
.development-team h3 { display: flex; justify-content: space-between; gap: 14px; margin: 0 0 15px; color: var(--team-color); font: 900 1.3rem Georgia,serif; }
.skill-row { display: grid; grid-template-columns: 1fr 3fr auto; align-items: center; gap: 12px; margin-top: 11px; }
.skill-row b { font-size: .82rem; }
.skill-meter { height: 10px; overflow: hidden; background: #dedbd1; border-radius: 99px; }
.skill-meter i { display: block; height: 100%; width: var(--level); background: var(--team-color); }
.skill-row button { min-width: 92px; padding: 7px 9px; }
.skill-row button:disabled { opacity: .38; cursor: not-allowed; }

.auth-room { position: relative; max-width: 1180px; margin: 10px auto 0; padding: 30px; background: rgba(255,253,247,.92); border: 1px solid #cec6b6; border-top: 7px solid var(--gold); box-shadow: 0 18px 50px rgba(35,37,31,.13); }
.auth-heading { max-width: 720px; margin: 0 auto 24px; text-align: center; }
/* The way back to the games hub, beside the Locker Room title. */
.auth-title-row { position: relative; display: inline-block; }
.hub-back { position: absolute; top: 50%; right: calc(100% + 40px); display: flex; align-items: center; gap: 6px; padding: 6px 8px; color: #151a19; background: none; border: 0; font: 600 1.05rem/1.1 "Segoe UI", Arial, sans-serif; white-space: nowrap; cursor: pointer; transform: translateY(-50%); }
.hub-back svg { display: block; width: 22px; height: 20px; flex: none; }
.hub-back:hover span, .hub-back:focus-visible span { text-decoration: underline; }
@media (max-width: 1000px) { .auth-title-row { display: block; } .hub-back { position: static; margin: 0 auto 6px; transform: none; } }
.locker-menu > .owner-tools { display: flex; }
.auth-heading h2 { margin: 0; font: 900 clamp(2rem,5vw,3.5rem)/1 Georgia,serif; }
.auth-heading > p:last-child { color: #68665f; line-height: 1.5; }
.auth-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.auth-card { display: grid; gap: 14px; padding: 22px; background: var(--white); border: 2px solid var(--team-color); }
.single-auth { --team-color: var(--field); max-width: 520px; margin: 0 auto; }
.red-auth { --team-color: var(--red); }
.blue-auth { --team-color: var(--blue); }
.auth-card > div:first-child { position: relative; padding-left: 24px; }
.auth-card h3 { margin: 0; color: var(--team-color); font: 900 1.55rem Georgia,serif; }
.auth-dot { position: absolute; left: 0; top: 4px; width: 14px; height: 14px; background: var(--team-color); border-radius: 50%; }
.auth-card label { display: grid; gap: 5px; font-size: .78rem; font-weight: 900; }
.auth-card label small { color: #7b786f; font-weight: 700; }
.auth-card input { width: 100%; padding: 11px 12px; color: var(--ink); background: white; border: 2px solid #c9c3b7; font: inherit; }
.auth-card input:focus { outline: 3px solid color-mix(in srgb, var(--team-color) 25%, transparent); border-color: var(--team-color); }
.auth-card input:disabled { color: #65635d; background: #e9e5dc; }
.auth-actions { display: grid !important; grid-template-columns: 1fr 1fr; gap: 9px; padding: 0 !important; }
.auth-actions button, .auth-switch, .start-match { padding: 11px 13px; border: 2px solid var(--ink); font-weight: 900; cursor: pointer; }
.auth-actions button:first-child { color: white; background: var(--team-color); border-color: var(--team-color); }
.auth-actions button:last-child, .auth-switch { background: white; }
.auth-status { min-height: 1.2em; margin: 0; font-size: .8rem; font-weight: 900; color: #706d65; }
.auth-status.success { color: var(--field); }
.auth-status.error { color: var(--red); }
.start-match { display: block; min-width: min(100%,360px); margin: 24px auto 0; color: white; background: var(--field); border-color: #174f36; }
.match-waiting { margin: 16px 0 0; text-align: center; color: var(--field); font-weight: 900; }
.auth-primary { width: 100%; padding: 13px; color: white; background: var(--team-color); border: 2px solid var(--team-color); font-weight: 900; cursor: pointer; }
.auth-text-link { justify-self: center; padding: 2px 4px; color: var(--ink); background: transparent; border: 0; font-size: .78rem; font-weight: 800; text-decoration: underline; cursor: pointer; }
.development-at-signin { display: block; margin: 18px auto 0; padding: 10px 18px; color: var(--ink); background: transparent; border: 2px solid var(--ink); font-weight: 900; cursor: pointer; }
.locker-menu { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: center; gap: 34px 30px; min-height: 260px; max-width: 1000px; margin: 0 auto; }
.locker-menu > div { display: grid; justify-items: center; gap: 22px; }
.locker-button { width: 280px; max-width: 100%; min-height: 58px; padding: 12px 18px; color: white; background: var(--field); border: 3px solid #174f36; box-shadow: 5px 5px 0 var(--gold); font: 900 .9rem/1.15 Georgia,serif; letter-spacing: .04em; text-transform: uppercase; cursor: pointer; }
.locker-button:hover, .locker-button:focus-visible { transform: translateY(-2px); }
.locker-button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.game-chooser-card { width: min(92vw, 600px); }
.game-choice-list { display: grid; gap: 10px; margin: 24px 0; }
.game-choice { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; padding: 14px 16px; color: var(--ink); background: white; border: 2px solid #cfc8b9; cursor: pointer; text-align: left; }
.game-choice:hover, .game-choice:focus-visible { border-color: var(--field); }
.game-choice strong { display: block; font: 900 1.2rem Georgia,serif; }
.game-choice small { color: #6e6c62; font-weight: 800; text-transform: uppercase; }
.game-choice-dot { flex: 0 0 auto; width: 34px; height: 34px; background: var(--opponent-color); border: 3px solid var(--opponent-outline, white); border-radius: 50%; box-shadow: 0 0 0 1px #777; }
.game-chooser-new { margin: 0 auto; }
.account-created-overlay { position: fixed; z-index: 1000; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(8,12,11,.72); }
/* Above the install-welcome screen (z-index 5000) so a pending update blocks even the very first screen. */
.update-overlay { z-index: 6000; }
.debug-overlay { z-index: 7000; }
.debug-sandbox-card { width: min(94vw, 640px); text-align: left; }
.debug-sandbox-card h3 { margin: 0 0 6px; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: #6e6c62; }
.debug-play-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 16px 0; }
.debug-play-list { display: grid; gap: 6px; }
.debug-play-list button { padding: 9px 10px; text-align: left; border: 2px solid var(--ink); background: var(--white); font-weight: 800; font-size: .85rem; cursor: pointer; }
.debug-play-list button.selected { background: var(--gold); }
.debug-sandbox-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.debug-end-button { padding: 9px 13px; border: 2px solid var(--ink); background: var(--white); font-weight: 900; cursor: pointer; }
.account-created-card { position: relative; width: min(92vw,520px); padding: 42px 34px 34px; text-align: center; background: var(--white); border-top: 7px solid var(--gold); box-shadow: 12px 12px 0 rgba(0,0,0,.32); }
.account-created-card label { display: grid; gap: 5px; margin: 18px 0; font-size: .78rem; font-weight: 900; text-align: left; }
.account-created-card input { width: 100%; padding: 11px 12px; color: var(--ink); background: white; border: 2px solid #c9c3b7; font: inherit; }
.account-created-card input:focus { outline: 3px solid rgba(47,104,77,.25); border-color: var(--field); }
.account-created-card .locker-button { width: 100%; margin: 4px auto 0; }
.account-created-card h2 { margin: 0 0 14px; font: 900 2.2rem/1 Georgia,serif; }
.account-created-card p { font-size: 1.05rem; }
.gameplay-rules-card { width: min(94vw, 900px); max-height: 88vh; overflow-y: auto; text-align: left; }
.gameplay-rules-card > .eyebrow, .gameplay-rules-card > h2 { text-align: center; }
.rules-content { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
.rules-content section { padding: 17px 18px; border: 1px solid #d6d0c2; border-top: 4px solid var(--gold); background: #fffdf7; }
.rules-content h3 { margin: 0 0 9px; font: 900 1.1rem/1.1 Georgia, serif; }
.rules-content ul { margin: 0; padding-left: 19px; }
.rules-content li { margin: 0 0 7px; color: #55534d; font-size: .88rem; line-height: 1.4; }
.rules-content li:last-child { margin-bottom: 0; }
.account-created-close { position: absolute; top: 8px; right: 10px; width: 38px; height: 38px; color: white; background: var(--ink); border: 0; border-radius: 50%; font-size: 1.7rem; line-height: 1; cursor: pointer; }
.assigned-color-circle { display: block; width: 112px; height: 112px; margin: 24px auto 0; background: var(--assigned-color); border: 7px solid white; border-radius: 50%; box-shadow: 0 7px 18px rgba(0,0,0,.22); }
.assigned-color-circle.white-color { border-color: #111; box-shadow: 0 7px 18px rgba(0,0,0,.22); }
.opponent-waiting { position: relative; max-width: 720px; margin: 28px auto; padding: 42px 30px; text-align: center; background: var(--white); border: 1px solid #cec6b6; border-top: 7px solid var(--gold); box-shadow: 0 18px 45px rgba(21,26,25,.14); }
.opponent-waiting h2 { margin: 0; font: 900 clamp(2rem,5vw,3.6rem)/1 Georgia,serif; }
.opponent-waiting > p:not(.eyebrow) { color: #6b6860; }
.opponent-waiting .watch-button { margin-top: 12px; }
.back-to-locker-button { position: absolute; top: 16px; left: 16px; padding: 8px 14px; color: var(--field); background: var(--white); border: 2px solid var(--field); font: 900 .75rem/1 Georgia,serif; text-transform: uppercase; letter-spacing: .04em; cursor: pointer; }
.back-to-locker-button:hover, .back-to-locker-button:focus-visible { color: white; background: var(--field); }
.start-match:disabled, .auth-actions button:disabled { opacity: .42; cursor: not-allowed; }

.coin-toss { display: grid; justify-items: center; max-width: 760px; margin: 32px auto 0; padding: 44px; text-align: center; background: rgba(255,253,247,.86); border: 1px solid rgba(21,26,25,.18); border-top: 7px solid var(--gold); box-shadow: 0 18px 50px rgba(35,37,31,.12); }
.coin-copy h2 { margin: 0; font: 900 clamp(2.1rem, 6vw, 4rem)/1 Georgia, serif; }
.coin-copy > p:last-child { color: #716e66; }
.coin-stage { position: relative; width: 250px; height: 285px; margin: 12px 0 8px; perspective: 1050px; }
.coin { position: absolute; z-index: 3; left: 25px; right: 25px; top: 20px; height: 200px; transform-style: preserve-3d; transform: translateY(30px) rotateY(0deg) rotateX(8deg); }
.coin-edge-slice { position: absolute; inset: 1px; border-radius: 50%; background: repeating-linear-gradient(90deg, #51320a 0 3px, #9a6b1b 3px 6px, #e4bd5d 6px 9px, #70470d 9px 12px); box-shadow: inset 0 0 0 8px #755018, inset 0 0 15px #2f1b04aa; }
.edge-1 { transform: translateZ(-9px); }
.edge-2 { transform: translateZ(-6px); }
.edge-3 { transform: translateZ(-3px); }
.edge-4 { transform: translateZ(0); }
.edge-5 { transform: translateZ(3px); }
.edge-6 { transform: translateZ(6px); }
.edge-7 { transform: translateZ(9px); }
.coin-face { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; border: 9px double #f3d27f; border-radius: 50%; backface-visibility: hidden; background: #fff; box-shadow: inset 0 0 0 4px #7b5a20, inset 0 0 22px rgba(71,43,8,.25); }
.coin-face::after { content: ""; position: absolute; inset: 7px; border: 2px solid rgba(111,75,19,.7); border-radius: 50%; pointer-events: none; }
.coin-team-circle { width: 62%; height: 62%; background: var(--face-color); border: 7px solid var(--face-outline); border-radius: 50%; box-shadow: 0 3px 8px rgba(0,0,0,.35), inset 0 0 0 2px rgba(0,0,0,.12); }
.coin-red { transform: translateZ(11px); }
.coin-blue { transform: rotateY(180deg) translateZ(11px); }
.coin-red { --face-color: var(--team-red); --face-outline: var(--team-red-outline, #fff); }
.coin-blue { --face-color: var(--team-blue); --face-outline: var(--team-blue-outline, #fff); }
.coin-shadow { position: absolute; z-index: 1; left: 25%; right: 25%; bottom: 18px; height: 18px; border-radius: 50%; background: #151a1940; filter: blur(7px); }
.coin.flipping-red { animation: flipRed 2.75s linear forwards; }
.coin.flipping-blue { animation: flipBlue 2.75s linear forwards; }
.coin-stage:has(.coin.flipping-red) .coin-shadow,
.coin-stage:has(.coin.flipping-blue) .coin-shadow { animation: shadowFlip 2.75s ease-in-out; }
.coin-result { min-height: 28px; font: 800 1.05rem Georgia, serif; }
.coin-result.winner { color: var(--ink); font-size: 1.3rem; }
.flip-button { margin-top: 16px; padding: 13px 30px; color: white; border: 0; border-radius: 3px; background: var(--ink); font-weight: 900; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.flip-button:disabled { opacity: .5; cursor: wait; }

.setup { display: grid; grid-template-columns: 1fr 56px 1fr; align-items: stretch; }
.possession-strip { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 0 18px; padding: 11px 16px; color: white; background: var(--ink); border-left: 6px solid var(--red); font-size: .72rem; font-weight: 900; letter-spacing: .08em; }
.possession-strip strong { color: var(--gold); font-size: 1rem; }
.possession-strip span:last-child { color: #c8c7bf; }
.drive-summary { display: flex; align-items: center; gap: 22px; white-space: nowrap; }
.fourth-down-decision { max-width: 700px; margin: 50px auto; padding: 38px; text-align: center; color: white; background: var(--ink); border-top: 7px solid var(--gold); box-shadow: 10px 10px 0 rgba(21,26,25,.2); }
.fourth-down-decision h2 { margin: 4px 0 10px; font: 900 clamp(2rem,5vw,3.4rem)/1 Georgia,serif; }
.fourth-down-decision > p:not(.eyebrow) { color: #cbc9c0; }
.fourth-down-decision > div { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; margin-top: 22px; }
.fourth-down-decision button { min-width: 140px; padding: 13px 20px; border: 2px solid white; color: white; background: var(--red); font-weight: 900; cursor: pointer; }
.try-choice { max-width: 700px; margin: 42px auto; padding: 38px; text-align: center; color: white; background: var(--ink); border-top: 7px solid var(--gold); box-shadow: 9px 9px 0 #151a1933; }
.try-choice h2 { margin: 5px 0 12px; font: 900 clamp(2.2rem,6vw,4rem)/1 Georgia,serif; }
.try-choice > p:not(.eyebrow) { color: #dedbd1; }
.try-choice > div { display: flex; justify-content: center; gap: 16px; margin-top: 24px; }
.try-choice button { min-width: 175px; padding: 15px 22px; border: 2px solid white; color: white; background: var(--red); font-weight: 900; cursor: pointer; }
/* Goal posts seen from above on each end line: the crossbar, with an
   upright at each end. --post-span is the 18'6" between the uprights in
   this field's own yards (set in lineups()). */
.goal-post { position: absolute; z-index: 4; top: 50%; width: 5px; height: var(--post-span, 11%); background: #f2c230; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0,0,0,.25); transform: translate(-50%, -50%); pointer-events: none; }
.goal-post.left { left: .5%; }
.goal-post.right { left: 99.5%; }
.goal-post::before, .goal-post::after { content: ""; position: absolute; left: 50%; width: 11px; height: 11px; border-radius: 50%; background: #f2c230; box-shadow: 0 0 0 1px rgba(0,0,0,.3); transform: translate(-50%, -50%); }
.goal-post::before { top: 0; }
.goal-post::after { top: 100%; }
#chooseFakePunt, #chooseFakeFieldGoal { background: #6d4aa8; }
@media (max-width: 620px) {
  .fourth-down-decision > div { flex-wrap: wrap; }
  .fourth-down-decision button { min-width: 125px; }
  .try-choice { margin: 12px; padding: 24px 16px; }
  .try-choice > div { flex-direction: column; }
  .try-choice button { width: 100%; }
}
#goForIt { background: var(--field); }
.play-card { position: relative; overflow: hidden; min-height: 570px; padding: 28px; border: 1px solid rgba(21,26,25,.18); background: rgba(255,253,247,.82); box-shadow: 0 18px 50px rgba(35,37,31,.09); }
.offense-card { border-top: 7px solid var(--team-red); }
.defense-card { border-top: 7px solid var(--team-blue); }
.card-heading { display: flex; align-items: center; gap: 12px; padding-bottom: 20px; border-bottom: 1px solid rgba(21,26,25,.14); }
.team-dot { width: 34px; height: 34px; border: 5px solid white; border-radius: 50%; box-shadow: 0 0 0 2px currentColor; }
.team-dot.red { color: var(--team-red); background: var(--team-red); }
.team-dot.blue { color: var(--team-blue); background: var(--team-blue); }
.card-heading small { display: block; color: #76736a; font-size: .66rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.card-heading h2 { margin: 2px 0 0; font: 800 1.25rem/1.1 Georgia, serif; }
.status { margin-left: auto; padding: 5px 9px; border-radius: 99px; color: #69675f; background: #e8e4d9; font-size: .65rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.status.locked { color: white; background: #397050; }
.play-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.play-option { display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: 142px; padding: 10px 10px 12px; text-align: center; color: var(--ink); border-radius: 6px; background: transparent; cursor: pointer; transition: .2s ease; }
.play-option:hover, .play-option:focus-visible { transform: translateY(-2px); }
.play-option:hover .chalkboard, .play-option:focus-visible .chalkboard { box-shadow: inset 0 0 0 3px #7a4a1f, inset 0 0 0 6px #c78f4f, 0 8px 18px rgba(20,25,23,.18); }
.play-option.selected { background: rgba(232,186,87,.16); }
.play-option.selected .chalkboard { box-shadow: inset 0 0 0 3px var(--gold), inset 0 0 0 6px #c78f4f, 0 0 0 3px var(--gold), 0 8px 18px rgba(20,25,23,.2); }
.play-option .play-name { font: 800 .95rem/1.15 Georgia, serif; }
.chalkboard { width: 100%; aspect-ratio: 3 / 2; border-radius: 4px; box-shadow: inset 0 0 0 3px #7a4a1f, inset 0 0 0 6px #a9713f, 0 3px 8px rgba(20,25,23,.14); background: #7a4a1f; }
.lock-button, .watch-button { width: 100%; margin-top: 20px; padding: 14px 18px; color: white; border: 0; border-radius: 3px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; cursor: pointer; }
.lock-button:disabled { opacity: .34; cursor: not-allowed; }
.red-button { background: var(--red); }
.early-kick-button { margin-top: 10px; background: #b8860b; }
.blue-button { background: var(--blue); }
.versus { display: grid; place-items: center; z-index: 2; }
.versus span { display: grid; place-items: center; width: 56px; height: 56px; color: white; background: var(--ink); border: 4px solid var(--cream); border-radius: 50%; font: 900 1rem Georgia, serif; }

.privacy-screen { display: grid; place-content: center; min-height: 420px; padding: 28px; text-align: center; }
.shield { display: grid; place-items: center; width: 76px; height: 76px; margin: 0 auto 18px; color: white; background: var(--blue); border: 6px double white; border-radius: 50% 50% 46% 46%; font: 900 2rem Georgia, serif; box-shadow: 0 0 0 3px var(--blue); }
.privacy-screen h3 { margin: 0 0 8px; font: 800 1.3rem Georgia, serif; }
.privacy-screen p { max-width: 300px; margin: 0 auto 18px; color: #716e66; line-height: 1.5; }
.privacy-screen button, .new-call, #replay { padding: 11px 16px; border: 2px solid var(--ink); background: transparent; font-weight: 900; cursor: pointer; }
.hidden { display: none !important; }

.ready-panel { max-width: 700px; margin: 70px auto; padding: 54px; text-align: center; color: white; background: var(--ink); box-shadow: 12px 12px 0 var(--gold); }
.ready-panel h2 { margin: 10px 0; font: 900 clamp(2rem, 5vw, 3.6rem)/1 Georgia, serif; }
.ready-panel > p:not(.eyebrow) { color: #c7c6bd; }
.watch-button { width: auto; padding-inline: 34px; background: var(--red); }

.film-room { animation: reveal .45s ease both; }
.playback-active { overflow: hidden; }
.playback-active #filmRoom { position: fixed; z-index: 900; inset: 0; display: block; width: 100vw; height: 100vh; margin: 0; padding: 0; background: #0f7b47; animation: none; }
.playback-active #filmRoom .film-header,
.playback-active:not(.outcome-review) #filmRoom .result-strip,
.playback-active #filmRoom .view-confirmations { display: none !important; }
.playback-active #filmRoom .field-shell { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; box-shadow: none; background: #0f7b47; }
.playback-active #filmRoom .field { width: 100%; height: 100%; min-height: 0; aspect-ratio: auto; border-width: 3px; transform: none; }
.playback-active.outcome-review #resultStrip {
  position: absolute;
  z-index: 40;
  left: 50%;
  top: 50%;
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 10px;
  width: min(88vw, 1160px);
  max-height: 88vh;
  margin: 0;
  padding: 10px;
  overflow: auto;
  border: 4px solid white;
  background: #f8f5ec;
  box-shadow: 0 14px 45px rgba(0,0,0,.58);
  transform: translate(-50%, -50%);
}
.outcome-status-bar { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; min-height: 42px; padding: 5px 10px; color: white; background: var(--ink); }
.outcome-score { display: grid; grid-template-columns: auto auto auto auto auto; align-items: center; gap: 8px; white-space: nowrap; font-size: clamp(.54rem, 1vw, .72rem); font-weight: 900; text-transform: uppercase; }
.outcome-score strong { font-size: clamp(.9rem, 1.6vw, 1.2rem); }
.outcome-score b { padding: 7px 9px; color: var(--ink); background: #f8f5ec; }
.outcome-field-status { display: flex; justify-content: center; gap: 18px; color: var(--gold); font-size: clamp(.72rem, 1.5vw, 1.05rem); text-align: center; text-transform: uppercase; }
.outcome-play-count { font-size: clamp(.55rem, 1vw, .72rem); font-weight: 900; white-space: nowrap; text-transform: uppercase; }
.outcome-copy { min-width: 0; padding: 2px 3px; }
.outcome-copy small { display: block; color: #111716; font-size: clamp(.72rem, 1.35vw, 1rem); font-weight: 900; }
.outcome-copy h3 { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 .42em; margin: 0; font: 900 clamp(1rem, 2.25vw, 1.75rem)/1.08 Arial, sans-serif; overflow-wrap: anywhere; }
.outcome-copy h3 i { font-style: normal; }
.outcome-copy p { margin: 3px 0 0; font-size: clamp(.65rem, 1.15vw, .9rem); }
.playback-active.outcome-review #resultStrip .result-actions { display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; width: 100%; min-width: 0; }
.playback-active.outcome-review #resultStrip .result-actions button { min-height: 54px; padding: 8px 12px; color: #0876e8; background: #fbfaf5; border: 2px solid #353a38; font-size: clamp(.82rem, 1.8vw, 1.25rem); font-weight: 900; }
@media (max-height: 500px) {
  .playback-active.outcome-review #resultStrip { gap: 6px; width: min(92vw, 1160px); padding: 7px; }
  .outcome-status-bar { min-height: 34px; padding: 3px 7px; }
  .outcome-copy p { display: none; }
  .playback-active.outcome-review #resultStrip .result-actions button { min-height: 42px; }
}
.film-header { display: flex; align-items: end; justify-content: space-between; margin-bottom: 16px; }
.film-header h2 { margin: 0; font: 900 clamp(1.3rem, 3vw, 2.35rem) Georgia, serif; }
.film-header h2 i { padding: 0 .25em; color: #87837a; font-size: .65em; font-weight: 400; }
.play-matchup-header h2 { font-size: clamp(.95rem, 1.65vw, 1.35rem); }
.orientation-prompt { display: none; }
.down-distance { padding: 10px 16px; color: white; background: var(--ink); text-align: right; }
.down-distance small { display: block; color: var(--gold); font-size: .6rem; letter-spacing: .1em; }
.field-shell { overflow: hidden; padding: 7px; background: #f7f5e9; border: 1px solid #9f9e91; box-shadow: 0 20px 50px rgba(22,30,25,.18); }
.field { position: relative; overflow: hidden; width: 100%; aspect-ratio: 16 / 9; min-height: 480px; border: 4px solid rgba(255,255,255,.96); background: #0f7b47; transition: transform 1.1s cubic-bezier(.22,.61,.36,1); }
.field.short-play { transform: scale(1.28); transform-origin: 50% 50%; }
.field-markings { position: absolute; z-index: 1; inset: 0; pointer-events: none; }
.field-markings::before, .field-markings::after { content: ""; position: absolute; z-index: 3; top: 0; bottom: 0; width: 3px; background: rgba(255,255,255,.98); transform: translateX(-50%); }
.field-markings::before { left: 8%; }
.field-markings::after { left: 92%; }
.yard-line { position: absolute; top: 0; bottom: 0; transform: translateX(-50%); background: rgba(255,255,255,.94); }
.yard-line.major { width: 3px; }
.yard-line.minor { width: 2px; opacity: .92; }
.yard-tick { position: absolute; top: 0; bottom: 0; width: 3px; transform: translateX(-50%); background:
  linear-gradient(180deg,
    rgba(255,255,255,.95) 0 2.4%, transparent 2.4% 26%,
    rgba(255,255,255,.95) 26% 29%, transparent 29% 71%,
    rgba(255,255,255,.95) 71% 74%, transparent 74% 97.6%,
    rgba(255,255,255,.95) 97.6% 100%);
}
.endzone { position: absolute; z-index: 2; display: grid; place-items: center; top: 0; bottom: 0; width: 8%; color: rgba(255,255,255,.96); border-color: rgba(255,255,255,.95); font: 900 clamp(.58rem, 1.25vw, 1rem) Impact, sans-serif; letter-spacing: .28em; writing-mode: vertical-rl; }
.endzone.top { left: 0; border-right: 3px solid; }
.endzone.bottom { right: 0; border-left: 3px solid; }
.yard-numbers { position: absolute; z-index: 4; left: 12.2%; right: 12.2%; display: grid; grid-template-columns: repeat(9, 1fr); color: #fff; font: 900 clamp(.82rem, 2vw, 1.35rem)/1 Impact, sans-serif; text-align: center; text-shadow: 0 2px 2px rgba(0,0,0,.28); }
.top-numbers { top: 13.5%; transform: rotate(180deg); }
.bottom-numbers { bottom: 13.5%; }
.line-of-scrimmage, .first-down-line { display: none; }
.kickoff-room { animation: reveal .45s ease both; }
.kickoff-player { position: absolute; z-index: 6; display: grid; place-items: center; width: 28px; height: 28px; margin: -14px; color: white; border: 3px solid white; border-radius: 50%; font: 900 14px/1 Georgia, serif; box-shadow: 0 2px 5px rgba(0,0,0,.38); transition: left var(--duration, 1s) linear, top var(--duration, 1s) linear, transform .2s ease; will-change: left, top; }
.kickoff-player.team-red { color: var(--team-red-text, #fff); background: var(--team-red); border-color: var(--team-red-outline, #fff); }
.kickoff-player.team-blue { color: var(--team-blue-text, #fff); background: var(--team-blue); border-color: var(--team-blue-outline, #fff); }
.kickoff-player.returner { box-shadow: 0 0 0 4px var(--gold), 0 3px 8px #0008; transform: scale(1.1); }
.kickoff-player.engaged { transform: scale(1.06) rotate(8deg); }
.kickoff-ball { left: 24.8%; top: 50%; transition: none; }
.kickoff-result { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-top: 16px; padding: 17px 22px; color: white; background: var(--ink); box-shadow: 7px 7px 0 var(--gold); }
.kickoff-result small { color: var(--gold); font-size: .65rem; font-weight: 900; letter-spacing: .12em; }
.kickoff-result h3 { margin: 3px 0 0; font: 800 1.25rem Georgia, serif; }
.kickoff-result .watch-button { width: auto; margin: 0; white-space: nowrap; }
.player { position: absolute; z-index: 6; display: grid; place-items: center; width: 28px; height: 28px; margin: -14px; color: white; border: 3px solid white; border-radius: 50%; font: 900 9.5px/1 Arial, sans-serif; letter-spacing: -.02em; box-shadow: 0 2px 5px rgba(0,0,0,.35); transition: left var(--duration, 1s) linear, top var(--duration, 1s) linear, transform .2s ease; will-change: left, top, transform; backface-visibility: hidden; }
.player.offense { color: var(--team-red-text, #fff); background: var(--team-red); border-color: var(--team-red-outline, #fff); }
.player.defense { color: var(--team-blue-text, #fff); background: var(--team-blue); border-color: var(--team-blue-outline, #fff); }
.field.blue-offense .player.offense { color: var(--team-blue-text, #fff); background: var(--team-blue); border-color: var(--team-blue-outline, #fff); }
.field.blue-offense .player.defense { color: var(--team-red-text, #fff); background: var(--team-red); border-color: var(--team-red-outline, #fff); }
.player.carrier { transform: scale(1.16); box-shadow: 0 0 0 4px var(--gold), 0 3px 7px #0008; }
.player.blocking { transform: scale(1.08) rotate(10deg); }
.ball { position: absolute; z-index: 8; left: 49%; top: 50%; width: 16px; height: 10px; margin: -5px -8px; background: #6f351e; border: 1px solid #e8c49b; border-radius: 50%; transform: rotate(-18deg); transition: left .65s ease, top .65s ease; }
.field.cadence::after { box-shadow: inset 0 0 70px rgba(232,186,87,.18); }
.result-strip { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; margin-top: 16px; padding: 12px 18px; background: var(--white); border: 1px solid #d3ccbd; }
.result-yards { display: grid; min-width: 92px; padding-right: 20px; border-right: 1px solid #d7d1c4; }
.result-yards strong { font: 900 2.7rem/1 Impact, sans-serif; color: var(--red); }
.result-yards span, .result-strip small { font-size: .62rem; font-weight: 900; letter-spacing: .12em; color: #716e66; }
.result-strip h3 { margin: 2px 0; font: 800 1.1rem Georgia, serif; }
.result-strip p { margin: 0; color: #6b6962; font-size: .83rem; }
.result-actions { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; min-width: 340px; }
.result-actions button { width: 100%; }
.new-call { display: block; margin: 0; }
.waiting-player-card { width: min(90vw, 460px); padding: 38px 28px 30px; }
.waiting-player-card h2 { font-size: clamp(1.65rem, 6vw, 2.2rem); }
.penalty-decision-card { width: min(92vw, 760px); }
.penalty-decision-card > p { color: #625f58; }
.penalty-decision-signal { display: block; height: clamp(110px, 22vh, 190px); margin: -8px auto 6px; }
.penalty-decision-signal.hidden { display: none; }
.penalty-choice-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin-top: 22px; }
.penalty-choice { position: relative; min-height: 150px; display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 28px 18px 20px; color: #111716; background: #fff; border: 3px solid #111716; text-align: center; }
.penalty-choice strong { font-size: 1.25rem; text-transform: uppercase; }
.penalty-choice:hover, .penalty-choice:focus-visible { color: white; background: #174a79; }
.penalty-recommended { position: absolute; top: 0; left: 50%; transform: translate(-50%,-50%); padding: 6px 10px; color: #111716; background: var(--gold); border: 2px solid #111716; font-size: .72rem; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
.penalty-clock-note { margin: 18px 0 0; font-size: .88rem; text-align: center; }
@media (max-width: 620px) { .penalty-choice-grid { grid-template-columns: 1fr; } .penalty-choice { min-height: 112px; } }
.new-call:disabled, #replay:disabled, .view-confirmations button:disabled { opacity: .38; cursor: not-allowed; }
.view-confirmations { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 14px; font-size: .78rem; font-weight: 800; }
.view-confirmations button { padding: 8px 12px; border: 2px solid var(--ink); background: var(--white); font-weight: 900; cursor: pointer; }
.view-confirmations button.confirmed { color: white; background: var(--field); }
.touchdown-celebration { position: absolute; z-index: 20; inset: 0; display: grid; place-items: center; overflow: hidden; background: rgba(7,24,17,.28); }
.confetti { position: absolute; inset: 0; }
.confetti i { position: absolute; top: -12%; width: 9px; height: 24px; background: var(--piece-color); animation: confetti-fall var(--fall-time) linear var(--delay) infinite; }
@keyframes touchdown-pop { from { opacity: 0; transform: scale(.3) rotate(-4deg); } to { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes confetti-fall { to { top: 112%; transform: translateX(var(--drift)) rotate(900deg); } }
.official-card-overlay { position: fixed; z-index: 1000; inset: 0; display: grid; place-items: center; padding: 22px; background: transparent; }
.official-card-overlay.loading .official-card-frame { visibility: hidden; }
.official-card-frame { position: relative; max-width: min(390px, 88vw); max-height: 88vh; animation: touchdown-pop .28s cubic-bezier(.2,.9,.3,1.15) both; }
.official-card-frame.offsetting { width: min(820px, 94vw); max-width: min(820px, 94vw); padding: 24px 22px 22px; background: #0b477d; border-radius: 8px; box-shadow: 0 18px 60px #000b; }
.official-card-frame.turnover { width: min(520px, 92vw); max-width: min(520px, 92vw); padding: 24px 22px 22px; background: #0b477d; border-radius: 8px; box-shadow: 0 18px 60px #000b; }
.official-card-title { margin: 0 50px 18px; color: white; text-align: center; text-transform: uppercase; font: 900 clamp(1.35rem, 3vw, 2.15rem)/1.05 Arial, sans-serif; letter-spacing: .04em; }
.official-card-images { display: flex; align-items: center; justify-content: center; gap: 18px; }
.official-card-frame img { display: block; max-width: 100%; max-height: 88vh; object-fit: contain; border-radius: 7px; box-shadow: 0 18px 60px #000b; }
.official-card-frame.offsetting img { width: calc(50% - 9px); max-height: 68vh; box-shadow: none; }
.official-card-frame.turnover img { max-height: 66vh; box-shadow: none; }
.official-card-close { position: absolute; z-index: 2; top: 8px; right: 8px; display: grid; place-items: center; width: 42px; height: 42px; padding: 0; color: white; background: #111; border: 3px solid white; border-radius: 50%; box-shadow: 0 3px 10px #0009; font: 900 30px/1 Arial,sans-serif; cursor: pointer; }

@keyframes reveal { from { opacity: 0; transform: translateY(12px); } }
@keyframes flipRed {
  0% { transform: translateY(30px) rotateY(0) rotateX(8deg); animation-timing-function: cubic-bezier(.36,0,.66,-.2); }
  12% { transform: translateY(42px) rotateY(120deg) rotateX(13deg); animation-timing-function: cubic-bezier(.16,.72,.28,1); }
  48% { transform: translateY(-92px) rotateY(900deg) rotateX(25deg) scale(1.06); animation-timing-function: cubic-bezier(.42,0,.75,.55); }
  84% { transform: translateY(25px) rotateY(1740deg) rotateX(12deg); animation-timing-function: cubic-bezier(.18,.7,.28,1); }
  93% { transform: translateY(34px) rotateY(1790deg) rotateX(9deg) scale(.98); }
  100% { transform: translateY(30px) rotateY(1800deg) rotateX(8deg); }
}
@keyframes flipBlue {
  0% { transform: translateY(30px) rotateY(0) rotateX(8deg); animation-timing-function: cubic-bezier(.36,0,.66,-.2); }
  12% { transform: translateY(42px) rotateY(120deg) rotateX(13deg); animation-timing-function: cubic-bezier(.16,.72,.28,1); }
  48% { transform: translateY(-92px) rotateY(990deg) rotateX(25deg) scale(1.06); animation-timing-function: cubic-bezier(.42,0,.75,.55); }
  84% { transform: translateY(25px) rotateY(1920deg) rotateX(12deg); animation-timing-function: cubic-bezier(.18,.7,.28,1); }
  93% { transform: translateY(34px) rotateY(1970deg) rotateX(9deg) scale(.98); }
  100% { transform: translateY(30px) rotateY(1980deg) rotateX(8deg); }
}
@keyframes shadowFlip {
  0%, 100% { transform: scale(1); opacity: .7; }
  45% { transform: scale(.5); opacity: .22; }
}
@media (max-width: 820px) {
  .masthead { align-items: flex-end; }
  .scorebug { transform: scale(.82); transform-origin: top right; }
  .setup { grid-template-columns: 1fr; gap: 16px; }
  .auth-grid { grid-template-columns: 1fr; }
  .locker-menu { grid-template-columns: 1fr; gap: 22px; min-height: 0; padding: 25px 0; }
  .versus { height: 0; }
  .play-card { min-height: auto; }
  .play-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field { min-height: 430px; aspect-ratio: .86; }
  .result-strip { grid-template-columns: auto 1fr; }
  .result-actions { grid-column: 1 / -1; min-width: 0; }
  .development-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .coin.flipping-red, .coin.flipping-blue, .coin-stage .coin-shadow { animation-duration: .3s; }
}
@media (max-width: 520px) {
  main { width: min(100% - 18px, 1180px); padding-top: 14px; }
  .masthead { display: block; }
  .scorebug { margin-top: 18px; transform: none; }
  .scorebug > div { gap: 8px; padding: 7px 9px; }
  .game-tools, .level-notice { align-items: stretch; flex-direction: column; }
  .possession-strip { align-items: flex-start; flex-wrap: wrap; gap: 9px 14px; }
  .drive-summary { width: 100%; flex-wrap: wrap; gap: 8px 14px; }
  .skill-row { grid-template-columns: 1fr auto; }
  .skill-meter { grid-row: 2; grid-column: 1 / -1; }
  .result-strip { gap: 10px; padding: 10px; }
  .result-actions button { padding: 10px 7px; font-size: .78rem; }
  .play-card { padding: 18px; }
  .play-grid { grid-template-columns: 1fr; }
  .play-option { min-height: 105px; }
  .rules-content { grid-template-columns: 1fr; }
  .gameplay-rules-card { padding: 38px 18px 22px; }
  .film-header { display: block; }
  .down-distance { display: inline-block; margin-top: 12px; }
  .player { width: 24px; height: 24px; margin: -12px; font-size: 8px; }
}

@media (max-width: 820px) and (orientation: portrait) {
  body.game-active .orientation-prompt {
    position: fixed;
    z-index: 5000;
    inset: 0;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 12px;
    padding: 28px;
    color: white;
    text-align: center;
    background: var(--ink);
  }
  .orientation-prompt strong { font: 900 2rem/1 Georgia, serif; }
  .orientation-prompt span { color: #d5d2c9; }
  .orientation-phone { display: grid; place-items: center; width: 76px; height: 120px; border: 5px solid var(--gold); border-radius: 12px; font-size: 2.5rem; transform: rotate(90deg); }
}

/* The installed phone app is rendered as one landscape game board. JavaScript
   measures the currently visible room and scales the whole board to the safe
   viewport, preventing both page-level horizontal and vertical scrolling. */
html.phone-screen-fit, html.phone-screen-fit body { width: 100%; height: 100%; min-height: 0; overflow: hidden; overscroll-behavior: none; }
html.phone-screen-fit main.phone-fit {
  position: fixed;
  z-index: 1;
  left: var(--phone-left, 4px);
  top: var(--phone-top, 4px);
  width: 1180px;
  max-width: none;
  margin: 0;
  padding: 14px 0 24px;
  transform: scale(var(--phone-scale, .6));
  transform-origin: top left;
}
@media (max-width: 932px) and (orientation: landscape) {
  html.installed-app main.phone-fit .setup { grid-template-columns: 1fr 56px 1fr; gap: 0; }
  html.installed-app main.phone-fit .play-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  html.installed-app main.phone-fit .field { min-height: 0; aspect-ratio: 120 / 53; }
  html.installed-app main.phone-fit .locker-menu { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px 30px; min-height: 260px; padding: 0; }
}

/* Sign-in stays at native phone size so focusing a field does not make iOS pan
   around a transformed desktop page. */
html.auth-phone-screen, html.auth-phone-screen body { width: 100%; height: 100%; min-height: 0; overflow: hidden; }
html.auth-phone-screen main {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  padding: max(8px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  overflow: hidden;
  transform: none;
}
html.auth-phone-screen .masthead { display: none; }
html.auth-phone-screen .auth-room {
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  padding: 14px;
  overflow: hidden;
  border-top-width: 5px;
  box-shadow: none;
}
html.auth-phone-screen .auth-heading { margin: 0 auto 10px; }
html.auth-phone-screen .auth-heading h2 { font-size: clamp(1.65rem, 7vw, 2.25rem); }
html.auth-phone-screen .auth-heading > p:last-child { margin: 7px 0 0; font-size: .78rem; line-height: 1.25; }
html.auth-phone-screen .auth-card { gap: 7px; max-width: 480px; padding: 11px 14px; }
html.auth-phone-screen .auth-card h3 { font-size: 1.15rem; }
html.auth-phone-screen .auth-card .eyebrow { margin-bottom: 2px; font-size: .58rem; }
html.auth-phone-screen .auth-card label { gap: 2px; font-size: .68rem; }
html.auth-phone-screen .auth-card input { min-height: 36px; padding: 6px 9px; font-size: 16px; }
html.auth-phone-screen .auth-primary { padding: 8px 10px; }
html.auth-phone-screen .auth-status { min-height: 1em; font-size: .68rem; }
html.auth-phone-screen .locker-menu { min-height: 0; padding: 8px 0; }

@media (max-width: 932px) and (orientation: landscape) {
  html.auth-phone-screen .auth-room { display: grid; grid-template-columns: minmax(220px,.8fr) minmax(330px,1.2fr); align-items: center; gap: 14px; }
  html.auth-phone-screen .auth-heading { margin: 0; padding: 8px; }
  html.auth-phone-screen .auth-card { width: 100%; margin: 0; }
  html.auth-phone-screen .locker-menu { width: 100%; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
  html.auth-phone-screen .locker-menu > div { gap: 12px; }
  html.auth-phone-screen .locker-button { width: 100%; min-height: 48px; }
  html.auth-phone-screen .match-waiting { grid-column: 1 / -1; margin: 4px 0 0; }
}

@media (max-width: 520px) and (orientation: portrait) {
  html.auth-phone-screen .auth-room { display: flex; flex-direction: column; justify-content: center; }
  html.auth-phone-screen .auth-heading { flex: 0 0 auto; }
  html.auth-phone-screen .auth-card { flex: 0 0 auto; width: 100%; }
  html.auth-phone-screen .locker-menu { width: 100%; grid-template-columns: 1fr; gap: 14px; }
  html.auth-phone-screen .locker-menu > div:not(.owner-tools) { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
  html.auth-phone-screen .locker-button { width: 100%; min-height: 50px; font-size: .72rem; }
}

/* Full-field playback must escape the installed app's scaled desktop board.
   Resetting the main canvas makes its fixed film room use the real phone
   viewport, covering the score, possession strip, and game controls. */
html.phone-screen-fit body.playback-active main.phone-fit {
  inset: 0;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  max-width: none;
  margin: 0;
  padding: 0;
  transform: none;
}

/* In-game play calling uses the whole board. The compact status rail contains
   the score, situation, and play count, leaving the rest for readable calls. */
body.game-active:has(#setup:not(.hidden)) .masthead,
body.game-active:has(#setup:not(.hidden)) .game-tools { display: none !important; }
.possession-strip { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; padding: 4px 7px; border-left: 0; }
.possession-strip .scorebug { justify-self: start; border: 2px solid white; transform: none; }
.possession-strip .scorebug > div { gap: 6px; padding: 5px 8px; }
.possession-strip .scorebug b { font-size: .58rem; }
.possession-strip .scorebug strong { font-size: 1rem; }
.possession-strip .scorebug .clock span { font-size: .6rem; }
.possession-strip .drive-summary { justify-content: center; gap: 18px; }
.possession-strip .drive-summary strong { font-size: 1rem; }
.possession-strip .possession-label,
.possession-strip #selectionDeadline { display: none; }
.possession-strip #seriesProgress { justify-self: end; color: white; white-space: nowrap; }

.setup:has(.defense-card.hidden) .offense-card,
.setup:has(.offense-card.hidden) .defense-card { grid-column: 1 / -1; }
body.game-active .setup { grid-template-columns: 1fr; width: 100%; }
body.game-active .setup .versus { display: none !important; }
body.game-active .play-card { min-height: 0; padding: 20px 24px; }
body.game-active .card-heading { padding-bottom: 12px; }
.card-status-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.card-status-actions .status { margin-left: 0; }
.card-status-actions #endGame { padding: 6px 10px; border: 0; border-radius: 3px; font-size: .66rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
body.game-active .play-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 15px; }
body.game-active .play-option { min-height: clamp(130px, 24vh, 190px); padding: clamp(10px, 1.4vw, 16px); }
body.game-active .play-option .play-name { font-size: clamp(1.05rem, 2vw, 1.45rem); }
body.game-active .lock-button { margin-top: 14px; padding: 12px 18px; }

/* Kickoffs occupy the same unobstructed full-screen field as play film. */
.kickoff-active { overflow: hidden; }
.kickoff-active #kickoffRoom { position: fixed; z-index: 900; inset: 0; display: block; width: 100vw; height: 100vh; margin: 0; padding: 0; background: #0f7b47; animation: none; }
.kickoff-active #kickoffRoom .film-header { display: none !important; }
.kickoff-active #kickoffRoom .field-shell { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; box-shadow: none; background: #0f7b47; }
.kickoff-active #kickoffRoom .field { width: 100%; height: 100%; min-height: 0; aspect-ratio: auto; border-width: 3px; transform: none; }
/* Punts get the same full-screen treatment as kickoffs and play film - this
   was missing, which left #puntRoom sized to whatever small space it got in
   normal page flow instead of the full viewport, squeezing all ten
   punt-team players' vertical spread into an overlapping stack. */
.punt-active { overflow: hidden; }
.punt-active #puntRoom { position: fixed; z-index: 900; inset: 0; display: block; width: 100vw; height: 100vh; margin: 0; padding: 0; background: #0f7b47; animation: none; }
.punt-active #puntRoom .film-header { display: none !important; }
.punt-active #puntRoom .field-shell { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; box-shadow: none; background: #0f7b47; }
.punt-active #puntRoom .field { width: 100%; height: 100%; min-height: 0; aspect-ratio: auto; border-width: 3px; transform: none; }
.kickoff-active:not(.kickoff-review) #kickoffResult { display: none !important; }
/* The punt result card sits over the full-screen punt view (it used to fall
   below the field, out of sight, leaving no way to continue). */
#puntResult { position: relative; }
.punt-result-close { display: none; }
.punt-active #puntResult:not(.hidden) { position: absolute; z-index: 40; left: 50%; top: 50%; display: grid; grid-template-columns: 1fr; gap: 12px; width: min(78vw, 760px); margin: 0; padding: 26px 20px 20px; color: var(--ink); text-align: center; border: 4px solid white; background: #f8f5ec; box-shadow: 0 14px 45px rgba(0,0,0,.58); transform: translate(-50%, -50%); }
.punt-active #puntResult small { color: #706c62; }
.punt-active #puntResult h3 { margin: 7px 0 2px; font: 900 clamp(1.15rem, 2.6vw, 1.9rem)/1.15 Arial, sans-serif; }
.punt-active #puntResult .watch-button { justify-self: center; min-width: min(100%, 300px); margin: 0; }
.punt-active #puntResult .punt-result-close { display: block; position: absolute; top: 6px; right: 8px; }
.kickoff-active.kickoff-review #kickoffResult { position: absolute; z-index: 40; left: 50%; top: 50%; display: grid !important; grid-template-columns: 1fr; gap: 12px; width: min(78vw, 760px); margin: 0; padding: 20px; color: var(--ink); text-align: center; border: 4px solid white; background: #f8f5ec; box-shadow: 0 14px 45px rgba(0,0,0,.58); transform: translate(-50%, -50%); }
.kickoff-active.kickoff-review #kickoffResult small { color: #706c62; }
.kickoff-active.kickoff-review #kickoffResult h3 { margin: 7px 0 2px; font: 900 clamp(1.25rem, 3vw, 2.15rem)/1.08 Arial, sans-serif; }
.kickoff-active.kickoff-review #kickoffResult .watch-button { justify-self: center; min-width: min(100%, 300px); margin: 0; }
html.phone-screen-fit body.kickoff-active main.phone-fit { inset: 0; left: 0; top: 0; width: 100vw; height: 100vh; max-width: none; margin: 0; padding: 0; transform: none; }

@media (max-height: 520px) and (orientation: landscape) {
  body.game-active:not(.playback-active):not(.kickoff-active) main { padding-top: 5px; padding-bottom: 5px; }
  body.game-active .possession-strip { margin-bottom: 6px; }
  body.game-active .play-card { padding: 10px 16px; }
  body.game-active .card-heading { padding-bottom: 7px; }
  body.game-active .team-dot { width: 27px; height: 27px; }
  body.game-active .card-heading h2 { font-size: 1.05rem; }
  body.game-active .play-grid { gap: 8px; margin-top: 8px; }
  body.game-active .play-option { min-height: 104px; padding: 8px 8px 10px; gap: 5px; }
  body.game-active .play-option .play-name { font-size: .85rem; }
  body.game-active .lock-button { margin-top: 8px; padding: 9px 14px; }
}

/* ---- Playoffs ---- */
.playoff-button { background: #6d4aa8; border-color: #4a2f7a; }
.playoff-card { width: min(96vw, 1060px); max-height: 92vh; overflow-y: auto; padding: 34px 26px 26px; }
.playoff-card h2 { margin: 4px 0 8px; font: 900 clamp(1.8rem, 4vw, 2.6rem)/1.05 Georgia, serif; }
.playoff-card > p:not(.eyebrow) { max-width: 640px; margin: 0 auto 14px; color: #4f4c45; line-height: 1.45; }
.playoff-size-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 18px 0 6px; }
.playoff-size-picker button { display: grid; gap: 6px; padding: 18px 12px; color: white; background: var(--field); border: 3px solid #174f36; box-shadow: 5px 5px 0 var(--gold); font: 900 1.2rem Georgia, serif; cursor: pointer; }
.playoff-size-picker small { font: 700 .78rem/1.3 Arial, sans-serif; opacity: .9; }
.playoff-bracket { overflow-x: auto; margin: 6px -6px 12px; padding: 0 6px 6px; text-align: left; }
.pb-key { margin: 0 0 8px; color: #6b675e; font-size: .72rem; text-align: center; }
.pb-rounds { display: flex; gap: 14px; min-width: max-content; }
.pb-round { display: flex; flex-direction: column; gap: 8px; width: 210px; }
.pb-games { display: flex; flex: 1; flex-direction: column; justify-content: space-around; gap: 10px; }
.pb-round h3 { min-height: 2.4em; margin: 0; color: var(--ink); font: 900 .76rem/1.2 Arial, sans-serif; letter-spacing: .08em; text-align: center; text-transform: uppercase; }
.pb-game { position: relative; padding: 6px 7px; background: white; border: 1px solid #d6cfc0; box-shadow: 2px 2px 0 rgba(0,0,0,.08); }
.pb-game.has-you { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(23,63,115,.25); }
.pb-tag, .pb-note { display: block; color: #8a8478; font: 900 .58rem/1.4 Arial, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.pb-team { display: grid; grid-template-columns: 12px 18px 1fr auto; align-items: center; gap: 5px; padding: 3px 0; font: 700 .8rem/1.2 Arial, sans-serif; }
.pb-team i, .pb-bye i { width: 11px; height: 11px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0,0,0,.35); }
.pb-seed { color: #8a8478; font-size: .7rem; text-align: right; }
.pb-team b { min-width: 20px; text-align: right; }
.pb-team.won { font-weight: 900; }
.pb-team.lost { color: #9a958a; text-decoration: line-through; }
.pb-team.you .pb-name { color: var(--blue); }
.pb-bye { display: flex; align-items: center; gap: 6px; padding: 6px 8px; color: #6b675e; background: #f4f0e6; border: 1px dashed #cfc6b4; font: 700 .76rem Arial, sans-serif; }
.pb-bye.you { color: var(--blue); }
.pb-round.future .pb-tbd { padding: 18px 8px; color: #9a958a; background: #f7f4ec; border: 1px dashed #d6cfc0; font: 700 .76rem Arial, sans-serif; text-align: center; }
.playoff-actions .locker-button { width: 300px; }
.playoff-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 18px; }
.resume-card { width: min(92vw, 560px); }
.resume-facts { margin: 16px 0 22px; padding: 0; list-style: none; text-align: left; }
.resume-facts li { padding: 9px 0; border-bottom: 1px solid #e3ddcf; line-height: 1.4; }
.resume-facts b { display: inline-block; min-width: 64px; color: var(--field); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
#viewBracketPregame { display: block; margin: 14px auto 0; }
#viewBracketPregame.hidden { display: none; }
@media (max-width: 620px) {
  .playoff-size-picker { grid-template-columns: 1fr; }
  .pb-round { width: 180px; }
}
/* On a TV the whole bracket fits on one screen - there's no scrolling with a remote. */
html.tv-mode .playoff-card { max-height: 98vh; padding: 16px 22px 14px; }
html.tv-mode .playoff-card h2 { margin: 0 0 4px; font-size: 1.6rem; }
html.tv-mode .playoff-card > p:not(.eyebrow) { margin-bottom: 6px; font-size: .86rem; }
html.tv-mode .pb-key { display: none; }
html.tv-mode .playoff-bracket { overflow: visible; margin-bottom: 8px; }
html.tv-mode .pb-rounds { justify-content: center; min-width: 0; gap: 10px; }
html.tv-mode .pb-round { width: 196px; gap: 4px; }
html.tv-mode .pb-round h3 { min-height: 2.2em; font-size: .64rem; }
html.tv-mode .pb-games { gap: 5px; }
html.tv-mode .pb-game { padding: 2px 6px; }
html.tv-mode .pb-team { padding: 1px 0; font-size: .7rem; }
html.tv-mode .pb-tag, html.tv-mode .pb-note { font-size: .5rem; line-height: 1.2; }
html.tv-mode .pb-bye { padding: 3px 6px; font-size: .68rem; }
html.tv-mode .pb-round.future .pb-tbd { padding: 10px 6px; }
html.tv-mode .playoff-card { display: grid; grid-template-columns: 1fr auto; column-gap: 24px; align-items: center; text-align: left; }
html.tv-mode .playoff-card > .eyebrow { display: none; }
html.tv-mode .playoff-card > h2, html.tv-mode .playoff-card > #playoffMessage { grid-column: 1; margin-left: 0; }
html.tv-mode .playoff-card > .playoff-actions { grid-column: 2; grid-row: 1 / span 2; flex-direction: column; gap: 8px; margin-right: 44px; }
html.tv-mode .playoff-actions .locker-button { width: 240px; min-height: 46px; }
html.tv-mode .playoff-card > .playoff-bracket, html.tv-mode .playoff-card > .playoff-size-picker { grid-column: 1 / -1; }
html.tv-mode .pb-tag { display: none; }

/* Stadium scoreboard at the top of the right end zone (updateFieldScoreboards). */
.field-scoreboard { position: absolute; z-index: 9; top: 2.5%; right: .5%; width: 7.3%; padding: .35em .3em; color: #fff; background: rgba(12,16,15,.88); border: 1px solid rgba(232,186,87,.9); border-radius: 4px; box-shadow: 0 2px 6px rgba(0,0,0,.4); font: 900 clamp(7.5px, .92vw, 14px)/1.25 Arial, sans-serif; letter-spacing: .02em; pointer-events: none; }
.field-scoreboard:empty { display: none; }
.fs-team { display: grid; grid-template-columns: .8em 1fr auto .7em; align-items: center; gap: .25em; }
.fs-team i { width: .75em; height: .75em; border-radius: 50%; box-shadow: 0 0 0 1px rgba(255,255,255,.6); }
.fs-team span { overflow: hidden; white-space: nowrap; }
.fs-team b { color: #f2c230; font-size: 1.15em; }
.fs-team em { width: .7em; height: .45em; background: #8a4b2a; border: 1px solid #e8c49b; border-radius: 50%; }
.fs-team em[hidden] { visibility: hidden; }
.fs-line { margin-top: .2em; padding-top: .2em; border-top: 1px solid rgba(255,255,255,.18); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fs-ball { color: #d9d4c7; font-size: .9em; }

/* Database usage counter in the locker room (game owner only). */
.usage-meter { grid-column: 1 / -1; margin: 6px auto 0; padding: 8px 14px; max-width: 620px; color: #2f684d; background: #eef5ef; border-left: 5px solid #2f684d; font: 700 .78rem/1.4 Arial, sans-serif; text-align: center; }
.usage-meter.caution { color: #7a5200; background: #fff5dc; border-left-color: #e8ba57; }
.usage-meter.danger { color: #8f1d22; background: #fde8e8; border-left-color: #b82a2d; }

/* Game owner: unfinished games list. */
.owner-tools { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 22px; }
.manage-games-button { background: #5c5a52; border-color: #3d3b35; }
.managed-game-you { flex: 0 0 auto; color: var(--field); font: 900 .76rem Arial, sans-serif; letter-spacing: .06em; text-transform: uppercase; }
.manage-games-card { width: min(94vw, 820px); max-height: 90vh; overflow-y: auto; }
.manage-games-card > p:not(.eyebrow) { margin: 0 auto 14px; max-width: 640px; color: #4f4c45; line-height: 1.45; }
.manage-games-list { display: grid; gap: 10px; text-align: left; }
.managed-game { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; background: white; border: 1px solid #d6cfc0; }
.managed-game strong { display: block; font: 900 .95rem/1.3 Georgia, serif; }
.managed-game small { display: block; margin-top: 3px; color: #6b675e; font: 700 .76rem/1.4 Arial, sans-serif; }
.managed-game-delete { flex: 0 0 auto; padding: 9px 18px; color: white; background: var(--red); border: 2px solid #741619; font-weight: 900; cursor: pointer; }
.managed-game-delete:disabled { opacity: .6; cursor: wait; }
@media (max-width: 620px) { .managed-game { flex-direction: column; align-items: stretch; } }
.delete-guests-button { display: block; margin: 0 auto 14px; }
.delete-guests-button.hidden { display: none; }

/* Halftime / overtime announcement before the kickoff. */
.period-break-card h2 { margin: 4px 0 10px; font: 900 clamp(2.2rem, 6vw, 3.4rem)/1 Georgia, serif; }
.period-break-score { margin: 0 0 10px; color: var(--ink); font: 900 1.15rem Arial, sans-serif; letter-spacing: .02em; }
.period-break-card > p:not(.eyebrow):not(.period-break-score) { margin: 0 auto 20px; max-width: 440px; color: #4f4c45; line-height: 1.45; }

/* ---- Playoff victory celebration ---- */
.victory-overlay { position: fixed; z-index: 1100; inset: 0; display: grid; place-items: center; padding: 16px; overflow: hidden; background: radial-gradient(circle at 50% 45%, rgba(48,36,6,.86), rgba(3,8,6,.96) 70%); }
.victory-rays { position: absolute; left: 50%; top: 50%; width: 190vmax; height: 190vmax; margin: -95vmax 0 0 -95vmax; background: repeating-conic-gradient(from 0deg, rgba(255,214,102,.16) 0deg 7deg, transparent 7deg 20deg); animation: victory-spin 28s linear infinite; pointer-events: none; }
.victory-confetti { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.victory-confetti i { position: absolute; top: -12%; width: 10px; height: 22px; background: var(--piece-color); border-radius: 2px; animation: confetti-fall var(--fall-time) linear var(--delay) infinite; }
.victory-confetti i.round { width: 12px; height: 12px; border-radius: 50%; }
.victory-confetti i.streamer { width: 5px; height: 42px; border-radius: 3px; }
.victory-card { position: relative; z-index: 1; width: min(460px, 92vw); max-height: 92vh; padding: 26px 26px 24px; text-align: center; color: #fff6dc; border-radius: 18px;
  background: linear-gradient(160deg, #1d1a10 0%, #0c0b07 55%, #1f1a0b 100%) padding-box, conic-gradient(from var(--victory-angle, 0deg), #ffe9a3, #c8902a, #fff3c4, #a8701c, #ffe9a3) border-box;
  border: 6px solid transparent; box-shadow: 0 0 0 2px #00000080, 0 0 60px rgba(255,200,80,.45), 0 24px 70px #000c;
  animation: victory-pop .7s cubic-bezier(.2,1.4,.35,1) both, victory-glow 2.4s ease-in-out .7s infinite alternate; }
@property --victory-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.victory-card { animation: victory-pop .7s cubic-bezier(.2,1.4,.35,1) both, victory-glow 2.4s ease-in-out .7s infinite alternate, victory-border 4s linear infinite; }
.victory-trophy { width: clamp(84px, 22vh, 150px); margin: -4px auto 8px; filter: drop-shadow(0 6px 14px rgba(255,190,60,.55)); animation: victory-float 2.6s ease-in-out infinite; }
.victory-trophy svg { display: block; width: 100%; height: auto; }
.victory-round { margin: 0 0 4px; color: #e9c46a; font: 800 .82rem/1.2 Arial, sans-serif; letter-spacing: .26em; text-transform: uppercase; }
.victory-title { margin: 0 0 10px; font: 900 clamp(2rem, 7vw, 3.1rem)/1 Georgia, "Times New Roman", serif; letter-spacing: .02em; text-transform: uppercase;
  background: linear-gradient(100deg, #b07a1c 0%, #ffe9a3 30%, #fff 45%, #ffd36b 60%, #b07a1c 100%); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: victory-shine 3s linear infinite; }
.victory-team { display: inline-block; margin: 0 0 12px; padding: 6px 16px; border-radius: 999px; background: var(--victory-team, #174d87); color: var(--victory-team-text, #fff); border: 2px solid #e9c46a; font: 900 1.05rem/1.2 Arial, sans-serif; letter-spacing: .05em; text-transform: uppercase; }
.victory-score { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0 0 10px; font: 900 clamp(1.5rem, 5vw, 2.1rem)/1 Arial, sans-serif; color: #fff; }
.victory-score small { display: block; color: #c9b98a; font: 700 .68rem/1.3 Arial, sans-serif; letter-spacing: .1em; text-transform: uppercase; }
.victory-score .dash { color: #e9c46a; }
.victory-next { margin: 0; color: #f1e3b5; font: 700 1rem/1.35 Arial, sans-serif; }
.victory-sparkles i { position: absolute; width: 14px; height: 14px; background: #fff3c4; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: victory-twinkle 1.8s ease-in-out infinite; }
.victory-sparkles i:nth-child(1) { left: 8%; top: 10%; animation-delay: 0s; }
.victory-sparkles i:nth-child(2) { right: 9%; top: 16%; animation-delay: .5s; width: 10px; height: 10px; }
.victory-sparkles i:nth-child(3) { left: 14%; top: 46%; animation-delay: 1s; width: 9px; height: 9px; }
.victory-sparkles i:nth-child(4) { right: 12%; top: 52%; animation-delay: .3s; }
.victory-sparkles i:nth-child(5) { left: 10%; bottom: 10%; animation-delay: .8s; width: 11px; height: 11px; }
.victory-sparkles i:nth-child(6) { right: 8%; bottom: 14%; animation-delay: 1.3s; width: 9px; height: 9px; }
.victory-overlay.champion .victory-card { width: min(520px, 94vw); box-shadow: 0 0 0 2px #00000080, 0 0 90px rgba(255,210,90,.7), 0 24px 70px #000c; }
.victory-overlay.champion .victory-title { font-size: clamp(1.9rem, 6.4vw, 2.9rem); }
.victory-overlay.champion .victory-rays { background: repeating-conic-gradient(from 0deg, rgba(255,214,102,.26) 0deg 6deg, transparent 6deg 15deg); animation-duration: 18s; }
.victory-ribbon { display: inline-block; margin: 0 0 8px; padding: 4px 14px; background: linear-gradient(#d33a3a, #9e1f22); color: #fff; font: 900 .75rem/1.2 Arial, sans-serif; letter-spacing: .2em; text-transform: uppercase; clip-path: polygon(0 0, 100% 0, 94% 50%, 100% 100%, 0 100%, 6% 50%); }
@keyframes victory-pop { 0% { opacity: 0; transform: scale(.3) rotate(-6deg); } 100% { opacity: 1; transform: none; } }
@keyframes victory-glow { to { box-shadow: 0 0 0 2px #00000080, 0 0 95px rgba(255,210,90,.75), 0 24px 70px #000c; } }
@keyframes victory-border { to { --victory-angle: 360deg; } }
@keyframes victory-spin { to { transform: rotate(360deg); } }
@keyframes victory-float { 50% { transform: translateY(-7px) rotate(-2deg); } }
@keyframes victory-shine { to { background-position: -250% 0; } }
@keyframes victory-twinkle { 0%, 100% { opacity: 0; transform: scale(.3) rotate(0); } 50% { opacity: 1; transform: scale(1) rotate(45deg); } }
@media (prefers-reduced-motion: reduce) { .victory-rays, .victory-trophy, .victory-title, .victory-sparkles i { animation: none; } }
@media (max-height: 460px) { .victory-card { padding: 14px 20px; } .victory-trophy { width: 70px; margin-bottom: 2px; } .victory-title { margin-bottom: 6px; } .victory-team { margin-bottom: 6px; } }

/* ---- Season card ---- */
.season-top-actions { margin: 0 0 12px; }
.season-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 4px 0 12px; }
.season-tabs button { padding: 8px 14px; color: var(--ink); background: #f3eee2; border: 2px solid #d6cfc0; border-radius: 999px; font: 900 .74rem/1 Arial, sans-serif; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.season-tabs button[aria-selected="true"] { color: #fff; background: var(--blue); border-color: var(--blue); }
.season-body { text-align: left; }
.st-conferences { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.st-conference h3 { margin: 0 0 6px; color: var(--ink); font: 900 .9rem/1.2 Arial, sans-serif; letter-spacing: .12em; text-align: center; }
.st-table { width: 100%; border-collapse: collapse; background: #fff; font: 700 .78rem/1.25 Arial, sans-serif; }
.st-table th { padding: 5px 6px; color: #6b675e; font-size: .64rem; letter-spacing: .08em; text-align: left; text-transform: uppercase; border-bottom: 2px solid #d6cfc0; }
.st-table td { padding: 4px 6px; border-bottom: 1px solid #ece6d8; font-variant-numeric: tabular-nums; }
.st-table tr.cut td { border-bottom: 3px solid var(--blue); }
.st-table tr.you td { color: var(--blue); background: #eef3fa; font-weight: 900; }
.st-team { display: flex; align-items: center; gap: 6px; }
.st-team i, .sc-opp i { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%; border: 1px solid #0003; }
.season-schedule { display: grid; gap: 6px; max-width: 620px; margin: 0 auto; padding: 0; list-style: none; }
.season-schedule li { display: grid; grid-template-columns: 70px 1fr auto; align-items: center; gap: 10px; padding: 7px 10px; background: #fff; border: 1px solid #d6cfc0; font: 700 .82rem/1.25 Arial, sans-serif; }
.sc-week { color: #6b675e; font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; }
.sc-opp { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sc-opp small { color: #8a8478; }
.sc-win { color: #1d7a3a; }
.sc-loss { color: #a42a2a; }
.sc-next { color: var(--blue); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; }
.season-body .development-team { max-width: 620px; margin: 0 auto; }
@media (max-width: 520px) { .season-schedule li { grid-template-columns: 1fr auto; } .sc-week { grid-column: 1 / -1; } .st-conferences { grid-template-columns: 1fr; } }

/* ---- Team picker, matchup card, helmets ---- */
.team-picker-card { width: min(96vw, 1100px); max-height: 94vh; overflow-y: auto; padding: 28px 22px 22px; }
.team-picker-card h2 { margin: 2px 0 6px; font: 900 clamp(1.6rem, 3.6vw, 2.3rem)/1.05 Georgia, serif; }
.team-picker-card > p:not(.eyebrow) { margin: 0 auto 10px; color: #4f4c45; }
.team-pick-conference h3 { margin: 10px 0 6px; color: var(--ink); font: 900 .8rem/1 Arial, sans-serif; letter-spacing: .16em; text-align: left; }
.team-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.team-pick { position: relative; display: grid; justify-items: center; gap: 2px; padding: 8px 6px 7px; color: var(--ink); background: #fff; border: 2px solid #ddd5c4; border-radius: 8px; border-bottom: 5px solid var(--pick-main); font: 900 .78rem/1.1 Arial, sans-serif; text-transform: uppercase; letter-spacing: .03em; cursor: pointer; }
.team-pick img { width: 100%; max-width: 104px; aspect-ratio: 1.2; object-fit: contain; }
.team-pick:hover, .team-pick:focus-visible { border-color: var(--pick-ring); transform: translateY(-2px); }
.team-pick.selected { border-color: var(--pick-main); box-shadow: 0 0 0 3px var(--pick-ring); background: #fffaf0; }
.team-pick:disabled { opacity: .35; cursor: not-allowed; transform: none; }
.team-pick small { position: absolute; top: 6px; right: 6px; padding: 2px 5px; color: #fff; background: #555; border-radius: 3px; font-size: .58rem; }
.matchup-card { width: min(94vw, 720px); padding: 30px 24px 24px; }
.matchup-teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin: 8px 0 18px; }
.matchup-team { display: grid; justify-items: center; gap: 4px; }
.matchup-team b { font: 900 clamp(1.2rem, 3vw, 1.7rem)/1.1 Georgia, serif; }
.matchup-team small { color: #6b675e; font: 700 .78rem/1.2 Arial, sans-serif; letter-spacing: .06em; text-transform: uppercase; }
.matchup-helmet { width: min(100%, 240px); aspect-ratio: 1.2; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0,0,0,.25)); }
.matchup-vs { color: var(--gold, #e8ba57); font: 900 clamp(1.6rem, 4vw, 2.4rem)/1 Georgia, serif; }
.quick-result-helmets span { font: 900 clamp(1.8rem, 5vw, 2.6rem)/1 Arial, sans-serif; }
.list-helmet { width: 28px; height: 24px; flex: none; object-fit: contain; }
.pb-team.has-helmet { grid-template-columns: 28px 18px 1fr auto; }
.pb-bye .list-helmet { vertical-align: middle; margin-right: 4px; }
.development-team h3 .list-helmet { width: 40px; height: 34px; vertical-align: middle; margin-right: 8px; }
.victory-trophy.with-helmet { display: flex; align-items: center; justify-content: center; gap: 10px; width: auto; }
.victory-trophy.with-helmet svg { width: clamp(70px, 18vh, 130px); }
.victory-helmet { width: clamp(110px, 26vh, 200px); aspect-ratio: 1.2; object-fit: contain; }
@media (max-width: 560px) { .team-pick-grid { grid-template-columns: repeat(4, 1fr); gap: 5px; } .team-pick { font-size: .6rem; padding: 5px 3px; } .matchup-teams { gap: 4px; } }

/* A Quick Game can be forfeited right from the play result card. */
.result-actions .forfeit-result, .playback-active.outcome-review #resultStrip .result-actions .forfeit-result { color: #b3261e; }

/* The referee's signals, on the play result card beside the description. */
.outcome-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.outcome-main .outcome-copy { flex: 1; }
.result-signals { display: flex; flex: none; gap: 8px; }
.result-signals figure { display: grid; justify-items: center; gap: 2px; margin: 0; }
.result-signals img { display: block; height: clamp(84px, 17vh, 150px); width: auto; border-radius: 6px; box-shadow: 0 3px 10px rgba(0,0,0,.25); }
.result-signals figcaption { color: #3d3a34; font: 900 clamp(.56rem, 1vw, .72rem)/1.15 Arial, sans-serif; letter-spacing: .04em; text-align: center; text-transform: uppercase; max-width: 130px; }
@media (max-height: 460px) { .result-signals img { height: 70px; } }
@media (max-width: 640px) { .outcome-main { flex-direction: column; align-items: stretch; gap: 6px; } .result-signals { justify-content: center; } .result-signals img { height: 64px; } }

/* The result card: the referee's signals, and under them one line saying
   what happened - no play-call names, no repeated down and distance. */
.outcome-main, .playback-active.outcome-review #resultStrip .outcome-main { flex-direction: column; align-items: center; gap: 8px; }
.result-signals { justify-content: center; }
.outcome-main .outcome-copy { flex: none; width: 100%; text-align: center; }
.outcome-copy #resultBadge, .outcome-copy #outcomeMatchup, .outcome-copy h3 > i, .outcome-copy #resultDetail { display: none; }
.outcome-copy h3 { justify-content: center; }
.result-strip.show-penalty-detail .outcome-copy #resultDetail { display: block; margin-top: 3px; color: #4f4c45; font-size: clamp(.7rem, 1.2vw, .9rem); }

/* ---- Halftime report (on the last play's result card) ---- */
.period-report { text-align: center; }
.period-report .eyebrow { margin-bottom: 2px; }
.period-report-title { margin: 0 0 2px; font: 900 clamp(1.3rem, 3vw, 2rem)/1.05 Georgia, serif; }
.period-report-score { margin: 0 0 8px; font: 900 clamp(1rem, 2.2vw, 1.4rem)/1.2 Arial, sans-serif; }
.period-report-table { width: min(100%, 560px); margin: 0 auto 8px; border-collapse: collapse; font: 700 clamp(.72rem, 1.4vw, .92rem)/1.3 Arial, sans-serif; font-variant-numeric: tabular-nums; }
.period-report-table thead th { padding: 4px 6px; font-size: .85em; text-transform: uppercase; letter-spacing: .04em; border-bottom: 2px solid #d6cfc0; }
.period-report-table thead th .list-helmet { vertical-align: middle; margin-right: 5px; }
.period-report-table tbody th { padding: 3px 8px; color: #6b675e; font-size: .78em; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.period-report-table td { width: 38%; padding: 3px 6px; text-align: center; border-bottom: 1px solid #ece6d8; }
.period-report-next { margin: 0; color: #3d3a34; font: 700 clamp(.78rem, 1.4vw, .95rem)/1.35 Arial, sans-serif; }
.result-strip .period-report { padding: 6px 0 2px; border-top: 1px solid #e3dccd; }
#puntResult .period-report { grid-column: 1 / -1; padding-top: 8px; }
#resultStrip.halftime .outcome-status-bar { display: none; }
.period-report-title { margin: 2px 0 4px; font-size: clamp(1.9rem, 4.6vw, 3rem); }
#resultStrip.halftime .outcome-main { display: none; }
#resultStrip.halftime .period-report { border-top: 0; padding-top: 0; }
.period-report h3.period-report-title { margin: 2px 0 4px; font: 900 clamp(1.9rem, 4.6vw, 3rem)/1.05 Georgia, serif; }

/* ---- TV fixes ---- */
/* Many TVs crop a few percent off every edge (overscan): keep the field and
   its scoreboard inside a safe margin, with the grass filling the border. */
html.tv-mode .playback-active #filmRoom .field-shell,
html.tv-mode .kickoff-active #kickoffRoom .field-shell,
html.tv-mode .punt-active #puntRoom .field-shell { inset: 4.5vh 3.5vw; width: auto; height: auto; }
/* The season card shares the playoff card's look but not its TV layout
   (that one only places the bracket card's own parts). */
html.tv-mode .season-card { display: block; text-align: center; }
html.tv-mode .season-card > .eyebrow { display: block; }
html.tv-mode .season-card > h2, html.tv-mode .season-card > #seasonMessage { margin-left: auto; margin-right: auto; }
html.tv-mode .season-card > .playoff-actions { flex-direction: row; margin-right: 0; }
/* On a TV the field scoreboard is read from across the room: about 1.75x
   bigger, reaching over the end zone onto the end of the field. */
html.tv-mode .field-scoreboard { width: 15%; padding: .4em .45em; border-width: 2px; font-size: clamp(12px, 1.65vw, 26px); }

/* Picking a play: the first pick gives it a green border, picking it again
   locks it in - no separate lock button. */
#lockOffense, #lockDefense { display: none !important; }
.play-option.selected { background: rgba(46,157,87,.14); }
.play-option.selected .chalkboard { box-shadow: inset 0 0 0 3px #2e9d57, inset 0 0 0 6px #c78f4f, 0 0 0 4px #2e9d57, 0 8px 18px rgba(20,25,23,.2); }
.lock-hint { margin: 12px 0 0; color: #5d5a52; font: 700 .85rem/1.3 Arial, sans-serif; text-align: center; }
.play-card .play-grid.hidden + .lock-hint { display: none; }
.play-option.selected { background: rgba(30,111,217,.14); }
.play-option.selected .chalkboard { box-shadow: inset 0 0 0 3px #1e6fd9, inset 0 0 0 6px #c78f4f, 0 0 0 4px #1e6fd9, 0 8px 18px rgba(20,25,23,.2); }

/* No Replay button on the play result card. */
#replay { display: none !important; }
/* The smaller win celebration (a season week, a Quick Game, two players). */
.victory-overlay.game-win .victory-rays { opacity: .55; animation-duration: 40s; }
.victory-overlay.game-win .victory-card { width: min(420px, 90vw); }
.victory-overlay.game-win .victory-title { font-size: clamp(1.8rem, 6vw, 2.6rem); }
.victory-overlay.game-win .victory-helmet { width: clamp(140px, 30vh, 230px); }

/* End zones with the home team's name between two helmets (upright). */
.endzone.team-zone { gap: .6em; align-content: center; background: color-mix(in srgb, var(--zone-color) 28%, transparent); }
.endzone.team-zone span { letter-spacing: .22em; }
.endzone-helmet { width: 72%; max-width: 64px; height: auto; writing-mode: horizontal-tb; filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
.endzone.team-zone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.2em; writing-mode: horizontal-tb; }
.endzone.team-zone span { writing-mode: vertical-rl; }
.endzone.team-zone .endzone-helmet { width: 78%; max-width: 72px; }
.endzone.team-zone span { font-size: 1.35em; }
.endzone.team-zone .endzone-helmet { width: 56%; max-width: 50px; }

/* ---- Turnover! (a few seconds, then gone) ---- */
.turnover-flash { position: fixed; z-index: 1150; inset: 0; display: grid; place-items: center; background: rgba(5,8,7,.45); pointer-events: none; }
.turnover-flash-card { min-width: min(460px, 86vw); padding: 22px 30px 24px; text-align: center; color: #fff; background: linear-gradient(160deg, #1b1f1d, #0c0e0d); border: 5px solid var(--flash-color, #e8ba57); border-radius: 16px; box-shadow: 0 0 0 2px #000a, 0 18px 50px #000c; animation: turnover-pop .45s cubic-bezier(.2,1.5,.35,1) both; }
.turnover-flash-card h2 { margin: 4px 0 6px; color: #ffd36b; font: 900 clamp(2.2rem, 7vw, 3.6rem)/1 Georgia, serif; letter-spacing: .03em; text-transform: uppercase; }
.turnover-flash-card p { margin: 0; font: 800 clamp(1rem, 2.4vw, 1.35rem)/1.3 Arial, sans-serif; }
.turnover-helmet { width: clamp(110px, 22vh, 180px); aspect-ratio: 1.2; object-fit: contain; filter: drop-shadow(0 6px 12px rgba(0,0,0,.5)); }
@keyframes turnover-pop { 0% { opacity: 0; transform: scale(.4) rotate(-4deg); } 100% { opacity: 1; transform: none; } }

/* ---- "Kick a field goal now?" (before fourth down) ---- */
.early-kick-confirm-card p { font-size: 1.1rem; line-height: 1.45; }
.early-kick-confirm-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 22px; }
.early-kick-confirm-actions .keep-playing { background: #2f6b4f; }

/* ---- Super Bowl halftime show ---- */
.halftime-show { position: fixed; z-index: 1200; inset: 0; display: grid; place-items: center; overflow: hidden; background: radial-gradient(ellipse at 50% 110%, #2a0f4d 0%, #0b0716 60%, #05030a 100%); }
.halftime-fireworks { position: absolute; inset: 0; width: 100%; height: 100%; }
.halftime-lights { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen; }
.halftime-lights i { position: absolute; bottom: -10%; left: 50%; width: 34vmax; height: 130vh; transform-origin: 50% 100%; opacity: .55; filter: blur(6px);
  background: linear-gradient(to top, var(--beam, #ff3bd4) 0%, transparent 85%); clip-path: polygon(46% 100%, 54% 100%, 100% 0, 0 0);
  animation: halftime-sweep 3.2s ease-in-out infinite alternate, halftime-blink .9s steps(2, jump-none) infinite; }
.halftime-lights i:nth-child(1) { --beam: #ff3bd4; margin-left: -45vw; animation-delay: 0s, .1s; }
.halftime-lights i:nth-child(2) { --beam: #3bd1ff; margin-left: -25vw; animation-delay: -.8s, .4s; }
.halftime-lights i:nth-child(3) { --beam: #ffd23f; margin-left: -17vmax; animation-delay: -1.6s, .2s; }
.halftime-lights i:nth-child(4) { --beam: #7dff6a; margin-left: 8vw; animation-delay: -2.4s, .6s; }
.halftime-lights i:nth-child(5) { --beam: #ff6a3b; margin-left: 20vw; animation-delay: -1.2s, .3s; }
@keyframes halftime-sweep { from { transform: rotate(-28deg); } to { transform: rotate(28deg); } }
@keyframes halftime-blink { 0% { opacity: .65; } 100% { opacity: .25; } }
.halftime-show-card { position: relative; z-index: 1; padding: 14px 18px 16px; text-align: center; color: #fff; background: rgba(10,6,20,.82); border: 4px solid #ffd23f; border-radius: 18px;
  box-shadow: 0 0 0 3px #ff3bd4, 0 0 40px #ff3bd499, 0 0 90px #3bd1ff66; animation: halftime-glow 1.2s ease-in-out infinite alternate; }
@keyframes halftime-glow { from { box-shadow: 0 0 0 3px #ff3bd4, 0 0 30px #ff3bd499, 0 0 70px #3bd1ff55; } to { box-shadow: 0 0 0 3px #3bd1ff, 0 0 50px #3bd1ffaa, 0 0 110px #ff3bd477; } }
.halftime-show-card .eyebrow { margin: 0; color: #ffd23f; letter-spacing: .3em; }
.halftime-show-card h2 { margin: 2px 0 10px; font: 900 clamp(1.8rem, 5vw, 3rem)/1 Georgia, serif; text-transform: uppercase; letter-spacing: .04em; color: #fff; text-shadow: 0 0 12px #ff3bd4, 0 0 24px #3bd1ff; }
.halftime-show-card video { display: block; width: auto; height: min(62vh, 560px); max-width: 82vw; margin: 0 auto; border-radius: 10px; background: #000; opacity: 0; transition: opacity .4s ease; }
/* The video fades in once it's really playing, so nothing the TV draws
   before its first frame (a Play icon, a gray box) is ever seen. */
.halftime-show-card video.playing { opacity: 1; }
.halftime-show-skip { margin-top: 12px; width: auto; padding: 8px 26px; font-size: .95rem; color: #fff; background: rgba(255,255,255,.14); border: 2px solid rgba(255,255,255,.5); border-radius: 999px; }

/* The owner's Locker Room button, beside Forfeit Game */
.card-status-actions .owner-locker { padding: 6px 10px; margin-right: 6px; border: 0; border-radius: 3px; font-size: .66rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; color: #fff; background: #5c5a52; }

/* Team-colored win confetti: a faint light edge keeps dark colors (black,
   navy, brown) visible against the dark celebration background. */
.victory-confetti i { box-shadow: 0 0 0 1.5px rgba(255,255,255,.55); }

/* ---- Scouting report (after the final game report) ---- */
.scout-note { margin: 0 0 10px; color: #6b675e; font: 700 .85rem/1.3 Arial, sans-serif; }
.scout-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px 20px; text-align: left; }
.scout-side h4 { margin: 0 0 4px; padding-bottom: 3px; font: 900 .8rem/1 Arial, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #3d3a34; border-bottom: 2px solid #d6cfc0; }
.scout-side p { margin: 3px 0; font: 700 .82rem/1.3 Arial, sans-serif; color: #3d3a34; }
.scout-side .scout-split { font-size: .95rem; }
.scout-side .scout-split small { color: #8a857a; font-weight: 700; }
.scout-bars { margin: 6px 0 8px; padding: 0; list-style: none; }
.scout-bars li { display: grid; grid-template-columns: 9.5em 1fr 4.6em; align-items: center; gap: 6px; padding: 2px 0; font: 700 .76rem/1.2 Arial, sans-serif; color: #3d3a34; }
.scout-bars span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scout-bars b { height: 9px; border-radius: 5px; background: linear-gradient(90deg, var(--team-red, #bd2633) var(--share), #ece6d8 var(--share)); }
.scout-bars em { font-style: normal; color: #6b675e; text-align: right; font-variant-numeric: tabular-nums; }
#finalReportOverlay .account-created-card:has(.scouting-report) { width: min(94vw, 880px); }
.scout-bars li { grid-template-columns: 11em 1fr 4.6em; }

/* ---- The referee art: he stands on his own, no card behind him ---- */
.official-card-frame:not(.offsetting):not(.turnover) { max-width: min(980px, 96vw); }
.official-card-frame:not(.offsetting):not(.turnover) img { width: auto; height: min(70vh, 640px); max-width: 96vw; border-radius: 0; box-shadow: none; filter: drop-shadow(0 12px 22px rgba(0,0,0,.6)) drop-shadow(0 0 2px rgba(0,0,0,.5)); }
.official-card-frame.offsetting img, .official-card-frame.turnover img { border-radius: 0; filter: drop-shadow(0 6px 12px rgba(0,0,0,.45)); }
.result-signals img { border-radius: 0; box-shadow: none; filter: drop-shadow(0 3px 5px rgba(0,0,0,.35)); }
.official-card-frame:not(.offsetting):not(.turnover) img { -webkit-mask-image: linear-gradient(to bottom, #000 82%, transparent 100%); mask-image: linear-gradient(to bottom, #000 82%, transparent 100%); }

/* Two-step personal foul signal: a quick fade between the two signs */
#officialCardImage { transition: opacity .18s ease; }
#officialCardImage.swapping { opacity: 0; }

/* The touchdown celebration: the referee a little higher, the call under him */
.official-card-frame.captioned { margin-top: -10vh; }
.official-card-frame.captioned img { height: min(60vh, 560px) !important; }
.official-card-caption { margin: -6px 0 0; text-align: center; color: #fff; font: 900 clamp(2rem, 6vw, 4rem)/1.05 Impact, "Arial Black", sans-serif; letter-spacing: .04em; text-transform: uppercase;
  text-shadow: 0 3px 0 rgba(0,0,0,.6), 0 0 18px rgba(0,0,0,.65); -webkit-text-stroke: 1.5px rgba(0,0,0,.55); }
.official-card-caption.hidden { display: none; }

/* The two play calls, small under the play result */
.outcome-copy .result-calls { margin: 4px 0 0; color: #6b675e; font: 700 clamp(.66rem, 1.1vw, .82rem)/1.3 Arial, sans-serif; letter-spacing: .02em; }
.outcome-copy .result-calls.hidden { display: none; }
.outcome-copy .result-calls { margin-top: 6px; color: #2f2c27; font: 800 clamp(.8rem, 1.4vw, 1.05rem)/1.3 Arial, sans-serif; }

/* Confetti that flutters: each piece sways, spins and tumbles its own way */
.confetti, .victory-confetti { perspective: 600px; }
.confetti i, .victory-confetti i { animation: confetti-flutter var(--fall-time) linear var(--delay) infinite; }
@keyframes confetti-flutter {
  0%   { top: -12%; transform: translateX(0) rotate(var(--r0)) rotateY(0deg); }
  25%  { transform: translateX(calc(var(--drift) * .25 + var(--sway))) rotate(calc(var(--r0) + var(--spin) * .25)) rotateY(calc(var(--tumble) * .25)); }
  50%  { transform: translateX(calc(var(--drift) * .5)) rotate(calc(var(--r0) + var(--spin) * .5)) rotateY(calc(var(--tumble) * .5)); }
  75%  { transform: translateX(calc(var(--drift) * .75 - var(--sway))) rotate(calc(var(--r0) + var(--spin) * .75)) rotateY(calc(var(--tumble) * .75)); }
  100% { top: 112%; transform: translateX(var(--drift)) rotate(calc(var(--r0) + var(--spin))) rotateY(var(--tumble)); }
}

/* ---- Super Bowl opener: the helmets collide ---- */
.helmet-clash { position: fixed; inset: 0; z-index: 9000; overflow: hidden; background: #0f7b47; transition: opacity .7s ease; }
.helmet-clash.fading { opacity: 0; }
.clash-field { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; aspect-ratio: auto; border: 0; }
.clash-helmet { position: absolute; z-index: 5; top: 50%; width: min(26vw, 42vh); height: auto; opacity: 0; transform: translate(-50%, -50%) scale(.55); filter: drop-shadow(0 16px 18px rgba(0,0,0,.45)); will-change: transform, opacity; }
.clash-helmet.left { left: 24.8%; }
.clash-helmet.right { left: 75.2%; }
.helmet-clash.show .clash-helmet { opacity: 1; transform: translate(-50%, -50%) scale(1); transition: opacity .45s ease, transform .55s cubic-bezier(.2,1.5,.45,1); }
.helmet-clash.tilt .clash-helmet { transition: transform .35s ease-out; }
.helmet-clash.tilt .clash-helmet.left { transform: translate(-50%, -50%) rotate(16deg); }
.helmet-clash.tilt .clash-helmet.right { transform: translate(-50%, -50%) rotate(-16deg); }
.helmet-clash.charge .clash-helmet { transition: transform .42s cubic-bezier(.6,0,1,.5); }
.helmet-clash.charge .clash-helmet.left { transform: translate(calc(-50% + 25.2vw - min(10.5vw, 17vh)), -50%) rotate(22deg); }
.helmet-clash.charge .clash-helmet.right { transform: translate(calc(-50% - 25.2vw + min(10.5vw, 17vh)), -50%) rotate(-22deg); }
.helmet-clash.boom .clash-helmet { opacity: 0; transition: opacity .15s ease .05s; }
.clash-burst { position: absolute; inset: 0; z-index: 6; width: 100%; height: 100%; pointer-events: none; }

/* ---- Super Bowl coin toss: the dressed-up card and the gold coin ---- */
.coin-toss.super-bowl { position: relative; color: #f6e7b0; background: radial-gradient(ellipse at 50% -10%, #24467f 0%, #0d1a3a 52%, #060b18 100%); border: 2px solid #d4af37; border-top: 9px solid #d4af37; box-shadow: 0 0 0 5px #0d1a3a, 0 0 0 7px #d4af37, 0 26px 60px rgba(0,0,0,.45), 0 0 70px rgba(212,175,55,.3); }
.coin-toss.super-bowl::after { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(212,175,55,.45); pointer-events: none; }
.coin-toss.super-bowl .eyebrow { color: #e6c35c; letter-spacing: .32em; }
.coin-toss.super-bowl .eyebrow::before, .coin-toss.super-bowl .eyebrow::after { content: " ★ "; color: #d4af37; }
.coin-toss.super-bowl .coin-copy h2 { color: #fff; text-shadow: 0 2px 0 #8a6d1d, 0 0 22px rgba(212,175,55,.55); }
.coin-toss.super-bowl .coin-copy > p:last-child { color: #cdbf93; }
.coin-toss.super-bowl .coin-result { color: #f1dc9a; }
.coin-toss.super-bowl .coin-result.winner { color: #fff; text-shadow: 0 0 14px rgba(212,175,55,.6); }
.coin-toss.super-bowl .coin-face { border-color: #fff0b0; background: radial-gradient(circle at 34% 28%, #fff7d6 0%, #f0cf6e 40%, #c18f2c 78%, #8c6418 100%); box-shadow: inset 0 0 0 4px #8a6418, inset 0 0 26px rgba(80,50,6,.45); }
.coin-toss.super-bowl .coin-team-circle { display: grid; place-items: center; width: 76%; height: 76%; background: #fffaf0; border: 6px solid var(--face-color); }
.coin-team-circle img { width: 74%; height: auto; filter: drop-shadow(0 2px 2px rgba(0,0,0,.3)); }
.coin-red .coin-team-circle img { transform: translateX(-4%); }
.coin-blue .coin-team-circle img { transform: translateX(4%); }
.coin-toss.super-bowl .coin-shadow { background: rgba(0,0,0,.65); }
.coin-toss.super-bowl .flip-button { color: #0d1a3a; background: linear-gradient(#f6dc85, #c99d36); box-shadow: 0 0 0 2px #8a6d1d, 0 6px 18px rgba(212,175,55,.35); }
.coin-toss.super-bowl .watch-button { color: #fff; background: linear-gradient(#c8102e, #8b0a1f); box-shadow: 0 0 0 2px #d4af37; }
.coin-toss.super-bowl .auth-text-link { color: #e6c35c; }

/* ---- Team confirm pop-up (over the team picker) ---- */
.team-confirm-overlay { z-index: 1200; }
.team-confirm-card { width: min(92vw, 440px); padding: 26px 26px 22px; }
.team-confirm-helmet { display: block; width: min(60%, 200px); margin: 0 auto 6px; aspect-ratio: 1.2; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0,0,0,.25)); }
.team-confirm-card h2 { margin: 0 0 14px; font: 900 clamp(1.3rem, 3vw, 1.8rem)/1.15 Georgia, serif; }
.team-confirm-actions { display: grid; justify-items: center; gap: 10px; }
