@font-face {
  font-family: Montagu;
  src: url("assets/montagu.woff") format("woff");
  font-weight: 100 700;
  font-display: swap
}

@font-face {
  font-family: Nunito;
  src: url("/assets/standard/nunito-latin.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap
}

:root {
  --ink: #193f40;
  --muted: #5b6860;
  --cream: #fff8e7;
  --line: #d7ceba;
  --serif: Montagu, Georgia, serif;
  --sans: Nunito, "Trebuchet MS", Arial, sans-serif;
  color-scheme: light
}

* {
  box-sizing: border-box
}

body {
  margin: 0;
  color: var(--ink);
  font: 700 16px/1.4 var(--sans);
  background-color: #f6f0df;
  background-image: radial-gradient(#8f784219 .65px, transparent .9px);
  background-size: 5px 5px
}

[hidden] {
  display: none !important
}

button,
a,
input,
select {
  touch-action: manipulation
}

button {
  font: inherit;
  cursor: pointer;
  color: inherit
}

button:disabled {
  cursor: default
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid #2e85b2;
  outline-offset: 4px
}

button svg,
.home-link svg,
.history-icon svg,
.game-foot svg,
.dialog-symbol svg {
  width: 21px;
  height: 21px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round
}

.symbols {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0
}

.topbar {
  background: #163e40;
  color: #fff8df;
  border-bottom: 3px solid #c8ad74
}

.nav-inner,
.game-page {
  width: min(1200px, calc(100% - clamp(32px, 8vw, 118px)));
  margin-inline: auto
}

.nav-inner {
  height: 55px;
  display: flex;
  align-items: center;
  justify-content: space-between
}

.home-link,
.top-tool {
  color: inherit;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  gap: .55rem
}

.home-link {
  font-weight: 950;
  font-size: 1.1rem;
  letter-spacing: -.03em
}

.back-icon {
  height: 30px;
  width: 30px;
  display: grid;
  place-items: center;
  border: 1px solid #71918b;
  border-radius: 50%
}

.back-icon svg {
  width: 17px;
  height: 17px
}

.toolbar {
  display: flex;
  align-items: center;
  gap: clamp(7px, 2vw, 25px)
}

.top-tool {
  min-height: 42px;
  padding: 5px 4px;
  background: none;
  border: 0;
  font-weight: 800;
  font-size: .88rem;
  gap: 7px
}

.top-tool:hover,
.home-link:hover {
  color: #f5c469
}

.top-tool svg {
  width: 19px;
  height: 19px
}

#sound[aria-pressed=true] .sound-off,
#sound[aria-pressed=false] .sound-on {
  display: none
}

.game-page {
  padding: clamp(24px, 3.6vh, 42px) 0 24px
}

.intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: clamp(20px, 3vh, 34px)
}

h1,
h2,
h3,
p {
  margin: 0
}

.intro h1 {
  font: 700 clamp(2.8rem, 5vw, 4.3rem)/1 var(--serif);
  font-variation-settings: "opsz" 100;
  letter-spacing: -.084em;
  color: #1e4644
}

.intro h1 span {
  color: #b34736
}

.intro h1 i {
  color: #b07b29;
  font: normal .32em/1 Georgia, serif;
  vertical-align: top;
  position: relative;
  top: .12em;
  margin-left: .36em
}

.intro p {
  font-size: 1rem;
  color: #536158;
  margin: .42rem 0 0
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 10px
}

.action,
.restart,
.modal-primary,
.modal-secondary {
  border: 1px solid #bdb8a6;
  background: #fffbee;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 10px;
  min-height: 45px;
  padding: 9px 16px;
  font-weight: 900
}

.action {
  box-shadow: 0 2px 0 #dcd4c3
}

.action:hover,
.restart:hover,
.modal-secondary:hover {
  background: #f0e7ce;
  border-color: #809188
}

.print-action,
.modal-primary {
  color: #fff9e8;
  background: #235552;
  border-color: #194542
}

.print-action:hover,
.modal-primary:hover {
  background: #183f3f;
  color: white
}

.play-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(0, 1fr);
  align-items: stretch;
  gap: clamp(16px, 2.3vw, 30px)
}

