/* The family scoreboard (watch.html). One idea carries the page: a ballpark scoreboard in the team's own color.
   --tc / --tc-ink / --ta come from the team's colors when set; the fallbacks are the LeagueCue outfield green and lamp amber. */
.wb-page { background: var(--chalk); }
.wb-page #app { max-width: 620px; margin: 0 auto; padding-top: 0; padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
.wb-wait { padding: 48px 20px; text-align: center; color: var(--muted); }

.wb-board { --field: var(--tc, var(--grass-deep)); --chalkline: var(--tc-ink, #fff); --lamp: var(--ta, var(--amber));
  background: var(--field); color: var(--chalkline); padding: calc(14px + env(safe-area-inset-top)) 18px 20px; border-radius: 0 0 22px 22px;
  box-shadow: inset 0 -10px 24px -18px rgba(0, 0, 0, .7); }
@media (min-width: 640px) { .wb-board { margin-top: 18px; border-radius: 22px; } }

.wb-top { display: flex; align-items: center; gap: 12px; }
.wb-badge { flex: none; width: 44px; height: 44px; border-radius: 12px; background: rgba(255, 255, 255, .92); color: var(--ink); object-fit: contain; padding: 3px;
  display: grid; place-items: center; font: 800 var(--fs-card) var(--head); }
.wb-title { flex: 1; min-width: 0; display: grid; line-height: 1.2; }
.wb-title b { font: 700 var(--fs-section) var(--head); letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wb-title span { font-size: var(--fs-small); opacity: .8; }
.wb-status { flex: none; font: 700 var(--fs-body) var(--body); padding: 6px 12px; border-radius: 99px; border: 1.5px solid currentColor; opacity: .9; display: inline-flex; align-items: center; gap: 7px; }
.wb-status.live { background: var(--chalkline); color: var(--field); border-color: transparent; opacity: 1; }
.wb-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); animation: wb-pulse 1.6s ease-in-out infinite; }
@keyframes wb-pulse { 50% { opacity: .25; } }

