:root {
  color-scheme: dark;
  --bg: #0b1022;
  --panel: #121735;
  --panel-strong: #1a2050;
  --text: #f7f9ff;
  --muted: #b9c0d9;
  --line: rgba(255, 255, 255, 0.13);
  --neutral: #31276a;
  --neutral-2: #43368d;
  --drawn: #19b66a;
  --latest: #f6c343;
  --danger: #da3f5b;
  --focus: #78d7ff;
  --shadow: 0 20px 55px rgba(0, 0, 0, 0.32);
  --radius: 8px;
  --font: Arial, Helvetica, sans-serif;
}

body.light-theme {
  color-scheme: light;
  --bg: #eef3f9;
  --panel: #ffffff;
  --panel-strong: #e8edf8;
  --text: #10182f;
  --muted: #4b5572;
  --line: rgba(16, 24, 47, 0.15);
  --neutral: #d9ddf4;
  --neutral-2: #c7ccef;
  --drawn: #087f4a;
  --latest: #d49405;
  --danger: #c82f4f;
  --shadow: 0 16px 45px rgba(35, 48, 80, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at top left, rgba(39, 172, 194, 0.18), transparent 30rem),
    linear-gradient(135deg, #090d1f 0%, var(--bg) 55%, #16112a 100%);
  color: var(--text);
  font-family: var(--font);
  transition: background 220ms ease, color 220ms ease;
}

body.light-theme {
  background:
    radial-gradient(circle at top left, rgba(19, 139, 165, 0.18), transparent 28rem),
    linear-gradient(135deg, #f5f8fc 0%, var(--bg) 55%, #e9edf7 100%);
}

html.modal-open,
body.modal-open {
  overflow: hidden;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

button,
select,
input {
  font: inherit;
}

button:focus-visible,
select:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 4px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -5rem;
  left: 1rem;
  z-index: 10;
  background: var(--latest);
  color: #121212;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 1rem;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(15.5rem, 22.5rem) minmax(0, 1fr);
  gap: clamp(0.65rem, 1.2vw, 1rem);
  min-height: calc(100vh - 2.15rem);
  padding: clamp(0.55rem, 1.2vw, 1rem);
}

.caller-panel,
.board-section {
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.caller-panel {
  display: grid;
  align-content: start;
  gap: clamp(0.55rem, 1vw, 0.8rem);
  padding: clamp(0.7rem, 1.1vw, 1rem);
  min-width: 0;
  overflow: hidden;
}

.caller-panel > * {
  min-width: 0;
  max-width: 100%;
}

.brand-block {
  display: flex;
  gap: 0.85rem;
  align-items: center;
}

.brand-block > div {
  min-width: 0;
}

.account-quick-button {
  margin-left: auto;
  min-height: 2.55rem;
  padding: 0 0.7rem;
  gap: 0.35rem;
  border-color: color-mix(in srgb, var(--focus) 28%, var(--line));
}

.account-quick-button.account-connected {
  border-color: color-mix(in srgb, var(--drawn) 48%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--panel-strong) 78%, var(--drawn)), var(--panel-strong));
}

.account-quick-button .button-icon {
  flex: 0 0 auto;
}

.account-quick-button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-controls-button,
.mobile-controls-button:not([hidden]) {
  display: none;
}

.mobile-controls-button[hidden] {
  display: none !important;
}

.mobile-controls-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.mobile-compact .mobile-brand-prefix {
  display: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: clamp(3.1rem, 4.3vw, 3.75rem);
  aspect-ratio: 1;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #2bb2c0, #693dd0);
  color: #fff;
  font-weight: 900;
  letter-spacing: 0;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(1.7rem, 2.4vw, 2.45rem);
  line-height: 1;
}

.brand-block p,
.board-heading p,
.stat-label,
.auto-panel label {
  color: var(--muted);
}

.plan-badge {
  display: inline-grid;
  place-items: center;
  min-height: 1.25rem;
  margin-top: 0.25rem;
  padding: 0 0.45rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel-strong) 78%, transparent);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.current-ball {
  display: grid;
  grid-template-columns: minmax(3.2rem, auto) minmax(0, 1fr);
  align-items: center;
  justify-items: center;
  gap: 0.35rem 0.65rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: clamp(10.4rem, 23vh, 13rem);
  padding: clamp(0.7rem, 1vw, 0.9rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--panel-strong), color-mix(in srgb, var(--panel) 80%, #000));
  transition: background 280ms ease, border-color 280ms ease, box-shadow 280ms ease;
  box-sizing: border-box;
  overflow: hidden;
}

.current-ball.ball-b {
  background: linear-gradient(150deg, rgba(31, 136, 229, 0.32), var(--panel-strong) 48%, rgba(31, 136, 229, 0.18));
  border-color: rgba(96, 178, 255, 0.62);
  box-shadow: 0 16px 42px rgba(31, 136, 229, 0.2);
}

.current-ball.ball-i {
  background: linear-gradient(150deg, rgba(137, 82, 224, 0.34), var(--panel-strong) 48%, rgba(137, 82, 224, 0.18));
  border-color: rgba(178, 140, 255, 0.62);
  box-shadow: 0 16px 42px rgba(137, 82, 224, 0.22);
}

.current-ball.ball-n {
  background: linear-gradient(150deg, rgba(222, 63, 124, 0.34), var(--panel-strong) 48%, rgba(222, 63, 124, 0.16));
  border-color: rgba(255, 139, 184, 0.62);
  box-shadow: 0 16px 42px rgba(222, 63, 124, 0.2);
}

.current-ball.ball-g {
  background: linear-gradient(150deg, rgba(219, 123, 27, 0.36), var(--panel-strong) 48%, rgba(219, 123, 27, 0.16));
  border-color: rgba(255, 177, 88, 0.66);
  box-shadow: 0 16px 42px rgba(219, 123, 27, 0.2);
}

.current-ball.ball-o {
  background: linear-gradient(150deg, rgba(8, 127, 104, 0.38), var(--panel-strong) 48%, rgba(25, 182, 106, 0.16));
  border-color: rgba(78, 220, 167, 0.62);
  box-shadow: 0 16px 42px rgba(25, 182, 106, 0.2);
}

.current-letter {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  max-width: 100%;
  width: clamp(3.55rem, 6vw, 5.25rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--latest);
  color: #16120a;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  font-weight: 900;
  transition: background 280ms ease, color 280ms ease, box-shadow 280ms ease;
}

.current-ball.ball-b .current-letter { background: #1f88e5; color: #ffffff; box-shadow: 0 0 0 0.2rem rgba(31, 136, 229, 0.22); }
.current-ball.ball-i .current-letter { background: #8952e0; color: #ffffff; box-shadow: 0 0 0 0.2rem rgba(137, 82, 224, 0.22); }
.current-ball.ball-n .current-letter { background: #de3f7c; color: #ffffff; box-shadow: 0 0 0 0.2rem rgba(222, 63, 124, 0.22); }
.current-ball.ball-g .current-letter { background: #db7b1b; color: #ffffff; box-shadow: 0 0 0 0.2rem rgba(219, 123, 27, 0.22); }
.current-ball.ball-o .current-letter { background: #087f68; color: #ffffff; box-shadow: 0 0 0 0.2rem rgba(8, 127, 104, 0.22); }

#prize-name,
#prize-note,
#winner-name,
#tie-name {
  text-transform: uppercase;
}

.current-number {
  display: block;
  width: 100%;
  min-width: 0;
  color: var(--latest);
  font-size: clamp(4.7rem, 10vw, 9.1rem);
  line-height: 0.82;
  text-align: center;
  text-shadow: 0 8px 22px rgba(246, 195, 67, 0.25);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.current-label {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 1.1rem;
  text-align: center;
}

.current-ball.pulse {
  animation: latestPulse 520ms ease-out;
}

@keyframes latestPulse {
  0% { transform: scale(0.985); box-shadow: 0 0 0 rgba(246, 195, 67, 0); }
  55% { transform: scale(1.01); box-shadow: 0 0 0 0.5rem rgba(246, 195, 67, 0.18); }
  100% { transform: scale(1); box-shadow: 0 0 0 rgba(246, 195, 67, 0); }
}

.stats-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.stats-panel div,
.recent-panel,
.auto-panel,
.tie-summary-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--panel-strong) 78%, transparent);
  padding: 0.65rem;
}

.stats-panel div {
  display: grid;
  place-items: center;
  min-height: 4.5rem;
  text-align: center;
}

.stat-label {
  color: var(--muted);
  font-size: clamp(0.86rem, 1.35vw, 1rem);
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.stats-panel strong {
  display: block;
  margin-top: 0.25rem;
  font-size: clamp(1.45rem, 2.2vw, 1.85rem);
  line-height: 1;
}

.recent-panel h2,
.board-heading h2 {
  font-size: 1.05rem;
}

.recent-panel h2 {
  margin-bottom: 0.2rem;
  text-align: center;
  font-size: clamp(1.08rem, 1.55vw, 1.24rem);
  font-weight: 900;
}

.recent-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.45rem;
  min-height: 3.45rem;
  margin: 0.7rem 0 0;
  padding: 0;
  list-style: none;
}

.recent-list li {
  display: grid;
  place-items: center;
  gap: 0.14rem;
  min-height: 3.55rem;
  padding: 0.45rem 0.3rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--neutral);
  color: var(--text);
  font-weight: 800;
  line-height: 1;
  box-shadow: inset 0 -0.25rem 0 rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.recent-letter {
  font-size: clamp(0.7rem, 1.05vw, 0.82rem);
  font-weight: 900;
  opacity: 0.92;
}

.recent-number {
  font-size: clamp(1.38rem, 2.35vw, 1.78rem);
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.recent-list li.last-ball-b { background: #1f88e5; border-color: rgba(180, 220, 255, 0.78); color: #ffffff; }
.recent-list li.last-ball-i { background: #8952e0; border-color: rgba(218, 198, 255, 0.78); color: #ffffff; }
.recent-list li.last-ball-n { background: #de3f7c; border-color: rgba(255, 205, 225, 0.78); color: #ffffff; }
.recent-list li.last-ball-g { background: #db7b1b; border-color: rgba(255, 218, 170, 0.84); color: #ffffff; }
.recent-list li.last-ball-o { background: #087f68; border-color: rgba(176, 245, 221, 0.78); color: #ffffff; }

@media (max-width: 520px) {
  .recent-list {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .recent-list li {
    grid-column: span 2;
  }

  .recent-list li:nth-child(4) {
    grid-column: 2 / span 2;
  }

  .recent-list li:nth-child(5) {
    grid-column: 4 / span 2;
  }
}

.controls,
.auto-toolbar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.controls .tie-summary-panel {
  grid-column: 1 / -1;
}

body.tie-mode .controls #draw-button {
  grid-column: 1 / -1;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  min-height: 2.65rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-strong);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.btn span {
  display: none;
}

.button-icon {
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 1.15rem;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.btn:hover:not(:disabled) {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.btn:active:not(:disabled) {
  transform: translateY(1px) scale(0.99);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.btn-primary {
  grid-column: 1 / -1;
  min-height: 3.65rem;
  background: linear-gradient(135deg, #1ebf75, #1583b0);
  color: #fff;
  font-size: 1.15rem;
}

.btn-celebrate {
  grid-column: 1 / -1;
  min-height: 3.4rem;
  background: linear-gradient(135deg, #f6c343, #de3f7c);
  color: #151009;
  font-size: 1.35rem;
  letter-spacing: 0;
}

.btn-danger {
  background: color-mix(in srgb, var(--danger) 85%, #111);
  color: #fff;
}

.btn-quiet {
  background: transparent;
}

.btn.plus-gated {
  padding-right: 2.45rem;
}

.btn.plus-gated::after {
  content: "PLUS";
  position: absolute;
  right: 0.42rem;
  top: 0.28rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #8952e0, #2bb2c0);
  color: #ffffff;
  font-size: 0.48rem;
  font-weight: 900;
  line-height: 1;
  padding: 0.16rem 0.28rem;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.36);
}

body.light-theme .btn.plus-gated::after {
  background: linear-gradient(135deg, #6937c6, #087f68);
  color: #ffffff;
  box-shadow: 0 0 0 1px rgba(7, 26, 58, 0.22);
}

.secondary-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--panel-strong) 68%, transparent);
  padding: 0.65rem;
}

.shortcut-panel {
  display: grid;
  gap: 0.25rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.shortcut-panel strong {
  color: var(--text);
  font-size: 0.95rem;
}

.auto-panel {
  display: grid;
  gap: 0.45rem;
}

.auto-panel select,
.auto-panel input {
  width: 100%;
}

select {
  min-height: 2.45rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  padding: 0 0.75rem;
}

.board-section {
  position: relative;
  min-width: 0;
  padding: clamp(0.55rem, 1vw, 0.9rem);
  overflow: hidden;
}

.mobile-controls-backdrop {
  position: fixed;
  inset: 0;
  z-index: 22;
  display: grid;
  align-items: end;
  justify-items: center;
  padding: 0.85rem;
  background: rgba(5, 8, 20, 0.66);
}

.mobile-controls-backdrop[hidden] {
  display: none;
}

.mobile-controls-sheet {
  display: grid;
  gap: 0.85rem;
  width: min(100%, 38rem);
  max-height: min(88vh, 45rem);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 0.9rem;
}

.mobile-controls-slot {
  display: grid;
  gap: 0.65rem;
}

.mobile-controls-slot .controls {
  display: contents;
}

.tv-exit-button {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 5;
}

.board-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.55rem;
}

.bingo-board {
  display: grid;
  grid-template-rows: repeat(5, minmax(3.5rem, 1fr));
  gap: clamp(0.3rem, 0.55vw, 0.45rem);
  width: 100%;
  height: calc(100vh - clamp(1.65rem, 2.6vw, 2.8rem) - 2.6rem);
  min-height: 31rem;
}

.bingo-row {
  display: grid;
  grid-template-columns: minmax(2.8rem, 3.8rem) repeat(15, minmax(0, 1fr));
  gap: clamp(0.25rem, 0.45vw, 0.38rem);
}

.row-letter,
.number-cell {
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  font-weight: 900;
}

.row-letter {
  color: #fff;
  font-size: clamp(1.8rem, 4vw, 3.4rem);
}

.letter-b { background: #1f88e5; }
.letter-i { background: #8952e0; }
.letter-n { background: #de3f7c; }
.letter-g { background: #db7b1b; }
.letter-o { background: #087f68; }

.number-cell {
  position: relative;
  min-width: 0;
  background: linear-gradient(180deg, var(--neutral-2), var(--neutral));
  color: var(--text);
  font-size: clamp(1.25rem, 1.85vw, 2.25rem);
}

.number-cell.drawn {
  color: #ffffff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35), 0 0.35rem 0.8rem rgba(0, 0, 0, 0.24);
}

.number-cell.drawn.ball-b { background: linear-gradient(180deg, #2d9df3, #126fbf); }
.number-cell.drawn.ball-i { background: linear-gradient(180deg, #9a68ee, #6937c6); }
.number-cell.drawn.ball-n { background: linear-gradient(180deg, #eb5b94, #c62965); }
.number-cell.drawn.ball-g { background: linear-gradient(180deg, #ee9130, #b75f0c); }
.number-cell.drawn.ball-o { background: linear-gradient(180deg, #13a88b, #056e5a); }

.number-cell.drawn:not(.latest) {
  border-color: rgba(255, 255, 255, 0.38);
}

.number-cell.latest {
  background: linear-gradient(180deg, #fffdf2, #f3ecd0);
  border-color: #ffffff;
  color: #071a3a;
  box-shadow: 0 0 0 0.22rem rgba(7, 26, 58, 0.46), 0 0 1.2rem rgba(255, 255, 255, 0.72);
  text-shadow: none;
  z-index: 1;
}

.number-cell.latest::after {
  content: "ULT";
  position: absolute;
  right: 0.25rem;
  bottom: 0.18rem;
  display: grid;
  place-items: center;
  min-width: 1.45rem;
  height: 0.9rem;
  border-radius: 999px;
  background: #071a3a;
  font-size: 0.5rem;
  text-transform: uppercase;
  color: #ffffff;
}

.number-cell.chosen {
  border: 3px dashed #ffffff;
}

.number-cell.chosen::before {
  content: "◇";
  position: absolute;
  top: 0.18rem;
  left: 0.22rem;
  display: grid;
  place-items: center;
  width: 1.05rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #2bb2c0;
  color: #061018;
  font-size: 0.74rem;
  font-weight: 900;
}

.number-cell.winner {
  border: 4px solid #ffffff;
  animation: winnerGlow 900ms ease-in-out infinite alternate;
}

.number-cell.winner::after {
  content: "★";
  position: absolute;
  top: 0.16rem;
  right: 0.18rem;
  display: grid;
  place-items: center;
  width: 1.08rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #ffffff;
  color: #7a4b00;
  font-size: 0.72rem;
  line-height: 1;
  box-shadow: 0 0 0 0.12rem rgba(246, 195, 67, 0.55);
}

@keyframes winnerGlow {
  from { box-shadow: 0 0 0 0.15rem rgba(255, 255, 255, 0.32), 0 0 1rem rgba(246, 195, 67, 0.45); }
  to { box-shadow: 0 0 0 0.35rem rgba(255, 255, 255, 0.18), 0 0 2rem rgba(246, 195, 67, 0.75); }
}

.tie-summary-panel {
  display: grid;
  gap: 0.55rem;
}

.tie-summary-panel[hidden],
.modal-backdrop[hidden],
.tie-winner-card[hidden],
#tie-repeat-winner-button[hidden],
.bingo-overlay[hidden],
.tv-exit-button[hidden] {
  display: none;
}

.tie-summary-panel h2 {
  font-size: 1.05rem;
}

.tie-participant-list,
.tie-setup-list {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tie-participant-list li,
.tie-setup-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--panel) 62%, transparent);
  padding: 0.55rem;
}

.participant-number {
  border-radius: 999px;
  background: var(--neutral);
  padding: 0.25rem 0.55rem;
  font-weight: 900;
}

.participant-hit {
  border: 2px solid var(--latest);
}

.tie-winner-card {
  border: 2px solid var(--latest);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(246, 195, 67, 0.24), rgba(25, 182, 106, 0.2));
  padding: 0.75rem;
  font-weight: 900;
}

.tie-action-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(5, 8, 18, 0.74);
  backdrop-filter: blur(8px);
}

#duplicate-prizes-confirm-modal,
#clear-prizes-confirm-modal,
#prize-action-confirm-modal {
  z-index: 24;
}

.tie-modal-panel {
  width: min(42rem, 100%);
  max-height: min(44rem, calc(100vh - 2rem));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: clamp(1rem, 2vw, 1.25rem);
}

.modal-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.modal-heading h2 {
  font-size: 1.8rem;
}

.modal-heading p,
.form-message,
.tie-list-panel h3 {
  color: var(--muted);
}

.modal-close {
  width: 3rem;
  min-height: 3rem;
  padding: 0;
}

.modal-close .button-icon {
  width: 1.35rem;
  height: 1.35rem;
  flex-basis: 1.35rem;
}

.plus-panel {
  width: min(34rem, 100%);
}

.plus-description {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 1rem;
}

.tie-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  gap: 0.75rem;
}

.tie-form .form-field {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.tie-form .form-field label {
  color: var(--muted);
  font-weight: 700;
}

.tie-form .form-field input {
  width: 100%;
  min-height: 2.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-strong);
  color: var(--text);
  padding: 0 0.75rem;
}

.tie-form .btn-primary {
  grid-column: 1 / -1;
}

.form-message {
  min-height: 1.4rem;
  margin: 0.65rem 0;
}

#tie-form-message:empty {
  min-height: 0;
  margin: 0.22rem 0 0.3rem;
}

.tie-start-note {
  margin-bottom: 0.85rem;
  line-height: 1.35;
}

.tie-list-panel h3 {
  margin: 0.15rem 0 0.55rem;
  font-size: 1rem;
}

.setup-actions {
  display: flex;
  gap: 0.35rem;
}

.setup-actions .btn {
  min-height: 2.25rem;
  padding: 0 0.55rem;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-top: 1rem;
}

.confirm-text {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.35;
}

.tie-start-note {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--panel-strong) 70%, transparent);
  padding: 0.7rem;
  color: var(--muted);
}

.tie-start-note strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.tie-start-note ul {
  display: grid;
  gap: 0.25rem;
  margin: 0;
  padding-left: 1.15rem;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}

.settings-field {
  display: grid;
  gap: 0.35rem;
}

.settings-field-label {
  align-self: end;
  color: var(--muted);
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.settings-field input,
.settings-field select {
  width: 100%;
  min-height: 2.65rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-strong);
  color: var(--text);
  padding: 0 0.75rem;
}

.settings-field input[type="range"] {
  padding: 0;
}

.voice-rate-value {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
  text-align: center;
}

.settings-test-voice-button {
  min-height: 2.45rem;
}

.settings-account-button {
  grid-column: 1 / -1;
}

.account-status-list {
  display: grid;
  gap: 0.55rem;
  margin: 0 0 1rem;
}

.account-status-list div {
  display: grid;
  grid-template-columns: minmax(8rem, 0.55fr) 1fr;
  gap: 0.75rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-strong);
  padding: 0.7rem 0.85rem;
}

.account-status-list dt {
  color: var(--muted);
  font-weight: 900;
  text-transform: uppercase;
}

.account-status-list dd {
  margin: 0;
  font-weight: 900;
}

.account-future-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
  padding: 0.85rem;
}

.account-future-box strong {
  display: block;
  margin-bottom: 0.35rem;
}

.account-future-box ul {
  margin: 0;
  padding-left: 1.15rem;
}

.account-view {
  display: grid;
  gap: 0.85rem;
}

.account-profile-view {
  margin-bottom: 0.85rem;
}

.account-view[hidden],
.account-tabs[hidden],
.account-form[hidden] {
  display: none;
}

.account-admin-link[hidden] {
  display: none !important;
}

.account-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}

.account-form {
  display: grid;
  gap: 0.5rem;
}

.account-form label {
  color: var(--muted);
  font-weight: 900;
  text-transform: uppercase;
}

.account-form input {
  width: 100%;
  min-height: 2.65rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-strong);
  color: var(--text);
  padding: 0 0.75rem;
}

.account-profile-card {
  display: grid;
  gap: 0.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-strong);
  padding: 0.9rem;
}

.account-profile-card strong {
  font-size: 1.15rem;
}

.account-profile-card span,
.account-profile-card small {
  color: var(--muted);
  font-weight: 800;
}

.account-message {
  min-height: 1.2rem;
}

.account-note {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 800;
  margin: 1rem 0 0;
}

.summary-list {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.55rem 1rem;
  margin: 0;
}

.summary-list dt {
  color: var(--muted);
  font-weight: 800;
}

.summary-list dd {
  margin: 0;
  font-weight: 900;
}

.export-actions {
  grid-template-columns: repeat(3, 1fr);
}

.prizes-panel {
  width: min(78rem, 98vw);
}

.prize-summary-panel {
  width: min(54rem, calc(100vw - 1.5rem));
}

.prize-summary-content {
  display: grid;
  gap: 1rem;
}

.summary-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--panel-strong) 64%, transparent);
  padding: 0.8rem;
}

.summary-section h3 {
  margin: 0 0 0.65rem;
  font-size: 1rem;
  text-transform: uppercase;
}

.summary-prize-list {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.summary-prize-item {
  display: grid;
  gap: 0.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--panel) 74%, transparent);
  padding: 0.65rem;
}

.summary-prize-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-weight: 900;
}

.summary-prize-title span:first-child {
  overflow-wrap: anywhere;
}

.summary-prize-meta {
  color: var(--muted);
  font-weight: 700;
}

.summary-totals {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.summary-totals div {
  display: grid;
  gap: 0.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--panel) 70%, transparent);
  padding: 0.65rem;
  text-align: center;
}

.summary-totals span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.summary-totals strong {
  font-size: 1.08rem;
}

.prize-dashboard {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.prize-dashboard div,
.prize-card,
.winner-editor {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--panel-strong) 70%, transparent);
  padding: 0.75rem;
}

.prize-dashboard span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.prize-dashboard strong {
  display: block;
  margin-top: 0.25rem;
  font-size: clamp(1.1rem, 2vw, 1.6rem);
}

.prizes-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(18rem, 0.75fr);
  gap: 1rem;
}

.prize-card h3,
.winner-editor h3 {
  margin: 0 0 0.75rem;
}

.prize-form,
.winner-form {
  display: grid;
  gap: 0.55rem;
}

.prize-form label,
.winner-form label {
  color: var(--muted);
  font-weight: 800;
}

.prize-form input,
.prize-form textarea,
.winner-form input {
  width: 100%;
  min-height: 2.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  padding: 0.7rem 0.75rem;
}

.prize-form textarea {
  resize: vertical;
}

.prize-form-actions,
.filter-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.filter-tabs {
  grid-template-columns: repeat(3, 1fr);
  margin: 0.7rem 0;
}

.prize-filter-button.active-filter {
  border-color: var(--latest);
  box-shadow: 0 0 0 0.18rem rgba(246, 195, 67, 0.22);
}

.prize-list,
.winner-list {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.prize-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--panel) 72%, transparent);
  padding: 0.75rem;
}

.prize-item.done {
  border-left: 0.35rem solid var(--drawn);
}

.prize-item.pending {
  border-left: 0.35rem solid var(--latest);
}

.prize-item-header {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: start;
}

.prize-item-title {
  display: grid;
  gap: 0.25rem;
}

.prize-item-title strong {
  font-size: 1.05rem;
}

.prize-note,
.winner-summary-list,
.winner-preview {
  color: var(--muted);
}

.state-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
  font-weight: 900;
  white-space: nowrap;
}

.state-badge::before {
  content: "•";
  color: var(--latest);
}

.prize-item.done .state-badge::before {
  color: var(--drawn);
}

.prize-winners {
  display: grid;
  gap: 0.35rem;
  margin: 0.65rem 0 0;
  padding: 0;
  list-style: none;
}

.prize-winners li,
.winner-list li,
.winner-person {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--panel-strong) 58%, transparent);
  padding: 0.55rem;
}

.prize-item-actions,
.winner-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.7rem;
}

