/* ===== PRAYING FOR HER design system =====
   Palette (approved):
     Light  — warm ivory #FCFAF5 · deep forest #183D34 · sage #E5EDE6 · bronze #98774F
     Dark   — evergreen-black #101C1A · forest surface #182A25 · green card #253D34 · warm ivory #F3EFE5 · bronze #C9A879
   Contrast note: raw bronze #98774F is 3.96:1 on ivory, which is below AA for small text. Small bronze text therefore
   uses --accent (#7C5E39, 5.0:1 or better on every light surface); raw bronze is used for lines, fills and large marks.
   All other colors in this file are derived from the palette with color-mix(). */
:root {
  --ivory: #FCFAF5;
  --forest: #183D34;
  --sage: #E5EDE6;
  --bronze: #98774F;

  --ink: var(--forest);
  --ink-2: #456057;
  --ink-3: #4F675D;
  --accent: #7C5E39;
  --accent-2: var(--bronze);
  --gold: var(--bronze);
  --lav: color-mix(in srgb, var(--forest) 55%, var(--sage));
  --bg-a: color-mix(in srgb, var(--sage) 75%, var(--ivory));
  --bg-b: color-mix(in srgb, var(--sage) 38%, var(--ivory));
  --bg-c: color-mix(in srgb, var(--sage) 60%, var(--ivory));
  --surface: rgba(252, 250, 245, 0.92);
  --surface-solid: var(--ivory);
  --surface-soft: rgba(252, 250, 245, 0.62);
  --panel: var(--sage);
  --border: rgba(24, 61, 52, 0.15);
  --shadow: 0 12px 34px rgba(24, 61, 52, 0.12);
  --shadow-sm: 0 4px 14px rgba(24, 61, 52, 0.09);
  --btn-bg: var(--forest);
  --btn-fg: var(--ivory);
  --prayed-bg: var(--forest);
  --prayed-ink: var(--ivory);
  --mark-bg: color-mix(in srgb, var(--bronze) 26%, var(--ivory));
  --mark-ink: var(--forest);
  --focus: var(--forest);
  --scrim: rgba(16, 28, 26, 0.55);
  --radius: 22px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Gelasio", serif;
  --sans: ui-sans-serif, -apple-system, "SF Pro Text", "Segoe UI", Roboto, "Inter", "Helvetica Neue", Arial, sans-serif;
  --read: var(--serif);
  --tabbar-h: 70px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --glow-1: rgba(152, 119, 79, 0.16);
  --glow-2: rgba(229, 237, 230, 0.9);
  color-scheme: light;
}

