/* Moon Tracker — the sky is the interface; panels are tinted glass that take the sky's colour.
   Gold always means the Moon, dusk-rose always means the Sun. v4: 360° panorama layout. */
:root {
  --ink: #0a1022;            /* night ink */
  --ink-2: #111a33;
  --regolith: #ece6d9;       /* primary text on glass */
  --mist: #a9b6cc;           /* secondary text */
  --faint: #7f8ba3;
  --gold: #e7c67a;           /* the Moon */
  --gold-deep: #c9a24f;
  --rose: #e09a84;           /* the Sun */
  --copper: #e58a5c;         /* eclipses */
  --node: #9fe0c0; --peri: #ffb27a; --apo: #8fb6ff;
  --zone-a: #7cc59a; --zone-b: #e9d36f; --zone-c: #e58fa8;
  --glass: rgba(9, 14, 30, 0.56);
  --glass-strong: rgba(9, 14, 30, 0.78);
  --line: rgba(236, 230, 217, 0.13);
  --line-2: rgba(236, 230, 217, 0.24);
  --r-panel: 20px; --r-ctl: 12px;
  --f-display: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --f-ui: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --bar-h: 58px; --time-h: 64px; --gap: 12px; --panel-w: 372px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  color-scheme: dark;
}
html[lang="ar"] { --f-display: 'Noto Naskh Arabic', 'Newsreader', serif; --f-ui: 'IBM Plex Sans Arabic', 'Hanken Grotesk', system-ui, sans-serif; }

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ink); color: var(--regolith); }
body { font: 400 15px/1.5 var(--f-ui); -webkit-font-smoothing: antialiased; }
button, select, input { font: inherit; color: inherit; }
a { color: var(--gold); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-family: var(--f-display); font-variant-numeric: lining-nums tabular-nums; }
[hidden] { display: none !important; }