.prize-item-actions .btn,
.winner-row-actions .btn {
  min-height: 2.25rem;
  padding: 0 0.55rem;
}

.winner-editor {
  margin-top: 1rem;
}

.winner-editor[hidden] {
  display: none;
}

.compact-heading {
  margin-bottom: 0.65rem;
}

.winner-form {
  grid-template-columns: 1fr auto;
  align-items: end;
}

.winner-form label {
  grid-column: 1 / -1;
}

.winner-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem;
  align-items: center;
}

.winner-preview {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.75rem;
}

.winner-preview-row,
.winner-total-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

.winner-total-row {
  color: var(--text);
  font-weight: 900;
}

.winner-summary-list {
  display: grid;
  gap: 0.75rem;
}

.winner-person h4 {
  margin: 0 0 0.45rem;
  color: var(--text);
}

.winner-person ul {
  display: grid;
  gap: 0.3rem;
  margin: 0;
  padding-left: 1.1rem;
}

.winner-person-total {
  display: block;
  margin-top: 0.45rem;
  color: var(--text);
  font-weight: 900;
}

.prize-bottom-actions {
  grid-template-columns: 1.2fr 0.55fr 0.55fr 1.3fr 1fr;
}

.app-footer {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  padding: 0 0.75rem 0.75rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.app-footer strong {
  color: var(--text);
}

.bingo-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: radial-gradient(circle, rgba(246, 195, 67, 0.18), rgba(5, 8, 18, 0.96) 62%);
}

