:root{color-scheme:dark;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;background:#070912;color:#e5edf8}*{box-sizing:border-box}body{margin:0;min-width:320px;min-height:100vh;background:radial-gradient(circle at top left,rgba(56,189,248,.12),transparent 32rem),#070912;overflow:hidden}button,input,select{font:inherit}button{border:1px solid #334155;background:#111827;color:#e5edf8;border-radius:6px;padding:.55rem .8rem;cursor:pointer}button:hover{border-color:#38bdf8}.station-shell{height:100vh;display:grid;place-items:center;padding:1rem;overflow:hidden}.station-panel{width:min(760px,100%);border:1px solid #263244;border-radius:8px;background:#0c111df0;padding:1.5rem}.eyebrow{margin:0 0 .35rem;color:#7dd3fc;text-transform:uppercase;letter-spacing:.08em;font-size:.75rem}.station-title{margin:0;font-size:2rem;font-weight:800;letter-spacing:.12em}.station-grid{width:min(1380px,100%);height:calc(100vh - 2rem);display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto;gap:.75rem;overflow:hidden}.station-header{display:flex;align-items:center;justify-content:space-between;gap:1rem}.station-header-title{min-width:0}.station-header-credits{display:inline-flex;align-items:baseline;gap:.5rem;border:1px solid #263244;border-radius:999px;background:#080e18b3;padding:.45rem .8rem;white-space:nowrap}.station-header-credits span{color:#93a4b8;font-size:.78rem;text-transform:uppercase;letter-spacing:.08em}.station-header-credits strong{font-size:1rem}.station-header h1,.panel h2{margin:0}.panel{border:1px solid #263244;border-radius:8px;background:#0c111df0;padding:1rem}.station-main-layout{display:grid;grid-template-columns:minmax(320px,.92fr) minmax(420px,1.08fr);gap:1rem;align-items:stretch;min-height:0}.station-service-panel,.station-refit-column{min-width:0;min-height:0}.station-refit-column{display:grid;grid-template-rows:minmax(0,1fr) auto;gap:.75rem}.station-service-panel-header{display:flex;align-items:flex-start;justify-content:flex-end;gap:1rem;margin-bottom:.75rem}.station-service-nav{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:.65rem;margin-bottom:1rem}.station-service-link{width:100%;text-align:center}.station-service-content{display:grid;gap:1rem;min-height:0;overflow:auto;padding-right:.2rem}.refit-panel-header{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem}.station-section-header,.station-overview-header{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:1rem}.station-overview-actions{display:flex;gap:.65rem;flex-wrap:wrap;justify-content:flex-end}.station-destination-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem;margin-bottom:1rem}.station-destination-card{display:grid;gap:.35rem;text-align:left;padding:1rem}.station-destination-card span{color:#93a4b8;font-size:.88rem}.parts-vendor-grid,.contracts-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}.contract-item{align-items:flex-start}.parts-vendor-grid h3,.cargo-panel-block h3{margin:0 0 .75rem}.refit-panel,.cargo-panel-block,.station-service-panel{display:flex;flex-direction:column}.refit-panel{min-height:0;overflow:hidden}.cargo-panel-block{padding:.8rem}.station-storage-service-panel{min-height:0}.exchange-summary{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-top:1rem}.equipment-panel{align-self:start}.cargo-panel{grid-column:1 / -1}.refit-layout{display:grid;grid-template-columns:minmax(120px,150px) minmax(0,1fr);gap:.85rem;min-height:0;flex:1 1 auto}.refit-stat-column{display:grid;align-content:start;gap:.45rem;min-width:0}.refit-schematic-shell{display:grid;min-height:0}.refit-stat-chip{display:grid;gap:.18rem;border:1px solid #263244;border-radius:8px;background:#080e18b3;padding:.45rem .55rem}.refit-stat-chip span{color:#93a4b8;font-size:.75rem}.refit-stat-chip strong{font-size:.82rem;font-weight:700}.refit-schematic{position:relative;min-height:0;border:1px solid #263244;border-radius:8px;background:radial-gradient(circle at 50% 10%,rgba(34,211,238,.08),transparent 30%),#050a14db;overflow:hidden;flex:1 1 auto;aspect-ratio:320 / 420;max-height:100%}.refit-schematic--art{background:radial-gradient(circle at 50% 10%,rgba(34,211,238,.06),transparent 30%),linear-gradient(180deg,#070e19f5,#040912fa)}.refit-ship{width:100%;height:100%;display:block}.refit-ship-art{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;display:block;object-fit:contain;padding:.65rem .45rem .35rem;filter:drop-shadow(0 14px 32px rgba(0,0,0,.4));transform:translate(var(--refit-art-offset-x, 0px),var(--refit-art-offset-y, 0px)) scale(var(--refit-art-scale, 1));transform-origin:center center;-webkit-user-select:none;user-select:none;pointer-events:none}.refit-ship-art--frontier{padding:.35rem .15rem .15rem}.refit-ship-hull{fill:#0a1220eb;stroke:#7dd3fc1f;stroke-width:1}.refit-ship-body path,.refit-ship-body polygon,.refit-ship-body rect{fill:#2563eb2e;stroke:#7dd3fc61;stroke-width:2.5;stroke-linejoin:round}.refit-marker{position:absolute;width:30px;height:30px;transform:translate(-50%,-50%);display:grid;place-items:center;border-radius:6px;border:1px solid rgba(148,163,184,.45);background:#0f172af0;color:#e0f2fe;padding:0;pointer-events:auto;opacity:.24;transition:opacity .14s ease,border-color .14s ease,background .14s ease,transform .14s ease,box-shadow .14s ease}.refit-marker span{font-size:.72rem;font-weight:700}.refit-schematic:hover .refit-marker,.refit-marker:hover,.refit-marker:focus-visible{opacity:.94;transform:translate(-50%,-50%) scale(1.02)}.refit-marker.occupied{border-color:#22c55ebf;box-shadow:0 0 0 2px #22c55e1f;opacity:.34}.refit-marker.empty{border-style:dashed;color:#93a4b8;background:#080f1cc2}.refit-marker.selected,.refit-legend-chip.selected{border-color:#38bdf8;background:#0e7490d9}.refit-legend{display:flex;flex-wrap:wrap;gap:.5rem}.refit-legend-chip{border-radius:999px;padding:.45rem .7rem}.button-row,.equipment-list{display:grid;gap:.65rem}.button-row{grid-template-columns:repeat(3,minmax(0,1fr))}.equipment-list button{display:flex;align-items:center;justify-content:space-between;gap:.75rem;text-align:left}.equipment-list small{color:#93a4b8}.market-list{display:grid;gap:.65rem}.market-item{display:flex;align-items:center;justify-content:space-between;gap:.8rem;border:1px solid #263244;border-radius:6px;padding:.8rem}.market-item.selected-row{border-color:#38bdf873}.market-item.deselected-row{opacity:.76}.market-item.locked{border-color:#f59e0b8c}.market-item strong,.market-item small{display:block}.market-item small{color:#93a4b8}.market-actions{display:flex;gap:.5rem;flex-wrap:wrap;justify-content:flex-end}.contract-protect-row{margin-top:.8rem}button.selected{border-color:#38bdf8;background:#0c4a6e}.stat-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.6rem;margin:1rem 0 0}.refit-stat-list{margin:0}.stat-list div{border:1px solid #263244;border-radius:6px;padding:.65rem}.stat-list dt{color:#93a4b8;font-size:.75rem}.stat-list dd{margin:.2rem 0 0;font-weight:700}.errors{color:#fecaca}.cargo-grid{display:grid;--cargo-cell-size: clamp(34px, 4vw, 48px);grid-template-columns:repeat(var(--grid-width),var(--cargo-cell-size));grid-template-rows:repeat(var(--grid-height),var(--cargo-cell-size));gap:3px;width:fit-content;min-height:0;padding:4px;margin:0;background:linear-gradient(#1f2937 1px,transparent 1px),linear-gradient(90deg,#1f2937 1px,transparent 1px),#030712cc;background-size:calc(100% / var(--grid-width)) calc(100% / var(--grid-height));border:1px solid #263244;border-radius:6px}.cargo-grid-shell{position:relative;overflow:visible;width:fit-content;max-width:100%}.cargo-panel-meta{display:flex;align-items:center;justify-content:space-between;gap:.75rem;margin-bottom:.55rem;color:#93a4b8;font-size:.78rem}.cargo-item{display:grid;place-items:center;min-width:0;overflow:hidden;border:1px solid #38bdf8;border-radius:4px;background:#0e7490cc;color:#ecfeff;font-size:.7rem;line-height:1.05;text-align:center;padding:.2rem}.cargo-cell-blocked{border:1px dashed rgba(71,85,105,.75);border-radius:4px;background:#0f172a73}.cargo-item-button{width:100%;height:100%;padding:.25rem}.cargo-item.selected{border-color:#7dd3fc;box-shadow:0 0 0 2px #38bdf859}.cargo-action-popup{position:absolute;z-index:6;min-width:200px;max-width:260px;display:grid;gap:.55rem;border:1px solid #263244;border-radius:6px;background:#080e18f5;box-shadow:0 12px 30px #00000052;padding:.7rem .8rem;pointer-events:auto}.cargo-action-popup--right.cargo-action-popup--below{transform:translate(14px,14px)}.cargo-action-popup--right.cargo-action-popup--above{transform:translate(14px,calc(-100% - 14px))}.cargo-action-popup--left.cargo-action-popup--below{transform:translate(calc(-100% - 14px),14px)}.cargo-action-popup--left.cargo-action-popup--above{transform:translate(calc(-100% - 14px),calc(-100% - 14px))}.cargo-action-popup strong,.cargo-action-popup small{display:block}.cargo-action-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.35rem .75rem;margin:0}.cargo-action-stats div{min-width:0}.cargo-action-stats dt{color:#93a4b8;font-size:.7rem}.cargo-action-stats dd{margin:.1rem 0 0;color:#e5edf8;font-size:.78rem;font-weight:600}.cargo-action-popup small,.cargo-action-hint{color:#93a4b8}.stored-parts-list{display:grid;gap:.5rem;margin-bottom:1rem}.stored-part-row{display:flex;align-items:center;justify-content:space-between;gap:.75rem;border:1px solid #263244;border-radius:6px;padding:.6rem .75rem}.station-help{margin:.4rem 0 0;color:#93a4b8}.station-status{margin:0;color:#7dd3fc;min-height:1.2rem}@media (max-width: 1024px){body{overflow:auto}.station-shell{height:auto;min-height:100vh;overflow:visible}.station-grid{height:auto;overflow:visible}.station-main-layout{grid-template-columns:1fr}.station-refit-column{order:2}.station-service-panel{order:1}.station-service-content{overflow:visible;padding-right:0}.refit-layout{grid-template-columns:1fr}.refit-stat-column{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (max-width: 820px){.button-row,.parts-vendor-grid,.contracts-grid,.station-service-nav{grid-template-columns:1fr}.station-section-header,.station-overview-header,.station-service-panel-header,.exchange-summary,.station-header{flex-direction:column;align-items:stretch}.station-header-credits{align-self:flex-start}.refit-stat-column{grid-template-columns:1fr}}#game-root{position:fixed;top:0;right:0;bottom:0;left:0}#hud-root{position:fixed;top:1rem;right:1rem;bottom:1rem;left:1rem;pointer-events:none;z-index:5}.hud{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;width:100%}.hud-left{display:block;width:min(360px,calc(100vw - 14rem))}.hud-panel{min-width:0;border:1px solid rgba(148,163,184,.35);border-radius:8px;background:#030712d1;padding:.8rem;color:#dbeafe;box-shadow:0 10px 24px #00000040}.hud-bar{display:grid;gap:.35rem}.hud-bar-value{display:flex;align-items:center;justify-content:flex-end;font-size:.82rem;min-width:3rem}.hud-durability-row{display:flex;align-items:center;gap:.55rem}.hud-durability-row+.cargo-bar{margin-top:.7rem}.cargo-bar{display:flex;align-items:center;gap:.55rem}.cargo-bar .hud-bar-track{flex:0 0 8rem}.hull-bar,.shield-bar{min-width:0}.hud-bar-track{height:10px;border:1px solid rgba(148,163,184,.35);border-radius:999px;background:#0f172aeb;overflow:hidden}.hud-bar-fill{height:100%;border-radius:inherit}.hud-bar-fill.hull{background:linear-gradient(90deg,#dc2626,#f97316)}.hud-bar-fill.shield{background:linear-gradient(90deg,#2563eb,#38bdf8)}.hud-bar-fill.cargo{background:linear-gradient(90deg,#0891b2,#34d399)}.hud-dock{border:1px solid rgba(148,163,184,.22);border-radius:999px;background:#0f172ab3;padding:.35rem .55rem;font-size:.78rem}.hud-dock{margin-top:.7rem;color:#bfdbfe}.sector-map-panel{width:220px;padding:.7rem}.sector-map-header{margin-bottom:.2rem;color:#93a4b8;font-size:.8rem}.sector-map-subheader{margin-bottom:.4rem;color:#dbeafe;font-size:.78rem}.sector-map{width:100%;display:block}.sector-map-legend{display:flex;flex-wrap:wrap;gap:.45rem .7rem;margin-top:.45rem;color:#93a4b8;font-size:.72rem}.sector-map-legend span{display:inline-flex;align-items:center;gap:.28rem}.legend-dot{width:8px;height:8px;border-radius:999px;display:inline-block}.legend-dot.asteroid{background:#cbd5e1}.legend-dot.wreck{background:#fbbf24}.legend-dot.nest{background:#fb7185}.legend-dot.rare{background:#2dd4bf}.sector-map-bg{fill:#080f1cf5;stroke:#94a3b838;stroke-width:1}.sector-map-station-ring{fill:#60a5fa0d;stroke:#7dd3fc6b;stroke-width:1.5}.sector-map-station{fill:#7dd3fc}.sector-map-player{fill:#22d3ee;stroke:#ecfeff;stroke-width:1.1}.sector-map-enemy{fill:#fb7185}.sector-map-asteroid{fill:#94a3b8;opacity:.9}.sector-map-hotspot{stroke-width:1}.sector-map-hotspot.asteroid{fill:#94a3b83d;stroke:#cbd5e1}.sector-map-hotspot.wreck{fill:#f59e0b38;stroke:#fbbf24}.sector-map-hotspot.nest{fill:#f43f5e33;stroke:#fb7185}.sector-map-hotspot.rare{fill:#2dd4bf33;stroke:#2dd4bf}
