/* Skylark "Quiet Stone" theme: warm stone background, white cards, dusty blue
   accent, gold star; Spectral for titles and reading text, the system font for
   controls. Palette: Project Brain 05-branding.md. Sizes are in rem so
   everything follows the iPhone's Text Size setting (see -apple-system-body below). */

:root {
  --bg-top: #f1f0ec; --bg-bottom: #deddd9;
  --bg: var(--bg-top);
  --card: #ffffff;
  --read-bg: #ffffff;               /* behind psalms, prayers, and documents */
  --elevated: #ffffff;              /* action sheets, the selected segment */
  --ink: #22262b;
  --secondary: #616870;
  --tertiary: #a3a8af;              /* chevrons, placeholders, disabled */
  --separator: #e2e5e9;
  --fill: rgba(97, 104, 112, .1);
  --bar: rgba(241, 240, 236, .96);  /* tab bar and scrolled nav bar */
  --accent: #476fa1;
  --head: #616870;                  /* small section headers */
  --cat: #22262b;                   /* category titles on Today */
  --catch-bg: #dbe5ef; --catch-ink: #2a4560;
  --btn: #58729d; --btn-ink: #f8f9fa;
  --vnum: #727982;
  --danger: #b8433d;
  --green: #4f8a5b;
  --star: #e1a847; --star-bg: #fdf4dd;
  --shadow: 0 1px 2px rgba(30, 40, 55, .06), 0 4px 14px rgba(30, 40, 55, .05);
  --season-advent: #4a6a9c; --season-feast: #c9a24a; --season-green: #5e8a5a;
  --season-lent: #6d4c8a; --season-red: #a83a3a;
  --serif: "Spectral", Georgia, serif;
  --read-scale: 1;                  /* Settings → Appearance → Reading Text (per device) */
  --radius: 18px;
  --dawn-btn: #23395c; --dawn-btn-ink: #ffffff;  /* the setup wizard's browser steps */
  --tab-drop: 8px;   /* extra space above the tab bar icons */
  --tabbar: calc(49px + var(--tab-drop));
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-top: #343332; --bg-bottom: #141413; --card: #181716; --read-bg: #181716; --elevated: #272624;
    --ink: #d4dde8; --secondary: #a0a7b0; --tertiary: #6e747c; --separator: #30343a;
    --fill: rgba(160, 167, 176, .16); --bar: rgba(28, 27, 26, .96); --accent: #8ba5d0;
    --head: #8ba5d0; --cat: #839dbe; --catch-bg: #273849; --catch-ink: #b3c7df;
    --btn: #1d3758; --btn-ink: #b3c7df; --vnum: #9da5af; --danger: #c66762; --green: #5b8b63;
    --star-bg: #453c2b; --shadow: none;
    --dawn-btn: #1d3758; --dawn-btn-ink: #b3c7df;
    --season-advent: #7f9fd0; --season-feast: #d8b766; --season-green: #86b07f;
    --season-lent: #a387c4; --season-red: #d0716d;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg-top: #343332; --bg-bottom: #141413; --card: #181716; --read-bg: #181716; --elevated: #272624;
  --ink: #d4dde8; --secondary: #a0a7b0; --tertiary: #6e747c; --separator: #30343a;
  --fill: rgba(160, 167, 176, .16); --bar: rgba(28, 27, 26, .96); --accent: #8ba5d0;
  --head: #8ba5d0; --cat: #839dbe; --catch-bg: #273849; --catch-ink: #b3c7df;
  --btn: #1d3758; --btn-ink: #b3c7df; --vnum: #9da5af; --danger: #c66762; --green: #5b8b63;
  --star-bg: #453c2b; --shadow: none;
  --dawn-btn: #1d3758; --dawn-btn-ink: #b3c7df;
  --season-advent: #7f9fd0; --season-feast: #d8b766; --season-green: #86b07f;
  --season-lent: #a387c4; --season-red: #d0716d;
  color-scheme: dark;
}

html {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  -webkit-text-size-adjust: 100%;
}
@supports (font: -apple-system-body) {
  html { font: -apple-system-body; }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html { background: var(--bg-bottom); }
/* The stone gradient stays put while the page scrolls (a fixed layer, since
   iPhone Safari ignores background-attachment: fixed). */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background: linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}
body {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.3;
  letter-spacing: -.01em;
}
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }

/* ---------- Navigation bar ---------- */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  height: calc(44px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 8px 0;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  background: transparent;
  border-bottom: .5px solid transparent;
  transition: background .2s, border-color .2s;
}
.navbar.solid {
  background: var(--bar);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom-color: var(--separator);
}
.nav-title {
  font-weight: 600; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 44vw; transition: opacity .2s;
}
.navbar.large .nav-title { opacity: 0; }
.navbar.large.solid .nav-title { opacity: 1; }
.nav-side { display: flex; align-items: center; gap: 4px; min-width: 0; }
.nav-right { justify-content: flex-end; }
.nav-btn {
  color: var(--accent); padding: 8px; min-height: 44px; display: inline-flex; align-items: center; gap: 2px;
  white-space: nowrap;
}
.nav-btn.bold { font-weight: 600; }
.nav-btn:disabled { color: var(--tertiary); }
.nav-btn svg { width: 22px; height: 22px; }
.nav-btn .chev { width: 24px; height: 24px; margin: 0 -2px 0 -6px; }

