:root {
  --sage-900: #52614c;
  --sage-700: #829578;
  --sage-500: #9cad91;
  --sage-200: #d9e2d4;
  --sage-100: #eef2eb;
  --cream: #f6efe7;
  --paper: #fffdfa;
  --blush: #dfcabc;
  --rose: #b98282;
  --dusty-rose: #caa6a2;
  --oat: #e9ded1;
  --taupe: #897267;
  --brown: #6f5b52;
  --ink: #493d37;
  --muted: #786c66;
  --shadow: 0 16px 38px rgba(84, 67, 52, .09);
}

* { box-sizing: border-box; }
html { background: var(--oat); }
body { margin: 0; color: var(--ink); background: linear-gradient(145deg, #eadfd4 0%, #e8eee4 100%); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, textarea, input { font: inherit; }
button { color: inherit; }
.app-shell { width: min(100%, 520px); min-height: 100dvh; margin: 0 auto; background: var(--cream); box-shadow: 0 0 80px rgba(33, 49, 39, .12); position: relative; }
.topbar { padding: max(18px, env(safe-area-inset-top)) 20px 14px; display: grid; grid-template-columns: 42px 1fr 42px; gap: 11px; align-items: center; position: sticky; top: 0; z-index: 20; background: rgba(251, 248, 241, .93); backdrop-filter: blur(16px); border-bottom: 1px solid rgba(80, 104, 91, .08); }
.topbar h1 { margin: 1px 0 0; font-family: Georgia, serif; font-size: 20px; font-weight: 600; letter-spacing: -.3px; }
.brand-mark { width: 42px; height: 42px; border-radius: 50% 50% 50% 10%; display: grid; place-items: center; color: white; background: var(--sage-700); font-family: Georgia, serif; font-size: 21px; }
.eyebrow { margin: 0; color: var(--sage-700); font-size: 10px; font-weight: 800; letter-spacing: 1.55px; }
.icon-button { border: 0; border-radius: 50%; background: var(--sage-100); width: 40px; height: 40px; font-size: 22px; cursor: pointer; }
main { padding: 12px 18px 110px; }
.screen { display: none; animation: fadeIn .28s ease; }
.screen.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } }
.welcome-card { border-radius: 26px; padding: 24px; color: white; background: linear-gradient(135deg, var(--taupe), var(--dusty-rose)); display: flex; align-items: flex-start; justify-content: space-between; box-shadow: var(--shadow); overflow: hidden; position: relative; }
.welcome-card::after { content: ""; position: absolute; width: 130px; height: 130px; right: -44px; bottom: -68px; border-radius: 50%; border: 1px solid rgba(255,255,255,.22); }
.welcome-card .date { margin: 0 0 10px; font-size: 12px; opacity: .76; text-transform: uppercase; letter-spacing: 1px; }
.welcome-card h2, .page-heading h2, dialog h2 { margin: 0; font-family: Georgia, serif; font-size: 28px; font-weight: 500; line-height: 1.12; }
.welcome-card p:last-child { max-width: 320px; margin: 10px 0 0; color: rgba(255,255,255,.79); line-height: 1.5; font-size: 14px; }
.leaf { font-size: 42px; opacity: .45; transform: rotate(22deg); }
.card, .verse-card, .breathing-card { margin-top: 16px; padding: 20px; border-radius: 22px; background: var(--paper); border: 1px solid rgba(80,104,91,.10); box-shadow: 0 7px 24px rgba(58,74,64,.06); }
.section-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.section-heading h3, .card h3 { margin: 4px 0 0; font-family: Georgia, serif; font-size: 20px; font-weight: 500; }
.mini-status { border-radius: 20px; padding: 6px 10px; background: var(--sage-100); color: var(--sage-700); font-size: 11px; font-weight: 700; }
fieldset { border: 0; padding: 0; margin: 22px 0; }
legend, .range-label, .text-label { font-size: 13px; font-weight: 700; margin-bottom: 10px; display: block; }
.mood-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.mood { border: 1px solid transparent; background: transparent; border-radius: 13px; padding: 8px 2px; font-size: 10px; color: var(--muted); cursor: pointer; }
.mood span { display: block; font-size: 24px; margin-bottom: 4px; filter: grayscale(.25); }
.mood.selected { border-color: var(--sage-500); background: var(--sage-100); color: var(--sage-900); font-weight: 700; }
.mood.selected span { filter: none; transform: scale(1.08); }
.range-label { display: flex; justify-content: space-between; }
input[type="range"] { width: 100%; accent-color: var(--sage-700); margin: 0 0 20px; }
textarea { width: 100%; padding: 14px; color: var(--ink); background: #f8f7f2; border: 1px solid #dde3dc; border-radius: 14px; resize: vertical; outline: 0; line-height: 1.5; }
textarea:focus { border-color: var(--sage-500); box-shadow: 0 0 0 3px var(--sage-100); }
.self-care-fieldset { margin: 20px 0 4px; padding: 17px; border-radius: 18px; background: linear-gradient(145deg, #f4ebe3, #f8f4ee); border: 1px solid #dfcfc2; box-shadow: inset 4px 0 0 var(--dusty-rose); }
.self-care-fieldset legend { margin: 0; padding: 0 5px; color: var(--taupe); font-family: Georgia, serif; font-size: 18px; font-weight: 600; }
.care-note { margin: 2px 0 10px; color: var(--muted); font-size: 12px; }
.care-option { min-height: 42px; display: flex; align-items: center; gap: 10px; padding: 9px 0; color: var(--ink); font-size: 14px; border-bottom: 1px solid #e8e0d6; cursor: pointer; }
.care-option:last-child { border-bottom: 0; }
.care-option input[type="checkbox"] { width: 19px; height: 19px; flex: 0 0 auto; accent-color: var(--sage-700); }
.other-care input[type="text"] { min-width: 0; flex: 1; border: 0; border-bottom: 1px solid #bfae9d; background: transparent; padding: 7px 2px; outline: 0; color: var(--ink); }
.other-care input[type="text"]:focus { border-bottom-color: var(--sage-700); }
.primary-button { width: 100%; border: 0; border-radius: 14px; background: var(--sage-700); color: white; padding: 14px 18px; margin-top: 13px; font-weight: 750; cursor: pointer; box-shadow: 0 6px 16px rgba(80,104,91,.18); }
.primary-button:active { transform: translateY(1px); }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.color-quick { grid-column: 1 / -1; }
.quick-card { border: 1px solid rgba(80,104,91,.10); background: var(--paper); border-radius: 19px; padding: 14px; display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer; }
.quick-card strong, .quick-card small { display: block; }
.quick-card strong { font-family: Georgia, serif; font-size: 15px; }
.quick-card small { color: var(--muted); margin-top: 3px; font-size: 10px; }
.quick-icon { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 13px; display: grid; place-items: center; font-size: 20px; }
.quick-icon.breathe { background: var(--sage-100); color: var(--sage-700); }
.quick-icon.write { background: #f4e9e3; color: var(--rose); }
.quick-icon.color { background: #eee3d5; color: var(--brown); }
.shop-card { margin-top: 16px; padding: 19px; border-radius: 22px; background: linear-gradient(140deg, #eef2eb, #f5e8e2); border: 1px solid #d8ded4; box-shadow: 0 7px 24px rgba(58,74,64,.06); display: grid; grid-template-columns: 48px 1fr; gap: 13px; align-items: center; }
.shop-flower { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: white; background: var(--sage-700); font-size: 24px; box-shadow: 0 7px 16px rgba(80,104,91,.16); }
.shop-copy h3 { margin: 3px 0 0; font: 600 19px/1.2 Georgia, serif; }
.shop-copy > p:last-child { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.shop-button { grid-column: 1 / -1; display: block; border-radius: 14px; padding: 13px 16px; color: white; background: var(--taupe); text-align: center; text-decoration: none; font-size: 14px; font-weight: 750; box-shadow: 0 6px 16px rgba(111,91,82,.16); }
.shop-button:focus-visible { outline: 3px solid var(--sage-500); outline-offset: 3px; }
.shop-button:active { transform: translateY(1px); }
.verse-card { background: linear-gradient(135deg, #f2e4de, #fffaf6); border-color: #e5cfca; }
.verse-card blockquote { margin: 12px 0 6px; font-family: Georgia, serif; font-size: 20px; line-height: 1.35; }
.verse-card > p:last-of-type { margin: 0; color: var(--rose); font-size: 12px; }
.text-button, .support-link { border: 0; background: transparent; padding: 0; color: var(--sage-700); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 12px; }
.verse-card .text-button { margin-top: 14px; }
.support-link { display: block; margin: 22px auto 2px; color: var(--rose); }
.page-heading { padding: 18px 5px 4px; }
.page-heading h2 { margin-top: 6px; color: var(--sage-900); }
.page-heading > p:last-child { color: var(--muted); line-height: 1.5; font-size: 14px; }
.prompt-card { margin-top: 12px; padding: 23px; border-radius: 22px; background: var(--sage-900); color: white; box-shadow: var(--shadow); }
.prompt-number { color: #cbd9ce; font-size: 10px; font-weight: 800; letter-spacing: 1.4px; }
.prompt-card h3 { margin: 13px 0 17px; font: 500 23px/1.35 Georgia, serif; }
.prompt-card .text-button { color: #e7efe9; }
.journal-area { min-height: 250px; }
.journal-actions { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 12px; }
.primary-button.compact { width: auto; padding: 11px 17px; }
.entries-card .danger { color: var(--rose); }
.empty-state { color: var(--muted); font-size: 13px; line-height: 1.5; text-align: center; padding: 24px 6px 8px; }
.entry { padding: 14px 0; border-top: 1px solid #e8ebe6; }
.entry:first-child { margin-top: 12px; }
.entry time { color: var(--muted); font-size: 10px; }
.entry p { margin: 7px 0 0; line-height: 1.45; font-size: 13px; white-space: pre-wrap; }
.breathing-card { padding: 28px 20px 22px; text-align: center; background: linear-gradient(180deg, #e6eee7, #fffdfa); }
.breathing-orb { width: 180px; height: 180px; border-radius: 50%; margin: 10px auto 20px; display: grid; place-items: center; color: white; background: radial-gradient(circle at 35% 30%, #98ad9d, var(--sage-700)); box-shadow: 0 0 0 18px rgba(130,153,139,.10), 0 14px 30px rgba(50,70,59,.18); transition: transform 4s ease-in-out, background 1s; }
.breathing-orb.inhale { transform: scale(1.15); }
.breathing-orb.exhale { transform: scale(.86); transition-duration: 6s; }
.breathing-orb span { font: 500 22px Georgia, serif; }
.breathing-card > p { color: var(--muted); font-size: 13px; }
.color-heading { text-align: center; padding-inline: 14px; }
.color-studio { margin-top: 12px; padding: 15px; border-radius: 24px; background: var(--oat); border: 1px solid #dbcbbc; box-shadow: var(--shadow); }
.design-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-bottom: 14px; }
.design-option { min-height: 40px; border: 1px solid #d4c2b4; border-radius: 12px; background: rgba(255,253,250,.7); color: var(--taupe); font-size: 11px; font-weight: 700; cursor: pointer; }
.design-option.selected { border-color: var(--sage-700); background: var(--sage-100); color: var(--sage-900); box-shadow: inset 0 0 0 1px var(--sage-500); }
.color-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 2px 2px 14px; }
.palette { display: flex; flex-wrap: wrap; gap: 7px; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid rgba(68,56,47,.15); cursor: pointer; box-shadow: inset 0 0 0 2px rgba(255,255,255,.45); }
.swatch.selected { outline: 2px solid var(--brown); outline-offset: 2px; transform: scale(1.06); }
.new-page-button { flex: 0 0 auto; border: 0; border-radius: 999px; padding: 10px 13px; color: white; background: var(--sage-700); font-size: 12px; font-weight: 750; cursor: pointer; }
.coloring-paper { width: 100%; aspect-ratio: 420 / 520; overflow: hidden; border-radius: 12px; background: var(--paper); box-shadow: 0 8px 24px rgba(77,58,43,.10); }
.coloring-paper svg { display: block; width: 100%; height: 100%; background: var(--paper); }
.colorable-shape { stroke: var(--brown); stroke-width: 2; vector-effect: non-scaling-stroke; cursor: pointer; transition: fill .18s ease; }
.colorable-shape:hover { stroke: var(--sage-900); stroke-width: 3; }
.color-hint { margin: 12px 0 1px; color: var(--muted); text-align: center; font-size: 12px; }
.grounding-card ul { list-style: none; padding: 6px 0 0; margin: 0; }
.grounding-card li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #edf0eb; font-size: 14px; }
.grounding-card li:last-child { border: 0; }
.grounding-card li strong { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--sage-100); color: var(--sage-700); }
.prayer { font: 500 18px/1.55 Georgia, serif !important; color: var(--ink) !important; }
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; }
.summary-grid div + div { border-left: 1px solid #e2e8e2; }
.summary-grid span, .summary-grid small { display: block; }
.summary-grid span { font: 500 25px Georgia, serif; color: var(--sage-700); }
.summary-grid small { color: var(--muted); font-size: 10px; margin-top: 4px; }
.mood-chart { min-height: 150px; display: flex; align-items: flex-end; justify-content: space-around; gap: 8px; padding: 18px 4px 0; }
.mood-chart .bar-wrap { flex: 1; height: 130px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 5px; }
.mood-chart .bar { width: min(28px, 80%); border-radius: 10px 10px 4px 4px; background: linear-gradient(180deg, var(--sage-500), var(--sage-700)); min-height: 12px; }
.mood-chart small { font-size: 9px; color: var(--muted); }
.gentle-note { display: flex; gap: 14px; align-items: flex-start; background: #f6eee8; }
.gentle-note > span { color: var(--rose); font-size: 25px; }
.gentle-note p { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.bottom-nav { position: fixed; bottom: 0; width: min(100%, 520px); display: grid; grid-template-columns: repeat(5, 1fr); z-index: 30; padding: 9px 5px max(10px, env(safe-area-inset-bottom)); background: rgba(255,253,250,.96); backdrop-filter: blur(18px); border-top: 1px solid rgba(80,104,91,.12); }
.nav-item { border: 0; background: transparent; color: #89928c; font-size: 10px; font-weight: 650; padding: 5px; cursor: pointer; }
.nav-item span { display: block; font-size: 21px; height: 25px; }
.nav-item.active { color: var(--sage-700); }
dialog { width: min(calc(100% - 32px), 450px); border: 0; border-radius: 24px; padding: 0; color: var(--ink); background: var(--paper); box-shadow: 0 25px 80px rgba(25,36,29,.30); }
dialog::backdrop { background: rgba(30,42,35,.55); backdrop-filter: blur(4px); }
.dialog-content { padding: 27px; position: relative; }
.dialog-content h2 { margin-top: 9px; }
.dialog-content > p:not(.eyebrow) { color: var(--muted); font-size: 14px; line-height: 1.55; }
.dialog-close { position: absolute; right: 17px; top: 14px; border: 0; background: transparent; font-size: 27px; color: var(--muted); cursor: pointer; }
.toast { position: fixed; left: 50%; bottom: 94px; transform: translate(-50%, 20px); z-index: 50; opacity: 0; pointer-events: none; background: var(--sage-900); color: white; padding: 11px 16px; border-radius: 20px; font-size: 12px; transition: .25s; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
[hidden] { display: none !important; }
@media (min-width: 700px) { body { padding: 24px 0; } .app-shell { min-height: calc(100dvh - 48px); border-radius: 28px; overflow: hidden; } .bottom-nav { border-radius: 0 0 28px 28px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }
