/* intermission-report.css -- the live intermission report overlay
   (js/intermission-report.js) and its banner inside the Game Preview panel.
   The overlay reuses the site's .trend-modal-overlay / .trend-modal shell, so
   backdrop, z-index and the Close button match every other page; only the
   size and the tables are defined here. Sized for a laptop or an iPad held
   in the room between periods: big tap targets, tabular numbers, no
   horizontal page scroll (the table scrolls inside its own box instead). */

#intermission-overlay .ir-modal {
  font-family: 'Rubik', sans-serif;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  /* As wide as the screen allows (Noah, Oct 4: no sideways scrolling), up to
     a size where the widest tabs are comfortable. */
  width: min(1800px, 98vw);
  height: 94vh;
  max-height: 94vh;
  height: 94dvh;
  max-height: 94dvh;
  padding: 1.1rem 1.4rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.ir-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
}
.ir-title {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 1.35rem; font-weight: 700; letter-spacing: 0.02em; white-space: nowrap;
}
.ir-status { display: flex; flex-direction: column; min-width: 0; }
.ir-status-label { font-weight: 700; color: var(--oilers-orange); font-size: 1rem; }
.ir-status-meta { font-size: 0.78rem; color: var(--text2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ir-actions { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

.ir-btn {
  font: inherit; font-size: 0.85rem; font-weight: 600;
  min-height: 2.4rem; padding: 0 0.95rem;
  border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface2); color: var(--text); cursor: pointer;
}
.ir-btn:hover { border-color: var(--text3); }
.ir-btn-primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.ir-btn-primary:hover { background: var(--navy2); }
.ir-btn:disabled { opacity: 0.6; cursor: progress; }

/* ── Tabs ───────────────────────────────────────────────────────────────── */
.ir-tabs { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.ir-tab {
  font: inherit; font-size: 0.92rem; font-weight: 600;
  min-height: 2.6rem; padding: 0 1.1rem;
  border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text2); cursor: pointer;
}
.ir-tab.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.ir-key { font-size: 0.78rem; color: var(--text3); }
.ir-note { min-height: 1.1rem; font-size: 0.82rem; color: var(--text2); }
.ir-note:empty { min-height: 0; }

/* ── Tables ─────────────────────────────────────────────────────────────── */
.ir-content { flex: 1 1 auto; min-height: 0; overflow: auto; }
.ir-table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 0.9rem; }
.ir-table th, .ir-table td { padding: 0.32rem 0.5rem; text-align: center; white-space: nowrap; }
.ir-band th { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding-top: 0.55rem; }
.ir-band th:first-child { border-top-left-radius: 8px; }
.ir-band th:last-child { border-top-right-radius: 8px; }
.ir-band-team { text-align: left !important; font-size: 1rem !important; }
.ir-band-team .ir-logo { margin-right: 0.55rem; vertical-align: middle; }
.ir-sub th {
  font-size: 0.72rem; font-weight: 700; color: var(--text2); text-transform: uppercase;
  border-bottom: 1px solid var(--border); background: var(--surface);
  position: sticky; top: 0; z-index: 1;
}
.ir-table tbody td { border-bottom: 1px solid var(--grid); }
.ir-table tbody tr:nth-child(even) td { background: var(--surface2); }
.ir-table tbody.ir-sep tr:first-child td { border-top: 3px solid var(--navy); }
.ir-table tbody:first-of-type tr:first-child td { border-top: none; }
.ir-num { font-weight: 500; min-width: 2.6rem; }
.ir-gf { color: #1e8a3a; font-weight: 700; }
.ir-ga { color: #c01c1c; font-weight: 700; }
.ir-empty { color: var(--text3); font-style: italic; padding: 0.8rem !important; }
.ir-vs { color: var(--text3); font-weight: 700; font-size: 0.75rem; padding: 0 0.15rem !important; }

.ir-chips { display: flex; gap: 0.3rem; }
.ir-chip {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 0.4rem;
  min-width: 8.2rem; padding: 0.28rem 0.35rem 0.28rem 0.6rem;
  border-radius: 6px; font-weight: 700; font-size: 0.78rem; letter-spacing: 0.02em;
}
.ir-matchups .ir-chip { min-width: 0; padding-left: 0.45rem; font-size: 0.74rem; }
.ir-matchups .ir-chips { gap: 0.22rem; }
.ir-matchups th, .ir-matchups td { padding-left: 0.32rem; padding-right: 0.32rem; }
.ir-matchups .ir-pill { min-width: 3.6rem; }
.ir-matchups .ir-pctcell { min-width: 3.9rem; }
.ir-chip-name { overflow: hidden; text-overflow: ellipsis; }
.ir-chip-num { font-size: 0.9em; opacity: 0.8; margin-right: 0.3em; }
.ir-chip-sog {
  min-width: 1.1rem; padding: 0 0.25rem; border-radius: 4px; text-align: center;
  background: rgba(255, 255, 255, 0.25); font-size: 0.7rem;
}
.ir-pctcell { min-width: 4.6rem; }
.ir-pill {
  display: inline-block; min-width: 4.1rem; padding: 0.16rem 0.4rem; border-radius: 5px;
  color: #fff; font-weight: 700; font-size: 0.8rem;
}
.ir-pill-na { background: var(--surface2); color: var(--text3); }
.ir-logo { display: inline-block; width: 1.7rem; height: 1.7rem; background-size: contain; background-repeat: no-repeat; background-position: center; flex: none; }

.ir-empty-state { max-width: 38rem; margin: 3rem auto; text-align: center; color: var(--text2); line-height: 1.5; }

/* ── Banner inside the Game Preview ─────────────────────────────────────── */
.gp-panel .ir-banner {
  display: flex; align-items: center; gap: 0.7rem;
  margin: 0.6rem 0 0.2rem; padding: 0.55rem 0.75rem;
  border: 1px solid var(--border); border-left: 4px solid var(--oilers-orange);
  border-radius: 8px; background: var(--surface2);
}
.gp-panel .ir-banner.ir-banner-final { border-left-color: var(--navy); }
.ir-banner-text { flex: 1 1 auto; font-size: 0.88rem; min-width: 0; }
.ir-live-dot {
  width: 0.6rem; height: 0.6rem; border-radius: 50%; background: #d11f1f; flex: none;
  animation: ir-pulse 1.6s ease-in-out infinite;
}
@keyframes ir-pulse { 50% { opacity: 0.35; } }

/* iPad landscape and narrower laptops: the match-up rows carry five or six
   chips plus nine stat columns, so tighten them to fit without a sideways
   scroll. */
@media (max-width: 1100px) {
  .ir-matchups .ir-chip { font-size: 0.68rem; padding: 0.24rem 0.3rem 0.24rem 0.38rem; gap: 0.25rem; }
  .ir-matchups th, .ir-matchups td { padding-left: 0.22rem; padding-right: 0.22rem; font-size: 0.82rem; }
  .ir-matchups .ir-pill { min-width: 3.1rem; font-size: 0.74rem; padding: 0.14rem 0.25rem; }
  .ir-matchups .ir-pctcell { min-width: 3.3rem; }
  .ir-matchups .ir-num { min-width: 2rem; }
  .ir-chip { min-width: 7rem; }
  /* jersey numbers (Oct 5) cost ~30px on the widest match-up rows at 1024 */
  .ir-matchups .ir-chips { gap: 0.16rem; }
  .ir-matchups .ir-chip { padding-left: 0.28rem; padding-right: 0.24rem; gap: 0.18rem; font-size: 0.66rem; }
  .ir-matchups .ir-chip-num { margin-right: 0.22em; }
  .ir-matchups .ir-chip-sog { min-width: 0.95rem; padding: 0 0.18rem; }
}

/* iPad portrait: let a unit's chips wrap onto two rows rather than push the
   numbers off the side. Phones still scroll the table inside its box. */
@media (max-width: 900px) {
  .ir-chips { flex-wrap: wrap; }
  .ir-chip, .ir-matchups .ir-chip { min-width: 0; font-size: 0.7rem; }
  .ir-table th, .ir-table td { padding-left: 0.25rem; padding-right: 0.25rem; }
  .ir-pill { min-width: 3.3rem; font-size: 0.74rem; }
  .ir-pctcell { min-width: 3.5rem; }
  .ir-num { min-width: 1.9rem; }
}

@media (max-width: 760px) {
  /* dvh: the height actually visible on a phone (100vh runs under Safari's toolbar). */
  #intermission-overlay .ir-modal { width: 100vw; height: 100vh; max-height: 100vh; height: 100dvh; max-height: 100dvh; border-radius: 0; padding: 0.8rem 1rem; }
  .ir-head { grid-template-columns: 1fr; gap: 0.4rem; }
  .ir-actions { justify-content: flex-start; }
  .gp-panel .ir-banner { flex-wrap: wrap; }
}

/* ── Recap Match-ups button and printing ─────────────────────────────────── */
.ir-print-btn {
  font: inherit; font-family: 'Rubik', sans-serif; font-size: 0.66rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
  padding: 0.22rem 0.6rem; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--navy); background: var(--navy); color: #fff;
}
.ir-print-btn:hover { background: var(--navy2); }
.ir-print-btn:disabled { opacity: 0.6; cursor: progress; }

#ir-print-root { display: none; }

@media print {
  body.ir-printing { background: #fff !important; }
  body.ir-printing > *:not(#ir-print-root) { display: none !important; }
  body.ir-printing #ir-print-root {
    display: block;
    font-family: 'Rubik', sans-serif; color: #111; font-variant-numeric: tabular-nums;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  #ir-print-root .ir-print-page { break-after: page; page-break-after: always; }
  #ir-print-root .ir-print-page:last-child { break-after: auto; page-break-after: auto; }
  #ir-print-root .ir-band th { font-size: 9pt; }
  #ir-print-root .ir-band-team { font-size: 13pt !important; }
  #ir-print-root .ir-print-head {
    display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto;
    align-items: end; margin-bottom: 3mm; border-bottom: 2px solid #00205B; padding-bottom: 2mm;
  }
  #ir-print-root .ir-print-kicker { font-size: 9pt; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #444; }
  #ir-print-root .ir-print-title { font-size: 22pt; font-weight: 800; color: #00205B; text-transform: uppercase; letter-spacing: 0.02em; grid-row: 2; }
  #ir-print-root .ir-print-game { grid-column: 2; grid-row: 1 / span 2; display: flex; align-items: center; gap: 2mm; font-size: 13pt; font-weight: 700; }
  #ir-print-root .ir-print-date { font-size: 9pt; font-weight: 500; color: #444; margin-left: 2mm; }
  #ir-print-root .ir-logo { width: 9mm; height: 9mm; }
  #ir-print-root .ir-table { font-size: 11pt; }
  #ir-print-root .ir-table th, #ir-print-root .ir-table td { padding: 1.9mm 1.6mm; }
  #ir-print-root .ir-sub th { position: static; }
  #ir-print-root .ir-chip { min-width: 0; font-size: 9pt; padding: 1.1mm 1.2mm 1.1mm 2mm; }
  #ir-print-root .ir-chips { flex-wrap: nowrap; }
  #ir-print-root .ir-pill { min-width: 16mm; font-size: 9.5pt; }
  #ir-print-root tr { break-inside: avoid; }
  #ir-print-root .ir-print-foot { margin-top: 3mm; font-size: 8.5pt; color: #555; }
}

/* ── DJ Stats tab ────────────────────────────────────────────────────────── */
.ir-dj-note {
  margin: 0 0 0.7rem; padding: 0.55rem 0.8rem; border-radius: 8px;
  background: var(--surface2); border-left: 4px solid var(--navy);
  font-size: 0.86rem; color: var(--text);
}
.ir-table.ir-dj { max-width: 900px; margin: 0 auto; font-size: 1rem; }
.ir-dj th.ir-dj-team { width: 32%; padding: 0.6rem 0.8rem; font-size: 0.95rem; font-weight: 700; text-align: center; }
.ir-dj th.ir-dj-team .ir-logo { vertical-align: middle; margin-right: 0.45rem; }
.ir-dj th.ir-dj-label-head { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text2); background: var(--surface); }
.ir-dj td { padding: 0.6rem 0.8rem; }
.ir-dj td.ir-dj-label { font-weight: 600; color: var(--text); }
.ir-dj td.ir-dj-val { font-weight: 700; font-size: 1.05rem; }
.ir-dj td.ir-dj-better { background: #cdebd3 !important; color: #145c2a; }
.ir-dj td.ir-dj-worse { background: #f3cccc !important; color: #8f0e0e; }
@media print {
  #ir-print-root .ir-dj-note { font-size: 9.5pt; }
  #ir-print-root .ir-table.ir-dj { font-size: 12pt; max-width: none; }
  #ir-print-root .ir-dj td { padding: 2.6mm 3mm; }
}

/* ── Team Stats tab (NHL Event Summary, per period) ─────────────────────── */
.ir-ts-note { margin: 0 0 0.6rem; padding: 0.45rem 0.7rem; border-radius: 8px; background: var(--surface2); font-size: 0.85rem; color: var(--text2); }
.ir-ts-summary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; margin-bottom: 1rem; align-items: start; }
.ir-ts-sum { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.86rem; }
.ir-ts-sum th, .ir-ts-sum td { padding: 0.28rem 0.5rem; text-align: center; white-space: nowrap; }
.ir-ts-sum tbody th { text-align: left; font-weight: 600; color: var(--text); }
.ir-ts-sum tbody td { border-bottom: 1px solid var(--grid); font-weight: 500; }
.ir-ts-sum .ir-ts-section th { background: var(--surface2); font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text2); padding-top: 0.4rem; }
.ir-ts-sum .ir-ts-sub th { padding-left: 1.2rem; font-weight: 500; color: var(--text2); }
.ir-ts-sum .ir-band th:first-child { border-top-left-radius: 8px; }
.ir-ts-sum .ir-band th:last-child { border-top-right-radius: 8px; }
.ir-ts-carry { font-size: 0.72rem; color: var(--text3); font-weight: 600; }
.ir-ts-tabs { display: flex; gap: 0.35rem; flex-wrap: wrap; margin: 0.2rem 0 0.6rem; }
.ir-ts-tabs .ir-tab { min-height: 2.2rem; padding: 0 0.95rem; font-size: 0.85rem; }
.ir-ts-players { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.8rem; margin-bottom: 1rem; }
.ir-ts-players th, .ir-ts-players td { padding: 0.22rem 0.32rem; text-align: center; white-space: nowrap; }
.ir-ts-players .ir-band th { font-size: 0.72rem; }
.ir-ts-players .ir-band th:first-child { border-top-left-radius: 8px; }
.ir-ts-players .ir-band th:last-child { border-top-right-radius: 8px; }
.ir-ts-players .ir-sub th { font-size: 0.68rem; position: sticky; top: 0; z-index: 1; }
.ir-ts-players td.ir-ts-name, .ir-ts-players th.ir-ts-name { text-align: left; }
.ir-ts-players tbody td { border-bottom: 1px solid var(--grid); }
.ir-ts-players tbody tr:nth-child(even) td { background: var(--surface2); }
.ir-ts-players tr.ir-ts-d:not(.ir-ts-d + .ir-ts-d) td { border-top: 2px solid var(--navy); }
.ir-ts-players tr.ir-ts-g:not(.ir-ts-g + .ir-ts-g) td { border-top: 2px solid var(--navy); }
.ir-ts-players tr.ir-ts-total td { font-weight: 700; border-top: 2px solid var(--navy); background: var(--surface) !important; }
@media (max-width: 1100px) { .ir-ts-summary { grid-template-columns: 1fr; } }
@media print {
  #ir-print-root .ir-ts-summary { gap: 4mm; margin-bottom: 3mm; }
  #ir-print-root .ir-ts-sum { font-size: 8pt; }
  #ir-print-root .ir-ts-sum th, #ir-print-root .ir-ts-sum td { padding: 0.5mm 1.2mm; }
  #ir-print-root .ir-ts-players { font-size: 6.8pt; margin-bottom: 2mm; }
  #ir-print-root .ir-ts-players th, #ir-print-root .ir-ts-players td { padding: 0.35mm 0.9mm; }
  #ir-print-root .ir-ts-players .ir-sub th { position: static; }
  #ir-print-root .ir-print-ts .ir-ts-players { break-inside: avoid; }
  /* Page 1: both teams' summaries side by side (the 1100px stacking rule
     matches a printed page too); the player tables start on the next page. */
  #ir-print-root .ir-ts-summary { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); break-inside: avoid; }
  #ir-print-root .ir-print-ts .ir-ts-sum { font-size: 10pt; }
  #ir-print-root .ir-print-ts .ir-ts-sum th, #ir-print-root .ir-print-ts .ir-ts-sum td { padding: 1.1mm 1.4mm; }
  #ir-print-root .ir-print-ts .ir-ts-sum .ir-band-team { font-size: 12pt !important; white-space: normal; }
  /* Half a landscape page is ~125mm: with an OT column the faceoff cells
     ("14-22 / 64%") overflowed it, so the % goes under the won-total and
     cells may wrap. */
  #ir-print-root .ir-print-ts .ir-ts-sum td { white-space: normal; }
  #ir-print-root .ir-print-ts .ir-ts-sum { table-layout: fixed; }
  #ir-print-root .ir-print-ts .ir-ts-sum thead th:first-child { width: 34%; }
  #ir-print-root .ir-print-ts .ir-ts-fopct,
  #ir-print-root .ir-print-ts .ir-ts-carry { display: block; font-size: 7.5pt; color: #555; line-height: 1.1; }
  #ir-print-root .ir-ts-sum { break-inside: avoid; }
  #ir-print-root .ir-print-ts .ir-ts-wrap { break-inside: avoid; }
  #ir-print-root .ir-print-ts .ir-ts-summary + .ir-ts-wrap { break-before: page; }
}

/* Team Stats: faint column rules, sortable player-table headers */
.ir-ts-players th + th, .ir-ts-players td + td,
.ir-ts-sum th + th, .ir-ts-sum td + td,
.ir-ts-sum tbody th + td { border-left: 1px solid var(--grid); }
.ir-ts-players .ir-band th + th, .ir-ts-sum .ir-band th + th { border-left-color: rgba(255, 255, 255, 0.18); }
.ir-ts-players th.ir-ts-sortable { cursor: pointer; user-select: none; }
.ir-ts-players th.ir-ts-sortable:hover { color: var(--text); }
.ir-ts-players th.ir-ts-sorted { color: var(--accent); }
@media print { #ir-print-root .ir-ts-players td + td, #ir-print-root .ir-ts-players th + th { border-left: 0.2mm solid #d6d6d0; } }
.ir-ts-players tbody tr.ir-ts-star td { background: #ffe680 !important; color: #1a1a1a; }
.ir-ts-players tbody tr.ir-ts-star td.ir-ts-name { font-weight: 700; }
@media print {
  #ir-print-root .ir-ts-players tbody tr.ir-ts-star td {
    background: #ffe066 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
}

/* Narrower laptops: tighten Team Stats so both summaries and all 25 player
   columns fit without a sideways scroll. */
@media (max-width: 1440px) {
  .ir-ts-summary { gap: 0.6rem; }
  .ir-ts-sum { font-size: 0.8rem; }
  .ir-ts-sum th, .ir-ts-sum td { padding: 0.24rem 0.3rem; }
  .ir-ts-players { font-size: 0.74rem; }
  .ir-ts-players th, .ir-ts-players td { padding: 0.2rem 0.22rem; }
}

/* Phone-only pieces of the Team Stats player tables (css/mobile.css shows them). */
.ir-ts-title { display: none; }

/* Ice Tilt tab (NHL EDGE) */
.ir-tilt { max-width: 640px; margin: 0.5rem auto; }
.ir-tilt-kicker { font-size: 0.78rem; color: var(--text2); margin-bottom: 0.2rem; }
.ir-tilt-lead { display: flex; align-items: baseline; gap: 0.9rem; flex-wrap: wrap; margin-bottom: 0.3rem; }
.ir-tilt-lead strong { font-size: 1.3rem; }
.ir-tilt-lead span { font-size: 0.85rem; color: var(--text2); }
.ir-tilt-table { width: 100%; border-collapse: collapse; margin-top: 0.8rem; font-size: 0.9rem; }
.ir-tilt-table th, .ir-tilt-table td { padding: 0.4rem 0.5rem; text-align: center; border-bottom: 1px solid var(--grid); white-space: nowrap; }
.ir-tilt-table thead th { font-size: 0.75rem; color: var(--text2); font-weight: 600; }
.ir-tilt-table tbody th { text-align: left; font-weight: 600; }
.ir-tilt-total td, .ir-tilt-total th { font-weight: 700; }
.ir-tilt-per th { padding-left: 1.2rem; color: var(--text2); font-weight: 500; }
.ir-tilt-sig { color: var(--text2); }
.ir-tilt-foot { font-size: 0.72rem; color: var(--text2); margin-top: 0.6rem; }
.ir-tilt-toggle { display: flex; gap: 0.35rem; margin-bottom: 0.7rem; }
#intermission-overlay .ir-tilt-toggle .ir-btn.active { background: var(--navy, #00205B); color: #fff; border-color: var(--navy, #00205B); }
.ir-tilt-pct { color: var(--text2); }
/* Ice Tilt printed page: All Strengths and 5v5 side by side */
.ir-tilt-print { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6mm; }
.ir-tilt-print-label { font-weight: 700; font-size: 0.95rem; margin-bottom: 0.3rem; }
@media print {
  #ir-print-root .ir-tilt-print { break-inside: avoid; }
  #ir-print-root .ir-tilt-print .ir-tilt-table { font-size: 10pt; margin-top: 0; }
  #ir-print-root .ir-tilt-print .ir-tilt-table th, #ir-print-root .ir-tilt-print .ir-tilt-table td { padding: 1.4mm 1.2mm; }
  #ir-print-root .ir-tilt-print .ir-tilt-table thead th { font-size: 8pt; white-space: normal; }
  #ir-print-root .ir-tilt-print-label { font-size: 11pt; }
  #ir-print-root .ir-tilt-foot { font-size: 8pt; margin-top: 4mm; color: #444; }
}
.ir-tiltcell { white-space: nowrap; }
/* Lines & Pairs with the two 5v5 tilt columns: up to ~1300px wide, let a
   unit's chips wrap onto two rows, tighten the cells and put a tilt cell's
   significant time under it, so nothing scrolls sideways (1024px included). */
@media (max-width: 1300px) {
  .ir-table.ir-has-tilt .ir-chips { flex-wrap: wrap; }
  .ir-table.ir-has-tilt .ir-chip { min-width: 0; }
  .ir-table.ir-has-tilt th, .ir-table.ir-has-tilt td { padding-left: 0.28rem; padding-right: 0.28rem; }
  .ir-table.ir-has-tilt .ir-pill { min-width: 3.3rem; }
  .ir-table.ir-has-tilt .ir-tiltcell .ir-tilt-sig { display: block; font-size: 0.78em; }
}

/* Intermission View (IV_USERS only): one team's player table, full screen,
   sized to the viewport so nobody has to zoom. */
.ir-iv-open {
  margin-left: 0.8rem; padding: 0.15rem 0.6rem; font-size: 0.72rem; vertical-align: middle;
  text-transform: none; letter-spacing: 0; background: #fff; color: var(--navy, #00205B); border-color: #fff;
}
#ir-iv {
  display: none; position: fixed; inset: 0; z-index: 100000; background: var(--bg, #f5f5f0);
  flex-direction: column; padding: 1.2vh 1.2vw; box-sizing: border-box;
  font-size: min(2.3vh, 1.5vw);
}
#ir-iv.visible { display: flex; }
#ir-iv .ir-iv-body { flex: 1 1 auto; min-height: 0; display: flex; }
#ir-iv .ir-iv-table { height: 100%; margin: 0; font-size: 1em; }
#ir-iv .ir-iv-table th, #ir-iv .ir-iv-table td { padding: 0 0.5em; }
#ir-iv .ir-iv-table .ir-band th { font-size: 1em; padding: 0.35em 0.5em; }
#ir-iv .ir-iv-table .ir-band-team { font-size: 1.15em !important; }
#ir-iv .ir-iv-table .ir-sub th { font-size: 0.8em; position: static; }
#ir-iv .ir-iv-bar { display: flex; align-items: center; justify-content: center; gap: 1em; padding-top: 0.8vh; font-size: 0.75em; color: var(--text2); }
#ir-iv .ir-iv-nav, #ir-iv .ir-iv-close {
  font: inherit; padding: 0.2em 0.9em; border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface, #fff); color: var(--text); cursor: pointer;
}
#ir-iv .ir-iv-nav:disabled { opacity: 0.35; cursor: default; }
#ir-iv .ir-iv-close { margin-left: 2em; }
@media print { #ir-iv, .ir-iv-open { display: none !important; } }