.bingo-card {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  gap: 1rem;
  width: min(72rem, 94vw);
  text-align: center;
}

.bingo-card p {
  color: var(--latest);
  font-size: clamp(6rem, 21vw, 18rem);
  font-weight: 900;
  line-height: 0.82;
  text-shadow: 0 0 2rem rgba(246, 195, 67, 0.6);
  animation: bingoPop 900ms ease-out;
}

.bingo-card span {
  font-size: clamp(1.4rem, 3vw, 2.6rem);
  font-weight: 900;
}

.bingo-card .btn {
  width: min(24rem, 90vw);
}

.toast-region {
  position: fixed;
  right: clamp(0.75rem, 2vw, 1.25rem);
  bottom: clamp(0.75rem, 2vw, 1.25rem);
  z-index: 30;
  display: grid;
  gap: 0.5rem;
  width: min(22rem, calc(100vw - 1.5rem));
  pointer-events: none;
}

.toast {
  border: 1px solid color-mix(in srgb, var(--drawn) 60%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--panel) 94%, #000);
  color: var(--text);
  box-shadow: var(--shadow);
  padding: 0.8rem 0.9rem;
  font-weight: 900;
  animation: toastIn 180ms ease-out;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(0.5rem); }
  to { opacity: 1; transform: translateY(0); }
}

