:root {
  --bg: #000;
  --panel: rgba(8, 11, 16, 0.80);
  --panel-solid: #0a0d13;
  --line: rgba(150, 170, 200, 0.16);
  --line-2: rgba(150, 170, 200, 0.30);
  --text: #e3e9f3;
  --muted: #8b95a8;
  --sun: #ffb547;
  --sun-dim: #8a6a32;
  --earth: #5fb4ff;
  --teal: #46e0c8;
  --bad: #ff6464;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "IBM Plex Sans Condensed", "Arial Narrow", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text); font-family: var(--sans); }
button, select, input { font: inherit; color: inherit; }
canvas#gl, canvas#overlay { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; }
canvas#gl { touch-action: none; cursor: grab; }
canvas#gl:active { cursor: grabbing; }
canvas#overlay { pointer-events: none; }
#fade { position: fixed; inset: 0; background: #000; opacity: 0; pointer-events: none; transition: opacity .35s ease; z-index: 30; }
#fade.on { opacity: 1; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 11px; line-height: 1.35; }
em { font-style: normal; color: var(--muted); }

body.mode-overview .surface-only { display: none !important; }
body.mode-surface .overview-only { display: none !important; }

/* ---------- top bar ---------- */
#topbar {
  position: fixed; top: 0; left: 0; right: 0; height: 52px; display: flex; align-items: center; gap: 16px;
  padding: 0 16px; z-index: 20;
  background: linear-gradient(to bottom, rgba(0,0,0,.85), rgba(0,0,0,0));
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand svg { width: 28px; height: 28px; }
.brand .title { font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: 14px; }
.brand .sub { font-size: 11px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
#topbar nav { margin-left: auto; display: flex; gap: 6px; }
#topbar nav button, .ghost {
  background: rgba(10,14,20,.6); border: 1px solid var(--line); padding: 6px 12px; border-radius: 3px; cursor: pointer;
  font-size: 13px; letter-spacing: .02em;
}
#topbar nav button:hover, .ghost:hover { border-color: var(--line-2); background: rgba(20,26,36,.8); }
#topbar nav button.active { border-color: var(--teal); color: var(--teal); }

/* ---------- overview site list ---------- */
#sitelist {
  position: fixed; left: 16px; top: 68px; width: 330px; max-height: calc(100vh - 110px); overflow: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 14px 14px 10px; z-index: 10;
  backdrop-filter: blur(6px);
}
#sitelist h2 { margin: 0 0 4px; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); }
#sites { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 6px; }
#sites li button {
  width: 100%; text-align: left; background: rgba(255,255,255,.02); border: 1px solid var(--line); border-radius: 3px;
  padding: 8px 10px; cursor: pointer; display: grid; grid-template-columns: 1fr auto; gap: 2px 8px;
}
#sites li button:hover { border-color: var(--teal); background: rgba(70,224,200,.06); }
#sites .nm { font-weight: 600; font-size: 14px; }
#sites .rf { font-family: var(--mono); font-size: 11px; color: var(--muted); }
#sites .st { grid-column: 1 / -1; font-family: var(--mono); font-size: 11px; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; }
#sites .alt { grid-column: 1 / -1; font-size: 11px; color: var(--muted); }
#sites .alt b { color: var(--teal); font-weight: 600; }
#sites .st b { color: var(--text); font-weight: 500; }
#sites .st .s b { color: var(--sun); }
#sites .st .e b { color: var(--earth); }

