@font-face {
  font-family: "Meal Arcade";
  src: url("./public/fonts/arcade-display.woff") format("woff");
  font-display: swap;
}
:root {
  --ink: #28283c;
  --paper: #edf8ff;
  --red: #83c9f2;
  --cherry: #4b91c5;
  --gold: #ffcc50;
  --pixel: "Meal Arcade", "Arial Black", sans-serif;
  color: var(--ink);
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); }
button, select, a { font: inherit; color: inherit; }
button, select { cursor: pointer; }
button { touch-action: manipulation; }
button:disabled, select:disabled { cursor: default; }
:focus-visible { outline: 3px solid #235ac0; outline-offset: 4px; }
.symbols, .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: square; stroke-linejoin: miter; }
.masthead, footer { display: flex; justify-content: space-between; align-items: center; padding-inline: clamp(18px, 4vw, 72px); }
.masthead { height: 72px; border-bottom: 3px solid var(--ink); }
.brand, .history-button, .location { display: inline-flex; align-items: center; gap: 9px; }
.brand { font: 29px/1 var(--pixel); white-space: nowrap; }
.brand b { font-weight: normal; color: #b03e32; }
.brand img { width: 45px; height: 45px; image-rendering: pixelated; }
.history-button, .actions > * { background: var(--paper); border: 2px solid var(--ink); box-shadow: 3px 3px var(--ink); font-size: 14px; font-weight: 700; }
.history-button { padding: 8px 13px; }
.history-button .icon { width: 16px; height: 16px; }
.stage { position: relative; isolation: isolate; min-height: calc(100svh - 112px); display: grid; place-items: center; padding: 30px 0; background: #c9eaff; }
.city-scene { position: absolute; z-index: -1; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center bottom; image-rendering: pixelated; pointer-events: none; }
.game { width: min(610px, calc(100% - 96px)); display: grid; justify-items: center; gap: 25px; }
.cabinet { position: relative; width: 100%; isolation: isolate; filter: drop-shadow(7px 8px 0 #38334b54); }
.marquee { position: relative; z-index: 1; padding: 9px; border: 4px solid var(--ink); background: #a9dcfa; box-shadow: inset 4px 4px #e0f4ff, inset -5px -5px #579dce, 0 4px var(--ink); }
.marquee-face { display: flex; align-items: center; justify-content: space-evenly; gap: 7px; min-height: 91px; padding: 7px; border: 3px solid var(--ink); background: #78c4f2; box-shadow: inset 0 4px #bce6ff, inset 0 -5px #579dce; }
.spark { width: 22px; aspect-ratio: 1; flex: none; background: #ffe08a; clip-path: polygon(40% 0,60% 0,60% 27%,75% 27%,75% 40%,100% 40%,100% 60%,73% 60%,73% 74%,60% 74%,60% 100%,40% 100%,40% 74%,26% 74%,26% 60%,0 60%,0 40%,26% 40%,26% 27%,40% 27%); }
.machine-body { position: relative; margin: 0 10px; background: var(--red); border: 4px solid var(--ink); border-top: 0; padding: 16px 19px 0; box-shadow: inset 6px 0 #ff9465, inset -7px 0 #b73f3b, inset 0 -7px var(--cherry); }
.bezel { background: var(--ink); border: 3px solid #5d3240; padding: 0 10px 12px; box-shadow: 3px 3px #fc9464; }
.display-heading { display: flex; align-items: center; justify-content: center; gap: 14px; height: 32px; }
#machine-status, .tile span, .dialog-top { font: 700 12px/1.25 ui-monospace, "Courier New", monospace; letter-spacing: .1em; text-transform: uppercase; }
#machine-status { color: #a8ead3; }
.grille { width: 38px; height: 4px; background: repeating-linear-gradient(90deg, #69677c 0 4px, transparent 4px 8px); }
.reels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.reel { position: relative; height: clamp(113px, 19vh, 157px); overflow: hidden; background: #fff5d9; }
.reel::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-inline: 4px solid #d1bba2; background: linear-gradient(to bottom, #b2a598 0 4%, #e2cfb6 4% 9%, #f4e4c7 9% 14%, transparent 14% 86%, #f4e4c7 86% 91%, #e2cfb6 91% 96%, #b2a598 96%); }
.strip, .tile { width: 100%; height: 100%; }
.tile { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.tile img { height: 64%; width: 85%; object-fit: contain; image-rendering: pixelated; }
.tile span { font-size: 12px; color: #614c42; }
.deck { display: flex; align-items: center; justify-content: space-evenly; gap: 13px; padding: 17px 0 24px; }
.speaker { width: 32px; height: 18px; background: repeating-linear-gradient(0deg, #89333c 0 3px, #ff9163 3px 4px, transparent 4px 7px); }
.spin-button { display: inline-flex; align-items: center; justify-content: center; gap: 13px; width: min(72%, 322px); min-height: 55px; padding: 9px; border: 3px solid var(--ink); background: var(--gold); box-shadow: inset 3px 3px #fff0a1, inset -3px -3px #eaa038, 0 5px #99613b, 0 8px var(--ink); font: clamp(17px, 3.1vw, 30px)/1.2 var(--pixel); text-transform: uppercase; }
.spin-button:hover:enabled { background: #ffdc69; }
.spin-button:active:enabled { translate: 0 4px; box-shadow: inset 2px 2px #ffef9c, 0 2px #99613b, 0 4px var(--ink); }
.spin-button:disabled { background: #e5ba66; }
.spin-button .icon { stroke-width: 3; width: 23px; height: 23px; }
.lever { position: absolute; z-index: -1; right: -20px; bottom: 22%; width: 30px; height: 23px; background: #938ba2; border: 3px solid var(--ink); box-shadow: inset 0 -5px #615d76; }
.lever i { position: absolute; right: -2px; bottom: 4px; width: 11px; height: 59px; background: #c6c3cb; border: 3px solid var(--ink); transform-origin: center bottom; transition: transform .2s; }
.lever i::after { content: ""; position: absolute; width: 22px; height: 22px; right: -10px; top: -15px; background: var(--red); border: 3px solid var(--ink); box-shadow: inset 4px 4px #ff9663, inset -4px -4px var(--cherry); }
.cabinet.spinning .lever i { transform: scaleY(.48); }
.filter-bar { display: flex; justify-content: center; max-width: 100%; gap: 12px; }
.filter-bar label { display: flex; align-items: center; position: relative; min-width: 0; background: var(--paper); border: 2px solid var(--ink); box-shadow: 3px 3px #343044; }
.filter-bar label > .icon { width: 16px; height: 16px; pointer-events: none; position: absolute; left: 11px; }
.filter-bar label::after { content: ""; position: absolute; right: 12px; width: 6px; height: 6px; border-right: 2px solid; border-bottom: 2px solid; transform: translateY(-2px) rotate(45deg); pointer-events: none; }
select { appearance: none; width: 172px; max-width: 100%; min-width: 0; height: 39px; border: 0; background: transparent; padding: 0 28px 0 35px; font-size: 14px; font-weight: bold; text-overflow: ellipsis; }
.feed-message, noscript { margin: -9px 0 0; padding: 6px 10px; background: var(--paper); font-size: 14px; text-align: center; }
.feed-message button { border: 0; background: transparent; text-decoration: underline; font-weight: bold; }
footer { gap: 12px; min-height: 40px; border-top: 3px solid var(--ink); font: 12px ui-monospace, monospace; }
.location { gap: 6px; }
.location .icon { width: 14px; height: 14px; }
footer a { text-decoration: none; }
footer a:hover { text-decoration: underline; }
dialog { width: min(396px, calc(100vw - 36px)); padding: 0; border: 3px solid var(--ink); color: var(--ink); background: var(--paper); box-shadow: 7px 7px var(--ink); max-height: 90svh; }
dialog::backdrop { background: #242437a8; }
.dialog-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 12px 7px 19px; color: var(--paper); background: var(--ink); }
.dialog-top h2 { margin: 0; font: inherit; }
.close { display: grid; place-items: center; width: 37px; height: 37px; padding: 0; color: var(--paper); border: none; background: none; }
.dialog-content { padding: 20px 23px 24px; }
#result .dialog-content { text-align: center; }
.prize { width: 82px; height: 82px; image-rendering: pixelated; }
#result-name { margin: 0; font-size: 26px; line-height: 1.1; overflow-wrap: anywhere; }
#result-details, .address { font-size: 14px; }
.address { display: flex; align-items: center; justify-content: center; gap: 6px; color: #595569; }
.address .icon { width: 15px; }
.actions { display: flex; justify-content: center; gap: 10px; margin-top: 20px; }
.actions > * { padding: 10px 12px; text-decoration: none; }
.actions .primary { background: var(--gold); }
#history { list-style: none; padding: 0; margin: 0; }
#history li + li { border-top: 1px solid #cfc4ac; margin-top: 10px; padding-top: 10px; }
#history small { display: block; margin-top: 3px; color: #595569; }
#empty-history { margin: 0; }
@media (max-width: 640px) {
  .masthead { height: 61px; }
  .brand { font-size: 23px; gap: 4px; }
  .brand img { width: 38px; height: 38px; }
  .history-button { font-size: 13px; padding: 7px 9px; }
  .stage { min-height: calc(100svh - 101px); }
  .city-scene { object-position: 11% bottom; }
  .game { width: min(480px, calc(100% - 48px)); gap: 19px; }
  .marquee { padding: 6px; border-width: 3px; }
  .marquee-face { min-height: 67px; }
  .marquee h1 { font-size: clamp(23px, 7.2vw, 40px); text-shadow: 2px 3px #633e3b; }
  .spark { width: 13px; }
  .machine-body { margin-inline: 4px; padding: 11px 9px 0; }
  .bezel { padding: 0 4px 7px; }
  .display-heading { height: 27px; }
  .reels { gap: 4px; }
  .reel { height: clamp(95px, 25vw, 130px); }
  .tile span { font-size: 10px; }
  .deck { padding: 12px 1px 20px; gap: 7px; }
  .spin-button { min-height: 45px; width: 75%; gap: 8px; font-size: clamp(16px, 4.5vw, 22px); }
  .speaker { width: 17px; height: 15px; }
  .lever { right: -10px; width: 18px; }
  .lever i { height: 44px; }
  .lever i::after { width: 16px; height: 16px; right: -8px; }
  .filter-bar { gap: 8px; width: 100%; }
  .filter-bar label { flex: 1; max-width: 167px; }
  select { width: 100%; height: 40px; font-size: 13px; }
}
@media (max-height: 530px) and (min-width: 520px) {
  .masthead { height: 46px; }
  .stage { min-height: calc(100svh - 78px); padding: 4px 0; }
  .game { width: 410px; gap: 10px; }
  .marquee { padding: 4px; }
  .marquee-face { min-height: 44px; padding-block: 3px; }
  .marquee h1 { font-size: 32px; }
  .machine-body { padding-top: 6px; }
  .display-heading { height: 22px; }
  .reel { height: 70px; }
  .deck { padding: 6px 0 14px; }
  .spin-button { min-height: 35px; font-size: 19px; padding: 3px; }
  select { height: 32px; }
  footer { min-height: 32px; }
}
@media (prefers-reduced-motion: reduce) { .lever i { transition: none; } }
