/* 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: var(--bg-deep); }
.lu .lu-stage canvas { position: absolute; inset: 0; width: 100%; height: 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: 12px; right: 12px; width: 40px; height: 40px; padding: 0;
    display: grid; place-items: center; border-radius: 12px; color: var(--lu-accent);
}
.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: 12px; left: 12px; right: 64px; 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;
}

/* ---------- Clock + slider (the shell's bar, and the local-timings copy) ---------- */
.lu .lu-scrub { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px var(--gutter, 16px); }
.lu .lu-scrub output {
    font: 500 13px ui-monospace, Menlo, monospace; color: var(--lu-accent); text-align: center;
    white-space: pre-wrap; font-variant-numeric: tabular-nums;
}
.lu .lu-clock span { color: var(--lu-label); }

/* ---------- 'chooser': LunarEclipseChooser ---------- */
.lu .lu-controls { padding: 16px var(--gutter, 16px) 4px; background: var(--surface, #1d1f26); }
.lu .lu-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.lu .lu-filters select { flex: 1 1 120px; }
.lu .lu-filters button { flex: 1 1 120px; white-space: nowrap; }
.lu .lu-filters button[hidden] { display: none; }
.lu .lu-yearhead { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; font-size: 12px; color: var(--muted); }
.lu .lu-yearhead .lu-active { color: var(--lu-accent); }
.lu .lu-yearhead button { padding: 2px 8px; font-size: 12px; background: none; border: 0; color: var(--lu-accent); }
.lu .lu-yearhead button:disabled { color: var(--muted); opacity: .5; cursor: default; }
.lu .lu-years { display: flex; align-items: end; gap: 12px; margin: 4px 0 8px; color: var(--muted); }
.lu .lu-years label { flex: 1; display: flex; flex-direction: column; gap: 2px; font-size: 11px; min-width: 0; }
.lu .lu-years input { font-family: ui-monospace, Menlo, monospace; color: var(--on-surface); border-color: color-mix(in srgb, var(--lu-accent) 50%, transparent); }
.lu .lu-years > span { padding-bottom: 8px; }
.lu .lu-count { color: var(--muted); font-size: 12px; padding: 6px var(--gutter, 16px) 4px; }
.lu .lu-eclipses { list-style: none; margin: 0; padding: 0; }
.lu .lu-eclipses li {
    display: grid; grid-template-columns: 14px 1fr auto; align-items: center; gap: 12px;
    padding: 10px var(--gutter, 16px); cursor: pointer; border-bottom: 1px solid #ffffff0d;
}
.lu .lu-eclipses li:hover { background: var(--surface, #1d1f26); }
.lu .lu-eclipses li.selected { background: var(--surface-high); }
.lu .lu-eclipses li:focus-visible { outline: 2px solid var(--lu-accent); outline-offset: -2px; }
.lu .lu-eclipses li.lu-empty, .lu .lu-eclipses li.lu-more { display: block; color: var(--muted); cursor: default; border: 0; }
.lu .lu-dot { width: 14px; height: 14px; border-radius: 50%; }
.lu .lu-date { font-size: 15px; }
.lu li.selected .lu-date { font-weight: 600; }
.lu .lu-meta { color: var(--lu-label); font-size: 12px; }
.lu .lu-mag { color: var(--lu-label); font-variant-numeric: tabular-nums; }
.lu li.selected .lu-mag { color: var(--lu-accent); }
@container (min-width: 880px) { /* SurfaceTwoColumnMinWidth: controls beside the list */
    .lu .lu-chooser { display: grid; grid-template-columns: 48fr 52fr; align-items: start; }
    .lu .lu-controls { position: sticky; top: 0; border-right: 1px solid var(--outline); }
}

/* ---------- '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; }
.lu .lu-circ .lu-scrub { padding: 8px 0 0; }

/* ---------- '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; }
