/* A compact flight deck with persistent actions and controller focus. */
#settingsDialog,#pauseDialog.guide-dialog{width:min(960px,calc(100vw - 36px));max-width:960px;height:auto;max-height:calc(100dvh - 36px);padding:0;overflow:hidden;background:linear-gradient(145deg,#152d39,#0c1b24);border:1px solid #a4c1bd50;border-radius:12px;box-shadow:0 24px 110px #0009}
#settingsDialog[open],#pauseDialog.guide-dialog[open]{display:flex;flex-direction:column}
.settings-header,.pause-header{display:block;height:auto;min-height:0;gap:0;flex:none;padding:24px 28px 0;background:#10242de8;border-bottom:1px solid #a4c1bd29}
.settings-header h2,#pauseDialog .pause-header h2{font:42px/1.1 var(--display);margin:14px 0 16px}
.settings-header .dialog-head{display:flex;justify-content:space-between;align-items:center;gap:16px}
.settings-header .close{margin:0;min-width:44px;min-height:44px;font-size:32px}
.settings-header .settings-tabs{position:static;padding:0;margin:0;border-bottom:0;background:transparent;gap:6px}
.settings-header .settings-tabs button{border:1px solid #8faeaa38;border-radius:6px 6px 0 0;min-height:48px;padding:13px 17px;font:13px var(--mono);flex:1}
.settings-header .settings-tabs button[aria-selected=true]{background:#dcff8c12;border-color:#dcff8c70;color:#e2f8b9}
.menu-help{font:12px/1.6 var(--mono);color:#afc5c8;margin:13px 0 15px}
.settings-body,.pause-body{overflow-y:auto;min-height:0;overscroll-behavior:contain;scrollbar-color:#91b197 #122731;padding:22px 28px;scroll-padding:12px}
.settings-footer,.pause-footer{flex:none;border-top:1px solid #a4c1bd29;background:#10242df5;padding:15px 28px;display:flex;gap:24px;align-items:center}
.settings-footer [data-menu-status],.pause-footer [data-menu-status]{font:13px/1.5 var(--mono);color:#c8dcc6;margin:0;flex:1;min-height:2.8em}
#settingsDialog .settings-footer .solid.close{flex:none;min-width:135px;width:auto;max-width:none;margin:0;padding:15px 22px;font:14px var(--mono)}
#settingsHUD .hud-section-intro{margin-bottom:17px}.hud-section-intro h3{font-size:30px;margin-top:4px}.hud-preview{height:160px;margin-bottom:12px}.hud-preview-caption,.hud-preview-note{font-size:10px}
#settingsHUD .hud-control-grid,#settingsHUD .hud-switch-grid{grid-template-columns:1fr;gap:5px}
#settingsHUD .hud-setting-row{display:grid;grid-template-columns:minmax(170px,.75fr) minmax(0,1fr);align-items:center;gap:22px;min-height:66px;padding:12px 14px;border-bottom:1px solid #a4c1bd13;border-radius:5px;font-size:16px}
#settingsHUD .hud-setting-row select{font-size:15px;min-height:42px;padding:10px}.hud-setting-row output{font-size:13px}.hud-switch-row{min-height:74px;padding:12px 14px;border-radius:5px}.hud-switch-row strong{font-size:16px}.hud-switch-row small{font-size:13px}.hud-switch-row input{right:14px}
#settingsHUD .hud-control-section{margin-top:18px;padding-top:17px}.hud-control-section h4{font:13px var(--mono);letter-spacing:1px;margin-bottom:6px}.hud-presets button{border-radius:6px;min-height:75px}.hud-presets button strong{font-size:13px}.hud-presets button small{font-size:12px}.hud-section-intro p{font-size:14px}
#settingsDialog .setting{min-height:70px;padding:12px 14px;margin:0;border-radius:5px;border-bottom:1px solid #a4c1bd13;font-size:16px;gap:20px}
#settingsDialog .setting select{min-height:44px;font-size:15px;max-width:60%;min-width:0}
#settingsDialog .audio-slider{padding:14px;border-radius:5px;border-bottom:1px solid #a4c1bd13;min-height:70px;margin:3px 0;font-size:16px;grid-template-columns:185px minmax(0,1fr) 44px;gap:16px}
#settingsDialog .audio-slider output{font-size:14px}.settings-section-heading h3{font-size:32px;margin:0 0 10px}.settings-section-heading p{font-size:14px;margin:0 0 18px}
.pause-heading>.solid{min-width:150px;min-height:50px;font:15px var(--mono);border-radius:5px}.pause-header .dialog-intro{font-size:15px;margin:0 0 16px;max-width:none;color:#b4cbd0}
#pauseDialog .pause-actions{margin:0;padding:0 0 22px;border:0;gap:10px}.pause-actions :is(.secondary,.text-button){border:1px solid #a4c1bd55;border-radius:5px;font:13px var(--mono);min-height:48px;padding:13px}
.pause-body:has(#bountyPanel:empty){padding-top:18px}.pause-control-guide{border:1px solid #a4c1bd38;border-radius:7px;background:#122731a0}.pause-control-guide summary{display:flex;justify-content:space-between;align-items:center;gap:15px;cursor:pointer;padding:18px;font:14px var(--mono);color:#dce9d6;list-style:none}.pause-control-guide summary::-webkit-details-marker{display:none}.pause-control-guide summary span{color:#bdd693;font-size:12px}.pause-control-guide[open] summary{border-bottom:1px solid #a4c1bd29}.pause-control-guide #pauseGuide{padding:18px}
.pause-footer{display:block}.pause-footer .menu-help{margin:0 0 7px}.pause-footer [data-menu-status]{min-height:0;font-size:12px;color:#91acae}
/* Programmatic gamepad focus is visible even when the browser hides :focus-visible. */
[data-controller-focus=true]{outline:3px solid #e3ffa0!important;outline-offset:3px!important;box-shadow:0 0 0 6px #cbe59118!important}
:is(.setting,.hud-setting-row,.hud-switch-row,.audio-slider,.room-field)[data-controller-focus=true]{outline-offset:-1px!important;background:#b6d58714!important;box-shadow:none!important}
:is(.setting,.hud-setting-row,.hud-switch-row,.audio-slider,.room-field)[data-controller-focus=true] [data-controller-focus=true]{outline:none!important;box-shadow:none!important}
.hud-switch-row[data-controller-focus=true] i{border-color:#e3ffa0}.backup-actions input[type=file][data-controller-focus=true]{opacity:1;background:#1a323c;color:#dce9d6;font-size:12px;max-width:100%}
.controller-editor{position:fixed;inset:0;z-index:100;display:grid;place-items:center;background:#050d15e8;padding:22px;overflow:auto}.controller-editor-card{width:min(630px,100%);border:1px solid #abcaa15f;border-radius:12px;padding:24px;background:#132a35;box-shadow:0 20px 100px #0009}.controller-editor h3{font:30px/1.2 var(--display);margin:0 0 15px}.controller-editor-preview{display:block;border:1px solid #94b6b555;border-radius:6px;min-height:54px;font:22px/1.4 var(--mono);padding:12px;color:#e6f3d7;overflow-wrap:anywhere;background:#071a25}.controller-editor p{font:12px/1.6 var(--mono);color:#b0c9cf;margin:14px 0 17px}.controller-editor-keys{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:9px}.controller-editor-keys button{min-height:44px;min-width:0;border:1px solid #a3c2ba55;border-radius:5px;background:#203d49;font:14px var(--mono);padding:8px 4px;color:#e1eddc}.controller-editor-keys .controller-color-key{font-size:0;border:2px solid #a9c0b8;min-height:56px}
@media(max-width:650px){#settingsDialog,#pauseDialog.guide-dialog{width:calc(100vw - 20px);max-height:calc(100dvh - 20px);max-width:none;border-radius:9px}.settings-header,.pause-header{padding:18px 18px 0}.settings-header h2,#pauseDialog .pause-header h2{font-size:34px;margin:10px 0 13px}.settings-header .settings-tabs{flex-wrap:nowrap}.settings-header .settings-tabs button{font-size:10px;padding:10px 7px;min-height:45px}.menu-help{font-size:10px}.settings-body,.pause-body{padding:17px 18px}.settings-footer,.pause-footer{padding:13px 18px;gap:12px}.settings-footer [data-menu-status]{font-size:11px}.settings-header .dialog-head .micro{font-size:10px}#settingsDialog .settings-footer .solid.close{font-size:12px;min-width:90px;padding:14px}.hud-presets button small{font-size:10px}.hud-preview{height:155px}#settingsHUD .hud-setting-row{grid-template-columns:1fr;gap:10px;padding:13px}.hud-switch-row small{font-size:12px}#settingsDialog .setting{flex-direction:column;align-items:stretch;gap:10px}#settingsDialog .setting select{max-width:100%;width:100%}#settingsDialog .audio-slider{grid-template-columns:minmax(0,1fr) 44px;gap:12px}#settingsDialog .audio-slider label{grid-column:1}#settingsDialog .audio-slider input{grid-column:1;grid-row:2}#settingsDialog .audio-slider output{grid-column:2;grid-row:2}.pause-heading{flex-direction:row;align-items:center;gap:12px}.pause-heading>.solid{min-width:110px;width:auto;padding:13px;font-size:12px}#pauseDialog .pause-actions{display:grid;grid-template-columns:1fr;gap:8px;padding-bottom:16px}.pause-control-guide summary{font-size:12px;padding:15px}.pause-control-guide summary span{font-size:10px}.pause-control-guide #pauseGuide{padding:15px}.controller-editor-card{padding:18px}.controller-editor-keys{gap:7px}.controller-editor-keys button{font-size:11px}.controller-editor-preview{font-size:19px}}
@media(max-height:650px) and (min-width:651px){.settings-header,.pause-header{padding-top:15px}.settings-header h2,#pauseDialog .pause-header h2{font-size:32px;margin:7px 0 11px}.settings-header .dialog-head .micro{font-size:10px}.settings-header .close{min-height:34px}.menu-help{margin:9px 0 10px}.settings-header .settings-tabs button{min-height:42px}.pause-header .dialog-intro{font-size:13px;margin-bottom:11px}.pause-header .pause-actions{padding-bottom:15px!important}.controller-editor{padding:10px}.controller-editor-card{padding:16px}.controller-editor h3{font-size:23px;margin-bottom:10px}.controller-editor-preview{min-height:43px;font-size:18px;padding:8px}.controller-editor p{margin:9px 0 12px}.controller-editor-keys{gap:6px}.controller-editor-keys button{min-height:34px}}
@media(max-height:480px){.settings-header,.pause-header{padding:10px 16px 0;max-height:calc(100dvh - 90px);overflow-y:auto}.settings-header h2,#pauseDialog .pause-header h2{font-size:26px;margin:5px 0 9px}.settings-header .dialog-head .micro,.settings-header .menu-help,.pause-header .dialog-intro,.pause-footer .menu-help{display:none}.settings-header .close{min-height:32px;font-size:26px}.settings-header .settings-tabs button{min-height:34px;padding:6px;font-size:10px}.pause-heading{flex-direction:row;align-items:center;gap:12px}.pause-heading>.solid{min-width:105px;min-height:36px;padding:9px;font-size:11px}#pauseDialog .pause-actions{display:flex;flex-wrap:wrap;gap:6px;padding-bottom:10px!important}.pause-actions :is(.secondary,.text-button){min-height:36px;padding:8px;font-size:10px}.settings-body,.pause-body{padding:10px 16px}.settings-footer,.pause-footer{padding:8px 16px}.settings-footer [data-menu-status]{min-height:0;font-size:11px}#settingsDialog .settings-footer .solid.close{padding:10px;font-size:11px}.controller-editor{padding:8px}.controller-editor-card{padding:12px}.controller-editor h3{font-size:22px;margin-bottom:8px}.controller-editor-preview{min-height:38px;padding:6px;font-size:17px}.controller-editor p{margin:7px 0 10px}.controller-editor-keys{gap:5px}.controller-editor-keys button{min-height:32px}}
