@font-face {
  font-family: "Arcade";
  src: url("/static/fonts/press-start-2p-cyrillic.woff2") format("woff2");
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
  font-display: swap;
}
@font-face {
  font-family: "Arcade";
  src: url("/static/fonts/press-start-2p-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+2000-206F, U+2190-21FF, U+2212;
  font-display: swap;
}
* {
  box-sizing: border-box;
}
:root {
  color-scheme: dark;
  --acid: #fff04a;
  --ice: #81faff;
  --paper: #f5f5ff;
}
html {
  background: #0a0815;
}
body {
  margin: 0;
  min-width: 260px;
  min-height: 100svh;
  overflow-x: clip;
  display: grid;
  align-items: center;
  position: relative;
  isolation: isolate;
  color: var(--paper);
  font:
    15px/1.4 system-ui,
    sans-serif;
}
body,
button {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  touch-action: manipulation;
  font: inherit;
  color: inherit;
}
button:disabled {
  cursor: default;
}
button:focus-visible {
  outline: 2px solid var(--ice);
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  clip-path: inset(100%);
  width: 1px;
  height: 1px;
  overflow: hidden;
  white-space: nowrap;
}
.bonus-scenery {
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: screen;
  transition: opacity 0.95s ease-in-out;
  background:
    radial-gradient(
      ellipse at var(--station-source, 20% 28%),
      var(--station-light, transparent),
      transparent 59%
    ),
    radial-gradient(
      ellipse at var(--station-reflection, 86% 73%),
      var(--station-spill, transparent),
      transparent 54%
    ),
    linear-gradient(0deg, var(--platform-light, transparent), transparent 32%);
}
body[data-bonus-line] .bonus-scenery {
  opacity: 1;
  transition-duration: 0.65s;
}
.bonus-scenery[data-line="red"] {
  --station-source: 14% 32%;
  --station-reflection: 92% 64%;
  --station-light: #b72c4778;
  --station-spill: #9e27474f;
  --platform-light: #bf1f3144;
}
.bonus-scenery[data-line="blue"] {
  --station-source: 50% 8%;
  --station-reflection: 8% 76%;
  --station-light: #2388c870;
  --station-spill: #2a7da661;
  --platform-light: #2186b34d;
}
.bonus-scenery[data-line="violet"] {
  --station-source: 11% 21%;
  --station-reflection: 91% 72%;
  --station-light: #8d43c67a;
  --station-spill: #7027a65f;
  --platform-light: #662abd54;
}
.bonus-scenery[data-line="ring"] {
  --station-source: 82% 32%;
  --station-reflection: 14% 64%;
  --station-light: #b873187f;
  --station-spill: #9b4f3060;
  --platform-light: #b4782052;
}
#route-multiplier {
  height: clamp(12px, 2.15cqw, 18px);
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 0 4px;
  background: #111822;
  color: var(--route-color);
  box-shadow:
    inset 0 1px #0b1017,
    0 1px #4a4d54;
  clip-path: polygon(
    2px 0,
    100% 0,
    100% calc(100% - 2px),
    calc(100% - 2px) 100%,
    0 100%,
    0 2px
  );
}
#route-multiplier canvas {
  height: 64%;
  width: auto;
  image-rendering: pixelated;
}
.line-map .board-label {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: clamp(12px, 2.15cqw, 18px);
}
#transfer-lamp {
  width: clamp(16px, 3cqw, 22px);
  height: clamp(12px, 2.15cqw, 18px);
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 3px var(--route-color));
}
#train-meter.transferring .split-digits i,
#train-meter.transferring .flap {
  background: linear-gradient(#3b344c, #222332 49%, #191c27 50%, #28253b);
}
.music-note {
  width: 20px;
  height: 20px;
  background: currentColor;
  clip-path: polygon(
    35% 15%,
    90% 5%,
    90% 72%,
    80% 83%,
    65% 83%,
    57% 73%,
    57% 60%,
    66% 52%,
    79% 52%,
    79% 27%,
    45% 33%,
    45% 88%,
    35% 98%,
    19% 98%,
    10% 89%,
    10% 76%,
    19% 67%,
    35% 67%
  );
}
#music[aria-pressed="false"] .music-note {
  opacity: 0.45;
}
.depot {
  --plate: url("/static/art/pixel/depot.png");
  --plate-ratio: 1.5;
  --plate-width-limit: 122cqw;
  --plate-height-limit: 112cqh;
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  container-type: size;
  image-rendering: pixelated;
  background: #11162a;
}
#depot-art {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(
    max(101cqw, calc(101cqh * var(--plate-ratio))),
    var(--plate-width-limit)
  );
  height: min(
    max(101cqh, calc(101cqw / var(--plate-ratio))),
    var(--plate-height-limit)
  );
  transform: translate(-50%, -50%);
  background: var(--plate) 0 0 / 100% 100% no-repeat;
}
#depot-art > i {
  display: none;
}
@media (max-aspect-ratio: 4/5) {
  .depot {
    --plate: url("/static/art/pixel/depot-portrait.png");
    --plate-ratio: 0.6666667;
    --plate-width-limit: 101cqw;
    --plate-height-limit: 124cqh;
  }
}
@media (min-width: 720px), (pointer: fine) {
  .depot {
    --plate: url("/static/art/pixel/depot-hd.png");
    image-rendering: auto;
  }
  h1 img,
  header .brand {
    image-rendering: auto;
  }
  .reading .digits {
    height: 4.25cqw;
    min-height: 20px;
  }
}
@media (min-width: 720px) and (max-aspect-ratio: 4/5),
  (pointer: fine) and (max-aspect-ratio: 4/5) {
  .depot {
    --plate: url("/static/art/pixel/depot-portrait-hd.png");
  }
}
@media (pointer: fine) and (min-aspect-ratio: 1/1) {
  .depot {
    --plate: url("/static/art/pixel/depot-desktop.webp");
  }
  /* The roof and platform keep their proportions as the middle wall stretches. */
  #depot-art {
    --plate-width: min(100cqw, calc(100cqh * 682.4 / 263));
    width: var(--plate-width);
    height: 100%;
    display: grid;
    grid-template-rows:
      calc(var(--plate-width) * 126 / 682.4)
      minmax(0, 1fr)
      calc(var(--plate-width) * 92 / 682.4);
    background: none;
  }
  #depot-art > i {
    display: block;
    background-image: var(--plate);
    background-repeat: no-repeat;
  }
  #depot-art > i:nth-child(1) {
    background-size: 100% calc(100% * 384 / 126);
    background-position: top;
  }
  #depot-art > i:nth-child(2) {
    background-size: 100% calc(100% * 384 / 166);
    background-position: 50% calc(100% * 126 / 218);
  }
  #depot-art > i:nth-child(3) {
    background-size: 100% calc(100% * 384 / 92);
    background-position: bottom;
  }
}
.depot canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.utility {
  position: absolute;
  z-index: 5;
  top: max(env(safe-area-inset-top), clamp(10px, 3.5svh, 36px));
  left: clamp(15px, 4.2vw, 100px);
  right: clamp(15px, 4.2vw, 100px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}
.brand {
  display: block;
  width: clamp(79px, 8.5vw, 131px);
  height: auto;
  aspect-ratio: 85/22;
  object-fit: contain;
  image-rendering: pixelated;
}
.switches {
  display: flex;
  align-items: center;
  gap: 3px;
  pointer-events: auto;
}
.knob {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 6px solid transparent;
  border-image: url("/static/art/pixel/deck.png") 10 fill / 8px stretch;
  background: transparent;
  image-rendering: pixelated;
  color: #f2f0de;
}
.close-cross {
  width: 3px;
  height: 3px;
  background: currentColor;
  box-shadow:
    -4px -4px currentColor,
    -2px -2px currentColor,
    2px 2px currentColor,
    4px 4px currentColor,
    -4px 4px currentColor,
    -2px 2px currentColor,
    2px -2px currentColor,
    4px -4px currentColor;
}
.glyph {
  display: inline-block;
  width: 24px;
  height: 24px;
  flex: none;
  image-rendering: pixelated;
  background-image: url("/static/art/pixel/icons.png");
  background-size: 700% 100%;
  background-repeat: no-repeat;
  background-position: 0 center;
}
.stack {
  background-position: 16.6667% center;
}
.volume {
  background-position: 50% center;
}
[aria-pressed="false"] .volume {
  background-position: 66.6667% center;
}
.info {
  background-position: 83.3333% center;
}
.spin-arrow {
  background-position: 100% center;
}
.knob:hover,
.step:hover:not(:disabled) {
  filter: brightness(1.22);
}

main {
  position: relative;
  isolation: isolate;
  margin: clamp(58px, 10svh, 90px) auto clamp(32px, 6svh, 75px);
  width: min(86vw, 1340px, 167svh);
  display: grid;
  grid-template-columns: 37% 63%;
  align-items: center;
}
.cast {
  align-self: stretch;
  position: relative;
  pointer-events: none;
  z-index: 1;
}
.performer {
  position: absolute;
  width: 116%;
  height: 104%;
  left: -8%;
  top: -2%;
  will-change: transform;
  animation: breathe 5.8s ease-in-out infinite;
}
.pose {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: 50% 50%;
  image-rendering: pixelated;
}
#pose-win {
  opacity: 0;
}
.celebrating #pose {
  opacity: 0;
}
.celebrating #pose-win {
  opacity: 1;
}
h1 {
  position: absolute;
  left: 4%;
  bottom: 0%;
  width: 108%;
  z-index: 2;
  line-height: 0;
  margin: 0;
  image-rendering: pixelated;
  filter: drop-shadow(0 3px 0 #0c1122);
}
h1 img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 177/33;
}
.cabinet {
  position: relative;
  container-type: inline-size;
  min-width: 0;
  z-index: 2;
  filter: drop-shadow(3px 5px 0 #09112588);
}
.cabinet:focus {
  outline: none;
}
.relay-frame {
  display: none;
}
.rim,
.deck {
  position: relative;
  z-index: 1;
}
#train-meter {
  position: relative;
  padding: clamp(3px, 0.65cqw, 6px) clamp(8px, 2.6cqw, 24px);
  background: linear-gradient(
    #677080 0 1px,
    #2a313f 1px 44%,
    #202936 44% 96%,
    #525c6a 96%
  );
  border-top: 2px solid #090e1b;
  box-shadow: inset 0 -2px #0c1321;
}
#train-meter::before,
#train-meter::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 1%;
  width: 3px;
  height: 4px;
  background: linear-gradient(
    140deg,
    #8e96a4 35%,
    #172330 40% 65%,
    #616a79 70%
  );
}
#train-meter::after {
  left: auto;
  right: 1%;
}
.departure-board {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(10px, 2.5cqw, 22px);
  padding: 4px 3%;
  box-shadow:
    inset 0 1px 3px #000,
    0 1px #56616c;
  background: linear-gradient(105deg, #242a30, #161d23 46%, #0b131a);
  border: 1px solid #0e1319;
  color: #e8dfbf;
}
.split-digits {
  display: flex;
  gap: 2px;
  perspective: 140px;
}
.split-digits i {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(21px, 3.75cqw, 32px);
  height: clamp(29px, 5.15cqw, 43px);
  perspective: 100px;
  background: linear-gradient(#54565a, #373a40 48%, #22252c 50%, #303338);
  border-radius: 2px;
  box-shadow:
    0 1px #080a10,
    inset 0 1px #737374;
}
.split-digits canvas {
  position: absolute;
  top: 17%;
  left: 14%;
  width: 72%;
  height: 66%;
  image-rendering: pixelated;
}
.flap {
  position: absolute;
  inset: 0 0 50%;
  overflow: hidden;
  visibility: hidden;
  transform-origin: center bottom;
  background: linear-gradient(#54565a, #373a40);
  border-radius: 2px 2px 0 0;
}
.flap canvas {
  top: 34%;
  height: 132%;
}
.flap.lower {
  inset: 50% 0 0;
  transform-origin: center top;
  border-radius: 0 0 2px 2px;
  background: linear-gradient(#22252c, #303338);
}
.flap.lower canvas {
  top: -66%;
}
.split-digits i::after {
  content: "";
  position: absolute;
  inset: 49% 0 auto;
  height: 1px;
  background: #121317;
  box-shadow: 0 1px #f0e5c329;
}
.line-map,
.trip-total {
  min-width: 0;
}
.board-label {
  display: block;
  font:
    clamp(8px, 1.2cqw, 11px) / 1.35 Arcade,
    monospace;
  color: #d2c8a5;
}
#stations {
  position: relative;
  height: 16px;
  margin: 2px 5px 0;
}
#stations::before,
.track-fill {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 6px;
  height: 6px;
}
#stations::before {
  background:
    linear-gradient(#67747c 1px, transparent 1px 5px, #67747c 5px),
    repeating-linear-gradient(90deg, #515d64 0 1px, transparent 1px 5px),
    #1c2834;
}
.track-fill {
  transform-origin: left center;
  transform: scaleX(0);
  background: linear-gradient(
    var(--route-color, #dc9f52) 1px,
    transparent 1px 5px,
    var(--route-color, #dc9f52) 5px
  );
  box-shadow: 0 0 4px #f7ba6338;
}
.station-pins i {
  position: absolute;
  top: 9px;
  width: clamp(5px, 0.9cqw, 7px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: #263541;
  border: 1px solid #77858c;
  box-shadow: 0 0 0 1px #0d151d;
}
.station-pins .passed {
  background: #b78951;
  border-color: #cead71;
}
.station-pins .current {
  background: #fff1bd;
  border-color: #fff0ad;
}
.train-locator {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.travelling .track-fill,
.travelling .train-locator {
  will-change: transform;
}
.train-locator::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 5px;
  width: 11px;
  height: 7px;
  background:
    linear-gradient(90deg, transparent 6px, #fff0b1 6px 8px, transparent 8px)
      right / 9px 3px no-repeat,
    var(--route-color, #fff6ca);
  border: 1px solid #221925;
  box-shadow:
    0 0 0 1px #d49851,
    0 0 5px #feb55680;
}
.train-locator::after {
  content: "";
  position: absolute;
  left: -7px;
  top: 2px;
  width: 14px;
  height: 11px;
  border: 1px solid #ffcc7a;
  animation: platform-pulse 1.8s ease-out infinite;
}
.travelling .train-locator::after {
  animation: none;
  left: -8px;
  top: 7px;
  width: 5px;
  height: 3px;
  background: #ffd284;
  border: 0;
}
@keyframes platform-pulse {
  0%,
  15% {
    opacity: 0.8;
    transform: scale(0.7);
  }
  75%,
  100% {
    opacity: 0;
    transform: scale(1.38);
  }
}
.trip-total {
  padding-left: clamp(8px, 2.2cqw, 18px);
  border-left: 1px solid #655b473d;
  min-width: 17%;
}
.trip-total div {
  display: flex;
  align-items: center;
  gap: 3px;
  color: #efc580;
  line-height: 1;
}
#trip-digits {
  height: clamp(11px, 2.15cqw, 18px);
  max-width: 15cqw;
  object-fit: contain;
  image-rendering: pixelated;
}
.rim {
  --edge: clamp(10px, 2.5cqw, 20px);
  --side: clamp(4px, 0.88cqw, 7px);
  border: solid transparent;
  border-width: var(--edge) var(--side);
  border-image: url("/static/art/pixel/rim.png") 11 fill / var(--edge)
    var(--side) stretch;
  position: relative;
  image-rendering: pixelated;
}
.field {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 1.65;
  background: radial-gradient(ellipse at 48% 42%, #1c292b, #111820 84%);
}
.field::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
        90deg,
        #0b111a 4px,
        transparent 4px calc(100% - 3px),
        #0b111a 0
      )
      left top / 25% 100% repeat-x,
    repeating-linear-gradient(90deg, #80bbaa08 0 1px, transparent 1px 19px),
    repeating-linear-gradient(0deg, #80bbaa07 0 1px, transparent 1px 19px);
}
.field::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    #0b111980,
    transparent 6%,
    transparent 94%,
    #080d16a8
  );
}

#reels {
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}
.deck {
  width: 96%;
  margin: 0.6% auto 0;
  position: relative;
  min-height: 60px;
  height: 12cqw;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  padding: 0 3% 0 4%;
  column-gap: clamp(2px, 1.3cqw, 11px);
  isolation: isolate;
}
.deck::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  border: 9px solid transparent;
  border-image: url("/static/art/pixel/deck.png") 11 fill / 12px stretch;
  image-rendering: pixelated;
}
.bank {
  --award-height: clamp(13px, 2.55cqw, 23px);
  position: relative;
  min-width: 0;
  justify-self: start;
  padding-bottom: calc(var(--award-height) + max(4px, 0.9cqw));
}
.reading,
.wager {
  display: flex;
  align-items: center;
}
.reading {
  gap: 1cqw;
}
.reading .glyph {
  color: #cbc7e1;
  width: 3.75cqw;
  height: 3.75cqw;
  min-width: 16px;
  min-height: 16px;
}
.digits {
  image-rendering: pixelated;
  display: block;
  height: 3.7cqw;
  min-height: 17px;
  width: auto;
  max-width: 22cqw;
  object-fit: contain;
}
#credit-display {
  position: relative;
}
#paid {
  position: absolute;
  bottom: 0;
  left: 1px;
  height: var(--award-height);
  width: auto;
  image-rendering: pixelated;
}
#credit-display .credit-fringe {
  position: absolute;
  inset: 0;
  visibility: hidden;
  pointer-events: none;
}
.credit-jump {
  transform-origin: left center;
  animation: credit-depth 460ms steps(1, end) both;
}
#credit-display.credit-jump .credit-fringe {
  visibility: visible;
}
.credit-jump #credit-cyan {
  animation: credit-upper 460ms steps(1, end) both;
}
.credit-jump #credit-red {
  animation: credit-lower 460ms steps(1, end) both;
}
@keyframes credit-depth {
  0%,
  74%,
  100% {
    transform: none;
  }
  9% {
    transform: perspective(170px) rotateY(14deg) translateX(1px);
  }
  24% {
    transform: perspective(170px) rotateY(-10deg) translateX(-1px);
  }
  42% {
    transform: perspective(170px) rotateY(8deg);
  }
  58% {
    transform: perspective(170px) rotateY(-4deg);
  }
}
@keyframes credit-upper {
  0%,
  74%,
  100% {
    opacity: 0;
  }
  9% {
    opacity: 0.88;
    clip-path: inset(0 0 57%);
    transform: translate(-3px, -1px);
  }
  24% {
    opacity: 0.62;
    clip-path: inset(48% 0 23%);
    transform: translateX(3px);
  }
  42% {
    opacity: 0.68;
    clip-path: inset(17% 0 46%);
    transform: translateX(-3px);
  }
  58% {
    opacity: 0.34;
    clip-path: inset(0 0 65%);
    transform: translateX(1px);
  }
}
@keyframes credit-lower {
  0%,
  74%,
  100% {
    opacity: 0;
  }
  9% {
    opacity: 0.79;
    clip-path: inset(62% 0 0);
    transform: translate(4px, 1px);
  }
  24% {
    opacity: 0.65;
    clip-path: inset(12% 0 64%);
    transform: translateX(-4px);
  }
  42% {
    opacity: 0.54;
    clip-path: inset(61% 0 0);
    transform: translateX(2px);
  }
  58% {
    opacity: 0.31;
    clip-path: inset(59% 0 24%);
    transform: translateX(2px);
  }
}
.wager {
  gap: 0.4cqw;
}
.wager .reading {
  gap: 0.55cqw;
}
#stake-digits {
  width: max(30px, 7.2cqw);
}
.step {
  border: 4px solid transparent;
  border-image: url("/static/art/pixel/deck.png") 10 fill / 6px stretch;
  image-rendering: pixelated;
  background: transparent;
  padding: 0;
  display: grid;
  place-items: center;
  width: clamp(30px, 5cqw, 44px);
  height: clamp(34px, 5.8cqw, 46px);
  color: #f4e6b8;
  font:
    12px/1 Arcade,
    monospace;
}
.step:active,
.knob:active {
  transform: translateY(2px);
}
.step:disabled {
  opacity: 0.48;
}
.stake-mark,
.stake-plus::after {
  display: block;
  width: 11px;
  height: 3px;
  background: currentColor;
}
.stake-plus {
  position: relative;
}
.stake-plus::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: rotate(90deg);
}
#spin {
  image-rendering: pixelated;
  display: grid;
  place-items: center;
  position: relative;
  justify-self: center;
  width: clamp(54px, 13.6cqw, 107px);
  aspect-ratio: 44/40;
  padding: 0 0 9%;
  border: 0;
  background: transparent url("/static/art/pixel/key.png") center/100% 100%
    no-repeat;
}
#spin .spin-arrow {
  width: 48%;
  height: auto;
  aspect-ratio: 1;
  transform: translateY(-3%);
}
#spin:hover:not(:disabled) {
  filter: brightness(1.08);
}
#spin:focus-visible {
  outline: none;
  filter: brightness(1.14) drop-shadow(0 0 5px #ffce77);
}
#spin:focus-visible::after {
  position: absolute;
  content: "";
  top: 13%;
  left: 31%;
  right: 31%;
  height: 3px;
  background: #fff2b9;
  box-shadow: 0 0 5px #ffee95;
}
#spin:active {
  transform: translateY(3px);
}
#spin:disabled {
  filter: saturate(0.45);
}
.stop-mark,
.next-mark,
.rolling .spin-arrow,
.arrival-ready .spin-arrow,
.arrival-ready .stop-mark {
  display: none;
}
.rolling:not(.arrival-ready) .stop-mark {
  display: block;
  width: 29%;
  aspect-ratio: 1;
  background: #322339;
}

