/* Sun & Moon · the logo's two dials on a page of their own, made for a phone first

   One dial at a time, as large as the screen allows, with its readings below it (beside it on a wide or turned
   screen) and the tabs at the bottom, in reach of a thumb. The faces and readings keep their look from
   ../assets/brand.css and every colour comes from ../assets/site.css, so they match the logo's dials and all five
   themes. Installed, it runs edge to edge: the bar at the top and the tabs at the bottom keep clear of the notch and
   the home indicator. */

:root { --tabs-h: 61px; --nav-height: calc(var(--tabs-h) + env(safe-area-inset-bottom, 0px)); }
html { scroll-padding-top: 0; }
body.dials {
  min-height: 100vh; min-height: 100dvh;
  font-family: var(--font-ui); font-size: 1rem; line-height: 1.45; letter-spacing: 0.01em;
  -webkit-tap-highlight-color: transparent;
}
/* installed, a pull at the top doesn't reload it and the page doesn't bounce */
@media (display-mode: standalone) { html, body { overscroll-behavior-y: none; } }
button { touch-action: manipulation; }

/* ───── The bar ───── */
.top {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 40px auto; align-items: center; gap: 8px;
  max-width: 1000px; margin: 0 auto;
  padding: calc(env(safe-area-inset-top, 0px) + 6px) max(16px, env(safe-area-inset-right, 0px)) 2px max(16px, env(safe-area-inset-left, 0px));
}
.top-actions { grid-column: 3; grid-row: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
.app-name {
  grid-column: 1; grid-row: 1;
  margin: 0 auto 0 0; min-width: 0;
  font-family: var(--font-display); font-size: 1.04rem; font-weight: 600; letter-spacing: 0.12em; line-height: 1.2;
  color: var(--ink); font-size: clamp(0.8rem, 2.3vw, 1.04rem); letter-spacing: 0.06em;
}
.app-name span { color: var(--gold-ink); }
.top .icon-btn { width: 40px; height: 40px; }
.top .compass-btn { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; justify-content: center; gap: 0; padding: 2px; color: var(--muted); }
.top .compass-icon { width: 24px; height: 24px; flex: none; overflow: visible; }
.compass-ring, .compass-ticks { fill: none; stroke: currentColor; stroke-width: 0.8; }
.compass-ticks { stroke-width: 1.1; }
.compass-north { fill: var(--gold-ink); }
.compass-south { fill: var(--muted); }
.compass-pivot { fill: var(--ink); }
.compass-reading { min-height: 8px; font: 0.5rem/1 var(--font-mono); letter-spacing: 0; }
.compass-btn[data-state="active"] { color: var(--gold-ink); border-color: var(--gold); }
.compass-btn:not([data-state="active"]) .compass-needle { opacity: 0.4; }
.compass-expanded {
  position: absolute; z-index: 60; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  width: min(320px, calc(100vw - 32px)); max-height: calc(100vh - 100px); max-height: calc(100dvh - 100px);
  overflow-y: auto; overscroll-behavior: contain; padding: 12px 18px 18px;
  border: 1px solid var(--hair-2); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); text-align: center;
}
.compass-expanded-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2px; }
.compass-expanded-header h2 { margin: 0; color: var(--ink); font: 1rem var(--font-display); }
.compass-expanded-face { display: block; width: min(100%, 280px, 52vh); height: auto; aspect-ratio: 1; margin: 0 auto; }
.compass-expanded-ring, .compass-expanded-inner { fill: none; stroke: var(--hair-2); stroke-width: 1; }
.compass-expanded-inner { stroke-width: 0.5; }
.compass-forward { fill: var(--ink); }
.compass-expanded-ticks { fill: none; stroke: var(--muted); stroke-width: 1; }
.compass-cardinal { fill: var(--ink-2); font: 15px var(--font-display); text-anchor: middle; dominant-baseline: central; }
.compass-cardinal-north { fill: var(--gold-ink); }
.compass-expanded:not([data-state="active"]) #compassRose { opacity: 0.4; }
.compass-expanded-reading { margin: 8px 0 4px; color: var(--gold-ink); font: 1.3rem var(--font-mono); }
.compass-expanded-status { margin: 0 auto 14px; max-width: 245px; min-height: 2.8em; color: var(--muted); font-size: 0.8rem; line-height: 1.4; }
.compass-power { min-height: 42px; padding: 8px 18px; border: 1px solid var(--hair-2); border-radius: 999px; color: var(--ink-2); background: var(--surface-2); font: 0.86rem var(--font-ui); cursor: pointer; }
.compass-power[aria-pressed="true"] { border-color: var(--gold); color: var(--gold-ink); }
.chip {
  display: inline-flex; align-items: center; gap: 6px; flex: none; height: 40px; padding: 0 14px 0 11px;
  border: 1px solid var(--hair-2); border-radius: 999px; background: none; cursor: pointer;
  font-family: var(--font-ui); font-size: 0.88rem; font-weight: 500; letter-spacing: 0.03em; color: var(--ink-2);
  transition: color 0.2s, border-color 0.2s;
}
.chip svg { width: 17px; height: 17px; flex: none; }
.chip.here { color: var(--gold-ink); border-color: var(--gold); }
.chip.here svg path { fill: currentColor; fill-opacity: 0.22; }
@media (hover: hover) { .chip:hover { color: var(--gold-ink); border-color: var(--gold); } }
@media (prefers-reduced-motion: no-preference) {
  .chip[aria-busy="true"] svg { animation: pin-look 0.8s ease-in-out infinite alternate; }
}
@keyframes pin-look { from { transform: translateY(1px); opacity: 0.55; } to { transform: translateY(-2px); opacity: 1; } }
.theme-menu { z-index: 50; }
@media (max-width: 640px) {
  .top-actions { gap: 6px; }
  .top-actions .chip { width: 40px; padding: 0; justify-content: center; }
  .top-actions #placeName { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
/* too narrow for the name beside the buttons: it is still there for screen readers */
@media (max-width: 359px) {
  .app-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}

/* ───── A dial ───── */
main {
  max-width: 1000px; margin: 0 auto;
  overflow-x: hidden; overflow-x: clip;   /* the glow behind the dial reaches past a phone's edges; it mustn't widen the page */
  padding: 0 max(16px, env(safe-area-inset-right, 0px)) calc(var(--nav-height) + 8px) max(16px, env(safe-area-inset-left, 0px));
}
.panel {
  --dial: min(100%, 440px);
  display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; justify-items: center; gap: 6px;
}
.panel[data-kind="sun"] { --halo: 236 190 96; }
.panel[data-kind="moon"] { --halo: 214 224 240; }
.dial-wrap { position: relative; width: var(--dial); max-width: 100%; margin: 0; }
/* a little of the light behind the dial: warm for the sun, cool for the moon */
.dial-wrap::before {
  content: ""; position: absolute; inset: -16%; z-index: -1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgb(var(--halo) / 0.13), rgb(var(--halo) / 0.04) 48%, transparent 68%);
}
.panel .sky-face { max-width: none; margin: 0; -webkit-touch-callout: none; }
.panel .sky-face:focus-visible { outline-offset: 6px; }
.panel .sky-zodiac text { paint-order: stroke fill; stroke: var(--bg); stroke-width: 2px; stroke-linejoin: round; }
.panel .sky-zodiac-glyph { font-family: "Segoe UI Symbol", "Apple Symbols", "Noto Sans Symbols", serif; font-size: 22px; fill: var(--gold-ink); }
.panel .sky-zodiac-name { font-size: 9px; fill: var(--ink); }

