/* User-approved solo and multiplayer references own their control materials.
   Keep the newer engraved family outside those setup subtrees. */
/* Original SRC menu hardware: quiet material, role-specific construction. */
:root{
 --src-grain:none;
 --src-key:url('assets/src-interface/action-key.svg');
 --src-key-engaged:url('assets/src-interface/action-key-selected.svg');
 --src-field:url('assets/src-interface/input-channel.svg');
 --src-field-engaged:url('assets/src-interface/input-channel-selected.svg');
 --src-plaque:url('assets/src-interface/faction-plaque.svg');
 --src-plaque-engaged:url('assets/src-interface/faction-plaque-selected.svg');
 --src-berth:url('assets/src-interface/roster-berth.svg');
 --src-berth-engaged:url('assets/src-interface/roster-berth-selected.svg');
 --src-socket:url('assets/src-interface/color-socket.svg');
 --src-socket-engaged:url('assets/src-interface/color-socket-selected.svg');
}
/* The approved full bezel belongs to the main instrument, not every control. */
dialog:not(#startupDialog):where(:not(#onlineDialog,#multiplayerContent,#multiplayerContent *,#splashSetup,#splashSetup *)),
#startupDialog[data-screen="setup"],
#resultDialog{
 background-color:rgba(11,17,23,.9);background-image:none;background-clip:padding-box;
 box-shadow:none;
}
#startupDialog[data-screen="setup"]::backdrop{background:#02070b66}
#menuSessionControls,
.help-index{background-color:rgba(11,17,23,.9);background-image:none;background-size:64px 64px}
/* Action keys: raised shoulder caps, quiet straight rails and a matte face. */
dialog:not(#startupDialog) button:not(.solo-launch):not(.commander-card):where(:not(#onlineDialog,#multiplayerContent,#multiplayerContent *,#splashSetup,#splashSetup *,.multiplayer-select-trigger,.multiplayer-select-options *)),
#startupDialog[data-screen="setup"] button:not(.solo-launch):where(:not(#splashSetup,#splashSetup *)),
#resultDialog button{
 --src-edge:var(--src-key);--src-engaged:var(--src-key-engaged);
 --src-slice:18;--src-edge-width:9px;
 border:1px solid #3b474f;border-image-source:var(--src-edge);border-image-slice:var(--src-slice);
 border-image-width:var(--src-edge-width);border-image-outset:0;border-image-repeat:stretch;
 border-radius:0;background-color:#1a2228;background-image:none;background-clip:padding-box;
 box-shadow:none;text-shadow:none;clip-path:polygon(5px 0,calc(100% - 5px) 0,100% 5px,100% calc(100% - 5px),calc(100% - 5px) 100%,5px 100%,0 calc(100% - 5px),0 5px);
}
dialog:not(#startupDialog) button:not(.solo-launch):not(.commander-card):is(:hover,:focus-visible):not(:disabled):where(:not(#onlineDialog,#multiplayerContent,#multiplayerContent *,#splashSetup,#splashSetup *,.multiplayer-select-trigger,.multiplayer-select-options *)),
#startupDialog[data-screen="setup"] button:not(.solo-launch):is(:hover,:focus-visible):not(:disabled):where(:not(#splashSetup,#splashSetup *)),
#resultDialog button:is(:hover,:focus-visible):not(:disabled){
 background-color:#252f36;border-image-source:var(--src-engaged);box-shadow:none;
}
dialog:not(#startupDialog) button[aria-pressed="true"]:not(.solo-launch):not(.commander-card):where(:not(#onlineDialog,#multiplayerContent,#multiplayerContent *,#splashSetup,#splashSetup *,.multiplayer-select-trigger,.multiplayer-select-options *)),
#startupDialog[data-screen="setup"] button[aria-pressed="true"]:not(.solo-launch):where(:not(#splashSetup,#splashSetup *)){
 border-image-source:var(--src-engaged);background-color:#182a31;background-image:none;box-shadow:none;
}
/* Fields are inset channels; their lip points into the field, unlike a key. */
dialog:not(#startupDialog) :is(input:not([type="range"]):not([type="hidden"]),select):where(:not(#onlineDialog,#multiplayerContent,#multiplayerContent *,#splashSetup,#splashSetup *)){
 border:1px solid #34424a;border-image:var(--src-field) 16 / 7px / 0 stretch;
 border-radius:0;background-color:#090f14;background-image:none;background-clip:padding-box;
 box-shadow:none;clip-path:polygon(3px 0,calc(100% - 3px) 0,100% 3px,100% calc(100% - 3px),calc(100% - 3px) 100%,3px 100%,0 calc(100% - 3px),0 3px);
 color:#e0e8ed;caret-color:#c3f2ff;
}
dialog:not(#startupDialog) :is(input,select):focus:where(:not(#onlineDialog,#multiplayerContent,#multiplayerContent *,#splashSetup,#splashSetup *)){border-image-source:var(--src-field-engaged);background-color:#0e1820;box-shadow:none}
/* Large illustrated actions retain the approved major frame and game artwork. */
dialog .solo-launch:where(:not(#onlineDialog,#multiplayerContent,#multiplayerContent *,#splashSetup,#splashSetup *)){
 background-color:#15212a;background-image:none;background-clip:padding-box;box-shadow:none;
 border-image:var(--rim) 136 / 14px / 0 round;
}
dialog .solo-launch:is(:hover,:focus-visible):not(:disabled):where(:not(#onlineDialog,#multiplayerContent,#multiplayerContent *,#splashSetup,#splashSetup *)){background-color:#203039;background-image:none;box-shadow:none}
.solo-launch .solo-launch-space:where(:not(#onlineDialog,#multiplayerContent,#multiplayerContent *,#splashSetup,#splashSetup *)){background:none}
/* States stay visible without changing geometry, handlers or focus ownership. */
dialog:not(#startupDialog) button:not(.solo-launch):active:not(:disabled):where(:not(#onlineDialog,#multiplayerContent,#multiplayerContent *,#splashSetup,#splashSetup *,.multiplayer-select-trigger,.multiplayer-select-options *)){background-color:#101a21}
:is(#menuDialog,#startupDialog,#helpDialog,#leaveMatchDialog,#unitActionDialog) :is(button,input,select,summary):focus-visible:where(:not(#onlineDialog,#multiplayerContent,#multiplayerContent *,#splashSetup,#splashSetup *)),
#resultDialog button:focus-visible{outline:2px solid #c0e2ee;outline-offset:-4px}
#quitSession,
#confirmLeaveMatch,
#unitActionDialog[data-action="selfdestruct"] #confirmUnitAction{color:#eab0a9}
#unitActionDialog[data-action="selfdestruct"] #confirmUnitAction{background-color:#301b20;background-image:var(--src-grain)}
@media(forced-colors:active){
 dialog button:where(:not(#onlineDialog,#multiplayerContent,#multiplayerContent *,#splashSetup,#splashSetup *)),
dialog input:where(:not(#onlineDialog,#multiplayerContent,#multiplayerContent *,#splashSetup,#splashSetup *)),
dialog select:where(:not(#onlineDialog,#multiplayerContent,#multiplayerContent *,#splashSetup,#splashSetup *)){border-image:none!important;clip-path:none!important;border:1px solid ButtonText!important;background-image:none!important}
 dialog button[aria-pressed="true"]:where(:not(#onlineDialog,#multiplayerContent,#multiplayerContent *,#splashSetup,#splashSetup *)){border-width:3px!important}
}
/* PR96 readability belongs to the same material family, including its stronger selectors. */
#menuDialog #resume{background-color:#1b2b32;background-image:none;box-shadow:none}
#menuDialog #resume:is(:hover,:focus-visible){background-color:#25353d;border-image-source:var(--src-key-engaged)}
#menuDialog .graphics-control select{border:1px solid #34424a;border-image:var(--src-field) 16 / 7px / 0 stretch;background-color:#090f14;background-image:none;box-shadow:none}
#menuDialog .graphics-control select:focus{border-image-source:var(--src-field-engaged);background-color:#0e1820}

/* Main's splash-options controls share the quiet material and retain their bindings. */
#menuDialog[data-splash-origin]{background:rgba(11,17,23,.9);box-shadow:none}
#menuDialog[data-splash-origin]::backdrop{background:#02070b66!important}

/* Explicit startup diagnostics stay inside the active menu, without a game scene. */
body.splash-shell dialog[open] #performancePanel{visibility:visible;pointer-events:auto;position:fixed;left:16px;bottom:16px}
