@font-face {
  font-family: BarlowArc;
  src: url(fonts/BarlowCondensed-BlackItalic.ttf);
}
@font-face {
  font-family: Pixel;
  src: url(fonts/VT323-Regular.ttf);
}
:root {
  color-scheme: dark;
  --ink: #18171c;
  --paper: #f5ead5;
  --muted: #c4bcb2;
  --gold: #ffb24f;
  --mono: ui-monospace, Menlo, Consolas, monospace;
  --head: BarlowArc, "Arial Narrow", sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background-color: #19181d;
  background-image: radial-gradient(#ffffff0c 0.7px, transparent 0.9px);
  background-size: 4px 4px;
  color: var(--paper);
  font-family: system-ui, sans-serif;
  min-height: 100svh;
}
button,
a,
input,
textarea {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
canvas:focus-visible {
  outline: 3px solid #ffe39c;
  outline-offset: 3px;
}
button:active,
.cart:active,
.primary:active {
  transform: translateY(2px);
}
button:disabled {
  cursor: default;
  opacity: 0.52;
}
header {
  background: #161519;
  border-bottom: 1px solid #443c3c;
}
.bar,
main {
  width: min(1140px, calc(100% - 80px));
  margin: auto;
}
.bar {
  height: 70px;
  display: flex;
  align-items: center;
  gap: 40px;
}
.brand {
  display: inline-flex;
  align-items: center;
  font: italic 29px/0.9 var(--head);
  text-transform: uppercase;
  letter-spacing: -0.7px;
}
.brand img {
  width: 34px;
  height: 34px;
  image-rendering: pixelated;
  margin-right: 6px;
}
.brand span {
  color: var(--gold);
  margin-left: 4px;
}
nav {
  display: flex;
  align-self: stretch;
  gap: 28px;
}
nav a {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  position: relative;
}
nav .current {
  color: var(--paper);
}
nav .current:after {
  content: "";
  position: absolute;
  bottom: 0;
  height: 3px;
  background: var(--gold);
  left: 0;
  right: 0;
}
.settings,
.square,
.quiet,
.control,
.mini,
#close-prefs {
  border: 1px solid #575052;
  background: #302d32;
  border-radius: 7px;
  box-shadow:
    inset 0 1px #ffffff10,
    0 2px #101014;
}
.settings {
  width: 42px;
  height: 40px;
  margin-left: auto;
  display: grid;
  place-items: center;
}
.glyph,
svg {
  width: 20px;
  height: 20px;
  display: inline-block;
  flex: none;
  vertical-align: middle;
}
.wrap-title,
.section-head,
.bezel,
.dialog-head,
.stage-head,
.result-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wrap-title {
  margin: 24px 0 15px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-family: var(--head);
  font-weight: normal;
}
h1 {
  font-size: clamp(38px, 4vw, 56px);
  line-height: 1;
}
h2 {
  font-size: 32px;
  line-height: 1.1;
}
.micro,
.tag,
.stat,
.key,
.screen-kicker,
.cart-id {
  font: 600 12px/1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.system {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #c1baaf;
}
.led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #abd396;
  box-shadow: 0 0 7px #95bf8566;
  display: inline-block;
}
.cabinet {
  position: relative;
  background: linear-gradient(
    150deg,
    #555058,
    #38353b 19%,
    #343137 78%,
    #4b444a
  );
  border: 1px solid #71686a;
  border-bottom: 4px solid #242127;
  border-radius: 19px;
  padding: 14px 15px 0;
  box-shadow:
    inset 0 1px #b1a39d55,
    0 6px 0 #100f15,
    0 14px 24px #07050c47;
}
.screen {
  isolation: isolate;
  position: relative;
  overflow: hidden;
  min-height: 312px;
  height: clamp(312px, 26vw, 350px);
  border: 5px solid #16131c;
  border-radius: 11px;
  background: #24202e;
}
.poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 56%;
  image-rendering: pixelated;
  position: absolute;
  inset: 0;
  z-index: -3;
}
.screen:before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(
      90deg,
      #191422f5 0%,
      #211729eb 20%,
      #25182d9e 38%,
      transparent 64%
    ),
    linear-gradient(0deg, #23192b38, transparent 40%);
}
.screen:after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    #26172317 0 1px,
    transparent 1px 4px
  );
  box-shadow: inset 0 0 24px #150c2238;
}
.feature {
  padding: 26px 34px;
  max-width: 47%;
  height: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
}
.screen-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffcb85;
}
.screen-kicker:before {
  content: "";
  height: 9px;
  width: 9px;
  background: currentColor;
  box-shadow: 3px -3px #ffcb8540;
}
.feature h2 {
  font: normal clamp(55px, 6.2vw, 84px) / 0.82 var(--head);
  letter-spacing: -0.025em;
  text-transform: uppercase;
  margin: 12px 0;
  color: #fff0d6;
  text-shadow: 3px 4px 0 #503344;
}
.feature h2 span {
  display: block;
}
.feature p {
  color: #e6dada;
  font-size: 15px;
  line-height: 1.4;
  max-width: 290px;
}
.primary {
  border: 1px solid #ffc572;
  border-bottom: 3px solid #af641f;
  box-shadow:
    0 3px #211820,
    inset 0 1px #ffda91;
  background: var(--gold);
  color: #221b1b;
  border-radius: 6px;
  font-weight: 800;
  font-size: 15px;
  min-height: 43px;
  padding: 8px 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.feature .primary {
  margin-top: 17px;
}
.primary svg {
  width: 15px;
  height: 15px;
}
.bezel {
  height: 36px;
  padding: 0 7px;
  color: #ddd2c5;
}
.serial {
  font:
    normal 18px/1 Pixel,
    monospace;
  letter-spacing: 0.07em;
}
.bezel-left,
.bezel-right,
.pager {
  display: flex;
  align-items: center;
  gap: 12px;
}
.screw {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: linear-gradient(
    140deg,
    #827d81 40%,
    #272428 42% 57%,
    #706a70 60%
  );
  border-radius: 100%;
  border: 1px solid #262328;
}
.vents {
  width: 46px;
  height: 9px;
  background: repeating-linear-gradient(
    100deg,
    #1d1b21 0 3px,
    transparent 3px 7px
  );
}
.bezel-right .micro {
  font-size: 10px;
}
.pager {
  position: absolute;
  right: 16px;
  bottom: 13px;
  gap: 3px;
  z-index: 3;
  background: #191520cd;
  border: 1px solid #b6a1ab63;
  border-radius: 5px;
}
.pager button {
  width: 29px;
  height: 28px;
  border: 0;
  background: none;
  color: #e4cad3;
  padding: 0;
  display: grid;
  place-items: center;
}
.pager i {
  width: 7px;
  height: 7px;
  border-radius: 1px;
  background: #9c8b97;
}
.pager .active i {
  width: 14px;
  background: #ffbb60;
}
.section-head {
  margin: 30px 0 14px;
  gap: 12px;
}
.section-head h2 {
  font-size: 32px;
}
.section-head .micro {
  color: #b5aca3;
}
.library {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.cart {
  position: relative;
  display: block;
  min-width: 0;
  padding: 8px 8px 0;
  background: linear-gradient(120deg, #3c383e, #312e33);
  border: 1px solid #5b5558;
  border-bottom: 3px solid #252127;
  border-radius: 11px;
  box-shadow:
    0 3px #0f0e12,
    inset 0 1px #8c818040;
  transition:
    border-color 0.12s,
    transform 0.12s;
}
.cart:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.cover {
  height: clamp(109px, 10vw, 137px);
  border-radius: 4px;
  border: 2px solid #211e25;
  overflow: hidden;
  position: relative;
}
.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}
.cart-id {
  position: absolute;
  left: 8px;
  top: 8px;
  padding: 2px 6px;
  background: #211c27e8;
  color: #f3e6d1;
  border: 1px solid #ffffff44;
  font-size: 10px;
}
.cart-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 11px 8px 14px;
}
.cart-foot h3 {
  font-size: 28px;
  line-height: 1;
  margin: 4px 0;
}
.tag {
  color: var(--accent);
  font-size: 11px;
}
.launch {
  border: 1px solid #686065;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--paper);
}
.launch svg {
  width: 12px;
  height: 12px;
}
.footer {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #a69f96;
  margin: 25px 0 30px;
  font-size: 11px;
}
.footer:after {
  content: "";
  height: 1px;
  background: #464046;
  flex: 1;
}
dialog,
.overlay-card {
  background: #2d292f;
  color: var(--paper);
  border: 1px solid #766963;
  border-radius: 12px;
  padding: 22px;
  box-shadow: 0 8px 0 #151219;
  max-width: min(380px, calc(100% - 24px));
}
dialog::backdrop {
  background: #0a0813c7;
}
dialog {
  width: 340px;
}
.dialog-head {
  gap: 12px;
  margin-bottom: 14px;
}
#close-prefs {
  width: 38px;
  height: 38px;
  font-size: 23px;
}
.toggle-row {
  padding: 11px 0;
  border-top: 1px solid #51494f;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.toggle-row button {
  min-width: 63px;
}
.quiet,
.mini,
.control {
  padding: 8px 13px;
  min-height: 42px;
  font-weight: 680;
  font-size: 14px;
}
.quiet:hover,
.control:hover,
.mini:hover,
.settings:hover {
  background: #443c45;
}
.record-list {
  display: grid;
  gap: 10px;
}
.record-row {
  display: flex;
  align-items: center;
  padding: 10px;
  gap: 18px;
  border: 1px solid #514a50;
  background: #302c32;
  border-radius: 7px;
}
.record-row img {
  width: 110px;
  height: 62px;
  object-fit: cover;
  image-rendering: pixelated;
}
.record-row h2 {
  font-size: 26px;
}
.record-row strong {
  margin-left: auto;
  font: 28px Pixel;
}
.records-info {
  margin: 0 0 20px;
  color: var(--muted);
}
.play-wrap {
  max-width: 660px;
  margin: 16px auto 28px;
}
.stage-head {
  margin-bottom: 10px;
  gap: 12px;
}
.stage-head h1 {
  font-size: 33px;
}
.stage-tools {
  display: flex;
  gap: 8px;
}
.game-unit {
  border: 1px solid #645b61;
  border-radius: 13px;
  padding: 8px;
  background: #373239;
  box-shadow: 0 5px #100e15;
}
.field {
  position: relative;
  isolation: isolate;
  background: #221d2c;
  border: 3px solid #16121d;
  border-radius: 8px;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.field canvas {
  width: 100%;
  height: min(58svh, 490px);
  display: block;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.hud {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 5px 9px;
  color: #d5cbbd;
}
.hud b {
  display: inline-block;
  font: 24px/1 Pixel;
  color: #ffcb76;
  margin-left: 4px;
}
.overlay {
  position: absolute;
  z-index: 2;
  inset: 0;
  background: #16121c9c;
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
  padding: 8px;
}
.overlay[hidden] {
  display: none;
}
.overlay-card {
  text-align: center;
  width: min(355px, 100%);
  max-width: 100%;
  min-width: 0;
  max-height: 100%;
  overflow: auto;
  padding: 19px;
}
.overlay-card h2 {
  font-size: 39px;
  margin: 6px 0;
}
.overlay-card p {
  font-size: 15px;
  line-height: 1.4;
  color: #ded3c8;
  margin: 8px 0 14px;
}
.overlay-card .micro {
  color: var(--gold);
  font-size: 11px;
}
.overlay-actions,
.controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.controls {
  margin: 9px 0 1px;
  flex-wrap: nowrap;
}
.control {
  flex: 1;
  min-width: 0;
  touch-action: manipulation;
  border-bottom: 3px solid var(--accent);
}
.hint {
  text-align: center;
  color: #c9bfb8;
  font-size: 13px;
  line-height: 1.5;
  margin: 12px 3px 0;
}
.manual {
  width: 100%;
  min-height: 72px;
  margin-top: 10px;
}
.notice {
  display: block;
  font-size: 13px;
  color: #ffda9e;
  margin-top: 6px;
}
.notice:empty {
  display: none;
}
@media (max-width: 800px) {
  .bar,
  main {
    width: calc(100% - 36px);
  }
  .bar {
    height: 60px;
    gap: 24px;
  }
  .screen {
    height: 300px;
    min-height: 0;
  }
  .feature {
    max-width: 53%;
    padding: 20px;
  }
  .cart-foot {
    padding: 10px 3px;
  }
  .cart-foot h3 {
    font-size: 23px;
  }
  .launch {
    width: 25px;
    height: 25px;
  }
  .library {
    gap: 9px;
  }
  .cabinet {
    padding: 10px 10px 0;
  }
  .cover {
    height: 99px;
  }
  .tag {
    font-size: 10px;
  }
}
@media (max-width: 599px) {
  .bar,
  main {
    width: calc(100% - 28px);
  }
  .bar {
    height: 54px;
    gap: 14px;
  }
  .brand {
    font-size: 21px;
  }
  .brand img {
    width: 25px;
    height: 25px;
    margin-right: 2px;
  }
  nav {
    gap: 13px;
  }
  nav a {
    font-size: 12px;
  }
  .settings {
    width: 34px;
    height: 34px;
  }
  .wrap-title {
    margin: 18px 0 12px;
  }
  .system {
    font-size: 9px;
    gap: 6px;
  }
  .cabinet {
    padding: 7px 7px 0;
    border-radius: 13px;
  }
  .screen {
    height: 345px;
    border-width: 3px;
  }
  .poster {
    height: 70%;
    object-position: 62% center;
    object-fit: cover;
  }
  .screen {
    background: #251d2a;
  }
  .screen:before {
    background: linear-gradient(
      0deg,
      #251d2a 0%,
      #251d2a 22%,
      #251d2ae3 39%,
      #251d2a08 68%
    );
  }
  .feature {
    justify-content: flex-end;
    padding: 16px;
    max-width: 100%;
  }
  .feature h2 {
    font-size: 51px;
    margin: 8px 0 6px;
  }
  .feature h2 span {
    display: inline;
  }
  .feature h2 span + span:before {
    content: " ";
  }
  .feature p {
    font-size: 14px;
    max-width: 275px;
  }
  .feature .primary {
    margin-top: 12px;
  }
  .screen-kicker {
    font-size: 10px;
  }
  .bezel {
    height: 28px;
    padding: 0 3px;
  }
  .serial {
    font-size: 14px;
  }
  .bezel-left,
  .bezel-right {
    gap: 7px;
  }
  .vents {
    width: 24px;
  }
  .section-head {
    margin: 23px 0 12px;
  }
  .section-head h2 {
    font-size: 29px;
  }
  .section-head .micro {
    font-size: 10px;
  }
  .library {
    grid-template-columns: 1fr;
    gap: 9px;
  }
  .cart {
    display: flex;
    align-items: stretch;
    padding: 5px;
    gap: 7px;
    border-radius: 8px;
  }
  .cover {
    width: 34%;
    height: 76px;
    flex: none;
  }
  .cart-foot {
    flex: 1;
    padding: 6px;
    min-width: 0;
  }
  .cart-foot h3 {
    font-size: 25px;
  }
  .cart-id {
    font-size: 9px;
    top: 4px;
    left: 4px;
  }
  .launch {
    width: 26px;
    height: 26px;
  }
  .footer {
    margin: 20px 0;
  }
  .stage-head h1 {
    font-size: 29px;
  }
  .game-unit {
    padding: 5px;
  }
  .play-wrap {
    margin-top: 12px;
  }
  .field canvas {
    height: min(58svh, 480px);
  }
  .hud .micro {
    font-size: 10px;
  }
  .hud b {
    font-size: 21px;
  }
  .control {
    padding: 8px 3px;
  }
  .record-row {
    gap: 9px;
  }
  .record-row img {
    width: 65px;
  }
  .record-row h2 {
    font-size: 22px;
  }
}
@media (max-width: 355px) {
  .bar,
  main {
    width: calc(100% - 16px);
  }
  .bar {
    gap: 8px;
  }
  .brand {
    font-size: 18px;
  }
  nav {
    gap: 8px;
  }
  .screen {
    height: 325px;
  }
  .feature {
    padding: 12px;
  }
  .launch {
    display: none;
  }
  .tag {
    font-size: 9px;
  }
  .cart-foot h3 {
    font-size: 23px;
  }
  .stage-head h1 {
    font-size: 23px;
  }
  .stage-tools .quiet {
    padding: 8px;
  }
  .feature h2 {
    font-size: 44px;
  }
}
@supports (padding: max(0px)) {
  body {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    padding-bottom: env(safe-area-inset-bottom);
  }
  header {
    padding-top: env(safe-area-inset-top);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:after,
  *:before {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
.field {
  background: repeating-linear-gradient(135deg, #27232e 0 3px, #292530 3px 6px);
}
.field canvas {
  width: min(100%, calc(58svh * 0.88889), 435.55px);
  height: auto;
  aspect-ratio: 8 / 9;
  image-rendering: pixelated;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
@media (max-height: 480px) and (min-width: 500px) {
  .play-wrap {
    margin-top: 4px;
  }
  .field canvas {
    width: min(65%, 230px);
  }
  .overlay-card {
    padding: 8px;
  }
  .overlay-card h2 {
    font-size: 24px;
  }
  .overlay-card p {
    margin: 3px 0;
    font-size: 13px;
  }
}
button,
a {
  touch-action: manipulation;
}
@media (hover: none) {
  .cart:hover {
    transform: none;
  }
}
@media (max-width: 355px) {
  .pager {
    top: 8px;
    right: 8px;
    bottom: auto;
  }
  nav a {
    white-space: nowrap;
  }
  .section-head {
    gap: 6px;
  }
  .section-head h2 {
    font-size: 26px;
  }
  .section-head .micro {
    white-space: nowrap;
    font-size: 9px;
  }
}
@media (max-width: 310px) {
  .bar {
    display: grid;
    grid-template-columns: 1fr auto;
    height: auto;
    gap: 0;
  }
  .brand {
    height: 41px;
  }
  .settings {
    grid-column: 2;
    grid-row: 1;
  }
  nav {
    grid-column: 1 / -1;
    grid-row: 2;
    height: 30px;
    gap: 18px;
  }
}
.race-strip {
  display: grid;
  gap: 8px;
  padding: 8px 12px;
  background: #262334;
  border-radius: 5px;
  color: #d4c5e9;
  font: 600 13px/1.3 var(--mono, monospace);
}
.race-strip[hidden] {
  display: none;
}
#race-state::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: #99dcb2;
}
.race-top {
  display: flex;
  justify-content: space-between;
  gap: 4px;
}
#race-count {
  color: #bdb3bd;
}
#race-seats {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
#race-seats li {
  display: grid;
  border-left: 2px solid #756782;
  padding-left: 6px;
  min-width: 0;
}
#race-seats li.own {
  border-color: var(--gold);
}
#race-seats span {
  font-size: 10px;
  white-space: nowrap;
  color: #c9bfcb;
}
#race-seats strong {
  font:
    18px/1 Pixel,
    monospace;
  color: #ffe2a5;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 350px) {
  .race-strip {
    padding: 6px;
  }
  .race-strip li {
    padding-left: 3px;
  }
}

.overlay-card p {
  white-space: pre-line;
}