/* ───── Its readings ───── */
.readout { width: min(100%, 520px); color: var(--ink-2); }
.readout b { font-weight: 600; color: var(--gold-ink); }
.when-row { display: grid; grid-template-columns: minmax(0, 1fr) 7rem; align-items: center; gap: 8px; min-height: 44px; }
.sky-context { min-width: 0; overflow-wrap: anywhere; }
.readout .sky-when { margin: 0; text-align: left; font-size: 0.88rem; }
.now-slot { min-width: 0; }
.readout .sky-back { min-height: 40px; width: 100%; padding: 5px 8px; white-space: normal; font-size: 0.8rem; color: var(--gold-ink); border-color: var(--gold); }
.readout .sky-key { margin: 4px 0 8px; font-size: 0.74rem; gap: 4px 10px; }
.readout .sky-key span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.readout .sky-key i { width: 9px; height: 9px; margin: 0; flex: none; }
.sky-rows {
  padding: 2px 12px;
  border: 1px solid var(--hair); border-radius: 16px; background: var(--surface);
}
.readout .sky-row { display: block; margin: 0; padding: 7px 0; font-size: 0.93rem; line-height: 1.42; overflow-wrap: anywhere; }
.sky-rows > .sky-row, .sky-rows > .sky-pair { border-top: 1px solid var(--hair); }
.sky-rows > :first-child, .sky-rows > .sky-dial-summary + * { border-top: 0; }
.readout .sky-k { padding: 0; margin-right: 8px; font-size: 0.64rem; }
.readout .sky-k:empty { display: none; }
.readout .sky-where { margin: 1px 0 0; padding: 0; border: 0; text-align: left; font-size: 0.78rem; }
.sky-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sky-pair .sky-k { display: block; margin-right: 0; }
.sky-dial-summary { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.about { max-width: 520px; margin: 28px auto 0; text-align: center; font-size: 0.76rem; line-height: 1.5; color: var(--muted); }
.about p { margin: 4px 0; }
.about a { color: var(--ink-2); text-underline-offset: 3px; text-decoration-color: var(--hair-2); }
@media (hover: hover) { .about a:hover { color: var(--gold-ink); } }
.app-help { width: min(440px, calc(100% - 32px)); max-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 32px); padding: 18px; overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--hair-2); border-radius: 20px; background: var(--surface); color: var(--ink-2); box-shadow: var(--shadow); }
.app-help::backdrop { background: rgb(0 0 0 / 0.6); }
.help-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.help-heading h2 { margin: 0; font: 1.1rem var(--font-display); color: var(--ink); }
.help-heading button { flex: none; }
.app-help > p { margin: 14px 0; font-size: 0.95rem; line-height: 1.5; }
/* donations through PayPal, as on The Crown and the Abyss */
.help-donate { margin: 18px 0 6px; padding: 16px; border: 1px solid var(--hair-2); border-radius: 16px; background: var(--surface-2); text-align: center; }
.help-donate p { margin: 0 0 12px; font-size: 0.92rem; line-height: 1.5; color: var(--ink-2); }
.donate-btn svg { width: 16px; height: 16px; flex: none; fill: currentColor; stroke: none; }
.app-help .about { margin-top: 20px; }

