/* =====================================================================
   Guided Daily — design system
   Calm, warm, trustworthy. Sage + warm gold by default; Plus themes below.
   ===================================================================== */

:root,
[data-theme="sage"] {
  --bg: #F6F3EC;            /* warm linen */
  --surface: #FFFDF8;
  --surface-2: #EFEADF;
  --ink: #26302A;
  --ink-2: #5A645D;
  --line: #E1DACB;
  --primary: #5E7A62;       /* sage */
  --primary-strong: #465E4A;
  --primary-soft: #E3EBE1;
  --accent: #C49A45;        /* warm gold */
  --accent-soft: #F5EAD2;
  --plum: #7A5A78;  --plum-soft: #EFE4EE;
  --rose: #B86B6B;  --rose-soft: #F6E3E0;
  --sky: #5B7F95;   --sky-soft: #E1ECF1;
  --ok: #4F7B55;    --danger: #A94A43;  --danger-soft: #F7E1DE;
  --evening-bg: #2E3A45; --evening-ink: #F3EEE3;
  --on-primary: #FFFFFF;
  --shadow-sm: 0 1px 2px rgba(38, 48, 42, .06);
  --shadow: 0 2px 10px rgba(38, 48, 42, .07), 0 1px 2px rgba(38, 48, 42, .05);
  --shadow-lg: 0 18px 50px rgba(38, 48, 42, .18);
  color-scheme: light;
}

[data-theme="plum"] {
  --bg: #F5F1F4; --surface: #FFFCFE; --surface-2: #ECE4EA; --ink: #2E2430; --ink-2: #665A67; --line: #E2D6DF;
  --primary: #7A5A78; --primary-strong: #5E435C; --primary-soft: #EFE4EE; --accent: #C49A45; --accent-soft: #F5EAD2;
}

[data-theme="rose"] {
  --bg: #F8F2F0; --surface: #FFFCFB; --surface-2: #F0E4E1; --ink: #33282A; --ink-2: #6C5B5D; --line: #E8D8D4;
  --primary: #A9605F; --primary-strong: #874847; --primary-soft: #F6E3E0; --accent: #C49A45; --accent-soft: #F5EAD2;
}

[data-theme="midnight"] {
  --bg: #141A21; --surface: #1C242D; --surface-2: #242E39; --ink: #EAE6DC; --ink-2: #A5ACB3; --line: #313D49;
  --primary: #8FB097; --primary-strong: #A8C7AF; --primary-soft: #26352C; --accent: #D9B061; --accent-soft: #3A3222;
  --plum-soft: #34283A; --rose-soft: #3B2A2A; --sky-soft: #22323D; --danger-soft: #3D2522;
  --evening-bg: #0F1419; --on-primary: #10161B;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.3); --shadow: 0 2px 12px rgba(0,0,0,.35); --shadow-lg: 0 18px 50px rgba(0,0,0,.5);
  color-scheme: dark;
}


[data-theme="gold"] {
  --bg: #F7F2E6; --surface: #FFFCF4; --surface-2: #F0E7D2; --ink: #2F2A1E; --ink-2: #6B634F; --line: #E6DBC2;
  --primary: #A8832F; --primary-strong: #86681F; --primary-soft: #F3E8C9; --accent: #5E7A62; --accent-soft: #E3EBE1; --on-primary: #fff;
}
[data-theme="clay"] {
  --bg: #F7EFEA; --surface: #FFFBF8; --surface-2: #F0E2DA; --ink: #33261F; --ink-2: #6E5A4F; --line: #E8D6CB;
  --primary: #B0694B; --primary-strong: #8C4F36; --primary-soft: #F5E1D6; --accent: #C49A45; --accent-soft: #F5EAD2; --on-primary: #fff;
}
[data-theme="ocean"] {
  --bg: #EEF3F6; --surface: #FBFDFE; --surface-2: #E1EAF0; --ink: #1F2C35; --ink-2: #566874; --line: #D4E0E8;
  --primary: #4F7C96; --primary-strong: #3A6179; --primary-soft: #DDEAF1; --accent: #D0A24F; --accent-soft: #F5EAD2; --on-primary: #fff;
}
[data-theme="charcoal"] {
  --bg: #1B1B1D; --surface: #242427; --surface-2: #2D2D31; --ink: #EEEAE2; --ink-2: #A9A59C; --line: #38383D;
  --primary: #D1A94F; --primary-strong: #E3BE6A; --primary-soft: #3A3222; --accent: #8FB097; --accent-soft: #26352C;
  --plum-soft: #34283A; --rose-soft: #3B2A2A; --sky-soft: #22323D; --danger-soft: #3D2522;
  --evening-bg: #111113; --on-primary: #1B1B1D;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow: 0 2px 12px rgba(0,0,0,.4); --shadow-lg: 0 18px 50px rgba(0,0,0,.55);
  color-scheme: dark;
}

/* ---------- Bold, masculine themes ---------- */
[data-theme="navy"] {
  --bg: #EEF1F5; --surface: #FBFCFD; --surface-2: #E2E7EE; --ink: #16202C; --ink-2: #4E5B6B; --line: #D3DAE3;
  --primary: #2C4A6E; --primary-strong: #1E3552; --primary-soft: #DDE5EF; --accent: #C08A3E; --accent-soft: #F2E5CF; --on-primary: #fff;
}
[data-theme="forest"] {
  --bg: #EEF2EE; --surface: #FBFCFA; --surface-2: #E0E8E0; --ink: #18241C; --ink-2: #4F5E53; --line: #D2DDD3;
  --primary: #2F5D46; --primary-strong: #214534; --primary-soft: #DCE8DF; --accent: #B5562A; --accent-soft: #F3DFD3; --on-primary: #fff;
}
[data-theme="slate"] {
  --bg: #EFF1F3; --surface: #FCFCFD; --surface-2: #E3E6EA; --ink: #1D2228; --ink-2: #555D66; --line: #D6DADF;
  --primary: #4A5A6A; --primary-strong: #34414E; --primary-soft: #E1E6EB; --accent: #1F7A8C; --accent-soft: #D6ECF0; --on-primary: #fff;
}
[data-theme="espresso"] {
  --bg: #F3EEE9; --surface: #FDFBF8; --surface-2: #EAE1D8; --ink: #2A1F18; --ink-2: #66564B; --line: #E0D4C8;
  --primary: #5C3D2E; --primary-strong: #432B20; --primary-soft: #EDE1D8; --accent: #B8893E; --accent-soft: #F3E6CE; --on-primary: #fff;
}
.theme-swatch--navy .theme-swatch__preview i:nth-child(1) { background: #EEF1F5; } .theme-swatch--navy .theme-swatch__preview i:nth-child(2) { background: #2C4A6E; } .theme-swatch--navy .theme-swatch__preview i:nth-child(3) { background: #C08A3E; }
.theme-swatch--forest .theme-swatch__preview i:nth-child(1) { background: #EEF2EE; } .theme-swatch--forest .theme-swatch__preview i:nth-child(2) { background: #2F5D46; } .theme-swatch--forest .theme-swatch__preview i:nth-child(3) { background: #B5562A; }
.theme-swatch--slate .theme-swatch__preview i:nth-child(1) { background: #EFF1F3; } .theme-swatch--slate .theme-swatch__preview i:nth-child(2) { background: #4A5A6A; } .theme-swatch--slate .theme-swatch__preview i:nth-child(3) { background: #1F7A8C; }
.theme-swatch--espresso .theme-swatch__preview i:nth-child(1) { background: #F3EEE9; } .theme-swatch--espresso .theme-swatch__preview i:nth-child(2) { background: #5C3D2E; } .theme-swatch--espresso .theme-swatch__preview i:nth-child(3) { background: #B8893E; }

/* ---------- Guided Daily signature theme (from the app icon: deep forest green + gold) ---------- */
[data-theme="guided"] {
  --bg: #F5F0E6; --surface: #FFFCF5; --surface-2: #EDE5D5; --ink: #1E2A24; --ink-2: #58645C; --line: #E2D8C5;
  --primary: #2E4136; --primary-strong: #1F2E26; --primary-soft: #E1E8E0; --accent: #D09848; --accent-soft: #F6E7CB;
  --on-primary: #FFF8EA;
}
.theme-swatch--guided .theme-swatch__preview i:nth-child(1) { background: #F5F0E6; } .theme-swatch--guided .theme-swatch__preview i:nth-child(2) { background: #2E4136; } .theme-swatch--guided .theme-swatch__preview i:nth-child(3) { background: #D09848; }

/* The real app icon wherever the brand mark appears */
.brand__mark { background: url("../images/app-icon-192.png") center / cover no-repeat !important; box-shadow: 0 4px 12px rgba(31, 46, 38, .25); }

:root {
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r-sm: 8px; --r: 14px; --r-lg: 20px; --r-pill: 999px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --t: 180ms var(--ease);
  --sidebar-w: 256px;
  --focus: 0 0 0 3px color-mix(in srgb, var(--accent) 55%, transparent);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; font-size: calc(16px * var(--text-scale, 1)); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1rem/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; line-height: 1.2; margin: 0 0 var(--s2); letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.3rem); }
h2 { font-size: 1.3rem; }
h3, .h3 { font-size: 1.15rem; }
.h4, h4 { font-size: 1rem; font-family: var(--font-body); font-weight: 600; letter-spacing: 0; }
p { margin: 0 0 var(--s3); }
a { color: var(--primary-strong); text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
::selection { background: var(--accent-soft); }
blockquote { margin: var(--s2) 0; padding: var(--s2) var(--s3); border-left: 3px solid var(--line); color: var(--ink-2); }
details > summary { cursor: pointer; font-weight: 500; }

.muted { color: var(--ink-2); }
.small { font-size: .875rem; }
.center { text-align: center; justify-content: center; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.stack { display: flex; flex-direction: column; gap: var(--s4); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s4); }
.page-narrow { max-width: 640px; margin: var(--s7) auto; }
.error-text { color: var(--danger); }
.label { font-size: .875rem; font-weight: 500; color: var(--ink-2); }
.divider { display: flex; align-items: center; gap: var(--s3); color: var(--ink-2); font-size: .85rem; margin: var(--s4) 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--surface); padding: var(--s2) var(--s3); border-radius: var(--r-sm); }
.skip-link:focus { left: 8px; }

/* ---------- Shell ---------- */
.shell { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: var(--sidebar-w) 1fr; }
.sidebar {
  position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto;
  display: flex; flex-direction: column; gap: var(--s4);
  padding: var(--s5) var(--s3); background: var(--surface); border-right: 1px solid var(--line);
}
.sidebar__nav { flex: 1; }
.sidebar__foot { display: flex; flex-direction: column; gap: var(--s2); border-top: 1px solid var(--line); padding-top: var(--s3); }
.sidebar__foot form { margin: 0; }
.main { padding: var(--s6) clamp(var(--s4), 4vw, var(--s7)) var(--s7); max-width: 1180px; width: 100%; outline: none; }

.brand { display: flex; align-items: center; gap: var(--s3); text-decoration: none; color: var(--ink); padding: 0 var(--s2); }
.brand__mark {
  width: 34px; height: 34px; flex: none; border-radius: 11px;
  background:
    radial-gradient(circle at 70% 30%, var(--accent) 0 22%, transparent 23%),
    linear-gradient(145deg, var(--primary) 0%, var(--primary-strong) 100%);
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.08);
}
.brand__mark--lg { width: 64px; height: 64px; border-radius: 20px; }
.brand__text { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; line-height: 1.1; display: flex; flex-direction: column; }
.brand__text small { font-family: var(--font-body); font-size: .72rem; font-weight: 400; color: var(--ink-2); letter-spacing: .02em; }

.nav-groups { display: flex; flex-direction: column; gap: var(--s4); }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-group__label { font-size: .7rem; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-2); padding: 0 var(--s3) var(--s1); font-weight: 600; }
.nav-item {
  display: flex; align-items: center; gap: var(--s3); padding: 9px var(--s3); border-radius: var(--r-sm);
  color: var(--ink-2); text-decoration: none; font-size: .94rem; transition: background var(--t), color var(--t);
  background: none; border: 0; width: 100%; text-align: left; cursor: pointer;
}
.nav-item:hover { background: var(--surface-2); color: var(--ink); }
.nav-item.active { background: var(--primary-soft); color: var(--primary-strong); font-weight: 600; }
.nav-item.active .icon { color: var(--primary); }
.plus-badge { display: inline-flex; align-items: center; gap: var(--s2); padding: 6px var(--s3); border-radius: var(--r-pill); font-size: .82rem; text-decoration: none; background: var(--surface-2); color: var(--ink-2); align-self: flex-start; }
.plus-badge.is-plus { background: var(--accent-soft); color: var(--ink); }
.plus-badge .icon { color: var(--accent); }

.bottom-nav, .sheet, .sheet-backdrop { display: none; }

/* ---------- Cards & headers ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--s5); box-shadow: var(--shadow-sm); margin-bottom: var(--s4);
}
.stack > .card, .grid-2 > .card, .dash__grid > .card { margin-bottom: 0; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s3); }
.card__title { font-family: var(--font-body); font-size: .95rem; font-weight: 600; display: flex; align-items: center; gap: var(--s2); margin: 0; }
.card__title .icon { color: var(--primary); }
.card--gold { background: linear-gradient(160deg, var(--surface) 0%, var(--accent-soft) 140%); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.card--gold .card__title .icon { color: var(--accent); }
.card--evening { background: var(--evening-bg); color: var(--evening-ink); border-color: transparent; }
.card--evening .card__title .icon { color: var(--accent); }
.card--evening .muted { color: color-mix(in srgb, var(--evening-ink) 70%, transparent); }
.card--quiet { background: var(--surface-2); border-color: transparent; box-shadow: none; padding: var(--s4); }
.card--companion { background: linear-gradient(160deg, var(--surface) 30%, var(--primary-soft) 140%); }

.section-header { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s5); }
.section-header p { margin: 0; }
.section-header__actions { display: flex; gap: var(--s2); flex-wrap: wrap; }

.stat { display: flex; align-items: center; gap: var(--s3); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s3) var(--s4); min-width: 180px; flex: 1; }
.stat__value { font-family: var(--font-display); font-size: 1.4rem; line-height: 1.1; }
.stat__label { font-size: .8rem; color: var(--ink-2); }
.stats-row { display: flex; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s4); }
.stats-row--wrap .stat { flex: 1 1 200px; }

.icon { flex: none; }
.icon-tile { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; flex: none; }
.icon-tile--sage { background: var(--primary-soft); color: var(--primary-strong); }
.icon-tile--gold { background: var(--accent-soft); color: color-mix(in srgb, var(--accent) 75%, var(--ink)); }
.icon-tile--plum { background: var(--plum-soft); color: var(--plum); }
.icon-tile--rose { background: var(--rose-soft); color: var(--rose); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 42px; padding: 0 18px; border-radius: var(--r-pill); border: 1px solid transparent;
  font-weight: 500; font-size: .94rem; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background var(--t), border-color var(--t), transform var(--t), box-shadow var(--t);
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn--primary { background: var(--primary); color: var(--on-primary); box-shadow: var(--shadow-sm); }
.btn--primary:hover:not(:disabled) { background: var(--primary-strong); }
.btn--secondary { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn--secondary:hover:not(:disabled) { border-color: var(--primary); }
.btn--ghost { background: transparent; color: var(--ink-2); }
.btn--ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--ink); }
.btn--gold { background: var(--accent); color: #2A2213; }
.btn--gold:hover:not(:disabled) { filter: brightness(.95); }
.btn--danger { background: var(--danger-soft); color: var(--danger); }
.btn--danger:hover:not(:disabled) { background: var(--danger); color: #fff; }
.btn--sm { min-height: 34px; padding: 0 12px; font-size: .86rem; }
.btn--block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; transition: background var(--t), color var(--t); }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn.is-fav { color: var(--accent); }
.icon-btn.is-fav svg { fill: currentColor; }
.link-btn { background: none; border: 0; padding: 2px 4px; color: var(--ink-2); font-size: .82rem; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.link-btn:hover { color: var(--ink); }
.link-btn.danger { color: var(--danger); }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Forms ---------- */
.form { display: flex; flex-direction: column; gap: var(--s3); }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: .875rem; font-weight: 500; color: var(--ink-2); }
.form__actions { display: flex; justify-content: flex-end; gap: var(--s2); flex-wrap: wrap; margin-top: var(--s2); }
.input {
  width: 100%; min-height: 44px; padding: 10px 14px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 400;
  transition: border-color var(--t), box-shadow var(--t);
}
textarea.input { resize: vertical; line-height: 1.55; }
.input:focus { outline: none; border-color: var(--primary); box-shadow: var(--focus); }
.input:disabled { background: var(--surface-2); color: var(--ink-2); }
.input--writing { font-family: var(--font-display); font-size: 1.05rem; line-height: 1.7; background: color-mix(in srgb, var(--surface) 70%, var(--accent-soft)); }
.input--inline { width: auto; min-width: 160px; }
.input--code { text-transform: uppercase; letter-spacing: .15em; font-weight: 600; }
.range { width: 100%; accent-color: var(--primary); }
.check { flex-direction: row !important; align-items: center; gap: var(--s2) !important; font-weight: 400 !important; color: var(--ink) !important; cursor: pointer; }
.check input, .switch input { width: 18px; height: 18px; accent-color: var(--primary); }
.switch { display: inline-flex; align-items: center; gap: var(--s2); cursor: pointer; font-size: .9rem; }
.switch--lg { font-size: 1rem; font-weight: 500; margin-bottom: var(--s3); }
.validation-message { color: var(--danger); font-size: .82rem; margin-top: -6px; }
.invalid { border-color: var(--danger) !important; }
.alert { padding: var(--s3) var(--s4); border-radius: var(--r-sm); font-size: .92rem; margin: 0 0 var(--s3); }
.alert--info { background: var(--sky-soft); color: var(--ink); }
.alert--success { background: var(--primary-soft); color: var(--ink); }
.alert--error { background: var(--danger-soft); color: var(--danger); }
.search { position: relative; flex: 1; min-width: 200px; }
.search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-2); }
.search .input { padding-left: 38px; }
.filters { display: flex; gap: var(--s3); flex-wrap: wrap; align-items: center; margin-bottom: var(--s4); }
.inline-add { display: flex; gap: var(--s2); align-items: center; margin-top: var(--s3); }
.inline-add .input { flex: 1; }

