/* One surface palette over the shared scene. Atlas Bright preserves the blue Earth. */
:root {
  --atlas-sky:#061321;
  --atlas-surface:rgba(8,23,39,.72);
  --atlas-surface-raised:rgba(15,34,53,.88);
  --atlas-line:rgba(173,196,217,.20);
  --atlas-selected:rgba(123,166,197,.19);
  --atlas-accent:#a5e3ff;
  --atlas-corner:var(--r-md);
}
:root[data-look=night] {
  --atlas-sky:#030405;
  --atlas-surface:rgba(11,13,16,.75);
  --atlas-surface-raised:rgba(24,27,32,.94);
  --atlas-line:rgba(203,212,222,.20);
  --atlas-selected:rgba(213,223,232,.13);
  --atlas-accent:#d6e4ee;
}
:root[data-look=night][data-theme=dark] {
  --bg:#030405;--bg-mid:#08090b;--bg-glow:#171b20;
  --panel:#111317;--panel2:#171a1f;--panel3:#1b1e23;
  --line:var(--atlas-line);--line2:rgba(203,212,222,.28);
  --pill:#202328;--ink:#f4f6f8;--muted:#b6c1cc;--op:#aebdca;
}
body.space .shell,body.space #stage {background-color:var(--atlas-sky)}
body.space #stage {top:0}
body.space .top {
  background:transparent;border:0;box-shadow:none;backdrop-filter:none;
  pointer-events:none;
}
body.space .top :is(a,button,nav){pointer-events:auto}
body.space .brand::after{display:none}
body.space .top .gear{border-color:transparent;background:transparent}
body.space .top .gear:hover,body.space .top .gear[aria-pressed=true]{background:var(--atlas-selected)}
:root[data-look=night] body.space .home-glow{display:none}
:root[data-look=night] body.space .home{
  --hm-glass:var(--atlas-surface);--hm-line:var(--atlas-line);--hm-cyan:var(--atlas-accent);
}
body[data-workspace=rockets],body[data-workspace=satellites]{
  --hud-bg:var(--atlas-surface);--hud-line:var(--atlas-line);--hud-br:var(--atlas-accent);
}
body.space :is(#workspace-head,#wsList,#wsDetail,.ws-time,.workspace-feed,.home-col .gl,.st-card,.st-search,.st-time,.re-compact-panel,.re-trust,.re-data-drawer,.cj-left,.cj-right,.cj-tablecard) {
  background:var(--atlas-surface);border:1px solid var(--atlas-line);border-radius:var(--atlas-corner);box-shadow:none;
}
body.space :is(#workspace-head,#wsList,#wsDetail,.st-card,.re-compact-panel,.re-trust,.cj-right)::before,
body.space :is(#workspace-head,#wsList,#wsDetail,.st-card,.re-compact-panel,.re-trust,.cj-right)::after{display:none}
body.space :is(#wsList .mc,#wsDetail .zc,.st-rw .st-row,.re-candidate,.cj-event,.home-col .lw-row,.home-col .priority-row) {
  background:color-mix(in srgb,var(--atlas-surface-raised) 65%,transparent);
  border:1px solid var(--atlas-line);border-radius:var(--atlas-corner);
}
body.space :is(#wsList .mc.on,#wsDetail .zc.sel,.st-rw .st-row.on,.re-candidate.on,.cj-event.on) {
  background:var(--atlas-selected);border-color:var(--atlas-line);
}
:root[data-look=night] body.space :is(.wk-tabs button,.ws-tools .seg,.ws-tools .box,.ws-zoom button,.st-tools button,.st-chip,.st-leg,.cj-seg button,.re-ctl-bottom button,.re-ctl-side button,.src-chip,.workspace-pane-switch button){
  background:var(--atlas-surface-raised);border-color:var(--atlas-line);
}
:root[data-look=night] body.space :is(.btn.blue,.btn.navy,.st-live,.re-play){background:#d3dce5;color:#101318;border-color:transparent}

body.space :is(#nav,#sat-modes,.home-gates) {
  display:flex;align-items:center;justify-content:center;gap:6px;
  background:none;border:0;box-shadow:none;backdrop-filter:none;
}
body.space :is(#nav,#sat-modes)[hidden]{display:none}
body.space .home-gates{position:absolute;inset:93px auto auto 50%;transform:translateX(-50%);width:auto;z-index:4}
body.space .atlas-dock-item {
  position:relative;inset:auto;display:grid;place-items:center;flex:none;
  width:44px;height:44px;min-width:44px;min-height:44px;padding:0;margin:0;
  border:1px solid transparent;border-radius:var(--atlas-corner);color:#f0f6fd;
  background:transparent;box-shadow:none;transform:none;clip-path:none;
  transition:background-color 170ms,border-color 170ms;
}
body.space .atlas-dock-item:is(:hover,:focus-visible,[aria-current=page],[aria-pressed=true]){
  color:#fff;background:var(--atlas-selected);border-color:var(--atlas-line);transform:none;box-shadow:none;
}
body.space .atlas-dock-item .dock-icon{display:grid;place-items:center;width:24px;height:24px;margin:0}
.dock-icon svg{display:block;width:100%;height:100%}
body.space .atlas-dock-item .dock-card{
  position:absolute;z-index:9;top:100%;left:50%;width:max-content;max-width:175px;
  display:grid;gap:3px;text-align:left;margin:0;padding:10px 13px;
  color:#f0f6fd;background:var(--atlas-surface-raised);border:1px solid var(--atlas-line);
  border-radius:var(--atlas-corner);box-shadow:0 8px 24px #0005;
  opacity:0;visibility:hidden;transform:translate(-50%,0) scale(.94);transform-origin:top center;
  pointer-events:none;transition:opacity 170ms,transform 240ms cubic-bezier(.2,.8,.2,1),visibility 170ms;
}
body.space .atlas-dock-item:is(:hover,:focus-visible) .dock-card{opacity:1;visibility:visible;transform:translate(-50%,6px) scale(1)}
body.space .atlas-dock-item .dock-card b{padding:0;margin:0;background:none;color:inherit;font-size:13px}
body.space .atlas-dock-item .dock-card small{display:block;margin:0;font-size:11px;color:#bdcad6;line-height:1.45}
.dock-card small:empty{display:none!important}
.atlas-launch-photo,.rocket-queue-photo{width:54px;height:54px;object-fit:cover;border-radius:var(--atlas-corner);flex:none}
body.space #wsList .mc{align-items:flex-start;gap:9px}
.atlas-encounter{width:100%;margin-top:8px}
.atlas-orbit-mark{width:28px;height:28px;flex:none;color:var(--atlas-accent)}
.atlas-orbit-mark svg{width:100%;height:100%}
.st-legend-view{display:flex;gap:5px;margin:8px 0}
.st-legend-view button{flex:1;min-height:36px}
.st-legend-view [aria-pressed=true]{background:var(--atlas-selected);color:var(--atlas-accent)}
#st-legend-actions[hidden]{display:none}
.st-norad{font:600 12px var(--f-mono);color:var(--atlas-accent)}
body.space .st-row .n{font-size:14px;line-height:1.25}
body.space .st-dh h2{font-size:19px}
body.space .st-dh small{font-size:12px;color:var(--atlas-accent)}
.atlas-time-rail{flex:1;min-width:100px;display:grid;gap:2px}
.atlas-time-rail>div{display:flex;justify-content:space-between;color:#b6c4d2;font:10px var(--f-mono)}
.atlas-time-rail>div span:nth-child(2){margin-right:auto;margin-left:20%}
body.space .atlas-time-rail input{
  width:100%;margin:0;min-height:22px;appearance:none;background:none;cursor:ew-resize;
}
.atlas-time-rail input::-webkit-slider-runnable-track{height:4px;border-radius:4px;background:linear-gradient(90deg,#63859d 0 33%,#d4e0e9 33% 34%,#45535f 34%)}
.atlas-time-rail input::-webkit-slider-thumb{appearance:none;width:13px;height:13px;margin-top:-4.5px;border-radius:4px;border:1px solid #f1f5f8;background:#a9d7f0}
.atlas-time-rail input::-moz-range-track{height:4px;border-radius:4px;background:#637b8f}
.atlas-time-rail input::-moz-range-thumb{width:12px;height:12px;border-radius:4px;border:1px solid #f1f5f8;background:#a9d7f0}
@media(max-width:899px){
  body.space #stage{height:calc(70px + 40vh)}
  body.space .home-gates{inset:72px auto auto 50%;margin:0}
  body.space .top .nav{width:auto;max-width:none}
  body.space .top .atlas-dock-item{width:40px;min-width:40px}
  body.space .brand img.brand-lockup{width:180px}
  body.space #sat-modes .atlas-dock-item{width:44px}
  body.space .atlas-time-rail{order:9;flex:1 0 100%}
  body.space .home .atlas-dock-item:focus-visible .dock-card{visibility:visible}
}
body.space #command-next-launches .lw-row{
  display:grid;grid-template-columns:54px minmax(0,1fr);column-gap:10px;row-gap:2px;
  align-items:center;padding:8px;text-align:left
}
#command-next-launches .atlas-launch-photo{grid-row:1/3}
#command-next-launches .lw-row time{grid-column:2;justify-self:start;text-align:left;white-space:normal}
#command-next-launches .lw-n{min-width:0}
#command-next-launches .lw-n :is(b,small){white-space:normal;overflow-wrap:anywhere}
body.space .home-feed{background:var(--atlas-surface);border-color:var(--atlas-line);border-radius:var(--atlas-corner)}
:root[data-look=night] body.space :is(.top .clock,.top .bell,.home-controls,.dfoot,.re-report-panel .re-selected,.st-time select,.re-data-drawer summary){
  background:var(--atlas-surface);border-color:var(--atlas-line)
}
:root[data-look=night] body.space #stage-map .leaflet-tile-pane{filter:brightness(.69) saturate(.65)}
.atlas-time-rail>div{display:grid;grid-template-columns:1fr 1fr 1fr}
.atlas-time-rail>div span:nth-child(2){margin:0}
.atlas-time-rail>div span:last-child{text-align:right}
@media(max-width:600px){
  body.space .brand img.brand-lockup{width:132px}
  body.space .top .atlas-look{position:relative;z-index:1}
}
.atlas-preview-rail{
  display:grid;grid-template-columns:1fr 1fr;gap:4px 6px;padding:4px 4px 9px;
  color:#b6c8d8;font-size:11px;
}
.atlas-preview-rail i{grid-column:1/-1;position:relative;display:block;height:3px;background:var(--atlas-line)}
.atlas-preview-rail i::after{content:'';position:absolute;left:var(--mark);top:50%;width:7px;height:7px;transform:translate(-50%,-50%);border-radius:50%;background:var(--atlas-accent)}
.atlas-preview-rail small:last-child{text-align:right}
body.space .cj-obj{
  background:var(--atlas-surface-raised);border-color:var(--atlas-line);border-radius:var(--atlas-corner)
}
body.space .cj-obj b{font-size:15px;overflow-wrap:anywhere}
body.space .cj-obj small{color:#bdcbd8}
body.space #re-selected strong{font-size:16px;overflow-wrap:anywhere}
body.space #re-selected small{color:#bdcbd8}
body.space .re-replay input[type=range]{appearance:none;min-height:22px;background:none;cursor:ew-resize}
.re-replay input::-webkit-slider-runnable-track{height:4px;border-radius:4px;background:#637b8f}
.re-replay input::-webkit-slider-thumb{appearance:none;width:13px;height:13px;margin-top:-4.5px;border-radius:4px;border:1px solid #f1f5f8;background:#a9d7f0}
.re-replay input::-moz-range-track{height:4px;border-radius:4px;background:#637b8f}
.re-replay input::-moz-range-thumb{width:12px;height:12px;border-radius:4px;border:1px solid #f1f5f8;background:#a9d7f0}

/* Home portals grow from the icon into one continuous card. */
body.space .home-gates{
  left:50%;right:auto;width:max-content;max-width:calc(100vw - 24px);
  gap:12px;justify-content:center;padding:0;margin:0;
}
body.space .home-gates .atlas-dock-item{
  width:56px;height:56px;min-width:56px;min-height:56px;
  isolation:isolate;border-color:var(--atlas-line);background:var(--atlas-surface);
}
body.space .home-gates .atlas-dock-item .dock-icon{position:relative;z-index:1;width:29px;height:29px}
body.space .home-gates .atlas-dock-item .dock-card{
  top:-1px;z-index:0;width:192px;max-width:calc(100vw - 24px);min-height:118px;
  align-content:end;justify-items:center;text-align:center;padding:54px 12px 12px;
  transform:translateX(-50%) scale(.29,.46);
  transition:opacity 150ms,transform 300ms cubic-bezier(.18,.82,.22,1),visibility 150ms;
}
body.space .home-gates .atlas-dock-item:is(:hover,:focus-visible){z-index:3}
body.space .home-gates .atlas-dock-item:is(:hover,:focus-visible) .dock-card{transform:translateX(-50%) scale(1)}
.home-gates .dock-card :is(b,small){opacity:0;transition:opacity 130ms}
.home-gates .atlas-dock-item:is(:hover,:focus-visible) .dock-card :is(b,small){opacity:1;transition-delay:110ms}
body.space .atlas-settings{
  width:min(680px,100%);max-height:calc(100dvh - 28px);overflow:auto;
  background:var(--atlas-surface-raised);border:1px solid var(--atlas-line);border-radius:var(--r-md);
}
.atlas-settings #mt{font-size:20px}
.atlas-setting-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0}
.atlas-setting-card{
  border:1px solid var(--atlas-line);border-radius:var(--atlas-corner);
  padding:12px;background:var(--atlas-surface);min-width:0;
}
.atlas-setting-card h3{display:flex;align-items:center;gap:8px;margin:0 0 10px;font-size:14px}
.atlas-setting-card h3 span{display:grid;width:22px;height:22px;color:var(--atlas-accent)}
.atlas-setting-card h3 svg{width:100%;height:100%}
.atlas-setting-options{display:flex;gap:6px;flex-wrap:wrap}
.atlas-setting-card button{
  min-height:40px;border:1px solid var(--atlas-line);border-radius:var(--r-sm);
  background:transparent;color:var(--ink);padding:5px 9px;text-align:left;
}
.atlas-setting-card button[aria-pressed=true]{background:var(--atlas-selected);color:var(--atlas-accent)}
.atlas-setting-toggle{display:flex;justify-content:space-between;align-items:center;gap:8px;width:100%;margin-top:6px}
.atlas-setting-toggle span{font-size:11px}
:root[data-look=night] body.space #stage{background:#030405}
@media(max-width:600px){
  body.space .home-gates .atlas-dock-item{width:52px;height:52px;min-width:52px;min-height:52px}
  .atlas-setting-grid{grid-template-columns:minmax(0,1fr)}
}
body.space .home-gates .atlas-dock-item:is(:hover,:focus-visible) .dock-card::after{
  content:'';position:absolute;inset:51px 0 0;pointer-events:auto
}
.home-controls #command-launch-focus[hidden]{display:none}
#command-launch-focus{max-width:174px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:600px){
  .home-controls:has(#command-launch-focus:not([hidden])){max-width:calc(100vw - 16px);flex-wrap:wrap;justify-content:center}
}
.atlas-pad-name{
  display:grid;gap:2px;position:absolute;z-index:1;top:100%;left:50%;min-width:136px;max-width:180px;
  padding:6px 9px;color:#f0f6fd;background:var(--atlas-surface-raised);border:1px solid var(--atlas-line);
  border-radius:var(--atlas-corner);opacity:0;visibility:hidden;pointer-events:none;
  transform:translate(-50%,-4px);transition:opacity 160ms,transform 200ms,visibility 160ms
}
.pad-dot:hover .atlas-pad-name{opacity:1;visibility:visible;transform:translate(-50%,0)}
.pad-dot:hover{z-index:3}
.atlas-pad-name small{color:#bdcad6}
