/* figures for the heading face: Alef's own digits are old-style, these come from Heebo (the body text's file) */
@font-face {
  font-family: 'Display Figures';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/heebo/v28/NGS6v5_NC0k9P9H2TbE.woff2) format('woff2');
  unicode-range: U+0025, U+002B, U+002E, U+0030-003A, U+00B0, U+00D7, U+2212;
}

:root {
  --bg: #060914;
  --bg2: #0b1124;
  --card: rgba(17, 26, 48, 0.86);
  --line: #1f2c4f;
  --line2: #2c3d6b;
  --text: #e9edf7;
  --muted: #95a1bf;
  --gold: #f3c969;
  --blue: #86b6ff;
  --good: #6fd39a;
  --warn: #f0b35a;
  --bad: #ef7d7d;
  --display: 'Display Figures', 'Alef', 'Heebo', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif; /* headings and sub-headings only */
  --sans: 'Heebo', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body {
  background: radial-gradient(1100px 520px at 85% -10%, #15224d 0%, transparent 62%), var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  overflow: hidden;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--blue); }
h2, h3, h4, p { margin: 0; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

#app { height: 100dvh; display: grid; grid-template-rows: auto auto 1fr auto; }

/* ---------- date strip: Gregorian date, Hebrew date, current zodiac sign ---------- */
.datebar {
  display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%;
  padding: 5px 10px; border: 0; border-bottom: 1px solid var(--line);
  background: rgba(9, 14, 30, 0.92); color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; z-index: 5;
  flex-wrap: wrap; row-gap: 1px;
}
.datebar .sunset b { color: #ffb86b; }
.datebar b { color: var(--text); font-weight: 500; }
.datebar .zod { color: var(--gold); font-weight: 700; }
.datebar .dotsep { opacity: 0.45; }
.today-sheet h2 { font-family: var(--display); font-size: 26px; color: #fbf6e6; margin-top: 6px; }
.planet-signs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; margin-top: 8px; }
.planet-signs div { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.planet-signs span { color: var(--muted); }
.planet-signs em { font-style: normal; color: var(--warn); font-size: 12px; }

/* ---------- top bar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: calc(8px + var(--safe-t)) 14px 8px;
  background: rgba(6, 9, 20, 0.82); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); z-index: 5;
}
.brand { font-family: var(--display); font-weight: 700; font-size: 21px; letter-spacing: 0.3px; color: var(--gold); }
.top-actions { display: flex; align-items: center; gap: 8px; min-width: 0; }
.loc-chip {
  display: flex; align-items: center; gap: 5px; max-width: 36vw;
  padding: 6px 11px; border-radius: 999px; background: #121c38; border: 1px solid var(--line2);
}
.loc-chip svg { width: 16px; height: 16px; flex: none; color: var(--blue); }
.loc-chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13.5px; }
.loc-chip.attn { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(243, 201, 105, 0.15); }
.icon-btn { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #121c38; border: 1px solid var(--line2); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn.on { background: #5a1414; border-color: #c33; color: #ff9d9d; }
#btn-field { position: relative; flex: none; }
#btn-field .dot { position: absolute; top: 4px; right: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--warn); border: 2px solid #121c38; }
#btn-field.ok .dot { background: var(--good); }
#btn-field.offline { border-color: var(--bad); color: var(--bad); }
.field-sheet h2 { font-family: var(--display); font-size: 26px; color: #fbf6e6; margin-top: 6px; }
.field-sheet .verdict { margin: 12px 0; }
.checks .tick { width: 22px; text-align: center; font-weight: 700; color: var(--muted); }
.checks li.ok .tick { color: var(--good); }
.checks li.no .tick { color: var(--bad); }
.field-sheet .btn.wide { margin: 12px 0 6px; }
.btn:disabled { opacity: 0.55; }

/* ---------- tabs ---------- */
main { position: relative; overflow: hidden; }
.tab { position: absolute; inset: 0; display: none; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.tab.active { display: block; }
.page { max-width: 620px; margin: 0 auto; padding: 14px 14px 28px; display: flex; flex-direction: column; gap: 12px; }

.tabbar {
  display: grid; grid-template-columns: repeat(6, 1fr);
  padding: 6px 4px calc(6px + var(--safe-b));
  background: rgba(6, 9, 20, 0.94); border-top: 1px solid var(--line); z-index: 5;
}
.tabbar button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 0; background: none; border: 0; color: var(--muted); font-size: 11.5px; border-radius: 12px; }
.tabbar button.on { color: var(--gold); }
.tabbar button.on svg { fill: rgba(243, 201, 105, 0.16); }

/* ---------- generic pieces ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.card h3 { font-family: var(--display); font-size: 18px; font-weight: 700; margin-bottom: 8px; color: #f5f0e1; }
.muted { color: var(--muted); }
.sm { font-size: 12.5px; }
.center { text-align: center; }
.pad { padding: 14px 4px; }
.grow { flex: 1; min-width: 0; }
.sep { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.big { font-family: var(--display); font-size: 42px; font-weight: 700; line-height: 1.05; color: var(--gold); }
.big small { font-family: var(--sans); font-size: 14px; font-weight: 400; color: var(--muted); }
.big-line { font-size: 17px; font-weight: 700; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none;
  padding: 10px 14px; border-radius: 12px; background: #18233f; border: 1px solid var(--line2); color: var(--text); font-weight: 500;
}
.btn.primary { background: var(--gold); border-color: var(--gold); color: #1c1503; font-weight: 700; }
.btn.ghost { background: transparent; }
.btn.ghost.active { border-color: var(--gold); color: var(--gold); }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 10px; }
.btn.wide { width: 100%; }
.btn:active { transform: scale(0.98); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip-btn { flex: none; padding: 7px 13px; border-radius: 999px; background: rgba(18, 28, 56, 0.85); border: 1px solid var(--line2); color: var(--muted); font-size: 13.5px; white-space: nowrap; }
.chip-btn.on { background: rgba(243, 201, 105, 0.16); border-color: var(--gold); color: var(--gold); }
.chip { display: inline-block; padding: 2px 10px; border-radius: 999px; background: rgba(134, 182, 255, 0.14); color: var(--blue); font-size: 12.5px; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; background: rgba(134, 182, 255, 0.14); color: var(--blue); font-size: 12px; white-space: nowrap; }
.badge { display: inline-block; margin-top: 8px; padding: 4px 10px; border-radius: 8px; background: rgba(134, 182, 255, 0.14); color: var(--blue); font-size: 13px; }
.badge.gold { background: rgba(243, 201, 105, 0.16); color: var(--gold); }
.badge.sm { margin: 0 4px; padding: 1px 7px; font-size: 11.5px; }

.facts { margin: 12px 0 0; display: flex; flex-direction: column; }
.fact { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.fact:last-child { border-bottom: 0; }
.fact dt { color: var(--muted); flex: none; max-width: 45%; }
.fact dd { margin: 0; text-align: left; font-weight: 500; }
.facts.compact .fact { padding: 6px 0; }

.verdict { padding: 9px 12px; border-radius: 10px; font-weight: 500; background: rgba(134, 182, 255, 0.1); }
.verdict.good { background: rgba(111, 211, 154, 0.13); color: var(--good); }
.verdict.mid { background: rgba(240, 179, 90, 0.13); color: var(--warn); }
.verdict.bad { background: rgba(239, 125, 125, 0.12); color: var(--bad); }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.mini-moon { flex: none; }

/* ---------- sky ---------- */
#tab-sky { overflow: hidden; background: #05070f; touch-action: none; }
#sky-canvas, #sky-gl { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
#sky-gl { pointer-events: none; }
#sky-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; }
#tab-sky.has-camera #sky-video { display: block; }
/* over the live camera the sky glow is added to the picture instead of covering it */
#tab-sky.has-camera #sky-gl { mix-blend-mode: screen; }

.sim-ui { position: absolute; inset: 0; pointer-events: none; }
.sim-label { position: absolute; top: 52px; padding: 4px 10px; border-radius: 999px; background: rgba(4, 7, 16, 0.72); font-size: 12px; white-space: nowrap; }
.sim-label.cam { right: 10px; color: #cfd6ea; }
.sim-label.app { left: 10px; color: var(--gold); }
.sim-divider { position: absolute; top: 0; bottom: 0; width: 44px; margin-left: -22px; pointer-events: auto; touch-action: none; cursor: ew-resize; display: grid; place-items: center; }
.sim-divider i { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--gold); color: #1c1503; font-style: normal; font-size: 20px; font-weight: 700; box-shadow: 0 2px 14px rgba(0, 0, 0, 0.6); }
.sim-stats { position: absolute; bottom: 124px; inset-inline: 12px; margin: 0 auto; max-width: 520px; padding: 8px 12px; border-radius: 12px; background: rgba(4, 7, 16, 0.78); border: 1px solid var(--line2); font-size: 12.5px; text-align: center; color: #dbe1f1; }
.sky-tip { position: absolute; bottom: 124px; inset-inline: 12px; margin: 0 auto; max-width: 420px; padding: 7px 12px; border-radius: 999px; background: rgba(4, 7, 16, 0.7); font-size: 12.5px; text-align: center; color: var(--muted); pointer-events: none; }
#tab-sky.sim .sky-tip, #tab-sky.ar .sky-tip { display: none; }
.sky-top { position: absolute; top: 10px; inset-inline: 12px; display: flex; justify-content: space-between; align-items: center; gap: 8px; pointer-events: none; }
.sky-readout { padding: 5px 8px; border-radius: 999px; background: rgba(6, 9, 20, 0.6); font-size: 12px; color: var(--gold); white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; }
.sky-top .sky-time { flex: none; }
.sky-top .sky-time button { padding-inline: 7px; min-height: 36px; }
.sky-time { display: flex; pointer-events: auto; background: rgba(6, 9, 20, 0.6); border: 1px solid var(--line2); border-radius: 999px; overflow: hidden; }
.sky-time button { background: none; border: 0; padding: 5px 10px; font-size: 13px; color: var(--muted); }
.sky-time button#sky-time-label { color: var(--text); font-weight: 500; border-inline: 1px solid var(--line2); min-width: 56px; }
.sky-time button[data-act="date"] { border-inline-start: 1px solid var(--line2); display: grid; place-items: center; padding: 5px 9px; }
.sky-time svg { width: 16px; height: 16px; }
.sky-date { position: absolute; top: 44px; left: 12px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.sky-hint { position: absolute; top: 50px; inset-inline: 12px; margin: 0 auto; max-width: 520px; padding: 7px 12px; border-radius: 10px; background: rgba(6, 9, 20, 0.7); color: var(--muted); font-size: 12.5px; text-align: center; pointer-events: none; }
.sky-target { position: absolute; bottom: 118px; left: 50%; transform: translateX(-50%); padding: 9px 16px; border-radius: 999px; background: rgba(6, 9, 20, 0.82); border: 1px solid var(--gold); color: var(--gold); font-weight: 700; white-space: nowrap; }
.sky-controls { position: absolute; bottom: 14px; inset-inline: 12px; display: flex; flex-direction: column; align-items: center; gap: 9px; pointer-events: none; }
.sky-controls > * { pointer-events: auto; }
.fab { display: flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px; background: var(--gold); border: 0; color: #1c1503; font-weight: 700; font-size: 16px; box-shadow: 0 6px 22px rgba(243, 201, 105, 0.28); }
.fab.on, .fab.alt { background: rgba(6, 9, 20, 0.85); color: var(--gold); border: 1px solid var(--gold); box-shadow: none; }
.fab.alt { padding: 12px 16px; }
.sky-main { display: flex; gap: 8px; align-items: center; }

/* step-by-step "find it yourself" lessons */
#tab-sky.lesson .sky-controls, #tab-sky.lesson .sky-tip { display: none; }
.lesson-card { position: absolute; bottom: 12px; inset-inline: 10px; margin: 0 auto; max-width: 540px; padding: 12px 14px; border-radius: 16px; background: rgba(8, 12, 26, 0.93); border: 1px solid var(--gold); }
.lesson-title { font-family: var(--display); font-weight: 700; font-size: 17px; color: var(--gold); padding-inline-end: 36px; margin-bottom: 4px; }
.lesson-card p { font-size: 14.5px; color: #e4e9f6; }
.lesson-x { position: absolute; top: 8px; left: 8px; width: 30px; height: 30px; border-radius: 50%; background: #18233f; border: 1px solid var(--line2); }
.lesson-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.lesson-nav .btn:disabled { opacity: 0.35; }

/* the sky menu */
.sky-menu h2 { font-family: var(--display); font-size: 26px; color: #fbf6e6; margin-top: 6px; }
.sky-menu h3 { font-family: var(--display); font-size: 18px; color: var(--gold); margin: 20px 0 6px; padding-bottom: 5px; border-bottom: 1px solid var(--line); }
.menu-planets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.menu-planet { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 2px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; font-size: 13px; }
.menu-planet .en { font-size: 11px; }
.menu-planet .up-badge { font-size: 10.5px; padding: 1px 5px; margin-top: 2px; }
.menu-pic { height: 54px; display: grid; place-items: center; }
.gap-top { margin-top: 8px; }

/* real photographs, shown as through an eyepiece */
.portrait { display: grid; place-items: center; flex: none; border-radius: 50%; overflow: hidden; background: #000; box-shadow: 0 0 0 2px #26345c, 0 0 20px rgba(120, 160, 255, 0.2); }
.portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.portrait.wide { border-radius: 22px; }
.sky-zoom { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.sky-zoom button { width: 42px; height: 42px; border-radius: 50%; background: rgba(6, 9, 20, 0.78); border: 1px solid var(--line2); color: var(--gold); font-size: 24px; line-height: 1; }
.sky-zoom span { font-size: 12px; color: var(--gold); background: rgba(6, 9, 20, 0.6); padding: 1px 7px; border-radius: 999px; }
.sky-zoom .sky-count { color: var(--muted); font-size: 10.5px; white-space: nowrap; }
#tab-sky.lesson .sky-zoom { top: 34%; }
.portrait.fx { background: none; box-shadow: none; border-radius: 0; overflow: visible; width: auto !important; height: auto !important; }
.portrait.fx canvas { display: block; }
.portrait.plain { background: none; box-shadow: none; border-radius: 0; overflow: visible; width: auto !important; height: auto !important; }
.photo-credit { margin-top: 8px; }
.photo-credit:empty { display: none; }
.sky-toggles { display: flex; gap: 7px; max-width: 100%; overflow-x: auto; scrollbar-width: none; padding: 0 2px; }
.sky-toggles::-webkit-scrollbar { display: none; }
.sky-toggles .chip-btn { padding: 7px 11px; }
.sky-time button[data-act="t-play"] { border-inline-start: 1px solid var(--line2); color: var(--gold); min-width: 34px; }
.sky-time button[data-act="t-play"].on { background: rgba(243, 201, 105, 0.18); }
.sky-time button#sky-time-label { touch-action: none; cursor: ew-resize; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; padding-block: 3px; white-space: nowrap; }
.sky-time button#sky-time-label small { font-size: 9.5px; color: var(--muted); font-weight: 400; }
.sky-time { align-items: stretch; }
.sky-loading { position: absolute; top: 45%; left: 50%; transform: translate(-50%, -50%); padding: 12px 18px; border-radius: 12px; background: rgba(6, 9, 20, 0.85); border: 1px solid var(--line2); text-align: center; max-width: 82%; }

/* ---------- moon ---------- */
.daynav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.moon-hero { display: flex; align-items: center; gap: 16px; }
.moon-hero canvas { flex: none; filter: drop-shadow(0 0 22px rgba(240, 235, 210, 0.22)); }
.moon-hero h2 { font-family: var(--display); font-size: 22px; margin: 2px 0 4px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 8px; text-align: center; display: flex; flex-direction: column; gap: 1px; }
.stat span { color: var(--muted); font-size: 12.5px; }
.stat b { font-family: var(--display); font-size: 24px; color: var(--gold); }
.stat em { font-style: normal; font-size: 12.5px; color: var(--muted); }
.strip { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; }
.strip-day { flex: none; width: 62px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 12px; border: 1px solid var(--line); font-size: 12.5px; }
.strip-day.today { border-color: var(--gold); background: rgba(243, 201, 105, 0.07); }

/* ---------- events ---------- */
.highlight { display: flex; align-items: center; gap: 14px; border-color: rgba(243, 201, 105, 0.5); background: linear-gradient(135deg, rgba(243, 201, 105, 0.12), rgba(17, 26, 48, 0.86) 60%); }
.hl-icon { font-size: 34px; }
.reminders { display: flex; flex-direction: column; gap: 10px; }
.month { font-family: var(--display); font-size: 17px; color: var(--muted); margin: 8px 2px 0; }
.event { display: flex; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.event.r3 { border-color: rgba(243, 201, 105, 0.45); }
.event.soon { box-shadow: inset 3px 0 0 var(--gold); }
.ev-icon { font-size: 24px; line-height: 1.3; }
.ev-main { flex: 1; min-width: 0; }
.ev-title { font-weight: 700; font-size: 16px; }
.ev-date { color: var(--muted); font-size: 13px; margin-top: 1px; }
.ev-desc { margin: 7px 0 9px; font-size: 14px; color: #cfd6ea; }
.ev-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-inline-end: 6px; }
.shower-facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.shower-facts span { padding: 2px 9px; border-radius: 999px; background: rgba(134, 182, 255, 0.12); color: var(--blue); font-size: 12px; }
.shower-facts .q3 { background: rgba(111, 211, 154, 0.13); color: var(--good); }
.shower-facts .q2 { background: rgba(240, 179, 90, 0.13); color: var(--warn); }
.shower-facts .q1 { background: rgba(239, 125, 125, 0.12); color: var(--bad); }
.card.guide p { margin-bottom: 8px; font-size: 14.5px; color: #dbe1f1; }
.dot.q3 { background: var(--good); } .dot.q2 { background: var(--warn); } .dot.q1 { background: var(--bad); }

/* ---------- dark ---------- */
.map-wrap { position: relative; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
.map { height: 340px; direction: ltr; background: #0a0f1e; }
.map-legend { position: absolute; bottom: 8px; right: 8px; z-index: 500; display: flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 8px; background: rgba(6, 9, 20, 0.8); font-size: 11.5px; color: var(--muted); }
.map-legend i { display: flex; border: 1px solid #3a4770; }
.map-legend b { width: 9px; height: 10px; display: block; }
.leaflet-container { font-family: var(--sans); background: #0a0f1e; }
.base-tiles { filter: invert(1) hue-rotate(180deg) brightness(0.85) contrast(0.9) saturate(0.6); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: #111a30; color: var(--text); }
.leaflet-popup-content { direction: rtl; text-align: right; margin: 10px 14px; }
.leaflet-control-attribution { background: rgba(6, 9, 20, 0.7) !important; color: #7f8aa8 !important; font-size: 9.5px !important; }
.leaflet-control-attribution a { color: #9fb2de !important; }
.leaflet-bar a { background: #111a30 !important; color: var(--text) !important; border-color: var(--line2) !important; }
.site-pin { color: var(--gold); font-size: 18px; line-height: 22px; text-align: center; text-shadow: 0 0 4px #000, 0 0 2px #000; }
.zone-dot { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.55); }
.lp-head { display: flex; align-items: center; gap: 12px; }
.lp-head .zone-dot { width: 34px; height: 34px; }
.spot { display: flex; align-items: center; gap: 11px; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.spot:last-child { border-bottom: 0; }
.spot-actions { display: flex; flex-direction: column; gap: 5px; flex: none; }
.cloud-bars { display: flex; align-items: flex-end; gap: 3px; height: 62px; margin-top: 12px; direction: ltr; }
.cloud-bars div { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px; font-size: 10px; color: var(--muted); }
.cloud-bars i { display: block; width: 100%; max-width: 16px; border-radius: 3px 3px 0 0; background: linear-gradient(#8fa3d1, #4b5b8c); }

/* ---------- search ---------- */
.search-box input, .search-row input {
  width: 100%; padding: 12px 14px; border-radius: 12px; background: #0e1730; border: 1px solid var(--line2);
  color: var(--text); font: inherit; outline: none;
}
.search-box input:focus, .search-row input:focus { border-color: var(--gold); }
.search-row { display: flex; gap: 8px; margin: 12px 0; }
.result { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 4px; background: none; border: 0; border-bottom: 1px solid var(--line); text-align: right; }
.en { color: var(--muted); font-size: 12.5px; font-weight: 400; }
.planet-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 10px; }
.planet-card { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 10px 8px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.planet-card b { font-size: 16px; }
.planet-pic { height: 108px; margin-bottom: 4px; display: grid; place-items: center; overflow: visible; pointer-events: none; }
.planet-card b, .planet-card span:not(.planet-pic) { position: relative; z-index: 1; }
.info-head.with-art { display: flex; align-items: center; gap: 14px; }
.planet-art { flex: none; display: grid; place-items: center; }
.up-badge { flex: none; font-size: 12px; padding: 3px 8px; border-radius: 8px; }
.up-badge.up { background: rgba(111, 211, 154, 0.13); color: var(--good); }
.up-badge.down { background: rgba(149, 161, 191, 0.12); color: var(--muted); }

/* ---------- sheet ---------- */
.sheet { position: fixed; inset: 0; z-index: 60; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.55); opacity: 0; transition: opacity 0.2s; }
.sheet-panel {
  position: absolute; bottom: 0; left: 0; right: 0; margin: 0 auto; max-width: 620px; max-height: 88dvh;
  display: flex; flex-direction: column; background: #0d1530; border: 1px solid var(--line2); border-bottom: 0;
  border-radius: 22px 22px 0 0; transform: translateY(100%); transition: transform 0.22s ease-out;
}
.sheet.open .sheet-backdrop { opacity: 1; }
.sheet.open .sheet-panel { transform: translateY(0); }
.sheet-grab { padding: 10px 0 6px; display: grid; place-items: center; touch-action: none; cursor: grab; }
.sheet-grab i { width: 44px; height: 5px; border-radius: 3px; background: #33437a; }
.sheet-close { position: absolute; top: 10px; left: 12px; width: 34px; height: 34px; border-radius: 50%; background: #18233f; border: 1px solid var(--line2); z-index: 2; }
.sheet-body { overflow-y: auto; padding: 2px 18px calc(24px + var(--safe-b)); -webkit-overflow-scrolling: touch; }

.info-head h2, .loc-sheet h2 { font-family: var(--display); font-size: 28px; line-height: 1.2; margin-top: 6px; color: #fbf6e6; }
.info-sub { color: var(--muted); font-size: 13.5px; text-align: right; }
.info-now { margin: 12px 0; padding: 8px 12px; border-radius: 10px; font-size: 14px; }
.info-now.up { background: rgba(111, 211, 154, 0.13); color: var(--good); }
.info-now.down { background: rgba(149, 161, 191, 0.12); color: var(--muted); }
.info-sec { margin-top: 20px; }
.info-sec h3 { font-family: var(--display); font-size: 19px; color: var(--gold); margin-bottom: 8px; padding-bottom: 5px; border-bottom: 1px solid var(--line); }
.info-sec p { margin-bottom: 9px; color: #dbe1f1; }
.myth-item { margin-bottom: 11px; padding-inline-start: 11px; border-inline-start: 2px solid var(--line2); }
.myth-item h4 { font-size: 13.5px; color: var(--blue); font-weight: 700; }
.myth-item p { margin: 1px 0 0; }
.note, .info-sec p.note { color: var(--muted); font-size: 12.5px; }
.zodiac-card { border: 1px solid var(--line); border-radius: 12px; padding: 4px 12px; margin-bottom: 10px; }
.zodiac-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.zodiac-row:last-child { border-bottom: 0; }
.zodiac-row span { color: var(--muted); }
.wiki-card { overflow: hidden; }
.wiki-card img { float: left; max-width: 38%; max-height: 150px; margin: 2px 12px 6px 0; border-radius: 10px; }
.wiki-link { display: inline-block; margin-top: 2px; font-size: 13.5px; }
.loc-sheet p { margin-top: 6px; }

/* ---------- top bar with four buttons ---------- */
.brand { font-size: 19.5px; white-space: nowrap; }
.top-actions { gap: 6px; }
.loc-chip { max-width: 30vw; min-width: 0; padding: 6px 9px; }
.icon-btn { flex: none; }
.icon-btn.active { border-color: var(--gold); color: var(--gold); }

/* ---------- the lesson card (guided lessons and the quiz, over the sky map) ---------- */
#tab-sky.lesson .sky-top, #tab-sky.lesson .sky-hint, #tab-sky.lesson .sky-target, #tab-sky.lesson .sky-zoom { display: none; }
body.in-lesson #toast { bottom: auto; top: calc(118px + var(--safe-t)); }
.lesson-card { padding: 11px 14px 12px; border-radius: 20px; background: rgba(8, 12, 28, 0.94); border: 1px solid rgba(243, 201, 105, 0.6); box-shadow: 0 -8px 34px rgba(0, 0, 0, 0.55); backdrop-filter: blur(8px); }
.lesson-head { display: flex; align-items: center; gap: 8px; }
.lesson-title { flex: 1; min-width: 0; padding: 0; margin: 0; font-family: var(--sans); font-weight: 500; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lesson-x { position: static; flex: none; width: 30px; height: 30px; font-size: 13px; }
.lesson-dots { display: flex; gap: 5px; margin: 7px 0 9px; direction: rtl; }
.lesson-dots i { flex: 1; height: 4px; border-radius: 2px; background: #22305a; transition: background 0.3s; }
.lesson-dots i.done { background: rgba(243, 201, 105, 0.45); }
.lesson-dots i.on { background: var(--gold); box-shadow: 0 0 8px rgba(243, 201, 105, 0.6); }
.lesson-dots i.bad { background: rgba(239, 125, 125, 0.65); }
.lesson-step { font-family: var(--display); font-weight: 700; font-size: 19px; line-height: 1.25; color: #fbf6e6; margin-bottom: 4px; }
.lesson-card p { font-size: 15px; line-height: 1.5; color: #e4e9f6; }
.lesson-ask { margin-top: 9px; }
.ask-prompt { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; background: rgba(160, 235, 255, 0.1); border: 1px dashed rgba(160, 235, 255, 0.55); color: #c8f1ff; font-size: 15px; }
.ask-pulse { flex: none; width: 12px; height: 12px; border-radius: 50%; background: #a0ebff; box-shadow: 0 0 0 0 rgba(160, 235, 255, 0.7); animation: ask-pulse 1.5s infinite; }
@keyframes ask-pulse { 0% { box-shadow: 0 0 0 0 rgba(160, 235, 255, 0.7); } 100% { box-shadow: 0 0 0 12px rgba(160, 235, 255, 0); } }
.ask-msg { margin-top: 7px; padding: 8px 12px; border-radius: 10px; font-size: 14.5px; font-weight: 500; }
.ask-msg.ok { margin-top: 0; background: rgba(111, 211, 154, 0.15); color: var(--good); }
.ask-msg.miss { background: rgba(240, 179, 90, 0.13); color: var(--warn); }
.quiz-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quiz-opt { padding: 12px 8px; border-radius: 13px; background: #111b38; border: 1px solid var(--line2); font-size: 15px; font-weight: 500; }
.quiz-opt.right { background: rgba(111, 211, 154, 0.18); border-color: var(--good); color: var(--good); }
.quiz-opt.wrong { background: rgba(239, 125, 125, 0.16); border-color: var(--bad); color: var(--bad); }
.quiz-opt.dim { opacity: 0.4; }
.lesson-nav { gap: 8px; margin-top: 11px; }
.lesson-nav .btn { padding: 10px 16px; font-size: 14.5px; border-radius: 12px; }
.lesson-nav .btn[data-act="lesson-next"], .lesson-nav .btn[data-slide="1"] { flex: 1; }
.lesson-nav .btn[hidden] { display: none; }

.learn-nudge { position: absolute; bottom: 166px; inset-inline: 14px; margin: 0 auto; max-width: 430px; padding: 10px 14px; border-radius: 14px; background: rgba(20, 26, 48, 0.88); border: 1px solid rgba(243, 201, 105, 0.65); color: #dfe6f7; font-size: 13.5px; text-align: center; backdrop-filter: blur(6px); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4); }
.learn-nudge b { color: var(--gold); }
#tab-sky.lesson .learn-nudge, #tab-sky.sim .learn-nudge, #tab-sky.ar .learn-nudge { display: none; }
.lesson-link { display: flex; flex-direction: column; align-items: center; gap: 1px; border-color: rgba(243, 201, 105, 0.55); }
.lesson-link b { color: var(--gold); }
.lesson-link span { font-size: 12.5px; color: var(--muted); }

/* ---------- "learn" tab ---------- */
.learn { gap: 14px; }
.lr-hero { position: relative; overflow: hidden; padding: 16px; border-radius: 22px; border: 1px solid #2f4175;
  background:
    radial-gradient(1.5px 1.5px at 4% 9%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 9% 52%, #cfe0ff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 97% 8%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 2.5% 93%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 97.5% 95%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 14% 6%, #ffe6b0 50%, transparent 51%),
    radial-gradient(130% 150% at 90% 0%, #2a3f7e 0%, #121d40 52%, #0a1126 100%); }
.lr-hero-top { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.lr-hero h2 { font-family: var(--display); font-size: 23px; line-height: 1.2; color: #fbf6e6; }
.lr-hero p { margin-top: 4px; font-size: 14px; color: #c9d3ec; }
.lr-ring { position: relative; flex: none; width: 70px; height: 70px; }
.lr-ring svg { width: 70px; height: 70px; stroke-width: 6; }
.lr-ring .bg { stroke: rgba(255, 255, 255, 0.12); }
.lr-ring .fg { stroke: var(--gold); transition: stroke-dasharray 0.6s; }
.lr-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: 21px; color: var(--gold); direction: ltr; }
.lr-ring b small { font-size: 12px; color: var(--muted); font-weight: 400; }
.lr-ring b { display: flex; align-items: baseline; justify-content: center; padding-top: 22px; }
.lr-tour { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 14px; border-radius: 18px; text-align: right;
  background: linear-gradient(100deg, rgba(243, 201, 105, 0.17), rgba(134, 182, 255, 0.1)); border: 1px solid rgba(243, 201, 105, 0.5); }
.lr-tour .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lr-tour b { font-size: 16px; color: #fbf6e6; }
.lr-tour-ico { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(243, 201, 105, 0.16); color: var(--gold); }
.lr-tour-ico svg { width: 26px; height: 26px; }
.lr-go { flex: none; font-size: 26px; color: var(--gold); line-height: 1; }
.lr-chapter { margin-top: 4px; }
.lr-chap-head { display: flex; align-items: flex-start; gap: 10px; margin: 4px 2px 10px; }
.lr-chap-num { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--gold); color: #1c1503; font-family: var(--display); font-weight: 700; font-size: 16px; }
.lr-chap-head h3 { font-family: var(--display); font-size: 19.5px; line-height: 1.25; color: #f5f0e1; }
.lr-path { position: relative; display: flex; flex-direction: column; gap: 8px; padding-inline-start: 24px; }
.lr-path::before { content: ''; position: absolute; top: 14px; bottom: 14px; inset-inline-start: 8px; width: 2px; background: var(--line2); }
.lr-lesson { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); text-align: right; }
.lr-lesson:active { transform: scale(0.99); }
.lr-lesson.next { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(243, 201, 105, 0.13); }
.lr-node { position: absolute; inset-inline-start: -24px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; background: #0b1226; border: 2px solid var(--line2); display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #06210f; }
.lr-lesson.done .lr-node { background: var(--good); border-color: var(--good); }
.lr-lesson.next .lr-node { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 0 4px rgba(243, 201, 105, 0.2); }
.lr-thumb { flex: none; width: 64px; height: 64px; border-radius: 14px; border: 1px solid var(--line2); overflow: hidden; }
.lr-icon { display: grid; place-items: center; background: radial-gradient(circle at 50% 35%, #15224a, #060a17); color: var(--gold); }
.lr-icon svg { width: 42px; height: 42px; stroke-width: 2; }
.lr-lesson .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lr-lesson b { font-size: 15.5px; line-height: 1.3; }
.lr-sub { line-height: 1.35; }
.lr-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 4px; }
.lr-meta .pill { font-size: 11.5px; }
.lr-vis { padding: 2px 8px; border-radius: 999px; font-size: 11.5px; white-space: nowrap; }
.lr-vis.now { background: rgba(111, 211, 154, 0.15); color: var(--good); }
.lr-vis.tonight { background: rgba(243, 201, 105, 0.14); color: var(--gold); }
.lr-vis.season { background: rgba(149, 161, 191, 0.12); color: var(--muted); }
.lr-quiz { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lr-quiz-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 13px; border-radius: 16px; background: var(--card); border: 1px solid var(--line2); text-align: right; }
.lr-quiz-btn b { font-size: 16px; color: var(--gold); }

/* illustrated basics */
.slides h2 { font-family: var(--display); font-size: 24px; line-height: 1.25; color: #fbf6e6; }
.slides p#slide-text { margin-top: 6px; min-height: 92px; font-size: 15.5px; line-height: 1.55; color: #dbe1f1; }
.slides .lesson-dots { margin: 12px 0 10px; }
.slide-art { display: grid; place-items: center; min-height: 190px; margin-top: 10px; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: radial-gradient(120% 120% at 50% 0%, #131f45, #060a17); }
.slide-art svg { width: 100%; max-width: 350px; height: auto; stroke-width: 1.5; }
.slide-art canvas { display: block; }
.slide-art.seasons { grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px; }
.slide-art.seasons div { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 12.5px; color: var(--gold); }
.slide-art.seasons canvas { border-radius: 10px; max-width: 100%; }
.kinds { width: 100%; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.kinds > div { display: grid; grid-template-columns: 92px 76px 1fr; align-items: center; gap: 10px; font-size: 14px; }
.kinds em { font-style: normal; font-size: 13px; color: var(--muted); }
.k-strip { position: relative; height: 26px; border-radius: 8px; background: #03050b; border: 1px solid var(--line); overflow: hidden; direction: ltr; }
.k-strip i { position: absolute; top: 50%; left: 50%; width: 7px; height: 7px; margin: -3.5px; border-radius: 50%; background: #fff; box-shadow: 0 0 8px #fff; }
.k-star { animation: k-tw 0.9s infinite; }
.k-strip i.k-planet { width: 9px; height: 9px; margin: -4.5px; background: #ffe9b0; box-shadow: 0 0 11px #ffd27a; }
.k-sat { animation: k-move 5s linear infinite; }
.k-plane { animation: k-move 3.2s linear infinite, k-blink 0.7s steps(1) infinite; }
.k-strip i.k-meteor { width: 28px; height: 2px; margin: -1px 0 0; border-radius: 2px; background: linear-gradient(90deg, transparent, #fff); box-shadow: none; animation: k-met 2.6s ease-in infinite; }
@keyframes k-tw { 0%, 100% { opacity: 1; transform: scale(1); } 20% { opacity: 0.35; transform: scale(0.7); } 45% { opacity: 0.9; transform: scale(1.15); } 70% { opacity: 0.5; transform: scale(0.8); } }
@keyframes k-move { from { left: -6%; } to { left: 106%; } }
@keyframes k-blink { 0% { background: #ff5a5a; box-shadow: 0 0 9px #ff5a5a; } 50% { background: #6dff9a; box-shadow: 0 0 9px #6dff9a; } }
@keyframes k-met { 0%, 68% { left: -30%; opacity: 0; } 72% { opacity: 1; } 100% { left: 112%; opacity: 0; } }
.prep-list { list-style: none; width: 100%; margin: 0; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.prep-list li { display: flex; align-items: center; gap: 11px; font-size: 14.5px; color: #dbe1f1; }
.prep-list i { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: rgba(243, 201, 105, 0.15); color: var(--gold); font-style: normal; font-size: 16px; }

/* the drawings are little films: their parts appear in the order of the explanation */
.slide-art { position: relative; }
.a-fade { animation: a-fade 0.6s ease-out both; }
.a-pop { transform-box: fill-box; transform-origin: center; animation: a-pop 0.55s cubic-bezier(0.2, 1.5, 0.4, 1) both; }
.a-draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: a-draw 0.9s ease-out both; }
.a-grow { transform-box: fill-box; transform-origin: 50% 100%; animation: a-grow 0.8s ease-out both; }
.a-tw { animation: a-tw 2.4s ease-in-out infinite; }
.a-ping { transform-box: fill-box; transform-origin: center; animation: a-ping 2s ease-out infinite both; }
.a-flick { transform-box: fill-box; transform-origin: center; animation: a-flick 2.8s ease-in-out infinite; }
.a-march { animation: a-march 1.6s linear infinite; }
.a-sunset { animation: a-sunset 1.6s ease-in both; }
.a-dilate { transform-box: fill-box; transform-origin: center; animation: a-dilate 1s ease-out both; }
.a-cover { animation: a-cover 7s ease-in-out 2.4s infinite; }
.a-in { animation: a-rise 0.45s ease-out both; }
#slide-text.a-in { animation-delay: 0.08s; }
@keyframes a-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes a-pop { 0% { opacity: 0; transform: scale(0.35); } 100% { opacity: 1; transform: scale(1); } }
@keyframes a-draw { to { stroke-dashoffset: 0; } }
@keyframes a-grow { from { opacity: 0; transform: scaleY(0); } to { opacity: 1; transform: scaleY(1); } }
@keyframes a-tw { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
@keyframes a-ping { 0% { opacity: 0.9; transform: scale(1); } 100% { opacity: 0; transform: scale(3.4); } }
@keyframes a-flick { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.09); } }
@keyframes a-march { to { stroke-dashoffset: -26; } }
@keyframes a-sunset { from { opacity: 0; transform: translateY(-46px); } to { opacity: 1; transform: none; } }
@keyframes a-dilate { from { transform: scale(0.3); } to { transform: scale(1); } }
@keyframes a-cover { 0%, 10% { transform: none; } 38%, 66% { transform: translateX(-94px); } 94%, 100% { transform: none; } }
@keyframes a-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.slide-bar { display: flex; align-items: center; gap: 10px; margin: 10px 0 8px; }
.slide-bar .lesson-dots { flex: 1; margin: 0; }
.art-replay { flex: none; display: flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 999px; background: #111b38; border: 1px solid var(--line2); color: var(--gold); font-size: 12.5px; }
.art-replay svg { width: 15px; height: 15px; stroke-width: 2; transition: transform 0.4s; }
.art-replay:active svg { transform: rotate(-200deg); }
.slide-art.seasons div { padding: 4px; border-radius: 12px; animation: a-season 7.2s ease-in-out infinite; }
.slide-art.seasons div:nth-child(2) { animation-delay: 1.8s; }
.slide-art.seasons div:nth-child(3) { animation-delay: 3.6s; }
.slide-art.seasons div:nth-child(4) { animation-delay: 5.4s; }
@keyframes a-season { 0%, 22% { background: rgba(243, 201, 105, 0.16); box-shadow: 0 0 0 1.5px var(--gold); transform: scale(1.04); } 28%, 100% { background: transparent; box-shadow: 0 0 0 1.5px transparent; transform: none; } }
.kinds > div, .prep-list li { animation: a-rise 0.5s ease-out both; }
.kinds > div:nth-child(2), .prep-list li:nth-child(2) { animation-delay: 0.35s; }
.kinds > div:nth-child(3), .prep-list li:nth-child(3) { animation-delay: 0.7s; }
.kinds > div:nth-child(4), .prep-list li:nth-child(4) { animation-delay: 1.05s; }
.kinds > div:nth-child(5), .prep-list li:nth-child(5) { animation-delay: 1.4s; }
.prep-list i { animation: a-pop 0.5s cubic-bezier(0.2, 1.5, 0.4, 1) both; animation-delay: inherit; }
@media (prefers-reduced-motion: reduce) {
  .slide-art *, .a-in { animation: none !important; }
  .a-draw { stroke-dashoffset: 0; }
}

/* "well done" */
.done-sheet { text-align: center; padding-top: 4px; }
.done-star { font-size: 56px; line-height: 1; color: var(--gold); text-shadow: 0 0 28px rgba(243, 201, 105, 0.65); animation: done-pop 0.7s cubic-bezier(0.2, 1.6, 0.4, 1); }
@keyframes done-pop { from { transform: scale(0.2) rotate(-40deg); opacity: 0; } to { transform: none; opacity: 1; } }
.done-sheet h2 { font-family: var(--display); font-size: 28px; color: #fbf6e6; margin-top: 6px; }
.done-sheet > p { margin: 4px 0 14px; }
.done-box { margin: 0 0 14px; padding: 12px 14px; border-radius: 14px; text-align: right; background: rgba(111, 211, 154, 0.08); border: 1px solid rgba(111, 211, 154, 0.3); }
.done-box b { color: var(--good); }
.done-box ul { margin: 6px 0 0; padding: 0 18px 0 0; color: #dbe1f1; font-size: 14.5px; }
.quiz-stars { font-size: 46px; line-height: 1.1; letter-spacing: 6px; color: var(--gold); text-shadow: 0 0 22px rgba(243, 201, 105, 0.5); }
.quiz-stars span { color: #27365f; text-shadow: none; }
@media (prefers-reduced-motion: reduce) { .k-star, .k-sat, .k-plane, .k-meteor, .ask-pulse, .done-star { animation: none; } }

/* ---------- "tonight" tab ---------- */
.tn-nights { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; direction: rtl; }
.tn-night { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 7px 0 6px; border-radius: 12px; background: rgba(12, 20, 42, 0.9); border: 1px solid var(--line); min-width: 0; }
.tn-night b { font-family: var(--display); font-size: 21px; line-height: 1.15; }
.tn-night.good b { color: var(--good); } .tn-night.mid b { color: var(--warn); } .tn-night.bad b { color: var(--bad); }
.tn-night.on { border-color: var(--gold); background: rgba(243, 201, 105, 0.12); }
.tn-day { font-size: 11.5px; color: var(--text); white-space: nowrap; }
.tn-mini { font-size: 10px; color: var(--muted); white-space: nowrap; direction: ltr; }
.tn-item { display: flex; align-items: flex-start; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.tn-item:last-of-type { border-bottom: 0; }
.tn-main { flex: 1; min-width: 0; display: flex; align-items: flex-start; gap: 9px; background: none; border: 0; padding: 0; text-align: right; }
.tn-main b { font-size: 16px; }
.tn-when { font-size: 13.5px; color: #dfe6f7; margin-top: 1px; }
.tn-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.tn-dot { flex: none; width: 11px; height: 11px; border-radius: 50%; margin-top: 7px; background: var(--blue); }
.tn-dot.moon { background: #eef0f5; box-shadow: 0 0 8px rgba(238, 240, 245, 0.6); }
.tn-dot.planet { background: var(--gold); box-shadow: 0 0 8px rgba(243, 201, 105, 0.6); }
.tn-dot.shower { background: #a0ebff; }
.tn-dot.dso { background: #7fd6b6; }
.tn-dot.const { background: #86b6ff; }
.tn-dot.mw { background: linear-gradient(135deg, #f4dcb0, #8ea6ff); }
.tn-pass { padding: 10px 0; border-bottom: 1px solid var(--line); }
.tn-pass:last-of-type { border-bottom: 0; }
.tn-pass .ev-actions { margin-top: 8px; }
.sm { font-size: 12.5px; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.chip-btn.sm { padding: 4px 10px; font-size: 12.5px; }

/* Milky Way planner */
.mw-bars { display: grid; grid-template-columns: repeat(13, 1fr); gap: 3px; align-items: end; direction: rtl; margin: 6px 0 8px; }
.mw-bars button { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px; background: none; border: 0; padding: 0; min-width: 0; }
.mw-bars i { display: block; width: 100%; max-width: 18px; border-radius: 4px 4px 0 0; background: linear-gradient(#f4dcb0, #6f86d8); }
.mw-bars span { font-size: 9.5px; color: var(--muted); white-space: nowrap; }
.mw-bars em { font-style: normal; font-size: 10px; color: var(--gold); }
.mw-plan .verdict { margin-top: 12px; }

/* Jupiter's moons, constellation figures */
.moon-diagram { display: block; width: 100%; height: 96px; border-radius: 12px; background: #04060d; border: 1px solid var(--line); }
.moon-lines { margin: 8px 0 10px; padding: 0 18px 0 0; color: #dbe1f1; font-size: 14px; }
.con-figure { margin: 10px 0 0; text-align: center; }
.con-figure img { width: 190px; height: 190px; object-fit: contain; mix-blend-mode: screen; opacity: 0.9; }
.seen-line:empty { display: none; }
.seen-line { margin-top: 6px; color: var(--good); }

/* observation diary */
.diary h2, .diary-form h2, .sky-menu h2 { font-family: var(--display); font-size: 26px; color: #fbf6e6; margin-top: 6px; }
.diary-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.diary-head { display: flex; align-items: flex-start; gap: 8px; }
.diary-stars { color: var(--gold); letter-spacing: 1px; white-space: nowrap; }
.diary-note { margin: 8px 0 4px; color: #dbe1f1; white-space: pre-wrap; }
.diary-entry .chips { margin-top: 8px; }
.diary-entry .ev-actions { margin-top: 8px; }
.diary-form { display: flex; flex-direction: column; gap: 12px; }
.diary-form label, .diary-form .field { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 13.5px; }
.diary-form input[type="text"], .diary-form input[type="datetime-local"], .diary-form textarea {
  width: 100%; padding: 11px 13px; border-radius: 12px; background: #0e1730; border: 1px solid var(--line2);
  color: var(--text); font: inherit; outline: none; color-scheme: dark;
}
.diary-form textarea { resize: vertical; min-height: 90px; }
.diary-form input:focus, .diary-form textarea:focus { border-color: var(--gold); }
.diary-form .search-row { margin: 6px 0 0; }
.diary-rate { display: flex; gap: 6px; direction: ltr; justify-content: flex-end; }
.diary-rate button { width: 40px; height: 40px; border-radius: 10px; background: #0e1730; border: 1px solid var(--line2); color: var(--muted); font-size: 20px; }
.diary-rate button.on { color: var(--gold); border-color: var(--gold); }

/* ---------- misc ---------- */
#toast {
  position: fixed; left: 50%; bottom: calc(92px + var(--safe-b)); transform: translate(-50%, 12px); z-index: 80;
  max-width: 86vw; padding: 10px 16px; border-radius: 12px; background: #1c2748; border: 1px solid var(--line2);
  font-size: 14px; text-align: center; opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#night-filter { position: fixed; inset: 0; z-index: 9999; background: #ff0000; mix-blend-mode: multiply; pointer-events: none; display: none; }
body.night #night-filter { display: block; }
.fatal { padding: 40px 24px; text-align: center; }
[hidden] { display: none !important; }

@media (min-width: 700px) {
  .map { height: 420px; }
  .sky-target { bottom: 126px; }
}

/* ================= material and light =================
   One idea runs through the app: it is a window onto the night sky. Surfaces are dark glass that the
   sky shows through, actions are brass, and the real photographs do the decorating. */
:root {
  --card: rgba(15, 22, 46, 0.74);
  --glass-edge: rgba(150, 180, 255, 0.16);
  --brass: linear-gradient(180deg, #ffe9ae 0%, #f3c969 46%, #d79f3c 100%);
}
body {
  background:
    radial-gradient(980px 460px at 92% -12%, rgba(58, 84, 176, 0.55) 0%, transparent 62%),
    radial-gradient(760px 520px at -14% 112%, rgba(88, 54, 138, 0.28) 0%, transparent 60%),
    #05070f;
}
/* faint stars behind every screen; each layer repeats at its own size, so no pattern shows */
#app { position: relative; isolation: isolate; }
#app::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0.8;
  background-image:
    radial-gradient(1px 1px at 40px 60px, #fff 50%, transparent 52%), radial-gradient(1px 1px at 130px 200px, #cfe0ff 50%, transparent 52%),
    radial-gradient(1.4px 1.4px at 210px 90px, #fff 50%, transparent 52%), radial-gradient(1px 1px at 70px 260px, #ffe9c4 50%, transparent 52%),
    radial-gradient(1px 1px at 300px 150px, #d8e4ff 50%, transparent 52%), radial-gradient(1.2px 1.2px at 180px 320px, #fff 50%, transparent 52%);
  background-size: 317px 263px, 251px 311px, 389px 277px, 293px 349px, 347px 239px, 419px 373px;
}

/* dark glass */
.card, .event, .stat, .planet-card, .lr-lesson, .lr-quiz-btn, .tn-night {
  background: linear-gradient(168deg, rgba(32, 45, 88, 0.72) 0%, rgba(13, 19, 42, 0.86) 62%);
  border-color: var(--glass-edge);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 12px 28px rgba(0, 0, 0, 0.34);
}
.tn-night.on { background: linear-gradient(168deg, rgba(243, 201, 105, 0.22), rgba(40, 34, 30, 0.7)); border-color: var(--gold); }
.verdict { border: 1px solid rgba(150, 180, 255, 0.14); }
.verdict.good { border-color: rgba(111, 211, 154, 0.3); }
.verdict.mid { border-color: rgba(240, 179, 90, 0.3); }
.verdict.bad { border-color: rgba(239, 125, 125, 0.3); }

/* brass */
.btn { background: linear-gradient(180deg, #1b274f, #101936); border-color: rgba(150, 180, 255, 0.22); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 2px 6px rgba(0, 0, 0, 0.25); transition: transform 0.12s, filter 0.12s; }
.btn.primary { background: var(--brass); border-color: #f8dd98; color: #2b1d03; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -2px 0 rgba(120, 80, 10, 0.25), 0 8px 22px rgba(243, 201, 105, 0.26); }
.btn.ghost { background: transparent; box-shadow: none; }
.btn:active { filter: brightness(0.92); }
.fab { background: var(--brass); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -2px 0 rgba(120, 80, 10, 0.25), 0 10px 28px rgba(243, 201, 105, 0.32); }
.fab.on, .fab.alt { background: rgba(8, 12, 28, 0.7); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 22px rgba(0, 0, 0, 0.4); }
.chip-btn { background: linear-gradient(180deg, rgba(27, 39, 80, 0.9), rgba(14, 21, 46, 0.9)); border-color: rgba(150, 180, 255, 0.2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06); }
.chip-btn.on { background: linear-gradient(180deg, rgba(243, 201, 105, 0.28), rgba(243, 201, 105, 0.12)); }
.lr-chap-num { background: var(--brass); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 4px 14px rgba(243, 201, 105, 0.28); }

/* the frame of the window: top bar, date strip, tab bar */
.topbar { background: linear-gradient(180deg, rgba(9, 13, 30, 0.95), rgba(6, 9, 20, 0.82)); border-bottom-color: rgba(150, 180, 255, 0.12); }
.brand { background: linear-gradient(180deg, #fff0c4 12%, #f3c969 56%, #c98f2f 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; filter: drop-shadow(0 0 12px rgba(243, 201, 105, 0.28)); }
.icon-btn, .loc-chip { background: linear-gradient(180deg, #19244d, #0f1834); border-color: rgba(150, 180, 255, 0.22); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08); }
.datebar { background: linear-gradient(180deg, rgba(10, 15, 34, 0.93), rgba(8, 12, 28, 0.85)); border-bottom-color: rgba(150, 180, 255, 0.1); }
.tabbar { background: linear-gradient(180deg, rgba(11, 16, 36, 0.9), rgba(5, 8, 18, 0.97)); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top-color: rgba(150, 180, 255, 0.14); box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.45); }
.tabbar button { position: relative; transition: color 0.2s; }
.tabbar button.on { text-shadow: 0 0 12px rgba(243, 201, 105, 0.5); }
.tabbar button.on::before { content: ''; position: absolute; top: -6px; left: 50%; width: 24px; height: 3px; margin-left: -12px; border-radius: 0 0 3px 3px; background: var(--gold); box-shadow: 0 0 12px var(--gold); }
.tabbar button.on svg { fill: rgba(243, 201, 105, 0.2); filter: drop-shadow(0 0 6px rgba(243, 201, 105, 0.55)); }
.tab.active:not(#tab-sky) { animation: tab-in 0.24s ease-out; }
@keyframes tab-in { from { opacity: 0; } to { opacity: 1; } }

/* controls that float over the sky */
.sky-time, .sky-readout, .sky-zoom button, .sky-zoom span, .sky-hint, .sky-tip { -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-color: rgba(150, 180, 255, 0.22); }
.sky-zoom button { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 6px 16px rgba(0, 0, 0, 0.4); }

/* sheets rise out of the horizon */
.sheet-backdrop { background: rgba(2, 4, 10, 0.62); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.sheet-panel { background: linear-gradient(180deg, #131d44 0%, #0b1129 38%, #070a19 100%); border-top: 1px solid rgba(160, 190, 255, 0.28); box-shadow: 0 -24px 70px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.1); }
.sheet-grab i { background: rgba(160, 190, 255, 0.4); }
.info-head h2, .slides h2, .done-sheet h2 { text-shadow: 0 0 22px rgba(243, 201, 105, 0.16); }
#toast { background: linear-gradient(180deg, #1e2a54, #141d3d); border-color: rgba(160, 190, 255, 0.3); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }

/* the course */
.lr-hero {
  min-height: 248px; display: flex; flex-direction: column; justify-content: flex-end;
  border-color: rgba(160, 190, 255, 0.28); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 16px 40px rgba(0, 0, 0, 0.45);
  background:
    linear-gradient(180deg, rgba(6, 9, 22, 0.22) 0%, rgba(6, 9, 22, 0.06) 30%, rgba(6, 9, 22, 0.62) 62%, rgba(6, 9, 22, 0.94) 100%),
    var(--hero-img, none) 50% 47% / 230% auto no-repeat,
    radial-gradient(130% 150% at 90% 0%, #2a3f7e 0%, #121d40 52%, #0a1126 100%);
}
.lr-hero h2 { font-size: 26px; text-shadow: 0 2px 16px rgba(0, 0, 0, 0.85); }
.lr-hero p { color: #e6ebf8; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.95); }
.lr-ring { filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.7)); }
.lr-ring .bg { stroke: rgba(255, 255, 255, 0.2); }
.lr-thumb { width: 76px; height: 76px; border-radius: 16px; border-color: rgba(160, 190, 255, 0.24); box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45); }
.lr-tour { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 12px 28px rgba(0, 0, 0, 0.34); }
.slide-art { min-height: 200px; background: #05070f; border-color: rgba(160, 190, 255, 0.22); box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5); }
.slide-art.plain { background: radial-gradient(120% 120% at 50% 0%, #17244f, #070b1a); }
.slide-art.seasons { background: radial-gradient(120% 120% at 50% 0%, #121c40, #060915); }
.slide-art.seasons canvas { border-radius: 12px; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45); }
.k-strip { height: 30px; border-radius: 10px; border-color: rgba(160, 190, 255, 0.2);
  background: radial-gradient(1px 1px at 14px 8px, #fff 50%, transparent 52%), radial-gradient(1px 1px at 52px 21px, #cfe0ff 50%, transparent 52%), radial-gradient(1px 1px at 78px 11px, #fff 50%, transparent 52%), linear-gradient(180deg, #050814, #0d1634); }
.lesson-card { background: linear-gradient(180deg, rgba(16, 24, 54, 0.95), rgba(7, 10, 24, 0.97)); box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1); }
.moon-hero canvas { filter: drop-shadow(0 0 26px rgba(232, 236, 255, 0.34)); }

/* headings are set in Alef (400 and 700 only, so every heading weight is 700); the large sizes stay a touch below the old serif's */
h2, h3, .lesson-step, .brand, .lr-chap-num { letter-spacing: 0; }
h2, h3, .lesson-step, .lesson-title { text-wrap: balance; } /* Alef runs wide: when a heading wraps, split it evenly instead of leaving one word below */
.info-head h2, .loc-sheet h2, .done-sheet h2 { font-size: 26px; font-weight: 700; }
.lr-hero h2 { font-size: 25px; font-weight: 700; }
.today-sheet h2, .diary h2, .diary-form h2, .sky-menu h2, .slides h2 { font-size: 23px; font-weight: 700; }
.lesson-step { font-size: 18.5px; }
.card h3, .info-sec h3, .lr-chap-head h3 { font-weight: 700; }
.brand { font-weight: 700; letter-spacing: 0; }
