:root {
  --navy: #17243a;
  --navy-2: #24344f;
  --paper: #f6f4ef;
  --ink: #20242b;
  --muted: #6d716f;
  --line: #dcd9d1;
  --card: #ffffff;
  --liturgical: #277348;
  --liturgical-soft: #e8f1eb;
  --liturgical-field: #266f48;
  --liturgical-field-text: #ffffff;
  --liturgical-field-muted: rgba(255,255,255,.76);
  --shadow: 0 18px 50px rgba(27, 34, 45, .08);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--paper); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body { margin: 0; min-height: 100vh; background: linear-gradient(180deg, var(--liturgical-soft) 0, var(--paper) 650px); transition: background .22s ease; }
main { overflow-x: clip; touch-action: pan-y; }
button, input { font: inherit; }
button { color: inherit; }

.topbar {
  height: 52px; padding: 0 clamp(18px, 4vw, 56px); display: flex; align-items: center; justify-content: center;
  color: white; background: var(--navy); border-bottom: 1px solid rgba(255,255,255,.1);
}
.calendar-layer { display: flex; align-items: center; gap: 8px; padding: 8px 13px; border: 0; border-radius: 999px; background: transparent; font-size: 14px; color: rgba(255,255,255,.92); cursor: pointer; }
.calendar-layer:hover { background: rgba(255,255,255,.08); }
.layer-detail { color: rgba(255,255,255,.48); }
.settings-trigger { position: absolute; right: clamp(18px,4vw,56px); border: 0; background: transparent; color: white; font-size: 23px; cursor: pointer; }

main { max-width: 1180px; margin: 0 auto; padding: 0 20px 44px; }
.date-nav { height: 88px; display: flex; align-items: center; justify-content: center; gap: 12px; border-bottom: 1px solid var(--line); position: relative; }
.nav-arrow { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; background: rgba(255,255,255,.58); font-size: 28px; line-height: 1; cursor: pointer; }
.nav-arrow:hover, .today-button:hover { border-color: #a8aaa7; background: white; }
.date-display { min-width: 265px; border: 0; background: transparent; cursor: pointer; text-align: center; }
.date-display span, .date-display strong { display: block; }
.date-display #weekdayLabel { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .14em; margin-bottom: 4px; }
.date-display strong { font-family: Georgia, "Times New Roman", serif; font-size: 27px; font-weight: 500; }
.today-button { position: absolute; right: 0; padding: 8px 15px; border: 1px solid var(--line); background: rgba(255,255,255,.58); border-radius: 999px; font-size: 14px; cursor: pointer; }

.day-heading { margin: 18px 0 0; padding: 28px 30px 25px; color: var(--liturgical-field-text); background: var(--liturgical-field); border-radius: 16px 16px 0 0; box-shadow: 0 16px 42px color-mix(in srgb, var(--liturgical-field) 20%, transparent); transition: color .2s ease, background .2s ease; }
.eyebrow { display: flex; gap: 8px; color: var(--liturgical-field-muted); font-weight: 750; font-size: 13px; letter-spacing: .055em; text-transform: uppercase; }
h1 { margin: 8px 0 7px; font: 500 clamp(30px, 4vw, 44px)/1.08 Georgia, "Times New Roman", serif; letter-spacing: -.02em; max-width: 820px; }
.day-heading p { margin: 12px 0 0; color: var(--liturgical-field-muted); font-size: 15px; }
.day-heading .first-vespers-alert { display: inline-flex; padding: 7px 10px; border: 1px solid color-mix(in srgb, currentColor 35%, transparent); border-radius: 8px; font-weight: 750; }

.observance-strip { min-height: 56px; margin-bottom: 14px; display: flex; align-items: stretch; background: #fff; border: 1px solid rgba(208,205,197,.82); border-top: 0; border-radius: 0 0 12px 12px; box-shadow: var(--shadow); overflow: hidden; }
.strip-label { display: flex; align-items: center; padding: 0 20px; color: var(--muted); background: #f2f0ea; font-size: 11px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; white-space: nowrap; }
.strip-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); flex: 1; min-width: 0; }
.strip-choice { position: relative; display: flex; align-items: center; gap: 9px; min-width: 0; min-height: 58px; padding: 10px 16px 10px 22px; border: 0; border-right: 1px solid #ece9e2; background: white; text-align: left; cursor: pointer; }
.strip-choice::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 12px; background: var(--choice-color); }
.strip-choice::after { content: "›"; flex: 0 0 auto; margin-left: auto; color: #687486; font-size: 22px; font-weight: 400; line-height: 1; }
.strip-choice:hover, .strip-choice:focus-visible { background: #f8f7f3; outline: 0; }
.strip-choice.active { background: color-mix(in srgb, var(--choice-color) 9%, white); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--choice-color) 55%, transparent); }
.strip-choice div { min-width: 0; }
.strip-choice b, .strip-choice small { display: block; }
.strip-choice b { font: 500 15px/1.25 Georgia, serif; }
.choice-rank { color: var(--muted); font: 700 10px/1.25 Inter, ui-sans-serif, system-ui, sans-serif; letter-spacing: .055em; text-transform: uppercase; white-space: nowrap; }
.strip-choice small { margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.3; }

.sortable-sections { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(290px, .85fr); gap: 12px 16px; align-items: start; }
.sortable-sections > .primary-column { grid-column: 1; grid-row: 1 / span 2; }
.sortable-sections > .permissions-card { grid-column: 2; grid-row: 1; }
.sortable-sections > .necrology-card { grid-column: 2; grid-row: 2; }
.sortable-sections > .bottom-office, .sortable-sections > .reference-section, .sortable-sections > .prototype-note { grid-column: 1 / -1; }
.sortable-sections.personal-order { display: flex; flex-direction: column; align-items: stretch; }
.primary-column { display: grid; gap: 12px; }
.ordo-card, .note-card, .options-card, .permissions-card, .necrology-card, .insight-card, .reference-card { background: var(--card); border: 1px solid rgba(208,205,197,.82); border-radius: 12px; box-shadow: var(--shadow); }
.ordo-card { padding: 15px 17px 12px; }
.card-heading { display: flex; align-items: center; gap: 11px; padding-bottom: 8px; border-bottom: 1px solid #ece9e2; }
.card-heading h2 { margin: 0; }
.section-kicker { display: block; color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .13em; text-transform: uppercase; }
h2 { margin: 3px 0 0; font: 500 24px/1.15 Georgia, "Times New Roman", serif; }
.directions { margin: 3px 0 0; }
.direction-row { display: grid; grid-template-columns: 152px 1fr; gap: 12px; padding: 7px 0; border-bottom: 1px solid #efede8; }
.direction-row:last-child { border-bottom: 0; }
.direction-row dt { color: var(--muted); font-size: 14px; }
.direction-row dd { margin: 0; font-size: 15px; font-weight: 560; line-height: 1.45; }
.mass-card .direction-row dt { color: #46546a; font-size: 13px; font-weight: 700; }
.mass-card .direction-row { display: block; }
.mass-card .direction-row dt, .mass-card .direction-row dd { display: inline; }
.mass-card .direction-row dt::after { content: ": "; color: #a6a9ab; font-weight: 400; }
.mass-card .direction-row dd { color: #17243a; font-weight: 650; }
.mass-card .optional-reading-row dd { color: #454a50; font-weight: 500; }
.optional-reading-row dt, .optional-reading-row dd { font-style: italic; }
.optional-reading-row { background: #faf9f6; margin-inline: -8px; padding-inline: 8px; }
.muted-value { color: #8c8e8c; font-weight: 450; }
.mass-statuses { margin-left: auto; display: flex; gap: 7px; }
.mass-status { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border: 1px solid #d9d7d0; border-radius: 7px; color: var(--muted); background: #faf9f6; font-size: 11px; font-weight: 700; letter-spacing: .035em; text-transform: uppercase; }
.mass-status.yes { color: #1d6740; border-color: #bdd8c8; background: #edf7f1; }
.mass-status-mark { font-size: 12px; line-height: 1; }

.secondary-column { display: grid; gap: 12px; }
.note-card, .options-card, .permissions-card, .necrology-card { padding: 18px; }
.note-card { background: var(--navy); color: white; border: 0; box-shadow: 0 18px 45px rgba(23,36,58,.18); }
.note-heading { display: flex; align-items: center; gap: 10px; }
.note-heading h2 { margin: 0; font-size: 20px; }
.info-icon { width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.4); border-radius: 50%; font-family: Georgia, serif; font-style: italic; }
.note-card p { margin: 17px 0; color: rgba(255,255,255,.78); font-size: 15px; line-height: 1.6; }
.text-button { padding: 0; border: 0; background: transparent; color: #b8d7c4; font-size: 13px; font-weight: 700; cursor: pointer; }
.text-button span { margin-left: 4px; }
.precedence-note { margin-top: 17px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.14); color: rgba(255,255,255,.72); font-size: 14px; line-height: 1.55; }
.options-card h2 { font-size: 20px; margin-bottom: 13px; }
.option-item { padding: 12px 0; border-top: 1px solid #ece9e2; }
.option-item b { display: block; font: 500 16px Georgia, serif; }
.option-item span { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.empty-options { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.prototype-note { margin: 2px 4px; color: #777a78; font-size: 12px; line-height: 1.5; }
.bottom-office { margin-top: 14px; }
.bottom-office .directions { display: block; }
.bottom-office .direction-row { display: block; padding: 7px 0; }
.bottom-office .direction-row:last-child { border-bottom: 0; }
.bottom-office .direction-row dt, .bottom-office .direction-row dd { display: inline; }
.bottom-office .direction-row dt { font-size: 13px; font-weight: 750; color: #47546a; }
.bottom-office .direction-row dt::after { content: " · "; }

.reference-section { display: grid; gap: 12px; margin-top: 20px; }
.reference-card { padding: 18px 20px; }
.seasonal-card summary, .office-inline-guide summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; cursor: pointer; list-style: none; }
.seasonal-card summary::-webkit-details-marker, .office-inline-guide summary::-webkit-details-marker { display: none; }
.seasonal-card summary b, .office-inline-guide summary b { display: block; margin-top: 4px; font: 500 21px Georgia, serif; }
.summary-action { flex: 0 0 auto; color: #34465e; font-size: 13px; font-weight: 750; }
.seasonal-card[open] .summary-action, .office-inline-guide[open] .summary-action { font-size: 0; }
.seasonal-card[open] .summary-action::after, .office-inline-guide[open] .summary-action::after { content: "Close guide"; font-size: 13px; }
.office-inline-guide { margin-top: 7px; padding-top: 10px; border-top: 1px solid #ece9e2; }
.office-inline-guide .section-kicker { margin-bottom: 1px; }
.office-inline-guide summary b { font-size: 16px; }
.office-inline-guide .office-rank-grid { margin-top: 10px; }
.seasonal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; margin-top: 20px; padding-top: 6px; border-top: 1px solid #ece9e2; }
.seasonal-grid div { padding: 15px 0; border-bottom: 1px solid #ece9e2; }
.seasonal-grid b, .seasonal-grid span { display: block; }
.seasonal-grid b { font-size: 14px; }
.seasonal-grid span { margin-top: 5px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.office-rank-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; margin-top: 20px; border-top: 1px solid #ece9e2; }
.office-rank-grid div { padding: 15px 0; border-bottom: 1px solid #ece9e2; }
.office-rank-grid b, .office-rank-grid span { display: block; }
.office-rank-grid b { font: 500 17px Georgia, serif; }
.office-rank-grid span { margin-top: 5px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.office-rank-grid strong { color: var(--ink); }
.coming-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.coming-heading h2 { margin: 0 0 7px; font-size: 21px; }
.coming-count { padding: 6px 9px; border-radius: 999px; color: var(--navy); background: #eef0f3; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.coming-intro { margin: 9px 0 16px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.coming-list { border-top: 1px solid #e5e2dc; }
.coming-item { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 8px; align-items: center; padding: 6px 2px; border-bottom: 1px solid #ece9e2; }
.coming-item { width: 100%; border-top: 0; border-right: 0; background: transparent; text-align: left; }
.coming-date, .coming-copy { min-width: 0; padding: 3px 4px; border: 0; border-radius: 5px; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.coming-copy { position: relative; padding-right: 16px; }
.coming-copy::after { content: "›"; position: absolute; top: 4px; right: 2px; color: #8a9199; font: 400 18px/1 system-ui, sans-serif; }
.coming-date { width: 54px; min-height: 54px; place-content: center; justify-items: center; border: 1px solid #cbd1d8; border-radius: 7px; background: #fbfbfa; text-align: center; }
.coming-date:hover, .coming-date:focus-visible, .coming-copy:hover, .coming-copy:focus-visible { background: #f6f4ef; outline: 2px solid transparent; }
.coming-title-button { padding: 0; border: 0; background: transparent; text-align: left; cursor: pointer; }
.coming-title-button:hover h2, .coming-title-button:focus-visible h2 { text-decoration: underline; }
.coming-date { color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; }
.coming-copy b { display: block; font: 600 15px/1.2 Georgia, serif; }
.coming-copy small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.coming-badges { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
.coming-badges em { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 5px; border-radius: 5px; font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: .025em; text-transform: uppercase; }
.coming-kind { color: var(--event-color); background: var(--event-soft); }
.coming-badges .mass-status { min-height: 22px; padding: 2px 5px; font-size: 10px; }
.coming-holy-day .coming-kind { color: white; background: #233f62; box-shadow: 0 0 0 2px #233f6222; }

.insight-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.insight-card { padding: 13px 15px; }
.insight-card h2 { margin: 0 0 12px; font-size: 20px; }
.insight-card p { margin: 0; color: #555b5a; font-size: 14px; line-height: 1.62; }
.reading-glance strong { margin-right: 4px; color: #34465e; font: 700 16px Georgia, "Times New Roman", serif; }
.saint-reading-summary { margin-top: 15px; padding-top: 13px; border-top: 1px solid #e7e3dc; }
.saint-reading-summary p { font-style: italic; }
.daily-context { display: grid; gap: 11px; }
.daily-context p { margin: 0; }
.daily-context p + p { padding-top: 11px; border-top: 1px solid #e7e3dc; }
.daily-context b { color: var(--navy); font-family: Georgia, serif; font-size: 15px; }
.saint-profile { border: 0; border-radius: 0; background: transparent; padding: 0; }
.saint-profile:last-of-type { border-bottom: 0; }
.saint-profile summary { cursor: pointer; list-style: none; }
.saint-profile summary::-webkit-details-marker { display: none; }
.saint-summary-copy { padding: 7px 0 9px; color: #555b5a; font-size: 14px; line-height: 1.58; }
.saint-profile-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; padding: 5px 10px; border-top: 0; background: var(--saint-bar); color: var(--saint-bar-text); }
.saint-profile-footer .patronage { color: inherit; font-size: 12px; font-weight: 750; line-height: 1.4; }
.expand-badge { margin-left: auto; flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; color: inherit; font-size: 10px; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; }
.expand-mark { font-size: 15px; font-weight: 500; line-height: 1; transition: transform .18s ease; }
.collapse-label { display: none; }
.saint-profile[open] .expand-label { display: none; }
.saint-profile[open] .collapse-label { display: inline; }
.saint-profile[open] .expand-mark { transform: rotate(45deg); }
.saint-long-bio { margin: -2px 0 10px; padding: 0 0 11px; }
.saint-long-bio p { color: #555b5a; font-size: 14px; line-height: 1.62; }
.pastoral-note { margin-top: 17px; padding: 14px 15px; border-top: 3px solid var(--liturgical); border-radius: 0 0 8px 8px; color: #4f5554; background: #f4f3ef; font-size: 14px; line-height: 1.55; }
.pastoral-note b { color: var(--liturgical); letter-spacing: .05em; text-transform: uppercase; }

.permissions-card h2 { margin: 0 0 8px; font-size: 20px; }
.permission-context { margin: 0 0 8px; padding: 9px 10px; border-radius: 7px; background: var(--liturgical-soft); color: var(--ink); font-size: 13px; line-height: 1.4; }
.permissions-intro { margin: 0 0 12px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.permission-item { border-top: 1px solid #ece9e2; }
.permission-item summary { display: grid; grid-template-columns: 1fr auto 14px; align-items: center; gap: 8px; padding: 12px 0; cursor: pointer; list-style: none; }
.permission-item summary::-webkit-details-marker { display: none; }
.permission-item summary::after { content: "+"; color: #687486; font: 500 18px/1 system-ui, sans-serif; text-align: center; }
.permission-item[open] summary::after { content: "−"; }
.permission-name { font: 500 15px Georgia, serif; }
.permission-state { padding: 4px 7px; border-radius: 6px; font-size: 10px; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; }
.permission-state.allowed { color: #1d6740; background: #e7f3eb; }
.permission-state.judgment { color: #7b5b16; background: #f5ecd4; }
.permission-state.bishop { color: #644282; background: #eee5f5; }
.permission-state.prohibited { color: #8b3135; background: #f6e5e6; }
.permission-item p { margin: -2px 0 11px; padding-right: 3px; color: #444b50; font-size: 14px; line-height: 1.45; }

.necrology-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.necrology-card h2 { margin: 0; font-size: 20px; }
.small-link { padding: 4px 0; border: 0; background: transparent; color: var(--liturgical); font-size: 12px; font-weight: 750; cursor: pointer; }
.source-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 12px; }
.source-chip { padding: 5px 8px; color: var(--navy); background: #eef0f3; border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.necrology-card > p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.necrology-list { margin-top: 2px; }
.demo-warning, .necrology-empty { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.demo-warning { padding: 8px 10px; border-radius: 7px; background: #fff4d7; color: #715514; }
.necrology-entry { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 2px; border-bottom: 1px solid #ece9e2; }
.necrology-entry b, .necrology-entry span { display: block; }
.necrology-entry b { font: 500 15px Georgia, serif; }
.necrology-entry div > span { margin-top: 4px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .035em; }
.fictional-badge { flex: 0 0 auto; padding: 4px 7px; border-radius: 999px; background: #eef0f3; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.necrology-card .necrology-prayer { margin-top: 9px; color: var(--ink); font-family: Georgia, serif; font-style: italic; }

.calendar-dialog { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; border-radius: 0; background: #fff; color: #192538; color-scheme: light; }
.calendar-panel { position: relative; width: min(760px, 100%); height: 100%; margin: 0 auto; padding: 14px 16px 8px; display: flex; flex-direction: column; }
.calendar-header, .settings-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 7px; border-bottom: 1px solid var(--line); }
.calendar-header h2, .settings-header h2 { margin-top: 2px; font-size: 25px; }
.calendar-weekdays { display: flex; justify-content: space-between; padding: 22px 5px 8px; color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.calendar-actions { display: flex; align-items: center; gap: 4px; }
.calendar-actions > button:not(.close-button) { min-height: 34px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 7px; background: white; color: var(--navy); font-size: 12px; font-weight: 750; cursor: pointer; }
.calendar-actions > button[aria-expanded="true"] { color: white; background: var(--navy); border-color: var(--navy); }
.calendar-header .close-button { width: 34px; height: 34px; font-size: 25px; line-height: 1; }
.calendar-tool-panel { position: relative; padding: 7px 0 4px; flex-shrink: 0; z-index: 3; }
.calendar-search-results { position: absolute; top: 100%; left: 0; right: 0; max-height: min(55dvh, 440px); overflow-y: auto; background: white; border: 1px solid var(--line); border-radius: 0 0 10px 10px; box-shadow: 0 12px 28px #17213430; overscroll-behavior: contain; }
.calendar-search-results button { display: block; width: 100%; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line); border-left: 6px solid var(--day-color); background: white; text-align: left; cursor: pointer; color: var(--navy); }
.calendar-search-results button:hover, .calendar-search-results button:focus-visible { background: #f0f2f5; }
.calendar-search-results b { display: block; font-size: 16px; font-weight: 600; }
.calendar-search-results small { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; }
.calendar-search-results p { margin: 0; padding: 12px; font-size: 14px; color: var(--muted); }
.calendar-search { display: flex; min-width: 0; }
.calendar-search input, .date-jump input { min-height: 40px; font-size: 16px; border: 1px solid var(--line); background: white; }
.calendar-search input { width: 100%; min-width: 0; padding: 7px 10px; border-radius: 7px 0 0 7px; }
.calendar-search button { width: 40px; border: 1px solid var(--line); border-left: 0; border-radius: 0 7px 7px 0; background: white; font-size: 21px; cursor: pointer; }
.date-jump { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 700; }
.date-jump input { flex: 1; padding: 5px 7px; border-radius: 7px; }
.calendar-date-sheet { position: absolute; left: 16px; right: 16px; bottom: 66px; z-index: 8; padding: 12px; border: 1px solid #cfd4db; border-radius: 18px 18px 10px 10px; background: #fff; box-shadow: 0 -12px 38px rgba(20, 31, 46, .22); }
.date-sheet-heading { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 8px; color: var(--navy); }
.date-sheet-heading b { font: 600 19px Georgia, serif; }
.date-sheet-heading button { width: 30px; height: 30px; border: 0; border-radius: 50%; background: #eef0f3; color: var(--navy); font-size: 22px; line-height: 1; cursor: pointer; }
.native-date-field { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid #aeb7c3; border-radius: 12px; background: #f7f8fa; }
.native-date-field span { color: var(--navy); font-size: 14px; font-weight: 750; }
.native-date-field input { width: 100%; min-height: 42px; padding: 5px 9px; border: 0; border-radius: 9px; background: white; color: #1d2a3c; font-size: 17px; }
.native-date-note { margin: 8px 2px 0; color: var(--muted); font-size: 12px; }
.calendar-bars { display: grid; grid-auto-rows: max-content; align-content: start; flex: 1; gap: 2px; overflow-y: auto; min-height: 0; padding: 2px 2px 16px; overscroll-behavior: contain; }
.calendar-month-label { position: sticky; top: 0; z-index: 2; margin: 0; padding: 9px 4px; background: #f3f4f6; border-bottom: 1px solid #d6dae0; color: var(--navy); font: 600 19px Georgia, serif; }
.calendar-page-control { display: block; width: 100%; border: 0; border-bottom: 1px solid #d6dae0; background: #f3f4f6; color: #263e5b; padding: 12px; font: inherit; cursor: pointer; }
.calendar-info { padding: 12px; border-left: 5px solid var(--liturgical); background: white; line-height: 1.5; }
.calendar-unavailable { border-left-color: #e4e1dc; background: #faf9f6; color: var(--muted); cursor: default; }
.calendar-unavailable .calendar-date strong { font-size: 17px; }
.calendar-unavailable .calendar-title { font-size: 12px; }
.calendar-day { width: 100%; display: grid; grid-template-columns: 52px minmax(0,1fr); align-items: start; gap: 10px; min-height: 52px; padding: 9px 6px; border: 0; border-bottom: 1px solid #d6dae0; border-left: 7px solid var(--day-color, #e4e1dc); border-radius: 0; background: white; color: #192538; text-align: left; cursor: pointer; }
.calendar-day:hover { background: #f5f6f8; }
.calendar-day.selected { box-shadow: inset 0 0 0 2px #34465e; background: #f5f7fa; }
.calendar-date { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 3px 1px; text-align: center; white-space: nowrap; border: 1px solid transparent; }
.calendar-day.selected .calendar-date { border-color: #34465e; background: white; }
.calendar-date em { font: 600 12px system-ui, sans-serif; color: #34465e; }
.calendar-date strong { font: 600 18px Georgia, serif; }
.calendar-date small { color: var(--muted); font-size: 12px; font-weight: 650; text-transform: uppercase; }
.calendar-title { min-width: 0; white-space: normal; overflow-wrap: break-word; line-height: 1.35; }
.calendar-title b { font: 400 16px/1.35 system-ui, sans-serif; }
.calendar-major .calendar-title b { font-weight: 700; }
.calendar-title span { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.calendar-title .calendar-option { font-size: 15px; line-height: 1.35; color: #424952; padding-left: 8px; margin-top: 7px; border-left: 4px solid var(--option-color); }
.calendar-bottom { flex-shrink: 0; display: grid; grid-template-columns: 1fr 1.3fr 1fr; gap: 8px; padding: 10px 0 max(6px, env(safe-area-inset-bottom)); border-top: 1px solid #d6dae0; background: white; }
.calendar-bottom > button:not(.close-button) { min-height: 44px; font-size: 14px; border-radius: 9px; }
.calendar-header { flex-shrink: 0; }
.calendar-entry { grid-template-columns: minmax(0, 1fr) 46px; gap: 0; min-height: 44px; padding: 0 3px 0 0; }
.calendar-open { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 7px; align-items: center; width: 100%; min-height: 44px; padding: 5px; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.calendar-entry .calendar-date { padding: 1px; }
.calendar-entry .calendar-title b { font-size: 16px; line-height: 1.2; }
.calendar-title .calendar-rank { display: inline-block; width: fit-content; margin: 0 0 3px; padding: 2px 5px; border-radius: 4px; background: #e9edf2; color: #34465e; font: 800 11px/1.25 system-ui, sans-serif; letter-spacing: .045em; text-transform: uppercase; }
.calendar-title .calendar-rank.feast { background: var(--event-soft, #f2e9dc); color: #6e4e13; }
.calendar-title .calendar-rank.solemnity { background: #dce7f3; color: #183f6b; }
.calendar-title .calendar-rank.holy-day { background: #7f2027; color: white; }
.calendar-quick-toggle { align-self: stretch; min-height: 44px; border: 0; border-left: 1px solid #e0e3e7; padding: 3px; background: transparent; color: #53647b; font-size: 12px; line-height: 1.3; cursor: pointer; }
.calendar-quick-toggle[aria-expanded="true"] { background: #e9edf2; color: #192538; }
.calendar-quick { grid-column: 1 / -1; padding: 5px 8px 8px 54px; border-top: 1px solid #e0e3e7; font-size: 14px; line-height: 1.35; }
.calendar-quick p { margin: 3px 0; }
.calendar-quick-checks { display: flex; gap: 5px; margin-bottom: 5px; }
.calendar-quick .calendar-metadata { font-size: 12px; color: #596473; }
.calendar-quick .calendar-option { display: block; border-left: 3px solid var(--option-color); padding-left: 6px; margin-top: 5px; }
.readings-button { display: flow-root; width: 100%; max-width: 100%; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.readings-button > span { min-width: 0; }
.readings-button > small { float: right; width: auto; min-height: 28px; margin: 0 0 3px 8px; padding: 4px 7px; border: 1px solid #d7dce2; border-radius: 7px; background: #f3f5f7; color: #34465e; font-size: 11px; font-weight: 800; line-height: 1; text-align: center; white-space: nowrap; }
.readings-button:hover > small, .readings-button:focus-visible > small { text-decoration: underline; }
.reading-requirement { display: inline-flex; margin-left: 7px; padding: 2px 5px; border-radius: 4px; color: #34465e; background: #e9edf2; font-size: 9px; font-weight: 800; letter-spacing: .035em; line-height: 1.25; text-transform: uppercase; vertical-align: 1px; }
.calendar-color { color: var(--muted); font-size: 11px; font-weight: 750; text-transform: uppercase; }

.settings-dialog { width: min(560px, calc(100% - 24px)); padding: 0; border: 0; border-radius: 18px; }
.settings-panel { padding: 24px; }
.settings-panel fieldset { margin: 22px 0 0; padding: 0; border: 0; }
.settings-panel legend { margin-bottom: 8px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.setting-choice { display: flex; align-items: center; gap: 12px; padding: 12px 5px; border-top: 1px solid #ece9e2; cursor: pointer; }
.setting-choice input { width: 18px; height: 18px; accent-color: var(--liturgical); }
.setting-choice b, .setting-choice small { display: block; }
.setting-choice b { font-size: 14px; }
.setting-choice small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.save-settings { width: 100%; margin-top: 22px; padding: 12px 16px; border: 0; border-radius: 9px; color: white; background: var(--navy); font-weight: 750; cursor: pointer; }
.setting-help { margin: 4px 0 10px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.order-control { display: flex; align-items: center; gap: 6px; padding: 5px 0; border-top: 1px solid #ece9e2; }
.order-control span { flex: 1; font-size: 14px; }
.order-control button { min-width: 36px; min-height: 34px; border: 1px solid var(--line); border-radius: 6px; background: white; cursor: pointer; }
.order-control button:disabled { opacity: .35; cursor: default; }
.remembrance-field { display: block; margin: 16px 0; font-size: 14px; font-weight: 700; }
.remembrance-field input { display: block; width: 100%; margin-top: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 7px; }
.remove-remembrance { border: 0; background: transparent; color: var(--muted); font-size: 22px; cursor: pointer; }

dialog { width: min(600px, calc(100% - 28px)); padding: 0; border: 0; border-radius: 16px; box-shadow: 0 26px 90px rgba(0,0,0,.28); }
dialog::backdrop { background: rgba(11,18,30,.6); backdrop-filter: blur(3px); }
.close-button { border: 0; background: transparent; color: var(--muted); font-size: 28px; cursor: pointer; }
.bible-dialog { width: min(720px, calc(100% - 20px)); max-height: calc(100dvh - 24px); }
.bible-panel { max-height: calc(100dvh - 24px); display: flex; flex-direction: column; padding: 18px; background: #fff; }
.bible-header { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.bible-header h2 { margin-top: 3px; }
.bible-notice { flex: 0 0 auto; margin: 10px 0; padding: 8px 10px; border-radius: 7px; background: #f4f1e9; color: #64615a; font-size: 12px; line-height: 1.4; }
.bible-text { min-height: 0; overflow-y: auto; padding: 0 3px 8px; overscroll-behavior: contain; }
.bible-reading { padding: 13px 0; border-bottom: 1px solid #e8e5df; }
.bible-reading:last-child { border-bottom: 0; }
.bible-reading h3 { margin: 0 0 8px; color: var(--navy); font: 600 18px Georgia, serif; }
.bible-reading p { margin: 0; color: #353b40; font: 400 17px/1.72 Georgia, serif; }
.bible-reading sup { margin-right: 2px; color: #34465e; font: 700 10px/1 system-ui, sans-serif; }
.verse-chapter { margin-right: 4px; color: var(--navy); font: 700 15px/1 system-ui, sans-serif; }

@media (max-width: 800px) {
  .topbar { height: 48px; padding: 0 18px; }
  .calendar-layer { font-size: 13px; }
  main { padding: 0 9px 28px; }
  .date-nav { height: 72px; justify-content: space-between; gap: 5px; }
  .date-display { min-width: 0; flex: 1; }
  .date-display strong { font-size: 22px; }
  .today-button { display: none; }
  .day-heading { margin-top: 10px; padding: 20px 18px 18px; }
  .observance-strip { display: block; }
  .strip-label { min-height: 30px; padding: 0 14px; }
  .strip-choices { grid-template-columns: 1fr; }
  .strip-choice { padding: 9px 14px 9px 21px; border-right: 0; border-bottom: 1px solid #b9b6ae; }
  .strip-choice:last-child { border-bottom: 0; }
  h1 { font-size: 31px; }
  .sortable-sections { grid-template-columns: 1fr; }
  .sortable-sections > .primary-column, .sortable-sections > .permissions-card, .sortable-sections > .necrology-card, .sortable-sections > .bottom-office, .sortable-sections > .reference-section, .sortable-sections > .prototype-note { grid-column: 1; grid-row: auto; }
  .insight-grid { grid-template-columns: 1fr; }
  .insight-card { padding: 12px 13px; }
  .ordo-card { padding: 13px 14px 10px; }
  .direction-row { grid-template-columns: 112px 1fr; gap: 14px; }
  .bottom-office .directions { grid-template-columns: 1fr; }
  .seasonal-grid, .office-rank-grid { grid-template-columns: 1fr; }
}

.coming-item { padding: 6px 2px 6px 7px; border-left: 7px solid var(--event-bar, var(--event-color)); box-shadow: inset 1px 0 0 var(--event-edge, transparent); }
.coming-date { display: grid; gap: 1px; color: var(--muted); text-transform: uppercase; }
.coming-date strong { color: #34465e; font-size: 12px; letter-spacing: .06em; }
.coming-date small { font-size: 11px; font-weight: 800; letter-spacing: .035em; }
.calendar-open .calendar-observances { grid-column: 1 / -1; display: grid; gap: 0; margin-top: 3px; }
.calendar-open .calendar-observance { display: block; margin: 0; padding: 3px 4px 3px 6px; border-top: 1px solid #e3e6e9; border-left: 6px solid var(--option-color, #9aa2ad); color: #424952; line-height: 1.22; }
.calendar-open .calendar-observance > span { display: inline; margin: 0; color: inherit; font-size: 13px; line-height: 1.22; }
.calendar-open .calendar-observance em { display: inline; margin-right: 4px; color: #697381; font-style: normal; font-size: 9px; font-weight: 800; letter-spacing: .03em; line-height: 1.22; text-transform: uppercase; }
.calendar-open { align-items: start; padding: 6px 5px; }

@media (max-width: 430px) {
  .calendar-layer { line-height: 1.2; }
  .date-nav { gap: 3px; }
  .nav-arrow { width: 36px; height: 36px; }
  .date-display #weekdayLabel { font-size: 11px; }
  .date-display strong { font-size: 20px; }
  .direction-row { grid-template-columns: 1fr; gap: 5px; }
  .direction-row dt { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
  .mass-card .direction-row { display: block; }
  .mass-card .direction-row dt { white-space: normal; }
  .mass-statuses { margin-left: auto; }
  .mass-card .card-heading { flex-wrap: wrap; }
  .calendar-panel { padding-inline: 8px; }
  .calendar-date-sheet { left: 8px; right: 8px; }
  .coming-item { grid-template-columns: 56px minmax(0, 1fr); gap: 6px; }
  .calendar-day:not(.calendar-entry) { grid-template-columns: 42px 1fr; gap: 5px; padding-left: 5px; }
  .calendar-color { display: none; }
  .reference-card { padding: 17px 15px; }
}

@media (prefers-reduced-motion: no-preference) {
  .ordo-card, .note-card, .options-card { animation: rise .35s ease both; }
  .note-card { animation-delay: .05s; }
  @keyframes rise { from { opacity: 0; transform: translateY(6px); } }
}
.calendar-rule-guide { margin-top: 12px; font-size: 13px; line-height: 1.45; }
.calendar-rule-guide summary { cursor: pointer; font-weight: 700; }
.calendar-rule-guide p { margin: 9px 0; }
#ascensionSetting { padding: 8px; font: inherit; border: 1px solid #c7ccd3; border-radius: 6px; background: white; }
.calendar-saint-note { padding: 6px 0; border-top: 1px solid #e4e1dc; font-size: 13px; }
.calendar-title .calendar-rank.holy-day { background: #233f62; color: white; }

.saint-long-bio blockquote { margin: 12px 0; padding-left: 12px; border-left: 3px solid var(--saint-accent); font: italic 16px Georgia, serif; }
.saint-long-bio cite { display: block; margin-top: 6px; font: normal 11px system-ui, sans-serif; }
.saint-profile summary:focus-visible { outline: 2px solid var(--saint-accent); outline-offset: 4px; }

/* A single compact set, with exceptions stated once below it. */
.mass-card .compact-readings dt { display:block; margin-bottom:2px; }
.mass-card .compact-readings dt::after { content:none; }
.mass-card .compact-readings dd { display:block; font-weight:500; }
.lectionary-number { font-weight:500; }
.reading-chevron { color:#667386; font-weight:700; white-space:nowrap; }
.readings-button { display:inline; width:auto; font:inherit; line-height:inherit; }
.readings-button:hover, .readings-button:focus-visible { text-decoration:underline; }
.readings-button:focus-visible { outline:2px solid #667386; outline-offset:3px; }
.readings-button strong { font-weight:800; }
.reading-note { display:block; margin-top:3px; color:#46546a; font-size:12px; font-weight:650; }
.mass-card .optional-reading-row { background:none; margin:0; padding:2px 0 6px; }
.reading-options { color:#46546a; font-size:12px; font-weight:500; }
.reading-options summary { cursor:pointer; }
.reading-options > button { display:block; margin-top:5px; }
.reading-options p { margin:5px 0; }

.mass-form-guide { border-top: 1px solid #ece9e2; padding: 9px 0 0; margin-top: 4px; font-size: 14px; }
.mass-form-guide summary { cursor: pointer; color: var(--navy); font-weight: 650; }
.mass-form-guide p { margin: 9px 0; line-height: 1.5; }
.mass-form-guide label { display: grid; gap: 6px; margin-top: 12px; }
.mass-form-guide select { width: 100%; min-width: 0; padding: 8px; font: inherit; background: white; border: 1px solid #d6d9dd; border-radius: 5px; color: var(--ink); }
.votive-day-note { margin: 9px 0 0; color: var(--muted); font-size: 13px; line-height: 1.4; }

/* Neutral, compact reading list; it does not carry liturgical selection colors. */
.martyrology { border-top: 1px solid #d8dadb; margin-top: 8px; }
.martyrology summary { cursor: pointer; list-style: none; }
.martyrology summary::-webkit-details-marker { display: none; }
.martyrology-heading, .martyrology-entry > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 26px; padding: 2px 0; }
.martyrology-heading { color: #62686c; font-weight: 600; font-size: 14px; }
.martyrology-heading small, .martyrology-entry small { font-size: 13px; font-weight: 400; color: #62686c; }
.martyrology-entry { border-top: 1px solid #ececed; }
.martyrology-entry > summary { font-size: 14px; line-height: 1.3; color: #555b5a; }
.martyrology-toggle { flex: 0 0 16px; text-align: center; font-size: 19px; }
.martyrology-toggle::before { content: '+'; }
.martyrology[open] > summary .martyrology-toggle::before, .martyrology-entry[open] > summary .martyrology-toggle::before { content: '−'; }
.martyrology summary:focus-visible { outline: 2px solid #34445a; outline-offset: 2px; }
.martyrology-note { padding: 0 0 9px; }
.martyrology-note p, .martyrology .martyrology-caption { margin: 0 0 6px; font-size: 14px; line-height: 1.45; }
.martyrology .martyrology-caption, .martyrology-note > small { display: block; color: #62686c; font-size: 12px; line-height: 1.4; }

.insight-card.martyrology-only { padding: 8px 12px; }
.martyrology-only .martyrology { margin-top: 0; border-top: 0; }

.martyrology-list { display: block; }
.martyrology-list > *, .martyrology-more > * { margin: 0; }
.martyrology-name { padding: 2px 0; color: #555b5a; font-size: 14px; line-height: 1.3; border-top: 1px solid #ececed; overflow-wrap: anywhere; }
.martyrology-more > summary { display: flex; justify-content: space-between; align-items: center; min-height: 26px; padding: 2px 0; border-top: 1px solid #ececed; font-size: 14px; color: #34445a; }
.calendar-open .calendar-observance em { text-transform: none; }
.martyrology-more[open] > summary .martyrology-toggle::before { content: '−'; }
.martyrology-source { margin-top: 3px; }
.martyrology-source > summary { font-size: 12px; min-height: 24px; line-height: 24px; color: #62686c; text-decoration: underline; text-underline-offset: 2px; }
.martyrology-source p, .martyrology-source small { font-size: 12px; line-height: 1.4; color: #62686c; }

/* Exceptional rubrics share one compact, expandable treatment. */
.rubric-strip { border-top:1px solid #deded9; padding:6px 0; color:#34465e; font-size:.88rem; }
.rubric-strip summary { cursor:pointer; font-weight:650; list-style:none; }
.rubric-strip summary::after { content:' +'; float:right; padding-left:8px; }
.rubric-strip[open] summary::after { content:' −'; }
.rubric-strip summary::-webkit-details-marker { display:none; }
.rubric-strip p { margin:6px 0 3px; line-height:1.45; font-weight:400; }
.rubric-strip small { font-size:.76rem; color:#68717a; }
.reading-note.rubric-strip { margin-top:4px; border:0; font-size:.8rem; }
.tonight-notice { color:inherit; border:0; }
.rubric-strip summary:focus-visible { outline:2px solid #34465e; outline-offset:3px; }

.missal-guide { border-top: 1px solid #ece9e2; padding: 10px 0; font-size: 14px; }
.missal-guide summary { cursor: pointer; color: var(--navy); font-weight: 650; }
.missal-guide summary small { display: block; color: #626973; font-weight: 400; margin-top: 4px; }
.missal-guide p { margin: 9px 0; line-height: 1.45; }
.missal-location { font-weight: 600; }
.missal-guide dl { margin: 8px 0; }
.missal-guide dl > div { display: grid; grid-template-columns: minmax(100px, 32%) 1fr; gap: 8px; padding: 5px 0; }
.missal-guide dd { margin: 0; }
.missal-update { border-left: 3px solid #bd9138; padding: 8px 12px; margin: 8px 0; font-size: 14px; }
.missal-update p { margin: 5px 0; line-height: 1.4; }
.supplement-download { display: inline-block; padding: 9px 12px; margin: 6px 0; border: 1px solid #cbd0d5; border-radius: 6px; color: var(--navy); background: #fafafa; font-weight: 600; text-decoration: none; }
.supplement-library { padding: 12px 18px; background: #fff; border-radius: 8px; }
.supplement-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 7px 0; border-top: 1px solid #ece9e2; }

/* A single disclosure for prayer sources, Commons and prefaces. */
.missal-guide > summary { line-height: 1.45; padding: 2px 0; }
.missal-brief { display: inline; color: var(--navy); font-weight: 650; font-size: 14px; overflow-wrap: anywhere; }
.missal-brief > span + span::before { content: " · "; white-space: pre; color: #8a8f96; }
.missal-expanded { padding-top: 5px; }
.missal-expanded dt { color: #47546a; font-weight: 600; }
@media (max-width: 430px) { .missal-guide dl > div { grid-template-columns: minmax(100px, 40%) 1fr; gap: 10px; } }

.reading-set-note { margin: 5px 0 0; font-size: 13px; color: #47546a; }
.permission-static { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; }

/* Compact expanded Missal guidance, with prayer order retained. */
.missal-expanded { padding-top: 2px; font-size: 13px; }
.missal-guide .missal-expanded p { margin: 4px 0; line-height: 1.3; }
.missal-guide .missal-expanded dl { margin: 4px 0; }
.missal-guide .missal-expanded dl > div { padding: 2px 0; gap: 8px; line-height: 1.3; grid-template-columns: minmax(125px, 35%) 1fr; }
.missal-expanded .missal-update { margin: 5px 0; padding: 5px 8px; }
.permission-item p { margin: 0 0 7px; line-height: 1.35; }
.permission-item summary { padding: 9px 0; }
.saint-long-bio .saint-patronage { margin-top: 0; padding-bottom: 5px; border-bottom: 1px solid #ece9e2; }
.saint-profile-footer { justify-content: space-between; }

/* Each expanded life remains visibly enclosed. */
.saint-profile, .saint-profile:last-of-type { border: 1px solid #d8d3ca; border-radius: 5px; overflow: hidden; }
.saint-summary-copy { padding: 10px 12px; }
.saint-profile-footer { margin-bottom: 0; }
.saint-long-bio { margin: 0; padding: 10px 12px 12px; }
.feast-history { border-top: 2px solid #d8d3ca; padding-top: 10px; }
.feast-history summary { cursor: pointer; font-weight: 700; }
.feast-history p { font-size: 14px; line-height: 1.65; margin-top: 10px; }
.feast-history .feast-reflection { font-style: italic; }
.funeral-notice { border-left: 3px solid #956b42; padding: 7px 10px; margin: 8px 0; background: #faf6ee; font-size: 12px; }
.funeral-notice summary { cursor: pointer; font-weight: 700; }
.funeral-notice p, .funeral-notice ul { margin: 7px 0 0; }
