/* Skyward Push-To
   Night-vision palette: red on black only. --k scales brightness (More > Screen brightness).
   Sizes: every control is at least 44px tall (36px for secondary "mini" controls) — cold fingers, in the dark. */
:root {
  --k: 1;
  --ghost: #4e4e4e; --bg: #000; --bgm: #000; --bg2: #000; --stars: 0; --starsimg: none;
  --panel: #0d0000;
  --line: rgb(calc(95 * var(--k)) 0 0);
  --dim: rgb(calc(145 * var(--k)) 0 0);
  --fg: rgb(calc(210 * var(--k)) calc(20 * var(--k)) calc(10 * var(--k)));
  --hi: rgb(calc(255 * var(--k)) calc(45 * var(--k)) calc(25 * var(--k)));
  --good: rgb(calc(255 * var(--k)) calc(95 * var(--k)) calc(45 * var(--k)));
  --press: #1c0000; --row: #170000; --sel: #170000; --chart: #050000; --veil: rgba(0,0,0,.94); --bar: #1a0000;
  --glow: rgba(255, 45, 25, .16);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg) linear-gradient(var(--bg), var(--bgm) 55%, var(--bg2)) fixed; color: var(--fg); font: 16px/1.35 -apple-system, system-ui, "Segoe UI", Roboto, sans-serif; overscroll-behavior: none; }
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; }
body { display: flex; flex-direction: column; padding-top: var(--safe-t); -webkit-user-select: none; user-select: none; }
input, textarea, select { -webkit-user-select: text; user-select: text; }
.mono, .num { font-variant-numeric: tabular-nums; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
h1 { font-size: 22px; margin: 0 0 6px; color: var(--hi); }
h2 { font-size: 19px; margin: 6px 0 8px; color: var(--hi); font-weight: 700; }
h3 { font-size: 15px; margin: 16px 0 6px; color: var(--fg); font-weight: 600; }
p { margin: 6px 0; }
.muted { color: var(--dim); font-size: 14px; }
.small { font-size: 13px; }
.hidden { display: none !important; }
a { color: var(--hi); }
svg.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; display: block; }

/* ---- header: scope, pointing state, day/night, full screen */
header#status { display: flex; gap: 8px; align-items: center; padding: 6px 10px; border-bottom: 1px solid var(--line); min-height: 48px; }
.stbtn { flex: none; max-width: 34%; min-height: 44px; padding: 4px 8px; font-size: 13px; color: var(--dim); background: none; border: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill { flex: 1; min-width: 0; min-height: 44px; padding: 4px 12px; font-size: 14px; border-radius: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--fg); }
.pill[data-st="aligned"] { color: var(--dim); border-color: var(--row); }
.pill[data-st="unaligned"], .pill[data-st="resync"], .pill[data-st="off"], .pill[data-st="nodata"] { color: var(--hi); border-color: var(--fg); }
.hbtn { flex: none; width: 44px; height: 44px; min-height: 44px; padding: 0; display: grid; place-items: center; background: none; color: var(--fg); border-radius: 8px; }

