@font-face {
  font-family: Chango;
  src: url('assets/Chango-Regular.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: Outfit;
  src: url('assets/Outfit.ttf') format('truetype');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'DM Mono';
  src: url('assets/DMMono-Regular.ttf') format('truetype');
  font-display: swap;
}
:root {
  --room: #1d2a25;
  --dark: #151e1b;
  --cream: #f0e5ca;
  --muted: #b1bbae;
  --gold: #f0c374;
  --line: #bdc8ab3d;
  --ink: #2b3029;
  --mono: 'DM Mono', monospace;
  --display: Chango, Georgia, serif;
  --body: Outfit, sans-serif;
  color-scheme: dark;
  color: var(--cream);
  background: var(--room);
  font-family: var(--body);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    repeating-linear-gradient(0deg, transparent 0 3px, #091a130e 3px 4px),
    radial-gradient(ellipse at 50% 24%, #37483b 0, #26362c 40%, #1b2823 82%);
}
button, input { font: inherit; }
button {
  border: 1px solid var(--line);
  background: transparent;
  color: inherit;
  cursor: pointer;
  touch-action: manipulation;
}
button:disabled { cursor: default; opacity: .45; }
button:focus-visible, a:focus-visible, canvas:focus-visible, input:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}
a { color: inherit; }
h1, h2, h3, p, dd, dl { margin: 0; }
h1, h2, h3 { font-weight: 500; }
canvas { display: block; width: 100%; height: auto; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; top: -100px; left: 18px; z-index: 4; }
.skip-link:focus { top: 8px; padding: 12px; background: var(--dark); }
.small-label, .count, .free-play, .ticket-heading, .option-meta, .pager, .storage-note {
  font: 10px/1.4 var(--mono);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.masthead {
  background: #19241fdc;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 #1018109c;
}
.mast-inner {
  width: min(calc(100% - 72px), 1296px);
  min-height: 68px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 39px; height: 39px; transform: rotate(-7deg); box-shadow: 2px 3px 1px #1016116e; border-radius: 9px; }
.brand > span { font: 22px/.94 var(--display); letter-spacing: -1.2px; }
.brand small { display: block; margin-top: 5px; font: 9px/1 var(--mono); text-transform: uppercase; letter-spacing: .23em; color: var(--gold); }
.header-tools, .header-tools button, .free-play { display: flex; align-items: center; }
.header-tools { gap: 24px; }
.header-tools button { gap: 8px; border: 0; padding: 9px 0; font-size: 13px; }
.header-tools button:hover, .browse-all:hover { color: var(--gold); }
.free-play { gap: 8px; padding-right: 23px; border-right: 1px solid var(--line); font-size: 9px; color: var(--muted); }
.free-play i, .option-led {
  width: 7px; height: 7px; border-radius: 50%; background: #b6ca8d;
  box-shadow: 0 0 7px #bfdb884a;
}
.help-icon { border: 1.4px solid currentColor; border-radius: 50%; width: 17px; height: 17px; font: 12px/15px var(--mono); text-align: center; }
.sound-icon { width: 17px; height: 15px; position: relative; }
.sound-icon::before {
  content: ''; position: absolute; inset: 1px 6px 1px 0; background: currentColor;
  clip-path: polygon(0 32%, 35% 32%, 95% 0, 95% 100%, 35% 68%, 0 68%);
}
.sound-icon::after { content: '×'; position: absolute; left: 12px; top: 1px; font: 12px/1 var(--mono); }
#sound[aria-pressed=true] .sound-icon::after { content: ')'; }
.header-tools .mobile-picker { display: none; }
.grid-icon {
  width: 5px; height: 5px; display: inline-block; margin: -6px 8px 0 0;
  background: currentColor; box-shadow: 7px 0 currentColor, 0 7px currentColor, 7px 7px currentColor;
}
.arcade {
  --cabinet-width: clamp(300px, calc(60svh - 140px), 470px);
  width: min(calc(100% - 64px), 1280px);
  margin: 0 auto; padding: 20px 0 34px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--cabinet-width) minmax(0, 1fr);
  grid-template-areas: 'library cabinet details';
  column-gap: clamp(24px, 4.2vw, 68px);
  align-items: start;
}
.side-panel { width: min(100%, 255px); padding-top: 23px; }
.library { grid-area: library; justify-self: end; }
.details { grid-area: details; }
.section-title, .pager, .browse-all, .ticket-heading, .ticket-stub, .rules div, .key-guide div, .gentle-switch {
  display: flex; align-items: center; justify-content: space-between;
}
.section-title { border-bottom: 1px solid var(--line); padding-bottom: 13px; margin-bottom: 15px; }
.section-title h2, .controls-panel h2 { font: 22px/1.2 var(--display); letter-spacing: -1.1px; }
.count { border: 1px solid #eac37a75; color: var(--gold); border-radius: 20px; padding: 2px 8px; }
.lineup { display: grid; gap: 8px; }
.shelf-label { color: var(--gold); margin: 0 0 9px; font: 10px/1.3 var(--mono); letter-spacing: .11em; text-transform: uppercase; }
.catalog .shelf-label { grid-column: 1 / -1; margin: 9px 0 1px; }
.machine-option {
  width: 100%; display: grid; grid-template-columns: 55px 1fr 8px; align-items: center;
  gap: 11px; min-height: 68px; padding: 5px 12px 5px 5px;
  border: 1px solid var(--line); border-radius: 5px; background: #18231fd4;
  text-align: left; transition: border-color .15s, background .15s;
}
.machine-option:hover { border-color: #e9cf96a6; background: #303e32; }
.machine-option[aria-current=true] { background: #394234; border-color: var(--gold); box-shadow: inset 2px 0 var(--gold); }
.machine-option canvas { aspect-ratio: 1; border: 1px solid #0c15154a; border-radius: 2px; }
.option-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.option-meta { font-size: 8px; letter-spacing: .06em; color: var(--muted); }
.option-name { font: 550 17px/1.1 var(--body); letter-spacing: -.25px; }
.option-led { opacity: 0; width: 6px; height: 6px; background: var(--gold); box-shadow: 0 0 7px #e4bd6d70; }
.machine-option[aria-current=true] .option-led { opacity: 1; }
.machine-option[aria-current=true] .option-meta { color: var(--gold); }
.pager { margin: 14px 0 18px; font-size: 9px; color: var(--muted); }
.pager button { width: 36px; height: 30px; padding: 0; border-radius: 3px; font: 18px/1 var(--body); color: var(--cream); }
.pager button:hover:not(:disabled), .machine-under button:hover:not(:disabled) { background: #c7d3ad16; }
.browse-all { width: 100%; padding: 16px 1px 6px; border: 0; border-top: 1px solid var(--line); justify-content: start; gap: 8px; font: 13px/1.3 var(--body); }
.browse-all > span:last-child { margin-left: auto; font-size: 15px; }
.machine-column { grid-area: cabinet; width: 100%; min-width: 0; }
.machine {
  position: relative;
  padding: 5px 8px 8px; border: 2px solid #151b16; border-radius: 13px 13px 12px 12px;
  background: linear-gradient(90deg, #46382a, #a2875c 1%, #5c5140 2.1%, #252722 3%, #282923 96.5%, #918064 98%, #4d4132 99%);
  box-shadow: inset 0 2px #e7c98d99, inset 0 -3px #101812, 0 3px 0 #0f1611, 0 13px 24px #0c130f70, 0 35px 64px #101a143d;
}
#marquee { border: 2px solid #332d21; border-radius: 7px 7px 3px 3px; box-shadow: 0 1px #d1bb91aa; }
.scoreboard {
  display: grid; grid-template-columns: 1.3fr 1fr .83fr; align-items: center;
  padding: 6px 7%; margin: 3px 0 1px; border-radius: 2px;
  border: 1px solid #6c6851; border-bottom-color: #111910;
  color: #f7d287;
  background: radial-gradient(#a6a06d1b .75px, transparent 1px) 0 0 / 3px 3px, #1b201a;
  box-shadow: inset 0 2px 4px #0d100c;
}
.scoreboard > div + div { border-left: 1px solid #a59c6f4a; padding-left: 18%; }
.scoreboard > div > span:first-child { display: block; margin-bottom: 2px; font: 8px/1.1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #dacb9d; }
.scoreboard output { font: 23px/1 var(--mono); letter-spacing: .025em; text-shadow: 0 0 8px #f2bd5c40; }
.scoreboard small { font-size: 12px; color: #d2b780; }
#balls { display: flex; gap: 5px; min-height: 23px; align-items: center; }
#balls i { width: 10px; height: 10px; border-radius: 50%; background: radial-gradient(circle at 33% 25%, #fffced, #d5d4b9 35%, #778982 66%, #3b4542 85%); box-shadow: 0 1px 2px #050906; }
#balls i.spent { background: #3b4337; box-shadow: inset 0 1px 2px #101810; }
.playfield { position: relative; }
#table { touch-action: pan-y; outline-offset: -4px; }
.table-card {
  position: absolute; left: 50%; top: 51%; transform: translate(-50%, -50%);
  width: 75%; max-width: 300px; padding: 17px 15px; text-align: center;
  background: #f1e5c9; color: var(--ink); border: 2px solid var(--ink);
  box-shadow: 4px 5px 0 #1f3029c9;
}
.table-card .small-label { font-size: 8px; color: #944534; }
.table-card h2 { font: 22px/1.12 var(--display); letter-spacing: -1px; margin: 8px 0; }
.table-card p:not(.small-label) { font-size: 13px; line-height: 1.4; }
.table-card button { width: 100%; margin-top: 12px; }
.control-deck {
  display: grid; grid-template-columns: 1fr 1.5fr 1fr; gap: 9px;
  padding: 7px 12px 9px; border: 1px solid #a59978; border-top: 3px double #5f5944; border-radius: 2px 2px 5px 5px;
  background: repeating-linear-gradient(0deg, transparent 0 2px, #604b3411 2px 3px), linear-gradient(180deg, #e3d9ba, #c4b99c);
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.control-deck button {
  min-width: 0; border: 1px solid #34352b; border-radius: 5px; padding: 3px 4px;
  min-height: 43px; box-shadow: inset 0 1px #fff4d087, 0 3px 0 #313127;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.control-deck small { display: block; font: 8px/1.1 var(--mono); letter-spacing: .05em; text-transform: uppercase; }
.flipper-button { background: var(--machine-primary, #c44232); color: #fff1d6; }
.flipper-button > span { font: 20px/.95 var(--body); display: block; margin-bottom: 3px; }
.flipper-button[aria-pressed=true], .control-deck .charging { transform: translateY(2px); box-shadow: inset 0 2px 3px #322c2060, 0 1px 0 #313127; }
.launch-button { background: #f1c16b; color: #30291d; font: 650 14px/1.05 var(--body); }
.launch-button:disabled { opacity: .75; }
.charge-track { display: block; width: 66%; height: 2px; margin: 4px auto 3px; background: #745d3542; }
.charge-track i { display: block; width: 0; height: 100%; background: #4c3f27; }
.machine-under { display: grid; grid-template-columns: repeat(3, 1fr); margin: 10px 0 0; }
.machine-under button { padding: 5px 2px; min-height: 29px; font-size: 12px; border: 0; border-right: 1px solid var(--line); }
.machine-under button:last-child { border: 0; }
#status { min-height: 1.5em; padding: 6px 6px 0; color: var(--muted); font-size: 12px; line-height: 1.35; text-align: center; }
.ticket {
  --ticket-ink: #34392e;
  position: relative; padding: 18px 20px 15px; color: var(--ticket-ink);
  background: repeating-linear-gradient(0deg, transparent 0 3px, #a78e5310 3px 4px), #ecdfbf;
  clip-path: polygon(0 5px, 5px 0, calc(100% - 5px) 0, 100% 5px, 100% calc(100% - 85px), calc(100% - 5px) calc(100% - 81px), 100% calc(100% - 77px), 100% calc(100% - 5px), calc(100% - 5px) 100%, 5px 100%, 0 calc(100% - 5px), 0 calc(100% - 77px), 5px calc(100% - 81px), 0 calc(100% - 85px));
}
.ticket-heading { padding-bottom: 10px; border-bottom: 3px double #746b515e; color: #744232; font-size: 9px; }
.ticket h2 { font: 25px/1.05 var(--display); letter-spacing: -1.45px; margin: 17px 0 10px; }
#table-description { font-size: 14px; line-height: 1.45; }
.mission { margin: 15px 0 10px; padding: 12px 0 3px; border-top: 3px double #746b5166; }
.mission .small-label { font-size: 8px; color: #70462e; }
.mission h3 { margin: 4px 0 6px; font: 17px/1.15 var(--display); letter-spacing: -.7px; }
#mission-copy { font-size: 13px; line-height: 1.4; }
#mission-state { margin: 9px 0 2px; padding: 6px 8px; font: 10px/1.45 var(--mono); color: #f4e6bf; background: #314c40; border-radius: 2px; }
#score-details { margin: 12px 0; }
#score-details summary { font-size: 13px; cursor: pointer; font-weight: 550; }
#score-details summary:focus-visible { outline: 2px solid #845931; outline-offset: 2px; }
#score-details .rules { margin: 6px 0 0; }
#score-details .shot-values { margin-top: 0; }
.rules { margin: 16px 0 14px; }
.rules div { padding: 5px 0; gap: 8px; border-top: 1px solid #756b4b38; }
.rules dt { font-size: 12px; }
.rules dd { font: 11px/1.2 var(--mono); }
.ticket-stub { padding-top: 12px; border-top: 1px dashed #776b4d94; }
.ticket-stub .small-label { display: block; font-size: 8px; }
#best { display: block; margin-top: 2px; font: 24px/1.1 var(--mono); letter-spacing: .05em; }
.ticket-star { display: grid; place-items: center; width: 37px; height: 37px; color: #874931; border: 3px double currentColor; border-radius: 50%; font-size: 25px; line-height: 1; }
.storage-note { display: block; margin-top: 3px; font-size: 7px; color: #625d4a; }
.controls-panel { margin-top: 26px; padding: 0 2px; }
.controls-panel h2 { font-size: 18px; }
.key-guide { padding: 8px 0; }
.key-guide div { min-height: 32px; padding: 3px 0; gap: 10px; }
.key-guide dt, .gentle-switch { font-size: 13px; }
.key-guide dd { display: flex; gap: 4px; align-items: center; }
.key-guide dd span { font-size: 10px; color: var(--muted); margin: 0 2px; }
kbd { min-width: 21px; padding: 2px 5px; border: 1px solid #b9bf9d63; border-bottom-width: 2px; border-radius: 3px; color: #e2e3cc; text-align: center; font: 10px/1.2 var(--mono); }
.gentle-switch { position: relative; border-top: 1px solid var(--line); padding: 12px 0 3px; cursor: pointer; gap: 8px; }
.gentle-switch input { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; margin: 0; opacity: 0; }
.switch-track { position: relative; width: 29px; height: 16px; border: 1px solid #879380; border-radius: 15px; background: #19231d; pointer-events: none; }
.switch-track::after { content: ''; position: absolute; width: 10px; height: 10px; top: 2px; left: 2px; background: #bfc4b2; border-radius: 50%; transition: transform .15s; }
.gentle-switch input:checked + .switch-track { background: var(--gold); border-color: var(--gold); }
.gentle-switch input:checked + .switch-track::after { background: #31392a; transform: translateX(13px); }
.gentle-switch input:focus-visible + .switch-track { outline: 3px solid var(--gold); outline-offset: 3px; }
.site-footer { border-top: 1px solid var(--line); padding: 17px max(30px, calc((100% - 1296px) / 2)); display: flex; justify-content: space-between; align-items: center; gap: 18px; color: var(--muted); font: 10px/1.5 var(--mono); }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer > div { text-align: right; }
.build-stats { display: flex; gap: 12px; justify-content: end; font-size: 8px; }
dialog {
  position: fixed; width: min(460px, calc(100% - 30px)); max-height: calc(100dvh - 40px);
  padding: 26px; border: 1px solid #857a5b; border-radius: 7px; background: #ecdfc1; color: var(--ink);
  box-shadow: 0 16px 65px #070e0bbb; color-scheme: light;
}
dialog::backdrop { background: #101a15bb; backdrop-filter: blur(3px); }
dialog h2 { margin: 0 24px 14px 0; font: 25px/1.16 var(--display); letter-spacing: -1.4px; }
dialog p, dialog li { font-size: 14px; line-height: 1.5; }
dialog p + p, dialog li + li { margin-top: 10px; }
dialog ol { padding-left: 20px; }
dialog .small-label { font: 9px/1.3 var(--mono); }
dialog .close-button { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; padding: 0; border: 0; font-size: 25px; }
.solid-button, .dialog-actions button { padding: 10px 15px; font-size: 13px; border-radius: 3px; }
.solid-button { background: #263a30; border: 1px solid #213527; color: #f6e8c7; }
#back-to-game, .dialog-actions { margin-top: 19px; }
.dialog-actions { display: flex; justify-content: end; gap: 8px; }
.dialog-actions button { border: 1px solid #5c604b; }
dialog :focus-visible { outline-color: #8d4b23; }
#collection { width: min(870px, calc(100% - 32px)); padding: 22px; background: #202e27; color: var(--cream); border-color: #717b62; color-scheme: dark; }
.collection-heading { display: flex; justify-content: space-between; align-items: start; padding-bottom: 15px; }
.collection-heading .small-label { color: var(--gold); margin-bottom: 5px; }
.collection-heading h2 { margin: 0; }
.collection-heading .close-button { position: static; border: 1px solid var(--line); border-radius: 3px; }
.catalog { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.catalog .machine-option { grid-template-columns: 47px 1fr 5px; min-height: 59px; gap: 8px; }
.catalog .option-name { font-size: 15px; }
#collection :focus-visible { outline-color: var(--gold); }
.noscript { position: fixed; bottom: 0; width: 100%; background: var(--dark); color: var(--cream); padding: 15px; text-align: center; }
@media (min-width: 961px) and (max-height: 790px) {
  .mast-inner { min-height: 60px; }
  .arcade { padding-top: 20px; }
  .side-panel { padding-top: 14px; }
}
@media (max-width: 1100px) and (min-width: 961px) {
  .arcade { width: calc(100% - 40px); column-gap: 22px; --cabinet-width: clamp(300px, calc(60svh - 140px), 410px); }
}
@media (max-width: 960px) {
  .mast-inner { min-height: 62px; width: calc(100% - 40px); }
  .header-tools .mobile-picker { display: flex; color: var(--gold); }
  .free-play { display: none; }
  .arcade { width: min(calc(100% - 32px), 550px); padding: 20px 0 28px; display: flex; flex-direction: column; align-items: center; gap: 24px; }
  .library { display: none; }
  .machine-column { width: min(100%, clamp(304px, calc(60svh - 84px), 460px)); }
  .side-panel.details { width: 100%; padding: 0; display: grid; grid-template-columns: 1.1fr 1fr; gap: 22px; align-items: start; }
  .controls-panel { margin-top: 4px; }
  .site-footer { padding: 16px 20px; }
}
@media (max-width: 650px) {
  .mast-inner { width: calc(100% - 28px); min-height: 55px; }
  .brand { gap: 8px; }
  .brand img { width: 30px; height: 30px; border-radius: 7px; }
  .brand > span { font-size: 17px; letter-spacing: -.9px; }
  .brand small { font-size: 7px; margin-top: 4px; }
  .header-tools { gap: 10px; }
  .header-tools button { min-height: 38px; min-width: 30px; justify-content: center; }
  .header-tools .mobile-picker { min-width: max-content; gap: 5px; font-size: 12px; }
  #help-button > span:last-child, #sound-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .arcade { width: calc(100% - 20px); padding-top: 12px; }
  .side-panel.details { width: min(100%, 440px); }
  .ticket { padding: 14px; }
  .ticket h2 { font-size: 22px; }
  .catalog { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .site-footer { display: block; text-align: center; font-size: 9px; }
  .site-footer > div { text-align: center; margin-top: 6px; }
  .build-stats { justify-content: center; }
}
@media (max-width: 460px) {
  .machine { padding: 4px 6px 7px; }
  .side-panel.details { width: min(100%, 368px); grid-template-columns: 1fr; gap: 16px; }
  .controls-panel { padding: 0 4px; }
  .ticket { padding: 16px 20px; }
  .rules { margin: 10px 0; }
  #collection { padding: 15px; }
  .catalog .machine-option { grid-template-columns: 35px minmax(0,1fr); gap: 6px; padding: 4px; min-height: 49px; }
  .catalog .option-name { font-size: 13px; }
  .catalog .option-meta { font-size: 7px; }
  .catalog .option-led { display: none; }
  dialog { padding: 21px; }
  .collection-heading h2, dialog h2 { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
@media (orientation: landscape) and (max-height: 540px) and (max-width: 960px) {
  .mast-inner { min-height: 46px; }
  .arcade { width: calc(100% - 24px); padding-top: 7px; }
  .machine-column {
    --field-width: clamp(122px, calc(66.66svh - 72px), 285px);
    width: min(100%, calc(var(--field-width) + 312px));
  }
  .machine {
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--field-width) minmax(0, 1fr);
    grid-template-rows: auto 1fr auto; gap: 5px 8px;
    padding: 6px 9px; align-items: start;
  }
  .playfield { grid-column: 2; grid-row: 1 / 4; }
  #marquee { grid-column: 1; grid-row: 1; align-self: start; }
  .scoreboard { grid-column: 3; grid-row: 1 / 3; align-self: stretch; grid-template-columns: 1fr; gap: 4px; padding: 6px 10px; }
  .scoreboard > div + div { border: 0; padding: 0; }
  .control-deck { display: contents; }
  #launch { grid-column: 1; grid-row: 2; align-self: center; }
  #left-flipper { grid-column: 1; grid-row: 3; }
  #right-flipper { grid-column: 3; grid-row: 3; }
  .control-deck button { min-height: 44px; margin-bottom: 3px; }
  .table-card { width: 94%; padding: 7px; }
  .table-card h2 { font-size: 16px; margin: 4px 0; }
  .table-card p:not(.small-label) { font-size: 11px; }
  .table-card button { padding: 7px; margin-top: 6px; }
  .machine-under { margin-top: 5px; }
}