/* ---------- Screen ---------- */
#screen {
  max-width: 700px; margin: 0 auto;
  padding: calc(44px + env(safe-area-inset-top)) 0 calc(var(--tabbar) + env(safe-area-inset-bottom) + 32px);
}
body.modal #screen { padding-bottom: calc(env(safe-area-inset-bottom) + 32px); }

.large-title { padding: 2px 16px 14px; display: flex; align-items: flex-end; gap: 12px; }
.large-title .lt-text { flex: 1; min-width: 0; }
.large-title.day-title h1 { white-space: nowrap; overflow: hidden; }  /* Today's day name only (shrinks to fit) */
.large-title h1 { font-family: var(--serif); font-size: 1.85rem; font-weight: 500; letter-spacing: 0; margin: 0; line-height: 1.15; }
.large-title .subtitle { color: var(--secondary); font-size: .882rem; margin-top: 2px; }
.day-nav { display: flex; gap: 8px; padding-bottom: 4px; }
.circle-btn {
  width: 36px; height: 36px; border-radius: 50%; background: var(--fill); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
}
.circle-btn svg { width: 18px; height: 18px; }
.cloud-btn svg { width: 20px; height: 20px; }
.cloud-btn[data-state="saved"], .cloud-btn[data-state="saving"] { color: var(--secondary); }
.cloud-btn[data-state="alert"] { color: var(--danger); }
.pill-btn {
  background: var(--fill); color: var(--accent); font-weight: 600; font-size: .882rem;
  padding: 7px 14px; border-radius: 999px;
}

/* Something is happening: a turning circle (restoring, Back Up Now), then a check when it's done. */
.spinner { display: inline-block; flex: none; width: 1em; height: 1em; border: 2px solid currentColor;
  border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -.15em; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }
.done-check { width: 1.05em; height: 1.05em; vertical-align: -.18em; }
[data-backup-now] .spinner, [data-backup-now] .done-check { margin-right: .45em; }
[data-backup-now].working { pointer-events: none; }
.nav-btn .spinner { width: .9em; height: .9em; margin-right: .4em; }
.wz-copy { margin-top: 8px; }
.wz-copy .done-check { margin-right: .4em; }

