:root {
  --wine: #4c1f35;
  --plum: #74334f;
  --rose: #a75571;
  --ivory: #fff9f2;
  --sand: #f1e5d7;
  --paper: #fffdf9;
  --ink: #2e1c25;
  --muted: #675760;
  --olive: #556044;
  --gold: #a87639;
  --line: #e3d4c7;
  --shadow: 0 16px 40px rgba(76, 31, 53, .12);
  --radius: 22px;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--ivory); }
body { margin: 0; overflow-x: hidden; color: var(--ink); background: var(--ivory); font-family: var(--sans); font-size: 16px; line-height: 1.5; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid #dcae63; outline-offset: 3px; }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 100; padding: 9px 14px; color: #fff; background: var(--wine); border-radius: 10px; }
.skip-link:focus { top: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

.shell { width: min(100%, 680px); min-height: 100dvh; margin: 0 auto; padding: max(18px, env(safe-area-inset-top)) 18px calc(94px + env(safe-area-inset-bottom)); background: radial-gradient(circle at 100% 0%, #f5e3d0 0, transparent 30%), var(--ivory); }
.shell--no-nav { padding-bottom: max(24px, env(safe-area-inset-bottom)); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.brand { display: inline-flex; align-items: center; gap: 9px; border: 0; color: var(--wine); background: transparent; font-weight: 750; letter-spacing: .02em; }
.brand-mark { display: grid; width: 31px; height: 31px; place-items: center; color: var(--sand); background: var(--wine); border-radius: 10px; font-size: 16px; }
.eyebrow { margin: 0 0 7px; color: var(--plum); font-size: .78rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { overflow-wrap: anywhere; font-family: var(--serif); font-weight: 500; line-height: 1.08; }
h1 { margin-bottom: 14px; font-size: clamp(2rem, 8vw, 3.25rem); }
h2 { margin-bottom: 10px; font-size: clamp(1.62rem, 6vw, 2.25rem); }
h3 { margin-bottom: 5px; font-size: 1rem; }
.lead { max-width: 49ch; color: var(--muted); font-size: 1.04rem; }
.hero { padding: 25px 4px 8px; }
.hero .greeting { color: var(--olive); font-size: .94rem; font-weight: 700; }
.prayer-actions { display: grid; gap: 12px; margin: 29px 0 20px; }
.button { display: inline-flex; min-height: 52px; align-items: center; justify-content: center; gap: 9px; width: 100%; padding: 13px 17px; border: 1px solid transparent; border-radius: 16px; font-weight: 800; text-align: center; transition: transform .16s ease, background .16s ease, border .16s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: var(--wine); box-shadow: 0 8px 18px rgba(76,31,53,.2); font-size: 1.04rem; }
.button-secondary { color: var(--wine); background: var(--sand); border-color: #e4cebb; }
.button-quiet { color: var(--wine); background: transparent; border-color: var(--line); }
.button-small { min-height: 42px; width: auto; padding: 8px 13px; border-radius: 12px; font-size: .9rem; }
.intro-note { color: var(--muted); font-size: .89rem; text-align: center; }
.return-hint { display: block; margin: 14px auto 0; text-align: center; }
.section { margin-top: 31px; }
.section-heading { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.text-button { padding: 4px; border: 0; color: var(--plum); background: transparent; font-weight: 750; text-decoration: underline; }
.care-hint { display: block; margin: 12px auto 0; text-align: center; }
.care-line { flex-direction: column; align-items: flex-start; gap: 2px; height: auto; padding: 14px 17px; text-decoration: none; }
.care-line span { font-weight: 800; }
.care-line small { font-weight: 500; opacity: .85; }
.card { padding: 19px; border: 1px solid rgba(227,212,199,.9); border-radius: var(--radius); background: rgba(255,253,249,.9); box-shadow: 0 8px 22px rgba(76,31,53,.05); }
.daily-card { background: linear-gradient(130deg, #fffdf9, #f7ebdd); }
.daily-card p { margin-bottom: 13px; color: var(--muted); }
.soft-card { background: #f9eee3; }
.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }
.feature { min-height: 123px; padding: 16px; color: inherit; text-align: left; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); }
.feature span { display: block; margin-bottom: 10px; font-size: 1.45rem; }
.feature strong { display: block; font-size: .93rem; }
.feature small { display: block; margin-top: 3px; color: var(--muted); line-height: 1.3; }
.bottom-nav { position: fixed; right: 0; bottom: 0; left: 0; z-index: 5; display: flex; justify-content: center; padding: 8px max(13px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(13px, env(safe-area-inset-left)); border-top: 1px solid var(--line); background: rgba(255, 249, 242, .94); backdrop-filter: blur(14px); }
.bottom-nav-inner { display: grid; grid-template-columns: repeat(5, 1fr); width: min(680px, 100%); }
.nav-item { display: grid; min-height: 51px; place-items: center; gap: 1px; padding: 3px; border: 0; color: var(--muted); background: transparent; font-size: .73rem; }
.nav-item[aria-current='page'] { color: var(--wine); font-weight: 800; }
.nav-item .nav-icon { font-size: 1.15rem; }

.screen-header { display: flex; align-items: flex-start; gap: 9px; margin: 4px 0 24px; }
.back { display: grid; flex: 0 0 auto; width: 42px; height: 42px; place-items: center; border: 1px solid var(--line); border-radius: 13px; color: var(--wine); background: var(--paper); }
.screen-header > div { padding-top: 3px; }
.screen-header h1 { margin-bottom: 5px; font-size: 1.9rem; }
.screen-header p { margin-bottom: 0; color: var(--muted); font-size: .92rem; }
.choice-list { display: grid; gap: 10px; }
.choice { display: flex; width: 100%; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 17px; color: var(--ink); background: var(--paper); text-align: left; }
.choice:hover { border-color: #c497a8; }
.choice .emoji { font-size: 1.55rem; }
.choice strong, .choice small { display: block; }
.choice small { margin-top: 2px; color: var(--muted); }
.choice .arrow { margin-left: auto; color: var(--plum); font-size: 1.25rem; }
.duration-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 43px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--wine); background: var(--paper); font-weight: 750; }
.chip[aria-pressed='true'] { color: #fff; border-color: var(--wine); background: var(--wine); }
.divider { height: 1px; margin: 24px 0; background: var(--line); }
.subtle { color: var(--muted); font-size: .91rem; }
.safety { margin-top: 24px; padding: 14px; border-left: 4px solid var(--gold); border-radius: 0 13px 13px 0; background: #fff3df; color: #5b4327; font-size: .86rem; }

.prayer-stage { min-height: 73dvh; display: flex; flex-direction: column; }
.progress { display: flex; gap: 5px; margin: 18px 0 30px; }
.progress span { flex: 1; height: 5px; border-radius: 5px; background: var(--line); }
.progress span.done { background: var(--gold); }
.stage-label { margin-bottom: 10px; color: var(--olive); font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.prayer-copy { flex: 1; }
.prayer-copy h1 { font-size: clamp(2rem, 9vw, 3.15rem); }
.prayer-copy .prayer-text { color: var(--ink); font-family: var(--serif); font-size: 1.26rem; line-height: 1.62; }
.offered-prayer { margin-top: 22px; padding: 19px 20px; border-radius: 20px; background: var(--sand); }
.offered-tag { margin: 0 0 10px; color: var(--olive); font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.offered-prayer .prayer-text { font-size: 1.14rem; }
.offered-invite { margin: 14px 0 0; color: var(--muted); font-size: .87rem; font-style: italic; }
.conclusion-choices { display: flex; flex-direction: column; gap: 2px; margin: 26px 0 6px; }
.conclusion-choice { min-height: 46px; padding: 10px; border: 0; border-radius: 12px; background: transparent; color: var(--wine); font-weight: 700; text-align: center; }
.conclusion-choice:hover { background: rgba(76,31,53,.05); }
.pilot { display: inline-flex; margin: 8px 0 20px; padding: 5px 8px; border-radius: 8px; color: #67512f; background: #f5e7cd; font-size: .75rem; font-weight: 750; }
.audio-player { display: block; width: 100%; margin: 8px 0 20px; accent-color: var(--wine); }
.stage-actions { display: grid; gap: 10px; margin-top: 22px; }
.pause-card { padding: 24px 20px; border-radius: 22px; background: linear-gradient(135deg, var(--wine), #67324b); color: #fff; box-shadow: var(--shadow); }
.pause-card h1 { margin-bottom: 10px; }
.pause-card p { color: #f8e9df; }
.pause-card .button { margin-top: 13px; color: var(--wine); background: var(--sand); }
.pause-timer { display: flex; align-items: center; gap: 9px; margin: 20px 0 6px; font-family: var(--serif); font-size: 1.08rem; color: #f8e9df; font-variant-numeric: tabular-nums; }
.pause-dot { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: #f2c9b0; animation: pause-breathe 4s ease-in-out infinite; }
@keyframes pause-breathe { 0%, 100% { transform: scale(.7); opacity: .5; } 50% { transform: scale(1.15); opacity: 1; } }
.word-card { padding: 22px; border-radius: 22px; border: 1px solid #dac5a7; background: #fff5e6; }
.word-card blockquote { margin: 0 0 11px; font-family: var(--serif); font-size: 1.22rem; line-height: 1.45; }
.word-card cite { color: var(--olive); font-size: .88rem; font-style: normal; font-weight: 800; }
.complete-mark { display: grid; width: 68px; height: 68px; place-items: center; margin: 17px auto; border-radius: 50%; color: #fff; background: var(--olive); font-size: 2rem; }
.complete { text-align: center; }

.sofia-intro { padding: 25px 21px; border-radius: 24px; background: linear-gradient(145deg, #5e293f, #3e1b2c); color: #fff; }
.sofia-intro .eyebrow { color: #ead9c9; }
.sofia-intro p { color: #faebdf; }
.sofia-note { margin-top: 14px; font-size: .83rem; }
.sofia-options { display: grid; gap: 9px; }
.sofia-option { width: 100%; min-height: 67px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 15px; color: var(--ink); background: var(--paper); text-align: left; }
.sofia-option strong, .sofia-option small { display: block; }
.sofia-option small { margin-top: 2px; color: var(--muted); }
.sofia-option.is-selected { border-color: var(--plum); background: #faedf1; box-shadow: inset 0 0 0 1px var(--plum); }
.sofia-form { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.sofia-form label { display: block; font-weight: 750; }
.sofia-form label span { color: var(--muted); font-weight: 500; }
.sofia-form textarea { min-height: 92px; margin-top: 8px; }
.sofia-response { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fffdf9; }
.sofia-response > p:not(.eyebrow):not(.sofia-note) { font-family: var(--serif); font-size: 1.18rem; line-height: 1.55; }
.sofia-error { margin: 12px 0; color: #8a302b; font-weight: 700; }
.form-field { display: grid; gap: 7px; margin: 17px 0; }
.form-field label { font-weight: 750; }
textarea, input { width: 100%; padding: 13px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: var(--paper); }
textarea { min-height: 124px; resize: vertical; }
.entry { padding: 15px 0; border-bottom: 1px solid var(--line); }
.entry:last-child { border-bottom: 0; }
.entry time { color: var(--muted); font-size: .8rem; }
.entry-delete { display: inline-block; margin-top: 8px; padding: 2px 0; border: 0; color: var(--muted); background: transparent; font-size: .82rem; text-decoration: underline; }
.entry-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 10px; padding: 11px 13px; border-radius: 12px; background: #fbeae7; color: #7a2e22; font-size: .87rem; }
.entry-confirm .text-button { padding: 0; color: #7a2e22; }
.empty { padding: 24px; border: 1px dashed #cfb7a6; border-radius: 18px; color: var(--muted); text-align: center; }
.toast { position: fixed; right: 16px; bottom: 86px; left: 16px; z-index: 10; width: min(480px, calc(100% - 32px)); margin: 0 auto; padding: 12px 14px; border-radius: 13px; color: #fff; background: var(--ink); box-shadow: var(--shadow); }

@media (min-width: 720px) { .shell { border-right: 1px solid #eadfd4; border-left: 1px solid #eadfd4; } .bottom-nav { left: 50%; width: min(680px, 100%); transform: translateX(-50%); border-right: 1px solid #eadfd4; border-left: 1px solid #eadfd4; } }
@media (max-width: 480px) { .shell:has(.prayer-stage--journey) { padding-top: 12px; padding-bottom: 82px; } .shell:has(.prayer-stage--journey) .topbar { margin-bottom: 12px; } .prayer-stage--journey .progress { margin: 8px 0 14px; } .prayer-stage--journey .prayer-copy h1 { margin-bottom: 8px; font-size: clamp(1.85rem, 8vw, 2.45rem); } .prayer-stage--journey .lead { margin-bottom: 10px; font-size: 1rem; } .prayer-stage--journey .offered-prayer { margin-top: 12px; padding: 14px 16px; } .prayer-stage--journey .pilot { margin: 4px 0 10px; } .prayer-stage--journey .stage-actions { margin-top: 12px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }

