
.observance-page {
  --card: var(--surface);
  --sub: var(--muted);
  --faint: var(--line);
  --green: light-dark(#294e3d, #b8d3c0);
  --green-dark: light-dark(#233f34, #d0ded6);
  --soft: var(--current);
  --gold: #ead6a8;

  --field: var(--field-fill);
  --rose: light-dark(#77414d, #cfa7b5);
  --amber: light-dark(#76540c, #f0cc8c);
  --amber-bg: light-dark(#fcf2d8, #3c3021);
  --blue: light-dark(#31536d, #bbd2e7);
  --font: "STIX Two Text", Georgia, serif;
}
.observance-page {
  isolation: isolate;
}
:root:not([data-theme]) .observance-page, :root[data-theme="traditional"] .observance-page {
  background:
    radial-gradient(ellipse at 4% 16%, #e7d8b7 0, transparent 35rem),
    radial-gradient(ellipse at 100% 63%, #d3dfca 0, transparent 41rem),
    var(--paper);
}
:root:not([data-theme]) .observance-page::before,
:root[data-theme="traditional"] .observance-page::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background:
    repeating-radial-gradient(circle at -12rem 18rem, transparent 0 53px, #8c6a3530 54px 55px, transparent 56px 64px),
    repeating-radial-gradient(circle at calc(100% + 13rem) 47rem, transparent 0 53px, #4e6d492b 54px 55px, transparent 56px 64px),
    radial-gradient(circle, #766c4628 0 1px, transparent 1.5px) center / 28px 28px;
  mask-image: radial-gradient(ellipse 24rem 39rem at 0 21%, black 12%, transparent 100%),
    radial-gradient(ellipse 27rem 44rem at 100% 72%, black 12%, transparent 100%);
}
.control-label { text-box: trim-both cap alphabetic; }
:is(.segments button, .month-choice, .year-jump, .observance-dialog .dialog-close, .note-close) {
  display: grid;
  place-items: center;
  line-height: 1.2;
  text-align: center;
}
.masthead { display: flex; align-items: center; justify-content: space-between; gap: .45rem 1.5rem; position: relative; isolation: isolate; overflow: hidden; min-height: 8rem; padding: clamp(1rem, 3vw, 2rem); color: #fff7e2; background: #233f34; }
.masthead::before { content: ""; position: absolute; z-index: -1; inset: 0; background: repeating-radial-gradient(circle at 91% 115%, transparent 0 32px, #ecd29825 33px 34px, transparent 35px 57px); mask-image: linear-gradient(90deg, transparent 45%, #000 89%); pointer-events: none; }
.masthead h1 { font: 555 clamp(2.2rem, 5.6vw, 3.65rem)/1.07 var(--font); letter-spacing: -.045em; }
.masthead h1 em { color: var(--gold); font-style: normal; }
.location-button { display: inline-flex; flex: 0 1 auto; align-items: center; justify-content: space-between; gap: .55rem; min-height: 44px; min-width: 0; padding: .4rem .72rem; border: 1px solid #e2d7b967; border-radius: .38rem; color: #fff7e2; background: #233f34; text-align: start; font-weight: 575; line-height: 1.25; }
.location-button:hover { border-color: var(--gold); background: #335547; }
.location-button:focus-visible { outline-color: var(--gold); }
.location-chevron { flex: 0 0 auto; width: .42rem; height: .42rem; border-right: 1.5px solid var(--gold); border-bottom: 1.5px solid var(--gold); transform: rotate(-45deg); margin: 0 .16rem; }
.toolbar, .view-controls, .dialog-head, .note-head { display: flex; align-items: center; gap: 8px; }
.toolbar, .dialog-head, .note-head { justify-content: space-between; }
.toolbar { margin: 19px 0 14px; }
.ruling-control { display: flex; align-items: center; gap: 10px; }
#ruling-label { color: var(--sub); font-size: .88rem; line-height: 1.2; }
.segments { display: inline-flex; padding: 3px; border: 1px solid var(--faint); border-radius: 10px; background: var(--field); }
.segments button { border: 0; border-radius: 7px; background: transparent; padding: 5px 12px; min-height: 38px; font-size: .94rem; font-weight: 640; white-space: nowrap; }
.segments button:hover { background: var(--soft); }
.segments button[aria-pressed="true"] { background: var(--action); color: var(--on-action); box-shadow: 0 1px 2px #18342830; }
.notable-menu, .month-picker { position: relative; }
.notable-menu summary, .month-picker summary { cursor: pointer; list-style: none; }
.notable-menu summary::-webkit-details-marker, .month-picker summary::-webkit-details-marker { display: none; }
.notable-menu summary { border-radius: 9px; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 7px 13px; border: 1px solid light-dark(#d2dace, #435449); background: var(--card); color: var(--green); font-weight: 650; font-size: .94rem; line-height: 1.2; white-space: nowrap; }
.notable-menu summary:hover, .notable-menu[open] summary { background: var(--action); color: var(--on-action); }
.notable-symbol { font-size: 1.04rem; line-height: 1; color: light-dark(#8b5b16, #efc588); text-box: trim-both cap alphabetic; }
.notable-menu summary:hover .notable-symbol, .notable-menu[open] .notable-symbol { color: var(--gold); }
.notable-menu summary::after, .month-picker summary::after { content: ""; display: inline-block; width: .39rem; height: .39rem; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-.12rem) rotate(45deg); }
.notable-menu summary::after { margin-left: 3px; }
.notable-panel, .month-palette { position: absolute; z-index: 3; top: calc(100% + 7px); border: 1px solid var(--faint); background: var(--card); border-radius: 10px; box-shadow: 0 10px 28px #14281e22; }
.notable-panel { right: 0; width: min(190px, 100vw - 28px); max-height: min(440px, 58dvh); overflow-y: auto; padding: 5px; }
.notable-panel ul { list-style: none; padding: 0; margin: 0; }
.notable-date { width: 100%; display: flex; align-items: center; gap: 9px; min-height: 48px; padding: 5px; border: 0; border-radius: 7px; background: transparent; text-align: left; }
.notable-date:hover { background: light-dark(#f0f5ef, #2e3b33); }
.notable-stamp { width: 55px; padding: 5px 4px; flex: 0 0 55px; border-radius: 6px; display: grid; justify-items: center; gap: 1px; background: var(--soft); color: var(--green); line-height: 1.1; white-space: nowrap; }
.notable-stamp > span { color: var(--sub); font-size: .7rem; }
.notable-stamp > strong { font: 650 .93rem/1.14 var(--font); font-variant-numeric: lining-nums; }
.notable-event { display: grid; gap: 2px; font-size: .91rem; line-height: 1.12; }
.notable-meta { color: var(--sub); font-size: .8rem; }
.calendar, .year-agenda { border: 1px solid var(--faint); border-radius: 15px; background: var(--card); box-shadow: 0 8px 26px #1e3b2110; }
.calendar-head {
  --month-control-size: 44px;
  --month-nav-gap: 10px;
  --month-heading-size: clamp(1.55rem, 3vw, 1.9rem);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "month secondary basis";
  align-items: center;
  gap: .2rem .9rem;
  min-block-size: 74px;
  padding: 14px 15px;
  background: var(--card);
  border-radius: 15px 15px 0 0;
}
.month-navigation { grid-area: month; display: flex; align-items: center; min-width: 0; gap: var(--month-nav-gap); }
.month-picker { min-width: 0; width: fit-content; }
.month-picker summary { display: flex; align-items: center; gap: 10px; min-height: var(--month-control-size); padding: 0 9px; color: var(--green); border-radius: 8px; font: 550 var(--month-heading-size)/1.18 var(--font); letter-spacing: -.027em; }
.month-picker summary:hover, .month-picker[open] summary { background: var(--soft); color: var(--green-dark); }
.month-picker summary::after { flex: 0 0 .39rem; }
.month-picker[open] summary::after { transform: translateY(.12rem) rotate(225deg); }
.month-palette { left: 0; width: min(270px, calc(100vw - 45px)); padding: 10px; }
.month-palette-label { color: var(--sub); font-size: .84rem; font-weight: 650; margin: 0 3px 5px; }
.month-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.month-choice-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
.month-choice-year { margin: 5px 3px 2px; color: var(--sub); font-size: .8rem; }
[data-basis="hijri"] .month-choices { display: block; }
[data-basis="hijri"] .month-palette { max-height: min(400px, 55dvh); overflow-y: auto; }
.month-choice { border: 0; border-radius: 5px; background: light-dark(#f0f4ef, #29342c); padding: 6px 4px; font-size: .87rem; min-height: 35px; }
.month-choice:hover { background: light-dark(#dce9df, #36473b); }
.month-choice[aria-current="date"] { color: var(--on-action); background: var(--action); font-weight: 650; }
.secondary-dates {
  grid-area: secondary;
  padding-inline-start: .95rem;
  border-inline-start: 1px solid var(--faint);
  color: var(--green);
  font: 550 var(--month-heading-size)/1.18 var(--font);
  letter-spacing: -.027em;
  text-box: trim-both cap alphabetic;
}
[data-basis="hijri"] .secondary-dates { font-size: clamp(.9rem, 1.7vw, 1.26rem); letter-spacing: 0; }
.calendar-basis-slot { grid-area: basis; display: flex; justify-self: end; align-self: center; }
.calendar-basis button { min-height: 34px; padding-inline: 9px; font-size: .84rem; }
.hijri-heading-year { margin-inline-start: .12em; color: var(--sub); font-size: .77em; font-weight: 550; letter-spacing: 0; white-space: nowrap; }
.hijri-month-link {
  border: 0;
  border-radius: 4px;
  background: transparent;
  font: inherit;
  letter-spacing: inherit;
  padding: 0 .1em;
  margin: 0 -.1em;
  text-decoration: underline dotted #9b8b699e;
  text-decoration-thickness: 1px;
  text-underline-offset: .17em;
}
.hijri-month-link:hover { background: var(--soft); text-decoration-style: solid; }
.stepper { display: inline-flex; flex-shrink: 0; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--faint); background: light-dark(#f4f7f3, #27312c); }
.stepper button { display: grid; place-items: center; width: var(--month-control-size); height: var(--month-control-size); border: 0; background: transparent; color: var(--green); }
.stepper button:first-child { border-radius: 8px 0 0 8px; }
.stepper button:last-child { border-left: 1px solid var(--faint); border-radius: 0 8px 8px 0; }
.stepper button::before { content: ""; width: 7px; height: 7px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: translateX(-2px) rotate(45deg); }
.stepper button:first-child::before { transform: translateX(2px) rotate(-135deg); }
.stepper button:hover:not(:disabled) { background: var(--soft); }
.stepper button:focus-visible { outline-offset: -3px; }
.stepper button:disabled { color: light-dark(#829286, #9aada1); }
.calendar-grid { --week-height: 110px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-template-rows: auto; grid-auto-rows: var(--week-height); }
.weekday { padding: 7px 11px; border-top: 1px solid var(--faint); background: light-dark(#ede8d6, #292e2a); color: var(--sub); font-size: .84rem; font-weight: 650; }
.day, .empty-day { min-width: 0; min-height: 0; border-top: 1px solid var(--faint); border-right: 1px solid var(--faint); }
.day:nth-child(7n), .empty-day:nth-child(7n) { border-right: 0; }
.calendar-grid > :nth-last-child(7) { border-bottom-left-radius: 14px; }
.calendar-grid > :last-child { border-bottom-right-radius: 14px; }
.empty-day { padding: 8px 10px; background: var(--field); color: light-dark(#806d50, #b9aa91); font-size: .86rem; }
.empty-day time { font-variant-numeric: lining-nums tabular-nums; opacity: .75; }
.day { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 3px; padding: 5px 6px; background: var(--card); }
.day-events { display: grid; align-content: start; gap: 3px; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.day-events :focus-visible { outline-offset: -2px; }
.day.in-mourning { background: light-dark(#fbf4f5, #30252b); }
.highlighted-day { box-shadow: inset 0 0 0 2px #347957; }
.day:focus-visible { outline-offset: -3px; }
.day-number { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "gregorian hijri prayer"; align-items: center; gap: 3px; min-height: 24px; padding: 0 1px; }
.day-counter { flex-shrink: 0; font-size: 1rem; font-weight: 650; line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.gregorian-day { grid-area: gregorian; }
.day-figure { display: inline-flex; align-items: baseline; gap: .18rem; min-width: 0; max-width: 100%; white-space: nowrap; }
.hijri-day { grid-area: hijri; justify-self: end; color: var(--blue); }
.day-abbreviation { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: .72rem; font-weight: 650; }
[data-basis="hijri"] .day-number { grid-template-areas: "hijri gregorian prayer"; }
[data-basis="hijri"] .day-number > :is(.hijri-day, .warning-button) { justify-self: start; }
[data-basis="hijri"] .gregorian-day { justify-self: end; }
.uncertainty { color: var(--amber); font-size: .88rem; font-weight: 700; line-height: 1; }
.warning-button { grid-area: hijri; justify-self: end; display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 0; max-width: 100%; min-height: 24px; padding: 2px 6px; background: var(--amber-bg); color: var(--amber); border: 0; border-radius: 5px; font-size: .8rem; font-weight: 650; white-space: nowrap; }
.warning-button .hijri-day { color: inherit; }
.warning-button:hover, .warning-button[aria-expanded="true"] { background: light-dark(#f5e2af, #4a3926); }
.prayer-button { grid-area: prayer; display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 5px; color: light-dark(#607364, #a9c2ad); background: transparent; }
.prayer-button:hover, .prayer-button[aria-expanded="true"] { color: var(--green-dark); background: var(--soft); }
.prayer-button:focus-visible { outline-offset: -2px; }
.prayer-clock-icon { position: relative; display: block; width: 13px; height: 13px; border: 1px solid currentColor; border-radius: 50%; }
.prayer-clock-icon::after { content: ""; position: absolute; top: 2px; left: 5px; width: 3px; height: 4px; border-left: 1px solid currentColor; border-bottom: 1px solid currentColor; }
.activity-tag { display: block; min-width: 0; width: 100%; padding: 3px 5px; border: 0; border-radius: 5px; background: light-dark(#eaf0f5, #243340); color: var(--blue); text-align: left; font-size: .83rem; line-height: 1.15; font-weight: 620; overflow-wrap: anywhere; }
.day-events:has(> :nth-child(2)) .activity-tag { padding-block: 1px; }
.activity-tag.mourning { color: var(--rose); background: light-dark(#f7ecef, #382831); }
.activity-tag.celebration { color: var(--green); background: light-dark(#eaf3ec, #293a31); }
button.activity-tag:hover, button.activity-tag[aria-expanded="true"] { box-shadow: inset 0 0 0 1px currentColor; }
.event-evening { display: block; font-size: .75rem; font-weight: 500; margin-top: 2px; }
.coverage-note { margin: 0 0 12px; padding: 7px 11px; border-left: 2px solid var(--control); color: var(--sub); background: var(--card); font-size: .89rem; }
.month-agenda { display: none; }
#year-view { --year-jump-offset: 80px; }
.year-navigation-bar { position: sticky; z-index: 2; top: 8px; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "months basis"; align-items: start; gap: 8px; padding: 5px; margin-bottom: 12px; background: light-dark(#eaf0e8, #28322c); border: 1px solid var(--faint); border-radius: 10px; box-shadow: 0 3px 12px #1e3b2110; }
.year-navigation { grid-area: months; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(49px, 1fr); gap: 4px; overflow-x: auto; scrollbar-width: thin; }
.year-jump { min-height: 40px; padding: 4px; border: 0; border-radius: 6px; background: var(--card); color: var(--green); font-weight: 650; white-space: nowrap; }
.year-jump:focus-visible { outline-offset: -2px; }
.year-jump-year { color: var(--sub); font-size: .69rem; }
[data-basis="hijri"] .year-jump { gap: 2px; align-content: center; min-height: 44px; font-size: .92rem; }
.year-jump:hover { background: var(--action); color: var(--on-action); }
.year-jump:hover .year-jump-year { color: var(--gold); }
.agenda-month { scroll-margin-top: var(--year-jump-offset); }
.agenda-columns, .agenda-row { display: grid; grid-template-columns: minmax(120px, 17%) minmax(0, 1fr) minmax(128px, 24%); align-items: center; gap: 12px; padding: 8px 17px; }
.agenda-columns > *, .agenda-row > * { text-box: trim-both cap alphabetic; }
.agenda-columns { color: var(--sub); font-size: .85rem; font-weight: 650; padding-top: 11px; padding-bottom: 11px; }
.agenda-month-heading { display: flex; align-items: center; min-height: 52px; margin: 0; padding: 0 17px; background: light-dark(#edf2e9, #293530); border-top: 1px solid var(--faint); border-bottom: 1px solid var(--faint); }
.agenda-jump { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; color: var(--green); border: 0; background: transparent; padding: 2px 0; border-radius: 4px; font: 550 1.5rem/1.15 var(--font); }
.agenda-jump::after { content: "↗" / ""; font: 550 .95rem/1 var(--font); text-box: trim-both cap alphabetic; }
.agenda-jump:hover { background: var(--soft); }
.agenda-items { margin: 0; padding: 0; list-style: none; }
.agenda-row + .agenda-row { border-top: 1px solid light-dark(#edf1eb, #2f3b33); }
.agenda-row { min-height: 43px; font-size: .94rem; }
.agenda-row > time { color: var(--sub); white-space: nowrap; font-variant-numeric: tabular-nums; }
[data-basis="hijri"] .agenda-row > time { white-space: normal; }
.agenda-event { width: fit-content; max-width: 100%; border: 0; background: transparent; text-align: left; font: inherit; font-weight: 630; padding: 0; }
.agenda-row.mourning .agenda-event { color: var(--rose); }
.agenda-row.celebration .agenda-event { color: var(--green); }
button.agenda-event { text-decoration: underline dotted #779186; text-underline-offset: .2em; }
button.agenda-event:hover, button.agenda-event[aria-expanded="true"] { text-decoration: underline; }
.agenda-hijri { color: var(--sub); font-size: .86rem; }
.agenda-empty { padding: 9px 17px; color: var(--sub); font-size: .88rem; }
.observance-actions { display: flex; justify-content: flex-end; gap: 20px; margin: 10px 0 24px; }
.confirmed-button { background: var(--soft); color: var(--green); }
.confirmed-button:hover, .confirmed-button[aria-expanded="true"] { background: var(--soft); outline: 1px solid currentColor; }
#subscribe-scope { font-weight: 650; }
#copy-subscription { border: 1px solid var(--faint); border-radius: 5px; background: var(--soft); color: var(--green); padding-inline: 12px; }
#subscribe-dialog a { color: var(--green); }
#subscribe-dialog label { display: block; margin: 12px 0 4px; font-size: .85rem; }
.subscribe-url-row { display: flex; gap: 6px; }
.subscribe-url-row input { flex: 1; min-width: 0; font: inherit; padding: 6px 8px; border: 1px solid var(--faint); border-radius: 5px; }
.observance-actions button { border: 0; padding: 2px 0; background: none; color: var(--sub); font-size: .85rem; text-decoration: underline; text-underline-offset: .2em; }
.context-note { position: fixed; z-index: 4; width: min(300px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain; padding: 12px 13px; background: var(--card); border: 1px solid light-dark(#cbdccd, #42574a); border-radius: 9px; box-shadow: 0 9px 25px #17342825; }
.context-note.forecast-note { width: min(425px, calc(100vw - 24px)); border-top: 3px solid #c79631; padding: 12px 14px; }
.context-note.prayer-note { width: min(278px, calc(100vw - 24px)); }
.prayer-list, .prayer-list dd { margin: 0; }
.prayer-list > div { display: flex; justify-content: space-between; align-items: baseline; gap: .45rem; padding: 4px 0; border-bottom: 1px solid var(--faint); font-size: .9rem; }
.prayer-list dd { font-variant-numeric: lining-nums tabular-nums; font-weight: 650; }
.prayer-next-day { margin-inline-start: .24rem; color: var(--sub); font-size: .7rem; }
.prayer-status { margin-top: .55rem; color: var(--sub); font-size: .8rem; }
.note-head { align-items: start; gap: 8px; margin-bottom: 7px; }
.note-head h2 { font: 550 1.2rem/1.2 var(--font); color: var(--green); }
.note-head p { color: var(--sub); font-size: .8rem; margin-top: 3px; }
.note-close { line-height: 1; height: 29px; width: 29px; flex: 0 0 29px; border: 0; border-radius: 5px; background: light-dark(#eff4ee, #2c3b32); color: var(--green); font-size: 1.12rem; }
.note-explanation { margin-bottom: 5px; color: var(--sub); font-size: .89rem; }
#note-content a { font-size: .86rem; font-weight: 650; }
#note-content a::after { content: " ↗"; }
.date-comparison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 9px 0; }
.forecast-date { display: grid; gap: 3px; padding: 6px 8px; border-radius: 6px; background: var(--soft); color: var(--green); }
.forecast-date.alternative { background: var(--amber-bg); color: var(--amber); }
.forecast-date span { font-size: .79rem; }
.forecast-date time { font-weight: 700; font-size: .95rem; }
.forecast-rule, .forecast-reason, .forecast-timing { color: var(--sub); font-size: .88rem; line-height: 1.42; }
.forecast-details { margin-top: 9px; border-top: 1px solid var(--faint); }
.forecast-details summary { width: fit-content; padding: 8px 2px 5px; cursor: pointer; color: var(--green); font-size: .9rem; font-weight: 650; line-height: 1.2; }
.forecast-reason { margin-top: 6px; color: var(--ink); }
.forecast-timing { margin: 8px 0 5px; }
.forecast-models { width: 100%; margin-top: 8px; border-collapse: collapse; font-size: .83rem; text-align: left; }
.forecast-models :is(th, td) { padding: 4px 6px; border-bottom: 1px solid var(--faint); }
.forecast-models thead th { background: light-dark(#f3f6f2, #293630); color: var(--sub); font-weight: 650; }
.forecast-models tbody td { color: var(--sub); }
.forecast-models td.qualifying { color: var(--green); }
.observance-dialog { width: min(475px, calc(100vw - 28px)); max-height: calc(100dvh - 28px); border: 1px solid var(--faint); border-radius: 12px; background: var(--card); padding: 0; color: var(--ink); box-shadow: 0 18px 60px #14261e33; }
.observance-dialog::backdrop { background: #182e2580; }
.dialog-head { padding: 14px 17px 11px; border-bottom: 1px solid var(--faint); }
.dialog-head h2 { font: 550 1.56rem/1.15 var(--font); color: var(--green); }
.observance-dialog .dialog-close { border: 0; border-radius: 6px; width: 33px; height: 33px; background: light-dark(#eff4ee, #2c3b32); color: var(--green); font-size: 1.35rem; line-height: 1; }
.dialog-body { padding: 10px 17px 15px; }
.dialog-body p { font-size: .9rem; }
.dialog-body p + p { margin-top: 8px; }
#about-dialog { width: min(37rem, calc(100% - 24px)); background: var(--card); }
.about-steps { margin: 0; padding-inline-start: 1.2rem; }
.about-steps > li { padding-inline-start: .26rem; }
.about-steps > li + li { margin-top: .7rem; }
.about-steps > li::marker { color: var(--sub); font-size: .86rem; }
.about-steps strong { color: var(--green-dark); }
.about-caution { margin-top: .85rem; padding: .52rem .65rem; border-radius: 5px; color: var(--sub); background: var(--field); }
.about-technical { margin-top: .7rem; }
.about-technical summary { cursor: pointer; width: fit-content; padding: .2rem 0; color: var(--green); font-size: .87rem; font-weight: 650; }
.about-technical p { margin-top: .3rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 900px) {
  .ruling-control { align-items: flex-start; flex-direction: column; gap: 5px; }
  .toolbar { align-items: flex-end; }
  .calendar-head { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "month basis" "secondary secondary"; min-block-size: 96px; }
  .secondary-dates { border: 0; padding-inline-start: 2px; }
  .calendar-grid { --week-height: 118px; }
  .day-number { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "gregorian prayer" "hijri hijri"; row-gap: 1px; }
  [data-basis="hijri"] .day-number { grid-template-areas: "hijri prayer" "gregorian gregorian"; }
  [data-basis="hijri"] .gregorian-day { justify-self: start; }
  .hijri-day, .warning-button { justify-self: start; }
  .day { padding: 4px; }
  .activity-tag { padding-inline: 3px; font-size: .8rem; }
}
@media (max-width: 600px) {
  .masthead { flex-wrap: wrap; min-height: 0; padding: .85rem .8rem .7rem; }
  .masthead h1 { font-size: clamp(1.82rem, 7.7vw, 3.3rem); }
  .toolbar { align-items: flex-start; flex-wrap: wrap; gap: 9px; margin: 13px 0 11px; }
  .ruling-control, .scholars { width: 100%; }
  .scholars button { flex: 1; min-height: 44px; }
  .view-controls { position: relative; width: 100%; justify-content: space-between; }
  .notable-menu { position: static; }
  .notable-panel { max-width: 100%; }
  .calendar-head { --month-nav-gap: 5px; --month-heading-size: clamp(1.23rem, 5.6vw, 1.55rem); grid-template-areas: "month month" "secondary basis"; min-block-size: 106px; padding: 8px 10px 10px; }
  .month-navigation { position: relative; }
  .month-picker { position: static; }
  .month-picker summary { gap: 8px; }
  .secondary-dates { font-size: clamp(.9rem, 4.1vw, 1.2rem); }
  .calendar-basis button { padding-inline: 6px; }
  .weekday { text-align: center; padding-inline: 0; }
  .calendar-grid { --week-height: 70px; }
  .calendar-grid > :is(:nth-last-child(7), :last-child) { border-radius: 0; }
  .day { position: relative; padding: 4px 1px 2px; gap: 0; }
  .empty-day { text-align: center; padding: 6px 1px; }
  .day-number { display: grid; justify-items: center; grid-template-columns: minmax(0, 1fr); grid-template-rows: 20px 19px 24px; grid-template-areas: "gregorian" "hijri" "prayer"; padding: 0; gap: 0; }
  [data-basis="hijri"] .day-number { grid-template-areas: "hijri" "gregorian" "prayer"; }
  [data-basis="hijri"] .day-number > :is(.gregorian-day, .hijri-day, .warning-button) { justify-self: center; }
  .day-counter { font-size: .97rem; }
  .hijri-day, .warning-button { justify-self: center; max-width: 100%; }
  .day-abbreviation { font-size: .625rem; }
  .warning-button { min-height: 19px; padding: 1px; gap: 1px; }
  .warning-button .uncertainty { font-size: .64rem; }
  .day-events { display: none; }
  .prayer-button { width: 24px; height: 24px; }
  .day.has-events::after { content: ""; position: absolute; bottom: 9px; inset-inline-start: 3px; width: 5px; height: 3px; border-radius: 2px; background: #62846e; pointer-events: none; }
  .month-agenda { display: block; padding-bottom: 5px; }
  .month-agenda h2 { padding: 12px 13px 8px; border-top: 1px solid var(--faint); color: var(--green-dark); font-size: 1.14rem; font-weight: 630; }
  .year-jump { min-height: 44px; }
  .agenda-columns { display: none; }
  .agenda-row { grid-template-columns: minmax(78px, 22%) minmax(0, 1fr); padding: 8px 13px; gap: 1px 10px; }
  .agenda-event { line-height: 1.22; }
  button.agenda-event { min-height: 26px; }
  .agenda-event { grid-area: 1 / 2; }
  .agenda-hijri { grid-area: 2 / 2; }
  .agenda-row > time { grid-area: 1 / 1 / span 2; font-size: .83rem; }
  [data-basis="hijri"] .agenda-hijri { grid-area: 1 / 1 / span 2; }
  [data-basis="hijri"] .agenda-row > time { grid-area: 2 / 2; }
  .agenda-month-heading { min-height: 48px; padding: 0 13px; }
  .agenda-month:first-of-type .agenda-month-heading { border-top: 0; border-radius: 14px 14px 0 0; }
  .context-note, .context-note.forecast-note, .context-note.prayer-note { inset: auto 10px max(10px, env(safe-area-inset-bottom)); width: auto; max-height: calc(100dvh - 20px); padding: 13px 14px; border-radius: 13px; box-shadow: 0 6px 36px #18342842; }
  .note-close { width: 39px; height: 39px; flex-basis: 39px; }
  #note-content a { display: inline-block; padding: 5px 0; }
}
@media (max-width: 380px) {
  .masthead h1 { font-size: clamp(1.62rem, 7.4vw, 2.1rem); }
  .view-controls { gap: 6px; }
  .view-switch button { padding-inline: 9px; }
  .notable-menu summary { gap: 6px; padding-inline: 8px; font-size: .89rem; }
  .warning-button { padding-inline: 3px; }
  .warning-button .day-abbreviation { display: none; }
  .warning-button .uncertainty { font-size: .59rem; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .segments button, .stepper button, .year-jump, summary { transition: background-color 130ms ease, color 130ms ease; }
  .context-note:not([hidden]), details[open] > :is(.month-palette, .notable-panel) { animation: show-panel 130ms ease-out both; }
  .highlighted-day { animation: highlight-date 1750ms ease-out both; }
  @keyframes highlight-date {
    0%, 35% { box-shadow: inset 0 0 0 2px #347957; background-color: light-dark(#e9f1e6, #35463b); }
    100% { box-shadow: inset 0 0 0 2px #34795700; }
  }
  @keyframes show-panel {
    from { opacity: 0; transform: translateY(-3px); }
    to { opacity: 1; transform: translateY(0); }
  }
}
@media print {
  .observance-page { background: white !important; }
  .observance-page::before { display: none; }
  .main-content { width: 100%; }
  .masthead { color: var(--ink); background: white; }
  .masthead h1 em { color: var(--green); }
  .toolbar, .stepper, .calendar-basis, .observance-actions, .site-header, .site-footer, .context-note, .year-navigation-bar, .location-button, .prayer-button { display: none; }
}
