.game-board:is(.board-elevator, .board-drum-mail, .board-beat-lane, .board-rail-tickets) {
  box-sizing: border-box;
  width: min(100%, 38rem);
  padding: clamp(.7rem, 2.75vw, 1.15rem);
  border: 1px solid;
  border-radius: 1.15rem;
}

.game-board:is(.board-elevator, .board-drum-mail, .board-beat-lane, .board-rail-tickets) .board-tiles {
  display: grid;
  min-width: 0;
  gap: clamp(.3rem, 1.3vw, .65rem);
}

.game-board:is(.board-elevator, .board-drum-mail, .board-beat-lane, .board-rail-tickets) .board-tile {
  box-sizing: border-box;
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  width: 100%;
  min-width: 0;
  aspect-ratio: auto;
  margin: 0;
  transition: background-color .12s, border-color .12s, box-shadow .12s, transform .12s;
}

.game-board:is(.board-elevator, .board-drum-mail, .board-beat-lane, .board-rail-tickets) button.board-tile:focus-visible {
  outline: 3px solid #b44748;
  outline-offset: 2px;
}

.game-board:is(.board-elevator, .board-drum-mail, .board-beat-lane, .board-rail-tickets) button.board-tile:active:not(:disabled) {
  transform: translateY(2px);
}

.game-board:is(.board-elevator, .board-drum-mail, .board-beat-lane, .board-rail-tickets) .board-pre:empty,
.game-board:is(.board-elevator, .board-drum-mail, .board-beat-lane, .board-rail-tickets) .board-tiles:empty {
  display: none;
}