.toast-update {
  pointer-events: auto;
  display: grid;
  gap: 0.75rem;
}

.toast-update-button {
  justify-self: start;
}

.confetti-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.confetti-piece {
  position: absolute;
  top: -12vh;
  width: 0.75rem;
  height: 1.1rem;
  border-radius: 2px;
  opacity: 0.92;
  animation: confettiFall 4.8s linear forwards;
}

@keyframes confettiFall {
  to {
    transform: translate3d(var(--drift), 118vh, 0) rotate(720deg);
  }
}

@keyframes bingoPop {
  0% { transform: scale(0.74); opacity: 0; }
  68% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

body.tv-mode .app-shell {
  grid-template-columns: minmax(14rem, 20rem) minmax(0, 1fr);
}

body.tv-mode .brand-block,
body.tv-mode .account-quick-button,
body.tv-mode .controls .btn:not(#draw-button):not(#prize-summary-button):not(#prizes-button),
body.tv-mode .auto-panel,
body.tv-mode .tie-summary-panel,
body.tv-mode .shortcut-panel,
body.tv-mode .app-footer {
  display: none;
}

body.tv-mode #plan-badge {
  display: none;
}

body.tv-mode .caller-panel {
  align-content: stretch;
}

body.tv-mode .current-ball {
  min-height: 36vh;
}

body.tv-mode .current-number {
  font-size: clamp(6rem, 13vw, 12rem);
}

body.tv-mode .board-heading {
  padding-right: 10rem;
}

@media (min-width: 761px) and (max-width: 1180px) {
  body:not(.tv-mode) .app-shell {
    grid-template-columns: minmax(13.5rem, 17rem) minmax(0, 1fr);
    align-items: start;
  }

  body:not(.tv-mode) .caller-panel {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 0.55rem;
    padding: 0.65rem;
  }

  body:not(.tv-mode) .brand-block,
  body:not(.tv-mode) .stats-panel,
  body:not(.tv-mode) .recent-panel,
  body:not(.tv-mode) .controls,
  body:not(.tv-mode) .auto-panel,
  body:not(.tv-mode) .tie-summary-panel {
    grid-column: 1;
  }

  body:not(.tv-mode) .current-ball {
    grid-column: 1;
    min-height: clamp(8.4rem, 16vw, 10rem);
    padding: 0.55rem;
  }

  body:not(.tv-mode) .current-letter {
    width: clamp(2.9rem, 4.2vw, 3.6rem);
    font-size: clamp(1.8rem, 3.5vw, 2.75rem);
  }

  body:not(.tv-mode) .current-number {
    font-size: clamp(4.15rem, 7vw, 5.7rem);
  }

  body:not(.tv-mode) .board-section {
    overflow-x: hidden;
  }

  body:not(.tv-mode) .bingo-board {
    min-width: 0;
    width: 100%;
    height: auto;
    min-height: clamp(25rem, 48vw, 31rem);
    grid-template-rows: repeat(5, minmax(4.4rem, 1fr));
  }

  body:not(.tv-mode) .bingo-row {
    grid-template-columns: minmax(2.65rem, 3.35rem) repeat(15, minmax(0, 1fr));
  }

  body:not(.tv-mode) .number-cell {
    font-size: clamp(1rem, 2.15vw, 1.65rem);
  }
}

@media (max-width: 760px) {
  .app-shell {
    gap: 0.45rem;
    min-height: 100dvh;
    padding: 0.35rem;
  }

  .caller-panel {
    grid-template-columns: 1fr;
    gap: 0.42rem;
    padding: 0.45rem;
  }

  .brand-block,
  .current-ball,
  .stats-panel,
  .recent-panel,
  .controls,
  .auto-panel,
  .tie-summary-panel {
    grid-column: auto;
  }

  .brand-block {
    gap: 0.55rem;
  }

  .brand-mark {
    width: 2.45rem;
    font-size: 0.82rem;
  }

  h1 {
    font-size: clamp(1.28rem, 6vw, 1.55rem);
  }

  body.mobile-compact .brand-block p {
    display: none;
  }

  body.mobile-compact .mobile-brand-prefix {
    display: none;
  }

  body.mobile-compact .account-quick-button {
    width: 2.85rem;
    min-width: 2.85rem;
    height: 2.85rem;
    min-height: 2.85rem;
    padding: 0;
    gap: 0;
    aspect-ratio: 1;
  }

  body.mobile-compact .account-quick-button span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .plan-badge {
    min-height: 1rem;
    font-size: 0.58rem;
  }

  body.mobile-compact .mobile-controls-button:not([hidden]) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.85rem;
    min-width: 2.85rem;
    height: 2.85rem;
    min-height: 2.85rem;
    margin-left: auto;
    padding: 0;
    gap: 0;
    aspect-ratio: 1;
  }

  body.mobile-compact .mobile-controls-button .button-icon {
    width: 1.16rem;
    height: 1.16rem;
  }

  body.mobile-compact .account-quick-button .button-icon {
    width: 1.16rem;
    height: 1.16rem;
  }

  .stats-panel {
    gap: 0.35rem;
  }

  .stats-panel div,
  .recent-panel {
    padding: 0.42rem;
  }

  .stats-panel div {
    min-height: 3.15rem;
  }

  .stat-label {
    font-size: 0.72rem;
  }

  .stats-panel strong {
    margin-top: 0.1rem;
    font-size: 1.35rem;
  }

  .recent-panel h2 {
    margin-bottom: 0;
    font-size: 0.98rem;
  }

  .recent-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.28rem;
    min-height: 2.6rem;
    margin-top: 0.45rem;
  }

  .recent-list li {
    grid-column: auto;
    min-height: 2.75rem;
    padding: 0.26rem 0.16rem;
  }

  .recent-list li:nth-child(4),
  .recent-list li:nth-child(5) {
    grid-column: auto;
  }

  .recent-letter {
    font-size: 0.6rem;
  }

  .recent-number {
    font-size: clamp(1rem, 6vw, 1.35rem);
  }

  .controls {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .controls #draw-button {
    min-height: 2.85rem;
  }

  .mobile-controls-slot {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mobile-controls-slot .btn,
  .mobile-controls-slot .auto-panel,
  .mobile-controls-slot .shortcut-panel,
  .mobile-controls-slot .tie-summary-panel {
    grid-column: auto;
  }

  .mobile-controls-slot .auto-panel,
  .mobile-controls-slot .shortcut-panel,
  .mobile-controls-slot .tie-summary-panel {
    grid-column: 1 / -1;
  }

  .board-heading {
    display: flex;
    align-items: center;
    margin-bottom: 0.35rem;
  }

  .board-heading h2 {
    font-size: 0.98rem;
  }

  .board-heading p {
    max-width: 54%;
    margin-top: 0;
    font-size: 0.72rem;
    text-align: right;
  }

  .board-section {
    padding: 0.42rem;
    overflow-x: hidden;
  }

  .bingo-board {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    min-width: 0;
    min-height: 0;
    width: 100%;
    height: auto;
    grid-template-rows: none;
    gap: clamp(0.12rem, 0.8vw, 0.22rem);
  }

  .bingo-row {
    display: contents;
  }

  .row-letter {
    order: var(--mobile-order);
    min-height: clamp(1.25rem, 4.6vw, 1.55rem);
    font-size: clamp(0.88rem, 4.4vw, 1.1rem);
  }

  .number-cell {
    order: var(--mobile-order);
    min-height: clamp(1.38rem, 6vw, 1.85rem);
    font-size: clamp(0.76rem, 3.7vw, 0.98rem);
    border-radius: 6px;
  }

  .number-cell.latest::after {
    right: 0.12rem;
    bottom: 0.1rem;
    min-width: 1rem;
    height: 0.68rem;
    font-size: 0.38rem;
  }

  .number-cell.chosen::before,
  .number-cell.winner::after {
    width: 0.78rem;
    font-size: 0.5rem;
  }

  .controls #draw-button {
    position: sticky;
    top: 0.5rem;
    z-index: 4;
    grid-column: 1 / -1;
    box-shadow: 0 12px 38px rgba(0, 0, 0, 0.34);
  }

  .tie-form,
  .modal-actions,
  .settings-grid,
  .export-actions,
  .prize-dashboard,
  .prizes-layout,
  .prize-form-actions,
  .filter-tabs,
  .winner-form,
  .prize-bottom-actions {
    grid-template-columns: 1fr;
  }

  .app-footer {
    flex-wrap: wrap;
  }
}