/* ---------- Feedback ---------- */
.modal-backdrop, .sheet-backdrop { position: fixed; inset: 0; background: rgba(20, 26, 22, .42); z-index: 40; animation: fade .2s var(--ease); }
.modal {
  position: fixed; z-index: 41; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); overflow: auto;
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); animation: rise .22s var(--ease);
}
.modal__head { display: flex; justify-content: space-between; align-items: center; padding: var(--s4) var(--s5); border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.modal__head h2 { margin: 0; font-size: 1.2rem; }
.modal__body { padding: var(--s5); display: flex; flex-direction: column; gap: var(--s3); }
.modal__body label { display: flex; flex-direction: column; gap: 6px; font-size: .875rem; color: var(--ink-2); font-weight: 500; }
.modal__foot { padding: var(--s3) var(--s5); border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: var(--s2); }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translate(-50%, -46%); } }

.toasts { position: fixed; right: var(--s4); bottom: var(--s4); z-index: 60; display: flex; flex-direction: column; gap: var(--s2); max-width: min(380px, calc(100vw - 32px)); }
.toast { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s3) var(--s3) var(--s3) var(--s4); border-radius: var(--r); background: var(--ink); color: var(--bg); box-shadow: var(--shadow-lg); font-size: .92rem; animation: toast .25s var(--ease); }
.toast .icon-btn { color: inherit; opacity: .7; }
.toast--success { border-left: 4px solid var(--primary); }
.toast--error { border-left: 4px solid var(--danger); }
.toast--info { border-left: 4px solid var(--accent); }
@keyframes toast { from { opacity: 0; transform: translateY(8px); } }

.empty { text-align: center; padding: var(--s6) var(--s4); display: flex; flex-direction: column; align-items: center; gap: var(--s2); }
.empty h3 { margin: var(--s2) 0 0; }
.empty p { max-width: 42ch; }
.loading { display: flex; align-items: center; gap: var(--s3); color: var(--ink-2); padding: var(--s5) 0; }

.progress { height: 8px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.progress__fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: inherit; transition: width .5s var(--ease); }
.progress__value { font-size: .78rem; color: var(--ink-2); margin-top: 4px; }

.pill { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink-2); font-size: .75rem; font-weight: 500; white-space: nowrap; }
.pill--gold, .pill--praise { background: var(--accent-soft); color: color-mix(in srgb, var(--accent) 60%, var(--ink)); }
.pill--rose { background: var(--rose-soft); color: var(--rose); }
.pill--ok, .pill--prayer { background: var(--primary-soft); color: var(--primary-strong); }
.pill--encouragement { background: var(--plum-soft); color: var(--plum); }

/* ---------- Mood / streak / chips / tabs ---------- */
.mood { border: 0; padding: 0; margin: 0; }
.mood__options { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--s2); }
.mood__btn { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: var(--s3) var(--s1); border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); cursor: pointer; transition: all var(--t); }
.mood__btn:hover { border-color: var(--primary); }
.mood__btn.is-on { background: var(--primary-soft); border-color: var(--primary); }
.mood__face { font-size: 1.6rem; line-height: 1; }
.mood__label { font-size: .75rem; color: var(--ink-2); }

.streak { display: flex; align-items: center; gap: var(--s2); background: var(--accent-soft); border-radius: var(--r); padding: var(--s3) var(--s4); }
.streak .icon { color: var(--accent); }
.streak__num { font-family: var(--font-display); font-size: 1.8rem; line-height: 1; }
.streak__label { font-size: .85rem; color: var(--ink-2); }

.chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: .86rem; transition: all var(--t); max-width: 100%; text-align: left; }
.chip:hover { border-color: var(--primary); }
.chip.is-on { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.chip__time { font-size: .72rem; opacity: .8; }
.chip__title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip--sage { background: var(--primary-soft); border-color: transparent; }
.chip--gold { background: var(--accent-soft); border-color: transparent; }
.chip--plum { background: var(--plum-soft); border-color: transparent; }
.chip--rose { background: var(--rose-soft); border-color: transparent; }
.chip--sky { background: var(--sky-soft); border-color: transparent; }

.tabs { display: flex; gap: var(--s1); overflow-x: auto; margin-bottom: var(--s5); border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: 10px var(--s3); border: 0; background: none; cursor: pointer; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-weight: 500; }
.tab:hover { color: var(--ink); }
.tab.is-on { color: var(--primary-strong); border-bottom-color: var(--primary); }
.cal-toolbar .tabs { margin-bottom: 0; border: 0; }

.plus-gate { display: flex; gap: var(--s4); align-items: flex-start; background: var(--accent-soft); border-radius: var(--r); padding: var(--s4); }
.plus-gate h3 { font-family: var(--font-body); font-size: 1rem; font-weight: 600; }

/* ---------- Lists ---------- */
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.list__item { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s3); padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.list__item:last-child { border-bottom: 0; }
.list__item > div:first-child { flex: 1; min-width: 0; }
.list__item p { margin: 4px 0 0; }
.list__actions { display: flex; gap: 2px; align-items: center; flex: none; }
.list--compact .list__item { padding: var(--s2) 0; }
.goal.is-done strong { text-decoration: line-through; color: var(--ink-2); }
.goal__main { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.mini-goal { display: flex; flex-direction: column; gap: 4px; margin-top: var(--s3); font-size: .88rem; }
.is-answered { background: linear-gradient(90deg, var(--accent-soft), transparent 70%); border-radius: var(--r-sm); padding-left: var(--s2); }
.answered { color: color-mix(in srgb, var(--accent) 60%, var(--ink)); }

.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.check-row { display: flex; align-items: center; gap: var(--s3); width: 100%; padding: 8px; border: 0; border-radius: var(--r-sm); background: transparent; cursor: pointer; text-align: left; transition: background var(--t); }
.check-row:hover { background: var(--surface-2); }
.check-row__box { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; border: 1.5px solid var(--line); color: transparent; flex: none; transition: all var(--t); }
.check-row.is-done .check-row__box { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.check-row.is-done .check-row__text { text-decoration: line-through; color: var(--ink-2); }
.check-row__text { flex: 1; }
.task.is-done .check-row__text { text-decoration: line-through; color: var(--ink-2); }
.overdue { color: var(--danger); font-weight: 500; }

/* ---------- Dashboard ---------- */
.dash { display: flex; flex-direction: column; gap: var(--s5); }
.dash__hello h1 { margin: 0; }
.dash__hello p { margin: 0 0 var(--s1); }
.verse { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s5) var(--s6); position: relative; overflow: hidden; }
.verse::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--accent); }
.verse__text { font-family: var(--font-display); font-size: clamp(1.15rem, 1rem + .6vw, 1.45rem); line-height: 1.5; margin-bottom: var(--s2); }
.verse__ref { font-size: .88rem; font-weight: 600; color: var(--primary-strong); margin-bottom: var(--s3); }
.verse__encourage { font-size: .92rem; color: var(--ink-2); margin: 0; }
.dash__stats { display: grid; grid-template-columns: auto 1fr; gap: var(--s4); align-items: stretch; }
.dash__progress { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s3) var(--s4); display: flex; flex-direction: column; gap: var(--s2); justify-content: center; }
.dash__progress p { margin: 0; }
.dash__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--s4); }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s2); }
.quick a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: var(--s3) var(--s1); border-radius: var(--r); text-decoration: none; color: var(--ink); font-size: .85rem; transition: background var(--t); }
.quick a:hover { background: var(--surface-2); }
.companion-prompt { font-family: var(--font-display); font-size: 1.15rem; margin-bottom: var(--s2); }

/* ---------- Journal / split layout ---------- */
.split { display: grid; grid-template-columns: 300px 1fr; gap: var(--s5); align-items: start; }
.split__list { position: sticky; top: var(--s4); display: flex; flex-direction: column; gap: var(--s3); max-height: calc(100vh - 32px); overflow: auto; }
.split__main { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s5); min-width: 0; }
.entry-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.entry-list__item { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "date mood" "title mood"; gap: 2px var(--s2); width: 100%; text-align: left; padding: var(--s3); border-radius: var(--r-sm); border: 1px solid transparent; background: transparent; cursor: pointer; }
.entry-list__item:hover { background: var(--surface); }
.entry-list__item.is-on { background: var(--surface); border-color: var(--line); }
.entry-list__date { grid-area: date; font-size: .75rem; color: var(--ink-2); text-transform: uppercase; letter-spacing: .05em; }
.entry-list__title { grid-area: title; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry-list__item > span:last-child:not(.entry-list__title) { grid-area: mood; align-self: center; }
.prompt-box { background: var(--accent-soft); border-radius: var(--r); padding: var(--s3) var(--s4); display: flex; flex-direction: column; gap: var(--s2); }
.prompt-box__text { font-family: var(--font-display); font-size: 1.05rem; display: flex; gap: var(--s2); align-items: flex-start; margin: 0; }
.prompt-box__text .icon { color: var(--accent); margin-top: 4px; }

/* ---------- Evening ---------- */
.evening { max-width: 760px; }
.evening__form { background: var(--evening-bg); color: var(--evening-ink); border-radius: var(--r-lg); padding: var(--s6); margin-bottom: var(--s6); }
.evening__q { display: flex; flex-direction: column; gap: var(--s2); color: inherit !important; }
.evening__question { font-family: var(--font-display); font-size: 1.2rem; font-weight: 500; }
.evening__form .input { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); color: var(--evening-ink); }
.evening__form .input::placeholder { color: rgba(255,255,255,.45); }

/* ---------- Companion ---------- */
.companion { display: grid; grid-template-columns: 260px 1fr; gap: var(--s4); height: calc(100dvh - 2 * var(--s6)); min-height: 520px; }
.companion__side { display: flex; flex-direction: column; gap: var(--s3); overflow: auto; }
.companion__chat { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; min-width: 0; }
.companion__head { display: flex; align-items: flex-start; gap: var(--s3); padding: var(--s4) var(--s5); border-bottom: 1px solid var(--line); }
.companion__head p { margin: 0; }
.companion__toggle { display: none; }
.companion__links { margin-top: auto; display: flex; flex-direction: column; gap: var(--s2); }
.companion__links a { display: flex; align-items: center; gap: var(--s2); }
.companion__chat > .alert { margin: var(--s3) var(--s5) 0; }
.convo-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.convo-list li { display: flex; align-items: center; border-radius: var(--r-sm); }
.convo-list li.is-on, .convo-list li:hover { background: var(--surface); }
.convo-list__open { flex: 1; text-align: left; background: none; border: 0; padding: 10px var(--s3); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
.chat { flex: 1; overflow-y: auto; padding: var(--s5); display: flex; flex-direction: column; gap: var(--s3); scroll-behavior: smooth; }
.chat__welcome { margin: auto; text-align: center; max-width: 460px; display: flex; flex-direction: column; align-items: center; gap: var(--s3); }
.chat__welcome .chips { justify-content: center; }
.bubble { max-width: min(640px, 88%); padding: var(--s3) var(--s4); border-radius: 18px; line-height: 1.6; }
.bubble p { margin: 0 0 var(--s2); white-space: pre-wrap; }
.bubble p:last-child { margin: 0; }
.bubble--user { align-self: flex-end; background: var(--primary); color: var(--on-primary); border-bottom-right-radius: 6px; }
.bubble--ai { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 6px; }
.bubble__who { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); margin-bottom: 4px; font-weight: 600; }
.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-2); animation: blink 1.2s infinite both; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.composer { display: flex; gap: var(--s2); align-items: flex-end; padding: var(--s3) var(--s4); border-top: 1px solid var(--line); background: var(--surface); }
.composer textarea { flex: 1; min-height: 48px; max-height: 180px; }
.memory-note { display: flex; align-items: center; gap: 6px; padding: 0 var(--s5); margin: var(--s2) 0 0; }
.companion__chat > .alert--error { margin: var(--s2) var(--s5); }

/* ---------- Photo scan ---------- */
.scan { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--s4); align-items: start; }
.upload { display: flex; flex-direction: column; align-items: center; gap: var(--s2); padding: var(--s6) var(--s4); border: 2px dashed var(--line); border-radius: var(--r); cursor: pointer; text-align: center; margin-bottom: var(--s3); transition: border-color var(--t); }
.upload:hover, .upload:focus-within { border-color: var(--primary); }
.upload .icon { color: var(--primary); }
.scan__preview { border-radius: var(--r); margin-bottom: var(--s3); max-height: 320px; object-fit: cover; width: 100%; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); font-weight: 600; background: var(--surface-2); }
.table tr:last-child td { border-bottom: 0; }
.table__actions { display: flex; gap: 4px; flex-wrap: wrap; }
.is-suspended td { color: var(--ink-2); background: var(--danger-soft); }

/* ---------- Habits ---------- */
.habit-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s2); }
.habit { display: flex; align-items: center; gap: var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s3) var(--s4); }
.habit.is-archived { opacity: .6; }
.habit__check { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); color: transparent; cursor: pointer; flex: none; transition: all var(--t); }
.habit__check:hover:not(:disabled) { border-color: var(--primary); color: var(--primary-soft); }
.habit__check.is-done { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.habit__check:disabled { cursor: default; opacity: .5; }
.habit__body { flex: 1; min-width: 0; }
.habit__body p { margin: 2px 0 6px; }
.habit__streak { display: flex; align-items: center; gap: 4px; font-weight: 600; color: color-mix(in srgb, var(--accent) 70%, var(--ink)); }
.habit__streak .icon { color: var(--accent); }
.week-dots { display: flex; gap: 4px; }
.week-dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); }
.week-dots span.on { background: var(--primary); border-color: var(--primary); }
.days { display: flex; flex-wrap: wrap; gap: var(--s2); border: 0; padding: 0; margin: 0; }
.day { flex-direction: row !important; align-items: center; gap: 4px !important; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--r-pill); font-weight: 400 !important; color: var(--ink) !important; }
.task-add { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr auto; gap: var(--s2); align-items: center; flex-direction: row; }

/* ---------- Planner ---------- */
.cal-toolbar { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s4); }
.cal-title { font-size: 1.2rem; margin: 0 0 0 var(--s2); }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-bottom: var(--s3); }
.month__head { background: var(--surface-2); padding: 8px; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); text-align: center; font-weight: 600; }
.month__cell { background: var(--surface); min-height: 108px; padding: 6px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.month__cell.is-out { background: color-mix(in srgb, var(--surface) 60%, var(--bg)); }
.month__cell.is-out .month__num { color: var(--ink-2); opacity: .6; }
.month__cell.is-today .month__num { background: var(--primary); color: var(--on-primary); }
.month__num { align-self: flex-start; width: 28px; height: 28px; border-radius: 50%; border: 0; background: none; cursor: pointer; font-weight: 600; font-size: .85rem; }
.month__num:hover { background: var(--surface-2); }
.month__tasks { font-size: .72rem; color: var(--ink-2); }
.month .chip { padding: 2px 8px; font-size: .75rem; border-radius: 6px; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--s2); margin-bottom: var(--s3); }
.week__col { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s2); display: flex; flex-direction: column; gap: 6px; min-height: 260px; min-width: 0; }
.week__col.is-today { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.week__head { display: flex; flex-direction: column; align-items: center; border: 0; background: none; cursor: pointer; padding: 4px; border-radius: var(--r-sm); color: var(--ink-2); font-size: .8rem; }
.week__head strong { font-family: var(--font-display); font-size: 1.3rem; color: var(--ink); font-weight: 500; }
.week__head:hover { background: var(--surface-2); }
.week .chip { border-radius: 8px; flex-direction: column; align-items: flex-start; gap: 0; width: 100%; }
.week__task { font-size: .78rem; display: flex; gap: 4px; align-items: center; color: var(--ink-2); }
.week__task.is-done { text-decoration: line-through; }
.week__add { margin-top: auto; border: 1px dashed var(--line); background: none; border-radius: var(--r-sm); padding: 4px; cursor: pointer; color: var(--ink-2); display: grid; place-items: center; }
.week__add:hover { border-color: var(--primary); color: var(--primary); }
.timeline { list-style: none; margin: 0 0 var(--s3); padding: 0; display: flex; flex-direction: column; gap: var(--s2); }
.timeline li { display: grid; grid-template-columns: 110px 1fr; gap: var(--s3); align-items: start; }
.timeline__time { font-size: .82rem; color: var(--ink-2); padding-top: 10px; }
.timeline__item { display: flex; flex-direction: column; gap: 2px; text-align: left; border: 0; border-left: 3px solid var(--primary); background: var(--primary-soft); padding: 8px 12px; border-radius: 0 var(--r-sm) var(--r-sm) 0; cursor: pointer; width: 100%; }
.timeline__item.chip--gold { border-left-color: var(--accent); background: var(--accent-soft); }
.timeline__item.chip--plum { border-left-color: var(--plum); background: var(--plum-soft); }
.timeline__item.chip--rose { border-left-color: var(--rose); background: var(--rose-soft); }
.timeline__item.chip--sky { border-left-color: var(--sky); background: var(--sky-soft); }

/* ---------- Focus ---------- */
.focus { display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--s5); align-items: start; }
.focus__timer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s6) var(--s5); display: flex; flex-direction: column; align-items: center; gap: var(--s5); }
.focus__timer.is-break { background: linear-gradient(160deg, var(--surface), var(--accent-soft)); }
.focus__phase { font-family: var(--font-display); font-size: 1.2rem; margin: 0; text-align: center; }
.focus__ring {
  --p: 0; width: min(280px, 70vw); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--primary) calc(var(--p) * 1%), var(--surface-2) 0);
}
.focus__timer.is-break .focus__ring { background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--surface-2) 0); }
.focus__ring::before { content: ""; grid-area: 1 / 1; width: 86%; aspect-ratio: 1; border-radius: 50%; background: var(--surface); }
.focus__time { grid-area: 1 / 1; font-family: var(--font-display); font-size: clamp(2.6rem, 2rem + 3vw, 4rem); font-variant-numeric: tabular-nums; position: relative; }
.template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--s2); margin-bottom: var(--s4); }
.template { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: var(--s3); border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); cursor: pointer; transition: all var(--t); }
.template:hover:not(:disabled) { border-color: var(--primary); }
.template.is-on { border-color: var(--primary); background: var(--primary-soft); }
.custom-timer { display: flex; gap: var(--s2); align-items: flex-end; flex-wrap: wrap; }
.custom-timer label { display: flex; flex-direction: column; font-size: .8rem; color: var(--ink-2); gap: 4px; width: 100px; }