html[data-theme="evening"] {
  --ink: #F3EFE5;
  --ink-2: #B5C2BA;
  --ink-3: #9DAEA4;
  --accent: #C9A879;
  --accent-2: #C9A879;
  --bronze: #C9A879;
  --gold: #C9A879;
  --lav: color-mix(in srgb, #F3EFE5 55%, #253D34);
  --bg-a: #101C1A;
  --bg-b: #101C1A;
  --bg-c: #101C1A;
  --surface: rgba(24, 42, 37, 0.9);
  --surface-solid: #182A25;
  --surface-soft: rgba(24, 42, 37, 0.6);
  --panel: #253D34;
  --border: rgba(243, 239, 229, 0.14);
  --shadow: 0 12px 34px rgba(0, 0, 0, 0.42);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.32);
  --btn-bg: #C9A879;
  --btn-fg: #101C1A;
  --prayed-bg: #C9A879;
  --prayed-ink: #101C1A;
  --mark-bg: color-mix(in srgb, #C9A879 32%, #253D34);
  --mark-ink: #F3EFE5;
  --focus: #C9A879;
  --scrim: rgba(0, 0, 0, 0.6);
  --glow-1: rgba(201, 168, 121, 0.10);
  --glow-2: rgba(37, 61, 52, 0.55);
  color-scheme: dark;
}
html[data-contrast="high"] { --ink: #0B241D; --ink-2: #123229; --ink-3: #1D463A; --border: rgba(11, 36, 29, 0.55); --accent: #5E4524; }
html[data-theme="evening"][data-contrast="high"] { --ink: #FFFFFF; --ink-2: #FFFFFF; --ink-3: #F3EFE5; --border: rgba(255, 255, 255, 0.65); --accent: #E3C99C; }

html[data-size="sm"] { font-size: 16px; }
html[data-size="md"] { font-size: 18px; }
html[data-size="lg"] { font-size: 20.5px; }
html[data-size="xl"] { font-size: 23.5px; }
html[data-font="sans"] { --read: var(--sans); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg-b);
  line-height: 1.5;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 55% at 88% -8%, var(--glow-1), transparent 62%),
    radial-gradient(90% 45% at 0% 0%, var(--glow-2), transparent 58%),
    linear-gradient(180deg, var(--bg-a) 0%, var(--bg-b) 42%, var(--bg-c) 100%);
}
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.2; }
p { margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--btn-bg); color: var(--btn-fg); padding: 10px 14px; border-radius: 10px; z-index: 100; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ===== Shell ===== */
.shell { max-width: 660px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 18px 20px 6px; }
.topbar .brand-text { font: 700 0.68rem var(--sans); letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-2); line-height: 1.35; }
.topbar .brand-text b { display: block; color: var(--accent); letter-spacing: 0.22em; }
main:focus { outline: none; }
main { flex: 1; padding: 8px 20px calc(var(--tabbar-h) + var(--safe-b) + 28px); outline: none; }
.shell.no-tabs main { padding-bottom: 40px; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; justify-content: center;
  padding-bottom: var(--safe-b);
  background: color-mix(in srgb, var(--surface-solid) 82%, transparent);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border-top: 1px solid var(--border);
}
.tabbar ul { display: flex; list-style: none; margin: 0; padding: 0; width: 100%; max-width: 660px; }
.tabbar li { flex: 1; }
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: var(--tabbar-h); text-decoration: none; color: var(--ink-3);
  font: 600 0.66rem var(--sans); letter-spacing: 0.04em;
}
.tabbar a[aria-current="page"] { color: var(--accent); }
.tabbar a[aria-current="page"] svg { stroke-width: 2.1; }

/* ===== Type ===== */
.eyebrow { font: 700 0.68rem var(--sans); letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); }
.h-display { font-family: var(--serif); font-weight: 600; font-size: 1.95rem; letter-spacing: -0.01em; }
.h-section { font-family: var(--serif); font-weight: 600; font-size: 1.3rem; }
.lead { font-family: var(--serif); font-size: 1.12rem; color: var(--ink-2); }
.muted { color: var(--ink-2); }
.small { font-size: 0.82rem; }
.read { font-family: var(--read); font-size: 1.08rem; line-height: 1.72; }

/* ===== Surfaces ===== */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow-sm);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.card + .card, .stack > * + * { margin-top: 16px; }
.stack-lg > * + * { margin-top: 24px; }
.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 50px; padding: 0 24px; border-radius: 999px; border: 1.5px solid transparent;
  font: 650 1rem var(--sans); text-decoration: none; transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--btn-bg); color: var(--btn-fg); box-shadow: 0 8px 22px rgba(24, 61, 52, 0.22); }
.btn-dawn { background: var(--btn-bg); color: var(--btn-fg); box-shadow: 0 10px 26px rgba(24, 61, 52, 0.26); }
.btn-secondary { background: var(--surface-solid); border-color: var(--border); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-danger { background: #b3261e; color: #fff; }
.btn-block { width: 100%; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 0.9rem; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface-solid); color: var(--ink-2);
}
.icon-btn[aria-pressed="true"] { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.icon-btn[aria-pressed="true"] svg { fill: currentColor; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--surface-soft); border: 1px solid var(--border); font: 600 0.74rem var(--sans); color: var(--ink-2); }
.chip-accent { color: var(--accent); }

/* ===== Segmented control ===== */
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface-soft); border: 1px solid var(--border); }
.seg button { flex: 1; min-height: 42px; border: 0; border-radius: 999px; background: transparent; font: 650 0.92rem var(--sans); color: var(--ink-2); }
.seg button[aria-selected="true"], .seg button[aria-pressed="true"] { background: var(--surface-solid); color: var(--ink); box-shadow: var(--shadow-sm); }
.seg button[disabled] { opacity: 0.55; }
.sticky-seg { position: sticky; top: 0; z-index: 5; padding: 10px 0; }