.arrival-ready .next-mark {
  display: block;
  width: 37%;
  height: 37%;
  background: #34222b;
  clip-path: polygon(0 0, 44% 0, 100% 50%, 44% 100%, 0 100%, 58% 50%);
}
#spin.arrival-ready {
  animation: continue-light 1.65s ease-in-out infinite;
}
@keyframes continue-light {
  50% {
    filter: drop-shadow(0 0 6px #ffca68a8) brightness(1.12);
  }
}

#line-award {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 2px;
  transform: translate(-50%, -50%);
  padding: 3px 5px;
  background: #101926ec;
  color: #c6fff4;
  box-shadow:
    0 1px #559993,
    0 2px 3px #0c1221b3;
}
#line-award canvas {
  height: clamp(14px, 2.7cqw, 21px);
  width: auto;
  image-rendering: pixelated;
}
#line-award b {
  font:
    clamp(8px, 1.8cqw, 15px) / 1 Arcade,
    monospace;
}
#catch {
  pointer-events: none;
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3cqw;
  transform: translate(-50%, -50%) rotate(-5deg);
  animation: score 1.52s both;
  filter: drop-shadow(2px 2px 0 #210934) drop-shadow(-2px 0 #56f6ff)
    drop-shadow(0 6px 4px #110921b3);
}
#catch::before {
  content: "";
  z-index: -1;
  position: absolute;
  inset: -14% -35%;
  background: radial-gradient(ellipse, #161b2be3, transparent 70%);
}
#catch b {
  font: 1000 italic 8cqw/1 system-ui;
  color: #fff47c;
  text-shadow: 2px 3px #532264;
}
#catch-digits {
  height: 17cqw;
  max-width: 54cqw;
}
#route-aside {
  display: none;
  grid-column: 1;
  grid-row: 1;
  position: relative;
  z-index: 3;
  margin: 0 7% 5% 0;
  aspect-ratio: 3/4;
  align-self: center;
}
.route-instrument {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: 0;
  gap: 4px;
  padding: 3px 5px 4px;
  border: 12px solid transparent;
  border-image: url("/static/art/pixel/journey-map.webp") 39 fill / 12px stretch;
  background: #111c26;
  color: var(--route-color);
  text-align: center;
  image-rendering: pixelated;
  filter: drop-shadow(2px 6px 3px #050913ce);
}
.route-marquee {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 23px;
  margin: 0;
  padding: 4px 2px;
  border: 1px solid #435160;
  background: linear-gradient(#111921 0 2px, #19262d 2px 90%, #111921 90%);
  font:
    clamp(9px, 2.5cqw, 12px) / 1.4 Arcade,
    monospace;
  text-shadow: 1px 2px #090f1a;
  white-space: nowrap;
  transition: color 0.25s ease;
}
.route-marquee::before {
  content: "";
  width: 5px;
  height: 5px;
  background: var(--route-color);
  box-shadow:
    0 0 0 1px #090e17,
    0 0 6px var(--route-color);
  flex: none;
  transition:
    background-color 0.25s ease,
    box-shadow 0.25s ease;
}
.route-foot {
  display: grid;
  align-items: stretch;
  min-height: 30px;
}
.route-signals {
  display: none;
  min-width: 0;
  padding: 4px 14px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: #19252c;
  box-shadow:
    inset 0 1px #394853,
    inset 0 -2px #101622;
}
.route-signals i {
  width: clamp(12px, 4cqw, 24px);
  height: 5px;
  background: color-mix(in srgb, var(--signal-color) 28%, #181b21);
  box-shadow: 0 0 0 1px #090e17;
  transition:
    background-color 0.26s ease,
    box-shadow 0.26s ease;
}
.route-signals i[data-lit] {
  background: var(--signal-color);
  box-shadow:
    0 0 0 1px #090e17,
    0 0 6px var(--signal-color);
}
main[data-dispatch="active"] .route-signals {
  display: flex;
}
main[data-dispatch="active"] .route-engraving {
  display: none;
}
.route-engraving {
  display: grid;
  place-items: center;
  margin: 0;
  min-height: 23px;
  padding: 3px 2px;
  color: #d4d9d8;
  background: #1e2b37;
  box-shadow:
    inset 0 1px #485767,
    inset 0 -2px #101622;
  font:
    clamp(7px, 1.8cqw, 9px) / 1.45 Arcade,
    monospace;
}
.route-lens {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  background: #101c26;
  box-shadow: inset 0 0 12px #070d16;
  image-rendering: pixelated;
}
#train-brief {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: clamp(4px, 1.4cqw, 9px);
  background: #101825;
  box-shadow:
    inset 0 0 0 2px #364455,
    inset 0 0 30px #080c18;
}
#train-brief::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    ellipse at 51% 44%,
    color-mix(in srgb, var(--route-color) 25%, #111721),
    transparent 73%
  );
  transition: opacity 0.8s ease;
}
main:not([data-dispatch="active"]) #train-brief::before {
  opacity: 1;
}
#train-brief .route-instrument {
  width: min(94%, 337px);
  border-width: 9px;
  border-image-width: 9px;
  padding: 2px 4px 3px;
}
#train-brief .route-marquee {
  min-height: 24px;
  font-size: clamp(9px, 3cqw, 13px);
}
main[data-dispatch="locking"] .route-instrument {
  animation: route-lock-in 1.12s ease-out both;
}
@keyframes route-lock-in {
  0%,
  100% {
    filter: drop-shadow(2px 6px 3px #050913ce);
  }
  42% {
    filter: drop-shadow(2px 6px 3px #050913ce)
      drop-shadow(
        0 0 10px color-mix(in srgb, var(--route-color) 35%, transparent)
      );
  }
}
#arrival {
  position: absolute;
  z-index: 5;
  inset: 0;
  container-type: size;
  display: grid;
  place-items: center;
  background: radial-gradient(
    ellipse at 50% 47%,
    #141627 16%,
    #141827f5 48%,
    #111928df 76%,
    #0b1121c9
  );
  animation: arrival-reveal 0.35s ease-out both;
}
.arrival-score {
  width: 100%;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: min(2.5cqh, 12px);
  color: #fff3d9;
  text-align: center;
}
.arrival-score > span {
  font:
    clamp(14px, min(6cqw, 11cqh), 44px) / 1.28 Arcade,
    monospace;
  text-transform: uppercase;
  text-shadow: 0 3px #181323;
}
.arrival-value {
  width: 94%;
  height: min(32cqw, 46cqh, 225px);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1cqw;
  filter: drop-shadow(1px 5px 4px #090913);
}
.arrival-value b {
  color: #ffef8a;
  font:
    min(8cqw, 13cqh, 60px) / 1 Arcade,
    monospace;
  text-shadow: 0 3px #62344e;
}
#arrival-digits {
  height: 100%;
  min-width: 0;
  max-width: calc(100% - 10cqw);
  width: auto;
  object-fit: contain;
}
@keyframes arrival-reveal {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.message {
  position: absolute;
  z-index: 2;
  inset: calc(100% + 1px) 0 auto;
  display: flex;
  justify-content: center;
}
.service-panel {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 25px;
  max-width: min(100%, 400px);
  padding: 3px 6px 4px 9px;
  border: 4px solid transparent;
  border-top-width: 0;
  border-image: url("/static/art/pixel/deck.png") 10 fill / 5px stretch;
  color: #d7c59a;
  background: #151d2e;
  box-shadow: 0 3px #070b14b3;
  font:
    clamp(7px, 1.8cqw, 9px) / 1.55 Arcade,
    monospace;
}
.service-panel:not(:has(#status:not(:empty), #exit-preview:not([hidden]))) {
  display: none;
}
.service-panel::before {
  content: "";
  width: 5px;
  height: 5px;
  flex: none;
  background: #f9b95e;
  box-shadow:
    0 0 0 1px #0b111c,
    0 0 5px #e69a4c77;
}
#status:empty {
  display: none;
}
#exit-preview {
  margin-left: 3px;
  padding: 3px 5px;
  color: #f5e4b9;
  background: #262f3e;
  border: 1px solid #5a6370;
  box-shadow: 0 2px #101522;
  white-space: nowrap;
}
#exit-preview:active:not(:disabled) {
  transform: translateY(1px);
}
dialog {
  width: min(410px, calc(100vw - 24px));
  max-height: 85svh;
  padding: 17px 22px;
  color: #f7f5ff;
  border: 1px solid #776593;
  background: #1f263b;
  border: 10px solid transparent;
  border-image: url("/static/art/pixel/deck.png") 11 / 10px stretch;
  image-rendering: pixelated;
  font-family: Arcade, monospace;
  line-height: 1.75;
  box-shadow: 0 12px 55px #05010eaa;
}
dialog::backdrop {
  background: #06040cbf;
}
h2,
h3 {
  margin: 0;
  font-size: 20px;
}
dialog p {
  font-size: 10px;
}
dialog button:not(.knob) {
  border: 1px solid #8d7da2;
  background: #30263f;
  font-size: 10px;
  padding: 10px 12px;
}
#help {
  width: min(590px, calc(100vw - 20px));
  height: min(
    664px,
    calc(
      100svh - max(12px, env(safe-area-inset-top)) -
        max(12px, env(safe-area-inset-bottom))
    )
  );
  max-height: none;
  padding: 0;
  overflow: hidden;
  border: 15px solid transparent;
  border-image: url("/static/art/pixel/journey-map.webp") 42 fill / 16px stretch;
  background: #080f20;
  color: #e5e9f3;
  box-shadow:
    7px 9px #03050e,
    0 14px 42px #03050edb;
}
#help::backdrop {
  background: #050a15c4;
}
.help-bezel {
  height: 100%;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  padding: 3px 8px 8px;
}
.help-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 0 3px 0 11px;
  background: linear-gradient(#303c55 0 2px, #232b3d 2px 92%, #0d1320 92%);
  box-shadow:
    inset 3px 0 #38465b,
    inset -3px 0 #121827;
}
#help-title {
  font-size: clamp(11px, 3vw, 16px);
  color: #fff1c7;
  text-shadow: 2px 2px #0b0c13;
}
#help #close {
  width: 38px;
  height: 38px;
  flex: none;
}
.help-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  padding: 5px 0 6px;
}
#help .help-tabs button {
  position: relative;
  min-height: 40px;
  padding: 5px 2px 5px 8px;
  border: 5px solid transparent;
  border-image: url("/static/art/pixel/deck.png") 10 fill / 5px stretch;
  background: transparent;
  color: #abbcd4;
  font-size: clamp(7px, 2.1vw, 10px);
}
#help .help-tabs button::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin: 0 6px 2px 0;
  background: #576073;
}
#help .help-tabs button[aria-selected="true"] {
  color: #ffe5a7;
  box-shadow: inset 0 -3px #ad6d36;
}
#help .help-tabs button[aria-selected="true"]::before {
  background: #ffc873;
  box-shadow: 0 0 5px #fba34b;
}
.help-screen {
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  gap: 12px;
  padding: clamp(7px, 2vw, 15px);
  border: 2px solid #3e4d67;
  background:
    repeating-linear-gradient(0deg, #21395128 0 1px, transparent 1px 4px),
    #0b1425;
  box-shadow: inset 0 0 25px #050a16;
}
#help-train,
#help-session {
  align-content: stretch;
}
#help-train {
  grid-template-rows: minmax(138px, 1fr) repeat(3, max-content);
}
#help-session {
  grid-template-rows: minmax(250px, 1fr) max-content;
}
.help-train-hero {
  min-height: 126px;
  display: grid;
  align-content: end;
  padding: 10px;
  border: 2px solid #425471;
  background:
    linear-gradient(90deg, #080d1af5 0%, #080d1ad4 29%, #080d1a33 72%),
    url("/static/art/pixel/last-train.webp") center 31% / cover;
}
.help-train-entry {
  max-width: 245px;
  color: #fff1c7;
  text-shadow: 2px 2px #060b14;
}
.help-train-entry img {
  width: 40px;
  height: 32px;
  object-fit: contain;
  display: block;
  margin-bottom: 5px;
}
.help-train-entry h3 {
  font-size: clamp(10px, 2.4vw, 14px);
}
.help-train-entry p {
  margin: 5px 0 0;
  font-size: 9px;
}
.help-routes,
.help-lines {
  list-style: none;
  margin: 0;
  padding: 0;
}
.help-routes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
}
.help-routes li {
  min-height: 55px;
  padding: 7px 7px 6px 9px;
  border-left: 3px solid var(--route-ink);
  background:
    linear-gradient(90deg, #141f31 4%, #141f31ed 47%, #141f314c),
    var(--station-photo, none) 50% 40% / cover,
    #182437;
  text-shadow: 1px 1px #070e1b;
}
.help-routes [data-line="red"] {
  --station-photo: url("/static/art/pixel/station-red.webp");
}
.help-routes [data-line="blue"] {
  --station-photo: url("/static/art/pixel/station-blue.webp");
}
.help-routes [data-line="violet"] {
  --station-photo: url("/static/art/pixel/station-violet.webp");
}
.help-routes [data-line="ring"] {
  --station-photo: url("/static/art/pixel/station-ring.webp");
}
.help-routes b {
  display: block;
  color: var(--route-ink);
  font-size: 9px;
  font-weight: normal;
}
.help-routes span {
  display: block;
}
.help-routes span,
.help-rule,
#pay-table caption {
  color: #c6d1e2;
  font-size: 8px;
  line-height: 1.85;
}
.help-rule {
  margin: 0;
}
.help-train-rules {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
}
.help-train-rules p:first-child {
  grid-column: 1 / -1;
}
.help-train-rules p:has(img) {
  display: grid;
  grid-template-columns: 29px 1fr;
  gap: 5px;
  align-items: center;
}
.help-train-rules img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}
.help-lines {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
}
.help-lines canvas {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #3d4b64;
  background: #091326;
}
#pay-table {
  width: 100%;
  border-spacing: 2px;
  table-layout: fixed;
  font-size: 9px;
  text-align: center;
}
#pay-table caption {
  padding: 0 0 4px 2px;
  text-align: left;
}
#pay-table th:first-child {
  width: 52%;
  text-align: left;
}
#pay-table thead th {
  padding: 4px 2px 4px 5px;
  color: #bfcee0;
  font-weight: normal;
  font-size: clamp(7px, 2vw, 9px);
}
#pays th,
#pays td {
  padding: 2px 4px;
  background: linear-gradient(#223047 0 1px, #162335 1px 96%, #0a1223 96%);
  font-weight: normal;
}
#pays img {
  width: 27px;
  height: 27px;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 4px;
  image-rendering: pixelated;
}
#pays td,
#round,
#breakdown,
#rtp {
  color: #ffe2a1;
}
.help-ledger {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  min-height: 0;
}
.session-readout {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 4px 12px;
  padding: clamp(6px, 2vw, 12px);
  border: 3px solid #3b4956;
  border-bottom-color: #19222f;
  background:
    repeating-linear-gradient(0deg, transparent 0 3px, #54302227 3px 4px),
    #111923;
  box-shadow: inset 0 0 12px #0a0c15;
  color: #bac3d0;
  font:
    clamp(7px, 2.1vw, 10px) / 1.5 Arcade,
    monospace;
}
#rtp {
  font-size: clamp(9px, 2.7vw, 16px);
  text-shadow: 0 0 5px #ad783a6b;
}
.session-receipt {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 4px;
  min-height: 0;
  margin: 0;
  padding: clamp(4px, 1.2vw, 8px);
  border: 2px solid #46536a;
  background: #131d2c;
}
#round {
  padding: 4px 5px;
  font:
    clamp(8px, 2.3vw, 11px) / 1.3 Arcade,
    monospace;
}
#last-reel-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 1px;
  min-height: 108px;
  border: 2px solid #080d18;
  background: #303d55;
}
#last-reel-grid span {
  display: grid;
  place-items: center;
  min-height: 0;
  background: linear-gradient(#222e45, #182138);
}
#last-reel-grid img {
  width: 74%;
  height: 83%;
  min-height: 0;
  object-fit: contain;
  image-rendering: pixelated;
}
#breakdown {
  min-height: 28px;
  margin: 0;
  padding: 5px 4px;
  background: #0f1725;
  font:
    8px/1.6 Arcade,
    monospace;
}
.session-reset {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border-top: 2px solid #465369;
  background: linear-gradient(#202d40, #131c2e);
}
@media (max-width: 440px) {
  .session-reset {
    grid-template-columns: 1fr;
  }
}
#help .help-action {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  justify-self: center;
  gap: 7px;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #ffe3a2;
  text-align: left;
  text-shadow: 1px 2px #10131d;
  font:
    clamp(7px, 2.25vw, 10px) / 1.45 Arcade,
    monospace;
  text-transform: uppercase;
}
.cabinet-key {
  display: grid;
  place-items: center;
  width: clamp(49px, 14vw, 61px);
  aspect-ratio: 44/40;
  padding-bottom: 6%;
  background: url("/static/art/pixel/key.png") center / 100% 100%;
  image-rendering: pixelated;
  filter: drop-shadow(1px 2px #080e16);
}
.cabinet-key img {
  width: 24px;
  height: 21px;
  object-fit: contain;
  filter: drop-shadow(1px 1px #4e3235);
}
.cabinet-key i {
  width: 48%;
  height: 37%;
  background: #4b302b;
}
.key-play {
  clip-path: polygon(28% 0, 88% 50%, 28% 100%);
}
.key-fast {
  clip-path: polygon(0 0, 50% 50%, 50% 0, 100% 50%, 50% 100%, 50% 50%, 0 100%);
}
.key-return {
  clip-path: polygon(
    0 36%,
    42% 0,
    42% 26%,
    100% 26%,
    100% 100%,
    70% 100%,
    70% 55%,
    42% 55%,
    42% 78%
  );
}
button:active:not(:disabled) .cabinet-key {
  transform: translateY(3px);
}
button:hover:not(:disabled) .cabinet-key {
  filter: brightness(1.1) drop-shadow(1px 2px #080e16);
}
#help .help-action:disabled {
  opacity: 0.53;
}
@media (max-width: 410px) {
  .help-bezel {
    padding-inline: 1px;
  }
  .help-tabs {
    gap: 1px;
  }
  #help .help-tabs button::before {
    margin-right: 3px;
  }
  .help-train-hero {
    background-position: 57% center;
  }
  .help-routes li {
    padding-inline: 4px 2px;
  }
  #pays img {
    width: 20px;
    height: 20px;
  }
  #pays th {
    overflow-wrap: anywhere;
    line-height: 1.55;
  }
}
@media (max-width: 330px) {
  .help-screen {
    gap: 9px;
  }
  .help-train-hero {
    min-height: 114px;
  }
  .help-routes b {
    font-size: 8px;
  }
}
@media (max-width: 290px) {
  .help-routes {
    grid-template-columns: 1fr;
  }
}
.ticket-key {
  width: 100px;
  flex: none;
  white-space: nowrap;
  padding: 0 7px;
  display: flex;
  gap: 4px;
  justify-content: center;
  color: #ffda8c;
  font:
    9px Arcade,
    monospace;
}
.ticket-key img {
  width: 23px;
  height: 23px;
  object-fit: contain;
}
#auto {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 3px;
  width: clamp(44px, 6.5cqw, 55px);
  height: clamp(44px, 7cqw, 58px);
  padding: 0;
  border: 5px solid transparent;
  border-image: url("/static/art/pixel/deck.png") 10 fill / 6px stretch;
  color: #dcd9e8;
  background: transparent;
  font:
    clamp(7px, 1.1cqw, 9px) / 1 Arcade,
    monospace;
  image-rendering: pixelated;
}
.auto-face {
  display: flex;
  gap: 3px;
  align-items: center;
  color: #e8d495;
}
.auto-face i {
  width: 9px;
  height: 8px;
  background: currentColor;
  clip-path: polygon(0 0, 50% 50%, 50% 0, 100% 50%, 50% 100%, 50% 50%, 0 100%);
}
#auto[aria-pressed="true"] .auto-face {
  color: #ffd679;
}
#auto[aria-pressed="true"] .auto-face i {
  clip-path: none;
  width: 6px;
  height: 6px;
  background: #fc7761;
}
#auto:disabled,
.ticket-key:disabled {
  opacity: 0.54;
}
#auto-count:empty {
  display: none;
}
#auto[aria-pressed="false"] .auto-face i {
  width: 17px;
  height: 10px;
}
#ticket-office,
#auto-settings {
  width: min(476px, calc(100vw - 22px));
  max-height: calc(100svh - 22px);
  padding: 0;
  border: 1px solid #556271;
  background: #101823;
  color: #eee9da;
  font:
    10px/1.7 Arcade,
    monospace;
  box-shadow:
    0 0 0 3px #101723,
    0 18px 64px #020610cc;
}
#ticket-office::backdrop,
#auto-settings::backdrop {
  background: #060b18c7;
  backdrop-filter: blur(3px);
}
#ticket-office {
  border: 8px solid transparent;
  border-image: url("/static/art/pixel/rim.png") 11 fill / 8px stretch;
  box-shadow: 0 15px 50px #030513de;
}
#ticket-office::backdrop {
  background: #050812ac;
  backdrop-filter: none;
}
.ticket-poster {
  background: #132130;
}
.poster-scene {
  image-rendering: auto;
}
.ticket-poster::after {
  content: "";
  position: absolute;
  inset: 26% 0 -1px;
  background: linear-gradient(0deg, #101823 1%, #101823a3 30%, transparent 76%);
}
#poster-name {
  color: #f8eedc;
  text-shadow: 2px 3px #151c29;
  font:
    clamp(17px, 5.2vw, 28px) / 1.28 Arcade,
    monospace;
  text-transform: uppercase;
}
#poster-name em {
  font-style: normal;
  font-size: 1.35em;
}
.poster-close {
  color: #fff2d9;
  background: #101823dd;
  border: 1px solid #78828c;
}

