:root {
  color-scheme: only light;
  --base: #f6f7ef;
  --paper: #fffcf5;
  --sand: #fcf5e9;
  --ink: #10323d;
  --muted: #425d64;
  --teal: #085666;
  --mint: #d9ece4;
  --band: #c7e5dd;
  --line: #bed6cf;
  --coral: #ff785f;
  --accent: #b8402c;
  --deep: #0b3b45;
  --serif: "STIX Two Text", Georgia, serif;
  --scale: 1;
}
:root[data-theme="dark"] {
  --base: #101f25;
  --paper: #182d34;
  --sand: #14282e;
  --ink: #eff7f2;
  --muted: #b6ccc9;
  --teal: #a8e3da;
  --mint: #1d373b;
  --band: #203d40;
  --line: #396166;
  --accent: #ff9c86;
  --deep: #0b2229;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--base); color: var(--ink); font: 400 1rem/1.5 "Outfit", system-ui, sans-serif; }
main { flex: 1; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, .reading-head h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -.05em; line-height: .98; }
h1 em, h2 em { font-weight: 400; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.wrap { width: min(100% - 80px, 1240px); margin-inline: auto; }
.skip { position: fixed; z-index: 10; top: 6px; left: 8px; padding: 8px 15px; background: var(--paper); transform: translateY(-150%); }
.skip:focus { transform: translateY(0); }
.header { min-height: 72px; background: var(--base); border-bottom: 1px solid var(--line); position: relative; z-index: 2; }
.header-inner { min-height: 71px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; }
.brand { position: relative; display: block; width: 116px; height: 52px; align-self: center; }
.brand img { width: 116px; max-width: none; height: auto; position: absolute; top: 50%; transform: translateY(-50%); pointer-events: none; }
.header nav { display: flex; align-items: center; gap: clamp(20px, 3vw, 44px); }
.header nav a { position: relative; padding: 22px 0; font-size: 1rem; font-weight: 600; white-space: nowrap; }
.header nav a:hover, .header nav a[aria-current] { color: var(--accent); }
.header nav a[aria-current]::after { content: ""; position: absolute; inset: auto 0 14px; height: 2px; border-radius: 3px; background: var(--accent); }
.header-actions { display: flex; justify-content: flex-end; gap: 8px; }
.icon-button { display: inline-grid; place-items: center; flex: 0 0 auto; width: 44px; height: 44px; border: 1px solid var(--line); background: var(--paper); border-radius: 50%; padding: 0; }
.icon-button:hover { background: var(--mint); border-color: var(--teal); }
[data-icon] { display: inline-flex; align-items: center; justify-content: center; }
[data-icon] svg { width: 22px; height: 22px; }
.menu { display: none; }
.hero { background: radial-gradient(ellipse at 75% 75%, var(--mint), transparent 75%); }
.hero-grid { display: grid; grid-template-columns: 1.02fr 1fr; gap: clamp(36px, 7vw, 112px); align-items: center; padding-block: clamp(46px, 4.7vw, 72px) clamp(58px, 5.5vw, 88px); }
.eyebrow { color: var(--teal); font-weight: 700; font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; display: flex; gap: 10px; align-items: center; margin-bottom: 22px; }
.eyebrow::before { content: ""; width: 23px; height: 2px; background: var(--coral); flex: 0 0 auto; }
.hero h1 { font-size: clamp(4rem, 6.9vw, 7rem); line-height: .95; }
.hero h1 em { color: var(--accent); }
.hero-intro { max-width: 31ch; margin-top: 24px; color: var(--muted); font-size: clamp(1.16rem, 1.65vw, 1.43rem); line-height: 1.42; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 26px; }
.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 10px 19px; border-radius: 100px; font-weight: 700; font-size: 1rem; border: 1px solid transparent; }
.button [data-icon] svg { width: 18px; height: 18px; }
.primary { background: var(--coral); color: #222c2d; }
.primary:hover { background: #ff947f; }
.outline { color: var(--teal); border-color: var(--teal); background: transparent; }
.outline:hover { background: var(--mint); }
.hero-visual { position: relative; margin: 0 8px 6px 10px; }
.arch { aspect-ratio: 1.19; border-radius: 53% 47% 11% 12% / 74% 62% 12% 15%; background: var(--mint); overflow: hidden; }
.arch img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.today-badge {
  position: absolute;
  bottom: 7px;
  right: -13px;
  display: flex;
  gap: 12px;
  align-items: center;
  max-width: calc(100% + 8px);
  background-color: rgb(255 252 245 / 92%);
  backdrop-filter: blur(8px);
  border: 1px solid rgb(255 252 245 / 78%);
  border-radius: 13px;
  padding: 12px 16px;
  color: #10323d;
  box-shadow: 0 2px 10px rgb(16 50 61 / 15%);
}
.today-badge:hover { background-color: rgb(255 252 245 / 98%); }
:root[data-theme="dark"] .today-badge {
  background-color: rgb(16 31 37 / 90%);
  border-color: rgb(239 247 242 / 26%);
  color: var(--ink);
  box-shadow: 0 2px 10px rgb(0 0 0 / 23%);
}
:root[data-theme="dark"] .today-badge:hover { background-color: rgb(16 31 37 / 97%); }
.today-badge [data-icon] { flex: none; }
.today-badge > div { min-width: 0; overflow-wrap: anywhere; }
.today-badge time { display: block; font-size: .875rem; }
.today-badge strong:not([hidden]) { display: block; font-size: 1rem; }
#home-prayer { max-width: 100%; }
#home-prayer [data-icon] { flex: none; }
.quick { background: var(--band); border-block: 1px solid var(--line); }
.quick-grid { display: grid; grid-template-columns: 1.12fr repeat(4, minmax(0, 1fr)); align-items: center; padding-block: 18px; }
.quick-grid p { font-size: 1.16rem; line-height: 1.12; font-weight: 700; }
.quick-grid p em { font: italic 1.32rem/1 var(--serif); }
.quick-grid a { display: flex; gap: 13px; align-items: center; padding: 5px 12px 5px clamp(13px, 2.5vw, 32px); border-left: 1px solid var(--line); min-height: 52px; }
.quick-grid a:hover strong { text-decoration: underline; }
.quick-grid a [data-icon] { color: var(--teal); }
.quick-grid a [data-icon] svg { width: 25px; height: 25px; }
.quick-grid strong, .quick-grid small { display: block; }
.quick-grid small { color: var(--muted); font-size: .91rem; }
.featured { padding-block: clamp(48px, 5.5vw, 80px); }
.section-head { display: flex; justify-content: space-between; align-items: end; margin-bottom: 27px; gap: 24px; }
.section-head h2 { font-size: clamp(3rem, 5vw, 5rem); }
.section-head > p { width: 29ch; color: var(--muted); font-size: 1.06rem; padding-bottom: 4px; }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
.card { position: relative; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: var(--mint); display: grid; grid-template-rows: auto 1fr; }
.card:hover { border-color: var(--teal); }
.card img { width: 100%; aspect-ratio: 1.68; object-fit: cover; }
.card-icon { position: absolute; top: 12px; left: 12px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: #24636e; color: white; }
.card-icon.dawn { background: #815518; }
.card-icon.dusk { background: #8a4635; }
.card-content { padding: 13px 15px 15px; }
.card-content strong, .card-content small { display: block; }
.card-content strong { font-size: 1.16rem; line-height: 1.2; }
.card-content small { font-size: .92rem; color: var(--muted); margin-top: 4px; }
.hours-section { background: var(--sand); border-top: 1px solid var(--line); }
.hours-layout { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 32px; padding-block: 46px 52px; }
.hours-layout .eyebrow { margin-bottom: 16px; }
.hours-layout h2 { font-size: clamp(2.65rem, 3.7vw, 3.8rem); }
.hour-grid { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 9px; }
.hour-tile { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 9px; min-height: 91px; text-align: center; border-radius: 15px; background: var(--paper); border: 1px solid var(--line); padding: 10px 5px; font-weight: 700; font-size: .94rem; line-height: 1.12; }
.hour-tile:hover, .hour-tile[aria-current] { background: var(--mint); border-color: var(--teal); }
.hour-tile[aria-current] { box-shadow: inset 0 0 0 1px var(--teal); }
.hour-tile [data-icon] { color: var(--accent); }
.hour-tile [data-icon] svg { width: 24px; height: 24px; }
.footer { background: var(--deep); color: #f6fbf8; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 8px; padding-block: 30px 27px; text-align: center; }
.footer .brand, .footer .brand img { width: 105px; }
.footer-message { font-family: var(--serif); font-size: clamp(1.4rem, 3vw, 1.85rem); }
.footer-mission { font-size: 1rem; }
.footer-inner hr { width: min(100%, 360px); margin: 10px 0 2px; border: 0; border-top: 1px solid #f6fbf84d; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 24px; font-weight: 600; }
.footer-links a { padding-block: 8px; }
.footer-links a:hover { text-decoration: underline; }
.footer-inner small { font-size: .875rem; }
.interior { max-width: 1010px; padding-block: 55px 80px; }
.interior .eyebrow { margin-bottom: 15px; }
.interior h1 { font-size: clamp(3.35rem, 7vw, 5.7rem); }
.interior-intro { font-size: 1.2rem; color: var(--muted); margin-top: 14px; max-width: 57ch; }
.date-controls { margin: 23px 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.date-controls input { min-height: 44px; border: 1px solid var(--line); padding: 0 8px; min-width: 132px; border-radius: 10px; color: var(--ink); background: var(--paper); }
.date-controls .button { min-height: 44px; padding: 7px 14px; }
.date-label { color: var(--muted); margin-left: 5px; font-size: .94rem; }
.reading { border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: var(--paper); margin-top: 22px; }
.reading-head { background: var(--mint); padding: 22px 26px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; }
.reading-head :is(h2,h3) { font-size: clamp(2rem, 4vw, 3.2rem); }
.reading-body { padding: 25px 26px 28px; color: var(--muted); }
.reading-body p, .reading-body li { font: 400 calc(1.17rem * var(--scale))/1.62 var(--serif); }
.reading-body p + p { margin-top: 5px; }
.reading-body .button { margin-top: 16px; font-size: calc(1rem * var(--scale)); }
.reading-body ul { margin-block: 0; padding-left: 22px; }
.reading-body li a { text-decoration: underline; color: var(--teal); }
.size-controls { display: flex; align-items: center; gap: 7px; }
.size-controls output { min-width: 3.4ch; }
.size-controls button:disabled { opacity: .5; cursor: default; }
.calendar-card { max-width: 660px; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); padding: 16px; }
.calendar-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 13px; }
.calendar-title h2 { font-size: clamp(1.64rem, 4vw, 2.7rem); text-align: center; }
.month-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 4px; text-align: center; }
.month-grid span { font-size: .9rem; color: var(--muted); padding-block: 6px; }
.month-grid button { min-height: 44px; border: 1px solid transparent; border-radius: 9px; background: transparent; padding: 0; }
.month-grid button:hover, .month-grid button[aria-pressed="true"] { background: var(--mint); border-color: var(--teal); }
.month-grid button[aria-current="date"] { font-weight: 700; color: var(--accent); }
dialog { width: min(100% - 24px, 740px); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid var(--line); border-radius: 22px; color: var(--ink); background: var(--base); }
dialog::backdrop { background: #102c35a3; }
body:has(dialog[open]) { overflow: hidden; }
.dialog-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; padding: 23px 25px; border-bottom: 1px solid var(--line); }
.dialog-head .eyebrow { margin-bottom: 12px; }
.dialog-head h2 { font-size: clamp(2.6rem, 6vw, 4.4rem); }
.dialog-body { padding: 0 19px 20px; }
.dialog-body .reading { margin-top: 0; }
@media (max-width: 1040px) {
  .hours-layout { grid-template-columns: 1fr; gap: 18px; }
  .hours-layout h2 br { display: none; }
}
@media (max-width: 780px) {
  .wrap { width: calc(100% - 42px); }
  .header-inner { grid-template-columns: 1fr auto; }
  .menu { display: inline-grid; }
  .header nav { display: none; position: absolute; inset: 100% 0 auto; background: var(--base); border-bottom: 1px solid var(--line); padding: 5px 21px 14px; gap: 0; }
  .header nav[data-open] { display: grid; }
  .header nav a { padding: 11px 2px; min-height: 44px; }
  .header nav a[aria-current]::after { width: 26px; bottom: 7px; }
  .hero-grid { gap: 24px; }
  .hero h1 { font-size: clamp(3.35rem, 8.9vw, 5.1rem); }
  .quick-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .quick-grid > p { display: none; }
  .quick-grid a:first-of-type { border-left: 0; padding-left: 0; }
  .cards { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
  .hour-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
}
@media (max-width: 580px) {
  .wrap { width: calc(100% - 36px); }
  .header, .header-inner { min-height: 61px; }
  .hero-grid { grid-template-columns: 1fr; gap: 30px; padding-block: 32px 37px; }
  .hero .eyebrow { margin-bottom: 16px; }
  .hero h1 { font-size: clamp(3.3rem, 12vw, 4.7rem); }
  .hero-intro { margin-top: 14px; }
  .hero .actions { margin-top: 19px; gap: 8px; }
  .hero .button { padding-inline: 12px; font-size: .94rem; }
  .hero-visual { width: min(calc(100% - 19px), 440px); margin: 0 auto 4px; }
  .arch { aspect-ratio: 1.4; }
  .today-badge {
    inset-inline: 0;
    bottom: 10px;
    width: 86%;
    margin-inline: auto;
    background-color: rgb(255 252 245 / 89%);
    box-shadow: 0 1px 5px rgb(16 50 61 / 10%);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 2px 5px;
    padding: 6px 9px;
    border-radius: 9px;
    line-height: 1.25;
  }
  :root[data-theme="dark"] .today-badge {
    background-color: rgb(16 31 37 / 89%);
    border-color: rgb(239 247 242 / 16%);
    box-shadow: 0 1px 5px rgb(0 0 0 / 15%);
  }
  .today-badge > div { display: contents; }
  .today-badge [data-icon] { display: flex; }
  .today-badge [data-icon] svg { width: 15px; height: 15px; }
  .today-badge time { font-size: .78125rem; }
  .today-badge time::first-letter { text-transform: uppercase; }
  .today-badge strong:not([hidden]) {
    grid-column: 1 / -1;
    font-size: .875rem;
    font-weight: 600;
    overflow-wrap: anywhere;
  }
  .quick-grid { padding-block: 7px; }
  .quick-grid a { flex-direction: column; justify-content: center; text-align: center; gap: 5px; min-height: 63px; padding: 5px 3px; font-size: .92rem; }
  .quick-grid small { display: none; }
  .quick-grid a [data-icon] svg { width: 20px; height: 20px; }
  .section-head { display: block; margin-bottom: 18px; }
  .section-head > p { margin-top: 13px; max-width: 100%; }
  .card-icon { left: 8px; top: 8px; width: 33px; height: 33px; }
  .card-icon [data-icon] svg { width: 18px; height: 18px; }
  .card-content { padding: 11px 9px; }
  .card-content strong { font-size: 1rem; }
  .card-content small { font-size: .86rem; }
  .hour-grid { gap: 7px; }
  .hour-tile { font-size: .87rem; min-height: 77px; }
  .hours-layout { padding-block: 36px 42px; }
  .interior { padding-block: 34px 59px; }
  .date-label { flex: 1 0 100%; margin: 3px 0 0; }
  .reading-head, .reading-body { padding: 17px 15px; }
  .dialog-head { padding: 17px 15px; }
  .dialog-body { padding-inline: 12px; }
}
@media (max-width: 355px) {
  .hour-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .header-inner, .hero .actions { gap: 6px; }
}

.prayer-form {
  display: grid;
  gap: 6px;
  max-width: 36rem;
  margin-top: 18px;
  font-weight: 600;
}
.prayer-form select {
  min-height: 44px;
  width: 100%;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--base);
  color: var(--ink);
  font: inherit;
}
.reading-body .prayer-status {
  margin-top: 14px;
  color: var(--muted);
  font-family: "Outfit", system-ui, sans-serif;
  font-size: 1rem;
}
.prayer-status:empty { margin: 0; }
.prayer-content {
  margin-top: 15px;
  padding-top: 19px;
  border-top: 1px solid var(--line);
  max-width: 68ch;
  overflow-wrap: anywhere;
  color: var(--ink);
  font: 400 calc(1.22rem * var(--scale))/1.65 var(--serif);
}
.prayer-content p, .prayer-content li { font: inherit; }
.prayer-content p + p { margin-top: 0.85em; }
.prayer-content .rubric { color: var(--accent); }
.prayer-content .prayer-verse { color: var(--ink); }
.prayer-content a { color: var(--teal); text-decoration: underline; }
.prayer-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.invitatory-picker {
  display: block;
  max-width: 21rem;
  margin-block: .45rem .2rem;
  color: var(--ink);
  font: 600 .875rem/1.3 "Outfit", system-ui, sans-serif;
}
.invitatory-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--mint);
}
:root[data-theme="dark"] .invitatory-options { background: #0b3b45; }
.invitatory-options label {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 40px;
  border-radius: inherit;
  white-space: nowrap;
  cursor: pointer;
}
.invitatory-options input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.invitatory-options label:has(:checked) { background-color: var(--coral); color: #222c2d; }
.invitatory-options label:has(:focus-visible) { outline: 2px solid var(--teal); outline-offset: -2px; }
.invitatory-options label:has(:disabled) { opacity: .6; cursor: default; }
.invitatory-status:not(:empty) { display: block; color: var(--muted); font-weight: 500; }
.invitatory-slot, .invitatory-title, .invitatory-strophe, .invitatory-antiphon { display: block; }
.invitatory-title, .invitatory-antiphon { color: var(--accent); }
.invitatory-antiphon { font-style: italic; }
.invitatory-strophe { color: var(--ink); margin-block: .5em; }

.calendar-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 18px; }
.calendar-page .date-label { display: none; }
.calendar-layout .calendar-card { max-width: none; }
.calendar-detail { min-width: 0; padding: 23px; border: 1px solid var(--line); border-radius: 20px; background: var(--mint); }
.calendar-edition { color: var(--teal); font-size: .88rem; font-weight: 700; }
.calendar-detail time { display: block; margin-block: 9px 10px; color: var(--muted); }
.calendar-detail h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.06; overflow-wrap: anywhere; }
#calendar-status { margin-top: 9px; color: var(--muted); }
.calendar-facts { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 14px 0 0; }
.calendar-facts li { border: 1px solid var(--line); background: var(--paper); border-radius: 99px; padding: 4px 9px; font-size: .88rem; }
.calendar-optionals { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 10px; }
.calendar-optionals h3 { font-size: .94rem; }
.calendar-optionals ul { padding-left: 20px; margin: 4px 0 0; }
.calendar-detail .calendar-actions { margin-top: 20px; gap: 7px; }
.calendar-detail .calendar-actions .button { font-size: .92rem; }
.calendar-credit { margin-top: 12px; font-size: .88rem; color: var(--muted); }
.calendar-credit a { color: var(--teal); text-decoration: underline; }
[data-liturgical-color="GREEN"] { --liturgical-dot: #438952; }
[data-liturgical-color="WHITE"] { --liturgical-dot: #fffaf0; }
[data-liturgical-color="RED"] { --liturgical-dot: #ce5250; }
[data-liturgical-color="PURPLE"] { --liturgical-dot: #8963bc; }
[data-liturgical-color="ROSE"] { --liturgical-dot: #d66e95; }
[data-liturgical-color="BLACK"] { --liturgical-dot: #24232a; }
.month-grid button { position: relative; }
.month-grid button[data-liturgical-color]:not([data-liturgical-color=""])::after,
.calendar-facts li[data-liturgical-color]::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--liturgical-dot);
  border: 1px solid #879c9a;
}
.month-grid button[data-liturgical-color]:not([data-liturgical-color=""])::after {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
}
.calendar-facts li[data-liturgical-color]::before { margin-right: 5px; }
@media (max-width: 740px) {
  .calendar-layout { grid-template-columns: minmax(0, 1fr); }
  .calendar-detail { padding: 18px; }
}

#gospel { background: var(--paper); overflow: hidden; }
#gospel[open] { display: flex; flex-direction: column; }
#gospel .dialog-head { flex: none; align-items: start; border: 0; padding: 16px clamp(16px, 5vw, 38px) 8px; }
#gospel .dialog-head h2 { font-size: clamp(1.85rem, 4.5vw, 2.6rem); line-height: 1.1; }
#gospel .dialog-body { min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 0 clamp(16px, 5vw, 38px) 26px; }
#gospel .gospel-celebration { margin-top: 4px; color: var(--muted); font-size: .92rem; }

#gospel .gospel-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; margin-block: 2px 10px; }
#gospel .date-controls { margin: 0; gap: 4px; }
#gospel .date-controls input[type="date"]:is(:focus-within, :active) {
  border-color: transparent;
  outline: 2px solid var(--teal);
  outline-offset: -2px;
}
#gospel .date-label { flex: 0 1 auto; margin: 0 0 0 3px; text-transform: capitalize; }
#gospel .size-controls { color: var(--muted); font-size: .9rem; gap: 4px; }
#gospel .size-controls .icon-button { width: 37px; height: 40px; }
#gospel .size-controls output { min-width: 3ch; }

#gospel .gospel-options {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 3px;
  margin-bottom: clamp(16px, 3vw, 24px);
  border-radius: 22px;
  background: var(--mint);
}
:root[data-theme="dark"] #gospel .gospel-options { background: #0b3b45; }
#gospel .gospel-options button {
  flex: 1 1 0;
  min-width: 0;
  min-height: 40px;
  padding: 4px 3px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.15;
}
#gospel .gospel-options button[aria-pressed="true"] { background: var(--coral); color: #222c2d; }
#gospel .gospel-options button:hover:not([aria-pressed="true"]) { color: var(--teal); }
#gospel .gospel-tab-short { display: none; }

#gospel .gospel-passage { max-width: 57ch; margin-inline: auto; }
#gospel .gospel-passage + .gospel-passage { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 18px; }
#gospel .gospel-passage h3 { margin-bottom: 4px; font-size: calc(1rem * var(--scale)); color: var(--teal); }
#gospel .gospel-citations { margin: 0 0 15px; padding: 0; list-style: none; color: var(--teal); font-size: calc(1rem * var(--scale)); font-weight: 600; }
#gospel .gospel-passage p:not(.gospel-credit) { font: 400 calc(1.22rem * var(--scale))/1.7 var(--serif); overflow-wrap: break-word; }
#gospel .gospel-passage p + p { margin-top: .85em; }
#gospel .gospel-psalm .gospel-refrain {
  display: inline-block;
  margin-block: .25em;
  color: var(--teal);
}
#gospel .gospel-passage sup { margin-right: .2em; }
#gospel .gospel-credit, #gospel-status { color: var(--muted); }

#gospel .gospel-attribution { margin-top: 26px; padding-top: 13px; border-top: 1px solid var(--line); }
#gospel .gospel-attribution :is(h3, summary, .gospel-credit, a) { font-size: .875rem; }
#gospel .gospel-attribution h3 { margin: 0 0 4px; font-weight: 600; }
#gospel .gospel-attribution .gospel-credit { line-height: 1.55; }
#gospel .gospel-attribution summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 9px;
  min-height: 44px;
  padding-block: 8px;
  color: var(--teal);
  cursor: pointer;
  list-style: none;
}
#gospel .gospel-attribution summary::-webkit-details-marker { display: none; }
#gospel .gospel-attribution summary::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
#gospel .gospel-attribution details[open] summary::after { transform: translateY(2px) rotate(225deg); }
#gospel #gospel-publisher { padding-inline-end: 9px; border-inline-end: 1px solid var(--line); }
#gospel .gospel-source-content { padding-bottom: 8px; }
#gospel #gospel-visible-credits { margin-top: 4px; }
#gospel #gospel-visible-credits p + p { margin-top: 6px; }
#gospel .gospel-attribution a { display: inline-block; margin-top: 4px; padding-block: 5px; color: var(--teal); text-decoration: underline; text-underline-offset: .16em; }

@media (max-width: 480px) {
  #gospel { width: calc(100% - 8px); max-width: none; height: calc(100dvh - 12px); max-height: calc(100dvh - 12px); margin: auto; border-radius: 14px; }
  #gospel .dialog-head { padding: 10px 10px 6px 13px; }
  #gospel .dialog-body { padding: 0 12px max(16px, env(safe-area-inset-bottom)); }
  #gospel .gospel-toolbar {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto 44px;
    gap: 7px 8px;
    margin-block: 4px 12px;
  }
  #gospel .date-controls { display: contents; }
  #gospel [data-day="-1"] { grid-area: 1 / 1; }
  #gospel .date-controls input {
    grid-area: 1 / 2 / 2 / 4;
    width: 100%;
    min-width: 0;
    padding-inline: 10px;
    font-size: .95rem;
  }
  #gospel [data-day="1"] { grid-area: 1 / 4; }
  #gospel [data-reset-date] { grid-area: 2 / 1; padding-inline: 5px; }
  #gospel .date-label { grid-area: 2 / 2; margin: 0; }
  #gospel .size-controls { grid-area: 2 / 3 / 3 / 5; justify-self: end; }
  #gospel .size-controls .icon-button { width: 34px; height: 38px; }
  #gospel .gospel-options button { font-size: .78rem; min-height: 44px; }
  #gospel .gospel-options .gospel-tab-other { flex-basis: 100%; }
  #gospel .gospel-tab-full { display: none; }
  #gospel .gospel-tab-short { display: inline; }
}


.header .brand, .header .brand img { width: 128px; }
@media (min-width: 781px) {
  .header-inner { grid-template-columns: minmax(225px, 1fr) auto minmax(44px, 1fr); }
}
@media (min-width: 781px) and (max-width: 950px) {
  .header nav { gap: 16px; }
  .header-inner { gap: 12px; }
}
@media (max-width: 580px) {
  .header .brand, .header .brand img { width: clamp(79px, 24.2vw, 110px); }
}


@media (hover: hover) {
  #home-prayer:hover, .card:hover, #home-hours .hour-tile:hover {
    box-shadow: 0 3px 10px rgb(0 0 0 / 10%);
  }
}

