:root {
  color-scheme: light;
  --paper: #f8f0e2;
  --paper-strong: #fffaf0;
  --ink: #221f1a;
  --muted: #6c6257;
  --line: rgba(62, 48, 33, 0.18);
  --gold: #9b7738;
  --gold-light: #c8a56a;
  --deep: #162b2d;
  --frame: #161513;
  --shadow: 0 22px 70px rgba(36, 28, 19, 0.22);
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[data-theme="dark"] {
  color-scheme: dark;
  --paper: #302923;
  --paper-strong: #40362d;
  --ink: #fff4df;
  --muted: #d8c6ae;
  --line: rgba(212, 163, 96, 0.28);
  --gold: #c99b5d;
  --gold-light: #edc788;
  --deep: #1b2425;
  --frame: #a76f3e;
  --shadow: 0 22px 70px rgba(16, 10, 6, 0.58);
}

* { box-sizing: border-box; }

html { min-height: 100%; background: #cfc8bd; }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  background:
    radial-gradient(circle at 50% 0%, rgba(255,255,255,.82), transparent 36rem),
    #d7d0c5;
}
[data-theme="dark"] body { background: radial-gradient(circle at 50% 0%, rgba(183, 126, 69, .18), transparent 34rem), #1d1713; }

button, select, a { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible, select:focus-visible {
  outline: 3px solid var(--gold-light);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 100;
  padding: .75rem 1rem;
  color: #fff;
  background: #17130f;
  border-radius: 999px;
}
.skip-link:focus { top: 1rem; }

.site-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(100%, 450px);
  min-height: 100svh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--paper);
  box-shadow: var(--shadow);
  isolation: isolate;
}

.site-shell::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .045;
  z-index: 20;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
}

.topbar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.5rem;
  padding: max(1rem, env(safe-area-inset-top)) 1.25rem .75rem;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
}
.brand-mark { color: var(--gold); font-size: 1.05rem; }
.top-actions { display: flex; gap: .35rem; }

.icon-button, .back-button {
  display: inline-grid;
  place-items: center;
  width: 2.65rem;
  height: 2.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: color-mix(in srgb, var(--paper-strong) 72%, transparent);
  cursor: pointer;
}

main { display: flex; flex: 1; min-height: 0; }

.home-view, .finish-view {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 100%;
  min-height: calc(100svh - 4.5rem);
  padding: clamp(1.4rem, 6vw, 2.25rem) 1.25rem max(1.5rem, env(safe-area-inset-bottom));
}

.home-view::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 34% 0 -2px;
  background: linear-gradient(to bottom, var(--paper) 0%, transparent 26%), url('../images/our-lady-v2.webp') center -8.75rem / cover no-repeat;
  filter: saturate(.83) contrast(.94);
}
.home-view::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 48% 0 0;
  background: linear-gradient(to bottom, transparent 35%, rgba(19, 24, 21, .18));
}

.home-copy { text-align: center; }
.eyebrow, .card-kicker {
  margin: 0 0 .3rem;
  color: var(--gold);
  font-size: .73rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}
h1, h2 { margin: 0; font-family: var(--serif); line-height: 1; font-weight: 600; }
h1 { font-size: clamp(2.7rem, 12vw, 4rem); }
h2 { font-size: clamp(1.65rem, 8vw, 2.35rem); }
.intro { max-width: 21rem; margin: .85rem auto 1.5rem; color: var(--muted); line-height: 1.55; }

.today-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem 1rem;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 1rem;
  background: rgba(255, 250, 240, .9);
  color: #241f1a;
  box-shadow: 0 10px 35px rgba(71, 52, 31, .14);
  backdrop-filter: blur(12px);
}
.today-card h2 { font-size: clamp(1.6rem, 7vw, 1.85rem); }
.today-card .eyebrow { margin-bottom: .55rem; }