#pins { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
.pin {
  position: absolute; transform: translate(-50%, -100%); pointer-events: auto; cursor: pointer; white-space: nowrap;
  font-size: 12px; font-weight: 600; letter-spacing: .03em; padding: 3px 7px; border-radius: 2px;
  background: rgba(5,8,12,.82); border: 1px solid var(--teal); color: var(--text);
}
.pin:hover { background: var(--teal); color: #001; }

/* ---------- HUD ---------- */
#hud {
  position: fixed; left: 16px; top: 64px; width: 300px; z-index: 10; display: grid; gap: 8px;
}
#hud > div { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 10px 12px; backdrop-filter: blur(6px); }
.site-name { font-size: 18px; font-weight: 700; letter-spacing: .02em; }
.site-name .ref { font-family: var(--mono); font-size: 11px; color: var(--muted); font-weight: 400; margin-left: 6px; }
.coords { font-family: var(--mono); font-size: 11px; color: var(--muted); margin: 2px 0 8px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line-2); border-radius: 3px; overflow: hidden; margin-bottom: 6px; }
.seg button { background: transparent; border: 0; padding: 5px 6px; font-size: 12px; cursor: pointer; color: var(--muted); }
.seg button + button { border-left: 1px solid var(--line-2); }
.seg button.on { background: rgba(70,224,200,.14); color: var(--teal); }
.seg button:disabled { opacity: .35; cursor: not-allowed; }
.hud-time { font-family: var(--mono); font-size: 15px; letter-spacing: .02em; padding: 8px 12px !important; }
.hud-block .hb-head { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .14em; }
.hud-block .dot { width: 9px; height: 9px; border-radius: 50%; }
.hud-block.sun .dot { background: var(--sun); box-shadow: 0 0 8px var(--sun); }
.hud-block.earth .dot { background: var(--earth); box-shadow: 0 0 8px var(--earth); }
.chip { margin-left: auto; font-size: 11px; letter-spacing: .08em; padding: 2px 7px; border-radius: 2px; text-transform: uppercase; border: 1px solid var(--line-2); }
.chip.gen { background: var(--sun); color: #1b1200; border-color: var(--sun); }
.chip.part { background: var(--sun-dim); color: #fff3dd; border-color: var(--sun-dim); }
.chip.dark { background: transparent; color: var(--bad); border-color: var(--bad); }
.chip.link { background: var(--earth); color: #00101f; border-color: var(--earth); }
.chip.nolink { background: transparent; color: var(--bad); border-color: var(--bad); }
.hb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; margin: 8px 0 6px; }
.hb-grid label { display: block; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.hb-grid b { font-family: var(--mono); font-weight: 500; font-size: 15px; }
.countdown { font-family: var(--mono); font-size: 13px; padding-top: 6px; border-top: 1px solid var(--line); }
.hud-block.sun .countdown b { color: var(--sun); font-weight: 600; }
.hud-block.earth .countdown b { color: var(--earth); font-weight: 600; }

/* ---------- view tools ---------- */
#viewtools {
  position: fixed; right: 16px; top: 64px; width: 240px; z-index: 10; display: grid; gap: 6px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 10px 12px; backdrop-filter: blur(6px);
}
.vt-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 4px; }
.vt-row button { background: transparent; border: 1px solid var(--line-2); border-radius: 3px; padding: 5px 4px; cursor: pointer; font-size: 12px; }
.sunbtn { color: var(--sun); } .sunbtn:hover { background: rgba(255,181,71,.12); }
.earthbtn { color: var(--earth); } .earthbtn:hover { background: rgba(95,180,255,.12); }
.tog { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; cursor: pointer; }
.tog input { accent-color: var(--teal); margin-top: 3px; }
.tog em { display: block; font-size: 11px; }
.vt-hint { margin-top: 4px; }

/* ---------- dock ---------- */
#dock {
  position: fixed; left: 16px; right: 16px; bottom: 26px; z-index: 10;
  background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 8px 12px 6px; backdrop-filter: blur(6px);
}
.dock-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.play { width: 34px; height: 30px; border: 1px solid var(--teal); color: var(--teal); background: transparent; border-radius: 3px; cursor: pointer; font-size: 13px; }
.play:hover { background: rgba(70,224,200,.12); }
#dock select, #dock input[type=datetime-local] {
  background: #0d1118; border: 1px solid var(--line-2); border-radius: 3px; padding: 4px 6px; font-size: 12px; font-family: var(--mono);
  color-scheme: dark;
}
.now { font-family: var(--mono); font-size: 14px; min-width: 170px; }
#scrub { flex: 1; min-width: 160px; accent-color: var(--teal); }
.mission { display: flex; gap: 10px; font-size: 12px; color: var(--muted); }
.mission label { display: flex; align-items: center; gap: 6px; }
canvas#timeline { width: 100%; height: 66px; display: block; margin-top: 6px; cursor: crosshair; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); margin-top: 2px; }
.legend i { display: inline-block; width: 10px; height: 10px; margin-right: 5px; vertical-align: -1px; border-radius: 1px; }