/* ---------- Notes / vision / links ---------- */
.note-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s4); }
.note-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s4); display: flex; flex-direction: column; gap: var(--s2); min-height: 170px; transition: box-shadow var(--t), transform var(--t); }
.note-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.note-card h2 { margin: 0; }
.note-card__body { flex: 1; font-size: .9rem; color: var(--ink-2); white-space: pre-wrap; margin: 0; }
.vision { columns: 3 240px; column-gap: var(--s4); }
.vision__item { break-inside: avoid; margin-bottom: var(--s4); border-radius: var(--r-lg); overflow: hidden; position: relative; background: var(--primary-soft); }
.vision__item img { width: 100%; }
.vision__text { padding: var(--s4); }
.vision__type { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); font-weight: 600; }
.vision__quote { font-family: var(--font-display); font-size: 1.2rem; line-height: 1.45; }
.vision__actions { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; opacity: 0; transition: opacity var(--t); }
.vision__actions .icon-btn { background: var(--surface); box-shadow: var(--shadow-sm); }
.vision__item:hover .vision__actions, .vision__item:focus-within .vision__actions { opacity: 1; }
.tone-sage { background: var(--primary-soft); } .tone-gold { background: var(--accent-soft); } .tone-plum { background: var(--plum-soft); }
.tone-rose { background: var(--rose-soft); } .tone-sky { background: var(--sky-soft); }
.vision__item--affirmation .vision__text, .vision__item--quote .vision__text { padding: var(--s5); }
.link-url { overflow-wrap: anywhere; }

/* ---------- Creator ---------- */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: var(--s3); overflow-x: auto; padding-bottom: var(--s2); }
.kanban__col { background: var(--surface-2); border-radius: var(--r); padding: var(--s3); display: flex; flex-direction: column; gap: var(--s2); min-height: 200px; }
.kanban__card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: var(--s3); display: flex; flex-direction: column; gap: 6px; }
.kanban__card p { margin: 0; }

/* ---------- Insights ---------- */
.bars { display: flex; flex-direction: column; gap: var(--s2); }
.bars__row { display: grid; grid-template-columns: 100px 1fr 36px; gap: var(--s2); align-items: center; font-size: .86rem; }
.bars__track { height: 10px; background: var(--surface-2); border-radius: var(--r-pill); overflow: hidden; }
.bars__fill { display: block; height: 100%; background: var(--primary); border-radius: inherit; }
.bars__fill--gold { background: var(--accent); }
.bars__value { text-align: right; color: var(--ink-2); }
.chart { width: 100%; height: auto; }
.chart__grid { stroke: var(--line); stroke-width: 1; }
.chart__label { font-size: 12px; }
.chart__line { fill: none; stroke: var(--primary); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart__dot { fill: var(--surface); stroke: var(--primary); stroke-width: 2; }
.review { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s3); }
.review div { background: var(--accent-soft); border-radius: var(--r); padding: var(--s4); display: flex; flex-direction: column; }
.review strong { font-family: var(--font-display); font-size: 1.6rem; font-weight: 500; }
.review span { font-size: .8rem; color: var(--ink-2); }

/* ---------- Community ---------- */
.group-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--s3); margin-bottom: var(--s5); }
.group-card { display: flex; flex-direction: column; gap: 4px; padding: var(--s4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--ink); transition: border-color var(--t), box-shadow var(--t); }
.group-card:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.join-code { background: var(--accent-soft); border-radius: var(--r); padding: var(--s2) var(--s4); display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.join-code strong { letter-spacing: .15em; font-size: 1.1rem; }
.feed { display: flex; flex-direction: column; gap: var(--s3); margin-bottom: var(--s4); }
.post { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s4); }
.post.is-removed { opacity: .6; }
.post__body { white-space: pre-wrap; margin: var(--s2) 0 var(--s3); }
.post__foot { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.post__menu { margin-left: auto; display: flex; gap: var(--s1); }
.react { border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-pill); padding: 4px 10px; font-size: .82rem; cursor: pointer; transition: all var(--t); }
.react:hover:not(:disabled) { border-color: var(--primary); }
.react.is-on { background: var(--primary-soft); border-color: var(--primary); }
.replies { margin-top: var(--s3); padding-left: var(--s4); border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: var(--s3); }
.reply p { margin: 2px 0; white-space: pre-wrap; }

/* ---------- Settings / Plus ---------- */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--s3); }
.theme-swatch { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: var(--s3); border-radius: var(--r); border: 2px solid var(--line); background: var(--surface); cursor: pointer; text-align: left; position: relative; }
.theme-swatch.is-on { border-color: var(--primary); }
.theme-swatch:disabled { cursor: not-allowed; opacity: .7; }
.theme-swatch > .icon { position: absolute; top: 12px; right: 12px; color: var(--ink-2); }
.theme-swatch__preview { display: flex; gap: 4px; width: 100%; height: 56px; border-radius: var(--r-sm); overflow: hidden; margin-bottom: var(--s2); }
.theme-swatch__preview i { flex: 1; }
.theme-swatch--sage .theme-swatch__preview i:nth-child(1) { background: #F6F3EC; } .theme-swatch--sage .theme-swatch__preview i:nth-child(2) { background: #5E7A62; } .theme-swatch--sage .theme-swatch__preview i:nth-child(3) { background: #C49A45; }
.theme-swatch--plum .theme-swatch__preview i:nth-child(1) { background: #F5F1F4; } .theme-swatch--plum .theme-swatch__preview i:nth-child(2) { background: #7A5A78; } .theme-swatch--plum .theme-swatch__preview i:nth-child(3) { background: #C49A45; }
.theme-swatch--rose .theme-swatch__preview i:nth-child(1) { background: #F8F2F0; } .theme-swatch--rose .theme-swatch__preview i:nth-child(2) { background: #A9605F; } .theme-swatch--rose .theme-swatch__preview i:nth-child(3) { background: #C49A45; }
.theme-swatch--midnight .theme-swatch__preview i:nth-child(1) { background: #141A21; } .theme-swatch--midnight .theme-swatch__preview i:nth-child(2) { background: #8FB097; } .theme-swatch--midnight .theme-swatch__preview i:nth-child(3) { background: #D9B061; }
.reminder-add { display: grid; grid-template-columns: 1fr 2fr 1fr auto; gap: var(--s2); margin: var(--s4) 0; }
.benefits { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 6px; }
.benefits--plus li::marker { color: var(--accent); }
.plus__hero { text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--s2); margin-bottom: var(--s5); }
.plus__hero p { max-width: 52ch; }
.plus__status { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 6px var(--s4); font-size: .9rem; }
.plus__cta { text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--s3); margin-top: var(--s4); }
.preview-note { background: var(--surface-2); border-radius: var(--r); padding: var(--s4); width: 100%; }
.devo__body { font-family: var(--font-display); font-size: 1.05rem; line-height: 1.7; white-space: pre-wrap; }

/* ---------- Auth ---------- */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 1fr minmax(360px, 520px); }
.auth__art { background: radial-gradient(circle at 20% 20%, color-mix(in srgb, var(--accent) 35%, transparent), transparent 55%), linear-gradient(160deg, var(--primary) 0%, var(--primary-strong) 100%); color: #fff; display: grid; place-items: center; padding: var(--s7); }
.auth__art-inner { max-width: 420px; display: flex; flex-direction: column; gap: var(--s3); }
.auth__art .brand__mark { background: radial-gradient(circle at 70% 30%, var(--accent) 0 22%, transparent 23%), rgba(255,255,255,.18); }
.auth__tagline { font-family: var(--font-display); font-size: clamp(2rem, 1.4rem + 2vw, 3rem); line-height: 1.1; margin: var(--s4) 0 0; }
.auth__sub { font-size: 1.1rem; opacity: .85; }
.auth__panel { background: var(--surface); padding: var(--s7) clamp(var(--s5), 5vw, var(--s7)); display: flex; flex-direction: column; justify-content: center; gap: var(--s3); }
.auth__title { margin-top: var(--s5); }
.brand--auth { padding: 0; }

/* ---------- Landing ---------- */
.landing { max-width: 1080px; margin: 0 auto; padding: var(--s5) var(--s5) var(--s7); }
.landing__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--s7); }
.landing__hero { padding: var(--s7) 0; max-width: 680px; }
.landing__hero h1 { font-size: clamp(2.6rem, 1.8rem + 4vw, 4.6rem); line-height: 1.02; margin-bottom: var(--s4); }
.landing__lede { font-size: 1.2rem; color: var(--ink-2); max-width: 46ch; }
.landing__cta { display: flex; gap: var(--s3); flex-wrap: wrap; margin-top: var(--s5); }
.landing__rows { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s5); border-top: 1px solid var(--line); padding-top: var(--s6); }
.landing__rows .icon { color: var(--primary); margin-bottom: var(--s2); }
.landing__rows h2 { font-size: 1.15rem; }
.landing__rows p { color: var(--ink-2); font-size: .95rem; }
.landing__foot { margin-top: var(--s7); text-align: center; }

/* ---------- Blazor error UI ---------- */
#blazor-error-ui { display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000; background: var(--danger-soft); color: var(--danger); padding: var(--s3) var(--s5); box-shadow: var(--shadow-lg); }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: var(--s4); top: var(--s3); }
#blazor-error-ui .reload { color: inherit; font-weight: 600; }
.components-reconnect-show, .components-reconnect-failed { font-family: var(--font-body); }


/* =====================================================================
   Motion layer — gentle, purposeful animation (disabled automatically
   for people who turn on "reduce motion" in their device settings)
   ===================================================================== */
@keyframes gd-rise   { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes gd-fade   { from { opacity: 0; } to { opacity: 1; } }
@keyframes gd-pop    { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes gd-grow   { from { width: 0; } }
@keyframes gd-glow   { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 0%, transparent); } 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 22%, transparent); } }
@keyframes gd-flicker { 0%, 100% { transform: rotate(-4deg) scale(1); } 50% { transform: rotate(4deg) scale(1.08); } }
@keyframes gd-shimmer { from { background-position: -200% 0; } to { background-position: 200% 0; } }
@keyframes gd-float  { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* Page entrance: every page slides in softly, and its cards arrive one after another */
.main > * { animation: gd-rise .45s var(--ease) both; }
.dash__grid > *, .grid-2 > *, .note-grid > *, .group-grid > *, .template-grid > *, .theme-grid > *,
.stats-row > *, .habit-list > *, .feed > *, .vision > *, .kanban > *, .review > *, .list > .list__item, .entry-list > li, .quick > a {
  animation: gd-rise .5s var(--ease) both;
}
:is(.dash__grid, .grid-2, .note-grid, .group-grid, .template-grid, .theme-grid, .stats-row, .habit-list, .feed, .vision, .kanban, .review, .quick) > :nth-child(2),
:is(.list, .entry-list) > :nth-child(2) { animation-delay: .05s; }
:is(.dash__grid, .grid-2, .note-grid, .group-grid, .template-grid, .theme-grid, .stats-row, .habit-list, .feed, .vision, .kanban, .review, .quick) > :nth-child(3),
:is(.list, .entry-list) > :nth-child(3) { animation-delay: .1s; }
:is(.dash__grid, .grid-2, .note-grid, .group-grid, .template-grid, .theme-grid, .stats-row, .habit-list, .feed, .vision, .kanban, .review, .quick) > :nth-child(4),
:is(.list, .entry-list) > :nth-child(4) { animation-delay: .15s; }
:is(.dash__grid, .grid-2, .note-grid, .group-grid, .template-grid, .theme-grid, .stats-row, .habit-list, .feed, .vision, .kanban, .review, .quick) > :nth-child(5),
:is(.list, .entry-list) > :nth-child(5) { animation-delay: .2s; }
:is(.dash__grid, .grid-2, .note-grid, .group-grid, .template-grid, .theme-grid, .stats-row, .habit-list, .feed, .vision, .kanban, .review, .quick) > :nth-child(6),
:is(.list, .entry-list) > :nth-child(6) { animation-delay: .25s; }
:is(.dash__grid, .grid-2, .note-grid, .group-grid, .template-grid, .theme-grid, .stats-row, .habit-list, .feed, .vision, .kanban, .review, .quick) > :nth-child(n+7),
:is(.list, .entry-list) > :nth-child(n+7) { animation-delay: .3s; }

/* Cards lift when you hover them */
.card, .stat, .group-card, .note-card, .template, .kanban__card, .habit, .post, .vision__item, .theme-swatch {
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
@media (hover: hover) {
  .dash__grid > .card:hover, .stat:hover, .group-card:hover, .note-card:hover, .kanban__card:hover,
  .habit:hover, .post:hover, .vision__item:hover, .theme-swatch:not(:disabled):hover, .template:not(:disabled):hover {
    transform: translateY(-3px); box-shadow: var(--shadow);
  }
  .quick a:hover .icon-tile { transform: translateY(-3px) rotate(-4deg); }
  .btn--primary:hover:not(:disabled), .btn--gold:hover:not(:disabled) { transform: translateY(-1px); box-shadow: var(--shadow); }
}
.quick .icon-tile { transition: transform .3s var(--ease); }

/* Sidebar: active item gets a gold marker that slides in */
.sidebar .nav-item { position: relative; }
.sidebar .nav-item::before {
  content: ""; position: absolute; left: -12px; top: 50%; width: 4px; height: 0; border-radius: 0 4px 4px 0;
  background: var(--accent); transform: translateY(-50%); transition: height .25s var(--ease);
}
.sidebar .nav-item.active::before { height: 60%; }
.nav-item .icon { transition: transform .2s var(--ease); }
.nav-item:hover .icon { transform: translateX(2px); }
.brand__mark { transition: transform .5s var(--ease); }
.brand:hover .brand__mark { transform: rotate(-8deg) scale(1.05); }

/* Tabs: underline grows in */
.tab { position: relative; border-bottom-color: transparent !important; }
.tab::after { content: ""; position: absolute; left: 50%; right: 50%; bottom: -1px; height: 2px; background: var(--primary); border-radius: 2px; transition: left .25s var(--ease), right .25s var(--ease); }
.tab.is-on::after { left: 8px; right: 8px; }

/* Progress bars fill up when they appear */
.progress__fill { animation: gd-grow .9s var(--ease) both; }
.bars__fill { animation: gd-grow 1s var(--ease) both; }
.progress__fill { background-size: 200% 100%; background-image: linear-gradient(90deg, var(--primary), var(--accent), var(--primary)); animation: gd-grow .9s var(--ease) both, gd-shimmer 6s linear infinite; }

/* Checking something off feels rewarding */
.check-row.is-done .check-row__box, .habit__check.is-done { animation: gd-pop .35s var(--ease); }
.mood__btn { transition: transform .2s var(--ease), background var(--t), border-color var(--t); }
.mood__btn:hover { transform: translateY(-2px); }
.mood__btn.is-on .mood__face { animation: gd-pop .4s var(--ease); display: inline-block; }
.react.is-on { animation: gd-pop .3s var(--ease); }
.icon-btn.is-fav svg { animation: gd-pop .35s var(--ease); }

/* Streak flame flickers, Plus badge glows */
.streak .icon, .habit__streak .icon { animation: gd-flicker 1.6s ease-in-out infinite; transform-origin: 50% 90%; }
.plus-badge.is-plus { animation: gd-glow 3s ease-in-out infinite; }

/* Verse of the day: slow shimmer on the gold edge */
.verse::before { background: linear-gradient(180deg, var(--accent), var(--primary), var(--accent)); background-size: 100% 200%; animation: gd-shimmer 8s linear infinite; }
.verse__text { animation: gd-fade 1s var(--ease) both .15s; }

/* Companion: messages glide in */
.bubble { animation: gd-rise .35s var(--ease) both; }
.chat__welcome .companion-prompt { animation: gd-float 5s ease-in-out infinite; }

/* Focus timer: ring breathes while running */
.focus__ring { transition: background .5s linear; }
.focus__timer.is-break .focus__ring { animation: gd-float 4s ease-in-out infinite; }

/* Sign-in and landing pages */
.auth__art-inner > * { animation: gd-rise .7s var(--ease) both; }
.auth__art-inner > :nth-child(2) { animation-delay: .12s; }
.auth__art-inner > :nth-child(3) { animation-delay: .24s; }
.auth__art .brand__mark--lg { animation: gd-float 6s ease-in-out infinite; }
.landing__hero > * { animation: gd-rise .7s var(--ease) both; }
.landing__hero > :nth-child(2) { animation-delay: .1s; }
.landing__hero > :nth-child(3) { animation-delay: .2s; }

/* Loading: skeleton shimmer instead of a bare spinner */
.loading { position: relative; }
.loading::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent); background-size: 200% 100%; animation: gd-shimmer 1.2s linear infinite;
}


/* =====================================================================
   Customization Studio — fonts, sizes, corners, bold, accent, mood tint
   ===================================================================== */
