:root {
  color-scheme: dark;
  --paper: #f5efe4;
  --muted: #b1b8c3;
  --soft: #8993a2;
  --hot: #ff704c;
  --aqua: #7de5df;
  --hair: rgba(189,207,221,.19);
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-family: "Inter","Helvetica Neue",Arial,sans-serif;
  background: #080c14;
  color: var(--paper);
}
* {box-sizing:border-box}
html,body {margin:0;min-height:100%;overscroll-behavior:none}
body {min-height:100svh; background: #080c14; isolation:isolate; display:flex;flex-direction:column}
body::before,body::after {content:"";position:fixed;inset:0;z-index:-1;pointer-events:none}
body::before {background:url(queen-city.webp) center 63% / cover no-repeat;opacity:.86}
body::after {background:linear-gradient(180deg,rgba(5,9,17,.67),rgba(7,12,20,.07) 55%,rgba(6,10,18,.58)),linear-gradient(90deg,rgba(6,12,21,.32),rgba(9,10,17,.2) 54%,rgba(8,11,20,.5))}
button {font:inherit;color:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation}
button:focus-visible {outline:2px solid var(--aqua);outline-offset:4px}
button:disabled {opacity:.5;cursor:default}
svg {width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round;flex:none}
.symbol-bank,.sr {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.topbar {border-bottom:1px solid rgba(188,205,224,.14);background:rgba(6,10,17,.85)}
.top-inner {max-width:1660px;margin:auto;height:74px;padding:0 clamp(24px,4.6vw,82px);display:flex;align-items:center;justify-content:space-between}
.brand {display:flex;gap:13px;align-items:center;font-size:19px;font-weight:850;letter-spacing:-.8px}
.brand img {width:36px;height:36px}
.brand>span{display:flex;align-items:center;gap:11px}
.brand-arcade {font:700 12px var(--mono);letter-spacing:.19em;color:var(--hot);border-left:1px solid #43464d;padding-left:12px}
.utilities {display:flex;align-items:center;gap:20px}
.utility,.icon-button {border:0;background:none;display:inline-flex;align-items:center;justify-content:center;gap:9px;padding:9px 0;color:#d7dbe3;font-size:14px}
.utility svg {width:17px;height:17px}
.utility:hover,.icon-button:hover{color:white}
.util-rule {height:15px;width:1px;background:#363c45}
.arcade {width:min(1430px,100%);margin:auto;display:grid;grid-template-columns:minmax(210px, .94fr) minmax(340px,1.66fr) minmax(215px,.95fr);align-items:center;gap:clamp(14px,2.7vw,48px);padding:22px clamp(28px,5.4vw,88px) 20px;flex:1}
.identity {max-width:310px;padding-left:3px;align-self:center}
.location,.small-heading,.status,.pinball-name,footer,.letters,.best>span,.best>strong,.keys,kbd,.touch-deck button {font-family:var(--mono)}
.location {display:flex;align-items:center;gap:11px;color:var(--hot);font-size:12px;letter-spacing:.17em;font-weight:700}
.location i {width:26px;height:2px;background:var(--hot);display:inline-block}
h1 {margin:22px 0 0;line-height:1}
.title-art{width:min(100%,282px);height:auto;display:block;filter:drop-shadow(0 3px 10px #070a104d)}
.pinball-name {font-weight:800;font-size:clamp(16px,1.45vw,22px);letter-spacing:.42em;color:var(--hot);display:block;margin:14px 0 0 6px}
.mission {margin-top:clamp(40px,6vh,68px);border-top:1px solid var(--hair);padding-top:22px;max-width:269px}
.small-heading {font-size:12px;letter-spacing:.13em;font-weight:650;color:var(--muted);display:flex;align-items:center;gap:8px;line-height:1.4}
.small-heading svg {width:16px;height:16px}
.mission .small-heading {color:var(--aqua)}
.mission h2 {font-size:clamp(22px,1.8vw,29px);letter-spacing:-.055em;margin:12px 0 8px;line-height:1.12;font-weight:740}
.mission p {margin:0;color:#c2c8cf;font-size:15px;line-height:1.52;max-width:263px;text-wrap:pretty}
.letters {display:flex;gap:7px;margin-top:18px}
.letters span {border:1px solid #536472;color:#a3b6c0;display:grid;place-items:center;width:31px;height:32px;background:#101b24d9;font-size:16px;line-height:1;font-weight:700;border-radius:4px;box-shadow:inset 0 -3px 0 #03081188;transition:.2s}
.letters .lit {color:#08171c;background:var(--aqua);border-color:#b7fffc;box-shadow:0 0 12px #68ecee66}
.cabinet {display:flex;justify-content:center;align-items:center;min-width:0;position:relative;isolation:isolate}
.cabinet::before{content:"";position:absolute;inset:8% -6% 2%;background:radial-gradient(ellipse,#314a8b4a,transparent 72%);pointer-events:none;z-index:-1}
.stage {width:min(100%,calc((100svh - 151px) * .70));min-width:0;aspect-ratio:.70;position:relative}
#table {display:block;width:100%;height:100%;touch-action:none;-webkit-user-select:none;user-select:none}
.table-flash {position:absolute;pointer-events:none;top:51%;left:50%;transform:translate(-50%,6px);opacity:0;transition:opacity .15s,transform .18s;text-align:center;color:var(--aqua);font:800 clamp(12px,1.25vw,20px) var(--mono);letter-spacing:.08em;text-shadow:0 2px 5px #000,0 0 12px #000;background:#0d1820dc;border:1px solid #65c9c8a0;border-radius:3px;padding:7px 12px;white-space:nowrap}
.table-flash.show {opacity:1;transform:translate(-50%,0)}
.console {width:100%;max-width:286px;justify-self:end}
.status {display:flex;align-items:center;gap:9px;color:var(--aqua);letter-spacing:.13em;font-size:12px;text-transform:uppercase;font-weight:650;margin:0 0 13px}
.status i {height:7px;width:7px;background:var(--aqua);border-radius:50%;box-shadow:0 0 9px #75e8e486}
.score-board {position:relative;background:linear-gradient(145deg,rgba(20,30,43,.94),rgba(9,16,27,.94));padding:20px 20px 0;border:1px solid #35404c;border-radius:8px;box-shadow:0 10px 24px #06090e35}
.score-title {color:#c3c9d0}
.digits {display:flex;align-items:center;gap:clamp(3px,.34vw,6px);height:clamp(40px,3.4vw,53px);margin:9px 0 15px;width:100%;max-width:230px}
.digits svg{flex:1;min-width:0;height:100%;width:auto;fill:#ff8259;stroke:none;filter:drop-shadow(0 0 3px #ff624351)}
.digits .unlit {fill:#322e30}
.best,.best>span,.ball-line,.ball-icons {display:flex;align-items:center}
.best {justify-content:space-between;gap:7px;margin:0 0 19px}
.best>span {gap:7px;font-size:11px;letter-spacing:.07em;color:var(--soft);font-weight:650}
.best svg {width:14px;height:14px;color:var(--muted)}
.best>strong {font-size:14px;letter-spacing:.08em;color:#ede9e1}
.ball-line {border-top:1px solid #34404c;justify-content:space-between;gap:8px;min-height:48px}
.ball-line .small-heading {font-size:11px;gap:9px;color:var(--soft)}
.ball-line b {color:#d5d9df;letter-spacing:.06em;white-space:nowrap;font-size:12px}
.ball-icons {gap:6px}
.ball-icons[hidden],.multi-count[hidden] {display:none}
.multi-count {color:var(--aqua);font:700 11px var(--mono);letter-spacing:.04em;white-space:nowrap}
.ball-icons i {width:15px;height:15px;border-radius:50%;background:radial-gradient(circle at 32% 22%,#fff 2%,#f3f5f8 10%,#aebec7 24%,#5c7281 43%,#1e303d 65%,#8ea3ad 90%,#213442);border:1px solid #95abb175;filter:drop-shadow(0 1px 2px #000)}
.ball-icons i.used {opacity:.16}
.action {width:100%;min-height:49px;border:1px solid #fa8060;box-shadow:inset 0 1px 0 #ffb29a77,0 4px 15px #0003;border-radius:5px;background:var(--hot);color:#171316;display:flex;align-items:center;justify-content:center;gap:8px;font-weight:750;font-size:16px;transition:background .12s,transform .1s;position:relative;isolation:isolate;overflow:hidden;-webkit-user-select:none;user-select:none}
.console .action {margin-top:15px;touch-action:none}
.action:hover,.touch-action:hover{background:#ff805d}
.action:active,.touch-deck button:active,.touch-deck button.held {transform:translateY(1px);filter:brightness(1.16)}
.action svg {width:19px;height:19px}
.action.charge::before,.touch-action.charge::before {content:"";position:absolute;inset:0 auto 0 0;width:var(--power,0%);background:#ffd3a2;z-index:-1}
.action-hint {text-align:center;margin:9px 0 0;color:var(--muted);font:11px/1.5 var(--mono)}
.key-guide {border-top:1px solid var(--hair);margin-top:29px;padding-top:19px}
.key-guide>.small-heading {color:#a9b5c2;margin-bottom:13px;justify-content:flex-start}
.key-guide>div {display:flex;justify-content:space-between;align-items:center;margin-bottom:7px;color:#c4cbd2;font-size:14px}
.keys {display:flex;gap:4px}
kbd {font-size:11px;font-weight:500;min-width:24px;padding:2px 6px;line-height:16px;text-align:center;border:1px solid #43505e;border-bottom:2px solid #4c5663;color:#d7e0e6;border-radius:4px;background:#1c2530}
.touch-deck {display:none}
footer {margin:0 clamp(24px,4.6vw,82px);height:35px;display:flex;gap:14px;align-items:flex-start;letter-spacing:.14em;font-size:10px;color:#9da8b6;font-weight:600}
.foot-line {height:1px;background:#8d9eb136;flex:1;margin-top:5px}
dialog {width:min(410px,calc(100% - 32px));color:var(--paper);border:1px solid #465665;background:linear-gradient(155deg,#182433,#0c141e);border-radius:10px;padding:23px;box-shadow:0 30px 100px #000b}
dialog::backdrop{background:#05070cc9;backdrop-filter:blur(5px)}
.dialog-top{display:flex;align-items:center;justify-content:space-between}
.dialog-top .small-heading{color:var(--aqua);font-size:11px}
.icon-button {padding:5px}
dialog h2 {font-size:32px;letter-spacing:-.05em;margin:13px 0 14px}
dialog p{font-size:15px;color:#c4cdd5;line-height:1.55;margin:0 0 15px}
dialog strong{color:var(--paper)}
dialog .controls-row {display:flex;justify-content:space-between;align-items:center;font-size:14px;color:#cad3db;padding:9px 0;border-top:1px solid var(--hair)}
dialog .action {margin-top:17px}
.dialog-score {font:700 29px var(--mono);color:var(--hot)}
@media(min-width:851px) and (max-height:720px) {
  .top-inner{height:58px}.arcade{padding-top:12px;padding-bottom:12px}.stage{width:min(100%,calc((100svh - 108px) * .70))}footer{height:25px}
  .mission{margin-top:26px;padding-top:16px}.key-guide{margin-top:20px}.title-art{max-width:215px}.pinball-name{margin-top:9px}.console{max-width:251px}
}
@media(min-width:851px) and (max-width:1080px) {
  .arcade{grid-template-columns:minmax(175px,.85fr) minmax(320px,1.7fr) minmax(181px,.87fr);gap:16px;padding-left:3.1vw;padding-right:3.1vw}
  .score-board{padding:16px 14px 0}.digits{gap:3px}.mission p{font-size:14px}.key-guide>div{font-size:13px}
}
@media(max-width:850px) {
  body{min-height:100svh}
  .top-inner{height:52px;padding:0 max(17px,env(safe-area-inset-left))}
  .brand {font-size:15px;gap:8px}.brand img{height:28px;width:28px}.brand>span{gap:7px}.brand-arcade{font-size:10px;padding-left:8px}
  .utilities{gap:12px}.utility {min-width:30px;min-height:42px;font-size:12px;gap:6px}
  .arcade{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto minmax(0,1fr) auto;align-items:center;gap:6px 8px;align-content:center;max-width:530px;margin:0 auto;padding:9px 13px max(10px,env(safe-area-inset-bottom));height:calc(100svh - 52px);min-height:450px;flex:none;width:100%}
  .identity{grid-column:1;grid-row:1;max-width:none;padding:0;align-self:center;display:flex;flex-direction:column;gap:3px}
  .location {font-size:9px;letter-spacing:.09em;gap:4px}.location i{width:12px;height:1px}
  h1 {margin:0}.title-art {display:none}.pinball-name{font-size:17px;letter-spacing:-.065em;color:var(--paper);margin:0;font-style:italic;font-family:"Arial Black",Arial,sans-serif;font-weight:900}
  .pinball-name::before{content:"THE HOST ";color:var(--paper)}
  .mission{display:none}
  .console{grid-column:2;grid-row:1;display:flex;align-items:center;gap:10px;max-width:none;width:auto;justify-self:end}
  .status,.console .action,.action-hint,.key-guide,.score-title,.best{display:none}
  .score-board{display:flex;align-items:center;gap:8px;border:none;background:none;box-shadow:none;padding:0}
  .digits{width:95px;height:23px;margin:0;gap:2px}
  .ball-line{border-top:0;border-left:1px solid #5964726b;padding-left:9px;min-height:25px;flex-direction:column;gap:2px;justify-content:center}.ball-line .small-heading{font-size:9px;gap:4px;letter-spacing:.03em}
  .ball-line b{font-size:9px}.multi-count{font-size:9px}.ball-icons{gap:3px}.ball-icons i{height:8px;width:8px}
  .cabinet{grid-column:1 / -1;grid-row:2;width:100%;height:100%;min-height:0}
  .stage{height:100%;max-height:calc((100vw - 22px) / .7);width:auto;max-width:100%;aspect-ratio:.70}
  .touch-deck{grid-column:1/-1;grid-row:3;display:grid;grid-template-columns:1fr 1.06fr 1fr;gap:8px;padding:2px 0 0;user-select:none;-webkit-user-select:none}
  .touch-deck button{height:49px;border:1px solid #405060;border-radius:6px;background:linear-gradient(#243442,#15212e);color:#e4edf2;display:flex;align-items:center;justify-content:center;gap:7px;touch-action:none;font-size:14px;font-weight:700;position:relative;isolation:isolate;overflow:hidden}
  .touch-deck button.touch-action{background:var(--hot);color:#211717;border-color:#fc8767}.touch-deck svg {width:17px;height:17px}.mirror{transform:scaleX(-1)}
  footer{display:none}
}
@media(max-width:480px) {
  .utility span {display:none}.utilities {gap:5px}.util-rule{height:14px;margin:0 3px}.utility{min-width:33px}.utility svg{width:18px;height:18px}
}
@media (max-width:850px) and (max-height:530px) and (orientation:landscape) {
  .topbar{display:none}.arcade{height:100svh;min-height:245px;max-width:none;grid-template-columns:1fr minmax(140px, .94fr) 1fr;grid-template-rows:1fr 1fr;gap:4px 12px;padding:8px 20px}
  .identity{grid-column:1;grid-row:1;justify-self:end;align-self:end}.console{grid-column:1;grid-row:2;align-self:start;margin-top:8px}
  .cabinet{grid-column:2;grid-row:1/3}.touch-deck{grid-column:3;grid-row:1/3;grid-template-columns:minmax(85px,120px);align-content:center}
  .stage{max-height:none}.touch-deck button{height:40px}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important}}
.mobile-mission{display:none}
@media(max-width:850px) and (orientation:portrait){
  .arcade{grid-template-rows:auto minmax(0,1fr) auto auto}
  .touch-deck{grid-row:4}
  .mobile-mission{display:flex;align-items:center;justify-content:space-between;gap:6px;grid-column:1/-1;grid-row:3;min-height:28px;padding:0 3px;color:#d6dde2;font:11px var(--mono)}
  .mobile-mission .letters{margin:0;gap:4px}
  .mobile-mission .letters span{width:19px;height:19px;font-size:11px;border-radius:3px}
}
html,body {overflow-x:clip}
@media(max-width:850px) {
  .topbar{height:52px;flex:none}
  .top-inner{height:100%}
}
a.brand{color:var(--paper);text-decoration:none}
a.brand:focus-visible{outline:2px solid var(--aqua);outline-offset:4px}
dialog{max-height:calc(100dvh - 24px);overflow:auto;overscroll-behavior:contain}
.record-panel{border-top:1px solid var(--hair);padding-top:13px}
#scoreForm label{display:block;margin-bottom:7px;color:var(--paper);font-size:14px}
.entry-row,.rank-heading{display:flex;align-items:center;gap:8px}
.entry-row input,.entry-row button,.rank-heading button{font:600 14px var(--mono);border:1px solid #536777;border-radius:4px;background:#111f2e;color:var(--paper);padding:8px 12px}
.entry-row input{width:80px;letter-spacing:.15em;text-transform:uppercase;font-size:17px}
.entry-row button,.rank-heading button{color:var(--aqua);cursor:pointer;min-height:39px}
.rank-heading{justify-content:space-between}
.rank-heading h3{font:700 14px var(--mono);text-transform:uppercase;letter-spacing:.04em;margin:14px 0 8px}
.rank-heading button{padding:4px 8px;font-size:12px}
#boardMessage,.post-result{font-size:13px;margin:5px 0;color:#c8d2dc}
#rankings{counter-reset:rank;padding:0;margin:0}
#rankings li{counter-increment:rank;display:flex;align-items:center;gap:10px;padding:5px 0;border-bottom:1px solid var(--hair);font:14px var(--mono)}
#rankings li::before{content:counter(rank, decimal-leading-zero);color:var(--soft);font-size:12px}
#rankings li strong{color:var(--aqua);letter-spacing:.08em}
#rankings li span{margin-left:auto}
@media(max-width:390px){.utilities{gap:1px}.utilities .util-rule{display:none}}
@media(max-width:850px) and (max-height:530px) and (orientation:landscape){
  .topbar{display:block;height:34px}.top-inner{height:34px}
  .utility{min-height:30px}.arcade{height:calc(100svh - 34px)}
}

.speed-choice {margin-top:15px}
.speed-choice>span {display:block;margin:0 0 6px;color:var(--muted);text-transform:uppercase;font:650 11px var(--mono);letter-spacing:.12em}
.speed-options {display:flex;width:100%;gap:3px}
.speed-options button {flex:1;border:1px solid #455363;border-radius:4px;background:#111c29;color:#d8dfe5;font:650 12px var(--mono);min-height:36px;padding:4px 3px}
.speed-options button:hover:enabled {border-color:var(--aqua)}
.speed-options button[aria-pressed="true"] {background:var(--aqua);border-color:var(--aqua);color:#102025}
.speed-options button:disabled {opacity:.65}
.speed-options button:disabled[aria-pressed="true"] {opacity:1}
@media(max-width:850px) {
  .arcade {grid-template-rows:auto auto minmax(0,1fr) auto}
  .console {display:contents}
  .score-board {grid-column:2;grid-row:1;justify-self:end}
  .speed-choice {grid-column:1/-1;grid-row:2;display:flex;align-items:center;gap:9px;justify-content:center;margin:0}
  .speed-choice>span {margin:0}
  .speed-options {width:min(100%,240px)}
  .speed-options button {min-height:34px}
  .cabinet {grid-row:3}
  .touch-deck {grid-row:4}
}
@media(max-width:850px) and (orientation:portrait) {
  .arcade {grid-template-rows:auto auto minmax(0,1fr) auto auto}
  .mobile-mission {grid-row:4}
  .touch-deck {grid-row:5}
}
@media(max-width:850px) and (max-height:530px) and (orientation:landscape) {
  .arcade {grid-template-rows:1fr auto 1fr}
  .identity {grid-row:1;align-self:end}
  .score-board {grid-column:1;grid-row:2}
  .speed-choice {grid-column:1;grid-row:3;align-self:start;justify-self:end;flex-direction:column;align-items:flex-end;gap:3px}
  .speed-options {width:auto}
  .speed-options button {font-size:11px;min-height:30px;padding:2px 4px}
  .cabinet,.touch-deck {grid-row:1/4}
}

#boardSpeed,#retryBoard {font:650 13px var(--mono);border:1px solid #536777;border-radius:4px;background:#111f2e;color:var(--aqua);min-height:34px;padding:4px 8px}
#boardSpeed {cursor:pointer}
#boardSpeed:focus-visible {outline:2px solid var(--aqua);outline-offset:2px}