/* ───── The tabs ───── */
.tabs {
  position: fixed; z-index: 40; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: center;
  padding: 4px max(16px, env(safe-area-inset-right, 0px)) calc(4px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  background: rgb(var(--shade) / 0.84);
  -webkit-backdrop-filter: blur(16px) saturate(1.2); backdrop-filter: blur(16px) saturate(1.2);
  border-top: 1px solid var(--hair);
}
.tablist {
  position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: min(100%, 520px); padding: 2px;
  border: 1px solid var(--hair-2); border-radius: 999px; background: var(--surface);
}
/* the lit pill under the chosen tab, which glides across to the other on a spring */
.tab-glide {
  position: absolute; top: 2px; bottom: 2px; left: 2px; width: calc((100% - 4px) / 4);
  border-radius: 999px; background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--hair-2), 0 8px 20px -12px rgb(0 0 0 / 0.7);
}
:root[data-dial="sun"] .tab-glide { transform: translateX(100%); }
:root[data-dial="year"] .tab-glide { transform: translateX(200%); }
:root[data-dial="sky"] .tab-glide { transform: translateX(300%); }
.ready .tab-glide { transition: transform var(--spring-ms, 520ms) var(--spring, cubic-bezier(.3, 1.25, .5, 1)); }
.tab {
  position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 9px; min-width: 0; min-height: 46px; padding: 8px 2px;
  border: 0; border-radius: 999px; background: none; cursor: pointer;
  font-family: var(--font-ui); font-size: 0.78rem; font-weight: 600; line-height: 1.25; letter-spacing: 0.16em; text-transform: uppercase; overflow-wrap: anywhere;
  color: var(--muted); transition: color 0.25s;
}
.tab[aria-selected="true"] { color: var(--gold-ink); }
.tab svg { width: 22px; height: 22px; overflow: visible; opacity: 0.6; transition: opacity 0.25s; }
.tab[aria-selected="true"] svg { opacity: 1; }
.tab:focus-visible { outline-offset: -3px; border-radius: 999px; }
@media (hover: hover) { .tab:hover { color: var(--ink-2); } .tab[aria-selected="true"]:hover { color: var(--gold-ink); } }