/* ===== Hero (Today) ===== */
.hero {
  position: relative; overflow: hidden; border-radius: 28px; padding: 24px 22px 22px;
  background: var(--panel); color: var(--ink); box-shadow: var(--shadow); border: 1px solid var(--border);
}
.hero .eyebrow { color: var(--accent); }
.hero h2 { font-family: var(--serif); font-size: 1.8rem; margin: 6px 0 8px; letter-spacing: -0.01em; }
.hero p { font-family: var(--serif); font-size: 1.02rem; line-height: 1.6; opacity: 0.92; max-width: 34em; }
.hero .sun { position: absolute; right: -34px; top: -34px; width: 150px; height: 150px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--bronze) 28%, transparent), transparent 68%); pointer-events: none; }
.hero .btn { margin-top: 18px; }

.ring { position: relative; width: 92px; height: 92px; flex: none; }
.ring svg { transform: rotate(-90deg); }
.ring .ring-label { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; font: 700 1.25rem var(--serif); line-height: 1; }
.ring .ring-label small { display: block; font: 600 0.56rem var(--sans); letter-spacing: 0.08em; color: var(--ink-3); margin-top: 3px; text-transform: uppercase; }
.bar { height: 8px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 9%, transparent); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--bronze), color-mix(in srgb, var(--bronze) 55%, var(--ink))); }

.week { display: flex; gap: 8px; }
.week div { flex: 1; text-align: center; font: 600 0.68rem var(--sans); color: var(--ink-3); }
.week i { display: block; width: 100%; aspect-ratio: 1; max-width: 34px; margin: 5px auto 0; border-radius: 50%; border: 1.5px solid var(--border); background: var(--surface-soft); }
.week .on i { background: var(--bronze); border-color: transparent; }
.week .today i { outline: 2px solid var(--accent); outline-offset: 2px; }

.carry { border-left: 3px solid var(--gold); padding: 4px 0 4px 16px; font-family: var(--serif); font-size: 1.12rem; font-style: italic; color: var(--ink); }

