:root {
  color-scheme: light;
  --ink: #172c26;
  --muted: #52635a;
  --paper: #f8f6ef;
  font-family: system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; }
button, select { font: inherit; color: inherit; }
button, select { cursor: pointer; }
:focus-visible { outline: 3px solid #8c4b13; outline-offset: 4px; }
header { background: radial-gradient(ellipse at 80% 15%, #315246, transparent 65%), #172c26; color: #fcf8ea; }
.masthead, main, footer { width: min(100% - 2.5rem, 66rem); margin-inline: auto; }
.masthead { padding-block: 1.6rem clamp(2rem, 7vw, 4.5rem); }
.brand { display: flex; align-items: center; gap: .75rem; font-weight: 650; }
.brand img { border-radius: 50%; object-fit: cover; background: white; }
.masthead p { margin: 2.65rem 0 .7rem; color: #e8d7a8; font-size: .9rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 650; }
h1, h2 { font-family: Georgia, serif; }
h1 { margin: 0 0 1.35rem; font-size: clamp(3.3rem, 10vw, 7.2rem); line-height: .89; letter-spacing: -.065em; font-weight: normal; }
h1 em { color: #efd58d; }
.season { color: #dce5da; line-height: 1.6; }
main { padding-block: 2rem 3rem; }
.calendar-head { display: flex; align-items: center; justify-content: space-between; gap: .9rem; flex-wrap: wrap; }
.calendar-head h2 { margin: 0; font-size: clamp(1.8rem, 4.8vw, 2.65rem); font-weight: normal; }
select { appearance: none; background: #fffdf7; border: 1px solid #a8ae9d; border-radius: .45rem; padding: .65rem 2.4rem .65rem .8rem; }
.calendar-head label { position: relative; }
.calendar-head label::after { content: ''; position: absolute; right: 1rem; top: 42%; width: .45rem; height: .45rem; border-right: 2px solid; border-bottom: 2px solid; transform: rotate(45deg); pointer-events: none; }
#status { color: var(--muted); margin: .65rem 0 1.2rem; }
.dates { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .65rem; }
.day { display: flex; flex-direction: column; text-align: left; gap: .3rem; padding: .85rem; border: 1px solid #d1d5c7; border-radius: .55rem; min-height: 7rem; background: #fffdf7; }
.day:hover, .day[aria-current="date"] { background: #e5eee1; border-color: #537762; }
.day.complete { background: #e8efdf; }
.day small { font-size: .88rem; color: var(--muted); }
.day strong { font: 1.9rem/1 Georgia, serif; }
.day span { font-size: .92rem; }
footer { border-top: 1px solid #d1d5c7; padding-block: 1.2rem 2rem; color: var(--muted); font-size: .9rem; }
dialog { padding: 0; border: 0; color: inherit; background: transparent; width: min(45rem, calc(100% - 1.4rem)); max-width: none; max-height: none; overflow: visible; }
dialog::backdrop { background: #0f1d18ba; }
.note {
  --note: #dcead6;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  position: relative;
  background: var(--note);
  min-height: min(31rem, 85dvh);
  max-height: 90dvh;
  padding: clamp(1rem, 4vw, 2.4rem);
  border-radius: .2rem .2rem 2.2rem .2rem;
  box-shadow: 0 18px 65px #0006;
}
.note::after { content: ''; position: absolute; bottom: 0; right: 0; width: 2.2rem; height: 2.2rem; background: #0002; border-radius: 0 0 2.2rem 0; pointer-events: none; }
.note[data-step="1"] { --note: #ffeca9; }
.note[data-step="2"] { --note: #dce7fc; }
.note[data-step="3"] { --note: #f7d2cb; }
.note[data-step="4"] { --note: #e9ddf5; }
.note.animate { animation: show-card .27s ease-out both; }
@keyframes show-card { from { opacity: .45; transform: translateY(9px) rotate(-.7deg) scale(.985); } }
@media (prefers-reduced-motion: reduce) { .note.animate { animation: none; } }
.note-top, .note-actions { display: flex; align-items: center; justify-content: space-between; gap: .7rem; }
.note-top { padding-bottom: .65rem; border-bottom: 1px solid #172c2640; }
#card-date { font-size: .92rem; font-weight: 650; }
#card-step { font-size: .88rem; margin-top: .25rem; }
.card-scroll { overflow: auto; overscroll-behavior: contain; padding: 1.25rem .65rem .8rem .1rem; scrollbar-color: #587267 transparent; }
.card-label { font-weight: 750; letter-spacing: .12em; text-transform: uppercase; font-size: .88rem; }
#card-title { font-size: clamp(1.9rem, 5.5vw, 3.1rem); line-height: 1.05; margin: .45rem 0 1rem; }
#card-title:focus { outline: none; }
#card-content { font-family: Georgia, serif; font-size: clamp(1.18rem, 3.3vw, 1.45rem); line-height: 1.58; }
#card-content p { margin: .4rem 0 1rem; }
#card-content .translation { font: .88rem/1.5 system-ui, sans-serif; }
.translation a { color: inherit; }
.chapter-title { font: 650 1rem/1.4 system-ui, sans-serif; margin: 1.15rem 0 .3rem; }
.verse { display: block; padding-bottom: .3rem; }
.verse sup { font: 700 .75rem system-ui, sans-serif; margin-right: .48rem; color: #3f5c4d; }
.note-actions { justify-content: flex-end; padding-top: .9rem; border-top: 1px solid #172c2640; }
.quiet, .primary { border: 1px solid #172c2655; border-radius: .4rem; min-height: 2.7rem; padding: .5rem .85rem; font-weight: 650; }
.quiet { background: transparent; }
.primary { background: var(--ink); color: #fff; }
.quiet:hover { background: #172c2610; }
.primary:hover { background: #315246; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 700px) { .dates { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 420px) { .dates { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.app-settings {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .65rem 1rem;
  margin-bottom: 1.85rem;
  padding: .95rem 1.05rem;
  border: 1px solid #c5d2c4;
  border-radius: .55rem;
  background: #eaf1e6;
}
.app-settings h2 { margin: 0; font-size: 1.35rem; font-weight: normal; }
.app-settings p { margin: .35rem 0 0; color: var(--muted); line-height: 1.5; }
#push-status:empty { display: none; }
.card-error { color: #7a2924; font-size: .9rem; margin: 0 0 .5rem; }
.quiet:disabled, .primary:disabled { opacity: .65; cursor: wait; }

.reader-greeting { margin: 0 0 .4rem; font-size: 1.28rem; font-weight: 650; overflow-wrap: anywhere; }
.reader-preferences { flex-basis: 100%; border-top: 1px solid #c5d2c4; padding-top: .65rem; }
.reader-preferences summary { cursor: pointer; font-weight: 650; padding: .35rem 0; }
.reader-preferences form:not([hidden]) { display: flex; flex-wrap: wrap; align-items: end; gap: .65rem; margin-top: .55rem; }
.reader-preferences label { display: block; margin-bottom: .3rem; }
.reader-preferences input { font: inherit; color: inherit; padding: .55rem .65rem; border: 1px solid #a8ae9d; border-radius: .4rem; width: 100%; background: #fffdf7; }
#name-status { flex-basis: 100%; }
#name-status:empty { display: none; }
.registration-panel { max-width: 35rem; }
.registration-panel form label { display: block; margin: .8rem 0 .3rem; font-weight: 650; }
.registration-panel input { width: 100%; padding: .65rem; font: inherit; border: 1px solid #a8ae9d; border-radius: .4rem; }
.registration-panel .registration-note { color: var(--muted); }
.registration-entry { padding: 1rem 0; border-top: 1px solid #c5d2c4; }
.registration-entry h3, .registration-entry p { margin: .45rem 0; overflow-wrap: anywhere; }
.welcome-card { background: #fff9e4; padding: clamp(1rem,4vw,2.2rem); border-radius: .65rem; max-height: 90dvh; display: flex; flex-direction: column; gap: .55rem; box-shadow: 0 18px 65px #0006; }
.welcome-scroll { overflow: auto; padding-right: .35rem; }
.welcome-scroll h2 { margin: 0 0 .8rem; font-size: clamp(1.8rem,5vw,2.8rem); overflow-wrap: anywhere; }
.welcome-scroll p { font-size: 1.04rem; line-height: 1.55; }
#welcome-status { margin: 0; color: #7a2924; }
#welcome-status:empty { display: none; }
.language-choice {display:flex;align-items:center;gap:.65rem;flex-wrap:wrap;margin-bottom:1rem}
.language-choice select {font:inherit}
#card-content p {white-space:pre-line}
#card-content a {color:inherit}