/* ---- layout */
main { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.tab { display: none; padding: 12px 14px 24px; }
.tab.on { display: block; }
nav#tabs { display: flex; border-top: 1px solid var(--line); padding-bottom: var(--safe-b); background: var(--bar); }
nav#tabs button { flex: 1; min-height: 52px; padding: 6px 0 5px; background: none; border: 0; border-radius: 0; color: var(--dim); font-size: 11px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
nav#tabs button svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
nav#tabs button.on { color: var(--hi); box-shadow: inset 0 2px 0 var(--hi); }
#flowbar { display: flex; gap: 8px; align-items: center; padding: 6px 12px; border-bottom: 1px solid var(--line); font-size: 14px; background: var(--panel); }
#flowbar > span { flex: 1; }
.back { display: inline-flex; align-items: center; min-height: 44px; padding: 4px 10px 4px 4px; margin: -4px 0 4px -4px; background: none; border: 0; color: var(--dim); font-size: 14px; }

/* ---- controls */
button, select, input { font: inherit; color: var(--fg); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; min-height: 44px; }
button { cursor: pointer; }
button:active { background: var(--press); }
button.primary { border-color: var(--fg); color: var(--hi); font-weight: 600; }
button.big { font-size: 18px; padding: 14px 18px; width: 100%; min-height: 54px; }
button.mini { min-height: 44px; padding: 6px 14px; font-size: 14px; }
button.ibtn { flex: none; width: 44px; min-height: 44px; padding: 0; font-size: 17px; }
button:disabled { opacity: .4; }
input, select { width: 100%; }
input[type=checkbox] { width: 28px; height: 28px; min-height: 0; flex: none; accent-color: var(--fg); }
label.row { min-height: 44px; }
input[type=range] { accent-color: var(--fg); padding: 0; border: 0; background: none; }
label.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--row); }
label.row > span:first-child { flex: 1; }
label.row input:not([type=checkbox]):not([type=radio]), label.row select { max-width: 55%; }
label.field { display: block; margin: 10px 0; }
label.field > span { display: block; margin-bottom: 4px; }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.btnrow > button { flex: 1; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 8px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; min-height: 44px; padding: 6px 14px; border-radius: 22px; font-size: 14px; color: var(--dim); white-space: nowrap; }
.chips button.on { color: var(--hi); border-color: var(--fg); }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { flex: 1; border: 0; border-radius: 0; min-height: 40px; padding: 6px 4px; font-size: 14px; color: var(--dim); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { color: var(--hi); background: var(--sel); font-weight: 600; }
details.more { border-top: 1px solid var(--row); margin-top: 10px; }
details.more > summary { list-style: none; cursor: pointer; padding: 12px 0; color: var(--dim); font-size: 14px; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: '+ '; }
details.more[open] > summary::before { content: '– '; }

/* ---- lists */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 10px; align-items: center; padding: 10px 2px; border-bottom: 1px solid var(--row); min-height: 56px; }
.list li .main { flex: 1; min-width: 0; }
.list li .t1 { color: var(--hi); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list li .t2 { color: var(--dim); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list li .r { flex: none; text-align: right; font-size: 13px; color: var(--dim); }
.list li.sel { background: var(--sel); }
.list li.below .t1, .list li.done .t1 { color: var(--dim); }
.list li.wrap .t2 { white-space: normal; }
.cname { font-weight: 400; color: var(--fg); }
.seen { color: var(--good); font-weight: 700; }
.dots { font-size: 12px; letter-spacing: 1px; color: var(--fg); white-space: nowrap; }
.dots.lv0 { color: var(--good); }
.dots.lv2, .dots.lv3 { color: var(--dim); }
.lv { display: inline-block; font-size: 11px; font-weight: 600; padding: 0 6px; border-radius: 8px; border: 1px solid var(--line); vertical-align: 1px; white-space: nowrap; }
.lv0 { color: var(--good); border-color: var(--good); }
.lv1 { color: var(--fg); }
.lv2, .lv3 { color: var(--dim); }

/* ---- cards and small blocks */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin: 10px 0; }
.kv { display: grid; grid-template-columns: minmax(50%, 1fr) minmax(0, auto); gap: 4px 12px; font-size: 14px; }
.kv > :nth-child(odd) { color: var(--dim); }
.kv > :nth-child(even) { text-align: right; font-variant-numeric: tabular-nums; }
.bad { color: var(--hi); font-weight: 600; }
.strip { display: flex; align-items: center; gap: 8px; padding: 5px 6px 5px 10px; margin: 6px 0; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; }
.strip > span { flex: 1; min-width: 0; }
.strip.warn { border-color: var(--fg); color: var(--hi); }
.blurb { font-size: 15px; color: var(--fg); margin: 10px 0; }

/* ---- Push */
.target-h { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.target-h .name { font-size: 22px; color: var(--hi); font-weight: 700; }
.target-h .cname { font-size: 16px; }
.rateline { font-size: 15px; margin: 2px 0 6px; }
.guide { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
.delta { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 5px 8px 6px; text-align: center; }
.delta .lab { font-size: 12px; color: var(--dim); text-transform: uppercase; letter-spacing: .5px; }
.delta .val { font-size: 30px; line-height: 1.15; font-weight: 700; color: var(--hi); font-variant-numeric: tabular-nums; white-space: nowrap; }
.delta .dir { font-size: 14px; min-height: 19px; }
.delta.ok { border-color: var(--good); background: var(--glow); }
.delta.ok .val { color: var(--good); }
.pstat { text-align: center; font-size: 17px; color: var(--fg); min-height: 26px; margin: 6px 0; }
.dirs { display: flex; gap: 4px; margin-top: 6px; }
.dirs button { flex: 1; min-width: 0; min-height: 38px; padding: 0; font-size: 14px; }
.infield { text-align: center; font-size: 17px; color: var(--good); min-height: 24px; }
.ontarget { border: 2px solid var(--good); background: var(--glow); border-radius: 12px; padding: 10px 12px; text-align: center; animation: pulse 1.6s ease-out 2; }
.ontarget b { color: var(--good); font-size: 19px; }
.ontarget .seenrow { display: flex; gap: 6px; align-items: center; justify-content: center; flex-wrap: wrap; margin-top: 8px; font-size: 14px; }
.ontarget .seenrow button { min-height: 40px; padding: 6px 12px; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 70, 30, .55); } 100% { box-shadow: 0 0 0 16px rgba(255, 70, 30, 0); } }
.whereami { text-align: center; font-size: 14px; min-height: 20px; margin: 2px 0 6px; color: var(--dim); }
.whereami b { color: var(--fg); }
.whereami.flash { animation: wflash 1.2s ease-out; }
@keyframes wflash { 0% { background: rgba(255, 50, 20, .35); } 100% { background: transparent; } }
canvas.chart { display: block; width: 100%; width: min(100%, max(270px, calc(100dvh - 400px))); aspect-ratio: 1; margin: 0 auto; background: var(--chart); border: 1px solid var(--line); border-radius: 12px; touch-action: none; }
canvas.chart.big { width: min(100%, max(280px, calc(100dvh - 340px))); }
.btnrow.zoom { margin: 8px 0 0; flex-wrap: nowrap; }
.btnrow.zoom > button { padding: 6px 0; font-size: 16px; white-space: nowrap; min-width: 0; }
.btnrow.zoom > button.on { color: var(--hi); border-color: var(--fg); }
.planbar { font-size: 14px; padding: 6px 10px; margin: 0 0 8px; border: 1px solid var(--line); border-radius: 10px; color: var(--fg); }
.actionbar { position: sticky; bottom: 0; z-index: 4; display: flex; gap: 8px; margin: 14px -14px -24px; padding: 8px 14px; background: var(--bg); border-top: 1px solid var(--line); }
.actionbar > button { flex: 1; min-width: 0; padding: 8px 6px; white-space: nowrap; }
.actionbar > button.ibtn { flex: none; width: 48px; }
.actionbar > button.wide { flex: 2; }
.eyeview { width: 100%; max-width: 360px; display: block; margin: 0 auto; background: #000; border-radius: 50%; }

/* ---- overlays, sheets, toast */
.overlay { position: fixed; inset: 0; background: var(--veil); display: flex; align-items: flex-start; justify-content: center; z-index: 10; padding: calc(12px + var(--safe-t)) 12px calc(16px + var(--safe-b)); overflow-y: auto; }
.overlay .card { margin: auto 0; max-width: 440px; width: 100%; }
.overlay.sheet { align-items: flex-end; padding: calc(40px + var(--safe-t)) 0 0; }
.overlay.sheet .card { margin: 0; max-width: 520px; max-height: 100%; overflow-y: auto; border-radius: 16px 16px 0 0; border-bottom: 0; padding-bottom: calc(16px + var(--safe-b)); }
.sheet-h { display: flex; align-items: flex-start; gap: 8px; }
.sheet-h > div { flex: 1; min-width: 0; }
#toast { position: fixed; left: 50%; bottom: calc(132px + var(--safe-b)); transform: translateX(-50%); background: var(--press); border: 1px solid var(--fg); color: var(--hi); padding: 10px 16px; border-radius: 10px; z-index: 20; width: max-content; max-width: 90%; text-align: center; }
.bar { height: 8px; background: var(--bar); border-radius: 4px; overflow: hidden; margin: 8px 0; }
.bar > div { height: 100%; background: var(--fg); width: 0; }
table.res { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
table.res td, table.res th { padding: 4px 4px; border-bottom: 1px solid var(--row); text-align: right; }
table.res td:first-child, table.res th:first-child { text-align: left; }
table.res th { color: var(--dim); font-weight: 500; }
table.res input { min-height: 40px; padding: 6px 8px; }
table.res button { min-height: 40px; padding: 4px 10px; }
textarea { width: 100%; min-height: 120px; background: var(--panel); color: var(--fg); border: 1px solid var(--line); border-radius: 8px; font: 12px ui-monospace, monospace; }

/* ---- tests, game */
.verdict { text-align: center; }
.verdict .vbig { font-size: 30px; font-weight: 800; letter-spacing: 1px; color: var(--hi); margin-bottom: 4px; }
.verdict.v-poor, .verdict.v-unsuitable { border-color: var(--hi); border-width: 2px; }
.gtimer { font-size: 54px; font-weight: 800; text-align: center; color: var(--hi); margin-top: 4px; }
ol.steps { list-style: none; padding: 0; margin: 8px 0; }
ol.steps li { padding: 8px 10px; border: 1px solid var(--row); border-radius: 8px; margin: 4px 0; color: var(--dim); font-size: 15px; }
ol.steps li.now { border-color: var(--fg); color: var(--hi); background: var(--sel); }
ol.steps li.done { color: var(--fg); }
.gate-err { color: var(--hi); font-size: 16px; text-align: left; margin-top: 10px; }
.gate-err ol { padding-left: 20px; margin: 6px 0; }
.gate-err li { margin: 4px 0; }

/* ---- launch */
.tonight { font-size: 14px; color: var(--fg); margin: 0 0 4px; }
.tune { margin: 8px 0 2px; }
.tune label { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 3px 0; border-bottom: 1px solid var(--row); font-size: 15px; }
.tune label > span { flex: 1; min-width: 0; }
.tune label .muted { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
button.act { display: block; width: 100%; text-align: left; margin: 6px 0; padding: 10px 12px; }
button.act b { display: block; color: var(--hi); font-size: 17px; }
button.act .chain { display: block; font-size: 12px; color: var(--dim); margin-top: 2px; }
button.act.pick.on { border-color: var(--fg); background: var(--sel); }
.lgrid button.act { margin: 0; min-height: 92px; display: flex; flex-direction: column; justify-content: flex-start; }
.lgrid button.act .muted { display: block; font-size: 13px; }
ol.how { margin: 6px 0; padding-left: 20px; font-size: 14px; }
ol.how li { margin: 6px 0; }
svg.umi { width: 100%; max-width: 300px; display: block; margin: 0 auto; background: var(--chart); border-radius: 10px; }
svg.umi line { stroke: var(--line); stroke-width: 1.5; }
svg.umi circle.on { fill: var(--hi); }
svg.umi circle.off { fill: var(--ghost); }
svg.umi text.off { fill: var(--ghost); }
svg.umi text { fill: var(--fg); font-size: 12px; }
svg.umi text.muted { fill: var(--dim); font-size: 10px; }

/* ---- find: tonight's picks */
.picks { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.picks::-webkit-scrollbar { display: none; }
.picks button { flex: none; width: 132px; min-height: 84px; text-align: left; padding: 8px 10px; }
.picks button b { display: block; color: var(--hi); font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.picks button span { display: block; font-size: 12px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sech { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 4px 0 6px; }
.sech h3 { margin: 0; }

/* ---- plan */
.sess { display: flex; align-items: center; gap: 10px; }
.sess > div { flex: 1; min-width: 0; }
.sess b { color: var(--hi); }

/* ---- log and more */
.prog { margin: 10px 0; }
.prog .lab { display: flex; justify-content: space-between; font-size: 14px; }
.badges { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
.badge { border: 1px solid var(--row); border-radius: 10px; padding: 8px 10px; font-size: 13px; color: var(--dim); }
.badge b { display: block; font-size: 14px; color: var(--dim); }
.badge.got { border-color: var(--good); background: var(--glow); color: var(--fg); }
.badge.got b { color: var(--good); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.stats div { border: 1px solid var(--line); border-radius: 10px; padding: 8px 4px; font-size: 12px; color: var(--dim); }
.stats b { display: block; font-size: 24px; color: var(--hi); }

/* ---- Day look (shade < 0.5): gold accents instead of red for the two animations. All other colours come from theme.js. */
html[data-theme="day"] #toast { box-shadow: 0 4px 16px rgba(0,0,0,.35); }
html[data-theme="day"] .whereami.flash { animation-name: wflashday; }
html[data-theme="day"] .ontarget { animation-name: pulseday; }
@keyframes wflashday { 0% { background: rgba(255, 214, 128, .22); } 100% { background: transparent; } }
@keyframes pulseday { 0% { box-shadow: 0 0 0 0 rgba(126, 231, 170, .45); } 100% { box-shadow: 0 0 0 16px rgba(126, 231, 170, 0); } }
@media (prefers-reduced-motion: reduce) { .ontarget, .whereami.flash { animation: none; } }

/* ---- the sky behind everything: a sprinkling of stars that fades out toward Night */
body::before, #gate::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: var(--starsimg) repeat; opacity: var(--stars); }
#gate { background: var(--bg) linear-gradient(var(--bg), var(--bgm) 55%, var(--bg2)); isolation: isolate; }
#gate > .card { background: none; border: 0; padding: 6px 4px; }

/* ---- Day / Night fader */
#shadepop { position: fixed; z-index: 40; top: calc(52px + var(--safe-t)); right: 8px; left: 8px; max-width: 420px; margin-left: auto; padding: 10px 12px 8px; background: var(--bar); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.shrow { display: flex; align-items: center; gap: 8px; }
.shrow input { flex: 1; min-width: 0; padding: 0; border: 0; background: none; accent-color: var(--hi); }
.shend { flex: none; width: 44px; padding: 0; display: grid; place-items: center; background: none; border: 0; color: var(--hi); }
.shcap { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--dim); padding: 0 6px; }

/* ---- start screen: pick what to do, then a little constellation of stops on the way there */
.lhead { display: flex; align-items: center; justify-content: space-between; }
.lhead h1 { font-size: 26px; letter-spacing: .2px; margin: 0; }
.lhead h1 span { font-weight: 400; color: var(--fg); }
.lq { margin: 14px 0 8px; font-size: 16px; color: var(--fg); }
.lgrid button.act { min-height: 0; padding: 10px 10px 9px; border-radius: 14px; gap: 1px; }
.lgrid button.act svg.ic { width: 22px; height: 22px; margin-bottom: 4px; color: var(--dim); }
.lgrid button.act.on { border-color: var(--hi); background: var(--sel); box-shadow: 0 0 0 1px var(--hi), 0 0 18px var(--glow); }
.lgrid button.act.on svg.ic { color: var(--hi); }
.path { position: relative; margin: 14px 0 6px; padding-left: 4px; }
.path::before { content: ""; position: absolute; left: 20px; top: 34px; bottom: 26px; border-left: 2px dotted var(--line); }
.pnote { font-size: 13px; color: var(--dim); margin: 0 0 4px 44px; }
.stop { position: relative; display: flex; align-items: center; gap: 12px; min-height: 50px; }
.stop > span { flex: 1; min-width: 0; font-size: 15px; }
.stop > span b { font-weight: 600; }
.stop > span .muted { display: block; font-size: 12px; }
.stop input { -webkit-appearance: none; appearance: none; flex: none; width: 34px; height: 34px; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 0; background: var(--line); cursor: pointer;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.5l2.6 7.9 8.4 2.6-8.4 2.6L12 22.5l-2.6-7.9L1 12l8.4-2.6z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.5l2.6 7.9 8.4 2.6-8.4 2.6L12 22.5l-2.6-7.9L1 12l8.4-2.6z'/%3E%3C/svg%3E") center / contain no-repeat; transition: transform .2s, background .2s; transform: scale(.62); }
.stop input:checked { background: var(--hi); transform: scale(1); }
.stop input:not(:checked) + span b { color: var(--dim); font-weight: 400; }
.stop.end { margin-top: 4px; }
.stop.end .dest { flex: none; width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle, var(--hi) 0 28%, var(--glow) 30% 70%, transparent 72%); }
.stop.end button { flex: 1; min-height: 50px; font-size: 17px; border-radius: 14px; }

/* ---- splash: two seconds of fun, then out of the way. Pure CSS so it shows before the app has loaded. */
#splash { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; pointer-events: none;
  background: linear-gradient(#05091e, #121842 55%, #3a2c60); color: #e9edff; animation: splout .6s ease 1.9s forwards; }
.spl-art { position: relative; width: min(78vw, 340px, 42vh); margin-bottom: 14px; }
.spl-sky { position: absolute; inset: -8% -12%; width: 124%; height: 116%; overflow: visible; }
.spl-scope { position: relative; display: block; width: 100%; height: auto; animation: rise .7s ease both; }
.spl-stars circle { animation: twinkle 1.1s ease-in-out infinite alternate; }
.spl-stars circle:nth-child(2n) { animation-delay: -.45s; animation-duration: 1.4s; } .spl-stars circle:nth-child(3n) { animation-delay: -.8s; animation-duration: .9s; } .spl-stars circle:nth-child(5n) { animation-delay: -.2s; animation-duration: 1.7s; }
.spl-name { font-size: 32px; font-weight: 600; color: #ffd680; letter-spacing: 1.5px; animation: rise .6s ease .2s both; }
.spl-name span { font-weight: 400; color: #e9edff; }
.spl-tag { font-size: 14px; letter-spacing: .2px; font-style: italic; color: #a0abd4; animation: rise .6s ease .5s both; }
@keyframes twinkle { from { opacity: .35; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes splout { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { #splash { animation-delay: .9s; } .spl-scope, .spl-stars circle, .spl-name, .spl-tag { animation: none; } }

/* start screen holds still when you switch activity: it sits at the top, and every activity shows the same three stops */
#gate > .card { margin: 0 0 auto; }
.stop.na input { background: var(--line); transform: scale(.4); opacity: .6; pointer-events: none; }
.stop.na > span b, .stop.na > span .muted { color: var(--dim); font-weight: 400; opacity: .75; }

.sqnav { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.sqnav > button { flex: none; width: 52px; display: grid; place-items: center; padding: 0; }
.sqnav > button:disabled { opacity: .3; }
.sqmid { flex: 1; min-width: 0; text-align: center; display: flex; flex-direction: column; gap: 1px; }
.sqmid b { color: var(--hi); font-size: 17px; }
.sqdots { display: flex; justify-content: center; gap: 6px; margin-top: 4px; }
.sqdots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.sqdots i.on { background: var(--hi); }

.eprow { display: flex; gap: 8px; overflow-x: auto; margin: 10px 0 0; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
.eprow figure { flex: 1 0 96px; max-width: 150px; margin: 0; text-align: center; }
.eprow canvas { width: 100%; aspect-ratio: 1; display: block; background: #000; border-radius: 50%; border: 1px solid var(--line); }
.eprow figcaption { font-size: 12px; color: var(--dim); margin-top: 4px; }
.eprow figcaption b { color: var(--fg); }
.eprow figcaption b, .eprow figcaption > span { display: block; white-space: nowrap; }

.shnav { display: flex; align-items: center; gap: 8px; margin: 6px 0 2px; font-size: 13px; color: var(--dim); }
.shnav span { flex: 1; text-align: center; }
.shnav button { flex: none; width: 48px; min-height: 36px; padding: 0; display: grid; place-items: center; }
.shnav button:disabled { opacity: .3; }

/* focuser position: a picture you tap, seen from behind the tube */
.focpick { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.focpick > div { flex: 1; min-width: 0; } .focpick svg { width: 150px; flex: none; }
.fp-tube { fill: none; stroke: var(--dim); stroke-width: 3; } .fp-mirror { fill: var(--line); } .fp-t { font-size: 9px; fill: var(--dim); }
.fp-opt { cursor: pointer; } .fp-opt line { stroke: var(--line); stroke-width: 6; stroke-linecap: round; } .fp-opt circle { fill: var(--panel); stroke: var(--dim); stroke-width: 1.5; }
.fp-opt.on line { stroke: var(--hi); } .fp-opt.on circle { fill: var(--hi); stroke: var(--hi); }

/* blocked sky: a compass ring you tap; horizon at the rim, overhead in the middle */
.hzring { display: block; width: min(80vw, 300px, 40vh); margin: 6px auto; touch-action: manipulation; }
.hz-w { cursor: default; } .hz-w path { fill: var(--panel); stroke: var(--line); stroke-width: 1.5; }
.hz-w.lv1 path { fill: color-mix(in srgb, var(--hi) 22%, var(--panel)); } .hz-w.lv2 path { fill: color-mix(in srgb, var(--hi) 42%, var(--panel)); }
.hz-w.lv3 path { fill: color-mix(in srgb, var(--hi) 62%, var(--panel)); } .hz-w.lv4 path { fill: color-mix(in srgb, var(--hi) 85%, var(--panel)); }
.hz-l { font-size: 12px; fill: var(--dim); pointer-events: none; } .hz-v { font-size: 13px; font-weight: 600; fill: var(--fg); pointer-events: none; }
.hz-w.lv3 .hz-v, .hz-w.lv4 .hz-v { fill: var(--bg); }
.hz-me { fill: var(--bg); stroke: var(--line); } .hz-line { fill: none; stroke: var(--fg); stroke-width: 2; stroke-linejoin: round; pointer-events: none; }
.hz-dot { fill: var(--fg); pointer-events: none; } .hz-now { fill: none; stroke: var(--good); stroke-width: 3; }
/* play */
.gamecard h3 { margin: 0 0 6px; } .gamecard p { margin: 6px 0; }
.mscore { text-align: center; font-size: 18px; margin: 4px 0 2px; } .mscore b { font-size: 30px; color: var(--hi); }
.hzlink { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; text-align: left; margin: 10px 0 4px; padding: 10px 14px; }
.hzlink .muted { font-size: 13px; font-weight: 400; }
.sess.hzrow { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); align-items: center; }
.actionbar > button.named { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 4px 6px; line-height: 1.15; overflow: hidden; }
.actionbar > button.named .bn { font-size: 17px; font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.actionbar > button.named .bn i { font-style: normal; font-weight: 400; opacity: .8; font-size: 14px; }
.actionbar > button.named .bs { font-size: 12px; font-weight: 500; opacity: .85; }
/* saved places and kept plans */
.placecard .chips, .plancard .btnrow { margin-top: 8px; }
.plancard textarea { width: 100%; margin-top: 8px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg2); color: var(--fg); font: inherit; font-size: 15px; resize: vertical; min-height: 44px; }
.plancard .list { margin-top: 8px; } .plancard .list li { display: flex; align-items: center; gap: 6px; } .plancard .list .grow { flex: 1; min-width: 0; }
.stop > button.mini { flex: none; margin-left: auto; }
/* route preview: whole-sky map on the left, what the stop looks like in the eyepiece on the right */
.rtgrid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 10px; align-items: center; }
canvas.rtmap { width: 100%; display: block; }
.rtviews { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.rtviews figure { margin: 0; text-align: center; width: 100%; max-width: 116px; }
.rtviews canvas { width: 100%; aspect-ratio: 1; display: block; background: #000; border-radius: 50%; border: 1px solid var(--line); }
.rtviews figcaption { font-size: 11.5px; color: var(--dim); margin-top: 3px; line-height: 1.25; }
.rtarrow { font-size: 16px; color: var(--dim); line-height: 1; }
#rt-card { padding: 10px 12px; } #rt-card .target-h .name { font-size: 22px; } #tab-route h2 { margin-bottom: 8px; }
/* drag to reorder the plan */
.grip { flex: none; width: 40px; height: 44px; display: flex; align-items: center; justify-content: center; font-size: 24px; color: var(--dim); touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
#pl-list.sorting { user-select: none; -webkit-user-select: none; }
#pl-list li.dragging { position: relative; z-index: 5; background: var(--panel); border-radius: 10px; box-shadow: 0 6px 18px rgba(0, 0, 0, .45); opacity: .96; }
#pl-list li.dragging .grip { cursor: grabbing; color: var(--hi); }
#pl-list.sorting li:not(.dragging) { transition: transform .15s ease; }
/* in-app dialogs */
.dlgin { width: 100%; margin: 6px 0 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg2); color: var(--fg); font: inherit; font-size: 16px; min-height: 44px; }
textarea.dlgin { resize: vertical; }
.btnlike { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); cursor: pointer; flex: 1; }
#dlg .card { max-height: 86vh; overflow-y: auto; }
.keybox { margin: 2px 0 6px; }
.whereami a { display: inline-block; padding: 12px 4px; margin: -12px 0; }
#toast { cursor: pointer; }
