/* SatTrack Mobiel — dark, calm, with the amber accent and 7-segment digits of Richard's radios */
@font-face { font-family: 'DSEG7'; src: url('../fonts/DSEG7Classic-Bold.woff2') format('woff2'); font-display: block; }
:root {
  --bg: #0b0f17; --card: #141b29; --card2: #1b2436; --line: #26324a; --text: #e8edf6; --muted: #8b99b3;
  --amber: #ffb547; --amber-hi: #ffd58f; --ok: #3ccf91; --blue: #4ea1ff; --red: #ff5a4f;
  --safe-b: env(safe-area-inset-bottom); --safe-t: env(safe-area-inset-top);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 15px/1.35 -apple-system, system-ui, sans-serif; }
body { display: flex; flex-direction: column; overscroll-behavior: none; }
.top { display: flex; align-items: baseline; gap: 10px; padding: calc(env(safe-area-inset-top, 0px) + 14px) 14px 10px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #0f1522, var(--bg)); }
.brand b { font-weight: 800; letter-spacing: 0.04em; }
.brand span { color: var(--amber); font-weight: 800; margin-left: 6px; font-size: 15px; letter-spacing: 0.02em; }
.where { color: var(--muted); font-size: 12px; flex: 1; text-align: center; }
.utc { font-family: 'DSEG7', monospace; color: var(--amber); font-size: 15px; letter-spacing: 0.05em; }
main { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 12px 14px 16px; }
h2 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin: 16px 0 8px; font-weight: 700; }
h2 small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.hint { color: var(--muted); font-size: 12px; }
button, select, input { font: inherit; color: var(--text); }
button { background: var(--card2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
button:active { background: #24304a; }
button.big { width: 100%; margin-top: 12px; padding: 14px; font-weight: 700; font-size: 16px; background: linear-gradient(180deg, #ffbf5c, #e8961f); border-color: #ffd58f; color: #1a1005; }
input, select { font-size: 16px; background: #0d1320; border: 1px solid var(--line); border-radius: 9px; padding: 10px; width: 100%; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
label.inline { flex-direction: row; align-items: center; gap: 10px; margin: 8px 0; font-size: 14px; color: var(--text); }
label.inline select { width: auto; }
label.inline input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--amber); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }

/* ---- next pass (hero) ---- */
.next { border-radius: 16px; padding: 14px 16px; background: radial-gradient(130% 120% at 20% 0%, rgba(255, 181, 71, 0.18), rgba(255, 181, 71, 0) 60%), var(--card); border: 1px solid var(--line); }
.next.live { background: radial-gradient(130% 120% at 20% 0%, rgba(60, 207, 145, 0.25), rgba(60, 207, 145, 0) 60%), var(--card); border-color: #2f8f63; }
.next .nx-top { display: flex; justify-content: space-between; align-items: baseline; }
.next .nx-name { font-size: 22px; font-weight: 800; }
.next .nx-tag { font-size: 11px; font-weight: 700; color: var(--amber); letter-spacing: 0.08em; }
.next.live .nx-tag { color: var(--ok); }
.next .nx-count { font-family: 'DSEG7', monospace; font-size: 40px; color: var(--amber-hi); margin: 6px 0 2px; letter-spacing: 0.04em; text-shadow: 0 0 18px rgba(255, 181, 71, 0.35); }
.next.live .nx-count { color: #9df0c8; text-shadow: 0 0 18px rgba(60, 207, 145, 0.4); }
.next .nx-sub { color: var(--muted); font-size: 13px; }
.next button { margin-top: 10px; width: 100%; }

/* ---- pass list ---- */
.passes { display: flex; flex-direction: column; gap: 8px; }
.pass { display: grid; grid-template-columns: 48px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.pass.live { border-color: #2f8f63; }
.pass .arc { width: 48px; height: 28px; }
.pass .p-name { font-weight: 700; }
.pass .p-name em { font-style: normal; font-size: 11px; color: var(--muted); margin-left: 6px; font-weight: 600; }
.pass .p-when { font-size: 12px; color: var(--muted); }
.pass .p-el { text-align: right; font-weight: 800; font-size: 18px; }
.pass .p-el small { display: block; font-size: 11px; color: var(--muted); font-weight: 500; }
.pass.high .p-el { color: var(--ok); }
.pass.low .p-el { color: var(--muted); }

/* ---- aim ---- */
.aim-head { display: flex; gap: 10px; align-items: center; }
.aim-head select { flex: 1; font-weight: 700; }
.aim-state { font-size: 12px; font-weight: 700; color: var(--amber); white-space: nowrap; }
.aim-state.live { color: var(--ok); }
.polar-wrap { position: relative; margin: 10px auto 0; max-width: 360px; }
#polar { width: 100%; display: block; }
.compass-btn { position: absolute; right: 0; top: 0; padding: 6px 10px; font-size: 12px; }
.compass-btn.on { border-color: var(--amber); color: var(--amber); }
.azel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.azel div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px; text-align: center; }
.azel span { display: block; font-size: 10px; letter-spacing: 0.14em; color: var(--muted); font-weight: 700; }
.azel b { font-family: 'DSEG7', monospace; font-size: 26px; color: var(--amber-hi); }
.azel i { font-style: normal; color: var(--muted); font-size: 12px; margin-left: 2px; }
.point { text-align: center; font-weight: 700; margin: 8px 0; min-height: 20px; color: var(--amber); }
.freqs { display: grid; gap: 8px; }
.fq { background: linear-gradient(180deg, #ffc35e, #e8901f); color: #1a1105; border-radius: 12px; padding: 8px 12px; box-shadow: inset 0 0 0 1px rgba(255, 230, 170, 0.5), 0 0 22px rgba(255, 160, 40, 0.15); }
.fq.tx { background: linear-gradient(180deg, #2b3550, #1c2438); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.fq span { display: block; font-size: 10px; letter-spacing: 0.14em; font-weight: 800; }
.fq em { font-style: normal; margin-left: 6px; }
.fq b { font-family: 'DSEG7', monospace; font-size: 30px; letter-spacing: 0.03em; display: block; }
.fq small { font-size: 11px; opacity: 0.75; }
.satnote { margin-top: 10px; font-size: 13px; color: var(--muted); background: var(--card); border-radius: 10px; padding: 10px; border: 1px solid var(--line); }

/* ---- log ---- */
.logbar { display: flex; justify-content: space-between; align-items: center; margin: 16px 0 8px; }
.loglist { display: flex; flex-direction: column; gap: 6px; }
.qso { display: grid; grid-template-columns: 1fr auto; padding: 9px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; font-size: 13px; }
.qso b { font-size: 15px; }
.qso small { color: var(--muted); }
.qso .del { padding: 4px 10px; font-size: 12px; color: var(--muted); }

/* ---- settings ---- */
.satlist { display: flex; flex-direction: column; gap: 6px; }
.satlist label { flex-direction: row; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px; color: var(--text); font-size: 14px; }
.satlist input { width: 20px; height: 20px; accent-color: var(--amber); }
.satlist small { color: var(--muted); margin-left: auto; }

/* ---- tab bar ---- */
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); background: #0d1220; padding-bottom: var(--safe-b); }
.tabs button { border: 0; border-radius: 0; background: transparent; color: var(--muted); padding: 8px 0 9px; font-size: 11px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.tabs button i { font-style: normal; font-size: 20px; line-height: 1; }
.tabs button.on { color: var(--amber); }

/* polar plot */
.pl-ring { fill: none; stroke: #2a3550; stroke-width: 0.8; }
.pl-axis { stroke: #222c42; stroke-width: 0.6; }
.pl-lbl { fill: #6f7f9c; font-size: 8px; text-anchor: middle; dominant-baseline: middle; font-family: -apple-system, sans-serif; }
.pl-n { fill: var(--amber); font-weight: 800; }
.pl-track { fill: none; stroke: var(--blue); stroke-width: 2; stroke-linecap: round; opacity: 0.85; }
.pl-sat { fill: var(--amber); stroke: #fff; stroke-width: 1.5; }
.pl-aos { fill: var(--ok); }
.pl-los { fill: var(--red); }
.pl-phone { fill: none; stroke: var(--amber-hi); stroke-width: 1.5; stroke-dasharray: 3 3; }
.next:empty { display: none; }
/* the channel label next to the frequency (FM satellites, IC-2730) */
.fq b .ch { font-family: -apple-system, system-ui, sans-serif; font-weight: 800; font-size: 22px; margin-right: 10px; letter-spacing: 0.02em; vertical-align: 4px; }
.fq.rx b .ch { color: #3a2400; }
.chan { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.chsat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.chsat b { display: block; margin-bottom: 6px; color: var(--amber); }
.chsat table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.chsat th { text-align: left; font-size: 10px; color: var(--muted); letter-spacing: 0.08em; font-weight: 700; padding: 2px 4px; }
.chsat td { padding: 3px 4px; border-top: 1px solid rgba(255, 255, 255, 0.05); }
.chsat td:first-child { font-weight: 700; }
.chsat tr.nt td { border-top: 0; color: var(--muted); font-size: 11px; padding-top: 0; }

/* AR: the camera with the sky over it */
.ar-btn { position: absolute; left: 0; top: 0; padding: 6px 10px; font-size: 12px; border-color: var(--amber); color: var(--amber); }
.ar { position: fixed; inset: 0; z-index: 50; background: #000; touch-action: none; }
.ar[hidden] { display: none; }
.ar video, .ar canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ar-top { position: absolute; left: 0; right: 0; top: 0; padding: calc(env(safe-area-inset-top) + 8px) 14px 18px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; background: linear-gradient(180deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0)); pointer-events: none; }
.ar-top small { display: block; white-space: nowrap; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; color: #cfd6e2; }
.ar-ch b { display: block; font-family: -apple-system, system-ui, sans-serif; font-weight: 900; font-size: 48px; letter-spacing: 0.01em; line-height: 1.05; color: var(--amber); text-shadow: 0 0 10px rgba(255, 181, 71, 0.35); }
.ar-ch span { display: block; font-size: 15px; font-weight: 700; color: var(--amber-hi); }
.ar-times { display: flex; gap: 16px; text-align: right; }
.ar-times b { display: block; font-family: 'DSEG7', ui-monospace, monospace; font-size: 30px; line-height: 1.1; color: #fff; }
.ar-times span { display: block; font-size: 14px; font-weight: 700; color: var(--amber-hi); }
.ar-times [hidden] { display: none; }
.ar-hint { position: absolute; left: 0; right: 0; top: calc(env(safe-area-inset-top) + 112px); text-align: center; font-size: 19px; font-weight: 800; color: var(--amber); text-shadow: 0 1px 4px #000; pointer-events: none; }
.ar-hint.hit { color: var(--ok); }
.ar-info { position: absolute; left: 14px; right: 14px; bottom: calc(env(safe-area-inset-bottom) + 96px); padding: 10px 12px; border-radius: 12px; background: rgba(20, 27, 41, 0.88); display: flex; flex-direction: column; gap: 3px; font-size: 14px; }
.ar-info[hidden] { display: none; }
.ar-mode { font-size: 12px; color: #cfd6e2; }
.ar-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 14px calc(env(safe-area-inset-bottom) + 14px); display: flex; justify-content: space-between; align-items: center; gap: 10px; background: linear-gradient(0deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0)); }
.ar-b, .ar-bottom .rec { min-width: 64px; min-height: 64px; margin: 0; padding: 0 14px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 17px; font-weight: 800; background: rgba(20, 27, 41, 0.88); border: 1.5px solid var(--line); color: var(--text); }
.ar-i { font-family: Georgia, serif; font-style: italic; font-size: 26px; }
.ar-lock { font-size: 26px; }
.ar-recslot { display: contents; }
.ar-bottom .rec i { width: 18px; height: 18px; }
.ar-bottom .rec.on { background: #5a1512; border-color: #ff3b30; }
.ar.locked .ar-lock { border-color: var(--amber); background: rgba(90, 60, 10, 0.9); }
.ar.locked .ar-bottom button:not(.ar-lock) { opacity: 0.35; }
.ar-close { background: rgba(20, 27, 41, 0.88); }
@media (orientation: landscape) {
  .ar-top { padding-top: calc(env(safe-area-inset-top) + 6px); padding-left: calc(env(safe-area-inset-left) + 14px); padding-right: calc(env(safe-area-inset-right) + 14px); }
  .ar-hint { top: calc(env(safe-area-inset-top) + 92px); }
  .ar-bottom { padding-left: calc(env(safe-area-inset-left) + 14px); padding-right: calc(env(safe-area-inset-right) + 14px); }
}

/* REC and the recordings */
.aimbtns { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: end; }
.rec { display: inline-flex; align-items: center; gap: 8px; padding: 14px 16px; font-weight: 800; font-size: 15px; margin-top: 12px; }
.rec i { width: 14px; height: 14px; border-radius: 50%; background: #ff3b30; box-shadow: 0 0 6px rgba(255, 59, 48, 0.6); }
.rec.on { border-color: #ff3b30; color: #fff; background: #5a1512; }
.rec.on i { animation: recblink 1s steps(2) infinite; }
@keyframes recblink { 50% { opacity: 0.25; } }
.reclist { display: flex; flex-direction: column; gap: 8px; }
.recitem { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.ri-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ri-top small { color: var(--muted); font-size: 12px; }
.recitem audio { width: 100%; margin: 8px 0 4px; }
.ri-btns { display: flex; gap: 8px; justify-content: flex-end; }
.ri-btns button { padding: 6px 12px; font-size: 13px; }
/* REC in the corner of the sky, like Camera and Kompas (Richard, 7 Nov 2026) */
.polar-wrap .rec-btn { position: absolute; left: 0; bottom: 0; margin: 0; padding: 6px 10px; font-size: 12px; font-weight: 600; gap: 6px; }
.polar-wrap .rec-btn i { width: 10px; height: 10px; }

/* uplink and downlink side by side (Richard, 7 Nov 2026) */
.freqs { grid-template-columns: 1fr 1fr; gap: 8px; }
.fq { padding: 8px 10px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fq span { font-size: 9.5px; letter-spacing: 0.1em; font-weight: 600; }
.fq span strong { font-weight: 900; }
.fq em { font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: 0.06em; min-height: 13px; opacity: 0.85; }
.fq b { font-size: 21px; letter-spacing: 0.01em; white-space: nowrap; overflow: hidden; }
.fq b .ch { display: block; font-size: 17px; margin: 0 0 2px; vertical-align: 0; }
.fq small { font-size: 10.5px; line-height: 1.3; }

/* locator in white (Richard, 7 Nov 2026) */
.where { color: #fff; font-weight: 700; font-size: 14px; letter-spacing: 0.04em; }

/* the week planner */
.tabs { grid-template-columns: repeat(5, 1fr); }
.weekbar { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { border: 0; border-radius: 0; padding: 8px 14px; background: transparent; font-size: 14px; }
.seg button.on { background: var(--amber); color: #1a1005; font-weight: 800; }
.dayhead { margin: 18px 0 6px; font-size: 14px; color: var(--amber); font-weight: 800; }
.wpass { display: grid; grid-template-columns: 52px 1fr auto 40px; gap: 8px; align-items: center; padding: 9px 10px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 6px; }
.w-time b { display: block; font-size: 16px; font-variant-numeric: tabular-nums; }
.w-time small { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.w-name { font-weight: 700; }
.w-name em { font-style: normal; font-size: 11px; color: var(--muted); margin-left: 6px; font-weight: 600; }
.w-sub { font-size: 12px; color: var(--muted); }
.w-el { font-weight: 800; font-size: 18px; }
.wpass.high .w-el { color: var(--ok); }
.wpass.low { opacity: 0.6; }
.w-cal { padding: 6px; font-size: 18px; background: transparent; border-color: transparent; }

/* START in the hero, the next good pass (7 Nov 2026) */
.next .nx-btns { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; margin-top: 12px; }
.next .nx-btns button { margin: 0; min-height: 56px; font-size: 17px; font-weight: 800; }
.next .nx-start { background: var(--amber); border-color: var(--amber); color: #1a1205; letter-spacing: 0.06em; }
.next.live .nx-start { background: var(--ok); border-color: var(--ok); }
.next .nx-good { margin-top: 8px; font-size: 13px; color: var(--ok); }
.next .nx-good:empty { display: none; }
/* sun or shadow, the age of the orbit */
.sun { font-size: 13px; margin-left: 6px; color: #ffd58f; font-weight: 700; }
.sun.bad { color: var(--red); }
.age { font-weight: 700; }
.age.ok { color: var(--ok); }
.age.old { color: var(--amber); }
.age.stale { color: var(--red); }
.aim-extra { margin-top: 8px; font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.aim-extra .fields { line-height: 1.5; word-spacing: 2px; }
.aim-extra .fields b { color: var(--text); }
/* together with another locator */
.skedbar { display: flex; align-items: flex-end; gap: 12px; margin: 10px 0 0; }
.skedbar label:first-child { flex: 1; }
.skedbar label.inline { margin: 0 0 10px; white-space: nowrap; }
.w-tog { font-size: 12px; color: var(--ok); margin-top: 2px; font-weight: 600; }
.w-tog.no { color: #6f7f9c; font-weight: 400; }
/* the checklist */
.checklist label.inline { margin: 6px 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.row2 button { margin: 0; }
/* the explanation on first open */
.intro { position: fixed; inset: 0; z-index: 80; background: rgba(5, 8, 14, 0.82); display: flex; align-items: flex-end; justify-content: center; padding: 16px 16px calc(env(safe-area-inset-bottom) + 20px); }
.intro-card { width: 100%; max-width: 460px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px 18px 16px; }
.intro-card h3 { margin: 10px 0 8px; font-size: 21px; }
.intro-card p { margin: 0 0 16px; font-size: 15px; line-height: 1.5; color: #cfd6e2; }
.intro-card b { color: var(--amber-hi); }
.intro-dots { display: flex; gap: 6px; }
.intro-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.intro-dots i.on { background: var(--amber); }
.intro-btns { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }
.intro-btns button { margin: 0; min-height: 50px; font-weight: 800; }
.intro-btns .go { background: var(--amber); border-color: var(--amber); color: #1a1205; }

/* the Netlify badge (bottom right, up to 56 px from the bottom): the menu and buttons stay above it */
html.badge { --badge: 60px; }
html.badge .tabs { padding-bottom: max(var(--safe-b), var(--badge)); }
html.badge .ar-bottom { padding-bottom: max(calc(env(safe-area-inset-bottom) + 14px), var(--badge)); }
html.badge .ar-info { bottom: calc(max(calc(env(safe-area-inset-bottom) + 14px), var(--badge)) + 82px); }
html.badge .intro { padding-bottom: calc(var(--badge) + 6px); }