.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; background: color-mix(in srgb, var(--gold) 16%, var(--surface-solid)); border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); font-size: 0.9rem; }
.notice.warn { background: color-mix(in srgb, #e5484d 10%, var(--surface-solid)); border-color: color-mix(in srgb, #e5484d 40%, transparent); }

/* ===== Day view ===== */
.day-head { padding: 6px 0 12px; }
.day-head .crumbs { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.day-head h1 { font-family: var(--serif); font-size: 2.05rem; letter-spacing: -0.01em; margin: 8px 0 10px; }
.block { padding: 22px 20px; }
.block-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.block-label .eyebrow { display: inline-flex; align-items: center; gap: 8px; }
.window { background: var(--panel); }

.window .read { font-style: italic; }
.scripture { border-left: 4px solid var(--gold); border-radius: 6px var(--radius) var(--radius) 6px; }
.scripture .verses { font-family: var(--read); font-size: 1.12rem; line-height: 1.75; }
.scripture sup { font: 700 0.62rem var(--sans); color: var(--accent); margin-right: 3px; vertical-align: super; }
.scripture .ref { font: 700 0.9rem var(--sans); letter-spacing: 0.04em; margin-top: 12px; }
.scripture .context { font-size: 0.86rem; color: var(--ink-2); margin-top: 8px; }
.prayer p + p { margin-top: 1em; }
.letter { background: repeating-linear-gradient(transparent, transparent 33px, color-mix(in srgb, var(--ink) 7%, transparent) 33px, color-mix(in srgb, var(--ink) 7%, transparent) 34px), var(--surface); }
.letter .read { line-height: 34px; }
.letter p + p { margin-top: 34px; }
.declaration { background: color-mix(in srgb, var(--bronze) 13%, var(--surface-solid)); border-color: color-mix(in srgb, var(--bronze) 50%, transparent); }

.declaration .read { font-weight: 600; font-style: italic; }
.declaration .read p + p { margin-top: 0.6em; }
.declaration .ref { font: 700 0.82rem var(--sans); color: var(--ink-2); margin-top: 12px; }
.kind { font: 650 0.68rem var(--sans); padding: 3px 10px; border-radius: 99px; background: color-mix(in srgb, var(--surface-solid) 70%, transparent); border: 1px solid var(--border); color: var(--ink-2); letter-spacing: 0.04em; }
.walk-step { padding: 14px 0; border-top: 1px solid var(--border); }
.walk-step:first-of-type { border-top: 0; }
.walk-step .phrase { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; }
.walk-step .note { color: var(--ink-2); margin-top: 6px; font-size: 0.95rem; }
.walk-step button { margin-top: 8px; }
.amen-wrap { text-align: center; padding: 8px 0 4px; }
.amen { min-height: 58px; font-size: 1.1rem; padding: 0 34px; }
.amen-done { animation: bloom 0.9s ease-out; }
@keyframes bloom { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--bronze) 70%, transparent); } 100% { box-shadow: 0 0 0 36px color-mix(in srgb, var(--bronze) 0%, transparent); } }
html[data-motion="reduce"] * { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { html[data-motion="system"] * { animation: none !important; transition: none !important; } }

.timer { display: grid; place-items: center; gap: 12px; padding: 8px 0; }
.timer .dial { position: relative; width: 150px; height: 150px; }
.timer .dial svg { transform: rotate(-90deg); }
.timer .dial span { position: absolute; inset: 0; display: grid; place-items: center; font: 600 1.7rem var(--serif); }

.field { width: 100%; border-radius: 16px; border: 1.5px solid var(--border); background: var(--surface-solid); padding: 14px 16px; font-family: var(--read); font-size: 1.05rem; line-height: 1.65; }
textarea.field { min-height: 280px; resize: vertical; }
.field:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 28%, transparent); }
label.lbl { display: block; font: 650 0.86rem var(--sans); margin-bottom: 6px; color: var(--ink-2); }
.saved { font: 600 0.8rem var(--sans); color: var(--ink-2); display: inline-flex; gap: 6px; align-items: center; }
.saved.err { color: #b3261e; }

.card-preview { display: block; width: 100%; max-width: 420px; margin: 0 auto; border-radius: 18px; box-shadow: var(--shadow); border: 1px solid var(--border); background: #fff; aspect-ratio: 2 / 3; height: auto; }
.actions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.actions-grid .btn { min-height: 54px; padding: 0 12px; font-size: 0.95rem; }
select.field { padding: 10px 14px; font-family: var(--sans); font-size: 0.95rem; }

/* ===== Journey (paths) ===== */
.chapter { padding: 0; overflow: hidden; }
.chapter > button.ch-head { width: 100%; text-align: left; background: transparent; border: 0; padding: 18px 20px; display: flex; gap: 14px; align-items: center; }
.ch-num { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font: 700 0.95rem var(--serif); background: var(--mark-bg); color: var(--mark-ink); flex: none; }
.ch-head .title { font: 600 1.08rem var(--serif); }
.ch-head .sub { font-size: 0.8rem; color: var(--ink-2); }
.ch-body { padding: 0 8px 18px; }
.ch-desc { padding: 0 14px 6px; font-size: 0.92rem; color: var(--ink-2); font-family: var(--serif); font-style: italic; }
.paths-svg { display: block; width: 100%; height: auto; }
.node { cursor: pointer; }
.node circle.base { fill: var(--surface-solid); stroke: var(--border); stroke-width: 2; }
.node.avail circle.base { stroke: var(--gold); }
.node.done circle.base { fill: var(--prayed-bg); stroke: none; }
.node.future { cursor: default; opacity: 0.55; }
.node text { font: 700 11px var(--sans); fill: var(--ink-2); text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.node.done text { fill: var(--prayed-ink); }
.node:focus-visible circle.base { stroke: var(--focus); stroke-width: 4; }
.node .pulse { fill: none; stroke: var(--accent-2); stroke-width: 2; opacity: 0.6; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.78rem; color: var(--ink-2); padding: 0 14px 10px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }

.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-grid { width: 100%; border-collapse: separate; border-spacing: 4px; table-layout: fixed; }
.cal-grid th { font: 700 0.68rem var(--sans); color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.08em; padding-bottom: 4px; }
.cal-cell { width: 100%; aspect-ratio: 1; border-radius: 14px; border: 1px solid transparent; background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font: 600 0.9rem var(--sans); color: var(--ink-2); padding: 0; }
.cal-cell.has { background: var(--mark-bg); color: var(--mark-ink); border-color: transparent; }
.cal-cell.today { border-color: var(--accent); }
.cal-cell small { font-size: 0.6rem; font-weight: 700; }

/* ===== Lists ===== */
.entry { display: block; width: 100%; text-align: left; text-decoration: none; }
.entry .title { font: 600 1.05rem var(--serif); }
.entry .snippet { color: var(--ink-2); font-size: 0.92rem; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.empty { text-align: center; padding: 34px 18px; color: var(--ink-2); }
.empty .mark { margin: 0 auto 10px; }
.kept-item .text { font-family: var(--read); line-height: 1.65; }
.kept-item .text p + p { margin-top: 0.6em; }

/* ===== Settings ===== */
.setting { padding: 14px 0; border-top: 1px solid var(--border); }
.setting:first-child { border-top: 0; padding-top: 0; }
.setting .lbl { margin-bottom: 8px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { text-align: center; padding: 14px 6px; border-radius: 16px; background: var(--surface-soft); border: 1px solid var(--border); }
.stat b { display: block; font: 700 1.6rem var(--serif); }
.stat span { font: 600 0.68rem var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }

/* ===== Onboarding ===== */
.onb { display: flex; flex-direction: column; justify-content: center; min-height: calc(100dvh - 90px); gap: 22px; padding-top: 10px; }
.onb .brand-mark { width: 56px; height: 56px; }
.onb h1 { font-family: var(--serif); font-size: 2.3rem; line-height: 1.12; letter-spacing: -0.015em; }
.onb .pill-list { display: grid; gap: 12px; }
.onb .pill { display: flex; gap: 14px; align-items: flex-start; }
.onb .pill .dot { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--mark-bg); color: var(--mark-ink); display: grid; place-items: center; font: 700 0.9rem var(--serif); }
.steps { display: flex; gap: 6px; }
.steps i { height: 4px; flex: 1; border-radius: 4px; background: color-mix(in srgb, var(--ink) 14%, transparent); }
.steps i.on { background: var(--accent-2); }
.opt-row { display: flex; gap: 8px; flex-wrap: wrap; }
.opt-row button { flex: 1 1 0; min-width: 74px; min-height: 46px; border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface-solid); font: 650 0.9rem var(--sans); padding: 0 10px; }
.opt-row button[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); }

/* ===== Dialog / sheet ===== */
dialog.sheet { border: 0; padding: 0; border-radius: 26px; width: min(92vw, 520px); max-height: 88vh; background: var(--surface-solid); color: var(--ink); box-shadow: 0 30px 80px rgba(16, 28, 26, 0.45); }
dialog.sheet::backdrop { background: var(--scrim); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.sheet-body { padding: 24px 22px 20px; display: grid; gap: 14px; }
.sheet-title { font: 600 1.35rem var(--serif); }
.sheet-text { color: var(--ink-2); font-size: 0.96rem; }
.sheet-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
dialog.focus-mode { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; background: linear-gradient(170deg, var(--bg-a), var(--bg-b) 55%, var(--bg-c)); }
.focus-wrap { min-height: 100dvh; display: flex; flex-direction: column; padding: 20px 22px calc(26px + var(--safe-b)); max-width: 660px; margin: 0 auto; }
.focus-text { flex: 1; display: grid; place-items: center; text-align: center; font-family: var(--read); font-size: 1.65rem; line-height: 1.55; padding: 20px 4px; }
.focus-nav { display: flex; gap: 12px; justify-content: space-between; align-items: center; }

/* ===== Toast ===== */
#toast { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + var(--safe-b) + 18px); transform: translate(-50%, 20px); background: var(--btn-bg); color: var(--btn-fg); padding: 12px 20px; border-radius: 999px; font: 600 0.9rem var(--sans); opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; z-index: 200; max-width: 90vw; text-align: center; box-shadow: var(--shadow); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

@media print {
  .tabbar, .topbar, #toast { display: none !important; }
  body::before { display: none; }
}
@media (min-width: 900px) {
  main { padding-left: 28px; padding-right: 28px; }
}

/* "For me": her own prayer, visually distinct from the prayer for her */
.for-me { background: color-mix(in srgb, var(--panel) 62%, var(--surface-solid)); border-color: color-mix(in srgb, var(--forest) 18%, transparent); }
html[data-theme="evening"] .for-me { border-color: color-mix(in srgb, #F3EFE5 16%, transparent); }
.for-me .read p + p { margin-top: 0.6em; }

/* Dormant second-track styling (not used by Praying for Her) — kept so the shared engine stays intact, tokenised to the palette. */
.hero-faith { background: color-mix(in srgb, var(--panel) 70%, var(--surface-solid)); }
.hero-faith .eyebrow { color: var(--accent); }
.hero-faith .sun { background: radial-gradient(circle, color-mix(in srgb, var(--lav) 40%, transparent), transparent 68%); }
.hero .track-label { display: inline-flex; align-items: center; gap: 8px; font: 800 0.74rem var(--sans); letter-spacing: 0.14em; text-transform: uppercase; }
.hero .hero-meta { display: flex; align-items: center; gap: 10px; margin-top: 14px; font: 600 0.84rem var(--sans); opacity: 0.85; }
.hero .mini-bar { flex: 1; height: 6px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 14%, transparent); overflow: hidden; }
.hero .mini-bar i { display: block; height: 100%; background: var(--bronze); border-radius: 99px; }
.today-note { display: flex; align-items: center; gap: 8px; font: 600 0.88rem var(--sans); color: var(--ink-2); }
.track-block + .track-block { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
.track-tag { font: 800 0.7rem var(--sans); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }

.companion { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 10px 14px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface-soft); text-decoration: none; color: inherit; flex-wrap: wrap; }
.companion .title { font: 650 0.95rem var(--sans); flex: 1; min-width: 40%; }

.hero .track-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.who-pill { font: 800 0.68rem var(--sans); letter-spacing: 0.12em; text-transform: uppercase; padding: 4px 10px; border-radius: 99px; background: var(--surface-soft); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }


.hero .track-sub { font: 600 0.88rem var(--sans); opacity: 0.8; margin: 6px 0 10px; }

.step-reflect { border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.step-reflect:focus { outline: none; }
.step-reflect .phrase { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; margin-bottom: 8px; }
.step-reflect .prompt { font-style: italic; }
.date-line { margin-top: 8px; }
.dates-months { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; }
.dates-months button { flex: 0 0 auto; scroll-snap-align: start; min-height: 44px; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface-solid); font: 650 0.92rem var(--sans); color: inherit; cursor: pointer; }
.dates-months button[aria-pressed="true"] { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bg); }
.dates-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-top: 12px; }
.dates-grid button { aspect-ratio: 1; min-height: 44px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-solid); font: 700 1rem var(--sans); color: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.dates-grid button small { font: 600 0.62rem var(--sans); opacity: 0.7; }
.dates-grid button.prayed { background: var(--mark-bg); color: var(--mark-ink); border-color: transparent; }
.dates-grid button.soon { opacity: 0.5; }
.dates-grid button.today { outline: 2px solid var(--accent); outline-offset: 1px; }
.dates-grid button.bonus { border-style: dashed; }

.sit-choices { display: grid; gap: 10px; margin-top: 10px; }
.sit-choice { display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; min-height: 48px; padding: 12px 16px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface-solid); font: 600 1rem var(--sans); color: inherit; cursor: pointer; }
.sit-choice:hover, .sit-choice:focus-visible { border-color: var(--accent); }
.breath { display: grid; place-items: center; gap: 14px; padding: 18px 0; }
.breath-ring { width: 96px; height: 96px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--bronze) 55%, var(--surface-solid)), color-mix(in srgb, var(--panel) 80%, var(--surface-solid))); opacity: .8; transform: scale(.7); transition: transform 4s ease-in-out; }
.breath-ring.in { transform: scale(1.25); }
.breath-word { font-family: var(--serif); font-size: 1.1rem; text-align: center; min-height: 3em; }
@media (prefers-reduced-motion: reduce) { .breath-ring { transition: none; } }