.cabinet {
  --ball: #e45b42;
  --ball-mid: #c14632;
  --ball-dark: #8e3327;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #1c4847;
  border: 1px solid #173e3e;
  padding: 8px 8px 0;
  border-radius: 21px;
  box-shadow: 0 5px 0 #153a39, 0 10px 20px #60492c18;
  overflow: hidden
}

.stage {
  isolation: isolate;
  position: relative;
  min-height: 280px;
  flex: 1;
  border-radius: 13px;
  overflow: hidden;
  border: 1px solid #caa869;
  background: #0c383a;
  display: flex;
  align-items: center
}

.world {
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image: linear-gradient(0deg, #0a2d2e3b, transparent 45%), url("assets/scene.webp");
  background-size: cover;
  background-position: center
}

body[data-theme=forest] .world {
  background-image: url("assets/forest.webp")
}

body[data-theme=stars] .world {
  background-image: url("assets/stars.webp")
}

.pennants {
  display: flex;
  gap: 3px;
  align-items: start;
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  filter: drop-shadow(0 3px 2px #0025268c);
  z-index: 2
}

.pennants i {
  --flag: #e99b79;
  display: grid;
  place-items: center;
  width: clamp(30px, 3.2vw, 46px);
  height: clamp(40px, 4vw, 56px);
  color: #233f40;
  font: 700 clamp(1.18rem, 2vw, 1.7rem)/1 var(--serif);
  font-variation-settings: "opsz" 72;
  font-style: normal;
  background: linear-gradient(#0002, transparent 22%), var(--flag);
  padding-bottom: 6px;
  clip-path: polygon(0 0, 100% 0, 96% 77%, 50% 100%, 4% 77%);
  transform: rotate(4deg);
  transform-origin: top
}

.pennants i:nth-child(2) {
  --flag: #efc564;
  transform: translateY(2px) rotate(2deg)
}

.pennants i:nth-child(3) {
  --flag: #a5c5a1;
  transform: translateY(3px)
}

.pennants i:nth-child(4) {
  --flag: #eab27e;
  transform: translateY(2px) rotate(-2deg)
}

.pennants i:nth-child(5) {
  --flag: #97bfc5;
  transform: rotate(-4deg)
}

/* A full-width window keeps upcoming and outgoing balls in sight. */
.draw-window {
  --ball-size: clamp(78px, 13vw, 185px);
  position: absolute;
  inset: clamp(39px, 4vw, 56px) 0 47px;
  isolation: isolate;
  overflow: hidden;
  container-type: size;
  pointer-events: none;
}

@supports (width: 1cqh) {
  .draw-window {
    --ball-size: min(31cqw, 72cqh, 236px);
  }
}

.carousel-guide,
#number-drum {
  position: absolute;
  inset: 0;
}

.carousel-guide {
  background: radial-gradient(ellipse at 50% 52%, #142f2bc9, #102f2f4a 60%, transparent 81%);
}

/* A reflected edge below the balls gives the track a physical surface. */
.carousel-guide::after {
  content: "";
  position: absolute;
  top: calc(50% + var(--ball-size) * .45);
  left: 0;
  right: 0;
  height: 5px;
  border-block: 1px solid #f6d39377;
  background: linear-gradient(#f1cc82aa, #836334 41%, #4c442e 66%, #d5b173);
  box-shadow: 0 3px 7px #062227a6;
}

#number-drum {
  isolation: isolate;
  overflow: hidden;
}

.carousel-ball {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--ball-size);
  height: var(--ball-size);
  display: grid;
  place-items: center;
  border: 1px solid #fae1ad99;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 28% 14%, #fff8e6b8, transparent 23%),
    radial-gradient(circle at 35% 26%, var(--chip, #f4ad7a), var(--ball) 44%, var(--ball-mid) 66%, var(--ball-dark) 84%, #322e26);
  box-shadow:
    inset 1px 2px 2px #ffefc991,
    inset -2px -5px 5px #22292052,
    0 6px 9px -3px #082524d6;
  opacity: 0;
}

.drawing .carousel-ball {
  will-change: transform, opacity;
}

.carousel-face {
  position: relative;
  width: 74%;
  height: 74%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border: 1px solid #fff1ca;
  border-radius: 50%;
  color: #203e39;
  background: radial-gradient(ellipse at 32% 19%, #ffffef, #fff1ca 66%, #d9c592);
  outline: 1px solid #523c356e;
  outline-offset: 2px;
  box-shadow: inset -2px -3px 5px #b59d6c60, 0 2px 2px #302d2538;
}

.carousel-face small,
.carousel-face i {
  font: 1000 calc(var(--ball-size) * .062)/1.2 var(--sans);
  letter-spacing: .11em;
  color: #715330;
}

.carousel-face i {
  font-size: calc(var(--ball-size) * .047);
  letter-spacing: .07em;
}

.carousel-value {
  font: 700 calc(var(--ball-size) * .425)/.98 var(--serif);
  font-variation-settings: "opsz" 96;
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: -.075em;
  padding-right: .075em;
}

.draw-window .selector {
  position: absolute;
  left: 50%;
  width: clamp(15px, 3.8%, 24px);
  height: 11px;
  border-radius: 2px;
  background: linear-gradient(90deg, #b27d37, #fff1bc 44%, #e6b961 55%, #ac762d);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.top-selector {
  bottom: calc(50% + var(--ball-size) * .51);
  transform: translateX(-50%);
}

.bottom-selector {
  top: calc(50% + var(--ball-size) * .51);
  transform: translateX(-50%) rotate(180deg);
}

.revealed .carousel-ball.at-center .carousel-face {
  animation: face-glint .7s ease-out;
}

@keyframes face-glint {
  from { box-shadow: 0 0 0 2px #ffefb5ee, 0 0 14px #ffe3a18c; }
  to { box-shadow: inset -2px -3px 5px #b59d6c60, 0 2px 2px #302d2538; }
}

[data-column=B] {
  --chip: #dc7660;
  --ball: #ec795d;
  --ball-mid: #c7483d;
  --ball-dark: #8f3433
}

[data-column=I] {
  --chip: #ebbb63;
  --ball: #f6bf5b;
  --ball-mid: #cd8739;
  --ball-dark: #975423
}

[data-column=N] {
  --chip: #77b39d;
  --ball: #79c7aa;
  --ball-mid: #3d947e;
  --ball-dark: #1c6459
}

[data-column=G] {
  --chip: #83afbf;
  --ball: #7fbbcf;
  --ball-mid: #4e8fa6;
  --ball-dark: #29576a
}

[data-column=O] {
  --chip: #c39db8;
  --ball: #d1adca;
  --ball-mid: #a47da2;
  --ball-dark: #735477
}

.drawing .belt {
  will-change: transform;
}

.track {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 47px;
  background: linear-gradient(#0b292abb, #0b292aeb 45%, #17423ee6);
  border-top: 1px solid #e7c7859e;
  box-shadow: inset 0 3px 0 #0f2b27a3;
  overflow: hidden
}

.belt {
  display: flex;
  gap: clamp(9px, 1.4vw, 21px);
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%
}

.rack-ball {
  width: clamp(26px, 2.6vw, 37px);
  aspect-ratio: 1;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid #ead4a48c;
  display: grid;
  place-items: center;
  color: #203f40;
  font: 1000 clamp(.71rem, .95vw, .94rem)/1 var(--sans);
  background: radial-gradient(circle at 44% 42%, #ffefcf 33%, #decaa2 39%, transparent 42%), radial-gradient(at 32% 22%, #ffebd6 0%, var(--chip) 45%, var(--ball-dark) 90%);
  box-shadow: 1px 3px 4px #092022;
  transform: rotate(calc((var(--i) - 4) * 6deg))
}

.track {
  --rack-size: clamp(26px, 2.6vw, 37px);
  --rack-gap: clamp(9px, 1.4vw, 21px);
  --step: calc(var(--rack-size) + var(--rack-gap))
}

.belt-window {
  width: min(100%, calc(9 * var(--step) - var(--rack-gap) + 4px));
  height: 100%;
  overflow: hidden;
  display: grid;
  place-items: center
}

.belt {
  width: 100%;
  min-width: 0;
  gap: var(--rack-gap)
}

.rack-ball {
  width: var(--rack-size)
}

.track-pointer {
  position: absolute;
  top: -1px;
  left: calc(50% - 7px);
  border-top: 9px solid #f5cc79;
  border-inline: 7px solid transparent;
  filter: drop-shadow(0 2px 1px #112c29)
}

.console {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 13px 6px 15px;
  position: relative;
  background: repeating-linear-gradient(90deg, #ffffff02 0 2px, transparent 2px 7px)
}

.console:before,
.console:after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #caa766;
  box-shadow: inset 1px 1px 0 #eed5a0, 0 1px 1px #092f31;
  position: absolute;
  left: 8px;
  top: 48%
}

.console:after {
  left: auto;
  right: 8px
}

.draw-button,
.bingo-button {
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-weight: 1000;
  line-height: 1.2;
  min-height: 48px;
  transition: transform .15s, background-color .15s
}

.draw-button {
  border: 1px solid #eec895;
  border-bottom-color: #c89448;
  color: #49391f;
  background: #ffd078;
  padding: 10px clamp(17px, 2.3vw, 34px);
  box-shadow: 0 3px 0 #bb8747, 0 5px 7px #142f31;
  font-size: 1.09rem
}

.draw-button:hover:enabled {
  background: #ffdd94;
  transform: translateY(-1px)
}

.draw-button:active:enabled,
.bingo-button:active {
  transform: translateY(2px)
}

.draw-button:disabled {
  background: #e5c58a
}

.bingo-button {
  border: 1px solid #97b3a2;
  color: #fff2cc;
  background: #24534f;
  padding: 10px 17px;
  box-shadow: 0 2px 0 #102f30
}

.bingo-button:hover {
  background: #316661
}

.bingo-button svg {
  color: #f6cb72;
  width: 18px;
  fill: #f6cb7230
}

.board-panel {
  border: 1px solid #cfc6af;
  box-shadow: 0 4px 0 #dbd1b8;
  border-radius: 19px;
  background: #fffcf1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden
}

.board-header {
  padding: 17px 20px 12px;
  border-bottom: 1px dashed #cfc4ab
}

.board-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px
}

h2,
.team-card-title {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -.055em
}

.board-header h2 {
  font-size: clamp(1.35rem, 2vw, 1.85rem)
}

.range {
  border: 1px solid #c8d0b9;
  border-radius: 6px;
  color: #375749;
  background: #eff1df;
  padding: 3px 9px;
  font: 900 .85rem/1.25 var(--sans);
  white-space: nowrap;
  font-variant-numeric: tabular-nums
}

.board-meta {
  font: 750 .9rem/1.3 var(--sans);
  color: #5d685b;
  margin-top: 2px
}

#calls-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: clamp(3px, .32vw, 5px);
  align-content: start;
  padding: 14px 17px 13px;
  flex: 1
}

.number-cell {
  display: grid;
  place-items: center;
  background: #f3eddc;
  border: 1px solid #e0d7bf;
  border-radius: 7px;
  color: #334b43;
  font: 900 clamp(.83rem, 1.13vw, 1.16rem)/1 var(--sans);
  min-height: clamp(25px, 2.35vw, 36px);
  font-variant-numeric: tabular-nums
}

.number-cell.called {
  background: #356b61;
  border-color: #285d57;
  color: #fff9e3
}

.number-cell.passing {
  outline: 2px solid #bc842e;
  outline-offset: -2px;
}

.number-cell.latest {
  background: #f5bf65;
  border-color: #956e3e;
  color: #3e3424;
  box-shadow: inset 0 0 0 1px #fff0b2
}

.legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 1.5vw, 24px);
  padding: 11px 5px 12px;
  border-top: 1px dashed #cfc4ab;
  color: #576558;
  font: 800 .84rem/1.4 var(--sans)
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px
}

.legend b {
  font-weight: inherit
}

.legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid #aa946a
}

.latest-dot {
  background: #f5bf65
}

.legend .called-dot {
  background: #356b61;
  border-color: #285d57
}

.legend .left-dot {
  background: #f3eddc;
  border-color: #c9c1af
}

.history {
  display: flex;
  gap: clamp(14px, 2vw, 27px);
  align-items: center;
  position: relative;
  margin-top: 22px;
  padding: 13px 20px;
  background: #faf5e7;
  border: 1px solid #d6cbb2;
  border-radius: 15px
}

.history-title {
  display: flex;
  align-items: center;
  gap: 10px
}

.history h2 {
  font-size: clamp(1.05rem, 1.55vw, 1.4rem);
  line-height: 1.15
}

.history-icon {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  background: #e9ddbf;
  border-radius: 50%;
  color: #67583b;
  transform: rotate(-10deg)
}

.recent {
  display: flex;
  gap: 8px
}

.recent-ball {
  border-radius: 50%;
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border: 2px solid var(--chip);
  color: #213f3e;
  background: #fff5dd;
  font: 1000 1rem/1 var(--sans);
  box-shadow: 0 2px 0 #d5c9ae
}

.recent-ball.empty {
  background: #f1ebda;
  color: #8a816b;
  border: 1px dashed #beb39b;
  box-shadow: none
}

.recent-ball.is-latest {
  background: var(--chip)
}

.restart {
  margin-left: auto;
  font-size: .88rem;
  min-height: 38px;
  padding: 6px 12px;
  background: transparent;
  border-color: #c8bea8;
  border-radius: 8px
}

.restart svg {
  width: 16px;
  height: 16px
}

.game-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 14px 2px 0;
  color: #626c5e;
  font: .84rem/1.3 var(--sans);
  font-weight: 800
}

.game-foot>span {
  display: flex;
  align-items: center;
  gap: 6px
}

.game-foot svg {
  width: 16px;
  height: 16px
}

kbd {
  border: 1px solid #c8bfaa;
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 0 6px;
  background: #f9f4e6
}

#teams {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 20px
}

.team-card {
  background: #fffbec;
  border: 1px solid #c9bfa7;
  padding: 16px;
  border-radius: 16px
}

.team-card-title {
  font-size: 1.35rem;
  margin: 0 0 9px
}

.team-card[data-team="2"] .team-card-title {
  color: #984d36
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(var(--size), minmax(0, 1fr));
  gap: 5px
}

.team-cell {
  min-height: 42px;
  border: 1px solid #d3c8b0;
  border-radius: 8px;
  background: #f0e9d8;
  color: #576358;
  opacity: 1;
  font-weight: 950
}

.team-cell.available {
  background: #ffda86;
  color: #433c2a;
  border: 2px solid #ab7539
}

.team-cell.marked {
  background: #326b60;
  color: white;
  border-color: #21594f
}

.team-cell.free {
  color: #fff0a6
}

.team-result {
  padding: 7px 0 0;
  font-size: .88rem
}

.team-card.winner {
  border: 2px solid #b48b36
}

.game-dialog {
  width: min(450px, calc(100% - 32px));
  max-height: 90dvh;
  overflow: auto;
  border: 1px solid #c3b99e;
  border-radius: 21px;
  padding: 28px;
  background: #fff9e7;
  color: var(--ink);
  box-shadow: 0 18px 70px #11333855
}

.game-dialog::backdrop {
  background: #102d30a8
}

.game-dialog h2 {
  font-size: 1.8rem;
  margin: .45em 0 .2em;
  line-height: 1.1
}

.game-dialog p {
  margin: .6rem 0 1.2rem;
  color: #546158
}

.close-dialog {
  position: absolute;
  right: 13px;
  top: 13px;
  border: 0;
  border-radius: 50%;
  height: 36px;
  width: 36px;
  background: #eae3d1;
  display: grid;
  place-items: center
}

.dialog-symbol {
  display: grid;
  place-items: center;
  background: #f4d18c;
  color: #51412e;
  width: 44px;
  height: 44px;
  border-radius: 50%
}

.guide-steps {
  padding-left: 1.45em;
  margin: 1em 0
}

.guide-steps li {
  padding-left: .2em;
  margin-bottom: .8em
}

.guide-steps li::marker {
  color: #a1513a;
  font-weight: 1000
}

.dialog-actions {
  display: flex;
  gap: 9px;
  justify-content: flex-end
}

.winner-dialog {
  text-align: center;
  border: 4px double #a78046
}

.winner-stars {
  color: #be842b;
  font-size: 2rem;
  letter-spacing: .2em
}

.winner-dialog h2 {
  color: #ac4637;
  font-size: 3rem
}

#confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 5
}

.confetti-piece {
  position: absolute;
  left: var(--x);
  top: -16px;
  width: 9px;
  height: 15px;
  border-radius: 2px;
  background: var(--color);
  animation: fall 2s var(--delay) ease-in both
}

@keyframes fall {
  to {
    transform: translate(var(--drift), 105vh) rotate(var(--turn))
  }
}

body.is-expanded .game-page,
body.is-expanded .nav-inner {
  width: min(1540px, calc(100% - 36px))
}

body.is-expanded .number-cell {
  min-height: clamp(28px, 4vh, 50px)
}

@media(min-width:1450px) {
  .stage {
    min-height: 360px
  }
}

@media(max-width:920px) {

  .nav-inner,
  .game-page {
    width: calc(100% - 36px)
  }

  .play-layout {
    gap: 15px;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr)
  }

  .board-header {
    padding: 13px 14px 9px
  }

  #calls-grid {
    padding: 11px;
    gap: 3px
  }

  .number-cell {
    min-height: 25px
  }

  .intro h1 {
    font-size: 3.2rem
  }

  .stage {
    min-height: 245px
  }

  .action {
    padding: 8px 12px
  }

  .console {
    gap: 8px
  }

  .draw-button,
  .bingo-button {
    min-height: 44px
  }

  .bingo-button {
    padding-inline: 12px
  }
}

@media(max-width:690px) {

  .nav-inner,
  .game-page {
    width: calc(100% - 26px)
  }

  .nav-inner {
    height: 49px
  }

  .home-link {
    font-size: 1rem
  }

  .toolbar {
    gap: 8px
  }

  .top-tool {
    min-width: 34px;
    justify-content: center
  }

  .top-tool span {
    display: none
  }

  .intro {
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 16px
  }

  .intro h1 {
    font-size: clamp(2.75rem, 10vw, 3.4rem)
  }

  .intro p {
    font-size: .94rem
  }

  .page-actions {
    gap: 8px
  }

  .action {
    border-radius: 9px;
    min-height: 40px;
    gap: 6px;
    font-size: .9rem
  }

  .action svg {
    width: 17px;
    height: 17px
  }

  .game-page {
    padding-top: 20px
  }

  .play-layout {
    grid-template-columns: 1fr;
    gap: 17px
  }

  .cabinet {
    border-radius: 17px;
    padding: 6px 6px 0
  }

  .stage {
    min-height: clamp(225px, 58vw, 300px)
  }

  .draw-window {
    inset-block: 39px 36px;
  }

  .pennants i {
    width: 30px;
    height: 39px;
    font-size: 1.12rem
  }

  .track {
    height: 36px
  }

  .console {
    padding: 9px 6px 12px
  }

  .draw-button {
    min-height: 42px
  }

  .bingo-button {
    min-height: 42px
  }

  .board-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px
  }

  .board-header h2 {
    font-size: 1.35rem
  }

  .board-title-row {
    gap: 8px
  }

  .board-meta {
    font-size: .82rem
  }

  #calls-grid {
    padding: 12px;
    gap: 4px
  }

  .number-cell {
    min-height: clamp(25px, 6.3vw, 34px);
    font-size: .92rem
  }

  .legend {
    padding: 8px;
    gap: 17px
  }

  .history {
    padding: 12px;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px
  }

  .history-icon {
    width: 29px;
    height: 29px
  }

  .history-icon svg {
    width: 16px
  }

  .history-title {
    gap: 6px
  }

  .history h2 {
    font-size: 1.05rem
  }

  .recent {
    gap: 5px;
    order: 3;
    flex: 1 0 100%
  }

  .recent-ball {
    width: 30px;
    height: 30px
  }

  .restart {
    font-size: .8rem;
    min-height: 34px
  }

  .game-foot .key-help {
    display: none
  }

  #teams {
    gap: 8px
  }

  .team-card {
    padding: 9px
  }

  .team-grid {
    gap: 3px
  }

  .team-cell {
    padding: 0;
    min-height: 30px;
    border-radius: 6px
  }

  .team-card-title {
    font-size: 1.1rem
  }
}

