/* Physical switches: the green lamp and pressed edge also expose an ARIA state. */
.physical-native{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;border:0!important;overflow:hidden!important;clip-path:inset(50%)!important;white-space:nowrap!important;opacity:0}
.physical-choices{display:flex;flex-wrap:wrap;gap:9px;margin:8px 0 4px;min-width:0;max-width:100%}
.physical-choices button{display:flex;align-items:center;justify-content:flex-start;gap:9px;flex:1 1 135px;min-width:0;min-height:46px;padding:12px 14px;border:1px solid #a5b4be7a;border-radius:12px;background:linear-gradient(180deg,#fff,#e5ebee);color:#283a45;box-shadow:inset 0 1px 0 #fff,0 3px 0 #aab7be,0 5px 10px #233b4b18;text-shadow:0 1px 0 #fff8;font:600 12px/1.4 system-ui,sans-serif;cursor:pointer;transition:background .13s,box-shadow .13s,translate .13s}
.physical-choices button i{flex:0 0 7px;height:7px;border-radius:50%;background:#87969e;box-shadow:inset 0 1px 2px #21313966}
.physical-choices button[aria-checked=true]{background:linear-gradient(180deg,#d1ebdc,#b9d9c7);border-color:#68a783;color:#123e2b;box-shadow:inset 0 2px 5px #234e302d,0 1px 0 #79a68c,0 0 13px #39cf7a18;translate:0 2px;text-shadow:0 1px 0 #ffffff66}
.physical-choices button[aria-checked=true] i{background:#3ee98a;box-shadow:0 0 8px #29d878,inset 0 1px 1px #d3ffe8}
.physical-choices button:focus-visible{outline:2px solid #36ad75;outline-offset:4px}.physical-choices button:active{translate:0 3px}.physical-choices button:disabled{opacity:.45;cursor:default}
.physical-choices-long{max-height:220px;overflow:auto;padding:4px 4px 8px;overscroll-behavior:contain}
body.dark .physical-choices button,:host([game-mode]) .physical-choices button,:host([dark]) .physical-choices button{background:linear-gradient(180deg,#304c5d,#1b3545);color:#dfeef5;border-color:#98baca40;box-shadow:inset 0 1px 0 #d0e8f02b,0 3px 0 #081c29,0 5px 12px #00131c55;text-shadow:0 1px 1px #00131c}
body.dark .physical-choices button[aria-checked=true],:host([game-mode]) .physical-choices button[aria-checked=true],:host([dark]) .physical-choices button[aria-checked=true]{background:linear-gradient(180deg,#1e463b,#18362d);color:#bcf4d3;border-color:#54b18088;box-shadow:inset 0 2px 6px #001b14,0 1px 0 #527568,0 0 16px #37c77a21}
@media(max-width:480px){.physical-choices{gap:8px}.physical-choices button{flex-basis:115px;padding:10px 12px;font-size:12px;min-height:45px}}
@media(prefers-reduced-motion:reduce){.physical-choices button{transition:none}}

/* Brushed metal and Miami neon are static materials, not animated filters. */
body.internal-premium:not(.dark) .topbar,body.internal-premium:not(.dark) .sidebar{background-image:url('/assets/miami-brushed-steel.png'),linear-gradient(120deg,#fafcfd,#edf1f3 55%,#fff);border-color:#c8d2d9}
body.internal-premium:not(.dark) .panel,body.internal-premium:not(.dark) dialog{background-image:url('/assets/miami-brushed-steel.png'),linear-gradient(135deg,#fff,#f2f5f7);box-shadow:inset 0 1px 0 #fff,0 12px 35px #1b354512}
body.internal-premium button:not(.table):not(.inv-product):not([data-table]):not([role=radio]){box-shadow:inset 0 1px 0 #ffffff42,0 2px 0 #21374722,0 4px 9px #15334512;transition:box-shadow .14s,translate .14s,background .14s}
body.internal-premium button:active{translate:0 2px}
body.dark .topbar,body.dark .sidebar,.game-menu-panel{background-image:url('/assets/miami-brushed-steel.png'),linear-gradient(125deg,#203c4e,#142b3b 65%,#243d4b)}
body.dark .panel,body.dark dialog{background-image:url('/assets/miami-brushed-steel.png'),linear-gradient(135deg,#22394a,#192d3d)}
.game-menu-panel header{background:url('/assets/miami-horizon.png') center 45%/contain no-repeat}
.game-quality{margin-top:16px;border:1px solid #9cbfc536;border-radius:13px;padding:13px;background:url('/assets/miami-perforated-metal.png'),#0d2536}
.game-quality label{display:flex;justify-content:space-between;gap:10px;color:#d2e4ec;font:600 11px system-ui}.game-quality output{color:#78e6b2;font-weight:650}.game-quality input{width:100%;margin:15px 0 7px;accent-color:#5fd4ad;cursor:pointer}.game-quality>div{display:flex;justify-content:space-between;color:#a9c7d3;font:9px system-ui}.game-quality>small{display:block;margin-top:11px;color:#91adbb;font:10px/1.5 system-ui}
.game-menu-panel nav button{box-shadow:inset 0 1px 0 #b6d7e13d,0 3px 0 #071925,0 5px 12px #00111d44}.game-menu-panel nav button[data-game-menu=logout]{border-color:#dc7aa63b}.game-menu-panel nav button:hover{box-shadow:inset 0 1px 0 #b6d7e150,0 2px 0 #071925,0 0 14px #62d8e41c;border-color:#6dced58c}
:host([game-mode]) .game-tray,:host([game-mode]) .map-console,:host([game-mode]) .head,:host([game-mode]) .build-panel,:host([game-mode]) .context-dialog,:host([game-mode]) .game-quick-menu{background-image:url('/assets/miami-brushed-steel.png'),linear-gradient(130deg,#244351f7,#142d3dfb 65%,#244150f7);box-shadow:inset 0 1px 0 #b6d9e339,0 18px 60px #00101c66}
:host([game-mode]) .edge-rail{background-image:url('/assets/miami-brushed-steel.png'),linear-gradient(100deg,#183a4c,#112d3f);border-color:#8cbac447;box-shadow:inset 0 1px #d2edf037,0 7px 20px #00182355}
:host([game-mode]) .edge-rail button:hover,:host([game-mode]) .edge-rail button:focus-visible{background:linear-gradient(130deg,#2d5863,#193e50);box-shadow:inset 0 1px #caf0ef42,0 0 13px #5dd6d126;color:#b2f6eb}
:host([game-mode]) .btn,:host([game-mode]) .inv-button{background-image:url('/assets/miami-brushed-steel.png'),linear-gradient(180deg,#345364,#203e50);box-shadow:inset 0 1px 0 #c9e2ee34,0 3px 0 #081d2b,0 5px 10px #00152133;border-color:#83a8b74a;transition:box-shadow .14s,translate .14s}
:host([game-mode]) .btn.primary,:host([game-mode]) .inv-button.primary{background-image:url('/assets/miami-brushed-steel.png'),linear-gradient(140deg,#f3cea0,#c69b66);color:#172e3c;border-color:#f6dcad82;box-shadow:inset 0 1px 0 #ffebc1,0 3px 0 #725c41,0 5px 13px #061c2a55}
:host([game-mode]) .inv-button.gold{background-color:#193748;background-image:url('/assets/miami-brushed-steel.png'),linear-gradient(180deg,#355b69,#193748);color:#fff3d5;border-color:#d4b380;text-shadow:0 1px 1px #071b26;box-shadow:inset 0 1px 0 #f6dcad55,0 3px 0 #081d2b,0 5px 10px #00152133}
:host([game-mode]) .btn:active,:host([game-mode]) .inv-button:active{translate:0 2px;box-shadow:inset 0 2px 4px #00152144,0 1px 0 #071b29}
:host([game-mode]) .edge-rail button[aria-expanded=true],:host([game-mode]) .btn[aria-pressed=true]{color:#b9f8d6;background:linear-gradient(180deg,#2c5549,#183d33);box-shadow:inset 0 2px 5px #001e1966,0 0 14px #48d99a20;border-color:#73e5b64d}
:host([game-mode]) .inv-tabs{background-image:url('/assets/miami-perforated-metal.png'),linear-gradient(100deg,#203b4c,#152e3e)}
:host([game-mode]) .inv-tab.active{border-bottom-color:#6de0c0;color:#b4f7df;text-shadow:0 0 12px #55d9b333}
@media(max-height:560px){.game-menu-panel .game-quality{grid-column:1/-1;margin:0}.game-quality{padding:9px}.game-quality input{margin-top:8px}.game-quality>small{display:none}}
@media(prefers-reduced-motion:reduce){body.internal-premium button,:host([game-mode]) .btn,:host([game-mode]) .inv-button{transition:none}}

.game-system-menu .game-menu-panel{padding:22px}.game-system-menu .game-menu-panel header{padding-bottom:12px;margin-bottom:13px}.game-system-menu .game-menu-panel h2{font-size:31px;margin:3px 0 6px}.game-system-menu .game-menu-panel nav button{min-height:56px;padding:10px 14px}.game-system-menu .game-menu-panel nav{gap:7px}.game-system-menu .game-menu-panel footer{padding-top:13px}.game-system-menu .game-quality{margin-top:13px;padding:11px}
.game-menu-panel .game-hologram{position:relative;width:130px;height:79px;margin:0 auto 5px;perspective:650px;isolation:isolate;overflow:visible}.game-menu-panel .game-hologram .holo-levitate{left:22px;top:0;width:86px;height:66px}.game-menu-panel .game-hologram .holo-core img{width:100%;height:100%;margin:0;filter:drop-shadow(0 0 5px #4bdcfa44)}.game-menu-panel .game-hologram .holo-base{left:25px;bottom:0;width:80px;height:16px}.game-menu-panel .game-hologram .holo-beam{left:20px;bottom:10px;width:90px;height:61px}.game-system-menu:not([open]) .game-hologram *{animation-play-state:paused}
@media(max-height:560px){.game-system-menu .game-menu-panel{padding:18px}.game-system-menu .game-menu-panel nav button{min-height:46px;padding:7px 11px}.game-system-menu .game-menu-panel header{margin:0;padding:8px 12px 0 0}.game-system-menu .game-quality{margin:0}}

.game-system-menu .game-quality input{height:18px;min-height:18px;padding:0;margin:12px 0 7px;box-shadow:none;background:transparent;border:0}.game-system-menu .game-hologram{height:64px}.game-system-menu .game-hologram .holo-levitate{left:29px;width:72px;height:53px}.game-system-menu .game-menu-panel header{padding-bottom:9px}.game-system-menu .game-quality>small{margin-top:8px}

@media(min-width:601px) and (min-height:561px){.game-system-menu .game-menu-panel nav button{min-height:52px;padding:8px 12px}.game-system-menu .game-menu-panel nav button b{font-size:13px;line-height:1.3}.game-system-menu .game-menu-panel nav button small{font-size:9.5px;line-height:1.35;margin-top:2px}}

/* Layered racing-console depth: static surfaces, short compositor-only entry. */
.game-system-menu{background:#0b21357d;box-shadow:0 35px 110px #020d1caa,0 0 0 5px #99c8d009,inset 0 1px 0 #d6fbff55}
.game-system-menu .game-menu-panel{position:relative;isolation:isolate;background-image:url('/assets/miami-brushed-steel.png'),linear-gradient(125deg,#29495db8,#10283ec9 65%,#244454b8)}
.game-system-menu .game-menu-panel:before{content:'';position:absolute;inset:7px;border:1px solid #99dee81a;border-top-color:#b3ecf54d;border-right-color:#e88fba2b;border-radius:20px;pointer-events:none}
.game-system-menu[open] .game-menu-panel{transform-origin:50% 65%;animation:miami-console-enter .26s cubic-bezier(.2,.7,.3,1) both}
.game-system-menu nav button{background:linear-gradient(135deg,#335c6e91,#102e438c);box-shadow:inset 0 1px 0 #bfeaf342,0 4px 0 #061a2980,0 9px 17px #00101d44}
.game-system-menu nav button:hover{transform:translate3d(2px,-1px,0);background:linear-gradient(135deg,#396c7ba9,#17465b9c);border-color:#85e8e58c;box-shadow:inset 0 1px #d1f8f855,0 5px 0 #071b2c88,0 8px 22px #57cdd427}
:host([game-mode]) .context-dialog,:host([game-mode]) .head,:host([game-mode]) .map-console,:host([game-mode]) .game-tray,:host([game-mode]) .build-panel{background-image:url('/assets/miami-brushed-steel.png'),linear-gradient(130deg,#315568d9,#142d3de8 65%,#28495bd9);border-top-color:#bae5e75c;border-right-color:#ee99c236;box-shadow:inset 0 1px #c3ebf32c,0 2px 0 #03182866,0 25px 70px #00101b66}
:host([game-mode]) .inv-hero{background:linear-gradient(110deg,#76d5d622,transparent 55%,#e37aa812);box-shadow:inset 0 1px #a1ebed26}
:host([game-mode]) .inv-meters{background:linear-gradient(100deg,#122e3c99,#213e4d88);box-shadow:inset 0 2px 6px #00121d22,inset 0 -1px #b1e4e41a}
@keyframes miami-console-enter{from{opacity:0;transform:perspective(900px) translate3d(0,8px,-18px) rotateX(5deg) rotateY(-2deg)}to{opacity:1;transform:perspective(900px) translate3d(0,0,0) rotateX(0) rotateY(0)}}
body.reduce-motion .game-system-menu .game-menu-panel{animation:none}
@media(prefers-reduced-motion:reduce){.game-system-menu .game-menu-panel{animation:none!important}}
@media(prefers-reduced-transparency:reduce){.game-system-menu,.game-system-menu .game-menu-panel{background-color:#142d3d}:host([game-mode]) .context-dialog{background-color:#142d3d}}

/* Satin metal under laminated glass. The texture stays behind readable surfaces. */
.game-system-menu .game-menu-panel{background-image:linear-gradient(125deg,#355669ec,#122b3ce8 62%,#254557ed),url('/assets/miami-brushed-steel.png')}
.game-system-menu::backdrop{background:#06131f80;backdrop-filter:blur(6px)}
.game-system-menu .game-menu-panel nav button{background:linear-gradient(125deg,#456474b8,#152f43c4);border-top-color:#cbe2ea66;border-bottom-color:#051e32;box-shadow:inset 0 1px #e0f4ff20,inset 0 -1px #0a192866,0 3px 0 #051a28aa,0 10px 18px #00152130}
.game-system-menu .game-menu-panel nav button[data-game-menu=resume]{background:linear-gradient(120deg,#91d7bb,#538e80);color:#082b2e;border-color:#b2f2d0;box-shadow:inset 0 1px #e8ffe8a6,0 3px 0 #28534d,0 8px 24px #58d3ac19}
.game-system-menu .game-menu-panel nav button[data-game-menu=resume] :is(i,small,em){color:#173f40}
.game-system-menu .game-menu-panel nav button:focus-visible{outline:2px solid #ffdda1;outline-offset:4px}
:host([game-mode]) :is(.context-dialog,.head,.map-console,.game-tray,.build-panel){background-image:linear-gradient(125deg,#345364e8,#132c3de8 65%,#244656ea),url('/assets/miami-brushed-steel.png')}
:host([game-mode]) .inv-hero{background:linear-gradient(115deg,#7bccd92b,transparent 56%,#df78ad0f);border-top:1px solid #c5e7ed3b}
:host([game-mode]) .inv-tabs{background-image:linear-gradient(120deg,#1b3544e8,#102838eb),url('/assets/miami-perforated-metal.png')}
:host([game-mode]) .inv-meters{box-shadow:inset 0 2px 7px #031c3299,inset 0 -1px #aaceda22}
@media(min-width:900px) and (min-height:650px){
 .game-system-menu:has(.game-menu-panel[data-page=main]){width:min(820px,calc(100vw - 100px));border-radius:28px}
 .game-system-menu .game-menu-panel[data-page=main]{display:grid;grid-template-columns:245px minmax(0,1fr);grid-template-areas:'brand actions' 'quality actions' 'footer footer';gap:20px 30px;padding:32px}
 .game-menu-panel[data-page=main] header{grid-area:brand;align-content:center;min-height:215px;padding:10px 0 15px!important;margin:0!important;border-bottom:0;background-size:140% auto;background-position:center}
 .game-system-menu .game-menu-panel[data-page=main] h2{font-size:46px;margin:9px 0}
 .game-menu-panel[data-page=main] nav{grid-area:actions;align-content:center;gap:12px!important;border-left:1px solid #b6d9e325;padding-left:26px}
 .game-system-menu .game-menu-panel[data-page=main] nav button{min-height:78px;padding:15px 18px;gap:15px;border-radius:13px}
 .game-system-menu .game-menu-panel[data-page=main] nav button b{font-size:15px;line-height:1.4}
 .game-system-menu .game-menu-panel[data-page=main] nav button small{font-size:11px;line-height:1.6;margin-top:4px}
 .game-menu-panel[data-page=main] .game-quality{grid-area:quality;margin:0;padding:15px;background-color:#0a2132}
 .game-menu-panel[data-page=main] footer{grid-area:footer;border-top:1px solid #b6d9e325;padding-top:17px!important}
 .game-system-menu .game-menu-panel[data-page=main] .game-hologram{width:190px;height:110px}
 .game-system-menu .game-menu-panel[data-page=main] .game-hologram .holo-levitate{width:126px;height:94px;left:32px}
 .game-system-menu .game-menu-panel[data-page=main] .game-hologram .holo-base{left:39px;width:112px}
 .game-system-menu .game-menu-panel[data-page=main] .game-hologram .holo-beam{left:30px;width:130px;height:92px}
}

/* Keep converted selects compact and isolated from legacy button themes. */
body.internal-premium .physical-choices{align-content:start;align-items:stretch;justify-content:flex-start;gap:8px}
body.internal-premium .physical-choices button{flex:1 1 110px;min-height:44px;white-space:normal;line-height:1.35}
body.internal-premium .physical-choices button[aria-checked=true]{background:linear-gradient(180deg,#d1ebdc,#b9d9c7);border-color:#68a783;color:#123e2b}
body.internal-premium.dark .physical-choices button[aria-checked=true]{background:linear-gradient(180deg,#1e463b,#18362d);color:#bcf4d3;border-color:#54b18088}
body.internal-premium:not(.dark) :is(.topbar,.sidebar){background-image:linear-gradient(120deg,#fafcfded,#edf1f3ed 55%,#ffffffed),url('/assets/miami-brushed-steel.png')}
body.internal-premium:not(.dark) :is(.panel,dialog){background-image:linear-gradient(135deg,#fffffff2,#f2f5f7f2),url('/assets/miami-brushed-steel.png')}
body.internal-premium .analysis-hero>.toolbar{justify-content:flex-start;gap:8px;flex-wrap:wrap}
body.internal-premium #master-analysis-filters{grid-template-columns:minmax(140px,1fr) minmax(140px,1fr) minmax(150px,.7fr);align-items:start}
body.internal-premium #master-analysis-filters>label:has([name=operation]){grid-column:1/-1;grid-row:2}
body.internal-premium #master-analysis-filters>button[data-action=analysis-apply]{grid-column:3;grid-row:1;align-self:end;min-height:48px}
body.internal-premium #master-analysis-filters>label .physical-choices button{flex:0 1 auto;min-width:100px}
body.internal-premium .order-open-form .physical-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:650px){body.internal-premium #master-analysis-filters{grid-template-columns:repeat(2,minmax(0,1fr))}body.internal-premium #master-analysis-filters>button[data-action=analysis-apply]{grid-column:1/-1;grid-row:3}body.internal-premium #master-analysis-filters>label .physical-choices button{flex:1 1 100px}}
@media(max-width:420px){body.internal-premium #master-analysis-filters{grid-template-columns:minmax(0,1fr)}body.internal-premium #master-analysis-filters>label:has([name=operation]){grid-row:3}body.internal-premium #master-analysis-filters>button[data-action=analysis-apply]{grid-row:4}}

/* Operational game windows own a complete dark palette, even when OS is light. */
body.internal-premium.tycoon-active #operation-dialog :is(.panel,.stat,.table-card,.order-card,.delivery-card){background:linear-gradient(145deg,#244353,#193444)!important;color:#edf5f7!important;border-color:#aacbdb44!important;background-image:linear-gradient(145deg,#244353,#193444)!important}
body.internal-premium.tycoon-active #operation-dialog :is(h1,h2,h3,h4,strong,b,label,summary){color:#f1f7fa}
body.internal-premium.tycoon-active #operation-dialog :is(p,small,.muted){color:#bed1dc}
body.internal-premium.tycoon-active #operation-dialog :is(input,select,textarea){color:#f1f7fa;background:#102d3e;border-color:#91b1c45e}
body.internal-premium.tycoon-active #operation-dialog :is(button.primary,button.active,button[aria-pressed=true]){color:#18313e}
body.internal-premium.tycoon-active #operation-dialog .badge.red{color:#ffc5d0;background:#723547}
body.internal-premium.tycoon-active #operation-dialog .badge.green{color:#c0f4d5;background:#275844}

.ui-page-hidden{display:none!important}.ui-page-controls{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:12px 0 0;padding:9px 12px;border:1px solid #91a9b73d;border-radius:13px;background:linear-gradient(145deg,#f8fafb,#e4ebee);color:#334959;font-size:12px}.ui-page-controls[hidden]{display:none}.stage-page{min-height:38px;padding:8px 14px;border:1px solid #8ba3af70;border-radius:10px;background:linear-gradient(#fafcfd,#dfe7eb);color:#203a4a;box-shadow:inset 0 1px #fff,0 2px 0 #98a7b1;cursor:pointer;font:inherit;font-weight:600}.stage-page:active{transform:translateY(1px);box-shadow:inset 0 2px 4px #30495b44}.stage-page:disabled{opacity:.45;cursor:default}.stage-page:focus-visible{outline:2px solid #008b73;outline-offset:3px}body.dark .ui-page-controls,body.tycoon-active .ui-page-controls{background:linear-gradient(145deg,#244353,#193444);color:#d3e5eb}body.dark .stage-page,body.tycoon-active .stage-page{background:linear-gradient(#365868,#1b394a);color:#f0f8fa;border-color:#9ec1cb50;box-shadow:inset 0 1px #cde8eb33,0 2px 0 #071d29}@media(max-width:600px){.ui-page-controls{gap:6px;padding:8px;font-size:10px}.stage-page{padding:8px;font-size:11px}}

/* The complete navigation key depresses; its icon has no independent motion. */
body.internal-premium .sidebar .nav button[data-action=nav]{transform:none;translate:none;transition:transform .14s,box-shadow .14s,border-color .14s;box-shadow:inset 0 1px #ffffff75,0 3px 0 #8a9ba650,0 5px 10px #1533450d}
body.internal-premium .sidebar .nav button[data-action=nav]:hover:not(:disabled){transform:translateY(2px);translate:none;box-shadow:inset 0 2px 4px #243c5220,0 1px 0 #8a9ba640;border-color:#8babbc}
body.internal-premium .sidebar .nav button[data-action=nav]:active:not(:disabled){transform:translateY(3px);translate:none;box-shadow:inset 0 3px 6px #16334730}
body.internal-premium .sidebar .nav button[data-action=nav] .glyph{transform:none!important;translate:none!important;animation:none!important;transition:none!important}
body.internal-premium.dark .sidebar .nav button[data-action=nav]{box-shadow:inset 0 1px #a7c4d733,0 3px 0 #061825aa,0 5px 10px #07192530}
body.internal-premium.dark .sidebar .nav button[data-action=nav]:hover:not(:disabled){box-shadow:inset 0 2px 5px #020e1c66,0 1px 0 #061825aa}
@media(prefers-reduced-motion:reduce){body.internal-premium .sidebar .nav button[data-action=nav]{transition:none}body.internal-premium .sidebar .nav button[data-action=nav]:is(:hover,:active){transform:none}}
body.reduce-motion .sidebar .nav button[data-action=nav]:is(:hover,:active){transform:none}