/* ---- Founder's story: a quiet editorial memoir ---- */
@font-face { font-family: "Lora"; src: url("../fonts/Lora-Variable.woff") format("woff"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Lora"; src: url("../fonts/Lora-Italic-Variable.woff") format("woff"); font-weight: 400 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Cardo"; src: url("../fonts/Cardo-Regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Cardo"; src: url("../fonts/Cardo-Italic.woff") format("woff"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Cardo"; src: url("../fonts/Cardo-Bold.woff") format("woff"); font-weight: 700; font-style: normal; font-display: swap; }
.story { --story-head: "Cormorant Garamond", "Cardo", "Iowan Old Style", Georgia, serif; --story-body: "Lora", Georgia, serif; max-width: 680px; margin: 0 auto; padding: 0 0 28px; }
.story-back { margin: 0 0 6px -10px; }
.story-head { padding: 14px 0 4px; }
.story-kicker { font: 700 0.7rem var(--sans); letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); margin: 0 0 14px; }
.story-head h1 { font-family: var(--story-head); font-weight: 600; font-size: clamp(2.3rem, 8.4vw, 3.5rem); line-height: 1.04; letter-spacing: -0.012em; text-wrap: balance; margin: 0; }
.story-sub { margin: 14px 0 0; font-family: var(--story-head); font-style: italic; font-weight: 500; font-size: clamp(1.2rem, 4.4vw, 1.5rem); line-height: 1.3; color: var(--ink-2); }
.story-by { margin: 18px 0 0; font: 650 0.72rem var(--sans); letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-2); }
.story-photo { margin: 26px 0 0; }
.story-photo img { display: block; width: 100%; max-width: 560px; height: auto; border-radius: 22px; border: 1px solid var(--border); box-shadow: 0 14px 34px -20px rgba(16, 28, 26, 0.55); }
.story-photo figcaption { margin-top: 10px; max-width: 560px; font: italic 0.92rem var(--story-body); color: var(--ink-2); }
.story-body { margin-top: 34px; font-family: var(--story-body); }
.story-body p { font-family: var(--story-body); font-size: 1.06rem; line-height: 1.82; margin: 0 0 1.2em; color: var(--ink); text-align: left; max-width: 36em; }
.story-body > p:first-child { font-size: 1.2rem; line-height: 1.7; }
.story-body h2 { position: relative; font-family: var(--story-head); font-weight: 600; font-size: clamp(1.7rem, 5.6vw, 2.15rem); line-height: 1.12; letter-spacing: -0.005em; text-align: left; text-wrap: balance; margin: 2.3em 0 0.7em; padding-top: 22px; max-width: 18em; }
.story-body h2::before { content: ""; position: absolute; top: 0; left: 0; width: 44px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--bronze), color-mix(in srgb, var(--bronze) 40%, transparent)); }
.story-body .story-strong { font-weight: 600; font-size: 1.1rem; }
.story-pull { margin: 2em 0; padding: 4px 0 4px 20px; max-width: 24em; border-left: 3px solid var(--bronze); font-family: var(--story-head); font-style: italic; font-weight: 500; font-size: clamp(1.45rem, 5vw, 1.85rem); line-height: 1.3; color: var(--ink); text-wrap: balance; }
.story-sign { margin-top: 2.6em; padding-top: 22px; border-top: 1px solid var(--border); text-align: left; }
.story-love { margin: 0; font-family: var(--story-head); font-style: italic; font-weight: 500; font-size: 1.35rem; color: var(--ink-2); }
.story-name { margin: 10px 0 0; font-family: var(--story-head); font-weight: 600; font-size: 2rem; line-height: 1.1; }
.story-role { margin: 8px 0 0; font: 650 0.7rem var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-2); }
.story-begin { margin-top: 30px; }
@media (min-width: 900px) { .story { max-width: 720px; } .story-body p { font-size: 1.1rem; } .story-body > p:first-child { font-size: 1.28rem; } }
/* first-time invitation */
.invite-wrap { min-height: 70vh; display: grid; place-items: center; padding: 8px 0 24px; }
.invite-card { width: 100%; max-width: 520px; padding: 34px 28px 28px; border-radius: 28px; border: 1px solid var(--border); background: color-mix(in srgb, var(--surface-solid) 82%, transparent); box-shadow: 0 18px 40px -26px rgba(16, 28, 26, 0.5); text-align: center; display: grid; justify-items: center; gap: 10px; }
.invite-eyebrow { margin-top: 8px; }
.invite-card h1 { font-family: "Cormorant Garamond", "Cardo", Georgia, serif; font-weight: 600; font-size: clamp(2rem, 7vw, 2.6rem); line-height: 1.1; margin: 0; }
.invite-quote { font-family: "Lora", Georgia, serif; font-style: italic; font-size: 1.08rem; line-height: 1.75; margin: 10px 0 12px; text-align: left; }
.invite-actions { width: 100%; display: grid; gap: 10px; margin-top: 4px; }
/* welcome intro + note link */
.intro-note { padding: 18px 20px; border-radius: 22px; border: 1px solid var(--border); background: color-mix(in srgb, var(--surface-solid) 70%, transparent); display: grid; gap: 10px; }
.intro-note p { font-family: var(--serif); font-size: 1.05rem; line-height: 1.6; margin: 0; }
.note-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font: 650 0.98rem var(--sans); color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.story-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 14px 16px; border-radius: 18px; border: 1px solid var(--border); background: linear-gradient(135deg, color-mix(in srgb, var(--panel) 80%, transparent), color-mix(in srgb, var(--bronze) 12%, transparent)); color: inherit; text-decoration: none; }
.story-card-text { display: grid; gap: 2px; }
.heart-note { text-align: center; border-style: dashed; }
.heart-note p { font-family: var(--serif); font-style: italic; font-size: 1.05rem; line-height: 1.6; margin: 0; }