.home-controls { margin-top: auto; margin-bottom: 2.65rem; display: grid; gap: .55rem; }
.home-controls .text-button {
  justify-self: center;
  min-height: 2.25rem;
  padding: .25rem .5rem;
  color: rgba(255, 255, 255, .94);
  background: transparent;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, .5);
  text-underline-offset: .22rem;
  text-shadow: 0 1px 8px rgba(0,0,0,.62);
}
.primary-button, .secondary-button, .text-button, .link-button {
  min-height: 3.25rem;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
}
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 1.25rem;
  border: 1px solid var(--gold-light);
  color: #fffdf6;
  background: linear-gradient(135deg, #b19359, #8d6b33);
  box-shadow: 0 10px 22px rgba(89, 63, 25, .22);
  font-weight: 600;
}
.primary-button.compact { min-height: 2.85rem; padding: .7rem 1rem; }
.secondary-button { padding: .7rem 1rem; border: 1px solid var(--line); color: var(--ink); background: transparent; }
.text-button, .link-button { min-height: 2.6rem; padding: .45rem; border: 0; color: var(--ink); background: transparent; }
.link-button { color: var(--gold); text-decoration: underline; text-underline-offset: .2rem; }
.privacy-note { display: flex; align-items: center; justify-content: center; gap: .32rem; margin: 0; color: rgba(255, 255, 255, .92); font-size: clamp(.61rem, 2.45vw, .72rem); line-height: 1.2; white-space: nowrap; text-align: center; text-shadow: 0 1px 8px rgba(0,0,0,.62); }
.privacy-note svg { flex: 0 0 auto; width: .78rem; height: .78rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.prayer-view {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 100%;
  height: 100svh;
  min-height: 100svh;
  max-height: 100svh;
  margin-top: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 105%, rgba(90, 58, 26, .22) 0 2%, transparent 2.4%),
    radial-gradient(ellipse at 42% 107%, rgba(90, 58, 26, .18) 0 2.4%, transparent 2.8%),
    radial-gradient(ellipse at 58% 108%, rgba(90, 58, 26, .16) 0 2.2%, transparent 2.7%),
    linear-gradient(150deg, rgba(255,255,255,.56), transparent 42%),
    var(--paper);
}
[data-theme="dark"] .prayer-view {
  background:
    radial-gradient(ellipse at 50% 105%, rgba(205, 164, 100, .13) 0 2%, transparent 2.4%),
    radial-gradient(ellipse at 42% 107%, rgba(205, 164, 100, .1) 0 2.4%, transparent 2.8%),
    radial-gradient(ellipse at 58% 108%, rgba(205, 164, 100, .08) 0 2.2%, transparent 2.7%),
    var(--paper);
}
.rosary-progress {
  display: grid;
  place-items: center;
  width: 100%;
  height: 7.35rem;
  margin: 0;
  color: var(--gold);
  opacity: .94;
}
.rosary-progress svg { display: block; width: min(9.5rem, 45vw); height: 7.35rem; overflow: visible; }
.rosary-thread { fill: none; stroke: currentColor; stroke-width: 1; opacity: .55; }
.rosary-bead { fill: var(--paper); stroke: currentColor; stroke-width: 1; opacity: .74; transition: fill 220ms ease, opacity 220ms ease, transform 220ms ease; transform-box: fill-box; transform-origin: center; }
.rosary-bead.decade { stroke-width: 1.15; }
.rosary-bead.filled { fill: currentColor; opacity: .92; }
.rosary-bead.current { fill: var(--gold-light); stroke: var(--ink); opacity: 1; transform: scale(1.35); }
.rosary-medal { fill: var(--paper); stroke: currentColor; stroke-width: 1.1; opacity: .75; }
.rosary-medal.filled { fill: color-mix(in srgb, currentColor 24%, var(--paper)); }
.rosary-medal.current { fill: var(--gold-light); stroke: var(--ink); stroke-width: 1.7; opacity: 1; }
.rosary-cross { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; opacity: .72; }
.rosary-cross.current { stroke: var(--gold-light); stroke-width: 4; opacity: 1; filter: drop-shadow(0 0 2px rgba(82, 57, 24, .32)); }
.rosary-place { width: min(22rem, calc(100% - 7.5rem)); min-height: .95rem; margin: .05rem auto 0; color: var(--muted); font-size: .7rem; line-height: 1.3; text-wrap: balance; }
.story-meta { display: grid; grid-template-columns: 2.65rem 1fr 2.65rem; align-items: center; gap: .75rem; padding: max(1rem, env(safe-area-inset-top)) 1rem 0; }
.back-button svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.story-meta > div { text-align: center; }
.story-meta span, .story-meta strong { display: block; }
.story-meta span { color: var(--muted); font-size: .72rem; }
.story-stage { position: relative; display: flex; flex: 1; min-height: 0; overflow: hidden; touch-action: pan-y; }
.story-stage::-webkit-scrollbar { display: none; }
.tap-zone { position: absolute; z-index: 3; top: 0; bottom: 0; width: 25%; border: 0; background: transparent; cursor: pointer; }
.tap-zone-left { left: 0; }
.tap-zone-right { right: 0; }
.prayer-card {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  flex: 1;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: 39rem;
  margin: 0 auto;
  padding: 0 1.25rem max(.65rem, env(safe-area-inset-bottom));
  text-align: center;
  transition: opacity 120ms ease-out;
}
.prayer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-height: 0;
  padding: clamp(3.5rem, 11vh, 5.5rem) 0 1.1rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.prayer-content::-webkit-scrollbar { display: none; }