/* ---------- top bar ---------- */
.bar {
  position: fixed; inset-block-start: 0; inset-inline: 0; z-index: 30; height: var(--bar-h);
  display: flex; align-items: center; gap: var(--s4); padding-inline: var(--s5);
  background: rgba(5, 9, 20, 0.9); border-bottom: 1px solid var(--line);
}
.bar.scrolled { backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--regolith); flex: none; }
.brand svg { width: 26px; height: 26px; }
.brand span { font: 500 21px/1 var(--f-display); letter-spacing: 0.01em; }
.intents { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; mask-image: linear-gradient(to right, transparent, #000 12px, #000 calc(100% - 12px), transparent); padding-inline: 12px; }
.intents::-webkit-scrollbar { display: none; }
.intents a { flex: none; padding: 7px 13px; border-radius: 999px; font-size: 14px; color: var(--mist); text-decoration: none; transition: color .2s, background-color .2s; }
.intents a:hover { color: var(--regolith); background: rgba(236, 230, 217, 0.07); }
.intents a[aria-current="page"] { color: var(--ink); background: var(--gold); font-weight: 600; }
.lang { display: flex; flex: none; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px; gap: 2px; }
.lang a { padding: 4px 11px; border-radius: 999px; text-decoration: none; color: var(--mist); font-size: 13px; }
.lang a[aria-current="true"] { background: rgba(236, 230, 217, 0.14); color: var(--regolith); }

/* ---------- stage: sky (below the bar), time bar in its own row, panel on the side ---------- */
.stage { position: relative; height: 100vh; height: 100svh; min-height: 640px; overflow: hidden; background: radial-gradient(ellipse at 80% 20%, #0d1530, #04060d 70%); }
.sky-box { position: absolute; inset-block-start: var(--bar-h); inset-inline-start: 0; inset-inline-end: calc(var(--panel-w) + 2 * var(--s5)); inset-block-end: calc(var(--time-h) + 2 * var(--gap)); overflow: hidden; background: #02040a; }
#sky { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; }
.veil { position: absolute; inset: 0; background: #02040a; pointer-events: none; z-index: 25; }
.labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 2; }
.lbl { position: absolute; left: 0; top: 0; white-space: nowrap; will-change: transform; font-size: 12px; color: var(--mist); }
.lbl.compass { font: 600 15px/1 var(--f-ui); color: #ff8c7a; text-shadow: 0 1px 3px rgba(0,0,0,.7); }
.lbl.compass.cardinal { font-size: 18px; color: #ff6f5c; }
.lbl.tag { display: flex; align-items: center; gap: 6px; padding: 3px 9px 3px 7px; border-radius: 999px; background: rgba(5, 9, 20, 0.55); border: 1px solid rgba(231, 198, 122, 0.45); color: var(--gold); font-size: 12.5px; backdrop-filter: blur(6px); }
.lbl.tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.lbl.tag.sun { color: var(--rose); border-color: rgba(224, 154, 132, 0.45); }
.lbl.hour { font: 500 11px/1 var(--f-ui); color: rgba(231, 198, 122, 0.85); text-shadow: 0 1px 2px rgba(0,0,0,.7); }
.lbl.star { font: italic 400 12px/1 var(--f-display); color: rgba(200, 212, 235, 0.7); }
.moon-ring { position: absolute; left: 0; top: 0; z-index: 3; border: 2px solid #ff4b4b; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0,0,0,.35), 0 0 12px rgba(255,75,75,.35); pointer-events: none; will-change: transform; }
.moon-ring.below { border-style: dashed; opacity: .55; }

.glass { background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(18px) saturate(1.25); -webkit-backdrop-filter: blur(18px) saturate(1.25); border-radius: var(--r-panel); }

/* insets sit on the grass at the bottom corners of the sky */
:root { --inset-h: clamp(104px, min(calc((100svh - var(--bar-h) - var(--time-h) - 2 * var(--gap)) * 0.4 - 26px), 15vw), 212px); }
.inset { position: absolute; z-index: 4; margin: 0; inset-block-end: 12px; }
.inset canvas { display: block; width: 100%; height: 100%; }
.inset.orbit { inset-inline-start: 14px; width: calc(var(--inset-h) * 1.5); }
.inset.orbit .frame { position: relative; height: var(--inset-h); border-radius: 16px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 10px 40px rgba(0,0,0,.35); cursor: zoom-in; background: #03050c; }
.orbit-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.ol { position: absolute; left: 0; top: 0; white-space: nowrap; font: 600 10.5px/1 var(--f-ui); text-shadow: 0 1px 2px #000, 0 0 6px #000; }
.ol.node { color: var(--node); font-size: 12px; } .ol.peri { color: var(--peri); } .ol.apo { color: var(--apo); } .ol.tilt { color: var(--gold); font-weight: 500; }
.orbit-title { position: absolute; top: 8px; inset-inline-start: 10px; font-size: 12px; font-weight: 500; color: var(--regolith); text-shadow: 0 1px 3px #000; pointer-events: none; }
.orbit-sun { position: absolute; top: 40px; right: 6px; font-size: 11px; color: #ffd28a; background: rgba(3,5,12,.55); padding: 2px 8px; border-radius: 999px; pointer-events: none; }
.orbit-status { position: absolute; bottom: 7px; inset-inline-start: 10px; inset-inline-end: 40px; font-size: 11.5px; color: var(--mist); text-shadow: 0 1px 3px #000; pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.orbit-status.on { color: var(--copper); font-weight: 600; }
.orbit-expand { position: absolute; top: 6px; inset-inline-end: 6px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); background: rgba(3,5,12,.6); cursor: pointer; color: var(--regolith); }
.orbit-expand:hover { border-color: var(--gold); }
.orbit-expand svg { width: 15px; height: 15px; }
.orbit-more { display: none; }
.inset.orbit.expanded { position: fixed; z-index: 60; inset: max(5vh, 64px) 4vw 5vh; width: auto; }
.inset.orbit.expanded::before { content: ''; position: fixed; inset: -100vh -100vw; background: rgba(2, 4, 10, 0.7); z-index: -1; }
.inset.orbit.expanded .frame { height: 100%; cursor: default; border-color: var(--line-2); }
.inset.orbit.expanded .orbit-title { font-size: 17px; top: 14px; inset-inline-start: 18px; font-family: var(--f-display); }
.inset.orbit.expanded .orbit-status { font-size: 15px; bottom: auto; top: 42px; inset-inline-start: 18px; }
.inset.orbit.expanded .orbit-expand { width: 38px; height: 38px; top: 12px; inset-inline-end: 12px; }
.inset.orbit.expanded .orbit-sun { font-size: 13px; right: 14px; top: 64px; }
.inset.orbit.expanded .ol { font-size: 12.5px; } .inset.orbit.expanded .ol.node { font-size: 14px; }
.inset.orbit.expanded canvas, .inset.orbit.expanded .orbit-labels { position: absolute; inset-block-start: 0; inset-inline-start: min(440px, 36%); width: calc(100% - min(440px, 36%)); height: 100%; }
.inset.orbit.expanded .orbit-more { display: block; position: absolute; inset-block: 78px 14px; inset-inline-start: 14px; width: calc(min(440px, 36%) - 28px); padding: 14px 16px; border-radius: 14px; background: rgba(5, 9, 20, 0.72); border: 1px solid var(--line); font-size: 13px; line-height: 1.5; color: #cfd6e3; overflow-y: auto; }
.om-text p { margin: 0 0 8px; }
.om-btns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
body.orbit-open { overflow: hidden; }

.inset.tele { inset-inline-end: 14px; width: calc(var(--inset-h) + 8px); text-align: center; }
.inset.tele .frame { position: relative; width: calc(var(--inset-h) - 22px); height: calc(var(--inset-h) - 22px); margin-inline: auto; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 1px rgba(231,198,122,.55), 0 0 0 7px rgba(5,9,20,.5), 0 0 0 8px rgba(231,198,122,.18), 0 12px 40px rgba(0,0,0,.5); }
.inset.tele .frame::after { content: ''; position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 28px rgba(0,0,0,.55); pointer-events: none; }
.tele-up { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); font-size: 10px; color: rgba(236,230,217,.6); z-index: 2; }
.tele-pct { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); z-index: 2; font: 500 12.5px/1 var(--f-display); color: var(--gold); background: rgba(5,9,20,.55); padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.tele-cap { margin-top: 6px; font-size: 12.5px; color: var(--mist); }
.tele-cap b { color: var(--regolith); font-weight: 500; }

/* place strip: wide and low, on the grass between the two insets */
.place {
  position: absolute; z-index: 5;
  inset-block-end: calc(var(--time-h) + 2 * var(--gap) + 12px);
  inset-inline-start: calc(14px + var(--inset-h) * 1.5 + 16px);
  inset-inline-end: calc(var(--panel-w) + 2 * var(--s5) + 14px + var(--inset-h) + 8px + 16px);
  padding: 9px 18px 10px; display: grid; gap: 2px; transition: opacity .35s;
}
.place.yield { opacity: .2; }
.place.yield:hover, .place.yield:focus-within { opacity: 1; }
.place-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 12px; min-width: 0; }
.place-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; background: none; border: 0; padding: 0; cursor: pointer; text-align: start; }
.place-name .city { font: 500 22px/1.15 var(--f-display); }
.place-name .country { color: var(--mist); font-size: 14px; }
.place-name .edit { font-size: 12.5px; color: var(--gold); border-bottom: 1px dashed rgba(231,198,122,.5); }
.place-meta { color: var(--faint); font-size: 12.5px; }
.clock-row { align-items: center; }
.clock-time { white-space: nowrap; font: 300 32px/1.05 var(--f-display); font-variant-numeric: lining-nums tabular-nums; letter-spacing: -0.01em; }
.clock-sub { display: flex; flex-direction: column; gap: 0; min-width: 0; margin-inline-start: 4px; line-height: 1.3; }
.clock-row { flex-wrap: nowrap; }
.clock-date { font-size: 14px; }
.clock-alt { color: var(--gold); font: 400 15px/1.3 var(--f-display); }
.pill { font-size: 12px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--mist); white-space: nowrap; }
.pill.live { color: #9be0b6; border-color: rgba(124, 197, 154, 0.5); }
.pill.live::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-inline-end: 6px; vertical-align: 1px; animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

/* time bar: its own row under the sky */
.timebar {
  position: absolute; z-index: 6; inset-inline-start: var(--s5); inset-inline-end: calc(var(--panel-w) + 2 * var(--s5)); inset-block-end: var(--gap); height: var(--time-h);
  display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: var(--s4); padding: 0 var(--s4);
}
.tb-group { display: flex; align-items: center; gap: 6px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); background: rgba(236,230,217,.05); cursor: pointer; transition: border-color .2s, background-color .2s; }
.icon-btn:hover { border-color: var(--gold); }
.icon-btn.primary { width: 46px; height: 46px; background: var(--gold); color: var(--ink); border: 0; }
.icon-btn.primary:hover { background: #f0d38f; }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn[aria-pressed="true"] { border-color: var(--gold); color: var(--ink); background: var(--gold); }
.speed { appearance: none; background: rgba(236,230,217,.06) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23a9b6cc' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 12px center; border: 1px solid var(--line-2); border-radius: 999px; padding: 9px 32px 9px 14px; font-size: 14px; cursor: pointer; }
html[dir="rtl"] .speed { background-position: left 12px center; padding: 9px 14px 9px 32px; }
.speed option { background: var(--ink-2); }
.scrub { position: relative; height: 44px; min-width: 0; }
.scrub-track { position: absolute; inset-inline: 0; top: 14px; height: 16px; border-radius: 8px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); direction: ltr; }
.scrub-moon { position: absolute; top: 34px; height: 3px; border-radius: 2px; background: var(--gold); opacity: .85; }
.scrub-mark { position: absolute; top: 0; transform: translateX(-50%); font-size: 10.5px; color: var(--mist); white-space: nowrap; pointer-events: none; }
.scrub-mark.sun { color: var(--rose); } .scrub-mark.moon { color: var(--gold); }
.scrub-head { position: absolute; top: 9px; width: 2px; height: 26px; background: var(--regolith); border-radius: 1px; transform: translateX(-50%); box-shadow: 0 0 0 3px rgba(5,9,20,.4); pointer-events: none; }
.scrub input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; direction: ltr; }
.scrub-ticks { position: absolute; inset-inline: 0; top: 32px; display: flex; justify-content: space-between; font-size: 10px; color: var(--faint); pointer-events: none; direction: ltr; }
.toggle { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: none; cursor: pointer; font-size: 13px; color: var(--mist); white-space: nowrap; transition: background-color .2s, color .2s; }
.toggle::before { content: ''; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid currentColor; }
.toggle[aria-pressed="true"] { color: var(--ink); border-color: var(--gold); background: var(--gold); font-weight: 600; }
.toggle[aria-pressed="true"]::before { background: var(--ink); border-color: var(--ink); }

/* right panel */
.panel {
  position: absolute; z-index: 5; inset-block-start: calc(var(--bar-h) + 8px); inset-block-end: var(--gap); inset-inline-end: var(--s5);
  width: var(--panel-w); overflow-y: auto; overscroll-behavior: contain;
  padding: var(--s5); scrollbar-width: thin; scrollbar-color: rgba(236,230,217,.2) transparent;
}
.phase-row { display: flex; gap: var(--s4); align-items: center; }
.phase-icon { width: 62px; height: 62px; flex: none; }
.phase-name { font: 400 28px/1.1 var(--f-display); margin: 0; }
.phase-sub { color: var(--mist); font-size: 14px; margin-top: 2px; }
.sentence { margin: var(--s4) 0 0; font: 400 17px/1.5 var(--f-display); color: var(--regolith); }
.sentence em { font-style: normal; color: var(--gold); }
.ecl-note { color: var(--copper); }
.ecl-note.sun { color: var(--rose); }
.safety { display: block; margin: 6px 0; font: 600 13.5px/1.4 var(--f-ui); color: #ffb3a1; }
.times { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px var(--s4); margin: var(--s4) 0 0; padding: 0; }
.times div { display: flex; justify-content: space-between; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.times dt { color: var(--mist); }
.times dd { margin: 0; font-variant-numeric: tabular-nums; }
.times .moon dd { color: var(--gold); } .times .sun dd { color: var(--rose); }
.block { margin-top: var(--s5); }
.block h2, .block h3 { font: 500 19px/1.25 var(--f-display); margin: 0 0 var(--s3); }
.block .note { color: var(--faint); font-size: 13px; line-height: 1.5; margin: var(--s3) 0 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 1px solid var(--line-2); background: rgba(236, 230, 217, 0.04); border-radius: 999px; padding: 6px 12px; font-size: 13.5px; cursor: pointer;
  transition: border-color .2s, background-color .2s, color .2s, transform .15s;
}
.chip:hover { border-color: var(--gold); background: rgba(231, 198, 122, 0.1); }
.chip:active { transform: scale(.97); }
.chip.sun { border-color: rgba(224,154,132,.4); }
.chip.ecl { border-color: rgba(229,138,92,.55); }
/* a selected "Jump to" button stays selected until another one (or Now) is pressed */
.chip[aria-pressed="true"] { background: var(--gold); color: var(--ink); border-color: var(--gold); font-weight: 600; }
.chip.sun[aria-pressed="true"] { background: var(--rose); border-color: var(--rose); }
.chip.ecl[aria-pressed="true"] { background: var(--copper); border-color: var(--copper); }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.list li span:first-child { color: var(--mist); }
.list li b { font-weight: 500; text-align: end; }
.list li button { background: none; border: 1px solid transparent; padding: 1px 8px; margin: -2px -8px; border-radius: 999px; color: var(--gold); cursor: pointer; text-align: end; font-size: 14px; }
.list li button:hover { text-decoration: underline; }
.list li button[aria-pressed="true"] { background: var(--gold); color: var(--ink); text-decoration: none; font-weight: 600; }

/* hilal cards */
.conj { font-size: 14px; color: var(--mist); margin-bottom: var(--s3); }
.conj b { color: var(--regolith); font-weight: 500; }
.eve { border: 1px solid var(--line); border-radius: 14px; padding: var(--s3) var(--s4); margin-bottom: var(--s2); }
.eve.open { border-color: rgba(231,198,122,.45); background: rgba(231,198,122,.05); }
.eve-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; cursor: pointer; background: none; border: 0; width: 100%; padding: 0; text-align: start; }
.eve-date { font: 500 16px/1.3 var(--f-display); }
.verdict { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-top: 4px; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot.A { background: var(--zone-a); } .dot.B { background: var(--zone-b); } .dot.C { background: var(--zone-c); } .dot.D, .dot.E, .dot.F, .dot.X { background: transparent; border: 1.5px solid var(--faint); }
.eve-body { display: none; margin-top: var(--s3); font-size: 13.5px; }
.eve.open .eve-body { display: block; }
.methods { list-style: none; margin: 0 0 var(--s3); padding: 0; }
.methods li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 2px 8px; padding: 7px 0; border-top: 1px solid var(--line); }
.methods .m-name { color: var(--mist); }
.methods .m-val { display: flex; gap: 6px; align-items: center; justify-content: flex-end; text-align: end; }
.facts { color: var(--faint); font-size: 12.5px; margin: 0 0 var(--s3); }
.dispute { border-inline-start: 2px solid var(--zone-b); padding: 6px 12px; margin: 0 0 var(--s3); color: var(--regolith); font-size: 13.5px; background: rgba(233,211,111,.06); border-radius: 0 8px 8px 0; }
html[dir="rtl"] .dispute { border-radius: 8px 0 0 8px; }
.btn { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 8px 16px; border: 0; background: var(--gold); color: var(--ink); font-weight: 600; font-size: 14px; cursor: pointer; transition: background-color .2s, transform .15s; }
.btn:hover { background: #f0d38f; }
.btn:active { transform: scale(.97); }
.btn[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px var(--gold); }
.btn.ghost { background: transparent; color: var(--regolith); border: 1px solid var(--line-2); font-weight: 500; }
.btn.ghost:hover { border-color: var(--gold); }
/* two-way converter */
.conv { display: grid; gap: 8px; }
.conv-dir { font-size: 12.5px; color: var(--mist); letter-spacing: .02em; margin-top: 4px; }
.conv-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.conv input, .conv select, .field input, .field select { background: rgba(236,230,217,.06); border: 1px solid var(--line-2); border-radius: var(--r-ctl); padding: 7px 10px; min-width: 0; }
.conv select option { background: var(--ink-2); }
.conv input[type=number] { width: 64px; }
.conv input[id=convHy] { width: 76px; }
.conv-out { display: block; font: 400 17px/1.3 var(--f-display); color: var(--gold); padding: 2px 0 6px; border-bottom: 1px solid var(--line); }
.conv-out.flash { animation: flash .7s ease-out; }
@keyframes flash { from { background: rgba(231,198,122,.22); } to { background: transparent; } }

/* explore (below the sky) */
.explore { position: relative; background: linear-gradient(to bottom, #04060d, var(--ink) 240px); padding: var(--s7) var(--s5) 80px; }
.explore-inner { max-width: 1180px; margin-inline: auto; }
.explore h1 { font: 400 clamp(32px, 4.2vw, 50px)/1.08 var(--f-display); margin: 0 0 var(--s4); max-width: 20ch; letter-spacing: -0.005em; }
.explore .lede { font: 400 19px/1.6 var(--f-display); color: var(--mist); max-width: 62ch; margin: 0 0 var(--s6); }
.explore-cols { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--s7); align-items: start; }
.explore-main:empty + .explore-side { display: none; }
.explore-cols:has(.explore-main:empty) { display: none; }
.explore-cols:has(.explore-main:empty) + .ad-slot { display: none; }
.explore-side { position: sticky; top: calc(var(--bar-h) + 16px); }
.ex-grid { display: grid; grid-template-columns: 1fr; gap: var(--s6); align-items: start; }
.ex-grid > * { min-width: 0; }
.explore h2 { font: 400 27px/1.2 var(--f-display); margin: 0 0 var(--s3); }
.explore p { max-width: 68ch; }
.prose p { color: #cfd6e3; line-height: 1.65; margin: 0 0 var(--s4); }
.map-wrap { position: relative; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: #070c1b; }
.map-wrap canvas { display: block; width: 100%; height: auto; }
.map-status { position: absolute; inset-block-start: 12px; inset-inline-start: 14px; font-size: 13px; color: var(--mist); background: rgba(5,9,20,.65); padding: 4px 10px; border-radius: 999px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: var(--s3) 0 0; padding: 0; list-style: none; font-size: 13.5px; color: var(--mist); }
.legend li { display: flex; align-items: center; gap: 8px; }
.evening-pick { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 var(--s3); }
.evening-pick .chip[aria-pressed="true"] { background: var(--gold); color: var(--ink); border-color: var(--gold); font-weight: 600; }
.credits { margin-top: var(--s7); padding-top: var(--s5); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--s5); font-size: 13.5px; color: var(--mist); }
.credits h3 { font: 500 17px/1.3 var(--f-display); color: var(--regolith); margin: 0 0 var(--s2); }
.credits ul { margin: 0; padding-inline-start: 18px; }
.credits li { margin-bottom: 4px; }
.credits p { margin: 0 0 8px; }
.disclaimer { margin-top: var(--s5); color: var(--faint); font-size: 13px; }

/* reserved ad boxes: fixed sizes so nothing moves when an ad loads; empty until AdSense approval */
.ad-slot { position: relative; margin: var(--s6) auto; border: 1px dashed rgba(236,230,217,.12); border-radius: 12px; background: rgba(236,230,217,.015); }
.ad-label { position: absolute; top: -8px; inset-inline-start: 12px; padding: 0 6px; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); background: var(--ink); line-height: 16px; }
.ad-space { display: flex; align-items: center; justify-content: center; overflow: hidden; }
.ad-wide { max-width: 970px; } .ad-wide .ad-space { min-height: 100px; }
.ad-tall { width: 300px; margin: 0; } .ad-tall .ad-space { width: 300px; height: 600px; }
.ad-inarticle .ad-space { min-height: 280px; }
.ad-phone { display: none; }
.prose .ad-slot { margin: var(--s5) 0 var(--s6); }

/* dialogs */
dialog { border: 1px solid var(--line-2); border-radius: 22px; padding: 0; background: var(--glass-strong); color: var(--regolith); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); width: min(560px, calc(100vw - 32px)); box-shadow: 0 30px 80px rgba(0,0,0,.5); }
dialog::backdrop { background: rgba(2, 4, 10, 0.55); }
.dlg-head { display: flex; gap: 8px; padding: var(--s4); border-bottom: 1px solid var(--line); }
.dlg-head input { flex: 1; min-width: 0; background: rgba(236,230,217,.07); border: 1px solid var(--line-2); border-radius: 14px; padding: 12px 14px; font-size: 16px; }
.results { list-style: none; margin: 0; padding: var(--s2); max-height: min(420px, 60vh); overflow-y: auto; }
.results li button { width: 100%; display: flex; justify-content: space-between; gap: 12px; text-align: start; padding: 10px 12px; border: 0; background: none; border-radius: 12px; cursor: pointer; }
.results li button:hover, .results li button.active { background: rgba(231,198,122,.12); }
.results .r-name { font-weight: 500; }
.results .r-sub { color: var(--faint); font-size: 13px; }
.results .empty { padding: 16px; color: var(--mist); }
.dlg-foot { display: flex; justify-content: space-between; gap: 8px; padding: var(--s3) var(--s4); border-top: 1px solid var(--line); }
.time-form { padding: var(--s5); display: grid; gap: var(--s4); }
.field { display: grid; gap: 6px; font-size: 13px; color: var(--mist); }
.field input { font-size: 16px; color: var(--regolith); padding: 10px 12px; }
.dlg-title { font: 500 20px/1.3 var(--f-display); margin: 0; }
.loop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.loop-dur { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.loop-dur input { width: 80px; }
.loop-dur select { background: rgba(236,230,217,.06); border: 1px solid var(--line-2); border-radius: var(--r-ctl); padding: 10px 12px; color: var(--regolith); }
.loop-dur select option { background: var(--ink-2); }
.dlg-actions { display: flex; gap: 8px; align-items: center; }
.dlg-actions .grow { flex: 1; }
.webgl-missing { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: var(--mist); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) { :root { --panel-w: 330px; } }
@media (max-height: 760px) and (min-width: 861px) { :root { --panel-w: 340px; --time-h: 58px; } .place-name .city { font-size: 20px; } .clock-time { font-size: 28px; } }
@media (max-width: 1180px) and (min-width: 861px) { .place .place-meta { display: none; } }

/* phones and small tablets: sky, then the place strip, the time bar, one ad box and the panel, stacked */
@media (max-width: 860px) {
  :root { --bar-h: 104px; --inset-h: 84px; }
  .bar { flex-wrap: wrap; height: auto; padding: 10px var(--s4) 6px; gap: 8px; }
  .brand span { font-size: 19px; }
  .lang { margin-inline-start: auto; }
  .intents { order: 3; flex-basis: 100%; padding-inline: 0; mask-image: none; }
  .stage { height: auto; min-height: 0; display: flex; flex-direction: column; overflow: visible; background: var(--ink); }
  .sky-box { position: relative; inset: auto; height: clamp(300px, 50svh, 470px); margin-top: var(--bar-h); order: 1; }
  .inset { inset-block-end: 8px; }
  .inset.orbit { inset-inline-start: 8px; width: 132px; }
  .inset.orbit .frame { height: 88px; border-radius: 12px; }
  .orbit-title, .orbit-sun { display: none; }
  .orbit-status { font-size: 10px; inset-inline-start: 6px; bottom: 4px; inset-inline-end: 30px; }
  .orbit-expand { width: 24px; height: 24px; top: 4px; inset-inline-end: 4px; }
  .ol { font-size: 9px; } .ol.node { font-size: 10px; }
  .inset.orbit.expanded { inset: 8px; }
  .inset.orbit.expanded .orbit-title, .inset.orbit.expanded .orbit-sun { display: block; }
  .inset.orbit.expanded canvas, .inset.orbit.expanded .orbit-labels { inset-inline-start: 0; inset-block-start: 64px; width: 100%; height: calc(56% - 70px); }
  .inset.orbit.expanded .orbit-more { width: auto; inset-inline-end: 10px; inset-inline-start: 10px; inset-block: 56% 10px; }
  .inset.tele { inset-inline-end: 8px; width: 92px; }
  .inset.tele .frame { width: 84px; height: 84px; }
  .tele-cap, .tele-up { display: none; }
  .tele-pct { font-size: 10.5px; bottom: 6px; }
  .place { position: relative; inset: auto; order: 2; margin: 10px 10px 0; padding: 10px 14px; }
  .place-name .city { font-size: 20px; }
  .clock-time { font-size: 28px; }
  .clock-date { font-size: 13.5px; }
  .place .place-meta { display: none; }
  .timebar { position: relative; inset: auto; order: 3; margin: 10px; height: auto; grid-template-columns: auto auto 1fr; padding: 10px 12px; gap: 10px; }
  .timebar .scrub { grid-column: 1 / -1; order: 5; }
  .timebar .tb-toggles { grid-column: 1 / -1; order: 6; overflow-x: auto; }
  .ad-phone { display: block; order: 4; width: 322px; margin: 22px auto 22px; }
  .ad-phone .ad-space { width: 320px; height: 100px; }
  .panel { position: relative; inset: auto; order: 5; width: auto; max-height: none; margin: 0 10px 10px; overflow: visible; }
  .ad-desktop { display: none; }
  .explore { padding: var(--s6) var(--s4) 64px; }
  .explore-cols { grid-template-columns: 1fr; }
  .methods li { grid-template-columns: 1fr; }
  .methods .m-val { justify-content: flex-start; text-align: start; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media (max-width: 860px) {
  .inset.orbit:not(.expanded) .ol.peri, .inset.orbit:not(.expanded) .ol.apo { display: none !important; }
}

/* ---------- v5: city box with the Moon report, loop window, one converter, eclipse explorer ---------- */
:root { --sky-h: calc(100svh - var(--bar-h) - var(--time-h) - 2 * var(--gap)); --ground-h: calc(var(--sky-h) * 0.4); }
.place { max-height: calc(var(--ground-h) - 34px); overflow: hidden; gap: 4px; padding: 10px 16px 10px; }
.place-report { border-top: 1px solid var(--line); padding-top: 7px; min-height: 0; overflow: hidden; }
.place-report .phase-row { gap: 10px; }
.place-report .phase-icon { width: 34px; height: 34px; }
.place-report .phase-name { font-size: 18px; display: inline; }
.place-report .phase-sub { display: inline; margin-inline-start: 8px; font-size: 13px; }
.place-report .sentence { margin-top: 4px; font-size: 14.5px; line-height: 1.38; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.place-report .safety { font-size: 12px; margin: 2px 0; }
.place-report .times { grid-template-columns: repeat(4, auto); gap: 0 12px; margin-top: 6px; }
.place-report .times div { flex-direction: column; gap: 0; padding: 3px 0 0; border: 0; font-size: 12px; }
.place-report .times dt { font-size: 11px; }
.place-report .times dd { font-size: 13.5px; }
.panel > .block:first-child { margin-top: 0; }
@media (max-height: 820px) and (min-width: 861px) { .place-report .sentence { -webkit-line-clamp: 2; } }
@media (max-height: 700px) and (min-width: 861px) { .place-report .sentence { display: none; } }

.dlg-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.x-btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-2); background: none; cursor: pointer; font-size: 20px; line-height: 1; color: var(--regolith); flex: none; }
.x-btn:hover { border-color: var(--gold); }
.loop-row { display: grid; grid-template-columns: 1fr 1.6fr; gap: 12px; align-items: start; }
.loop-presets { display: flex; gap: 6px; flex-wrap: wrap; }
#loopSpeed { background: rgba(236,230,217,.06); border: 1px solid var(--line-2); border-radius: var(--r-ctl); padding: 10px 12px; color: var(--regolith); font-size: 15px; }
#loopSpeed option { background: var(--ink-2); }
.loop-msg { margin: 0; color: #ffb3a1; font-size: 13px; min-height: 1em; }
#loopStop:disabled { opacity: .4; cursor: default; }
@media (max-width: 520px) { .loop-row { grid-template-columns: 1fr; } }

.conv2 { display: grid; gap: 6px; }
.cbox { display: grid; gap: 4px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 14px; background: rgba(236,230,217,.04); }
.clab { font-size: 12px; color: var(--mist); }
.cbox input, .cbox select { background: transparent; border: 0; color: var(--regolith); font: 400 17px/1.3 var(--f-display); padding: 2px 0; min-width: 0; }
.cbox select option { background: var(--ink-2); }
.cbox input[type=date] { color-scheme: dark; }
.hfields { display: flex; gap: 8px; align-items: center; }
.hfields select:first-child { width: 3.4em; } .hfields select:nth-child(2) { flex: 1; } .hfields input { width: 4.4em; }
.cswap { justify-self: center; font-size: 20px; color: var(--gold); line-height: 1; }
.conv-msg { font-size: 14px; color: var(--gold); padding: 4px 2px; border-radius: 6px; }
.conv-msg.err { color: #ffb3a1; }
.conv-msg.flash { animation: flash .7s ease-out; }

.om-about summary { cursor: pointer; color: var(--regolith); font-weight: 500; margin-bottom: 6px; }
.om-about p { margin: 0 0 8px; }
.om-tabs { display: flex; gap: 4px; margin-top: 12px; border-bottom: 1px solid var(--line); }
.om-tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 6px 10px; cursor: pointer; color: var(--mist); font-size: 13.5px; }
.om-tabs button[aria-selected="true"] { color: var(--copper); border-bottom-color: var(--copper); font-weight: 600; }
.om-year { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 8px 0 4px; font: 500 16px/1 var(--f-display); color: var(--regolith); }
.om-yb { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-2); background: none; cursor: pointer; color: var(--regolith); font-size: 11px; }
.om-yb:hover { border-color: var(--gold); }
.om-list { list-style: none; margin: 0; padding: 0; }
.om-item { width: 100%; display: flex; justify-content: space-between; gap: 8px; padding: 6px 8px; border: 0; border-radius: 8px; background: none; cursor: pointer; color: var(--regolith); font-size: 13px; text-align: start; }
.om-item:hover { background: rgba(236,230,217,.06); }
.om-item.on { background: rgba(229,138,92,.18); color: #ffd2bd; }
.om-none { color: var(--faint); padding: 6px 8px; }
.om-card { margin-top: 10px; padding: 10px 12px; border: 1px solid rgba(229,138,92,.4); border-radius: 12px; background: rgba(229,138,92,.06); }
.om-card-h { font: 500 16px/1.3 var(--f-display); color: #ffd2bd; margin-bottom: 4px; }
.om-rows li { padding: 5px 0; font-size: 12.5px; }
.om-here { margin: 8px 0; color: var(--regolith); font-size: 13px; }
.om-phase { display: flex; gap: 6px; flex-wrap: wrap; }
.om-speed { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12.5px; color: var(--mist); }
.om-speed select { background: rgba(236,230,217,.06); border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 10px; color: var(--regolith); }
.om-speed select option { background: var(--ink-2); }
.om-play .note { margin: 6px 0 0; font-size: 12px; color: var(--faint); }
.om-nav { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; }
.om-nav .btn { padding: 6px 12px; font-size: 13px; }
.inset.orbit.expanded .orbit-more { overflow-y: auto; }
@media (max-width: 860px) {
  .place { max-height: none; overflow: visible; }
  .place-report .sentence { -webkit-line-clamp: unset; display: block; }
  .place-report .times { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- v6: plain orbit inset with the Sun's edge, tidy Jump-to grid, taller city box ---------- */
.inset.orbit .frame { cursor: default; }
.sun-edge { position: absolute; z-index: 1; pointer-events: none; width: 220px; height: 220px; right: -196px; top: 50%; transform: translateY(-58%); border-radius: 50%;
  background: radial-gradient(circle, #fffaf0 0 52%, #ffe9b8 58%, #ffc46b 63%, rgba(255,170,70,.45) 67%, rgba(255,150,60,.12) 76%, transparent 84%);
  filter: blur(.3px); }
.orbit-labels { z-index: 2; }
.place { max-height: calc(var(--ground-h) - 12px); }
.place-report .sentence { -webkit-line-clamp: 2; }
@media (max-height: 820px) and (min-width: 861px) { .place-report .sentence { -webkit-line-clamp: 2; } }
@media (max-height: 760px) and (min-width: 861px) { .place-report .sentence { display: none; } .place-report .phase-row { display: none; } }

.block.jump { margin-top: 0; }
.jhead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.jhead h3 { margin: 0; }
.jnow { border: 1px solid var(--line-2); background: rgba(236,230,217,.05); border-radius: 999px; padding: 5px 14px; font-size: 13px; cursor: pointer; color: var(--regolith); }
.jnow:hover { border-color: var(--gold); }
.jsub { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin: 12px 0 6px; }
.jgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.jtile { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-width: 0; padding: 8px 11px; border-radius: 12px; border: 1px solid var(--line); background: rgba(236,230,217,.03); cursor: pointer; text-align: start; transition: border-color .2s, background-color .2s; }
.jtile:hover { border-color: rgba(231,198,122,.6); background: rgba(231,198,122,.07); }
.jl { font-size: 13px; color: var(--regolith); line-height: 1.25; }
.jv { font-size: 14px; color: var(--gold); }
.jtile.sun .jv { color: var(--rose); } .jtile.ecl .jv { color: var(--copper); }
.jtile[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); }
.jtile[aria-pressed="true"] .jl, .jtile[aria-pressed="true"] .jv { color: var(--ink); font-weight: 600; }
.jtile.sun[aria-pressed="true"] { background: var(--rose); border-color: var(--rose); }
.jtile.ecl[aria-pressed="true"] { background: var(--copper); border-color: var(--copper); }
.icon-btn.nudge { box-shadow: 0 0 0 0 rgba(231,198,122,.7); animation: nudge 1.4s infinite; }
@keyframes nudge { 70% { box-shadow: 0 0 0 12px rgba(231,198,122,0); } 100% { box-shadow: 0 0 0 0 rgba(231,198,122,0); } }
@media (max-width: 860px) { .sun-edge { width: 120px; height: 120px; right: -106px; } }
.clock-row { flex-wrap: wrap; row-gap: 2px; }
.clock-sub { white-space: nowrap; }
.jgrid { grid-auto-rows: 1fr; }
@media (max-height: 760px) and (min-width: 861px) { .place-report .phase-row { display: flex; } .place-report .sentence { display: none; } }
@media (max-height: 680px) and (min-width: 861px) { .place-report .phase-row { display: none; } }
@media (max-width: 1360px) and (min-width: 861px) { .place .place-meta { display: none; } }
.place-report .phase-row > div { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-height: 760px) and (min-width: 861px) { .clock-time { font-size: 28px; } .place { gap: 2px; padding-top: 8px; padding-bottom: 8px; } }
.ecl-line { margin: 4px 0 0; font: 400 14px/1.35 var(--f-display); color: var(--copper); }
.ecl-line.sun { color: var(--rose); }
.ecl-line .safety { display: inline; font-size: 12px; }
.place-report .ecl-line ~ .sentence { display: none; }
@media (max-height: 760px) and (min-width: 861px) { .place-report:has(.ecl-line) .phase-row { display: none; } .ecl-line { -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; } }

/* ---------- v7: converter fits any panel width; clear calendar button ---------- */
.panel { overflow-x: hidden; }
.conv2 { grid-template-columns: minmax(0, 1fr); }
.cbox { min-width: 0; }
.cbox input[type=date] { width: 100%; cursor: pointer; }
.cbox input[type=date]::-webkit-calendar-picker-indicator {
  width: 22px; height: 22px; padding: 4px; margin-inline-start: 6px; cursor: pointer; opacity: 1; border-radius: 8px;
  background: rgba(232,196,120,.14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e8c478' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 10h18'/%3E%3C/svg%3E") center / 18px no-repeat;
}
.cbox input[type=date]::-webkit-calendar-picker-indicator:hover { background-color: rgba(232,196,120,.28); }
.cbox:focus-within { border-color: rgba(232,196,120,.55); }
.hfields { min-width: 0; }
.hfields select, .hfields input { cursor: pointer; }
.conv-msg, .conv2 .note { overflow-wrap: anywhere; }
.hfields { gap: 4px; }
.hfields select:first-child { width: 2.7em; flex: none; }
.hfields select:nth-child(2) { flex: 1 1 auto; min-width: 0; }
.hfields input { width: 3.3em; flex: none; text-align: end; -moz-appearance: textfield; appearance: textfield; }
.hfields input::-webkit-outer-spin-button, .hfields input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---------- v7: menu link to the eclipse page ---------- */
.intents a.nav-ecl { margin-inline-start: 6px; position: relative; }
.intents a.nav-ecl::before { content: ''; position: absolute; inset-inline-start: -4px; top: 9px; bottom: 9px; width: 1px; background: var(--line-2); }
.intents a.nav-ecl[aria-current="page"] { background: var(--copper); color: var(--ink); }
@media (max-width: 1360px) and (min-width: 861px) { .intents a { padding-inline: 10px; } }
.jmore { display: inline-block; margin-top: 10px; font-size: 13.5px; }

/* ---------- v7: the eclipse page ---------- */
.ec-page .bar { background: rgba(5, 9, 20, 0.94); }
.ec-stage {
  display: grid; grid-template-columns: minmax(0, 1fr) var(--panel-w); grid-template-rows: minmax(0, 1fr) auto;
  gap: var(--gap); height: 100svh; min-height: 600px; padding: calc(var(--bar-h) + 10px) var(--s5) var(--gap);
}
.ec-view { position: relative; grid-column: 1; grid-row: 1; border-radius: var(--r-panel); overflow: hidden; background: #03050c; border: 1px solid var(--line); min-height: 0; }
.ec-orbit { position: absolute; top: 0; bottom: 0; right: 0; left: min(30%, 300px); overflow: hidden; }
.ec-orbit canvas { display: block; width: 100%; height: 100%; }
.ec-orbit .ol { font-size: 12.5px; } .ec-orbit .ol.node { font-size: 13px; }
.ec-orbit .sun-edge { width: 300px; height: 300px; right: -270px; }

.ec-clock { position: absolute; z-index: 3; top: 16px; left: 18px; max-width: min(42%, 330px); }
.ec-place { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; background: none; border: 0; padding: 0; cursor: pointer; color: var(--regolith); font-size: 14px; text-align: start; }
.ec-place .edit { font-size: 12px; color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.ec-time { font: 400 42px/1.05 var(--f-display); margin-top: 4px; letter-spacing: -0.01em; }
.ec-date { font-size: 13px; color: var(--mist); margin-top: 2px; }
.ec-phase { display: inline-block; margin-top: 8px; font-size: 13.5px; font-weight: 600; color: var(--mist); }
.ec-phase:empty { display: none; }
.ec-phase.penumbral { color: #c5bde6; } .ec-phase.partial, .ec-phase.spartial { color: var(--copper); }
.ec-phase.total { color: #ff8a66; } .ec-phase.stotal { color: #fff; } .ec-phase.sannular { color: var(--gold); }
.ec-phase.over { color: var(--gold); }

.ec-eye { position: absolute; z-index: 3; left: 18px; bottom: 16px; margin: 0; width: min(27%, 260px); text-align: center; }
.ec-eye .frame { position: relative; width: 100%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: #000;
  box-shadow: 0 0 0 1px rgba(231,198,122,.55), 0 0 0 8px rgba(5,9,20,.6), 0 0 0 9px rgba(231,198,122,.18), 0 16px 50px rgba(0,0,0,.6); }
.ec-eye .frame::after { content: ''; position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 34px rgba(0,0,0,.6); pointer-events: none; }
.ec-eye canvas { display: block; width: 100%; height: 100%; }
.ec-eye figcaption { margin-top: 14px; display: grid; gap: 2px; font-size: 12.5px; color: var(--mist); }
.ec-eye figcaption b { color: var(--regolith); font-weight: 600; font-size: 13px; }
.ec-eye figcaption em { font-style: normal; color: var(--copper); line-height: 1.35; }

.ec-bar { grid-column: 1; grid-row: 2; padding: 12px 16px 10px; display: grid; gap: 10px; border-radius: var(--r-panel); }
.ec-ctl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ec-jumps { display: flex; gap: 6px; flex-wrap: wrap; }
.ec-live { margin-inline-start: auto; font-size: 13.5px; }
.rb { position: relative; padding-top: 6px; }
.rb-lanes { position: relative; display: grid; gap: 6px; }
.rb-lane { position: relative; height: 26px; border-radius: 8px; background: rgba(236,230,217,.05); overflow: hidden; }
.rb-lab { position: absolute; z-index: 2; left: 9px; top: 50%; transform: translateY(-50%); font-size: 11.5px; font-weight: 500; color: var(--regolith); text-shadow: 0 1px 2px #000, 0 0 6px #000; pointer-events: none; white-space: nowrap; }
.rb-band { position: absolute; top: 0; bottom: 0; }
.pen { background: linear-gradient(#5f5a7c, #48435f); }
.par { background: linear-gradient(#93533c, #7a3f2c); }
.tot { background: radial-gradient(ellipse at 50% 40%, #c4472a, #82230f); box-shadow: 0 0 10px rgba(229,90,50,.45); }
.spar { background: linear-gradient(rgba(231,198,122,.42), rgba(201,162,79,.32)); }
.stot { background: #020306; box-shadow: inset 0 0 0 1px rgba(255,255,255,.8), 0 0 10px rgba(255,255,255,.45); }
.ann { background: rgba(2,3,6,.85); box-shadow: inset 0 0 0 3px #f0c46a; }
.rb-below, i.hatch { background: repeating-linear-gradient(135deg, rgba(2,3,8,.72) 0 4px, transparent 4px 8px); }
.rb-below { position: absolute; z-index: 1; top: 0; bottom: 0; }
i.hatch { box-shadow: inset 0 0 0 1px var(--line-2); }
.rb-marks { position: absolute; inset: 0; pointer-events: none; }
.rb-mark { position: absolute; top: -3px; bottom: -3px; width: 1px; background: rgba(236,230,217,.35); }
.rb-mark.max { width: 2px; margin-left: -1px; background: var(--gold); }
.rb-head { position: absolute; z-index: 3; top: -7px; bottom: -4px; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 8px rgba(255,255,255,.75); pointer-events: none; }
.rb-head::before { content: ''; position: absolute; top: -5px; left: -5px; width: 12px; height: 12px; border-radius: 50%; background: #fff; }
.rb-head.out { opacity: .25; }
.rb-axis { position: relative; height: 16px; margin-top: 5px; }
.rb-tick { position: absolute; transform: translateX(-50%); font-size: 11px; color: var(--faint); white-space: nowrap; }
.rb-input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; z-index: 4; }
.rb-input:focus-visible + * , .rb:focus-within .rb-head { box-shadow: 0 0 0 3px rgba(231,198,122,.6); }
.rb-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11.5px; color: var(--mist); }
.rb-key i { display: inline-block; width: 16px; height: 9px; border-radius: 2px; margin-inline-end: 6px; vertical-align: -1px; }

.ec-panel { grid-column: 2; grid-row: 1 / span 2; overflow-y: auto; overflow-x: hidden; padding: 18px var(--s5) var(--s5); scrollbar-width: thin; scrollbar-color: rgba(236,230,217,.2) transparent; }
.ec-pick { display: flex; align-items: center; justify-content: center; gap: 14px; }
.ec-year select { appearance: none; background: none; border: 0; border-bottom: 1px dashed var(--line-2); padding: 0 4px 2px; font: 400 30px/1.1 var(--f-display); color: var(--regolith); cursor: pointer; text-align: center; }
.ec-year select option { background: var(--ink-2); font-size: 15px; }
.ec-pick .om-yb { width: 34px; height: 34px; font-size: 18px; line-height: 1; }
.ec-tabs { display: flex; margin-top: 12px; border-bottom: 1px solid var(--line); }
.ec-tabs button { flex: 1; background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 6px; cursor: pointer; color: var(--mist); font-size: 14px; }
.ec-tabs button[aria-selected="true"] { color: var(--copper); border-bottom-color: var(--copper); font-weight: 600; }
.ec-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.ec-item { width: 100%; display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 3px 12px; align-items: center; text-align: start; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(236,230,217,.03); cursor: pointer; transition: border-color .2s, background-color .2s; }
.ec-item:hover { border-color: var(--line-2); }
.ec-item.on { border-color: var(--gold); background: rgba(231,198,122,.09); }
.ec-i-main { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; }
.ec-i-date { font-size: 16px; } .ec-i-kind { font-size: 13px; color: var(--mist); }
.ec-badge { grid-column: 2; font-size: 12px; color: var(--faint); }
.ec-badge.yes { color: var(--zone-a); }
.ec-dot { width: 14px; height: 14px; border-radius: 50%; grid-row: 1 / span 2; }
.lunar-total { background: radial-gradient(circle at 40% 40%, #d0583a, #7c2410); }
.lunar-partial { background: linear-gradient(110deg, #7a3f2c 45%, #e7d9b8 46%); }
.lunar-penumbral { background: linear-gradient(110deg, #8f88a8 40%, #e7d9b8 70%); }
.solar-total, .solar-hybrid { background: #020306; box-shadow: 0 0 0 1.5px #fff, 0 0 6px rgba(255,255,255,.7); }
.solar-annular { background: #020306; box-shadow: inset 0 0 0 2.5px #f0c46a; }
.solar-partial { background: linear-gradient(110deg, #f0c46a 55%, #020306 56%); }
.ec-none { color: var(--faint); font-size: 14px; padding: 12px 0; }
.ec-detail { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.ec-detail h2 { font: 400 23px/1.2 var(--f-display); margin: 0 0 6px; }
.ec-here { margin: 0 0 12px; font-size: 14px; color: var(--mist); }
.ec-here.yes { color: var(--zone-a); }
.ec-watch { margin: 0 8px 8px 0; }
.ec-detail .btn.ghost { margin-bottom: 8px; }
.ec-rows { margin-top: 6px; }
.ec-rows li { font-size: 13.5px; padding: 7px 0; }
.ec-nav { display: flex; justify-content: space-between; gap: 8px; margin-top: 14px; }

.ecl-table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 8px 0 var(--s5); }
.tbl-wrap { overflow-x: auto; }
.ecl-table th { text-align: start; font-weight: 500; color: var(--mist); padding: 8px 10px; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.ecl-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); color: #cfd6e3; }
.ecl-row.solar td:nth-child(3) { color: var(--gold); } .ecl-row.lunar td:nth-child(3) { color: #f0a988; }

@media (max-width: 1100px) and (min-width: 861px) { .ec-eye { width: min(30%, 200px); } .ec-time { font-size: 34px; } }
@media (max-height: 760px) and (min-width: 861px) { .ec-eye { width: min(26%, 200px); } .ec-time { font-size: 34px; } .ec-eye figcaption { margin-top: 10px; } }
@media (max-width: 860px) {
  .ec-stage { display: flex; flex-direction: column; height: auto; min-height: 0; padding: calc(var(--bar-h) + 8px) 10px 0; }
  .ec-view { height: clamp(380px, 62svh, 560px); flex: none; }
  .ec-orbit { left: 0; top: 34%; }
  .ec-orbit .ol { font-size: 10px; } .ec-orbit .ol.node { font-size: 10.5px; }
  .ec-orbit .sun-edge { width: 160px; height: 160px; right: -144px; }
  .ec-clock { top: 12px; left: 14px; max-width: 54%; }
  .ec-time { font-size: 30px; }
  .ec-eye { left: auto; right: 12px; top: 12px; bottom: auto; width: 40%; max-width: 190px; }
  .ec-eye figcaption { margin-top: 8px; font-size: 11.5px; }
  .ec-bar { padding: 10px 12px; }
  .ec-live { margin-inline-start: 0; flex-basis: 100%; }
  .ec-panel { overflow: visible; padding: 16px; margin-top: 10px; }
  .ec-stage .ad-phone { margin: 18px auto 8px; }
}
@media (max-width: 1360px) and (min-width: 861px) { .intents { gap: 0; padding-inline: 8px; } .intents a { padding-inline: 8px; font-size: 13.5px; } .bar { gap: 10px; } }
.ec-detail .note { color: var(--faint); font-size: 12.5px; margin: 10px 0 0; }
[dir="rtl"] .ec-pick .om-yb { transform: scaleX(-1); }
.ec-eye figcaption .ec-filter { font-size: 11.5px; color: var(--faint); }
.ec-stage .ad-phone { order: 0; }
@media (max-width: 600px) {
  .ecl-table thead { display: none; }
  .ecl-table tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .ecl-table td { border: 0; padding: 0; }
  .ecl-table td:nth-child(1) { color: var(--regolith); }
  .ecl-table td:nth-child(2) { text-align: end; color: var(--mist); }
  .ecl-table td:nth-child(2)::after { content: ' UTC'; font-size: 11px; }
  .ecl-table td:nth-child(3) { grid-column: 1 / -1; }
  .ecl-table td:nth-child(4) { grid-column: 1 / -1; color: var(--faint); font-size: 13px; }
}

/* ---------- v8: slimmer top bar with share buttons ---------- */
@media (min-width: 861px) {
  :root { --bar-h: 52px; }
  .bar { gap: 12px; padding-inline: 20px; }
  .brand { gap: 8px; } .brand svg { width: 23px; height: 23px; } .brand span { font-size: 19px; }
  .intents a { padding: 6px 11px; font-size: 13.5px; }
  .lang { padding: 2px; } .lang a { padding: 3px 9px; font-size: 12.5px; }
}
@media (max-width: 1360px) and (min-width: 861px) { .intents a { padding-inline: 8px; font-size: 13px; } .bar { gap: 8px; padding-inline: 14px; } }
.share { position: relative; display: flex; align-items: center; flex: none; }
.share-list { display: flex; gap: 4px; }
.sh, .share-toggle { width: 30px; height: 30px; padding: 0; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); background: rgba(236,230,217,.04); color: var(--mist); cursor: pointer; transition: background-color .18s, color .18s, border-color .18s; }
.sh svg { width: 15px; height: 15px; } .share-toggle svg { width: 16px; height: 16px; }
.sh:hover, .sh:focus-visible { color: #fff; border-color: transparent; }
.sh-whatsapp:hover, .sh-whatsapp:focus-visible { background: #25d366; }
.sh-facebook:hover, .sh-facebook:focus-visible { background: #0866ff; }
.sh-x:hover, .sh-x:focus-visible { background: #000; border-color: var(--line-2); }
.sh-telegram:hover, .sh-telegram:focus-visible { background: #26a5e4; }
.sh-copy:hover, .sh-copy:focus-visible { background: var(--gold); color: var(--ink); }
.share-toggle:hover, .share.open .share-toggle { border-color: var(--gold); color: var(--regolith); }
.sh-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.share-toggle { display: none; }
/* not enough room: one Share button with a small list */
.bar.share-compact .share-toggle { display: grid; }
.bar.share-compact .share-list { display: none; position: absolute; z-index: 40; top: calc(100% + 10px); inset-inline-end: -6px; min-width: 190px; flex-direction: column; gap: 2px; padding: 6px;
  background: rgba(9, 14, 30, 0.97); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: 0 18px 50px rgba(0,0,0,.5); }
.bar.share-compact .share.open .share-list { display: flex; }
.bar.share-compact .sh { width: auto; height: 38px; border-radius: 10px; border: 0; background: none; display: flex; align-items: center; gap: 12px; padding: 0 12px; color: var(--regolith); font-size: 14px; }
.bar.share-compact .sh svg { width: 17px; height: 17px; flex: none; }
.bar.share-compact .sh-whatsapp svg { color: #25d366; } .bar.share-compact .sh-facebook svg { color: #4c8dff; } .bar.share-compact .sh-telegram svg { color: #26a5e4; } .bar.share-compact .sh-copy svg { color: var(--gold); }
.bar.share-compact .sh:hover, .bar.share-compact .sh:focus-visible { background: rgba(236,230,217,.08); color: var(--regolith); }
.bar.share-compact .sh:hover svg { color: inherit; }
.bar.share-compact .sh-l { position: static; width: auto; height: auto; clip: auto; overflow: visible; }
.share-tip { position: fixed; z-index: 90; transform: translateX(-50%); padding: 5px 10px; border-radius: 999px; background: var(--gold); color: var(--ink); font-size: 12.5px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s; white-space: nowrap; }
.share-tip.on { opacity: 1; }
@media (max-width: 860px) {
  .share { margin-inline-start: auto; }
  .bar .share ~ .lang { margin-inline-start: 6px; }
}
@media (max-width: 1535px) and (min-width: 1361px) { .intents a { padding-inline: 8px; } .intents { padding-inline: 8px; } .bar { gap: 8px; } .share-list { gap: 3px; } }

/* ---------- v9: converter boxes and the calendar pop-up ---------- */
button.cbox { width: 100%; text-align: start; cursor: pointer; color: var(--regolith); font: inherit; transition: border-color .2s, background-color .2s; }
button.cbox:hover { border-color: rgba(231,198,122,.45); }
button.cbox[aria-expanded="true"] { border-color: var(--gold); background: rgba(231,198,122,.08); }
.cval { font: 400 18px/1.3 var(--f-display); padding: 2px 0; overflow-wrap: anywhere; }
.calpop { position: fixed; z-index: 80; padding: 12px; border-radius: 16px; background: rgba(10, 15, 32, 0.98); border: 1px solid var(--line-2); box-shadow: 0 22px 60px rgba(0,0,0,.55); color: var(--regolith); }
.calpop .ch { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto 32px; gap: 6px; align-items: center; margin-bottom: 8px; }
.calpop .cnav { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line-2); background: none; color: var(--regolith); font-size: 18px; line-height: 1; cursor: pointer; }
.calpop .cnav:hover { border-color: var(--gold); }
[dir="rtl"] .calpop .cnav { transform: scaleX(-1); }
.calpop select { appearance: none; min-width: 0; background: rgba(236,230,217,.06); border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; color: var(--regolith); font: 500 14px/1.2 var(--f-ui); cursor: pointer; text-align: center; }
.calpop select option { background: var(--ink-2); }
.calpop .cwd, .calpop .cgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.calpop .cwd span { text-align: center; font-size: 11.5px; color: var(--faint); padding: 2px 0 4px; }
.calpop .cpad { display: block; }
.calpop .cday { display: grid; place-items: center; gap: 0; padding: 5px 0 4px; border: 1px solid transparent; border-radius: 10px; background: none; color: var(--regolith); cursor: pointer; }
.calpop .cday b { font: 500 15px/1.1 var(--f-display); }
.calpop .cday small { font-size: 9.5px; line-height: 1.2; color: var(--faint); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calpop .cday:hover, .calpop .cday:focus-visible { background: rgba(236,230,217,.08); outline: none; border-color: var(--line-2); }
.calpop .cday.today { border-color: rgba(231,198,122,.55); }
.calpop .cday.sel { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.calpop .cday.sel small { color: rgba(10,16,34,.7); }
.calpop .cfoot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--faint); }
.calpop .ctoday { background: none; border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 12px; color: var(--gold); cursor: pointer; font-size: 12.5px; }
.calpop .ctoday:hover { border-color: var(--gold); }

/* ---------- v9: toolbar (time row + day strip, tool icons underneath) ---------- */
:root { --time-h: 96px; }
@media (max-height: 760px) and (min-width: 861px) { :root { --time-h: 90px; } }
.timebar { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; align-content: center; column-gap: 16px; row-gap: 4px; padding: 6px 16px 6px; height: var(--time-h); }
.tb-time { display: flex; align-items: center; gap: 6px; }
.tb-date { display: inline-flex; align-items: baseline; gap: 8px; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(236,230,217,.05); color: var(--mist); font: 400 13.5px/1 var(--f-ui); cursor: pointer; white-space: nowrap; transition: border-color .2s; }
.tb-date b { font: 500 16px/1 var(--f-display); color: var(--regolith); font-variant-numeric: tabular-nums; }
.tb-date:hover, .tb-date[aria-expanded="true"] { border-color: var(--gold); }
.tb-live { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line-2); background: none; color: var(--faint); font: 600 11.5px/1 var(--f-ui); letter-spacing: .06em; cursor: pointer; }
.tb-live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .7; }
.tb-live:hover { border-color: var(--gold); color: var(--mist); }
.tb-live.on { color: #9be0b6; border-color: rgba(124,197,154,.55); background: rgba(124,197,154,.08); }
.tb-live.on::before { opacity: 1; animation: pulse 2s infinite; }
.tb-btn { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); background: rgba(236,230,217,.05); color: var(--regolith); cursor: pointer; transition: border-color .2s, background-color .2s; }
.tb-btn svg { width: 16px; height: 16px; }
.tb-btn:hover { border-color: var(--gold); }
.tb-btn.on { border-color: var(--gold); color: var(--gold); }
.tb-btn.primary { width: 40px; height: 40px; background: var(--gold); color: var(--ink); border: 0; }
.tb-btn.primary:hover { background: #f0d38f; }
.tb-btn.primary.nudge { animation: nudge 1.4s infinite; }
.tb-speed { padding: 7px 26px 7px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(236,230,217,.05) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23a9b6cc' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 10px center; color: var(--regolith); font-size: 13px; cursor: pointer; white-space: nowrap; }
html[dir="rtl"] .tb-speed { padding: 7px 12px 7px 26px; background-position: left 10px center; }
.tb-speed:hover, .tb-speed[aria-expanded="true"] { border-color: var(--gold); }
.timebar .scrub { height: 40px; align-self: center; }
.timebar .scrub-track { top: 13px; height: 12px; border-radius: 6px; }
.timebar .scrub-head { top: 9px; height: 20px; }
.timebar .scrub-ticks { top: 27px; }
.timebar .scrub-moon { top: 27px; height: 2px; }
.timebar .scrub-mark { font-size: 10px; top: 0; }
.tb-tools { grid-column: 1 / -1; display: flex; justify-content: center; gap: 4px; }
.tool { width: 34px; height: 30px; border-radius: 10px; display: grid; place-items: center; border: 0; background: none; color: var(--gold); cursor: pointer; transition: background-color .15s, color .15s; }
.tool svg { width: 19px; height: 19px; }
.tool:hover, .tool[aria-expanded="true"] { background: rgba(231,198,122,.14); }
.tool[aria-pressed="true"], .tool.on { background: var(--gold); color: var(--ink); }
.tool.busy { animation: pulse 0.9s infinite; }
.labels.no-hours .hour { display: none; }

/* pop-up panels above the toolbar */
.tb-pop { position: fixed; z-index: 70; min-width: 230px; max-width: min(420px, calc(100vw - 16px)); padding: 10px 14px 14px; border-radius: 16px; background: rgba(9, 14, 30, 0.97); border: 1px solid var(--line-2); box-shadow: 0 20px 60px rgba(0,0,0,.55); }
.pop-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.pop-h b { font: 500 16px/1.2 var(--f-display); }
.pop-note { margin: 8px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--faint); }
.pop-list { display: grid; gap: 2px; }
.pop-list button { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 8px 10px; border-radius: 9px; border: 0; background: none; color: var(--regolith); text-align: start; cursor: pointer; font-size: 14px; }
.pop-list button:hover { background: rgba(236,230,217,.08); }
.pop-list button[aria-checked="true"] { color: var(--gold); font-weight: 600; }
.pop-list button[aria-checked="true"]::after { content: '✓'; }
.dt-row { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.dt-row select, .dt-step select { appearance: none; background: rgba(236,230,217,.06); border: 1px solid var(--line); border-radius: 9px; padding: 7px 8px; color: var(--regolith); font: 500 14px/1.1 var(--f-ui); cursor: pointer; text-align: center; font-variant-numeric: tabular-nums; }
.dt-row select option, .dt-step select option { background: var(--ink-2); }
.dt-gap { width: 6px; } .dt-colon { color: var(--mist); }
.dt-now { margin-inline-start: 6px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--gold); background: none; color: var(--gold); font-weight: 600; cursor: pointer; }
.dt-now:hover { background: var(--gold); color: var(--ink); }
.dt-step { display: grid; grid-template-columns: 38px minmax(0, 1fr) 38px; gap: 6px; margin-top: 10px; }
.dt-pm { height: 36px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(236,230,217,.05); color: var(--regolith); font-size: 20px; cursor: pointer; }
.dt-pm:hover { border-color: var(--gold); color: var(--gold); }
.zoom-row { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--mist); }
.zoom-row input { flex: 1; accent-color: var(--gold); min-width: 150px; }
.zoom-val { text-align: center; font: 500 20px/1.2 var(--f-display); color: var(--gold); margin-top: 6px; }
.set-list { display: grid; gap: 2px; }
.set-row { display: flex; align-items: center; gap: 10px; padding: 7px 4px; font-size: 14px; cursor: pointer; }
.set-row input { width: 17px; height: 17px; accent-color: var(--gold); }
.link-row { display: flex; gap: 6px; margin-top: 10px; }
.link-row input { flex: 1; min-width: 0; background: rgba(236,230,217,.06); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; color: var(--mist); font-size: 12.5px; direction: ltr; }
.link-nets { display: flex; gap: 6px; margin-top: 10px; }

/* help */
.help-dlg { max-width: 560px; }
.help-intro { color: var(--mist); font-size: 14px; line-height: 1.55; margin: 0 0 10px; }
.help-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 58vh; overflow-y: auto; }
.help-list li { display: grid; grid-template-columns: 36px 1fr; gap: 10px; align-items: start; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.5; color: #cfd6e3; }
.help-ic { display: grid; place-items: center; height: 24px; color: var(--gold); }
.help-ic svg { width: 19px; height: 19px; }
.help-live { font: 600 10px/1 var(--f-ui); letter-spacing: .06em; color: #9be0b6; border: 1px solid rgba(124,197,154,.55); border-radius: 999px; padding: 4px 6px; }
.help-strip { width: 28px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #0b1430, #6f8fd8, #f2c66b, #0b1430); }

/* camera preview */
.shot-dlg { width: min(900px, 94vw); max-width: none; }
.shot-img { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #02040a; }
.shot-img img { display: block; width: 100%; max-height: 60vh; object-fit: contain; }
.shot-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.shot-actions a.btn { text-decoration: none; }

/* night mode: red light only (keeps night vision when used outdoors) */
html.night::after { content: ''; position: fixed; inset: 0; z-index: 2147483000; background: #ff2200; mix-blend-mode: multiply; pointer-events: none; }
html.night dialog { filter: grayscale(1) sepia(1) saturate(9) hue-rotate(-42deg) brightness(.78); }
html.night dialog::backdrop { background: rgba(20, 0, 0, .7); }

/* phones */
@media (max-width: 860px) {
  .timebar { grid-template-columns: 1fr; height: auto; padding: 10px; row-gap: 8px; }
  .tb-time { flex-wrap: wrap; justify-content: center; }
  .tb-date { font-size: 12.5px; padding: 6px 10px; } .tb-date b { font-size: 15px; }
  .tb-tools { justify-content: space-between; gap: 0; }
  .tool { width: 36px; height: 34px; }
}
@media (max-width: 860px) {
  .tb-date { flex: 1 1 100%; justify-content: center; }
  .timebar .scrub { order: 1; } .tb-tools { order: 2; } .tb-time { order: 0; }
}
.ec-tools { display: inline-flex; gap: 2px; margin-inline-start: auto; }
.ec-tools + .ec-live { margin-inline-start: 6px; }
@media (max-width: 860px) { .ec-tools { margin-inline-start: 0; } }

/* ---------- v10: one Share button in the top bar, more networks ---------- */
.bar.share-compact .share-toggle { display: inline-flex; align-items: center; gap: 7px; width: auto; height: 32px; padding: 0 13px 0 11px; border-radius: 999px; font: 500 13px/1 var(--f-ui); color: var(--regolith); }
.share-toggle .share-word { white-space: nowrap; }
@media (max-width: 860px) { .bar.share-compact .share-toggle { padding: 0; width: 32px; justify-content: center; } .share-word { display: none; } }
.bar.share-compact .share-list { min-width: 210px; max-height: min(70vh, 520px); overflow-y: auto; }
.bar.share-compact .sh-reddit svg { color: #ff4500; } .bar.share-compact .sh-linkedin svg { color: #3d8fe0; } .bar.share-compact .sh-pinterest svg { color: #e60023; }
.bar.share-compact .sh-email svg, .bar.share-compact .sh-more svg { color: var(--mist); }
.bar.share-compact .sh-copy { border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; margin-top: 2px; }
.sh-reddit:hover, .sh-reddit:focus-visible { background: #ff4500; }
.sh-linkedin:hover, .sh-linkedin:focus-visible { background: #0a66c2; }
.sh-pinterest:hover, .sh-pinterest:focus-visible { background: #e60023; }
.sh-email:hover, .sh-email:focus-visible, .sh-more:hover, .sh-more:focus-visible { background: var(--gold); color: var(--ink); }
.link-nets { flex-wrap: wrap; }
.shot-nets { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin-top: 12px; font-size: 13px; color: var(--faint); }
.shot-nets .link-nets { margin-top: 0; }

/* ---------- v11: footer and text pages (About, Contact, Privacy, Terms) ---------- */
.site-foot { background: #050914; border-top: 1px solid var(--line); padding: 28px var(--s5) 36px; }
.site-foot-in { max-width: 1180px; margin-inline: auto; display: grid; gap: 10px; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot-nav a { color: var(--regolith); text-decoration: none; font-size: 14px; }
.foot-nav a:hover { color: var(--gold); text-decoration: underline; }
.foot-line, .foot-copy { margin: 0; font-size: 12.5px; color: var(--faint); max-width: 80ch; }
.doc-page main.doc { padding: calc(var(--bar-h) + 40px) var(--s5) 64px; background: linear-gradient(to bottom, #04060d, var(--ink) 320px); min-height: 70vh; }
.doc-body { max-width: 72ch; margin-inline: auto; }
.doc-body h1 { font: 400 clamp(32px, 4vw, 46px)/1.1 var(--f-display); margin: 0 0 12px; }
.doc-body .lede { font: 400 19px/1.6 var(--f-display); color: var(--mist); margin: 0 0 28px; }
.doc-body .meta { color: var(--faint); font-size: 13px; margin: 0 0 14px; }
.doc-body h2 { font: 400 24px/1.25 var(--f-display); margin: 34px 0 10px; }
.doc-body p, .doc-body li { color: #cfd6e3; line-height: 1.7; font-size: 15.5px; }
.doc-body ul { padding-inline-start: 20px; }
.doc-body li { margin-bottom: 6px; }
.doc-body a { overflow-wrap: anywhere; }
@media (max-width: 860px) { .doc-page main.doc { padding: calc(var(--bar-h) + 24px) var(--s4) 48px; } }