@media(max-width:380px) {
  .action {
    padding: 7px 9px
  }

  .board-header {
    display: block
  }

  .legend {
    font-size: .8rem
  }

  .board-meta {
    margin-top: 4px
  }

  .track {
    --rack-size: 23px;
    --rack-gap: 7px
  }

  .team-cell {
    font-size: .85rem
  }
}

@media(max-height:540px) and (orientation:landscape) and (min-width:691px) {
  .nav-inner {
    height: 41px
  }

  .game-page {
    padding-top: 10px
  }

  .intro {
    margin-bottom: 10px
  }

  .intro h1 {
    font-size: 2.1rem
  }

  .intro p {
    font-size: .83rem;
    margin: .2rem 0 0
  }

  .stage {
    min-height: 222px
  }

  .action {
    min-height: 36px
  }

  .board-header {
    padding: 7px 12px
  }

  .board-header h2 {
    font-size: 1.24rem
  }

  #calls-grid {
    padding: 8px 11px
  }

  .number-cell {
    min-height: 19px
  }

  .legend {
    padding: 5px
  }

  .console {
    padding: 8px 5px 10px
  }

  .draw-button,
  .bingo-button {
    min-height: 34px;
    padding-block: 6px
  }

  .history {
    margin-top: 12px
  }

  .game-foot {
    margin-top: 8px
  }
}