.rosary-dock {
  display: grid;
  place-items: center;
  align-content: end;
  width: 100%;
  min-height: 9.65rem;
  background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--paper) 94%, transparent) 18%);
}
.prayer-card.is-changing { opacity: 0; }
.prayer-card h2 { max-width: 100%; font-size: clamp(2.1rem, 10vw, 3.35rem); overflow-wrap: normal; word-break: normal; hyphens: none; }
.prayer-card[data-kind="mystery"] h2 {
  width: min(20rem, 100%);
  max-width: 100%;
  font-size: clamp(1.75rem, 7.1vw, 2.1rem);
  line-height: 1.04;
  text-wrap: balance;
}
.scripture-ref { margin: .65rem 0 0; color: var(--gold); font-family: var(--serif); font-size: 1.15rem; font-style: italic; }
.prayer-subtitle {
  width: min(22rem, calc(100% - 5.75rem));
  margin: .7rem 0 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: clamp(1rem, 4.2vw, 1.16rem);
  font-style: italic;
  line-height: 1.35;
  text-wrap: balance;
}
.prayer-text { width: min(32rem, calc(100% - 5.75rem)); margin-top: 1.25rem; font-family: var(--serif); font-size: clamp(1.15rem, 4.8vw, 1.48rem); line-height: 1.4; overflow-wrap: break-word; }
.prayer-text p { margin: 0; }
.prayer-card[data-kind="mystery"] .prayer-text { max-width: 20rem; font-size: clamp(1.15rem, 4.8vw, 1.48rem); font-style: italic; }
.prayer-card[data-kind="mystery"] .prayer-text p { display: inline; }
.inline-reference { margin-left: .28rem; color: var(--gold); font-family: var(--serif); font-size: .72em; font-style: italic; white-space: nowrap; }
.prayer-card[data-prayer-id="offering"] h2,
.prayer-card[data-prayer-id="thanksgiving"] h2 {
  max-width: 20rem;
  font-size: clamp(2rem, 8.3vw, 2.8rem);
  line-height: 1.04;
  text-wrap: balance;
}
.prayer-card[data-prayer-id="offering"] .prayer-text,
.prayer-card[data-prayer-id="creed"] .prayer-text,
.prayer-card[data-prayer-id="hailHolyQueen"] .prayer-text,
.prayer-card[data-prayer-id="thanksgiving"] .prayer-text {
  font-size: clamp(1.05rem, 4.5vw, 1.35rem);
  line-height: 1.45;
}
.prayer-card[data-prayer-id="creed"] .prayer-content { padding-top: clamp(2.35rem, 7vh, 3.8rem); }
.prayer-card[data-prayer-id="creed"] h2 { font-size: clamp(1.9rem, 7vw, 2.35rem); }
.prayer-card[data-prayer-id="creed"] .prayer-text {
  margin-top: .85rem;
  font-size: clamp(1.08rem, 4.2vw, 1.22rem);
  line-height: 1.36;
}
.prayer-card[data-prayer-id="ourFather"] .prayer-content { padding-top: clamp(3rem, 9vh, 4.7rem); }
.prayer-card[data-prayer-id="ourFather"] h2 { font-size: clamp(1.9rem, 7.5vw, 2.45rem); }
.prayer-card[data-prayer-id="ourFather"] .prayer-text {
  margin-top: .85rem;
  font-size: clamp(1.08rem, 4.45vw, 1.34rem);
  line-height: 1.32;
}
.prayer-card[data-rosary-part="opening-hail-mary"] .prayer-content { padding-top: clamp(3rem, 9vh, 4.7rem); }
.prayer-card[data-rosary-part="opening-hail-mary"] h2 { font-size: clamp(2.15rem, 9vw, 3rem); }
.prayer-card[data-rosary-part="opening-hail-mary"] .prayer-text { margin-top: 1.6rem; }
.prayer-card[data-prayer-id="thanksgiving"] .prayer-content {
  justify-content: center;
  padding-top: .75rem;
  padding-bottom: .75rem;
}
.prayer-card[data-prayer-id="thanksgiving"] .prayer-text { max-width: 22rem; }
.prayer-card[data-prayer-id="hailHolyQueen"] .prayer-content { padding-top: 1rem; }
.prayer-card[data-prayer-id="hailHolyQueen"] h2 { font-size: clamp(1.9rem, 7.5vw, 2.4rem); }
.prayer-card[data-prayer-id="hailHolyQueen"] .prayer-text {
  width: min(32rem, calc(100% - 4.5rem));
  margin-top: .7rem;
  font-size: clamp(1rem, 4.15vw, 1.22rem);
  line-height: 1.3;
}
.prayer-card[data-prayer-id="hailHolyQueen"] .rosary-dock { min-height: 8.5rem; }
.prayer-card[data-prayer-id="hailHolyQueen"] .rosary-progress,
.prayer-card[data-prayer-id="hailHolyQueen"] .rosary-progress svg { height: 6.2rem; }
.prayer-card[data-kind="prayer"] h2 {
  width: min(20rem, 100%);
  max-width: 100%;
  font-size: clamp(1.75rem, 7.1vw, 2.1rem);
  line-height: 1.04;
  text-wrap: balance;
}