html[data-accent="custom"] {
  --primary: var(--custom-accent);
  --primary-strong: color-mix(in srgb, var(--custom-accent) 78%, #000);
  --primary-soft: color-mix(in srgb, var(--custom-accent) 16%, var(--surface));
}
html:is([data-font="modern"], [data-font="clean"], [data-font="rounded"], [data-font="friendly"]) :is(h1, h2, h3) { font-weight: 700; letter-spacing: -.02em; }

html[data-bold="true"] body { font-weight: 500; }
html[data-bold="true"] :is(h1, h2, h3, h4, strong, b, .btn, .tab.is-on, .nav-item.active, .stat__value, .card__title) { font-weight: 700; }

html[data-card="compact"] { --card-pad: var(--s3) var(--s4); --gap: var(--s3); }
html[data-card="comfortable"] { --card-pad: var(--s5); --gap: var(--s4); }
html[data-card="spacious"] { --card-pad: var(--s6); --gap: var(--s5); }
.card { padding: var(--card-pad, var(--s5)); }
:is(.dash__grid, .grid-2, .note-grid, .group-grid, .stack) { gap: var(--gap, var(--s4)); }

html[data-icon="small"] .icon { zoom: .85; }
html[data-icon="large"] .icon { zoom: 1.2; }
html[data-icon="large"] .icon-tile { width: 48px; height: 48px; border-radius: 15px; }

html[data-corners="sharp"] { --r-sm: 4px; --r: 6px; --r-lg: 8px; --r-pill: 8px; }
html[data-corners="round"] { --r-sm: 14px; --r: 22px; --r-lg: 30px; }

html[data-tint="on"] body {
  background:
    radial-gradient(1200px 600px at 100% -10%, color-mix(in srgb, var(--tint) 26%, transparent), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, color-mix(in srgb, var(--tint) 18%, transparent), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}

html[data-motion="reduce"] *, html[data-motion="reduce"] *::before, html[data-motion="reduce"] *::after {
  animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important;
}

/* =====================================================================
   Gloss — soft glass surfaces, light, depth and shine
   ===================================================================== */
:root { --glass-hi: rgba(255, 255, 255, .7); --glass-edge: rgba(255, 255, 255, .55); }
:is([data-theme="midnight"], [data-theme="charcoal"]) { --glass-hi: rgba(255, 255, 255, .07); --glass-edge: rgba(255, 255, 255, .08); }

body {
  background:
    radial-gradient(1100px 620px at 105% -12%, color-mix(in srgb, var(--primary) 16%, transparent), transparent 62%),
    radial-gradient(900px 520px at -12% 108%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}

.card, .stat, .split__main, .companion__chat, .focus__timer, .habit, .post, .note-card, .group-card, .table-wrap, .dash__progress, .verse, .week__col, .template {
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 88%, transparent), color-mix(in srgb, var(--surface) 96%, transparent));
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow);
}
.card--quiet { box-shadow: none; background: color-mix(in srgb, var(--surface-2) 80%, transparent); }
.card--evening { background: linear-gradient(160deg, var(--evening-bg), color-mix(in srgb, var(--evening-bg) 70%, var(--plum))); }

.btn--primary {
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 88%, #fff), var(--primary-strong));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 6px 18px color-mix(in srgb, var(--primary) 35%, transparent);
}
.btn--primary:hover:not(:disabled) { background: linear-gradient(180deg, var(--primary), var(--primary-strong)); }
.btn--gold {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 80%, #fff), var(--accent));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent);
}
.btn--secondary { background: color-mix(in srgb, var(--surface) 80%, transparent); box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow-sm); }
.chip { box-shadow: inset 0 1px 0 var(--glass-hi); }
.chip.is-on { background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 85%, #fff), var(--primary-strong)); box-shadow: 0 4px 12px color-mix(in srgb, var(--primary) 30%, transparent); }
.icon-tile { box-shadow: inset 0 1px 0 var(--glass-hi); }
.icon-tile--sage { background: linear-gradient(145deg, var(--primary-soft), color-mix(in srgb, var(--primary-soft) 70%, var(--primary))); }
.input { background: color-mix(in srgb, var(--surface) 85%, transparent); box-shadow: inset 0 1px 2px rgba(0,0,0,.04); }
.sidebar { background: color-mix(in srgb, var(--surface) 78%, transparent); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.section-header h1 { background: linear-gradient(120deg, var(--ink) 30%, var(--primary-strong)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tabs { border-bottom: 0; gap: 6px; padding: 4px; background: color-mix(in srgb, var(--surface-2) 70%, transparent); border-radius: var(--r-pill); width: fit-content; max-width: 100%; }
.tab { border-radius: var(--r-pill); padding: 8px 16px; margin: 0; }
.tab.is-on { background: var(--surface); color: var(--primary-strong); box-shadow: var(--shadow-sm); }
.tab::after { display: none; }

/* ---------- Mobile top bar, floating bottom bar, AI button ---------- */
.topbar { display: none; }
.fab {
  position: fixed; right: 20px; bottom: 24px; z-index: 29; width: 56px; height: 56px; border-radius: 18px;
  display: grid; place-items: center; color: var(--on-primary); text-decoration: none;
  background: linear-gradient(145deg, color-mix(in srgb, var(--primary) 80%, #fff), var(--primary-strong));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 10px 26px color-mix(in srgb, var(--primary) 45%, transparent);
  transition: transform .25s var(--ease);
}
.fab:hover { transform: translateY(-3px) rotate(-6deg); }
.fab .icon { width: 24px; height: 24px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--on-primary); font-weight: 700; text-decoration: none;
  background: linear-gradient(145deg, color-mix(in srgb, var(--primary) 80%, #fff), var(--primary-strong)); font-family: var(--font-display); }

/* ---------- Home shortcuts ---------- */
.shortcuts { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s3); }
.shortcut { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: var(--s4) var(--s2); border-radius: var(--r-lg); text-decoration: none; color: var(--ink); font-size: .88rem; font-weight: 500;
  background: color-mix(in srgb, var(--surface) 80%, transparent); border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.shortcut:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

/* ---------- Water tracker ---------- */
.water { display: grid; grid-template-columns: auto 1fr; gap: var(--s5); align-items: center; }
.water__glass { position: relative; width: 120px; height: 160px; }
.water__glass svg { width: 100%; height: 100%; overflow: visible; }
.water__outline { fill: color-mix(in srgb, var(--sky-soft) 40%, transparent); stroke: color-mix(in srgb, var(--sky) 55%, var(--line)); stroke-width: 3; }
.water__shine { fill: none; stroke: rgba(255,255,255,.55); stroke-width: 4; stroke-linecap: round; }
.water__level { transition: transform 1s cubic-bezier(.34, 1.4, .5, 1); }
.water__wave { fill: color-mix(in srgb, var(--sky) 75%, #7fc4e8); animation: gd-wave 3.2s linear infinite; }
.water__wave--back { fill: color-mix(in srgb, var(--sky) 45%, #bfe6f7); animation-duration: 5s; animation-direction: reverse; opacity: .8; }
.water__bubble { fill: rgba(255,255,255,.7); animation: gd-bubble 3.5s ease-in infinite; }
.water__bubble:nth-of-type(2) { animation-delay: 1.2s; } .water__bubble:nth-of-type(3) { animation-delay: 2.3s; }
@keyframes gd-wave { from { transform: translateX(0); } to { transform: translateX(-120px); } }
@keyframes gd-bubble { 0% { transform: translateY(0); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(-90px); opacity: 0; } }
.water__glass.is-splash svg { animation: gd-slosh .7s var(--ease); transform-origin: 50% 100%; }
@keyframes gd-slosh { 0% { transform: rotate(0); } 25% { transform: rotate(-4deg); } 55% { transform: rotate(3deg); } 80% { transform: rotate(-1deg); } 100% { transform: rotate(0); } }
.droplet { position: absolute; left: 50%; top: 20%; width: 9px; height: 12px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: color-mix(in srgb, var(--sky) 70%, #8fd0f0); animation: gd-drop .8s ease-out forwards; pointer-events: none; }
@keyframes gd-drop { from { transform: translate(-50%, 0) scale(1); opacity: 1; } to { transform: translate(calc(-50% + var(--dx)), var(--dy)) scale(.4); opacity: 0; } }
.water__count { font-family: var(--font-display); font-size: 2.4rem; line-height: 1; }
.water__count small { font-size: 1rem; color: var(--ink-2); font-family: var(--font-body); }
.water__cups { display: flex; flex-wrap: wrap; gap: 6px; margin: var(--s3) 0; }
.water__cup { width: 26px; height: 30px; border-radius: 4px 4px 8px 8px; border: 2px solid color-mix(in srgb, var(--sky) 55%, var(--line)); background: transparent; cursor: pointer; padding: 0; position: relative; overflow: hidden; transition: transform .2s var(--ease); }
.water__cup::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: color-mix(in srgb, var(--sky) 70%, #8fd0f0); transition: height .45s var(--ease); }
.water__cup.is-full::after { height: 100%; }
.water__cup:hover { transform: translateY(-2px); }
.water__actions { display: flex; gap: var(--s2); align-items: center; }
.water.is-done .water__count { color: var(--sky); }

/* ---------- Celebrations ---------- */
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 90; }
.celebrate-banner {
  position: fixed; left: 50%; top: 22%; transform: translate(-50%, 0); z-index: 91; padding: 14px 26px; border-radius: 999px;
  font-family: var(--font-display); font-size: 1.25rem; color: var(--ink); white-space: nowrap; max-width: calc(100vw - 32px); overflow: hidden; text-overflow: ellipsis;
  background: color-mix(in srgb, var(--surface) 85%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow-lg); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  animation: gd-banner-in .5s cubic-bezier(.34, 1.5, .5, 1) both;
}
.celebrate-banner.is-leaving { animation: gd-banner-out .5s var(--ease) forwards; }
@keyframes gd-banner-in { from { opacity: 0; transform: translate(-50%, 20px) scale(.8); } }
@keyframes gd-banner-out { to { opacity: 0; transform: translate(-50%, -16px) scale(.96); } }

/* ---------- Welcome / onboarding ---------- */
.welcome { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: var(--s4); }
.welcome__hero { text-align: center; padding: var(--s7) var(--s5); border-radius: var(--r-lg); color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(420px 220px at 90% 10%, rgba(255,255,255,.25), transparent 70%), linear-gradient(140deg, var(--primary), var(--primary-strong)); box-shadow: var(--shadow-lg); }
.welcome__hero h1 { color: #fff; margin: var(--s3) 0 var(--s2); }
.welcome__hero .brand__mark { margin: 0 auto; width: 56px; height: 56px; border-radius: 17px; animation: gd-float 6s ease-in-out infinite; }
.try-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s2); }
.try-list a { display: flex; align-items: center; gap: var(--s3); text-decoration: none; color: var(--ink); padding: var(--s2); border-radius: var(--r); transition: background var(--t); }
.try-list a:hover { background: var(--surface-2); }
.try-list small { display: block; color: var(--ink-2); }

/* ---------- Appearance studio ---------- */
.theme-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.theme-swatch--gold .theme-swatch__preview i:nth-child(1) { background: #F7F2E6; } .theme-swatch--gold .theme-swatch__preview i:nth-child(2) { background: #A8832F; } .theme-swatch--gold .theme-swatch__preview i:nth-child(3) { background: #5E7A62; }
.theme-swatch--clay .theme-swatch__preview i:nth-child(1) { background: #F7EFEA; } .theme-swatch--clay .theme-swatch__preview i:nth-child(2) { background: #B0694B; } .theme-swatch--clay .theme-swatch__preview i:nth-child(3) { background: #C49A45; }
.theme-swatch--ocean .theme-swatch__preview i:nth-child(1) { background: #EEF3F6; } .theme-swatch--ocean .theme-swatch__preview i:nth-child(2) { background: #4F7C96; } .theme-swatch--ocean .theme-swatch__preview i:nth-child(3) { background: #D0A24F; }
.theme-swatch--charcoal .theme-swatch__preview i:nth-child(1) { background: #1B1B1D; } .theme-swatch--charcoal .theme-swatch__preview i:nth-child(2) { background: #D1A94F; } .theme-swatch--charcoal .theme-swatch__preview i:nth-child(3) { background: #8FB097; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.swatch { width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line), inset 0 2px 0 rgba(255,255,255,.35); cursor: pointer; transition: transform .2s var(--ease); padding: 0; }
.swatch:hover { transform: scale(1.1); }
.swatch.is-on { box-shadow: 0 0 0 3px var(--ink), inset 0 2px 0 rgba(255,255,255,.35); }
.color-input { width: 48px; height: 40px; border: 0; background: none; padding: 0; cursor: pointer; }
.option-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s2); }
.option { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; text-align: left; padding: var(--s3); border-radius: var(--r); cursor: pointer;
  border: 2px solid color-mix(in srgb, var(--line) 80%, transparent); background: color-mix(in srgb, var(--surface) 80%, transparent); transition: border-color var(--t), transform .2s var(--ease); }
.option:hover { transform: translateY(-2px); }
.option.is-on { border-color: var(--primary); background: var(--primary-soft); }
.option__sample { font-size: 1.35rem; line-height: 1.1; }
.studio-preview { border-radius: var(--r-lg); padding: var(--card-pad, var(--s5)); background: linear-gradient(160deg, var(--surface), var(--primary-soft)); border: 1px solid var(--line); display: flex; flex-direction: column; gap: var(--s3); }
.segmented { display: inline-flex; padding: 4px; gap: 4px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--surface-2) 80%, transparent); flex-wrap: wrap; }
.segmented button { border: 0; background: none; padding: 8px 14px; border-radius: var(--r-pill); cursor: pointer; font-weight: 500; color: var(--ink-2); }
.segmented button.is-on { background: var(--surface); color: var(--primary-strong); box-shadow: var(--shadow-sm); }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; padding: var(--s3) 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.setting-row:last-child { border-bottom: 0; }
.setting-row > div:first-child { flex: 1; min-width: 200px; }
.setting-row p { margin: 2px 0 0; }
.toggle { position: relative; width: 50px; height: 30px; flex: none; }
.toggle input { position: absolute; opacity: 0; inset: 0; cursor: pointer; z-index: 1; margin: 0; }
.toggle span { position: absolute; inset: 0; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); transition: background var(--t); }
.toggle span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .25s cubic-bezier(.34, 1.5, .5, 1); }
.toggle input:checked + span { background: var(--primary); border-color: var(--primary); }
.toggle input:checked + span::after { transform: translateX(20px); }
.toggle input:focus-visible + span { box-shadow: var(--focus); }
.pick-grid { display: flex; flex-wrap: wrap; gap: var(--s2); }
.pick { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: var(--r-pill); border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 80%, transparent); cursor: pointer; font-weight: 500; transition: all var(--t); }
.pick.is-on { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.pick:disabled { opacity: .45; cursor: not-allowed; }


/* =====================================================================
   Phase 2 — smarter pages
   ===================================================================== */

/* Smaller, neater theme swatches */
.theme-grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: var(--s2); }
.theme-swatch { padding: 8px 10px; gap: 2px; border-width: 1.5px; }
.theme-swatch__preview { height: 26px; margin-bottom: 4px; gap: 3px; border-radius: 6px; }
.theme-swatch strong { font-size: .85rem; }
.theme-swatch .small { font-size: .72rem; }
.theme-swatch > .icon { top: 8px; right: 8px; }

/* Pop-ups open near the top with the writing area visible; the body scrolls inside */
.modal { top: 6vh; transform: translateX(-50%); max-height: 88dvh; display: flex; flex-direction: column; animation: gd-modal-in .25s var(--ease); }
.modal__body { overflow-y: auto; }
.modal--wide { width: min(760px, calc(100vw - 32px)); }
@keyframes gd-modal-in { from { opacity: 0; transform: translate(-50%, 12px); } }

/* Evening reflection — light, calm and modern (no dark panel) */
.evening__form {
  background: linear-gradient(160deg, color-mix(in srgb, var(--surface) 92%, transparent), color-mix(in srgb, var(--plum-soft) 55%, var(--surface)));
  color: var(--ink); border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.evening__form .input { background: color-mix(in srgb, var(--surface) 90%, transparent); border-color: var(--line); color: var(--ink); }
.evening__form .input::placeholder { color: var(--ink-2); }
.evening__question { color: var(--ink); }
.evening__q { color: var(--ink) !important; }
.card--evening { background: linear-gradient(160deg, var(--surface), var(--plum-soft)); color: var(--ink); }
.card--evening .muted { color: var(--ink-2); }

/* Small swatches */
.swatch--sm { width: 30px; height: 30px; border-width: 2px; }
.swatch--clear { background: var(--surface); color: var(--ink-2); font-size: .8rem; display: grid; place-items: center; }

/* ---------- Home: season & suggestions ---------- */
.season { display: flex; flex-wrap: wrap; gap: var(--s4); align-items: stretch; }
.season > div { flex: 1 1 240px; padding: var(--s4) var(--s5); border-radius: var(--r-lg); background: linear-gradient(140deg, var(--primary-soft), color-mix(in srgb, var(--accent-soft) 70%, var(--surface))); box-shadow: inset 0 1px 0 var(--glass-hi); }
.season__label { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); font-weight: 600; }
.season__word { font-family: var(--font-display); font-size: 1.9rem; color: var(--primary-strong); }
.season__verse p { font-family: var(--font-display); font-size: 1.05rem; margin: 4px 0 0; }

/* ---------- Profile ---------- */
.profile-photo { display: flex; align-items: center; gap: var(--s5); flex-wrap: wrap; }
.profile-photo__circle { position: relative; width: 104px; height: 104px; border-radius: 50%; cursor: pointer; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(145deg, color-mix(in srgb, var(--primary) 80%, #fff), var(--primary-strong)); color: var(--on-primary); font-family: var(--font-display); font-size: 2.6rem; box-shadow: var(--shadow); }
.profile-photo__circle img { width: 100%; height: 100%; object-fit: cover; }
.profile-photo__edit { position: absolute; right: 6px; bottom: 6px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--sm { width: 34px; height: 34px; font-size: .9rem; }
.me-chip { display: flex; align-items: center; gap: var(--s2); text-decoration: none; color: var(--ink); padding: 6px; border-radius: var(--r); transition: background var(--t); }
.me-chip:hover { background: var(--surface-2); }
.me-chip span:last-child { display: flex; flex-direction: column; font-weight: 600; font-size: .9rem; }
.me-chip small { font-weight: 400; color: var(--ink-2); font-size: .75rem; }

/* ---------- Fasting ---------- */
.fast-live { display: flex; gap: var(--s5); align-items: center; flex-wrap: wrap; }
.fast-ring { --p: 0; width: 132px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), color-mix(in srgb, var(--surface-2) 90%, transparent) 0); position: relative; }
.fast-ring::before { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: var(--surface); }
.fast-ring span { position: relative; display: flex; flex-direction: column; align-items: center; }
.fast-ring strong { font-family: var(--font-display); font-size: 1.6rem; }
.fast-ring small { font-size: .75rem; color: var(--ink-2); }

/* ---------- Bible ---------- */
.bible-cta { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); border-radius: var(--r-lg); text-decoration: none; color: var(--ink);
  background: linear-gradient(140deg, var(--accent-soft), var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); box-shadow: var(--shadow-sm); }
.bible-cta span { flex: 1; display: flex; flex-direction: column; }
.bible-cta small { color: var(--ink-2); }
.bible-toolbar { display: grid; grid-template-columns: minmax(160px, 1.2fr) minmax(120px, .8fr) minmax(180px, 1.4fr) auto; gap: var(--s2); align-items: center; margin-bottom: var(--s4); }
.bible-goto { margin: 0; }
.bible-page { max-width: 760px; margin: 0 auto; padding: var(--s6) clamp(var(--s4), 4vw, var(--s7)); border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--surface) 92%, transparent); border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow);
  font-family: var(--font-display); line-height: 1.9; }
.bible-page__title { text-align: center; font-size: 1.6em; margin-bottom: var(--s4); }
.bible-verse { cursor: pointer; border-radius: 4px; padding: 1px 2px; transition: background var(--t); }
.bible-verse:hover { background: var(--surface-2); }
.bible-verse sup { font-family: var(--font-body); font-size: .62em; color: var(--primary); font-weight: 700; margin-right: 3px; }
.bible-verse.is-selected { outline: 2px solid var(--primary); outline-offset: 1px; }
.hl-gold { background: color-mix(in srgb, #F2C94C 42%, transparent); } .hl-sage { background: color-mix(in srgb, #8FB08F 40%, transparent); }
.hl-rose { background: color-mix(in srgb, #F29CAB 42%, transparent); } .hl-sky { background: color-mix(in srgb, #8EC5E8 45%, transparent); }
.hl-lilac { background: color-mix(in srgb, #C3A6E8 45%, transparent); }
.hl-dot-gold { background: #F2C94C; } .hl-dot-sage { background: #8FB08F; } .hl-dot-rose { background: #F29CAB; } .hl-dot-sky { background: #8EC5E8; } .hl-dot-lilac { background: #C3A6E8; }
.hl-chip { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.bible-nav { display: flex; justify-content: space-between; max-width: 760px; margin: var(--s4) auto; }
.verse-actions { position: sticky; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 20; max-width: 760px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; justify-content: space-between;
  padding: var(--s3) var(--s4); border-radius: var(--r-lg); background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: var(--shadow-lg); border: 1px solid var(--line); animation: gd-rise .25s var(--ease); }
@media (min-width: 901px) { .verse-actions { bottom: var(--s4); } }

/* ---------- Notes & sticky notes ---------- */
.note-card { background: linear-gradient(180deg, color-mix(in srgb, var(--note, var(--surface)) 88%, var(--surface)), var(--note, var(--surface))) !important; }
:is([data-theme="midnight"], [data-theme="charcoal"]) .note-card, :is([data-theme="midnight"], [data-theme="charcoal"]) .sticky { color: #26302A; }
.sticky-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--s5) var(--s4); padding: var(--s4) var(--s2) var(--s6); margin-bottom: var(--s4); }
.sticky { position: relative; min-height: 170px; padding: var(--s5) var(--s4) var(--s4); background: var(--sticky); cursor: pointer;
  transform: rotate(calc(var(--tilt) * 1.2deg)); box-shadow: 0 10px 22px rgba(0,0,0,.12), inset 0 -18px 30px rgba(0,0,0,.04);
  border-radius: 3px 3px 18px 3px; transition: transform .25s var(--ease), box-shadow .25s var(--ease); font-family: "Caveat", var(--font-body); font-size: 1.35rem; line-height: 1.25; display: flex; flex-direction: column; gap: 6px; }
.sticky:hover { transform: rotate(0) translateY(-4px) scale(1.02); box-shadow: 0 16px 30px rgba(0,0,0,.16); z-index: 2; }
.sticky strong { font-family: var(--font-body); font-size: .95rem; }
.sticky p { margin: 0; white-space: pre-wrap; flex: 1; }
.sticky__pin { position: absolute; top: -7px; left: 50%; width: 16px; height: 16px; border-radius: 50%; transform: translateX(-50%);
  background: radial-gradient(circle at 35% 35%, #fff 0 18%, var(--rose) 22% 100%); box-shadow: 0 2px 4px rgba(0,0,0,.25); }
.sticky__cat { font-family: var(--font-body); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; opacity: .6; }
.note-editor { border-radius: var(--r); padding: var(--s4); background: var(--note, var(--surface)); border: 1px solid var(--line); display: flex; flex-direction: column; gap: var(--s2); }
.note-editor__title { border: 0; background: transparent; font-family: var(--font-display); font-size: 1.3rem; padding: 4px 0; outline: none; color: #26302A; }
.note-editor__body { border: 0; background: transparent; resize: vertical; min-height: 160px; font-size: 1rem; line-height: 1.7; outline: none; color: #26302A; }
.note-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--s3); align-items: start; margin-top: var(--s3); }
.note-options > div { display: flex; flex-direction: column; gap: 6px; }

/* ---------- Vision board ---------- */
.vb-toolbar { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; margin-bottom: var(--s3); }
.vb-toolbar label.btn { cursor: pointer; }
.vb-stickers { display: flex; gap: 2px; flex-wrap: wrap; padding: 2px 6px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.vb-sticker-btn { border: 0; background: none; font-size: 1.2rem; cursor: pointer; padding: 4px; border-radius: 8px; transition: transform .2s var(--ease); }
.vb-sticker-btn:hover { transform: scale(1.25); }
.vb { position: relative; width: 100%; aspect-ratio: 16 / 10; border-radius: var(--r-lg); overflow: hidden; container-type: inline-size; touch-action: pan-y;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--line) 80%, transparent), var(--shadow); user-select: none; -webkit-user-select: none; }
.vb--linen { background: linear-gradient(135deg, #F6F1E7, #EDE5D6); }
.vb--cork { background: radial-gradient(circle at 20% 30%, rgba(0,0,0,.05) 0 2px, transparent 3px) 0 0 / 14px 14px, linear-gradient(135deg, #C9A57A, #B88E60); }
.vb--sunrise { background: linear-gradient(160deg, #FFE6C7, #F7C1B6 55%, #D9B8E0); }
.vb--sage { background: linear-gradient(160deg, #E4ECDD, #C9D8C2); }
.vb--blush { background: linear-gradient(160deg, #FCE9EC, #F4D3DC); }
.vb--ocean { background: linear-gradient(160deg, #DCEEF7, #B8D7E8); }
.vb--night { background: radial-gradient(1px 1px at 20% 30%, #fff, transparent), radial-gradient(1px 1px at 70% 20%, #fff, transparent), radial-gradient(1.5px 1.5px at 45% 70%, #fff, transparent), linear-gradient(160deg, #1D2440, #3B2E5A); }
.vb--grid { background: linear-gradient(rgba(94,122,98,.12) 1px, transparent 1px) 0 0 / 24px 24px, linear-gradient(90deg, rgba(94,122,98,.12) 1px, transparent 1px) 0 0 / 24px 24px, #FFFDF8; }
.vb-empty { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 6px; color: #5A645D; padding: var(--s5); }
.vb-item { position: absolute; display: flex; align-items: center; justify-content: center; text-align: center; cursor: grab; touch-action: none; border-radius: 10px;
  transition: box-shadow .2s var(--ease), outline-color .2s; outline: 2px solid transparent; outline-offset: 3px; color: #26302A; }
.vb-item.is-dragging { cursor: grabbing; box-shadow: 0 18px 40px rgba(0,0,0,.25); transition: none; }
.vb-item.is-selected { outline-color: var(--primary); }
.vb-item img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; pointer-events: none; }
.vb-item--image { padding: 6px; }
.vb-caption { position: absolute; left: 6px; right: 6px; bottom: 6px; padding: 4px 8px; font-size: clamp(9px, 1.4cqw, 16px); background: rgba(255,255,255,.85); border-radius: 0 0 6px 6px; }
.vb-text { padding: 6px 10px; font-size: calc(var(--fs) * .1cqw * 1.25); line-height: 1.25; white-space: pre-wrap; overflow-wrap: anywhere; }
.vb-item--sticker .vb-text { font-size: calc(var(--fs) * .1cqw * 1.3); padding: 0; }
.vb-resize { position: absolute; right: -6px; bottom: -6px; width: 18px; height: 18px; border-radius: 50%; background: var(--primary); border: 3px solid #fff; cursor: nwse-resize; opacity: 0; transition: opacity .2s; box-shadow: var(--shadow-sm); }
.vb-item:hover .vb-resize, .vb-item.is-selected .vb-resize { opacity: 1; }
.vb-bg-none { background: transparent; } .vb-bg-paper { background: #FFFDF8; box-shadow: 0 6px 16px rgba(0,0,0,.12); }
.vb-bg-sage { background: #DCE7D6; box-shadow: 0 6px 16px rgba(0,0,0,.1); } .vb-bg-gold { background: #F5E6BF; box-shadow: 0 6px 16px rgba(0,0,0,.1); }
.vb-bg-blush { background: #F9DCE3; box-shadow: 0 6px 16px rgba(0,0,0,.1); } .vb-bg-lilac { background: #E6DAF5; box-shadow: 0 6px 16px rgba(0,0,0,.1); }
.vb-bg-sky { background: #D6EAF6; box-shadow: 0 6px 16px rgba(0,0,0,.1); } .vb-bg-ink { background: #26302A; color: #fff; box-shadow: 0 6px 16px rgba(0,0,0,.2); }
.vb-bg-glass { background: rgba(255,255,255,.45); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 6px 16px rgba(0,0,0,.1); }
.swatch.vb-bg-none { background: repeating-linear-gradient(45deg, #fff 0 4px, #eee 4px 8px); }
.vb-inspector { margin-top: var(--s3); }
.vision-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s2); }
.vision-row { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); border-radius: var(--r); background: color-mix(in srgb, var(--surface) 88%, transparent); border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow-sm); }
.vision-row__body { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.vision-row.is-done strong { text-decoration: line-through; color: var(--ink-2); }

/* ---------- Platforms (links & creator) ---------- */
.platform-badge { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; flex: none; color: #fff; font-weight: 800; font-size: 1.05rem;
  background: linear-gradient(145deg, color-mix(in srgb, var(--brand) 82%, #fff), var(--brand)); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 4px 10px color-mix(in srgb, var(--brand) 30%, transparent); }
.platform-badge--sm { width: 22px; height: 22px; border-radius: 7px; font-size: .7rem; }
.platform-badge--generic { background: var(--primary-soft); color: var(--primary-strong); box-shadow: none; }
.platform-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: var(--s2); }
.platform-pick { display: flex; align-items: center; gap: var(--s2); padding: 8px; border-radius: var(--r); border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); background: color-mix(in srgb, var(--surface) 85%, transparent); cursor: pointer; font-weight: 500; font-size: .88rem; transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.platform-pick:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.link-group__title { margin: var(--s5) 0 var(--s2); color: var(--ink-2); text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; }
.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s3); }
.link-card { display: flex; align-items: center; gap: var(--s2); padding: var(--s3); border-radius: var(--r-lg); background: color-mix(in srgb, var(--surface) 88%, transparent); border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow-sm); transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.link-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.link-card__main { flex: 1; display: flex; align-items: center; gap: var(--s3); text-decoration: none; color: var(--ink); min-width: 0; }
.link-card__main span { display: flex; flex-direction: column; min-width: 0; }
.link-card__main small { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.input-prefix { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; background: var(--surface); }
.input-prefix span { padding: 10px 10px; background: var(--surface-2); color: var(--ink-2); font-size: .82rem; display: flex; align-items: center; white-space: nowrap; max-width: 55%; overflow: hidden; text-overflow: ellipsis; }
.input-prefix .input { border: 0; border-radius: 0; box-shadow: none; }
.chip--platform { display: inline-flex; align-items: center; gap: 6px; }
.stage-track { display: flex; flex-wrap: wrap; gap: 4px; }
.stage { position: relative; padding: 8px 14px; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 85%, transparent); cursor: pointer; font-weight: 500; font-size: .86rem; border-radius: var(--r-pill); transition: all var(--t); }
.stage.is-reached { background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); color: var(--primary-strong); }
.stage.is-on { background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 85%, #fff), var(--primary-strong)); color: var(--on-primary); border-color: var(--primary); }
.plan-out { border: 1px dashed var(--line); border-radius: var(--r); padding: var(--s3) var(--s4); }
.plan-out summary { font-weight: 600; }
.plan-out[open] summary { margin-bottom: var(--s3); }
.content-list { display: flex; flex-direction: column; gap: var(--s2); }
.content-card { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); border-radius: var(--r-lg); background: color-mix(in srgb, var(--surface) 88%, transparent); border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow-sm); }
.content-card__body { flex: 1; display: flex; flex-direction: column; cursor: pointer; min-width: 0; }
.kanban--wide { grid-template-columns: repeat(6, minmax(200px, 1fr)); }
.kanban__card { cursor: pointer; }

@media (max-width: 900px) {
  .bible-toolbar { grid-template-columns: 1fr 1fr; }
  .bible-toolbar .bible-goto { grid-column: 1 / -1; }
  .vb { aspect-ratio: 3 / 4; }
  .kanban--wide { grid-template-columns: repeat(6, 78%); }
}
@media (max-width: 600px) {
  .modal { top: auto; bottom: 0; transform: translateX(-50%); width: 100vw; max-height: 92dvh; border-radius: 22px 22px 0 0; }
}


/* ---------- App fonts (Settings → Appearance) ---------- */
html[data-font="editorial"] { --font-display: "DM Serif Display", Georgia, serif; --font-body: "DM Sans", system-ui, sans-serif; }
html[data-font="heritage"] { --font-display: "Libre Baskerville", Georgia, serif; --font-body: "Source Sans 3", system-ui, sans-serif; }
html[data-font="bookish"] { --font-display: "Lora", Georgia, serif; --font-body: "Lora", Georgia, serif; }
html[data-font="elegant"] { --font-display: "Playfair Display", Georgia, serif; --font-body: "Lato", system-ui, sans-serif; }
html[data-font="luxe"] { --font-display: "Cormorant Garamond", Georgia, serif; --font-body: "Montserrat", system-ui, sans-serif; }
html[data-font="regal"] { --font-display: "Cinzel", Georgia, serif; --font-body: "Lato", system-ui, sans-serif; }
html[data-font="graceful"] { --font-display: "Dancing Script", cursive; --font-body: "Nunito", system-ui, sans-serif; }
html[data-font="signature"] { --font-display: "Great Vibes", cursive; --font-body: "Lato", system-ui, sans-serif; }
html[data-font="modern"] { --font-display: "Plus Jakarta Sans", system-ui, sans-serif; --font-body: "Plus Jakarta Sans", system-ui, sans-serif; }
html[data-font="clean"] { --font-display: "Poppins", system-ui, sans-serif; --font-body: "Poppins", system-ui, sans-serif; }
html[data-font="sharp"] { --font-display: "Montserrat", system-ui, sans-serif; --font-body: "Montserrat", system-ui, sans-serif; }
html[data-font="airy"] { --font-display: "Raleway", system-ui, sans-serif; --font-body: "Raleway", system-ui, sans-serif; }
html[data-font="strong"] { --font-display: "Oswald", system-ui, sans-serif; --font-body: "Roboto", system-ui, sans-serif; }
html[data-font="statement"] { --font-display: "Abril Fatface", Georgia, serif; --font-body: "Josefin Sans", system-ui, sans-serif; }
html[data-font="rounded"] { --font-display: "Nunito", system-ui, sans-serif; --font-body: "Nunito", system-ui, sans-serif; }
html[data-font="friendly"] { --font-display: "Quicksand", system-ui, sans-serif; --font-body: "Quicksand", system-ui, sans-serif; }
html[data-font="playful"] { --font-display: "Fredoka", system-ui, sans-serif; --font-body: "Nunito", system-ui, sans-serif; }
html:is([data-font="graceful"], [data-font="signature"]) :is(h1, h2) { font-weight: 400; letter-spacing: 0; }
html:is([data-font="graceful"], [data-font="signature"]) :is(h3, h4, .h3, .h4, .card__title, .stat__value) { font-family: var(--font-body); }
html[data-font="strong"] :is(h1, h2, h3) { text-transform: uppercase; letter-spacing: .02em; }

/* ---------- Vision-board fonts ---------- */
.vb-font-display { font-family: var(--font-display); }
.vb-font-body { font-family: var(--font-body); }
.vb-font-script { font-family: "Caveat", cursive; font-weight: 700; }
.vb-font-bold { font-family: var(--font-body); font-weight: 800; letter-spacing: -.01em; }
.vb-font-playfair { font-family: "Playfair Display", serif; }
.vb-font-cormorant { font-family: "Cormorant Garamond", serif; }
.vb-font-cinzel { font-family: "Cinzel", serif; }
.vb-font-dancing { font-family: "Dancing Script", cursive; }
.vb-font-greatvibes { font-family: "Great Vibes", cursive; }
.vb-font-pacifico { font-family: "Pacifico", cursive; }
.vb-font-satisfy { font-family: "Satisfy", cursive; }
.vb-font-abril { font-family: "Abril Fatface", serif; }
.vb-font-montserrat { font-family: "Montserrat", sans-serif; }
.vb-font-oswald { font-family: "Oswald", sans-serif; }
.vb-font-josefin { font-family: "Josefin Sans", sans-serif; }
.vb-font-lora { font-family: "Lora", serif; }
.vb-font-bebas { font-family: "Bebas Neue", sans-serif; }
.vb-font-amatic { font-family: "Amatic SC", cursive; }


/* ---------- Scrolling platform rows (My Links) ---------- */
.marquee { overflow: hidden; padding: 6px 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.marquee__track { display: flex; gap: var(--s2); width: max-content; animation: gd-marquee 38s linear infinite; }
.marquee--reverse .marquee__track { animation-direction: reverse; animation-duration: 44s; }
.marquee:hover .marquee__track, .marquee:focus-within .marquee__track, .marquee:active .marquee__track { animation-play-state: paused; }
.marquee .platform-pick { flex: none; min-width: 140px; }
@keyframes gd-marquee { from { transform: translateX(0); } to { transform: translateX(calc(-50% - var(--s2) / 2)); } }
html[data-motion="reduce"] .marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
@media (prefers-reduced-motion: reduce) { .marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; } }

/* ---------- Vision board typing, presets, progress ---------- */
.vb-preset { max-width: 220px; min-height: 34px; padding: 4px 10px; font-size: .86rem; }
.vb-edit { width: 100%; height: 100%; border: 0; outline: none; resize: none; background: rgba(255,255,255,.35); color: inherit; text-align: center;
  font-size: calc(var(--fs) * .1cqw * 1.25); line-height: 1.25; padding: 6px 10px; border-radius: 8px; cursor: text; }
.vb-item--sticker .vb-edit { font-size: calc(var(--fs) * .1cqw * 1.3); }
.vision-progress { display: grid; grid-template-columns: minmax(120px, 1fr) auto auto; gap: var(--s2); align-items: center; margin-top: 6px; }
.segmented--sm button { padding: 4px 10px; font-size: .78rem; }
.font-select { font-size: 1.05rem; }
.font-preview { display: flex; flex-direction: column; gap: 4px; padding: var(--s4); margin: var(--s3) 0; border-radius: var(--r); background: linear-gradient(140deg, var(--primary-soft), var(--surface)); border: 1px solid var(--line); }
.font-preview__head { font-size: 1.6rem; line-height: 1.2; }
.font-preview__body { color: var(--ink-2); }
@media (max-width: 600px) { .vision-progress { grid-template-columns: 1fr auto; } .vision-progress .segmented { grid-column: 1 / -1; } }


/* ---------- Budget ---------- */
.tone-ok-text { color: #3F7D55; } .tone-rose-text { color: #B0506A; } .tone-sky-text { color: #4F7C96; }
:is([data-theme="midnight"], [data-theme="charcoal"]) .tone-ok-text { color: #8FD0A6; }
:is([data-theme="midnight"], [data-theme="charcoal"]) .tone-rose-text { color: #F29CAB; }
:is([data-theme="midnight"], [data-theme="charcoal"]) .tone-sky-text { color: #8EC5E8; }
.budget-hero { text-align: center; padding: var(--s6) var(--s5); border-radius: var(--r-lg); margin-bottom: var(--s4);
  background: linear-gradient(160deg, color-mix(in srgb, var(--surface) 92%, transparent), color-mix(in srgb, var(--primary-soft) 70%, var(--surface)));
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow); }
.budget-hero__label { display: block; font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--primary-strong); }
.budget-hero__total { display: block; font-family: var(--font-display); font-size: clamp(2.2rem, 1.6rem + 3vw, 3.4rem); color: var(--primary-strong); margin: 6px 0 var(--s4); letter-spacing: -.02em; }
.budget-hero__total.is-negative { color: var(--danger); }
.budget-hero__row { display: flex; justify-content: center; gap: var(--s6); flex-wrap: wrap; margin: var(--s2) 0; }
.budget-hero__row div { display: flex; flex-direction: column; }
.budget-hero__row strong { font-size: 1.05rem; }
.budget-hero__row span { font-size: .8rem; color: var(--ink-2); }
.budget-month { display: inline-flex; align-items: center; gap: var(--s2); margin: var(--s3) 0 var(--s1); padding: 4px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--surface) 80%, transparent); font-weight: 600; }
.budget-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: var(--s4); align-items: start; margin-bottom: var(--s4); }
.budget-grid > .card { margin: 0; }
.segmented--big { width: 100%; }
.segmented--big button { flex: 1; padding: 10px 16px; font-size: .95rem; }
.budget-chip.is-on { background: var(--cat) !important; border-color: var(--cat) !important; color: #fff; box-shadow: 0 4px 12px color-mix(in srgb, var(--cat) 35%, transparent); }
.budget-chip.is-on .budget-dot { background: #fff; }
.budget-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--cat); margin-right: 2px; vertical-align: middle; }
.input--money { font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; }
.budget-donut-wrap { display: grid; place-items: center; margin-bottom: var(--s4); }
.budget-donut { width: 180px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; position: relative; animation: gd-spin-in .8s var(--ease) both; }
.budget-donut::before { content: ""; position: absolute; inset: 22px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 2px 8px rgba(0,0,0,.06); }
.budget-donut span { position: relative; display: flex; flex-direction: column; align-items: center; }
.budget-donut strong { font-family: var(--font-display); font-size: 1.1rem; }
.budget-donut small { color: var(--ink-2); font-size: .75rem; }
@keyframes gd-spin-in { from { transform: rotate(-90deg) scale(.8); opacity: 0; } }
.budget-bars { display: flex; flex-direction: column; gap: var(--s3); }
.budget-bar .progress { margin-top: 4px; }
.budget-bar.is-over strong { color: var(--danger); }
.savings-list { display: flex; flex-direction: column; gap: var(--s2); margin-bottom: var(--s3); }
.savings { display: flex; align-items: center; gap: var(--s3); padding: var(--s3); border-radius: var(--r); background: color-mix(in srgb, var(--surface) 85%, transparent); border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); flex-wrap: wrap; }
.savings__icon, .budget-entry__icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 1.3rem; flex: none;
  background: linear-gradient(145deg, color-mix(in srgb, var(--cat) 25%, #fff), color-mix(in srgb, var(--cat) 45%, #fff)); box-shadow: inset 0 1px 0 rgba(255,255,255,.5); }
.budget-entry__icon { width: 36px; height: 36px; border-radius: 11px; font-size: 1rem; }
.savings__body { flex: 1; min-width: 160px; display: flex; flex-direction: column; gap: 2px; }
.savings__balance { color: var(--sky); font-weight: 700; }
.savings__adjust { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.savings__adjust .input { width: 130px; }
.round-btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--ink-2); transition: all var(--t); }
.round-btn:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
.savings-add { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: var(--s2); margin-bottom: var(--s3); }
.budget-day { font-family: var(--font-body); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); margin: var(--s4) 0 0; }
.budget-entry { align-items: center; }
.budget-entry > div { flex: 1; }
@media (max-width: 900px) {
  .budget-grid { grid-template-columns: 1fr; }
  .savings-add { grid-template-columns: 1fr 1fr; }
  .savings-add > :first-child { grid-column: 1 / -1; }
  .budget-hero__row { gap: var(--s4); }
}


/* ---------- Animated mood faces ---------- */
.mood__face { display: grid; place-items: center; font-size: 0; }
.mood-face { overflow: visible; }
.mood-face__body { transform-origin: 32px 32px; animation: gd-mood-bob 3.6s ease-in-out infinite; }
.mood-face--2 .mood-face__body { animation-delay: .4s; } .mood-face--3 .mood-face__body { animation-delay: .8s; }
.mood-face--4 .mood-face__body { animation-delay: 1.2s; } .mood-face--5 .mood-face__body { animation-delay: 1.6s; }
.mood-face__eyes { transform-origin: 32px 27px; animation: gd-blink 4.5s infinite; }
.mood-face--3 .mood-face__eyes { animation-delay: 1s; } .mood-face--4 .mood-face__eyes { animation-delay: 2s; }
.mood-face__tear { animation: gd-tear 2.4s ease-in infinite; }
.mood-face__ring { opacity: 0; transform-origin: 32px 32px; }
.mood__btn:hover .mood-face__body { animation: gd-mood-wiggle .5s ease-in-out; }
.mood-face.is-on .mood-face__body { animation: gd-mood-pop .6s cubic-bezier(.34, 1.6, .5, 1), gd-mood-bob 2.4s ease-in-out .6s infinite; }
.mood-face.is-on .mood-face__ring { animation: gd-mood-ring 1.6s ease-out infinite; }
.mood-face--5.is-on .mood-face__mouth { animation: gd-mood-laugh 1.2s ease-in-out infinite; transform-origin: 32px 42px; }
.mood__btn.is-on { background: linear-gradient(160deg, var(--surface), var(--primary-soft)); }
@keyframes gd-mood-bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-2.5px) rotate(-2deg); } }
@keyframes gd-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes gd-tear { 0% { transform: translateY(-2px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(10px); opacity: 0; } }
@keyframes gd-mood-wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-10deg) scale(1.05); } 75% { transform: rotate(10deg) scale(1.05); } }
@keyframes gd-mood-pop { 0% { transform: scale(.7); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes gd-mood-ring { 0% { opacity: .7; transform: scale(.85); } 100% { opacity: 0; transform: scale(1.25); } }
@keyframes gd-mood-laugh { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(.8); } }


/* ---------- Compact Home cards ---------- */
.dash__grid { align-items: start; }
.mood__options { gap: 6px; }
.mood__btn { padding: 8px 2px; }
.mood__label { font-size: .72rem; }
.quick a { padding: var(--s2) var(--s1); font-size: .82rem; }
.quick .icon-tile { width: 36px; height: 36px; border-radius: 11px; }

/* ---------- Links quick add ---------- */
.quick-add { display: flex; gap: var(--s2); flex-wrap: wrap; }
.quick-add__select { flex: 1; min-width: 220px; }

/* ---------- Budget categories ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: var(--s2); margin-top: var(--s2); }
.cat-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: var(--s3) var(--s2); border-radius: var(--r); cursor: pointer; text-align: center;
  border: 1.5px solid color-mix(in srgb, var(--cat) 30%, var(--line)); background: linear-gradient(160deg, var(--surface), color-mix(in srgb, var(--cat) 12%, var(--surface)));
  transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.cat-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.cat-tile.is-on { border-color: var(--cat); box-shadow: 0 0 0 2px var(--cat); }
.cat-tile__icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 1.35rem;
  background: linear-gradient(145deg, color-mix(in srgb, var(--cat) 25%, #fff), color-mix(in srgb, var(--cat) 45%, #fff)); }
.cat-tile__name { font-weight: 600; font-size: .88rem; }
.cat-tile__limit { font-size: .72rem; color: var(--ink-2); }
.cat-editor { margin-top: var(--s4); }
.icon-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 6px; max-height: 200px; overflow-y: auto; padding: 4px; }
.icon-pick { height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-size: 1.25rem; cursor: pointer; transition: transform .15s var(--ease); }
.icon-pick:hover { transform: scale(1.12); }
.icon-pick.is-on { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 2px var(--primary); }


/* =====================================================================
   Glossy animated icon system (applies everywhere automatically)
   ===================================================================== */
:root { --tone-sage: var(--primary); --tone-gold: var(--accent); --tone-plum: var(--plum); --tone-rose: var(--rose); --tone-sky: var(--sky); }

/* Draw-in: every glossy icon sketches itself when it appears */
.gtile .icon *, .nav-ico .icon *, .card-ico .icon * { stroke-dasharray: 1; stroke-dashoffset: 0; animation: gd-draw .9s var(--ease) both; }
@keyframes gd-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

/* Glossy tile */
.gtile { --t: var(--tone-sage); position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(150deg, color-mix(in srgb, var(--t) 62%, #fff) 0%, var(--t) 55%, color-mix(in srgb, var(--t) 78%, #000) 100%) !important;
  color: #fff !important; border: 1px solid color-mix(in srgb, var(--t) 60%, #fff);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), inset 0 -3px 6px rgba(0,0,0,.12), 0 6px 14px color-mix(in srgb, var(--t) 38%, transparent);
  transition: transform .35s cubic-bezier(.34, 1.56, .5, 1), box-shadow .3s var(--ease); animation: gd-tile-in .55s cubic-bezier(.34, 1.56, .5, 1) both; }
.gtile .icon { position: relative; z-index: 2; filter: drop-shadow(0 1px 1px rgba(0,0,0,.25)); }
.gtile::before { content: ""; position: absolute; left: 6%; right: 6%; top: 4%; height: 46%; border-radius: 40% 40% 50% 50% / 60% 60% 40% 40%;
  background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0)); z-index: 1; pointer-events: none; }
.gtile__shine { position: absolute; inset: -40% auto -40% -60%; width: 40%; transform: rotate(20deg); z-index: 3; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent); opacity: 0; }
.icon-tile--sage.gtile { --t: var(--tone-sage); } .icon-tile--gold.gtile { --t: var(--tone-gold); } .icon-tile--plum.gtile { --t: var(--tone-plum); }
.icon-tile--rose.gtile { --t: var(--tone-rose); } .icon-tile--sky.gtile { --t: var(--tone-sky); }
.gtile--float { animation: gd-tile-in .55s cubic-bezier(.34, 1.56, .5, 1) both, gd-float 5s ease-in-out .6s infinite; }
@keyframes gd-tile-in { from { transform: scale(.4) rotate(-12deg); opacity: 0; } }
@keyframes gd-shine { from { left: -60%; opacity: 1; } to { left: 130%; opacity: 1; } }

:is(a, button, .card, .stat, .shortcut, .cat-tile, .try-list a, .quick a, .link-card, .empty, .platform-pick, label):hover > .gtile,
:is(a, button, .stat, .shortcut, .cat-tile, .quick a, .link-card):hover .gtile { transform: translateY(-3px) rotate(-6deg) scale(1.06);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), inset 0 -3px 6px rgba(0,0,0,.12), 0 12px 22px color-mix(in srgb, var(--t) 45%, transparent); }
:is(a, button, .stat, .shortcut, .cat-tile, .quick a, .link-card, .card):hover .gtile__shine { animation: gd-shine .8s var(--ease); }

/* Card title icons: small glossy badges */
.card-ico { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; color: #fff !important; position: relative; overflow: hidden;
  background: linear-gradient(150deg, color-mix(in srgb, var(--primary) 60%, #fff), var(--primary) 60%, var(--primary-strong));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 4px 10px color-mix(in srgb, var(--primary) 30%, transparent); }
.card-ico::before { content: ""; position: absolute; inset: 2px 3px 50% 3px; border-radius: 8px 8px 50% 50%; background: linear-gradient(180deg, rgba(255,255,255,.5), transparent); }
.card-ico .icon { position: relative; color: #fff; }
.card--gold .card-ico { background: linear-gradient(150deg, color-mix(in srgb, var(--accent) 60%, #fff), var(--accent) 60%, color-mix(in srgb, var(--accent) 75%, #000)); }
.card__title .icon { color: #fff; }

/* Navigation icons: glossy chips that light up when active */
.nav-ico { --t: var(--tone-sage); display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; flex: none; position: relative; overflow: hidden;
  color: color-mix(in srgb, var(--t) 85%, var(--ink)); background: color-mix(in srgb, var(--t) 12%, transparent);
  transition: transform .35s cubic-bezier(.34, 1.56, .5, 1), background .3s var(--ease), color .3s, box-shadow .3s; }
.nav-ico--gold { --t: var(--tone-gold); } .nav-ico--plum { --t: var(--tone-plum); } .nav-ico--rose { --t: var(--tone-rose); } .nav-ico--sky { --t: var(--tone-sky); }
.nav-item:hover .nav-ico { transform: scale(1.1) rotate(-6deg); background: color-mix(in srgb, var(--t) 22%, transparent); }
.nav-item.active .nav-ico { color: #fff; background: linear-gradient(150deg, color-mix(in srgb, var(--t) 60%, #fff), var(--t) 60%, color-mix(in srgb, var(--t) 78%, #000));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 6px 14px color-mix(in srgb, var(--t) 40%, transparent); animation: gd-nav-pop .5s cubic-bezier(.34, 1.56, .5, 1); }
.nav-item.active .nav-ico::before { content: ""; position: absolute; inset: 2px 3px 50% 3px; border-radius: 9px 9px 50% 50%; background: linear-gradient(180deg, rgba(255,255,255,.5), transparent); }
.nav-item.active .nav-ico .icon { position: relative; color: #fff !important; }
.nav-item.active { background: color-mix(in srgb, var(--primary-soft) 70%, transparent); }
@keyframes gd-nav-pop { 0% { transform: scale(.7); } 60% { transform: scale(1.15) rotate(-6deg); } 100% { transform: scale(1); } }
.bottom-nav .nav-item { gap: 3px; }
.bottom-nav .nav-ico { width: 34px; height: 30px; border-radius: 12px; }
@media (max-width: 900px) {
  .bottom-nav .nav-item.active { background: transparent !important; }
  .bottom-nav .nav-item.active .icon { background: none !important; width: auto !important; height: auto !important; padding: 0 !important; }
}

/* ---------- Per-icon personalities (on hover / focus / when active) ---------- */
:is(a, button, .card, .stat, .shortcut, .nav-item, .cat-tile, .quick a, .link-card, .platform-pick, summary, label):is(:hover, :focus-visible) .icon,
.nav-item.active .icon { transform-box: fill-box; transform-origin: center; }
:is(a, button, .card, .stat, .shortcut, .nav-item, .quick a, .link-card):is(:hover, :focus-visible) .icon--bell { animation: gd-i-ring .8s ease-in-out; transform-origin: 50% 10%; }
:is(a, button, .card, .stat, .shortcut, .nav-item, .quick a, .link-card):is(:hover, :focus-visible) :is(.icon--heart, .icon--wellness) { animation: gd-i-beat .9s ease-in-out infinite; }
:is(a, button, .card, .stat, .shortcut, .nav-item, .quick a, .link-card):is(:hover, :focus-visible) :is(.icon--star, .icon--sun, .icon--settings) { animation: gd-i-spin 1.2s cubic-bezier(.34, 1.56, .5, 1); }
:is(a, button, .card, .stat, .shortcut, .nav-item, .quick a, .link-card):is(:hover, :focus-visible) :is(.icon--sparkles, .icon--flame) { animation: gd-i-twinkle .9s ease-in-out infinite; }
:is(a, button, .card, .stat, .shortcut, .nav-item, .quick a, .link-card):is(:hover, :focus-visible) :is(.icon--send, .icon--right, .icon--logout) { animation: gd-i-fly .7s ease-in-out; }
:is(a, button, .card, .stat, .shortcut, .nav-item, .quick a, .link-card):is(:hover, :focus-visible) .icon--left { animation: gd-i-back .7s ease-in-out; }
:is(a, button, .card, .stat, .shortcut, .nav-item, .quick a, .link-card):is(:hover, :focus-visible) :is(.icon--plus) { animation: gd-i-turn .5s ease-in-out; }
:is(a, button, .card, .stat, .shortcut, .nav-item, .quick a, .link-card):is(:hover, :focus-visible) :is(.icon--trash, .icon--x, .icon--ban) { animation: gd-i-shake .45s ease-in-out; }
:is(a, button, .card, .stat, .shortcut, .nav-item, .quick a, .link-card):is(:hover, :focus-visible) :is(.icon--home, .icon--users, .icon--download, .icon--hands, .icon--faith) { animation: gd-i-hop .6s cubic-bezier(.34, 1.56, .5, 1); }
:is(a, button, .card, .stat, .shortcut, .nav-item, .quick a, .link-card):is(:hover, :focus-visible) :is(.icon--journal, .icon--book, .icon--note, .icon--calendar) { animation: gd-i-flip .7s ease-in-out; }
:is(a, button, .card, .stat, .shortcut, .nav-item, .quick a, .link-card):is(:hover, :focus-visible) :is(.icon--timer, .icon--search, .icon--edit, .icon--camera, .icon--moon, .icon--link) { animation: gd-i-wiggle .6s ease-in-out; }
:is(a, button, .card, .stat, .shortcut, .nav-item, .quick a, .link-card):is(:hover, :focus-visible) :is(.icon--target, .icon--chat, .icon--image, .icon--grid, .icon--shield, .icon--key, .icon--lock, .icon--palette, .icon--database, .icon--fingerprint, .icon--flag, .icon--pin, .icon--utensils, .icon--dumbbell, .icon--menu, .icon--minus) { animation: gd-i-pulse .7s ease-in-out; }
:is(a, button, .card, .stat, .shortcut, .nav-item, .quick a, .link-card):is(:hover, :focus-visible) :is(.icon--wallet, .icon--piggy) { animation: gd-i-wobble .8s ease-in-out; }
:is(a, button, .card, .stat, .shortcut, .nav-item, .quick a, .link-card):is(:hover, :focus-visible) .icon--chart { animation: gd-i-grow .7s ease-in-out; transform-origin: 50% 100%; }
:is(a, button, .card, .stat, .shortcut, .nav-item, .quick a, .link-card):is(:hover, :focus-visible) .icon--check * { animation: gd-draw .5s var(--ease) both; stroke-dasharray: 1; }
@keyframes gd-i-ring { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(16deg); } 40% { transform: rotate(-14deg); } 60% { transform: rotate(9deg); } 80% { transform: rotate(-5deg); } }
@keyframes gd-i-beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.22); } 30% { transform: scale(1); } 45% { transform: scale(1.14); } }
@keyframes gd-i-spin { from { transform: rotate(0) scale(1); } 50% { transform: rotate(180deg) scale(1.15); } to { transform: rotate(360deg) scale(1); } }
@keyframes gd-i-twinkle { 0%, 100% { transform: scale(1) rotate(0); opacity: 1; } 50% { transform: scale(1.18) rotate(8deg); opacity: .8; } }
@keyframes gd-i-fly { 0% { transform: translateX(0); } 45% { transform: translateX(4px); opacity: .4; } 50% { transform: translateX(-4px); opacity: 0; } 100% { transform: translateX(0); opacity: 1; } }
@keyframes gd-i-back { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-4px); } }
@keyframes gd-i-turn { to { transform: rotate(90deg); } }
@keyframes gd-i-shake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }
@keyframes gd-i-hop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-4px) scale(1.08); } }
@keyframes gd-i-flip { 0%, 100% { transform: rotateY(0); } 50% { transform: rotateY(180deg); } }
@keyframes gd-i-wiggle { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-12deg); } 40% { transform: rotate(10deg); } 60% { transform: rotate(-6deg); } 80% { transform: rotate(4deg); } }
@keyframes gd-i-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.2); } }
@keyframes gd-i-wobble { 0%, 100% { transform: rotate(0) scale(1); } 30% { transform: rotate(-8deg) scale(1.1); } 60% { transform: rotate(6deg) scale(1.05); } }
@keyframes gd-i-grow { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.2); } }

/* Buttons: icons get a soft glow */
.btn--primary .icon, .btn--gold .icon, .fab .icon { filter: drop-shadow(0 1px 2px rgba(0,0,0,.25)); }
.fab { overflow: hidden; }
.fab::before { content: ""; position: absolute; inset: 3px 5px 50% 5px; border-radius: 14px 14px 50% 50%; background: linear-gradient(180deg, rgba(255,255,255,.45), transparent); pointer-events: none; }
.fab .icon { animation: gd-i-twinkle 2.4s ease-in-out infinite; }


/* ---------- Count-up numbers & emoji bursts ---------- */
.counter [data-count].is-counted { animation: gd-count-pop .45s cubic-bezier(.34, 1.56, .5, 1); display: inline-block; }
@keyframes gd-count-pop { 50% { transform: scale(1.08); } }
.burst-bit { position: fixed; z-index: 95; pointer-events: none; font-size: 1.4rem; transform: translate(-50%, -50%); animation: gd-burst 1.2s cubic-bezier(.2, .7, .3, 1) forwards; }
@keyframes gd-burst { 0% { transform: translate(-50%, -50%) scale(.3); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--rot)) scale(1); opacity: 0; } }

/* ---------- Mood page ---------- */
.mood-checkin { background: linear-gradient(160deg, color-mix(in srgb, var(--surface) 90%, transparent), color-mix(in srgb, var(--tint, var(--primary-soft)) 25%, var(--surface))) !important; }
.mood--big .mood__options { gap: var(--s3); }
.mood--big .mood__btn { padding: var(--s3) var(--s2); border-radius: var(--r-lg); }
.mood--big .mood__label { font-size: .85rem; font-weight: 600; }
.mood--big .mood__btn.is-on { transform: translateY(-4px); box-shadow: var(--shadow); }
.mood-checkin__msg { font-family: var(--font-display); font-size: 1.15rem; text-align: center; margin: var(--s3) 0; animation: gd-rise .5s var(--ease) both; }
.feelings { display: flex; flex-wrap: wrap; gap: var(--s2); margin: 6px 0 var(--s3); }
.feeling { padding: 8px 14px; border-radius: var(--r-pill); border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 85%, transparent); cursor: pointer; font-weight: 500;
  transition: transform .25s cubic-bezier(.34, 1.56, .5, 1), background .2s, color .2s; animation: gd-rise .4s var(--ease) both; }
.feeling:nth-child(2) { animation-delay: .03s; } .feeling:nth-child(3) { animation-delay: .06s; } .feeling:nth-child(4) { animation-delay: .09s; }
.feeling:nth-child(5) { animation-delay: .12s; } .feeling:nth-child(n+6) { animation-delay: .15s; }
.feeling:hover { transform: translateY(-2px) scale(1.04); }
.feeling.is-on { background: linear-gradient(150deg, color-mix(in srgb, var(--primary) 70%, #fff), var(--primary-strong)); color: var(--on-primary); border-color: var(--primary); animation: gd-nav-pop .4s cubic-bezier(.34, 1.56, .5, 1); }
.mood-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.mood-cal__head { text-align: center; font-size: .72rem; color: var(--ink-2); font-weight: 600; }
.mood-cal__day { aspect-ratio: 1; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); background: color-mix(in srgb, var(--surface) 80%, transparent);
  display: grid; place-items: center; cursor: pointer; padding: 0; transition: transform .25s cubic-bezier(.34, 1.56, .5, 1), box-shadow .2s;
  animation: gd-tile-in .45s cubic-bezier(.34, 1.56, .5, 1) both; animation-delay: calc(var(--i) * 18ms); }
.mood-cal__day:hover:not(:disabled) { transform: scale(1.1); box-shadow: var(--shadow); z-index: 1; }
.mood-cal__day.is-today { border: 2px solid var(--primary); }
.mood-cal__day.is-on { background: var(--primary-soft); box-shadow: 0 0 0 2px var(--primary); }
.mood-cal__day.is-future { opacity: .35; cursor: default; }
.mood-cal__num { font-size: .8rem; color: var(--ink-2); }
.mood-cal__detail { margin-top: var(--s3); padding: var(--s3); border-radius: var(--r); background: var(--surface-2); animation: gd-rise .3s var(--ease) both; }
.mood-cal__detail p { margin: 4px 0 0; }
.chart__line--draw { stroke-dasharray: 1; animation: gd-draw 1.6s var(--ease) both; }
.chart__dot { stroke: var(--surface); stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: gd-tile-in .4s cubic-bezier(.34, 1.56, .5, 1) both; animation-delay: calc(.8s + var(--i) * 25ms); }
.chart__dot:hover { transform: scale(1.6); }
.chart__mood-dot { filter: drop-shadow(0 1px 1px rgba(0,0,0,.2)); }
.bars__label { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Budget donut ---------- */
.budget-donut-wrap { position: relative; width: 210px; margin: 0 auto var(--s2); }
.donut { width: 100%; height: auto; transform: rotate(-90deg); overflow: visible; }
.donut__track { fill: none; stroke: var(--surface-2); stroke-width: 16; }
.donut__seg { fill: none; stroke-width: 16; cursor: pointer; transition: stroke-width .25s var(--ease), opacity .25s; animation: gd-donut-in .9s var(--ease) both; animation-delay: calc(var(--i) * 90ms); }
.donut__seg:hover, .donut__seg.is-on { stroke-width: 22; }
.donut__seg.is-dim { opacity: .3; }
@keyframes gd-donut-in { from { stroke-dasharray: 0 100; } }
.donut__center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.donut__center strong { font-family: var(--font-display); font-size: 1.25rem; }
.donut__center small { color: var(--ink-2); font-size: .78rem; }
.donut__emoji { font-size: 1.4rem; animation: gd-nav-pop .4s cubic-bezier(.34, 1.56, .5, 1); }
.budget-bar { cursor: pointer; padding: 6px 8px; border-radius: var(--r-sm); transition: background .2s, transform .2s; }
.budget-bar:hover { background: color-mix(in srgb, var(--surface-2) 70%, transparent); transform: translateX(3px); }
.budget-bar.is-on { background: var(--primary-soft); }
.budget-hero { position: relative; overflow: hidden; }
.budget-hero::after { content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%; right: -80px; top: -120px; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 30%, transparent), transparent 70%); animation: gd-float 8s ease-in-out infinite; pointer-events: none; }
.budget-hero__total { position: relative; }
.savings { transition: transform .25s var(--ease), box-shadow .25s; animation: gd-rise .45s var(--ease) both; }
.savings:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.savings__icon { transition: transform .35s cubic-bezier(.34, 1.56, .5, 1); }
.savings:hover .savings__icon { transform: rotate(-10deg) scale(1.1); }
.savings .progress__fill { background: linear-gradient(90deg, var(--sky), var(--accent)); }
.budget-entry { animation: gd-rise .4s var(--ease) both; }
.budget-entry__icon { transition: transform .3s cubic-bezier(.34, 1.56, .5, 1); }
.budget-entry:hover .budget-entry__icon { transform: scale(1.15) rotate(-8deg); }
.budget-chip { transition: transform .25s cubic-bezier(.34, 1.56, .5, 1); }
.budget-chip:hover { transform: translateY(-2px); }
.budget-chip.is-on { animation: gd-nav-pop .4s cubic-bezier(.34, 1.56, .5, 1); }
.segmented--big button { transition: all .3s cubic-bezier(.34, 1.56, .5, 1); }
.segmented--big button.is-on { transform: scale(1.03); }
@media (max-width: 600px) { .mood--big .mood__options { gap: 4px; } .mood--big .mood__btn { padding: 8px 2px; } }


/* ---------- Tighter, more balanced icon sizes ---------- */
.icon-tile { width: 36px; height: 36px; border-radius: 11px; }
.icon-tile .icon { width: 18px; height: 18px; }
html[data-icon="large"] .icon-tile { width: 42px; height: 42px; border-radius: 13px; }
html[data-icon="small"] .icon-tile { width: 30px; height: 30px; border-radius: 9px; }

/* Home shortcuts: slim pills (icon beside the label) */
.shortcuts { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s2); }
.shortcut { flex-direction: row; justify-content: flex-start; gap: 10px; padding: 10px 12px; border-radius: var(--r); font-size: .88rem; }
.shortcut .icon-tile { width: 32px; height: 32px; border-radius: 10px; }
.shortcut .icon-tile .icon { width: 16px; height: 16px; }

/* Budget categories: compact chips instead of big boxes */
.cat-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.cat-tile { flex-direction: row; justify-content: flex-start; text-align: left; gap: 10px; padding: 8px 10px; border-radius: 12px; }
.cat-tile__icon { width: 32px; height: 32px; border-radius: 10px; font-size: 1rem; flex: none; }
.cat-tile__name { font-size: .85rem; line-height: 1.2; }
.cat-tile > span:not(.cat-tile__icon) { display: block; }
.cat-tile__limit { display: block; width: 100%; font-size: .7rem; }
.cat-tile { flex-wrap: wrap; }
.cat-tile__limit { padding-left: 42px; margin-top: -4px; }

/* Other emoji tiles */
.savings__icon { width: 38px; height: 38px; border-radius: 12px; font-size: 1.1rem; }
.budget-entry__icon { width: 32px; height: 32px; border-radius: 10px; font-size: .95rem; }
.quick .icon-tile { width: 34px; height: 34px; }
.empty .icon-tile { width: 44px; height: 44px; border-radius: 14px; }
.stat .icon-tile { width: 38px; height: 38px; }
.platform-badge { width: 34px; height: 34px; border-radius: 10px; font-size: .95rem; }
@media (max-width: 900px) {
  .shortcuts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* =====================================================================
   Customisable Home
   ===================================================================== */
.home-toolbar { display: flex; gap: var(--s2); justify-content: flex-end; flex-wrap: wrap; margin-top: -8px; }
.home-hint { padding: var(--s3) var(--s4); border-radius: var(--r); background: var(--accent-soft); font-size: .9rem; margin: 0; animation: gd-rise .3s var(--ease) both; }
.home-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap, var(--s4)); align-items: start; }
.home-block { position: relative; min-width: 0; transition: transform .3s cubic-bezier(.34, 1.56, .5, 1), opacity .2s; animation: gd-rise .45s var(--ease) both; }
.home-block--full { grid-column: 1 / -1; }
.home-block > .card { margin: 0; }
.home-grid.is-editing .home-block { cursor: grab; outline: 2px dashed color-mix(in srgb, var(--primary) 45%, transparent); outline-offset: 4px; border-radius: var(--r-lg); animation: gd-jiggle 2.4s ease-in-out infinite; }
.home-grid.is-editing .home-block:nth-child(2n) { animation-delay: -.6s; }
.home-grid.is-editing .home-block:hover { animation-play-state: paused; }
.home-block.is-dragging { opacity: .45; transform: scale(.97); }
.home-block.is-hidden { opacity: .4; filter: grayscale(.6); }
@keyframes gd-jiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-.35deg); } 75% { transform: rotate(.35deg); } }
.home-tools { position: relative; z-index: 3; display: flex; gap: 4px; align-items: center; margin-bottom: 6px; padding: 4px 6px; border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--surface) 92%, transparent); box-shadow: var(--shadow-sm); border: 1px solid var(--line); width: fit-content; max-width: 100%; flex-wrap: wrap; }
.home-tools__grip { font-size: .78rem; font-weight: 600; color: var(--ink-2); padding: 0 6px; cursor: grab; }
.home-tool { width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--surface-2); cursor: pointer; font-size: .9rem; transition: transform .2s cubic-bezier(.34, 1.56, .5, 1); }
.home-tool:hover { transform: scale(1.15); }
.home-tool.is-on { background: var(--primary); color: var(--on-primary); }
.style-picker { padding: var(--s4); border-radius: var(--r-lg); background: color-mix(in srgb, var(--surface) 95%, transparent); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; gap: var(--s2); animation: gd-rise .3s var(--ease) both !important; outline: none !important; cursor: default !important; }
.style-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.style-swatch { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 0; background: none; cursor: pointer; padding: 4px; border-radius: 12px; }
.style-swatch__chip { width: 100%; height: 44px; border-radius: 10px; border: 1px solid var(--line); box-shadow: inset 0 1px 0 rgba(255,255,255,.4), var(--shadow-sm); transition: transform .2s cubic-bezier(.34, 1.56, .5, 1); }
.style-swatch:hover .style-swatch__chip { transform: scale(1.06); }
.style-swatch.is-on .style-swatch__chip { box-shadow: 0 0 0 3px var(--primary); }
.style-swatch__name { font-size: .72rem; color: var(--ink-2); }

/* ---------- Card styles: gradients, colours and textures ---------- */
/* The style paints the card (or the swatch preview chip). */
.hs-styled > :is(.card, section, nav, .dash__stats) { border-color: transparent !important; }
.hs-styled > nav.shortcuts, .hs-styled > .dash__stats { padding: var(--s3); border-radius: var(--r-lg); }
.hs-styled .season > div { background: rgba(255,255,255,.35); }
.hs-styled .dash__progress, .hs-styled .streak { background: rgba(255,255,255,.4); }
.hs-dark > :is(.card, section, nav, .dash__stats), .hs-dark > :is(.card, section, nav, .dash__stats) :is(h1, h2, h3, h4, strong, p, span, a, label, .card__title) { color: #F7F3EA; }
.hs-dark .muted, .hs-dark .small.muted, .hs-dark small { color: rgba(247, 243, 234, .75) !important; }
.hs-dark .input { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.25); }
.hs-dark .check-row:hover, .hs-dark .quick a:hover, .hs-dark .try-list a:hover { background: rgba(255,255,255,.1); }
.hs-dark .mood__btn, .hs-dark .shortcut { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.2); color: #fff; }
.hs-dark .verse__ref { color: var(--accent); }

.hs-g-sunrise > :first-child:not(.home-tools), .hs-g-sunrise > .home-tools + *, .style-swatch.hs-g-sunrise .style-swatch__chip { background: linear-gradient(135deg, #FFE7C2, #F9C1B6 55%, #E7C6E8) !important; }
.hs-g-peach > :first-child:not(.home-tools), .hs-g-peach > .home-tools + *, .style-swatch.hs-g-peach .style-swatch__chip { background: linear-gradient(135deg, #FFF1E0, #FFD2B3) !important; }
.hs-g-blush > :first-child:not(.home-tools), .hs-g-blush > .home-tools + *, .style-swatch.hs-g-blush .style-swatch__chip { background: linear-gradient(135deg, #FFF0F3, #F6C9D5) !important; }
.hs-g-lavender > :first-child:not(.home-tools), .hs-g-lavender > .home-tools + *, .style-swatch.hs-g-lavender .style-swatch__chip { background: linear-gradient(135deg, #F3EDFB, #D7C8F0) !important; }
.hs-g-ocean > :first-child:not(.home-tools), .hs-g-ocean > .home-tools + *, .style-swatch.hs-g-ocean .style-swatch__chip { background: linear-gradient(135deg, #E3F2FA, #B7D9EC 60%, #9CC5DB) !important; }
.hs-g-sky > :first-child:not(.home-tools), .hs-g-sky > .home-tools + *, .style-swatch.hs-g-sky .style-swatch__chip { background: linear-gradient(180deg, #EAF6FF, #CFE7F7) !important; }
.hs-g-mint > :first-child:not(.home-tools), .hs-g-mint > .home-tools + *, .style-swatch.hs-g-mint .style-swatch__chip { background: linear-gradient(135deg, #EDFBF3, #C6EDD8) !important; }
.hs-g-sage > :first-child:not(.home-tools), .hs-g-sage > .home-tools + *, .style-swatch.hs-g-sage .style-swatch__chip { background: linear-gradient(135deg, #F3F6EE, #D4E0CC) !important; }
.hs-g-gold > :first-child:not(.home-tools), .hs-g-gold > .home-tools + *, .style-swatch.hs-g-gold .style-swatch__chip { background: linear-gradient(135deg, #FFF8E6, #F1D9A2) !important; }
.hs-g-aurora > :first-child:not(.home-tools), .hs-g-aurora > .home-tools + *, .style-swatch.hs-g-aurora .style-swatch__chip { background: linear-gradient(135deg, #D8F5EC, #D6DDFB 50%, #F4D6F0) !important; }
.hs-g-forest > :first-child:not(.home-tools), .hs-g-forest > .home-tools + *, .style-swatch.hs-g-forest .style-swatch__chip { background: linear-gradient(145deg, #3B5646, #1F2E26) !important; }
.hs-g-dusk > :first-child:not(.home-tools), .hs-g-dusk > .home-tools + *, .style-swatch.hs-g-dusk .style-swatch__chip { background: linear-gradient(145deg, #6B4E7A, #2C3553) !important; }
.hs-g-midnight > :first-child:not(.home-tools), .hs-g-midnight > .home-tools + *, .style-swatch.hs-g-midnight .style-swatch__chip { background: linear-gradient(160deg, #26324A, #10151F) !important; }
.hs-g-ember > :first-child:not(.home-tools), .hs-g-ember > .home-tools + *, .style-swatch.hs-g-ember .style-swatch__chip { background: linear-gradient(145deg, #B5562A, #6E2B24) !important; }

.hs-c-cream > :first-child:not(.home-tools), .hs-c-cream > .home-tools + *, .style-swatch.hs-c-cream .style-swatch__chip { background: #FFF8EC !important; }
.hs-c-white > :first-child:not(.home-tools), .hs-c-white > .home-tools + *, .style-swatch.hs-c-white .style-swatch__chip { background: #FFFFFF !important; }
.hs-c-sage > :first-child:not(.home-tools), .hs-c-sage > .home-tools + *, .style-swatch.hs-c-sage .style-swatch__chip { background: #DCE7D6 !important; }
.hs-c-blush > :first-child:not(.home-tools), .hs-c-blush > .home-tools + *, .style-swatch.hs-c-blush .style-swatch__chip { background: #F8DDE3 !important; }
.hs-c-sky > :first-child:not(.home-tools), .hs-c-sky > .home-tools + *, .style-swatch.hs-c-sky .style-swatch__chip { background: #D6EAF6 !important; }
.hs-c-lilac > :first-child:not(.home-tools), .hs-c-lilac > .home-tools + *, .style-swatch.hs-c-lilac .style-swatch__chip { background: #E6DAF5 !important; }
.hs-c-sand > :first-child:not(.home-tools), .hs-c-sand > .home-tools + *, .style-swatch.hs-c-sand .style-swatch__chip { background: #EFE3CC !important; }
.hs-c-mint > :first-child:not(.home-tools), .hs-c-mint > .home-tools + *, .style-swatch.hs-c-mint .style-swatch__chip { background: #D3F1E0 !important; }
.hs-c-forest > :first-child:not(.home-tools), .hs-c-forest > .home-tools + *, .style-swatch.hs-c-forest .style-swatch__chip { background: #2E4136 !important; }
.hs-c-navy > :first-child:not(.home-tools), .hs-c-navy > .home-tools + *, .style-swatch.hs-c-navy .style-swatch__chip { background: #22364F !important; }
.hs-c-wine > :first-child:not(.home-tools), .hs-c-wine > .home-tools + *, .style-swatch.hs-c-wine .style-swatch__chip { background: #6B2B3A !important; }
.hs-c-charcoal > :first-child:not(.home-tools), .hs-c-charcoal > .home-tools + *, .style-swatch.hs-c-charcoal .style-swatch__chip { background: #2B2D31 !important; }

.hs-t-linen > :first-child:not(.home-tools), .hs-t-linen > .home-tools + *, .style-swatch.hs-t-linen .style-swatch__chip { background: repeating-linear-gradient(0deg, rgba(120,100,70,.06) 0 1px, transparent 1px 3px), repeating-linear-gradient(90deg, rgba(120,100,70,.05) 0 1px, transparent 1px 3px), #F6EFE2 !important; }
.hs-t-paper > :first-child:not(.home-tools), .hs-t-paper > .home-tools + *, .style-swatch.hs-t-paper .style-swatch__chip { background: radial-gradient(rgba(0,0,0,.04) 1px, transparent 1.2px) 0 0 / 6px 6px, radial-gradient(rgba(0,0,0,.03) 1px, transparent 1.2px) 3px 3px / 7px 7px, #FFFCF4 !important; }
.hs-t-dots > :first-child:not(.home-tools), .hs-t-dots > .home-tools + *, .style-swatch.hs-t-dots .style-swatch__chip { background: radial-gradient(color-mix(in srgb, var(--primary) 22%, transparent) 2px, transparent 2.5px) 0 0 / 18px 18px, #FFFDF8 !important; }
.hs-t-grid > :first-child:not(.home-tools), .hs-t-grid > .home-tools + *, .style-swatch.hs-t-grid .style-swatch__chip { background: linear-gradient(rgba(79,124,150,.14) 1px, transparent 1px) 0 0 / 20px 20px, linear-gradient(90deg, rgba(79,124,150,.14) 1px, transparent 1px) 0 0 / 20px 20px, #FDFEFF !important; }
.hs-t-lines > :first-child:not(.home-tools), .hs-t-lines > .home-tools + *, .style-swatch.hs-t-lines .style-swatch__chip { background: linear-gradient(90deg, transparent 28px, rgba(214,90,90,.35) 28px 29px, transparent 29px), repeating-linear-gradient(180deg, transparent 0 25px, rgba(79,124,150,.2) 25px 26px), #FFFEF8 !important; }
.hs-t-waves > :first-child:not(.home-tools), .hs-t-waves > .home-tools + *, .style-swatch.hs-t-waves .style-swatch__chip { background: radial-gradient(circle at 50% 100%, transparent 18px, rgba(79,124,150,.12) 19px 21px, transparent 22px) 0 0 / 40px 22px, linear-gradient(180deg, #F2F9FC, #DDEEF6) !important; }
.hs-t-marble > :first-child:not(.home-tools), .hs-t-marble > .home-tools + *, .style-swatch.hs-t-marble .style-swatch__chip { background: radial-gradient(ellipse at 20% 30%, rgba(196,154,69,.18), transparent 45%), radial-gradient(ellipse at 80% 70%, rgba(120,120,120,.12), transparent 50%), linear-gradient(115deg, transparent 40%, rgba(160,160,160,.14) 42%, transparent 46%), linear-gradient(160deg, #FBFAF7, #EFEDE8) !important; }
.hs-t-confetti > :first-child:not(.home-tools), .hs-t-confetti > .home-tools + *, .style-swatch.hs-t-confetti .style-swatch__chip { background: radial-gradient(#F2C94C 2px, transparent 2.5px) 0 0 / 34px 34px, radial-gradient(#F29CAB 2px, transparent 2.5px) 11px 17px / 34px 34px, radial-gradient(#8EC5E8 2px, transparent 2.5px) 23px 6px / 34px 34px, radial-gradient(#8FB08F 2px, transparent 2.5px) 5px 27px / 34px 34px, #FFFDF8 !important; }
.hs-t-stripes > :first-child:not(.home-tools), .hs-t-stripes > .home-tools + *, .style-swatch.hs-t-stripes .style-swatch__chip { background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--accent-soft) 90%, transparent) 0 12px, #FFFDF8 12px 24px) !important; }
.hs-t-glass > :first-child:not(.home-tools), .hs-t-glass > .home-tools + *, .style-swatch.hs-t-glass .style-swatch__chip { background: linear-gradient(135deg, rgba(255,255,255,.65), rgba(255,255,255,.25)) !important; backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%); border: 1px solid rgba(255,255,255,.7) !important; }
.hs-t-starry > :first-child:not(.home-tools), .hs-t-starry > .home-tools + *, .style-swatch.hs-t-starry .style-swatch__chip { background: radial-gradient(1.2px 1.2px at 20% 30%, #fff, transparent), radial-gradient(1px 1px at 70% 20%, #fff, transparent), radial-gradient(1.5px 1.5px at 45% 70%, #fff, transparent), radial-gradient(1px 1px at 85% 80%, #fff, transparent), radial-gradient(1px 1px at 10% 85%, #fff, transparent), linear-gradient(160deg, #1D2440, #3B2E5A) !important; }
.hs-t-cork > :first-child:not(.home-tools), .hs-t-cork > .home-tools + *, .style-swatch.hs-t-cork .style-swatch__chip { background: radial-gradient(circle at 20% 30%, rgba(0,0,0,.07) 0 2px, transparent 3px) 0 0 / 12px 12px, radial-gradient(circle at 70% 60%, rgba(255,255,255,.12) 0 2px, transparent 3px) 0 0 / 15px 15px, linear-gradient(135deg, #D6B48A, #C49A6C) !important; }
.style-swatch.hs-none .style-swatch__chip { background: var(--surface); }

@media (max-width: 900px) {
  .home-grid { grid-template-columns: 1fr; }
  .home-block--full { grid-column: auto; }
}


/* ---------- Home: 12-column grid with edge resizing ---------- */
.home-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.home-block { grid-column: span var(--span, 6); }
.home-block > .card, .home-block > section, .home-block > nav, .home-block > .dash__stats { min-height: var(--h, auto); }
.home-block > .card { height: 100%; }
.home-block.is-resizing { transition: none; animation: none !important; outline-style: solid !important; z-index: 5; }
.home-resize { position: absolute; z-index: 6; opacity: 0; transition: opacity .2s; touch-action: none; }
.home-grid.is-editing .home-resize { opacity: 1; }
.home-resize--x { top: 20%; bottom: 20%; right: -9px; width: 14px; cursor: ew-resize; }
.home-resize--y { left: 20%; right: 20%; bottom: -9px; height: 14px; cursor: ns-resize; }
.home-resize--xy { right: -10px; bottom: -10px; width: 22px; height: 22px; cursor: nwse-resize; }
.home-resize--x::after, .home-resize--y::after { content: ""; position: absolute; border-radius: 99px; background: var(--primary); box-shadow: 0 0 0 3px var(--surface), var(--shadow-sm); }
.home-resize--x::after { left: 5px; top: 50%; width: 4px; height: 38px; transform: translateY(-50%); }
.home-resize--y::after { top: 5px; left: 50%; height: 4px; width: 38px; transform: translateX(-50%); }
.home-resize--xy::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 3px var(--surface), var(--shadow); }
.home-resize:hover::after { background: var(--accent); }
.home-grid.is-editing .home-block.is-resizing .home-resize::after { background: var(--accent); }
.edit-bar { position: sticky; top: 8px; z-index: 30; display: flex; align-items: center; gap: var(--s2); justify-content: space-between; flex-wrap: wrap;
  padding: 8px 10px 8px 16px; margin-bottom: var(--s3); border-radius: var(--r-pill); background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: var(--shadow-lg); border: 1px solid var(--line); animation: gd-rise .3s var(--ease) both; }
.edit-bar > span { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; margin-right: auto; }
@media (max-width: 900px) {
  .home-grid { grid-template-columns: 1fr; }
  .home-block { grid-column: auto !important; }
  .home-resize--x, .home-resize--xy { display: none; }
  .edit-bar { top: calc(64px + env(safe-area-inset-top)); }
}


/* ---------- Legal pages & account deletion ---------- */
.legal { max-width: 760px; margin: 0 auto; padding: var(--s6) var(--s5) var(--s7); line-height: 1.7; }
.legal .brand { margin-bottom: var(--s5); padding: 0; }
.legal h2 { margin-top: var(--s5); font-size: 1.2rem; }
.legal ul, .legal ol { padding-left: 1.2em; }
.legal li { margin-bottom: 6px; }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 35%, var(--line)) !important; }
.danger-zone .card-ico { background: linear-gradient(150deg, #E48B82, var(--danger)); }
.btn--google { gap: 10px; }
.google-mark { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #fff; color: #444; font-weight: 800; font-family: Arial, sans-serif; box-shadow: 0 0 0 1px var(--line); }

/* =====================================================================
   Tablet & mobile
   ===================================================================== */
@media (max-width: 1100px) {
  .split { grid-template-columns: 240px 1fr; }
  .focus { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main { padding: var(--s5) var(--s4) calc(96px + env(safe-area-inset-bottom)); }

  .bottom-nav {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bottom-nav .nav-item { flex-direction: column; gap: 2px; font-size: .68rem; padding: 6px 2px; justify-content: center; text-align: center; min-height: 52px; }
  .bottom-nav .nav-item.active { background: transparent; }
  .bottom-nav .nav-item.active .icon { background: var(--primary-soft); border-radius: var(--r-pill); padding: 2px 12px; width: 44px; height: 26px; box-sizing: border-box; }

  .sheet-backdrop { display: block; z-index: 31; }
  .sheet {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 32; max-height: 82dvh; overflow-y: auto;
    background: var(--surface); border-radius: 22px 22px 0 0; padding: var(--s3) var(--s4) calc(var(--s5) + env(safe-area-inset-bottom));
    box-shadow: var(--shadow-lg); animation: sheet .25s var(--ease);
  }
  .sheet__grip { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto var(--s4); }
  .nav-groups--compact .nav-group { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
  .nav-groups--compact .nav-group__label { grid-column: 1 / -1; }
  .sheet__logout { margin-top: var(--s4); border-top: 1px solid var(--line); padding-top: var(--s3); }
  @keyframes sheet { from { transform: translateY(40px); opacity: 0; } }

  .toasts { bottom: calc(84px + env(safe-area-inset-bottom)); left: var(--s4); right: var(--s4); max-width: none; }

  .split { grid-template-columns: 1fr; }
  .split__list { position: static; max-height: 280px; }
  .split__main { padding: var(--s4); }

  .companion { grid-template-columns: 1fr; height: calc(100dvh - 140px - env(safe-area-inset-bottom)); min-height: 420px; position: relative; }
  .companion__side { display: none; position: absolute; inset: 0 30% 0 0; z-index: 5; background: var(--bg); padding: var(--s3); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); }
  .companion__side.is-open { display: flex; }
  .companion__toggle { display: inline-grid; }
  .companion__head { padding: var(--s3); }
  .chat { padding: var(--s3); }

  .week { grid-template-columns: 1fr; }
  .week__col { min-height: 0; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .week__head { flex-direction: row; gap: var(--s2); width: 100%; justify-content: flex-start; }
  .week .chip { width: auto; }
  .week__add { margin-top: 0; margin-left: auto; width: 32px; }
  .month__cell { min-height: 64px; padding: 3px; }
  .month .chip { display: none; }
  .month__cell:has(.chip)::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); align-self: center; }
  .month__tasks { display: none; }
  .timeline li { grid-template-columns: 76px 1fr; }

  .kanban { grid-template-columns: repeat(4, 80%); scroll-snap-type: x mandatory; }
  .kanban__col { scroll-snap-align: start; }
  .task-add, .reminder-add { grid-template-columns: 1fr 1fr; }
  .task-add > :first-child, .reminder-add > :nth-child(2) { grid-column: 1 / -1; }
  .dash__stats { grid-template-columns: 1fr; }
  .verse { padding: var(--s4) var(--s5); }
  .card { padding: var(--s4); }
  @keyframes sheetm { from { transform: translate(-50%, 40px); opacity: 0; } }
  .post__menu { margin-left: 0; width: 100%; }

  .auth { grid-template-columns: 1fr; }
  .auth__art { display: none; }
  .auth__panel { padding: var(--s6) var(--s5); justify-content: flex-start; }
}


/* ---------- Mobile: top bar + floating pill navigation ---------- */
@media (max-width: 900px) {
  .topbar {
    display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
    position: sticky; top: 0; z-index: 25; padding: calc(10px + env(safe-area-inset-top)) var(--s4) 10px;
    background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
  }
  .topbar__actions { display: flex; gap: var(--s2); align-items: center; }
  .topbar .icon-btn { background: color-mix(in srgb, var(--surface) 80%, transparent); box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow-sm); width: 40px; height: 40px; border-radius: 13px; }
  .shell { display: block; }
  .bottom-nav {
    left: 50%; right: auto; bottom: calc(12px + env(safe-area-inset-bottom)); transform: translateX(-50%);
    width: min(440px, calc(100vw - 24px)); border-radius: 26px; padding: 6px; border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
    background: color-mix(in srgb, var(--surface) 80%, transparent); box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow-lg);
  }
  .bottom-nav .nav-item { border-radius: 20px; }
  .bottom-nav .nav-item.active { background: var(--primary-soft); color: var(--primary-strong); }
  .bottom-nav .nav-item.active .icon { background: none; width: auto; height: auto; padding: 0; }
  .fab { bottom: calc(92px + env(safe-area-inset-bottom)); right: 16px; width: 52px; height: 52px; }
  .main { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
  .shortcuts { grid-template-columns: repeat(2, 1fr); }
  .water { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .water__cups, .water__actions { justify-content: center; }
  .tabs { width: 100%; }
}

@media (max-width: 480px) {
  .quick { grid-template-columns: repeat(2, 1fr); }
  .mood__label { display: none; }
  .bubble { max-width: 94%; }
  .section-header { align-items: flex-start; }
  .inline-add { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

@media print {
  .sidebar, .bottom-nav, .toasts, .btn, .icon-btn { display: none !important; }
  .shell { display: block; }
}