@media (prefers-reduced-motion: no-preference) {
  body, .header, .quick, .hours-section, .header nav a, .header-actions button, #home .button, .card, #home-hours .hour-tile, .today-badge {
    transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
  }
}

@media (min-width: 581px) and (max-width: 950px) {
  #home-prayer { padding-inline: 13px; }
}


#liturgy .date-label { text-transform: capitalize; }
#liturgy .reading-head { gap: 8px 12px; padding-block: 14px; }
#liturgy .size-controls { gap: 4px; }
#liturgy .size-controls .icon-button { width: 36px; min-height: 40px; }
#liturgy .size-controls output { min-width: 3ch; }
#liturgy .prayer-content { margin-top: 0; padding-top: 10px; border-top: 0; line-height: 1.53; }
#liturgy .prayer-content p + p { margin-top: .65em; }
#liturgy .prayer-content .rubric { font-size: .9em; }
#liturgy .prayer-content .rubric .rubric { font-size: inherit; }
#liturgy .prayer-content .rubric .prayer-verse { font-size: calc(1.22rem * var(--scale)); }
#liturgy .prayer-content .liturgical-gap { display: block; block-size: .27em; }
#liturgy .prayer-content br + br + .liturgical-gap { block-size: 0; }

@media (max-width: 580px) {
  #liturgy { padding-top: 23px; }
  #liturgy .eyebrow { margin-bottom: 9px; }
  #liturgy h1 { font-size: clamp(2.3rem, 8vw, 3.1rem); }
  #liturgy .date-controls { margin-block: 11px; gap: 4px; }
  #liturgy .date-controls input { min-width: 110px; padding-inline: 5px; }
  #liturgy .date-controls .button { padding-inline: 9px; }
  #liturgy .date-label { flex: 0 1 auto; margin: 0 0 0 3px; }
  #liturgy #reader-hours { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; margin-bottom: 11px; }
  #liturgy #reader-hours .hour-tile { min-height: 55px; gap: 4px; padding: 5px 3px; }
  #liturgy #reader-hours svg { width: 19px; height: 19px; }
  #liturgy .reading-head, #liturgy .reading-body { padding-inline: 12px; }
  #liturgy .reading-body { padding-top: 11px; }
}

