/* ═══════════════ SPACE VIEW: zoomable world (station + Mothership + room for future business cells) ═══════════════
   World units are pixels of a 3600×2200 world; the view scales/pans it with a transform. Everything inside uses
   fixed world-pixel sizes so it scales together. */
.space { position: relative; flex: 1; width: 100%; min-height: 0; overflow: hidden; cursor: grab; touch-action: none; pointer-events: auto; border-radius: 10px;
  background: radial-gradient(ellipse at 40% 50%, rgba(10,40,34,.35), transparent 70%); }
.space.panning { cursor: grabbing; }
.world { position: absolute; left: 0; top: 0; width: 3600px; height: 2200px; transform-origin: 0 0; will-change: transform;
  background-image: radial-gradient(1.4px 1.4px at 20px 30px, rgba(255,255,255,.55), transparent 60%), radial-gradient(1px 1px at 140px 90px, rgba(160,255,240,.5), transparent 60%),
    radial-gradient(1.2px 1.2px at 260px 170px, rgba(255,255,255,.4), transparent 60%), radial-gradient(1px 1px at 330px 40px, rgba(255,230,180,.45), transparent 60%);
  background-size: 360px 220px; }
/* station placed in world space (1536×1024 artwork → 1500×1000) */
.space .station { position: absolute; left: 900px; top: 560px; width: 1500px; height: 1000px; aspect-ratio: auto; filter: drop-shadow(0 0 60px rgba(39,230,193,.16)); }
/* the Mothership: a separate craft holding position away from the station */
.world > .mship { position: absolute; left: 2500px; top: 330px; right: auto; width: 720px; aspect-ratio: 3 / 2; }
.world > .mship .mship-tag { left: 50%; bottom: 6%; font-size: 15px; padding: 5px 12px; }
/* fixed world-pixel type (replaces viewport-relative sizes now that the world scales as a whole) */
.space .room label { font-size: 12px; }
.space .sprite .tag { font-size: 11px; }
.space .sprite .bubble { font-size: 17px; max-width: 220px; }
.zoomctl { position: absolute; right: 10px; bottom: 10px; z-index: 8; display: flex; gap: 6px; }
.zoomctl button { cursor: pointer; min-width: 34px; height: 30px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--line2); background: rgba(2,14,12,.8); color: var(--ink); font: 400 12px var(--f-pix); }
.zoomctl button:hover { border-color: var(--c); box-shadow: 0 0 12px rgba(39,230,193,.3); }
/* docking transition in world space */
body.ms-docking .world > .mship { transform: translate(-60%, 40%) scale(2.4); }
/* soften the artwork's baked-in starfield edge so the station floats in open space */
.space .station .map { -webkit-mask-image: radial-gradient(ellipse 54% 56% at 50% 50%, #000 78%, transparent 100%); mask-image: radial-gradient(ellipse 54% 56% at 50% 50%, #000 78%, transparent 100%); }
.world > .mship { left: 2330px; top: 380px; width: 680px; }
.world > .mship .mship-tag { font-size: 30px; padding: 8px 18px; letter-spacing: 4px; border-width: 2px; bottom: 4%; }
.world > .mship .mship-tag b { font-size: 26px; padding: 2px 10px; border-radius: 14px; }

/* ═══ FIT mode: the station alone, full screen (browser fullscreen when allowed). Everything else is hidden, not removed. ═══ */
body.fit-mode { overflow: hidden !important; }
body.fit-mode .space { position: fixed !important; inset: 0 !important; width: 100vw !important; height: 100vh !important; z-index: 2147483000; border-radius: 0; margin: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(10,40,34,.45), #020807 75%); }
body.fit-mode .world > .mship, body.fit-mode .space .zoomctl { display: none !important; }
body.fit-mode > * { visibility: hidden !important; } /* every panel, sidebar and dashboard */
body.fit-mode .space { visibility: visible !important; } /* ...except the station view itself */
html:has(body.fit-mode) { overflow: hidden !important; }
.fit-exit { position: absolute; right: max(12px, env(safe-area-inset-right, 0px)); top: max(12px, env(safe-area-inset-top, 0px)); z-index: 20; cursor: pointer;
  padding: 6px 12px; border-radius: 6px; border: 1px solid rgba(39,230,193,.35); background: rgba(2,14,12,.55); color: rgba(220,255,248,.8);
  font: 600 11px/1 ui-monospace, Consolas, monospace; letter-spacing: .08em; opacity: .55; transition: opacity .2s; }
.fit-exit:hover, .fit-exit:focus-visible { opacity: 1; outline: none; box-shadow: 0 0 12px rgba(39,230,193,.35); }
.fit-exit[hidden] { display: none !important; }

.fit-stars { display: none; position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
body.fit-mode .fit-stars { display: block; }
body.fit-mode .world { background-image: none; } /* the procedural starfield replaces the faint world dots in FIT mode */
