/*
Gatewake: Frontiers Demo Alpha
Final consolidated demo stylesheet.
Generated by APPLY_GATEWAKE_FINAL_PRODUCT_CLEANUP.sh.
Do not add new patch-layer CSS files in public root. Edit this file or split into src modules later.
*/

/* ===== Source: public/frontierdemo-command-ui-v4.css ===== */

:root{
  --gw-bg:#02070f; --gw-panel:rgba(7,18,31,.86); --gw-panel2:rgba(12,28,45,.88);
  --gw-line:rgba(98,211,255,.36); --gw-line2:rgba(98,211,255,.58);
  --gw-blue:#62d3ff; --gw-orange:#f5a43e; --gw-green:#34f08a; --gw-red:#ff5c5c;
  --gw-yellow:#ffe36b; --gw-text:#edf8ff; --gw-muted:#8198aa;
  --gw-font-display:"Orbitron","Rajdhani","Arial Narrow",system-ui,sans-serif;
  --gw-font-mono:"JetBrains Mono","Share Tech Mono","Consolas",monospace;
  --gw-font-body:Inter,system-ui,Segoe UI,Arial,sans-serif;
}
*{box-sizing:border-box}
html,body{margin:0;width:100%;height:100%;overflow:hidden;background:var(--gw-bg);color:var(--gw-text);font-family:var(--gw-font-body)}
button,input{font:inherit}
#gw-v4{position:fixed;inset:0;overflow:hidden;background:radial-gradient(circle at 50% 50%,rgba(42,103,168,.16),transparent 38%),linear-gradient(180deg,#02070f,#06101d 60%,#02070f)}
#gw-v4:after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(transparent 0 48%,rgba(255,255,255,.018) 50%,transparent 52% 100%);background-size:100% 4px;opacity:.45}
#gw-v4.is-system-view .surface-only{display:none!important}
#gw-v4.is-surface-view .system-only{display:none!important}
.gw-top{position:absolute;left:0;right:0;top:0;height:50px;z-index:40;border-bottom:1px solid var(--gw-line);background:rgba(1,7,14,.92);display:flex;align-items:center;gap:12px;padding:0 12px}
.gw-brand{display:flex;gap:10px;align-items:center;min-width:285px;border-right:1px solid rgba(98,211,255,.18);padding-right:12px}
.gw-dot{width:8px;height:8px;border-radius:50%;background:var(--gw-blue);box-shadow:0 0 18px var(--gw-blue)}
.gw-logo{font-family:var(--gw-font-display);font-weight:900;letter-spacing:.10em;font-size:16px;white-space:nowrap}
.gw-status{display:flex;gap:6px;align-items:center}
.gw-tag{font-family:var(--gw-font-mono);font-size:10px;letter-spacing:.08em;padding:6px 9px;border:1px solid rgba(98,211,255,.32);background:rgba(98,211,255,.08);color:var(--gw-blue);border-radius:2px;text-transform:uppercase;white-space:nowrap}
.gw-tag.orange{border-color:rgba(245,164,62,.48);background:rgba(245,164,62,.10);color:var(--gw-orange)}
.gw-resource-bar{margin-left:auto;display:flex;gap:5px;overflow:auto;max-width:50vw;padding-bottom:1px}
.gw-resource{font-family:var(--gw-font-mono);font-size:10px;border:1px solid rgba(98,211,255,.26);background:rgba(6,18,31,.72);padding:5px 7px;border-radius:3px;white-space:nowrap}
.gw-resource span{color:var(--gw-muted);margin-right:5px}
.gw-layout{position:absolute;left:0;right:0;top:50px;bottom:0;display:grid;grid-template-columns:292px minmax(0,1fr) 330px;gap:8px;padding:8px;z-index:5}
.gw-dock{display:flex;flex-direction:column;gap:7px;min-height:0;pointer-events:auto}
.gw-dock-title{height:14px;font-family:var(--gw-font-mono);font-size:9px;color:var(--gw-muted);letter-spacing:.1em;text-transform:uppercase;display:flex;justify-content:space-between}
.gw-dock-body{display:flex;flex-direction:column;gap:7px;min-height:0;overflow:auto;padding-right:2px}
.gw-stage{position:relative;overflow:hidden;border:1px solid var(--gw-line);background:#020812;box-shadow:0 0 0 1px rgba(98,211,255,.06), inset 0 1px 0 rgba(255,255,255,.04), 0 18px 48px rgba(0,0,0,.38)}
.gw-viewport{position:absolute;inset:0;overflow:hidden;cursor:grab;background:#020812}
.gw-viewport.dragging{cursor:grabbing}
.gw-world{position:absolute;left:0;top:0;width:1px;height:1px;transform-origin:0 0;will-change:transform}
.gw-stars{position:absolute;inset:-5000px;background:
  radial-gradient(1px 1px at 12% 18%,rgba(255,255,255,.8),transparent),
  radial-gradient(1px 1px at 44% 36%,rgba(255,255,255,.55),transparent),
  radial-gradient(2px 2px at 72% 22%,rgba(98,211,255,.40),transparent),
  radial-gradient(1px 1px at 82% 73%,rgba(255,255,255,.55),transparent);
  background-size:390px 390px,620px 620px,900px 900px,720px 720px;pointer-events:none}
.gw-orbit{position:absolute;left:0;top:0;border:1px solid rgba(98,211,255,.16);border-radius:50%;transform:translate(-50%,-50%);pointer-events:none}
.gw-orbit.kuiper{border-style:dashed;border-color:rgba(98,211,255,.26);box-shadow:0 0 30px rgba(98,211,255,.05) inset}
.gw-orbit.oort{border-style:dotted;border-color:rgba(180,225,255,.28);box-shadow:0 0 80px rgba(180,225,255,.06) inset}
.gw-belt-ring{position:absolute;left:0;top:0;border:1px dashed rgba(245,164,62,.40);border-radius:50%;transform:translate(-50%,-50%);pointer-events:none}
.gw-system-label{position:absolute;transform:translate(-50%,-50%);font-family:var(--gw-font-mono);font-size:10px;color:var(--gw-muted);pointer-events:none;text-align:center;text-shadow:0 1px 3px #000}
.gw-body{position:absolute;transform:translate(-50%,-50%);cursor:pointer;z-index:5}
.gw-body img{display:block;width:100%;height:100%;filter:drop-shadow(0 0 10px rgba(98,211,255,.25))}
.gw-body-label{position:absolute;left:50%;top:100%;transform:translateX(-50%);margin-top:5px;font-family:var(--gw-font-mono);font-size:9px;color:var(--gw-muted);white-space:nowrap;text-align:center}
.gw-body-label strong{display:block;color:var(--gw-text);font-size:10px}
.gw-asset{position:absolute;transform:translate(-50%,-50%);cursor:pointer;z-index:8;transition:filter .1s ease}
.gw-asset img{display:block;width:100%;height:100%;filter:drop-shadow(0 0 8px rgba(98,211,255,.40))}
.gw-asset.enemy img{filter:drop-shadow(0 0 8px rgba(255,92,92,.55))}
.gw-asset.selected img,.gw-body.selected img{filter:drop-shadow(0 0 12px var(--gw-blue)) drop-shadow(0 0 22px rgba(98,211,255,.52))}
.gw-asset.selected:after,.gw-body.selected:after{content:"";position:absolute;left:50%;top:50%;width:125%;height:65%;transform:translate(-50%,-50%);border:1px solid var(--gw-blue);border-radius:50%;box-shadow:0 0 14px rgba(98,211,255,.36);pointer-events:none}
.gw-hp{position:absolute;left:50%;top:-7px;transform:translateX(-50%);width:34px;height:3px;background:rgba(255,255,255,.14);border:1px solid rgba(0,0,0,.55)}
.gw-hp div{height:100%;background:var(--gw-green)}
.gw-order-line{position:absolute;height:1px;background:rgba(98,211,255,.45);transform-origin:left center;z-index:4;pointer-events:none}
.gw-range-ring{position:absolute;border:1px dashed rgba(255,92,92,.28);border-radius:50%;transform:translate(-50%,-50%);pointer-events:none;z-index:3}
.gw-destination{position:absolute;width:28px;height:28px;border:1px dashed var(--gw-blue);border-radius:50%;transform:translate(-50%,-50%);animation:gwPulse 1s linear infinite;z-index:4;pointer-events:none}
@keyframes gwPulse{from{opacity:1;scale:.7}to{opacity:0;scale:1.55}}
.gw-bolt{position:absolute;width:2px;height:22px;background:var(--gw-red);box-shadow:0 0 8px var(--gw-red);transform-origin:center bottom;z-index:12;pointer-events:none}
.gw-view-badge{position:absolute;left:12px;top:12px;z-index:10;border:1px solid var(--gw-line);background:rgba(2,10,18,.82);font-family:var(--gw-font-mono);font-size:11px;color:var(--gw-text);padding:8px 11px;border-radius:3px}
.gw-camera-help{display:none;position:absolute;right:12px;top:12px;z-index:10;border:1px solid rgba(98,211,255,.25);background:rgba(2,10,18,.72);font-family:var(--gw-font-mono);font-size:10px;color:var(--gw-muted);padding:8px 10px;border-radius:3px}
.gw-selection-box{position:absolute;z-index:18;pointer-events:none;border:1px solid rgba(98,211,255,.72);background:rgba(98,211,255,.10);box-shadow:0 0 18px rgba(98,211,255,.20),inset 0 0 18px rgba(98,211,255,.10)}
.gw-selected-strip{position:absolute;left:12px;right:12px;bottom:92px;height:64px;z-index:12;border:1px solid rgba(98,211,255,.26);background:rgba(2,10,18,.82);display:flex;align-items:center;gap:8px;padding:7px 9px;overflow:auto}
.gw-selected-card{min-width:86px;height:48px;border:1px solid rgba(98,211,255,.22);background:rgba(12,28,45,.7);display:flex;gap:7px;align-items:center;padding:5px;font-family:var(--gw-font-mono);font-size:9px;cursor:pointer}
.gw-selected-card img{width:30px;height:30px;object-fit:contain}
.gw-actionbar{position:absolute;left:12px;right:12px;bottom:8px;height:78px;z-index:12;border:1px solid rgba(98,211,255,.30);background:rgba(5,14,25,.92);display:grid;grid-template-columns:1fr auto;gap:12px;padding:8px 12px}
.gw-action-title{font-family:var(--gw-font-mono);font-size:10px;color:var(--gw-muted);text-transform:uppercase;margin-bottom:7px}
.gw-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.gw-action{border:1px solid rgba(98,211,255,.24);background:rgba(12,28,45,.62);color:var(--gw-text);font-family:var(--gw-font-mono);font-size:10px;padding:8px 10px;min-width:72px;cursor:pointer;border-radius:3px}
.gw-action:hover{border-color:var(--gw-blue);color:var(--gw-blue)}
.gw-action.disabled{opacity:.35;pointer-events:none}
.gw-zoom-readout{display:flex;align-items:center;justify-content:center;font-family:var(--gw-font-mono);font-size:10px;color:var(--gw-muted);border-left:1px solid rgba(98,211,255,.18);padding-left:12px;min-width:115px}
.gw-panel{border:1px solid var(--gw-line);background:linear-gradient(180deg,var(--gw-panel2),var(--gw-panel));box-shadow:0 0 0 1px rgba(98,211,255,.06),0 18px 38px rgba(0,0,0,.32);border-radius:4px;overflow:hidden;min-height:72px;position:relative;pointer-events:auto}
.gw-panel-head{height:30px;display:flex;align-items:center;justify-content:space-between;gap:6px;padding:0 8px;border-bottom:1px solid rgba(98,211,255,.20);background:rgba(17,34,53,.55);cursor:grab}
.gw-panel-title{display:flex;align-items:center;gap:7px;font-family:var(--gw-font-mono);font-size:10px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:var(--gw-text);min-width:0}
.gw-panel-title:before{content:"";width:6px;height:6px;border-radius:50%;background:var(--gw-blue);box-shadow:0 0 12px var(--gw-blue)}
.gw-panel-code{font-size:9px;color:var(--gw-muted);font-weight:500}
.gw-panel-controls{display:flex;gap:1px;align-items:center;white-space:nowrap}
.gw-panel-controls button{width:17px;height:17px;border:0;background:transparent;color:var(--gw-muted);font-family:var(--gw-font-mono);font-size:9px;cursor:pointer}
.gw-panel-controls button:hover{color:var(--gw-blue)}
.gw-panel-body{padding:9px 10px;font-size:12px;color:var(--gw-muted);line-height:1.42}
.gw-panel-body strong{color:var(--gw-text)}
.gw-panel.collapsed .gw-panel-body{display:none}
.gw-floating{position:absolute!important;z-index:30;resize:both;overflow:auto;min-width:220px;min-height:94px;max-width:90vw;max-height:84vh}
.gw-list{display:flex;flex-direction:column;gap:7px}
.gw-row{display:grid;grid-template-columns:1fr auto;gap:8px;margin:4px 0;font-family:var(--gw-font-mono);font-size:11px}
.gw-row span:first-child{color:var(--gw-muted);text-transform:uppercase;font-size:10px}
.gw-card{border:1px solid rgba(98,211,255,.22);background:rgba(8,20,34,.55);padding:8px;margin:5px 0;font-size:11px}
.gw-card small{color:var(--gw-muted)}
.gw-progress{height:4px;background:rgba(127,150,170,.16);overflow:hidden;border-radius:2px;margin-top:5px}
.gw-progress div{height:100%;background:var(--gw-blue);box-shadow:0 0 8px var(--gw-blue)}
.gw-tool-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.gw-tool{border:1px solid rgba(98,211,255,.24);background:rgba(8,20,34,.62);color:var(--gw-text);padding:7px;font-family:var(--gw-font-mono);font-size:10px;cursor:pointer}
.gw-tool:hover{border-color:var(--gw-blue);color:var(--gw-blue)}
.gw-tool.active{border-color:rgba(52,240,138,.72);color:var(--gw-green);box-shadow:0 0 12px rgba(52,240,138,.14)}
.gw-tool.locked{opacity:.5;cursor:not-allowed;filter:grayscale(.6)}
.gw-tool.locked:hover{border-color:rgba(98,211,255,.24);color:var(--gw-text)}
.gw-tool-icon{display:block;width:100%;height:44px;object-fit:cover;border-radius:2px;margin-bottom:4px}
.gw-minimap.gw-floating{right:14px;bottom:164px;width:278px;height:350px}
.gw-mini-map{position:relative;width:100%;aspect-ratio:1/1;border:1px solid rgba(98,211,255,.22);background:#020812;overflow:hidden}
.gw-mini-orbit{position:absolute;border:1px solid rgba(98,211,255,.14);border-radius:50%;transform:translate(-50%,-50%)}
.gw-mini-body{position:absolute;border-radius:50%;transform:translate(-50%,-50%);background:var(--gw-blue)}
.gw-mini-friendly{position:absolute;width:5px;height:5px;border-radius:50%;background:var(--gw-green);box-shadow:0 0 8px var(--gw-green);transform:translate(-50%,-50%)}
.gw-mini-enemy{position:absolute;width:5px;height:5px;border-radius:50%;background:var(--gw-red);box-shadow:0 0 8px var(--gw-red);transform:translate(-50%,-50%)}
.gw-mini-camera{position:absolute;border:1px solid rgba(98,211,255,.8);box-shadow:0 0 10px rgba(98,211,255,.25);pointer-events:none}
.gw-minimap-tabs{display:flex;gap:4px;margin-bottom:6px}
.gw-minimap-tab{flex:1;font-family:var(--gw-font-mono);font-size:9px;letter-spacing:.08em;text-transform:uppercase;padding:5px 6px;border:1px solid rgba(98,211,255,.26);background:rgba(6,18,31,.6);color:var(--gw-muted);border-radius:2px;cursor:pointer}
.gw-minimap-tab.active{border-color:var(--gw-blue);color:var(--gw-blue);background:rgba(98,211,255,.12)}
.gw-minimap-tab.locked{opacity:.55;cursor:not-allowed}
.gw-mini-sol{background:var(--gw-yellow);box-shadow:0 0 12px var(--gw-yellow)}
.gw-mini-star{position:absolute;transform:translate(-50%,-50%);width:9px;height:9px;border-radius:50%;border:1px solid rgba(98,211,255,.5);background:rgba(6,18,31,.85);cursor:pointer;padding:0}
.gw-mini-star span{position:absolute;top:12px;left:50%;transform:translateX(-50%);font-family:var(--gw-font-mono);font-size:8px;color:var(--gw-muted);white-space:nowrap;letter-spacing:.04em}
.gw-mini-star.unsurveyed{background:rgba(40,50,60,.7);border-color:rgba(129,152,170,.4)}
.gw-mini-star.surveyed{background:var(--gw-blue);box-shadow:0 0 10px var(--gw-blue);border-color:var(--gw-blue)}
.gw-mini-star.surveyed span{color:var(--gw-blue)}
.gw-planet-nav{display:grid;grid-template-columns:repeat(5,1fr);gap:4px;margin-bottom:7px}
.gw-planet-btn{border:1px solid rgba(98,211,255,.25);background:rgba(8,20,34,.72);color:var(--gw-text);font-family:var(--gw-font-mono);font-size:9px;padding:5px 3px;cursor:pointer}
.gw-planet-btn:hover{border-color:var(--gw-blue);color:var(--gw-blue)}
.gw-chat{display:flex;gap:5px;margin-top:8px}
.gw-chat input{flex:1;border:1px solid rgba(98,211,255,.22);background:rgba(0,0,0,.25);color:var(--gw-text);padding:7px;font-size:12px}
.gw-chat button{border:1px solid rgba(98,211,255,.32);background:rgba(98,211,255,.08);color:var(--gw-blue);padding:7px 9px;cursor:pointer}
.gw-chat-log{max-height:180px;overflow:auto;display:flex;flex-direction:column;gap:7px}
.gw-msg{border:1px solid rgba(98,211,255,.16);background:rgba(8,20,34,.45);padding:7px;font-size:11px}
.gw-msg.user{border-color:rgba(245,164,62,.22);color:var(--gw-orange)}
.gw-toast{position:fixed;left:50%;bottom:120px;transform:translateX(-50%);z-index:20000;border:1px solid rgba(98,211,255,.34);background:rgba(3,10,18,.95);color:var(--gw-text);font-family:var(--gw-font-mono);font-size:11px;padding:8px 12px;border-radius:3px;box-shadow:0 12px 40px rgba(0,0,0,.4);opacity:0;transition:opacity .2s ease}
/* Critical alerts (tone="red", e.g. pirate activity) get a visibly
   distinct toast instead of looking identical to a routine event. */
.gw-toast[data-tone="red"]{border-color:rgba(255,92,92,.6);background:rgba(30,6,6,.96);box-shadow:0 12px 40px rgba(255,92,92,.25)}
.gw-toast[data-tone="green"]{border-color:rgba(52,240,138,.5)}
.gw-toast.active{opacity:1}

/* Strategic match command: dense RTS information is progressively disclosed,
   while survival stakes and active raids remain visible at a glance. */
[data-panel="strategic"] .gw-panel-body{max-height:520px;overflow:auto}
.gw-strategic-offline{font-family:var(--gw-font-mono);font-size:10px;color:var(--gw-muted)}
.gw-strategic-status{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px;border:1px solid rgba(98,211,255,.3);background:linear-gradient(135deg,rgba(98,211,255,.12),rgba(8,20,34,.62));margin-bottom:7px}
.gw-strategic-status>div{display:flex;flex-direction:column;gap:2px;min-width:0}
.gw-strategic-status strong{font-family:var(--gw-font-display);font-size:11px;letter-spacing:.06em}
.gw-strategic-status.danger,.gw-strategic-status.defeat{border-color:rgba(255,92,92,.62);background:linear-gradient(135deg,rgba(255,92,92,.18),rgba(25,8,14,.72))}
.gw-strategic-status.victory{border-color:rgba(52,240,138,.62);background:linear-gradient(135deg,rgba(52,240,138,.16),rgba(8,25,20,.72))}
.gw-strategic-kicker{font-family:var(--gw-font-mono);font-size:8px;letter-spacing:.12em;text-transform:uppercase;color:var(--gw-blue)}
.gw-threat-chip{flex:0 0 auto;border:1px solid rgba(245,164,62,.55);background:rgba(245,164,62,.12);color:var(--gw-orange);font:800 9px/1 var(--gw-font-mono);letter-spacing:.07em;padding:6px}
.gw-strategic-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:5px;margin-bottom:7px}
.gw-strategic-metrics>span{display:flex;flex-direction:column;gap:2px;padding:6px;border:1px solid rgba(98,211,255,.18);background:rgba(8,20,34,.5)}
.gw-strategic-metrics small{font:8px/1 var(--gw-font-mono);letter-spacing:.08em;text-transform:uppercase;color:var(--gw-muted)}
.gw-strategic-metrics strong{font:800 10px/1.2 var(--gw-font-mono)}
.gw-strategic-next{width:100%;display:flex;flex-direction:column;gap:2px;text-align:left;padding:8px;margin-bottom:7px;border:1px solid rgba(245,164,62,.46);background:rgba(245,164,62,.09);color:var(--gw-text);cursor:pointer}
.gw-strategic-next span{font:8px/1 var(--gw-font-mono);letter-spacing:.12em;color:var(--gw-orange)}
.gw-strategic-next strong{font-size:10px}
.gw-strategic-objectives{display:flex;flex-direction:column;gap:4px;margin:6px 0}
.gw-strategic-objective{display:grid;grid-template-columns:14px 1fr auto;gap:5px;align-items:center;font:9px/1.25 var(--gw-font-mono);color:var(--gw-muted)}
.gw-strategic-objective.done{color:var(--gw-green)}
.gw-strategic-objective strong{font-size:9px}
.gw-strategic-raid{display:grid;grid-template-columns:1fr auto auto;gap:6px;align-items:center;border:1px solid rgba(255,92,92,.42);background:rgba(255,92,92,.08);padding:6px;margin:6px 0}
.gw-strategic-raid>div{display:flex;flex-direction:column;min-width:0}.gw-strategic-raid small{font-size:8px;color:#d59b9b}.gw-strategic-raid>span{font:800 9px/1 var(--gw-font-mono);color:var(--gw-red)}
.gw-strategic-alert{padding:5px 7px;margin:4px 0;border-left:2px solid var(--gw-orange);background:rgba(245,164,62,.08);font-size:9px}.gw-strategic-alert.critical{border-color:var(--gw-red);background:rgba(255,92,92,.1)}
.gw-strategic-section{border-top:1px solid rgba(98,211,255,.15);margin-top:7px;padding-top:2px}
.gw-strategic-section summary{display:flex;justify-content:space-between;gap:6px;padding:6px 0;cursor:pointer;font:800 9px/1.2 var(--gw-font-mono);letter-spacing:.06em;text-transform:uppercase;color:var(--gw-text)}
.gw-strategic-section summary span{font-weight:500;color:var(--gw-muted);letter-spacing:0;text-transform:none;text-align:right}
.gw-strategic-label{margin:6px 0 3px;font:8px/1 var(--gw-font-mono);letter-spacing:.1em;text-transform:uppercase;color:var(--gw-muted)}
.gw-strategic-button-row{display:flex;flex-wrap:wrap;gap:4px}.gw-strategic-button-row .gw-tool{flex:1 1 auto;padding:5px;font-size:8px;text-transform:capitalize}.gw-strategic-wide{width:100%}
.gw-strategic-section .gw-card{margin:4px 0;padding:6px}.gw-strategic-section .gw-card .gw-tool{margin-top:5px;width:100%}
.gw-strategic-ping{margin-top:4px;padding:4px 6px;border-left:2px solid var(--gw-blue);background:rgba(98,211,255,.07);font:9px/1.3 var(--gw-font-mono)}
.gw-strategic-toggle{display:flex;align-items:center;gap:6px;margin-top:6px;font:9px/1.3 var(--gw-font-mono);color:var(--gw-muted)}
.gw-strategic-toggle input{accent-color:var(--gw-green)}
.gw-match-outcome{position:fixed;inset:0;z-index:22000;display:flex;align-items:center;justify-content:center;padding:20px;background:radial-gradient(circle,rgba(7,25,40,.5),rgba(0,0,0,.86))}
.gw-match-outcome-card{width:min(480px,100%);padding:24px;border:1px solid var(--gw-line2);background:linear-gradient(180deg,rgba(18,35,55,.98),rgba(4,12,22,.99));box-shadow:0 24px 90px rgba(0,0,0,.75);text-align:center}
.gw-match-outcome.victory .gw-match-outcome-card{border-color:rgba(52,240,138,.7);box-shadow:0 24px 90px rgba(52,240,138,.12)}
.gw-match-outcome.defeat .gw-match-outcome-card{border-color:rgba(255,92,92,.7);box-shadow:0 24px 90px rgba(255,92,92,.12)}
.gw-match-outcome h2{margin:8px 0;font-family:var(--gw-font-display);letter-spacing:.1em;color:var(--gw-text)}
.gw-match-outcome p{margin:0 0 15px;color:var(--gw-muted)}
.gw-match-outcome .gw-strategic-objectives{text-align:left;margin:14px 0}
.gw-surface{position:absolute;inset:0;background:#04101a;overflow:hidden;display:none}
.gw-surface.active{display:block}
.gw-surface-world{position:absolute;left:0;top:0;width:2400px;height:1600px;transform-origin:0 0;overflow:visible}
.gw-surface-ocean{position:absolute;left:-2000px;top:-1400px;width:4000px;height:2800px;background:radial-gradient(ellipse at 26% 22%,rgba(255,214,150,.13),transparent 44%),radial-gradient(ellipse at 72% 82%,rgba(6,16,30,.55),transparent 62%),linear-gradient(160deg,#175578,#0f3c5a 45%,#0a2942);border:1px solid rgba(130,190,215,.07)}
.gw-continent{position:absolute;background:linear-gradient(135deg,#7d9254,#8e8449 44%,#a8925c 72%,#bfa974);border:1px solid rgba(255,240,208,.14);box-shadow:0 14px 30px rgba(4,12,20,.45),inset 0 2px 0 rgba(255,240,205,.16),inset -16px -14px 44px rgba(22,34,28,.30);clip-path:polygon(10% 30%,25% 12%,52% 8%,78% 20%,92% 45%,83% 74%,58% 90%,30% 84%,12% 64%)}
.gw-surface-tile{position:absolute;width:92px;height:54px;transform:translate(-50%,-50%) skewY(-12deg) rotate(26deg);border:1px solid rgba(14,22,30,.40);background:rgba(9,31,43,.55);cursor:pointer;box-shadow:inset 0 1px 0 rgba(255,236,200,.22),inset 1px 0 0 rgba(255,236,200,.10),inset -1px -1px 0 rgba(6,12,18,.38),0 5px 10px rgba(4,10,16,.26);transition:transform .14s ease,box-shadow .14s ease,border-color .14s ease}
.gw-surface-tile:hover{border-color:rgba(255,196,110,.85);transform:translate(-50%,-53%) skewY(-12deg) rotate(26deg);box-shadow:0 0 18px rgba(255,183,92,.20),0 11px 20px rgba(4,10,16,.38),inset 0 1px 0 rgba(255,240,210,.30)}
.gw-surface-tile.buildable{outline:1px solid rgba(148,214,120,.26)}
.gw-surface-tile.blocked{outline:1px solid rgba(224,110,92,.26)}
.gw-surface-tile.preview-ok{border-color:rgba(158,224,128,.92);box-shadow:0 0 20px rgba(158,224,128,.24),0 8px 16px rgba(4,10,16,.30),inset 0 0 22px rgba(158,224,128,.12)}
.gw-surface-tile.preview-bad{border-color:rgba(232,116,96,.92);box-shadow:0 0 20px rgba(232,116,96,.22),0 8px 16px rgba(4,10,16,.30),inset 0 0 22px rgba(232,116,96,.10)}
.gw-surface-tile.preview-valid{outline:2px solid rgba(158,224,128,.55);outline-offset:-2px;box-shadow:inset 0 0 16px rgba(158,224,128,.16)}
.gw-surface-tile.terrain-ocean{background:linear-gradient(135deg,#1d5d80,#123c58 60%,#0e3049)}
.gw-surface-tile.terrain-coastline,.gw-surface-tile.terrain-coast{background:linear-gradient(135deg,#4c8d84 0 34%,#c8b273 46% 62%,#57814f 74%)}
.gw-surface-tile.terrain-grassland,.gw-surface-tile.terrain-plain{background:linear-gradient(135deg,#7fa055,#5d8143 55%,#4a6b38)}
.gw-surface-tile.terrain-forest{background:linear-gradient(135deg,#4a7745,#35593a 60%,#2a4531),radial-gradient(circle at 32% 36%,rgba(20,40,24,.5) 0 6px,transparent 7px)}
.gw-surface-tile.terrain-farms,.gw-surface-tile.terrain-lowland{background:repeating-linear-gradient(115deg,#cbaf5e 0 11px,#9b8340 11px 20px,#b89c50 20px 21px)}
.gw-surface-tile.terrain-city,.gw-surface-tile.terrain-industrial,.gw-surface-tile.terrain-industrial_pad,.gw-surface-tile.terrain-platform_deck{background:linear-gradient(135deg,#8b8f92,#5b6167 55%,#454c54)}
.gw-surface-tile.terrain-roads{background:linear-gradient(135deg,#7c7f7e,#565b5c 60%,#464c4e)}
.gw-surface-tile.terrain-ports,.gw-surface-tile.terrain-landing_zone{background:linear-gradient(135deg,#5a7f95,#9aa3a8 55%,#6d787f)}
.gw-surface-tile.terrain-luna_crater_field,.gw-surface-tile.terrain-crater{background:radial-gradient(circle at 42% 40%,#4a5058 0 20%,#8a9096 21% 48%,#61686f 49% 100%)}
.gw-surface-tile.terrain-regolith{background:linear-gradient(135deg,#9aa0a5,#6a7178 60%,#585f66)}
.gw-surface-tile.terrain-mars_regolith,.gw-surface-tile.terrain-rocky_desert{background:linear-gradient(135deg,#b87048,#8c4d30 55%,#6e3a22)}
.gw-surface-tile.terrain-canyon{background:linear-gradient(135deg,#8f4a2c,#5e2c18 60%,#411d0f)}
.gw-surface-tile.terrain-rocky_plains{background:linear-gradient(135deg,#a2603c,#75422a 55%,#5c3320)}
.gw-surface-tile.terrain-cloud_layer{background:linear-gradient(135deg,rgba(255,244,224,.20),rgba(168,196,214,.12),rgba(255,206,140,.14))}
.gw-surface-tile.terrain-storm_zone{background:linear-gradient(135deg,rgba(255,244,224,.18),rgba(122,94,138,.32),rgba(30,48,78,.64))}
.gw-surface-tile.terrain-ice{background:linear-gradient(135deg,#d3e6ee,#9db8c6 60%,#7f97a6)}
.gw-city{position:absolute;width:64px;height:44px;transform:translate(-50%,-50%);background:linear-gradient(180deg,#e8d9b4,#8d8468 55%,#5c6470);clip-path:polygon(0 80%,14% 50%,22% 80%,35% 25%,48% 80%,58% 45%,70% 80%,84% 35%,100% 80%,100% 100%,0 100%);filter:drop-shadow(0 6px 6px rgba(6,12,18,.45)) drop-shadow(0 0 8px rgba(255,210,140,.18));cursor:pointer}
.gw-dome{position:absolute;width:62px;height:36px;transform:translate(-50%,-50%);border:2px solid rgba(235,222,190,.50);border-radius:50% 50% 12px 12px;background:linear-gradient(160deg,rgba(255,240,210,.22),rgba(120,160,180,.14));box-shadow:0 6px 12px rgba(6,12,18,.35),inset -6px -4px 14px rgba(20,34,44,.30),inset 4px 4px 10px rgba(255,244,216,.22);cursor:pointer}
.gw-surface-building{position:absolute;width:70px;height:46px;transform:translate(-50%,-50%);border:1px solid rgba(24,32,40,.55);background:linear-gradient(168deg,#98a0a6,#6a7278 48%,#4b545c);box-shadow:0 3px 0 rgba(20,26,32,.55),0 10px 16px rgba(4,10,16,.42),inset 0 1px 0 rgba(255,240,212,.34),inset 1px 0 0 rgba(255,240,212,.12);cursor:pointer;z-index:5;transition:transform .14s ease,box-shadow .14s ease}
.gw-surface-building:hover{transform:translate(-50%,-54%);box-shadow:0 5px 0 rgba(20,26,32,.5),0 16px 24px rgba(4,10,16,.5),0 0 18px rgba(255,196,110,.22),inset 0 1px 0 rgba(255,244,220,.4)}
.gw-surface-building:before{content:"";position:absolute;left:8px;right:8px;top:-15px;height:22px;background:linear-gradient(168deg,#d9cba6 0 42%,#9a927c 42% 100%);clip-path:polygon(0 100%,50% 0,100% 100%);opacity:.96;filter:drop-shadow(0 2px 2px rgba(6,12,18,.3))}
.gw-surface-building:after{content:"";position:absolute;left:6px;right:6px;bottom:3px;height:3px;background:var(--gw-bldg-accent,rgba(255,196,110,.75));box-shadow:0 0 8px var(--gw-bldg-accent,rgba(255,196,110,.55));border-radius:1px}
.gw-surface-building.prebuilt{border-color:rgba(200,160,96,.5)}
.gw-surface-build-ghost{opacity:.62;cursor:default;z-index:6;filter:saturate(1.15) brightness(1.08);animation:gw-ghost-pulse 1.6s ease-in-out infinite}
.gw-surface-build-ghost.valid{outline:2px solid rgba(158,224,128,.92);box-shadow:0 0 22px rgba(158,224,128,.45),0 3px 0 rgba(20,26,32,.55)}
.gw-surface-build-ghost.invalid{outline:2px solid rgba(232,116,96,.95);box-shadow:0 0 22px rgba(232,116,96,.5),0 3px 0 rgba(20,26,32,.55);filter:saturate(.5) brightness(.9) sepia(.35) hue-rotate(-30deg)}
@keyframes gw-ghost-pulse{0%,100%{opacity:.5}50%{opacity:.74}}
.gw-surface-building.building-city_block,.gw-surface-building.building-habitat_district{background:linear-gradient(168deg,#a3b2bd,#71828f 48%,#4f606d);--gw-bldg-accent:rgba(146,222,255,.8)}
.gw-surface-building.building-coastal_port,.gw-surface-building.building-spaceport,.gw-surface-building.building-landing_pad{background:linear-gradient(168deg,#aab0b5,#767f86 48%,#525c64);--gw-bldg-accent:rgba(255,226,150,.85)}
.gw-surface-building.building-mining_district{background:linear-gradient(168deg,#96887a,#6a5f52 48%,#463f36);--gw-bldg-accent:rgba(240,170,96,.85)}
.gw-surface-building.building-reactor_district{background:linear-gradient(168deg,#7fa89e,#54786f 48%,#39534e);--gw-bldg-accent:rgba(140,255,196,.8)}
.gw-surface-building.building-research_district,.gw-surface-building.building-sensor_array_surface{background:linear-gradient(168deg,#8b9cb8,#5f7089 48%,#414f66);--gw-bldg-accent:rgba(170,190,255,.85)}
.gw-surface-building.building-surface_outpost,.gw-surface-building.building-command_center{background:linear-gradient(168deg,#a4adb2,#727d84 48%,#4e5a62);--gw-bldg-accent:rgba(255,196,110,.9)}
.gw-surface-building.building-trade_hub_surface,.gw-surface-building.building-fuel_depot,.gw-surface-building.building-propellant_depot{background:linear-gradient(168deg,#b39c6b,#7e6c46 48%,#54482e);--gw-bldg-accent:rgba(255,214,130,.85)}
.gw-surface-building.building-gas_giant_platform_marker{border-radius:16px;background:linear-gradient(168deg,#a5b1ba,#66788a 48%,#485a6c)}
.gw-surface-road-tile{position:absolute;width:68px;height:10px;transform:translate(-50%,-50%) rotate(26deg);background:linear-gradient(180deg,#a9a294 0 30%,#8b8577 30% 100%);box-shadow:0 2px 4px rgba(6,12,18,.35),inset 0 1px 0 rgba(255,240,210,.25);z-index:4}
.gw-surface-summary{margin-top:6px;color:var(--gw-muted);font-size:10px}
.gw-road{position:absolute;height:8px;background:linear-gradient(180deg,#a9a294 0 35%,#8b8577 35% 100%);box-shadow:0 2px 4px rgba(6,12,18,.3);transform-origin:left center}
.gw-surface-label{position:absolute;left:12px;top:52px;z-index:13;border:1px solid var(--gw-line);background:rgba(2,10,18,.82);font-family:var(--gw-font-mono);font-size:11px;padding:8px 10px;pointer-events:none}
.gw-modal{position:fixed;inset:0;z-index:21000;background:rgba(0,0,0,.45);display:flex;align-items:center;justify-content:center}
.gw-modal-card{width:min(620px,calc(100vw - 40px));max-height:calc(100vh - 60px);min-width:0;display:flex;flex-direction:column;overflow:hidden;border:1px solid var(--gw-line2);background:linear-gradient(180deg,rgba(18,35,55,.98),rgba(4,12,22,.99));box-shadow:0 24px 80px rgba(0,0,0,.65)}
.gw-modal-card header{display:flex;justify-content:space-between;align-items:center;padding:12px 14px;border-bottom:1px solid rgba(98,211,255,.22);font-family:var(--gw-font-display);letter-spacing:.08em;text-transform:uppercase}
.gw-modal-card header button{border:1px solid rgba(98,211,255,.25);background:rgba(255,255,255,.04);color:var(--gw-text);padding:4px 8px;cursor:pointer}
.gw-modal-body{min-width:0;min-height:0;padding:12px;display:grid;grid-template-columns:1fr 1fr;gap:8px;overflow:auto}
.gw-context-sheet-body.gw-rweb-body{min-width:0;min-height:0;max-width:100%;overflow:auto;display:block!important;flex:1 1 auto}
.gw-modal-body.gw-rweb-body{display:block;width:100%;height:min(70vh,720px);max-height:calc(100vh - 120px);padding:0}
.gw-choice{border:1px solid rgba(98,211,255,.25);background:rgba(8,20,34,.62);color:var(--gw-text);padding:10px;text-align:left;cursor:pointer}
.gw-choice:hover{border-color:var(--gw-blue);box-shadow:0 0 18px rgba(98,211,255,.16)}
.gw-choice strong{display:block;color:var(--gw-blue);margin-bottom:4px}
.gw-choice small{color:var(--gw-muted)}
.gw-choice.locked{opacity:.5;cursor:not-allowed;filter:grayscale(.6)}
.gw-choice.locked:hover{border-color:rgba(98,211,255,.25);box-shadow:none}
.gw-locked-note{color:#e2604f!important}
@media(max-width:1150px){
  .gw-layout{grid-template-columns:1fr}.gw-dock{display:none}.gw-resource-bar{display:none}.gw-status{display:none}
}



/* ===== Source: public/frontierdemo-v4-detail-fix.css ===== */

.gw-planet-nav.v5-enhanced{
  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:6px;
  margin-bottom:8px;
}
.gw-planet-btn{
  border:1px solid rgba(98,211,255,.28);
  background:rgba(7,18,31,.82);
  color:var(--gw-text);
  border-radius:4px;
  padding:4px 3px;
  display:flex;
  align-items:center;
  gap:5px;
  cursor:pointer;
  min-height:30px;
  justify-content:flex-start;
}
.gw-planet-btn:hover{border-color:var(--gw-blue);box-shadow:0 0 12px rgba(98,211,255,.18)}
.gw-planet-btn img{width:18px;height:18px;display:block;border-radius:50%;flex:0 0 auto}
.gw-planet-btn span{font-family:var(--gw-font-mono);font-size:9px;line-height:1.1;text-align:left}
.gw-minimap .gw-panel-body > div:last-child{font-size:10px !important}
.gw-asset,.gw-body,.gw-city,.gw-dome,.gw-surface-tile{pointer-events:auto !important}
.gw-asset{z-index:18 !important}
.gw-asset img{image-rendering:auto}
.gw-asset.select-fix-hover img,.gw-body.select-fix-hover img{filter:drop-shadow(0 0 14px rgba(98,211,255,.42))}
.gw-fleet-pickable{cursor:pointer;border-color:rgba(98,211,255,.28)!important}
.gw-fleet-pickable:hover{border-color:var(--gw-blue)!important;box-shadow:0 0 12px rgba(98,211,255,.16)}
.gw-surface-world .gw-extra-district,
.gw-surface-world .gw-extra-farm,
.gw-surface-world .gw-extra-harbor,
.gw-surface-world .gw-extra-island,
.gw-surface-world .gw-extra-forest,
.gw-surface-world .gw-extra-highrise,
.gw-surface-world .gw-extra-crater,
.gw-surface-world .gw-extra-pad,
.gw-surface-world .gw-extra-mine,
.gw-surface-world .gw-extra-dome,
.gw-surface-world .gw-extra-mars-rock,
.gw-surface-world .gw-extra-platform,
.gw-surface-world .gw-extra-cloud-band{
  position:absolute;transform:translate(-50%,-50%);
}
.gw-extra-island{
  width:240px;height:180px;
  background:linear-gradient(145deg,#48795f,#2a4d35);
  border:1px solid rgba(182,225,180,.16);
  clip-path:polygon(14% 48%,24% 18%,52% 6%,79% 22%,92% 49%,76% 82%,45% 95%,19% 78%);
  box-shadow:0 0 26px rgba(0,0,0,.22), inset 0 0 30px rgba(255,255,255,.06);
}
.gw-extra-forest{
  width:180px;height:120px;
  background:
    radial-gradient(circle at 18% 38%,#2f7c4a 0 10px,transparent 11px),
    radial-gradient(circle at 40% 56%,#2b7344 0 12px,transparent 13px),
    radial-gradient(circle at 63% 33%,#347f4e 0 11px,transparent 12px),
    radial-gradient(circle at 78% 64%,#2a6840 0 12px,transparent 13px),
    radial-gradient(circle at 27% 72%,#3b8755 0 10px,transparent 11px);
}
.gw-extra-district{
  width:190px;height:120px;
  background:
    linear-gradient(90deg,rgba(194,205,214,.22) 0 6px,transparent 6px 22px,rgba(194,205,214,.18) 22px 28px,transparent 28px 100%),
    linear-gradient(rgba(194,205,214,.17) 0 5px,transparent 5px 22px,rgba(194,205,214,.12) 22px 27px,transparent 27px 100%);
  background-size:46px 46px;
  border:1px solid rgba(194,205,214,.18);
  box-shadow:inset 0 0 24px rgba(255,255,255,.08),0 0 18px rgba(0,0,0,.18);
}
.gw-extra-highrise{
  width:210px;height:110px;
  background:
    linear-gradient(180deg,transparent 0 24px,rgba(166,192,212,.18) 24px 100%),
    repeating-linear-gradient(90deg,rgba(216,232,244,.34) 0 8px,transparent 8px 18px),
    linear-gradient(180deg,#5c7487,#32485b);
  clip-path:polygon(0 76%,8% 34%,15% 50%,24% 18%,34% 62%,42% 28%,51% 72%,62% 16%,74% 56%,84% 26%,92% 68%,100% 44%,100% 100%,0 100%);
  filter:drop-shadow(0 0 14px rgba(98,211,255,.15));
}
.gw-extra-farm{
  width:230px;height:140px;
  background:
    repeating-linear-gradient(0deg,rgba(224,195,88,.85) 0 18px,rgba(184,159,66,.82) 18px 34px),
    repeating-linear-gradient(90deg,rgba(0,0,0,.0) 0 48px,rgba(87,70,25,.26) 48px 52px);
  border:1px solid rgba(232,216,124,.22);
}
.gw-extra-harbor{
  width:230px;height:130px;
  background:
    linear-gradient(180deg,#29608c 0 56%,#163a59 56% 100%);
  border:1px solid rgba(98,211,255,.18);
  box-shadow:inset 0 0 26px rgba(255,255,255,.04);
}
.gw-extra-harbor:before{
  content:"";position:absolute;left:14px;right:14px;top:55%;height:10px;
  background:linear-gradient(90deg,#8f9caa 0 18%,transparent 18% 24%,#8f9caa 24% 52%,transparent 52% 58%,#8f9caa 58% 100%);
}
.gw-extra-harbor:after{
  content:"";position:absolute;left:48%;top:38%;width:76px;height:20px;transform:translateX(-50%);
  background:linear-gradient(180deg,#c6d4de,#788a98);
}
.gw-extra-crater{
  width:210px;height:210px;border-radius:50%;
  background:radial-gradient(circle,#3e444b 0 32%,#727a84 33% 58%,rgba(27,31,36,.28) 59% 100%);
  border:1px solid rgba(255,255,255,.08);
  box-shadow:inset -22px -18px 28px rgba(0,0,0,.30), inset 18px 18px 24px rgba(255,255,255,.08);
}
.gw-extra-pad{
  width:190px;height:118px;
  background:
    repeating-linear-gradient(90deg,rgba(245,164,62,.22) 0 4px,transparent 4px 24px),
    linear-gradient(180deg,#59636e,#303944);
  border:1px solid rgba(245,164,62,.28);
  box-shadow:0 0 22px rgba(245,164,62,.10),inset 0 0 18px rgba(255,255,255,.05);
}
.gw-extra-mine{
  width:190px;height:125px;
  background:
    linear-gradient(135deg,transparent 0 20%,rgba(25,31,39,.55) 21% 48%,transparent 49%),
    linear-gradient(180deg,#4a5158,#272d34);
  border:1px solid rgba(98,211,255,.16);
  clip-path:polygon(8% 80%,24% 24%,44% 8%,70% 22%,92% 76%,76% 100%,24% 100%);
}
.gw-extra-dome{
  width:138px;height:78px;border-radius:70px 70px 14px 14px;
  border:2px solid rgba(155,235,255,.48);
  background:radial-gradient(circle at 45% 20%,rgba(155,235,255,.30),rgba(62,118,145,.16) 48%,rgba(12,30,42,.38));
  box-shadow:0 0 18px rgba(98,211,255,.18);
}
.gw-extra-mars-rock{
  width:220px;height:150px;
  background:radial-gradient(circle at 40% 35%,#9d5233 0 26%,#6f2e1b 27% 62%,rgba(54,18,10,.35) 63% 100%);
  clip-path:polygon(8% 62%,18% 24%,42% 8%,66% 19%,90% 50%,76% 88%,36% 94%);
  border:1px solid rgba(245,164,62,.12);
}
.gw-extra-platform{
  width:230px;height:128px;border-radius:18px;
  background:
    linear-gradient(90deg,rgba(98,211,255,.20) 0 3px,transparent 3px 28px),
    linear-gradient(180deg,#8995a3,#4e5d6b);
  border:1px solid rgba(178,211,245,.30);
  box-shadow:0 0 26px rgba(98,211,255,.14),inset 0 0 20px rgba(255,255,255,.06);
}
.gw-extra-cloud-band{
  width:620px;height:92px;border-radius:50%;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.13),rgba(245,164,62,.12),transparent);
  filter:blur(6px);
  opacity:.9;
}
.gw-space-detail{
  position:absolute;pointer-events:none;border-radius:50%;
  box-shadow:0 0 20px rgba(98,211,255,.12);
}
.gw-space-detail.station-ring{border:1px solid rgba(98,211,255,.24);width:54px;height:54px}
.gw-space-detail.beacon{width:12px;height:12px;background:var(--gw-blue);box-shadow:0 0 12px var(--gw-blue)}



/* ===== Source: public/frontierdemo-v41-system-surface-fix.css ===== */

.gw-planet-nav.gw-v41-grid{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:6px;
  margin-bottom:8px;
}
.gw-planet-chip{
  position:relative;
  border:1px solid rgba(98,211,255,.24);
  background:linear-gradient(180deg,rgba(10,23,39,.92),rgba(6,14,24,.92));
  color:var(--gw-text);
  border-radius:4px;
  padding:5px 5px 4px;
  display:flex;
  align-items:center;
  gap:6px;
  min-height:34px;
  cursor:pointer;
}
.gw-planet-chip:hover{border-color:var(--gw-blue);box-shadow:0 0 14px rgba(98,211,255,.16)}
.gw-planet-chip.active{border-color:var(--gw-blue);box-shadow:0 0 0 1px rgba(98,211,255,.18) inset, 0 0 16px rgba(98,211,255,.2)}
.gw-planet-chip img{width:18px;height:18px;display:block;border-radius:50%;flex:0 0 auto}
.gw-planet-chip .gw-planet-name{font-family:var(--gw-font-mono);font-size:9px;line-height:1.1;letter-spacing:.02em}
.gw-planet-chip .gw-planet-surf{
  margin-left:auto;flex:0 0 auto;
  border:1px solid rgba(245,164,62,.34);
  background:rgba(35,20,6,.86);
  color:var(--gw-orange);
  border-radius:3px;
  font-family:var(--gw-font-mono);
  font-size:8px;
  padding:3px 4px;
  cursor:pointer;
}
.gw-planet-chip .gw-planet-surf:hover{border-color:var(--gw-orange);box-shadow:0 0 10px rgba(245,164,62,.18)}
.gw-minimap .gw-panel-body > div:last-child{font-size:10px !important}

.gw-space-detail,.gw-space-detail.station-ring,.gw-space-detail.beacon{display:none !important}

.gw-v41-surface-btn{
  margin-top:8px;
  width:100%;
  border:1px solid rgba(245,164,62,.34);
  background:rgba(35,20,6,.86);
  color:var(--gw-orange);
  padding:7px 10px;
  border-radius:4px;
  cursor:pointer;
}
.gw-v41-surface-btn:hover{border-color:var(--gw-orange);box-shadow:0 0 12px rgba(245,164,62,.16)}

.gw-v41-coastline,.gw-v41-harbor,.gw-v41-residential,.gw-v41-industrial,.gw-v41-civic,.gw-v41-fields,.gw-v41-forest,.gw-v41-landing,.gw-v41-road{
  position:absolute;transform:translate(-50%,-50%);
}
.gw-v41-coastline{
  width:760px;height:320px;left:-440px;top:90px;
  background:
    linear-gradient(180deg,rgba(11,55,92,.96) 0 48%,rgba(8,31,54,.98) 48% 100%),
    radial-gradient(circle at 68% 35%,rgba(255,255,255,.12),transparent 30%);
  border:1px solid rgba(98,211,255,.12);
  clip-path:polygon(0 58%,12% 46%,23% 44%,34% 49%,47% 40%,61% 47%,71% 43%,81% 48%,90% 44%,100% 49%,100% 100%,0 100%);
  box-shadow:inset 0 0 35px rgba(255,255,255,.05),0 0 25px rgba(0,0,0,.18);
}
.gw-v41-harbor{
  width:280px;height:150px;left:-505px;top:105px;
  background:linear-gradient(180deg,#214d73 0 52%,#153550 52% 100%);
  border:1px solid rgba(98,211,255,.18);
  box-shadow:inset 0 0 26px rgba(255,255,255,.04);
}
.gw-v41-harbor:before{
  content:"";position:absolute;left:18px;right:18px;top:57%;height:12px;
  background:linear-gradient(90deg,#b3bec8 0 18%,transparent 18% 23%,#b3bec8 23% 50%,transparent 50% 56%,#b3bec8 56% 100%);
}
.gw-v41-harbor:after{
  content:"";position:absolute;left:44%;top:39%;width:88px;height:24px;transform:translateX(-50%);
  background:linear-gradient(180deg,#cedbe3,#7f8d99);box-shadow:0 0 18px rgba(98,211,255,.12);
}
.gw-v41-residential{
  width:255px;height:140px;left:60px;top:-85px;
  background:
    linear-gradient(90deg,rgba(211,222,232,.22) 0 6px,transparent 6px 24px,rgba(211,222,232,.16) 24px 30px,transparent 30px 100%),
    linear-gradient(rgba(211,222,232,.16) 0 5px,transparent 5px 24px,rgba(211,222,232,.1) 24px 29px,transparent 29px 100%);
  background-size:48px 48px;
  border:1px solid rgba(211,222,232,.16);
  box-shadow:inset 0 0 24px rgba(255,255,255,.08),0 0 16px rgba(0,0,0,.16);
}
.gw-v41-civic{
  width:214px;height:120px;left:242px;top:-205px;
  background:
    linear-gradient(180deg,transparent 0 28px,rgba(166,192,212,.18) 28px 100%),
    repeating-linear-gradient(90deg,rgba(216,232,244,.32) 0 9px,transparent 9px 19px),
    linear-gradient(180deg,#62798b,#32485c);
  clip-path:polygon(0 82%,8% 34%,16% 54%,26% 17%,36% 66%,45% 25%,54% 74%,63% 15%,75% 60%,84% 22%,93% 70%,100% 48%,100% 100%,0 100%);
  filter:drop-shadow(0 0 14px rgba(98,211,255,.12));
}
.gw-v41-industrial{
  width:240px;height:136px;left:315px;top:42px;
  background:
    linear-gradient(180deg,#425664,#2a3945),
    repeating-linear-gradient(90deg,rgba(255,170,80,.10) 0 18px,transparent 18px 34px);
  border:1px solid rgba(255,170,80,.18);
  box-shadow:inset 0 0 28px rgba(255,255,255,.05),0 0 18px rgba(0,0,0,.18);
}
.gw-v41-fields{
  width:250px;height:145px;left:-95px;top:242px;
  background:
    repeating-linear-gradient(0deg,rgba(219,191,87,.88) 0 18px,rgba(177,151,63,.84) 18px 34px),
    repeating-linear-gradient(90deg,rgba(0,0,0,.0) 0 50px,rgba(87,70,25,.26) 50px 54px);
  border:1px solid rgba(232,216,124,.22);
}
.gw-v41-forest{
  width:180px;height:120px;left:210px;top:210px;
  background:
    radial-gradient(circle at 18% 38%,#2f7c4a 0 10px,transparent 11px),
    radial-gradient(circle at 40% 56%,#2b7344 0 12px,transparent 13px),
    radial-gradient(circle at 63% 33%,#347f4e 0 11px,transparent 12px),
    radial-gradient(circle at 78% 64%,#2a6840 0 12px,transparent 13px),
    radial-gradient(circle at 27% 72%,#3b8755 0 10px,transparent 11px);
}
.gw-v41-landing{
  width:118px;height:118px;left:-252px;top:-62px;
  border-radius:50%;
  border:2px solid rgba(245,164,62,.4);
  background:
    radial-gradient(circle,rgba(13,30,44,.6) 0 36%,transparent 36% 100%),
    repeating-radial-gradient(circle,rgba(245,164,62,.18) 0 2px,transparent 2px 14px);
  box-shadow:0 0 22px rgba(245,164,62,.18), inset 0 0 24px rgba(255,255,255,.06);
}
.gw-v41-road{
  height:10px;background:rgba(188,200,212,.35);
  box-shadow:0 0 4px rgba(255,255,255,.16);
  transform-origin:left center;
}
.gw-v41-road.a{left:-280px;top:-62px;width:330px;transform:translate(-50%,-50%) rotate(14deg)}
.gw-v41-road.b{left:-30px;top:-15px;width:360px;transform:translate(-50%,-50%) rotate(8deg)}
.gw-v41-road.c{left:105px;top:60px;width:250px;transform:translate(-50%,-50%) rotate(-20deg)}
.gw-v41-road.d{left:-70px;top:180px;width:340px;transform:translate(-50%,-50%) rotate(-6deg)}

.gw-surface-world[data-planet-style="luna"] .gw-v41-coastline,
.gw-surface-world[data-planet-style="luna"] .gw-v41-fields{
  background:radial-gradient(circle,#414850 0 34%,#79818a 35% 58%,rgba(31,35,40,.22) 59% 100%);
  border-radius:50%;
  clip-path:none;
}
.gw-surface-world[data-planet-style="luna"] .gw-v41-harbor,
.gw-surface-world[data-planet-style="luna"] .gw-v41-forest{display:none}
.gw-surface-world[data-planet-style="luna"] .gw-v41-residential,
.gw-surface-world[data-planet-style="luna"] .gw-v41-industrial,
.gw-surface-world[data-planet-style="luna"] .gw-v41-civic{
  background:linear-gradient(180deg,#5f6a74,#313b45);
  border:1px solid rgba(155,235,255,.18);
  clip-path:none;
}
.gw-surface-world[data-planet-style="mars"] .gw-v41-coastline,
.gw-surface-world[data-planet-style="mars"] .gw-v41-fields,
.gw-surface-world[data-planet-style="mars"] .gw-v41-forest{
  background:radial-gradient(circle at 42% 38%,#a95836 0 28%,#6f2d1a 29% 64%,rgba(55,18,10,.28) 65% 100%);
  border-radius:26px;
  clip-path:none;
}
.gw-surface-world[data-planet-style="mars"] .gw-v41-harbor{display:none}
.gw-surface-world[data-planet-style="mars"] .gw-v41-residential,
.gw-surface-world[data-planet-style="mars"] .gw-v41-industrial,
.gw-surface-world[data-planet-style="mars"] .gw-v41-civic{
  background:linear-gradient(180deg,#5d6873,#303943);
  border:1px solid rgba(245,164,62,.20);
  clip-path:none;
}
.gw-surface-world.gw-gas-platform-world .gw-v41-coastline,
.gw-surface-world.gw-gas-platform-world .gw-v41-fields,
.gw-surface-world.gw-gas-platform-world .gw-v41-forest{
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.12),rgba(98,211,255,.10),transparent);
  border:0;
  clip-path:none;
  filter:blur(7px);
}
.gw-surface-world.gw-gas-platform-world .gw-v41-harbor{display:none}
.gw-surface-world.gw-gas-platform-world .gw-v41-residential,
.gw-surface-world.gw-gas-platform-world .gw-v41-industrial,
.gw-surface-world.gw-gas-platform-world .gw-v41-civic{
  background:linear-gradient(180deg,#8695a4,#4e5f70);
  border-radius:14px;
  border:1px solid rgba(178,211,245,.24);
  clip-path:none;
}



/* GATEWAKE_V5_PRODUCT_PASS */
.gw-product-surface-button{
  margin-top:10px;
  width:100%;
  border:1px solid rgba(245,164,62,.34);
  background:linear-gradient(180deg,rgba(34,19,6,.94),rgba(20,12,4,.92));
  color:var(--gw-orange, #f5a43e);
  padding:8px 10px;
  border-radius:4px;
  cursor:pointer;
  font-family:var(--gw-font-mono, monospace);
}
.gw-product-surface-button:hover{ box-shadow:0 0 12px rgba(245,164,62,.18); }

.gw-surface-world{ overflow:visible; }
.gw-product-terrain-layer,
.gw-product-decal,
.gw-product-road,
.gw-product-district,
.gw-product-feature{ position:absolute; inset:auto; transform:translate(-50%,-50%); }
.gw-product-terrain-layer{ position:absolute; inset:0; pointer-events:none; }
.gw-product-decal{ opacity:.4; filter:drop-shadow(0 4px 12px rgba(0,0,0,.25)); }
.gw-product-road{ height:10px; background:rgba(180,195,210,.40); box-shadow:0 0 6px rgba(255,255,255,.14); opacity:.85; }
.gw-product-district, .gw-product-feature{ border:1px solid rgba(255,255,255,.08); box-shadow:0 10px 20px rgba(0,0,0,.18), inset 0 0 16px rgba(255,255,255,.05); }

.gw-product-road.road-a{ left:23%; top:62%; width:280px; transform:translate(-50%,-50%) rotate(18deg); }
.gw-product-road.road-b{ left:46%; top:54%; width:340px; transform:translate(-50%,-50%) rotate(-4deg); }
.gw-product-road.road-c{ left:66%; top:66%; width:210px; transform:translate(-50%,-50%) rotate(-24deg); }

.gw-product-district.district-a{ left:30%; top:58%; width:150px; height:96px; background:linear-gradient(180deg,rgba(80,98,114,.84),rgba(42,57,71,.92)); }
.gw-product-district.district-b{ left:58%; top:44%; width:190px; height:114px; background:linear-gradient(180deg,rgba(83,102,120,.82),rgba(44,59,73,.92)); }
.gw-product-district.district-c{ left:72%; top:62%; width:144px; height:86px; background:linear-gradient(180deg,rgba(86,103,120,.80),rgba(40,56,70,.92)); }

.gw-product-feature.feature-a{ left:18%; top:42%; width:130px; height:130px; border-radius:50%; }
.gw-product-feature.feature-b{ left:46%; top:28%; width:190px; height:96px; }
.gw-product-feature.feature-c{ left:80%; top:32%; width:120px; height:120px; border-radius:12px; }

.gw-surface-world[data-planet-style="earth"]{
  background:
    radial-gradient(ellipse at 24% 14%, rgba(255,220,160,.10), transparent 40%),
    linear-gradient(165deg, #1a5678 0 30%, #2a5e64 30% 50%, #3d6a4c 50% 66%, #566349 66% 78%, #14374f 78% 100%);
}
.gw-surface-world[data-planet-style="earth"] .gw-product-feature.feature-a{ background:linear-gradient(168deg,#2c6284,#1e4560); border-color:rgba(150,190,215,.18); }
.gw-surface-world[data-planet-style="earth"] .gw-product-feature.feature-b{ background:linear-gradient(168deg,rgba(190,168,104,.62),rgba(150,132,76,.64)); border-color:rgba(232,214,150,.16); }
.gw-surface-world[data-planet-style="earth"] .gw-product-feature.feature-c{ background:linear-gradient(168deg,rgba(74,110,80,.66),rgba(46,76,54,.70)); border-color:rgba(130,180,138,.14); }
.gw-surface-world[data-planet-style="earth"] .gw-product-decal.gw-decal-a{ left:14%; top:60%; width:360px; height:180px; background:rgba(18,56,88,.36); clip-path:polygon(0 55%,18% 42%,34% 46%,49% 38%,68% 44%,81% 39%,100% 47%,100% 100%,0 100%); }
.gw-surface-world[data-planet-style="earth"] .gw-product-decal.gw-decal-b{ left:60%; top:20%; width:220px; height:110px; background:rgba(200,205,200,.10); clip-path:polygon(0 100%,50% 0,100% 100%); }
.gw-surface-world[data-planet-style="earth"] .gw-product-decal.gw-decal-c{ left:75%; top:70%; width:180px; height:70px; background:rgba(216,196,124,.12); }

.gw-surface-world[data-planet-style="luna"],
.gw-surface-world[data-planet-style="mercury"],
.gw-surface-world[data-planet-style="ceres"],
.gw-surface-world[data-planet-style="pluto"],
.gw-surface-world[data-planet-style="eris"]{
  background:linear-gradient(180deg,#87909b 0 24%, #757d87 24% 44%, #676f79 44% 70%, #595f69 70% 100%);
}
.gw-surface-world[data-planet-style="luna"] .gw-product-feature.feature-a,
.gw-surface-world[data-planet-style="mercury"] .gw-product-feature.feature-a,
.gw-surface-world[data-planet-style="ceres"] .gw-product-feature.feature-a,
.gw-surface-world[data-planet-style="pluto"] .gw-product-feature.feature-a,
.gw-surface-world[data-planet-style="eris"] .gw-product-feature.feature-a{ background:radial-gradient(circle,#4e5358 0 38%, #737b86 39% 100%); border-radius:50%; }
.gw-surface-world[data-planet-style="luna"] .gw-product-feature.feature-b,
.gw-surface-world[data-planet-style="mercury"] .gw-product-feature.feature-b,
.gw-surface-world[data-planet-style="ceres"] .gw-product-feature.feature-b,
.gw-surface-world[data-planet-style="pluto"] .gw-product-feature.feature-b,
.gw-surface-world[data-planet-style="eris"] .gw-product-feature.feature-b{ background:linear-gradient(180deg,#485663,#2f3944); }
.gw-surface-world[data-planet-style="luna"] .gw-product-feature.feature-c,
.gw-surface-world[data-planet-style="mercury"] .gw-product-feature.feature-c,
.gw-surface-world[data-planet-style="ceres"] .gw-product-feature.feature-c,
.gw-surface-world[data-planet-style="pluto"] .gw-product-feature.feature-c,
.gw-surface-world[data-planet-style="eris"] .gw-product-feature.feature-c{ background:linear-gradient(180deg,#66727f,#3e4852); }
.gw-surface-world[data-planet-style="luna"] .gw-product-decal,
.gw-surface-world[data-planet-style="mercury"] .gw-product-decal,
.gw-surface-world[data-planet-style="ceres"] .gw-product-decal,
.gw-surface-world[data-planet-style="pluto"] .gw-product-decal,
.gw-surface-world[data-planet-style="eris"] .gw-product-decal{ background:rgba(0,0,0,.14); border-radius:50%; }
.gw-surface-world[data-planet-style="luna"] .gw-product-decal.gw-decal-a,
.gw-surface-world[data-planet-style="mercury"] .gw-product-decal.gw-decal-a,
.gw-surface-world[data-planet-style="ceres"] .gw-product-decal.gw-decal-a,
.gw-surface-world[data-planet-style="pluto"] .gw-product-decal.gw-decal-a,
.gw-surface-world[data-planet-style="eris"] .gw-product-decal.gw-decal-a{ left:20%; top:32%; width:160px; height:160px; }
.gw-surface-world[data-planet-style="luna"] .gw-product-decal.gw-decal-b,
.gw-surface-world[data-planet-style="mercury"] .gw-product-decal.gw-decal-b,
.gw-surface-world[data-planet-style="ceres"] .gw-product-decal.gw-decal-b,
.gw-surface-world[data-planet-style="pluto"] .gw-product-decal.gw-decal-b,
.gw-surface-world[data-planet-style="eris"] .gw-product-decal.gw-decal-b{ left:68%; top:58%; width:220px; height:220px; }
.gw-surface-world[data-planet-style="luna"] .gw-product-decal.gw-decal-c,
.gw-surface-world[data-planet-style="mercury"] .gw-product-decal.gw-decal-c,
.gw-surface-world[data-planet-style="ceres"] .gw-product-decal.gw-decal-c,
.gw-surface-world[data-planet-style="pluto"] .gw-product-decal.gw-decal-c,
.gw-surface-world[data-planet-style="eris"] .gw-product-decal.gw-decal-c{ left:78%; top:28%; width:96px; height:96px; }

.gw-surface-world[data-planet-style="mars"],
.gw-surface-world[data-planet-style="venus"]{
  background:linear-gradient(180deg,#9b5b38 0 22%, #8d4f31 22% 48%, #7c442b 48% 74%, #683923 74% 100%);
}
.gw-surface-world[data-planet-style="mars"] .gw-product-feature.feature-a,
.gw-surface-world[data-planet-style="venus"] .gw-product-feature.feature-a{ background:radial-gradient(circle,#713420 0 34%, #9b5838 35% 100%); border-radius:50%; }
.gw-surface-world[data-planet-style="mars"] .gw-product-feature.feature-b,
.gw-surface-world[data-planet-style="venus"] .gw-product-feature.feature-b{ background:linear-gradient(180deg,#5b6674,#2d3640); }
.gw-surface-world[data-planet-style="mars"] .gw-product-feature.feature-c,
.gw-surface-world[data-planet-style="venus"] .gw-product-feature.feature-c{ background:linear-gradient(180deg,#6d3d29,#8e4f35); }
.gw-surface-world[data-planet-style="mars"] .gw-product-decal,
.gw-surface-world[data-planet-style="venus"] .gw-product-decal{ background:rgba(60,25,14,.18); }

.gw-surface-world[data-planet-style="jupiter"],
.gw-surface-world[data-planet-style="saturn"],
.gw-surface-world[data-planet-style="uranus"],
.gw-surface-world[data-planet-style="neptune"]{
  background:linear-gradient(180deg,#45648a 0 35%, #354e6d 35% 62%, #273a52 62% 100%);
}
.gw-surface-world.gw-gas-platform-world .gw-product-road{ background:rgba(178,205,228,.28); }
.gw-surface-world.gw-gas-platform-world .gw-product-feature.feature-a,
.gw-surface-world.gw-gas-platform-world .gw-product-feature.feature-b,
.gw-surface-world.gw-gas-platform-world .gw-product-feature.feature-c,
.gw-surface-world.gw-gas-platform-world .gw-product-district{
  background:linear-gradient(180deg,#788998,#4f6070);
  border-radius:12px;
  border-color:rgba(178,211,245,.24);
}
.gw-surface-world.gw-gas-platform-world .gw-product-decal.gw-decal-a{ left:18%; top:78%; width:340px; height:110px; background:rgba(255,255,255,.10); filter:blur(6px); }
.gw-surface-world.gw-gas-platform-world .gw-product-decal.gw-decal-b{ left:58%; top:18%; width:260px; height:130px; background:rgba(255,255,255,.10); filter:blur(10px); }
.gw-surface-world.gw-gas-platform-world .gw-product-decal.gw-decal-c{ left:76%; top:50%; width:200px; height:80px; background:rgba(255,255,255,.08); filter:blur(7px); }



/* GATEWAKE_LOVABLE_IMPORT_VISUAL_POLISH */
:root{
  --gw-sol-theater-bg:url("/assets/demo-alpha/lovable-import/sol-theater-bg.jpg");
  --gw-cockpit-edge:rgba(98,211,255,.54);
  --gw-cockpit-glass:rgba(4,13,25,.88);
}

#gw-v4{
  background:
    radial-gradient(circle at 50% 52%,rgba(42,103,168,.18),transparent 38%),
    radial-gradient(circle at 82% 72%,rgba(245,164,62,.08),transparent 34%),
    linear-gradient(180deg,rgba(2,7,15,.86),rgba(6,16,29,.94) 60%,rgba(2,7,15,.98)),
    var(--gw-sol-theater-bg) center center / cover no-repeat,
    #02070f;
}

.gw-viewport::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:0;
  pointer-events:none;
  background:
    linear-gradient(90deg,rgba(98,211,255,.05) 1px,transparent 1px),
    linear-gradient(rgba(98,211,255,.04) 1px,transparent 1px);
  background-size:72px 72px;
  mask-image:radial-gradient(circle at 50% 50%,black 0 58%,transparent 100%);
  opacity:.55;
}

.gw-world,
.gw-surface{
  z-index:1;
}

.gw-top{
  border-bottom-color:var(--gw-cockpit-edge);
  box-shadow:0 10px 32px rgba(0,0,0,.34), inset 0 -1px 0 rgba(255,255,255,.04);
}

.gw-resource{
  border-color:rgba(98,211,255,.34);
  background:linear-gradient(180deg,rgba(10,28,48,.84),rgba(4,13,24,.82));
  box-shadow:inset 3px 0 0 rgba(245,164,62,.34),0 0 12px rgba(98,211,255,.06);
}

.gw-panel,
.gw-actionbar,
.gw-selected-strip{
  border-color:rgba(98,211,255,.42);
  background:linear-gradient(180deg,rgba(12,29,48,.90),rgba(4,13,25,.92));
}

.gw-panel::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  border:1px solid rgba(255,255,255,.035);
}

.gw-panel-title::before{
  background:var(--gw-orange);
  box-shadow:0 0 12px rgba(245,164,62,.72);
}

.gw-body[data-id="earth"] img,
.gw-body[data-id="luna"] img,
.gw-body[data-id="mars"] img{
  border-radius:50%;
  object-fit:contain;
  background:radial-gradient(circle at 38% 32%,rgba(255,255,255,.18),transparent 42%);
}

.gw-body[data-id="earth"] img{
  filter:drop-shadow(0 0 14px rgba(75,168,255,.50)) drop-shadow(0 0 28px rgba(52,240,138,.16));
}

.gw-body[data-id="luna"] img{
  filter:drop-shadow(0 0 12px rgba(210,225,238,.38)) drop-shadow(0 0 22px rgba(98,211,255,.12));
}

.gw-body[data-id="mars"] img{
  filter:drop-shadow(0 0 14px rgba(245,120,62,.42)) drop-shadow(0 0 24px rgba(245,164,62,.12));
}

.gw-belt-ring{
  border-color:rgba(245,164,62,.48);
  box-shadow:0 0 34px rgba(245,164,62,.10), inset 0 0 28px rgba(245,164,62,.08);
}

.gw-asset[data-kind="asteroid"] img{
  filter:drop-shadow(0 0 8px rgba(245,164,62,.30));
  opacity:.88;
}

.gw-station img{
  filter:drop-shadow(0 0 14px rgba(98,211,255,.48)) drop-shadow(0 0 24px rgba(245,164,62,.14));
}

.gw-satellite img{
  filter:drop-shadow(0 0 12px rgba(98,211,255,.62)) drop-shadow(0 0 20px rgba(52,240,138,.18));
}

.gw-ship:not(.enemy) img{
  filter:drop-shadow(0 0 10px rgba(98,211,255,.45));
}

.gw-asset.enemy img{
  filter:drop-shadow(0 0 10px rgba(255,92,92,.72)) drop-shadow(0 0 24px rgba(255,92,92,.18));
}

.gw-asset.selected::before,
.gw-body.selected::before{
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width:150%;
  height:150%;
  transform:translate(-50%,-50%);
  border-radius:50%;
  background:radial-gradient(circle,rgba(98,211,255,.22),transparent 68%);
  pointer-events:none;
}

.gw-planet-chip{
  background:linear-gradient(180deg,rgba(13,31,52,.94),rgba(5,14,25,.94));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05);
}

.gw-planet-chip img{
  object-fit:contain;
  background:rgba(0,0,0,.16);
  box-shadow:0 0 10px rgba(98,211,255,.12);
}

.gw-planet-chip.active{
  border-color:rgba(245,164,62,.72);
  box-shadow:inset 0 0 0 1px rgba(245,164,62,.14),0 0 18px rgba(245,164,62,.18);
}

.gw-action{
  background:linear-gradient(180deg,rgba(22,45,72,.82),rgba(9,22,38,.86));
  border-color:rgba(98,211,255,.34);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05);
}

.gw-action:hover,
.gw-tool:hover{
  border-color:rgba(245,164,62,.72);
  color:var(--gw-orange);
  box-shadow:0 0 14px rgba(245,164,62,.13);
}

.gw-surface-world[data-planet-style="earth"] .gw-surface-ocean{
  background:
    radial-gradient(ellipse at 26% 22%,rgba(255,214,150,.12),transparent 44%),
    radial-gradient(circle at 18% 28%,rgba(96,124,74,.32),transparent 24%),
    radial-gradient(circle at 58% 48%,rgba(168,146,92,.20),transparent 20%),
    radial-gradient(circle at 44% 68%,rgba(88,118,72,.26),transparent 26%),
    linear-gradient(160deg,#175578,#0f3c5a 45%,#0a2942);
}

.gw-surface-world[data-planet-style="luna"] .gw-surface-ocean,
.gw-surface-world[data-planet-style="mercury"] .gw-surface-ocean,
.gw-surface-world[data-planet-style="ceres"] .gw-surface-ocean{
  background:
    radial-gradient(circle at 22% 30%,rgba(34,38,43,.38) 0 6%,transparent 7%),
    radial-gradient(circle at 68% 58%,rgba(28,32,38,.34) 0 8%,transparent 9%),
    radial-gradient(circle at 46% 72%,rgba(255,255,255,.10) 0 5%,transparent 6%),
    linear-gradient(180deg,#8e969f,#5f6872 58%,#2d333b);
}

.gw-surface-world[data-planet-style="mars"] .gw-surface-ocean,
.gw-surface-world[data-planet-style="venus"] .gw-surface-ocean{
  background:
    radial-gradient(circle at 26% 34%,rgba(63,26,14,.32) 0 9%,transparent 10%),
    radial-gradient(circle at 72% 66%,rgba(245,164,62,.18) 0 14%,transparent 15%),
    linear-gradient(180deg,#ba6840,#79341f 60%,#34130d);
}

.gw-surface-world.gw-gas-platform-world .gw-surface-ocean{
  background:
    linear-gradient(180deg,rgba(188,220,255,.12),transparent 18%),
    repeating-linear-gradient(0deg,rgba(255,255,255,.10) 0 18px,rgba(245,164,62,.10) 18px 44px,rgba(98,211,255,.08) 44px 76px),
    linear-gradient(180deg,#314f7e,#88673f 44%,#253652);
}

/* GATEWAKE_DEMO_ALPHA_DESKTOP_HUD_CLEANUP */
@media (min-width:1151px){
  .gw-top{
    height:66px;
    align-items:flex-start;
    gap:10px;
    padding:7px 12px;
  }

  .gw-brand,
  .gw-status{
    flex:0 0 auto;
    align-self:flex-start;
    min-height:28px;
  }

  .gw-status{
    flex-wrap:wrap;
    max-width:330px;
    row-gap:5px;
  }

  .gw-tag{
    padding:5px 8px;
    font-size:9px;
  }

  .gw-resource-bar{
    flex:1 1 auto;
    min-width:0;
    max-width:none;
    flex-wrap:wrap;
    align-content:flex-start;
    gap:4px 5px;
    margin-left:0;
    max-height:52px;
    overflow:hidden;
    padding-bottom:0;
  }

  .gw-resource{
    padding:4px 6px;
    font-size:9px;
    line-height:1.15;
  }

  .gw-resource span{
    margin-right:4px;
  }

  .gw-layout{
    top:66px;
    grid-template-columns:minmax(280px,292px) minmax(0,1fr) minmax(318px,330px);
  }

  .gw-dock-title{
    gap:8px;
    padding:0 2px;
    line-height:14px;
  }

  .gw-dock-body{
    gap:8px;
    padding-right:5px;
    scrollbar-width:thin;
    scrollbar-color:rgba(98,211,255,.42) rgba(4,13,25,.42);
  }

  .gw-dock-body::-webkit-scrollbar,
  .gw-panel-body::-webkit-scrollbar,
  .gw-actions::-webkit-scrollbar{
    width:7px;
    height:7px;
  }

  .gw-dock-body::-webkit-scrollbar-track,
  .gw-panel-body::-webkit-scrollbar-track,
  .gw-actions::-webkit-scrollbar-track{
    background:rgba(4,13,25,.42);
  }

  .gw-dock-body::-webkit-scrollbar-thumb,
  .gw-panel-body::-webkit-scrollbar-thumb,
  .gw-actions::-webkit-scrollbar-thumb{
    border-radius:8px;
    background:rgba(98,211,255,.42);
  }

  .gw-panel-head{
    height:32px;
    min-height:32px;
    padding:0 9px;
  }

  .gw-panel-title{
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  .gw-panel-controls{
    flex:0 0 auto;
  }

  .gw-panel-body{
    padding:10px 11px;
    line-height:1.48;
    overflow-wrap:anywhere;
  }

  .gw-right-dock .gw-panel-body{
    padding:8px 10px;
    line-height:1.38;
  }

  .gw-right-dock .gw-card{
    padding:7px;
  }

  .gw-right-dock [data-panel="planet"] .gw-panel-body > strong{
    font-size:14px !important;
    line-height:1.1;
  }

  .gw-right-dock [data-panel="planet"] .gw-row{
    margin:2px 0;
  }

  .gw-right-dock [data-panel="planet"] .gw-tool-grid,
  .gw-right-dock [data-panel="station"] .gw-tool-grid{
    gap:5px;
  }

  .gw-right-dock [data-panel="planet"] .gw-tool,
  .gw-right-dock [data-panel="station"] .gw-tool{
    min-height:28px;
    padding:6px 7px;
  }

  .gw-card,
  .gw-msg,
  .gw-row,
  .gw-tool,
  .gw-action{
    overflow-wrap:anywhere;
  }

  .gw-left-dock [data-panel="resources"] .gw-panel-body{
    max-height:clamp(260px,38vh,430px);
    overflow:auto;
    padding-right:12px;
  }

  .gw-left-dock [data-panel="events"] .gw-panel-body,
  .gw-right-dock [data-panel="fleet"] .gw-panel-body{
    overflow:auto;
    padding-right:12px;
  }

  .gw-left-dock [data-panel="events"] .gw-panel-body{
    max-height:132px;
  }

  .gw-right-dock [data-panel="fleet"] .gw-panel-body{
    max-height:clamp(100px,13vh,178px);
  }

  .gw-minimap.gw-floating{
    overflow:hidden;
  }
  .gw-minimap .gw-panel-body{
    overflow-y:auto;
    overflow-x:hidden;
  }

  .gw-minimap .gw-mini-map{
    height:126px;
    aspect-ratio:auto;
  }

  .gw-minimap .gw-planet-nav{
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:5px;
    margin-bottom:8px;
  }

  .gw-planet-btn{
    gap:3px;
    min-height:28px;
    padding:4px 3px;
  }

  .gw-planet-btn span{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  .gw-right-dock [data-panel="context"] .gw-panel-body{
    padding:8px 10px;
  }

  .gw-right-dock [data-panel="context"] .gw-tool-grid{
    gap:5px;
  }

  .gw-right-dock [data-panel="context"] .gw-tool{
    min-height:27px;
    padding:6px 7px;
  }

  .gw-selected-strip{
    bottom:106px;
    height:66px;
    align-items:center;
    overflow-x:auto;
    overflow-y:hidden;
    padding:8px 10px;
  }

  .gw-selected-card{
    min-width:158px;
    max-width:220px;
    height:50px;
    padding:6px;
  }

  .gw-selected-card span{
    min-width:0;
    line-height:1.25;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  .gw-selected-card small{
    display:block;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  .gw-actionbar{
    height:92px;
    grid-template-columns:minmax(0,1fr) minmax(108px,auto);
    gap:10px;
    padding:9px 12px;
  }

  .gw-actions{
    align-content:flex-start;
    gap:8px;
    max-height:56px;
    overflow:auto;
    padding-bottom:2px;
  }

  .gw-action{
    min-width:68px;
    padding:7px 9px;
    line-height:1.15;
  }

  .gw-zoom-readout{
    min-width:108px;
    padding-left:10px;
  }
}

/* GATEWAKE_RTS_CONTROL_RESPONSIVE_PASS */
.gw-panel{
  display:flex;
  flex-direction:column;
  min-height:0;
}

.gw-panel-body{
  min-height:0;
  overflow:auto;
}

.gw-bars{
  position:absolute;
  left:50%;
  top:-12px;
  width:44px;
  transform:translateX(-50%);
  display:flex;
  flex-direction:column;
  gap:2px;
  opacity:0;
  transition:opacity .12s ease;
  pointer-events:none;
}

.gw-asset.selected .gw-bars,
.gw-asset.in-combat .gw-bars,
.gw-asset.damaged.selected .gw-bars{
  opacity:1;
}

.gw-bars .gw-hp,
.gw-bars .gw-shield{
  position:relative;
  left:auto;
  top:auto;
  transform:none;
  width:100%;
  height:4px;
  border:1px solid rgba(0,0,0,.68);
  background:rgba(255,255,255,.12);
  overflow:hidden;
}

.gw-bars .gw-shield div{
  height:100%;
  background:#62d3ff;
  box-shadow:0 0 7px rgba(98,211,255,.75);
}

.gw-progress.shield div{
  background:#62d3ff;
  box-shadow:0 0 8px rgba(98,211,255,.65);
}

.gw-meter-label{
  display:flex;
  justify-content:space-between;
  gap:8px;
  margin-top:6px;
  font-family:var(--gw-font-mono);
  font-size:9px;
  text-transform:uppercase;
}

.gw-meter-label span{
  color:var(--gw-muted);
}

.gw-target-ring,
.gw-defend-ring{
  position:absolute;
  left:0;
  top:0;
  width:48px;
  height:48px;
  border-radius:50%;
  transform:translate(-50%,-50%);
  pointer-events:none;
  z-index:6;
}

.gw-target-ring{
  border:1px solid rgba(255,92,92,.86);
  box-shadow:0 0 18px rgba(255,92,92,.28), inset 0 0 14px rgba(255,92,92,.12);
}

.gw-target-ring:before,
.gw-target-ring:after{
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  background:rgba(255,92,92,.8);
  transform:translate(-50%,-50%);
}

.gw-target-ring:before{width:64px;height:1px}
.gw-target-ring:after{width:1px;height:64px}

.gw-defend-ring{
  width:86px;
  height:86px;
  border:1px dashed rgba(52,240,138,.72);
  box-shadow:0 0 16px rgba(52,240,138,.16);
}

.gw-patrol-line{
  background:repeating-linear-gradient(90deg,rgba(52,240,138,.72) 0 8px,transparent 8px 14px);
}

.gw-command-ping{
  position:absolute;
  width:34px;
  height:34px;
  border:1px solid var(--gw-blue);
  border-radius:50%;
  transform:translate(-50%,-50%);
  pointer-events:none;
  z-index:14;
  animation:gwCommandPing .85s ease-out forwards;
}

.gw-command-ping.attack{
  border-color:var(--gw-red);
  box-shadow:0 0 18px rgba(255,92,92,.35);
}

.gw-command-ping.defend,
.gw-command-ping.repair{
  border-color:var(--gw-green);
  box-shadow:0 0 18px rgba(52,240,138,.28);
}

@keyframes gwCommandPing{
  from{opacity:1;scale:.55}
  to{opacity:0;scale:1.9}
}

.gw-action.active{
  border-color:rgba(245,164,62,.86);
  color:var(--gw-orange);
  box-shadow:0 0 16px rgba(245,164,62,.18), inset 0 0 0 1px rgba(245,164,62,.18);
}

.gw-alert-stack{
  position:absolute;
  right:14px;
  top:54px;
  z-index:22;
  display:flex;
  flex-direction:column;
  gap:7px;
  width:min(320px,36vw);
  pointer-events:none;
}

.gw-alert{
  border:1px solid rgba(98,211,255,.36);
  background:rgba(3,11,20,.92);
  box-shadow:0 14px 38px rgba(0,0,0,.35);
  padding:8px 10px;
  font-family:var(--gw-font-mono);
  font-size:10px;
  transition:opacity .25s ease, transform .25s ease;
}

.gw-alert strong{
  display:block;
  color:var(--gw-blue);
  margin-bottom:3px;
}

.gw-alert span{
  color:var(--gw-muted);
}

.gw-alert.danger{
  border-color:rgba(255,92,92,.58);
  box-shadow:0 14px 38px rgba(0,0,0,.35),0 0 20px rgba(255,92,92,.12);
}

.gw-alert.danger strong{color:var(--gw-red)}
.gw-alert.green strong{color:var(--gw-green)}
.gw-alert.leaving{opacity:0;transform:translateY(-6px)}

.gw-fleet-summary{
  border:1px solid rgba(98,211,255,.20);
  background:rgba(2,10,18,.38);
  padding:7px;
  margin-bottom:7px;
}

.gw-fleet-card{
  border-color:rgba(245,164,62,.28);
}

.gw-fleet-card > span,
.gw-fleet-pickable > span{
  float:right;
  color:var(--gw-muted);
  font-family:var(--gw-font-mono);
  font-size:9px;
}

.gw-fleet-pickable.active{
  border-color:rgba(98,211,255,.72)!important;
  box-shadow:0 0 12px rgba(98,211,255,.16);
}

.gw-control-groups{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:5px;
  margin:7px 0;
}

.gw-control-chip{
  border:1px solid rgba(98,211,255,.25);
  background:rgba(8,20,34,.62);
  color:var(--gw-text);
  min-height:26px;
  font-family:var(--gw-font-mono);
  font-size:10px;
  cursor:pointer;
}

.gw-control-chip span{
  color:var(--gw-muted);
  margin-left:5px;
}

.gw-control-chip:hover{
  border-color:var(--gw-blue);
  color:var(--gw-blue);
}

.gw-asset.fleet-member.selected:after{
  border-color:rgba(245,164,62,.88);
  box-shadow:0 0 16px rgba(245,164,62,.28);
}

.gw-asset.moving img{
  filter:drop-shadow(0 0 10px rgba(98,211,255,.45)) drop-shadow(0 0 18px rgba(98,211,255,.10));
}

@media (min-width:1151px) and (max-width:1500px){
  .gw-brand{min-width:238px}
  .gw-logo{font-size:14px}
  .gw-status{max-width:198px}
  .gw-layout{
    grid-template-columns:minmax(248px,264px) minmax(0,1fr) minmax(288px,304px);
    gap:6px;
    padding:6px;
  }
  .gw-panel-body{font-size:11px}
  .gw-card{font-size:10px;padding:7px}
  .gw-resource{font-size:8px;padding:3px 5px}
  .gw-resource-bar{gap:3px 4px}
  .gw-selected-strip{
    bottom:98px;
    height:58px;
    left:10px;
    right:10px;
  }
  .gw-selected-card{
    min-width:132px;
    max-width:172px;
    height:44px;
  }
  .gw-actionbar{
    left:10px;
    right:10px;
    bottom:7px;
    height:84px;
    padding:7px 9px;
  }
  .gw-actions{
    gap:6px;
    max-height:50px;
  }
  .gw-action{
    min-width:60px;
    padding:6px 7px;
    font-size:9px;
  }
  .gw-alert-stack{
    width:min(270px,34vw);
    top:50px;
  }
}

@media (min-width:1900px){
  .gw-layout{
    grid-template-columns:minmax(300px,340px) minmax(0,1fr) minmax(340px,380px);
  }
  .gw-selected-card{
    min-width:176px;
  }
}

/* Authoritative Sol Colony Foundation slice */
.gw-mission-card{
  position:relative;
  overflow:hidden;
  margin:-1px -2px 9px;
  padding:11px;
  border:1px solid rgba(245,164,62,.42);
  background:linear-gradient(135deg,rgba(64,38,16,.52),rgba(6,21,36,.82) 64%);
  box-shadow:inset 3px 0 0 rgba(245,164,62,.58),0 10px 24px rgba(0,0,0,.18);
}
.gw-mission-card:after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:linear-gradient(110deg,transparent 0 68%,rgba(98,211,255,.05) 68% 70%,transparent 70%);
}
.gw-mission-kicker{
  color:var(--gw-orange);
  font:800 9px/1.2 var(--gw-font-mono);
  letter-spacing:.12em;
  text-transform:uppercase;
}
.gw-mission-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin:5px 0 2px;
  font-family:var(--gw-font-display);
  text-transform:uppercase;
}
.gw-mission-title span{
  color:var(--gw-blue);
  font:700 8px/1.2 var(--gw-font-mono);
  text-align:right;
}
.gw-mission-phase,.gw-mission-asset{
  color:var(--gw-muted);
  font:700 9px/1.4 var(--gw-font-mono);
  text-transform:uppercase;
}
.gw-mission-asset{margin-top:3px;color:#b7cbd9}
.gw-mission-action{
  position:relative;
  z-index:1;
  width:100%;
  margin-top:8px;
  border-color:rgba(52,240,138,.55);
  color:var(--gw-green);
}
.gw-mission-action:disabled{opacity:.55;cursor:progress}
.gw-secondary-objectives{margin-top:8px;color:var(--gw-muted)}
.gw-secondary-objectives summary{cursor:pointer;font:700 9px/1.3 var(--gw-font-mono);letter-spacing:.06em;text-transform:uppercase}
.gw-secondary-objectives[open] summary{margin-bottom:7px;color:var(--gw-blue)}
.gw-colony-objectives .gw-card{margin:0}
.gw-colony-instruction{
  padding:8px;
  border-left:2px solid var(--gw-orange);
  background:rgba(245,164,62,.07);
  color:#bacbd7;
}
.gw-landing-list,.gw-authority-queue-list{display:grid;gap:6px;margin:8px 0}
.gw-landing-list .gw-tool{text-align:left}
.gw-authority-queue-list .gw-card>span{float:right;color:var(--gw-blue);font-family:var(--gw-font-mono)}
.gw-authority-queue{border-left:2px solid var(--gw-green)}
.gw-colony-summary{border-color:rgba(52,240,138,.40);color:#d8f9e7}

.gw-colony-fog{
  position:absolute;
  left:-720px;
  top:-500px;
  width:1440px;
  height:1000px;
  z-index:9;
  display:grid;
  place-content:center;
  gap:5px;
  pointer-events:none;
  color:#e7f5ff;
  font:800 15px/1.3 var(--gw-font-mono);
  letter-spacing:.12em;
  text-align:center;
  text-transform:uppercase;
  text-shadow:0 2px 8px #000;
  transition:background .3s ease,opacity .3s ease;
}
.gw-colony-fog span{max-width:480px;color:#9fb5c6;font-size:10px;letter-spacing:.05em}
.gw-colony-fog.full{
  background:
    repeating-linear-gradient(115deg,rgba(5,11,18,.22) 0 12px,rgba(18,31,42,.30) 12px 24px),
    radial-gradient(circle at 48% 47%,rgba(36,52,61,.84),rgba(2,8,14,.97) 64%);
}
.gw-colony-fog.partial{
  place-content:start center;
  padding-top:70px;
  opacity:1;
  background:
    radial-gradient(circle at 42% 48%,transparent 0 24%,rgba(7,13,20,.06) 47%,rgba(2,7,12,.20) 100%),
    repeating-linear-gradient(125deg,transparent 0 45px,rgba(113,169,197,.07) 45px 47px);
}
.gw-colony-fog.partial strong,.gw-colony-fog.partial span{opacity:calc(.42 + var(--gw-fog-coverage,.56) * .42)}
.gw-landing-zone{
  position:absolute;
  z-index:12;
  width:88px;
  min-height:64px;
  transform:translate(-50%,-78%);
  border:1px solid rgba(52,240,138,.72);
  border-radius:50% 50% 8px 8px;
  background:rgba(5,24,24,.92);
  color:var(--gw-green);
  box-shadow:0 0 0 4px rgba(52,240,138,.08),0 0 24px rgba(52,240,138,.20);
  cursor:pointer;
  font-family:var(--gw-font-mono);
}
.gw-landing-zone>span{display:block;font:900 15px/1.2 var(--gw-font-display)}
.gw-landing-zone small{display:block;color:#bad9cc;font-size:7px;line-height:1.35}
.gw-landing-zone.invalid{
  border-color:rgba(255,92,92,.72);
  background:rgba(35,10,14,.9);
  color:var(--gw-red);
  box-shadow:0 0 0 4px rgba(255,92,92,.07),0 0 18px rgba(255,92,92,.16);
}
.gw-landing-zone.selected{outline:2px solid #fff;outline-offset:3px}
.gw-landing-zone:disabled{cursor:not-allowed;filter:saturate(.55);opacity:.7}
.gw-colony-center-ghost{
  position:absolute;
  z-index:13;
  width:158px;
  min-height:82px;
  transform:translate(-50%,-92%);
  padding:10px;
  border:1px solid rgba(98,211,255,.75);
  background:rgba(3,15,25,.92);
  box-shadow:0 0 28px rgba(98,211,255,.24),inset 0 0 24px rgba(98,211,255,.08);
  color:var(--gw-blue);
  font:800 9px/1.4 var(--gw-font-mono);
  text-align:center;
  text-transform:uppercase;
}
.gw-colony-center-ghost:before{
  content:"";
  position:absolute;
  left:50%;
  top:100%;
  height:70px;
  border-left:1px dashed rgba(98,211,255,.68);
}
.gw-colony-center-ghost span{display:block;margin-top:3px;color:#c9dce8}
.gw-surface-road-tile.authoritative{background:var(--gw-orange);box-shadow:0 0 10px rgba(245,164,62,.38)}

@media (prefers-reduced-motion:reduce){
  .gw-colony-fog,.gw-toast{transition:none}
}

/* ===== Surface hybrid art pass (PA structure + Anno warmth) — 2026-07-13 ===== */
/* Screen-space atmosphere: warm key light upper-left, cool vignette at edges. */
.gw-surface.active::before{
  content:"";position:absolute;inset:0;pointer-events:none;z-index:8;
  background:
    radial-gradient(ellipse 90% 70% at 22% 12%,rgba(255,214,150,.12),transparent 55%),
    radial-gradient(ellipse 140% 120% at 50% 50%,transparent 58%,rgba(4,10,18,.42) 100%);
}
/* Slow drifting cloud shadows over the terrain. */
.gw-surface.active::after{
  content:"";position:absolute;inset:-40%;pointer-events:none;z-index:7;
  background:
    radial-gradient(ellipse 430px 250px at 30% 35%,rgba(8,14,22,.16),transparent 70%),
    radial-gradient(ellipse 560px 300px at 72% 62%,rgba(8,14,22,.13),transparent 70%),
    radial-gradient(ellipse 380px 220px at 55% 18%,rgba(8,14,22,.10),transparent 70%);
  animation:gw-cloud-drift 90s linear infinite alternate;
}
@keyframes gw-cloud-drift{
  from{transform:translate(-4%,-2%)}
  to{transform:translate(4%,2%)}
}
/* Gentle sun-glint shimmer on open water. */
.gw-surface-ocean::after{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:radial-gradient(ellipse 55% 30% at 30% 26%,rgba(255,232,180,.10),transparent 65%);
  animation:gw-sea-glint 14s ease-in-out infinite alternate;
}
@keyframes gw-sea-glint{
  from{opacity:.55}
  to{opacity:1}
}
/* Warm the large decor pieces to sit in the same light as the tiles. */
.gw-extra-island{background:linear-gradient(135deg,#6f9152,#4d6f3e 60%,#3c5733)}
.gw-extra-farm{
  background:
    repeating-linear-gradient(0deg,rgba(213,183,94,.88) 0 18px,rgba(168,142,62,.85) 18px 34px),
    repeating-linear-gradient(90deg,rgba(0,0,0,0) 0 48px,rgba(92,74,30,.24) 48px 52px);
  border:1px solid rgba(238,220,150,.20);
}
.gw-extra-forest{
  background:
    radial-gradient(circle at 18% 38%,#4d8050 0 10px,transparent 11px),
    radial-gradient(circle at 40% 56%,#457647 0 12px,transparent 13px),
    radial-gradient(circle at 63% 33%,#528455 0 11px,transparent 12px),
    radial-gradient(circle at 78% 64%,#3f6b42 0 12px,transparent 13px),
    radial-gradient(circle at 27% 72%,#578a58 0 10px,transparent 11px);
}
.gw-extra-highrise{filter:drop-shadow(0 8px 8px rgba(6,12,18,.4)) drop-shadow(0 0 10px rgba(255,210,140,.12))}
@media (prefers-reduced-motion:reduce){
  .gw-surface.active::after,.gw-surface-ocean::after{animation:none}
  .gw-surface-tile,.gw-surface-building{transition:none}
}

/* Hybrid pass part 2: let the tile grid own the frame — decor recedes. */
.gw-extra-district,.gw-extra-highrise,.gw-extra-island,.gw-extra-forest,
.gw-extra-farm,.gw-extra-harbor,.gw-extra-crater,.gw-extra-pad,.gw-extra-mine{opacity:.62}
.gw-continent{opacity:.85}
/* Soften the two loudest tile families so play-space reads calmly. */
.gw-surface-tile.terrain-ocean{background:linear-gradient(135deg,#1a506e,#113a54 60%,#0d2c44)}
.gw-surface-tile.terrain-farms,.gw-surface-tile.terrain-lowland{background:repeating-linear-gradient(115deg,#b5a061 0 11px,#8f7d4a 11px 20px,#a08d55 20px 21px)}

/* Hybrid pass part 3: bring the v41 landscape decals into the same warm light. */
.gw-v41-coastline{
  background:
    linear-gradient(180deg,rgba(23,85,120,.94) 0 48%,rgba(12,44,66,.97) 48% 100%),
    radial-gradient(circle at 68% 35%,rgba(255,224,170,.10),transparent 32%);
  border:1px solid rgba(150,190,210,.10);
  box-shadow:inset 0 0 35px rgba(255,240,210,.04),0 0 25px rgba(4,10,16,.20);
}
.gw-v41-harbor{
  background:linear-gradient(180deg,#2c5b7c 0 52%,#173d58 52% 100%);
  border:1px solid rgba(170,200,215,.14);
}
.gw-v41-harbor:before{
  background:linear-gradient(90deg,#b3a58c 0 18%,transparent 18% 23%,#b3a58c 23% 50%,transparent 50% 56%,#b3a58c 56% 100%);
}
.gw-v41-harbor:after{
  background:linear-gradient(180deg,#d9cdb2,#8d8168);box-shadow:0 3px 8px rgba(4,10,16,.3);
}
.gw-v41-residential{
  background:
    linear-gradient(90deg,rgba(226,212,182,.20) 0 6px,transparent 6px 24px,rgba(226,212,182,.14) 24px 30px,transparent 30px 100%),
    linear-gradient(rgba(226,212,182,.14) 0 5px,transparent 5px 24px,rgba(226,212,182,.09) 24px 29px,transparent 29px 100%);
  background-size:48px 48px;
  border:1px solid rgba(226,212,182,.14);
  box-shadow:inset 0 0 24px rgba(255,240,210,.06),0 6px 14px rgba(4,10,16,.18);
}
.gw-v41-civic{
  background:
    linear-gradient(180deg,transparent 0 28px,rgba(196,182,150,.16) 28px 100%),
    repeating-linear-gradient(90deg,rgba(240,228,196,.28) 0 9px,transparent 9px 19px),
    linear-gradient(180deg,#8a8069,#4e4a3d);
  filter:drop-shadow(0 6px 8px rgba(4,10,16,.35)) drop-shadow(0 0 10px rgba(255,214,150,.10));
}
.gw-v41-industrial{
  background:
    linear-gradient(180deg,#57574f,#34362f),
    repeating-linear-gradient(90deg,rgba(255,186,96,.10) 0 18px,transparent 18px 34px);
  border:1px solid rgba(255,186,96,.16);
  box-shadow:inset 0 0 28px rgba(255,240,210,.04),0 6px 14px rgba(4,10,16,.20);
}
.gw-v41-fields{
  background:
    repeating-linear-gradient(0deg,rgba(196,172,102,.82) 0 18px,rgba(154,132,72,.78) 18px 34px),
    repeating-linear-gradient(90deg,rgba(0,0,0,0) 0 50px,rgba(92,74,30,.22) 50px 54px);
  border:1px solid rgba(230,212,150,.18);
}
.gw-v41-forest{
  background:
    radial-gradient(circle at 18% 38%,#4d8050 0 10px,transparent 11px),
    radial-gradient(circle at 40% 56%,#457647 0 12px,transparent 13px),
    radial-gradient(circle at 63% 33%,#528455 0 11px,transparent 12px),
    radial-gradient(circle at 78% 64%,#3f6b42 0 12px,transparent 13px),
    radial-gradient(circle at 27% 72%,#578a58 0 10px,transparent 11px);
}
.gw-v41-road{
  background:linear-gradient(180deg,#a9a294 0 35%,#8b8577 35% 100%);
  box-shadow:0 2px 4px rgba(6,12,18,.3);
}

/* Hybrid pass part 4: generated photoreal terrain textures (AIGateway imagegen).
   Each terrain = texture crop + the same warm top-left light overlay. */
.gw-surface-tile{background-size:290px 290px;background-blend-mode:normal}
.gw-surface-tile.terrain-ocean{background:linear-gradient(135deg,rgba(255,236,200,.10),rgba(6,20,34,.38) 70%),url(/assets/demo-alpha/surface/tiles/ocean.png);background-size:cover,300px 300px}
.gw-surface-tile.terrain-coastline,.gw-surface-tile.terrain-coast{background:linear-gradient(135deg,rgba(255,236,200,.12),rgba(10,22,30,.30) 75%),url(/assets/demo-alpha/surface/tiles/coast.png);background-size:cover,300px 300px}
.gw-surface-tile.terrain-grassland,.gw-surface-tile.terrain-plain{background:linear-gradient(135deg,rgba(255,236,200,.14),rgba(10,24,16,.32) 75%),url(/assets/demo-alpha/surface/tiles/grass.png);background-size:cover,280px 280px}
.gw-surface-tile.terrain-forest{background:linear-gradient(135deg,rgba(255,236,200,.10),rgba(6,18,10,.40) 75%),url(/assets/demo-alpha/surface/tiles/forest.png);background-size:cover,300px 300px}
.gw-surface-tile.terrain-farms,.gw-surface-tile.terrain-lowland{background:linear-gradient(135deg,rgba(255,236,200,.12),rgba(30,22,8,.30) 78%),url(/assets/demo-alpha/surface/tiles/farms.png);background-size:cover,320px 320px}
.gw-surface-tile.terrain-city,.gw-surface-tile.terrain-industrial,.gw-surface-tile.terrain-industrial_pad,.gw-surface-tile.terrain-platform_deck{background:linear-gradient(135deg,rgba(255,236,200,.12),rgba(12,16,20,.36) 75%),url(/assets/demo-alpha/surface/tiles/city.png);background-size:cover,280px 280px}
.gw-surface-tile.terrain-roads{background:linear-gradient(135deg,rgba(180,170,150,.20),rgba(10,12,14,.48) 80%),url(/assets/demo-alpha/surface/tiles/city.png);background-size:cover,260px 260px}
.gw-surface-tile.terrain-ports,.gw-surface-tile.terrain-landing_zone{background:linear-gradient(135deg,rgba(150,190,220,.22),rgba(10,18,26,.40) 78%),url(/assets/demo-alpha/surface/tiles/city.png);background-size:cover,300px 300px}
.gw-surface-tile.terrain-luna_crater_field,.gw-surface-tile.terrain-crater,.gw-surface-tile.terrain-regolith{background:linear-gradient(135deg,rgba(255,244,220,.10),rgba(10,12,16,.36) 75%),url(/assets/demo-alpha/surface/tiles/lunar.png);background-size:cover,300px 300px}
.gw-surface-tile.terrain-mars_regolith,.gw-surface-tile.terrain-rocky_desert,.gw-surface-tile.terrain-rocky_plains{background:linear-gradient(135deg,rgba(255,214,160,.12),rgba(28,10,4,.34) 78%),url(/assets/demo-alpha/surface/tiles/mars.png);background-size:cover,300px 300px}
.gw-surface-tile.terrain-canyon{background:linear-gradient(135deg,rgba(255,214,160,.08),rgba(20,6,2,.52) 80%),url(/assets/demo-alpha/surface/tiles/mars.png);background-size:cover,260px 260px}
.gw-surface-tile.terrain-ice{background:linear-gradient(135deg,rgba(255,250,240,.14),rgba(14,26,36,.30) 78%),url(/assets/demo-alpha/surface/tiles/ice.png);background-size:cover,300px 300px}
/* Crop variety is set per-tile inline from renderSurfaceTiles (deterministic by grid cell). */

/* Hybrid pass part 5: textured landmasses & generated decals. */
.gw-continent{background:linear-gradient(135deg,rgba(255,236,200,.16),rgba(40,48,26,.34) 78%),url(/assets/demo-alpha/surface/tiles/grass.png);background-size:cover,900px 900px;opacity:1}
.gw-extra-island{background:linear-gradient(135deg,rgba(255,236,200,.14),rgba(24,36,20,.36) 80%),url(/assets/demo-alpha/surface/tiles/grass.png);background-size:cover,600px 600px;opacity:.9}
.gw-extra-forest,.gw-v41-forest{background:linear-gradient(135deg,rgba(255,236,200,.08),rgba(6,18,10,.34) 80%),url(/assets/demo-alpha/surface/tiles/forest.png);background-size:cover,420px 420px;border-radius:34% 46% 40% 52%;opacity:.95}
.gw-extra-farm,.gw-v41-fields{background:linear-gradient(135deg,rgba(255,236,200,.10),rgba(30,22,8,.26) 80%),url(/assets/demo-alpha/surface/tiles/farms.png);background-size:cover,460px 460px;border:1px solid rgba(230,212,150,.14);opacity:.95}
.gw-v41-harbor{background:linear-gradient(135deg,rgba(255,236,200,.08),rgba(6,16,26,.30) 80%),url(/assets/demo-alpha/surface/decals/harbor.png);background-size:cover,cover;border:1px solid rgba(170,200,215,.16)}
.gw-v41-harbor:before,.gw-v41-harbor:after{display:none}
.gw-v41-residential,.gw-extra-district{background:linear-gradient(135deg,rgba(255,236,200,.10),rgba(10,14,18,.32) 80%),url(/assets/demo-alpha/surface/decals/residential.png);background-size:cover,cover;border:1px solid rgba(226,212,182,.16)}
.gw-v41-industrial,.gw-extra-mine{background:linear-gradient(135deg,rgba(255,236,200,.06),rgba(8,10,12,.36) 80%),url(/assets/demo-alpha/surface/decals/industrial.png);background-size:cover,cover;border:1px solid rgba(255,186,96,.14)}
.gw-extra-district,.gw-extra-highrise,.gw-extra-island,.gw-extra-forest,.gw-extra-farm,.gw-extra-harbor,.gw-extra-crater,.gw-extra-pad,.gw-extra-mine{opacity:.92}

/* Hybrid pass part 6: photoreal roof-view building textures + orbital nebula backdrop. */
.gw-surface-building{border-radius:3px;overflow:hidden}
.gw-surface-building:before{display:none} /* textured roofs replace the gable pseudo-roof */
.gw-surface-building.building-city_block{background:url(/assets/demo-alpha/surface/buildings/cityblock.png) center/cover}
.gw-surface-building.building-habitat_district{background:url(/assets/demo-alpha/surface/buildings/habitat.png) center/cover}
.gw-surface-building.building-coastal_port,.gw-surface-building.building-spaceport{background:url(/assets/demo-alpha/surface/buildings/port.png) center/cover}
.gw-surface-building.building-landing_pad{background:url(/assets/demo-alpha/surface/buildings/landing.png) center/cover}
.gw-surface-building.building-mining_district{background:url(/assets/demo-alpha/surface/buildings/mining.png) center/cover}
.gw-surface-building.building-reactor_district{background:url(/assets/demo-alpha/surface/buildings/reactor.png) center/cover}
.gw-surface-building.building-research_district,.gw-surface-building.building-sensor_array_surface{background:url(/assets/demo-alpha/surface/buildings/research.png) center/cover}
.gw-surface-building.building-surface_outpost,.gw-surface-building.building-command_center{background:url(/assets/demo-alpha/surface/buildings/command.png) center/cover}
.gw-surface-building.building-trade_hub_surface,.gw-surface-building.building-fuel_depot,.gw-surface-building.building-propellant_depot{background:url(/assets/demo-alpha/surface/buildings/trade.png) center/cover}
/* Retire the spiky clip-path skylines: aerial city texture instead. */
.gw-city{background:url(/assets/demo-alpha/surface/buildings/cityblock.png) center/cover;clip-path:none;border-radius:4px;border:1px solid rgba(24,32,40,.55);box-shadow:0 3px 0 rgba(20,26,32,.5),0 10px 16px rgba(4,10,16,.4);filter:none}
.gw-v41-civic,.gw-extra-highrise{background:url(/assets/demo-alpha/surface/buildings/cityblock.png) center/cover;clip-path:none;border-radius:6px;border:1px solid rgba(24,32,40,.5);filter:none;box-shadow:0 10px 18px rgba(4,10,16,.4)}
/* Orbital space backdrop. */
.gw-viewport{background:linear-gradient(rgba(2,8,18,.62),rgba(2,8,18,.62)),url(/assets/demo-alpha/surface/space/nebula.png) center/cover #020812}
.gw-stage{background:linear-gradient(rgba(2,8,18,.62),rgba(2,8,18,.62)),url(/assets/demo-alpha/surface/space/nebula.png) center/cover #020812}

/* ===== RTS grid pass (2026-07-14): contiguous ground plane, snapped placement ===== */
/* Tiles: axis-aligned 88px cells, no skew/rotate, seamless texture slices. */
.gw-surface-tile{width:88px;height:88px;transform:translate(-50%,-50%);border:none;box-shadow:inset 0 0 0 1px rgba(10,16,22,.14);background-size:528px 528px;transition:box-shadow .12s ease,filter .12s ease}
.gw-surface-tile:hover{transform:translate(-50%,-50%);border:none;box-shadow:inset 0 0 0 2px rgba(255,196,110,.9),inset 0 0 22px rgba(255,183,92,.18);filter:brightness(1.12)}
.gw-surface-tile.buildable{outline:none}
.gw-surface-tile.blocked{outline:none}
.gw-surface-tile.preview-ok{border:none;box-shadow:inset 0 0 0 2px rgba(158,224,128,.95),inset 0 0 26px rgba(158,224,128,.22);filter:brightness(1.1)}
.gw-surface-tile.preview-bad{border:none;box-shadow:inset 0 0 0 2px rgba(232,116,96,.95),inset 0 0 26px rgba(232,116,96,.18)}
/* Single texture layer per terrain (light comes from the screen-space pass). */
.gw-surface-tile.terrain-ocean{background-image:url(/assets/demo-alpha/surface/tiles/ocean.png)}
.gw-surface-tile.terrain-coastline,.gw-surface-tile.terrain-coast{background-image:url(/assets/demo-alpha/surface/tiles/coast.png)}
.gw-surface-tile.terrain-grassland,.gw-surface-tile.terrain-plain{background-image:url(/assets/demo-alpha/surface/tiles/grass.png)}
.gw-surface-tile.terrain-forest{background-image:url(/assets/demo-alpha/surface/tiles/forest.png)}
.gw-surface-tile.terrain-farms,.gw-surface-tile.terrain-lowland{background-image:url(/assets/demo-alpha/surface/tiles/farms.png)}
.gw-surface-tile.terrain-city,.gw-surface-tile.terrain-industrial,.gw-surface-tile.terrain-industrial_pad,.gw-surface-tile.terrain-platform_deck{background-image:url(/assets/demo-alpha/surface/tiles/city.png)}
.gw-surface-tile.terrain-roads{background-image:url(/assets/demo-alpha/surface/tiles/city.png);filter:brightness(.82)}
.gw-surface-tile.terrain-ports,.gw-surface-tile.terrain-landing_zone{background-image:url(/assets/demo-alpha/surface/tiles/city.png);filter:saturate(.8) brightness(1.05)}
.gw-surface-tile.terrain-luna_crater_field,.gw-surface-tile.terrain-crater,.gw-surface-tile.terrain-regolith{background-image:url(/assets/demo-alpha/surface/tiles/lunar.png)}
.gw-surface-tile.terrain-mars_regolith,.gw-surface-tile.terrain-rocky_desert,.gw-surface-tile.terrain-rocky_plains{background-image:url(/assets/demo-alpha/surface/tiles/mars.png)}
.gw-surface-tile.terrain-canyon{background-image:url(/assets/demo-alpha/surface/tiles/mars.png);filter:brightness(.7)}
.gw-surface-tile.terrain-ice{background-image:url(/assets/demo-alpha/surface/tiles/ice.png)}
/* Buildings: square footprints snapped to cells, grounded, readable. */
.gw-surface-building{width:80px;height:80px;border-radius:4px}
.gw-surface-building:hover{transform:translate(-50%,-52%)}
/* Roads: axis-aligned connector strips. */
.gw-surface-road-tile{width:84px;height:14px;transform:translate(-50%,-50%);border-radius:2px}
/* Cities/domes scale with the new cells. */
.gw-city{width:84px;height:84px}
.gw-dome{width:72px;height:44px}
/* The decorative landscape recedes further so the play grid owns the frame. */
.gw-continent{opacity:.55}
.gw-extra-district,.gw-extra-highrise,.gw-extra-island,.gw-extra-forest,.gw-extra-farm,.gw-extra-harbor,.gw-extra-crater,.gw-extra-pad,.gw-extra-mine{opacity:.45}
.gw-v41-coastline,.gw-v41-harbor,.gw-v41-residential,.gw-v41-industrial,.gw-v41-civic,.gw-v41-fields,.gw-v41-forest,.gw-v41-landing,.gw-v41-road{opacity:.45}

/* ===== RTS units + system pass 2 (2026-07-14) ===== */
/* 3D-feel planets: sphere shading (sunlit upper-left, shadowed limb) + soft glow. */
.gw-body{border-radius:50%}
.gw-body::after{
  content:"";position:absolute;inset:0;border-radius:50%;pointer-events:none;
  background:
    radial-gradient(circle at 32% 28%,rgba(255,244,220,.28),transparent 42%),
    radial-gradient(circle at 72% 78%,rgba(2,6,12,.55),transparent 62%);
}
.gw-body img{border-radius:50%}
.gw-body[data-id="sun"]::after{background:radial-gradient(circle at 50% 50%,transparent 55%,rgba(255,180,80,.25) 75%,transparent 100%)}
.gw-body[data-id="saturn"]::after{border-radius:0} /* rings extend past the disc */
/* Unexplored worlds show no man-made decor of any kind. */
.gw-surface-world:not([data-planet-style="earth"]) .gw-v41-harbor,
.gw-surface-world:not([data-planet-style="earth"]) .gw-v41-residential,
.gw-surface-world:not([data-planet-style="earth"]) .gw-v41-civic,
.gw-surface-world:not([data-planet-style="earth"]) .gw-v41-industrial,
.gw-surface-world:not([data-planet-style="earth"]) .gw-v41-fields,
.gw-surface-world:not([data-planet-style="earth"]) .gw-v41-landing,
.gw-surface-world:not([data-planet-style="earth"]) .gw-v41-road,
.gw-surface-world:not([data-planet-style="earth"]) .gw-extra-district,
.gw-surface-world:not([data-planet-style="earth"]) .gw-extra-highrise,
.gw-surface-world:not([data-planet-style="earth"]) .gw-extra-farm,
.gw-surface-world:not([data-planet-style="earth"]) .gw-extra-harbor,
.gw-surface-world:not([data-planet-style="earth"]) .gw-extra-pad,
.gw-surface-world:not([data-planet-style="earth"]) .gw-extra-mine,
.gw-surface-world:not([data-planet-style="earth"]) .gw-product-district,
.gw-surface-world:not([data-planet-style="earth"]) .gw-product-road,
.gw-surface-world:not([data-planet-style="earth"]) .gw-city,
.gw-surface-world:not([data-planet-style="earth"]) .gw-dome{display:none}
/* Surface units. */
.gw-sunit-layer{position:absolute;left:0;top:0;width:0;height:0;z-index:9}
.gw-sunit{
  position:absolute;width:22px;height:22px;transform:translate(-50%,-50%);
  border-radius:50%;display:flex;align-items:center;justify-content:center;
  font:700 10px/1 var(--gw-font-mono,monospace);color:#0b1a10;cursor:pointer;
  border:2px solid rgba(10,16,22,.6);box-shadow:0 3px 6px rgba(4,10,16,.4);z-index:9;
}
.gw-sunit.selected{box-shadow:0 0 0 3px rgba(255,196,110,.9),0 3px 8px rgba(4,10,16,.5)}
/* Solid placeholder fill colors used to live here (background:#hex per
   type) from before real sprite art existed. Every type now has a real
   PNG (see the sunit-* background-image rules below), but these
   .gw-sunit.sunit-X selectors are MORE specific than the later plain
   .gw-sunit{background-color:transparent} reset, so the old fill colors
   kept winning the cascade and bled through around/behind the sprite --
   exactly the "yellow block" LT was seeing on the worker unit. Removed;
   plane keeps its distinct hover box-shadow, the rest have nothing left
   to override once the color is gone. */
.gw-sunit.sunit-plane{box-shadow:0 10px 10px rgba(4,10,16,.35)}
/* Construction sites. */
.gw-surface-building.constructing{opacity:.55;filter:grayscale(.6);outline:2px dashed rgba(255,196,110,.7)}
.gw-build-progress{position:absolute;left:6px;right:6px;bottom:4px;height:5px;background:rgba(6,12,18,.7);border-radius:2px;overflow:hidden}
.gw-build-progress div{height:100%;background:linear-gradient(90deg,#f0b25a,#ffd9a0);width:0%}
/* Top-right sandbox reset. */
.gw-reset-sandbox{cursor:pointer;border:1px solid rgba(224,110,92,.55)!important;color:#e2604f!important;background:rgba(224,110,92,.08)}
.gw-reset-sandbox:hover{background:rgba(224,110,92,.2)}

/* ===== Layer cleanup + env minimap + intel window (2026-07-14) ===== */
/* LT: overlapping planet-side layers — the legacy decor generations were built
   for the old diamond layout and fight the RTS grid. Retire them entirely;
   the terrain grid, buildings, and units now carry the whole scene. */
.gw-surface-world .gw-continent,
.gw-surface-world [class^="gw-extra-"],.gw-surface-world [class*=" gw-extra-"],
.gw-surface-world [class^="gw-v41-"]:not(.gw-v41-surface-btn),.gw-surface-world [class*=" gw-v41-"]:not(.gw-v41-surface-btn),
.gw-surface-world .gw-product-terrain-layer{display:none!important}
/* Surface-theater minimap. */
.gw-mini-surface{display:grid;gap:1px;width:100%;height:78%;}
.gw-mini-surface i{display:block;width:100%;height:100%}
.gw-mini-surface-dots{position:absolute;left:0;top:0;width:100%;height:78%;pointer-events:none}
.gw-mini-surface-dots b{position:absolute;width:6px;height:6px;transform:translate(-50%,-50%);background:#f5a43e;border-radius:1px;box-shadow:0 0 5px rgba(245,164,62,.7)}
.gw-env-tabs{display:flex;gap:4px;margin-top:6px}
.gw-env-tabs button{flex:1;font:600 9px/1 var(--gw-font-mono,monospace);text-transform:uppercase;letter-spacing:.04em;padding:5px 2px;background:rgba(7,18,31,.85);border:1px solid rgba(98,211,255,.25);color:var(--gw-text,#dfe6e8);cursor:pointer;border-radius:3px}
.gw-env-tabs button.active{border-color:#f5a43e;color:#f5a43e}
.gw-env-tabs button:hover{border-color:var(--gw-blue,#62d3ff)}
.gw-popout-intel{cursor:pointer;border:1px solid rgba(98,211,255,.4)!important;color:#62d3ff!important;background:rgba(98,211,255,.06)}
.gw-popout-intel:hover{background:rgba(98,211,255,.15)}

/* ===== Ocean + Underground theaters (2026-07-14) ===== */
.gw-surface-world.theater-ocean{background:linear-gradient(180deg,#04283f,#02141f 70%)}
.gw-surface-world.theater-underground{background:linear-gradient(180deg,#150d08,#0a0503 70%)}
/* Seafloor terrain: existing textures re-lit for depth. */
.gw-surface-tile.tho-seafloor_plain{background-image:url(/assets/demo-alpha/surface/tiles/coast.png);filter:hue-rotate(165deg) saturate(.55) brightness(.55)}
.gw-surface-tile.tho-reef{background-image:url(/assets/demo-alpha/surface/tiles/forest.png);filter:hue-rotate(115deg) saturate(.75) brightness(.6)}
.gw-surface-tile.tho-trench{background-image:url(/assets/demo-alpha/surface/tiles/ocean.png);filter:brightness(.35) saturate(.7)}
.gw-surface-tile.tho-vent{background-image:url(/assets/demo-alpha/surface/tiles/lunar.png);filter:sepia(.6) hue-rotate(-28deg) brightness(.62)}
.gw-surface-tile.tho-vent::after{content:"";position:absolute;inset:30%;border-radius:50%;background:radial-gradient(circle,rgba(255,140,60,.75),transparent 70%);animation:gw-vent 2.6s ease-in-out infinite alternate}
@keyframes gw-vent{from{opacity:.4}to{opacity:1}}
/* Underground: rock, tunnels, and what the digs reveal. */
.gw-surface-tile.thu-rock{background-image:url(/assets/demo-alpha/surface/tiles/mars.png);filter:brightness(.32) saturate(.6);cursor:not-allowed}
.gw-surface-tile.thu-rock.thu-diggable{cursor:pointer;box-shadow:inset 0 0 0 1px rgba(255,196,110,.35)}
.gw-surface-tile.thu-rock.thu-diggable:hover{filter:brightness(.5) saturate(.7);box-shadow:inset 0 0 0 2px rgba(255,196,110,.85)}
.gw-surface-tile.thu-dug{background-image:url(/assets/demo-alpha/surface/tiles/lunar.png);filter:sepia(.35) brightness(.75)}
.gw-surface-tile.thu-dug::after{position:absolute;right:6px;bottom:4px;font:700 12px/1 monospace;text-shadow:0 1px 2px #000}
.gw-surface-tile.thu-metals::after{content:"M";color:#c8d4e0}
.gw-surface-tile.thu-coal::after{content:"C";color:#8a8f96}
.gw-surface-tile.thu-rare::after{content:"R";color:#9fd8ff}
.gw-surface-tile.thu-water::after{content:"W";color:#6fc3e8}
.gw-surface-tile.thu-artifact::after{content:"A";color:#ffd27a}
.gw-surface-tile.thu-lava{background-image:url(/assets/demo-alpha/surface/tiles/mars.png);filter:brightness(1.05) saturate(1.6) hue-rotate(-18deg)}
.gw-surface-tile.thu-lava::after{content:"";position:absolute;inset:0;background:radial-gradient(circle at 50% 55%,rgba(255,96,32,.55),transparent 70%);animation:gw-vent 1.8s ease-in-out infinite alternate}
/* Theater buildings: distinct silhouettes without new art. */
.gw-surface-building.theater-building{width:76px;height:76px;border-radius:8px}
.gw-surface-building.tb-seafloor_habitat{background:url(/assets/demo-alpha/surface/buildings/habitat.png) center/cover;filter:hue-rotate(160deg) saturate(.7) brightness(.75)}
.gw-surface-building.tb-kelp_farm{background:url(/assets/demo-alpha/surface/tiles/forest.png) center/cover;filter:hue-rotate(110deg) brightness(.7);border-radius:50%}
.gw-surface-building.tb-vent_mine{background:url(/assets/demo-alpha/surface/buildings/mining.png) center/cover;filter:hue-rotate(150deg) saturate(.6) brightness(.7)}
.gw-surface-building.tb-sub_pen{background:url(/assets/demo-alpha/surface/buildings/port.png) center/cover;filter:hue-rotate(160deg) saturate(.65) brightness(.65)}
.gw-surface-building.tb-tidal_generator{background:url(/assets/demo-alpha/surface/buildings/reactor.png) center/cover;filter:hue-rotate(140deg) brightness(.7)}
.gw-surface-building.tb-under_habitat{background:url(/assets/demo-alpha/surface/buildings/habitat.png) center/cover;filter:sepia(.5) brightness(.7)}
.gw-surface-building.tb-deep_mine{background:url(/assets/demo-alpha/surface/buildings/mining.png) center/cover;filter:sepia(.4) brightness(.65)}
.gw-surface-building.tb-geothermal_plant{background:url(/assets/demo-alpha/surface/buildings/reactor.png) center/cover;filter:sepia(.5) hue-rotate(-20deg) brightness(.8)}
.gw-surface-building.tb-vault{background:url(/assets/demo-alpha/surface/buildings/command.png) center/cover;filter:sepia(.4) brightness(.6)}
.gw-surface-building.tb-artifact_lab{background:url(/assets/demo-alpha/surface/buildings/research.png) center/cover;filter:sepia(.35) brightness(.7)}

/* Orbital placement slots (green ring picks). */
.gw-orbit-slot{position:absolute;width:26px;height:26px;transform:translate(-50%,-50%);border-radius:50%;border:2px solid rgba(120,255,150,.9);background:rgba(80,220,120,.28);box-shadow:0 0 16px rgba(120,255,150,.55);cursor:pointer;z-index:30;animation:gw-slot-pulse 1.4s ease-in-out infinite alternate}
.gw-orbit-slot:hover{background:rgba(120,255,150,.5)}
@keyframes gw-slot-pulse{from{transform:translate(-50%,-50%) scale(1)}to{transform:translate(-50%,-50%) scale(1.25)}}
@media (prefers-reduced-motion:reduce){.gw-orbit-slot{animation:none}}

/* ===== Unit sprites + one-square buildings (2026-07-14) ===== */
/* Surface buildings occupy exactly one 88px grid cell. */
.gw-surface-building{width:84px;height:84px}
.gw-surface-building.theater-building{width:84px;height:84px}
/* Surface units: generated sprite chips (zoomed center crop, circular). */
.gw-sunit{width:30px;height:30px;font-size:0;background-size:190%;background-position:center}
.gw-sunit.sunit-worker{background-image:url(/assets/demo-alpha/surface/units/worker.png)}
.gw-sunit.sunit-marine{background-image:url(/assets/demo-alpha/surface/units/marine.png)}
.gw-sunit.sunit-tank{background-image:url(/assets/demo-alpha/surface/units/tank.png);border-radius:6px}
.gw-sunit.sunit-plane{background-image:url(/assets/demo-alpha/surface/units/plane.png)}
.gw-sunit.sunit-warship{background-image:url(/assets/demo-alpha/surface/units/warship.png);border-radius:8px}
.gw-sunit.sunit-submarine{background-image:url(/assets/demo-alpha/surface/units/submarine.png);border-radius:12px}

/* LT's transparent ChatGPT sprites (2026-07-14): full silhouettes, no chip. */
.gw-sunit{width:36px;height:36px;background-color:transparent;background-size:contain;background-repeat:no-repeat;background-position:center;border:none;border-radius:0;box-shadow:0 4px 6px rgba(4,10,16,.35)}
.gw-sunit.selected{box-shadow:0 0 0 2px rgba(255,196,110,.95),0 4px 8px rgba(4,10,16,.5);border-radius:50%}
.gw-sunit.sunit-tank,.gw-sunit.sunit-warship,.gw-sunit.sunit-submarine{border-radius:0}

/* ===== Gap-fill building art (imagegen placeholders; LT filenames) ===== */
.gw-surface-building.building-barracks{background:url(/assets/demo-alpha/surface/buildings/barracks.png) center/cover}
.gw-surface-building.building-factory{background:url(/assets/demo-alpha/surface/buildings/factory.png) center/cover}
.gw-surface-building.building-airport{background:url(/assets/demo-alpha/surface/buildings/airport.png) center/cover}
.gw-surface-building.building-shipyard_surface{background:url(/assets/demo-alpha/surface/buildings/shipyard_wharf.png) center/cover}
.gw-surface-building.building-rocket_facility{background:url(/assets/demo-alpha/surface/buildings/rocket_facility.png) center/cover}
.gw-surface-building.building-fishery{background:url(/assets/demo-alpha/surface/buildings/fishery.png) center/cover}
.gw-surface-building.building-windmill{background:url(/assets/demo-alpha/surface/buildings/windmill.png) center/cover}
.gw-surface-building.building-solar_array{background:url(/assets/demo-alpha/surface/buildings/solar_array.png) center/cover}
.gw-surface-building.building-wave_generator{background:url(/assets/demo-alpha/surface/buildings/wave_generator.png) center/cover}
.gw-surface-building.tb-seafloor_habitat{background:url(/assets/demo-alpha/surface/buildings/sea_habitat.png) center/cover;filter:none}
.gw-surface-building.tb-kelp_farm{background:url(/assets/demo-alpha/surface/buildings/sea_kelp_farm.png) center/cover;filter:none;border-radius:8px}
.gw-surface-building.tb-vent_mine{background:url(/assets/demo-alpha/surface/buildings/sea_vent_mine.png) center/cover;filter:none}
.gw-surface-building.tb-sub_pen{background:url(/assets/demo-alpha/surface/buildings/sea_sub_pen.png) center/cover;filter:none}
.gw-surface-building.tb-tidal_generator{background:url(/assets/demo-alpha/surface/buildings/sea_tidal_gen.png) center/cover;filter:none}
.gw-surface-building.tb-under_habitat{background:url(/assets/demo-alpha/surface/buildings/under_habitat.png) center/cover;filter:none}
.gw-surface-building.tb-deep_mine{background:url(/assets/demo-alpha/surface/buildings/under_deep_mine.png) center/cover;filter:none}
.gw-surface-building.tb-geothermal_plant{background:url(/assets/demo-alpha/surface/buildings/under_geothermal.png) center/cover;filter:none}
.gw-surface-building.tb-vault{background:url(/assets/demo-alpha/surface/buildings/under_vault.png) center/cover;filter:none}
.gw-surface-building.tb-artifact_lab{background:url(/assets/demo-alpha/surface/buildings/under_artifact_lab.png) center/cover;filter:none}

/* ===== Planet-scale terrain (2026-07-14): new landform tiles ===== */
.gw-surface-tile.terrain-mountain{background-image:url(/assets/demo-alpha/surface/tiles/lunar.png);filter:brightness(.72) saturate(.5);cursor:not-allowed}
.gw-surface-tile.terrain-cliff{background-image:url(/assets/demo-alpha/surface/tiles/mars.png);filter:brightness(.5) saturate(.55);cursor:not-allowed}
.gw-surface-tile.terrain-hills{background-image:url(/assets/demo-alpha/surface/tiles/grass.png);filter:brightness(.8) saturate(.85)}
.gw-surface-tile.terrain-valley{background-image:url(/assets/demo-alpha/surface/tiles/grass.png);filter:brightness(1.12) saturate(1.05)}

/* ===== Ambient NPC life (AI-driven, not selectable) ===== */
.gw-npc-layer{position:absolute;left:0;top:0;width:0;height:0;z-index:7;pointer-events:none}
.gw-npc{position:absolute;transform:translate(-50%,-50%);pointer-events:none;background-repeat:no-repeat;background-size:500% 500%;filter:drop-shadow(0 2px 2px rgba(4,10,16,.4))}
.gw-npc.npc-civilian{width:16px;height:16px;background-image:url(/assets/demo-alpha/surface/units/npc_civilians_sheet.png)}
.gw-npc.npc-animal{width:18px;height:18px;background-image:url(/assets/demo-alpha/surface/units/npc_creatures_sheet.png)}
.gw-npc.npc-farm{width:16px;height:16px;background-image:url(/assets/demo-alpha/surface/units/npc_creatures_sheet.png)}

/* ===== Anno-style continuity pass: terrain reads as land, not grid ===== */
.gw-surface-tile{box-shadow:none}
.gw-surface-tile:hover{box-shadow:inset 0 0 0 2px rgba(255,196,110,.85)}
.gw-npc{background-size:contain;background-position:center}
.gw-npc.npc-civilian{width:15px;height:15px}
.gw-npc.npc-animal{width:20px;height:20px}
.gw-npc.npc-farm{width:17px;height:17px}
/* Buildings settle into the land: soft ground shadow, no hard outline. */
.gw-surface-building{border:none;box-shadow:0 6px 14px rgba(4,10,16,.45),0 1px 0 rgba(255,240,210,.12)}

/* Surface minimap: clickable with live camera viewport box. */
.gw-mini-surface-wrap{position:relative;width:100%;height:78%;cursor:crosshair}
.gw-mini-surface{height:100%}
.gw-mini-cam{position:absolute;border:1px solid rgba(255,214,130,.95);box-shadow:0 0 6px rgba(255,196,110,.5),inset 0 0 8px rgba(255,196,110,.15);pointer-events:none}

/* ===== Living universe pass (2026-07-14): animation + 3D depth ===== */
/* One-shot effect sprites. */
.gw-fx{position:absolute;transform:translate(-50%,-50%) scale(.4);background-size:contain;background-repeat:no-repeat;background-position:center;pointer-events:none;z-index:40;opacity:0;animation:gw-fx-pop 1.35s ease-out forwards}
@keyframes gw-fx-pop{
  0%{opacity:0;transform:translate(-50%,-50%) scale(.35)}
  12%{opacity:1}
  60%{opacity:.95;transform:translate(-50%,-50%) scale(1)}
  100%{opacity:0;transform:translate(-50%,-50%) scale(1.25)}
}
/* Planets: slow rotation under a FIXED sun-side shade = 3D sphere illusion. */
.gw-body img{animation:gw-spin 240s linear infinite}
.gw-body[data-id="jupiter"] img,.gw-body[data-id="saturn"] img,
.gw-body[data-id="uranus"] img,.gw-body[data-id="neptune"] img{animation-duration:120s}
.gw-body[data-id="sun"] img{animation-duration:90s}
@keyframes gw-spin{from{transform:rotate(0)}to{transform:rotate(360deg)}}
/* Atmosphere glows, breathing gently. */
.gw-body[data-id="earth"]{box-shadow:0 0 22px rgba(98,190,255,.35);animation:gw-breathe 7s ease-in-out infinite alternate}
.gw-body[data-id="venus"]{box-shadow:0 0 18px rgba(255,214,130,.35);animation:gw-breathe 9s ease-in-out infinite alternate}
.gw-body[data-id="mars"]{box-shadow:0 0 12px rgba(255,140,90,.22)}
.gw-body[data-id="jupiter"]{box-shadow:0 0 30px rgba(255,190,120,.28);animation:gw-breathe 11s ease-in-out infinite alternate}
.gw-body[data-id="saturn"]{box-shadow:0 0 26px rgba(255,220,160,.24)}
.gw-body[data-id="uranus"],.gw-body[data-id="neptune"]{box-shadow:0 0 20px rgba(120,190,255,.26)}
.gw-body[data-id="sun"]{box-shadow:0 0 60px rgba(255,180,80,.55),0 0 140px rgba(255,140,50,.28);animation:gw-breathe 5s ease-in-out infinite alternate}
@keyframes gw-breathe{from{filter:brightness(1)}to{filter:brightness(1.14)}}
/* Asteroids tumble. */
.gw-body[data-id^="belt_"] img,.gw-body[data-id^="kuiper_"] img{animation:gw-spin 40s linear infinite}
.gw-body[data-id^="belt_"],.gw-body[data-id^="kuiper_"]{animation:gw-bob 6s ease-in-out infinite alternate}
@keyframes gw-bob{from{transform:translateY(0)}to{transform:translateY(4px)}}
/* Nebula drifts almost imperceptibly. */
.gw-viewport{animation:gw-nebula-drift 180s linear infinite alternate}
@keyframes gw-nebula-drift{from{background-position:center,48% 50%}to{background-position:center,52% 50%}}
/* Surface ocean: moving caustic light. */
.gw-surface-ocean::before{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:
    radial-gradient(ellipse 300px 120px at 20% 30%,rgba(180,230,255,.08),transparent 70%),
    radial-gradient(ellipse 420px 160px at 70% 60%,rgba(180,230,255,.06),transparent 70%);
  animation:gw-caustics 26s ease-in-out infinite alternate;
}
@keyframes gw-caustics{from{transform:translate(0,0)}to{transform:translate(60px,24px)}}
/* Ocean theater: rising particulate + deep light rays. */
.gw-surface-world.theater-ocean::before{
  content:"";position:absolute;inset:-20%;pointer-events:none;z-index:6;
  background:
    radial-gradient(circle 2px at 12% 80%,rgba(210,240,255,.5),transparent 60%),
    radial-gradient(circle 2px at 34% 65%,rgba(210,240,255,.4),transparent 60%),
    radial-gradient(circle 3px at 58% 88%,rgba(210,240,255,.45),transparent 60%),
    radial-gradient(circle 2px at 79% 72%,rgba(210,240,255,.4),transparent 60%),
    radial-gradient(circle 2px at 92% 58%,rgba(210,240,255,.35),transparent 60%);
  animation:gw-bubbles 18s linear infinite;
}
@keyframes gw-bubbles{from{transform:translateY(12%)}to{transform:translateY(-12%)}}
/* Underground: ambient ember flicker. */
.gw-surface-world.theater-underground::before{
  content:"";position:absolute;inset:0;pointer-events:none;z-index:6;
  background:radial-gradient(ellipse 55% 45% at 50% 55%,rgba(255,120,40,.05),transparent 70%);
  animation:gw-ember 4.5s ease-in-out infinite alternate;
}
@keyframes gw-ember{from{opacity:.5}to{opacity:1}}
/* Gas platforms: band drift. */
.gw-surface-world.gw-gas-platform-world .gw-surface-ocean{animation:gw-gasbands 60s linear infinite alternate}
@keyframes gw-gasbands{from{background-position:0 0}to{background-position:0 60px}}
@media (prefers-reduced-motion:reduce){
  .gw-body img,.gw-body,.gw-viewport,.gw-surface-ocean::before,
  .gw-surface-world.theater-ocean::before,.gw-surface-world.theater-underground::before,
  .gw-surface-world.gw-gas-platform-world .gw-surface-ocean,.gw-fx{animation:none}
}

/* ===== Performance pass: GPU compositing hints ===== */
.gw-surface-world{will-change:transform;backface-visibility:hidden}
.gw-viewport>*{backface-visibility:hidden}
.gw-sunit,.gw-npc{will-change:transform}
.gw-body img{will-change:transform}

/* ===== Orbit + de-squaring fixes ===== */
/* Terrestrial bodies don't spin like wheels; gas giants + sun keep rotation. */
.gw-body img{animation:none}
.gw-body[data-id="jupiter"] img,.gw-body[data-id="saturn"] img,
.gw-body[data-id="uranus"] img,.gw-body[data-id="neptune"] img{animation:gw-spin 120s linear infinite}
.gw-body[data-id="sun"] img{animation:gw-spin 90s linear infinite}
.gw-body[data-id^="belt_"] img,.gw-body[data-id^="kuiper_"] img{animation:gw-spin 40s linear infinite}
/* Feathered shorelines: land fades into water instead of hard square edges. */
.gw-surface-tile[class*="shore-"]{position:absolute}
.gw-surface-tile.shore-n::before,.gw-surface-tile.shore-s::before,
.gw-surface-tile.shore-w::after,.gw-surface-tile.shore-e::after{
  content:"";position:absolute;pointer-events:none;
}
.gw-surface-tile.shore-n::before{left:0;right:0;top:0;height:26px;background:linear-gradient(180deg,rgba(23,85,120,.75),rgba(200,215,190,.25) 60%,transparent)}
.gw-surface-tile.shore-s::before{left:0;right:0;bottom:0;top:auto;height:26px;background:linear-gradient(0deg,rgba(23,85,120,.75),rgba(200,215,190,.25) 60%,transparent)}
.gw-surface-tile.shore-w::after{top:0;bottom:0;left:0;width:26px;background:linear-gradient(90deg,rgba(23,85,120,.75),rgba(200,215,190,.25) 60%,transparent)}
.gw-surface-tile.shore-e::after{top:0;bottom:0;right:0;left:auto;width:26px;background:linear-gradient(270deg,rgba(23,85,120,.75),rgba(200,215,190,.25) 60%,transparent)}

/* ===== Painterly terrain compositor ===== */
.gw-terrain-canvas{position:absolute;pointer-events:none;z-index:1}
/* Once the painted canvas is live, tiles become invisible hit-areas
   (hover/placement rings still render via box-shadow). */
.gw-surface-world.painted-world .gw-surface-tile{background:none!important;filter:none!important}
.gw-surface-world.painted-world .gw-surface-tile::before,
.gw-surface-world.painted-world .gw-surface-tile::after{display:none}
.gw-surface-world.painted-world .gw-surface-ocean{opacity:.9}
.gw-surface-tile.terrain-desert{background-image:url(/assets/demo-alpha/surface/tiles/desert.png)}
.gw-surface-tile.terrain-tundra{background-image:url(/assets/demo-alpha/surface/tiles/tundra.png)}
.gw-surface-tile.terrain-swamp{background-image:url(/assets/demo-alpha/surface/tiles/forest.png);filter:brightness(.6) saturate(.7) hue-rotate(25deg)}

/* Chunked renderer */
.gw-chunk{position:absolute;left:0;top:0;width:0;height:0}
.gw-mini-surface-img{width:100%;height:100%;image-rendering:pixelated;display:block}

/* Docked minimap keeps correct proportions in any panel shape. */
.gw-mini-surface-wrap{height:auto;aspect-ratio:var(--mini-ar,3/2);max-height:60vh}


/* Docked panels always flow in the dock column — never absolute leftovers. */
.gw-dock .gw-panel,.gw-dock-body>*{position:relative!important;left:auto!important;top:auto!important;right:auto!important;bottom:auto!important;width:auto!important;height:auto!important;z-index:auto!important}
/* System minimap keeps a usable square in both float and dock. */
.gw-minimap .gw-mini-map{height:auto;aspect-ratio:1/1;min-height:120px;max-height:240px}
/* Minimap contents always reachable in small panels. */
.gw-minimap .gw-panel-body{scrollbar-width:thin}
.gw-env-tabs{flex-wrap:wrap}
.gw-env-tabs button{min-width:70px}

/* ===== Mission arc + space LOD (2026-07-15) ===== */
.gw-check{font-family:var(--gw-font-mono);font-size:11px;color:var(--gw-muted);padding:2px 0}
.gw-check.done{color:#7dc87f}
.gw-mission-card.gw-locked{opacity:.55;filter:grayscale(.4)}
/* Far zoom: planets collapse to nav beacons; detail returns when close. */
.gw-viewport.lod-far .gw-body img{visibility:hidden}
.gw-viewport.lod-far .gw-body::after{background:radial-gradient(circle,rgba(140,200,255,.9) 0 28%,rgba(140,200,255,.25) 45%,transparent 70%)}
.gw-viewport.lod-far .gw-body[data-id="sun"]::after{background:radial-gradient(circle,rgba(255,200,110,.95) 0 34%,rgba(255,170,70,.3) 55%,transparent 75%)}
.gw-viewport.lod-far .gw-body-label span,.gw-viewport.lod-far .gw-asset img{visibility:hidden}
.gw-viewport.lod-far .gw-surface-world,.gw-viewport.lod-far .gw-npc-layer{display:none}

/* ===== Pre-game lobby ===== */
.gw-lobby{position:fixed;inset:0;z-index:30000;background:rgba(2,6,12,.88);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center}
.gw-lobby-card{width:min(560px,92vw);border:1px solid rgba(98,211,255,.3);background:linear-gradient(180deg,rgba(14,26,42,.98),rgba(4,10,18,.99));padding:28px;text-align:center;box-shadow:0 30px 90px rgba(0,0,0,.7)}
.gw-lobby-card h1{font-family:var(--gw-font-display);letter-spacing:.12em;font-size:22px;margin:0 0 4px}
.gw-lobby-card p{color:var(--gw-muted);font-family:var(--gw-font-mono);font-size:12px;margin:0 0 18px}
.gw-lobby-opts{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:14px}
.gw-lobby-opts button{border:1px solid rgba(98,211,255,.3);background:rgba(8,20,34,.7);color:var(--gw-text);padding:14px 10px;cursor:pointer;text-align:center}
.gw-lobby-opts button:hover{border-color:#f5a43e;box-shadow:0 0 18px rgba(245,164,62,.2)}
.gw-lobby-opts strong{display:block;margin-bottom:4px}
.gw-lobby-opts small{color:var(--gw-muted);font-size:10px}
.gw-lobby-note{opacity:.75}

/* ===== GW_TOUCH_MODE (mobile/touch, additive-only) =====
   Every rule below is scoped under html.gw-touch-mode (set by JS via
   matchMedia("(pointer: coarse)")) and/or .gw-portrait/.gw-landscape.
   Nothing above this marker is edited by the touch-mode work -- desktop
   CSS is completely untouched, including the existing destructive
   @media(max-width:1150px){.gw-dock{display:none}...} rule, which still
   fires unchanged for any non-touch narrow browser window. */

/* New touch-only controls are hidden by default so they render as inert,
   non-interactive DOM on desktop. */
.gw-touch-cmdbar,.gw-touch-more-tab,.gw-touch-drawer,.gw-bottom-nav,
.gw-context-sheet,.gw-obj-card,.gw-events-badge,.gw-landscape-cmdbar,
.gw-landscape-tray,.gw-landscape-edge,.gw-sheet-scrim{display:none}

/* Undo the max-width:1150px dock-hide for touch users via a higher-
   specificity selector, without editing that rule's text. */
html.gw-touch-mode .gw-dock{display:flex!important}

/* The "Dock * Left / drag panels" etc chrome text is desktop-only
   window-manager language that means nothing on a touch device --
   hidden at every touch tier (LT: phone-landscape follow-up). */
html.gw-touch-mode .gw-dock-title{display:none}

/* Systematic ~44px touch-target bump, additive rules only -- the
   desktop-sized originals (gw-panel-controls button, gw-action,
   gw-mini-star) are untouched. */
html.gw-touch-mode .gw-panel-controls button{width:32px;height:32px;font-size:14px}
html.gw-touch-mode .gw-action{min-height:44px;padding:10px 12px;font-size:12px}
html.gw-touch-mode .gw-mini-star{width:16px;height:16px}
html.gw-touch-mode .gw-planet-btn{min-height:44px}
html.gw-touch-mode .gw-tool{min-height:44px}

/* Never allow floating panels in touch mode (sidesteps the off-screen-
   panel bug: saved desktop px positions have no viewport-relative
   clamp) -- hide the float toggle so it can't be re-triggered either.
   wirePanel/dockPanel/floatPanel themselves are unmodified. */
html.gw-touch-mode .gw-panel-controls [data-act="float"]{display:none}

/* Gesture reliability: stop the browser's own pan/zoom from fighting
   the custom pointer-based pan/pinch/select gesture layer. Unconditional
   (not gated behind gw-touch-mode) as a safety net for hybrid devices
   whose touch capability doesn't match pointer:coarse -- touch-action
   only affects touch/pen input handling, never mouse, so this has no
   effect on any desktop pointer interaction. Scrollable sheet/dock
   bodies get pan-y back so their own vertical scroll still works without
   needing to fight the tactical-view gesture handlers. */
.gw-viewport{touch-action:none}
html.gw-touch-mode .gw-viewport{-webkit-user-select:none;user-select:none}
html.gw-touch-mode .gw-dock-body,html.gw-touch-mode .gw-touch-drawer-body,
html.gw-touch-mode .gw-context-sheet-body{touch-action:pan-y}

/* On-screen control-group bar (Cancel + 1-9), replacing keyboard-only
   1-9/Ctrl+1-9/Escape. Pinned along the bottom of the viewport stage. */
html.gw-touch-mode .gw-touch-cmdbar{
  display:flex;position:absolute;left:12px;right:12px;bottom:96px;z-index:13;
  gap:8px;align-items:center;justify-content:space-between;
  padding:6px 8px;border:1px solid rgba(98,211,255,.30);border-radius:4px;
  background:rgba(5,14,25,.92);
}
/* min-width:0 is required for a flex:1 item's own overflow-x:auto to
   actually scroll internally -- without it the item refuses to shrink
   below its content's intrinsic width and the whole bar overflows the
   viewport instead (confirmed root cause of LT's "control-group row is
   horizontally clipped" report). Applied to every horizontally-scrolling
   tray below, not just this one. */
html.gw-touch-mode .gw-touch-groups{display:flex;gap:6px;flex:1;min-width:0;overflow-x:auto}
html.gw-touch-mode .gw-touch-groups button{
  min-width:44px;min-height:44px;flex:0 0 auto;border:1px solid rgba(98,211,255,.30);
  border-radius:4px;background:rgba(8,20,34,.7);color:var(--gw-text);
  font-family:var(--gw-font-mono);font-size:13px;cursor:pointer;
}
html.gw-touch-mode .gw-touch-cancel{
  min-width:72px;min-height:44px;flex:0 0 auto;border:1px solid rgba(255,92,92,.4);
  border-radius:4px;background:rgba(40,10,10,.7);color:#ff9a9a;
  font-family:var(--gw-font-mono);font-size:11px;text-transform:uppercase;
  letter-spacing:.06em;cursor:pointer;
}
/* Cancel button only shows while a command mode is actually armed --
   keyed off the existing #gw-v4[data-command-mode] attribute, already
   set/cleared by the unmodified setCommandMode()/clearCommandMode(). */
html.gw-touch-mode #gw-v4[data-command-mode=""] .gw-touch-cancel,
html.gw-touch-mode #gw-v4:not([data-command-mode]) .gw-touch-cancel{visibility:hidden}

/* ---- Compact touch HUD (all touch tiers) ----
   Restyles the EXISTING .gw-top/.gw-resource-bar/.gw-status in place
   (same DOM, same renderResources()-written content) rather than
   duplicating a parallel HUD -- reuses existing components/state per
   LT's architecture constraint. */
html.gw-touch-mode .gw-top{
  height:calc(46px + env(safe-area-inset-top,0px));
  padding-top:env(safe-area-inset-top,0px);
  padding-left:calc(8px + env(safe-area-inset-left,0px));
  padding-right:calc(8px + env(safe-area-inset-right,0px));
  gap:6px;
}
html.gw-touch-mode .gw-logo{font-size:11px}
html.gw-touch-mode .gw-status{gap:4px;overflow-x:auto;scrollbar-width:none;flex:0 1 auto;min-width:0}
html.gw-touch-mode .gw-status::-webkit-scrollbar{display:none}
html.gw-touch-mode .gw-status .gw-tag{padding:3px 6px;font-size:8px;white-space:nowrap;flex:0 0 auto}
html.gw-touch-mode .gw-status button.gw-tag{min-height:44px}
/* Secondary desktop-only status tags crowd the touch HUD. Research and
   Reset remain available in tablet landscape here and through the phone
   bottom/edge controls below. */
html.gw-touch-mode .gw-status .gw-tag.orange,
html.gw-touch-mode .gw-status .gw-popout-intel{display:none}
html.gw-touch-mode.gw-landscape:not(.gw-phone-landscape) .gw-status{display:flex!important}
html.gw-phone-landscape .gw-status{display:none!important}
html.gw-touch-mode.gw-landscape:not(.gw-phone-landscape) .gw-context-sheet,
html.gw-touch-mode.gw-landscape:not(.gw-phone-landscape) .gw-sheet-scrim{display:none!important}
html.gw-touch-mode .gw-resource-bar{max-width:none;flex:1 1 auto;min-width:0;gap:4px}
html.gw-touch-mode .gw-resource{padding:2px 5px;font-size:9px}
html.gw-touch-mode .gw-layout{top:calc(46px + env(safe-area-inset-top,0px))}

/* ---- Tablet landscape: touch + landscape, taller than the phone-
   landscape threshold (LT's "intermediate layout" tier). Keeps the
   existing 3-column DOM/grid shape, just narrows the side columns --
   full phone-landscape tier below replaces docks entirely instead. */
html.gw-touch-mode.gw-landscape .gw-layout{
  grid-template-columns:minmax(200px,26vw) minmax(0,1fr) minmax(200px,26vw);
  gap:6px;padding:6px;
}
html.gw-touch-mode.gw-landscape .gw-dock-body{overflow-y:auto}
html.gw-touch-mode.gw-landscape .gw-touch-more-tab,
html.gw-touch-mode.gw-landscape .gw-touch-drawer{display:none!important}

/* ===== Shared "More" drawer (secondary panels: Events, Council,
   Resources, Minimap, Build Queue, Fleet roster, Context Tools) --
   portrait only; phone-landscape routes the same content through its
   floating edge buttons + side sheet instead (see below). ===== */
html.gw-touch-mode.gw-portrait .gw-touch-more-tab{
  display:block;position:absolute;right:calc(12px + env(safe-area-inset-right,0px));
  top:calc(6px + env(safe-area-inset-top,0px));z-index:14;
  min-height:44px;padding:0 14px;border:1px solid rgba(98,211,255,.34);
  border-radius:4px;background:rgba(5,14,25,.92);color:var(--gw-text);
  font-family:var(--gw-font-mono);font-size:11px;cursor:pointer;
}
html.gw-touch-mode.gw-portrait .gw-touch-drawer:not([hidden]){
  display:flex;flex-direction:column;position:fixed;left:0;right:0;bottom:0;
  z-index:15000;max-height:70dvh;border-top:1px solid rgba(98,211,255,.4);
  background:linear-gradient(180deg,rgba(12,29,48,.98),rgba(4,13,25,.99));
  box-shadow:0 -18px 60px rgba(0,0,0,.6);
  padding-bottom:env(safe-area-inset-bottom,0px);
}
html.gw-touch-mode.gw-portrait .gw-touch-drawer-tabs{
  display:flex;gap:6px;overflow-x:auto;min-width:0;padding:8px;
  border-bottom:1px solid rgba(98,211,255,.2);
}
html.gw-touch-mode.gw-portrait .gw-touch-drawer-tabs button{
  min-height:40px;flex:0 0 auto;padding:0 12px;white-space:nowrap;border:1px solid rgba(98,211,255,.3);
  border-radius:4px;background:rgba(8,20,34,.7);color:var(--gw-muted);
  font-family:var(--gw-font-mono);font-size:10px;cursor:pointer;
}
html.gw-touch-mode.gw-portrait .gw-touch-drawer-tabs button.active{color:var(--gw-blue);border-color:var(--gw-blue)}
html.gw-touch-mode.gw-portrait .gw-touch-drawer-body{flex:1;overflow-y:auto;padding:8px}
html.gw-touch-mode.gw-portrait .gw-touch-drawer-body .gw-panel.gw-touch-drawer-hidden{display:none}
html.gw-touch-mode.gw-portrait .gw-touch-drawer-close{
  min-height:44px;margin:8px;border:1px solid rgba(98,211,255,.3);border-radius:4px;
  background:rgba(8,20,34,.7);color:var(--gw-text);font-family:var(--gw-font-mono);
  font-size:11px;cursor:pointer;
}

/* ===== Compact Objectives card + Events badge (all touch tiers) =====
   Small persistent floating elements instead of a permanent full-width
   desktop panel -- tap either to open the relevant tab in the shared
   context sheet / More drawer. */
html.gw-touch-mode .gw-obj-card{
  display:flex;position:absolute;left:calc(8px + env(safe-area-inset-left,0px));
  top:calc(6px + env(safe-area-inset-top,0px));z-index:14;align-items:center;gap:6px;
  max-width:60vw;min-height:36px;padding:5px 10px;border:1px solid rgba(245,164,62,.4);
  border-radius:4px;background:rgba(20,14,4,.88);color:var(--gw-orange);
  font-family:var(--gw-font-mono);font-size:10px;cursor:pointer;white-space:nowrap;
  overflow:hidden;text-overflow:ellipsis;
}
html.gw-touch-mode .gw-obj-card strong{color:var(--gw-text);font-weight:700}
html.gw-touch-mode .gw-events-badge{
  display:flex;position:absolute;z-index:14;align-items:center;justify-content:center;
  width:36px;height:36px;border-radius:50%;border:1px solid rgba(98,211,255,.4);
  background:rgba(5,14,25,.92);color:var(--gw-text);font-family:var(--gw-font-mono);
  font-size:14px;cursor:pointer;
}
html.gw-touch-mode .gw-events-badge[data-critical="1"]{border-color:var(--gw-red);color:var(--gw-red);box-shadow:0 0 12px rgba(255,92,92,.4)}
html.gw-touch-mode .gw-events-badge .gw-events-count{
  position:absolute;top:-4px;right:-4px;min-width:15px;height:15px;padding:0 3px;
  border-radius:8px;background:var(--gw-blue);color:#02070f;font-size:9px;font-weight:800;
  display:flex;align-items:center;justify-content:center;
}

/* ===== Shared contextual sheet (Commands/Status/Cargo/Fleet for a
   ship; Overview/Build/Research/Defense/Logistics for a planet;
   Shipyard/Modules/Defense/Cargo for a station). Bottom sheet in
   portrait, side sheet in phone-landscape -- same markup/content,
   different chrome via the orientation-scoped rules below. ===== */
html.gw-touch-mode .gw-sheet-scrim{
  display:none;position:fixed;inset:0;z-index:15900;background:rgba(0,0,0,.45);
}
html.gw-touch-mode .gw-sheet-scrim.active{display:block}
html.gw-touch-mode .gw-context-sheet{
  display:flex;flex-direction:column;position:fixed;z-index:16000;
  border:1px solid rgba(98,211,255,.4);
  background:linear-gradient(180deg,rgba(12,29,48,.98),rgba(4,13,25,.99));
  box-shadow:0 -18px 60px rgba(0,0,0,.6);
}
html.gw-touch-mode .gw-context-sheet-handle{
  display:flex;align-items:center;justify-content:center;min-height:22px;cursor:grab;flex:0 0 auto;
}
html.gw-touch-mode .gw-context-sheet-handle:before{content:"";width:36px;height:4px;border-radius:2px;background:rgba(98,211,255,.4)}
html.gw-touch-mode .gw-context-sheet-peek{
  display:flex;align-items:center;gap:10px;padding:6px 12px;min-height:52px;flex:0 0 auto;cursor:pointer;
  border-bottom:1px solid rgba(98,211,255,.16);
}
html.gw-touch-mode .gw-context-sheet-peek img{width:34px;height:34px;object-fit:contain;flex:0 0 auto}
html.gw-touch-mode .gw-context-sheet-peek-title{font-family:var(--gw-font-mono);font-size:12px;font-weight:700;color:var(--gw-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html.gw-touch-mode .gw-context-sheet-peek-sub{font-family:var(--gw-font-mono);font-size:10px;color:var(--gw-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html.gw-touch-mode .gw-context-sheet-tabs{
  display:flex;gap:6px;min-width:0;overflow-x:auto;padding:8px;flex:0 0 auto;
  border-bottom:1px solid rgba(98,211,255,.2);
}
html.gw-touch-mode .gw-context-sheet-tabs button{
  min-height:40px;flex:0 0 auto;padding:0 12px;white-space:nowrap;border:1px solid rgba(98,211,255,.3);
  border-radius:4px;background:rgba(8,20,34,.7);color:var(--gw-muted);
  font-family:var(--gw-font-mono);font-size:10px;cursor:pointer;
}
html.gw-touch-mode .gw-context-sheet-tabs button.active{color:var(--gw-blue);border-color:var(--gw-blue)}
html.gw-touch-mode .gw-context-sheet-body{flex:1;overflow-y:auto;padding:10px}
/* Planet/Build panels are relocated here whole (safe: keeps their
   internal `[data-panel="x"] .gw-panel-body` selectors working) -- hide
   the redundant desktop panel-head chrome + border once inside a tab. */
html.gw-touch-mode .gw-context-sheet-body .gw-panel{border:0;box-shadow:none;background:transparent;min-height:0}
html.gw-touch-mode .gw-context-sheet-body .gw-panel-head{display:none}
html.gw-touch-mode .gw-context-sheet-body .gw-panel-body{padding:0}
html.gw-touch-mode .gw-context-sheet-body .gw-command-tray{display:flex;gap:8px;overflow-x:auto;min-width:0;padding-bottom:4px}
html.gw-touch-mode .gw-context-sheet-body .gw-command-tray button{
  flex:0 0 auto;display:flex;flex-direction:column;align-items:center;gap:4px;
  min-width:64px;min-height:56px;padding:8px 10px;border:1px solid rgba(98,211,255,.3);
  border-radius:6px;background:rgba(8,20,34,.7);color:var(--gw-text);
  font-family:var(--gw-font-mono);font-size:10px;cursor:pointer;
}
html.gw-touch-mode .gw-context-sheet-body .gw-command-tray button .gw-cmd-icon{font-size:16px}
html.gw-touch-mode .gw-context-sheet-body .gw-command-tray button:disabled{opacity:.4;cursor:not-allowed}
html.gw-touch-mode .gw-context-sheet-close{
  position:absolute;top:6px;right:8px;min-width:32px;min-height:32px;border:1px solid rgba(98,211,255,.3);
  border-radius:4px;background:rgba(8,20,34,.7);color:var(--gw-text);cursor:pointer;
}

/* ===== Phone portrait: sheet is a bottom sheet ===== */
html.gw-touch-mode.gw-portrait .gw-context-sheet{
  left:0;right:0;bottom:calc(56px + env(safe-area-inset-bottom,0px));border-left:none;border-right:none;border-bottom:none;
  padding-bottom:env(safe-area-inset-bottom,0px);
}
html.gw-touch-mode.gw-portrait .gw-context-sheet[data-state="collapsed"]{height:auto}
html.gw-touch-mode.gw-portrait .gw-context-sheet[data-state="collapsed"] .gw-context-sheet-tabs,
html.gw-touch-mode.gw-portrait .gw-context-sheet[data-state="collapsed"] .gw-context-sheet-body{display:none}
html.gw-touch-mode.gw-portrait .gw-context-sheet[data-state="expanded"]{height:65dvh}
html.gw-touch-mode.gw-portrait .gw-bottom-nav{
  display:flex;position:absolute;left:0;right:0;bottom:0;z-index:16;
  height:calc(56px + env(safe-area-inset-bottom,0px));
  padding-bottom:env(safe-area-inset-bottom,0px);
  border-top:1px solid rgba(98,211,255,.3);background:rgba(5,14,25,.96);
}
html.gw-touch-mode.gw-portrait .gw-bottom-nav button{
  flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;
  min-height:48px;border:0;background:transparent;color:var(--gw-muted);
  font-family:var(--gw-font-mono);font-size:9px;cursor:pointer;
}
html.gw-touch-mode.gw-portrait .gw-bottom-nav button .gw-nav-icon{font-size:17px;line-height:1}
html.gw-touch-mode.gw-portrait .gw-bottom-nav button.active{color:var(--gw-blue)}
html.gw-touch-mode.gw-portrait .gw-bottom-nav button.active:after{content:"";position:absolute;margin-top:30px;width:18px;height:2px;background:var(--gw-blue);border-radius:1px}

/* ---- Portrait shell layout: viewport on top (dvh-based, ~68% when the
   sheet is collapsed), bottom nav pinned, collapsed sheet peeking above
   it, More-drawer for secondary panels. ---- */
html.gw-touch-mode.gw-portrait .gw-layout{
  grid-template-columns:1fr;
  grid-template-rows:1fr;
  grid-template-areas:"stage";
  gap:0;padding:0;
  bottom:calc(56px + env(safe-area-inset-bottom,0px));
}
html.gw-touch-mode.gw-portrait .gw-stage{grid-area:stage;min-height:0}
html.gw-touch-mode.gw-portrait .gw-left-dock,
html.gw-touch-mode.gw-portrait .gw-right-dock{display:none!important}
html.gw-touch-mode.gw-portrait .gw-obj-card{top:calc(52px + env(safe-area-inset-top,0px))}
html.gw-touch-mode.gw-portrait .gw-events-badge{
  right:calc(8px + env(safe-area-inset-right,0px));
  top:calc(52px + env(safe-area-inset-top,0px));
}

/* ===== Phone landscape (new tier: touch + landscape + limited height,
   JS-detected via matchMedia("(max-height:600px) and (orientation:landscape)")
   -- docks hidden entirely, compact single-row HUD, compact command
   bar, fleet/control-group tray, side sheet, floating edge buttons. ===== */
html.gw-phone-landscape .gw-top{height:calc(40px + env(safe-area-inset-top,0px))}
html.gw-phone-landscape .gw-layout{
  top:calc(40px + env(safe-area-inset-top,0px));
  grid-template-columns:1fr;grid-template-rows:1fr;grid-template-areas:"stage";
  gap:0;padding:0;
  bottom:calc(48px + env(safe-area-inset-bottom,0px));
}
html.gw-phone-landscape .gw-dock,
html.gw-phone-landscape .gw-touch-more-tab,
html.gw-phone-landscape .gw-touch-drawer{display:none!important}
html.gw-phone-landscape .gw-stage{grid-area:stage;min-height:0}
html.gw-phone-landscape .gw-obj-card,
html.gw-phone-landscape .gw-events-badge{display:none!important}

html.gw-phone-landscape .gw-landscape-cmdbar{
  display:flex;position:absolute;left:calc(8px + env(safe-area-inset-left,0px));
  right:calc(8px + env(safe-area-inset-right,0px));
  bottom:calc(6px + env(safe-area-inset-bottom,0px));z-index:16;
  align-items:center;gap:8px;height:48px;padding:0 8px;
  border:1px solid rgba(98,211,255,.3);border-radius:6px;background:rgba(5,14,25,.94);
}
html.gw-phone-landscape .gw-landscape-cmdbar .gw-lc-selected{
  flex:0 0 auto;max-width:90px;font-family:var(--gw-font-mono);font-size:10px;
  color:var(--gw-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
html.gw-phone-landscape .gw-landscape-cmdbar .gw-command-tray{
  display:flex;gap:6px;flex:1;min-width:0;overflow-x:auto;height:100%;align-items:center;
}
html.gw-phone-landscape .gw-landscape-cmdbar .gw-command-tray button{
  flex:0 0 auto;min-width:48px;min-height:38px;padding:0 10px;border:1px solid rgba(98,211,255,.3);
  border-radius:4px;background:rgba(8,20,34,.7);color:var(--gw-text);
  font-family:var(--gw-font-mono);font-size:10px;cursor:pointer;white-space:nowrap;
}
html.gw-phone-landscape .gw-landscape-cmdbar .gw-command-tray button:disabled{opacity:.4;cursor:not-allowed}

html.gw-phone-landscape .gw-landscape-tray{
  display:flex;position:absolute;left:calc(8px + env(safe-area-inset-left,0px));
  top:calc(46px + env(safe-area-inset-top,0px));z-index:15;
  gap:6px;max-width:60vw;min-width:0;overflow-x:auto;height:40px;align-items:center;
}
html.gw-phone-landscape .gw-landscape-tray button{
  flex:0 0 auto;min-width:56px;min-height:34px;padding:0 8px;border:1px solid rgba(98,211,255,.3);
  border-radius:4px;background:rgba(5,14,25,.85);color:var(--gw-text);
  font-family:var(--gw-font-mono);font-size:9px;cursor:pointer;
}
html.gw-phone-landscape .gw-landscape-tray button.active{color:var(--gw-blue);border-color:var(--gw-blue)}

html.gw-phone-landscape .gw-landscape-edge{
  display:flex;position:absolute;right:calc(6px + env(safe-area-inset-right,0px));
  top:50%;transform:translateY(-50%);z-index:15;flex-direction:column;gap:6px;
}
html.gw-phone-landscape .gw-landscape-edge button{
  width:44px;height:44px;border-radius:50%;border:1px solid rgba(98,211,255,.35);
  background:rgba(5,14,25,.9);color:var(--gw-text);font-size:14px;cursor:pointer;
}
html.gw-phone-landscape .gw-landscape-edge button[data-critical="1"]{border-color:var(--gw-red);color:var(--gw-red)}

/* Side sheet: same .gw-context-sheet markup, slides from the right,
   capped width, full height, scrim-backed -- content/tabs identical to
   the portrait bottom sheet, only the chrome differs. */
html.gw-phone-landscape .gw-context-sheet{
  top:0;right:0;bottom:0;width:min(360px,42vw);min-width:280px;
  border-top:none;border-bottom:none;border-right:none;
  transform:translateX(100%);transition:transform .18s ease;
  padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px);
  padding-right:env(safe-area-inset-right,0px);
}
html.gw-phone-landscape .gw-context-sheet[data-state="expanded"]{transform:translateX(0)}
html.gw-phone-landscape .gw-context-sheet[data-state="collapsed"]{display:none}
html.gw-phone-landscape .gw-context-sheet-handle,
html.gw-phone-landscape .gw-context-sheet-peek{display:none}
html.gw-phone-landscape .gw-context-sheet-tabs,
html.gw-phone-landscape .gw-context-sheet-body{display:flex!important}
html.gw-phone-landscape .gw-context-sheet-body{flex-direction:column}

/* ---- Research WEB (Thrive-style branching node graph) ---- */
.gw-rweb-body{min-width:0;min-height:0;overflow:auto!important;padding:0;overscroll-behavior:contain;scrollbar-gutter:stable both-edges;touch-action:pan-x pan-y;}
html.gw-touch-mode .gw-context-sheet-body.gw-rweb-body,
html.gw-touch-mode .gw-modal-body.gw-rweb-body{touch-action:pan-x pan-y}
.gw-research-web{position:relative;max-width:none;max-height:none;flex:0 0 auto;font-family:var(--gw-font-mono,ui-monospace,monospace);}
.gw-rweb-branch{position:absolute;top:8px;font:700 10px/1 ui-monospace,monospace;letter-spacing:.08em;text-transform:uppercase;color:var(--gw-muted,#93adbe);width:156px;text-align:center;}
.gw-rweb-edge{stroke:rgba(98,211,255,.22);stroke-width:1.5;}
.gw-rweb-edge.owned{stroke:rgba(52,240,138,.6);}
.gw-rweb-node{position:absolute;display:flex;flex-direction:column;justify-content:center;gap:3px;padding:6px 8px;text-align:left;
  border:1px solid rgba(98,211,255,.35);border-radius:6px;background:rgba(6,18,30,.92);color:var(--gw-text,#edf8ff);
  font:600 11px/1.15 ui-monospace,monospace;cursor:pointer;transition:border-color .12s,background .12s,transform .12s;}
.gw-rweb-node strong{font-size:11px;}
.gw-rweb-node small{color:var(--gw-muted,#93adbe);font-size:9px;line-height:1.1;}
.gw-rweb-node.avail{border-color:rgba(98,211,255,.6);color:var(--gw-cyan,#62d3ff);}
.gw-rweb-node.avail:hover{transform:translateY(-1px);background:rgba(98,211,255,.12);}
.gw-rweb-node.owned{border-color:rgba(52,240,138,.6);color:var(--gw-green,#34f08a);background:rgba(52,240,138,.08);cursor:default;}
.gw-rweb-node.queued{border-color:rgba(245,164,62,.6);color:var(--gw-orange,#f5a43e);}
.gw-rweb-node.locked{border-color:rgba(147,173,190,.25);color:var(--gw-muted,#93adbe);opacity:.7;cursor:not-allowed;}
.gw-rweb-node.locked small{color:#c06a5a;}
.gw-rweb-era{position:absolute;background:rgba(98,211,255,.035);border-top:1px solid rgba(98,211,255,.12);border-bottom:1px solid rgba(98,211,255,.12);pointer-events:none;z-index:0;}
.gw-rweb-era-tag{position:absolute;left:8px;top:4px;font:700 9px/1 ui-monospace,monospace;letter-spacing:.1em;text-transform:uppercase;color:rgba(147,173,190,.45);}
.gw-rweb-node .gw-rweb-tier{position:absolute;top:4px;right:6px;font:700 8px/1 ui-monospace,monospace;color:var(--gw-orange,#f5a43e);}
.gw-rweb-node .gw-rweb-fg{position:absolute;top:4px;right:6px;font:700 7px/1 ui-monospace,monospace;letter-spacing:.04em;color:#8aa0b0;}
.gw-rweb-node.fullgame{border-style:dashed;border-color:rgba(147,173,190,.3);color:var(--gw-muted,#93adbe);opacity:.65;cursor:not-allowed;background:rgba(20,30,40,.6);}