/* ---------- Grouped lists ---------- */
.section { margin: 0 16px 28px; }
.section-head { padding: 0 16px 7px; }
.section-head.caps { font-size: .765rem; font-weight: 600; color: var(--head); }
.section-head.big { padding: 6px 4px 8px; }
.section-head.big h2 { font-family: var(--serif); font-size: 1.3rem; font-weight: 500; line-height: 1.15; margin: 0; color: var(--cat); }
.section-head.big p { margin: 4px 0 0; color: var(--secondary); font-size: .794rem; line-height: 1.4; }
.section-foot { padding: 7px 16px 0; color: var(--secondary); font-size: .765rem; }
.group { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.row {
  display: flex; align-items: center; gap: 12px;
  padding-left: 16px; position: relative; min-height: 44px;
  background: var(--card); width: 100%; text-align: left; color: var(--ink);
}
button.row:active, a.row:active, .row.tap:active { background: var(--fill); }
.row-inner {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px;
  padding: 11px 16px 11px 0; align-self: stretch;
}
.row + .row .row-inner, .row + .row.stack { border-top: .5px solid var(--separator); }
.row.stack { display: block; padding: 10px 16px; }
.row-main { flex: 1; min-width: 0; }
.row-title { overflow-wrap: anywhere; }
.row-sub { color: var(--secondary); font-size: .882rem; margin-top: 2px; overflow-wrap: anywhere; }
.row-value { color: var(--secondary); white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; margin-left: auto; }
.row-main:has(+ .row-value) { flex: 0 0 auto; max-width: 70%; }
.row-chevron { width: 16px; height: 16px; margin-right: -4px; flex: none; color: var(--tertiary); }
.row.destructive .row-title { color: var(--danger); }
.row.centered .row-title { text-align: center; width: 100%; }
.row-icon {
  width: 29px; height: 29px; border-radius: 7px; flex: none; color: #fff;
  display: inline-flex; align-items: center; justify-content: center; background: var(--accent);
}
.row-icon svg { width: 18px; height: 18px; }

.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Prayer rows */
.prayer .row-inner { align-items: flex-start; }
.prayer .age { color: var(--secondary); font-size: .765rem; white-space: nowrap; padding-top: 3px; }
.prayer.starred, .prayer.starred .row-inner { background: var(--star-bg); }
.star { color: var(--star); margin-right: 4px; }

/* Cycle sections on the Today screen */
.item .row-inner { display: flex; flex-direction: column; justify-content: center; align-items: stretch; gap: 0; }
.item .item-title { font-weight: 600; }
.item .item-body { margin-top: 4px; white-space: pre-line; color: var(--ink); font-size: calc(1rem * var(--read-scale)); line-height: 1.45; }
/* Prayers and collects on Today are reading text (lists of names are not). */
.item .item-body, .item .prayer-text { font-family: var(--serif); }
.item .prayer-text { white-space: pre-line; line-height: 1.45; font-size: calc(1rem * var(--read-scale)); }
.item .item-note { color: var(--secondary); font-size: .765rem; margin-top: 2px; }
.compact .item .row-inner { padding-top: 9px; padding-bottom: 9px; }

/* Done for today */
.done-block { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.done-btn {
  width: 100%; min-height: 50px; border-radius: 999px; background: var(--btn); color: var(--btn-ink);
  font-weight: 600; font-size: 1rem;
}
.done-btn:active { opacity: .8; }
.done-msg { color: var(--secondary); font-weight: 600; padding-top: 6px; }
.done-check { color: var(--green); }
.link-btn { color: var(--accent); font-size: .882rem; padding: 6px 10px; }

/* Catch Up: a notice card on Today, and its own screen */
.catchup-banner {
  width: 100%; display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 12px 16px; border-radius: var(--radius); color: var(--catch-ink); background: var(--catch-bg);
}
.catchup-banner:active { opacity: .8; }
.catchup-icon { width: 26px; height: 26px; flex: none; color: var(--catch-ink); }
.catchup-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.catchup-title { font-weight: 600; }
.catchup-sub { opacity: .8; font-size: .882rem; }
.catchup-banner .row-chevron { color: var(--catch-ink); opacity: .5; }
.catchup-note { margin: 4px 32px 20px; color: var(--secondary); font-size: .882rem; }
.catchup-actions { gap: 0; padding: 0; border-top: .5px solid var(--separator); }
.catchup-actions button { flex: 1; min-height: 46px; font-weight: 600; }
.catchup-done { color: var(--accent); }
.catchup-skip { color: var(--secondary); border-right: .5px solid var(--separator) !important; }

.empty { text-align: center; color: var(--secondary); padding: 22px 16px; }
.empty .pill-btn { margin-top: 12px; display: inline-block; }
.status { text-align: center; color: var(--secondary); padding: 24px 16px; }
.status p { margin: 0; }
.status-detail { font-size: .78rem; color: var(--tertiary); margin-top: 10px !important; overflow-wrap: anywhere; }

/* ---------- Search & segmented control ---------- */
.search {
  margin: 0 16px 16px; display: flex; align-items: center; gap: 6px;
  background: var(--fill); border-radius: 10px; padding: 0 8px; height: 36px;
}
.search svg { width: 16px; height: 16px; color: var(--secondary); flex: none; }
.search input { border: 0; background: none; outline: none; flex: 1; min-width: 0; font-size: max(16px, 1rem); }
.search input::placeholder { color: var(--secondary); }
.segmented {
  margin: 0 16px 16px; display: flex; background: var(--fill); border-radius: 9px; padding: 2px;
}
.segmented button {
  flex: 1; padding: 6px 4px; border-radius: 7px; font-size: .824rem; font-weight: 500;
}
.segmented button.on { background: var(--elevated); box-shadow: 0 3px 8px rgba(0,0,0,.12), 0 1px 1px rgba(0,0,0,.08); font-weight: 600; }

/* ---------- Forms ---------- */
.field-label { display: block; color: var(--secondary); font-size: .765rem; margin-bottom: 2px; }
.field-hint { color: var(--secondary); font-size: .765rem; margin-top: 4px; }
.row.stack input, .row.stack textarea {
  width: 100%; border: 0; outline: none; background: none; padding: 2px 0; font-size: max(16px, 1rem);
}
.row.stack textarea { resize: none; min-height: 4.5em; line-height: 1.35; }
.row input::placeholder, .row textarea::placeholder { color: var(--tertiary); }
.row-inner select, .row-inner input[type=date], .row-inner input[type=number] {
  border: 0; outline: none; background: none; color: var(--secondary); text-align: right;
  font-size: max(16px, 1rem); max-width: 60%; min-width: 0;
  -webkit-appearance: none; appearance: none; padding: 0;
}
.row-inner select { text-align-last: right; }
.row-inner input[type=number] { width: 5em; }
.row-inner .field-name { flex: 1; min-width: 0; }

.switch {
  -webkit-appearance: none; appearance: none; width: 51px; height: 31px; border-radius: 999px; flex: none;
  background: var(--fill); position: relative; transition: background .2s; margin: 0; cursor: pointer;
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%;
  background: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.15), 0 1px 1px rgba(0,0,0,.16); transition: transform .2s;
}
.switch:checked { background: var(--green); }
.switch:checked::after { transform: translateX(20px); }

.error-banner { margin: 0 16px 16px; color: var(--danger); font-size: .882rem; }

/* ---------- Tab bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  height: calc(var(--tabbar) + env(safe-area-inset-bottom));
  padding: var(--tab-drop) 0 env(safe-area-inset-bottom);
  display: flex; justify-content: space-around;
  background: var(--bar);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-top: .5px solid var(--separator);
}
.tabbar a {
  flex: 1; max-width: 120px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px; color: var(--secondary); font-size: 10px; font-weight: 500; letter-spacing: .01em;
}
.tabbar a.on { color: var(--accent); }
.tabbar svg { width: 26px; height: 26px; }
.tab-icon { display: contents; }
body.modal .tabbar, body.typing .tabbar { display: none; }

/* ---------- Action sheet ---------- */
.sheet-layer { position: fixed; inset: 0; z-index: 50; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.4); opacity: 0; transition: opacity .25s; }
.sheet {
  position: absolute; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom));
  max-width: 560px; margin: 0 auto; max-height: calc(100dvh - 40px - env(safe-area-inset-top));
  display: flex; flex-direction: column; gap: 8px;
  transform: translateY(110%); transition: transform .28s cubic-bezier(.2,.9,.3,1);
}
.sheet-layer.open .sheet-backdrop { opacity: 1; }
.sheet-layer.open .sheet { transform: none; }
.sheet-group {
  background: var(--elevated); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column;
  min-height: 0; flex: none;
}
.sheet-group.main { flex: 0 1 auto; }
.sheet-header { padding: 16px; text-align: center; border-bottom: .5px solid var(--separator); overflow-y: auto; min-height: 0; flex: 0 1 auto; }
.sheet-header .sh-title { font-weight: 600; }
.sheet-header .sh-notes { margin-top: 6px; color: var(--ink); font-size: .882rem; white-space: pre-line; text-align: left; line-height: 1.4; }
.sheet-header .sh-meta { margin-top: 8px; color: var(--secondary); font-size: .765rem; }
.sheet-buttons { display: flex; flex-direction: column; overflow-y: auto; flex: none; }
.sheet-btn {
  width: 100%; min-height: 57px; padding: 0 16px; color: var(--accent); font-size: 1.176rem; text-align: center; flex: none;
}
.sheet-btn:has(.sheet-sub) { padding-top: 10px; padding-bottom: 10px; font-size: 1.059rem; line-height: 1.25; }
.sheet-sub { font-size: .765rem; color: var(--secondary); margin-top: 2px; }
.sheet-btn + .sheet-btn { border-top: .5px solid var(--separator); }
.sheet-btn:active { background: var(--fill); }
.sheet-btn.destructive { color: var(--danger); }
.sheet-btn.cancel { font-weight: 600; }
.sheet.left .sheet-header, .sheet.left .sheet-header .sh-notes { text-align: left; }
.sheet.left .sheet-btn:not(.cancel) { text-align: left; padding-left: 16px; padding-right: 16px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 60;
  bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 14px);
  background: rgba(30,30,30,.94); color: #fff; border-radius: 999px;
  padding: 10px 18px; display: flex; align-items: center; gap: 14px;
  box-shadow: 0 8px 28px rgba(0,0,0,.25); font-size: .882rem; max-width: calc(100vw - 32px);
}
#toast-msg { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#toast-action { color: #64b5ff; font-weight: 600; white-space: nowrap; }
body.modal .toast { bottom: calc(env(safe-area-inset-bottom) + 20px); }
/* The new-version bar stays put; other messages show just above it. */
.update-bar { left: 16px; right: 16px; transform: none; max-width: none; border-radius: 16px; }
.update-bar span { flex: 1; }
.update-bar button { color: #64b5ff; font-weight: 600; white-space: nowrap; }
.update-bar button.later { color: rgba(255,255,255,.65); font-weight: 400; }
body.has-update .toast:not(.update-bar) { bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 68px); }