/* ───── A word now and then (where you are, how to install) ───── */
.toast {
  position: fixed; z-index: 45; left: 50%; bottom: calc(var(--nav-height) + 12px);
  width: max-content; max-width: min(calc(100vw - 32px), 420px); margin: 0; padding: 10px 15px;
  border: 1px solid var(--hair-2); border-radius: 14px; background: var(--surface-2); color: var(--ink);
  box-shadow: 0 18px 40px -18px rgb(0 0 0 / 0.75);
  font-size: 0.88rem; line-height: 1.4; text-align: center;
  opacity: 0; visibility: hidden; transform: translate(-50%, 8px);
  transition: opacity 0.25s, transform 0.25s, visibility 0s 0.25s;
}
.toast.on { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity 0.25s, transform 0.35s cubic-bezier(.2, .8, .2, 1); }
@media (prefers-reduced-motion: reduce) { .toast, .toast.on { transform: translate(-50%, 0); } }

/* ───── Wide, or a phone turned on its side: the dial and its readings side by side ───── */
@media (min-width: 640px) and (min-aspect-ratio: 1/1) {
  .panel:not(.year-panel) {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    column-gap: clamp(12px, 2vw, 24px);
  }
  .readout { width: 100%; }
}
@media (max-width: 319px) {
  .top { grid-template-columns: 40px minmax(0, 1fr); }
  .top .compass-btn { grid-column: 1; }
  .top-actions { grid-column: 2; }
  .when-row { grid-template-columns: minmax(0, 1fr) 6rem; }
  .sky-pair { gap: 8px; }
  .tab { gap: 3px; letter-spacing: 0; }
}