/* The two big numerals, with the inning between them. */
.wb-score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 8px; margin: 22px 0 18px; text-align: center; }
.wb-side { display: grid; gap: 2px; min-width: 0; }
.wb-name { font: 600 var(--fs-card) var(--head); letter-spacing: .02em; opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-num { font: 800 clamp(84px, 27vw, 132px)/.86 var(--head); font-variant-numeric: tabular-nums; letter-spacing: -.01em; transform-origin: 50% 60%; }
.wb-num.flip { animation: wb-flip .7s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes wb-flip { 0% { transform: rotateX(88deg); opacity: 0; } 55% { transform: rotateX(-14deg); opacity: 1; } 100% { transform: none; } }
.wb-when { align-self: center; font: 700 var(--fs-body)/1.2 var(--head); letter-spacing: .02em; padding: 8px 12px; border-radius: 10px; background: rgba(0, 0, 0, .22); max-width: 9.5em; }

/* Both pitchers with their running pitch counts, above the inning-by-inning line. */
.wb-arms { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.wb-arm { display: flex; align-items: baseline; gap: 6px; min-width: 0; padding: 7px 10px; border-radius: 10px; background: rgba(0, 0, 0, .22); border: 1.5px solid transparent; }
.wb-arm:empty { visibility: hidden; }
.wb-arm.now { border-color: var(--lamp); }
.wb-arm-name { flex: 1; min-width: 0; font-size: var(--fs-small); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .9; }
.wb-arm b { font: 800 var(--fs-section)/1 var(--head); font-variant-numeric: tabular-nums; }
.wb-arms-key { grid-column: 1 / -1; margin: -3px 2px 0; font-size: var(--fs-small); opacity: .7; text-align: right; }

/* Inning by inning, like the board on the outfield fence. */
.wb-line-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.wb-line { width: 100%; border-collapse: separate; border-spacing: 3px; font: 700 var(--fs-card) var(--head); font-variant-numeric: tabular-nums; }
.wb-line th, .wb-line td { text-align: center; padding: 0; }
.wb-line thead th { font-weight: 800; font-size: var(--fs-card); padding-bottom: 2px; }
.wb-line tbody th { text-align: left; font-weight: 600; font-size: var(--fs-body); max-width: 7.5em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 6px; opacity: .9; }
.wb-line td { min-width: 26px; height: 32px; border-radius: 6px; background: rgba(0, 0, 0, .24); }
.wb-line td.now { box-shadow: inset 0 0 0 2px var(--lamp); }
.wb-line td.wb-total { background: var(--chalkline); color: var(--field); font-weight: 800; min-width: 34px; }

/* Balls, strikes and outs as lamps. */
.wb-play-area { margin-top: 16px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .22); }
.wb-count { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; }
.wb-lamps { display: flex; align-items: center; gap: 6px; }
.wb-lamp-label { font: 600 var(--fs-body) var(--head); letter-spacing: .02em; opacity: .85; margin-right: 2px; }
.wb-lamp { width: 15px; height: 15px; border-radius: 50%; background: rgba(0, 0, 0, .3); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .4); }
.wb-lamp.on { background: var(--lamp); box-shadow: 0 0 10px 1px var(--lamp); }

/* The field. Lit bases have runners; our players are named where they stand; the ball and the runners move when a play comes in. */
.wb-field { width: 100%; max-width: 420px; height: auto; display: block; margin: 0 auto; overflow: hidden; border-radius: 14px; }   /* the photographed park stays inside its box */
/* Names and positions on the field are Baseball IQ tags (field.js iqPerson): drawn in the field's own units, like IQ. */
.wb-field .iq-person text { stroke: none; }

.wb-runner-name { transition: opacity .25s; }
.wb-ball { fill: #fff; stroke: #102e4b; stroke-width: 2.4; }
.wb-land { fill: none; stroke: #fff; stroke-width: 3; opacity: 0; animation: wb-land .8s ease-out both; transform-box: fill-box; transform-origin: center; }
@keyframes wb-land { 0% { opacity: .9; transform: scale(.4); } 100% { opacity: 0; transform: scale(1.6); } }

.wb-idle { text-align: center; padding-bottom: 34px; }
.wb-idle .wb-top { text-align: left; }
.wb-idle-line { font: 800 var(--fs-title)/1.05 var(--head); margin: 34px 0 8px; }
.wb-idle-sub { margin: 0 auto; max-width: 22em; opacity: .85; }

/* The matchup: pitcher on the left, batter on the right. */
.wb-mu { margin: 16px 16px 0; padding: 14px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; }
.wb-mu-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: start; }
.wb-mu-side { display: grid; gap: 3px; min-width: 0; }
.wb-mu-side:last-child { text-align: right; } .wb-mu-side:last-child .wb-mu-who { justify-content: flex-end; }
.wb-mu-who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.wb-mu-who b { font: 700 var(--fs-section)/1.1 var(--head); overflow-wrap: anywhere; }
.wb-mu-line { font-size: var(--fs-small); color: var(--muted); }
.wb-mu-vs { align-self: center; font: 700 var(--fs-small) var(--head); color: var(--muted); padding: 4px 8px; border: 1px solid var(--line); border-radius: 99px; }
.wb-mu-deck { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: var(--fs-body); color: var(--muted); } .wb-mu-deck b { color: var(--ink); }
.wb-up-label { display: block; font-size: var(--fs-small); color: var(--muted); }
.wb-jersey { flex: none; min-width: 36px; height: 36px; padding: 0 6px; border-radius: 10px; background: var(--ink); color: #fff; display: grid; place-items: center; font: 800 var(--fs-section) var(--head); font-variant-numeric: tabular-nums; }

/* Play by play and box score share one place; the tabs choose. */
.wb-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; margin-bottom: 6px; background: #e6ebe1; border-radius: 14px; }
.wb-tab { min-height: 44px; border: 0; border-radius: 10px; background: none; font: 700 var(--fs-card) var(--body); color: var(--muted); cursor: pointer; }
.wb-tab[aria-selected="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(20, 33, 27, .18); }
.wb-half { font: 700 var(--fs-card) var(--head); margin: 18px 0 2px; color: var(--muted); }
.wb-box { width: 100%; border-collapse: collapse; margin-top: 14px; font-variant-numeric: tabular-nums; }
.wb-box caption { text-align: left; font: 700 var(--fs-section) var(--head); padding-bottom: 4px; }
.wb-box th, .wb-box td { padding: 10px 6px; border-bottom: 1px solid var(--line); text-align: center; }
.wb-box thead th { font-size: var(--fs-small); color: var(--muted); font-weight: 600; }
.wb-box .wb-box-name { text-align: left; font-weight: 600; padding-left: 2px; }
.wb-box-extra { display: block; font-size: var(--fs-small); font-weight: 400; color: var(--muted); }
.wb-box + .wb-quiet { margin-top: 10px; }

/* Play by play: newest first. Runs get the weight; inning breaks are quiet rules. */
.wb-plays { margin: 22px 16px 0; }
.wb-plays h2 { font-size: var(--fs-section); margin-bottom: 8px; }
.wb-feed, .wb-recent { list-style: none; margin: 0; padding: 0; }
.wb-play { padding: 11px 2px; border-bottom: 1px solid var(--line); }
.wb-play.hit { font-weight: 600; }
.wb-play.run-us { font: 700 var(--fs-section)/1.2 var(--head); padding: 12px 14px; margin: 6px 0; border: 0; border-radius: 12px; background: var(--ink); color: #fff; }
.wb-play.run-opp { font-weight: 600; padding: 11px 14px; margin: 6px 0; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.wb-play.new { animation: wb-arrive .9s ease-out both; }
@keyframes wb-arrive { 0% { opacity: 0; transform: translateY(-8px); } 100% { opacity: 1; transform: none; } }
.wb-quiet { color: var(--muted); font-size: var(--fs-body); margin: 0; }

.wb-recent li { border-bottom: 1px solid var(--line); }
.wb-recent a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 11px 2px; color: inherit; text-decoration: none; }
.wb-recent a:hover .grow, .wb-recent a:focus-visible .grow { text-decoration: underline; }
.wb-plays h2 + .wb-quiet { margin-bottom: 4px; }
.wb-go { flex: none; font: 700 var(--fs-section) var(--head); color: var(--muted); }
.wb-latest { padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: var(--paper); border-bottom: 1px solid var(--line); }
.wb-latest a { font-weight: 700; text-decoration: none; display: inline-flex; min-height: 32px; align-items: center; }
.wb-recent b { font: 700 var(--fs-section) var(--head); font-variant-numeric: tabular-nums; }
.wb-res { flex: none; width: 3.4em; font-size: var(--fs-small); font-weight: 700; text-align: center; padding: 3px 0; border-radius: 99px; background: var(--paper); border: 1px solid var(--line); }
.wb-res.W { background: var(--ok-tint); border-color: transparent; color: var(--grass-deep); }

.wb-foot { margin: 28px 16px 0; display: grid; gap: 10px; text-align: center; }
.wb-foot-note { min-height: 1.4em; margin: 0; font-size: var(--fs-body); }
.wb-brand { margin: 6px 0 0; font-size: var(--fs-small); color: var(--muted); }
.wb-brand a { font: 800 var(--fs-card) var(--head); text-decoration: none; margin-right: 4px; }

.wb-empty { padding: 56px 22px; text-align: center; } .wb-empty h1 { font-size: var(--fs-title); margin-bottom: 10px; }

@media (prefers-reduced-motion: reduce) { .wb-num.flip, .wb-play.new, .wb-dot, .wb-land { animation: none; } }

/* The big moment: a hit of ours, or a run of ours, called out over the field for a few seconds. */
.wb-play-area { position: relative; }
.wb-moment { position: absolute; left: 0; right: 0; top: 12px; z-index: 2; display: grid; gap: 2px; justify-items: center; text-align: center; padding: 10px 14px; border-radius: 12px;
  background: var(--chalkline); color: var(--field); box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .6); animation: wb-moment 6.5s ease both; pointer-events: none; }
.wb-moment b { font: 800 var(--fs-section)/1.1 var(--head); } .wb-moment span { font-size: var(--fs-small); font-weight: 600; }
@keyframes wb-moment { 0% { opacity: 0; transform: translateY(-10px) scale(.96); } 7% { opacity: 1; transform: none; } 85% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .wb-moment { animation: wb-moment-still 6.5s linear both; } }
@keyframes wb-moment-still { 0%, 85% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }

/* The fielder who made the play lights up when the ball reaches them. */
.wb-fielder.made { fill: #ffc642; }

/* Big moments: a shout above the play, and confetti in the team's colors. */
.wb-moment.loud { padding: 12px 14px 12px; gap: 3px; animation-duration: 7s; }
.wb-moment em { font: 800 clamp(30px, 10vw, 44px)/.95 var(--head); font-style: normal; text-transform: uppercase; letter-spacing: .01em; animation: wb-shout .6s cubic-bezier(.2, 1.6, .4, 1) both; }
.wb-moment.loud b { font: 700 var(--fs-card)/1.2 var(--body); }
@keyframes wb-shout { 0% { transform: scale(.4) rotate(-6deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
.wb-board { position: relative; } .wb-burst { position: absolute; left: 50%; top: 42%; width: 0; height: 0; z-index: 3; pointer-events: none; }
.wb-play-area .wb-burst { top: 60px; }
.wb-burst i { position: absolute; left: -4px; top: -6px; width: 8px; height: 12px; background: var(--c); opacity: 0; animation: wb-confetti 1.7s cubic-bezier(.15, .7, .3, 1) var(--d) both; }
@keyframes wb-confetti { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--x), calc(var(--y) + 150px)) rotate(var(--r)); } }
/* Cheer along: three big buttons under the board, with cheers floating up from them. */
.wb-cheers { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 16px 0; }
.wb-cheer { display: grid; justify-items: center; gap: 1px; padding: 10px 4px 8px; min-height: 76px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--paper); color: var(--ink); font: inherit; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.wb-cheer:active { background: var(--ok-tint, #e6f1ea); } .wb-cheer:focus-visible { outline: 3px solid var(--grass); outline-offset: 2px; }
.wb-cheer-e { font-size: var(--fs-title); line-height: 1; } .wb-cheer.pop .wb-cheer-e { animation: wb-pop .35s cubic-bezier(.2, 1.8, .4, 1); }
@keyframes wb-pop { 0% { transform: scale(1); } 40% { transform: scale(1.45) rotate(-8deg); } 100% { transform: none; } }
.wb-cheer-l { font-size: var(--fs-small); font-weight: 600; color: var(--muted); } .wb-cheer-n { font: 700 var(--fs-card)/1 var(--head); font-variant-numeric: tabular-nums; }
.wb-cheer-air { position: absolute; left: 0; right: 0; bottom: 100%; height: 0; pointer-events: none; z-index: 4; }
.wb-cheer-up { position: absolute; bottom: -30px; font-size: var(--fs-title); animation: wb-cheer-up 2s ease-out both; will-change: transform, opacity; }
@keyframes wb-cheer-up { 0% { opacity: 0; transform: translate(0, 0) scale(.6); } 12% { opacity: 1; transform: translate(0, -20px) scale(1.1); } 100% { opacity: 0; transform: translate(var(--sway), -260px) scale(1); } }
@media (prefers-reduced-motion: reduce) { .wb-moment em, .wb-cheer.pop .wb-cheer-e { animation: none; } }

/* A finished game: its recap, and hits and errors beside the runs. */
.wb-line td.wb-he { background: transparent; color: var(--chalkline); font-weight: 700; min-width: 26px; opacity: .9; }
.wb-tabs { grid-auto-flow: column; grid-auto-columns: 1fr; grid-template-columns: none; }
.wb-recap { display: grid; gap: 12px; max-width: 62ch; } .wb-recap h2 { font: 800 clamp(26px, 7.5vw, 34px)/1.05 var(--head); margin: 4px 0 2px; letter-spacing: -.005em; text-wrap: balance; }
.wb-recap p { margin: 0; font-size: var(--fs-card); line-height: 1.5; } .wb-recap p:first-of-type { font-size: var(--fs-card); }
.wb-box-pos { font-weight: 600; font-size: var(--fs-small); color: var(--muted); letter-spacing: .03em; }
.wb-fielding { margin: 8px 2px 0; font-size: var(--fs-small); }

/* Polish: the line score always fits a phone, names stay readable, the score no longer overwhelms the header. */
.wb-back { flex: none; width: 40px; height: 40px; margin-left: -8px; display: grid; place-items: center; border-radius: 12px; color: inherit; text-decoration: none; font: 700 var(--fs-title)/1 var(--body); }
.wb-back:hover { background: rgba(255, 255, 255, .12); }
.wb-title { min-width: 0; } .wb-title b { display: block; overflow-wrap: anywhere; }
.wb-status { font-size: var(--fs-small); padding: 5px 10px; white-space: nowrap; }
.wb-num { font-size: clamp(60px, 19vw, 104px); }
.wb-name { white-space: normal; overflow: visible; overflow-wrap: anywhere; line-height: 1.15; font-size: var(--fs-body); }
.wb-score { margin: 16px 0 14px; align-items: center; } .wb-when { font-size: var(--fs-small); }
.wb-line { table-layout: fixed; border-spacing: 2px; font-size: var(--fs-body); }
.wb-line thead th { font-size: var(--fs-small); } .wb-line thead th:first-child, .wb-line tbody th { width: 5.6em; }
.wb-line tbody th { max-width: none; white-space: normal; overflow: visible; overflow-wrap: anywhere; font-size: var(--fs-small); line-height: 1.15; }
.wb-line td, .wb-line td.wb-total, .wb-line td.wb-he { min-width: 0; height: 30px; }
.wb-line-wrap.wide .wb-line { table-layout: auto; width: max-content; min-width: 100%; } .wb-line-wrap.wide .wb-line td { min-width: 26px; }
.wb-line-wrap.wide .wb-line tbody th, .wb-line-wrap.wide .wb-line thead th:first-child { position: sticky; left: 0; background: var(--field); z-index: 1; }
/* The newest play in one sentence, right under the count. */
.wb-last { margin: 10px 0 0; padding: 10px 14px; border-radius: 12px; background: rgba(0, 0, 0, .22); font: 600 var(--fs-body)/1.35 var(--body); }
.wb-last b { display: block; font: 700 var(--fs-small)/1.2 var(--body); opacity: .8; }
.wb-updated { margin: 8px 0 0; font: 500 var(--fs-small) var(--body); opacity: .8; text-align: center; }
.wb-title b { white-space: normal; overflow: visible; text-overflow: clip; font-size: var(--fs-card); line-height: 1.2; } .wb-title span { font-size: var(--fs-small); }
/* Small phones: the Live pill drops to its own line so the team name and date are not squeezed into a sliver. */
@media (max-width: 359px) { .wb-top { flex-wrap: wrap; row-gap: 8px; } .wb-title { flex: 1 1 150px; } }

/* ---- Live Score, the family's view: score, inning and count together at the top; the field next; details after. ---- */
.wb-score { margin: 16px 0 12px; align-items: center; }
.wb-num { font-size: clamp(72px, 23vw, 120px); }
.wb-when { display: grid; gap: 2px; max-width: 8.5em; padding: 9px 12px; } .wb-when b { font: 700 var(--fs-card)/1.2 var(--head); } .wb-when span { font: 600 var(--fs-small)/1.2 var(--body); opacity: .85; }
.wb-count { margin: 0; padding: 10px 14px; border-radius: 12px; background: rgba(0, 0, 0, .22); }
.wb-play-area { margin-top: 12px; padding-top: 0; border-top: 0; }
.wb-arms { margin: 14px 0 10px; } .wb-arm { align-items: center; } .wb-arm-name { white-space: normal; overflow: visible; font-size: var(--fs-small); line-height: 1.2; } .wb-arm b { font-size: var(--fs-card); }
/* How current is this? Each state looks different, and only a game with fresh plays gets the pulsing Live pill. */
.wb-status.soon { background: var(--lamp); color: #14213a; border-color: transparent; opacity: 1; }
.wb-status.final { background: rgba(0, 0, 0, .28); border-color: transparent; opacity: 1; }
.wb-status.lost { border-style: dashed; opacity: 1; }
.wb-lost { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; border: 1.5px dashed currentColor; background: rgba(0, 0, 0, .28); font: 600 var(--fs-small)/1.35 var(--body); text-align: center; }
.wb-stale .wb-play-area, .wb-stale .wb-count { opacity: .5; } .wb-stale .wb-dot { animation: none; }
.wb-waiting { padding-top: calc(40px + env(safe-area-inset-top)); padding-bottom: 44px; } .wb-waiting .wb-idle-line { font-size: var(--fs-section); margin-top: 0; }
@media (prefers-reduced-motion: reduce) { .wb-dot { animation: none; } }
@media (max-width: 359px) { .wb-count { padding: 9px 10px; gap: 6px; } .wb-lamp-label { font-size: var(--fs-small); } .wb-lamps { gap: 4px; } .wb-lamp { width: 13px; height: 13px; } .wb-when b { font-size: var(--fs-body); } .wb-num { font-size: 68px; } }
/* Sponsors under the game: a quiet thank-you, logos at a modest size. */
.wb-sponsors { margin: 22px 16px 4px; }
.wb-sponsors-h { font: 700 var(--fs-small) var(--head); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.wb-sponsors ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.wb-sponsors li > * { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; color: inherit; text-decoration: none; background: #fff; }
.wb-sponsors img { width: 40px; height: 40px; object-fit: contain; flex: none; }
.wb-sponsors span { font-weight: 600; font-size: var(--fs-body); line-height: 1.2; overflow-wrap: anywhere; }
/* Hear each play: the board reads each new play aloud once a family turns it on (off on every visit). */
.btn.sm.wb-audio { margin-top: 10px; width: 100%; background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .35); font-size: var(--fs-body); }
.btn.sm.wb-audio[aria-pressed="true"] { background: var(--amber); color: var(--ink); border-color: var(--amber); }

/* Share with family: right under the score, on the board itself. White on the team color, flat. */
.wb-share { margin: 12px 0 10px; display: grid; justify-items: center; gap: 4px; text-align: center; }
.wb-share-b { min-height: 44px; padding: 10px 20px; border-radius: 999px; border: 2px solid currentColor; background: transparent; color: inherit; font: 700 var(--fs-body) var(--body); cursor: pointer; }
.wb-share-b:hover, .wb-share-b:focus-visible { background: rgba(255, 255, 255, .14); }
.wb-share-sub { margin: 0; font: 600 var(--fs-small) var(--body); opacity: .9; }
.wb-share-note { margin: 0; min-height: 0; font: 600 var(--fs-small) var(--body); } .wb-share-note:empty { display: none; }
.wb-status.stale { background: rgba(0, 0, 0, .28); border-color: transparent; opacity: 1; }
.wb-sample { margin: 0 0 10px; padding: 10px 14px; border-radius: 12px; background: #fff7d6; color: #14213a; font: 500 var(--fs-small)/1.4 var(--body); }

/* The TV scoreboard (watch.html?tv=1#token): one landscape screen, read from across the field. The five text sizes are the
   same tokens as everywhere, scaled to the screen's height so a 1080p TV and a 4K one read the same; only the run numerals
   (live scoreboard digits) go larger. Nothing to tap and no pointer. */
body.wb-tv { --fs-title: 5vh; --fs-section: 3.9vh; --fs-card: 3.2vh; --fs-body: 2.7vh; --fs-small: 2.2vh;
  margin: 0; height: 100vh; overflow: hidden; cursor: none; background: #0b1424; }
.wb-tv #app { max-width: none; height: 100vh; padding: 0; }
.wb-tv .wb-wait, .wb-tv .wb-waiting { height: 100vh; display: grid; place-content: center; text-align: center; color: #fff; background: var(--grass-deep); font-size: var(--fs-section); margin: 0; border-radius: 0; }
.wb-tv-screen { --field: var(--tc, var(--grass-deep)); --chalkline: var(--tc-ink, #fff); --lamp: var(--ta, var(--amber));
  position: relative; height: 100vh; display: grid; grid-template-rows: auto 1fr auto; gap: 2.4vh; padding: 3vh 3.2vw 2.4vh;
  background: var(--field); color: var(--chalkline); overflow: hidden; }
.wb-tv .wb-top { gap: 1.6vw; }
.wb-tv .wb-badge { width: 8vh; height: 8vh; border-radius: 1.6vh; font-size: var(--fs-section); }
.wb-tv .wb-title b { font-size: var(--fs-title); }
.wb-tv .wb-title span { font-size: var(--fs-small); }
.wb-tv .wb-status { font-size: var(--fs-body); padding: .8vh 1.4vw; gap: .8vw; border-width: 2px; }
.wb-tv .wb-dot { width: 1.4vh; height: 1.4vh; }
.wb-tv-clock { font: 700 var(--fs-section) var(--num); opacity: .85; font-variant-numeric: tabular-nums; margin-left: .6vw; }

.wb-tv-main { display: grid; grid-template-columns: 1.15fr 1fr; gap: 3vw; min-height: 0; }
.wb-tv-left { display: flex; flex-direction: column; gap: 1.8vh; min-width: 0; min-height: 0; }
.wb-tv-teams { display: grid; gap: 1.2vh; }
.wb-tv-team { display: grid; grid-template-columns: 1.6vw 1fr auto; align-items: center; gap: 1.2vw; padding: .6vh 1.6vw .6vh .8vw; border-radius: 1.6vh; background: rgba(0, 0, 0, .24); }
.wb-tv-team.up { box-shadow: inset 0 0 0 .4vh var(--lamp); }
.wb-tv-bat { width: 1.4vw; height: 1.4vw; border-radius: 50%; }
.wb-tv-team.up .wb-tv-bat { background: var(--lamp); box-shadow: 0 0 1.4vh var(--lamp); }
.wb-tv-name { font: 800 var(--fs-title)/1.05 var(--head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wb-tv .wb-tv-team .wb-num { font-size: 13vh; line-height: 1; min-width: 1.2em; text-align: right; }
.wb-tv-inning { margin: 0; display: flex; align-items: baseline; gap: 1.6vw; font: 800 var(--fs-title)/1 var(--head); }
.wb-tv-inning span { font-weight: 700; font-size: var(--fs-section); opacity: .9; }
.wb-tv .wb-count { justify-content: flex-start; gap: 3vw; margin: 0; }
.wb-tv .wb-lamps { gap: .9vw; }
.wb-tv .wb-lamp-label { font-size: var(--fs-card); margin-right: .4vw; }
.wb-tv .wb-lamp { width: 3.6vh; height: 3.6vh; }
.wb-tv .wb-lamp.on { box-shadow: 0 0 2.2vh .3vh var(--lamp); }
.wb-tv .wb-line-wrap { overflow: hidden; margin: 0; padding: 0; }
.wb-tv .wb-line { table-layout: auto; border-spacing: .5vh; font-size: var(--fs-card); }
.wb-tv .wb-line thead th { font-size: var(--fs-body); }
.wb-tv .wb-line tbody th { font-size: var(--fs-body); max-width: 9em; width: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wb-tv .wb-line td, .wb-tv .wb-line td.wb-total, .wb-tv .wb-line td.wb-he { height: 5vh; min-width: 4.4vh; border-radius: .8vh; }
.wb-tv .wb-line td.now { box-shadow: inset 0 0 0 .4vh var(--lamp); }
.wb-tv-last { margin: auto 0 0; padding: 1.4vh 1.4vw; border-radius: 1.4vh; background: rgba(0, 0, 0, .24); font: 600 var(--fs-card)/1.3 var(--body);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wb-tv-last b { display: block; font: 700 var(--fs-small)/1.2 var(--body); opacity: .8; }

.wb-tv-right { display: flex; flex-direction: column; justify-content: center; gap: 1.6vh; min-width: 0; min-height: 0; }
.wb-tv .wb-play-area { position: relative; margin: 0; padding: 0; border: 0; min-height: 0; }
.wb-tv .wb-field { max-width: none; width: 100%; max-height: 64vh; border-radius: 2vh; }
.wb-tv .wb-moment { top: 2vh; left: 6%; right: 6%; padding: 1.6vh 1.6vw; border-radius: 1.6vh; }
.wb-tv .wb-moment em { font-size: 8vh; }
.wb-tv .wb-moment b, .wb-tv .wb-moment.loud b { font-size: var(--fs-section); }
.wb-tv .wb-moment span { font-size: var(--fs-body); }
.wb-tv .wb-play-area .wb-burst { top: 30%; }
.wb-tv .wb-burst i { width: 1.4vh; height: 2vh; }
.wb-tv-arm { margin: 0; display: flex; justify-content: space-between; gap: 1vw; padding: 1.2vh 1.4vw; border-radius: 1.4vh; background: rgba(0, 0, 0, .24); font: 600 var(--fs-body) var(--body); }
.wb-tv-arm b { font-weight: 800; }
.wb-tv-recap { padding: 3vh 2vw; border-radius: 2vh; background: rgba(0, 0, 0, .24); }
.wb-tv-recap b { display: block; font: 800 var(--fs-title)/1.15 var(--head); margin-bottom: 1.4vh; }
.wb-tv-recap p { margin: 0; font: 500 var(--fs-card)/1.4 var(--body); display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }
.wb-tv-sponsors { display: flex; align-items: center; justify-content: center; gap: 2.4vw; font: 600 var(--fs-small) var(--body); opacity: .85; white-space: nowrap; overflow: hidden; }
.wb-tv-sponsors b { display: inline-flex; align-items: center; gap: .6vw; font-weight: 700; }
.wb-tv-sponsors img { height: 4vh; width: auto; border-radius: .6vh; background: #fff; padding: .3vh; }
.wb-tv-idle .wb-tv-rest { display: grid; place-content: center; text-align: center; }
.wb-tv-idle .wb-idle-line { margin: 0 0 2vh; font-size: 8vh; }
.wb-tv-idle .wb-idle-sub { max-width: 30em; font-size: var(--fs-section); }
.wb-tv-screen.wb-stale .wb-play-area, .wb-tv-screen.wb-stale .wb-count { opacity: .5; }
.wb-tv-main.solo { grid-template-columns: minmax(0, 62vw); justify-content: center; align-content: center; }

/* The TV board looks like the scoreboard on the outfield fence (Jason, Nov 27 2026: the team-color fill looked generic): a black
   board with lit amber numbers, green/amber/red count lamps, and the team's own colors as the header band and trim. */
.wb-tv-screen { --board: #07090a; --panel: #000; --rim: #23292c; --led: #ffb81c; --led-glow: rgba(255, 170, 20, .55); --ink-dim: #9aa3a8;
  background: radial-gradient(120% 80% at 50% 0%, #151a1d 0%, var(--board) 60%); color: #fff; padding-top: 0; }
.wb-tv-screen > .wb-top { margin: 0 -3.2vw; padding: 2vh 3.2vw; background: var(--field); color: var(--chalkline); border-bottom: .7vh solid var(--lamp); }
.wb-tv-screen .wb-status.live { background: #fff; color: #14181a; }
.wb-tv-team { background: var(--panel); border: .3vh solid var(--rim); border-radius: 1vh; box-shadow: inset 0 0 3vh rgba(255, 255, 255, .03); }
.wb-tv-team.up { box-shadow: inset 0 0 0 .4vh var(--lamp); border-color: transparent; }
.wb-tv-name { font-family: var(--num); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 6vh; }
.wb-tv .wb-tv-team .wb-num { font-family: var(--num); font-weight: 700; color: var(--led); text-shadow: 0 0 2.4vh var(--led-glow); font-size: 15vh; }
.wb-tv-inning { font-family: var(--num); text-transform: uppercase; letter-spacing: .04em; font-size: 6vh; }
.wb-tv-inning span { font-family: var(--num); font-size: 4.2vh; color: var(--ink-dim); }
.wb-tv-screen .wb-count { background: var(--panel); border: .3vh solid var(--rim); border-radius: 1vh; padding: 1.2vh 1.6vw; justify-content: space-between; }
.wb-tv .wb-lamp-label { font-family: var(--num); text-transform: uppercase; letter-spacing: .06em; font-size: 3.6vh; color: #fff; opacity: 1; }
.wb-tv .wb-lamp { background: #1a1f22; box-shadow: inset 0 .3vh .6vh rgba(0, 0, 0, .8); }
.wb-tv [aria-label^="Balls"] .wb-lamp.on { background: #3ee07f; box-shadow: 0 0 2.2vh .3vh rgba(62, 224, 127, .7); }
.wb-tv [aria-label^="Strikes"] .wb-lamp.on { background: var(--led); box-shadow: 0 0 2.2vh .3vh var(--led-glow); }
.wb-tv [aria-label^="Outs"] .wb-lamp.on { background: #ff4b3e; box-shadow: 0 0 2.2vh .3vh rgba(255, 75, 62, .7); }
.wb-tv-screen .wb-line { font-family: var(--num); font-size: 4.2vh; }
.wb-tv-screen .wb-line thead th { font-family: var(--num); color: var(--ink-dim); font-size: 3.2vh; }
.wb-tv-screen .wb-line tbody th { font-family: var(--num); text-transform: uppercase; letter-spacing: .03em; font-size: 3.4vh; opacity: 1; }
.wb-tv-screen .wb-line td { background: var(--panel); border: .2vh solid var(--rim); color: var(--led); text-shadow: 0 0 1.4vh var(--led-glow); }
.wb-tv-screen .wb-line td.wb-total { background: var(--panel); border-color: var(--led); color: var(--led); }
.wb-tv-screen .wb-line td.wb-he { color: #fff; text-shadow: none; }
.wb-tv-screen .wb-line td.now { box-shadow: inset 0 0 0 .4vh var(--lamp); }
.wb-tv-screen .wb-tv-last, .wb-tv-screen .wb-tv-arm, .wb-tv-screen .wb-tv-recap { background: var(--panel); border: .3vh solid var(--rim); }
.wb-tv-screen .wb-field { border: .3vh solid var(--rim); }
.wb-tv-screen .wb-tv-sponsors { color: var(--ink-dim); opacity: 1; }
.wb-tv-idle .wb-tv-rest { gap: 4vh; justify-items: center; }
.wb-tv-idle .wb-count { min-width: 60vw; }
/* Live screens carry more (count, line score, last play) beside the field, so the left side tightens up. */
.wb-tv-main:not(.solo) .wb-tv-team .wb-num { font-size: 12vh; }
.wb-tv-main:not(.solo) .wb-tv-name { font-size: 5.2vh; }
.wb-tv-main:not(.solo) .wb-tv-inning { font-size: 5vh; }
.wb-tv-main:not(.solo) .wb-tv-inning span { font-size: 3.6vh; }
.wb-tv-main:not(.solo) .wb-lamp-label { font-size: 3vh; }
.wb-tv-main:not(.solo) .wb-lamps { gap: .6vw; }
.wb-tv-main:not(.solo) .wb-lamp { width: 3vh; height: 3vh; }
.wb-tv-main:not(.solo) .wb-line { font-size: 3.6vh; }
.wb-tv-main:not(.solo) .wb-line tbody th { font-size: 3vh; }
.wb-tv-main:not(.solo) .wb-line td { height: 4.6vh; }
/* A clicker press on the TV box: the call shows for a moment as a banner across the top of the field (never over the score),
   and the count lamps pulse, so the umpire sees it landed. */
.wb-tv-flash { position: fixed; right: 3.2vw; width: 42vw; top: 20vh; z-index: 9; padding: 1.4vh 2vw; border-radius: 1.4vh; text-align: center;
  background: rgba(0, 0, 0, .9); border: .4vh solid #ffb81c; color: #ffb81c; font: 700 7vh/1 var(--num); text-transform: uppercase; letter-spacing: .08em;
  text-shadow: 0 0 2vh rgba(255, 170, 20, .6); animation: wb-tv-flash 1.1s ease both; pointer-events: none; }
.wb-tv-flash.bad { font: 600 var(--fs-card)/1.3 var(--body); color: #fff; text-shadow: none; border-color: #ff4b3e; text-transform: none; letter-spacing: 0; animation-duration: 2.6s; }
@keyframes wb-tv-flash { 0% { opacity: 0; transform: translateY(-1vh); } 12% { opacity: 1; transform: none; } 75% { opacity: 1; } 100% { opacity: 0; } }
.wb-tv-pressed .wb-tv-screen .wb-count { border-color: #ffb81c; box-shadow: 0 0 2.4vh rgba(255, 170, 20, .45); transition: box-shadow .2s, border-color .2s; }

/* The clicker's hidden catch box on the TV, and the key log shown with &keys=1 while setting up a streaming stick. */
.wb-tv-catch { position: fixed; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; border: 0; padding: 0; pointer-events: none; }
.wb-tv-keys { position: fixed; left: 1vw; bottom: 1vh; z-index: 10; margin: 0; padding: 1vh 1vw; background: rgba(0, 0, 0, .8); color: #fff; font: 600 2.2vh/1.3 monospace; border-radius: 1vh; pointer-events: none; white-space: pre; }
/* Watch on a TV (LC.tvCode): a quiet link under Share, then the code in white tiles on the board's colour. */
.wb-share .tv-code-wrap { display: grid; justify-items: center; margin-top: 6px; }
.wb-share .tv-code-wrap > * + * { margin-top: 8px; }
.wb-tv-b { background: none; border: 0; padding: 8px 4px; color: inherit; font: 600 var(--fs-small) var(--body); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.wb-share .tv-code-digits span { background: #fff; color: var(--grass-deep); }
.wb-share .tv-code-digits { justify-content: center; margin-bottom: 4px; }
.wb-share .tv-code-how { margin: 0; }
.wb-share .tv-code-wrap .muted { color: inherit; opacity: .85; margin: 0; }

@media (max-width: 540px) {
  .wb-board:not(.wb-idle) { padding-top: max(8px, env(safe-area-inset-top)); }
  .wb-board .wb-top:has(.wb-status) {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 4px 10px;
  }
  .wb-board .wb-top:has(.wb-back):has(.wb-status) {
    grid-template-columns: auto auto minmax(0, 1fr);
  }
  .wb-board .wb-status {
    grid-column: -2 / -1;
    justify-self: start;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .wb-board .wb-num { font-size: clamp(48px, 15vw, 60px); }
  .wb-board .wb-score { margin-block: 10px; }
}