/* Cycles */
.badge {
  display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 6px; vertical-align: 1px;
  font-size: .706rem; font-weight: 600; color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}
.check-mark { color: var(--accent); font-weight: 600; min-width: 1em; text-align: right; }
.import-help { color: var(--secondary); font-size: .882rem; padding: 0 16px; line-height: 1.4; }
.import-help pre {
  margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--fill); color: var(--ink);
  font: .765rem/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap;
}
.import-text { min-height: 9em; font-size: max(16px, .882rem) !important; }
.import-summary { margin: 0 32px 16px; font-weight: 600; }
.problem .row-title { color: var(--danger); }

/* App icon picker (light or dark Easter Wings) */
.icon-picker { display: flex; gap: 22px; padding: 14px 16px; }
.icon-choice { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: .765rem; color: var(--secondary); }
.icon-choice img { width: 60px; height: 60px; border-radius: 14px; box-shadow: 0 0 0 .5px var(--separator); }
.icon-choice.on img { box-shadow: 0 0 0 3px var(--card), 0 0 0 5.5px var(--accent); }
.icon-choice.on span { color: var(--accent); font-weight: 600; }
.icon-picker + .row .row-inner { border-top: .5px solid var(--separator); }

/* Reordering cycles */
.head-with-btn { display: flex; align-items: baseline; justify-content: space-between; }
.head-btn { color: var(--accent); font-size: .882rem; text-transform: none; letter-spacing: 0; padding: 0 0 0 12px; }
.order-btn {
  width: 36px; height: 32px; border-radius: 8px; background: var(--fill); color: var(--accent);
  font-size: .7rem; display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.order-btn:disabled { color: var(--tertiary); }
.license-text { margin: 0; white-space: pre-wrap; font: .706rem/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--secondary); }

