.ns-shell { --ns-cyan:#68eaf2; --ns-amber:#ffd184; --ns-rose:#ff7aa3; position:relative; display:flex; flex-direction:column; gap:14px; min-height:640px; padding:22px; color:#effbff; background:radial-gradient(circle at 52% -35%,#43508b50,transparent 48%),linear-gradient(145deg,#121328,#0a1525 68%,#0b1c28); font-family:Inter,ui-sans-serif,system-ui,sans-serif; }
.ns-shell button { cursor:pointer; }
.ns-shell button:disabled { cursor:not-allowed; }
.ns-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; }
.ns-eyebrow,.ns-record small,.ns-hud small,.ns-arsenal__title span,.ns-modal__eyebrow { display:block; color:#73ddec; font-size:10px; font-weight:900; letter-spacing:.2em; }
.ns-heading h2 { margin:4px 0 1px; color:#fff; font-family:'Arial Black',Impact,sans-serif; font-size:clamp(28px,3.1vw,46px); font-weight:950; letter-spacing:-.055em; line-height:1; text-shadow:0 0 22px #87e9ff31; }
.ns-heading h2 i { color:#ff9dcb; font-style:normal; }
.ns-heading p { margin:6px 0 0; color:#a9b7ce; font-size:12px; }
.ns-record { flex:none; padding:11px 17px; border:1px solid #68c9dc4d; border-radius:14px; background:#101f36; text-align:right; box-shadow:inset 0 1px #ffffff12; }
.ns-record strong { color:#fff; font-size:21px; font-variant-numeric:tabular-nums; }
.ns-hud { display:grid; grid-template-columns:.72fr 1.45fr 1fr 1fr .72fr; gap:7px; }
.ns-hud>div { min-width:0; padding:9px 13px; border:1px solid #8fb8df25; border-radius:12px; background:#ffffff0b; box-shadow:inset 0 1px #ffffff12; }
.ns-hud small { color:#7b9caf; font-size:9px; letter-spacing:.13em; }
.ns-hud strong { display:block; overflow:hidden; color:#f9faff; font-size:17px; font-weight:900; text-overflow:ellipsis; white-space:nowrap; font-variant-numeric:tabular-nums; }
.ns-hud>div:nth-child(4) strong { color:#ffd184; }
.ns-hud .ns-combo--active { color:#ffa8ce; text-shadow:0 0 15px #ff6eaf; }
.ns-meter { display:block; width:100%; height:4px; margin-top:4px; overflow:hidden; border-radius:4px; background:#ffffff1c; }
.ns-meter i { display:block; height:100%; width:100%; border-radius:4px; background:linear-gradient(90deg,#39d19b,#92ffe6); box-shadow:0 0 8px #77ffe0; transition:width .22s; }
.ns-meter .ns-meter--critical { background:linear-gradient(90deg,#ff537e,#ffc58a); box-shadow:0 0 9px #ff5b7e; }
.ns-layout { display:grid; grid-template-columns:minmax(142px,180px) minmax(0,1fr) minmax(142px,180px); align-items:stretch; gap:10px; }
.ns-arsenal { display:flex; flex-direction:column; gap:9px; min-width:0; padding:11px; border:1px solid #528ab433; border-radius:16px; background:linear-gradient(165deg,#15273a,#0d1a2b); box-shadow:inset 0 1px #ffffff13; }
.ns-arsenal--left { border-color:#62daf043; }
.ns-arsenal--right { border-color:#ffce8e41; }
.ns-arsenal__title { min-height:49px; padding:2px 3px 8px; border-bottom:1px solid #ffffff17; }
.ns-arsenal__title span { color:#91a9bd; font-size:8px; letter-spacing:.14em; }
.ns-arsenal__title b { display:block; margin-top:3px; color:#f9fcff; font-size:15px; }
.ns-upgrade { position:relative; display:flex; flex:1; flex-direction:column; align-items:flex-start; gap:6px; min-height:138px; width:100%; padding:11px; overflow:hidden; border:1px solid #619ac453; border-radius:13px; background:linear-gradient(145deg,#203450,#172337); color:#effaff; text-align:left; box-shadow:inset 0 1px #ffffff1c,0 8px 20px #0000001a; transition:transform .15s,border-color .15s,box-shadow .15s,background .15s; }
.ns-upgrade::before { content:''; position:absolute; inset:0 auto auto 0; width:100%; height:2px; background:linear-gradient(90deg,#69eaf5,transparent); opacity:.6; }
.ns-arsenal--right .ns-upgrade::before { background:linear-gradient(90deg,#ffd179,transparent); }
.ns-upgrade:hover:not(:disabled),.ns-upgrade:focus-visible:not(:disabled) { transform:translateY(-2px); border-color:#8cf3ff; box-shadow:0 0 0 1px #65e9ff55,0 9px 24px #0005; }
.ns-arsenal--right .ns-upgrade:hover:not(:disabled) { border-color:#ffde9c; box-shadow:0 0 0 1px #ffd18455,0 9px 24px #0005; }
.ns-upgrade:active:not(:disabled) { transform:scale(.97); }
.ns-upgrade:disabled { opacity:.64; }
.ns-upgrade--owned { background:linear-gradient(145deg,#17445b,#18283d); }
.ns-arsenal--right .ns-upgrade--owned { background:linear-gradient(145deg,#4e3a39,#1b263a); }
.ns-upgrade__icon { display:grid; flex:none; width:31px; height:31px; place-items:center; border:1px solid #9af5ff5b; border-radius:9px; background:#52def01c; color:#a8f6ff; font-size:18px; line-height:1; }
.ns-arsenal--right .ns-upgrade__icon { border-color:#ffd1845b; background:#ffcf8017; color:#ffd184; }
.ns-upgrade__main { display:block; min-width:0; }
.ns-upgrade__main strong { display:block; font-size:12px; font-weight:950; letter-spacing:.04em; }
.ns-upgrade__main small { display:block; margin-top:3px; color:#afbed0; font-size:10px; line-height:1.25; }
.ns-upgrade__main em { display:block; margin-top:5px; color:#80dbe5; font-size:9px; font-style:normal; font-weight:800; }
.ns-arsenal--right .ns-upgrade__main em { color:#ffd192; }
.ns-upgrade__price { display:flex; align-items:baseline; gap:5px; margin-top:auto; color:#fff; }
.ns-upgrade__price b { font-size:20px; line-height:1; font-variant-numeric:tabular-nums; }
.ns-upgrade__price small { color:#93a8bc; font-size:8px; font-weight:900; letter-spacing:.13em; }
.ns-stage { position:relative; min-width:0; overflow:hidden; border:1px solid #85baf378; border-radius:17px; background:#0b1528; box-shadow:0 0 0 3px #83c3ef13,inset 0 0 30px #0009,0 18px 36px #03091888; aspect-ratio:800 / 520; touch-action:none; }
.ns-stage canvas { display:block; width:100%; height:100%; touch-action:none; cursor:crosshair; }
.ns-stage-actions { position:absolute; top:12px; right:12px; display:flex; gap:6px; z-index:3; }
.ns-stage-actions button { width:44px; height:44px; border:1px solid #b4e4ef80; border-radius:10px; background:#102336d9; color:#e7ffff; font-size:20px; line-height:1; backdrop-filter:blur(8px); }
.ns-stage-actions button:hover:not(:disabled) { background:#276277; }
.ns-stage-actions button:disabled { opacity:.45; }
.ns-wave-tag { position:absolute; top:15px; left:16px; padding:7px 11px; border:1px solid #6be2f279; border-radius:7px; background:#0f3546c9; color:#c0faff; font-size:10px; font-weight:900; letter-spacing:.16em; pointer-events:none; }
.ns-wave-tag--boss { border-color:#ffd184; background:#583731cb; color:#ffe3a9; }
.ns-toast { position:absolute; top:59px; left:50%; transform:translateX(-50%); z-index:4; max-width:90%; padding:8px 13px; border:1px solid #7ceafa88; border-radius:9px; background:#133849e8; color:#d5ffff; font-size:11px; font-weight:900; letter-spacing:.06em; white-space:nowrap; box-shadow:0 7px 22px #0008; pointer-events:none; }
.ns-toast[data-color="amber"] { border-color:#ffd184; background:#534137ed; color:#fff3d4; }
.ns-toast[data-color="rose"] { border-color:#ff8aa5; background:#503249ed; color:#ffe4ee; }
.ns-overlay { position:absolute; inset:0; z-index:2; display:grid; place-items:center; padding:15px; background:#07101cc9; backdrop-filter:blur(6px); }
.ns-overlay[hidden],.ns-toast[hidden] { display:none; }
.ns-modal { width:min(390px,100%); padding:25px 26px; border:1px solid #83e5f68a; border-radius:20px; background:linear-gradient(155deg,#173249fa,#111d35f7 70%,#221831f6); box-shadow:0 20px 60px #000a,inset 0 1px #ffffff26; text-align:center; }
.ns-modal--intro { border-color:#a98ff48a; }
.ns-modal__eyebrow { color:#92f0ff; font-size:9px; }
.ns-modal__emblem { margin:8px auto 2px; color:#a9f9ff; font-size:56px; line-height:1; text-shadow:0 0 16px #69edff,0 0 46px #598aff; }
.ns-modal h3 { margin:8px 0 7px; color:#fff; font-family:'Arial Black',Impact,sans-serif; font-size:clamp(25px,3.6vw,38px); font-weight:950; letter-spacing:-.04em; line-height:1; }
.ns-modal h3 i { color:#ffd184; font-size:.48em; font-style:normal; letter-spacing:.02em; }
.ns-modal p { margin:9px 0 15px; color:#c4d2df; font-size:12px; line-height:1.5; }
.ns-modal__features { display:flex; justify-content:center; flex-wrap:wrap; gap:6px; margin:0 0 17px; }
.ns-modal__features span { padding:5px 8px; border:1px solid #9feaff3a; border-radius:30px; background:#63bfe711; color:#dffbff; font-size:10px; font-weight:800; }
.ns-modal button { display:flex; width:100%; min-height:44px; align-items:center; justify-content:space-between; gap:10px; padding:12px 14px; border:1px solid #b6ffff; border-radius:10px; background:linear-gradient(100deg,#6ce8f2,#72a7fa); color:#082636; font-size:11px; font-weight:950; letter-spacing:.07em; box-shadow:0 4px 18px #57e9fa55; }
.ns-modal button:hover { filter:brightness(1.12); }
.ns-modal button b { font-size:18px; }
.ns-modal button.ns-modal__secondary { justify-content:center; margin-top:8px; border-color:#ffffff42; background:#ffffff10; box-shadow:none; color:#d9eff5; }
.ns-modal small { display:block; margin-top:10px; color:#96b2c1; font-size:10px; }
.ns-footer { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px 16px; color:#9ab0c2; font-size:10px; line-height:1.4; }
.ns-footer b { color:#b8e8ee; font-size:9px; letter-spacing:.09em; }
.ns-footer button { min-height:44px; margin-left:auto; padding:8px 11px; border:1px solid #7af6d17c; border-radius:9px; background:#145245; color:#baffea; font-size:10px; font-weight:800; }
.ns-footer button:disabled { opacity:.42; }
.ns-footer button:hover:not(:disabled) { background:#216f5b; }
.ns-shell:fullscreen { width:100vw; height:100dvh; min-height:0; padding:10px; overflow:auto; }
.ns-shell:fullscreen .ns-heading { display:none; }
.ns-shell:fullscreen .ns-layout { flex:1; min-height:0; align-items:center; }
.ns-shell:fullscreen .ns-stage { align-self:center; max-height:calc(100dvh - 115px); }
@media (max-width:1000px) { .ns-shell { padding:15px; }.ns-layout { grid-template-columns:minmax(118px,140px) minmax(0,1fr) minmax(118px,140px); gap:7px; }.ns-arsenal { padding:7px; }.ns-upgrade { min-height:115px; padding:8px; }.ns-upgrade__main small { font-size:9px; }.ns-upgrade__price b { font-size:17px; } }
@media (max-width:700px) { .ns-shell { gap:10px; padding:12px; }.ns-heading h2 { font-size:29px; }.ns-heading p { display:none; }.ns-record { padding:7px 10px; }.ns-record small { font-size:8px; }.ns-record strong { font-size:14px; }.ns-hud { grid-template-columns:.6fr 1.2fr .8fr .8fr; gap:4px; }.ns-hud>div { padding:5px 7px; }.ns-hud>div:last-child { display:none; }.ns-hud small { font-size:7px; }.ns-hud strong { font-size:12px; }.ns-layout { display:flex; flex-direction:column; gap:8px; }.ns-stage { order:0; width:100%; }.ns-arsenal { display:grid; grid-template-columns:1fr 1fr; align-items:stretch; gap:7px; padding:7px; }.ns-arsenal--left { order:1; }.ns-arsenal--right { order:2; }.ns-arsenal__title { grid-column:1/-1; min-height:0; padding:0 2px 4px; }.ns-arsenal__title b { display:inline; margin-left:6px; font-size:12px; }.ns-arsenal__title span { display:inline; }.ns-upgrade { min-height:100px; padding:8px; }.ns-upgrade__icon { width:23px; height:23px; font-size:15px; }.ns-upgrade__main strong { font-size:10px; }.ns-upgrade__main small { font-size:9px; }.ns-upgrade__main em { font-size:8px; }.ns-upgrade__price b { font-size:16px; }.ns-upgrade__price small { font-size:7px; }.ns-footer { justify-content:center; }.ns-footer span { display:none; }.ns-footer button { margin:0; }.ns-wave-tag { top:8px; left:8px; padding:4px 7px; font-size:8px; }.ns-stage-actions { top:7px; right:7px; }.ns-stage-actions button { width:44px; height:44px; font-size:19px; }.ns-modal { padding:14px 18px; }.ns-modal__emblem { font-size:36px; }.ns-modal h3 { font-size:26px; }.ns-modal p { font-size:10px; margin:6px 0 9px; }.ns-modal__features { margin-bottom:9px; }.ns-modal button { padding:8px 11px; font-size:10px; }.ns-modal small { font-size:9px; } }
@media (max-width:390px) { .ns-shell { padding:8px; }.ns-heading h2 { font-size:24px; }.ns-eyebrow { font-size:8px; }.ns-hud strong { font-size:11px; }.ns-upgrade { min-height:90px; }.ns-upgrade__main small { display:none; }.ns-modal__features { display:none; }.ns-modal p { line-height:1.35; } }
@media (orientation:landscape) and (max-height:500px) { .ns-shell { padding:5px; gap:4px; }.ns-heading { display:none; }.ns-hud>div { padding:3px 8px; }.ns-layout { display:grid; flex:1; min-height:0; grid-template-columns:118px minmax(0,1fr) 118px; }.ns-arsenal { display:flex; flex-direction:column; gap:3px; padding:4px; }.ns-arsenal__title { min-height:0; padding:0 2px 2px; }.ns-arsenal__title b { display:none; }.ns-upgrade { min-height:0; padding:5px; gap:2px; }.ns-upgrade__main small,.ns-upgrade__main em,.ns-upgrade__price small { display:none; }.ns-upgrade__icon { width:21px; height:21px; }.ns-upgrade__price b { font-size:13px; }.ns-stage { max-height:calc(100dvh - 77px); justify-self:center; }.ns-footer { display:none; }.game-stage:has(.ns-shell) { overflow:visible; } }
@media (prefers-reduced-motion:reduce) { .ns-upgrade,.ns-meter i { transition:none; } }
.ns-emp {position:absolute;bottom:10px;right:10px;z-index:3;min-width:116px;min-height:44px;padding:8px 12px;border:1px solid #82dfe8;border-radius:10px;background:#153247e8;color:#b6edf0;font-size:11px;font-weight:900;}
.ns-emp:disabled {opacity:.6;}
.ns-emp--ready {color:#072837;background:#a8fbff;box-shadow:0 0 18px #70e7ff55;}
.ns-stage:has(.ns-overlay:not([hidden])) .ns-emp {visibility:hidden;}
@media (orientation:landscape) and (max-height:500px) {
  .ns-shell:not(:fullscreen) { position:fixed; inset:0; z-index:1000; width:100vw; height:100dvh; min-height:0; overflow:hidden; }
  .ns-shell:fullscreen { height:100dvh; min-height:0; overflow:hidden; }
  .ns-layout { min-height:0; align-items:stretch; }
  .ns-arsenal { min-height:0; height:100%; overflow:hidden; }
  .ns-upgrade { flex:1 1 0; min-height:0; }
  .ns-stage { width:min(100%,calc((100dvh - 60px) * 800 / 520)); max-height:calc(100dvh - 60px); align-self:center; }
}

/* The Show already supplies the game title and objective. Bound the native
   arena to its remaining picture so the reactor and repair control stay in
   view, with independently scrollable arsenals when their cards need room. */
#ssLive .ss-original-mount>.ns-shell{position:relative;inset:auto;z-index:auto;width:100%;height:100%;min-height:0;padding:12px;gap:10px;overflow:hidden;box-sizing:border-box}
#ssLive .ss-original-mount .ns-heading{display:none}
#ssLive .ss-original-mount :is(.ns-hud,.ns-footer){flex:none}
#ssLive .ss-original-mount .ns-layout{flex:1;min-height:0;container-type:size;grid-template-rows:minmax(0,1fr)}
#ssLive .ss-original-mount .ns-stage{width:min(100%,calc(100cqh * 800 / 520));height:auto;max-height:100%;aspect-ratio:800 / 520;align-self:center;justify-self:center;box-sizing:border-box}
#ssLive .ss-original-mount .ns-stage canvas{width:100%;height:100%}
#ssLive .ss-original-mount .ns-arsenal{min-height:0;height:100%;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-gutter:stable;box-sizing:border-box}
/* Let complete cards grow to their text and price; each arsenal scrolls instead of shrinking and clipping them. */
#ssLive .ss-original-mount .ns-upgrade{flex:0 0 auto;min-height:138px}
#ssLive .ss-original-mount .ns-footer{display:flex}
@media(max-width:700px){
#ssLive .ss-original-mount>.ns-shell{padding:8px;gap:8px}
#ssLive .ss-original-mount .ns-layout{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:minmax(0,min(62%,calc(100cqw * 520 / 800))) minmax(0,1fr);gap:8px}
#ssLive .ss-original-mount .ns-stage{grid-column:1/-1;grid-row:1;order:initial;width:min(100%,calc(62cqh * 800 / 520))}
#ssLive .ss-original-mount .ns-arsenal{display:flex;flex-direction:column;grid-row:2;order:initial;gap:7px;padding:7px}
#ssLive .ss-original-mount .ns-arsenal--left{grid-column:1}
#ssLive .ss-original-mount .ns-arsenal--right{grid-column:2}
#ssLive .ss-original-mount .ns-arsenal__title{flex:none}
#ssLive .ss-original-mount .ns-upgrade__main :is(small,em){display:block}
}