@media (min-width: 761px) and (max-width: 820px) {
  .board-section {
    overflow-x: hidden;
  }

  .bingo-board {
    min-width: 0;
    min-height: 0;
    width: 100%;
    height: auto;
    grid-template-rows: repeat(5, minmax(2.6rem, 1fr));
    gap: 0.2rem;
  }

  .bingo-row {
    grid-template-columns: minmax(2rem, 2.45rem) repeat(15, minmax(0, 1fr));
    gap: 0.14rem;
  }

  .row-letter {
    font-size: clamp(1.2rem, 3.4vw, 1.7rem);
  }

  .number-cell {
    min-height: clamp(2.35rem, 6vw, 3rem);
    font-size: clamp(0.88rem, 2.6vw, 1.25rem);
  }

  .number-cell.latest::after {
    min-width: 1.05rem;
    height: 0.7rem;
    font-size: 0.38rem;
    right: 0.08rem;
    bottom: 0.08rem;
  }
}

@media (orientation: landscape) and (max-width: 940px) {
  body:not(.tv-mode) .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    align-items: stretch;
    align-content: start;
    gap: 0.28rem;
    min-height: 100dvh;
    padding: 0.32rem;
  }

  body:not(.tv-mode) .caller-panel {
    grid-template-columns:
      minmax(7.2rem, 0.85fr)
      minmax(7.8rem, 1.02fr)
      minmax(10.4rem, 1.08fr)
      minmax(8.4rem, 0.86fr);
    grid-template-rows: auto auto;
    align-items: stretch;
    gap: 0.26rem 0.34rem;
    padding: 0.3rem;
    overflow: visible;
  }

  body.mobile-compact .brand-block p {
    display: none;
  }

  body.mobile-compact .mobile-controls-button:not([hidden]) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    min-width: 2.75rem;
    height: 2.75rem;
    min-height: 2.75rem;
    margin-left: auto;
    padding: 0;
    gap: 0;
    aspect-ratio: 1;
  }

  body.mobile-compact .account-quick-button {
    width: 2.75rem;
    min-width: 2.75rem;
    height: 2.75rem;
    min-height: 2.75rem;
  }

  body:not(.tv-mode) .brand-block {
    grid-column: 1;
    min-height: 0;
    gap: 0.45rem;
  }

  body:not(.tv-mode) .brand-mark {
    width: 2.05rem;
    font-size: 0.68rem;
  }

  body:not(.tv-mode) h1 {
    font-size: clamp(1rem, 2.5vw, 1.26rem);
  }

  body:not(.tv-mode) .plan-badge {
    min-height: 0.82rem;
    margin-top: 0.08rem;
    padding: 0 0.32rem;
    font-size: 0.48rem;
  }

  body:not(.tv-mode) .current-ball {
    grid-column: 2;
    grid-row: 1;
    grid-template-columns: minmax(2rem, 2.45rem) minmax(0, 1fr);
    gap: 0.1rem 0.5rem;
    min-height: 0;
    height: auto;
    padding: 0.28rem 0.44rem;
  }

  body:not(.tv-mode) .current-letter {
    width: clamp(1.9rem, 5vw, 2.35rem);
    font-size: clamp(1.15rem, 3.5vw, 1.62rem);
  }

  body:not(.tv-mode) .current-number {
    font-size: clamp(2.15rem, 7.2vw, 3.35rem);
    line-height: 0.86;
  }

  body:not(.tv-mode) .current-label {
    grid-column: 1 / -1;
    font-size: 0.58rem;
    line-height: 1;
  }

  body:not(.tv-mode) .stats-panel {
    grid-column: 3 / 5;
    grid-row: 1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.34rem;
  }

  body:not(.tv-mode) .stats-panel div {
    min-height: 0;
    padding: 0.26rem 0.22rem;
  }

  body:not(.tv-mode) .stat-label {
    font-size: clamp(0.52rem, 1.65vw, 0.66rem);
  }

  body:not(.tv-mode) .stats-panel strong {
    margin-top: 0.04rem;
    font-size: clamp(1.05rem, 3.4vw, 1.42rem);
  }

  body:not(.tv-mode) .recent-panel {
    grid-column: 1 / 4;
    grid-row: 2;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.14rem;
    padding: 0.22rem 0.26rem;
  }

  body:not(.tv-mode) .recent-panel h2 {
    margin: 0;
    font-size: clamp(0.64rem, 1.8vw, 0.82rem);
    line-height: 1.05;
    text-align: center;
  }

  body:not(.tv-mode) .recent-list {
    gap: 0.2rem;
    min-height: 0;
    margin-top: 0;
  }

  body:not(.tv-mode) .recent-list li {
    min-height: clamp(2rem, 9vh, 2.5rem);
    padding: 0.2rem 0.14rem;
  }

  body:not(.tv-mode) .recent-letter {
    font-size: 0.52rem;
  }

  body:not(.tv-mode) .recent-number {
    font-size: clamp(0.9rem, 3.4vw, 1.25rem);
  }

  .controls,
  .auto-toolbar {
    gap: 0.35rem;
  }

  body:not(.tv-mode) .controls {
    grid-column: 4;
    grid-row: 2;
    display: grid;
    align-self: stretch;
  }

  .btn {
    min-height: 2.35rem;
    padding: 0.45rem 0.55rem;
  }

  body:not(.tv-mode) .controls #draw-button {
    position: static;
    min-height: 0;
    height: 100%;
    padding: 0.3rem 0.45rem;
    white-space: nowrap;
  }

  body:not(.tv-mode) .board-section {
    display: grid;
    grid-template-rows: auto auto;
    min-height: 0;
    overflow-x: hidden;
    padding: 0.32rem 0.32rem 0.38rem;
  }

  body:not(.tv-mode) .board-heading {
    margin-bottom: 0.24rem;
  }

  body:not(.tv-mode) .board-heading h2 {
    font-size: clamp(0.72rem, 2vw, 0.9rem);
  }

  body:not(.tv-mode) .board-heading p {
    font-size: 0.62rem;
  }

  .bingo-board {
    min-width: 0;
    min-height: 0;
    width: 100%;
    height: auto;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(5, minmax(clamp(2rem, 7vh, 2.55rem), auto));
    gap: 0.16rem;
  }

  .bingo-row {
    display: grid;
    grid-template-columns: minmax(1.45rem, 1.9rem) repeat(15, minmax(0, 1fr));
    gap: 0.1rem;
  }

  .row-letter,
  .number-cell {
    order: 0;
  }

  .row-letter {
    min-height: clamp(2rem, 7vh, 2.55rem);
    font-size: clamp(0.86rem, 2.7vw, 1.16rem);
    border-radius: 5px;
  }

  .number-cell {
    min-height: clamp(2rem, 7vh, 2.55rem);
    border-radius: 5px;
    font-size: clamp(0.72rem, 2.2vw, 1rem);
  }

  .number-cell.latest::after {
    min-width: 0.95rem;
    height: 0.65rem;
    font-size: 0.36rem;
    right: 0.08rem;
    bottom: 0.08rem;
  }

  .mobile-controls-slot {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mobile-controls-slot .auto-panel,
  .mobile-controls-slot .shortcut-panel,
  .mobile-controls-slot .tie-summary-panel {
    grid-column: 1 / -1;
  }

  :fullscreen .app-footer {
    display: none;
  }

  :fullscreen body:not(.tv-mode) .board-heading {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  :fullscreen body:not(.tv-mode) .app-shell {
    height: 100dvh;
    max-height: 100dvh;
    grid-template-rows: auto minmax(0, 1fr);
    align-content: stretch;
    overflow: hidden;
  }

  :fullscreen body:not(.tv-mode) .caller-panel {
    grid-template-columns:
      minmax(11.75rem, 0.95fr)
      minmax(11.8rem, 1.18fr)
      minmax(7.9rem, 0.78fr)
      minmax(7.9rem, 0.78fr);
    gap: 0.24rem 0.32rem;
  }

  :fullscreen body:not(.tv-mode) .brand-block {
    display: grid;
    grid-template-columns: auto minmax(3.6rem, 1fr) 2.55rem 2.55rem;
    gap: 0.28rem;
    align-items: center;
    min-width: 0;
  }

  :fullscreen body:not(.tv-mode) .brand-block > div {
    min-width: 0;
  }

  :fullscreen body:not(.tv-mode) h1 {
    overflow: hidden;
    text-overflow: clip;
    white-space: nowrap;
  }

  :fullscreen body:not(.tv-mode) .account-quick-button,
  :fullscreen body:not(.tv-mode) .mobile-controls-button:not([hidden]) {
    width: 2.55rem;
    min-width: 2.55rem;
    height: 2.55rem;
    min-height: 2.55rem;
    margin-left: 0;
  }

  :fullscreen body:not(.tv-mode) .current-ball {
    padding-inline: 0.36rem;
  }

  :fullscreen body:not(.tv-mode) .stats-panel {
    gap: 0.28rem;
  }

  :fullscreen body:not(.tv-mode) .board-section {
    grid-template-rows: minmax(0, 1fr);
    min-height: 0;
    padding-bottom: 0.32rem;
  }

  :fullscreen body:not(.tv-mode) .bingo-board {
    height: 100%;
    min-height: 0;
    grid-template-rows: repeat(5, minmax(0, 1fr));
  }

  :fullscreen body:not(.tv-mode) .row-letter,
  :fullscreen body:not(.tv-mode) .number-cell {
    min-height: 0;
  }
}

@media (orientation: landscape) and (max-width: 760px) {
  body:not(.tv-mode) .app-shell {
    grid-template-columns: 1fr;
  }

  body:not(.tv-mode) .caller-panel {
    grid-template-columns: minmax(6.5rem, 0.85fr) minmax(6rem, 0.85fr) minmax(6.8rem, 1fr);
    grid-template-rows: auto auto;
  }

  body:not(.tv-mode) .brand-block {
    grid-column: 1;
  }

  body:not(.tv-mode) .current-ball {
    grid-column: 2;
  }

  body:not(.tv-mode) .stats-panel {
    grid-column: 3;
  }

  body:not(.tv-mode) .recent-panel {
    grid-column: 1 / 3;
    grid-row: 2;
  }

  body:not(.tv-mode) .controls {
    grid-column: 3;
    grid-row: 2;
  }

  .bingo-board {
    grid-template-columns: 1fr;
  }
}

body.tv-mode .app-shell {
  grid-template-columns: minmax(14rem, 20rem) minmax(0, 1fr);
  align-items: stretch;
}

body.tv-mode .caller-panel {
  grid-template-columns: 1fr;
  grid-auto-rows: auto;
  align-content: start;
  gap: clamp(0.55rem, 1vh, 0.85rem);
  overflow: visible;
}

body.tv-mode .current-ball,
body.tv-mode .stats-panel,
body.tv-mode .recent-panel,
body.tv-mode .controls {
  grid-column: 1;
}

body.tv-mode .current-ball {
  grid-template-columns: minmax(4.25rem, 5.8rem) minmax(0, 1fr);
  width: 100%;
  height: clamp(14rem, 32vh, 20rem);
  min-height: 0;
  max-height: clamp(14rem, 32vh, 20rem);
  align-content: center;
  flex: 0 0 auto;
  overflow: hidden;
}

body.tv-mode .current-letter {
  width: clamp(4rem, 5.6vw, 5.8rem);
}

body.tv-mode .current-number {
  max-width: 100%;
  font-size: clamp(5.4rem, 9vw, 9.4rem);
  line-height: 0.82;
  overflow: hidden;
}

body.tv-mode .stats-panel,
body.tv-mode .recent-panel {
  min-height: 0;
}

body.tv-mode .controls {
  display: grid;
  grid-template-columns: 1fr;
}

body.tv-mode .controls #draw-button {
  position: static;
  min-height: clamp(3.5rem, 8vh, 5rem);
  order: 1;
}

