/* V32.1 — fullscreen city canvas and compact floating controls. */
html[data-screen="planet"] #scene-root{inset:0;overflow:clip}
html[data-screen="planet"] #scene-root:after{background:linear-gradient(180deg,#03091468 0,transparent 17%,transparent 80%,#02070e88 100%)}
html[data-screen="planet"] .colony-world.city-v32{inset:0;width:100%;height:100%;min-height:0;overflow:clip;border:0;border-radius:0;background:#07101a}
html[data-screen="planet"] .colony-world.city-v32:before,html[data-screen="planet"] .colony-world.city-v32:after{display:none}
html[data-screen="planet"] .city-v32-viewport{inset:0;overflow:visible}
html[data-screen="planet"] .city-v32-camera{inset:0;width:100%;height:100%;transform-origin:50% 50%}
html[data-screen="planet"] .city-v32-canvas{width:100%;height:100%;max-width:none;display:block;overflow:visible}
/* Keep scenery behind the playable buildings without changing source artwork. */
html[data-screen="planet"] .city-v32-canvas>image{filter:brightness(.8) saturate(.86)}
html[data-screen="planet"] .city-slot-floor{fill:transparent;stroke:transparent}
html[data-screen="planet"] .city-slot.empty .city-slot-floor{fill:transparent;stroke:transparent}
html[data-screen="planet"] .city-slot:hover .city-slot-floor,html[data-screen="planet"] .city-slot:focus-visible .city-slot-floor,html[data-screen="planet"] .city-slot.selected .city-slot-floor{fill:#9cddf12b;stroke:#d3faff;stroke-width:1.7}
html[data-screen="planet"] .city-slot.building .city-slot-floor,html[data-screen="planet"] .city-slot.upgrading .city-slot-floor{stroke:#ffe1a2;fill:#ffcb6a1c;stroke-dasharray:4 3}
html[data-screen="planet"] .city-slot:not(.empty) .city-slot-floor{fill:transparent}
html[data-screen="planet"] .city-slot-symbol{opacity:.42;font-size:15px;stroke-width:1.3}
html[data-screen="planet"] .city-slot:hover .city-slot-symbol,html[data-screen="planet"] .city-slot:focus .city-slot-symbol{opacity:1}
html[data-screen="planet"] .city-debug .city-slot-floor{stroke:#fff;fill:#00e5ff55}
html[data-screen="planet"] .top{height:0;padding:0;margin:0;border:0;background:none;pointer-events:none}
html[data-screen="planet"] .brand,html[data-screen="planet"] .topright{display:none}
html[data-screen="planet"] #resources{top:12px;left:50%;right:auto;transform:translateX(-50%);width:min(1060px,calc(100% - 32px));height:60px;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));padding:0 8px;gap:0;border:1px solid #bedfec33;border-radius:14px;background:linear-gradient(135deg,#081621e6,#102333cc);backdrop-filter:blur(18px);box-shadow:0 8px 28px #0004;overflow:hidden}
html[data-screen="planet"] .resource{padding:8px 6px 6px 34px;min-width:0;background:none;box-shadow:none}
html[data-screen="planet"] .resource:last-child{border-right:0}
html[data-screen="planet"] .resource>span{font-size:9px;letter-spacing:.02em}
html[data-screen="planet"] .resource strong{font-size:14px;line-height:1.25}
html[data-screen="planet"] .resource em{font-size:9px;line-height:1.2;margin:2px 0 0}
html[data-screen="planet"] .res-icon{left:7px;top:18px;width:21px;height:23px}
html[data-screen="planet"] .res-icon svg{width:21px;height:23px}
html[data-screen="planet"] .planet-head.scene-heading{left:20px;top:91px;width:fit-content;max-width:370px;padding:11px 15px;border:1px solid #abcde12b;border-radius:12px;background:#06121bd1;backdrop-filter:blur(14px);text-shadow:none}
html[data-screen="planet"] .planet-head .world-breadcrumb{margin:0 0 6px;font-size:8px}
html[data-screen="planet"] .planet-head .screen-kicker{display:none}
html[data-screen="planet"] .planet-head .heading{margin:0 0 4px;display:block}
html[data-screen="planet"] .planet-head h1{font-size:16px;letter-spacing:0;line-height:1.25;margin:0 0 4px;font-weight:600}
html[data-screen="planet"] .planet-head .sub{font-size:10px;line-height:1.3;margin:0}
html[data-screen="planet"] .planet-head .toolbar{gap:8px;margin-top:7px}
html[data-screen="planet"] .planet-head .toolbar>span{display:none}
html[data-screen="planet"] .planet-head select{padding:3px 6px!important;font-size:10px;max-width:200px;min-height:25px;border:1px solid #7895a547!important;border-radius:5px!important}
html[data-screen="planet"] #nav{position:absolute;left:50%;right:auto;top:auto;bottom:16px;transform:translateX(-50%);width:460px;max-width:calc(100vw - 28px);height:64px;display:flex;flex-direction:row;align-items:center;gap:4px;padding:6px;margin:0;border:1px solid #b6d5e43a;border-radius:16px;background:#091824e6;backdrop-filter:blur(18px);box-shadow:0 12px 35px #0005;z-index:12;overflow:visible}
html[data-screen="planet"] #nav h4{display:none}
html[data-screen="planet"] #nav button{display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;min-width:0;width:auto;height:50px;gap:4px;margin:0;padding:5px;border:0;border-radius:10px;font-size:10px;background:transparent;color:#adc5d4;text-align:center}
html[data-screen="planet"] #nav button svg{width:21px;height:21px}
html[data-screen="planet"] #nav button.active{color:#effbff;background:#476d822b;box-shadow:inset 0 -2px var(--accent)}
html[data-screen="planet"] #nav button:hover{background:#5f8d9f30;color:#fff}
html[data-screen="planet"] .command-toggle{right:20px;top:92px;height:36px;border:1px solid #b6d5e43a;border-radius:10px;background:#091824dd;backdrop-filter:blur(16px);font-size:10px}
html[data-screen="planet"] .command-toggle span{display:inline}
html[data-screen="planet"] .scene-tools{right:20px;bottom:27px;gap:5px}
html[data-screen="planet"] .scene-tools .icon-button,html[data-screen="planet"] .scene-tools .tool-button,html[data-screen="planet"] .camera-controls{border-radius:9px;background:#091824de;backdrop-filter:blur(16px)}
html[data-screen="planet"] .camera-controls .icon-button{background:transparent;backdrop-filter:none}
html[data-screen="planet"] .scene-footer,html[data-screen="planet"] .city-v32-help{display:none}
html[data-screen="planet"] .hud-restore{left:24px;bottom:82px;font-size:9px;text-shadow:0 1px 5px #000;color:#cfdee5}
html[data-screen="planet"] .city-v32-status{left:20px;bottom:24px;right:auto;gap:0;padding:0;border:0;border-radius:0;background:none;z-index:3}
html[data-screen="planet"] .city-v32-status button{display:flex;align-items:center;gap:12px;min-height:46px;padding:10px 15px;background:#081823de;backdrop-filter:blur(16px);border:1px solid #b6d5e43a;border-radius:12px;box-shadow:0 8px 24px #0003;font-size:12px}
html[data-screen="planet"] .city-v32-status button span{display:inline;color:#e2f3fd}
html[data-screen="planet"] .city-v32-status button b{font-size:10px;font-weight:500;color:#9db9c9}
html[data-screen="planet"] .context-panel,html[data-screen="planet"] .aside{top:143px;bottom:96px;right:20px;left:auto;width:390px;max-height:none;border:1px solid #b6d5e446;border-top:2px solid var(--accent);border-radius:14px;background:#081823ef;backdrop-filter:blur(20px);box-shadow:0 18px 60px #0006;scrollbar-gutter:stable}
html[data-screen="planet"][data-city-panel-side="left"] .context-panel{left:20px;right:auto;top:232px}
html[data-screen="planet"] .context-cap{border-radius:12px 12px 0 0}
html[data-screen="planet"] .infra-disclosure{left:20px;bottom:92px;width:390px;border-radius:12px}
html[data-screen="planet"] #hud-toast{bottom:99px;border-radius:10px;background:#071723ed}
@media(max-width:1200px){
 html[data-screen="planet"] #resources{width:calc(100% - 24px)}
 html[data-screen="planet"] #nav{width:420px}
 html[data-screen="planet"] .scene-tools{bottom:96px}
 html[data-screen="planet"] .city-v32-status{bottom:96px}
 html[data-screen="planet"] .hud-restore{bottom:71px}
 html[data-screen="planet"] .planet-head.scene-heading{max-width:330px}
 html[data-screen="planet"] .context-panel,html[data-screen="planet"] .aside{width:350px;bottom:146px}
 html[data-screen="planet"] .infra-disclosure{bottom:146px}
}
@media(max-width:760px){
 html[data-screen="planet"] #resources{top:8px;left:10px;right:10px;width:auto;height:57px;transform:none;display:flex;overflow-x:auto;scrollbar-width:none;padding:0 5px;border-radius:12px;background:#091823e8}
 html[data-screen="planet"] .resource{min-width:97px;padding:7px 6px 6px 30px}
 html[data-screen="planet"] .resource strong{font-size:13px}
 html[data-screen="planet"] .res-icon{left:4px;top:16px;width:19px}
 html[data-screen="planet"] .res-icon svg{width:19px;height:22px}
 html[data-screen="planet"] .planet-head.scene-heading{top:77px;left:10px;max-width:calc(100% - 73px);padding:8px 10px;border-radius:10px}
 html[data-screen="planet"] .planet-head h1{font-size:13px}
 html[data-screen="planet"] .planet-head .sub{font-size:9px}
 html[data-screen="planet"] .planet-head .world-breadcrumb{display:none}
 html[data-screen="planet"] .planet-head .toolbar{margin-top:5px}
 html[data-screen="planet"] .planet-head .toolbar label{font-size:9px}
 html[data-screen="planet"] .planet-head select{max-width:180px;font-size:9px;min-height:23px}
 html[data-screen="planet"] .command-toggle{top:79px;right:10px;width:43px;height:36px;padding:5px;gap:3px;background:#091823e8}
 html[data-screen="planet"] .command-toggle span{display:none}
 html[data-screen="planet"] .command-toggle svg{width:14px}
 html[data-screen="planet"] #nav{bottom:10px;width:calc(100% - 20px);height:58px;gap:1px;padding:4px;border-radius:12px}
 html[data-screen="planet"] #nav button{height:48px;gap:3px;font-size:8px;padding:3px}
 html[data-screen="planet"] #nav button svg{width:19px;height:19px}
 html[data-screen="planet"] .scene-tools{bottom:78px;right:10px;gap:3px}
 html[data-screen="planet"] .scene-tools .tool-button{display:none}
 html[data-screen="planet"] .scene-tools .icon-button{height:29px;width:29px;padding:6px}
 html[data-screen="planet"] .camera-controls span{min-width:29px;font-size:9px}
 html[data-screen="planet"] .city-v32-status{bottom:116px;left:10px;right:auto}
 html[data-screen="planet"] .city-v32-status button{min-height:38px;font-size:11px;padding:8px 10px;gap:10px}
 html[data-screen="planet"] .city-v32-status button b{font-size:10px}
 html[data-screen="planet"] .hud-restore{left:13px;bottom:87px;font-size:8px}
 html[data-screen="planet"] .context-panel,html[data-screen="planet"][data-city-panel-side="left"] .context-panel,html[data-screen="planet"] .aside{left:8px;right:8px;top:auto;bottom:116px;width:auto;height:min(510px,60dvh);max-height:calc(100dvh - 200px);border-radius:14px;padding:0}
 html[data-screen="planet"] .context-panel .context-cap{padding:9px 14px}
 html[data-screen="planet"] .infra-disclosure{left:8px;right:8px;bottom:116px;width:auto;max-height:60dvh}
 html[data-screen="planet"][data-context="open"] .city-v32-status{visibility:hidden}
 html[data-screen="planet"] #hud-toast{bottom:119px;font-size:11px}
}
@media(prefers-reduced-motion:reduce){html[data-screen="planet"] .city-v32-camera{will-change:auto}}

/* V39.2: the artwork itself covers the viewport; no blurred edge extension. */
@media(min-width:761px){html[data-screen="planet"] .planet-head .toolbar{display:none}}
