.space-page { min-height: 100vh; padding: 112px 24px 70px 76px; color: #ecf6ff; background: radial-gradient(ellipse 70% 40% at 40% 2%,#152661 0,transparent 73%),radial-gradient(ellipse 50% 40% at 100% 90%,#211747 0,transparent 75%),#060b1c; font-family: Inter,system-ui,"Segoe UI",sans-serif; box-sizing: border-box; }
.space-page * { box-sizing: border-box; }
.space-heading { max-width: 1090px; margin: 0 auto 26px; text-align: center; }
.space-kicker { color:#67dfff; letter-spacing:3px; font-weight:800; font-size:10px; }
.space-pulse { display:inline-block; width:7px;height:7px; background:#55ffe0;border-radius:50%; box-shadow:0 0 11px #42ffc5; margin-right:8px; }
.space-heading h1 {font-family:Impact,"Arial Black",system-ui,sans-serif;letter-spacing:2px;font-weight:900;font-size:clamp(37px,6vw,67px);line-height:1.05;margin:10px 0 8px;color:#d8f8ff;text-shadow:0 0 26px #10a7fb77,0 3px #123363;}
.space-heading h1 span {color:#ffb74c; text-shadow:0 0 24px #ed6d2880,0 3px #663419; }
.space-heading p { color:#9bafd0; font-size:14px; margin:0; }
.space-shell { display:grid; grid-template-columns: minmax(0,540px) minmax(245px,300px);justify-content:center;align-items:start;gap:20px;max-width:1000px;margin:0 auto; }
.space-left {min-width:0;}
.space-stage {position:relative; isolation:isolate; max-width:540px; width:100%; aspect-ratio:540/760; overflow:hidden; border-radius:19px;border:2px solid #2269b7; background:#050c28; box-shadow:0 15px 85px #030612, 0 0 32px #0965b342,inset 0 0 24px #0b4d9060; touch-action:none; user-select:none; }
#spaceCanvas {width:100%;height:100%;display:block;cursor:crosshair;touch-action:none;}
.space-top-hud {position:absolute;z-index:3;pointer-events:none;top:12px;left:12px;right:12px;display:flex;gap:8px;align-items:center;justify-content:space-between;}
.space-pill {background:#06102dd9;border:1px solid #4994c377;border-radius:8px;backdrop-filter:blur(5px);display:flex;flex-direction:column;align-items:start;justify-content:center;min-width:77px;min-height:47px;padding:6px 10px;box-shadow:0 2px 10px #0005;}
.space-pill span {font-size:9px;letter-spacing:1.3px;color:#8bacd5;font-weight:900;}
.space-pill strong{font-size:19px;font-weight:900;color:white;font-variant-numeric:tabular-nums;line-height:1.3;}
.space-pill-accent strong{color:#ffcb63;}
.space-bottom-hud{position:absolute;z-index:3;pointer-events:none;bottom:10px;left:12px;right:12px;padding:10px 12px;display:grid;gap:8px;background:#050e29d9;border:1px solid #25608a85;border-radius:10px;backdrop-filter:blur(5px);}
.space-status {display:flex;gap:9px;align-items:center;}
.space-status>span{font-size:10px;letter-spacing:1px;font-weight:900;width:47px;color:#b4d2ef;}
.space-status b{font-size:11px;width:26px;text-align:right;color:white;font-variant-numeric:tabular-nums;}
.space-meter{flex:1;height:8px;border-radius:20px;background:#203752;overflow:hidden;}
.space-meter i{display:block;height:100%;width:100%;background:linear-gradient(90deg,#ff4b77,#ffb475);box-shadow:0 0 9px #fa5075;transition:width .13s;}
.space-meter.space-shield i{background:linear-gradient(90deg,#148be4,#72eeff);box-shadow:0 0 9px #36dbff;}
.space-overlay {position:absolute;z-index:5;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:26px;text-align:center;background:linear-gradient(180deg,#071436d9,#0b1143d9 54%,#04081ce8);backdrop-filter:blur(3px);}
.space-overlay[hidden]{display:none;}
.space-overlay-symbol {font-size:70px;color:#50dcff;line-height:1;filter:drop-shadow(0 0 24px #11b9f7);animation:space-levitate 2.6s ease-in-out infinite;}
@keyframes space-levitate {50% {transform:translateY(-10px) rotate(8deg);}}
.space-overlay-eyebrow{font-size:11px;color:#7be5ff;letter-spacing:4px;font-weight:800;}
.space-overlay h2{font-family:Impact,"Arial Black",system-ui,sans-serif;font-size:clamp(35px,5vw,62px);line-height:1.1;color:#d4f9ff;margin:0;text-shadow:0 3px 0 #134a78,0 0 20px #2d96f399;}
.space-overlay h2 span{display:block;color:#ffbf52;text-shadow:0 3px #5a2e12,0 0 22px #ff9f5585;}
.space-overlay>p{max-width:360px;color:#bfd1ed;line-height:1.55;font-size:14px;margin:4px auto;}
.space-button-primary{background:linear-gradient(120deg,#37e9c7,#16a9cb);border:1px solid #a6fff1;border-radius:12px;padding:15px 26px;font-weight:1000;letter-spacing:1px;color:#052337;box-shadow:0 0 25px #1cdbce80;cursor:pointer;font-size:15px;transition:transform .15s, filter .15s;}
.space-button-primary:hover{filter:brightness(1.1);transform:translateY(-2px);}
.space-overlay>p.space-overlay-tip{font-size:11px;color:#83a9c3;}
.space-toast{position:absolute;z-index:4;top:80px;left:50%;transform:translateX(-50%) translateY(-5px);white-space:nowrap;max-width:94%;overflow:hidden;text-overflow:ellipsis;opacity:0;pointer-events:none;padding:10px 16px;background:#08162ee0;border:1px solid #ffca6a9b;border-radius:9px;color:#fff0c7;font-size:13px;font-weight:900;letter-spacing:1px;text-shadow:0 0 8px #ffbf7b;transition:opacity .15s,transform .15s;}
.space-toast.show{opacity:1;transform:translateX(-50%) translateY(0);}
.space-rail{display:flex;flex-direction:column;gap:14px;}
.space-panel{background:linear-gradient(145deg,#101c37e8,#081124ef);border:1px solid #244c7d;border-radius:14px;padding:16px;box-shadow:inset 0 1px #48618c22,0 8px 28px #01091870;}
.space-panel-title{color:#67d8fc;font-size:12px;font-weight:900;letter-spacing:1.4px;display:flex;align-items:center;justify-content:space-between;margin-bottom:17px;}
.space-online{font-size:9px;color:#44e3bc;letter-spacing:1px;}
.space-row{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #2344656c;padding:8px 0;color:#b2c0d7;font-size:12px;}
.space-row strong{color:#fff;font-size:14px;font-variant-numeric:tabular-nums;}
.space-small-note{font-size:10px;color:#7f94b3;line-height:1.6;margin:15px 0 0;}
.space-control-row{display:flex;align-items:center;justify-content:space-between;color:#b3cae2;font-size:12px;margin-bottom:13px;gap:12px;}
.space-keycap{border:1px solid #35618c;box-shadow:0 2px 0 #123456;border-radius:5px;padding:5px 6px;font-size:9px;letter-spacing:1px;font-weight:900;color:#9de7ff;background:#173054;}
.space-side-button{display:block;width:100%;background:#152c51;border:1px solid #37699b;border-radius:8px;padding:11px 9px;color:#bfeaff;font-size:11px;letter-spacing:1.2px;font-weight:900;cursor:pointer;margin-top:10px;}
.space-side-button:hover{background:#214575;}
.space-side-emp{background:#422c19;border-color:#ab6c30;color:#ffcc7a;}
.space-side-emp:hover{background:#61431e;}
.space-side-button:disabled,.space-action-button:disabled{opacity:.45;cursor:not-allowed;}
.space-drops>div:not(.space-panel-title){display:flex;align-items:center;gap:12px;margin:12px 0;}
.space-drops b{font-size:12px;color:#ebf5ff;display:block;}
.space-drops small{font-size:11px;color:#839fbe;}
.space-drop-icon{display:flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:9px;background:#2d594a;color:#85ffc0;font-size:19px;font-weight:900;flex-shrink:0;}
.space-drop-icon.cyan{background:#143d5e;color:#65dafa;}.space-drop-icon.violet{background:#39255d;color:#d59cff;}.space-drop-icon.amber{background:#5b431b;color:#ffd277;}.space-drop-icon.coral{background:#572933;color:#ff8f93;}
.space-mobile-actions{display:none;gap:12px;margin-top:12px;}
.space-action-button{flex:1;padding:14px 10px;font-weight:900;color:#e1f6ff;background:#172c56;border:1px solid #4388bd;border-radius:10px;cursor:pointer;}
.space-action-button:first-child{color:#ffd78e;border-color:#aa6c39;}
.space-footer-note{text-align:center;color:#6e84a4;margin:20px auto 0;font-size:11px;letter-spacing:.5px;}
@media(max-width:970px){.space-page{padding:86px 12px 50px 58px;}.space-shell{grid-template-columns:minmax(0,540px);}.space-rail{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));}.space-drops{grid-column:1/-1;}.space-mobile-actions{display:flex;}}
@media(max-width:610px){.space-page{padding:82px 8px 40px 8px;}.space-heading h1{font-size:36px;}.space-heading p{font-size:11px;}.space-rail{grid-template-columns:1fr;}.space-drops{grid-column:auto;}.space-stage{border-radius:10px;}.space-pill{min-width:66px;padding:5px 8px;min-height:39px;}.space-pill strong{font-size:15px;}.space-pill span{font-size:8px;}.space-top-hud{top:7px;left:7px;right:7px;}.space-bottom-hud{bottom:6px;left:7px;right:7px;}.space-overlay-symbol{font-size:52px;}.space-overlay h2{font-size:40px;}.space-overlay>p{font-size:12px;}}
/* Station update: explicit hidden states override layout display rules. */
.space-page [hidden] {display:none!important;}
.sd-station {max-width:1130px;margin:0 auto;color:#eaf5ff;background:linear-gradient(140deg,#101b38fa,#07122dfa);border:1px solid #285887;border-radius:20px;box-shadow:0 18px 65px #020612cc, inset 0 1px #7189b32a;overflow:hidden;}
.sd-station-top {padding:22px 27px;display:flex;gap:22px;align-items:center;justify-content:space-between;border-bottom:1px solid #264366;background:linear-gradient(95deg,#15294d,#0a1934);}
.sd-station-title {display:flex;align-items:center;gap:15px;}
.sd-station-title small,.sd-station-wallet>span {display:block;font-size:10px;letter-spacing:1.8px;font-weight:900;color:#76bfe4;margin-bottom:5px;}
.sd-station-title strong {display:block;font-size:21px;letter-spacing:1.1px;}
.sd-station-logo {font-size:43px;color:#65e6ff;text-shadow:0 0 28px #29befc;}
.sd-station-wallet {text-align:right;background:#122d48;border:1px solid #33749a;border-radius:11px;padding:10px 18px;}
.sd-station-wallet strong {font-size:24px;color:#ffd977;font-variant-numeric:tabular-nums;}
.sd-station-nav {display:flex;flex-wrap:wrap;background:#081528;border-bottom:1px solid #2a5477;padding:8px;gap:5px;justify-content:center;}
.sd-station-nav button {cursor:pointer;border:1px solid transparent;border-radius:9px;background:transparent;color:#a9c8e5;font-weight:900;letter-spacing:.5px;padding:12px 13px;font-size:12px;}
.sd-station-nav button:hover {background:#1d3a5b;color:white;}
.sd-station-nav button.active {color:#052337;background:linear-gradient(110deg,#6aeeff,#2ab8db);box-shadow:0 0 13px #3bbde83b;}
.sd-station-view {padding:29px;min-height:355px;}
.sd-welcome {display:grid;grid-template-columns:1.25fr .75fr;gap:20px;align-items:center;border-radius:16px;overflow:hidden;background:radial-gradient(ellipse 65% 80% at 80% 40%,#164c88ad,transparent 80%),linear-gradient(120deg,#112248,#0b1230);border:1px solid #2861a2;padding:28px;}
.sd-eyebrow,.sd-view-heading small {font-size:10px;letter-spacing:2.2px;color:#5fe4ff;font-weight:900;}
.sd-welcome h2 {font-family:Impact,"Arial Black",sans-serif;line-height:1.08;font-size:clamp(27px,4vw,47px);margin:12px 0;letter-spacing:.8px;}
.sd-welcome h2 span {color:#ffc269;}
.sd-welcome p {line-height:1.7;font-size:14px;color:#b3cae6;max-width:540px;}
.sd-home-actions {display:flex;gap:11px;flex-wrap:wrap;margin-top:24px;}
.sd-primary,.sd-ghost,.sd-buy {cursor:pointer;border-radius:10px;padding:14px 17px;font-size:12px;letter-spacing:.5px;font-weight:900;}
.sd-primary {border:1px solid #a0fff5;color:#052633;background:linear-gradient(115deg,#65ebca,#21b8de);}
.sd-ghost {color:#d6edff;border:1px solid #408ac1;background:#16406c;}
.sd-primary:hover,.sd-ghost:hover {filter:brightness(1.1);}
.sd-ship-showcase {height:275px;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;}
.sd-ship-halo {position:absolute;width:250px;height:250px;border:1px solid #3e80b54b;border-radius:50%;background:radial-gradient(circle,#1f83bf45 0%,#0e4f8438 37%,transparent 72%);box-shadow:0 0 30px #1580b33c,inset 0 0 50px #1c9fd81d;}
.sd-ship-showcase img {position:relative;width:185px;height:185px;object-fit:contain;filter:drop-shadow(0 10px 24px #32ccff99);animation:space-levitate 3.5s ease-in-out infinite;}
.sd-ship-showcase span {position:relative;font-size:10px;font-weight:900;letter-spacing:1.5px;color:#8fdcff;}
.sd-home-stats {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px;margin-top:16px;}
.sd-home-stats>div {border-radius:12px;padding:17px;background:#0c203a;border:1px solid #295379;}
.sd-home-stats small {font-size:10px;color:#8daece;display:block;letter-spacing:1px;font-weight:800;margin-bottom:7px;}
.sd-home-stats strong {font-size:16px;color:#f0faff;}
.sd-view-heading {display:flex;align-items:center;justify-content:space-between;gap:25px;border-bottom:1px solid #264669;padding:1px 0 21px;margin-bottom:19px;}
.sd-view-heading h2 {font-family:Impact,"Arial Black",sans-serif;font-size:33px;letter-spacing:1px;margin:6px 0 0;color:#f2faff;}
.sd-view-heading p {max-width:450px;color:#a9bed9;font-size:13px;line-height:1.5;margin:0;}
.sd-level-legend {display:flex;gap:14px;flex-wrap:wrap;color:#9ebfdb;font-size:11px;margin-bottom:18px;}
.sd-level-grid {display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:9px;}
.sd-level {cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;border:1px solid #3380a9;border-radius:9px;padding:13px 0;background:linear-gradient(140deg,#183b58,#10263f);color:#e4faff;font-size:17px;font-weight:900;}
.sd-level small {font-size:9px;font-weight:900;color:#67e1fa;}
.sd-level.completed {background:linear-gradient(145deg,#164435,#163428);border-color:#2d9c78;}
.sd-level.completed small {color:#65f9bb;}
.sd-level.locked {background:#101b2b;border-color:#24334a;color:#5b728a;cursor:not-allowed;}
.sd-level.locked small {opacity:.5;}
.sd-level.available:hover {background:#236996;transform:translateY(-2px);}
.sd-shop-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px;}
.sd-shop-card {display:grid;grid-template-columns:49px 1fr;grid-template-rows:1fr auto;gap:7px 12px;border:1px solid #315a83;border-radius:13px;padding:17px;background:linear-gradient(145deg,#112846,#0b1a31);}
.sd-shop-icon {width:46px;height:46px;display:grid;place-items:center;color:#66eaff;font-size:28px;border-radius:10px;background:#123b5f;grid-row:span 2;}
.sd-shop-card h3 {margin:0 0 7px;font-size:16px;color:#fff;}
.sd-shop-card p {margin:0 0 7px;line-height:1.4;font-size:12px;color:#aabed7;}
.sd-shop-card small {font-size:11px;font-weight:800;color:#77cbec;}
.sd-buy {grid-column:2;justify-self:start;padding:9px 17px;border:1px solid #b5eaff;background:#27bfd7;color:#08283d;}
.sd-buy:disabled {cursor:not-allowed;opacity:.52;background:#203954;color:#9cb4ce;border-color:#3b5874;}
.sd-achievement-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px;}
.sd-achievement-grid article {border:1px solid #32536f;border-radius:13px;background:#0e233d;padding:21px;text-align:center;}
.sd-achievement-grid article>span {display:block;font-size:32px;margin-bottom:15px;}
.sd-achievement-grid strong {font-size:13px;letter-spacing:.5px;display:block;}
.sd-achievement-grid p {font-size:12px;color:#9bb4d0;line-height:1.5;}
.sd-achievement-grid small {font-size:11px;color:#f4c47d;}
.sd-settings {max-width:740px;display:grid;gap:12px;}
.sd-settings label {display:flex;align-items:center;justify-content:space-between;gap:25px;background:#102842;border:1px solid #305b7b;border-radius:12px;padding:17px 20px;cursor:pointer;}
.sd-settings label strong {display:block;}
.sd-settings label small {display:block;color:#94b4d2;margin-top:6px;}
.sd-settings input {width:20px;height:20px;accent-color:#4ad6dc;}
.sd-settings>p {font-size:12px;color:#9fb5d0;}
.sd-help-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}
.sd-help-grid article {border:1px solid #305879;border-radius:12px;padding:18px;background:#10253b;}
.sd-help-grid h3 {margin:0 0 10px;color:#7fe5f7;font-size:15px;}
.sd-help-grid p {margin:0;font-size:13px;color:#b0c7df;line-height:1.7;}
.sd-station-disclaimer {text-align:center;padding:15px 12px;background:#071324;border-top:1px solid #264c70;font-size:10px;color:#779bbf;}
.sd-credit-row strong {color:#ffd977;}
.sd-dialog-secondary,.sd-dialog-danger {padding:12px 19px;border-radius:10px;border:1px solid #75bdec;background:#153a60;color:#cdecff;font-size:13px;cursor:pointer;font-weight:900;}
.sd-dialog-danger {border-color:#e6828e;background:#5e1b37;color:#ffd6dd;}
.space-overlay {gap:12px;overflow-y:auto;}
.space-overlay h2 {font-size:clamp(28px,4vw,43px);}
.space-shell {margin-top:14px;}
@media(max-width:970px) { .sd-level-grid {grid-template-columns:repeat(8,minmax(0,1fr));} }
@media(max-width:700px){
 .sd-station-top {padding:15px;}.sd-station-title strong {font-size:16px;}.sd-station-logo {font-size:28px;}.sd-station-wallet {padding:8px;}.sd-station-wallet strong{font-size:17px;}
 .sd-station-nav button {flex:1 1 28%;font-size:11px;padding:10px 5px;}.sd-station-view {padding:15px;}
 .sd-welcome {grid-template-columns:1fr;padding:20px;}.sd-ship-showcase {height:200px;}.sd-ship-showcase img {width:145px;height:145px;}.sd-ship-halo {width:190px;height:190px;}
 .sd-view-heading {display:block;}.sd-view-heading p{margin-top:12px;}.sd-home-stats {grid-template-columns:1fr;gap:8px;}
 .sd-level-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:7px;}.sd-level {padding:12px 0;}
 .sd-shop-grid,.sd-help-grid,.sd-achievement-grid {grid-template-columns:1fr;}
 .space-mobile-actions {flex-wrap:wrap;}.space-action-button {min-width:30%;font-size:12px;}
}
@media(max-width:400px){.sd-level-grid{grid-template-columns:repeat(4,minmax(0,1fr));}.sd-station-wallet>span {font-size:8px;}}