body.tv-mode .controls #prize-summary-button,
body.tv-mode .controls #prizes-button {
  display: inline-flex;
  position: static;
  min-height: clamp(3rem, 6vh, 4.3rem);
}

body.tv-mode .controls #prize-summary-button.plus-gated,
body.tv-mode .controls #prizes-button.plus-gated {
  position: relative;
  overflow: visible;
  padding-right: 2.9rem;
}

body.tv-mode .controls #prize-summary-button.plus-gated::after,
body.tv-mode .controls #prizes-button.plus-gated::after {
  display: inline-grid;
  opacity: 1;
  visibility: visible;
  pointer-events: none;
}

body.tv-mode .controls #prize-summary-button {
  order: 2;
}

body.tv-mode .controls #prizes-button {
  order: 3;
}

@media (max-width: 1180px) {
  body.tv-mode .app-shell {
    grid-template-columns: 1fr;
  }

  body.tv-mode .caller-panel {
    grid-template-columns: minmax(16rem, 1fr) minmax(16rem, 0.85fr);
    align-items: stretch;
  }

  body.tv-mode .current-ball {
    grid-column: 1;
    height: clamp(11rem, 26vh, 16rem);
    max-height: clamp(11rem, 26vh, 16rem);
    min-height: 0;
  }

  body.tv-mode .stats-panel,
  body.tv-mode .recent-panel,
  body.tv-mode .controls {
    grid-column: 2;
  }
}