@media(prefers-reduced-motion:reduce) {

  *,
  *::before,
  *::after {
    animation: none !important;
    scroll-behavior: auto !important;
    transition: none !important
  }
}

.teams-panel:has(#teams[hidden]) {
  display: none
}

.teams-panel {
  min-width: 0;
  align-self: stretch;
  border: 1px solid #cfc6af;
  box-shadow: 0 4px 0 #dbd1b8;
  border-radius: 19px;
  background: #fffcf1
}

.teams-panel .board-header {
  display: block
}

.teams-panel .board-meta {
  margin-top: 4px
}

.teams-panel #teams {
  padding: 10px;
  margin: 0;
  gap: 8px
}

.teams-panel .team-card {
  padding: 7px;
  border-color: #d7cfb8;
  background: #faf5e9
}

.teams-panel .team-cell {
  min-height: clamp(24px, 2.6vw, 39px);
  padding: 0
}

.teams-panel .team-grid {
  gap: 3px
}

.teams-panel .team-card-title {
  font-size: 1.08rem
}

.teams-panel .team-result {
  font-size: .8rem
}

.play-layout:has(#teams:not([hidden])) {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr)
}

.play-layout:has(#teams:not([hidden])) .board-panel {
  grid-column: 1/-1
}

.play-layout:has(#teams:not([hidden])) #calls-grid {
  grid-template-columns: repeat(15, minmax(0, 1fr))
}

.play-layout:has(#teams:not([hidden])) .stage {
  min-height: 260px
}

@media(max-width:690px) {
  .play-layout:has(#teams:not([hidden])) {
    grid-template-columns: minmax(0, 1fr)
  }

  .play-layout:has(#teams:not([hidden])) #calls-grid {
    grid-template-columns: repeat(10, minmax(0, 1fr))
  }

  .play-layout:has(#teams:not([hidden])) .stage {
    min-height: 220px
  }

  .teams-panel .team-cell {
    min-height: 31px
  }
}

.team-redeal {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 16px 0;
  padding: 12px;
  border: 1px solid #d5cbb5;
  border-radius: 9px;
  background: #faf2dc
}

.team-redeal input {
  width: 20px;
  height: 20px;
  accent-color: #275b51
}

.team-redeal small {
  display: block;
  font-size: .85rem;
  color: #52645c;
  font-weight: 650
}