/* The year keeps its circular face and a chronological, keyboard-accessible list. */
.year-panel {
  display: grid; grid-template-columns: minmax(0, 1fr); align-items: start;
  justify-items: stretch; gap: 24px; min-height: 0; padding-top: 26px;
  max-width: 940px; margin-inline: auto;
}
.year-heading { text-align: center; max-width: 580px; margin-inline: auto; }
.year-eyebrow { margin: 0 0 8px; color: var(--gold-ink); font: 0.65rem var(--font-mono); letter-spacing: 0.13em; text-transform: uppercase; }
.year-heading h2 { margin: 0 0 10px; font-family: var(--font-display); font-size: clamp(1.4rem, 4vw, 2rem); color: var(--ink); }
.year-heading > p:last-child { margin: 0; color: var(--ink-2); font-size: 0.95rem; line-height: 1.55; }
.year-visual, .year-calendar { min-width: 0; }
.year-controls { display: flex; align-items: center; justify-content: center; gap: 8px; }
.year-controls button, .year-controls select {
  min-width: 42px; min-height: 42px; padding: 7px 12px;
  border: 1px solid var(--hair-2); border-radius: 999px; background: var(--surface); color: var(--ink);
  font: 0.9rem var(--font-ui); cursor: pointer;
}
.year-controls select { font-family: var(--font-mono); background-color: var(--bg); }
.year-controls button:disabled { opacity: 0.35; cursor: default; }
.year-wheel { display: block; width: min(100%, 440px); height: auto; margin: 8px auto 0; overflow: visible; touch-action: manipulation; }
.year-rim, .year-tick { fill: none; stroke: var(--hair-2); stroke-width: 0.8; }
.year-season { fill: none; stroke: var(--moss); stroke-width: 7; opacity: 0.45; }
.year-season.season-1 { stroke: var(--gold); opacity: 0.65; }
.year-season.season-2 { stroke: var(--gold); opacity: 0.3; }
.year-season.season-3 { stroke: var(--steel); opacity: 0.5; }
.year-month, .year-center-label, .year-center-date { fill: var(--muted); font-family: var(--font-mono); font-size: 9px; text-anchor: middle; dominant-baseline: middle; }
.year-month { font-size: 10px; fill: var(--ink-2); }
.year-center-label { letter-spacing: 2px; }
.year-center-date { fill: var(--gold-ink); font-size: 11px; }
.year-number { fill: var(--ink); font: 38px var(--font-display); text-anchor: middle; }
.category-religious { --category: var(--steel-ink); }
.category-secular { --category: var(--ink-2); }
.category-seasonal { --category: var(--moss-ink); }
body.dials {
  --faith-buddhist: #efa68a; --faith-christian: #91baf0; --faith-hindu: #e9ad57;
  --faith-muslim: #79c9a5; --faith-jewish: #c5a8ef; --faith-pagan: #e1cf7b; --faith-sikh: #e89fca;
}
:root[data-theme="light"] body.dials {
  --faith-buddhist: #96452e; --faith-christian: #2f60a1; --faith-hindu: #8b530c;
  --faith-muslim: #216a4c; --faith-jewish: #70499e; --faith-pagan: #71601c; --faith-sikh: #a13e76;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) body.dials {
    --faith-buddhist: #96452e; --faith-christian: #2f60a1; --faith-hindu: #8b530c;
    --faith-muslim: #216a4c; --faith-jewish: #70499e; --faith-pagan: #71601c; --faith-sikh: #a13e76;
  }
}
.faith-buddhist { --category: var(--faith-buddhist); }
.faith-christian { --category: var(--faith-christian); }
.faith-hindu { --category: var(--faith-hindu); }
.faith-muslim { --category: var(--faith-muslim); }
.faith-jewish { --category: var(--faith-jewish); }
.faith-pagan { --category: var(--faith-pagan); }
.faith-sikh { --category: var(--faith-sikh); }
.year-track { fill: none; stroke: var(--category); stroke-width: 0.7; opacity: 0.2; }
.year-pointer { fill: none; stroke: var(--category); stroke-width: 1; stroke-dasharray: 2 3; opacity: 0.7; }
.year-today { fill: var(--ink); stroke: var(--bg); stroke-width: 1; }
.year-dot { fill: var(--category); cursor: pointer; }
.year-dot .year-hit { fill: transparent; }
.year-dot .year-halo { fill: none; stroke: var(--category); stroke-width: 1.5; opacity: 0; pointer-events: none; }
.year-dot.nearby .year-halo { opacity: 0.8; }
.year-dot.selected > circle:last-of-type { stroke: var(--bg); stroke-width: 2; }
.year-wheel-hint, .year-zone { margin: 0 0 6px; text-align: center; color: var(--muted); font-size: 0.76rem; }
.year-zone { font-size: 0.69rem; }
.year-choices { margin: 14px 0; padding: 10px; border: 1px solid var(--gold); border-radius: 16px; background: var(--surface); }
.year-choices-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-left: 6px; }
.year-choices-heading p { margin: 0; color: var(--ink); font: 0.95rem var(--font-ui); }
.year-choices-heading button { display: grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 50%; color: var(--muted); background: transparent; font-size: 1.5rem; cursor: pointer; }
.year-choice-list { display: grid; gap: 6px; }
.year-choice { display: grid; grid-template-columns: 54px minmax(0, 1fr); align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 12px; border: 1px solid var(--hair-2); border-left: 3px solid var(--category); border-radius: 10px; text-align: left; background: var(--bg); color: var(--ink); font: 0.96rem/1.4 var(--font-ui); cursor: pointer; }
.year-choice time { color: var(--category); font: 0.72rem/1.5 var(--font-mono); }
.year-choice small { display: block; margin-top: 3px; color: var(--category); font: 0.76rem/1.4 var(--font-ui); }
.year-detail { margin-top: 18px; padding: 20px; border: 1px solid var(--hair-2); border-radius: 18px; background: var(--surface); }
.year-detail .year-eyebrow { color: var(--category); font-size: 0.65rem; line-height: 1.6; }
.year-detail h3 { margin: 0 0 5px; font-family: var(--font-display); font-size: 1.15rem; line-height: 1.4; color: var(--ink); }
.year-detail p { color: var(--ink-2); font-size: 0.93rem; line-height: 1.55; margin: 10px 0; }
.year-detail .year-date { margin-top: 0; color: var(--category, var(--gold-ink)); font-size: 0.82rem; }
.year-detail .year-note { color: var(--muted); font-size: 0.78rem; }
.year-source { font-size: 0.8rem; color: var(--gold-ink); text-underline-offset: 3px; }
.year-filters { display: flex; flex-wrap: wrap; gap: 7px; }
.year-filter { display: inline-flex; align-items: center; gap: 7px; padding: 10px 13px; min-height: 42px; border: 1px solid var(--hair-2); border-radius: 999px; background: transparent; color: var(--muted); font: 0.84rem var(--font-ui); cursor: pointer; }
.year-filter i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.year-filter[aria-pressed="true"], .year-filter[data-active="true"] { color: var(--category); border-color: var(--category); background: var(--surface); }
.year-filter[aria-pressed="false"] i, .year-filter[data-active="false"] i { background: transparent; box-shadow: inset 0 0 0 1px currentColor; }
.year-religion-filter { position: relative; }
.year-filter-chevron { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.4; }
[aria-expanded="true"] > .year-filter-chevron { transform: rotate(180deg); }
.year-religion-selection { font: 0.65rem var(--font-mono); }
.year-religion-menu {
  position: absolute; z-index: 10; top: calc(100% + 8px); left: 0; width: 280px; max-width: calc(100vw - 40px);
  max-height: min(460px, 65dvh); overflow-y: auto; overscroll-behavior-y: contain;
  padding: 10px; border: 1px solid var(--hair-2); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow);
}
.year-religion-title { margin: 5px 9px 8px; color: var(--ink-2); font: 0.65rem var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.year-religion-option { display: grid; grid-template-columns: 18px 8px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 42px; padding: 8px 9px; border-radius: 8px; color: var(--ink-2); font-size: 0.89rem; cursor: pointer; }
.year-religion-option input { width: 16px; height: 16px; margin: 0; accent-color: var(--category, var(--steel)); cursor: pointer; }
.year-religion-option i { width: 8px; height: 8px; border-radius: 50%; background: var(--category); }
.year-religion-option small { color: var(--muted); font: 0.65rem var(--font-mono); }
.year-religion-option:focus-within { outline: 1px solid var(--category, var(--steel)); outline-offset: -1px; }
.year-religion-option:has(input:disabled) { opacity: 0.45; cursor: default; }
.year-religion-option input:disabled { cursor: default; }
.year-religion-all { grid-template-columns: 18px minmax(0, 1fr); margin-bottom: 4px; border-bottom: 1px solid var(--hair); border-radius: 8px 8px 0 0; }
.year-religion-help { margin: 10px 9px 4px; color: var(--muted); font-size: 0.73rem; line-height: 1.5; }
@media (hover: hover) { .year-religion-option:not(:has(input:disabled)):hover { background: var(--surface-2); } }
.year-count { margin: 14px 0 9px; font: 0.7rem var(--font-mono); color: var(--muted); }
.year-events { list-style: none; margin: 0; padding: 4px 8px; max-height: 480px; max-height: min(56dvh, 560px); overflow-y: auto; overscroll-behavior-y: contain; scrollbar-color: var(--hair-2) transparent; border: 1px solid var(--hair); border-radius: 16px; background: var(--surface); }
.year-events li { margin: 0; padding: 0; }
.year-events li + li { border-top: 1px solid var(--hair); }
.year-event { display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: start; gap: 12px; width: 100%; text-align: left; padding: 12px 10px; margin: 3px 0; border: 1px solid transparent; border-radius: 10px; color: var(--ink-2); background: transparent; cursor: pointer; font: 0.94rem/1.4 var(--font-ui); }
.year-event time { padding-top: 2px; font: 0.7rem/1.7 var(--font-mono); color: var(--category); white-space: nowrap; }
.year-event small { display: block; margin-top: 3px; font-size: 0.72rem; color: var(--muted); }
.year-event.category-religious small { color: var(--category); }
.year-event[aria-pressed="true"] { border-color: var(--hair-2); background: var(--surface-2); color: var(--ink); }
.year-event[aria-pressed="true"] > span { text-decoration: underline; text-decoration-color: var(--category); text-underline-offset: 4px; }
.year-empty { padding: 14px 8px; color: var(--muted); font-size: 0.9rem; }
.year-about { margin-top: 16px; color: var(--muted); font-size: 0.8rem; line-height: 1.55; }
.year-about summary { cursor: pointer; color: var(--ink-2); padding-block: 8px; }
.year-about p { margin: 9px 0; }
.year-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (hover: hover) {
  .year-event:hover { background: var(--surface-2); }
  .year-dot:hover > circle:last-of-type { stroke: var(--ink); stroke-width: 1.5; }
  .year-controls button:not(:disabled):hover { border-color: var(--gold); color: var(--gold-ink); }
}
@media (min-width: 760px) {
  .year-panel { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 26px 32px; padding: 30px 0 20px; min-height: 0; }
  .year-heading { grid-column: 1 / -1; }
  .year-events { max-height: 570px; }
  .year-calendar { padding-top: 4px; }
}
@media (max-width: 359px) {
  .tab { gap: 5px; letter-spacing: 0.09em; }
  .year-detail { padding: 16px; }
}