/* What's New */
.whats-new { text-align: left; }
.whats-new .sh-title { text-align: center; margin-bottom: 4px; }
.whats-new .update { margin-top: 12px; }
.whats-new .update-date { font-weight: 600; font-size: .882rem; color: var(--accent); }
.whats-new ul { margin: 4px 0 0; padding-left: 1.2em; }
.whats-new li { margin: 3px 0; font-size: .941rem; line-height: 1.35; }
.whats-new .link-btn { display: block; margin: 14px auto 0; }

/* Starter packs */
/* Citations (starter pack and document sources): a smaller, lighter footnote. */
.pack-source { font-size: .765rem; font-style: italic; opacity: .75; margin-top: 6px; }
.item .row-inner.read-row { flex-direction: row; align-items: center; gap: 10px; }

/* Reading view (psalms, prayers, documents) */
.reading { margin: 0 16px 24px; padding: 18px 18px 22px; background: var(--read-bg); border-radius: var(--radius); box-shadow: var(--shadow);
  font-family: var(--serif); font-size: calc(1rem * var(--read-scale)); line-height: 1.5; }
.reading.inline { margin: 4px 0 0; padding: 0; background: none; border-radius: 0; box-shadow: none; }
/* Guides (instructions for the app): the app's own font and size; not Reading Text size, which is for reading. */
.reading.guide { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, Helvetica, Arial, sans-serif;
  font-size: .941rem; line-height: 1.45; }
.reading .read-heading { font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif; font-size: .824rem; font-weight: 600;
  margin: 22px 0 4px; color: var(--head); }
.reading .read-heading:first-child { margin-top: 0; }
.reading .read-subheading { font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif; font-size: .824rem; font-weight: 600;
  margin: 16px 0 4px; color: var(--secondary); }
.reading .read-latin { font-style: italic; color: var(--secondary); font-size: .882rem; margin: -2px 0 8px; }
/* A citation under a prayer (Prayers from Scripture: "Based on …"). */
.reading .read-cite { font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif; font-size: .765rem; color: var(--secondary); margin-top: 6px; }
.reading .verse { position: relative; padding-left: 1.9rem; margin: 0 0 9px; }
.reading .vnum { position: absolute; left: 0; top: .3em; font-family: -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: .706rem; color: var(--vnum); font-variant-numeric: tabular-nums; }
/* As in the Prayer Book: the second half of a verse starts with a small
   indent; any line too long for the screen wraps to a much deeper indent. Measured in rem, so a larger
   Reading Text size makes the words bigger without making the indents eat the line. */
.reading .vline { padding-left: 4rem; text-indent: -4rem; }
.reading .vline.indent { padding-left: 4rem; text-indent: -2.8rem; }
.reading .read-para { margin: 0 0 12px; }
.reading .read-quote { margin: 0 0 12px; padding: 2px 0 2px 14px; border-left: 3px solid var(--separator); font-style: italic; }
.reading .read-quote em { font-style: normal; }
.reading .read-link { color: var(--accent); }
.reading .read-list { margin: 0 0 12px; padding-left: 1.4em; }
.reading .read-list li { margin-bottom: 6px; }
.reading .read-list .read-list { margin: 6px 0 0; }
.reading .read-line { padding-left: 1.5em; text-indent: -1.5em; }
.reading .read-line.indent { padding-left: 3em; }
.reading .read-line.indent2 { padding-left: 4.5em; }
/* A shaped poem (Easter Wings): centered, one line each, scaled to fit so the shape holds on a phone. */
.reading .read-line.center { padding-left: 0; text-indent: 0; text-align: center; white-space: nowrap; font-size: min(.88rem, 3.9vw); }
.reading .read-line.center + .read-para, .reading .read-gap + .read-para { margin-top: 1.4em; }
.reading .read-gap { height: .9em; }
.reading-foot { text-align: center; margin: 0 16px 24px; color: var(--secondary); }
.typo-link { color: var(--secondary); font-size: .8rem; }
p.reading-foot.pack-source { font-family: var(--serif); text-align: left; }  /* source lines read left-aligned */
.doc-notice { font-size: .765rem; line-height: 1.4; text-align: left; }

