
:root {
  --pw: 480px;
  --cy: #7fe8ff; --cy2: #2fc7ff; --gold: #ffd27a; --pink: #ff7fb8;
  --ink: #dff6ff; --dim: rgba(190, 230, 255, .55); --line: rgba(127, 232, 255, .25);
  --glass: rgba(6, 18, 34, .55); --glass2: rgba(4, 12, 24, .82);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #010208; color: var(--ink); font-family: var(--txt); font-size: 15px; -webkit-font-smoothing: antialiased; }
a { color: var(--cy); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
#c { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; touch-action: none; cursor: grab; }
#c:active { cursor: grabbing; }

/* ---------- HUD frame ---------- */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
#hud > * { pointer-events: auto; }
#hud .vignette, #hud .scan, #hud .corner, #hud .reticle { pointer-events: none; }
.vignette { position: absolute; inset: 0; background:
  radial-gradient(ellipse 120% 95% at 50% 50%, transparent 55%, rgba(0, 8, 20, .55) 80%, rgba(0, 0, 0, .92) 100%); }
.scan { position: absolute; inset: 0; opacity: .5; mix-blend-mode: overlay;
  background: repeating-linear-gradient(0deg, rgba(127, 232, 255, .05) 0 1px, transparent 1px 3px); }
.corner { position: absolute; width: 46px; height: 46px; border: 0 solid rgba(127, 232, 255, .5); }
.corner.tl { top: 14px; left: 14px; border-top-width: 2px; border-left-width: 2px; }
.corner.tr { top: 14px; right: 14px; border-top-width: 2px; border-right-width: 2px; }
.corner.bl { bottom: 14px; left: 14px; border-bottom-width: 2px; border-left-width: 2px; }
.corner.br { bottom: 14px; right: 14px; border-bottom-width: 2px; border-right-width: 2px; }
.reticle { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px; border: 1px solid rgba(127, 232, 255, .18); border-radius: 50%; }
.reticle::before, .reticle::after { content: ''; position: absolute; background: rgba(127, 232, 255, .35); }
.reticle::before { left: 50%; top: -10px; bottom: -10px; width: 1px; transform: translateX(-.5px); mask: linear-gradient(transparent 0 30%, #000 30% 38%, transparent 38% 62%, #000 62% 70%, transparent 70%); }
.reticle::after { top: 50%; left: -10px; right: -10px; height: 1px; mask: linear-gradient(90deg, transparent 0 30%, #000 30% 38%, transparent 38% 62%, #000 62% 70%, transparent 70%); }
.reticle i { position: absolute; left: 50%; top: 50%; width: 3px; height: 3px; margin: -1.5px; background: var(--cy); border-radius: 50%; }
.planet-mode .reticle { display: none; }

.brand { position: absolute; top: 26px; left: 32px; }
.brand a { display: flex; align-items: center; gap: 10px; font-family: var(--hud); font-size: 17px; letter-spacing: .18em; color: var(--ink); text-shadow: 0 0 18px rgba(127, 232, 255, .55); }
.brand a:hover { text-decoration: none; }
.brand b { color: var(--cy); font-weight: 700; }
.brand .logo { width: 34px; height: 34px; filter: drop-shadow(0 0 6px rgba(127, 232, 255, .7)); }
.brand small { display: block; margin: 4px 0 0 44px; color: var(--dim); letter-spacing: .12em; font-size: 12px; text-transform: uppercase; }

.telemetry { position: absolute; top: 24px; right: 32px; text-align: right; font-family: var(--hud); }
.telemetry div { margin-bottom: 6px; }
.telemetry span { display: block; font-size: 9px; letter-spacing: .22em; color: var(--dim); }
.telemetry b { font-size: 14px; font-weight: 500; letter-spacing: .08em; color: var(--ink); text-shadow: 0 0 10px rgba(127, 232, 255, .5); font-variant-numeric: tabular-nums;  font-family: var(--num);}
.telemetry .dim b { font-size: 11px; color: var(--dim); }

#planetNav { position: absolute; left: 32px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 4px; }
#planetNav button { display: grid; grid-template-columns: 14px 1fr auto; align-items: center; gap: 10px; min-width: 168px; padding: 7px 12px; background: linear-gradient(90deg, rgba(10, 30, 50, .55), rgba(10, 30, 50, .1)); border: 1px solid transparent; border-left: 2px solid var(--line); cursor: pointer; text-align: left; font-family: var(--hud); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; transition: .2s; }
#planetNav button i { font-style: normal; font-size: 9px; color: var(--dim); letter-spacing: .1em; }
#planetNav button:hover, #planetNav button.on { border-color: var(--line); border-left-color: var(--cy); background: linear-gradient(90deg, rgba(20, 80, 120, .5), rgba(20, 80, 120, .05)); box-shadow: 0 0 20px rgba(47, 199, 255, .15); }
#planetNav .sw { width: 10px; height: 10px; border-radius: 50%; background: var(--pc); box-shadow: 0 0 10px var(--pc); }
.planet-mode #planetNav { right: auto; top: auto; bottom: 74px; transform: none; left: 32px; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: calc(100vw - var(--pw) - 64px); }
.planet-mode #planetNav button { min-width: 0; flex: none; grid-template-columns: 10px auto; padding: 6px 10px; }
.planet-mode #planetNav button i { display: none; }

#timebar { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 4px; padding: 6px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px); }
#timebar .speeds { display: flex; gap: 2px; }
#timebar button { background: transparent; border: 1px solid transparent; padding: 6px 9px; font-family: var(--hud); font-size: 10px; letter-spacing: .12em; color: var(--dim); cursor: pointer; white-space: nowrap; }
#timebar button:hover { color: var(--ink); border-color: var(--line); }
#timebar button.on { color: #001018; background: var(--cy); box-shadow: 0 0 14px rgba(127, 232, 255, .6); }
#timebar .now { color: var(--gold); }
#timebar .sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.planet-mode #timebar { left: 32px; transform: none; max-width: calc(100vw - var(--pw) - 64px); overflow-x: auto; scrollbar-width: none; }

.legend { position: absolute; bottom: 24px; right: 32px; max-width: 330px; font-size: 12.5px; color: var(--dim); text-align: right; line-height: 1.5; }
.legend .lg { display: inline-block; width: 18px; height: 2px; vertical-align: middle; margin-right: 4px; }
.legend .orbit { background: linear-gradient(90deg, #e0643c, #4f9cff, #d9b38c); }
.legend .belt { height: 4px; background: radial-gradient(circle, #bbb 1px, transparent 1.5px) 0 0/4px 4px; }
.legend .dim { opacity: .75; font-size: 11.5px; }
.legend .links { margin-top: 4px; font-family: var(--hud); font-size: 10px; letter-spacing: .12em; }

.pm-only { display: none !important; }
.planet-mode .pm-only { display: inline-block !important; }
.planet-mode .sys-only { display: none !important; }

/* ---------- Labels ---------- */
#labels { position: fixed; inset: 0; pointer-events: none; z-index: 4; overflow: hidden; }
.lab { position: absolute; left: 0; top: 0; white-space: nowrap; will-change: transform; }
.lab .pip { position: absolute; left: -3px; top: -3px; width: 6px; height: 6px; border-radius: 50%; }
.lab .t { position: absolute; left: 10px; top: -9px; display: flex; flex-direction: column; line-height: 1.1; }
.lab b { font-family: var(--hud); font-weight: 500; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: rgba(210, 240, 255, .85); }
.lab i { font-style: normal; font-size: 11px; color: rgba(170, 215, 240, .55); }
.lab.planet b { font-size: 12px; font-weight: 700; color: var(--ink); text-shadow: 0 0 10px var(--lc, var(--cy)); }
.lab.planet .t { padding-left: 8px; border-left: 1px solid var(--lc, var(--cy)); left: 14px; top: -14px; }
.lab.planet .t::before { content: ''; position: absolute; left: -14px; top: 13px; width: 12px; height: 1px; background: var(--lc, var(--cy)); opacity: .7; }
.lab.planet i { opacity: 0; transition: opacity .2s; }
.lab.planet.hot i, .lab.planet:hover i { opacity: 1; }
.lab.sun b { color: var(--gold); font-size: 12px; font-weight: 700; }
.lab.sun .t { left: 22px; top: 12px; }
.lab.minor b { color: rgba(220, 230, 240, .7); font-size: 9.5px; }
.lab.minor i { font-size: 10px; }
.lab.star b { font-size: 9px; color: rgba(200, 220, 255, .55); letter-spacing: .12em; }
.lab.star i { font-size: 9.5px; opacity: 0; transition: .2s; }
.lab.dso b { font-size: 9px; color: rgba(230, 190, 255, .6); }
.lab.dso i { font-size: 9.5px; color: rgba(220, 190, 255, .45); }
.lab.grid b { font-size: 8.5px; color: rgba(90, 170, 210, .45); letter-spacing: .1em; }
.lab.grid i { display: none; }
.lab.grid .t { left: 4px; top: 2px; }
.lab.region b { font-size: 9.5px; color: rgba(160, 210, 230, .55); letter-spacing: .25em; }
.lab.region i { font-size: 10px; color: rgba(150, 200, 220, .4); }
.lab.region .t { left: -60px; }
.lab.pole b { font-size: 14px; font-weight: 700; color: var(--cy); text-shadow: 0 0 8px var(--cy); }
.lab.pole i { font-size: 10px; }
.lab.pole .t { left: -6px; top: -10px; }
.lab.clickable { pointer-events: auto; cursor: pointer; }
.lab.clickable .t { pointer-events: auto; }
.lab.hot b { color: #fff !important; }
.lab.hot .t { filter: drop-shadow(0 0 6px var(--cy)); }
.lab.hot.minor i, .lab.hot.star i { opacity: 1; }

/* ---------- Planet panel ---------- */
#panel { position: fixed; top: 0; right: 0; bottom: 0; width: var(--pw); z-index: 6; overflow-y: auto; overscroll-behavior: contain;
  background: linear-gradient(90deg, rgba(2, 8, 18, 0), rgba(2, 8, 18, .78) 8%, rgba(2, 8, 18, .9));
  transform: translateX(105%); transition: transform .6s cubic-bezier(.2, .8, .2, 1); scrollbar-width: thin; scrollbar-color: rgba(127, 232, 255, .3) transparent; }
.planet-mode #panel { transform: none; }
#panel .inner { padding: 92px 36px 40px 44px; }
#sheetToggle { display: none; }
.p-head .kicker { font-family: var(--hud); font-size: 9.5px; letter-spacing: .24em; color: var(--dim); }
.p-head h1 { margin: 6px 0 4px; font-family: var(--hud); font-size: clamp(30px, 5.4vh, 46px); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #fff; text-shadow: 0 0 26px var(--pc), 0 0 2px var(--pc); }
.std { font-size: 15px; color: var(--ink); }
.badge { display: inline-block; padding: 2px 8px; margin-right: 6px; border: 1px solid var(--cy); color: var(--cy); font-family: var(--hud); font-size: 11px; letter-spacing: .14em; box-shadow: inset 0 0 10px rgba(127, 232, 255, .2); }
.lbl { font-family: var(--hud); font-size: 9.5px; letter-spacing: .22em; color: var(--dim); text-transform: uppercase; }
.gold { color: var(--gold) !important; }
.cy { color: var(--cy); }
.muted { color: var(--dim); }

section { margin-top: 20px; }
.clock { padding: 18px 18px 14px; border: 1px solid var(--line); background: linear-gradient(135deg, rgba(20, 70, 110, .35), rgba(6, 18, 34, .35)); clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px); }
.clock .big { font-family: var(--num); font-size: 44px; font-weight: 500; letter-spacing: .08em; color: #fff; text-shadow: 0 0 22px rgba(127, 232, 255, .8); font-variant-numeric: tabular-nums; margin: 4px 0; }
.clock .sub { font-size: 13.5px; color: var(--dim); }
.clock .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.clock .row2 b { display: block; font-family: var(--num); font-size: 15px; font-weight: 500; letter-spacing: .06em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.clock .hover { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 13.5px; color: var(--dim); min-height: 40px; }
.clock .hover b { color: var(--ink); font-weight: 600; }

.card { padding: 16px 18px; border: 1px solid rgba(127, 232, 255, .14); background: rgba(6, 18, 34, .45); }
.card h3 { margin: 6px 0; font-family: var(--hud); font-size: 15px; font-weight: 500; letter-spacing: .08em; color: #fff; }
.card p { margin: 8px 0 0; line-height: 1.5; font-size: 15px; color: rgba(220, 240, 255, .88); }
.pmcard { border-color: rgba(255, 210, 122, .35); background: linear-gradient(135deg, rgba(80, 60, 20, .25), rgba(6, 18, 34, .35)); }
.coords { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.coords span { font-family: var(--hud); font-size: 10px; letter-spacing: .1em; padding: 3px 8px; border: 1px solid rgba(255, 210, 122, .3); color: var(--gold); }
.cap { font-size: 13px !important; color: var(--dim) !important; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: rgba(127, 232, 255, .12); border: 1px solid rgba(127, 232, 255, .14); }
.stat { padding: 11px 14px; background: rgba(4, 12, 24, .85); }
.stat b { display: block; margin-top: 3px; font-family: var(--num); font-size: 14px; font-weight: 500; letter-spacing: .04em; color: #fff; font-variant-numeric: tabular-nums; }
.stat i { display: block; font-style: normal; font-size: 12.5px; color: var(--dim); }
.stat.live b { color: var(--cy); }

.diagram { width: 100%; height: auto; display: block; margin-top: 8px; font-family: var(--hud); }
.diagram text { font-size: 8.5px; letter-spacing: .14em; fill: rgba(190, 230, 255, .6); }
.diagram text.hi { fill: var(--cy); font-size: 11px; font-weight: 700; }
.diagram text.gold { fill: var(--gold); font-size: 11px; }
.diagram .axis { stroke: rgba(127, 232, 255, .22); stroke-width: 1; }
.diagram .axis.dash { stroke-dasharray: 3 4; }
.diagram .ring { fill: none; stroke: rgba(127, 232, 255, .1); }
.diagram .orbit-e { fill: none; stroke: #6fb4ff; stroke-width: 1; stroke-dasharray: 3 3; opacity: .7; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; vertical-align: middle; }
.dot.e { background: #6fb4ff; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { padding: 4px 10px; border: 1px solid var(--line); font-family: var(--hud); font-size: 10.5px; letter-spacing: .1em; color: var(--ink); background: rgba(20, 70, 110, .2); }

.zones { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.zones th { text-align: left; font-family: var(--hud); font-size: 8.5px; letter-spacing: .18em; color: var(--dim); font-weight: 500; padding: 6px 6px; border-bottom: 1px solid var(--line); }
.zones td { padding: 6px; border-bottom: 1px solid rgba(127, 232, 255, .07); }
.zones td:first-child { font-family: var(--hud); font-size: 11px; letter-spacing: .06em; color: var(--cy); }
.zones td:last-child { font-family: var(--num); font-size: 12px; text-align: right; color: #fff; }
.zones tr { cursor: pointer; transition: background .15s; }
.zones tbody tr:hover, .zones tr.sel { background: rgba(127, 232, 255, .12); }
.zones tr.sel td:first-child { text-shadow: 0 0 8px var(--cy); }
.zones tr.pm td:first-child { color: var(--gold); }
.fine { margin-top: 22px; font-size: 12px; color: var(--dim); line-height: 1.5; }

#backBtn { position: fixed; top: 92px; left: 32px; z-index: 7; padding: 8px 14px; background: var(--glass); border: 1px solid var(--line); font-family: var(--hud); font-size: 11px; letter-spacing: .18em; color: var(--cy); cursor: pointer; }
#backBtn:hover { background: rgba(20, 80, 120, .5); box-shadow: 0 0 18px rgba(127, 232, 255, .25); }

#card { position: fixed; left: 50%; bottom: 84px; z-index: 8; width: min(420px, calc(100vw - 32px)); padding: 18px 20px; background: var(--glass2); border: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: .3s; }
#card.open { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
#card h3 { margin: 4px 0 6px; font-family: var(--hud); font-size: 18px; letter-spacing: .12em; }
#card p { margin: 6px 0; line-height: 1.5; }
#card .x { position: absolute; top: 8px; right: 10px; background: none; border: 0; font-size: 22px; color: var(--dim); cursor: pointer; }

#warp { position: fixed; inset: 0; z-index: 9; pointer-events: none; opacity: 0; transition: opacity .45s;
  background: radial-gradient(circle at 50% 50%, rgba(160, 240, 255, .35), rgba(20, 60, 100, .15) 40%, rgba(0, 0, 0, .9) 75%); }
#warp.on { opacity: 1; transition: opacity .25s; }

#boot { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 60%, rgba(1,2,8,.55), rgba(1,2,8,.96) 70%); transition: opacity 1s; }
#boot.done { opacity: 0; pointer-events: none; }
#boot .box { width: min(560px, 90vw); font-family: var(--hud); }
#boot .title { font-size: 20px; letter-spacing: .3em; color: var(--cy); text-shadow: 0 0 20px rgba(127, 232, 255, .7); margin-bottom: 18px; }
#boot .lines { min-height: 150px; font-size: 11px; letter-spacing: .12em; line-height: 2; color: rgba(190, 235, 255, .8); }
#boot .sub { margin: -10px 0 18px; font-family: var(--txt); font-size: 15px; letter-spacing: .06em; color: var(--dim); }
#boot .hint { margin-top: 16px; font-family: var(--txt); font-size: 13px; letter-spacing: .04em; color: var(--dim); opacity: 0; transition: opacity .6s .3s; }
#boot.ready .hint { opacity: 1; }
#boot .enter { margin-top: 22px; padding: 14px 30px; background: rgba(127, 232, 255, .08); border: 1px solid var(--cy); color: var(--cy); font-family: var(--hud); font-size: 15px; font-weight: 600; letter-spacing: .26em; cursor: pointer;
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px); box-shadow: inset 0 0 24px rgba(127, 232, 255, .15); animation: pulse 2.4s ease-in-out infinite; }
#boot .enter:hover, #boot .enter:focus-visible { background: var(--cy); color: #001018; outline: none; }
#boot .enter[hidden] { display: none; }
@keyframes pulse { 0%, 100% { box-shadow: inset 0 0 24px rgba(127,232,255,.15), 0 0 0 rgba(127,232,255,0); } 50% { box-shadow: inset 0 0 24px rgba(127,232,255,.25), 0 0 26px rgba(127,232,255,.35); } }
@media (prefers-reduced-motion: reduce) { #boot .enter { animation: none; } }

.nogl { display: none; position: fixed; inset: 0; z-index: 30; padding: 15vh 10vw; background: #010208; font-size: 18px; }
.nogl h1 { font-family: var(--hud); letter-spacing: .15em; color: var(--cy); }
.no-webgl .nogl, .nogl.show { display: block; }

/* ---------- Small screens ---------- */
@media (max-width: 759px), (max-width: 900px) and (orientation: portrait) {
  .brand { top: 16px; left: 18px; }
  .brand a { font-size: 12px; }
  .brand small { display: none; }
  .telemetry { top: 44px; right: auto; left: 18px; text-align: left; }
  .telemetry div:not(:nth-child(2)) { display: none; }
  .telemetry b { font-size: 11px; }
  .corner { display: none; }
  #planetNav { left: 0; right: 0; top: auto; bottom: 70px; transform: none; flex-direction: row; overflow-x: auto; padding: 0 12px; gap: 6px; scrollbar-width: none; }
  #planetNav button { min-width: 0; grid-template-columns: 10px auto; padding: 7px 10px; flex: none; }
  #planetNav button i { display: none; }
  .planet-mode #planetNav { display: none; }
  #timebar { bottom: 14px; max-width: calc(100vw - 20px); overflow-x: auto; }
  #timebar button { padding: 6px 7px; font-size: 9px; }
  #labelBtn { display: none; }
  .legend { display: none; }
  .planet-mode #timebar { left: 50%; transform: translateX(-50%); bottom: auto; top: 52px; }
  #backBtn { top: 98px; left: 12px; font-size: 10px; }
  #panel { top: auto; width: 100%; height: 58vh; background: linear-gradient(180deg, rgba(2, 8, 18, .75), rgba(2, 8, 18, .95) 10%); border-top: 1px solid var(--line); transform: translateY(105%); transition: transform .45s cubic-bezier(.2, .8, .2, 1), height .35s; }
  .planet-mode #panel { transform: none; }
  .sheet-min #panel { height: 30vh; }
  #panel .inner { padding: 8px 18px 40px; }
  #sheetToggle { display: block; position: sticky; top: 0; width: 100%; height: 26px; background: none; border: 0; cursor: pointer; z-index: 2; }
  #sheetToggle i { display: block; width: 46px; height: 4px; margin: 0 auto; border-radius: 2px; background: var(--line); }
  .p-head h1 { font-size: 32px; }
  .clock .big { font-size: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  #panel, #card, #warp, #boot { transition: none; }
}

/* Telemetry moves to the left column in planet view */
.planet-mode .telemetry { right: auto; left: 32px; top: 140px; text-align: left; }
.planet-mode .telemetry .dim { display: none; }
@media (max-width: 759px), (max-width: 900px) and (orientation: portrait) { .planet-mode .telemetry { display: none; } }

/* Earth: locate + satellites */
.locate { border-color: rgba(127, 232, 255, .35); }
.searchbox { display: flex; margin-top: 10px; border: 1px solid var(--line); background: rgba(0, 10, 22, .7); }
.searchbox input { flex: 1; min-width: 0; padding: 10px 12px; background: transparent; border: 0; outline: none; color: #fff; font: 500 15px var(--txt); }
.searchbox input::placeholder { color: rgba(170, 215, 240, .45); }
.searchbox:focus-within { border-color: var(--cy); box-shadow: 0 0 14px rgba(127, 232, 255, .25); }
.searchbox button { width: 44px; background: rgba(127, 232, 255, .12); border: 0; border-left: 1px solid var(--line); color: var(--cy); font-size: 20px; cursor: pointer; }
.results { display: flex; flex-direction: column; }
.results button { text-align: left; padding: 8px 10px; background: rgba(6, 18, 34, .8); border: 0; border-bottom: 1px solid rgba(127, 232, 255, .08); cursor: pointer; font-size: 14.5px; color: var(--ink); }
.results button:hover, .results button:focus { background: rgba(127, 232, 255, .14); outline: none; }
.results button i { font-style: normal; color: var(--dim); font-size: 13px; }
.results .none { padding: 8px 10px; color: var(--dim); font-size: 14px; }
#locOut:not(:empty) { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.loc-name { font-family: var(--hud); font-size: 18px; letter-spacing: .1em; color: #fff; text-shadow: 0 0 12px rgba(255, 210, 122, .6); }
.loc-sub { color: var(--dim); font-size: 14px; }
.loc-coords { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.loc-coords span { font-family: var(--hud); font-size: 10px; letter-spacing: .08em; padding: 3px 8px; border: 1px solid rgba(255, 210, 122, .3); color: var(--gold); }
.loc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 10px; background: rgba(127, 232, 255, .12); }
.loc-grid > div { padding: 9px 11px; background: rgba(4, 12, 24, .9); }
.loc-grid b { display: block; font-family: var(--num); font-size: 17px; font-weight: 500; color: #fff; font-variant-numeric: tabular-nums; margin-top: 2px; }
.loc-grid b.sm { font-family: var(--txt); font-size: 14px; font-weight: 600; }
.loc-grid i { display: block; font-style: normal; font-size: 12px; color: var(--dim); }
.others { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.others td { padding: 4px 4px; border-bottom: 1px solid rgba(127, 232, 255, .07); }
.others td:nth-child(2) { font-family: var(--hud); font-size: 10.5px; color: var(--cy); }
.others td:last-child { text-align: right; font-family: var(--num); font-size: 11.5px; }
.others .sw, .satlist .sw { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--pc); margin-right: 7px; box-shadow: 0 0 6px var(--pc); }
.lab.pin b { color: var(--gold); font-size: 11px; font-weight: 700; text-shadow: 0 0 8px rgba(255, 210, 122, .8); }
.lab.pin i { font-size: 10px; }
.lab.sat b { font-size: 9.5px; color: #ffe9a8; }
.lab.sat i { font-size: 9.5px; color: rgba(255, 233, 168, .6); }
.lab.craft b { font-size: 9.5px; color: #b6ffcf; letter-spacing: .14em; }
.lab.craft i { font-size: 9.5px; color: rgba(182, 255, 207, .55); }
.satlist { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 13.5px; }
.satlist td { padding: 5px 4px; border-bottom: 1px solid rgba(127, 232, 255, .07); }
.satlist td:last-child { text-align: right; color: var(--dim); font-variant-numeric: tabular-nums; }
.satlist tr.trk { cursor: pointer; }
.satlist tr.trk:hover { background: rgba(127, 232, 255, .1); }
.issbox { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 10px; background: rgba(127, 232, 255, .12); }
.issbox > div { padding: 8px 10px; background: rgba(4, 12, 24, .9); }
.issbox b { display: block; font-family: var(--num); font-size: 13px; font-weight: 500; color: #fff; font-variant-numeric: tabular-nums; }
.btnrow { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.btnrow button, .findbtn { padding: 7px 12px; background: rgba(127, 232, 255, .1); border: 1px solid var(--line); color: var(--cy); font-family: var(--hud); font-size: 10px; letter-spacing: .14em; cursor: pointer; }
.btnrow button:hover, .findbtn:hover { background: rgba(127, 232, 255, .22); }
.btnrow button.on { background: var(--cy); color: #001018; }
.quick { position: absolute; top: 92px; left: 32px; display: flex; gap: 6px; }
.findbtn { position: static; }
.planet-mode .quick { display: none; }
@media (max-width: 759px), (max-width: 900px) and (orientation: portrait) { .quick { top: auto; bottom: 118px; left: 12px; } }

/* Short screens (zoomed-in laptops, small windows): compact HUD */
@media (max-height: 820px) and (min-width: 760px) { .planet-mode .telemetry { display: none; } }
@media (max-height: 700px) and (min-width: 760px) {
  .brand { top: 16px; } .brand small { display: none; }
  .telemetry { top: 14px; } .telemetry div:not(:nth-child(2)) { display: none; }
  .legend { display: none; }
  .corner { width: 30px; height: 30px; }
  #planetNav button { padding: 4px 10px; min-width: 140px; }
  .quick { top: 58px; }
  #backBtn { top: 58px; }
  #panel .inner { padding-top: 60px; }
  #timebar { bottom: 12px; }
  .planet-mode #planetNav { bottom: 58px; }
  #timebar button { padding: 5px 7px; }
}
@media (max-height: 520px) and (min-width: 760px) {
  #planetNav { display: none; }
  .planet-mode #planetNav { display: flex; }
}

/* Space search */
#spaceSearch { position: fixed; inset: 0; z-index: 12; display: none; align-items: flex-start; justify-content: center; padding-top: 14vh; background: rgba(0, 4, 12, .55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
#spaceSearch.open { display: flex; }
#spaceSearch .sbox { width: min(560px, calc(100vw - 32px)); padding: 18px; background: var(--glass2); border: 1px solid var(--line); box-shadow: 0 0 40px rgba(47, 199, 255, .15); }
#spaceSearch .searchbox input { font-size: 17px; padding: 12px 14px; }
#spaceSearch .results { max-height: 50vh; overflow-y: auto; margin-top: 6px; }
#spaceSearch .results button { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; }
#spaceSearch .results .hint { padding: 8px 4px 4px; font-family: var(--hud); font-size: 9.5px; letter-spacing: .22em; color: var(--dim); text-transform: uppercase; }

.booting #labels, .booting #hud { opacity: 0; }
#labels, #hud { transition: opacity .8s; }

/* Viewing modes chooser */
#modes { position: fixed; inset: 0; z-index: 13; display: none; align-items: center; justify-content: center; background: rgba(0, 4, 12, .6); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
#modes.open { display: flex; }
#modes .sbox { width: min(520px, calc(100vw - 32px)); padding: 20px; background: var(--glass2); border: 1px solid var(--line); }
#modes .mode { display: block; width: 100%; text-align: left; margin-top: 10px; padding: 12px 14px; background: rgba(127, 232, 255, .06); border: 1px solid var(--line); color: var(--ink); cursor: pointer; }
#modes .mode:hover:not(:disabled) { background: rgba(127, 232, 255, .16); border-color: var(--cy); }
#modes .mode:disabled { opacity: .5; cursor: not-allowed; }
#modes .mode b { display: block; font-family: var(--hud); font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: #fff; }
#modes .mode i { display: block; font-style: normal; font-size: 13.5px; color: var(--dim); margin-top: 3px; line-height: 1.4; }
#boot .gatemodes { display: block; margin-top: 12px; background: none; border: 0; color: var(--dim); font-family: var(--txt); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; opacity: 0; transition: opacity .6s .3s; }
#boot.ready .gatemodes { opacity: 1; }
#boot .gatemodes:hover { color: var(--cy); }
/* While a 3D mode is active, hide the flat HUD */
#immExit, #immReticle { display: none; }
.immersive #hud, .immersive #labels, .immersive #panel, .immersive #backBtn, .immersive #card { display: none !important; }
.immersive #immExit { display: block; position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 30; padding: 8px 16px; background: rgba(0, 8, 20, .7); border: 1px solid var(--line); color: var(--cy); font-family: var(--hud); font-size: 11px; letter-spacing: .18em; cursor: pointer; }
.imm-cardboard #immReticle { display: block; position: fixed; inset: 0; pointer-events: none; z-index: 29; }
.imm-cardboard #immReticle::before, .imm-cardboard #immReticle::after { content: ''; position: absolute; top: 50%; width: 10px; height: 10px; margin: -7px 0 0 -7px; border: 2px solid rgba(127, 232, 255, .85); border-radius: 50%; }
.imm-cardboard #immReticle::before { left: 25%; }
.imm-cardboard #immReticle::after { left: 75%; }
