@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');
:root{color-scheme:dark;font-family:'Space Grotesk',system-ui,sans-serif;background:#080e18;color:#dfe8f4}*{box-sizing:border-box}body{margin:0}header{height:78px;border-bottom:1px solid #263242;display:flex;justify-content:space-between;align-items:center;padding:0 30px}.brand{color:#64dfcc;font-size:24px;letter-spacing:5px}.brand span{display:block;font-size:9px;color:#8091a7;letter-spacing:2px;margin-top:4px}#connection{font-size:10px;letter-spacing:2px;color:#64dfcc}main{display:block;min-height:0}aside{padding:28px 22px;border-right:1px solid #263242;background:#0d1420}.right{border-right:0;border-left:1px solid #263242}label{font-size:10px;letter-spacing:2px;color:#8799af}h2{font-size:22px;margin:12px 0}p,li{font-size:13px;line-height:1.7}.muted{color:#8596ac}.small{font-size:11px}.line{height:1px;background:#263242;margin:25px 0}button{background:#142233;color:#c7d7e8;border:1px solid #2b4056;border-radius:4px;padding:12px;text-align:left;font:inherit;font-size:12px;cursor:pointer;width:100%;margin:6px 0}button:hover{border-color:#64dfcc;color:#64dfcc}kbd{float:right;color:#6d8b9c}#stats p{display:flex;justify-content:space-between;margin:12px 0}#stats b{color:#64dfcc}.viewport{position:relative;overflow:hidden;background:#060b14}.viewbar{position:absolute;top:0;left:0;right:0;padding:20px 24px;display:flex;justify-content:space-between;font-size:10px;letter-spacing:2px;z-index:1;color:#94a9bf}canvas{display:block;width:100%;height:100%;image-rendering:pixelated}#toast{position:absolute;bottom:65px;left:24px;right:24px;padding:12px 16px;border-left:2px solid #64dfcc;background:#101e2ce8;font-size:12px}.controls{position:absolute;bottom:20px;width:100%;text-align:center;font-size:9px;letter-spacing:1px;color:#8293a7}ol{padding-left:18px;color:#a6b6c9}li{padding-bottom:12px}#players p{color:#64dfcc}#count{float:right}dialog{background:#101c2c;color:#dfe8f4;border:1px solid #3c5c70;border-radius:8px;padding:36px;width:450px}dialog::backdrop{background:#040913e8}h1{font-size:30px}input{background:#080e18;color:white;border:1px solid #3c5c70;padding:14px;width:100%;font:inherit}dialog button{background:#64dfcc;color:#081821;font-weight:bold}#joinError{color:#ff988b}@media(max-width:1000px){.right{display:none}}@media(max-width:600px){header{padding:12px}.brand{font-size:18px}aside{padding:20px 10px}.controls{font-size:8px}}
[hidden]{display:none!important}select{background:#101e2e;color:#dfe8f4;border:1px solid #365168;border-radius:4px;padding:10px;font:inherit;font-size:12px;max-width:100%}fieldset{border:1px solid #2b4056;margin:20px 0;padding:16px}legend{color:#64dfcc;font-size:12px}fieldset label{display:block;margin:8px 0}fieldset select{width:100%;margin-bottom:10px}#chart-tools{position:absolute;right:20px;top:58px;display:flex;gap:6px}#chart-tools button{width:auto;margin:0;padding:8px 12px;background:#101e2ee8}#route-panel{position:absolute;top:58px;left:20px;display:flex;align-items:center;gap:8px;flex-wrap:wrap;max-width:calc(100% - 200px)}#route-panel button{width:auto;margin:0;padding:10px}#route-info{font-size:10px;color:#94a9bf;width:100%}button:disabled{opacity:.45;cursor:default}canvas{touch-action:none}button:focus-visible,select:focus-visible,input:focus-visible{outline:2px solid #64dfcc;outline-offset:3px}@media(max-width:650px){#chart-tools{top:115px}#route-panel{max-width:calc(100% - 40px)}#route-info{display:none}}
aside{overflow-y:auto}#repair-panel{background:#111f2e;padding:10px;border:1px solid #4f4530;margin:5px 0}#repair-panel select{width:100%;margin-top:8px}#encounter-status{font-size:12px;line-height:1.7;color:#edbd79}#stats p{margin:8px 0}
#engineering-dialog{width:620px;max-width:94vw;max-height:90vh;overflow:auto;padding:24px}#crew-dialog{width:500px;max-width:94vw;max-height:90vh;overflow:auto;padding:24px}.power-current{padding:12px;background:#0a1725;border:1px solid #30485c;font-size:10px;letter-spacing:1px}.power-current b{float:right;color:#e6b36d}.power-current p{font-size:11px;color:#64dfcc;margin-bottom:0}.station-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:14px}.station-row select{flex:1;min-width:150px}.station-row button{width:auto;font-size:11px;margin:0}.station-row label{width:100%;letter-spacing:1px}#circuit-workspace{display:flex;align-items:center;justify-content:center;gap:14px;margin:18px 0}.circuit-port{font-size:10px;letter-spacing:1px;color:#e6b36d}#circuit-grid{display:grid;grid-template-columns:repeat(3,58px);gap:5px}#circuit-grid button{height:58px;width:58px;padding:0;margin:0;font:46px/1 monospace;color:#788fa5;background:#0b1827;border-color:#30485c}#circuit-grid button.powered{color:#64dfcc;border-color:#438977;background:#112f31}#circuit-status{font-size:12px;color:#e6b36d}dialog button.secondary{color:#b7c7d8;background:#142233;border-color:#334d63}#crew-assigned>label:not(.check-row){display:block;margin:14px 0 7px}#crew-assigned>select{width:100%}.check-row{display:flex;align-items:center;gap:9px;letter-spacing:0;font-size:12px;margin-top:18px}.check-row input{width:auto}progress{width:100%;accent-color:#64dfcc}#crew-status{color:#64dfcc}dialog h3{font-size:18px}#engineering-dialog p{line-height:1.5;margin:10px 0}#engineering-dialog .small{font-size:10px}
dialog button:hover{color:#081821;background:#87e9dc}dialog button.secondary:hover{color:#64dfcc;background:#1b2c40}#circuit-grid button svg{display:block;width:100%;height:100%}#circuit-grid button:hover{color:#aeece0;background:#183942;border-color:#64dfcc}
#interaction-prompts{position:absolute;left:50%;top:105px;transform:translateX(-50%);z-index:3;display:flex;flex-wrap:wrap;justify-content:center;gap:6px;max-width:90%;width:max-content;padding:7px;background:#081522e8;border:1px solid #477b80;border-radius:7px;box-shadow:0 6px 20px #0008}#interaction-prompts button{width:auto;margin:0;padding:8px 10px;font-size:11px;display:flex;align-items:center;gap:9px}#interaction-prompts kbd{float:none;background:#294957;color:#a6efdf;border:1px solid #507c88;padding:3px 6px;border-radius:3px}#repair-job{padding:12px;background:#0a1725;border:1px solid #30485c;margin-top:12px}#repair-job-status{color:#e6b36d}

/* Compact engineering workspace: visible condition rows instead of a target picker. */
#engineering-dialog{width:790px;padding:20px;max-height:94vh}.engineering-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding-bottom:14px;border-bottom:1px solid #30485c}.engineering-header h2{font-size:23px;margin:4px 0 0}.engineering-header button{width:auto;margin:0;padding:9px 12px;white-space:nowrap}.engineering-header kbd{margin-left:15px}.engineering-layout{display:grid;grid-template-columns:minmax(0,1.08fr) minmax(0,1fr);gap:22px;padding-top:14px}.engineering-layout h3{margin:0 0 12px;font-size:14px;color:#dbe6f2}.engineering-repairs{border-left:1px solid #30485c;padding-left:20px}.engineering-power .station-row{margin-top:12px}.engineering-power .station-row label{letter-spacing:1px}.engineering-power .station-row select{min-width:0;width:0;padding:8px;font-size:11px}.engineering-power .station-row button{padding:9px 12px}.engineering-power .power-current{padding:10px}#engineering-dialog .power-current p{font-size:10px;margin:7px 0 0;letter-spacing:0}#engineering-dialog #circuit-workspace{gap:8px;margin:14px 0}#engineering-dialog #circuit-grid{grid-template-columns:repeat(3,48px);gap:4px}#engineering-dialog #circuit-grid button{width:48px;height:48px}.circuit-port{font-size:9px;letter-spacing:0}.repair-systems{display:grid;gap:9px}.repair-system{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:12px;row-gap:7px;align-items:center;padding:10px;background:#0b1827;border:1px solid #2d4155;border-radius:5px}.repair-system-heading{display:flex;justify-content:space-between;gap:10px;font-size:12px}.repair-system-heading strong{font-size:11px;color:#64dfcc;font-variant-numeric:tabular-nums}.condition-bar{grid-column:1;height:6px;border-radius:3px;background:#253446;overflow:hidden}.condition-bar span{display:block;height:100%;background:#64dfcc;transition:width .15s linear}.repair-system button{grid-column:2;grid-row:1 / span 2;width:auto;margin:0;padding:8px 9px;font-size:10px;min-width:85px;text-align:center}.repair-system.damaged .condition-bar span{background:#e6b36d}.repair-system.damaged strong{color:#e6b36d}.repair-system.critical .condition-bar span{background:#f48f84}.repair-system.critical strong{color:#f48f84}.repair-system.repairing{border-color:#60968d;background:#102628}.repair-system button:disabled{background:#152838;color:#8b9eaf;opacity:1;border-color:#263c4e}#engineering-dialog #repair-job{padding:9px;margin-top:10px}#engineering-dialog #repair-job p{margin:0 0 6px;font-size:11px}#repair-job .station-row{margin-top:6px}#repair-job .station-row button{padding:7px 9px;font-size:10px}.engineering-footer{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-top:14px;padding-top:12px;border-top:1px solid #30485c}#engineering-dialog .engineering-footer p{margin:3px 0;font-size:10px}.engineering-footer button{width:auto;flex-shrink:0;margin:0;padding:9px 11px;font-size:10px}@media(max-width:680px){#engineering-dialog{padding:16px}.engineering-layout{grid-template-columns:1fr;gap:18px}.engineering-repairs{border-left:0;padding-left:0;border-top:1px solid #30485c;padding-top:14px}.engineering-footer{flex-wrap:wrap}.engineering-header h2{font-size:20px}}
@media(max-width:680px){.engineering-repairs{order:-1;border-top:0;padding-top:0}.engineering-power{border-top:1px solid #30485c;padding-top:14px}}@media(max-width:400px){.engineering-header{gap:8px}.engineering-header h2{font-size:18px}.engineering-header button{font-size:10px;padding:7px}.engineering-header kbd{margin-left:8px}}

#boarding-status{position:absolute;right:16px;top:55px;max-width:280px;background:#101c2eef;border:1px solid #986c57;border-radius:8px;padding:12px;pointer-events:none;font-size:12px}#boarding-status strong{color:#efb16f;letter-spacing:1px}#boarding-status p{margin:7px 0;color:#c3d4dd}#boarding-health{color:#e5a298}#respawn-options{display:grid;gap:10px}#character-health{color:#e9bd7e} @media(max-width:700px){#boarding-status{max-width:190px;font-size:10px;right:8px;padding:8px}}



#hotbar{position:absolute;bottom:34px;left:16px;right:16px;background:#0d1828ed;border:1px solid #31475e;border-radius:7px;padding:7px}.hotbar-heading{display:flex;justify-content:space-between;align-items:center;font-size:9px;letter-spacing:1px;color:#9eb8c9}#hotbar-edit{width:auto;margin:0;padding:4px 8px;font-size:10px}#hotbar-slots{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:4px}#hotbar-slots button{height:36px;margin:3px 0 0;padding:4px;font-size:9px;line-height:1.2;text-align:center;overflow:hidden}#hotbar-slots kbd{float:none;display:block;font-size:9px;color:#e5bc80}#toast{bottom:157px;font-size:11px;padding:7px 12px}#hotbar-dialog{width:min(680px,94vw);max-height:90vh;overflow:auto;padding:22px}#hotbar-editor{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}#hotbar-editor label{display:grid;gap:5px}#hotbar-editor select{width:100%;font-size:11px}#route-panel{bottom:195px}@media(max-width:650px){#hotbar-editor{grid-template-columns:repeat(2,minmax(0,1fr))}#hotbar{left:6px;right:6px}#hotbar-slots button{font-size:8px}}

#hangar-dialog,#access-dialog,#port-service-dialog{width:min(560px,90vw);max-height:85vh;overflow:auto} .hangar-tabs{display:flex;gap:8px;margin:12px 0}.hangar-tabs button{flex:1}.hangar-tabs [aria-pressed="false"]{background:#203244;color:#9db4c4}#hangar-ships{max-height:48vh;overflow:auto;margin:12px 0;display:grid;gap:8px}.hangar-ship{text-align:left;white-space:normal}#access-guests{display:grid;gap:8px;margin-bottom:16px}

#crew-dialog{width:min(700px,90vw);max-height:88vh;overflow:auto}.crew-specialist{border-top:1px solid #30485c;margin-top:18px;padding-top:14px}.crew-specialist h3{margin:0 0 8px}.crew-specialist select{margin-bottom:8px}.crew-specialist button{margin:6px 0}#specialist-cards{display:grid;grid-template-columns:1fr 1fr;gap:18px}@media(max-width:600px){#specialist-cards{grid-template-columns:1fr}}

#emergency-alert{position:absolute;top:48px;left:12px;right:12px;background:#542819ee;border:1px solid #ec9662;padding:9px;border-radius:6px;font:11px monospace;color:#ffd1ac;pointer-events:none}#support-status{position:absolute;top:110px;left:16px;width:min(280px,80%);padding:14px;background:#101e2bf2;border:1px solid #75b7aa;border-radius:8px;font-size:12px}#support-status strong{color:#92ded0}#support-status p{color:#b8cfdb}#support-status button{font-size:12px}

#operations-dialog,#character-dialog{width:min(840px,94vw);max-height:88vh;overflow:auto;padding:24px}.operations-grid{display:grid;grid-template-columns:1fr 1fr;gap:24px}.operations-grid select,.operations-grid input{width:100%}.preserved-lines{white-space:pre-line}.upgrade-row,.item-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid #304354;font-size:12px}.upgrade-row button,.item-row button{width:90px;flex-shrink:0;margin:0}.item-row span{white-space:pre-line}.rarity-magic{color:#91baff}.rarity-rare{color:#efcc81}.reward-note{color:#8ee1c8}@media(max-width:650px){.operations-grid{grid-template-columns:1fr}}

.item-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}

#ship-module-dialog{width:min(800px,94vw);max-height:88vh;overflow:auto;padding:22px}

#skills-dialog{width:min(1120px,96vw);max-height:92vh;overflow:auto;padding:28px}.skill-window-header{display:flex;justify-content:space-between;gap:24px}.skill-window-header button{width:auto;align-self:start}#skill-tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:20px 0}#skill-tabs button{border-bottom:3px solid var(--tree-color)}#skill-tabs button[aria-selected=true]{background:#284151;color:var(--tree-color)}.skill-tree{background:radial-gradient(ellipse at top,#213343,#101923 65%);padding:22px;border:1px solid #344b60;border-radius:12px}.skill-tree h3{color:var(--tree-color);font-size:24px;margin:0}.tier-label{border-top:1px solid #365065;padding-top:20px;color:#aebfce;font-size:11px;text-transform:uppercase;letter-spacing:1px}.skill-tier{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin-bottom:24px}.skill-node{position:relative;padding:18px;border:1px solid #496074;border-radius:10px;background:#152431;box-shadow:0 5px 14px #0004}.skill-node:not(:first-child)::before{content:'';position:absolute;width:18px;height:1px;background:var(--tree-color);left:-19px;top:50%}.skill-node.learned{border-color:var(--tree-color);box-shadow:inset 0 0 18px #ffffff08}.skill-node.locked{opacity:.6}.skill-node small{color:var(--tree-color);text-transform:uppercase;font-size:10px;letter-spacing:1px}.skill-node h4{font-size:17px;margin:10px 0}.skill-node p{font-size:12px;line-height:1.6}.skill-node button{font-size:12px}.skill-ranks{display:flex;gap:5px;margin:12px 0}.skill-ranks span{width:24px;height:6px;background:#3b4c5b;border-radius:2px}.skill-ranks .filled{background:var(--tree-color)}.skill-requirement{color:#a8bdce;font-size:11px!important;min-height:18px}@media(max-width:700px){#skill-tabs{grid-template-columns:1fr 1fr}.skill-tier{grid-template-columns:1fr}.skill-node{grid-column:1!important}.skill-node::before{display:none}#skills-dialog{padding:16px}.skill-tree{padding:14px}}

.skill-links{width:100%;height:36px;display:block;overflow:visible}.skill-links path{fill:none;stroke:var(--tree-color);stroke-width:2;opacity:.6}.skill-node:not(:first-child)::before{display:none}@media(max-width:700px){.skill-links{display:none}}

#inventory-dialog{width:min(1240px,96vw);max-height:92vh;overflow:auto;padding:24px}.transfer-panes{display:grid;grid-template-columns:1fr 1fr;gap:24px;margin-top:16px}.transfer-panes>section{min-width:0;border:1px solid #3a4d61;background:#101e29;padding:14px;border-radius:9px}.transfer-panes select{width:100%}#inventory-quantity{width:100px;margin:8px 0}.inventory-toolbar{display:flex;gap:8px;align-items:center;margin:12px 0}.inventory-toolbar span{margin-right:auto;color:#91aabc;font-size:11px}.inventory-toolbar button{width:auto;margin:0;padding:6px 12px}.inventory-toolbar button[aria-pressed=true]{background:#31556a}.inventory-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(60px,1fr));gap:6px;min-height:80px}.inventory-cell{aspect-ratio:1;background:#0b1520;border:1px solid #2d4357;border-radius:6px;min-width:0}.inventory-item{display:block;position:relative;width:100%;height:100%;margin:0;padding:3px;border:2px solid #8598a5;border-radius:5px;background:#192a37;cursor:grab}.inventory-item img{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none}.inventory-item.rarity-magic{border-color:#6399f1}.inventory-item.rarity-rare{border-color:#e4ba4b}.item-quantity{position:absolute;right:5px;bottom:3px;font:bold 12px monospace;color:#fff;text-shadow:1px 1px #000}.equipment-slots{display:grid;grid-template-columns:repeat(3,minmax(90px,1fr));gap:14px;margin:16px 0}.equipment-drop{display:flex;align-items:center;flex-direction:column;gap:8px;min-height:120px;border:1px dashed #6c8698;padding:10px;border-radius:8px;background:#11232f}.equipment-drop>span{font-size:11px;letter-spacing:1px;color:#a8c3d1}.equipment-drop small{font-size:11px;color:#678699}.equipment-drop .inventory-item{width:72px;height:72px}.drop-ready{outline:2px solid #7ee0bd;outline-offset:1px;background:#254a43!important}.inventory-list{overflow-x:auto;min-height:90px}.inventory-list table{border-collapse:collapse;width:100%;font-size:11px}.inventory-list th{background:#1b3041;text-align:left}.inventory-list th button{padding:8px 5px;background:transparent;border:none;text-align:left;margin:0;font-size:11px;white-space:nowrap}.inventory-list td{padding:10px 7px;border-bottom:1px solid #304454;max-width:220px}.inventory-list tr{cursor:grab}.inventory-list tbody tr:hover{background:#243e50}.item-popover{position:fixed;z-index:10000;width:300px;box-sizing:border-box;background:#0a111bf5;border:2px solid #8598a5;border-radius:7px;padding:16px;box-shadow:0 10px 35px #000a;pointer-events:none;color:#cbd8e1}.item-popover.rarity-magic{border-color:#6399f1}.item-popover.rarity-rare{border-color:#e4ba4b}.item-popover h3{margin:0 0 10px;font-size:17px}.item-popover p{font-size:12px;line-height:1.5;margin:8px 0}.item-popover .item-affix{color:#91baff}.item-popover small{font-size:10px;color:#889ead}.inventory-cell .inventory-item{aspect-ratio:1}@media(max-width:800px){.transfer-panes{grid-template-columns:1fr}.inventory-grid{grid-template-columns:repeat(auto-fill,minmax(52px,1fr))}}

.inventory-item-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding:10px 0}.inventory-item-actions span{margin-right:auto;font-size:12px}.inventory-item-actions button{width:auto;margin:0;padding:6px 10px;font-size:11px}

.debug-loot-controls{display:flex;gap:10px;align-items:center;flex-wrap:wrap;padding:12px;border:1px dashed #576a7e;border-radius:7px;margin:12px 0}.debug-loot-controls button,.debug-loot-controls select{width:auto;margin:0}.debug-loot-controls label{font-size:10px;color:#9aaebd}

.comparison-title{border-top:1px solid #45586a;padding-top:10px;color:#d4c69b}.comparison-gain{color:#86dda3}.comparison-loss{color:#ed8c8c}.inventory-toolbar{flex-wrap:wrap}.item-popover{max-height:90vh;overflow:auto}

#character-menu{width:min(1240px,96vw);max-height:92vh;overflow:auto;padding:24px}.character-menu-header{display:flex;align-items:center;justify-content:space-between;gap:20px}.character-menu-header button{width:auto}.character-menu-header h2{margin:8px 0}#character-menu-tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;position:sticky;top:-24px;background:#10202e;z-index:2;padding:14px 0;margin-bottom:20px;border-bottom:1px solid #3a5268}#character-menu-tabs button{margin:0}#character-menu-tabs button[aria-selected=true]{background:#31596b;border-color:#82d7cc;color:#c8fff5}#character-menu [role=tabpanel][hidden]{display:none}#character-menu #character-dialog,#character-menu #skills-dialog,#character-menu #inventory-dialog{width:auto;max-height:none;overflow:visible;padding:0}#menu-panel-stats .operations-grid{grid-template-columns:1fr}#character-menu .skill-window-header h2{font-size:22px}@media(max-width:650px){#character-menu{padding:16px}#character-menu-tabs{top:-16px}}

.inventory-filters{display:flex;gap:6px;flex-wrap:wrap;margin:8px 0 14px}.inventory-filters input{flex:1;min-width:130px}.inventory-filters select,.inventory-filters button{width:auto;margin:0;font-size:11px}.inventory-filters button[aria-pressed=true]{background:#5a4a31;border-color:#dab46c}.item-marker{position:absolute;top:2px;left:4px;color:#ffe19a;font-size:12px;text-shadow:1px 1px #000}

.rarity-commodity{color:#53c9ba}.inventory-item.rarity-commodity,.item-popover.rarity-commodity{border-color:#53c9ba}.inventory-item.rarity-commodity{background:#132f32}.inventory-list .rarity-commodity td:first-child{border-left:3px solid #53c9ba}
#market-dialog{width:min(1150px,96vw);max-height:90vh;overflow:auto;padding:24px}.market-header{display:flex;align-items:center;justify-content:space-between;gap:16px}.market-header button{width:auto}.market-controls{display:grid;grid-template-columns:2fr .8fr 1fr 1.2fr;gap:12px;margin:18px 0}.market-controls label{display:flex;flex-direction:column;gap:8px}.market-controls input,.market-controls select{width:100%;min-width:0;box-sizing:border-box}.market-table{overflow:auto}.market-table table{width:100%;border-collapse:collapse;font-size:12px}.market-table th{color:#9fb4c5;text-align:left;background:#18303c;white-space:nowrap}.market-table td,.market-table th{padding:12px 8px;border-bottom:1px solid #314858}.market-table tbody tr:hover{background:#1f3b43}.market-table td:last-child{white-space:nowrap}.market-table button{width:auto;margin:2px;padding:7px 10px;font-size:11px}.market-table td:first-child{font-weight:600}@media(max-width:720px){.market-controls{grid-template-columns:1fr 1fr}#market-dialog{padding:16px}}

#utility-dialog{width:min(720px,94vw);max-height:88vh;overflow:auto;padding:24px}.utility-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}#utility-dialog select{width:100%}#utility-result{padding:16px;background:#102630;border:1px solid #416271;line-height:1.7}

.rarity-unique,.unique-effect{color:#ef8a47}.inventory-item.rarity-unique,.item-popover.rarity-unique{border-color:#ef8a47}.inventory-list .rarity-unique td:first-child{border-left:3px solid #ef8a47}

#navigation-views{display:flex;gap:6px;width:100%}#navigation-views button[aria-pressed=true]{border-color:#64dfcc;color:#64dfcc;background:#1b3b43}#system-panel{position:absolute;right:15px;top:165px;bottom:180px;width:280px;max-width:42%;overflow:auto;padding:14px;background:#0b1929ed;border:1px solid #365168;border-radius:6px;font-size:11px}#system-panel h3{font-size:17px;margin:0 0 8px}#system-panel p{font-size:11px;line-height:1.5}#system-location{width:100%;margin-top:8px}#system-detail{white-space:pre-line}.system-actions{display:flex;flex-wrap:wrap;gap:5px}.system-actions button{padding:8px;font-size:11px;margin:0;width:auto}#system-survey-status{color:#a3c8c5}@media(max-width:700px){#system-panel{top:185px;right:8px;width:235px;padding:9px}}#system-panel label{letter-spacing:1px}

#harvest-panel{position:absolute;left:18px;top:112px;width:250px;max-width:42%;max-height:45%;overflow:auto;padding:12px;background:#0d202aeb;border:1px solid #488580;border-radius:6px}#harvest-panel select{width:100%;margin-top:7px;padding:7px;font-size:11px}#harvest-panel p{font-size:10px;line-height:1.5;margin:8px 0}#toolshop-dialog{width:620px;max-width:94vw;max-height:90vh;overflow:auto}#toolshop-storage{width:100%}

#refinery-dialog{width:760px;max-width:94vw;max-height:90vh;overflow:auto}#refinery-dialog label{display:block;margin:12px 0 6px}#refinery-storage{width:100%}#refinery-batches{width:100px;padding:9px}.refinery-card{border:1px solid #355064;background:#0d1b29;padding:12px;border-radius:6px;margin:10px 0}.refinery-card h4{margin:0;font-size:14px}.refinery-card p{font-size:12px;margin:8px 0}.refinery-card button{width:auto;margin:0;padding:8px 12px}

#market-dialog details{margin:16px 0;padding:12px;border:1px solid #344c60;border-radius:8px}#market-dialog summary{cursor:pointer;color:#53c9ba}#market-routes p{padding:8px 0;border-bottom:1px solid #263b4b;font-size:13px}#market-bottlenecks{max-height:100px;overflow:auto}.market-table table{min-width:1000px}

.mission-controls{display:flex;gap:16px;flex-wrap:wrap}.mission-controls label{flex:1;min-width:240px}.mission-card{padding:16px;margin:12px 0;background:#102334;border:1px solid #30485c;border-radius:8px}.mission-card h4{margin:0 0 8px;color:#64dfcc}.mission-card p{font-size:13px}.mission-card button{width:auto;margin:4px 8px 4px 0}#missions-offers{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:12px}

.political-toggle{display:inline-flex;align-items:center;gap:6px;font-size:12px}.political-toggle input{width:auto;accent-color:#64dfcc}

.world-activity{margin:18px 0;padding:16px;border:1px solid #30485c;border-radius:8px;background:#102334}.world-activity h3{margin-top:0;color:#64dfcc}#activity-events{max-height:260px;overflow:auto}#activity-factions p{padding:6px 0;border-bottom:1px solid #30485c}.world-activity details{margin-top:14px}

.shop-catalog{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px}.shop-catalog .mission-card{margin:0}.shop-catalog .rarity-magic{border-color:#729de2}.shop-catalog .rarity-rare{border-color:#e9c766}.shop-catalog .rarity-unique{border-color:#d59465}#transfer-dialog,#contract-board-dialog,#shop-dialog,#activity-dialog{width:min(1100px,92vw);max-height:88vh;overflow:auto}

#crew-board-dialog { width:min(1100px,92vw);max-height:88vh;overflow:auto; }
#crew-dialog { width:min(1100px,92vw);max-height:88vh;overflow:auto; }
#specialist-cards { display:grid;grid-template-columns:repeat(auto-fit,minmax(270px,1fr));gap:12px; }
.crew-specialist select { max-width:100%; }

#interior-editor { width:min(1280px,94vw);max-height:92vh;overflow:auto; }
.interior-tools,.interior-actions { display:flex;align-items:end;flex-wrap:wrap;gap:12px; margin:12px 0; }
.interior-tools label { display:flex;flex-direction:column;gap:5px; }
#interior-deck-scroll { overflow:auto;max-height:56vh;border:1px solid #426175;background:#0b1724; }
#interior-deck { display:block;max-width:none;touch-action:none;cursor:crosshair; }
#interior-errors { min-height:32px;color:#9ddac4; }

#interior-deck { width:auto;height:auto; }
.interior-tools button,.interior-actions button { width:auto; }

#ship-tour-dialog{width:min(1100px,94vw);max-width:94vw;max-height:94vh;padding:20px;}
.ship-tour-viewport{position:relative;height:min(60vh,580px);min-height:240px;border:1px solid #42596f;overflow:hidden;background:#070d18;}
#ship-tour-canvas{display:block;position:static;width:100%;height:100%;}
#ship-tour-map{position:absolute;right:10px;top:10px;width:auto;height:auto;border:1px solid #91c5da;box-shadow:0 2px 12px #0009;pointer-events:none;}
.shop-catalog .mission-card button+button{margin-left:8px;margin-top:8px;}

#manufacturing-dialog{width:min(1150px,94vw);max-height:90vh;overflow:auto;padding:24px;}
.manufacturing-controls{display:grid;grid-template-columns:1fr 100px 2fr;gap:16px;margin:16px 0;}
.manufacturing-controls label{display:flex;flex-direction:column;gap:8px;}
.manufacturing-controls input,.manufacturing-controls select{width:100%;}
#manufacturing-sources{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:8px;max-height:180px;overflow:auto;}
#manufacturing-sources label{display:flex;align-items:center;gap:8px;letter-spacing:0;font-size:12px;}
#manufacturing-sources input{width:auto;}
.manufacturing-materials{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0;font-size:12px;color:#53c9ba;}
.manufacturing-materials span{padding:5px 8px;background:#15313a;border:1px solid #345c60;border-radius:4px;}
#manufacturing-dialog details{padding:14px;border:1px solid #345166;border-radius:6px;}
#manufacturing-dialog summary{cursor:pointer;color:#8ee1c8;}
#manufacturing-jobs button{margin:4px 8px 0 0;}
@media(max-width:650px){.manufacturing-controls{grid-template-columns:1fr 100px;}.manufacturing-controls label:last-child{grid-column:1/-1;}}

#station-control-dialog{width:min(1150px,94vw);max-height:90vh;overflow:auto;padding:24px;}
#station-deploy-dialog{width:min(620px,94vw);max-height:90vh;overflow:auto;}
#station-deploy-dialog label,#station-settings>label{display:flex;flex-direction:column;gap:8px;margin:12px 0;}
#station-deploy-kit,#station-access{width:100%;}
#station-settings{padding:14px;border:1px solid #3c5968;border-radius:6px;}
#station-settings summary{cursor:pointer;color:#8ee1c8;}
#station-docked button{width:auto;margin-left:12px;}

#empire-dialog{width:min(1100px,94vw);max-height:90vh;overflow:auto;padding:24px;}
#empire-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 20px;position:sticky;top:0;background:#0c1925;padding:10px;z-index:1;}
#empire-dialog section>label,#empire-dialog details>label{display:flex;flex-direction:column;gap:8px;margin:12px 0;}
#empire-dialog label.check-row{flex-direction:row;align-items:center;letter-spacing:0;}
#empire-dialog label.check-row input{width:auto;}
#empire-dialog select{width:100%;}
#empire-dialog details{border:1px solid #345166;border-radius:6px;padding:14px;margin:12px 0;}
#empire-dialog summary{cursor:pointer;color:#8ee1c8;}
#empire-dialog button{margin:4px 8px 4px 0;}
#fleet-ships{max-height:180px;overflow:auto;}
#faction-assets,#empire-upkeep-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px;}

#chart-tools{top:auto;bottom:62px;left:20px;right:20px;justify-content:center;align-items:center;flex-wrap:wrap;background:#070d18e8;padding:6px;border-radius:6px}#chart-tools button{padding:7px 9px;font-size:11px}#nav-search{width:210px;margin:0;padding:7px;font-size:11px}@media(max-width:650px){#chart-tools{top:auto;bottom:60px;left:8px;right:8px}#nav-search{width:170px}}

#interior-palette{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0}#interior-palette button{width:auto;margin:0;padding:7px 10px;font-size:12px}#interior-palette button[aria-pressed="true"]{outline:2px solid #64dfcc;background:#23434a}.interior-tools input{max-width:150px}#interior-room-width,#interior-room-height{width:65px}#interior-deck{touch-action:none;cursor:crosshair}

#interior-console-tray{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:10px;border:1px solid #e5b96d;margin:10px 0}#interior-console-tray button{width:auto;margin:0;cursor:grab}#interior-console-tray span{color:#64dfcc}#interior-airlock-offset{width:65px}

.inventory-item canvas.item-art{width:100%;height:100%;object-fit:contain;pointer-events:none;display:block}

.shop-ship-art{display:block;width:100%;height:105px;object-fit:contain;background:#0b1015;border-radius:5px;margin-bottom:10px}
/* Main viewport HUD */
body{height:100dvh;overflow:hidden}body>header{height:58px;padding:0 20px;gap:20px;background:#0a111bcc}.viewport{height:100%;width:100%}.brand{font-size:20px;letter-spacing:4px}.brand span{font-size:8px}.header-status{display:flex;align-items:center;gap:20px;min-width:0}#connection{letter-spacing:1px;font-size:9px}#pilots-open{width:auto;padding:7px 10px;margin:0;font-size:11px;background:#152332;border-color:#354455;white-space:nowrap}#count{float:none;color:#86dcca;margin-left:5px}.viewbar{padding:13px 20px;background:linear-gradient(#080e18cc,transparent);font-size:9px;pointer-events:none}.viewbar span{max-width:75%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hud-pane{position:absolute;z-index:2;background:linear-gradient(135deg,#172432eb,#0a121dea);border:1px solid #475365;border-radius:6px;box-shadow:0 8px 25px #0006;backdrop-filter:blur(8px);width:214px;overflow:auto;scrollbar-width:thin;color:#b9c7d6}.hud-pane summary{cursor:pointer;padding:11px 12px;font-size:9px;letter-spacing:1.4px;color:#bbc6d3;border-bottom:1px solid #3a4656}.hud-content{padding:12px}.hud-pane h2{font-size:17px;margin:5px 0}.hud-pane p{font-size:11px;line-height:1.45;margin:7px 0}.hud-pane .small{font-size:10px}.hud-pane label{font-size:9px;letter-spacing:1px}.hud-pane .line{margin:12px 0}.hud-pane #stats p{margin:6px 0;font-size:10px}.hud-pane #stats b{font-weight:500;font-variant-numeric:tabular-nums}#telemetry-pane{left:12px;top:43px;max-height:calc(100% - 185px)}#contacts-pane{right:12px;top:43px;max-height:calc(100% - 365px)}#contacts-pane summary span{float:right;color:#819caf}#contacts-empty{padding:10px}#nearby-ships{padding:5px}.contact-row{display:grid;grid-template-columns:6px minmax(0,1fr) auto;gap:8px;align-items:center;padding:9px 7px;margin:2px 0;font-size:11px;border-color:transparent;background:transparent}.contact-row .contact-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.contact-row small{font-size:9px;color:#8094a7}.contact-row.selected{background:#2a3946;border-color:#637584;color:#f0dfb8}.contact-dot{width:5px;height:5px;background:#dbc589;border-radius:50%}.contact-row.hostile .contact-dot{background:#f18a7e}.contact-row.friendly .contact-dot{background:#7cd7a6}#target-pane{right:12px;bottom:135px;padding:12px}#target-pane h3{margin:8px 0;font-size:15px;color:#e3d1a6}#target-readout>p{display:flex;justify-content:space-between;gap:8px;font-size:9px}#target-range{white-space:nowrap;font-weight:500}.target-meter{display:grid;grid-template-columns:35px 1fr 30px;gap:7px;align-items:center;margin:8px 0;font-size:9px}.target-meter progress{height:6px;border:0;border-radius:3px;accent-color:#c9a36a;background:#2a3440}.target-meter b{text-align:right;font-weight:500}#target-shields{accent-color:#7abac8!important}#encounter-status{font-size:9px;color:#a5b5c1}#pilots-dialog{width:min(420px,92vw);padding:22px}#pilots-dialog h2{font-size:20px}#pilots-dialog #players{margin-top:14px}
#interaction-prompts{top:46px;max-width:calc(100% - 475px);font-size:10px}#toast{bottom:120px;left:50%;right:auto;transform:translateX(-50%);width:max-content;max-width:calc(100% - 480px);font-size:10px;padding:7px 12px;pointer-events:none;border-radius:3px}.controls{bottom:5px;font-size:8px;pointer-events:none}#support-status{left:240px;top:48px}#boarding-status{right:12px;top:43px}#emergency-alert{left:50%;width:max-content;max-width:calc(100% - 480px);transform:translateX(-50%)}
/* Numbered skills and mouse abilities are separate groups. */
#hotbar{left:50%;right:auto;bottom:23px;transform:translateX(-50%);width:max-content;max-width:calc(100% - 24px);padding:7px 9px 9px;border:1px solid #6e6654;background:linear-gradient(#17202bed,#0b111aee);box-shadow:0 6px 28px #000a;border-radius:7px;z-index:4}.hotbar-heading{height:17px;justify-content:center;position:relative;font-size:8px;letter-spacing:1.7px;color:#b2a78f;margin-bottom:5px}#hotbar-edit{position:absolute;right:0;top:-5px;font-size:17px;padding:0 5px;background:transparent;border:0;color:#a99f88;line-height:20px}.hotbar-groups{display:flex;gap:27px;align-items:center}#hotbar-slots,#hotbar-mouse{display:flex;gap:5px}.ability-slot,#hotbar-slots button{position:relative;flex-shrink:0;width:48px;height:50px;padding:2px;margin:0;background:#0b1119;border:1px solid var(--ability-color,#8d8877);border-radius:4px;box-shadow:inset 0 0 0 1px #0008,0 2px 4px #0009;overflow:hidden;text-align:center;line-height:1}.ability-slot .hotbar-art{display:block;width:100%;height:100%;object-fit:contain;image-rendering:auto;pointer-events:none}.ability-slot kbd,#hotbar-slots kbd{position:absolute;left:4px;top:3px;float:none;color:#fff0d1;font-size:10px;font-weight:bold;text-shadow:0 1px 4px #000,0 0 3px #000;background:#080d16b0;border-radius:2px;padding:2px;z-index:2;line-height:1}.ability-slot .ability-cooldown{position:absolute;inset:0;display:grid;place-items:center;font:bold 19px monospace;color:#f8edda;text-shadow:0 2px 3px #000;pointer-events:none}.ability-slot.recharging .ability-cooldown{background:#070b16a8}.ability-slot.unavailable .hotbar-art{filter:grayscale(1);opacity:.35}.ability-slot.unavailable{border-color:#574641}.ability-slot.empty{border-color:#34404d;opacity:.7}.ability-slot.selected{outline:2px solid #f5d998;outline-offset:2px}.ability-slot:hover{filter:brightness(1.2);border-color:#f5d998}.ability-tooltip{position:fixed;z-index:10010;width:290px;max-width:calc(100vw - 16px);padding:13px 15px;background:#090f19f5;color:#bfcddb;border:1px solid #9c8a65;border-radius:5px;box-shadow:0 8px 24px #000a;pointer-events:none;text-align:left}.ability-tooltip strong{font-size:14px;color:#efd9a3;display:block}.ability-tooltip p{font-size:11px;line-height:1.55;margin:9px 0}.ability-tooltip small{display:block;font-size:10px;color:#8eabbf;margin-top:5px}#hotbar-dialog{width:min(800px,94vw)}#hotbar-editor{display:block}.editor-slots{display:flex;gap:7px;flex-wrap:wrap;padding:12px 0 20px}.editor-slots .ability-slot{width:48px;height:50px;background:#0b1119}#hotbar-editor>button{width:auto;padding:7px 10px;font-size:11px;margin:0 0 15px}.ability-library{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.ability-choice{display:flex;align-items:center;gap:12px;margin:0;padding:7px!important;font-size:11px;background:#162431!important;color:#cdd8e1!important;text-align:left}.ability-choice .hotbar-art{width:42px;height:42px;image-rendering:auto;flex-shrink:0}.ability-choice:hover{border-color:#efdbac!important}.ability-choice span{line-height:1.5}#route-panel{bottom:auto}
@media(max-width:1050px){.hud-pane{width:180px}.hud-content{padding:9px}#telemetry-pane{max-height:calc(100% - 165px)}#contacts-pane{max-height:calc(100% - 345px)}#toast{max-width:calc(100% - 405px)}#interaction-prompts{max-width:calc(100% - 405px)}.ability-slot,#hotbar-slots button{width:42px;height:44px}.hotbar-groups{gap:18px}#connection{display:none}#target-pane{bottom:125px}#support-status{left:205px}}
@media(max-width:700px){body>header{padding:0 10px}.brand span{display:none}.brand{font-size:17px}#pilots-open{font-size:10px;padding:6px}.hud-pane{width:150px}#telemetry-pane{left:6px}#contacts-pane,#target-pane{right:6px}.hud-content p{font-size:9px}.hud-pane #stats p{font-size:9px;margin:4px 0}.ability-slot,#hotbar-slots button{width:34px;height:38px}.hotbar-groups{gap:12px}#hotbar-slots,#hotbar-mouse{gap:3px}#hotbar{padding:6px;max-width:calc(100% - 12px)}.ability-slot kbd,#hotbar-slots kbd{font-size:8px;left:2px;top:2px}#toast{max-width:calc(100% - 330px)}#interaction-prompts{max-width:calc(100% - 330px)}.viewbar{padding:13px 10px}.ability-library{grid-template-columns:1fr}}
@media(max-width:500px){.hotbar-groups{flex-wrap:wrap;justify-content:center;gap:6px}#hotbar{width:350px}#hotbar-mouse{margin-left:auto}.hud-pane{width:135px}#telemetry-pane{max-height:calc(100% - 220px)}#contacts-pane{max-height:calc(100% - 415px)}#target-pane{bottom:163px}#interaction-prompts{max-width:calc(100% - 290px)}#toast{bottom:157px;max-width:calc(100% - 290px)}}
.viewport.has-radar #telemetry-pane{max-height:calc(100% - 365px)}#target-sensors{display:block;font-size:9px;color:#89b8c3;margin-top:6px}#pilots-open>span:first-child{color:#88b2be}
/* Cargo has one responsive outer window; its inner workspace follows that width. */
#transfer-dialog{width:min(1280px,96vw);max-width:calc(100vw - 24px);height:auto;max-height:92dvh;overflow:auto;padding:24px}
#transfer-dialog #inventory-dialog{width:100%;max-width:100%;height:auto;max-height:none;overflow:visible;padding:0;min-width:0}
#transfer-dialog .transfer-panes{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
#transfer-dialog .inventory-toolbar{flex-wrap:wrap}
#transfer-dialog .inventory-toolbar span{min-width:100px;flex:1}
#transfer-dialog .character-menu-header{position:sticky;top:-24px;z-index:2;background:#101c2c;padding:10px 0;border-bottom:1px solid #30485c}
#ship-module-dialog{width:min(1100px,96vw);max-width:calc(100vw - 24px);height:auto;max-height:92dvh;overflow:auto;padding:24px}
#ship-module-dialog .equipment-slots{grid-template-columns:repeat(auto-fit,minmax(140px,1fr))}
#ship-module-dialog .inventory-toolbar{flex-wrap:wrap}
@media(max-width:800px){#transfer-dialog,#ship-module-dialog{padding:16px}#transfer-dialog .transfer-panes{grid-template-columns:minmax(0,1fr)}#transfer-dialog .character-menu-header{top:-16px;gap:12px}#transfer-dialog .character-menu-header h2{font-size:19px}}
/* Shared menu foundation: menu contents and local layouts remain owned by each screen. */
:root{--menu-surface:#101c2c;--menu-border:#3a5063;--menu-text:#d8e3ec;--menu-muted:#91a7ba;--menu-accent:#82d6c5}
dialog.menu-window{--menu-pad:22px;width:min(var(--menu-width,960px),96vw)!important;max-width:calc(100vw - 24px)!important;height:auto;max-height:92dvh!important;overflow:auto!important;overscroll-behavior:contain;padding:var(--menu-pad)!important;background:var(--menu-surface);border:1px solid var(--menu-border);border-radius:8px;box-shadow:0 18px 70px #0009;color:var(--menu-text);scrollbar-width:thin;scrollbar-color:#506477 #101c2c}
dialog.menu-window::backdrop{background:#040913c9;backdrop-filter:blur(3px)}
dialog.menu-window .menu-header{position:sticky;top:calc(-1 * var(--menu-pad));z-index:20;display:flex;align-items:center;justify-content:space-between;gap:16px;margin:calc(-1 * var(--menu-pad)) calc(-1 * var(--menu-pad)) 18px;padding:16px var(--menu-pad);background:var(--menu-surface);border-bottom:1px solid var(--menu-border)}
dialog.menu-window .menu-header h1,dialog.menu-window .menu-header h2,dialog.menu-window .menu-header h3{margin:0;font-size:22px;line-height:1.25;color:#e2ecf4;letter-spacing:0}
dialog.menu-window .menu-header label{display:block;margin-bottom:5px;font-size:9px}
dialog.menu-window .menu-return{width:auto!important;flex-shrink:0;margin:0!important;padding:8px 12px!important;font-size:11px!important;border:1px solid #465e72;background:#192b3a;color:#b9d0df;font-weight:500;white-space:nowrap}
dialog.menu-window h3{font-size:15px;line-height:1.4;margin:20px 0 12px}dialog.menu-window p{font-size:12px;line-height:1.6}dialog.menu-window .small{font-size:11px}dialog.menu-window .muted{color:var(--menu-muted)}
dialog.menu-window input,dialog.menu-window select{min-width:0;max-width:100%;border-radius:4px;padding:9px 11px;font-size:12px}dialog.menu-window input[type=checkbox]{width:auto}dialog.menu-window label{font-size:10px;line-height:1.5;letter-spacing:1px}
dialog.menu-window button{min-height:32px;border-radius:4px;font-size:12px}dialog.menu-window button:disabled{opacity:.5}dialog.menu-window .menu-return:hover{background:#263f50;color:#aaf0dc;border-color:#82d6c5}
dialog.menu-window details{border-radius:5px}dialog.menu-window summary{cursor:pointer;padding:8px 0;font-size:12px;color:#b4cddd}dialog.menu-window .mission-controls,dialog.menu-window .market-controls,dialog.menu-window .manufacturing-controls{gap:12px}dialog.menu-window .shop-catalog{grid-template-columns:repeat(auto-fit,minmax(min(260px,100%),1fr))}
dialog.menu-window .mission-card{min-width:0;overflow-wrap:anywhere}dialog.menu-window .mission-card h4{line-height:1.35}dialog.menu-window .inventory-toolbar,dialog.menu-window .debug-loot-controls{flex-wrap:wrap}
dialog.menu-window #character-menu-tabs{top:49px;padding:10px 0;background:var(--menu-surface)}dialog.menu-window #inventory-dialog{width:100%;max-width:100%;padding:0;max-height:none;overflow:visible}
dialog.menu-window .ability-slot,dialog.menu-window .ability-choice{min-height:0}dialog.menu-window .item-popover p,dialog.menu-window .ability-tooltip p{font-size:11px}
@media(max-width:700px){dialog.menu-window{--menu-pad:16px;max-height:94dvh!important}dialog.menu-window .menu-header{gap:10px;padding-top:12px;padding-bottom:12px}dialog.menu-window .menu-header h1,dialog.menu-window .menu-header h2,dialog.menu-window .menu-header h3{font-size:19px}dialog.menu-window .menu-return{max-width:45%;white-space:normal}dialog.menu-window #character-menu-tabs{top:40px}dialog.menu-window .operations-grid{grid-template-columns:minmax(0,1fr)}dialog.menu-window .mission-controls,dialog.menu-window .manufacturing-controls{grid-template-columns:minmax(0,1fr)}}

.inventory-item .item-art{display:block;width:100%;height:100%;pointer-events:none;background-repeat:no-repeat}.hotbar-art{background-repeat:no-repeat}

.quest-reward-alert{position:fixed;top:72px;left:50%;transform:translateX(-50%);z-index:99999;max-width:650px;width:calc(100% - 48px);padding:18px;background:#172b28;border:1px solid #8dc4a2;box-shadow:0 8px 30px #000a;color:#edffef}.quest-reward-alert button{margin-left:12px}

#ferry-progress{position:absolute;left:20px;bottom:112px;max-width:420px;padding:12px 16px;background:#14242eee;border:1px solid #75bfd0;color:#d8f2f8;pointer-events:none}#respawn-options{display:flex;flex-direction:column;gap:8px}#passage-dialog select{width:100%}

.inventory-cursor{position:fixed;pointer-events:none;z-index:10000;width:48px;height:48px;background:#152636dd;border:1px solid #c5d9e5;border-radius:5px;box-shadow:0 4px 15px #0009}.inventory-cursor .item-art,.inventory-cursor img{display:block;width:100%;height:100%}.inventory-cursor b{position:absolute;right:3px;bottom:0;color:white;text-shadow:1px 1px black}.inventory-distribute{outline:2px solid #89d6ed!important;background:#326a7b66!important}.inventory-controls-help{line-height:1.5;max-width:900px}.inventory-cell{touch-action:none}

.inventory-item.inventory-held{opacity:.35}.inventory-controls-help summary{cursor:pointer}

/* Shared fullscreen refit/template editor. */
#interior-editor.menu-window{--menu-pad:18px;box-sizing:border-box;position:fixed;inset:0;width:100vw!important;max-width:100vw!important;height:100dvh;max-height:100dvh!important;margin:0;padding:var(--menu-pad);border:0;border-radius:0;overflow:auto}
#interior-editor .interior-header-left,#interior-header-tools,#interior-editor .interior-header-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
#interior-editor .interior-header-left{gap:24px;min-width:0}
#interior-editor .interior-header-actions{margin-left:auto;flex-shrink:0}
#interior-editor .menu-header button{width:auto;margin:0;padding:9px 18px;font-weight:650;white-space:nowrap}
#interior-editor .interior-wire{background:#164e70;border:1px solid #4ab3e3;color:#d7f2ff}
#interior-editor .interior-clear{background:#704615;border:1px solid #dc9e42;color:#fff0cd}
#interior-editor #interior-save{background:#226349;border:1px solid #72d6a5;color:#e4fff2}
#interior-editor #interior-close.menu-return{background:#672c36;color:#ffe3e6;border:1px solid #d27b86;max-width:none;font-size:12px!important;padding:9px 18px!important;font-weight:650}
#interior-editor .menu-header button:hover:not(:disabled){filter:brightness(1.2)}
#interior-editor #interior-deck-scroll{max-height:none;min-height:35vh;overflow:auto}
#interior-editor .interior-error-toast{position:fixed;z-index:100;left:50%;top:50%;transform:translate(-50%,-50%);box-sizing:border-box;width:min(560px,calc(100vw - 32px));max-height:70dvh;overflow:auto;padding:22px;border:1px solid #f49799;border-radius:8px;background:#401c26;box-shadow:0 12px 70px #000c;color:#ffe6e6}
#interior-editor .interior-error-toast strong{font-size:18px}#interior-editor .interior-error-toast p{white-space:pre-line;font-size:14px}#interior-editor .interior-error-toast button{width:auto;background:#703340;border:1px solid #c97b88;color:white}
@media(max-width:700px){#interior-editor.menu-window{--menu-pad:12px;max-height:100dvh!important}#interior-editor .interior-header-left{gap:12px}#interior-editor .menu-header{align-items:flex-start;gap:12px}#interior-editor .menu-header h2{font-size:16px}#interior-editor #interior-close.menu-return,#interior-editor .menu-header button{padding:8px 10px!important}}

#interior-editor #interior-admin-controls{margin:0;align-items:center;gap:10px}#interior-editor #interior-admin-controls[hidden]{display:none}#interior-editor #interior-admin-model{width:min(310px,55vw)}

#interior-blueprint-dialog label{display:flex;flex-direction:column;gap:6px;margin:16px 0}#interior-blueprint-dialog .interior-tools button{flex:1}#interior-editor #interior-admin-controls select{margin:0}

/* Painting-style workspace: fixed toolbar/palette, remaining viewport is the drawing zone. */
#interior-editor[open]{display:flex;flex-direction:column;overflow:hidden!important}
#interior-editor .menu-header{position:relative;top:auto;flex-shrink:0;margin-bottom:10px}
#interior-editor .interior-paint-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-bottom:10px;flex-shrink:0}
#interior-draw-tools{display:flex;gap:6px;flex-wrap:wrap}#interior-draw-tools button{width:auto;margin:0;min-width:62px;padding:7px 10px;background:#182c3b;border:1px solid #456070;color:#c9dce8;display:flex;flex-direction:column;align-items:center;gap:4px}
#interior-draw-tools button[hidden]{display:none!important}#interior-draw-tools button[aria-pressed=true]{background:#23594f;border-color:#7ee2be;color:#e8fff5}#interior-draw-tools svg{width:23px;height:23px;stroke:currentColor;stroke-width:1.7;stroke-linejoin:round;stroke-linecap:round;fill:none}#interior-draw-tools span{font-size:10px}
#interior-editor .interior-history{display:flex;gap:6px}#interior-editor .interior-history button{width:38px;margin:0;font-size:22px}
#interior-editor .interior-workspace{display:grid;grid-template-columns:190px minmax(0,1fr);gap:12px;flex:1;min-height:0}
#interior-palette-panel{min-height:0;overflow:auto;border:1px solid #354d5d;background:#12212e;padding:9px}
#interior-editor #interior-palette,#interior-editor #interior-console-tray{display:flex;flex-direction:column;gap:7px;margin:0;padding:0;border:0;background:transparent}
#interior-editor #interior-palette button,#interior-editor #interior-console-tray button{width:100%;margin:0;padding:10px;text-align:left;white-space:normal;border:1px solid #415b6b;border-left:6px solid var(--tile-color,#687f91);background:#1a3040;color:#dbe8ee}
#interior-editor #interior-palette button[aria-pressed=true],#interior-editor #interior-console-tray button[aria-pressed=true]{background:#28574e;border-color:#82dec4;outline:none}
#interior-editor #interior-deck-scroll{min-height:0;max-height:none;display:flex;align-items:center;justify-content:center;overflow:auto;background:#303236;border:1px solid #415463}
#interior-editor #interior-deck{flex-shrink:0;max-width:none;max-height:none}
#interior-mods-dialog{max-height:92dvh;overflow:auto}#interior-mods-dialog .interior-mod-browser{display:grid;grid-template-columns:minmax(190px,1fr) minmax(250px,2fr);grid-template-rows:minmax(0,1fr);gap:18px;height:65dvh;min-height:0;overflow:auto}#interior-mod-slots,#interior-mod-catalog{min-height:0;min-width:0;overflow:auto;overscroll-behavior:contain;padding:3px}
#interior-mod-slots button{display:block;width:100%;text-align:left;margin:0 0 6px;padding:11px}#interior-mod-slots button[aria-pressed=true]{background:#28574e;border-color:#82dec4}
#interior-mod-catalog details{padding:8px;margin:8px 0;background:#142633}#interior-mod-catalog .interior-mod-choice{width:auto;margin:4px;padding:9px 12px}#interior-mod-catalog button:disabled{opacity:.3}
@media(max-width:750px){#interior-editor .interior-workspace{grid-template-columns:135px minmax(0,1fr);gap:6px}#interior-draw-tools button{min-width:42px;padding:5px}#interior-mods-dialog .interior-mod-browser{grid-template-columns:1fr 1fr}#interior-editor .interior-header-left{gap:8px}#interior-editor .menu-header h2{font-size:14px}}

#interior-editor.interior-no-palette .interior-workspace{grid-template-columns:minmax(0,1fr)}#interior-palette-panel[hidden]{display:none!important}

.interior-workspace{position:relative}
.interior-tile-effects{position:absolute;right:14px;top:14px;bottom:14px;width:190px;z-index:2;overflow:auto;padding:10px;background:rgba(13,20,30,.94);border:1px solid #3b4d60;border-radius:8px;box-shadow:0 5px 22px #0008;pointer-events:auto}
.interior-tile-effects[hidden]{display:none}
.interior-tile-effects>div{padding:8px;border-bottom:1px solid #ffffff14}
.interior-tile-effects strong{display:block;font-size:25px;line-height:1.15}
.interior-tile-effects span,.interior-tile-effects small{display:block;font-size:11px}
.interior-tile-effects small{color:#97a8b9;margin-top:3px}
.hull-item-total{color:#bce5ca;font-weight:bold}
@media(max-width:700px){.interior-tile-effects{width:140px;right:6px}.interior-tile-effects strong{font-size:20px}}

#interior-mod-slots .module-capacity-blocked,#interior-mod-catalog .module-capacity-blocked{color:#ff9c91;border-color:#d76659;background:#3b2028}#interior-mod-catalog .module-capacity-blocked:disabled{opacity:.85}

.module-damage-badge{display:inline-block;margin:5px 0 0 8px;padding:2px 7px;border:1px solid var(--damage-color);border-radius:4px;color:var(--damage-color);background:#0b131c;font-size:11px;line-height:1.4;font-weight:600}#interior-mod-catalog .module-damage-badge{display:block;width:fit-content;margin:6px 0 0}

#interior-editor .interior-workspace{grid-template-columns:180px minmax(0,1fr) 190px}#interior-editor .interior-tile-effects{position:static;inset:auto;width:auto;min-width:0;min-height:0;z-index:auto;border-radius:0;box-shadow:none;overflow:auto}#interior-editor #interior-deck-scroll{min-width:0}#interior-editor.interior-no-palette .interior-workspace{grid-template-columns:minmax(0,1fr)}@media(max-width:750px){#interior-editor .interior-workspace{grid-template-columns:120px minmax(0,1fr) 140px}}

.bounty-row,.transport-destination{display:flex;align-items:center;gap:20px;padding:14px;border-bottom:1px solid #334155}.bounty-row span,.transport-destination span:nth-child(2){flex:1}.transport-destination{flex-wrap:wrap}.transport-destination small{flex-basis:100%;color:#aeb8c9}.transport-tabs{display:flex;gap:12px;margin:20px 0}.helm-options{display:flex;flex-direction:column;gap:12px}.helm-options label{display:flex;gap:10px;align-items:center}.danger{background:#9a363d;color:white}

.header-counter{margin-left:auto;white-space:nowrap;color:#86ded0;font-variant-numeric:tabular-nums}.shop-tabs,.contract-tabs{display:flex;gap:8px;margin:12px 0}.shop-tabs [aria-selected="true"],.contract-tabs [aria-selected="true"]{background:#58d5c5;color:#101c24}.shop-catalog .mission-card{display:flex;flex-direction:column}.shop-trade-button{align-self:center;margin-top:auto}.shop-item-stats.item-popover{position:static;width:auto;max-width:none;max-height:none;overflow:visible;box-shadow:none;background:transparent;padding:0;pointer-events:auto;border:0}.shop-item-stats small,.shop-item-stats .comparison-title,.shop-item-stats .comparison-gain,.shop-item-stats .comparison-loss{display:none}.contract-card{display:flex;flex-direction:column}.contract-card h5{margin:12px 0 4px}.contract-card ul{margin-top:0}.contract-card-actions{display:flex;align-items:center;gap:14px;margin-top:auto;padding-top:12px}.capacity-error{color:#ff9b85;font-size:12px}#shop-buy[hidden],#shop-sell[hidden],#missions-offers[hidden],#contract-board-active[hidden]{display:none}

#contract-board-dialog .contract-ship-control{margin:0;min-width:0;max-width:320px}#contract-board-dialog .contract-ship-control select{margin:0;width:100%}#contract-board-dialog .menu-header{flex-wrap:wrap}#contract-board-dialog .menu-header h2{flex-shrink:0}

#shop-dialog .shop-catalog{position:relative;isolation:isolate;z-index:0}#shop-dialog .shop-item-stats{z-index:auto}#shop-dialog .menu-header{z-index:30;background:var(--menu-surface,#101c2c)}

.item-popover.rarity-common h3{color:#cbd8e1}.item-popover.rarity-magic h3{color:#6399f1}.item-popover.rarity-rare h3{color:#e4ba4b}.item-popover.rarity-unique h3{color:#ef8a47}.item-popover.rarity-commodity h3{color:#53c9ba}.item-popover .item-type-badge{display:inline-block;border:1px solid #42576b;border-radius:4px;padding:3px 8px;background:#172331;color:#b9ccd9;font-size:11px}.shop-catalog .mission-card{height:100%;box-sizing:border-box}.shop-catalog .shop-trade-button{margin-top:auto!important;margin-bottom:0;flex-shrink:0}.shop-item-stats{margin-bottom:16px}

#shop-dialog .shop-catalog .mission-card{padding:16px}#shop-dialog .shop-item-stats>h3{margin:0 0 10px;line-height:1.3;height:2.6em;min-height:2.6em;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}

.shop-card-actions{margin-top:auto;display:flex;flex-direction:column;align-items:center;gap:6px}.shop-card-actions .shop-sale-note{text-align:center;margin:0}.shop-card-actions .shop-trade-button{margin:0!important}

.ship-rename-controls{display:flex;align-items:center;gap:10px;margin:12px 0;flex-wrap:wrap}.ship-rename-controls input{flex:1;min-width:160px}.ship-rename-controls button{width:auto;margin:0}.ship-rename-controls[hidden]{display:none}

#passage-dialog{--menu-width:1100px!important}#passage-map{display:block;width:100%;height:auto;max-height:55vh;border:1px solid #30485c;border-radius:6px;touch-action:none;cursor:crosshair;margin:12px 0}

.crime-ledger{width:100%;border-collapse:collapse;margin:0 0 20px;font-size:12px}.crime-ledger th,.crime-ledger td{text-align:left;padding:9px 12px;border-bottom:1px solid #30485c}.crime-ledger th{color:#9db4c4}.crime-ledger td:nth-child(3),.crime-ledger td:last-child{white-space:nowrap}

#guard-surrender-dialog{max-width:520px;padding:24px;background:#111c2b;color:#e3e9f1;border:1px solid #c39a55}.guard-decisions{display:flex;gap:14px;justify-content:flex-end}.guard-decisions [data-refuse]{background:#753b41}.jail-status{position:fixed;top:65px;left:50%;transform:translateX(-50%);z-index:50;padding:12px;background:#101824e8;color:#efbd6d;pointer-events:none}.jail-status[hidden]{display:none}

.wanted-heat-row{font-size:11px;line-height:1.7;letter-spacing:.4px}#port-claim-dialog,#hunter-surrender-dialog{max-width:540px;padding:24px;background:#111c2b;color:#e3e9f1;border:1px solid #c39a55}

.bounty-row{flex-wrap:wrap}.bounty-row button{width:auto;flex-shrink:0}.bounty-payment-status{flex-basis:100%;color:#c7b58f}

.smoothing-controls{display:flex;gap:3px;align-items:center}.smoothing-controls button{padding:5px 8px;font-size:11px}.smoothing-controls button[aria-pressed=true]{background:#55c9bb;color:#09141c}

#cheats-dialog{--menu-width:900px!important;max-height:90dvh;overflow:auto}.cheat-tabs,.cheat-row{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin:15px 0}.cheat-factions{width:100%;border-collapse:collapse}.cheat-factions td,.cheat-factions th{padding:8px;text-align:left}.cheat-factions input{width:100%;min-width:70px}.cheat-factions td:first-child{width:35%}#cheats-dialog section>label{display:block;margin:16px 0}#cheats-dialog select{width:100%}#cheats-dialog input[type=checkbox]{width:auto}.cheat-row input{max-width:200px}

#weapon-arena-controls{position:fixed;z-index:60;bottom:110px;left:50%;transform:translateX(-50%);max-width:96vw;background:#101c2ef2;border:1px solid #54d8cc;border-radius:10px;padding:10px 14px;text-align:center;box-shadow:0 6px 24px #0009}#weapon-arena-controls[hidden]{display:none}.arena-status{font-size:12px;margin-bottom:8px;color:#abd3d8}.arena-selectors{display:flex;align-items:center;gap:8px}.arena-type{min-width:70px}.arena-weapon{min-width:170px}.arena-selectors button{white-space:nowrap}@media(max-width:700px){.arena-selectors{flex-wrap:wrap;justify-content:center}.arena-weapon{min-width:140px}}

.owned-port-alert{position:fixed;top:68px;left:50%;transform:translateX(-50%);z-index:25;pointer-events:none;text-align:center;background:rgba(29,16,22,.92);border:1px solid #e66e68;border-radius:8px;padding:10px 20px;color:#f2b0a6;box-shadow:0 0 20px #b8373726}.owned-port-alert strong{display:block;font-size:16px}.owned-port-alert div div{font-size:12px;margin-top:4px}.owned-port-alert[hidden]{display:none}

#hangar-dialog{width:min(1000px,94vw)}.hangar-groups{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.hangar-list{height:42vh;overflow-y:scroll;overscroll-behavior:contain}.hangar-list .hangar-ship{display:block;width:100%;text-align:left;margin-bottom:8px}@media(max-width:700px){.hangar-groups{grid-template-columns:1fr}.hangar-list{height:22vh}}

#market-dialog .market-header{justify-content:flex-start}#market-clock{margin-right:auto}#market-credits{white-space:nowrap}#market-routes-dialog{width:min(840px,94vw);max-height:85dvh;overflow:auto}#crew-board-dialog .character-menu-header label{margin:0}#crew-board-dialog .character-menu-header{justify-content:flex-start}

.character-xp{display:block;width:100%;height:10px;margin:10px 0;accent-color:#66dcca}#owned-ships-dialog{width:min(650px,90vw);max-height:80vh;overflow:auto}#owned-ships-dialog article{padding:10px;border-bottom:1px solid #304052}#fleet-summary{width:100%;margin:8px 0}

.header-left{display:flex;align-items:center;gap:20px;min-width:0}#performance-meter{display:flex;gap:14px;white-space:nowrap;font-size:11px;color:#94cfc5;font-variant-numeric:tabular-nums;letter-spacing:0}@media(max-width:750px){.header-left{gap:8px;flex-wrap:wrap}#performance-meter{gap:8px;font-size:10px}}

#player-health-bar{position:absolute;top:0;left:0;width:100%;height:14px;background:#07140dcc;z-index:12;pointer-events:none}#player-health-fill{position:absolute;left:50%;transform:translateX(-50%);height:100%;width:100%;background:#39ff53;box-shadow:0 0 7px #39ff5355;transition:width .12s linear}

.arena-gun-select{min-width:180px;max-width:240px}.arena-selectors{flex-wrap:wrap;justify-content:center}

#hud-left-stack{position:absolute;z-index:2;left:12px;top:43px;display:flex;flex-direction:column;gap:10px;max-height:calc(100% - 185px);overflow:auto;scrollbar-width:thin}#hud-left-stack #telemetry-pane{position:relative;left:auto;top:auto;max-height:none;flex-shrink:0}#arena-floating{position:relative;flex-shrink:0;padding:12px;box-sizing:border-box}#arena-floating .arena-gun-select{width:100%;min-width:0;max-width:none;margin:0 0 8px}#arena-floating button{width:100%;margin:0}#arena-status{position:absolute;z-index:12;top:26px;left:50%;transform:translateX(-50%);padding:8px 14px;border-radius:6px;background:#101c2ee6;text-align:center;pointer-events:none;white-space:nowrap}#arena-status[hidden],#arena-floating[hidden]{display:none}@media(max-width:700px){#hud-left-stack{left:6px}#arena-status{font-size:10px;padding:6px 8px;white-space:normal;max-width:55%}}

#guard-patrol-editor{--menu-width:1100px!important}#guard-patrol-editor canvas{width:100%;height:auto;max-height:58dvh;image-rendering:pixelated;cursor:crosshair;border:1px solid #496376;margin:12px 0}#guard-patrol-editor label{display:inline-flex;align-items:center;gap:10px;margin-right:18px}#guard-patrol-editor input{width:80px}.patrol-actions{display:flex;gap:10px;flex-wrap:wrap}.patrol-actions button{width:auto}

.arena-vision-toggle{display:flex;align-items:center;gap:8px;padding:10px 4px;font-size:12px;cursor:pointer}.arena-vision-toggle input{width:auto;accent-color:#ff7777}

#navigation-close{width:auto;flex-shrink:0;border-color:#588b90;color:#c8eee8}

/* Navigation sidebars share the same reserved map bounds in both views. */
.viewport.navigation-open{--navigation-left:clamp(185px,19vw,245px);--navigation-right:clamp(235px,24vw,310px)}
#route-panel,#navigation-details{position:absolute;top:52px;bottom:16px;display:flex;flex-direction:column;align-items:stretch;gap:12px;overflow:auto;max-width:none;padding:16px;background:#0b1725f5;border:1px solid #365168;border-radius:7px;z-index:7;scrollbar-width:thin}
#route-panel{left:12px;right:auto;width:var(--navigation-left,220px);flex-wrap:nowrap}
#navigation-details{right:12px;left:auto;width:var(--navigation-right,280px)}
#navigation-details #navigation-close{position:sticky;top:0;z-index:1;background:#142b37;order:0;width:100%;margin:0;padding:12px;flex-shrink:0}
#navigation-details #system-panel{position:static;inset:auto;width:100%;max-width:none;overflow:visible;padding:0;border:0;border-radius:0;background:transparent;order:1}
#route-panel #navigation-views{flex-direction:column;gap:5px}
#route-panel button,#route-panel select{width:100%;margin:0}
#route-panel #route-info{display:block;line-height:1.6;overflow-wrap:anywhere}
#route-panel #chart-tools{position:static;inset:auto;display:flex;justify-content:flex-start;padding:12px 0 0;border-top:1px solid #263f51;border-radius:0;background:transparent;gap:6px}
#route-panel #chart-tools button{width:auto;flex:1 1 auto}
#route-panel #chart-tools #nav-search{width:100%;flex:1 0 100%;min-width:0}
#route-panel .political-toggle{display:flex;align-items:center;gap:7px;width:100%;letter-spacing:0;font-size:11px}
#route-panel .political-toggle input{width:auto}
#chart-legend{font-size:11px;line-height:1.8;border-top:1px solid #263f51;padding-top:12px}
#chart-legend label{display:block;margin-bottom:7px}#chart-legend p{font-size:10px;color:#91a6bc;line-height:1.6}
.viewport.navigation-open #toast,.viewport.navigation-open #controls{display:none}
@media(max-width:800px){.viewport.navigation-open{--navigation-left:155px;--navigation-right:195px}#route-panel,#navigation-details{padding:10px;gap:9px}#route-panel{left:6px}#navigation-details{right:6px}#system-panel h3{font-size:15px}}
@media(max-width:520px){.viewport.navigation-open{--navigation-left:115px;--navigation-right:145px}#route-panel,#navigation-details{padding:7px}#route-panel button,#navigation-details button,#route-panel select{font-size:10px;padding:7px}#system-panel p{font-size:10px}}

#navigation-search{position:absolute;top:12px;left:50%;transform:translateX(-50%);width:min(360px,38%);z-index:8}
#navigation-search #nav-search{width:100%;padding:9px 12px;background:#0b1725f5;border-radius:5px}
#navigation-details #navigation-close{display:flex;align-items:center;gap:10px}
#navigation-close kbd{float:none;display:grid;place-items:center;min-width:25px;height:25px;background:#243945;border:1px solid #6b959a;border-bottom-width:3px;border-radius:5px;color:#e6f3ef;font:bold 12px monospace}
#star-context-menu{position:absolute;z-index:12;width:240px;max-width:calc(100% - 16px);padding:12px;background:#0b1828fa;border:1px solid #5d879b;border-radius:7px;box-shadow:0 8px 30px #000a}
#star-context-title{display:block;margin-bottom:9px;font-size:14px;color:#d5efed;overflow-wrap:anywhere}
#star-context-menu button{display:block;margin:5px 0 0;padding:10px;font-size:12px}
#system-overview{display:grid;grid-template-columns:1fr;gap:3px;margin:12px 0 18px}
#system-overview dt{color:#829daf;font-size:10px;letter-spacing:.7px;margin-top:8px}
#system-overview dd{margin:0;padding:0 0 8px;border-bottom:1px solid #233749;color:#d0e0e9;font-size:12px;line-height:1.5;overflow-wrap:anywhere}
#system-fleets{border-top:1px solid #365168;padding-top:10px}
#system-fleets p{margin:0 0 12px;overflow-wrap:anywhere}

.system-fleet-card{padding:10px;margin:10px 0;border:1px solid #2b4056;border-radius:5px;background:#101f2d}.system-fleet-card strong{display:block;font-size:11px;line-height:1.5;margin-bottom:8px}.system-fleet-card p{font-size:11px!important;line-height:1.5!important;margin:5px 0!important}.system-fleet-card p span{color:#829daf}

#navigation-details #system-overview dd{border-bottom:0}#navigation-details #system-fleets{border-top:0}

#navigation-details #system-overview{grid-template-columns:minmax(75px,.8fr) minmax(0,1.4fr);gap:12px 12px;align-items:baseline}
#navigation-details #system-overview dt{margin:0;letter-spacing:0;line-height:1.5;overflow-wrap:anywhere}
#navigation-details #system-overview dd{margin:0;padding:0;min-width:0}
#navigation-details .system-fleet-card p{display:grid;grid-template-columns:minmax(45px,.7fr) minmax(0,1.5fr);gap:8px}
#navigation-details .system-fleet-card p span:last-child{color:#c5d7e2;min-width:0;overflow-wrap:anywhere}
@media(max-width:520px){#navigation-details #system-overview{grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:9px 6px}#navigation-details #system-overview dt,#navigation-details #system-overview dd{font-size:10px}}

/* Touch movement and a viewport that follows mobile browser chrome. */
#mobile-joystick{position:absolute;z-index:65;right:max(18px,env(safe-area-inset-right));bottom:max(24px,env(safe-area-inset-bottom));width:126px;height:126px;border:1px solid #86d8ce88;border-radius:50%;background:radial-gradient(circle,#172d4199,#081321bb);box-shadow:0 4px 20px #0006;touch-action:none;user-select:none;-webkit-user-select:none}
.joystick-thumb{position:absolute;left:50%;top:50%;width:48px;height:48px;border-radius:50%;transform:translate(-50%,-50%);border:1px solid #91e1d8;background:#406f79c9;box-shadow:0 2px 10px #0005;pointer-events:none}
@media (any-pointer:coarse) and (max-width:1100px), (max-width:600px){
 body{height:100vh;height:100dvh;overflow:hidden}
 body>header{height:calc(42px + env(safe-area-inset-top));padding:env(safe-area-inset-top) max(8px,env(safe-area-inset-right)) 0 max(8px,env(safe-area-inset-left));gap:6px}

 body>main>.viewport{width:100%;height:100%;min-width:0;min-height:0}
 .controls{display:none}
 dialog{max-width:calc(100vw - 16px);max-height:calc(100dvh - 24px);overflow:auto}
 #toast{left:8px;right:auto;bottom:154px;max-width:calc(100% - 24px);padding:7px 10px;font-size:11px}
 #interaction-prompts{max-width:calc(100% - 24px)}
}
@media (any-pointer:coarse){
 #hotbar{left:max(8px,env(safe-area-inset-left));right:auto;bottom:max(8px,env(safe-area-inset-bottom));transform:none;width:auto;max-width:calc(100% - 158px)}
 .hotbar-groups{flex-wrap:wrap;justify-content:flex-start;gap:5px}
 #hotbar-slots,#hotbar-mouse{flex-wrap:wrap;justify-content:flex-start}
 #hotbar-mouse{margin-left:0}
 .ability-slot,#hotbar-slots button{width:32px;height:36px}
}

/* Character HUD and recovery. */
#player-health-bar{height:24px}
#player-health-text{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#fff;font:bold 14px/1 sans-serif;text-shadow:0 1px 3px #001900,0 0 3px #001900}
#respawn-countdown{text-align:center}
#respawn-countdown>p{margin:12px 0 0;letter-spacing:.15em;font-size:14px}
#respawn-timer{display:block;font-size:25vh;font-size:25dvh;line-height:1;font-variant-numeric:tabular-nums;color:#f1c588}
#respawn-ready{color:#6df092;text-align:center;font-size:22px;font-weight:bold}
#respawn-dialog [hidden]{display:none}
#character-menu-tabs{grid-template-columns:repeat(6,minmax(0,1fr))}
#character-admin-open{margin-left:auto;flex-shrink:0}
#character-menu-close{flex-shrink:0}
.item-popover>h3,dialog.menu-window .item-popover>h3{margin-top:0}
.item-popover .item-primary-stat{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}
.item-popover .item-primary-number{font-size:48px;line-height:1.15;font-weight:bold;font-variant-numeric:tabular-nums;color:#e2ecf4}
#shop-dialog .shop-catalog .mission-card>h4:empty{display:none}
@media(max-width:650px){#character-menu-tabs{grid-template-columns:repeat(3,minmax(0,1fr))}}
.viewbar{top:0}

/* Full-window game with independent floating display controls. */
body>main{position:fixed;inset:0;display:block;width:100%;height:100vh;height:100dvh;margin:0;padding:0;min-height:0;min-width:0}
#startup-controls[hidden]{display:none}
#game-floating-controls{position:absolute;z-index:20;top:calc(44px + env(safe-area-inset-top));left:50%;transform:translateX(-50%);display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;width:max-content;max-width:calc(100% - 24px);pointer-events:none}
#game-floating-controls>*{pointer-events:auto}
#game-floating-controls button{width:auto;margin:0;padding:7px 10px;font-size:11px;background:#101c2ee6;border:1px solid #354455;border-radius:6px;white-space:nowrap}
#game-floating-controls #performance-meter{padding:7px 10px;background:#101c2ee6;border:1px solid #354455;border-radius:6px;gap:10px}
#game-floating-controls .fp-client-link{flex-shrink:0}
#player-health-bar{top:calc(12px + env(safe-area-inset-top));left:12px;right:12px;width:auto;border-radius:12px;overflow:hidden}
#player-health-fill{border-radius:12px}
.viewbar{top:0}
#hud-left-stack,#contacts-pane{top:calc(102px + env(safe-area-inset-top))}
#navigation-search,#arena-status{top:calc(72px + env(safe-area-inset-top))}
@media(max-width:700px){
 #game-floating-controls{top:calc(42px + env(safe-area-inset-top));gap:5px;max-width:calc(100% - 12px)}
 #game-floating-controls button,#game-floating-controls #performance-meter{font-size:10px;padding:6px 8px}
}

body>main>.viewport{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0}
.viewport>#game{position:absolute;inset:0;display:block;width:100%;height:100%;margin:0;padding:0;border:0}

/* Five skill slots; physical fire and dash controls are independent. */
#hotbar{width:max-content;max-width:calc(100% - 24px)}
#hotbar-slots{display:flex;gap:6px;flex-wrap:nowrap}
#hotbar-picker{--menu-width:520px!important}
#hotbar-picker .ability-library{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:600px){#hotbar{max-width:calc(100% - 158px)}#hotbar-slots{gap:3px}}
@media(max-width:400px){#hotbar-slots button{width:clamp(22px,calc((100vw - 194px)/5),32px)}}

.admin-difficulty{grid-column:1/-1;padding:12px;border:1px solid #354455;border-radius:6px}.admin-difficulty label{display:block;margin-bottom:8px}.admin-difficulty select{width:100%;padding:8px}.admin-difficulty p{margin:8px 0}

.item-popover .item-card-meta{display:flex;align-items:center;gap:10px;margin:0 0 12px}.item-popover .item-card-meta .item-type-badge{margin:0;flex-shrink:0}.item-card-base{margin-left:auto;text-align:right;font-size:11px;line-height:1.4;color:#9eb3c3;min-width:0;overflow-wrap:anywhere}
.item-implicit-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px 8px;margin:4px 0 7px}.item-implicit{display:flex;flex-direction:column;gap:4px;min-width:0;overflow-wrap:anywhere;font-size:11px;line-height:1.35}.item-implicit>span{color:#91a7b9}.item-implicit>strong{font-size:12px;font-weight:500;color:#d7e4ed}.item-popover .item-card-note{font-size:10px;color:#8fa4b6}

.salvage-console-note{border:1px solid #9d8050;border-radius:6px;padding:12px;color:#edcf91;background:#302617;font-size:12px;line-height:1.6}

.item-popover .item-primary-stat{margin:4px 0 2px}.item-popover .item-affix{margin:2px 0;line-height:1.35}.item-implicit{gap:2px}

#harvest-dialog{width:min(540px,94vw)}#harvest-dialog #harvest-panel{position:static;width:auto;max-width:none;max-height:none;padding:0;border:0;background:transparent}#harvest-dialog #harvest-panel p{font-size:12px}

#contacts-pane{max-height:calc(100% - 250px)}#contacts-pane .contacts-section-title{margin:9px 0 3px;padding:0 10px;text-align:center;font-size:9px;font-weight:500;line-height:1.4;letter-spacing:1px;color:#91a7b9}#contacts-pane .contacts-list{padding:0 5px 5px}#contacts-pane #contacts-empty{margin:3px 0;padding:5px 10px}
#contacts-pane #target-pane{position:static;box-sizing:border-box;width:auto;margin:4px 0 0;padding:10px 12px;border:0;border-top:1px solid #3a4656;border-radius:0;box-shadow:none;background:transparent;max-height:none;overflow:visible}#contacts-pane #target-name{margin:0 0 7px;font-size:13px}

/* Equipment choices in both ship and port refit/template editors. */
#interior-mod-catalog .module-tile-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(82px,1fr));gap:8px;margin-top:8px;align-items:start}
#interior-mod-catalog .module-item-tile{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;aspect-ratio:1;width:100%;min-width:0;margin:0;padding:5px;overflow:hidden;cursor:pointer;border-width:2px;border-radius:6px}
#interior-mod-catalog .module-item-tile>.item-art,#interior-mod-catalog .module-item-tile>img{display:block;flex:0 1 auto;min-height:0;width:65%;height:auto;aspect-ratio:1;object-fit:contain;pointer-events:none}
#interior-mod-catalog .module-tile-name{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;flex-shrink:0;width:100%;font-size:10px;line-height:1.15;text-align:center;color:#dce8ed;overflow-wrap:anywhere;padding-top:3px;margin-top:auto}
#interior-mod-catalog .module-item-tile.module-capacity-blocked{box-shadow:inset 0 0 0 1px #d76659}


.arena-match-dialog{width:min(95vw,950px)}.arena-match-dialog [data-settings]{display:flex;gap:12px;flex-wrap:wrap}.arena-match-dialog [data-roster]{display:grid;grid-template-columns:1fr 1fr;gap:18px}.arena-team table{width:100%;text-align:left;border-collapse:collapse}.arena-team th,.arena-team td{padding:7px}.arena-team-red h3{color:#ff7777}.arena-team-blue h3{color:#73bcff}.arena-match-dialog input,.arena-match-dialog select{width:auto}.arena-match-dialog section[hidden]{display:none}@media(max-width:600px){.arena-match-dialog [data-roster]{grid-template-columns:1fr}}

.implicit-editor{width:min(94vw,850px);max-height:92vh}.implicit-toolbar{display:flex;flex-wrap:wrap;gap:12px;align-items:center}.implicit-editor [data-fields]{display:grid;grid-template-columns:1fr 1fr;gap:8px;max-height:55vh;overflow:auto;margin:16px 0}.implicit-field{display:grid;grid-template-columns:1fr 90px auto;align-items:center;gap:8px}.implicit-field input,.implicit-field button,.implicit-toolbar select{width:auto;margin:0}.implicit-field span{text-transform:capitalize}@media(max-width:600px){.implicit-editor [data-fields]{grid-template-columns:1fr}}

#settings-dialog{width:min(480px,90vw)}
.settings-control{display:grid;grid-template-columns:1fr auto;gap:12px;margin:22px 0}.settings-control input{grid-column:1/-1;width:100%}

.interior-error-toast.interior-auto-success{border-color:#68d6a2}

#guard-patrol-editor .patrol-editor-workspace{display:grid;grid-template-columns:215px minmax(0,1fr);gap:12px}#guard-patrol-editor [data-layers]{display:flex;flex-direction:column;gap:8px}#guard-patrol-editor [data-layers] button{border-left:6px solid var(--patrol-color);text-align:left;padding:12px 8px}#guard-patrol-editor [aria-pressed=true]{outline:2px solid #b7e6f1;background:#233b4a}.patrol-editor-map{overflow:auto;max-height:57dvh}#guard-patrol-editor canvas{width:auto;height:auto;max-height:none;margin:0}.patrol-editor-tools{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:12px}#guard-patrol-editor input[type=checkbox]{width:auto}@media(max-width:700px){#guard-patrol-editor .patrol-editor-workspace{grid-template-columns:1fr}#guard-patrol-editor [data-layers]{display:grid;grid-template-columns:repeat(2,1fr)}}

#guard-patrol-editor{width:min(1100px,96vw);max-width:96vw}#guard-patrol-editor .patrol-editor-tools button{width:auto;flex:0 0 auto;margin:0;padding:8px 12px}#guard-patrol-editor [aria-pressed=true]{color:#e8f4f7}#guard-patrol-editor>p{font-size:13px;line-height:1.5}

#guard-patrol-editor [data-layers] button{margin:0}#guard-patrol-editor .patrol-actions{position:sticky;bottom:0;background:#0e1c2b;padding:8px 0}

#cheats-dialog .faction-report-table{width:100%;border-collapse:collapse;font-size:13px;margin:10px 0 20px}#cheats-dialog .faction-report-table th,#cheats-dialog .faction-report-table td{text-align:left;padding:7px;vertical-align:top;border-bottom:1px solid #344558}#cheats-dialog [data-panel="reports"] details{padding:12px 0;border-bottom:1px solid #344558;overflow-x:auto}#cheats-dialog [data-panel="reports"] summary{cursor:pointer;font-weight:bold;font-size:17px}

#admin-galaxy-dialog{--menu-width:1500px!important;width:96vw;max-width:96vw;max-height:96dvh;overflow:auto}.admin-galaxy-toolbar,.admin-galaxy-legend{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.admin-galaxy-toolbar button{width:auto;margin:0}.admin-galaxy-toolbar label{display:flex;align-items:center;gap:8px}.admin-galaxy-legend{font-size:12px;margin:12px 0}.admin-galaxy-body{display:grid;grid-template-columns:minmax(0,1fr) 250px;gap:12px}.admin-galaxy-body canvas{width:100%;height:68dvh;min-height:360px;touch-action:none;cursor:grab}.admin-galaxy-body aside{max-height:68dvh;overflow:auto;padding:12px;background:#101c2b}.admin-galaxy-body aside p{font-size:13px;margin:8px 0}@media(max-width:750px){.admin-galaxy-body{grid-template-columns:1fr}.admin-galaxy-body canvas{height:60dvh}.admin-galaxy-body aside{max-height:200px}}

.appearance-layout{display:grid;grid-template-columns:minmax(220px,1fr) minmax(240px,1.2fr);gap:16px}.appearance-controls{display:grid;grid-template-columns:1fr 1fr;gap:8px}.appearance-controls label,.appearance-preview label{display:flex;flex-direction:column;gap:4px;font-size:12px}.appearance-controls select,.appearance-preview select{width:100%;min-width:0;padding:7px}.appearance-preview canvas{display:block;width:100%;height:380px;border:1px solid #344d62;border-radius:8px;touch-action:none}.appearance-buttons{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.appearance-credits{font-size:11px;opacity:.7}.appearance-panel>p{max-width:75ch}.appearance-preview [role=status]{font-size:12px}@media(max-width:650px){.appearance-layout{grid-template-columns:1fr}.appearance-preview canvas{height:300px}.appearance-controls{grid-template-columns:1fr 1fr}}

#character-menu-tabs{grid-template-columns:repeat(7,minmax(0,1fr))}.appearance-buttons button{width:auto;flex:1}.appearance-preview label{margin-top:6px}@media(max-width:700px){#character-menu-tabs{grid-template-columns:repeat(3,minmax(0,1fr))}}

.character-equipment-layout{display:grid;grid-template-columns:minmax(260px,.85fr) minmax(280px,1.15fr);gap:24px;align-items:start}.character-equipment-layout>section{min-width:0}#character-slots{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(3,1fr);gap:12px;margin:0}.equipped-preview canvas{height:440px}.equipped-preview [role=status]{margin:6px 0;font-size:11px;color:#91aabc}@media(max-width:650px){.character-equipment-layout{grid-template-columns:minmax(0,1fr);gap:16px}.equipped-preview canvas{height:320px}}

.appearance-controls input[type="color"]{width:100%;height:36px;padding:3px;cursor:pointer}.appearance-controls fieldset{min-width:0;border:1px solid #38505d;border-radius:6px;padding:10px}.appearance-controls fieldset small{display:block;line-height:1.45}
/* Base authoring uses one local preview, disposed when the editor closes. */
.implicit-editor{width:min(1200px,96vw);max-height:94vh;overflow:auto}.base-editor-layout{display:grid;grid-template-columns:minmax(280px,1fr) minmax(320px,1fr);gap:18px;align-items:start;margin:12px 0}.base-editor-settings{display:grid;gap:8px}.base-editor-field{display:grid;grid-template-columns:minmax(130px,1fr) minmax(110px,1fr);gap:8px;align-items:center}.base-editor-field input,.base-editor-field select{width:100%;min-width:0}.base-editor-settings details{border:1px solid #304b5b;border-radius:5px;padding:8px}.base-editor-settings summary{cursor:pointer;padding:4px}.base-editor-settings details[open]{display:grid;gap:8px}.base-editor-preview{position:sticky;top:0}.base-editor-preview canvas{width:100%;height:420px;display:block;touch-action:none;background:#09121c;border:1px solid #304b5b;border-radius:8px}.base-editor-preview p{font-size:12px;color:#a6b6c3}@media(max-width:750px){.base-editor-layout{grid-template-columns:1fr}.base-editor-preview{position:static;grid-row:1}.base-editor-preview canvas{height:300px}}
.implicit-editor .implicit-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:12px 0}.implicit-editor .implicit-toolbar button{width:auto;flex:0 0 auto;margin:0}.implicit-editor .implicit-toolbar label{display:flex;align-items:center;gap:8px}.base-editor-preview>select{width:100%;margin-bottom:8px}.base-editor-settings{align-self:start}.base-editor-preview{position:sticky;top:0}
/* Item-base workspace: navigation stays put while each tab scrolls independently. */
.implicit-editor.base-editor-tabbed[open]{display:flex;flex-direction:column;width:min(1240px,96vw)!important;height:92dvh;max-height:92dvh!important;overflow:hidden!important;padding:18px;gap:10px}.base-editor-tabbed [hidden]{display:none!important}.base-editor-tabbed>.character-menu-header{flex:none}.base-editor-tabbed>p{font-size:12px;line-height:1.5;margin:0;flex:none}.base-editor-shell{flex:1;min-height:0;display:grid;grid-template-columns:260px minmax(0,1fr);gap:18px}.base-editor-sidebar{min-height:0;overflow:auto;border:1px solid #2a4255;background:#0b1723;border-radius:8px;padding:12px}.base-editor-sidebar h3{font-size:15px;margin:0 0 10px}.base-editor-sidebar>input{width:100%;margin-bottom:12px}.base-editor-tree details{border:0;padding:0;margin:0}.base-editor-tree summary{cursor:pointer;user-select:none}.base-nav-category>summary{padding:12px 4px 8px;color:#78d8cc;font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;border-bottom:1px solid #233748}.base-nav-group{margin-left:9px!important;border-left:1px solid #2b4255!important;padding-left:8px!important}.base-nav-group>summary{padding:10px 3px;color:#c6d6e2;font-size:13px}.base-editor-tree ul{list-style:none;padding:0 0 6px 10px;margin:0}.base-editor-tree li{margin:3px 0}.base-editor-tree .base-nav-item{display:block;text-align:left;width:100%;padding:9px 10px;border:1px solid transparent;border-radius:5px;background:transparent;color:#c5d4df;white-space:normal;font-weight:400}.base-nav-item span{display:block;line-height:1.3;font-size:12px}.base-nav-item small{display:block;color:#7f98ab;font-size:10px;margin-top:3px}.base-editor-tree .base-nav-item:hover{background:#172c3d}.base-editor-tree .base-nav-item[aria-current=true]{background:#16433f;border-color:#60cdbd;color:#e1fff7}.base-editor-main{display:flex;flex-direction:column;min-height:0;min-width:0}.base-editor-selection{margin:0 0 6px;font-size:19px;color:#e4f1fa}.base-editor-main>.implicit-toolbar{margin:0 0 10px}.base-editor-tabs{display:flex;gap:5px;border-bottom:1px solid #2d475d;padding-bottom:8px;flex:none}.base-editor-tabs [role=tab]{background:#142536;color:#b9cbd9;border:1px solid #2d475d;border-radius:6px;padding:9px 19px;min-width:80px}.base-editor-tabs [aria-selected=true]{background:#61d6c4;color:#071e21;border-color:#61d6c4;font-weight:700}.base-editor-content{flex:1;min-height:0;overflow:auto;padding:16px 6px 12px 0}.base-editor-tab-panel{min-width:0}.base-editor-tab-panel>.base-editor-settings{max-width:680px;gap:14px}.base-editor-graphics{display:grid;grid-template-columns:minmax(240px,.8fr) minmax(300px,1.2fr);gap:18px;align-items:start}.base-editor-graphics .base-editor-preview{position:sticky;top:0;min-width:0}.base-editor-graphics .base-editor-preview canvas{height:auto;aspect-ratio:1.35;width:100%}.base-editor-graphics .base-editor-settings{gap:14px}.base-editor-tab-panel [data-fields]{display:grid;grid-template-columns:1fr;gap:10px}.base-preview-scopes{display:flex;align-items:center;gap:6px;margin-top:10px;flex-wrap:wrap}.base-preview-scopes>span{font-size:12px;margin-right:6px;color:#a8bdcd}.base-preview-scopes button{padding:7px 12px;background:#142b3c;color:#bfd1df;border:1px solid #365166;border-radius:5px}.base-preview-scopes button[aria-pressed=true]{background:#61d6c4;color:#082426;border-color:#61d6c4}.base-editor-tabbed [data-status]{min-height:20px;color:#a9d6cc}.base-editor-tabbed fieldset{margin:0 0 12px}.base-editor-tabbed fieldset label{display:block;margin:8px 0}.base-editor-tabbed fieldset input,.base-editor-tabbed fieldset select{margin-left:8px}@media(max-width:1000px){.base-editor-shell{grid-template-columns:210px minmax(0,1fr)}.base-editor-graphics{grid-template-columns:1fr}.base-editor-graphics .base-editor-preview{position:static;grid-row:1}.base-editor-graphics .base-editor-preview canvas{max-height:360px}}@media(max-width:650px){.base-editor-shell{grid-template-columns:155px minmax(0,1fr);gap:10px}.implicit-editor.base-editor-tabbed[open]{padding:10px}.base-editor-sidebar{padding:7px}.base-editor-tabs [role=tab]{min-width:0;padding:8px 10px}.base-editor-field{grid-template-columns:1fr}.base-nav-item small{display:none}}
.base-editor-tabbed .base-preview-scopes button{width:auto;flex:0 0 auto;margin:0}.base-editor-tabbed .base-preview-scopes{flex-wrap:nowrap}.base-editor-tabbed .base-preview-scopes>span{white-space:nowrap}#item-base-panel-threeD .base-editor-preview canvas,#item-base-panel-fps .base-editor-preview canvas{height:auto;aspect-ratio:16/9}.base-editor-tabbed [data-fields]{max-height:none;overflow:visible;margin:0 0 16px}
#item-base-panel-threeD .base-editor-preview canvas,#item-base-panel-fps .base-editor-preview canvas{height:auto;max-height:none;aspect-ratio:16/9}
.base-editor-tabbed .base-editor-preview{padding:12px}.base-editor-tabbed .base-editor-preview p{margin:8px 0 0;font-size:11px;line-height:1.35}

.base-editor-sidebar>.implicit-toolbar{display:flex;flex-wrap:wrap;gap:5px;margin:0 0 10px}.base-editor-sidebar>.implicit-toolbar button{flex:1;padding:7px 5px;font-size:12px}.base-preview-viewport{position:relative}.base-preview-viewport canvas{display:block;width:100%}.base-preview-crosshair{position:absolute;left:50%;top:50%;width:18px;height:18px;transform:translate(-50%,-50%);pointer-events:none;filter:drop-shadow(0 1px 2px #000)}.base-preview-crosshair:before,.base-preview-crosshair:after{content:'';position:absolute;background:#fff9}.base-preview-crosshair:before{width:18px;height:2px;left:0;top:8px}.base-preview-crosshair:after{height:18px;width:2px;top:0;left:8px}

.base-preview-flight-suit{display:flex;align-items:center;gap:8px;margin:6px 0;font-size:12px}.base-preview-flight-suit input{width:auto;margin:0}

.base-editor-tree .base-nav-weapon-type{margin-left:8px;padding-left:8px;border-left:1px solid #2b4255}.base-nav-weapon-type>summary{padding:8px 3px;color:#98b7cc;font-size:12px}.base-nav-weapon-type>ul{padding-left:6px}

.base-editor-heading-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px;flex:none}.base-editor-heading-row .base-editor-selection{margin:0}.base-editor-heading-actions{display:flex;gap:8px;flex-shrink:0}.base-editor-heading-actions button{width:auto;margin:0;padding:8px 14px}.base-editor-settings details p{font-size:11px;line-height:1.5;color:#a6b6c3;letter-spacing:0}

#weapon-ammo{position:absolute;right:max(22px,env(safe-area-inset-right));bottom:100px;z-index:15;padding:9px 14px;background:#0c1521e8;border:1px solid #506477;border-radius:7px;color:#e7f3ff;font:600 20px/1.3 monospace;font-variant-numeric:tabular-nums;pointer-events:none;text-shadow:0 1px 2px #000}#weapon-ammo.empty{color:#ffc48b}@media(max-width:700px){#weapon-ammo{right:12px;bottom:150px;font-size:16px}}

.base-preview-muzzle-point{position:absolute;transform:translate(-6px,-6px);padding-left:18px;color:#64fff0;font:600 12px/12px sans-serif;text-shadow:0 1px 3px #000,0 0 4px #000;white-space:nowrap;pointer-events:none}.base-preview-muzzle-point:before{content:'';position:absolute;left:0;top:0;width:10px;height:10px;border:1px solid #64fff0;border-radius:50%;box-shadow:0 0 0 2px #071016cc}.base-preview-muzzle-point:after{content:'';position:absolute;left:4px;top:4px;width:4px;height:4px;background:#64fff0;border-radius:50%}

#arena-spectator-controls{position:absolute;left:50%;transform:translateX(-50%);bottom:88px;z-index:22;display:flex;gap:6px;align-items:center;flex-wrap:wrap;justify-content:center;max-width:calc(100% - 24px);padding:9px 12px;border:1px solid #537789;border-radius:8px;background:#0b1725ee}#arena-spectator-controls[hidden]{display:none}#arena-spectator-controls button,#arena-spectator-controls select{width:auto;margin:0;padding:7px}#arena-spectator-controls strong,#arena-spectator-controls small{flex-basis:100%;text-align:center}#arena-spectator-controls small{color:#a4c3d0}.arena-team-spectator{grid-column:1/-1}

#character-slots .equipment-drop{min-width:0;padding:8px;gap:6px}#character-slots .inventory-item{width:60px;height:60px;max-width:100%}#character-slots .active-weapon-slot{border-style:solid;border-color:#74d6bc;background:#183b40;box-shadow:inset 0 0 0 1px #74d6bc55}

#combat-kill-feed{position:fixed;right:18px;top:120px;z-index:25;pointer-events:none;display:flex;flex-direction:column;align-items:flex-end;gap:7px;max-width:calc(100vw - 30px);background:none}
.kill-feed-row{display:flex;align-items:center;gap:9px;font-size:14px;font-weight:700;text-shadow:0 1px 3px #000,0 0 4px #000;white-space:nowrap;animation:kill-feed-expire 3s linear both}
.kill-feed-gun{width:78px;height:28px;object-fit:contain;filter:drop-shadow(0 1px 2px #000)}.kill-feed-headshot{color:#ffd67d;display:flex}
@keyframes kill-feed-expire{0%,80%{opacity:1}100%{opacity:0}}
#hud-left-stack .range-side-panel{position:relative;width:100%;max-width:260px;max-height:260px;overflow:auto;box-sizing:border-box;padding:10px;flex-shrink:0}#hud-left-stack .range-side-panel[hidden]{display:none}

.base-preview-crosshair.red-dot::before,.base-preview-crosshair.red-dot::after{display:none}.base-preview-crosshair.red-dot{width:4px;height:4px;background:#ff2929;border-radius:50%;box-shadow:0 0 3px #f22}

/* Transient feedback leaves no empty panel after expiry. */
#toast:empty{display:none}