/* ---- footer: small, quiet, at the very foot ---- */
.site-foot { margin: 40px 0 8px; padding: 14px 0 0; text-align: center; border-top: 1px solid var(--border); color: var(--ink-2); }
.foot-copy { margin: 0; font-size: 0.72rem; line-height: 1.5; font-weight: 400; }
.foot-rule { display: none; }
.foot-id { margin: 0 0 2px; font-size: 0.72rem; line-height: 1.5; font-weight: 600; letter-spacing: 0.02em; }
.foot-by { margin-top: 6px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.foot-logo { width: 24px; height: 24px; border-radius: 50%; flex: none; opacity: 1; }
.foot-brand { margin: 0; font-size: 0.72rem; line-height: 1.5; font-weight: 400; color: inherit; }
@media print { .site-foot { display: none; } }

/* ---- You: featured story + shortcuts ---- */
.story-feature { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 20px 22px; border-radius: 24px; border: 1px solid var(--border); text-decoration: none; color: inherit; background: linear-gradient(135deg, color-mix(in srgb, var(--panel) 90%, transparent), color-mix(in srgb, var(--bronze) 16%, transparent)); }
.story-feature-text { display: grid; gap: 4px; }
.story-feature b { font-family: "Cormorant Garamond", "Cardo", var(--serif); font-size: 1.7rem; font-weight: 600; line-height: 1.1; }
.shortcut-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.shortcut-row .shortcut { margin-top: 0; }

/* ---- Today: one column on phones, two on laptops ---- */
.today-grid { display: flex; flex-direction: column; gap: 24px; }
.today-main, .today-side { display: contents; }
.today-grid > .today-main > *, .today-grid > .today-side > * { margin-top: 0 !important; }
.today-side .row { display: flex; gap: 12px; }
.today-side .row > * { flex: 1; margin-top: 0; }

/* ---- Tablet: more room, same single column ---- */
@media (min-width: 700px) {
  .shell { max-width: 820px; }
  .tabbar ul { max-width: 820px; }
  main { padding-left: 32px; padding-right: 32px; }
  .topbar { padding-left: 32px; padding-right: 32px; }
  .focus-wrap { max-width: 760px; padding-left: 32px; padding-right: 32px; }
}

/* ---- Laptop / desktop: header navigation, two-column Today ---- */
@media (min-width: 1000px) {
  .shell { max-width: 1160px; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto 1fr; align-content: start; }
  .shell.no-tabs { display: flex; max-width: 820px; }
  .topbar { grid-column: 1; grid-row: 1; padding: 22px 0 10px 40px; }
  .tabbar { position: static; grid-column: 2; grid-row: 1; justify-content: flex-end; align-self: center; background: none; border: 0; -webkit-backdrop-filter: none; backdrop-filter: none; padding: 22px 40px 10px 0; }
  .tabbar ul { width: auto; max-width: none; gap: 4px; }
  .tabbar li { flex: none; }
  .tabbar a { flex-direction: row; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; font-size: 0.9rem; letter-spacing: 0.01em; }
  .tabbar a svg { width: 20px; height: 20px; }
  .tabbar a[aria-current="page"] { background: color-mix(in srgb, var(--accent) 12%, transparent); }
  main { grid-column: 1 / -1; padding: 16px 40px 56px; }
  .shell.no-tabs main { padding-bottom: 40px; }
  #toast { bottom: 28px; }
  .today-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 24px 32px; align-items: start; }
  .today-grid > .today-head { grid-column: 1 / -1; }
  .today-main, .today-side { display: flex; flex-direction: column; gap: 24px; }
  .today-grid > .today-notice { grid-column: 1 / -1; }
  /* Long reading stays comfortable on wide screens */
  .stack > .card, .stack-lg > .card { max-width: 100%; }
  main > .stack:not(.wide), main > .stack-lg:not(.today-grid) { max-width: 760px; margin-left: auto; margin-right: auto; }
}
