:root {
  color-scheme: dark;
  font-family: system-ui, sans-serif;
  color: #efede5;
  background: #15171a;
  font-synthesis: none;
  accent-color: #e0bb70;
  scrollbar-color: #73624b #171a18;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
::selection { color: #211b0f; background: #f0d38c; }
button, a, input, select { font: inherit; }
a { color: #ded7c5; text-underline-offset: 5px; }
button {
  min-height: 44px;
  padding: 10px 15px;
  border: 1px solid #55574f;
  border-radius: 5px;
  color: #efede5;
  background: #26282a;
  cursor: pointer;
}
button:hover { background: #3a3934; }
button:disabled { opacity: .45; cursor: default; }
button[aria-pressed=true] { background: #db8050; color: #1d1b17; border-color: #db8050; }
:where(button, a, input, select, summary, #cabinet-stage):focus-visible {
  outline: 2px solid #f0d38c;
  outline-offset: 4px;
}
.cabinet-page { max-width: 1440px; margin: auto; padding: 26px 38px; }
.cabinet-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.eyebrow { font-size: 10px; letter-spacing: .19em; color: #df955e; margin: 0 0 9px; }
.cabinet-header h1 { font: normal clamp(30px,4vw,48px)/1.08 Georgia,serif; letter-spacing: -.03em; margin: 0; }
.subtitle { font-size: 13px; color: #c2c1b6; margin: 9px 0 0; line-height: 1.5; }
.cabinet-header nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 22px; font-size: 13px; }
.cabinet-header nav a { display: flex; align-items: center; min-height: 44px; }
#cabinet-flow-status { margin: 0 0 14px; color: #e2ceb0; font-size: 14px; line-height: 1.5; }
.cabinet-room { position: relative; overflow: hidden; border: 1px solid #353638; border-radius: 9px; background: #171a18; }
.cabinet-screen { position: relative; min-width: 0; }
#cabinet-stage {
  height: min(72vh,760px);
  min-height: 480px;
  touch-action: none;
  background: linear-gradient(#08080760,#08080740),url('asset.php?name=arcade-room-1977.png') center/cover no-repeat;
}
#cabinet-stage canvas { display: block; width: 100%; height: 100%; }
.room-top { position: absolute; top: 20px; left: 22px; right: 22px; display: flex; align-items: center; justify-content: space-between; gap: 15px; z-index: 2; pointer-events: none; }
.edition { color: #c5c7b8; font-size: 10px; letter-spacing: .14em; text-shadow: 0 2px 6px #000; }
.room-hint { position: absolute; bottom: 22px; left: 24px; margin: 0; color: #d6d7c8; font-size: 12px; pointer-events: none; text-shadow: 0 2px 6px #000; }
.experience-copy { position: absolute; left: 24px; bottom: 58px; pointer-events: none; z-index: 1; color: #f0dec2; text-shadow: 0 2px 8px #000; transition: opacity .45s; }
.experience-copy p { font: normal clamp(17px,2vw,24px)/1.3 Georgia,serif; margin: 0 0 8px; }
.experience-copy span { font-size: 10px; letter-spacing: .16em; color: #ddc4a2; }
body[data-experience=coin] .room-top, body[data-experience=pan] .room-top { opacity: .18; }
body[data-experience=coin] .room-hint, body[data-experience=pan] .room-hint { visibility: hidden; }
body[data-experience=play] .experience-copy { opacity: 0; }
body[data-experience=coin] #cabinet-stage, body[data-experience=pan] #cabinet-stage { background-position: 50% 70%; }
.engine-source { position: absolute; left: 0; top: 0; width: 256px; height: 224px; opacity: 0; pointer-events: none; z-index: -1; overflow: hidden; }
.engine-source iframe { width: 256px; height: 224px; border: 0; display: block; }
.game-bar { position: relative; z-index: 2; border-top: 1px solid #3b3e3e; background: #202325; padding: 16px 22px; }
.play-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.game-utilities { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
body[data-arcade-provider^=ranked]:is([data-arcade-phase=playing],[data-arcade-phase=initials],[data-arcade-phase=checking],[data-arcade-phase=saving]) :is(#coin,#skip-intro) { display: none; }
body[data-experience=play] #skip-intro { display: none; }
#coin { min-width: 156px; background: linear-gradient(135deg,#e2c68d,#bb985d); border-color: #d9bb7b; color: #211e15; font-weight: 700; }
#coin:hover { background: #efd397; }
#coin span { padding-left: 8px; font-size: 12px; }
#coin[aria-busy=true] { cursor: wait; }
#skip-intro { background: transparent; color: #e6d4ae; border-color: #77705a; }
#skip-intro:hover { background: #38392e; }
#status { flex: 1 1 260px; margin: 0; color: #d0d7ca; font-size: 13px; line-height: 1.5; }
.cabinet-score-entry { padding: 20px 24px; border-top: 1px solid #6a795a; background: #142018; color: #e6f0d8; }
.cabinet-score-entry form { max-width: 720px; margin: auto; }
.score-entry-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; max-width: 720px; margin: 0 auto 14px; }
.score-entry-heading h2 { font: normal 24px/1.2 Georgia,serif; margin: 0; }
#cabinet-entry-score { font: 700 20px/1.4 monospace; font-variant-numeric: tabular-nums; color: #f0d38c; margin: 0; }
.initials-fields { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; }
.initials-fields > div { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.initials-fields > div p { margin: 0; }
.initials-fields label { font-size: 14px; line-height: 1.4; }
#cabinet-initials { width: 150px; min-width: 150px; min-height: 48px; padding: 9px 16px; border: 1px solid #b2c38e; border-radius: 4px; background: #101b12; color: #f4df9d; caret-color: #f4df9d; font: 700 26px/1 monospace; letter-spacing: 7px; text-transform: uppercase; text-align: center; }
#cabinet-save-score { background: #e0c382; border-color: #e0c382; color: #211b0f; font-weight: 700; }
#cabinet-save-score:hover { background: #f0d38c; }
#cabinet-skip-score { background: transparent; border-color: #718068; color: #e6f0d8; }
.cabinet-score-entry p, .initials-fields small { color: #cbd8bb; font-size: 13px; line-height: 1.5; }
.cabinet-score-entry p { margin: 10px 0 0; }
.cabinet-game-note { padding: 10px 22px; margin: 0; color: #c4d0bd; font-size: 12px; line-height: 1.5; background: #171a16; }
#cabinet-score-status:empty { display: none; }
body:is([data-arcade-phase=initials],[data-arcade-phase=saved],[data-arcade-phase=checking],[data-arcade-phase=saving]) #cabinet-stage { height: min(48vh,480px); min-height: 300px; }
body:is([data-arcade-phase=initials],[data-arcade-phase=saved],[data-arcade-phase=checking],[data-arcade-phase=saving]) :is(.experience-copy,.room-hint) { visibility: hidden; }
.control-deck { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 20px 36px; padding: 18px 22px; background: #1b1e1b; border-top: 1px solid #353938; }
.player-controls { display: flex; align-items: center; gap: 18px; }
.player-controls>div>p:not(.eyebrow) { font-size: 13px; color: #e0e0d3; margin: 0; }
.direction-pad { display: grid; grid-template-columns: repeat(3,44px); gap: 5px; }
.direction-pad button { padding: 5px; touch-action: none; font-size: 20px; }
.direction-pad button[data-dir=up] { grid-column: 2; }
.direction-pad button[data-dir=left] { grid-column: 1; }
.direction-pad button[data-active=true] { background: #d17c4d; color: #181a1b; }
body[data-arcade-provider=ranked-solo] [data-second-player] .direction-pad { display: none; }
.play-note { max-width: 360px; text-align: center; }
.play-note h2 { font: normal 18px/1.3 Georgia,serif; margin: 0 0 8px; }
.play-note p { font-size: 13px; line-height: 1.6; color: #c9d0c2; margin: 6px 0; }
.play-note .small { font-size: 12px; }
.cabinet-tools { border-top: 1px solid #3b3e3e; background: #20221f; }
summary { cursor: pointer; min-height: 48px; padding: 14px 22px; font-weight: 600; }
.cabinet-tools > :not(summary) { margin: 0 22px 14px; }
.cabinet-tools .cabinet-game-note { padding: 0; background: transparent; }
.tool-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.tool-controls .view-controls, .tool-controls .skip-preference { flex-basis: 100%; }
.score-recovery { padding: 0 22px; }
.score-recovery:has(#cabinet-retry-score:not([hidden])) { padding-top: 14px; padding-bottom: 14px; }
.score-recovery p { margin: 10px 0 0; color: #cbd8bb; font-size: 13px; line-height: 1.5; }
.view-controls { display: flex; flex-wrap: wrap; gap: 8px; }
.cabinet-game-choice { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 14px; }
.cabinet-game-choice select { max-width: 100%; min-height: 44px; background: #171b19; color: #f0e7ce; border: 1px solid #847960; border-radius: 5px; padding: 8px; }
.skip-preference { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; cursor: pointer; }
.skip-preference input { width: 21px; height: 21px; cursor: pointer; }
.preference-note { font-size: 12px; color: #c8c7b4; }
.audio-settings, .more-ways { margin-top: 16px; border: 1px solid #41443d; border-radius: 8px; background: #20221f; }
.audio-settings summary span { font-size: 12px; font-weight: 400; color: #c8ccbb; margin-left: 14px; }
.audio-sliders { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 24px; padding: 8px 22px 0; }
.audio-sliders label { font-size: 13px; color: #e6e3d5; }
.audio-sliders output { float: right; font-variant-numeric: tabular-nums; color: #e2c58a; }
.audio-sliders input { display: block; width: 100%; min-height: 44px; cursor: pointer; }
.audio-settings p { font-size: 12px; color: #c5c8b6; margin: 0; padding: 8px 22px 17px; line-height: 1.5; }
.arcade-destinations { display: flex; flex-wrap: wrap; gap: 12px 24px; padding: 0 22px 18px; }
.arcade-destinations a { line-height: 1.5; }
.arcade-destinations strong { color: #edd294; }
.arcade-destinations a>span { display: block; color: #c6c4b5; font-size: 12px; }
.alternate-links { display: flex; flex-wrap: wrap; gap: 12px 24px; padding: 0 22px 18px; }
.alternate-links a { display: inline-flex; align-items: center; min-height: 44px; }
footer { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-top: 24px; padding: 17px 0; border-top: 1px solid #353938; color: #b9c2b6; font-size: 12px; line-height: 1.5; }
footer p { margin: 0; }
.cabinet-account { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 14px; }
.cabinet-account form { margin: 0; }
.cabinet-account button { font-size: 12px; }
.cabinet-fallback #cabinet-stage, .cabinet-fallback .room-top, .cabinet-fallback .room-hint, .cabinet-fallback .experience-copy { display: none; }
.cabinet-fallback .engine-source { position: relative; opacity: 1; pointer-events: auto; z-index: auto; width: 100%; height: auto; min-height: 280px; }
.cabinet-fallback .engine-source iframe { width: 100%; height: auto; aspect-ratio: 8/7; max-height: 70vh; }
.cabinet-fallback #cabinet-fallback { padding: 16px; margin: 0; color: #e4d8be; font-size: 14px; }
.cabinet-room:fullscreen, .cabinet-room.expanded { width: 100vw; height: 100dvh; display: flex; flex-direction: column; border: 0; border-radius: 0; overflow: auto; background: #10130e; }
.cabinet-room.expanded { position: fixed; inset: 0; z-index: 1000; }
.cabinet-room:fullscreen .cabinet-screen, .cabinet-room.expanded .cabinet-screen { flex: 1 0 auto; display: flex; flex-direction: column; min-height: 240px; }
.cabinet-room:fullscreen #cabinet-stage, .cabinet-room.expanded #cabinet-stage { flex: 1; min-height: 200px; height: auto; }
.cabinet-room:fullscreen :is(.game-bar,.control-deck,.cabinet-tools,.cabinet-game-note), .cabinet-room.expanded :is(.game-bar,.control-deck,.cabinet-tools,.cabinet-game-note) { flex-shrink: 0; }
.cabinet-room:fullscreen::backdrop { background: #070b08; }
@media (max-width:800px) {
  .cabinet-page { padding: 18px 14px; }
  .cabinet-header { align-items: flex-start; gap: 14px; }
  .cabinet-header nav { flex-direction: column; gap: 0; font-size: 12px; }
  .cabinet-header nav a { min-height: 44px; }
  #cabinet-stage { height: 58vh; min-height: 360px; }
  .room-top { top: 12px; left: 14px; right: 14px; }
  .edition { font-size: 9px; }
  .room-hint { left: 14px; bottom: 16px; font-size: 11px; }
  .experience-copy { left: 14px; right: 14px; bottom: 44px; }
  .game-bar { padding: 14px; }
  .play-actions { gap: 10px; }
  #status { flex-basis: 100%; }
  .cabinet-score-entry { padding: 16px 14px; }
  .score-entry-heading { margin-bottom: 12px; }
  .score-entry-heading h2 { font-size: 21px; }
  .initials-fields label { flex-basis: 100%; }
  .initials-fields > div { flex-basis: 100%; }
  .initials-fields small { flex-basis: 100%; }
  #cabinet-initials { font-size: 26px; }
  body:is([data-arcade-phase=initials],[data-arcade-phase=saved],[data-arcade-phase=checking],[data-arcade-phase=saving]) #cabinet-stage { height: 36vh; min-height: 250px; }
  .control-deck { padding: 16px 14px; gap: 16px; }
  .player-controls { gap: 12px; }
  .play-note { width: 100%; max-width: none; }
  .cabinet-tools > :not(summary) { margin-left: 14px; margin-right: 14px; }
  summary { padding: 14px; }
  .cabinet-game-choice select { flex: 1; min-width: 0; }
  .audio-sliders { grid-template-columns: 1fr 1fr; gap: 10px 18px; padding: 8px 14px 0; }
  .audio-sliders label:first-child { grid-column: 1/-1; }
  .audio-settings summary span { display: block; margin: 5px 0 0 17px; }
  .audio-settings p, .arcade-destinations { padding-left: 14px; padding-right: 14px; }
  .alternate-links, .score-recovery { padding-left: 14px; padding-right: 14px; }
  footer { align-items: flex-start; flex-wrap: wrap; gap: 14px; }
  .cabinet-account { justify-content: flex-start; }
}
@media (prefers-reduced-motion:reduce) {
  * { scroll-behavior: auto; }
  .experience-copy { transition: none; }
}

/* A finished game leads to score entry, rather than inactive steering controls. */
body:is([data-arcade-phase=initials],[data-arcade-phase=saved],[data-arcade-phase=checking],[data-arcade-phase=saving]) .control-deck { display: none; }

/* The complete printed advert is the entrance surface, not a framed card. */
#cabinet-flyer {
  width: min(660px,calc(100vw - 28px),calc((100dvh - 52px) * .666667));
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  overflow: visible;
  background: transparent;
  color: #142d3a;
  container-type: inline-size;
  transform: rotate(-1deg);
}
#cabinet-flyer::backdrop { background: #080b0dd4; }
#cabinet-flyer[open] { animation: flyer-arrival 700ms cubic-bezier(.16,1,.3,1) both; }
#cabinet-flyer ::selection { background: #142d3a; color: #f4e8cb; }
#cabinet-flyer :is(button,a):focus-visible { outline: 3px solid #c13b24; outline-offset: 4px; }
.arcade-flyer { position: relative; aspect-ratio: 2/3; background: #cbdde4; box-shadow: 8px 22px 54px #0008; }
.flyer-art { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
#cabinet-flyer-close { position: absolute; top: -12px; right: -8px; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; min-height: 44px; padding: 0; border: 1px solid #73d7dd; border-radius: 50%; background: #071d2d; color: #e7f1eb; box-shadow: 0 3px 10px #0005; }
#cabinet-flyer-close:hover { background: #173a4c; }
#cabinet-flyer-title { position: absolute; top: 3%; left: 7%; right: 7%; margin: 0; font: 900 11cqw/.85 Georgia,serif; letter-spacing: -.035em; text-align: center; color: #111b22; }
#cabinet-flyer-title span { color: #c4462d; }
.flyer-promise { position: absolute; top: 18%; left: 7%; right: 7%; margin: 0; font-size: max(11px,2.4cqw); font-weight: 800; letter-spacing: .035em; color: #17384c; }
.flyer-instructions { position: absolute; top: 82%; left: 10%; width: 57%; display: grid; grid-template-columns: 1fr; gap: .6cqw; }
.flyer-instructions section { display: grid; grid-template-columns: 23% 1fr; gap: 3%; align-items: baseline; }
.flyer-instructions h3 { margin: 0; font: 900 max(12px,2.2cqw)/1.1 'Arial Narrow',Arial,sans-serif; color: #101b13; }
.flyer-instructions p { margin: 0; font-size: max(13px,2.35cqw); line-height: 1.12; color: #101b13; }
.flyer-footer { position: absolute; right: 10%; width: 22%; bottom: 6%; display: block; margin: 0; padding: 0; border: 0; color: #101b13; }
.flyer-footer p { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); }
.flyer-footer form { margin: 0; flex-shrink: 0; }
.flyer-footer button { width: 100%; min-height: 44px; padding: 6px 7px; border: 1px solid #f47761; border-radius: 0; background: #071d2d; color: #fff6eb; font-size: max(12px,2.3cqw); line-height: 1.15; font-weight: 800; }
.flyer-footer button:hover { background: #173a4c; }
.flyer-credit { position: absolute; left: 10%; right: 10%; bottom: 2%; margin: 0; font-size: max(8px,1.5cqw); color: #f3eddf; letter-spacing: .05em; }
.flyer-guide {
  position: relative;
  height: 150cqw;
  padding: 6%;
  overflow-y: auto;
  background: #f2eedf;
  color: #183544;
  box-shadow: 8px 22px 54px #0008;
  scrollbar-color: #597f90 #f2eedf;
  border-top: 8px solid #be4b32;
}
#flyer-guide-title { margin: 0 0 10px; font: 800 clamp(26px,7cqw,42px)/1.1 Georgia,serif; letter-spacing: -.025em; }
.guide-welcome { margin: 0 0 16px; font-size: max(14px,2.8cqw); line-height: 1.35; }
.guide-steps { margin: 0; padding-left: 24px; }
.guide-steps li { margin: 0 0 10px; padding-left: 5px; }
.guide-steps li::marker { color: #a73725; font-weight: 800; }
.guide-steps h3 { margin: 0 0 3px; color: #a73725; font-size: max(15px,3cqw); line-height: 1.15; }
.guide-steps p { margin: 0; font-size: max(14px,2.7cqw); line-height: 1.3; }
.guide-destinations { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 8px; }
.guide-destinations button { flex: 1 1 90px; min-width: 0; min-height: 44px; padding: 7px 8px; border: 1px solid #183544; border-radius: 0; color: #f2eedf; background: #183544; font-size: 13px; line-height: 1.15; }
.guide-destinations button:hover { background: #2b5366; }
#cabinet-flyer-back { min-height: 44px; padding: 7px 12px; border: 1px solid #597f90; border-radius: 0; color: #183544; background: transparent; font-size: 13px; }
#cabinet-flyer-back:hover { background: #e2e5dc; }
@keyframes flyer-arrival {
  from { opacity: .1; transform: perspective(1100px) translateX(-34vw) translateY(-12vh) translateZ(-1200px) rotateY(24deg) rotateX(14deg) rotateZ(-20deg); }
  to { opacity: 1; transform: perspective(1100px) translateX(0) translateY(0) translateZ(0) rotateY(0) rotateX(0) rotateZ(-1deg); }
}
@media (max-height:540px) {
  #cabinet-flyer { width: min(400px,calc(100vw - 48px)); max-height: calc(100dvh - 36px); overflow-y: auto; transform: none; }
  #cabinet-flyer-close { top: 6px; right: 6px; }
  .flyer-footer p { font-size: max(8px,1.8cqw); }
}
@media (prefers-reduced-motion:reduce) {
  #cabinet-flyer[open] { animation: none; transform: none; }
}
