:root {
  --blue: #0067b1;
  --deep-blue: #004f8d;
  --lime: #86b83d;
  --yellow: #ffc820;
  --orange: #f47b35;
  --ink: #12334a;
  --paper: #f7f8f3;
  --line: #dce5dc;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background: linear-gradient(135deg, #f9faf6, #e9f1e9);
}

button {
  font: inherit;
}

.app-shell {
  width: min(1680px, calc(100% - 34px));
  min-height: 100vh;
  margin: auto;
  display: grid;
  grid-template-columns: minmax(310px, .6fr) minmax(680px, 1.4fr);
  gap: clamp(24px, 4vw, 42px);
  align-items: start;
  padding: clamp(28px, 5vh, 42px) 0;
}

.call-panel {
  min-height: min(88vh, 970px);
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3vw, 48px);
  background: white;
  border-radius: 28px;
  box-shadow: 0 22px 55px rgba(4, 75, 117, .13);
}

@media (min-width:901px) {
  .call-panel {
    position: sticky;
    top: clamp(28px, 5vh, 42px);
    align-self: start;
  }
}

.school-logo {
  display: block;
  width: min(100%, 270px);
  height: auto;
  object-fit: contain;
  object-position: left center;
}

.call-copy {
  margin: clamp(42px, 9vh, 120px) 0 0;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--orange);
  font-family: "DM Mono", monospace;
  font-size: clamp(11px, .8vw, 14px);
  font-weight: 500;
  letter-spacing: .13em;
}

.round-label {
  margin: 0;
  color: var(--deep-blue);
  font-size: clamp(24px, 2vw, 34px);
  font-weight: 800;
}

.number-stage {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  padding: clamp(20px, 4vh, 54px) 0;
}

.bingo-ball {
  width: clamp(220px, 19vw, 330px);
  aspect-ratio: 1.25;
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(9px, 1vw, 18px);
  color: white;
  background: linear-gradient(145deg, #91bf42, #6aa32b);
  border: clamp(7px, .65vw, 12px) solid white;
  outline: 2px solid #c6dfbc;
  box-shadow: 0 15px 30px rgba(68, 121, 27, .25), inset 0 -11px 0 rgba(38, 91, 13, .12);
}

.bingo-ball span,
.bingo-ball strong {
  color: white;
  font-family: "DM Mono", monospace;
  font-size: clamp(76px, 7vw, 122px);
  font-weight: 500;
  letter-spacing: -.12em;
  line-height: .8;
}

.bingo-ball.animate {
  animation: pop .45s cubic-bezier(.19, 1.55, .45, 1);
}

@keyframes pop {
  0% {
    transform: scale(.68) rotate(-8deg)
  }

  100% {
    transform: scale(1) rotate(0)
  }
}

.number-stage p {
  min-height: 20px;
  margin: 18px 0 0;
  color: #4f6772;
  font-size: clamp(14px, 1.1vw, 19px);
  font-weight: 800;
}

.controls {
  display: flex;
  gap: 12px;
  margin-top: auto;
}

.draw-button {
  flex: 1;
  cursor: pointer;
  border: 0;
  border-radius: 12px;
  color: white;
  background: var(--orange);
  padding: clamp(15px, 1.7vh, 24px);
  font-size: clamp(15px, 1.2vw, 20px);
  font-weight: 800;
  box-shadow: 0 5px 0 #cf5b27;
  transition: transform .15s, box-shadow .15s;
}

.draw-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 0 #cf5b27
}

.draw-button:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 #cf5b27
}

.draw-button:disabled {
  cursor: default;
  background: #859499;
  box-shadow: 0 5px 0 #66757a
}

.button-icon {
  margin-right: 8px
}

.reset-button {
  cursor: pointer;
  width: 64px;
  border: 2px solid #cbd9ce;
  border-radius: 12px;
  color: var(--deep-blue);
  background: white;
  font-size: 32px;
  line-height: 1;
}

.reset-button:hover {
  background: #eaf3e7
}

.keyboard-hint {
  margin: 16px 0 0;
  color: #71838a;
  font-family: "DM Mono", monospace;
  font-size: 11px;
  line-height: 1.5;
}

.counter {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 20px;
  color: #6e8793;
  font-size: 14px;
  font-family: "DM Mono", monospace;
}

.counter strong {
  color: var(--deep-blue);
  font-size: 40px;
  font-weight: 500;
}

.bingo-board {
  min-height: min(88vh, 970px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: white;
  border-radius: 28px;
  box-shadow: 0 22px 55px rgba(4, 75, 117, .13);
}

.board-heading {
  padding: clamp(18px, 2.5vh, 34px) clamp(25px, 3.5vw, 60px) clamp(12px, 1.5vh, 20px);
  color: white;
  background: var(--blue);
}

.board-heading h1 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(8px, 1vw, 18px);
  margin: 0;
  font-family: "DM Mono", monospace;
  font-size: clamp(54px, 6.7vw, 118px);
  font-weight: 500;
  line-height: .9;
  text-align: center;
}

.board-heading h1 span:nth-child(1) {
  color: #ffc820
}

.board-heading h1 span:nth-child(2) {
  color: #c8e591
}

.board-heading h1 span:nth-child(3) {
  color: #fff
}

.board-heading h1 span:nth-child(4) {
  color: #ffb483
}

.board-heading h1 span:nth-child(5) {
  color: #b7dcf4
}

.board-heading p {
  margin: 17px 0 0;
  color: #d6eafa;
  text-align: center;
  font-family: "DM Mono", monospace;
  font-size: clamp(11px, .9vw, 15px);
}

.called-numbers {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(5px, .65vw, 12px);
  padding: clamp(10px, 1.7vh, 22px) clamp(12px, 1.5vw, 26px);
  background: linear-gradient(135deg, #f9fbf7, #edf5ea);
}

.number-column {
  min-width: 0;
  display: grid;
  grid-auto-rows: min-content;
  align-content: start;
  gap: clamp(4px, .55vh, 8px);
}

.empty-state {
  grid-column: 1/-1;
  align-self: center;
  text-align: center;
  color: #8b9a91;
  font-size: clamp(13px, 1.1vw, 18px)
}

.called-chip {
  width: 100%;
  aspect-ratio: 2;
  display: grid;
  place-items: center;
  border-radius: 9px;
  border: 2px solid #bad6b0;
  color: #4d8323;
  background: #eff7e9;
  font-family: "DM Mono", monospace;
  font-size: clamp(18px, 1.8vw, 30px);
  font-weight: 700;
  animation: arrive .25s ease-out;
}

.called-chip.latest {
  color: white;
  background: var(--orange);
  border-color: var(--orange);
  box-shadow: 0 3px 0 #cf5b27
}

@keyframes arrive {
  from {
    opacity: 0;
    transform: scale(.55)
  }

  to {
    opacity: 1;
    transform: scale(1)
  }
}

@media (max-width:900px) {
  body {
    overflow: auto
  }

  .app-shell {
    width: min(700px, calc(100% - 32px));
    grid-template-columns: 1fr;
    padding: 12px 0;
    gap: 28px
  }

  .call-panel,
  .bingo-board {
    min-height: auto
  }

  .call-copy {
    margin-top: 42px
  }

  .number-stage {
    padding: 30px 0
  }

  .bingo-ball {
    width: 220px
  }

  .called-numbers {
    min-height: 420px
  }

  .keyboard-hint {
    display: none
  }
}