.reading strong { font-weight: 700; }
.preview-heading { margin-bottom: 10px; }
.preview-heading .read-heading { margin: 0; }
.preview-heading .read-subheading { margin: 2px 0 0; color: var(--secondary); font-weight: 400; }

/* Church year season: a small dot in the season's color (Today's Church Year row
   and the collect's page). */
.season-dot { display: inline-block; width: .55em; height: .55em; border-radius: 50%; margin-right: .5em; vertical-align: .08em; }
.large-title .season-dot { width: .32em; height: .32em; margin-right: .35em; vertical-align: .22em; }
.season-advent { background: var(--season-advent); }
.season-feast { background: var(--season-feast); }
.season-green { background: var(--season-green); }
.season-lent { background: var(--season-lent); }
.season-red { background: var(--season-red); }
/* A list whose items start with a season dot (The Colors of the Church Year): the dots are the bullets. */
.reading .read-list:has(> li > .season-dot:first-child) { list-style: none; padding-left: 0; }
.reading .read-list > li:has(> .season-dot:first-child) { padding-left: 1.05em; text-indent: -1.05em; margin-bottom: 10px; }

/* Settings → Appearance → Reading Text: five sizes, shown as A's growing larger. */
.size-picker { display: flex; background: var(--fill); border-radius: 9px; padding: 2px; margin-top: 10px; }
.size-picker button { flex: 1; padding: 4px 0; border-radius: 7px; font-family: var(--serif); line-height: 1.2; color: var(--ink); }
.size-picker button.on { background: var(--elevated); box-shadow: 0 3px 8px rgba(0,0,0,.12), 0 1px 1px rgba(0,0,0,.08); }
.size-preview { font-family: var(--serif); font-size: calc(1rem * var(--read-scale)); line-height: 1.45; margin: 10px 4px 0; }

/* ---------- Ways to Pray card on Today ---------- */
.wtp-card { padding: 16px 18px 12px; }
.wtp-card-title { font-family: var(--serif); font-size: 1.25rem; font-weight: 500; margin-bottom: 4px; }
.wtp-card p { margin: 0 0 12px; color: var(--secondary); font-size: .941rem; line-height: 1.4; }
.wtp-card-actions { display: flex; align-items: center; gap: 8px; }
/* Getting Started: a checklist that ticks itself off. */
.start-list { list-style: none; margin: 4px 0 6px; padding: 0; }
.start-list button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 0; text-align: left;
  font-size: 1rem; color: var(--ink); }
.start-list li + li button { border-top: .5px solid var(--separator); }
.start-list .row-chevron { margin-left: auto; }
.start-mark { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--tertiary);
  display: grid; place-items: center; }
