/* Lunar-eclipse mode (lunar.js): its stage (in the shell's view), clock bar and surfaces, on the page's
   Cosmic Dark variables with the shell's lunar --accent. Every rule is scoped under .lu, the class
   lunar.js puts on each element the shell hands it; surfaces lay out by their own width (@container). */
.lu {
    --lu-accent: var(--accent, #b7c8e0); /* MoonPrimaryContainer */
    --lu-on-accent: #1b2c3c;
    --lu-label: #bfc7d2;                 /* MoonOnSurfaceVariant */
}
.lu input[type=range] { width: 100%; padding: 0; border: 0; background: none; accent-color: var(--lu-accent); }
.lu select, .lu input[type=text] {
    font: inherit; color: inherit; background: var(--bg-deep); min-width: 0;
    border: 1px solid var(--outline); border-radius: 8px; padding: 6px 8px;
}
.lu button[aria-pressed="true"] { background: var(--surface-highest); color: var(--lu-accent); border-color: var(--lu-accent); }
.lu .lu-title { font-size: 20px; font-weight: 700; margin: 0 0 4px; }

/* ---------- Stage: the sky view inside the shell's view ---------- */
.lu .lu-stage { position: absolute; inset: 0; overflow: hidden; background: radial-gradient(90% 55% at 50% 44%, #141826 0%, #0f121a 45%, #07080d 100%); }
/* The sky fills the clear band between the shell's floating header and bottom card (--top-inset, --bottom-inset). */
.lu .lu-stage canvas {
    position: absolute; left: 0; right: 0; top: var(--top-inset, 0px); height: calc(100% - var(--top-inset, 0px) - var(--bottom-inset, 0px));
    width: 100%; display: block;
}
.lu .lu-stage canvas[hidden] { display: none; }
.lu .lu-loading { margin: 0; padding: 24px var(--gutter, 16px); color: var(--muted); }
.lu .lu-globe {
    position: absolute; top: calc(var(--top-inset, 0px) + 4px); right: var(--inset, 16px); width: 44px; height: 44px; padding: 0;
    display: grid; place-items: center; border-radius: 50%; color: var(--lu-accent);
    background: var(--glass); border: 1px solid var(--glass-border); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.lu .lu-globe[aria-pressed="true"] { background: var(--lu-accent); color: var(--lu-on-accent); }
/* Top-left, clear of the shell's button row along the bottom. */
.lu .lu-corner {
    position: absolute; top: calc(var(--top-inset, 0px) + 4px); left: var(--inset, 16px); right: 72px; pointer-events: none;
    display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
}
.lu .lu-maplegend {
    background: #111319cc; border-radius: 8px; padding: 6px 10px; font-size: 12px; color: var(--on-variant, #d0c6ab);
}
.lu .lu-maplegend[hidden] { display: none; }
.lu .lu-swatch {
    display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px;
    background: #b5613b; box-shadow: 0 0 0 3px #b5613b38;
}
.lu .lu-status {
    font: 11px ui-monospace, Menlo, monospace; color: var(--muted);
    background: #111319cc; border-radius: 6px; padding: 4px 8px; white-space: pre;
}

/* ---------- The shell's bar: play, the clock and a copper track (style.css's .tl, the PhoneLunar board) ---------- */
.lu .lu-play { background: var(--lu-accent); color: var(--lu-on-accent); }
.lu .lu-track { --a: var(--copper, #e07a4f); }
.lu .lu-track .rail { background: rgba(183, 200, 224, 0.18); }
.lu .lu-track .lu-win { position: absolute; pointer-events: none; }
.lu .lu-track .lu-partial { left: var(--u1); right: calc(100% - var(--u4)); top: 11px; height: 4px; border-radius: 2px; background: #a2482a; }
.lu .lu-track .lu-total { left: var(--u2); right: calc(100% - var(--u3)); top: 10px; height: 6px; border-radius: 3px; background: #e07a4f; box-shadow: 0 0 12px rgba(224, 122, 79, 0.6); }
.lu .lu-track.lu-nopartial .lu-partial, .lu .lu-track.lu-nototal .lu-total { display: none; }
.lu .lu-track input[type=range].sun::-webkit-slider-thumb { background: #ffd9c4; }
.lu .lu-track input[type=range].sun::-moz-range-thumb { background: #ffd9c4; }
.lu .lu-times { grid-area: labels; display: flex; justify-content: space-between; margin-top: -6px; font: 500 11px var(--font-display); font-variant-numeric: tabular-nums; color: var(--faint, #8f96a4); }
@media (max-width: 599.98px) {
    .lu .lu-track .lu-partial { top: 7px; }
    .lu .lu-track .lu-total { top: 6px; }
    .lu .lu-times { margin-top: -4px; }
}
/* The local-timings surface's own clock and slider. */
.lu .lu-circ .lu-scrub { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0 0; }
.lu .lu-readout { font: 500 13px var(--font-display); color: var(--lu-accent); text-align: center; white-space: pre-wrap; font-variant-numeric: tabular-nums; }

/* ---------- 'chooser': LunarEclipseChooser, chooser.js's layout (style.css) with copper chips and rows ---------- */
.lu .fchip[aria-pressed="true"] { border-color: color-mix(in srgb, var(--copper, #e07a4f) 50%, transparent); background: color-mix(in srgb, var(--copper, #e07a4f) 14%, transparent); color: var(--copper-light, #f0a37a); }
.lu .chSearch:focus-within { border-color: color-mix(in srgb, var(--copper, #e07a4f) 60%, transparent); }
.lu .lu-row {
    display: flex; align-items: center; gap: 14px; padding: 8px 12px; cursor: pointer;
    border: 1px solid transparent; border-radius: 14px;
}
.lu .lu-row:hover { background: var(--hover); }
.lu .lu-row.selected { background: color-mix(in srgb, var(--copper, #e07a4f) 7%, transparent); border-color: color-mix(in srgb, var(--copper, #e07a4f) 35%, transparent); }
.lu .lu-row:focus-visible { outline: 2px solid var(--lu-accent); outline-offset: -2px; }
.lu .lu-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lu .lu-date { font: 600 16px var(--font-display); }
.lu .lu-meta { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lu .lu-row.selected .magVal { color: var(--copper-light, #f0a37a); }
.lu .lu-when { flex: none; width: 92px; text-align: right; font-size: 12px; color: var(--muted); }
@container (max-width: 520px) {
    .lu .lu-row { gap: 10px; padding: 8px; }
    .lu .lu-row .glyph { width: 34px; height: 34px; }
    .lu .lu-when { display: none; }
}

/* ---------- 'circ': LunarLocalTimingsContent ---------- */
.lu .lu-circ { padding: 16px var(--gutter, 16px) max(12px, env(safe-area-inset-bottom)); }
.lu .lu-where { color: var(--muted); font-size: 12px; margin-bottom: 10px; }
.lu .lu-link { background: none; border: 0; padding: 0; color: var(--lu-accent); text-decoration: underline; cursor: pointer; font: inherit; }
.lu .lu-banner {
    display: flex; flex-direction: column; gap: 2px; margin-top: 4px; padding: 14px 16px; border-radius: 14px;
    background: #434650; color: #b2b5c0; font-size: 13px; /* secondaryContainer / onSecondaryContainer */
}
.lu .lu-banner b { font-size: 15px; color: var(--on-surface); }
.lu .lu-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.lu .lu-chip { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.2; padding: 4px 10px; }
.lu .lu-chip small { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.lu .lu-chip[aria-pressed="true"] small { color: var(--lu-accent); }
.lu .lu-localsky { width: 100%; height: clamp(260px, 52vh, 620px); display: block; border-radius: 10px; background: #070a12; }

/* ---------- 'info' and 'help': LunarInfoContent / LunarHelpContent ---------- */
.lu .lu-doc { max-width: 640px; margin: 0 auto; padding: 16px var(--gutter, 16px) 24px; display: flex; flex-direction: column; gap: 16px; }
.lu .lu-doc header { padding-left: 4px; }
.lu .lu-doc h2 { margin: 0; font-size: 24px; font-weight: 700; }
.lu .lu-doc header p { margin: 4px 0 0; color: var(--muted); }
.lu .lu-card { background: var(--surface, #1d1f26); border-radius: 24px; padding: 20px; }
.lu .lu-card h3 { margin: 0 0 12px; font-size: 16px; font-weight: 500; color: var(--lu-accent); }
.lu .lu-card dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; }
.lu .lu-card dt { color: var(--muted); }
.lu .lu-card dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.lu .lu-legend { display: grid; grid-template-columns: 36px 1fr; gap: 8px; padding: 6px 0; }
.lu .lu-legend > span { justify-self: center; margin-top: 3px; }
.lu .lu-legend b { font-size: 15px; font-weight: 600; }
.lu .lu-legend p { margin: 0; color: var(--muted); font-size: 13px; }
.lu .lu-sw-dot {
    width: 16px; height: 16px; border-radius: 50%; background: var(--bg-deep); border: 1px solid var(--outline);
    display: grid; place-items: center;
}
.lu .lu-sw-dot i { width: 10px; height: 10px; border-radius: 50%; }
.lu .lu-legend > .lu-sw-dash { width: 20px; height: 3px; border-radius: 2px; margin-top: 8px; }
.lu .lu-sw-sym { font-size: 12px; font-weight: 500; color: var(--lu-accent); white-space: nowrap; }
