/* RetroDock 1.3.0 ATARI1 — preserve the approved ARCADE1 layout for all three platforms.
   Canvas backing buffers are never resized. player.js fits their CSS presentation. */
.player-shell{
  --player-bg:#102731;--player-panel:#173640;--player-line:#31505a;--player-text:#f4f0de;--player-muted:#b2c5c5;--player-accent:#ffd166;
  position:relative;isolation:isolate;min-width:0;margin:0;padding:18px;border:1px solid #31505a;border-radius:18px;
  background:linear-gradient(140deg,#193b46,#102731 60%);color:var(--player-text);box-shadow:0 5px 0 #06141c,0 14px 30px #00000038;color-scheme:dark;
}
.player-shell::before{content:"";position:absolute;top:0;left:24px;width:108px;height:3px;background:linear-gradient(90deg,#d65342 25%,#f3b443 25% 50%,#6baf86 50% 75%,#6aa5b8 75%);pointer-events:none}
.player-shell [hidden]{display:none!important}
.player-shell *{box-sizing:border-box}
.player-shell .player-primary-controls,.player-shell .player-heading.player-primary-controls{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px;margin:0 0 10px;padding:0;min-width:0;background:none;border:0}
.player-shell .player-primary-controls>strong{margin:0 auto 0 0;min-width:0;flex:1 1 180px;color:var(--player-text);font-size:.87rem;font-weight:650;letter-spacing:.01em;overflow-wrap:anywhere}
.player-shell .button,.player-shell #player-toolbar button,.player-shell #touch-controls button,.player-shell .player-primary-controls .button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:42px;height:auto;padding:9px 13px;border:1px solid #3a5c67;border-radius:8px;background:#24444f;color:var(--player-text);box-shadow:0 2px 0 #08171e,inset 0 1px #ffffff12;font:inherit;font-size:.79rem;font-weight:650;line-height:1.3;text-decoration:none;white-space:normal;cursor:pointer;transition:background .15s,transform .15s}
.player-shell .button:hover,.player-shell #player-toolbar button:hover,.player-shell #touch-controls button:hover{background:#315b67;color:#fff;border-color:#678e92}
.player-shell .button:active{transform:translateY(1px);box-shadow:none}
.player-shell .player-primary-controls .player-fullscreen-toggle{background:var(--player-accent);border-color:#ffcb6e;color:#2b2417;box-shadow:0 2px 0 #976520,inset 0 1px #ffe4ac}
.player-shell .player-primary-controls .player-fullscreen-toggle:hover{background:#ffc66a;color:#231d13}
.player-shell .player-fullscreen-icon{width:1em;font-size:1.45rem;line-height:1;text-align:center;flex:none}
.player-shell .player-primary-controls .player-pause{background:#1b3640}
.player-shell .player-primary-controls .player-touch-switch{min-width:44px;background:#e9e2d7;color:#282724;font-weight:800}
.player-shell:not(.is-fullscreen):not(.is-touch-device) .player-touch-switch{display:none}
.player-shell .player-focus[aria-pressed=true]{background:#254f40;border-color:#79a98e;color:#d7f5df}
.player-shell .player-input-state{margin:12px 0 0;font-size:.74rem;line-height:1.5;color:var(--player-muted)}
.player-shell.has-keyboard-focus .player-input-state{color:#acd7bc}
.player-shell #player-status{margin:0 0 12px;min-height:1.4em;padding:0;background:none;border:0;font-size:.76rem;line-height:1.5;color:var(--player-muted);overflow-wrap:anywhere}
.player-shell #player-status.player-error{color:#ffc3af}
.player-shell .player-deck{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto;gap:16px;min-width:0;min-height:0}
.player-shell #emulator-screen.player-display{position:relative;display:block;width:100%;height:auto;min-width:0;min-height:0;max-width:none;max-height:74svh;aspect-ratio:var(--game-ratio,1.333333);margin:0;overflow:hidden;touch-action:manipulation;background:#080909;border:5px solid #07151c;border-radius:10px;box-shadow:0 0 0 1px #31505a,inset 0 2px 8px #000;outline-offset:2px}
.player-shell.has-keyboard-focus #emulator-screen:focus-visible{outline:2px solid #ffd166;outline-offset:3px}
.player-shell .emulator-stage{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;width:100%;height:100%;overflow:hidden;background:#080909}
.player-shell #emulator-screen canvas.emulator-canvas{display:block;flex:none;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;image-rendering:pixelated;image-rendering:crisp-edges;background:#000;border:0;border-radius:0}
.player-shell .player-start-overlay{position:absolute;inset:0;display:grid;place-content:center;gap:16px;padding:20px;background:repeating-linear-gradient(0deg,#ffffff03 0 1px,transparent 1px 4px),radial-gradient(ellipse at center,#252b2c,#121617 78%)}
.player-shell .player-start-overlay::before{content:"";display:block;justify-self:center;width:40px;height:3px;border-radius:3px;background:#ffd166;box-shadow:0 0 16px #ffd16655}
.player-shell .player-start-overlay.is-paused{background:#111514bb}
.player-shell .player-start-overlay .player-start{min-width:176px;min-height:56px;max-width:100%;padding:14px 24px;border:1px solid #ffd38a;border-radius:9px;background:#ffd166;color:#282215;font-size:1rem;font-weight:750;box-shadow:0 4px 0 #925f20,0 0 0 6px #ffd1660c}
.player-shell .player-start-overlay .player-start:hover{background:#ffcb75;color:#241e14}
/* The screen is adjacent to controls. Advanced options never push the pad below a long form. */
.player-shell .touch-pads{display:grid;grid-template-columns:minmax(0,1fr);gap:14px;min-width:0;max-width:650px;width:100%;margin:0 auto}
.player-shell .touch-pads.is-dual{grid-template-columns:repeat(2,minmax(0,1fr));max-width:none}
.player-shell .touch-pad{--pad-accent:#e7b45e;display:grid;grid-template-columns:156px minmax(0,1fr);gap:7px 20px;min-width:0;margin:0;padding:14px 18px;border:1px solid #575852;border-radius:11px;background:linear-gradient(#1b3640,#323436);box-shadow:inset 0 1px #ffffff0a;user-select:none;-webkit-user-select:none;touch-action:pan-y}
.player-shell .touch-pad[data-player="2"]{--pad-accent:#a6c7b2}
.player-shell .touch-pad.is-unavailable{opacity:.55;border-style:dashed}
.player-shell .touch-pad-title{grid-column:1/-1;display:flex;align-items:center;gap:8px;margin:0;color:var(--player-text);font-size:.77rem;font-weight:650;line-height:1.3;letter-spacing:.01em}
.player-shell .touch-player-badge{display:inline-grid;place-items:center;min-width:28px;height:22px;padding:3px 6px;border-radius:4px;background:var(--pad-accent);color:#29271f;font-size:.65rem;font-weight:800;letter-spacing:.02em}
.player-shell .touch-pad-subtitle{grid-column:1/-1;margin:0 0 5px;color:#c2bfb6;font-size:.66rem;line-height:1.5}
.player-shell .player-deck .touch-dpad{position:relative;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr));gap:0;align-self:center;justify-self:center;width:156px;height:156px;min-width:0;padding:0;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;border:0;border-radius:50%;background:radial-gradient(circle,#202224 0 44%,#292b2d 45% 68%,transparent 69%)}
.player-shell .player-deck .touch-dpad::before{content:"";position:absolute;inset:34%;border:1px solid #454746;border-radius:8px;background:#292b2d;pointer-events:none}
.player-shell .player-deck .touch-button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-width:0;min-height:44px;width:auto;height:auto;margin:0;padding:5px;border:1px solid #5a5c5b;border-radius:7px;background:#0c202a;color:#f5f0e5;box-shadow:0 3px 0 #131516,inset 0 1px #ffffff12;font-family:inherit;font-size:1rem;font-weight:700;line-height:1.1;cursor:pointer;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.player-shell .player-deck .touch-dpad .touch-button{z-index:1;min-height:0;padding:3px}
.player-shell .pad-action-label{display:block;font-size:1.25rem;line-height:1.1;color:var(--pad-accent)}
.player-shell .pad-physical-key{display:block;min-height:0;min-width:0;max-width:100%;margin:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;color:#cac7bf;font-family:inherit;font-size:.57rem;font-weight:500;line-height:1.2;white-space:nowrap;letter-spacing:0}
.player-shell .direction-up{grid-column:2;grid-row:1}.player-shell .direction-left{grid-column:1;grid-row:2}.player-shell .direction-right{grid-column:3;grid-row:2}.player-shell .direction-down{grid-column:2;grid-row:3}
.player-shell .player-deck .touch-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-self:center;justify-self:center;gap:10px;min-width:0;width:100%;max-width:166px;margin:0;padding:0}
.player-shell .player-deck .action-a,.player-shell .player-deck .action-b{min-width:0;min-height:64px;border-radius:50%;background:#b74c3c!important;border-color:#ec907a!important;box-shadow:0 4px 0 #6f2b24,inset 0 2px #ffffff1a}
.player-shell .player-deck .action-a .pad-action-label,.player-shell .player-deck .action-b .pad-action-label{font-size:1.4rem;color:#fff4e7}
.player-shell .player-deck .action-start,.player-shell .player-deck .action-select,.player-shell .player-deck .action-menu0{min-height:44px;border-radius:6px;background:#24444f;border-color:#52717a}
.player-shell .player-deck .action-start .pad-action-label,.player-shell .player-deck .action-select .pad-action-label,.player-shell .player-deck .action-menu0 .pad-action-label{font-size:.73rem;color:#fff4df}
.player-shell[data-platform="zx"] .player-deck .action-start{grid-column:1/-1;min-height:40px}
.player-shell .player-deck .action-fire{grid-column:1/-1;justify-self:center;min-width:84px;min-height:76px;padding:10px 12px;border-radius:50%;background:#b74c3c!important;border-color:#ec907a!important;box-shadow:0 4px 0 #6f2b24,inset 0 2px #ffffff1a}
.player-shell .player-deck .action-fire .pad-action-label{font-size:.85rem;color:#fff4e7}
.player-shell .player-deck .action-extra{grid-column:1/-1;min-height:44px;font-size:.72rem;white-space:normal}
.player-shell .player-deck .touch-button:active,.player-shell .player-deck .touch-button.is-pressed{background:#eab556!important;border-color:#ffdb99!important;color:#29241a;transform:translateY(2px);box-shadow:0 1px 0 #9b712c}
.player-shell .player-deck .touch-button.is-pressed .pad-action-label,.player-shell .player-deck .touch-button.is-pressed .pad-physical-key{color:#29241a}
.player-shell .touch-pad-bindings{grid-column:1/-1;margin:4px 0 0;padding-top:9px;border-top:1px solid #31505a;color:#b2c5c5;font-size:.65rem;line-height:1.6;overflow-wrap:anywhere;user-select:text;-webkit-user-select:text}
/* Atari uses one fire button and the two original console switches. */
.player-shell[data-platform="atari2600"] .touch-actions{align-content:center}
.player-shell[data-platform="atari2600"] .player-deck .action-start,.player-shell[data-platform="atari2600"] .player-deck .action-select{padding:5px 3px}
.player-shell[data-platform="atari2600"] .player-deck .action-start .pad-action-label,.player-shell[data-platform="atari2600"] .player-deck .action-select .pad-action-label{white-space:nowrap}
.player-shell .player-paddle{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;align-self:center;justify-self:center;width:156px;max-width:100%;min-height:138px;padding:12px 5px;touch-action:none}
.player-shell .player-paddle-label{margin:0;color:var(--player-text);font-size:.73rem;line-height:1.5;text-align:center}
.player-shell .player-paddle-input{display:block;width:100%;min-width:0;height:44px;margin:0;accent-color:var(--player-accent);touch-action:none;cursor:ew-resize}
.player-shell .player-paddle-scale{font-size:1.3rem;line-height:1;color:var(--player-accent);letter-spacing:14px;padding-left:14px}
.player-shell .player-atari-options{min-width:0;margin:16px 0;padding:14px;border:1px solid var(--player-line);border-radius:8px;background:var(--player-bg)}
.player-shell .player-atari-options>h3{margin:0 0 14px;font-size:.9rem;color:var(--player-text)}
.player-shell .player-atari-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:12px;min-width:0}
.player-shell .player-atari-fields .player-field,.player-shell #player-toolbar .player-atari-fields .player-select{width:100%;min-width:0}
.player-shell .player-atari-detected{color:var(--player-accent)}
@media(max-width:480px){.player-shell .player-atari-fields{grid-template-columns:minmax(0,1fr)}.player-shell #player-toolbar .player-atari-fields .player-select{font-size:16px}.player-shell .player-paddle{width:132px;min-height:124px}}
/* Optional controls, presets, keyboard and saves share a single compact drawer. */
.player-shell .player-settings-panel{position:relative;margin-top:18px;padding:18px;border:1px solid #3a5c67;border-radius:10px;background:#132f3a;color:var(--player-text);min-width:0;overflow:auto;overscroll-behavior:contain}
.player-shell .player-settings-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 14px}
.player-shell .player-settings-heading h3{margin:0;color:var(--player-text);font-size:1rem;letter-spacing:0}
.player-shell .player-settings-heading .player-settings-close{min-width:42px;min-height:42px;padding:5px;font-size:1.5rem}
.player-shell #player-toolbar,.player-shell #touch-controls{display:block;margin:16px 0 0;padding:0;min-width:0;background:transparent;border:0;touch-action:pan-y}
.player-shell #touch-controls{padding-top:12px;border-top:1px solid var(--player-line)}
.player-shell .player-controls{display:flex;align-items:flex-end;justify-content:flex-start;flex-wrap:wrap;gap:10px;margin:0 0 14px;min-width:0}
.player-shell .player-field,.player-shell #player-toolbar .player-field{display:flex;flex-direction:column;align-items:flex-start;gap:5px;min-width:0;max-width:100%;margin:0;font-size:.76rem;line-height:1.45;color:var(--player-muted)}
.player-shell .player-field.player-check,.player-shell #player-toolbar .player-field.player-check{flex-direction:row-reverse;align-items:center;justify-content:flex-end;gap:9px;min-height:42px}
.player-shell .player-field input[type=checkbox]{width:18px;height:18px;margin:0;accent-color:var(--player-accent);flex:none}
.player-shell .player-select,.player-shell #player-toolbar .player-select{width:auto;min-width:0;max-width:100%;min-height:44px;padding:9px 30px 9px 10px;border:1px solid #52717a;border-radius:7px;background:#0c202a;color:#fff1d8;font:inherit}
.player-shell .player-volume,.player-shell #player-toolbar .player-volume{width:116px;max-width:100%;min-height:32px;accent-color:var(--player-accent)}
.player-shell .player-hint,.player-shell .player-note{max-width:100%;margin:9px 0 0;color:var(--player-muted);font-size:.74rem;line-height:1.7;overflow-wrap:anywhere}
.player-shell .player-dual-hint.is-warning{padding:10px 12px;border:1px solid #947642;border-radius:6px;background:#57462a;color:#ffdf9c}
.player-shell .player-save-panel{padding:12px 14px;border:1px solid #31505a;border-radius:8px;background:#102731}
.player-shell .player-save-panel>summary{padding:4px 0;cursor:pointer;font-size:.85rem;font-weight:650;color:var(--player-text)}
.player-shell .player-save-controls{margin:16px 0 0;padding:0;background:transparent;border:0;box-shadow:none}
.player-shell #spectrum-keyboard{display:block;max-width:100%;margin-top:18px;padding:0;overflow:auto;touch-action:pan-x pan-y;background:transparent;border:0}
.player-shell .zx-keyboard{max-width:850px;margin:0;padding:10px;border:1px solid #31505a;border-radius:9px;background:#0c202a;user-select:none;-webkit-user-select:none}
.player-shell .zx-keyboard>summary{min-height:40px;padding:7px 0;cursor:pointer;color:var(--player-text);font-size:.85rem;font-weight:650;line-height:1.4}
.player-shell .zx-keyboard-row{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:5px;margin:5px 0}
.player-shell #spectrum-keyboard .zx-key{min-width:0;min-height:44px;margin:0;padding:5px 1px;border:1px solid #8b887d;border-radius:5px;background:#e4ddcf;color:#2c2b28;box-shadow:0 3px 0 #918b7e;font:inherit;font-size:clamp(.56rem,1.6vw,.8rem);line-height:1.15;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.player-shell #spectrum-keyboard .zx-modifier{background:#bc543e;border-color:#d78971;color:#fff1e0;box-shadow:0 3px 0 #743424}
.player-shell #spectrum-keyboard .zx-key.is-pressed{background:#efb347;border-color:#ffd07c;color:#2b2418;transform:translateY(2px);box-shadow:0 1px #916d2e}
.player-shell button:focus-visible,.player-shell summary:focus-visible,.player-shell input:focus-visible,.player-shell select:focus-visible{outline:3px solid #ffd166;outline-offset:3px}
.player-shell button:disabled{opacity:.45;cursor:not-allowed}
/* Optional screenshot review stays in Settings; the main admin action is one click. */
.player-shell #player-capture{scroll-margin-top:12px;margin-top:20px;padding:14px;border:1px dashed #89816e;border-radius:8px;background:#3e3d37}
.player-shell .player-capture-heading{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;margin-bottom:10px}
.player-shell .player-capture-heading h3{margin:0;color:var(--player-text);font-size:.9rem;letter-spacing:0}
.player-shell .player-capture-role{padding:3px 7px;border:1px solid #78705e;border-radius:4px;color:#d9c8a6;background:#252627;font-size:.64rem;line-height:1.4}
.player-shell .player-capture-feedback{font-weight:600;color:#a6dbb7}
.player-shell .player-capture-feedback.is-error,.player-shell .player-capture-message.is-error{color:#ffbaa3}
.player-shell #player-toolbar .player-capture-auto{margin-top:9px;font-size:.75rem;justify-content:flex-end}
.player-shell .player-capture-auto-note{font-size:.7rem;margin-top:2px}
.player-shell.has-capture-dialog{z-index:2147483100}
.player-shell .player-capture-review{position:fixed;inset:0;z-index:2147483200;display:flex;align-items:center;justify-content:center;padding:max(16px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));background:#111416bf;overscroll-behavior:contain}
.player-shell .player-capture-dialog{width:min(720px,100%);max-height:calc(100dvh - 32px);overflow-y:auto;overscroll-behavior:contain;padding:24px;border:1px solid #52717a;border-radius:12px;background:#102731;color:#f4f0de;box-shadow:0 20px 70px #0008}
.player-shell .player-capture-dialog>h3{margin:0;color:#f4f0de;font-size:1.1rem;letter-spacing:0}
.player-shell .player-capture-pictures{display:flex;gap:14px;justify-content:center;margin:18px 0;min-width:0}
.player-shell .player-capture-pictures figure{flex:1;min-width:0;max-width:360px;margin:0;overflow:hidden;border:1px solid #31505a;border-radius:6px;background:#0d242e}
.player-shell .player-capture-pictures img{display:block;width:100%;height:auto;aspect-ratio:4/3;object-fit:contain;background:#000;image-rendering:pixelated}
.player-shell .player-capture-pictures figcaption{padding:8px 10px;font-size:.74rem;font-weight:600;color:#b2c5c5}
.player-shell .player-capture-consent{padding:8px 0;font-size:.8rem;color:#f0e4ce}
.player-shell .player-capture-message{min-height:1.5em;margin:10px 0;color:#d0c2a9;font-size:.8rem;line-height:1.6;overflow-wrap:anywhere}
.player-shell .player-capture-actions{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:10px;margin-top:14px}
.player-shell .player-capture-actions .player-capture-confirm{background:#ffd166;color:#292317;border-color:#ffd07b}
/* Fullscreen uses all available viewport space and never scrolls the game underneath the controls. */
html.player-fullscreen-open,body.player-fullscreen-open{overflow:hidden!important;overscroll-behavior:none}
.player-shell.is-fullscreen{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto;gap:8px;width:100%;height:var(--player-viewport-height,100dvh);min-width:0;min-height:0;max-width:none;max-height:none;margin:0;border:0;border-radius:0;overflow:hidden;overscroll-behavior:none;padding:max(7px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(7px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));background:#0c202a;box-shadow:none}
.player-shell.is-fullscreen-fallback{position:fixed;inset:0;z-index:2147483000}
.player-shell.is-fullscreen::before{display:none}
.player-shell.is-fullscreen .player-primary-controls{grid-column:1;grid-row:1;flex-wrap:nowrap;gap:7px;min-height:44px;margin:0;padding:0;z-index:25}
.player-shell.is-fullscreen .player-primary-controls>strong{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.player-shell.is-fullscreen .player-primary-controls .button{min-height:40px;padding:8px 11px;flex:none;font-size:.74rem}
.player-shell.is-fullscreen .player-deck{grid-column:1;grid-row:2;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr);gap:10px;min-width:0;min-height:0;overflow:hidden}
.player-shell.is-fullscreen #emulator-screen.player-display{grid-column:1;grid-row:1;width:100%;height:100%;max-width:none;max-height:none;min-width:0;min-height:0;aspect-ratio:auto;border:0;border-radius:3px;box-shadow:none}
.player-shell.is-fullscreen #player-status{grid-column:1;grid-row:3;margin:0;padding:0;min-height:0;max-height:2.8em;overflow:hidden;color:#b2c5c5;font-size:.67rem;line-height:1.3}
.player-shell.is-fullscreen .touch-pads{display:none}
.player-shell.is-fullscreen.show-touch-controls .touch-pads{display:grid;grid-row:2;grid-column:1;max-width:540px}
.player-shell.is-fullscreen.show-touch-controls:not(.is-landscape) .player-deck{grid-template-rows:minmax(0,1fr) auto}
.player-shell.is-fullscreen .touch-pads.is-dual{grid-template-columns:minmax(0,1fr)}
.player-shell.is-fullscreen .player-deck[data-touch-player="1"] .touch-pad[data-player="2"],.player-shell.is-fullscreen .player-deck[data-touch-player="2"] .touch-pad[data-player="1"],.player-shell.is-touch-device .player-deck[data-touch-player="1"] .touch-pad[data-player="2"],.player-shell.is-touch-device .player-deck[data-touch-player="2"] .touch-pad[data-player="1"]{display:none!important}
.player-shell.is-touch-device .touch-pads.is-dual{grid-template-columns:minmax(0,1fr)}
.player-shell.is-fullscreen .touch-pad{grid-template-columns:140px minmax(0,1fr);padding:8px 12px;gap:0 20px;background:none;border:0;box-shadow:none}
.player-shell.is-fullscreen .touch-pad-title,.player-shell.is-fullscreen .touch-pad-subtitle,.player-shell.is-fullscreen .touch-pad-bindings{display:none}
.player-shell.is-fullscreen .player-deck .touch-dpad{width:138px;height:138px}
.player-shell.is-fullscreen .player-deck .touch-actions{gap:9px;max-width:148px}
.player-shell.is-fullscreen .player-deck .touch-button .pad-physical-key{display:none}
.player-shell.is-fullscreen .player-deck .action-a,.player-shell.is-fullscreen .player-deck .action-b{min-height:60px}
.player-shell.is-fullscreen .player-deck .action-fire{min-height:68px;min-width:78px}
.player-shell.is-fullscreen .player-deck .action-extra{min-height:34px;padding:4px;font-size:.65rem}
.player-shell.is-fullscreen.show-touch-controls.is-landscape .player-deck{grid-template-columns:clamp(108px,17vw,170px) minmax(0,1fr) clamp(108px,17vw,170px);grid-template-rows:minmax(0,1fr);align-items:center;gap:10px}
.player-shell.is-fullscreen.show-touch-controls.is-landscape #emulator-screen.player-display{grid-column:2;grid-row:1}
.player-shell.is-fullscreen.show-touch-controls.is-landscape .touch-pads,.player-shell.is-fullscreen.show-touch-controls.is-landscape .touch-pad{display:contents}
.player-shell.is-fullscreen.show-touch-controls.is-landscape .player-deck .touch-dpad{grid-column:1;grid-row:1;width:min(100%,156px);height:auto;aspect-ratio:1;align-self:center;justify-self:center}
.player-shell.is-fullscreen.show-touch-controls.is-landscape .player-deck .player-paddle{grid-column:1;grid-row:1;width:100%;min-height:0;max-height:100%;gap:12px;align-self:center;justify-self:center}
.player-shell.is-fullscreen.show-touch-controls.is-landscape .player-deck .touch-actions{grid-column:3;grid-row:1;width:100%;max-width:150px;max-height:100%;align-self:center;overflow-y:auto;overscroll-behavior:contain;padding:3px 3px 6px}
.player-shell.is-fullscreen .player-settings-panel{position:absolute;inset:62px max(10px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));z-index:30;max-width:900px;margin:0 auto;padding:18px;background:#102731;box-shadow:0 8px 40px #0009}
@media(max-width:950px){.player-shell .touch-pads.is-dual{grid-template-columns:minmax(0,1fr);max-width:650px}}
@media(max-width:600px){
  .player-shell{padding:11px;border-radius:12px}.player-shell::before{left:16px;width:84px}
  .player-shell .player-primary-controls{gap:6px}.player-shell .player-primary-controls>strong{flex-basis:100%;font-size:.79rem;margin-bottom:4px}
  .player-shell .player-primary-controls .button{flex:1 1 auto;min-height:42px;padding:8px 9px;font-size:.69rem;gap:4px}.player-shell .player-primary-controls .player-keyboard-toggle{flex:0 0 auto}
  .player-shell #player-status{font-size:.69rem;margin-bottom:10px}.player-shell #emulator-screen.player-display{border-width:3px;border-radius:6px}
  .player-shell .player-deck{gap:11px}.player-shell .touch-pad{grid-template-columns:132px minmax(0,1fr);padding:10px;gap:7px 12px}.player-shell .player-deck .touch-dpad{width:132px;height:132px}
  .player-shell .touch-pad-subtitle{font-size:.62rem}.player-shell .touch-pad-bindings{font-size:.61rem}
  .player-shell .player-deck .touch-actions{max-width:145px;gap:8px}.player-shell .player-deck .action-a,.player-shell .player-deck .action-b{min-height:58px}
  .player-shell .player-deck .action-fire{min-width:74px;min-height:68px}.player-shell .pad-physical-key{font-size:.53rem}.player-shell .pad-action-label{font-size:1.15rem}
  .player-shell .player-settings-panel{padding:12px}.player-shell .player-controls{gap:8px}.player-shell .player-field{flex:1 1 auto}.player-shell .player-save-controls .player-field{flex:0 0 100%}
  .player-shell .zx-keyboard{padding:6px}.player-shell .zx-keyboard-row{gap:3px}.player-shell #spectrum-keyboard .zx-key{min-height:40px}
  .player-shell .player-capture-dialog{padding:14px}.player-shell .player-capture-pictures{gap:8px;flex-wrap:wrap}.player-shell .player-capture-pictures figure{flex-basis:220px}
  .player-shell.is-fullscreen .player-primary-controls{gap:5px;min-height:42px}.player-shell.is-fullscreen .player-primary-controls>strong{display:none}.player-shell.is-fullscreen .player-primary-controls .button{flex:1 1 auto;min-height:42px;padding:7px;font-size:.68rem}
  .player-shell.is-fullscreen .player-fullscreen-toggle>span:last-child{display:none}.player-shell.is-fullscreen .player-primary-controls .player-fullscreen-toggle{flex:0 0 44px;min-width:44px}
  .player-shell.is-fullscreen .player-settings-panel{inset:58px 8px 20px;padding:12px}
}
@media(max-width:359px){.player-shell .touch-pad{grid-template-columns:120px minmax(0,1fr);gap:6px 8px;padding:9px 7px}.player-shell .player-deck .touch-dpad{width:120px;height:120px}.player-shell .player-deck .touch-actions{gap:7px}.player-shell .player-deck .action-a,.player-shell .player-deck .action-b{min-height:52px}.player-shell .player-primary-controls .button{font-size:.64rem}}
@media(max-height:540px) and (orientation:landscape){
  .player-shell.is-fullscreen{gap:5px;padding-top:max(4px,env(safe-area-inset-top));padding-bottom:max(4px,env(safe-area-inset-bottom))}
  .player-shell.is-fullscreen .player-primary-controls>strong{font-size:.72rem;flex:1 1 80px}.player-shell.is-fullscreen .player-primary-controls .button{min-height:40px;padding:7px 9px;font-size:.67rem}
  .player-shell.is-fullscreen .player-fullscreen-toggle>span:last-child{display:none}.player-shell.is-fullscreen .player-primary-controls .player-fullscreen-toggle{min-width:44px}
  .player-shell.is-fullscreen .player-settings-panel{top:50px}.player-shell.is-fullscreen #player-status{font-size:.61rem;max-height:1.4em}
}
@media(prefers-reduced-motion:reduce){.player-shell *{scroll-behavior:auto!important;transition:none!important}}

/* The ZX keyboard is a live input drawer, independent of the paused settings panel. */
.player-shell .player-keyboard-panel{min-width:0;margin-top:16px;padding:12px;border:1px solid #3a5c67;border-radius:9px;background:#102731}
.player-shell .player-keyboard-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:4px}
.player-shell .player-keyboard-heading h3{margin:0;color:var(--player-text);font-size:.82rem;line-height:1.4;letter-spacing:0}
.player-shell .player-keyboard-heading .player-keyboard-close{min-width:40px;min-height:36px;padding:3px;font-size:1.4rem}
.player-shell .player-keyboard-panel #spectrum-keyboard{margin:0}
.player-shell .player-keyboard-panel .zx-keyboard{max-width:none;padding:4px;border:0;background:none}
.player-shell .player-keyboard-panel .zx-keyboard>summary{display:none}
.player-shell .player-keyboard-link{margin-top:16px}
.player-shell.is-fullscreen.keyboard-open{grid-template-rows:auto minmax(0,1fr) auto auto}
.player-shell.is-fullscreen.keyboard-open .player-deck{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr)!important}
.player-shell.is-fullscreen.keyboard-open #emulator-screen.player-display{grid-column:1!important;grid-row:1!important}
.player-shell.is-fullscreen.keyboard-open .touch-pads{display:none!important}
.player-shell.is-fullscreen .player-keyboard-panel{grid-column:1;grid-row:3;min-height:0;overflow:auto;margin:0;padding:8px}
.player-shell.is-fullscreen.keyboard-open #player-status{grid-row:4}
.player-shell.is-fullscreen.is-landscape.keyboard-open{grid-template-columns:minmax(0,1fr) minmax(270px,1.05fr);grid-template-rows:auto minmax(0,1fr) auto}
.player-shell.is-fullscreen.is-landscape.keyboard-open .player-primary-controls{grid-column:1/-1}
.player-shell.is-fullscreen.is-landscape.keyboard-open .player-deck{grid-column:1;grid-row:2}
.player-shell.is-fullscreen.is-landscape.keyboard-open .player-keyboard-panel{grid-column:2;grid-row:2;align-self:center;width:100%;max-height:100%;padding:6px}
.player-shell.is-fullscreen.is-landscape.keyboard-open #player-status{grid-column:1/-1;grid-row:3}
.player-shell.is-fullscreen .player-keyboard-panel #spectrum-keyboard .zx-key{min-height:38px}
@media(max-width:600px){.player-shell .player-keyboard-panel{padding:8px}.player-shell .player-keyboard-heading h3{font-size:.73rem}.player-shell .player-keyboard-panel .zx-keyboard-row{gap:3px}.player-shell .player-keyboard-panel #spectrum-keyboard .zx-key{font-size:.6rem}}

/* ARCADE1 — account-specific Spectrum layouts and clear registration benefits. */
.player-shell .player-member-card{display:flex;align-items:center;justify-content:space-between;gap:16px;min-width:0;margin:0 0 18px;padding:16px;border:1px solid #42646b;border-radius:10px;background:#173640;color:#f4f0de}
.player-shell .player-member-copy{min-width:0;flex:1}
.player-shell .player-member-copy h3{margin:0 0 7px;font-size:.9rem;line-height:1.4;color:#f4f0de;letter-spacing:0}
.player-shell .player-member-copy p{margin:0;color:#c4d5d0;font-size:.8rem;line-height:1.65;overflow-wrap:anywhere}
.player-shell .player-member-actions{display:flex;align-items:center;justify-content:flex-start;flex-wrap:wrap;gap:10px 15px;flex-shrink:0}
.player-shell .player-member-actions .player-member-register{min-height:44px;background:#ffd166;border-color:#ffe4a7;color:#15252a;box-shadow:0 3px 0 #946b25}
.player-shell .player-member-actions .player-member-register:hover{background:#ffdf8f;color:#10212a}
.player-shell .player-member-login{color:#b5e7d7;text-decoration:underline;text-underline-offset:3px;font-size:.8rem;font-weight:650;line-height:1.5;padding:8px 0}
.player-shell .player-member-card.is-compact{margin:18px 0 0;padding:13px 15px;background:#102731;border-color:#31505a}
.player-shell.is-fullscreen>.player-account-note,.player-shell.settings-open>.player-account-note{display:none}
.player-shell .player-profile-panel{margin:14px 0 20px;padding:18px;border:1px solid #4b7578;border-radius:11px;background:#0c222c;min-width:0}
.player-shell .player-profile-heading{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;margin:0 0 8px}
.player-shell .player-profile-heading h3{margin:0;font-size:1rem;line-height:1.4;color:#f4f0de;letter-spacing:0}
.player-shell .player-profile-badge{padding:4px 7px;border-radius:4px;border:1px solid #427365;color:#8ce7c6;background:#163a36;font-size:.65rem;font-weight:700;line-height:1.4}
.player-shell .player-profile-intro,.player-shell .player-profile-note,.player-shell .player-profile-game,.player-shell .player-profile-mode{margin:7px 0 0;font-size:.76rem;line-height:1.65;color:#b2c5c5;overflow-wrap:anywhere}
.player-shell .player-profile-game strong{color:#f4f0de;font-weight:650}
.player-shell .player-profile-tabs{display:flex;gap:7px;margin:16px 0 10px;min-width:0}
.player-shell #touch-controls .player-profile-tab{flex:1;min-width:0;background:#173640;border-color:#31505a;color:#b2c5c5}
.player-shell #touch-controls .player-profile-tab.is-active{background:#315b57;border-color:#67dfbb;color:#f4f0de;box-shadow:inset 0 -2px #67dfbb}
.player-shell .player-profile-mode{margin:0 0 10px;color:#ffd166;font-weight:650}
.player-shell .player-profile-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:0;border:1px solid #31505a;border-radius:8px;overflow:hidden}
.player-shell .player-profile-row{display:grid;grid-template-columns:minmax(120px,1fr) minmax(85px,1fr) minmax(135px,1.2fr);align-items:center;gap:12px;padding:10px 12px;background:#102b35;min-width:0}
.player-shell .player-profile-row+.player-profile-row{border-top:1px solid #294753}
.player-shell .player-profile-row:nth-child(even){background:#0d2530}
.player-shell .player-profile-action{display:flex;align-items:center;gap:9px;min-width:0;color:#f4f0de;font-size:.78rem;font-weight:650;line-height:1.45}
.player-shell .player-profile-glyph{display:grid;place-items:center;width:30px;height:30px;flex:none;border-radius:5px;border:1px solid #55717a;background:#24444f;color:#ffd166;font-size:1.1rem;box-shadow:0 2px #08171e}
.player-shell .player-profile-row .player-field{width:100%;font-size:.68rem}
.player-shell .player-profile-row .player-select{width:100%;min-height:44px;padding:8px 26px 8px 10px;background:#081b25;border-color:#52717a;color:#f4f0de;font-size:.86rem}
.player-shell .player-profile-note{margin-top:13px}
.player-shell .player-profile-footer{display:flex;align-items:center;flex-wrap:wrap;gap:9px;margin-top:16px}
.player-shell #touch-controls .player-profile-save{background:#ffd166;border-color:#ffe4a7;color:#15252a;box-shadow:0 3px 0 #946b25}
.player-shell #touch-controls .player-profile-save:hover{background:#ffdf8f}
.player-shell #touch-controls .player-profile-reset{background:transparent;border-color:#52717a;color:#b2c5c5;box-shadow:none}
.player-shell .player-profile-feedback{min-height:1.5em;margin:12px 0 0;color:#b2c5c5;font-size:.77rem;line-height:1.6;overflow-wrap:anywhere}
.player-shell .player-profile-feedback.is-success{color:#8ce7c6}
.player-shell .player-profile-feedback.is-error{color:#ffab9f}
.player-shell .pad-spectrum-key{color:#ffd166;font-size:.6rem!important;line-height:1.2;max-width:100%;white-space:normal;overflow-wrap:anywhere;letter-spacing:0}
.player-shell.is-fullscreen .player-deck .touch-button .pad-spectrum-key{display:block;font-size:.57rem!important}
.player-shell.is-fullscreen .player-deck .touch-button.is-pressed .pad-spectrum-key{color:#14252b}
.player-shell .touch-button.action-start .pad-spectrum-key,.player-shell .touch-button.action-select .pad-spectrum-key,.player-shell .touch-button.action-menu0 .pad-spectrum-key{display:none!important}
.player-shell .player-deck .action-start .pad-action-label,.player-shell .player-deck .action-select .pad-action-label,.player-shell .player-deck .action-menu0 .pad-action-label{overflow-wrap:anywhere;max-width:100%;line-height:1.3}
@media(max-width:680px){
  .player-shell .player-member-card{align-items:flex-start;flex-direction:column;gap:11px;padding:13px}
  .player-shell .player-member-actions{width:100%;gap:10px 16px}.player-shell .player-member-actions .player-member-register{font-size:.78rem}
  .player-shell .player-profile-panel{padding:12px}.player-shell .player-profile-heading h3{font-size:.9rem}
  .player-shell .player-profile-row{grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:7px;padding:9px 8px}
  .player-shell .player-profile-action{grid-column:1/-1}.player-shell .player-profile-row .player-field{flex:none}
  .player-shell .player-profile-row .player-select,.player-shell .player-select{font-size:16px;min-height:44px}.player-shell .player-profile-row .player-select{padding-left:5px;padding-right:18px;font-weight:400}
  .player-shell .player-profile-row .player-field-label{font-size:.65rem}
  .player-shell .player-profile-footer{align-items:stretch;flex-direction:column}.player-shell #touch-controls .player-profile-footer .button{width:100%;min-height:45px}
  .player-shell .player-profile-intro,.player-shell .player-profile-note,.player-shell .player-profile-feedback{font-size:.76rem}
}

@media(max-width:375px){
  .player-shell .player-profile-row{grid-template-columns:minmax(0,1fr);gap:9px}
  .player-shell .player-profile-row .player-select{padding-left:10px;padding-right:30px}
}

.player-shell .player-deck .player-pad-customize{grid-column:1/-1;justify-self:start;min-height:36px;margin:5px 0 0;padding:7px 11px;background:#173640;border-color:#52717a;color:#b5e7d7;font-size:.72rem;box-shadow:none}
.player-shell.is-fullscreen .player-pad-customize{display:none!important}
.player-shell .player-profile-panel{scroll-margin-top:115px}
.player-shell.is-fullscreen .player-profile-panel{scroll-margin-top:12px}

/* SNAP1: an admin-only action in the visible player bar, including mobile fullscreen. */
.player-shell .player-primary-controls .player-capture-quick{min-height:44px;background:#235344;border-color:#6baf86;color:#d9f4e2;touch-action:manipulation}
.player-shell .player-primary-controls .player-capture-quick:hover{background:#2e6752;border-color:#91c8a7;color:#fff}
.player-shell .player-capture-icon{position:relative;display:block;flex:none;width:18px;height:14px;margin-top:2px;border:1.7px solid currentColor;border-radius:3px}
.player-shell .player-capture-icon::before{content:"";position:absolute;top:-5px;left:4px;width:7px;height:4px;border:1.5px solid currentColor;border-bottom:0;border-radius:2px 2px 0 0}
.player-shell .player-capture-icon::after{content:"";position:absolute;left:5px;top:3px;width:5px;height:5px;border:1.5px solid currentColor;border-radius:50%}
.player-shell .player-capture-quick.is-saving{cursor:progress}
.player-shell .player-capture-current{display:flex;align-items:center;gap:12px;margin:0 0 13px;padding:8px;border:1px solid #666957;border-radius:6px;background:#252e2d}
.player-shell .player-capture-current img{display:block;width:112px;max-width:45%;height:84px;flex:none;object-fit:contain;background:#080909;image-rendering:pixelated;border-radius:3px}
.player-shell .player-capture-current figcaption{font-size:.74rem;line-height:1.5;color:#d9c8a6}
.player-shell #player-status.player-capture-status:not(.player-error){color:#a6dbb7}
.player-shell.has-quick-capture.is-fullscreen .player-primary-controls{flex-wrap:wrap}
.player-shell.has-quick-capture.is-fullscreen .player-settings-panel{top:calc(var(--player-toolbar-height,44px) + 18px)}
.player-shell.is-fullscreen #player-status.player-capture-status{max-height:6.5em;overflow:auto;overscroll-behavior:contain}
@media(max-width:900px){.player-shell.has-quick-capture.is-fullscreen .player-primary-controls>strong{display:none}}
@media(max-width:600px){
  .player-shell .player-primary-controls .player-capture-quick{flex:1 1 145px;min-height:44px}
  .player-shell .player-capture-icon{width:16px;height:13px}
  .player-shell .player-capture-icon::before{left:3px}.player-shell .player-capture-icon::after{left:4px;top:2px}
  .player-shell.has-quick-capture.is-fullscreen .player-settings-panel{top:calc(var(--player-toolbar-height,44px) + 14px)}
}