@media (max-width: 760px) {
  body.tv-mode .caller-panel {
    grid-template-columns: 1fr;
  }

  body.tv-mode .current-ball,
  body.tv-mode .stats-panel,
  body.tv-mode .recent-panel,
  body.tv-mode .controls {
    grid-column: 1;
  }
}

@media (max-width: 760px) {
  .summary-totals {
    grid-template-columns: 1fr 1fr;
  }
}

@media (orientation: portrait) and (max-width: 760px) {
  body:not(.tv-mode) .app-shell {
    grid-template-columns: 1fr;
  }

  body:not(.tv-mode) .caller-panel {
    grid-template-columns: minmax(0, 1fr) minmax(5.35rem, 6.65rem);
    align-items: stretch;
    gap: 0.34rem;
  }

  body:not(.tv-mode) .brand-block,
  body:not(.tv-mode) .recent-panel,
  body:not(.tv-mode) .controls,
  body:not(.tv-mode) .tie-summary-panel {
    grid-column: 1 / -1;
  }

  .brand-block {
    min-height: 2.35rem;
  }

  .brand-mark {
    width: 2.25rem;
    font-size: 0.76rem;
  }

  h1 {
    font-size: clamp(1.18rem, 5.4vw, 1.42rem);
  }

  body.mobile-compact .brand-block p {
    display: none;
  }

  .plan-badge {
    min-height: 0.9rem;
    margin-top: 0.14rem;
    padding: 0 0.36rem;
    font-size: 0.52rem;
  }

  body.mobile-compact .mobile-controls-button:not([hidden]) {
    width: 2.7rem;
    min-width: 2.7rem;
    height: 2.7rem;
    min-height: 2.7rem;
    padding: 0;
  }

  body:not(.tv-mode) .current-ball {
    grid-column: 1;
    grid-template-columns: minmax(2.2rem, 2.75rem) minmax(0, 1fr);
    gap: 0.08rem 0.38rem;
    min-height: clamp(3.85rem, 12.2vh, 4.8rem);
    height: 100%;
    padding: 0.32rem 0.42rem;
  }

  body:not(.tv-mode) .current-letter {
    width: clamp(2.15rem, 10.8vw, 2.7rem);
    font-size: clamp(1.35rem, 7.1vw, 1.9rem);
  }

  body:not(.tv-mode) .current-number {
    font-size: clamp(2.42rem, 13.4vw, 3.65rem);
    line-height: 0.76;
  }

  body:not(.tv-mode) .current-label {
    font-size: 0.7rem;
    line-height: 1;
  }

  body:not(.tv-mode) .stats-panel {
    grid-column: 2;
    grid-template-columns: 1fr;
    align-self: stretch;
    gap: 0.26rem;
    height: 100%;
  }

  body:not(.tv-mode) .stats-panel div {
    min-height: 0;
    padding: 0.3rem 0.2rem;
  }

  body:not(.tv-mode) .stat-label {
    font-size: clamp(0.55rem, 2.55vw, 0.68rem);
  }

  body:not(.tv-mode) .stats-panel strong {
    margin-top: 0.08rem;
    font-size: clamp(1.18rem, 5.6vw, 1.48rem);
  }

  body:not(.tv-mode) .recent-panel {
    padding: 0.3rem;
  }

  body:not(.tv-mode) .recent-list {
    gap: 0.22rem;
    min-height: 2.28rem;
    margin-top: 0.28rem;
  }

  body:not(.tv-mode) .recent-list li {
    min-height: 2.32rem;
    padding: 0.22rem 0.14rem;
  }

  body:not(.tv-mode) .controls #draw-button {
    min-height: 2.48rem;
    padding-block: 0.38rem;
  }
}