@media (max-height: 760px) {
  .prayer-card[data-prayer-id="ourFather"] .prayer-content { padding-top: 1rem; }
  .prayer-card[data-prayer-id="ourFather"] h2 { font-size: clamp(1.85rem, 8vw, 2.35rem); }
  .prayer-card[data-prayer-id="ourFather"] .prayer-text {
    margin-top: .75rem;
    font-size: clamp(1.02rem, 4.15vw, 1.26rem);
    line-height: 1.3;
  }
  .prayer-card[data-prayer-id="ourFather"] .rosary-dock { min-height: 8.7rem; }
  .prayer-card[data-prayer-id="ourFather"] .rosary-progress,
  .prayer-card[data-prayer-id="ourFather"] .rosary-progress svg { height: 6.55rem; }
}

@media (max-height: 620px) {
  .prayer-card[data-prayer-id="ourFather"] .prayer-content { padding-top: .4rem; }
  .prayer-card[data-prayer-id="ourFather"] .prayer-text { margin-top: .4rem; }
  .prayer-card[data-prayer-id="ourFather"] .rosary-dock { min-height: 7.75rem; }
  .prayer-card[data-prayer-id="ourFather"] .rosary-progress,
  .prayer-card[data-prayer-id="ourFather"] .rosary-progress svg { height: 5.7rem; }

  .prayer-card[data-prayer-id="hailMary"] .prayer-content { padding-top: .4rem; }
  .prayer-card[data-prayer-id="hailMary"] h2 { font-size: 1.9rem; }
  .prayer-card[data-prayer-id="hailMary"] .prayer-text {
    width: min(32rem, calc(100% - 4.5rem));
    margin-top: .45rem;
    font-size: 1rem;
    line-height: 1.24;
  }
  .prayer-card[data-prayer-id="hailMary"] .rosary-dock { min-height: 7.25rem; }
  .prayer-card[data-prayer-id="hailMary"] .rosary-progress,
  .prayer-card[data-prayer-id="hailMary"] .rosary-progress svg { height: 5.25rem; }

  .prayer-card[data-prayer-id="hailHolyQueen"] .prayer-content { padding-top: 0; }
  .prayer-card[data-prayer-id="hailHolyQueen"] h2 { font-size: 1.65rem; }
  .prayer-card[data-prayer-id="hailHolyQueen"] .prayer-text {
    width: min(32rem, calc(100% - 3.75rem));
    margin-top: .15rem;
    font-size: 1rem;
    line-height: 1.2;
  }
  .prayer-card[data-prayer-id="hailHolyQueen"] .rosary-dock { min-height: 6.25rem; }
  .prayer-card[data-prayer-id="hailHolyQueen"] .rosary-progress,
  .prayer-card[data-prayer-id="hailHolyQueen"] .rosary-progress svg { height: 4.4rem; }
}
.prayer-card[data-step-index="0"] { grid-template-rows: auto minmax(0, 1fr); }
.prayer-card[data-step-index="0"] .prayer-content { padding-bottom: 0; }
.prayer-card[data-step-index="0"] .rosary-dock {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 0;
  padding-top: .8rem;
}
.prayer-card[data-step-index="0"] .gesture-hint { margin-top: auto; }
.gesture-hint { min-height: .9rem; margin: .15rem 0 0; color: var(--muted); font-size: .72rem; opacity: 0; transition: opacity 180ms ease; }
.gesture-hint.is-visible { opacity: 1; }
.story-actions {
  position: fixed;
  z-index: 4;
  top: 50%;
  right: max(1rem, calc(50% - 225px + 1rem));
  left: max(1rem, calc(50% - 225px + 1rem));
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  pointer-events: none;
}
.carousel-arrow {
  display: grid;
  place-items: center;
  width: 2.65rem;
  height: 2.65rem;
  border: 1px solid color-mix(in srgb, var(--gold) 46%, var(--line));
  border-radius: 50%;
  color: var(--ink);
  background: color-mix(in srgb, var(--paper-strong) 92%, transparent);
  box-shadow: 0 4px 12px rgba(63, 47, 29, .1);
  opacity: .78;
  cursor: pointer;
  pointer-events: auto;
}
.carousel-arrow:hover, .carousel-arrow:focus-visible { opacity: 1; }
.carousel-arrow:disabled { opacity: .26; cursor: default; }