.game-board.board-elevator {
  width: min(100%, 25rem);
  color: #292044;
  background: linear-gradient(145deg, #f8f1ff, #dacff1 72%);
  border-color: #c1aeda;
  box-shadow: inset 0 0 0 3px #f9f2ff7a;
}

.game-board.board-elevator .board-tiles {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: .35rem;
}

.elevator-display {
  display: grid;
  justify-items: center;
  justify-content: center;
  gap: .35rem;
  margin-bottom: .65rem;
  padding: .55rem .65rem;
  color: #bff7dd;
  background: #22203c;
  border: 2px solid #b8a6d1;
  border-radius: .55rem;
  box-shadow: inset 0 2px 6px #141224a8;
  font-variant-numeric: tabular-nums;
}

.elevator-display-memory { margin-bottom: 0; }
.elevator-display-label { font-size: .82rem; font-weight: 800; }

.elevator-display-light,
.elevator-stops {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .27rem;
}

.elevator-display-light i {
  display: block;
  width: .46rem;
  height: .46rem;
  background: #bff7dd;
  border-radius: 50%;
}

.elevator-display-light i:nth-child(2) { opacity: .72; }
.elevator-display-light i:nth-child(3) { opacity: .44; }

.elevator-stops > span {
  padding: .2rem .45rem;
  color: #e6fff0;
  background: #39435a;
  border-radius: .3rem;
  font-size: .93rem;
  font-weight: 850;
}

.game-board.board-elevator .board-tile {
  min-height: 3.3rem;
  padding: .24rem;
  color: #3b2d61;
  background: #fcf8ff;
  border: 2px solid #a595be;
  border-radius: 50%;
  box-shadow: 0 3px 0 #ac9abc, inset 0 0 0 2px #dfd5ed;
}

.game-board.board-elevator .board-tile:is([aria-pressed="true"], .is-selected) {
  color: #2c2361;
  background: #dff3ed;
  border-color: #4b8271;
  box-shadow: 0 2px 0 #4b8271, inset 0 0 0 2px #aee8c9;
}

.elevator-key-face {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: .14rem;
  white-space: nowrap;
}

.elevator-floor { font-size: 1.26rem; line-height: 1; font-variant-numeric: tabular-nums; }
.elevator-floor-unit { font-size: .71rem; font-weight: 800; }

.game-board.board-drum-mail {
  width: min(100%, 29rem);
  color: #392643;
  background: #43345c;
  border-color: #362746;
  box-shadow: inset 0 0 0 3px #77668c;
}

.game-board.board-drum-mail .board-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.game-board.board-drum-mail .board-tile {
  min-height: clamp(4.35rem, 15vw, 6.15rem);
  padding: .45rem .35rem;
  color: #322047;
  background: #ffe2a4;
  border: 2px solid #f8cc76;
  border-radius: .85rem;
  box-shadow: inset 0 0 0 2px #fff8d5, 0 4px 0 #2b2240;
}

.game-board.board-drum-mail .board-tile:nth-child(2) {
  color: #37225c;
  background: #d8c4ff;
  border-color: #a489d8;
  box-shadow: inset 0 0 0 2px #ede6ff, 0 4px 0 #2b2240;
}

.game-board.board-drum-mail .board-tile:is([aria-pressed="true"], .is-selected) {
  color: #192f52;
  background: #b6efd8;
  border-color: #59af98;
  box-shadow: inset 0 0 0 2px #dffbf2, 0 2px 0 #1c3440;
}

.drum-face {
  display: grid;
  justify-items: center;
  gap: .44rem;
  white-space: nowrap;
}

.drum-face strong { font-size: 1rem; }

.drum-mark {
  display: block;
  width: .62rem;
  height: .62rem;
  background: currentColor;
  border-radius: 100vw;
}

.drum-mark.is-long { width: 1.9rem; }

.drum-pattern {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .4rem;
}

.drum-pattern-beat {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.5rem;
  color: #453258;
  background: #ffe9be;
  border-radius: .5rem;
}

.drum-pattern-beat:has(.drum-mark.is-long) { background: #e5d6ff; }
.drum-pattern-beat .drum-mark.is-long { width: 1.3rem; }

.game-board.board-beat-lane {
  color: #e4eaff;
  background: #262b4b;
  border-color: #464b77;
  box-shadow: inset 0 0 0 3px #666c9c53;
}

.game-board.board-beat-lane .board-tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.game-board.board-beat-lane .board-tile {
  min-height: 3.65rem;
  padding: .15rem;
  color: #c9f8ea;
  background: #363d67;
  border: 1.5px solid #8193cf;
  border-radius: .56rem;
  box-shadow: 0 3px 0 #181d39;
}

.game-board.board-beat-lane .board-tile:has(.beat-pad.is-stop) { color: #ffdce7; border-style: dashed; }

.game-board.board-beat-lane .board-tile:is([aria-pressed="true"], .is-selected) {
  color: #22294b;
  background: #b6f1e0;
  border-color: #80e2c8;
  box-shadow: inset 0 0 0 1px #edfffa, 0 2px 0 #253b57;
}

.beat-pad { display: grid; justify-items: center; gap: .17rem; line-height: 1; }
.beat-symbol { font-size: 1.35rem; font-weight: 900; }
.beat-position { font-size: .72rem; font-weight: 800; opacity: .9; }

.game-board.board-rail-tickets {
  color: #59334f;
  background: #f1e5f3;
  border-color: #dfc5e0;
  box-shadow: inset 0 0 0 3px #fff5ffb5;
}

.game-board.board-rail-tickets .board-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.rail-map {
  display: grid;
  grid-template-columns: minmax(3rem, 1fr) minmax(3.3rem, 1.1fr) minmax(3rem, 1fr);
  align-items: center;
  margin-bottom: .7rem;
  padding: .5rem .35rem;
  color: #fff2fb;
  background: #603a6d;
  border-radius: .6rem;
  text-align: center;
}

.rail-stop, .rail-walk { display: grid; justify-items: center; gap: .12rem; }
.rail-stop > span, .rail-walk > span { font-size: .78rem; font-weight: 800; }
.rail-stop > strong { font-size: 1.02rem; font-variant-numeric: tabular-nums; }

.rail-walk > i {
  display: block;
  width: 88%;
  height: .24rem;
  margin-top: .28rem;
  border-top: 3px dotted #e5bfea;
}

.game-board.board-rail-tickets .board-tile {
  min-height: 3.5rem;
  padding: .4rem .3rem;
  color: #57315e;
  background: #fffaff;
  border: 1.5px solid #b892bd;
  border-radius: .55rem;
  box-shadow: 0 3px 0 #cab0d0;
}

.game-board.board-rail-tickets .board-tile:is([aria-pressed="true"], .is-selected) {
  color: #3d2150;
  background: #e5d5ff;
  border-color: #835eb5;
  box-shadow: inset 0 0 0 1px #a881d8, 0 2px 0 #9e78c9;
}

.rail-ticket {
  display: grid;
  grid-template-columns: auto auto;
  place-items: center;
  justify-content: center;
  column-gap: .4rem;
  white-space: nowrap;
}

.rail-ticket > strong { font-size: 1.15rem; line-height: 1.05; font-variant-numeric: tabular-nums; }
.rail-ticket > span:last-child { grid-column: 2; font-size: .72rem; font-weight: 800; }

.rail-car {
  grid-row: span 2;
  width: .84rem;
  height: .85rem;
  border: 2px solid currentColor;
  border-radius: .27rem .27rem .16rem .16rem;
  background: linear-gradient(currentColor, currentColor) center .25rem / .48rem 2px no-repeat;
}

@media (min-width: 38rem) {
  .game-board.board-beat-lane .board-tiles {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .game-board:is(.board-elevator, .board-drum-mail, .board-beat-lane, .board-rail-tickets) .board-tile { transition: none; }
}

.game-board:is(.board-soccer, .board-basketball, .board-bubble-arcade, .board-ring-toss) {
  box-sizing: border-box;
  width: min(100%, 36rem);
  padding: clamp(.65rem, 2.7vw, 1rem);
  border: 1px solid;
  border-radius: 1.15rem;
}

.game-board:is(.board-soccer, .board-basketball, .board-bubble-arcade, .board-ring-toss) .board-tiles {
  display: grid;
  min-width: 0;
  gap: clamp(.3rem, 1.5vw, .62rem);
}

.game-board:is(.board-soccer, .board-basketball, .board-bubble-arcade, .board-ring-toss) .board-tile {
  display: grid;
  align-content: center;
  place-items: center;
  width: 100%;
  min-width: 0;
  aspect-ratio: auto;
  margin: 0;
}

.game-board:is(.board-soccer, .board-basketball, .board-bubble-arcade, .board-ring-toss) button.board-tile:focus-visible {
  outline: 3px solid #7337a0;
  outline-offset: 2px;
}

.game-board.board-soccer {
  padding-bottom: 1.25rem;
  background: repeating-linear-gradient(90deg, #8dcc90 0 12.5%, #9ad59c 12.5% 25%);
  border-color: #66a869;
}

.game-board.board-soccer .board-tiles {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 28rem;
  margin-inline: auto;
  padding: .42rem;
  background: #70ab7966;
  border: 3px solid #f5fff6;
  border-bottom: 0;
  border-radius: .55rem .55rem 0 0;
  box-shadow: 0 -2px 0 #427a50, 2px 0 0 #427a50, -2px 0 0 #427a50;
}

.game-board.board-soccer .board-tile {
  min-height: 3.4rem;
  padding: .38rem .15rem;
  color: #274c32;
  background-color: #eefbea;
  background-image: repeating-linear-gradient(135deg, transparent 0 8px, #d4e7d135 8px 9px);
  border: 1px solid #5f9e61;
  border-radius: .4rem;
  box-shadow: none;
}

.game-board.board-soccer .board-tile:is(:disabled, .is-disabled, :has(.soccer-spot.is-covered)) {
  color: #4a2734;
  background: repeating-linear-gradient(145deg, #f3d5d9 0 7px, #eac5d2 7px 10px);
  border: 1px dashed #945c71;
  opacity: 1;
}

.game-board.board-soccer .board-tile:is([aria-pressed="true"], .is-selected) {
  color: #1c422e;
  background: #ffc978;
  border: 2px solid #73603b;
  box-shadow: inset 0 0 0 2px #ffebae;
}

.soccer-spot { font-size: .95rem; font-weight: 850; }
.soccer-spot.is-covered { font-size: .83rem; }

.game-board.board-basketball {
  background: repeating-linear-gradient(90deg, #ffd9ac 0 34px, #f2bb88 34px 35px, #ffe3bd 35px 70px);
  border-color: #dfa96f;
}

.game-board.board-ring-toss {
  background: repeating-linear-gradient(135deg, #fff0b7 0 16px, #ffe7a7 16px 32px);
  border-color: #e0bd71;
}

.game-board:is(.board-basketball, .board-ring-toss) .board-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.game-board:is(.board-basketball, .board-ring-toss) .board-tile {
  min-height: 3.5rem;
  padding: .35rem;
  color: #553214;
  background: #fff7e9;
  border: 1px solid #bd8657;
  border-radius: .6rem;
  box-shadow: 0 3px 0 #ac7654a0;
}

.game-board.board-ring-toss .board-tile {
  color: #55214b;
  background: #fff4df;
  border-color: #ae776a;
  box-shadow: 0 3px 0 #b67a64a0;
}

.game-board:is(.board-basketball, .board-ring-toss) .board-tile:is([aria-pressed="true"], .is-selected) {
  color: #452544;
  background: #ffe0ee;
  border: 2px solid #b06689;
  box-shadow: 0 2px 0 #a36b83;
}

.arcade-power-option {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: center;
  justify-items: start;
  align-items: center;
  column-gap: .38rem;
  row-gap: .16rem;
}

.arcade-power-option > strong { font-size: 1.16rem; line-height: 1; font-variant-numeric: tabular-nums; }

.basketball-ball, .fairground-ring {
  box-sizing: border-box;
  grid-row: span 2;
  display: block;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
}

.basketball-ball {
  border: 1.5px solid #773921;
  background: linear-gradient(35deg, transparent 45%, #773921 46% 54%, transparent 55%),
    linear-gradient(108deg, transparent 46%, #773921 47% 53%, transparent 54%), #f09a57;
}

.fairground-ring {
  height: .83rem;
  border: 3px solid #b54283;
  transform: rotate(-22deg);
  box-shadow: 0 1px 0 #71366c;
}

.arcade-power-bars { display: flex; gap: 2px; }
.arcade-power-bars > span { display: block; width: .29rem; height: .29rem; background: #dfc8bb; border-radius: 1px; }
.arcade-power-bars[data-level="1"] > span:nth-child(-n+1),
.arcade-power-bars[data-level="2"] > span:nth-child(-n+2),
.arcade-power-bars[data-level="3"] > span:nth-child(-n+3),
.arcade-power-bars[data-level="4"] > span:nth-child(-n+4),
.arcade-power-bars[data-level="5"] > span { background: #8c4842; }

.game-board.board-bubble-arcade {
  background: radial-gradient(circle at 50% 10%, #5c5596, #302b60);
  border-color: #393161;
}

.game-board.board-bubble-arcade .board-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.game-board.board-bubble-arcade .board-tile {
  min-height: clamp(3.5rem, 15vw, 4.8rem);
  padding: 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: .6rem;
  box-shadow: none;
}

.game-board.board-bubble-arcade button.board-tile:focus-visible { outline-color: #fbf3b3; }

.bubble-cell {
  --shell: #d1bafa;
  --rim: #b996ec;
  display: grid;
  place-items: center;
  width: min(100%, 4.3rem);
  aspect-ratio: 1;
  padding: .1rem;
  color: #2e2445;
  background: radial-gradient(circle at 29% 21%, #fffc 0 9%, transparent 10%), var(--shell);
  border: 2px solid var(--rim);
  border-radius: 50%;
  box-shadow: inset 0 -3px 7px #57446b35, 0 2px 1px #221e46;
  font-size: clamp(.63rem, 2.7vw, .94rem);
  font-weight: 850;
  line-height: 1.2;
  white-space: nowrap;
}

.bubble-cell.tone-rose { --shell: #f8b9d3; --rim: #e693ba; }
.bubble-cell.tone-blue { --shell: #b5ddfa; --rim: #87bee6; }
.bubble-cell.tone-green { --shell: #b6f0c8; --rim: #81d7a0; }
.bubble-cell.tone-gold { --shell: #ffeba4; --rim: #e3c772; }
.bubble-cell.tone-orange { --shell: #ffccaa; --rim: #e7a17b; }

.game-board.board-bubble-arcade .board-tile:is([aria-pressed="true"], .is-selected) .bubble-cell {
  color: #fff2ff;
  background: #312954;
  border: 2px dashed var(--rim);
  box-shadow: none;
  transform: scale(.84);
  animation: arcade-bubble-burst .22s ease-out both;
}

@keyframes arcade-bubble-burst {
  0% { transform: scale(1.1); }
  42% { transform: scale(.67); }
  100% { transform: scale(.84); }
}

@media (min-width: 33rem) {
  .game-board:is(.board-basketball, .board-ring-toss) .board-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .game-board.board-bubble-arcade .board-tile .bubble-cell { animation: none !important; }
}