@media (max-width: 940px) {
  body.tv-mode.mobile-compact .app-shell {
    grid-template-columns: 1fr;
    align-content: start;
    gap: 0.32rem;
    min-height: 100dvh;
    padding: 0.34rem;
  }

  body.tv-mode.mobile-compact .caller-panel {
    align-content: start;
    gap: 0.3rem;
    padding: 0.36rem;
  }

  body.tv-mode.mobile-compact .current-ball {
    min-height: 0;
    height: auto;
    max-height: none;
    padding: 0.32rem 0.42rem;
  }

  body.tv-mode.mobile-compact .current-letter {
    width: clamp(2.05rem, 9vw, 2.7rem);
    font-size: clamp(1.25rem, 5.2vw, 1.85rem);
  }

  body.tv-mode.mobile-compact .current-number {
    font-size: clamp(2.55rem, 11vw, 4rem);
    line-height: 0.82;
  }

  body.tv-mode.mobile-compact .current-label {
    font-size: 0.68rem;
    line-height: 1;
  }

  body.tv-mode.mobile-compact .stats-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.28rem;
  }

  body.tv-mode.mobile-compact .stats-panel div,
  body.tv-mode.mobile-compact .recent-panel {
    min-height: 0;
    padding: 0.28rem;
  }

  body.tv-mode.mobile-compact .stat-label {
    font-size: clamp(0.58rem, 2.1vw, 0.72rem);
  }

  body.tv-mode.mobile-compact .stats-panel strong {
    margin-top: 0.05rem;
    font-size: clamp(1.12rem, 4.3vw, 1.55rem);
  }

  body.tv-mode.mobile-compact .recent-panel h2 {
    margin-bottom: 0.16rem;
    font-size: clamp(0.72rem, 2.4vw, 0.92rem);
    line-height: 1.05;
    text-align: center;
  }

  body.tv-mode.mobile-compact .recent-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.2rem;
    min-height: 0;
    margin-top: 0;
  }

  body.tv-mode.mobile-compact .recent-list li {
    min-height: clamp(2rem, 7.5vh, 2.55rem);
    padding: 0.2rem 0.14rem;
  }

  body.tv-mode.mobile-compact .recent-letter {
    font-size: 0.52rem;
  }

  body.tv-mode.mobile-compact .recent-number {
    font-size: clamp(0.92rem, 3.6vw, 1.28rem);
  }

  body.tv-mode.mobile-compact .controls {
    display: grid;
    grid-template-columns: 1fr;
  }

  body.tv-mode.mobile-compact .controls #draw-button {
    min-height: clamp(2.35rem, 8vh, 3rem);
    padding: 0.34rem 0.5rem;
    white-space: nowrap;
  }

  body.tv-mode.mobile-compact .controls #prize-summary-button {
    display: none;
  }

  body.tv-mode.mobile-compact .controls #prizes-button {
    display: none;
  }

  body.tv-mode.mobile-compact .board-section {
    min-height: 0;
    overflow-x: hidden;
    padding: 0.32rem;
  }

  body.tv-mode.mobile-compact .board-heading {
    margin-bottom: 0.24rem;
    padding-right: 3.15rem;
  }

  body.tv-mode.mobile-compact .board-heading h2 {
    font-size: clamp(0.72rem, 2.3vw, 0.9rem);
  }

  body.tv-mode.mobile-compact .board-heading p {
    font-size: 0.62rem;
  }

  body.tv-mode.mobile-compact .tv-exit-button {
    display: inline-grid;
    place-items: center;
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 0.42rem);
    right: calc(env(safe-area-inset-right, 0px) + 0.42rem);
    z-index: 28;
    width: 2.7rem;
    min-width: 2.7rem;
    height: 2.35rem;
    min-height: 2.35rem;
    padding: 0;
    border-color: color-mix(in srgb, var(--latest) 54%, var(--line));
    background: color-mix(in srgb, var(--panel) 88%, #000);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-0.25rem);
    transition: opacity 160ms ease, transform 160ms ease;
    font-size: 0;
    line-height: 1;
  }

  body.tv-mode.mobile-compact.tv-exit-visible .tv-exit-button {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  body.tv-mode.mobile-compact .tv-exit-button::before {
    content: "X";
    font-size: 0.82rem;
    font-weight: 950;
  }

  body.tv-mode.mobile-compact .tv-exit-button::after {
    content: "TV";
    font-size: 0.56rem;
    font-weight: 950;
  }
}

@media (orientation: portrait) and (max-width: 760px) {
  body.tv-mode.mobile-compact .caller-panel {
    grid-template-columns: 1fr;
  }

  body.tv-mode.mobile-compact .current-ball,
  body.tv-mode.mobile-compact .stats-panel,
  body.tv-mode.mobile-compact .recent-panel,
  body.tv-mode.mobile-compact .controls {
    grid-column: 1;
  }

  body.tv-mode.mobile-compact .current-ball {
    grid-template-columns: minmax(2.15rem, 2.75rem) minmax(0, 1fr);
  }

  body.tv-mode.mobile-compact .bingo-board {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-template-rows: none;
    height: auto;
    min-height: 0;
    gap: clamp(0.12rem, 0.8vw, 0.22rem);
  }

  body.tv-mode.mobile-compact .bingo-row {
    display: contents;
  }

  body.tv-mode.mobile-compact .row-letter,
  body.tv-mode.mobile-compact .number-cell {
    order: var(--mobile-order);
  }

  body.tv-mode.mobile-compact .row-letter {
    min-height: clamp(1.25rem, 4.6vw, 1.55rem);
    font-size: clamp(0.88rem, 4.4vw, 1.1rem);
  }

  body.tv-mode.mobile-compact .number-cell {
    min-height: clamp(1.38rem, 6vw, 1.85rem);
    font-size: clamp(0.76rem, 3.7vw, 0.98rem);
  }
}

@media (orientation: landscape) and (max-width: 940px) {
  body.tv-mode.mobile-compact .app-shell {
    grid-template-rows: auto minmax(0, 1fr);
  }

  body.tv-mode.mobile-compact .caller-panel {
    grid-template-columns:
      minmax(6.8rem, 0.9fr)
      minmax(9.4rem, 1fr)
      minmax(13rem, 1.35fr)
      minmax(7.6rem, 0.82fr);
    grid-template-rows: auto;
    align-items: stretch;
  }

  body.tv-mode.mobile-compact .current-ball {
    grid-column: 1;
    grid-template-columns: minmax(1.9rem, 2.35rem) minmax(0, 1fr);
    gap: 0.08rem 0.36rem;
    padding: 0.26rem 0.38rem;
  }

  body.tv-mode.mobile-compact .current-letter {
    width: clamp(1.85rem, 5vw, 2.3rem);
    font-size: clamp(1.1rem, 3.3vw, 1.55rem);
  }

  body.tv-mode.mobile-compact .current-number {
    font-size: clamp(2rem, 6.7vw, 3.2rem);
  }

  body.tv-mode.mobile-compact .current-label {
    font-size: 0.56rem;
  }

  body.tv-mode.mobile-compact .stats-panel {
    grid-column: 2;
  }

  body.tv-mode.mobile-compact .recent-panel {
    grid-column: 3;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 0.12rem;
  }

  body.tv-mode.mobile-compact .controls {
    grid-column: 4;
    align-self: stretch;
  }

  body.tv-mode.mobile-compact .controls #draw-button {
    height: 100%;
  }

  body.tv-mode.mobile-compact .board-section {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
  }

  body.tv-mode.mobile-compact .bingo-board {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(5, minmax(0, 1fr));
    height: 100%;
    min-height: 0;
    gap: 0.14rem;
  }

  body.tv-mode.mobile-compact .bingo-row {
    display: grid;
    grid-template-columns: minmax(1.45rem, 1.9rem) repeat(15, minmax(0, 1fr));
    gap: 0.1rem;
  }

  body.tv-mode.mobile-compact .row-letter,
  body.tv-mode.mobile-compact .number-cell {
    order: 0;
    min-height: 0;
  }

  body.tv-mode.mobile-compact .row-letter {
    font-size: clamp(0.86rem, 2.7vw, 1.16rem);
  }

  body.tv-mode.mobile-compact .number-cell {
    font-size: clamp(0.72rem, 2.2vw, 1rem);
  }

  :fullscreen body.tv-mode.mobile-compact .board-heading,
  :fullscreen body.tv-mode.mobile-compact .app-footer {
    display: none;
  }

  :fullscreen body.tv-mode.mobile-compact .board-section {
    grid-template-rows: minmax(0, 1fr);
  }
}

/* Controles públicos de visibilidade de senha da Conta H2L. */
.account-password-field { position: relative; min-width: 0; }
.account-password-field input { width: 100%; padding-right: 52px; }
.account-password-field input::-ms-reveal { display: none; }
.account-password-toggle {
  position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center; width: 44px; height: 44px;
  padding: 0; border: 0; border-radius: 8px; background: transparent;
  color: inherit; cursor: pointer;
}
.account-password-toggle:focus-visible { outline: 2px solid currentColor; outline-offset: -3px; }
.account-password-slash { display: none; }
.account-password-toggle[aria-pressed="true"] .account-password-slash { display: inline; }

.brand-mark img { display: block; width: 100%; height: auto; border-radius: inherit; }
.account-product-logo { display: block; width: min(240px, 75%); height: auto; margin: 0 auto 1rem; }

/* Identidade horizontal oficial; controles e indicador de plano preservados. */
.caller-brand { flex: 1 1 0; text-align: center; }
.caller-brand h1 { line-height: 0; }
.caller-brand-logo { display: block; width: min(100%, 210px); height: auto; margin-inline: auto; }
:fullscreen body:not(.tv-mode) .brand-block { grid-template-columns: minmax(0, 1fr) 2.55rem 2.55rem; }
