/* ==========================================================================
   Game page v2 (Nov 2026 redesign, mobile first)
   Loaded after game.css and before themes.css, so an event theme still
   owns the score band's look (background, badge, stickers) while this file
   owns the layout. Only applies to <body class="v2">.
   ========================================================================== */
@media screen {

body.v2 { background: #f3f4f6; }
body.v2 .main-content.v2-main { max-width: 1240px; padding: 16px 20px 32px; }

/* ---------- Top bar ---------- */
body.v2 .top-nav { padding: 10px 16px; }
.v2-nav-mobile { display: none; align-items: center; gap: 6px; }
.v2-icon-btn {
    width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
    background: transparent; border: 0; border-radius: 10px; color: #111827; cursor: pointer;
}
.v2-icon-btn:hover { background: #f3f4f6; }
body.v2 .nav-hamburger { border: 0; }
@media (max-width: 640px) {
    body.v2 .nav-mobile.v2-nav-mobile { display: flex; }
}

/* ---------- Buttons ---------- */
.v2-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 46px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent;
    font: 700 15px/1 Inter, system-ui, sans-serif; cursor: pointer; text-decoration: none;
    white-space: nowrap;
}
.v2-btn-sm { height: 36px; padding: 0 14px; font-size: 13.5px; border-radius: 10px; }
.v2-btn-block { width: 100%; }
.v2-btn-primary { background: #2563eb; color: #fff; }
.v2-btn-primary:hover { background: #1d4ed8; color: #fff; }
.v2-btn-outline { background: #fff; color: #111827; border-color: #d1d5db; }
.v2-btn-outline:hover { background: #f9fafb; }
.v2-btn-light { background: #fff; color: #111827; }
.v2-btn-ghost { background: rgba(255,255,255,0.08); color: #fff; border-color: rgba(255,255,255,0.28); }
.v2-link { background: none; border: 0; padding: 0; color: #2563eb; font: 600 14px Inter, system-ui, sans-serif; cursor: pointer; }
.v2-block-link { display: block; width: 100%; padding: 10px 0 2px; text-align: center; }

/* ---------- Score band ---------- */
body.v2 .scoreboard-hero {
    background: #111827;
    border-radius: 18px;
    padding: 16px 18px;
    margin-bottom: 12px;
    color: #fff;
}
body.v2 .scoreboard-hero::before { display: none; }
body.v2 .matchup {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
body.v2 .team { max-width: none; min-width: 0; text-align: left; }
body.v2 .team.home { text-align: right; }
body.v2 .team-color { display: none; }
body.v2 .team-name {
    font-size: 1.15rem; font-weight: 800; text-transform: none; letter-spacing: 0;
    margin: 0; line-height: 1.2; color: inherit;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-wrap: nowrap;
}
body.v2 .team.away .team-name { border-left: 4px solid var(--team1); padding-left: 8px; }
body.v2 .team.home .team-name { border-right: 4px solid var(--team2); padding-right: 8px; }
.v2-side { font-size: 12px; font-weight: 500; opacity: 0.7; margin-top: 3px; }
body.v2 .team.away .v2-side { padding-left: 12px; }
body.v2 .team.home .v2-side { padding-right: 12px; }
body.v2 .score-center { text-align: center; }
body.v2 .score-display { justify-content: center; gap: 10px; margin-bottom: 4px; }
body.v2 .score-num { font-size: 3rem; line-height: 1; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
body.v2 .score-sep { opacity: 0.35; }
body.v2 .live-status { justify-content: center; }
body.v2 .game-time { font-size: 13px; opacity: 0.85; color: inherit; }
.v2-kickoff { display: flex; flex-direction: column; align-items: center; line-height: 1.1; margin-bottom: 4px; }
.v2-kickoff span { font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; opacity: 0.75; }
.v2-kickoff strong { font-size: 1.6rem; font-weight: 900; }

/* Period chips: glass until played, solid deeper color once won */
body.v2 .quarter-scores { gap: 8px; margin-top: 0; padding-top: 0; border-top: 0; }
body.v2 .scoreboard-hero .quarter-box {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.16);
    color: #fff;
    border-radius: 12px;
    padding: 9px 11px;
    text-align: left;
    min-width: 0;
}
body.v2 .scoreboard-hero .quarter-label { font-size: 11px; font-weight: 800; letter-spacing: .6px; color: inherit; opacity: .9; text-transform: uppercase; }
body.v2 .scoreboard-hero .quarter-result { font-size: 12px; font-weight: 600; opacity: .85; font-variant-numeric: tabular-nums; color: inherit; }
body.v2 .scoreboard-hero .quarter-winner-name {
    font-size: 15px; font-weight: 800; color: inherit; margin-top: 1px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; justify-content: flex-start;
}
/* Name above the score inside each chip */
body.v2 .scoreboard-hero .quarter-box { display: flex; flex-direction: column; }
body.v2 .scoreboard-hero .quarter-box .quarter-winner-name { order: 2; }
body.v2 .scoreboard-hero .quarter-box .quarter-result { order: 3; }
.v2-tbd { opacity: .55; }
body.v2 .scoreboard-hero .quarter-box.winner { border-color: transparent; color: #fff; }
body.v2 .scoreboard-hero .quarter-box.winner.q1 { background: #15803d; }
body.v2 .scoreboard-hero .quarter-box.winner.q2 { background: #1d4ed8; }
body.v2 .scoreboard-hero .quarter-box.winner.q3 { background: #c2410c; }
body.v2 .scoreboard-hero .quarter-box.winner.q4 { background: #7e22ce; }
body.v2 .scoreboard-hero .quarter-box.winner.final { background: #a16207; }
/* Standard boards: the last period is Final, purple (gold is only for OT) */
body.v2.v2-std .scoreboard-hero .quarter-box.winner.final { background: #7e22ce; }
body.v2 .scoreboard-hero .quarter-box.live-holding {
    background: rgba(234, 88, 12, 0.22);
    border: 2px solid #f97316;
}
.v2-now { color: #fdba74; }
.v2-winners-title { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; margin: 2px 0 8px; opacity: .9; }
.v2-winners-title svg { color: #fbbf24; }
.v2-final-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }

/* Before kickoff: claim progress */
.v2-progress { margin-top: 2px; }
.v2-progress-top { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.v2-progress-top span { opacity: .75; }
.v2-progress-bar { height: 8px; border-radius: 99px; background: rgba(255,255,255,0.16); margin: 8px 0 7px; overflow: hidden; }
.v2-progress-bar span { display: block; height: 100%; border-radius: inherit; background: #3b82f6; }
.v2-progress-note { font-size: 12px; opacity: .7; }

/* ---------- Invite, host message, banners ---------- */
.v2-invite { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; margin-bottom: 12px; }
.v2-msg {
    display: flex; align-items: center; gap: 12px;
    background: #fff; border: 1px solid #e5e7eb; border-radius: 14px;
    padding: 12px 16px; margin-bottom: 12px; font-size: 14px; color: #374151;
}
.v2-msg-label { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: #111827; white-space: nowrap; }
.v2-msg-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2-msg.open .v2-msg-text { white-space: normal; }
.v2-msg .v2-link { margin-left: auto; white-space: nowrap; font-size: 13.5px; }
.v2-banner {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; font-size: 0.92rem; line-height: 1.45;
}
.v2-banner-warn { background: rgba(245, 158, 11, 0.1); border: 1px solid #f59e0b; }
.v2-banner-warn .v2-banner-icon { color: #d97706; display: flex; }
.v2-banner-ok { background: rgba(34, 197, 94, 0.08); border: 1px solid #22c55e; }
.v2-banner-ok .v2-banner-icon { color: #16a34a; display: flex; }
.v2-banner-text { flex: 1; min-width: 200px; }
.v2-banner-x { background: none; border: 0; color: #9ca3af; font-size: 20px; cursor: pointer; padding: 2px 6px; line-height: 1; }

/* Host controls */
body.v2 .admin-bar { border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; }
body.v2 .admin-bar-hint { margin: 10px 0 0; font-size: 0.85rem; color: #6b7280; }

/* ---------- Ads: fixed-height slots so the board never jumps ---------- */
.v2-ad { text-align: center; margin: 0 auto 12px; }
.v2-ad-label { font-size: 10px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: #9ca3af; margin-bottom: 4px; }
.v2-ad-slot { margin: 0 auto; overflow: hidden; }
.v2-ad-top .v2-ad-slot { width: 728px; max-width: 100%; height: 90px; }
.v2-ad-side .v2-ad-slot { width: 300px; height: 250px; }
.v2-ad-ph {
    height: 100%; display: flex; align-items: center; justify-content: center;
    border-radius: 10px; color: #6b7280; font-size: 13px; font-weight: 600;
    background: repeating-linear-gradient(135deg, #e5e7eb 0 10px, #eef0f3 10px 20px);
}

/* ---------- Layout: board + side column ---------- */
body.v2 .grid-section.v2-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 18px;
    align-items: start;
}
.v2-col-main { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
body.v2 .grid-main { border-radius: 18px; padding: 16px 18px; box-shadow: none; border: 1px solid #e5e7eb; }
body.v2 .sidebar.v2-aside {
    background: transparent; box-shadow: none; padding: 0; border-radius: 0;
    display: flex; flex-direction: column; gap: 12px;
}
.v2-legacy { display: none !important; }

/* Board controls */
body.v2 .grid-controls.v2-controls { border-bottom: 0; padding-bottom: 0; margin-bottom: 12px; gap: 8px; }
.v2-find {
    display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 6px 0 10px;
    border: 1px solid #e5e7eb; border-radius: 99px; background: #fff; color: #374151; cursor: text;
}
.v2-find-label { font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.v2-find input {
    border: 0; outline: 0; background: transparent; width: 90px; font: 500 14px Inter, system-ui, sans-serif;
    color: #111827; padding: 4px 4px;
}
.v2-find:focus-within { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15); }
.v2-locked-note { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: #6b7280; }
.v2-controls-right { display: inline-flex; align-items: center; gap: 6px; }
.v2-quick-assign {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px;
    padding: 10px 12px; background: #f9fafb; border: 1px solid #f1f5f9; border-radius: 12px;
}
.v2-qa-label { color: #6b7280; font-size: 0.85rem; }
.v2-quick-assign .form-select { max-width: 160px; }
.v2-quick-assign .form-input { max-width: 130px; }
.v2-qa-hint { color: #9ca3af; font-size: 0.8rem; }

/* Board look: calmer frame, darker period colors with a text tag */
body.v2 .team-header-label { border-radius: 8px; padding: 9px 16px; box-shadow: none; font-size: .82rem; letter-spacing: 3px; }
body.v2 .team-sidebar { border-radius: 8px; box-shadow: none; }
body.v2 .header-cell { background: transparent; color: #1d4ed8; }
body.v2 .header-cell.row-header { color: #1d4ed8; }
body.v2 .header-cell.pending { color: #9ca3af; }
body.v2 .header-cell.v2-hot { background: #ea580c; color: #fff; }
body.v2 .square { border-width: 1px; border-color: #e5e7eb; background: #fff; }
body.v2 .square:not(.claimed) { background: #f9fafb; }
body.v2.v2-pre:not(.v2-locked) .square:not(.claimed) { border-style: dashed; border-color: #cbd5e1; background: #fff; }
body.v2 .square.v2-cross { background: #fff7ed; border-color: #fed7aa; }
body.v2 .square.winner { border: 0; color: #fff; flex-direction: column; box-shadow: none; animation: none; }
body.v2 .square.winner.q1 { background: #15803d; box-shadow: none; }
body.v2 .square.winner.q2 { background: #1d4ed8; box-shadow: none; }
body.v2 .square.winner.q3 { background: #c2410c; box-shadow: none; }
body.v2 .square.winner.q4 { background: #7e22ce; box-shadow: none; }
body.v2 .square.winner.final { background: #a16207; box-shadow: none; }
body.v2.v2-std .square.winner.final { background: #7e22ce; }
body.v2 .square.winner::before { font-size: 0.6em; font-weight: 800; letter-spacing: .3px; line-height: 1; margin-bottom: 2px; opacity: .95; text-transform: uppercase; }
body.v2 .square.winner.q1::before { content: var(--lbl-q1, "Q1"); }
body.v2 .square.winner.q2::before { content: var(--lbl-q2, "Q2"); }
body.v2 .square.winner.q3::before { content: var(--lbl-q3, "Q3"); }
body.v2 .square.winner.q4::before { content: var(--lbl-q4, "Q4"); }
body.v2 .square.winner.final::before { content: var(--lbl-final, "Final"); }
body.v2 .square.winner.current { animation: none; }
body.v2 .square.live-holding-square {
    background: #fff7ed; border: 2px solid #ea580c; color: #9a3412; font-weight: 800;
}
/* Find me / tap-to-highlight */
body.v2 .squares-grid.v2-hl-on .square { transition: opacity .15s; }
body.v2 .squares-grid.v2-hl-on .square:not(.v2-mine) { opacity: .28; }
body.v2 .square.v2-mine:not(.winner) { background: #dbeafe; border: 2px solid #2563eb; color: #1e3a8a; font-weight: 800; }
body.v2 .square.v2-mine.winner { box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px #2563eb; }

.v2-hl {
    display: flex; align-items: center; gap: 12px; margin-top: 12px;
    background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 14px; padding: 10px 10px 10px 14px;
}
.v2-hl.hidden { display: none; }
.v2-hl-text { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13px; color: #1e3a8a; }
.v2-hl-text strong { font-size: 15px; }

/* Legend */
.v2-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 12.5px; color: #374151; }
.v2-lg { display: inline-flex; align-items: center; gap: 6px; }
.v2-lg i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.v2-lg-q1 i { background: #15803d; }
.v2-lg-q2 i { background: #1d4ed8; }
.v2-lg-q3 i { background: #c2410c; }
.v2-lg-q4 i { background: #7e22ce; }
.v2-lg-final i { background: #a16207; }
body.v2-std .v2-lg-final i { background: #7e22ce; }
.v2-lg-live i { background: transparent !important; border: 2px solid #ea580c; }
.v2-legend-hint { margin-left: auto; color: #6b7280; font-size: 12px; }
.v2-delay { margin-top: 8px; font-size: 12px; color: #6b7280; display: flex; align-items: center; gap: 5px; }

/* ---------- Cards and rows ---------- */
.v2-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 16px; overflow: hidden; }
.v2-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 14px 16px 10px; }
.v2-card-head h3 { font-size: 15px; font-weight: 800; color: #111827; margin: 0; }
.v2-card-meta { font-size: 12.5px; color: #6b7280; }
.v2-card-body { padding: 0 16px 16px; color: #4b5563; font-size: 14.5px; line-height: 1.7; }
.v2-card-body p { margin-bottom: .7rem; }
.v2-card-body p:last-child { margin-bottom: 0; }
.v2-card-body ol, .v2-card-body ul { padding-left: 1.3rem; margin-bottom: .7rem; }
.v2-card-body li { margin-bottom: .35rem; }
.v2-card-body a { color: #2563eb; }
.v2-small-link { display: inline-block; margin-top: 8px; font-size: 13.5px; font-weight: 600; text-decoration: none; }

.v2-rows { display: flex; flex-direction: column; }
.v2-det + .v2-det, .v2-det + .v2-row-static { border-top: 1px solid #f1f5f9; }
.v2-row {
    display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 0 16px;
    cursor: pointer; list-style: none; color: #111827;
}
.v2-row::-webkit-details-marker { display: none; }
.v2-row > svg { color: #4b5563; flex: none; }
.v2-row-title { font-size: 15px; font-weight: 700; white-space: nowrap; }
.v2-row-meta { margin-left: auto; font-size: 13px; color: #6b7280; text-align: right; min-width: 0; }
.v2-row-meta a { color: #2563eb; font-weight: 600; }
.v2-ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2-chev { flex: none; width: 9px; height: 9px; border-right: 2px solid #9ca3af; border-bottom: 2px solid #9ca3af; transform: rotate(-45deg); margin-left: 4px; transition: transform .15s; }
.v2-chev-down { transform: rotate(45deg); margin-top: -4px; }
details[open] > summary .v2-chev { transform: rotate(45deg); margin-top: -4px; }
details[open] > summary .v2-chev-down { transform: rotate(225deg); margin-top: 4px; }
.v2-row-static { cursor: default; }
.v2-det-body { padding: 0 16px 14px; }
.v2-det-body.admin-login-form { padding-top: 0; }
.v2-empty { padding: 6px 0 4px; font-size: 14px; }
.v2-small { font-size: 12.5px; color: #6b7280; margin-top: 8px; }
.v2-login { display: flex; gap: 8px; }
.v2-login input { flex: 1; min-width: 0; height: 42px; border: 1px solid #d1d5db; border-radius: 10px; padding: 0 12px; font: 500 15px Inter, system-ui, sans-serif; }
.v2-login .btn { height: 42px; border-radius: 10px; padding: 0 16px; background: #111827; }
body.v2 .lb-row.v2-lb {
    width: 100%; background: none; border: 0; border-bottom: 1px solid #f4f4f5; font: inherit; text-align: left;
    cursor: pointer; padding: 8px 0; display: flex; align-items: center; gap: 10px;
}
body.v2 .lb-row.v2-lb:last-child { border-bottom: 0; }
body.v2 .lb-row.v2-lb:hover .lb-name { color: #2563eb; }
body.v2 .lb-count { font-size: 14px; color: #111827; }
body.v2 #change-log-content { max-height: 320px; overflow-y: auto; }

/* If the next score is... */
.v2-next-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 12px 12px; }
.v2-scen {
    display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left;
    padding: 9px 11px; border: 1px solid #e5e7eb; border-radius: 12px; background: #f9fafb; cursor: pointer; font: inherit; min-width: 0;
}
.v2-scen:hover { border-color: #93c5fd; background: #eff6ff; }
.v2-scen .sl { font-size: 12px; color: #4b5563; font-weight: 600; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2-scen .sn { font-size: 15px; font-weight: 800; color: #111827; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v2-scen .ss { font-size: 11.5px; color: #6b7280; font-variant-numeric: tabular-nums; }
.v2-scen .sn.unclaimed { color: #9ca3af; font-style: italic; font-weight: 600; }

/* Run your own board */
.v2-cta { padding: 18px; }
.v2-cta h3 { font-size: 19px; font-weight: 800; color: #111827; margin: 0 0 6px; }
.v2-cta p { color: #4b5563; font-size: 14.5px; line-height: 1.55; margin-bottom: 12px; }
.v2-cta .v2-cta-note { font-size: 12.5px; color: #6b7280; margin: 10px 0 0; }

/* How it works */
.v2-help { margin-top: 24px; }
.v2-help h2 { font-size: 1.3rem; font-weight: 800; color: #111827; margin-bottom: 12px; }
.v2-help-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start; }

/* Footer */
.v2-footer-code { margin-top: 10px; font-size: 13px; color: #9ca3af; }
.v2-footer-code strong { color: #e5e7eb; }

/* Phone / desktop switches */
.v2-msg-bottom { display: none; }
@media (min-width: 1025px) {
    .v2-desk-only { display: inline-flex; }
}
@media (max-width: 1024px) {
    .v2-desk-only { display: none !important; }
    body.v2 .grid-section.v2-layout { grid-template-columns: minmax(0, 1fr); }
    .v2-msg-top { display: none; }
    .v2-msg-bottom { display: block; }
    .v2-help-grid { grid-template-columns: 1fr; }
}

/* ---------- Desktop and tablet: one-row score band ---------- */
@media (min-width: 900px) {
    body.v2 .scoreboard-content { display: flex; flex-wrap: wrap; align-items: center; column-gap: 32px; row-gap: 10px; }
    body.v2 .evt-badge-row { flex: 0 0 100%; margin-bottom: 2px; }
    body.v2 .matchup { flex: 1 1 380px; margin-bottom: 0; }
    body.v2 .quarter-scores { flex: 1 1 520px; }
    body.v2 .v2-winners-title { display: none; }
    body.v2 .v2-progress { flex: 1 1 380px; margin-top: 0; }
    body.v2 .game-info { order: 5; flex: 0 0 100%; font-size: .78rem; gap: 16px; margin: 0; justify-content: flex-start; }
    body.v2 .v2-final-actions { order: 6; flex: 0 0 100%; display: flex; justify-content: flex-end; margin-top: 0; }
    body.v2 .v2-final-actions .v2-btn { height: 38px; font-size: 13.5px; }
    .v2-invite { display: flex; justify-content: flex-start; }
}
@media (min-width: 1200px) {
    .v2-help-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Phones ---------- */
@media (max-width: 768px) {
    body.v2 .main-content.v2-main { padding: 8px 8px 24px; }
    body.v2 .scoreboard-hero { padding: 12px 12px 12px; border-radius: 16px; margin-bottom: 8px; }
    body.v2 .matchup { gap: 8px; margin-bottom: 10px; }
    body.v2 .team-name { font-size: 1rem; }
    .v2-side { font-size: 11px; }
    body.v2 .score-num { font-size: 2.6rem; min-width: 0; }
    body.v2 .score-display { gap: 6px; }
    body.v2 .live-status { font-size: 12px; }
    body.v2 .game-info { display: none; }
    body.v2 .quarter-scores { gap: 6px; }
    body.v2 .scoreboard-hero .quarter-box { padding: 7px 8px; border-radius: 10px; }
    body.v2 .scoreboard-hero .quarter-label { font-size: 9.5px; }
    body.v2 .scoreboard-hero .quarter-winner-name { font-size: 13px; }
    body.v2 .scoreboard-hero .quarter-result { font-size: 11px; }
    /* Final: winners as a 2 by 2 block with bigger names */
    body.v2.v2-final .quarter-scores { grid-template-columns: 1fr 1fr !important; }
    body.v2.v2-final .quarter-scores .quarter-box:nth-child(5) { grid-column: span 2; }
    body.v2.v2-final .scoreboard-hero .quarter-box { padding: 10px 12px; }
    body.v2.v2-final .scoreboard-hero .quarter-winner-name { font-size: 18px; }
    .v2-ad-top .v2-ad-slot { width: 320px; height: 50px; }
    .v2-ad { margin-bottom: 8px; }
    body.v2 .admin-bar { padding: 10px; }
    /* Nov 25: wrap onto more rows instead of a sideways swipe, so every control is in view */
    body.v2 .admin-bar-buttons { flex-wrap: wrap; overflow: visible; gap: 8px; }
    body.v2 .admin-bar-buttons .btn { flex: 1 1 auto; justify-content: center; white-space: nowrap; }
    body.v2 .grid-section.v2-layout { gap: 8px; }
    .v2-col-main { gap: 8px; }
    .v2-aside { gap: 8px !important; }
    body.v2 .grid-main { padding: 10px 6px 12px; border-radius: 16px; }
    body.v2 .grid-controls.v2-controls { padding: 0 4px; margin-bottom: 8px; }
    body.v2 .player-info, body.v2 .player-actions { flex: 0 1 auto; }
    .v2-find input { width: 80px; }
    .v2-legend { padding: 0 6px; gap: 6px 12px; font-size: 12px; }
    .v2-legend-hint { flex: 0 0 100%; margin-left: 0; }
    .v2-hl { margin: 10px 4px 0; }
    .v2-delay { padding: 0 6px; }
    body.v2 .square.winner::before { font-size: 6.5px; margin-bottom: 1px; }
    .v2-help { margin-top: 18px; }
    .v2-help h2 { font-size: 1.15rem; padding: 0 6px; }
    .v2-invite { margin-bottom: 8px; }
    .v2-banner { padding: 10px 12px; }
}
@media (max-width: 400px) {
    body.v2 .score-num { font-size: 2.3rem; }
    body.v2 .team-name { font-size: .95rem; }
}

} /* end @media screen */

/* ---------- v2.1 fixes ---------- */
@media screen {
.v2-short { display: none; }
.v2-row-title + .v2-chev { margin-left: auto; }
body.v2 .player-squares:empty { display: none; }
.v2-side { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.v2 .lb-row.v2-lb + .lb-row.v2-lb { margin-top: 0; }
body.v2 #players-card .v2-det-body { max-height: 360px; overflow-y: auto; }
@media (min-width: 1025px) {
    /* Wider-than-tall squares keep the whole board on a laptop screen */
    body.v2 .square { aspect-ratio: 16 / 10; }
    body.v2 .squares-board { gap: 3px; }
}
@media (max-width: 768px) {
    .v2-full { display: none; }
    .v2-short { display: inline; }
    /* Names stay on one line instead of breaking mid-word */
    body.v2 .square { white-space: nowrap; word-break: normal; hyphens: none; font-size: 2.3vw; letter-spacing: -0.3px; padding: 0 1px; text-overflow: ellipsis; }
    body.v2 .square.name-long { font-size: 1.95vw; }
    body.v2 .square.name-xlong { font-size: 1.7vw; }
    body.v2 .square.winner { white-space: nowrap; }
    body.v2 .grid-controls.v2-controls { row-gap: 8px; }
    .v2-find { flex: 1 1 100%; }
    .v2-find input { flex: 1; width: auto; }
    body.v2 .player-info { flex: 1 1 auto; font-size: 13px; }
    body.v2 .player-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
    body.v2 .control-spacer { display: none; }
    body.v2 .evt-sticker { width: 46px; height: 46px; top: -20px; right: 4px; }
}
}
@media screen {
/* Monday Clean paints a moon in the band's corner; keep it clear of the team name */
body.v2.evt-monday.evt-clean .scoreboard-hero { background: radial-gradient(circle at calc(100% - 30px) 26px, #fef3c7 0 9px, rgba(254,243,199,.22) 10px, transparent 24px), #111c44; }
@media (max-width: 768px) {
    .v2-side { white-space: normal; }
}
}
@media screen and (min-width: 769px) {
    body.v2 .team-name { white-space: normal; text-wrap: balance; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}
@media screen {
.v2-quick-assign .form-select, .v2-quick-assign .form-input { height: 38px; padding: 0 10px; font-size: 14px; border-radius: 10px; width: auto; }
@media (max-width: 768px) {
    .v2-quick-assign { margin: 0 4px 10px; padding: 8px 10px; gap: 6px 8px; }
    .v2-qa-label { font-size: 13px; }
    .v2-qa-hint { font-size: 12px; }
}
body.v2 .game-state.scheduled { background: rgba(255,255,255,0.14); color: inherit; }
}

/* v2.2: host message always at the top (it tells players which game this is) */
@media screen {
.v2-msg-top { display: flex !important; }
.v2-msg-more[hidden] { display: none; }
@media (max-width: 768px) {
    .v2-msg { flex-wrap: wrap; gap: 4px 10px; padding: 10px 12px; margin-bottom: 8px; border-radius: 14px; font-size: 14px; }
    .v2-msg-label { font-size: 13px; }
    .v2-msg-text { flex: 0 0 100%; order: 3; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: #111827; font-weight: 500; }
    .v2-msg.open .v2-msg-text { -webkit-line-clamp: unset; display: block; }
    .v2-msg .v2-link { order: 2; }
}
}

/* v2.3: Activity reads as sentences; the square's numbers show only once drawn */
@media screen {
body.v2 .activity-row.v2-act { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid #f4f4f5; font-size: 13.5px; cursor: pointer; }
body.v2 .activity-row.v2-act:hover .v2-act-text { color: #2563eb; }
body.v2 .v2-act .activity-time { flex: none; width: 64px; color: #9ca3af; font-size: 12px; }
body.v2 .v2-act-text { flex: 1; min-width: 0; color: #374151; line-height: 1.35; }
body.v2 .v2-act-text .activity-new, body.v2 .v2-act-text .activity-old { font-weight: 700; color: #111827; }
body.v2 .v2-act-text .activity-old { text-decoration: none; }
body.v2 .v2-act-nums { flex: none; font-size: 12px; font-weight: 700; color: #1d4ed8; background: #eff6ff; border-radius: 6px; padding: 2px 7px; font-variant-numeric: tabular-nums; }
body.v2 .square.v2-flash { outline: 3px solid #2563eb; outline-offset: 1px; z-index: 2; position: relative; animation: v2Flash 1.6s ease-out; }
@keyframes v2Flash { 0%, 40% { box-shadow: 0 0 0 6px rgba(37, 99, 235, .35); } 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); } }
}

/* ==========================================================================
   v2.4: readable text on every theme
   The theme paints the band; every piece of text sits on its own dark
   scoreboard panel, the same for all themes (light ones included), so a
   pattern or picture behind it never hurts readability.
   ========================================================================== */
@media screen {
body.v2 .scoreboard-hero {
    --v2-panel: rgba(11, 17, 32, 0.88);
    --v2-panel-line: rgba(255, 255, 255, 0.10);
}
body.v2 .scoreboard-hero .matchup,
body.v2 .scoreboard-hero .v2-progress,
body.v2 .scoreboard-hero .game-info,
body.v2 .scoreboard-hero .v2-winners-title,
body.v2 .scoreboard-hero .quarter-scores .quarter-box:not(.winner):not(.live-holding),
body.v2 .scoreboard-hero .quarter-scores .quarter-box.live-holding {
    background: var(--v2-panel);
    border: 1px solid var(--v2-panel-line);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: #fff;
    text-shadow: none;
}
body.v2 .scoreboard-hero .matchup { border-radius: 14px; padding: 12px 14px; }
body.v2 .scoreboard-hero .v2-progress { border-radius: 14px; padding: 11px 14px; }
body.v2 .scoreboard-hero .game-info { display: inline-flex; width: auto; border-radius: 99px; padding: 5px 12px; }
body.v2 .scoreboard-hero .v2-winners-title { display: inline-flex; border-radius: 99px; padding: 5px 12px; }
body.v2 .scoreboard-hero .quarter-scores .quarter-box.live-holding { border: 2px solid #f97316; background: rgba(67, 20, 7, 0.92); }

/* Everything inside a panel is white, whatever the theme's ink color */
body.v2 .scoreboard-hero .matchup .team-name,
body.v2 .scoreboard-hero .matchup .v2-side,
body.v2 .scoreboard-hero .matchup .game-time,
body.v2 .scoreboard-hero .matchup .game-clock,
body.v2 .scoreboard-hero .matchup .v2-kickoff,
body.v2 .scoreboard-hero .matchup .score-sep,
body.v2 .scoreboard-hero .game-info,
body.v2 .scoreboard-hero .game-info span,
body.v2 .scoreboard-hero .v2-progress,
body.v2 .scoreboard-hero .quarter-scores .quarter-box:not(.winner) .quarter-label,
body.v2 .scoreboard-hero .quarter-scores .quarter-box:not(.winner) .quarter-result,
body.v2 .scoreboard-hero .quarter-scores .quarter-box:not(.winner) .quarter-winner-name { color: #fff; }
body.v2 .scoreboard-hero .matchup .score-num { color: #fff; }
body.v2 .scoreboard-hero .matchup .game-state.scheduled { background: rgba(255, 255, 255, 0.14); color: #fff; }
body.v2 .scoreboard-hero .v2-progress-bar { background: rgba(255, 255, 255, 0.18); }
/* Light themes paint dark score digits; on the panel they go white */
body.v2.evt-hockey .scoreboard-hero .matchup .score-num,
body.v2.evt-baby .scoreboard-hero .matchup .score-num,
body.v2.evt-babyneutral .scoreboard-hero .matchup .score-num { color: #fff; text-shadow: none; }
body.v2.evt-hockey .scoreboard-hero .matchup .score-sep,
body.v2.evt-baby .scoreboard-hero .matchup .score-sep,
body.v2.evt-babyneutral .scoreboard-hero .matchup .score-sep { color: #fff; }

/* Final buttons: solid, never see-through */
body.v2 .scoreboard-hero .v2-btn-ghost { background: var(--v2-panel); border-color: var(--v2-panel-line); color: #fff; }

/* Spacing now that the parts are separate panels */
body.v2 .scoreboard-hero .matchup { margin-bottom: 8px; }
body.v2 .scoreboard-hero .game-info { margin: 0 0 8px; }
@media (min-width: 900px) {
    body.v2 .scoreboard-hero .scoreboard-content { column-gap: 12px; row-gap: 8px; align-items: stretch; }
    body.v2 .scoreboard-hero .matchup { margin-bottom: 0; }
    body.v2 .scoreboard-hero .game-info { order: 5; flex: 0 0 auto; margin: 0; }
    body.v2 .scoreboard-hero .v2-progress { display: flex; flex-direction: column; justify-content: center; }
    body.v2 .scoreboard-hero .quarter-scores { align-self: center; }
}
@media (max-width: 768px) {
    body.v2 .scoreboard-hero .matchup { padding: 10px 10px; border-radius: 12px; }
    body.v2 .scoreboard-hero .v2-progress { padding: 10px 12px; border-radius: 12px; }
}
}
@media screen and (min-width: 900px) {
    body.v2 .scoreboard-hero .game-info { order: 5; flex: 0 0 100%; max-width: max-content; align-self: flex-start; }
}
@media screen {
/* TV / venue: each item is its own small pill; the row itself stays clear */
body.v2 .scoreboard-hero .game-info { background: none; border: 0; -webkit-backdrop-filter: none; backdrop-filter: none; padding: 0; gap: 6px; display: flex; flex-wrap: wrap; }
body.v2 .scoreboard-hero .game-info span { display: inline-flex; align-items: center; gap: 5px; background: var(--v2-panel); border: 1px solid var(--v2-panel-line); border-radius: 99px; padding: 4px 10px; color: #fff; }
body.v2 .team-name { word-break: normal; overflow-wrap: normal; }
}
@media screen and (min-width: 900px) {
    body.v2 .scoreboard-hero .game-info { flex: 0 0 100%; max-width: none; }
    body.v2 .scoreboard-hero .matchup { flex: 1 1 460px; min-width: 440px; }
    body.v2 .scoreboard-hero .quarter-scores { flex: 1 1 440px; }
    body.v2 .scoreboard-hero .v2-progress { flex: 1 1 360px; }
}

/* ==========================================================================
   v2.5: event pill on the band's top edge, no side labels, color bar under
   each team name (more room for the names)
   ========================================================================== */
@media screen {
.v2-badge-anchor { position: relative; height: 0; z-index: 6; }
.v2-badge-anchor .evt-badge-row { position: absolute; left: 16px; top: -15px; margin: 0; display: block; }
.v2-badge-anchor .evt-badge { box-shadow: 0 2px 8px rgba(15, 23, 42, 0.25); }
body.v2 .v2-badge-anchor + .scoreboard-hero { padding-top: 26px; }
body.v2.evt-theme .v2-badge-anchor + .scoreboard-hero { padding-top: 26px; }
/* Football Sunday end zones: start the pill past the left end zone */
@media (min-width: 769px) {
    body.v2.evt-sunday .v2-badge-anchor .evt-badge-row, body.v2.evt-college .v2-badge-anchor .evt-badge-row { left: 88px; }
}
/* The board already shows which team runs where */
body.v2 .scoreboard-hero .v2-side { display: none; }
/* Team color as a short bar under the name instead of a stripe beside it */
body.v2 .team.away .team-name, body.v2 .team.home .team-name { border: 0; padding: 0; }
body.v2 .scoreboard-hero .team-color { display: block; width: 30px; height: 4px; border-radius: 2px; margin: 6px 0 0; }
body.v2 .scoreboard-hero .team.home .team-color { margin-left: auto; }
body.v2 .scoreboard-hero .team.away .team-color { background: var(--team1); }
body.v2 .scoreboard-hero .team.home .team-color { background: var(--team2); }
body.v2 .team-name { font-size: 1.2rem; }
@media (max-width: 768px) {
    .v2-badge-anchor .evt-badge-row { left: 12px; top: -14px; }
    body.v2 .v2-badge-anchor + .scoreboard-hero,
    body.v2.evt-theme .v2-badge-anchor + .scoreboard-hero { padding-top: 24px; }
    body.v2 .team-name { font-size: 1.08rem; }
}
}
@media screen {
.v2-badge-anchor { margin-top: 6px; }
@media (max-width: 768px) { .v2-badge-anchor { margin-top: 10px; } }
}
@media screen {
/* Dark team colors stay visible on the dark panel */
body.v2 .scoreboard-hero .team-color { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35); }
}

/* v2.6: bigger board on desktop (square cells again, slimmer side column) */
@media screen {
.v2-invite { grid-template-columns: 1fr 1fr; }
@media (min-width: 1025px) {
    body.v2 .main-content.v2-main { max-width: 1340px; }
    body.v2 .grid-section.v2-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; }
    body.v2 .square { aspect-ratio: 1; }
    body.v2 .squares-board { gap: 4px; }
    body.v2 .grid-main { padding: 16px; }
    /* Names stay on one line instead of breaking mid-word */
    body.v2 .square { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 3px; word-break: normal; }
    body.v2 .square.name-long { font-size: 0.7rem; }
    body.v2 .square.name-xlong { font-size: 0.6rem; }
}
}

/* v2.7: top team bar is as thick as the side team bar */
@media screen {
body.v2 .team-header-label { height: 44px; padding: 0 16px; display: flex; align-items: center; justify-content: center; line-height: 1; white-space: nowrap; overflow: hidden; }
@media (max-width: 768px) {
    body.v2 .team-header-label { height: 18px; padding: 0 10px; font-size: 0.62rem; letter-spacing: 2px; border-radius: 6px; }
    body.v2 .team-sidebar { border-radius: 6px; }
    body.v2 .team-sidebar-label { font-size: 0.62rem; letter-spacing: 2px; }
}
}

/* v2.8: smaller Copy link / How to play, with clear space before the ad
   (ad networks flag buttons sitting right against an ad as an accidental-click risk) */
@media screen {
.v2-invite .v2-btn { height: 38px; padding: 0 14px; font-size: 14px; border-radius: 10px; gap: 6px; }
.v2-invite .v2-btn svg { width: 15px; height: 15px; }
.v2-invite { margin-bottom: 20px; }
@media (min-width: 900px) { .v2-invite { margin-bottom: 22px; } }
@media (max-width: 768px) { .v2-invite { margin-bottom: 18px; } }
}
/* v2.9: buttons sit above the host message; the message separates them from the ad */
@media screen {
.v2-invite { margin-bottom: 10px; }
@media (min-width: 900px) { .v2-invite { margin-bottom: 12px; } }
@media (max-width: 768px) { .v2-invite { margin-bottom: 8px; } }
}
/* v2.10: desktop puts Copy link / How to play to the right of the host message */
@media screen and (min-width: 900px) {
    .v2-top-row { display: flex; align-items: stretch; gap: 10px; margin-bottom: 12px; }
    .v2-top-row:not(:has(> *)) { display: none; }
    .v2-top-row .v2-msg { order: 1; flex: 1 1 auto; min-width: 0; margin-bottom: 0; }
    .v2-top-row .v2-invite { order: 2; flex: none; margin-bottom: 0; display: flex; align-items: center; gap: 8px; }
    .v2-top-row .v2-invite .v2-btn { height: 100%; min-height: 38px; }
}
/* v2.11: phones share from the icon at the top; How to play moves under the board */
@media screen {
.v2-howto { color: #2563eb; font-weight: 600; text-decoration: none; margin-left: 10px; white-space: nowrap; }
@media (max-width: 899px) {
    .v2-top-row .v2-invite { display: none; }
}
@media (min-width: 900px) {
    .v2-howto { display: none; }
}
}

/* ==========================================================================
   v2.12: theme picker in Settings (tiles with live previews)
   ========================================================================== */
.tp-row { display: flex; align-items: center; gap: 12px; }
.tp-thumb { flex: none; width: 120px; height: 92px; padding: 0; border: 1px solid #e5e7eb; border-radius: 10px; overflow: hidden; position: relative; background: #f3f4f6; cursor: pointer; }
.tp-thumb iframe, .tp-img iframe { position: absolute; left: 0; top: 0; width: 390px; height: 400px; border: 0; transform: scale(var(--s, 0.3)); transform-origin: 0 0; pointer-events: none; }
.tp-text { flex: 1; min-width: 0; }
.tp-text strong { font-size: 15px; color: #111827; }
.tp-pill { display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: #1d4ed8; background: #dbeafe; padding: 2px 7px; border-radius: 99px; vertical-align: 2px; }
.tp-pill[hidden] { display: none; }
.tp-link { display: block; background: none; border: 0; padding: 2px 0 0; color: #2563eb; font: 600 14px Inter, system-ui, sans-serif; cursor: pointer; }
.tp-trash { flex: none; width: 40px; height: 40px; border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; color: #6b7280; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.tp-trash:hover { color: #dc2626; border-color: #fca5a5; background: #fef2f2; }
.tp-trash[hidden] { display: none; }
.tp-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-top: 10px; background: #f3f4f6; border-radius: 12px; }
.tp-seg button { height: 38px; border: 0; border-radius: 9px; background: transparent; color: #6b7280; font: 700 14px Inter, system-ui, sans-serif; cursor: pointer; }
.tp-seg button.on { background: #fff; color: #111827; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.tp-seg.tp-off { opacity: .45; pointer-events: none; }
.tp-sheet-wrap { position: fixed; inset: 0; z-index: 10050; display: flex; align-items: flex-end; justify-content: center; }
.tp-sheet-wrap[hidden] { display: none; }
.tp-sheet-bg { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.55); }
.tp-sheet { position: relative; width: 100%; max-width: 620px; max-height: 92vh; display: flex; flex-direction: column; background: #fff; border-radius: 22px 22px 0 0; box-shadow: 0 -10px 40px rgba(0, 0, 0, .25); animation: tpUp .22s ease; }
@keyframes tpUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.tp-grab { width: 40px; height: 5px; border-radius: 99px; background: #e5e7eb; margin: 8px auto 0; }
.tp-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 18px 0; }
.tp-head h2 { font-size: 1.3rem; font-weight: 800; color: #111827; margin: 0; }
.tp-x { width: 38px; height: 38px; border: 0; background: transparent; font-size: 28px; line-height: 1; color: #6b7280; cursor: pointer; }
.tp-seg-sheet { margin: 10px 18px 0; }
.tp-body { overflow-y: auto; padding: 4px 18px 16px; }
.tp-sub { font-size: 11.5px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; color: #6b7280; margin: 16px 0 8px; }
.tp-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tp-tile { display: flex; flex-direction: column; gap: 6px; padding: 6px; border: 1.5px solid #e5e7eb; border-radius: 14px; background: #fff; cursor: pointer; text-align: left; font: inherit; }
.tp-tile.on { border-color: #2563eb; box-shadow: 0 0 0 1px #2563eb; }
.tp-img { position: relative; display: block; width: 100%; aspect-ratio: 390 / 285; overflow: hidden; border-radius: 9px; background: #f3f4f6; }
.tp-tname { display: flex; align-items: center; gap: 6px; padding: 0 4px 2px; font-size: 14px; font-weight: 700; color: #111827; min-width: 0; }
.tp-tlabel { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-hint { font-size: 12.5px; color: #6b7280; margin: 8px 0 0; line-height: 1.45; }
.tp-foot { display: flex; gap: 10px; padding: 12px 18px 18px; border-top: 1px solid #e5e7eb; }
.tp-cancel { flex: 0 0 auto; height: 48px; padding: 0 18px; border: 1px solid #d1d5db; border-radius: 12px; background: #fff; color: #111827; font: 700 15px Inter, system-ui, sans-serif; cursor: pointer; }
.tp-save { flex: 1; height: 48px; border: 0; border-radius: 12px; background: #2563eb; color: #fff; font: 800 15px Inter, system-ui, sans-serif; cursor: pointer; }
@media (min-width: 700px) {
    .tp-sheet-wrap { align-items: center; }
    .tp-sheet { border-radius: 22px; max-height: 88vh; }
    .tp-grab { display: none; }
    .tp-tiles { grid-template-columns: repeat(3, 1fr); }
}
/* v2.13: when the live score was last checked */
.v2-updated { font-size: 11.5px; opacity: .75; margin-top: 3px; }
.v2-updated[hidden] { display: none; }
body.v2 .scoreboard-hero .matchup .v2-updated { color: #fff; }
/* v2.14: Players shows the top 5, then "Show all N players" */
body.v2 .lb-row.v2-lb.v2-lb-more { display: none; }
body.v2 .v2-lb-open .lb-row.v2-lb.v2-lb-more { display: flex; }
body.v2 #players-card .v2-det-body { max-height: none; }
body.v2 #players-card .v2-det-body.v2-lb-open { max-height: 420px; overflow-y: auto; }
/* v2.15: Players opens to the full list in a scrolling box (like the current site) */
body.v2 #players-card .v2-det-body { max-height: 330px; overflow-y: auto; overscroll-behavior: contain;
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 24px), transparent); padding-bottom: 18px; }

/* QA only: theme preview bar under the top menu */
.qa-theme-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 16px; background: #fef9c3; border-bottom: 1px solid #fde047; font: 600 13px Inter, system-ui, sans-serif; color: #713f12; }
.qa-theme-bar select { height: 32px; border: 1px solid #eab308; border-radius: 8px; background: #fff; padding: 0 8px; font: 600 13.5px Inter, system-ui, sans-serif; color: #111827; max-width: 200px; }
.qa-seg { display: inline-flex; background: #fff; border: 1px solid #eab308; border-radius: 8px; overflow: hidden; }
.qa-seg button { border: 0; background: transparent; padding: 0 12px; height: 30px; font: 700 13px Inter, system-ui, sans-serif; color: #713f12; cursor: pointer; }
.qa-seg button.on { background: #eab308; color: #fff; }
.qa-note { margin-left: auto; font-weight: 500; opacity: .8; }
@media (max-width: 640px) { .qa-note { display: none; } .qa-theme-bar { padding: 8px 10px; gap: 8px; } .qa-theme-bar label { display: none; } }
/* Phones: the QA theme preview lives in the ☰ menu instead of a bar */
.qa-menu-theme { display: none; }
@media (max-width: 640px) {
    .qa-theme-bar { display: none; }
    .qa-menu-theme { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; padding: 12px 14px; border-top: 1px solid #fde047; background: #fef9c3; border-radius: 0 0 10px 10px; }
    .qa-menu-theme label { font: 700 13px Inter, system-ui, sans-serif; color: #713f12; display: flex; justify-content: space-between; gap: 8px; }
    .qa-menu-theme label small { font-weight: 500; opacity: .8; }
    .qa-menu-theme select { height: 38px; border: 1px solid #eab308; border-radius: 8px; background: #fff; padding: 0 8px; font: 600 14px Inter, system-ui, sans-serif; color: #111827; }
    .qa-menu-theme .qa-seg { align-self: flex-start; }
    .qa-menu-theme .qa-seg button { height: 34px; padding: 0 16px; }
}

/* ---------- v2.16: "leading now" uses the period's own color ----------
   Green Q1, blue Half, orange Q3, purple Q4/Final (gold Final only on
   overtime boards, same as the winner colors). Box, board square, legend
   chip and the row/column numbers all match. */
body.v2 .quarter-box.q1, body.v2 .square.v2-hold-q1, body.v2 .v2-lg-q1 { --hc: #22c55e; --hsb: #16a34a; --hbg: rgba(5, 46, 22, 0.92); --hsq: #f0fdf4; --hink: #166534; --hnow: #86efac; }
body.v2 .quarter-box.q2, body.v2 .square.v2-hold-q2, body.v2 .v2-lg-q2 { --hc: #3b82f6; --hsb: #2563eb; --hbg: rgba(23, 37, 84, 0.92); --hsq: #eff6ff; --hink: #1e40af; --hnow: #93c5fd; }
body.v2 .quarter-box.q3, body.v2 .square.v2-hold-q3, body.v2 .v2-lg-q3 { --hc: #f97316; --hsb: #ea580c; --hbg: rgba(67, 20, 7, 0.92); --hsq: #fff7ed; --hink: #9a3412; --hnow: #fdba74; }
body.v2 .quarter-box.q4, body.v2 .square.v2-hold-q4, body.v2 .v2-lg-q4,
body.v2.v2-std .quarter-box.final, body.v2.v2-std .square.v2-hold-final, body.v2.v2-std .v2-lg-final { --hc: #a855f7; --hsb: #9333ea; --hbg: rgba(46, 16, 101, 0.92); --hsq: #faf5ff; --hink: #6b21a8; --hnow: #d8b4fe; }
body.v2.v2-ot .quarter-box.final, body.v2.v2-ot .square.v2-hold-final, body.v2.v2-ot .v2-lg-final { --hc: #eab308; --hsb: #ca8a04; --hbg: rgba(66, 32, 6, 0.92); --hsq: #fefce8; --hink: #854d0e; --hnow: #fde68a; }

body.v2 .scoreboard-hero .quarter-scores .quarter-box.live-holding {
    border: 2px solid var(--hc, #f97316);
    background: var(--hbg, rgba(67, 20, 7, 0.92));
    animation: v2-hold-pulse 2s ease-in-out infinite;
}
body.v2 .quarter-box.live-holding .v2-now { color: var(--hnow, #fdba74); }
body.v2 .quarter-box.live-holding .holding-dot { background: var(--hc, #f59e0b); }
body.v2 .square.live-holding-square {
    background: var(--hsq, #fff7ed);
    border: 2px solid var(--hsb, #ea580c);
    color: var(--hink, #9a3412);
    animation: v2-hold-pulse 2s ease-in-out infinite;
}
body.v2 .v2-lg-live i { border-color: var(--hsb, #ea580c); }
@keyframes v2-hold-pulse {
    0%, 100% { box-shadow: 0 0 10px color-mix(in srgb, var(--hc, #f59e0b) 30%, transparent); }
    50% { box-shadow: 0 0 18px color-mix(in srgb, var(--hc, #f59e0b) 60%, transparent); }
}
/* Row and column numbers the score points at, same color as the period */
body.v2:has(.quarter-box.live-holding.q1) .header-cell.v2-hot { background: #16a34a; }
body.v2:has(.quarter-box.live-holding.q2) .header-cell.v2-hot { background: #2563eb; }
body.v2:has(.quarter-box.live-holding.q4) .header-cell.v2-hot,
body.v2.v2-std:has(.quarter-box.live-holding.final) .header-cell.v2-hot { background: #9333ea; }
body.v2.v2-ot:has(.quarter-box.live-holding.final) .header-cell.v2-hot { background: #ca8a04; }
body.v2:has(.quarter-box.live-holding.q1) .square.v2-cross:not(.winner):not(.live-holding-square) { background: #f0fdf4; border-color: #bbf7d0; }
body.v2:has(.quarter-box.live-holding.q2) .square.v2-cross:not(.winner):not(.live-holding-square) { background: #eff6ff; border-color: #bfdbfe; }
body.v2:has(.quarter-box.live-holding.q4) .square.v2-cross:not(.winner):not(.live-holding-square),
body.v2.v2-std:has(.quarter-box.live-holding.final) .square.v2-cross:not(.winner):not(.live-holding-square) { background: #faf5ff; border-color: #e9d5ff; }
body.v2.v2-ot:has(.quarter-box.live-holding.final) .square.v2-cross:not(.winner):not(.live-holding-square) { background: #fefce8; border-color: #fde68a; }

/* ---------- v2.17: names wrap; no period label on winning squares ----------
   The square's color and the legend say which period it won. Names wrap at
   spaces onto two lines and only break inside a word when one word is too
   long for the square, the same as the live site. */
body.v2 .square.winner::before { content: none !important; display: none !important; }
body.v2 .square,
body.v2 .square.winner {
    white-space: normal;
    overflow: hidden;
    text-overflow: clip;
    word-break: normal;
    overflow-wrap: anywhere;
    hyphens: none;
    line-height: 1.1;
    text-align: center;
}
@media (max-width: 768px) {
    body.v2 .square { font-size: 2.5vw; letter-spacing: 0; padding: 1px; }
    body.v2 .square.name-long { font-size: 2.4vw; }
    body.v2 .square.name-xlong { font-size: 2.2vw; }
}
@media (min-width: 1025px) {
    body.v2 .square,
    body.v2 .square.name-long,
    body.v2 .square.name-xlong { padding: 0 4px; font-size: 0.85rem; }
}
/* Colors still fade, but the font size never animates, so the name sizing
   measures the real size right away */
body.v2 .square { transition-property: background-color, border-color, color, box-shadow, opacity, transform; }
@media (min-width: 769px) and (max-width: 1024px) {
    body.v2 .square,
    body.v2 .square.name-long,
    body.v2 .square.name-xlong { font-size: 0.78rem; padding: 0 3px; }
}
/* The next-score tile or player row whose squares are showing (tap again to clear) */
.v2-scen.v2-picked { border-color: #2563eb; background: #dbeafe; box-shadow: inset 0 0 0 1px #2563eb; }
.v2-lb.v2-picked { background: #eff6ff; box-shadow: inset 3px 0 0 #2563eb; }

/* Side ad (ofs_below, 300x250): hidden until the ad network fills it, so an
   unfilled zone never leaves an empty box with an "Advertisement" label */
.v2-ad-side:not(:has(.v2-ad-slot > *)) { display: none; }
/* Ad under the board (ofs_below): fixed height so nothing below it jumps */
.v2-ad-board { margin: 6px auto 22px; }
.v2-ad-board .v2-ad-slot { width: 728px; max-width: 100%; height: 90px; }
@media (max-width: 768px) {
    .v2-ad-board { margin: 4px auto 16px; }
    .v2-ad-board .v2-ad-slot { width: 320px; height: 50px; }
}
/* Finished games: one quiet line under the legend instead of a big card */
.v2-own { margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--border, #e5e7eb); font-size: 13px; text-align: center; }
.v2-own a { color: #2563eb; font-weight: 600; text-decoration: none; }
.v2-own a:hover { text-decoration: underline; }
[data-theme="dark"] .v2-own a { color: #60a5fa; }
/* Phones: the 300x250 goes after Players/Activity/Host tools, so it never
   sits right under the ad below the board */
@media (max-width: 768px) {
    body.v2 .v2-aside .v2-ad-side { order: 10; }
}
/* Host notice about the new themes */
.v2-banner-info { background: rgba(37, 99, 235, 0.06); border: 1px solid #93c5fd; }
.v2-banner-info .v2-banner-icon { color: #2563eb; display: flex; }
.v2-banner-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 768px) {
    .v2-banner-info { flex-wrap: wrap; }
    .v2-banner-info .v2-banner-text { flex: 1 1 calc(100% - 64px); }
    .v2-banner-info .v2-banner-actions { width: 100%; padding-left: 32px; }
}
@media (max-width: 768px) {
    .v2-banner-info { position: relative; padding-right: 34px; }
    .v2-banner-info .v2-banner-x { position: absolute; top: 6px; right: 4px; }
    .v2-banner-info .v2-banner-text { flex-basis: calc(100% - 40px); }
}
/* Host tools row when logged in: green "Logged in" + small Log out button, one line */
.v2-host-on { display: flex; align-items: center; gap: 8px; white-space: nowrap; flex: none; }
.v2-host-pill { display: inline-flex; align-items: center; gap: 7px; color: #15803d; font-size: 12.5px; font-weight: 700; }
.v2-host-pill i { width: 7px; height: 7px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 3px rgba(22, 163, 74, .18); }
.v2-host-on a.v2-logout { padding: 4px 10px; border: 1px solid var(--border, #e5e7eb); border-radius: 8px; color: #374151; font-size: 12.5px; font-weight: 600; text-decoration: none; }
.v2-host-on a.v2-logout:hover { border-color: #9ca3af; }
[data-theme="dark"] .v2-host-pill { color: #4ade80; }
[data-theme="dark"] .v2-host-on a.v2-logout { color: #e5e7eb; border-color: #374151; }
/* Copy buttons: "Copied!" state */
.is-copied { background: #16a34a !important; border-color: #16a34a !important; color: #fff !important; }

/* The ad network puts a small "Ad" tag just below each ad: leave room for it */
.v2-ad-slot { overflow: visible; }
.v2-ad { padding-bottom: 14px; }

/* Ads (Nov 25): center whatever the ad network puts in a slot. Its creative is
   often a block-level box narrower than the slot (a 468x60 or 320x50 in the
   728 spot), which text-align alone leaves stuck on the left. */
.v2-ad-slot { display: flex; justify-content: center; align-items: center; }
.v2-ad-slot > * { flex: none; max-width: 100%; }
.v2-ad-slot > .v2-ad-ph { flex: 1 1 auto; align-self: stretch; }   /* QA placeholder fills its slot */

/* Board status card (Nov 25) */
.v2-status .v2-st { margin: 0; padding: 0 0 4px; }
.v2-status .v2-st > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid #f1f5f9; font-size: 13.5px; }
.v2-status .v2-st > div:first-child { border-top: 0; }
.v2-status dt { color: #6b7280; font-weight: 600; flex: none; }
.v2-status dd { margin: 0; color: #111827; font-weight: 600; text-align: right; }
.v2-st-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.v2-st-pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.v2-st-open { background: #dcfce7; color: #15803d; }
.v2-st-locked { background: #e2e8f0; color: #334155; }
.v2-st-live { background: #fee2e2; color: #b91c1c; }
.v2-st-done { background: #f3e8ff; color: #7e22ce; }
[data-theme="dark"] .v2-status .v2-st > div { border-top-color: #1f2937; }
[data-theme="dark"] .v2-status dt { color: #9ca3af; }
[data-theme="dark"] .v2-status dd { color: #f3f4f6; }
/* Top card when the board is locked before the numbers are drawn */
.v2-progress-locked .v2-progress-top strong { display: inline-flex; align-items: center; gap: 7px; }
.v2-progress-locked .v2-progress-bar span { background: #94a3b8; }

/* Top card team names on phones (Nov 26): game-v2.js shrinks them to fit; a name
   that still can't fit wraps to two lines instead of ending in "..." */
@media (max-width: 768px) {
    body.v2 .scoreboard-hero .team-name { text-overflow: clip; }
    /* Nov 27: full name on up to two lines (game-v2.js picks this or the short name) */
    body.v2 .scoreboard-hero .team-name.v2-name-full { white-space: normal; text-wrap: balance; overflow-wrap: normal; line-height: 1.15; max-height: 2.4em; }
    body.v2 .scoreboard-hero .team-name.v2-name-full .v2-full { display: inline; }
    body.v2 .scoreboard-hero .team-name.v2-name-full .v2-short { display: none; }
    /* the kickoff date and time stack in the middle so the names get more room */
    body.v2 .scoreboard-hero .game-time .gt-sep { display: none; }
    body.v2 .scoreboard-hero .game-time .gt-d, body.v2 .scoreboard-hero .game-time .gt-t { display: block; white-space: nowrap; }
}