#liturgy .prayer-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
#prayer-mode { min-height: 40px; padding: 5px 11px; font-size: .9rem; }

body[data-prayer-mode] { background: var(--paper); }
body[data-prayer-mode] > :is(.skip, .header, .footer),
body[data-prayer-mode] #liturgy > :is(.eyebrow, h1, .date-controls, #reader-hours) { display: none; }
body[data-prayer-mode] #liturgy { width: 100%; max-width: none; padding: 0; }
body[data-prayer-mode] #liturgy .reading { margin: 0; border: 0; border-radius: 0; overflow: visible; }
body[data-prayer-mode] #liturgy .reading-head {
  position: sticky;
  z-index: 2;
  top: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 6px;
  padding: max(6px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) 6px max(10px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
body[data-prayer-mode] #liturgy .prayer-tools { display: contents; }
body[data-prayer-mode] #hour-title { grid-column: 2; grid-row: 1; font-size: clamp(1.15rem, 3vw, 1.6rem); overflow-wrap: anywhere; }
body[data-prayer-mode] #prayer-mode { grid-column: 1; grid-row: 1; padding-inline: 6px; gap: 4px; }
body[data-prayer-mode] #prayer-mode svg { width: 15px; height: 15px; }
body[data-prayer-mode] #prayer-theme { width: 38px; height: 40px; }
body[data-prayer-mode] #liturgy .size-controls output { display: none; }
body[data-prayer-mode] #liturgy .reading-body {
  width: min(100%, 48rem);
  margin-inline: auto;
  padding: 14px max(14px, env(safe-area-inset-right)) max(26px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
}
body[data-prayer-mode] #liturgy .prayer-content { max-width: none; }
#prayer-context { font-size: .88rem; line-height: 1.4; color: var(--muted); }
#prayer-context time { display: none; }
body[data-prayer-mode] #prayer-context time { display: block; }
#psalter-week { font-size: inherit; }
#liturgy:has(#prayer-form option:checked:not([value=""])) #psalter-week { display: none; }
#prayer-context time::first-letter { text-transform: uppercase; }
#prayer-context span:not([hidden]), #psalter-week:not([hidden]) { display: block; }
#prayer-context span { font-weight: 600; }
#liturgy > #prayer-context { text-align: left; margin: 0 0 .75rem; }
#liturgy .date-controls:has(+ #prayer-context span:not([hidden])) .date-label { display: none; }

#prayer-resume {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 8px;
  margin-block: 6px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--mint);
  color: var(--ink);
}
#prayer-resume p { flex: 1 1 15ch; font: 500 .9rem/1.35 "Outfit", system-ui, sans-serif; }
#prayer-resume button {
  min-height: 36px;
  padding: 3px 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--teal);
  font-weight: 600;
  font-size: .875rem;
  text-decoration: underline;
  text-underline-offset: .15em;
}
#prayer-resume button[data-resume] { background: var(--paper); }