#offer-spins {
  font:
    clamp(9px, 2.6vw, 12px) / 1.4 Arcade,
    monospace;
  text-transform: uppercase;
  color: #ffcd79;
  text-shadow: 1px 2px #14101b;
}
.ticket-console {
  background: #161a2a;
  border-top: 2px solid #303d55;
  image-rendering: pixelated;
}
.ticket-machine {
  background: #171f32 url("/static/art/pixel/ticket-machine.webp") center / 100%
    100%;
}
.ticket-stub {
  filter: drop-shadow(0 2px 0 #0008);
  image-rendering: pixelated;
}

.ticket-meter {
  color: #c4c2ca;
  background: linear-gradient(#070b16, #14192a 70%, #101726);
  box-shadow:
    inset 0 1px 0 #000,
    inset 0 -1px #464e66;
  border: 2px solid #323950;
  border-top-color: #53657a;
  border-left-color: #434f67;
  font:
    clamp(7px, 1.85vw, 9px) / 1.3 Arcade,
    monospace;
  text-transform: uppercase;
}
.ticket-meter canvas {
  height: 17px;
  max-width: 100%;
  width: auto;
  object-fit: contain;
  min-width: 0;
  image-rendering: pixelated;
}
.ticket-credit canvas {
  height: 12px;
}

.ticket-wager canvas {
  height: 13px;
}
#ticket-office .ticket-wager .step {
  width: 100%;
  height: 100%;
  min-height: 44px;
  padding: 0;
  background: transparent;
  border: 4px solid transparent;
  border-image: url("/static/art/pixel/deck.png") 10 fill / 6px stretch;
  font-size: 14px;
}
#ticket-office .poster-close {
  background: transparent;
  border: 4px solid transparent;
  border-image: url("/static/art/pixel/deck.png") 10 fill / 6px stretch;
}
#buy-confirm {
  border: 0;
  background: none;
  color: #ffd995;
  text-transform: uppercase;
  text-align: center;
  text-shadow: 1px 2px #100e18;
  font:
    clamp(7px, 1.85vw, 9px) / 1.45 Arcade,
    monospace;
}
.ticket-actuator {
  background: url("/static/art/pixel/key.png") center / 100% 100%;
  image-rendering: pixelated;
}
.ticket-actuator i {
  width: 50%;
  aspect-ratio: 1.55;
  background: #36242e;
  position: relative;
  clip-path: polygon(
    0 0,
    100% 0,
    100% 31%,
    86% 31%,
    86% 66%,
    100% 66%,
    100% 100%,
    0 100%,
    0 66%,
    14% 66%,
    14% 31%,
    0 31%
  );
}
.ticket-actuator i::after {
  content: "";
  position: absolute;
  inset: 3px auto 3px 48%;
  width: 2px;
  background: repeating-linear-gradient(#ffd35a 0 2px, transparent 2px 4px);
}
#buy-confirm:hover:not(:disabled) .ticket-actuator {
  filter: brightness(1.1);
}
#buy-confirm:active .ticket-actuator {
  transform: translateY(3px);
}
#buy-confirm:disabled {
  color: #bcaeac;
}
#buy-confirm:disabled .ticket-actuator {
  filter: saturate(0.2) brightness(0.73);
}
#buy-message:not(:empty) {
  display: block;
  padding: 8px 5%;
  text-align: center;
  color: #ffd28e;
  font:
    8px/1.8 Arcade,
    monospace;
  background: #101522;
  border-top: 2px solid #323c51;
}
#auto-settings {
  width: min(397px, calc(100vw - 16px));
  padding: 3px 6px 5px;
  border: 13px solid transparent;
  border-image: url("/static/art/pixel/journey-map.webp") 39 fill / 13px stretch;
  background: #101823;
  box-shadow:
    2px 9px 0 #070b15,
    0 16px 44px #020611db;
}
#auto-settings::backdrop {
  background: #050812b8;
  backdrop-filter: none;
}
.auto-heading {
  min-height: 45px;
  padding-left: 7px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  border-bottom: 2px solid #38495f;
}
#auto-title {
  font:
    clamp(12px, 4vw, 16px) / 1.4 Arcade,
    monospace;
  color: #ffe5ad;
}
#auto-close {
  width: 36px;
  height: 36px;
}
.auto-console {
  display: grid;
  grid-template-areas: "display key" "legend key" "selector selector" "note note";
  grid-template-columns: minmax(0, 1fr) clamp(60px, 21%, 76px);
  column-gap: 7px;
  padding: 8px 7px 5px;
  background: linear-gradient(134deg, #243249, #192234);
  border: 2px solid #536279;
  border-bottom-color: #121925;
}
.auto-readout {
  grid-area: display;
  min-height: 51px;
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(0deg, transparent 0 3px, #47382221 3px 4px),
    linear-gradient(#140f11, #211b1b);
  border: 3px solid #101522;
  box-shadow:
    0 1px #616779,
    inset 0 0 12px #080b13;
}
#auto-meter {
  width: auto;
  height: 28px;
  max-width: 85%;
  object-fit: contain;
  filter: drop-shadow(0 0 5px #eaa04578);
  image-rendering: pixelated;
}
#auto-length {
  grid-area: legend;
  margin: 4px 0 8px;
  text-align: center;
  font-size: 8px;
  color: #cdd4e1;
  text-transform: uppercase;
}
#auto-options {
  grid-area: selector;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  padding: 4px;
  border: 1px solid #050911;
  background: #101725;
}
#auto-options button {
  display: grid;
  place-items: center;
  min-width: 0;
  height: 43px;
  padding: 4px 0 5px;
  border: 4px solid transparent;
  border-image: url("/static/art/pixel/deck.png") 10 fill / 5px stretch;
  background: transparent;
  color: #c3cddd;
  font:
    clamp(7px, 2.35vw, 10px) / 1.35 Arcade,
    monospace;
}
#auto-options button::after {
  content: "";
  width: 3px;
  height: 3px;
  background: #535766;
}
#auto-options button:last-child span {
  font-size: 14px;
  line-height: 1;
}
#auto-options [aria-pressed="true"] {
  color: #ffd888;
  box-shadow: inset 0 -2px #be8543;
}
#auto-options [aria-pressed="true"]::after {
  background: #ffd888;
  box-shadow: 0 0 5px #ffd888;
}
#auto-note {
  grid-area: note;
  margin: 8px 0 2px;
  color: #cbd3df;
  text-align: center;
  font:
    8px/1.6 Arcade,
    monospace;
}
#auto-settings #auto-start {
  grid-area: key;
  padding: 0;
  border: 0;
  align-self: start;
  display: grid;
  justify-items: center;
  gap: 1px;
  color: #f5e2b7;
  background: transparent;
  font:
    8px / 1.5 Arcade,
    monospace;
  text-transform: uppercase;
}
@media (max-height: 560px) and (orientation: landscape) {
  #poster-name { font-size: clamp(14px, 2.7vw, 22px); }
}
@keyframes breathe {
  0%,
  22%,
  86%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
}
@keyframes score {
  0% {
    opacity: 0;
    transform: translate(-50%, -46%) rotate(-7deg) scale(0.62);
  }
  17% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(-5deg) scale(1.12);
  }
  31%,
  78% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(-5deg) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -63%) rotate(-4deg) scale(0.91);
  }
}
@media (min-width: 900px) and (pointer: fine) and (min-aspect-ratio: 1/1) {
  main {
    width: min(96vw, 1270px, 155svh);
    grid-template-columns: minmax(0, 20%) minmax(0, 60%) minmax(0, 20%);
    margin: clamp(58px, 8svh, 95px) auto clamp(45px, 7svh, 82px);
  }
  .cabinet {
    grid-column: 2;
    grid-row: 1;
  }
  .cast {
    grid-column: 3;
    grid-row: 1;
    z-index: 3;
    display: grid;
    align-content: center;
    justify-items: center;
    align-self: stretch;
    gap: 0;
    margin-bottom: clamp(53px, 13svh, 132px);
  }
  .performer {
    position: relative;
    left: auto;
    top: auto;
    width: min(104%, 252px);
    height: clamp(130px, 24svh, 240px);
  }
  .cast h1 {
    position: relative;
    left: auto;
    bottom: auto;
    width: 91%;
    margin-top: clamp(-21px, -2svh, -11px);
  }
  #route-aside {
    display: grid;
  }
  #train-brief {
    display: none;
  }
  .relay-frame {
    display: block;
    position: absolute;
    pointer-events: none;
    z-index: 0;
    left: 50%;
    bottom: -37px;
    width: 140%;
    aspect-ratio: 1000/220;
    transform: translateX(-50%);
    background: url("/static/art/pixel/relay-frame.webp") center / 100% 100%
      no-repeat;
    image-rendering: pixelated;
    filter: drop-shadow(0 6px 3px #030614aa);
  }
  #relay-pilot {
    position: absolute;
    bottom: 25%;
    right: 9.3%;
    width: 10px;
    height: 3px;
    background: #82e1fc;
    box-shadow: 0 0 5px #3aabed;
    opacity: 0;
  }
  .relay-diode {
    position: absolute;
    left: 10.05%;
    top: 65.2%;
    width: 1.55%;
    height: 2.35%;
    background: #211629;
    border-radius: 25%;
    animation: relay-standby 4.6s infinite;
  }
  .relay-diode:last-child {
    left: 12%;
    animation-delay: -2.1s;
  }
}
@keyframes relay-standby {
  0%,
  20%,
  63%,
  100% {
    opacity: 0.55;
  }
  26%,
  52% {
    opacity: 0;
  }
  88% {
    opacity: 0.76;
  }
}
@media (max-aspect-ratio: 1/1) {
  .utility {
    top: max(env(safe-area-inset-top), 10px);
    left: 4vw;
    right: 3vw;
  }
  main {
    width: min(96vw, 58svh, 700px);
    margin: max(51px, 6svh) auto max(44px, 5svh);
    grid-template-columns: 100%;
  }
  .cast {
    height: clamp(90px, 22svh, 255px);
  }
  .performer {
    left: 18%;
    top: -19%;
    height: 144%;
    width: 77%;
  }
  h1 {
    width: 55%;
    left: 0;
    bottom: 9%;
  }
  .field {
    aspect-ratio: 1.32;
  }
  .deck {
    height: 17cqw;
  }
  #spin {
    width: 16cqw;
  }
}
@container (max-width: 480px) {
  .deck {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-rows: auto auto;
    height: auto;
    padding-block: 9px;
    row-gap: 4px;
  }
  .bank {
    grid-column: 1 / -1;
    justify-self: stretch;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-bottom: 0;
  }
  .bank .reading, #credit-display { min-width: 0; }
  .bank .reading { flex: 1; }
  #credit-display .digits {
    height: clamp(17px, 5cqw, 23px);
    max-width: 100%;
    object-position: left center;
  }
  #paid { position: static; max-width: 30%; object-fit: contain; }
  #stake-digits { width: 11cqw; }
}
@media (max-height: 600px) and (orientation: portrait) {
  main {
    margin-top: 45px;
    margin-bottom: 38px;
  }
  .cast {
    height: 18svh;
  }
}
@media (max-height: 560px) and (orientation: landscape) {
  .utility {
    top: 4px;
    left: 3vw;
    right: 3vw;
  }
  .brand {
    width: 72px;
  }
  main {
    width: min(96vw, 178svh);
    margin: 32px auto 26px;
  }
  .field {
    aspect-ratio: 1.86;
  }
  .deck {
    min-height: 42px;
  }
  #spin {
    min-width: 42px;
  }
}
@media (max-height: 400px) and (orientation: landscape) {
  main { width: min(96vw, 154svh); }
}
@media (max-width: 360px) {
  .utility {
    left: 8px;
    right: 8px;
  }
  .utility .brand {
    width: 62px;
  }
  .utility .knob:not(.ticket-key) {
    width: 34px;
  }
  .utility .ticket-key {
    width: 82px;
    padding-inline: 2px;
    gap: 3px;
    font-size: 8px;
  }
  .utility .ticket-key img {
    width: 19px;
    height: 19px;
  }
}
@media (prefers-reduced-motion: reduce) and (any-hover: none) {
  *,
  *::after,
  *::before {
    animation: none !important;
    transition: none !important;
  }
}

#wallet-unit:empty, #reset[hidden], #to-operator[hidden] { display: none; }
#wallet-unit { font-size: clamp(8px, 1.45cqw, 13px); color: #cfcae2; }

/* Keep a long press on the cabinet from selecting or lifting its artwork. */
main, header, img, canvas {
  -webkit-touch-callout: none;
}
img, canvas {
  -webkit-user-select: none;
  user-select: none;
}
