/* Original two-row, outlined broadcast scorebug — kept below plate actors. */
.broadcast-hud {
  left: 7.5%;
  right: 7.5%;
  bottom: 1.8%;
  grid-template:
    "score count matchup pitch" 7.4cqw / minmax(0, 1.17fr) minmax(0, 1.1fr)
    minmax(0, 1fr) minmax(0, 1fr);
  gap: 3px;
  filter: drop-shadow(0 3px 7px #0009);
  font-family: "Courier New", monospace;
}
.field[data-park="green-wall"] .broadcast-hud { grid-template-rows: 8.7cqw; }
.scoreboard {
  display: grid;
  grid-template: minmax(0, 0.6fr) repeat(2, minmax(0, 1fr)) / 1fr;
  border: 2px solid #60645e;
  border-radius: 2px;
  background: linear-gradient(115deg, #111715f5, #090e0ded);
  box-shadow: inset 0 0 0 1px #090b09, 0 0 0 2px #080c09b0;
  overflow: hidden;
}
.scorebug-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(3, 2.3cqw);
  align-items: center;
  gap: 4px;
  padding: 0 0.65cqw;
  background: #1b211d;
  border-bottom: 1px solid #50564e;
  color: #c5c8bc;
  font-size: clamp(6px, 1.15cqw, 20px);
  text-align: center;
}
.scorebug-header .inning {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  gap: 8px;
  background: none;
  padding: 0;
  white-space: nowrap;
}
.scorebug-header #game-time { display: none; }
.inning strong {
  font-size: clamp(7px, 1.25cqw, 22px);
  color: #d4d7cc;
}
.club {
  display: grid;
  grid-template-columns: 2.6cqw minmax(0, 1fr) repeat(3, 2.3cqw);
  gap: 4px;
  padding: 0 0.65cqw;
  border: 0;
  border-left: 3px solid var(--club);
  text-align: left;
  min-height: 0;
}
.club.home {
  background: linear-gradient(90deg, #631b2070, #161c1885);
  border-top: 1px solid #50564e;
}
.club.away { background: linear-gradient(90deg, #16344e80, #10171485); }
.team-mark {
  width: 2.65cqw;
  height: 2.65cqw;
  min-width: 14px;
  min-height: 14px;
  background: none;
  border-radius: 0;
  display: grid !important;
  place-items: center;
}
.team-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 1px 1px #000);
}
.team-mark b {
  font-size: 8px;
}
.team-mark [hidden] {
  display: none;
}
.club > div {
  display: flex;
  align-items: center;
  gap: 0.65cqw;
  overflow: hidden;
}
.club > div > span { display: none !important; }
.club > div > b {
  color: #edf5f7;
  font-size: clamp(8px, 1.8cqw, 30px);
  letter-spacing: 0.04em;
}
.club span:not(.team-mark) {
  font-size: clamp(6px, 1.65cqw, 28px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.club > strong {
  font-size: clamp(12px, 2.1cqw, 34px);
  text-align: center;
  color: #f2f0e6;
}
.club > .secondary-stat {
  text-align: center;
  color: #bbd2da;
}
.count-strip {
  display: grid;
  grid-template: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 0.3fr) / 1fr 7.3cqw;
  gap: 0 5px;
  padding: 0.3cqw 0.7cqw;
  border: 2px solid #60645e;
  border-radius: 2px;
  background: linear-gradient(145deg, #171c18f5, #090e0df5);
  font-size: clamp(7px, 1.05cqw, 12px);
}
.count-strip #count {
  grid-column: 1;
  grid-row: 1/3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-weight: 900;
  color: #fff;
  white-space: nowrap;
  font-size: clamp(7px, 1.5cqw, 22px);
}
.count-strip #count-value { font-size: clamp(9px, 2.9cqw, 48px); }
.count-strip #count small { font-size: clamp(6px, 1.35cqw, 22px); color: #b8c0b1; }
.count-strip #outs {
  grid-column: 2;
  grid-row: 2;
  text-align: center;
  font-size: clamp(7px, 1.3cqw, 22px);
}
.count-strip #bases {
  grid-column: 2;
  grid-row: 1/3;
  justify-self: center;
  align-self: center;
  transform: translateY(-0.9cqw);
  width: 5.3cqw;
  height: 4.5cqw;
}
.count-strip #bases span { width: 1.4cqw; height: 1.4cqw; }
@container (min-width: 501px) {
  .field:not([data-park="green-wall"]) .count-strip #bases {
    width: 4.8cqw;
    height: 3.8cqw;
    transform: translateY(-0.4cqw);
  }
}
.count-strip #base-text {
  display: none;
}
.count-strip #mode {
  grid-column: 1;
  grid-row: 3;
  text-align: center;
  margin: 0;
  color: #efd581;
  font-size: clamp(6px, 0.85cqw, 10px);
  white-space: nowrap;
}
.broadcast-hud .pitch-section {
  display: block;
  border: 2px solid #60645e;
  border-radius: 2px;
  background: linear-gradient(125deg, #1b211df5, #090e0df5);
  padding: 0.65cqw 0.8cqw;
  box-shadow: inset 0 1px #b3d2de26;
}
.broadcast-hud .section-heading {
  padding-bottom: 0.25cqw;
  border-bottom: 1px solid #607b884f;
  margin-bottom: 0.35cqw;
}
.broadcast-hud #velocity {
  color: #f2f0e6;
  font-weight: 900;
  font-size: clamp(8px, 1.8cqw, 30px);
}
.broadcast-hud .pitch-detail { height: 100%; gap: 1.1cqw; }
.broadcast-hud .pitch-readout {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35cqw;
  align-self: stretch;
}
.broadcast-hud .pitch-readout h3 {
  margin: 0;
  color: #c1c5b9;
  font-size: clamp(7px, 1.3cqw, 22px);
  letter-spacing: 0.06em;
}
.broadcast-hud .pitch-readout p {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.broadcast-hud .section-heading h3 {
  color: #bed8e3;
  letter-spacing: 0.1em;
}
.broadcast-hud .zone {
  width: 5.2cqw;
  height: 100%;
  max-height: none;
  background: radial-gradient(ellipse at bottom, #27352c, #0d160f);
  border: 1px solid #8fa9b8;
  box-shadow: inset 0 0 8px #0006;
}
.broadcast-hud .strike-zone {
  border-color: #e6eef5;
  background-color: #abcfe510;
}
.broadcast-hud #pitch-dot {
  background: #ffe293;
  border: 1px solid #fff;
  box-shadow: 0 0 5px #ffd972;
}
.broadcast-hud .pitch-detail strong {
  color: #73acdf;
  font-size: clamp(7px, 1.5cqw, 25px);
}
.tv-matchup {
  grid-area: matchup;
  min-width: 0;
  padding: 0.7cqw 0.9cqw;
  border: 2px solid #60645e;
  border-radius: 2px;
  background: linear-gradient(125deg, #1b211df5, #090e0df5);
}
.tv-matchup h3 {
  font-size: clamp(6px, 1.35cqw, 22px);
  margin: 0 0 0.55cqw;
  color: #aeb7a9;
}
.tv-matchup strong {
  display: block;
  font-size: clamp(7px, 1.55cqw, 25px);
  color: #f0f1e7;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tv-matchup p { margin: 0.6cqw 0 0; font-size: clamp(6px, 1cqw, 16px); color: #b4bcae; }
.tv-frame {
  padding: 10px;
  border: 8px solid #72502d;
  border-radius: 5px;
  background: #090d0b;
  box-shadow: inset 0 0 0 2px #b38c4e, 0 0 0 2px #211c12;
}
.fenway-preview { background: radial-gradient(ellipse at top, #183028, #060d09 75%); }
.fenway-preview .topbar { border: 0; padding: 10px 24px; }
.fenway-preview .topbar .back, .fenway-preview .settings,
.fenway-preview .schedule-heading, .fenway-preview .games,
.fenway-preview .game-detail, .fenway-preview .linescore-wrap,
.fenway-preview .source-line { display: none; }
.fenway-preview main { padding-top: 0; max-width: 1380px; }
.fenway-preview .broadcast { display: block; max-width: 100%; }
.fenway-preview .venue-line { padding-top: 0; }
@media (max-width: 760px) {
  .tv-frame { padding: 4px; border-width: 4px; }
}
.broadcast-hud .pitch-detail p {
  color: #b9cfdb;
}
@container (max-width:500px) {
  .scoreboard {
    grid-template: 6px minmax(0, 1fr) / repeat(2, minmax(0, 1fr));
  }
  .scorebug-header {
    grid-column: 1/-1;
  }
  .scorebug-header > span {
    display: none;
  }
  .broadcast-hud {
    left: 1.1%;
    right: 1.1%;
    gap: 2px;
    grid-template-areas: "score count pitch";
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.82fr) minmax(0, 0.9fr);
  }
  .tv-matchup { display: none; }
  .tv-frame { padding: 3px; border-width: 4px; }
  .club > div::before {
    display: none;
  }
  .club > div > b {
    font-size: 8px;
  }
  .club > div > span {
    display: none;
  }
  .secondary-stat {
    display: none !important;
  }
  .club {
    grid-template-columns: 10px minmax(0, 1fr) 10px;
    gap: 1px;
    padding: 0 2px;
  }
  .scorebug-header {
    grid-template-columns: minmax(0, 1fr);
    padding: 0 3px;
    font-size: 6px;
  }
  .scorebug-header .inning {
    gap: 0;
  }
  .inning strong {
    font-size: 6px;
  }
  .club > strong {
    font-size: 11px;
  }
  .team-mark {
    width: 10px;
    height: 12px;
    min-width: 10px;
    min-height: 12px;
  }
  .club.home {
    border-top: 0;
  }
  .count-strip {
    grid-template: repeat(3, minmax(0, 1fr)) / 1fr auto;
    padding: 1px 3px;
    font-size: 7px;
    gap: 0 2px;
  }
  .count-strip #count { font-size: 7px; }
  .count-strip #count-value { font-size: 8px; }
  .count-strip #count small { font-size: 5px; }
  .count-strip #outs { font-size: 5px; }
  .count-strip #bases { grid-row: 1/3; align-self: start; transform: none; }
  .count-strip #mode {
    font-size: 5px;
  }
  .count-strip #bases {
    width: 15px;
    height: 13px;
  }
  .count-strip #bases span { width: 5px; height: 5px; }
  .broadcast-hud .pitch-section {
    display: block;
    padding: 1px 3px;
  }
  .broadcast-hud .pitch-readout h3, .broadcast-hud .pitch-readout p { display: none; }
  .broadcast-hud #velocity {
    font-size: 7px;
  }
  .broadcast-hud .zone {
    width: 16px;
    max-height: none;
    height: 14px;
    min-height: 14px;
  }
  .broadcast-hud .pitch-detail strong {
    font-size: 6px;
  }
  .broadcast-hud .section-heading {
    margin-bottom: 1px;
  }
}