.finish-view {
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    linear-gradient(165deg, rgba(55, 76, 91, .72), rgba(88, 70, 55, .88)),
    url('../images/contemplative-bg.webp') center / cover no-repeat;
  color: #fff8e9;
}
.finish-icon { display: grid; place-items: center; width: 4rem; height: 4rem; margin-bottom: 1rem; border: 1px solid rgba(255,255,255,.4); border-radius: 50%; color: #e0bd77; font-size: 1.6rem; }
.finish-view h1 { max-width: 24rem; font-size: clamp(2.6rem, 12vw, 4rem); }
.finish-lead { max-width: 25rem; line-height: 1.55; color: rgba(255, 248, 233, .78); }
.charity-card { width: 100%; margin: 1rem 0; padding: 1.2rem; border: 1px solid rgba(255,255,255,.24); border-radius: 1.15rem; background: rgba(57, 47, 41, .3); backdrop-filter: blur(15px); }
.charity-card h2 { font-size: 1.7rem; }
.charity-card p { color: rgba(255, 248, 233, .78); line-height: 1.5; }
.charity-card .mass-note { margin-bottom: 0; color: rgba(255, 248, 233, .9); }
.project-links { display: grid; justify-items: center; gap: .05rem; margin-top: 1.25rem; }
.project-links .text-button { color: #fff8e9; }
.project-links .link-button { color: #e2c486; }
.donation-select { width: 100%; margin: 1rem 0; padding: .8rem; border: 1px solid rgba(255,255,255,.22); border-radius: .75rem; color: #fff8e9; background: #26312f; }
.pix-code { max-height: 7.5rem; overflow: auto; padding: .7rem; border-radius: .65rem; word-break: break-all; color: #211d17; background: #fff8e9; font-size: .72rem; text-align: left; }
.qr-container { width: min(14rem, 78%); margin: 1rem auto; padding: .75rem; border-radius: .85rem; background: #fff; }
.qr-container svg { display: block; width: 100%; height: auto; }
.pix-actions { display: grid; gap: .65rem; margin-top: .9rem; }
.direct-note { font-size: .72rem; }

.modal {
  width: min(calc(100% - 2rem), 430px);
  max-height: min(84svh, 48rem);
  margin: auto;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 1.35rem;
  color: var(--ink);
  background: var(--paper-strong);
  box-shadow: var(--shadow);
}
.modal::backdrop { background: rgba(17, 15, 12, .62); backdrop-filter: blur(4px); }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.dialog-head h2 { font-size: 2rem; }
.modal > p { color: var(--muted); line-height: 1.55; }
.choice-list { display: grid; gap: .65rem; }
.choice-button { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: 100%; padding: 1rem; border: 1px solid var(--line); border-radius: .9rem; color: var(--ink); background: var(--paper); text-align: left; cursor: pointer; }
.choice-button strong, .choice-button span { display: block; }
.choice-button span { margin-top: .2rem; color: var(--muted); font-size: .75rem; }
.source-list { display: grid; gap: .85rem; padding: 0; list-style: none; }
.source-list a { color: var(--ink); font-weight: 600; text-underline-offset: .2rem; }
.source-list small { display: block; margin-top: .25rem; color: var(--muted); line-height: 1.4; }
.acknowledgements { margin-top: 1.4rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.acknowledgements h3 { margin-top: .15rem; font-family: var(--serif); font-size: 1.45rem; }
.acknowledgements > p:not(.eyebrow) { margin-top: .55rem; color: var(--muted); line-height: 1.5; }
.acknowledgement-list { display: grid; gap: .7rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.acknowledgement-list strong, .acknowledgement-list small { display: block; }
.acknowledgement-list small { margin-top: .12rem; color: var(--muted); font-size: .82rem; }
.dialog-actions { display: grid; grid-template-columns: 1fr; gap: .75rem; margin-top: 1.2rem; }
.dialog-actions .primary-button { width: 100%; justify-content: center; }

/* Mantém todos os títulos de oração ancorados na mesma linha visual. */
.prayer-card[data-kind="prayer"] .prayer-content {
  justify-content: flex-start;
  padding-top: 4.7rem;
}

@media (max-height: 820px) {
  .prayer-card[data-kind="prayer"] .prayer-content { padding-top: 2rem; }
  .prayer-card[data-kind="prayer"] .rosary-dock { min-height: 8rem; }
  .prayer-card[data-kind="prayer"] .rosary-progress,
  .prayer-card[data-kind="prayer"] .rosary-progress svg { height: 6rem; }
  .prayer-card[data-prayer-id="offering"] .prayer-text,
  .prayer-card[data-prayer-id="creed"] .prayer-text {
    margin-top: .65rem;
    font-size: 1.08rem;
    line-height: 1.3;
  }
}

@media (max-height: 620px) {
  .prayer-card[data-kind="prayer"] .prayer-content { padding-top: .35rem; }
}

[hidden] { display: none !important; }
noscript { display: block; padding: 1rem; background: #fff3cd; color: #443913; text-align: center; }

@media (min-width: 700px) {
  body { padding: 2rem 0; }
  .site-shell {
    height: calc(100svh - 4rem);
    min-height: 0;
    max-height: calc(100svh - 4rem);
    border: 5px solid var(--frame);
    border-radius: 2rem;
  }
  .home-view, .finish-view { min-height: 0; }
  .prayer-view { height: 100%; min-height: 0; max-height: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .001ms !important; animation-duration: .001ms !important; }
}

@media (forced-colors: active) {
  .today-card, .charity-card, .modal { border: 2px solid CanvasText; }
  .rosary-bead.filled, .rosary-medal.current { fill: CanvasText; }
}