.start-list .done button { color: var(--secondary); }
.start-list .done .start-mark { border-color: var(--green); background: var(--green); color: #fff; }
.start-mark svg { width: 14px; height: 14px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Setup wizard (mockups/wizard-flow.html): "Dawn" in the browser, "Quiet Stone" in the Home Screen app ---------- */
.wizard { position: fixed; inset: 0; z-index: 40; overflow-y: auto; background: var(--bg-top); color: var(--ink);
  -webkit-overflow-scrolling: touch; }
body.wizard-open { overflow: hidden; }
.wz-page { min-height: 100%; display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; }
.wz-page h2 { font-family: var(--serif); font-weight: 500; font-size: 1.85rem; line-height: 1.12; margin: 0 0 10px; }
.wz-lead { margin: 0 0 14px; line-height: 1.45; }
.wz-lead.small { font-size: .9rem; }
.wz-note { color: var(--secondary); font-size: .82rem; text-align: center; line-height: 1.4; margin: 10px 0 0; }
.wz-quiet { color: var(--secondary); font-size: .9rem; line-height: 1.45; margin: 0 0 12px; }
.wz-grow { flex: 1; min-height: 16px; }
.wz-wide { display: block; width: 100%; border-radius: 14px; padding: 15px; font-weight: 600; font-size: 1.05rem;
  background: var(--btn); color: var(--btn-ink); }
.wz-wide[hidden] { display: none; }
.wz-text { display: block; width: 100%; padding: 12px; color: var(--accent); font-size: 1rem; }
.wz-dots { display: flex; gap: 6px; justify-content: center; margin-top: 12px; }
.wz-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink); opacity: .22; }
.wz-dots i.on { opacity: .85; }
.wz-close { position: fixed; top: calc(12px + env(safe-area-inset-top)); left: 12px; z-index: 41; padding: 7px 14px;
  border-radius: 99px; background: rgba(255, 255, 255, .22); color: #fff; font-weight: 600; font-size: .9rem;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.wz-points { list-style: none; margin: 0; padding: 0; font-size: .941rem; line-height: 1.35; }
.wz-points li { display: flex; gap: 10px; padding: 6px 0; }
.wz-points svg { flex: none; width: 20px; height: 20px; margin-top: 1px; color: var(--accent); }

/* Dawn */
.dawn .wz-wide { border-radius: 99px; background: var(--dawn-btn); color: var(--dawn-btn-ink); }
.wz-sky { position: relative; flex: none; height: calc(330px + env(safe-area-inset-top)); color: #fff; overflow: hidden;
  background: radial-gradient(120% 70% at 50% 108%, #f5d9a4 0%, #e9b98a 18%, rgba(233, 185, 138, 0) 46%),
    linear-gradient(180deg, #23395c 0%, #3b5d8c 38%, #7c98c0 68%, #c9c3c3 100%); }
/* Welcome: the app icon on its tile and the name, large (Tim, 2026-10-26). */
.wz-sky .wz-title { position: absolute; left: 0; right: 0; top: calc(54px + env(safe-area-inset-top)); z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 14px; }
.wz-tile { width: 88px; height: 88px; border-radius: 20px; box-shadow: 0 4px 18px rgba(20, 35, 60, .35); }
.wz-name { font-family: var(--serif); font-weight: 500; font-size: 2.3rem; line-height: 1.2; color: #fff; }
.wz-waves { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: auto; opacity: .35; }
.wz-band { position: relative; flex: none; display: flex; align-items: center; gap: 16px; color: #fff;
  padding: calc(46px + env(safe-area-inset-top)) 20px 52px 24px;
  background: radial-gradient(120% 90% at 85% 120%, #f0cf97 0%, rgba(240, 207, 151, 0) 50%), linear-gradient(180deg, #23395c, #50709e); }
.wz-band h2 { flex: 1; color: #fff; font-size: 1.55rem; margin: 0; }
.wz-band .wz-mark { flex: none; width: 70px; height: 70px; opacity: .9; }  /* level with the title (Tim, 2026-10-26) */
.wz-panel { flex: 1; position: relative; margin-top: -28px; background: var(--bg-top); border-radius: 28px 28px 0 0;
  padding: 24px 24px calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; }
.wz-icons { display: flex; gap: 28px; justify-content: center; margin: 18px 0 8px; }
.wz-icons button, .wz-icons figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: .9rem; color: var(--secondary); }
.wz-icons img { width: 100px; height: 100px; border-radius: 23px; box-shadow: 0 6px 18px rgba(35, 57, 92, .18); }
.wz-icons button.on { color: var(--accent); font-weight: 600; }
.wz-icons button.on img { outline: 3px solid var(--accent); outline-offset: 4px; }
.wz-qr { align-self: center; width: 180px; padding: 14px; margin: 6px 0; background: #fff; border-radius: 16px;
  box-shadow: 0 6px 18px rgba(35, 57, 92, .15); }
.wz-qr-code svg { display: block; width: 100%; height: auto; }
.wz-qr-code svg path { fill: #23395c; }

/* The four iPhone steps, with drawings of what to tap (light, like Safari's own) */
.wz-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wz-step { background: var(--card); border-radius: 14px; padding: 10px; font-size: .78rem; line-height: 1.35;
  box-shadow: 0 1px 3px rgba(35, 57, 92, .08); }
.wz-n { font-weight: 700; margin-right: 4px; }
.wz-pic { height: 74px; border-radius: 10px; margin-bottom: 8px; position: relative; overflow: hidden; color: #1d1d1f;
  background: linear-gradient(180deg, #dfe6f0, #efe5d6); font-size: .62rem; }
.wz-bar { position: absolute; left: 8px; right: 8px; bottom: 10px; height: 30px; border-radius: 15px; background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .15); display: flex; align-items: center; padding: 0 10px; color: #8a8f96; }
.wz-bar.top { top: 10px; bottom: auto; }
.wz-bar span { margin-left: auto; width: 20px; height: 20px; display: grid; place-items: center; color: #333; font-weight: 700; }
.wz-bar svg { width: 15px; height: 15px; color: #0a72e8; }
.wz-ring { position: absolute; right: 13px; bottom: 13px; width: 24px; height: 24px; border-radius: 50%;
  box-shadow: 0 0 0 2px #e1a847, 0 0 0 6px rgba(225, 168, 71, .25); }
.wz-ring.top { top: 13px; bottom: auto; }
.wz-menu { position: absolute; left: 10px; right: 10px; top: 8px; background: #fff; border-radius: 9px; box-shadow: 0 1px 4px rgba(0, 0, 0, .15); }
.wz-menu div { padding: 5px 9px; display: flex; justify-content: space-between; }
.wz-menu div + div { border-top: .5px solid #e3e3e3; }
.wz-menu .hit { background: #eef3fa; font-weight: 600; }
.wz-add { position: absolute; inset: 8px 10px; background: #fff; border-radius: 9px; box-shadow: 0 1px 4px rgba(0, 0, 0, .15); padding: 6px 9px; }
.wz-add .top { display: flex; justify-content: space-between; color: #8a8f96; }
.wz-add .top b { color: #0a72e8; }
.wz-add .wz-row { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-weight: 600; }
.wz-toggle { width: 26px; height: 15px; border-radius: 8px; background: #34c759; position: relative; }
.wz-toggle::after { content: ""; position: absolute; right: 2px; top: 2px; width: 11px; height: 11px; border-radius: 50%; background: #fff; }
.wz-home { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(4, 22px); gap: 8px; justify-content: center; align-content: center; }
.wz-home i { width: 22px; height: 22px; border-radius: 6px; background: rgba(0, 0, 0, .12); }
.wz-home i.me { background-size: cover; box-shadow: 0 0 0 2px #e1a847; }

/* Quiet Stone */
.stone { padding: calc(44px + env(safe-area-inset-top)) 24px calc(26px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, var(--bg-top), var(--bg-bottom)); }
.wz-topmark { display: block; width: 72px; height: 72px; margin: 0 auto 18px; flex: none; }
.wz-choices { display: flex; flex-direction: column; gap: 10px; }
.wz-choice { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--card);
  border-radius: 16px; padding: 13px 14px; box-shadow: var(--shadow); color: var(--ink); }
.wz-choice:active { background: var(--fill); }
.wz-ic { flex: none; width: 38px; height: 38px; border-radius: 10px; background: var(--fill); color: var(--accent); display: grid; place-items: center; }
.wz-ic svg { width: 20px; height: 20px; }
.wz-choice-text { flex: 1; min-width: 0; }
.wz-choice-text b { display: block; font-weight: 500; font-size: 1rem; }
.wz-choice-text span { display: block; font-size: .78rem; color: var(--secondary); margin-top: 2px; line-height: 1.35; }
.wz-chev { width: 16px; height: 16px; color: var(--tertiary); flex: none; }
.wz-choice.busy { pointer-events: none; }
.wz-choice.busy .wz-chev { display: none; }
.wz-choice .spinner { color: var(--accent); width: 18px; height: 18px; }
.wizard.working button:not(.busy) { opacity: .45; pointer-events: none; transition: opacity .2s; }
.wz-amen { display: block; width: 100%; background: var(--btn); color: var(--btn-ink); border-radius: 14px; padding: 13px;
  font-weight: 600; margin: 4px 0 18px; transition: transform .12s ease; }
.wz-amen.press { transform: scale(.94); }
.wz-amen.spring { animation: wz-spring .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes wz-spring { from { transform: scale(.94); } to { transform: scale(1); } }
.wz-tabbar { display: flex; justify-content: space-around; background: var(--bar); border-radius: 18px; padding: 10px 6px 8px;
  box-shadow: var(--shadow); margin: 6px 0 18px; font-size: .62rem; color: var(--secondary); }
.wz-tabbar div { text-align: center; position: relative; }
.wz-tabbar svg { width: 24px; height: 24px; display: block; margin: 0 auto 2px; }
.wz-tabbar .on { color: var(--accent); font-weight: 600; }
.wz-tabbar .on::before { content: ""; position: absolute; inset: -6px -10px; border-radius: 14px;
  box-shadow: 0 0 0 2px #e1a847, 0 0 0 6px rgba(225, 168, 71, .2); }

/* In a browser: the one-line reminder on Today that Skylark works best from the Home Screen */
.home-banner { display: flex; align-items: center; gap: 6px; padding: 10px 12px 10px 16px; border-radius: 14px;
  background: var(--catch-bg); color: var(--catch-ink); font-size: .882rem; line-height: 1.3; }
.home-banner span { flex: 1; font-weight: 600; }
.foot-link { color: var(--accent); font-size: inherit; padding: 0; }
.wizard:has(.wz-close) .wz-band { padding-top: calc(62px + env(safe-area-inset-top)); }
/* Changing Your Icon (Show Me How under App Icon): numbered steps */
.wz-list { display: flex; flex-direction: column; gap: 10px; }
.wz-item { display: flex; gap: 12px; background: var(--card); border-radius: 16px; padding: 14px; box-shadow: var(--shadow);
  line-height: 1.4; font-size: .941rem; }
.wz-num { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--fill); color: var(--accent);
  display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.wz-item .wz-quiet { margin: 4px 0 10px; }
.wizard:has(.stone) .wz-close { background: var(--fill); color: var(--accent); }
