:root {
  color-scheme: light;
  --canvas: #f7f7f2;
  --paper: #ffffff;
  --ink: #29332d;
  --muted: #748078;
  --line: #e6e8e1;
  --sage: #9baa91;
  --sage-dark: #53674f;
  --sage-soft: #e4eadf;
  --apricot: #f2c9a4;
  --apricot-soft: #fdf0e3;
  --lilac: #dcd7ee;
  --blue-soft: #e2edf0;
  --shadow: 0 12px 35px rgba(39, 51, 44, .07);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
.sticky-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.sticky-note { position:relative; padding:24px 16px 12px; border-radius:3px 3px 18px 3px; box-shadow:0 5px 12px #29332d12; background:#fbefbd; color:#453e28; overflow-wrap:anywhere; }
.sticky-note:before { content:''; position:absolute; width:46px; height:12px; top:0; left:calc(50% - 23px); background:#ffffff75; }
.sticky-1 { background:#e2ecd5; color:#344530; }.sticky-2 { background:#f2dce8; color:#513541; }
.sticky-body { white-space:pre-wrap; line-height:1.55; font-size:14px; }
.sticky-note footer { display:flex; flex-wrap:wrap; gap:8px; align-items:center; justify-content:space-between; font-size:11px; opacity:.85; }
.sticky-note .text-button { color:inherit; font-size:11px; }
:root[data-mode="dark"] .sticky-note { background:#4b432e; color:#f9eec8; }
:root[data-mode="dark"] .sticky-1 { background:#344632; color:#e3efd8; }
:root[data-mode="dark"] .sticky-2 { background:#503a48; color:#f7e0ee; }
@media(max-width:380px) {.sticky-grid { grid-template-columns:1fr; }}
textarea { font:inherit; width:100%; resize:vertical; padding:12px; border:1px solid var(--line); border-radius:12px; background:var(--paper); color:var(--ink); }
.recipe-method { white-space:pre-wrap; line-height:1.6; }
.recipe-title { width:100%; border:0; background:transparent; color:var(--ink); text-align:left; padding:4px 0; }
.planned-meal { display:grid; gap:5px; margin-top:12px; padding-top:12px; border-top:1px solid var(--line); }
.planned-meal strong { text-transform:capitalize; font-size:12px; color:var(--muted); }
:root[data-theme="ocean"] { --sage-dark:#376779; --sage:#81acbb; --sage-soft:#dfedf1; }
:root[data-theme="rose"] { --sage-dark:#8c5267; --sage:#ba8d9e; --sage-soft:#f1e2e8; }
:root[data-theme="lavender"] { --sage-dark:#6b5894; --sage:#a799c5; --sage-soft:#eae4f3; }
:root[data-mode="dark"] { color-scheme:dark; --canvas:#18201d; --paper:#222c27; --ink:#edf2ed; --muted:#b1bcb3; --line:#3b4840; --sage-dark:#bacdaf; --sage:#8caa80; --sage-soft:#344536; --apricot-soft:#493c30; }
:root[data-mode="dark"][data-theme="ocean"] { --sage-dark:#9fd2e3; --sage-soft:#2b444e; }
:root[data-mode="dark"][data-theme="rose"] { --sage-dark:#e6b2c4; --sage-soft:#4b333e; }
:root[data-mode="dark"][data-theme="lavender"] { --sage-dark:#cbbbeb; --sage-soft:#3e3553; }
.settings-panel { padding:22px; }
.theme-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin:18px 0; }
.theme-choice { display:flex; align-items:center; gap:10px; padding:14px; border:2px solid var(--line); border-radius:14px; background:var(--paper); color:var(--ink); }
.theme-choice.chosen { border-color:var(--sage-dark); }
.theme-dot { width:20px; height:20px; border-radius:50%; background:#53674f; }
.theme-dot.ocean { background:#376779; }.theme-dot.rose { background:#8c5267; }.theme-dot.lavender { background:#6b5894; }
.row-actions { display:flex; justify-content:flex-end; gap:18px; padding:4px 0 9px; }
.danger { color:#ac5360; }
.task-detail { border-bottom:1px solid var(--line); }
.task-detail .task-row { border:0; }
.event-detail { padding:16px; border-bottom:1px solid var(--line); }
.event-detail:last-child { border:0; }
.event-detail time { display:block; margin-bottom:6px; color:var(--sage-dark); font-size:13px; }
.empty-state { padding:18px 0; }
.calendar-picker { display:grid; gap:8px; margin-top:18px; font-size:13px; color:var(--muted); }
.calendar-picker input, select { padding:12px; border:1px solid var(--line); border-radius:12px; background:var(--paper); color:var(--ink); }
.checkbox-label { display:flex !important; align-items:center; }
.checkbox-label input { width:20px; height:20px; }
#extra-fields { margin:0; }
.entry-dialog { max-height:90vh; overflow:auto; }
:root[data-mode="dark"] .hero { background:var(--sage-soft); }
:root[data-mode="dark"] .hero-copy p { color:var(--ink); }
:root[data-mode="dark"] .tabbar { background:#222c27ee; }
:root[data-mode="dark"] .quick-button, :root[data-mode="dark"] .day-pill { background:var(--paper); }
:root[data-mode="dark"] .primary-button, :root[data-mode="dark"] .pill.active, :root[data-mode="dark"] .floating-add, :root[data-mode="dark"] .check.done { color:var(--canvas); }
:root[data-mode="dark"] .budget-card, :root[data-mode="dark"] .message-bubble, :root[data-mode="dark"] .icon-button { background:var(--sage-soft); color:var(--ink); }
:root[data-mode="dark"] .library-card { background:var(--paper); color:var(--ink); }
:root[data-mode="dark"] .library-card p { color:var(--muted); }
:root[data-mode="dark"] .entry-dialog input { background:var(--canvas); color:var(--ink); border-color:var(--line); }
[hidden] { display: none !important; }
.cloud-form { display: grid; gap: 14px; margin: 20px 0; text-align: left; }
.cloud-form label { display: grid; gap: 6px; font-size: 13px; }
.cloud-form input { width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
button:disabled { opacity: .5; cursor: wait; }
html { background: var(--canvas); }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--canvas); }
button, input { font: inherit; }
button { cursor: pointer; }

.app-shell { max-width: 700px; min-height: 100vh; margin: 0 auto; padding: max(16px, env(safe-area-inset-top)) 18px calc(96px + env(safe-area-inset-bottom)); }
.topbar { display: flex; align-items: center; justify-content: space-between; height: 46px; margin-bottom: 21px; }
.wordmark { display: inline-flex; align-items: center; gap: 9px; padding: 0; border: 0; color: var(--ink); background: none; font-family: Georgia, "Times New Roman", serif; font-size: 25px; font-weight: 600; letter-spacing: -1.1px; }
.mark { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 9px 9px 9px 3px; background: var(--sage-dark); color: #fff; font-family: Georgia, serif; font-size: 18px; line-height: 1; }
.avatar-button { width: 37px; height: 37px; border: 1px solid #cad5c5; border-radius: 50%; background: var(--sage-soft); color: var(--sage-dark); font-weight: 700; }

.screen { animation: appear .22s ease-out; }
@keyframes appear { from { opacity: .35; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.eyebrow { margin: 0 0 5px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(30px, 7vw, 42px); line-height: 1.04; letter-spacing: -1.8px; }
h2 { margin-bottom: 7px; font-size: 21px; letter-spacing: -.7px; }
h3 { margin-bottom: 4px; font-size: 15px; letter-spacing: -.2px; }
.subtle { color: var(--muted); font-size: 14px; line-height: 1.55; }
.muted { color: var(--muted); }
.section-heading { display: flex; justify-content: space-between; align-items: end; margin: 28px 1px 12px; }
.section-heading h2 { margin: 0; }
.text-button { padding: 5px 0; border: 0; background: transparent; color: var(--sage-dark); font-size: 13px; font-weight: 700; }

.hero { display: grid; gap: 19px; padding: 25px 23px; border-radius: 25px; background: linear-gradient(135deg, #e7eee2, #f1f2e8); box-shadow: var(--shadow); overflow: hidden; }
.hero-copy { max-width: 410px; }
.hero-copy p { margin: 0; color: #526151; line-height: 1.5; }
.day-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid rgba(83, 103, 79, .15); border-radius: 999px; color: var(--sage-dark); background: rgba(255,255,255,.58); font-size: 12px; font-weight: 700; }
.hero-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.quick-button { padding: 10px 13px; border: 1px solid rgba(83,103,79,.17); border-radius: 11px; background: rgba(255,255,255,.75); color: var(--sage-dark); font-size: 13px; font-weight: 700; }

.card { border: 1px solid var(--line); border-radius: 19px; background: var(--paper); box-shadow: 0 4px 18px rgba(39, 51, 44, .025); }
.up-next { padding: 5px 15px; }
.event-row { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; min-height: 70px; border-bottom: 1px solid var(--line); }
.event-row:last-child { border-bottom: 0; }
.event-date { display: grid; width: 42px; height: 42px; place-content: center; border-radius: 13px; background: var(--apricot-soft); color: #9b6134; font-size: 11px; font-weight: 800; line-height: 1.05; text-align: center; text-transform: uppercase; }
.event-date strong { display: block; font-size: 16px; }
.event-row p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.event-time { color: var(--sage-dark); font-size: 12px; font-weight: 700; white-space: nowrap; }

.two-col { display: grid; gap: 13px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mini-card { min-height: 142px; padding: 17px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); text-align: left; box-shadow: 0 4px 15px rgba(39,51,44,.025); }
.mini-card .card-icon { display: grid; width: 32px; height: 32px; margin-bottom: 18px; place-items: center; border-radius: 10px; background: var(--sage-soft); color: var(--sage-dark); font-size: 17px; }
.mini-card.peach .card-icon { background: var(--apricot-soft); color: #a56937; }
.mini-card.lilac .card-icon { background: #f0edf9; color: #766891; }
.mini-card h3 { margin: 0 0 3px; }
.mini-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.4; }

.countdown { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 18px; border-radius: 19px; background: #35493b; color: #fff; overflow: hidden; }
.countdown .eyebrow { color: #bfcbbb; }
.countdown h3 { margin: 0; font-size: 18px; }
.countdown p { margin: 4px 0 0; color: #dce5d8; font-size: 13px; }
.count-number { min-width: 68px; font-family: Georgia, serif; font-size: 42px; line-height: .85; letter-spacing: -2px; text-align: center; }
.count-number small { display: block; margin-top: 7px; font-family: inherit; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }

.tabbar { position: fixed; z-index: 5; right: 0; bottom: 0; left: 0; display: flex; justify-content: center; gap: min(6vw, 39px); padding: 9px 15px max(10px, env(safe-area-inset-bottom)); border-top: 1px solid rgba(230,232,225,.9); background: rgba(255,255,252,.93); backdrop-filter: blur(12px); }
.nav-item { display: grid; min-width: 45px; gap: 3px; padding: 3px 2px; border: 0; background: transparent; color: #909890; font-size: 10px; line-height: 1.1; text-align: center; }
.nav-item > span:first-child { height: 21px; font-size: 20px; line-height: 18px; font-weight: 400; }
.nav-item.active { color: var(--sage-dark); font-weight: 800; }

.plan-strip { display: flex; gap: 9px; margin: 18px -18px 0; padding: 0 18px 2px; overflow-x: auto; scrollbar-width: none; }
.plan-strip::-webkit-scrollbar { display: none; }
.date-chip { min-width: 57px; padding: 10px 8px; border: 1px solid var(--line); border-radius: 15px; background: var(--paper); color: var(--muted); font-size: 11px; font-weight: 700; text-align: center; }
.date-chip strong { display: block; margin-top: 4px; color: var(--ink); font-size: 19px; }
.date-chip.selected { border-color: var(--sage-dark); background: var(--sage-dark); color: #dfe9dc; }
.date-chip.selected strong { color: #fff; }
.timeline { position: relative; margin: 24px 0 0 9px; padding-left: 22px; border-left: 1px solid #d8ded5; }
.timeline-entry { position: relative; padding: 0 0 24px; }
.timeline-entry::before { position: absolute; top: 4px; left: -28px; width: 10px; height: 10px; border: 3px solid var(--canvas); border-radius: 50%; background: var(--sage); content: ""; }
.timeline-entry:last-child { padding-bottom: 0; }
.timeline-entry p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.timeline-entry time { color: var(--sage-dark); font-size: 11px; font-weight: 800; text-transform: uppercase; }

.meal-board { display: grid; gap: 9px; }
.meal-row { display: flex; align-items: center; gap: 13px; padding: 13px; }
.meal-emoji { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 14px; background: var(--apricot-soft); font-size: 20px; }
.meal-row p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.meal-row .day { margin-left: auto; color: var(--sage-dark); font-size: 11px; font-weight: 800; }

.list-tabs { display: flex; gap: 7px; margin: 18px 0; overflow-x: auto; scrollbar-width: none; }
.pill { padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
.pill.active { border-color: var(--sage-dark); background: var(--sage-dark); color: white; }
.list-card { padding: 6px 15px; }
.task-row { display: flex; align-items: center; gap: 12px; min-height: 57px; border-bottom: 1px solid var(--line); }
.task-row:last-child { border-bottom: 0; }
.check { display: grid; width: 22px; height: 22px; flex: 0 0 22px; place-items: center; border: 1.5px solid #bbc5b8; border-radius: 8px; background: transparent; color: white; font-size: 13px; }
.check.done { border-color: var(--sage-dark); background: var(--sage-dark); }
.task-label { flex: 1; font-size: 14px; }
.task-label.done { color: var(--muted); text-decoration: line-through; }
.tag { padding: 4px 7px; border-radius: 7px; background: var(--sage-soft); color: var(--sage-dark); font-size: 10px; font-weight: 800; }
.add-row { display: flex; width: 100%; align-items: center; gap: 10px; padding: 14px 1px 4px; border: 0; background: transparent; color: var(--sage-dark); font-size: 13px; font-weight: 800; text-align: left; }
.add-symbol { display: grid; width: 24px; height: 24px; place-items: center; border: 1px dashed var(--sage); border-radius: 8px; font-size: 18px; }

.library-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 13px; }
.library-card { min-height: 160px; padding: 16px; border: 0; border-radius: 19px; color: var(--ink); text-align: left; }
.library-card > span { display: block; margin-bottom: 34px; font-size: 27px; }
.library-card h3 { margin: 0 0 3px; }
.library-card p { margin: 0; color: rgba(41,51,45,.65); font-size: 12px; }
.library-card.recipes { background: #e8efdF; }
.library-card.gallery { background: #f9e7d9; }
.library-card.documents { background: #e8e7f3; }
.library-card.memories { background: #e1eff1; }
.recipe-feature { display: grid; grid-template-columns: 72px 1fr; gap: 15px; align-items: center; padding: 14px; }
.recipe-image { display: grid; width: 72px; height: 72px; place-items: center; border-radius: 15px; background: #e8efdF; font-size: 30px; }
.recipe-feature p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }

.budget-card { padding: 20px; background: #e9efe5; border: 0; }
.budget-card .amount { margin: 5px 0 17px; color: var(--sage-dark); font-family: Georgia, serif; font-size: 35px; letter-spacing: -1.5px; }
.budget-bar { height: 7px; overflow: hidden; border-radius: 99px; background: rgba(83,103,79,.15); }
.budget-bar span { display: block; width: 62%; height: 100%; border-radius: inherit; background: var(--sage-dark); }
.budget-foot { display: flex; justify-content: space-between; margin-top: 8px; color: #596a58; font-size: 11px; }
.message-card { padding: 16px; }
.message { display: flex; gap: 10px; margin: 0 0 14px; }
.message:last-child { margin-bottom: 0; }
.message-avatar { display: grid; width: 28px; height: 28px; flex: 0 0 28px; place-items: center; border-radius: 50%; background: var(--lilac); color: #635c7d; font-size: 11px; font-weight: 800; }
.message-avatar.you { background: var(--sage-soft); color: var(--sage-dark); }
.message-bubble { max-width: 80%; padding: 10px 12px; border-radius: 4px 13px 13px 13px; background: #f3f4f0; font-size: 13px; line-height: 1.38; }
.message-bubble.you { border-radius: 13px 4px 13px 13px; background: var(--sage-soft); }
.message-bubble small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }

.profile-card { padding: 22px; text-align: center; }
.profile-icon { display: grid; width: 54px; height: 54px; margin: 0 auto 12px; place-items: center; border-radius: 50%; background: var(--sage-soft); color: var(--sage-dark); font-size: 18px; font-weight: 800; }
.settings-list { margin-top: 15px; padding: 0 15px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; min-height: 53px; border-bottom: 1px solid var(--line); font-size: 14px; }
.setting-row:last-child { border: 0; }
.setting-row span:last-child { color: var(--muted); }

.floating-add { position: fixed; right: max(20px, calc((100vw - 700px) / 2 + 20px)); bottom: calc(82px + env(safe-area-inset-bottom)); display: grid; width: 48px; height: 48px; place-items: center; border: 0; border-radius: 50%; background: var(--sage-dark); color: white; box-shadow: 0 8px 22px rgba(53,73,59,.26); font-size: 28px; font-weight: 300; }
.toast { position: fixed; z-index: 10; bottom: 98px; left: 50%; padding: 11px 14px; border-radius: 999px; background: #29332d; color: #fff; font-size: 13px; opacity: 0; pointer-events: none; transform: translate(-50%, 10px); transition: .22s ease; white-space: nowrap; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.entry-dialog { width: min(100% - 28px, 440px); margin: auto 14px 14px; padding: 17px; border: 0; border-radius: 24px; background: var(--paper); box-shadow: 0 15px 60px rgba(20,30,23,.22); }
.entry-dialog::backdrop { background: rgba(25,35,28,.22); backdrop-filter: blur(2px); }
.entry-dialog form { display: grid; gap: 16px; }
.dialog-handle { width: 36px; height: 4px; margin: 0 auto -7px; border-radius: 9px; background: #dfe3dc; }
.dialog-heading { display: flex; justify-content: space-between; align-items: start; }
.dialog-heading h2 { margin: 0; }
.icon-button { display: grid; width: 30px; height: 30px; place-items: center; border: 0; border-radius: 50%; background: #f1f3ef; color: var(--ink); font-size: 22px; }
.entry-dialog label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 800; }
.entry-dialog input { width: 100%; padding: 13px; border: 1px solid #d9ded6; border-radius: 12px; color: var(--ink); outline-color: var(--sage); }
.primary-button { padding: 13px 16px; border: 0; border-radius: 13px; background: var(--sage-dark); color: white; font-weight: 800; }
.hidden { display: none !important; }

@media (min-width: 650px) {
  .app-shell { padding-right: 30px; padding-left: 30px; }
  .tabbar { border: 1px solid var(--line); border-radius: 20px; right: auto; bottom: 20px; left: 50%; width: 445px; transform: translateX(-50%); box-shadow: var(--shadow); }
  .floating-add { bottom: 94px; }
  .plan-strip { margin-right: -30px; margin-left: -30px; padding-right: 30px; padding-left: 30px; }
}
