/* RP14: interactive controls remain reachable above the marine HUD. */
html:not([data-touch-ui="true"]) #profileBar button,
html:not([data-touch-ui="true"]) #profileLogout {pointer-events:auto!important;position:relative;z-index:2;min-height:36px;}


#mobileHelm14,#mobileFullscreen14{display:none}
html[data-touch-ui="true"] #mobileHelm14{display:block;position:fixed;left:max(14px,env(safe-area-inset-left));bottom:calc(74px + env(safe-area-inset-bottom));width:112px;height:112px;border-radius:50%;touch-action:none;z-index:80;user-select:none;background:radial-gradient(circle,#113a5099,#061b2d99);border:1px solid #8cb0bd70;box-shadow:0 5px 24px #0006;}
#mobileHelm14 .helmRing14{position:absolute;inset:16px;border:1px dashed #b8d7dc55;border-radius:50%}#helmKnob14{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:42px;height:42px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#b3cbd2,#436575 65%);border:2px solid #dae7e3;box-shadow:0 3px 12px #0008}#mobileHelm14 small{position:absolute;bottom:-17px;text-align:center;width:100%;font-size:9px;letter-spacing:2px;color:#c5dae2;pointer-events:none}#mobileHelm14.active{border-color:#e6c884;box-shadow:0 0 16px #60bccc44}
html[data-touch-ui="true"] #mobileFullscreen14{display:block;position:fixed;right:max(8px,env(safe-area-inset-right));top:58px;z-index:81;width:40px;height:40px;font-size:24px;background:#0b2239dd;color:#e1eced;border:1px solid #a9bbc760;border-radius:8px}
html[data-touch-ui="true"] body:not(.mobileLogged) #mobileHelm14,html[data-touch-ui="true"] body:not(.mobileLogged) #mobileFullscreen14,html[data-touch-ui="true"] body.mobileMenuOpen #mobileHelm14{display:none}
html[data-touch-ui="true"] .marineDialog12{max-height:calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom));}
@media(max-height:420px){html[data-touch-ui="true"] #mobileHelm14{width:96px;height:96px;bottom:72px}}
#tutorial12{width:min(420px,calc(100vw - 28px));right:18px;left:auto;top:124px;bottom:auto;max-height:calc(100dvh - 215px);padding:18px;border:1px solid #bcab7488;background:linear-gradient(145deg,#112e42f5,#071724f8);box-shadow:0 18px 65px #0008;border-radius:14px;color:#e4edef}
#tutorial12 .tutorialCompass13{float:right;font-size:28px;margin:0}#tutorial12 .tutorialEyebrow13{font-size:10px;letter-spacing:1.6px;color:#cfc08e}#tutorial12 h3{font-size:20px;line-height:1.3;margin:12px 0}#tutorialText12{font-size:14px;line-height:1.55;color:#cfdee3}#tutorialTask14{display:grid;gap:8px;margin:14px 0}#tutorialTask14 button{min-height:40px;white-space:normal;text-align:left;line-height:1.4;background:#16374a;color:#edf0e9;border:1px solid #7295a366;border-radius:8px;padding:10px}#tutorialTask14 button:hover{border-color:#d4bd7e}#tutorialNext12{min-height:42px;width:100%;margin-top:10px}#tutorialNext12:disabled{opacity:.55;cursor:default}#tutorialReward13{font-size:10px;letter-spacing:.4px;padding:8px!important}#tutorialNote12{display:block;line-height:1.5;color:#a9cfcc}
html[data-touch-ui="true"] #tutorial12{top:max(8px,env(safe-area-inset-top));right:max(8px,env(safe-area-inset-right));width:min(360px,54vw);max-height:calc(100dvh - 16px - env(safe-area-inset-top));padding:12px}
html[data-touch-ui="true"] #tutorial12 h3{font-size:16px}html[data-touch-ui="true"] #tutorialText12{font-size:12px}html[data-touch-ui="true"] #tutorial12 .tutorialCompass13,html[data-touch-ui="true"] #tutorial12 .tutorialEyebrow13{display:none}
/* Desktop command bridge: compact hierarchy, calm colors, transparent unused HUD space. */
html:not([data-touch-ui="true"]){--bridge14-bg:linear-gradient(150deg,#143244ed,#071a29f2);--bridge14-line:#91afba55}
html:not([data-touch-ui="true"]) :is(.hud,#profileBar,#tfResourceStrip,#tfMiniMap,#marineMission,#chatBox,#portPopup,.panel){background:var(--bridge14-bg)!important;border:1px solid var(--bridge14-line)!important;border-radius:10px!important;box-shadow:0 8px 24px #00121b44!important;color:#e1eaee}
html:not([data-touch-ui="true"]) :is(.buttons,#marineSide,.actions,#cameraCombatButtons) button{background:linear-gradient(165deg,#21475aee,#102b3bee)!important;border:1px solid #7899a455!important;border-radius:8px!important;color:#dce8ec!important;box-shadow:0 2px 8px #00121b33!important;transition:background .15s,border-color .15s}
html:not([data-touch-ui="true"]) :is(.buttons,#marineSide,.actions,#cameraCombatButtons) button:hover{border-color:#d9bf7d!important;background:#2b5365!important}
html:not([data-touch-ui="true"]) .actions button.tfSelected{border-color:#e2c77e!important;box-shadow:inset 0 -3px #d7b96a!important;background:linear-gradient(160deg,#376477,#173748)!important}
html:not([data-touch-ui="true"]) #marineBrand{left:16px!important;top:15px!important;width:166px!important;transform:scale(.82);transform-origin:top left}
html:not([data-touch-ui="true"]) #profileBar{left:190px!important;width:202px!important;max-width:202px!important;top:10px!important;height:40px!important;padding:4px 6px!important;gap:8px!important}
html:not([data-touch-ui="true"]) #profileLogout{min-height:30px!important;padding:6px 9px!important;font-size:11px!important;border:1px solid #7296a8!important;background:#274f62!important;border-radius:6px!important}
html:not([data-touch-ui="true"]) #tfResourceStrip{left:402px!important;right:202px!important;top:10px!important;height:40px!important;overflow-x:auto;scrollbar-width:thin}
html:not([data-touch-ui="true"]) #repairTools{top:10px!important;right:12px!important;width:180px!important}
html:not([data-touch-ui="true"]) .buttons{left:190px!important;right:200px!important;top:58px!important;max-width:none!important;width:auto!important;gap:5px!important}
html:not([data-touch-ui="true"]) .buttons button{height:32px!important;padding:5px 11px!important;letter-spacing:.5px}
html:not([data-touch-ui="true"]) .hud{left:12px!important;top:108px!important;width:170px!important;padding:12px!important;font-size:11px!important}
html:not([data-touch-ui="true"]) #marineSide{left:12px!important;top:266px!important;width:160px!important;gap:7px!important;max-height:calc(100dvh - 390px)}
html:not([data-touch-ui="true"]) #marineSide button{min-height:35px!important;height:38px!important;font-size:11px!important;text-align:left!important;letter-spacing:.6px}
html:not([data-touch-ui="true"]) #tfMiniMap{right:12px!important;top:108px!important;width:170px!important;height:121px!important;padding:6px!important}
html:not([data-touch-ui="true"]) #tfMiniMap canvas{height:99px!important;width:100%!important}
html:not([data-touch-ui="true"]) #marineMission{top:239px!important;width:170px!important;font-size:11px!important;padding:12px!important;max-height:110px}
html:not([data-touch-ui="true"]) .actions{left:190px!important;right:178px!important;bottom:10px!important;min-height:62px!important;max-height:132px!important;padding:0!important;gap:5px!important;grid-template-columns:repeat(auto-fit,minmax(58px,1fr))!important}
html:not([data-touch-ui="true"]) .actions button{height:62px!important;min-height:62px!important;font-size:9px!important}
html:not([data-touch-ui="true"]) #cameraCombatButtons{width:154px!important;right:12px!important;bottom:10px!important}
html:not([data-touch-ui="true"]) #cameraCombatButtons button{min-height:29px!important;font-size:10px!important}
html:not([data-touch-ui="true"]) #tfPositionBadge{left:12px!important;bottom:10px!important;width:166px!important;max-width:166px!important;min-height:62px!important;border-radius:10px!important;font-size:11px!important}
html:not([data-touch-ui="true"]) #navigationStatus{left:50%!important;max-width:45vw!important;width:auto!important;padding:5px 14px!important;border-radius:20px!important;pointer-events:none!important;background:#071d29b0!important;font-size:11px!important}
html:not([data-touch-ui="true"]) #chatBox{width:230px!important;max-width:230px!important;bottom:calc(var(--dock-height12,62px) + 28px)!important}
html:not([data-touch-ui="true"]) #portPopup{width:220px!important;right:254px!important;font-size:12px!important}
html:not([data-touch-ui="true"]) .panel{left:190px!important;right:196px!important;top:108px!important;padding:18px!important}
html:not([data-touch-ui="true"]) .panel :is(input,select,button){min-height:34px;border-radius:6px}
@media(max-width:1150px){html:not([data-touch-ui="true"]) #tfResourceStrip{right:158px!important}html:not([data-touch-ui="true"]) #repairTools{width:138px!important}html:not([data-touch-ui="true"]) #repairTools button{padding:6px!important;font-size:10px!important}html:not([data-touch-ui="true"]) .buttons{right:182px!important}html:not([data-touch-ui="true"]) .buttons button{min-width:58px!important;font-size:10px!important;padding:4px 7px!important}html:not([data-touch-ui="true"]) #marineMission{display:none!important}}
@media(max-height:720px){html:not([data-touch-ui="true"]) #marineSide{top:255px!important;max-height:calc(100dvh - 355px)}html:not([data-touch-ui="true"]) #marineSide button{height:32px!important;min-height:32px!important}html:not([data-touch-ui="true"]) #chatMessages{height:70px!important}html:not([data-touch-ui="true"]) #portPopup{max-height:230px!important}}

html[data-touch-ui="true"] #mobileFullscreen14::after{content:'⛶'!important;font:25px Arial!important;display:block;color:#e1eced!important}#mobileHelm14 small{bottom:6px;font-size:8px;letter-spacing:1px;opacity:.7}

html[data-touch-ui="true"] #mobileFullscreen14{padding:7px!important;display:grid;place-items:center}html[data-touch-ui="true"] #mobileFullscreen14::after{content:none!important}#mobileFullscreen14 svg{display:block;color:#e1eced}

/* Compact nine-map overview; pinch zoom retains detailed ownership text. */
html[data-touch-ui="true"] #world .regionText{padding:3px!important;line-height:1.15!important}
html[data-touch-ui="true"] #world .mapOwner7{margin-top:3px!important;padding-top:3px!important;line-height:1.15!important;min-height:0!important}
html[data-touch-ui="true"] #world .fleetEmblem7{display:inline-block!important;width:20px!important;height:20px!important;font-size:12px!important;line-height:20px!important;padding:0!important;margin-right:3px!important;border-radius:4px!important}