.home-rosary {
  --rosary-ink: #153e5b;
  --rosary-gold: #956733;
  --rosary-button-ink: #fffaf0;
  background: #fffaf0;
  color: var(--rosary-ink);
  border-block-start: 1px solid var(--line);
  padding-block: clamp(2.5rem, 6vw, 5rem);
}
:root[data-theme="dark"] .home-rosary {
  --rosary-ink: #b9ddf1;
  --rosary-gold: #e7bc79;
  --rosary-button-ink: #151d24;
  background: #202b34;
}
.home-rosary-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .8fr);
  align-items: center;
  gap: clamp(1.5rem, 5vw, 5rem);
}
.home-rosary h2 { font-size: clamp(2.8rem, 6vw, 5.1rem); }
.home-rosary h2 em,
.home-rosary .eyebrow { color: var(--rosary-gold); }
.home-rosary-copy > p:not(.eyebrow) { margin-block: 1rem; }
.home-rosary-mysteries { font-weight: 600; }
.home-rosary .button { background: var(--rosary-ink); color: var(--rosary-button-ink); }
.home-rosary .button:hover { text-decoration: underline; }
.home-rosary img {
  display: block;
  width: min(100%, 290px);
  height: auto;
  justify-self: center;
  border-radius: 1.25rem;
}
@media (min-width: 581px) and (max-width: 1050px) {
  .quick-grid a { gap: 8px; padding-inline: 8px; }
}
@media (max-width: 580px) {
  .home-rosary-layout { grid-template-columns: minmax(0, 1fr); }
}

:root { --jess-theme-revision: tema-4; }