#disclaimer {
  position: fixed; bottom: 4px; left: 50%; transform: translateX(-50%); text-align: center; font-size: 11px; color: var(--muted);
  z-index: 10; pointer-events: none; background: rgba(0,0,0,.6); padding: 1px 10px; border-radius: 2px; white-space: nowrap;
}
#loading {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 40; font-family: var(--mono); font-size: 13px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--teal); display: none;
}
#loading.on { display: block; }

/* ---------- drawer panel ---------- */
#panel {
  position: fixed; top: 56px; right: 0; bottom: 0; width: min(760px, 100vw); z-index: 25;
  background: rgba(6, 8, 12, .96); border-left: 1px solid var(--line-2); padding: 18px 22px 40px; overflow: auto;
  transform: translateX(100%); transition: transform .25s ease;
}
#panel.open { transform: none; }
#panel .close { position: absolute; top: 8px; right: 12px; background: none; border: 0; font-size: 26px; cursor: pointer; color: var(--muted); }
#panel h2 { margin: 0 0 4px; font-size: 18px; letter-spacing: .04em; }
#panel h3 { margin: 22px 0 8px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--teal); }
#panel p, #panel li { font-size: 14px; line-height: 1.5; color: #c9d2e0; }
#panel a { color: var(--teal); }
.tw { overflow-x: auto; }
table.t { border-collapse: collapse; width: 100%; font-size: 13px; }
table.t th, table.t td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
table.t th:first-child, table.t td:first-child { text-align: left; }
table.t th { font-weight: 600; color: var(--muted); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
table.t td { font-family: var(--mono); }
table.t td.best { color: #001; background: var(--teal); font-weight: 600; }
table.t tr.sub td { color: var(--muted); font-size: 12px; }
.pick { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.pick label { border: 1px solid var(--line-2); border-radius: 3px; padding: 4px 8px; font-size: 13px; cursor: pointer; display: flex; gap: 6px; align-items: center; }
.pick input { accent-color: var(--teal); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.row select, .row input { background: #0d1118; border: 1px solid var(--line-2); border-radius: 3px; padding: 4px 6px; color-scheme: dark; font-family: var(--mono); font-size: 12px; }
.row input[type=number] { width: 70px; }
.btn { background: transparent; border: 1px solid var(--teal); color: var(--teal); border-radius: 3px; padding: 3px 9px; cursor: pointer; font-size: 12px; }
.btn:hover { background: rgba(70,224,200,.12); }
.callout { border-left: 2px solid var(--teal); padding: 6px 12px; background: rgba(70,224,200,.05); margin: 10px 0; }
.callout.warn { border-color: var(--sun); background: rgba(255,181,71,.06); }
.big { font-family: var(--mono); font-size: 28px; color: var(--teal); }

@media (max-width: 900px) {
  #hud { width: calc(100vw - 32px); top: 60px; grid-template-columns: 1fr 1fr; }
  #hud .hud-site, #hud .hud-time { grid-column: 1 / -1; }
  #viewtools { display: none; }
  .mission { width: 100%; }
  #sitelist { width: calc(100vw - 32px); max-height: 46vh; top: auto; bottom: 34px; }
  .brand .sub { display: none; }
  #topbar nav button { padding: 5px 7px; font-size: 12px; }
}

/* ---------- team merge: the answer panel, and a calm default (his full HUD is one "Details" click away) ---------- */
#hud { width: 372px; max-height: calc(100vh - 250px); overflow: auto; }
#more { position: fixed; right: 16px; top: 64px; z-index: 30; }
#viewtools { top: 104px; } /* always under the Details button, open or closed */
html.min .hud-time, html.min .hb-grid, html.min .coords, html.min #h-variant-note, html.min .tog, html.min .vt-hint, html.min #disclaimer, html.min .legend { display: none !important; }
html.min #hud .hud-block { padding: 8px 12px; }
html.min #viewtools { background: none; border: 0; padding: 0; width: 240px; }
html.embed #verdict, html.embed #topbar, html.embed .hud-site, html.embed .mission, html.embed #speed { display: none !important; }
html.embed #hud { left: 10px; right: 96px; top: 10px; width: auto; display: flex; flex-wrap: wrap; gap: 6px; max-height: none; }
html.embed .hud-block { flex: 0 1 250px; } html.embed #more { top: 10px; right: 10px; } html.embed #viewtools { display: none; }
html.embed #dock { left: 10px; right: 10px; bottom: 10px; }
#lang, .navlink { background: rgba(10,14,20,.6); color: inherit; border: 1px solid var(--line); padding: 6px 10px; border-radius: 3px; font: inherit; font-size: 13px; text-decoration: none; }
.verdict .v-head b { display: block; font-size: 26px; line-height: 1.05; letter-spacing: -.01em; font-weight: 700; }
.verdict.ok .v-head b { color: #5fd38d; } .verdict.bad .v-head b { color: #ff6b6b; }
.verdict .v-head span { color: var(--muted); font-size: 13px; }
.verdict p { margin: 8px 0; font-size: 14px; line-height: 1.4; }
.v-date { display: flex; flex-wrap: wrap; gap: 4px; margin: 10px 0; }
.v-date button, .v-date input { background: #0d1118; color: inherit; border: 1px solid var(--line-2); border-radius: 3px; padding: 5px 7px; font: inherit; font-size: 12px; cursor: pointer; }
.v-date input { flex: 1 1 120px; min-width: 0; font-family: var(--mono); } .v-date button:hover { border-color: var(--teal); }
.verdict .v-cal { font-size: 13px; color: var(--muted); } .v-cal b { color: inherit; font-weight: 600; color: #e6e9ef; }
.days { display: flex; gap: 1px; padding-bottom: 16px; }
.days .day { flex: 1 1 0; min-width: 0; height: 22px; padding: 0; border: 0; border-radius: 2px; position: relative; cursor: pointer; opacity: .85; }
.days .day.ok { background: #5fd38d; } .days .day.bad { background: #6b2f36; }
.days .day:hover { opacity: 1; transform: scaleY(1.25); } .days .day.now { outline: 2px solid #fff; outline-offset: 1px; z-index: 1; opacity: 1; }
.days .day i { position: absolute; top: 25px; left: 0; font-style: normal; font-size: 10px; color: var(--muted); white-space: nowrap; pointer-events: none; }
.v-rows { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 4px; }
.v-rows td { padding: 3px 0; } .v-rows td:nth-child(2) { text-align: right; font-family: var(--mono); font-size: 12px; white-space: nowrap; padding-left: 8px; } .v-rows td:nth-child(3) { width: 18px; text-align: right; color: #5fd38d; }
.v-rows tr.fail td { color: #ff6b6b; } .v-rows tr.info td { color: var(--muted); }
.v-rows tr.should td { border-top: 1px solid var(--line); } .v-rows tr.should ~ tr.should td { border-top: 0; } .v-rows tr.info td { border-top: 0; }
.v-rows tr.should:first-of-type td { border-top: 1px solid var(--line); }
.verdict .v-note { font-size: 12px; color: var(--muted); }
.tip { position: relative; cursor: help; border-bottom: 1px dotted currentColor; outline: none; }
.v-note .tip { border: 0; }
.tip:hover::after, .tip:focus::after { content: attr(data-tip); position: absolute; left: 0; top: 1.6em; z-index: 40; width: 300px; max-width: 70vw; background: #1a1e27; color: #e6e9ef; border: 1px solid var(--line-2); border-radius: 6px; padding: 8px 10px; font: 400 12px/1.4 var(--sans, system-ui); white-space: normal; box-shadow: 0 8px 24px rgba(0,0,0,.5); }
@media (max-width: 760px) { #hud { width: auto; right: 16px; max-height: 46vh; } #viewtools { display: none; } #topbar nav button { display: none; } }
.hud-site { order: -1; }
html.min:not(.embed) .hud-block, html.min .mission label:first-child { display: none !important; }
.v-count { display: flex; align-items: baseline; gap: 6px; margin: 12px 0 8px; flex-wrap: wrap; }
.v-count b { font-size: 34px; line-height: 1; font-weight: 700; color: #5fd38d; } .verdict .v-count span { font-size: 16px; color: var(--muted); }
.v-count em { font-style: normal; font-size: 13px; color: var(--muted); flex: 1 1 100%; }
.verdict .v-key { font-size: 12px; color: var(--muted); margin: 0 0 8px; }
.v-key i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin: 0 4px 0 10px; vertical-align: -1px; } .v-key i:first-child { margin-left: 0; }
.v-key i.ok { background: #5fd38d; } .v-key i.bad { background: #6b2f36; } .v-key i.cur { outline: 2px solid #fff; outline-offset: -2px; }
/* One product, calm by default: the point switch, the stay length and the map footnote live behind "Details". */
html.min #h-variant, html.min .mission, html.min #sitelist .tiny { display: none !important; }
html.min #h-variant-note { display: block !important; font-size: 12px; color: var(--muted); margin-top: 4px; }
#sites li button { display: flex; justify-content: space-between; align-items: baseline; width: 100%; }
@media (max-width: 760px) { #hud { display: block; left: 10px; right: 10px; top: 58px; } #hud > div { margin-bottom: 8px; } #more { top: auto; bottom: 150px; right: 10px; } }

/* ---------- map screen: every site, every landing day (allsites.js) ---------- */
#sitelist { left: 16px; right: 16px; top: auto; bottom: 16px; width: auto; max-height: 48vh; padding: 12px 14px 8px; }
.a-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; margin-bottom: 6px; }
#sitelist h2 { margin: 0; }
.a-range { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); }
.a-range input, .a-range button { background: rgba(255,255,255,.03); border: 1px solid var(--line); color: var(--text); border-radius: 3px; padding: 4px 8px; font: inherit; cursor: pointer; color-scheme: dark; }
.a-range button.on, .a-range button:hover { border-color: var(--teal); color: var(--teal); }
.a-row { display: grid; grid-template-columns: 190px 1fr 78px; gap: 10px; align-items: center; }
.a-row canvas { width: 100%; height: 14px; display: block; cursor: pointer; border-radius: 2px; }
.a-axis canvas { height: 22px; cursor: default; }
#sites { gap: 3px; margin: 2px 0 8px; }
#sites li button { display: block; border: 0; background: none; padding: 1px 0; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#sites li button:hover { background: none; color: var(--teal); }
#sites li button small { font: 400 10px var(--mono); color: var(--muted); margin-left: 6px; }
#sites .cnt { font-family: var(--mono); font-size: 11px; color: var(--muted); text-align: right; white-space: nowrap; }
#sites .cnt b { color: var(--text); font-weight: 600; }
#sitelist .v-key { margin: 0; }
#a-tip { position: fixed; z-index: 50; display: none; pointer-events: none; white-space: nowrap; background: #1a1e27; border: 1px solid var(--line-2); border-radius: 6px; padding: 6px 9px; font-size: 12px; }
#gl { cursor: grab; touch-action: none; }
@media (max-width: 760px) {
  #sitelist { left: 8px; right: 8px; bottom: 8px; }
  .a-row { grid-template-columns: 104px 1fr; }
  .a-row > :last-child, #sites li button small, .a-hint { display: none; }
}
body.mode-overview #more { display: none; }
#sitelist .v-key i.ok { background: rgb(95,211,141); } #sitelist .v-key i.bad { background: rgba(150,50,58,.3); box-shadow: inset 0 0 0 1.5px rgb(198,74,82); }
.pin, #sitelist h2, .a-row button { user-select: none; -webkit-user-select: none; }
#sites { gap: 1px; } #sites li button { padding: 0; font-size: 12.5px; } .a-row canvas { height: 12px; }
.a-axis canvas { height: 22px; }
/* site labels on the Moon: a quiet pill with a status dot (green: a safe landing day exists in the chosen period) */
.pin { font-size: 11.5px; font-weight: 500; padding: 2px 8px 2px 6px; border-radius: 10px; border: 1px solid rgba(150,170,200,.22); background: rgba(8,11,16,.72); color: #dfe6f2; }
.pin::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; background: rgb(160,170,190); }
/* not by colour alone: safe is a filled dot, no safe day is a hollow ring */
.pin[data-s="ok"]::before { background: rgb(95,211,141); } .pin[data-s="bad"]::before { background: none; box-shadow: inset 0 0 0 1.5px rgb(226,84,90); }
.pin:hover, .pin.hot { background: rgba(8,11,16,.95); color: #fff; border-color: var(--teal); z-index: 2; }
#sites li.hot button { color: var(--teal); } #sites li.hot { background: rgba(70,224,200,.07); }
/* language: three buttons, the current one lit */
#lang { display: inline-flex; padding: 0; overflow: hidden; }
#topbar nav #lang button { display: inline-block; border: 0; border-radius: 0; background: none; padding: 6px 9px; font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--muted); cursor: pointer; }
#topbar nav #lang button + button { border-left: 1px solid var(--line); }
#topbar nav #lang button.on { background: var(--teal); color: #001; }
/* map clock: play the sunlight over the period; a line marks the moment on the rows */
.a-play { display: flex; align-items: center; gap: 8px; margin-right: auto; font: 12px var(--mono); color: var(--muted); }
#a-play { width: 30px; height: 26px; border: 1px solid var(--teal); border-radius: 3px; background: rgba(70,224,200,.1); color: var(--teal); cursor: pointer; font-size: 12px; }
#sites { position: relative; }
#a-headline { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #ffb547; pointer-events: none; display: none; z-index: 1; box-shadow: 0 0 6px rgba(255,181,71,.8); }
.skymark { position: fixed; z-index: 5; transform: translate(-50%, -50%); pointer-events: none; font: 600 11px var(--mono); letter-spacing: .06em; padding: 2px 7px; border-radius: 10px; background: rgba(8,11,16,.8); }
.skymark.sun { color: #ffb547; border: 1px solid #ffb547; } .skymark.earth { color: #5fb4ff; border: 1px solid #5fb4ff; }
body.mode-surface .skymark { display: none !important; }
.skymark { font-size: 12px; padding: 3px 10px; border-radius: 12px; }
.skymark.sun { background: #ffb547; color: #1a1300; border-color: #ffb547; } .skymark.earth { background: #3f86e0; color: #fff; border-color: #3f86e0; }
/* site screen: Sun and Earth against the horizon, always in view */
#skybar { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 8px 12px; font-size: 12px; }
#skybar p { margin: 0 0 4px; font: 11px var(--mono); color: var(--muted); }
#skybar div { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: center; padding: 3px 0; }
#skybar div + div { border-top: 1px solid var(--line); }
#skybar i { width: 12px; height: 12px; border-radius: 50%; flex: none; }
#skybar .sun i { background: radial-gradient(#fff 35%, #ffd27a 70%); box-shadow: 0 0 8px #ffb547; }
#skybar .earth i { background: url(../data/earth.jpg) 38% 50% / 200% 100%; box-shadow: inset -3px -2px 4px rgba(0,0,0,.6); }
#skybar b { width: 38px; } #skybar span { font-family: var(--mono); } #skybar span:nth-of-type(n+2) { color: var(--muted); }
#skybar em { font-style: normal; font-family: var(--mono); margin-left: auto; } #skybar .sun em { color: var(--sun); } #skybar .earth em { color: var(--earth); }
/* Moon screen rim labels: a small Sun and a small real Earth instead of symbols */
.skymark { display: flex; align-items: center; gap: 6px; }
.skymark::before { content: ""; width: 16px; height: 16px; border-radius: 50%; flex: none; }
.skymark.sun::before { background: radial-gradient(#fff 40%, #fff3c4 75%); box-shadow: 0 0 10px 2px #fff; }
.skymark.earth::before { background: url(../data/earth.jpg) 38% 50% / 200% 100%; box-shadow: inset -4px -2px 5px rgba(0,0,0,.65); }
/* a way back that says where it goes; panels that scroll show it */
#back { display: inline-flex; align-items: center; gap: 9px; background: none; border: 0; border-left: 1px solid var(--line-2); border-radius: 0; padding: 5px 4px 5px 16px; color: var(--text); font-size: 14px; font-weight: 600; letter-spacing: .02em; white-space: nowrap; transition: color .15s; }
#back::before { content: ""; width: 7px; height: 7px; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .15s; }
#back:hover { background: none; color: var(--teal); } #back:hover::before { transform: translateX(-3px) rotate(45deg); }
#hud, #sitelist, #panel { scrollbar-width: thin; scrollbar-color: rgba(70,224,200,.7) rgba(255,255,255,.06); }
#hud { overflow-y: scroll; }
#hud::-webkit-scrollbar, #sitelist::-webkit-scrollbar { width: 10px; }
#hud::-webkit-scrollbar-track, #sitelist::-webkit-scrollbar-track { background: rgba(255,255,255,.06); border-radius: 5px; }
#hud::-webkit-scrollbar-thumb, #sitelist::-webkit-scrollbar-thumb { background: rgba(70,224,200,.7); border-radius: 5px; }
#sky-at { display: flex; align-items: center; gap: 6px; font: 11px var(--mono); color: var(--muted); margin-bottom: 4px; }
#sky-when { background: #0d1118; border: 1px solid var(--line-2); border-radius: 3px; padding: 3px 6px; color: var(--text); font: 12px var(--mono); color-scheme: dark; }
#skybar strong { font: 600 22px var(--mono); min-width: 92px; } #skybar .sun strong { color: var(--sun); } #skybar .earth strong { color: var(--earth); }
#skybar span { font-size: 11px; line-height: 1.35; color: var(--muted); } #skybar b { width: auto; min-width: 44px; }
/* the mission's own limits, on the first screen */
.a-slip { font-size: 13px; color: var(--muted); margin: 0 0 6px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.a-slip input { width: 64px; background: rgba(255,255,255,.03); border: 1px solid var(--line-2); border-radius: 3px; padding: 3px 6px; color: var(--text); font: 13px var(--mono); color-scheme: dark; }
.a-slip b { font-weight: 600; } .a-slip b.ok { color: #5fd38d; } .a-slip b.bad { color: #ff8a8a; }
.a-mission { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: 12px; color: var(--muted); margin: 0 0 6px; }
.a-mission input { width: 58px; background: rgba(255,255,255,.03); border: 1px solid var(--line-2); border-radius: 3px; padding: 3px 6px; color: var(--text); font: 12px var(--mono); color-scheme: dark; }
.a-mission button { background: none; border: 1px solid var(--line); border-radius: 3px; color: var(--muted); padding: 3px 8px; font: inherit; cursor: pointer; }
.a-mission .tip { position: relative; cursor: help; }
/* add a site: a known landing or any coordinates */
.a-add { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-left: auto; }
.a-add select, .a-add button { background: rgba(255,255,255,.03); border: 1px solid var(--line-2); border-radius: 3px; padding: 3px 8px; color: var(--text); font: inherit; cursor: pointer; color-scheme: dark; }
.a-add input { width: 86px; } .a-add input.bad { border-color: var(--bad); }
.a-add button { border-color: var(--teal); color: var(--teal); }
/* phone: mission limits and add-site fold into one line; desktop: always open, no extra line */
.a-more > summary { cursor: pointer; font-size: 12px; color: var(--teal); margin: 0 0 6px; }
@media (min-width: 701px) { .a-more > summary { display: none; } }

/* A real mission's site: what happened, then what the model says for that moment. */
.v-hist { border-left: 3px solid var(--teal); background: rgba(255,255,255,.04); padding: 8px 10px; margin: 10px 0; border-radius: 0 4px 4px 0; }
.v-hist b { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--teal); }
.verdict .v-hist p { margin: 6px 0 0; font-size: 13px; } .v-hist .v-model em { font-style: normal; color: var(--muted); }
.v-hist button { margin-top: 8px; background: #0d1118; color: inherit; border: 1px solid var(--teal); border-radius: 3px; padding: 5px 8px; font: inherit; font-size: 12px; cursor: pointer; }

/* ---------- controls: one shape (3 px corners), one accent (teal) ---------- */
/* View options are switches, label first: on is a teal block moved to the right, so state reads without the colour. */
.vt-row { gap: 0; margin-bottom: 6px; border: 1px solid var(--line-2); border-radius: 3px; overflow: hidden; background: var(--panel-solid); }
.vt-row button { border: 0; border-radius: 0; padding: 7px 4px; font-size: 12.5px; font-weight: 500; }
.vt-row button + button { border-left: 1px solid var(--line-2); }
.tog { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; padding: 4px 0; line-height: 1.25; }
.tog em { margin-top: 2px; }
.tog input { order: 2; appearance: none; -webkit-appearance: none; margin: 0; width: 30px; height: 16px; border: 1px solid var(--line-2); border-radius: 3px; background: rgba(150,170,200,.08); position: relative; cursor: pointer; transition: background .15s, border-color .15s; }
.tog input::before { content: ""; position: absolute; left: 2px; top: 2px; width: 10px; height: 10px; border-radius: 2px; background: var(--muted); transition: transform .15s, background .15s; }
.tog input:checked { background: rgba(70,224,200,.16); border-color: var(--teal); }
.tog input:checked::before { transform: translateX(14px); background: var(--teal); }
.tog:hover input { border-color: var(--teal); }
button:active { transform: translateY(1px); }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .tog input, .tog input::before, #back, #back::before { transition: none; } button:active { transform: none; } }
/* phone: the way back stays on one line without squeezing the title, and the Details button sits clear above the dock */
@media (max-width: 760px) { #topbar { gap: 8px; } #back { border-left: 0; padding: 5px 0; font-size: 13px; gap: 6px; } #more { bottom: 262px; } html.min #more { bottom: 192px; } }

/* ---------- kids features: one column of buttons on the map (#kidbar), one slot in the top bar on the site (#sitekid) ---------- */
/* The lander card on the left, the buttons of the toys in one column beside it: under the card they would lie on the day table. */
#kidbar { position: fixed; left: 16px; top: 64px; z-index: 12; display: grid; grid-template-columns: auto max-content; align-items: start; justify-items: start; gap: 8px; max-width: calc(100vw - 32px); }
#kidbar > .kl-card { grid-column: 1; grid-row: 1 / span 6; } #kidbar > :not(.kl-card) { grid-column: 2; }
/* The column is an empty box over the Moon: only its buttons and cards take the pointer, a tap beside them reaches the Moon. */
#kidbar { pointer-events: none; } #kidbar > * { pointer-events: auto; }
#sitekid { display: flex; gap: 8px; }
.kidbtn { background: rgba(10,14,20,.78); border: 1px solid var(--teal); color: var(--teal); padding: 8px 14px; border-radius: 4px; cursor: pointer; font-weight: 600; font-size: 14px; letter-spacing: .02em; backdrop-filter: blur(6px); }
.kidbtn:hover, .kidbtn.on { background: var(--teal); color: #001; }
@media (max-width: 760px) { #kidbar { display: flex; left: 8px; top: 56px; flex-direction: row; flex-wrap: wrap; max-width: calc(100vw - 16px); gap: 6px; } .kidbtn { padding: 6px 10px; font-size: 13px; } }
