@font-face {
  font-family: "Inter";
  src: url("inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: block;
}

:root {
  --c-tasks: #7c6cff;
  --c-habits: #22c55e;
  --c-notes: #f5b83d;
  --c-focus: #ff6b5b;
  --c-money: #14b8a6;
  --c-water: #3ba4ff;
  --c-mood: #ffb020;
  --c-count: #a78bfa;
  --c-cycle: #ff5c9a;
  --c-people: #ec4899;
  --c-danger: #ff5a5f;
  --r-lg: 24px;
  --r-md: 16px;
  --r-sm: 12px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}

[data-theme="dark"] {
  --bg: #0b0c10;
  --surface: #15171d;
  --surface-2: #1d2028;
  --surface-3: #262a34;
  --line: rgba(255, 255, 255, .06);
  --line-2: rgba(255, 255, 255, .1);
  --text: #f3f4f7;
  --text-2: #b7bbc8;
  --muted: #7d8294;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --card-shadow: none;
  --glass: rgba(21, 23, 29, .78);
  --tint: 18%;
}

[data-theme="light"] {
  --bg: #f3f4f8;
  --surface: #ffffff;
  --surface-2: #eef0f5;
  --surface-3: #e3e6ee;
  --line: rgba(15, 20, 40, .06);
  --line-2: rgba(15, 20, 40, .1);
  --text: #12141a;
  --text-2: #3d4250;
  --muted: #7a7f8f;
  --shadow: 0 12px 32px rgba(20, 24, 50, .14);
  --card-shadow: 0 1px 2px rgba(20, 24, 50, .04), 0 6px 20px rgba(20, 24, 50, .05);
  --glass: rgba(255, 255, 255, .82);
  --tint: 14%;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg); }
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv11", "ss01", "tnum";
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior-y: none;
  transition: background-color .3s ease;
}
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; user-select: text; -webkit-user-select: text; }
h1, h2, h3, h4, p { margin: 0; }
.ic { flex-shrink: 0; display: block; }
.grow { flex: 1; min-width: 0; }

#app { max-width: 560px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; position: relative; }
.view { padding: env(safe-area-inset-top) 18px calc(120px + env(safe-area-inset-bottom)); min-height: 100vh; min-height: 100dvh; }

/* ---------- headers ---------- */
.top { padding: 22px 2px 18px; display: flex; align-items: flex-start; gap: 12px; }
.top .grow { flex: 1; min-width: 0; }
.top h1 { font-size: 30px; font-weight: 780; letter-spacing: -.035em; line-height: 1.1; }
.top .sub { color: var(--muted); font-size: 14px; margin-top: 6px; font-weight: 500; }
.top .sub b { color: var(--text-2); font-weight: 600; }
.top.sm { padding-top: 14px; align-items: center; }
.top.sm h1 { font-size: 24px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line); color: var(--text-2);
  box-shadow: var(--card-shadow); transition: transform .15s var(--ease), background .2s;
}
.icon-btn:active { transform: scale(.92); }
.icon-btn.plain { background: transparent; border-color: transparent; box-shadow: none; }

/* ---------- cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 16px; box-shadow: var(--card-shadow); position: relative;
}
.card + .card, .stack > * + * { margin-top: 12px; }
.tap { transition: transform .18s var(--ease); }
.tap:active { transform: scale(.975); }
.sec { display: flex; align-items: center; justify-content: space-between; margin: 0 0 12px; }
.sec h3 { font-size: 16px; font-weight: 680; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.sec .link { color: var(--muted); font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 2px; }
.label { font-size: 12px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 22px 4px 10px; }
.label:first-child { margin-top: 4px; }
.muted { color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.grid2 > .card { margin: 0; }
.grid2 + .card { margin-top: 12px; }
.badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 7px;
  border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--text-2);
}
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.bubble {
  width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center; flex-shrink: 0;
  color: var(--c); background: color-mix(in srgb, var(--c) var(--tint), transparent);
}

/* ---------- buttons, inputs ---------- */
.btn {
  height: 50px; border-radius: 16px; padding: 0 20px; font-weight: 650; font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--surface-2); color: var(--text); transition: transform .15s var(--ease), opacity .2s, background .2s;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--acc, var(--c-tasks)); color: #fff; box-shadow: 0 8px 22px color-mix(in srgb, var(--acc, var(--c-tasks)) 35%, transparent); }
.btn.danger { background: color-mix(in srgb, var(--c-danger) 14%, transparent); color: var(--c-danger); }
.btn.block { width: 100%; }
.btn.sm { height: 38px; border-radius: 12px; padding: 0 14px; font-size: 14px; }
.btn[disabled] { opacity: .4; pointer-events: none; }
.btn-row { display: flex; gap: 10px; margin-top: 20px; }
.btn-row .btn { flex: 1; }

.field {
  width: 100%; background: var(--surface-2); border: 1.5px solid transparent; border-radius: 14px;
  padding: 13px 14px; outline: none; font-size: 16px; transition: border-color .2s, background .2s;
}
.field:focus { border-color: color-mix(in srgb, var(--acc, var(--c-tasks)) 70%, transparent); background: var(--surface); }
.field::placeholder { color: var(--muted); }
textarea.field { resize: none; min-height: 90px; line-height: 1.5; }
.field-title { font-size: 20px; font-weight: 650; background: transparent; border: 0; padding: 6px 2px; width: 100%; outline: none; }
.field-title::placeholder { color: var(--muted); }
.flabel { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 18px 2px 8px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; margin: 0 -18px; padding: 2px 18px; scrollbar-width: none; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip {
  height: 36px; padding: 0 14px; border-radius: 999px; background: var(--surface-2); color: var(--text-2);
  font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  border: 1.5px solid transparent; transition: all .2s var(--ease); position: relative; flex-shrink: 0;
}
.chip:active { transform: scale(.95); }
.chip.on { background: color-mix(in srgb, var(--acc, var(--c-tasks)) var(--tint), transparent); color: var(--acc, var(--c-tasks)); border-color: color-mix(in srgb, var(--acc, var(--c-tasks)) 45%, transparent); }
.chip input[type=date], .chip input[type=time], .overlay-input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; }

.seg { display: flex; background: var(--surface-2); border-radius: 14px; padding: 4px; gap: 2px; }
.seg button {
  flex: 1; height: 36px; border-radius: 11px; font-size: 14px; font-weight: 600; color: var(--muted);
  display: flex; align-items: center; justify-content: center; gap: 6px; transition: all .22s var(--ease);
}
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
[data-theme="dark"] .seg button.on { background: var(--surface-3); }
.seg .badge { height: 18px; min-width: 18px; font-size: 11px; padding: 0 5px; background: transparent; color: inherit; opacity: .7; }

.toggle { width: 50px; height: 30px; border-radius: 999px; background: var(--surface-3); position: relative; transition: background .25s; flex-shrink: 0; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25); transition: transform .28s var(--spring); }
.toggle.on { background: var(--acc, var(--c-tasks)); }
.toggle.on::after { transform: translateX(20px); }

.row { display: flex; align-items: center; gap: 12px; }
.row .grow { flex: 1; min-width: 0; }
.list-row { display: flex; align-items: center; gap: 14px; padding: 14px 2px; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .t { font-weight: 600; }
.list-row .s { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ---------- checkbox ---------- */
.chk {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  border: 2px solid color-mix(in srgb, var(--c, var(--muted)) 75%, var(--muted)); color: transparent;
  transition: background .2s, border-color .2s, transform .2s var(--spring); position: relative;
}
.chk::before { content: ""; position: absolute; inset: -10px; }
.chk.on { background: var(--c, var(--c-tasks)); border-color: var(--c, var(--c-tasks)); color: #fff; animation: pop .35s var(--spring); }
@keyframes pop { 0% { transform: scale(.7); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }

/* ---------- ring ---------- */
.ring { position: relative; flex-shrink: 0; }
.ring svg { display: block; }
.ring-track { stroke: var(--surface-3); }
.ring-bar { transition: stroke-dashoffset .7s var(--ease), stroke .3s; }
.ring-in { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }

/* ---------- tab bar ---------- */
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(12px + env(safe-area-inset-bottom));
  width: calc(100% - 24px); max-width: 536px; height: 68px; border-radius: 26px; z-index: 40;
  background: var(--glass); backdrop-filter: blur(22px) saturate(1.6); -webkit-backdrop-filter: blur(22px) saturate(1.6);
  border: 1px solid var(--line-2); box-shadow: var(--shadow); display: flex; padding: 6px; transition: transform .3s var(--ease), opacity .3s;
}
.tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--muted); font-size: 11px; font-weight: 650; border-radius: 20px; transition: color .2s; }
.tabbar .pill { width: 48px; height: 30px; border-radius: 999px; display: grid; place-items: center; transition: background .3s var(--ease), transform .3s var(--spring); }
.tabbar button.on { color: var(--acc); }
.tabbar button.on .pill { background: color-mix(in srgb, var(--acc) var(--tint), transparent); transform: scale(1.04); }
.kb .tabbar, .kb .fab { transform: translate(-50%, 140px); opacity: 0; pointer-events: none; }
.kb .fab { transform: translateY(140px); }

.fab {
  position: fixed; right: max(18px, calc(50% - 262px)); bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 39;
  width: 58px; height: 58px; border-radius: 20px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, color-mix(in srgb, var(--acc) 82%, #fff), var(--acc));
  box-shadow: 0 10px 26px color-mix(in srgb, var(--acc) 45%, transparent); transition: transform .2s var(--spring), opacity .3s;
}
.fab:active { transform: scale(.9) rotate(-6deg); }

/* ---------- transitions ---------- */
.view-enter-active { transition: opacity .28s var(--ease), transform .28s var(--ease); }
.view-leave-active { transition: opacity .12s ease; }
.view-enter-from { opacity: 0; transform: translateY(10px); }
.view-leave-to { opacity: 0; }

.list-move, .list-enter-active, .list-leave-active { transition: all .32s var(--ease); }
.list-enter-from { opacity: 0; transform: translateY(-8px) scale(.98); }
.list-leave-to { opacity: 0; transform: translateX(30px); }
.list-leave-active { position: absolute; left: 0; right: 0; }
.rel { position: relative; }

.fade-enter-active, .fade-leave-active { transition: opacity .2s; }
.fade-enter-from, .fade-leave-to { opacity: 0; }

/* ---------- sheet ---------- */
.sheet-wrap { position: fixed; left: 0; right: 0; top: var(--vvt, 0px); height: var(--vvh, 100%); z-index: 100; background: rgba(4, 5, 10, .55); display: flex; align-items: flex-end; justify-content: center; backdrop-filter: blur(2px); }
.sheet {
  width: 100%; max-width: 560px; max-height: calc(var(--vvh, 100vh) * .92 - env(safe-area-inset-top)); background: var(--surface); border-radius: 28px 28px 0 0;
  border: 1px solid var(--line-2); border-bottom: 0; display: flex; flex-direction: column;
  transition: transform .34s var(--ease); box-shadow: 0 -10px 40px rgba(0,0,0,.25);
}
.sheet.full { height: calc(var(--vvh, 100vh) * .92 - env(safe-area-inset-top)); }
.grab { padding: 10px 0 6px; display: grid; place-items: center; touch-action: none; cursor: grab; }
.grab span { width: 40px; height: 5px; border-radius: 99px; background: var(--surface-3); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 20px 6px; gap: 10px; }
.sheet-head h3 { font-size: 19px; font-weight: 720; letter-spacing: -.02em; }
.sheet-body { overflow-y: auto; padding: 8px 20px calc(24px + env(safe-area-inset-bottom)); overscroll-behavior: contain; }
.sheet-enter-active, .sheet-leave-active { transition: opacity .3s ease; }
.sheet-enter-active .sheet, .sheet-leave-active .sheet { transition: transform .34s var(--ease); }
.sheet-enter-from, .sheet-leave-to { opacity: 0; }
.sheet-enter-from .sheet, .sheet-leave-to .sheet { transform: translateY(100%); }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 200;
  background: var(--text); color: var(--bg); border-radius: 16px; padding: 12px 12px 12px 18px; font-weight: 600; font-size: 14px;
  display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow); width: max-content; max-width: calc(100% - 36px);
}
.toast button { color: var(--acc, var(--c-tasks)); font-weight: 750; padding: 6px 10px; border-radius: 10px; background: color-mix(in srgb, var(--bg) 8%, transparent); }
[data-theme="dark"] .toast button { color: #5b4bff; }
.toast-enter-active, .toast-leave-active { transition: all .3s var(--ease); }
.toast-enter-from, .toast-leave-to { opacity: 0; transform: translate(-50%, 20px); }

/* ---------- swipe ---------- */
.swipe { position: relative; overflow: hidden; border-radius: 18px; }
.swipe-bg { position: absolute; inset: 0; background: var(--c-danger); color: #fff; display: flex; align-items: center; justify-content: flex-end; padding-right: 22px; border-radius: 18px; }
.swipe-fg { position: relative; touch-action: pan-y; transition: transform .3s var(--ease); background: var(--surface); }

/* ---------- empty ---------- */
.empty { text-align: center; padding: 36px 20px; color: var(--muted); }
.empty .em { font-size: 44px; margin-bottom: 10px; display: block; animation: float 3s ease-in-out infinite; }
.empty b { display: block; color: var(--text); font-size: 17px; margin-bottom: 4px; }
@keyframes float { 50% { transform: translateY(-6px); } }

/* ---------- today ---------- */
.hero {
  border-radius: 28px; padding: 20px; display: flex; align-items: center; gap: 18px; color: #fff; overflow: hidden; position: relative;
  background: radial-gradient(120% 140% at 0% 0%, #8b7bff 0%, #6a4cf5 38%, #c2418f 100%);
  box-shadow: 0 16px 36px rgba(106, 76, 245, .32);
}
.hero::before { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; right: -70px; top: -90px; background: rgba(255,255,255,.12); }
.hero::after { content: ""; position: absolute; width: 140px; height: 140px; border-radius: 50%; right: 40px; bottom: -90px; background: rgba(255,255,255,.08); }
.hero .ring-track { stroke: rgba(255,255,255,.2); }
.hero .pct { font-size: 22px; font-weight: 800; letter-spacing: -.03em; }
.hero h2 { font-size: 18px; font-weight: 720; letter-spacing: -.02em; }
.hero .hl { font-size: 14px; opacity: .88; margin-top: 3px; font-weight: 500; }
.hero .stats { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; position: relative; z-index: 1; }
.hero .stats span { background: rgba(255,255,255,.16); border-radius: 999px; padding: 5px 10px; font-size: 12.5px; font-weight: 650; display: flex; align-items: center; gap: 5px; }
.hero > * { position: relative; z-index: 1; }

.mini-task { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.mini-task + .mini-task { border-top: 1px solid var(--line); }
.mini-task .t { flex: 1; min-width: 0; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .2s; }
.mini-task.done .t { color: var(--muted); text-decoration: line-through; }
.quick { display: flex; align-items: center; gap: 10px; margin-top: 6px; padding: 4px 0 0; border-top: 1px solid var(--line); }
.quick .plus { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); border: 2px dashed var(--surface-3); flex-shrink: 0; }
.quick input { flex: 1; background: none; border: 0; outline: none; padding: 12px 0 6px; font-size: 15px; }
.quick input::placeholder { color: var(--muted); }

.hchips { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 2px; scrollbar-width: none; }
.hchips::-webkit-scrollbar { display: none; }
.hchip {
  flex-shrink: 0; width: 92px; padding: 12px 6px 10px; border-radius: 18px; background: var(--surface-2); text-align: center;
  border: 1.5px solid transparent; transition: all .25s var(--ease); position: relative;
}
.hchip .e { font-size: 26px; display: block; transition: transform .3s var(--spring); }
.hchip .n { font-size: 12px; font-weight: 600; margin-top: 6px; color: var(--text-2); line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 30px; }
.hchip.on { background: color-mix(in srgb, var(--c) var(--tint), transparent); border-color: color-mix(in srgb, var(--c) 55%, transparent); }
.hchip.on .e { transform: scale(1.12); }
.hchip.on .n { color: var(--c); }
.hchip .ok { position: absolute; top: 7px; right: 7px; width: 18px; height: 18px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; transform: scale(0); transition: transform .3s var(--spring); }
.hchip.on .ok { transform: scale(1); }

.tile { display: flex; flex-direction: column; min-height: 148px; }
.tile .tt { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 14px; color: var(--text-2); }
.tile .big { font-size: 24px; font-weight: 780; letter-spacing: -.03em; margin-top: auto; }
.tile .big small { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-left: 3px; }
.tile:has(.add) .cap { padding-right: 44px; }
.tile .cap { font-size: 12.5px; color: var(--muted); font-weight: 550; margin-top: 2px; }
.tile .add { position: absolute; right: 12px; bottom: 12px; width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center; color: #fff; background: var(--c); box-shadow: 0 6px 16px color-mix(in srgb, var(--c) 40%, transparent); transition: transform .2s var(--spring); }
.tile .add:active { transform: scale(.85); }
.moods-mini { display: flex; justify-content: space-between; margin-top: auto; }
.moods-mini button { font-size: 24px; width: 30px; height: 36px; transition: transform .2s var(--spring); }
.moods-mini button:active { transform: scale(1.3); }
.bar { height: 7px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin-top: 10px; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: var(--c); transition: width .7s var(--ease); }

.cycle-card { background: linear-gradient(135deg, color-mix(in srgb, var(--c-cycle) 16%, var(--surface)), var(--surface) 70%); }

/* ---------- tasks ---------- */
.group-h { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--muted); margin: 22px 4px 8px; text-transform: uppercase; letter-spacing: .05em; }
.group-h.red { color: var(--c-danger); }
.tlist { display: flex; flex-direction: column; gap: 8px; }
.task { display: flex; align-items: center; gap: 13px; padding: 14px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.task .main { flex: 1; min-width: 0; }
.task .tt { font-weight: 580; font-size: 15.5px; transition: color .3s; word-break: break-word; }
.task.done .tt { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); }
.task .meta { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 5px; font-size: 12.5px; color: var(--muted); font-weight: 550; }
.task .meta span { display: inline-flex; align-items: center; gap: 4px; }
.task .meta .late { color: var(--c-danger); }
.prio { display: flex; gap: 8px; }
.prio button { flex: 1; height: 44px; border-radius: 14px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 600; font-size: 14px; color: var(--text-2); border: 1.5px solid transparent; transition: all .2s; }
.prio button.on { border-color: var(--c); color: var(--c); background: color-mix(in srgb, var(--c) var(--tint), transparent); }
.quickbar { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 6px 6px 6px 16px; margin-bottom: 4px; box-shadow: var(--card-shadow); }
.quickbar input { flex: 1; border: 0; background: none; outline: none; font-size: 15.5px; padding: 10px 0; }
.quickbar input::placeholder { color: var(--muted); }
.quickbar .go { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--acc); color: #fff; transition: transform .2s var(--spring), opacity .2s; }
.quickbar .go[disabled] { opacity: .3; }

/* ---------- habits ---------- */
.habit { padding: 16px; }
.habit .h-top { display: flex; align-items: center; gap: 13px; }
.habit .em { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; font-size: 25px; background: color-mix(in srgb, var(--c) var(--tint), transparent); flex-shrink: 0; }
.habit .nm { font-weight: 680; font-size: 16px; }
.habit .st { font-size: 13px; color: var(--muted); margin-top: 2px; font-weight: 550; display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; }
.habit .st.hot { color: #ff8a3d; }
.h-check { width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center; border: 2px solid var(--surface-3); color: var(--muted); transition: all .3s var(--spring); flex-shrink: 0; }
.h-check.on { background: var(--c); border-color: var(--c); color: #fff; transform: scale(1.04); box-shadow: 0 6px 18px color-mix(in srgb, var(--c) 40%, transparent); }
.h-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 14px; }
.h-day { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11px; font-weight: 650; color: var(--muted); }
.h-day i { width: 100%; max-width: 36px; height: 8px; border-radius: 99px; background: var(--surface-3); transition: background .25s; }
.h-day.on i { background: var(--c); }
.h-day.today small { color: var(--text); }
.heat { display: grid; grid-template-rows: repeat(7, 1fr); grid-auto-flow: column; gap: 4px; margin-top: 6px; }
.heat i { aspect-ratio: 1; border-radius: 4px; background: var(--surface-2); }
.heat i.on { background: var(--c); }
.heat i.fut { opacity: 0; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: var(--surface-2); border-radius: 16px; padding: 12px; }
.stat b { display: block; font-size: 20px; font-weight: 780; letter-spacing: -.02em; }
.stat span { font-size: 12px; color: var(--muted); font-weight: 600; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; }
.emoji-grid button { aspect-ratio: 1; border-radius: 12px; font-size: 22px; display: grid; place-items: center; background: var(--surface-2); border: 1.5px solid transparent; transition: transform .15s; }
.emoji-grid button.on { border-color: var(--acc); background: color-mix(in srgb, var(--acc) var(--tint), transparent); }
.emoji-grid button:active { transform: scale(.88); }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatches button { width: 34px; height: 34px; border-radius: 50%; background: var(--c); position: relative; transition: transform .2s var(--spring); }
.swatches button.on { transform: scale(1.12); box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--c); }

/* ---------- money ---------- */
.month-nav { display: flex; align-items: center; justify-content: space-between; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 5px; margin-bottom: 12px; }
.month-nav b { font-weight: 680; }
.month-nav button { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: var(--text-2); }
.month-nav button:active { background: var(--surface-2); }
.money-hero { padding: 20px; background: linear-gradient(140deg, #0f9f90, #127a8f 60%, #1f4f8f); color: #fff; border: 0; box-shadow: 0 16px 36px rgba(18, 122, 143, .3); overflow: hidden; }
.money-hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 180px; height: 180px; border-radius: 50%; background: rgba(255,255,255,.1); }
.money-hero .k { font-size: 13px; opacity: .85; font-weight: 600; }
.money-hero .amt { font-size: 34px; font-weight: 800; letter-spacing: -.04em; margin-top: 4px; }
.money-hero .amt small { font-size: 15px; opacity: .8; font-weight: 650; margin-left: 4px; letter-spacing: 0; }
.money-hero .split { display: flex; gap: 10px; margin-top: 16px; }
.money-hero .split > div { flex: 1; background: rgba(255,255,255,.14); border-radius: 14px; padding: 10px 12px; }
.money-hero .split small { font-size: 12px; opacity: .85; font-weight: 600; display: flex; align-items: center; gap: 4px; }
.money-hero .split b { font-size: 16px; font-weight: 750; display: block; margin-top: 2px; }
.money-hero .bar { background: rgba(255,255,255,.2); }
.money-hero .bar > i { background: #fff; }
.stack-bar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; gap: 3px; margin-bottom: 8px; }
.stack-bar i { display: block; height: 100%; border-radius: 3px; transition: flex .6s var(--ease); }
.cat-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; }
.cat-row .e { width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center; font-size: 19px; background: var(--surface-2); flex-shrink: 0; }
.cat-row .n { flex: 1; font-weight: 600; }
.cat-row .n small { display: block; color: var(--muted); font-size: 12px; font-weight: 550; }
.cat-row .v { font-weight: 700; text-align: right; }
.cat-row .v small { display: block; color: var(--muted); font-size: 12px; font-weight: 550; }
.tx-day { font-size: 13px; font-weight: 700; color: var(--muted); margin: 20px 4px 8px; display: flex; justify-content: space-between; }
.tx { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.tx .e { width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; font-size: 20px; background: var(--surface-2); }
.tx .n { flex: 1; min-width: 0; font-weight: 600; }
.tx .n small { display: block; font-size: 12.5px; color: var(--muted); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx .v { font-weight: 720; white-space: nowrap; }
.tx .v.in { color: var(--c-habits); }
.amount-in { text-align: center; padding: 12px 0 2px; }
.amount-in input { width: 100%; text-align: center; font-size: 40px; font-weight: 800; letter-spacing: -.03em; background: none; border: 0; outline: none; color: var(--text); }
.amount-in input::placeholder { color: var(--surface-3); }
.amount-in .u { color: var(--muted); font-weight: 600; font-size: 13px; min-height: 18px; }
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cat-grid button { padding: 10px 2px 8px; border-radius: 16px; background: var(--surface-2); display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; color: var(--text-2); border: 1.5px solid transparent; transition: all .2s; }
.cat-grid button .e { font-size: 22px; }
.cat-grid button.on { border-color: var(--acc); background: color-mix(in srgb, var(--acc) var(--tint), transparent); color: var(--acc); }

/* ---------- more ---------- */
.apps { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.app-tile { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 16px; text-align: start; min-height: 132px; display: flex; flex-direction: column; box-shadow: var(--card-shadow); position: relative; overflow: hidden; }
.app-tile .ico { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 75%, #fff), var(--c)); box-shadow: 0 8px 18px color-mix(in srgb, var(--c) 35%, transparent); }
.app-tile b { margin-top: auto; font-size: 16px; font-weight: 700; padding-top: 14px; }
.app-tile small { color: var(--muted); font-size: 12.5px; font-weight: 550; margin-top: 2px; }
.app-tile::after { content: ""; position: absolute; width: 110px; height: 110px; border-radius: 50%; right: -40px; top: -40px; background: color-mix(in srgb, var(--c) 9%, transparent); }

/* ---------- notes ---------- */
.search { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 0 14px; color: var(--muted); margin-bottom: 14px; box-shadow: var(--card-shadow); }
.search input { flex: 1; border: 0; background: none; outline: none; padding: 13px 0; font-size: 15px; color: var(--text); }
.masonry { columns: 2; column-gap: 10px; }
.note { break-inside: avoid; margin-bottom: 10px; border-radius: 20px; padding: 14px; background: var(--nc, var(--surface)); border: 1px solid var(--line); display: block; width: 100%; text-align: start; box-shadow: var(--card-shadow); }
.note h4 { font-size: 15px; font-weight: 700; margin-bottom: 6px; word-break: break-word; display: flex; gap: 6px; align-items: flex-start; }
.note h4 .ic { margin-top: 2px; color: var(--muted); }
.note p { font-size: 13.5px; color: var(--text-2); white-space: pre-wrap; word-break: break-word; display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; }
.note small { display: block; margin-top: 10px; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.note-edit { display: flex; flex-direction: column; height: 100%; }
.note-edit textarea { flex: 1; background: none; border: 0; outline: none; resize: none; font-size: 16px; line-height: 1.6; min-height: 50vh; padding: 4px 2px; }
.note-edit textarea::placeholder, .note-edit input::placeholder { color: var(--muted); }

/* ---------- focus ---------- */
.focus-wrap { display: flex; flex-direction: column; align-items: center; padding-top: 8px; }
.focus-wrap .ring-track { stroke: var(--surface-2); }
.timer-txt { font-size: 60px; font-weight: 750; letter-spacing: -.04em; font-variant-numeric: tabular-nums; line-height: 1; }
.timer-sub { font-size: 14px; color: var(--muted); font-weight: 600; margin-top: 10px; }
.rounds { display: flex; gap: 6px; justify-content: center; margin-top: 12px; }
.rounds i { width: 8px; height: 8px; border-radius: 50%; background: var(--surface-3); transition: all .3s; }
.rounds i.on { background: var(--acc); width: 22px; border-radius: 99px; }
.controls { display: flex; align-items: center; justify-content: center; gap: 22px; margin: 28px 0 8px; }
.controls .main { width: 82px; height: 82px; border-radius: 28px; display: grid; place-items: center; background: var(--acc); color: #fff; box-shadow: 0 14px 30px color-mix(in srgb, var(--acc) 45%, transparent); transition: transform .2s var(--spring), border-radius .3s; }
.controls .main.run { border-radius: 50%; }
.controls .main:active { transform: scale(.9); }
.controls .side { width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--text-2); }
.controls .side:active { transform: scale(.9); }
.week-bars { display: flex; align-items: flex-end; gap: 8px; height: 110px; padding-top: 8px; }
.week-bars > div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.week-bars i { width: 100%; max-width: 30px; border-radius: 8px; background: color-mix(in srgb, var(--c) 30%, transparent); min-height: 4px; transition: height .6s var(--ease); }
.week-bars .today i { background: var(--c); }
.week-bars small { font-size: 11px; color: var(--muted); font-weight: 650; }
.week-bars .today small { color: var(--text); }
.week-bars .v { font-size: 10.5px; color: var(--muted); font-weight: 650; min-height: 13px; }

/* ---------- water ---------- */
.bottle-wrap { display: flex; justify-content: center; padding: 6px 0 4px; }
.bottle { width: 170px; height: 250px; border-radius: 34px 34px 46px 46px; position: relative; overflow: hidden; background: var(--surface); border: 3px solid color-mix(in srgb, var(--c-water) 35%, var(--line-2)); box-shadow: inset 0 0 0 6px var(--surface), var(--card-shadow); }
.bottle .fill { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(180deg, #5cb6ff, #2a7de1); transition: height 1s var(--ease); }
.bottle .wave { position: absolute; left: 0; width: 200%; height: 22px; top: -18px; animation: wave 3.2s linear infinite; }
.bottle .wave.b { animation-duration: 5s; opacity: .5; top: -14px; }
@keyframes wave { to { transform: translateX(-50%); } }
.bottle .lbl { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 2; }
.bottle .lbl b { font-size: 46px; font-weight: 800; letter-spacing: -.04em; line-height: 1; mix-blend-mode: normal; }
.bottle .lbl span { font-size: 13px; font-weight: 650; opacity: .8; margin-top: 4px; }
.bottle .lbl.light { color: #fff; }
.bubbles i { position: absolute; bottom: 0; width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.35); animation: rise 4s ease-in infinite; }
@keyframes rise { 0% { transform: translateY(0); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(-200px); opacity: 0; } }
.glasses { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
.glasses i { width: 22px; height: 30px; border-radius: 4px 4px 8px 8px; border: 2px solid color-mix(in srgb, var(--c-water) 40%, transparent); transition: background .3s; }
.glasses i.on { background: var(--c-water); border-color: var(--c-water); }

/* ---------- mood ---------- */
.moods { display: flex; justify-content: space-between; gap: 6px; }
.moods button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 0 10px; border-radius: 18px; border: 1.5px solid transparent; transition: all .3s var(--spring); font-size: 11.5px; font-weight: 650; color: var(--muted); }
.moods button .e { font-size: 34px; transition: transform .3s var(--spring); filter: grayscale(.2); }
.moods button.on { background: color-mix(in srgb, var(--c) var(--tint), transparent); border-color: color-mix(in srgb, var(--c) 50%, transparent); color: var(--c); }
.moods button.on .e { transform: scale(1.2); filter: none; }
.mood-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.mood-cal div { aspect-ratio: 1; border-radius: 12px; display: grid; place-items: center; font-size: 18px; background: var(--surface-2); position: relative; }
.mood-cal div small { position: absolute; top: 3px; left: 5px; font-size: 9px; color: var(--muted); font-weight: 700; }
.mood-cal div.t { box-shadow: inset 0 0 0 2px var(--c-mood); }
.mood-cal .wd { background: none; font-size: 11px; color: var(--muted); font-weight: 700; aspect-ratio: auto; }

/* ---------- countdowns ---------- */
.cd { display: flex; align-items: center; gap: 14px; padding: 16px; }
.cd .e { width: 52px; height: 52px; border-radius: 17px; display: grid; place-items: center; font-size: 26px; background: color-mix(in srgb, var(--c-count) var(--tint), transparent); flex-shrink: 0; }
.cd .n { flex: 1; min-width: 0; }
.cd .n b { font-weight: 680; font-size: 16px; display: block; }
.cd .n small { font-size: 12.5px; color: var(--muted); font-weight: 550; }
.cd .d { text-align: right; }
.cd .d b { font-size: 28px; font-weight: 800; letter-spacing: -.04em; display: block; line-height: 1; color: var(--c-count); }
.cd .d small { font-size: 11.5px; color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: .05em; }
.cd.soon .d b { color: var(--c-focus); }
.cd.past { opacity: .6; }
.cd-hero { background: linear-gradient(140deg, #8f6bff, #5b3fd6 60%, #3f2aa8); color: #fff; border: 0; text-align: center; padding: 24px 20px; box-shadow: 0 16px 36px rgba(91, 63, 214, .32); overflow: hidden; }
.cd-hero .e { font-size: 38px; }
.cd-hero .num { font-size: 64px; font-weight: 820; letter-spacing: -.05em; line-height: 1; margin-top: 6px; }
.cd-hero .u { font-size: 14px; font-weight: 650; opacity: .85; margin-top: 4px; }
.cd-hero .t { font-size: 17px; font-weight: 700; margin-top: 12px; }

/* ---------- cycle ---------- */
.cyc-hero { text-align: center; padding: 22px 18px; background: radial-gradient(120% 120% at 50% 0%, color-mix(in srgb, var(--c-cycle) 20%, var(--surface)), var(--surface) 70%); }
.cyc-hero .day { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.cyc-hero .num { font-size: 52px; font-weight: 820; letter-spacing: -.05em; line-height: 1; margin: 2px 0; }
.cyc-hero .ph { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; padding: 5px 12px; border-radius: 999px; background: color-mix(in srgb, var(--pc) 18%, transparent); color: var(--pc); }
.cyc-hero .msg { font-size: 16px; font-weight: 650; margin-top: 16px; }
.cyc-hero .msg2 { font-size: 13.5px; color: var(--muted); margin-top: 4px; font-weight: 550; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-head b { font-weight: 700; font-size: 16px; }
.cal-head small { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal .wd { text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); padding: 4px 0; }
.cal button { aspect-ratio: 1; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; position: relative; transition: transform .15s, background .2s; border: 2px solid transparent; }
.cal button small { font-size: 9px; color: var(--muted); font-weight: 600; line-height: 1; margin-top: 1px; }
.cal button:active { transform: scale(.88); }
.cal button.out { opacity: .25; }
.cal button.p { background: var(--c-cycle); color: #fff; }
.cal button.p small { color: rgba(255,255,255,.8); }
.cal button.pp { border: 2px dashed color-mix(in srgb, var(--c-cycle) 70%, transparent); color: var(--c-cycle); }
.cal button.f { background: color-mix(in srgb, #2dd4bf 18%, transparent); color: #14b8a6; }
.cal button.ov { background: #14b8a6; color: #fff; }
.cal button.ov small { color: rgba(255,255,255,.8); }
.cal button.td::after { content: ""; position: absolute; bottom: 3px; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.cal button.fut-dis { pointer-events: none; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; font-size: 12px; font-weight: 600; color: var(--muted); }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 50%; }

/* ---------- onboarding ---------- */
.onb { min-height: 100vh; min-height: 100dvh; padding: calc(48px + env(safe-area-inset-top)) 24px calc(32px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; }
.logo { width: 84px; height: 84px; border-radius: 28px; display: grid; place-items: center; background: radial-gradient(120% 140% at 0% 0%, #8b7bff, #6a4cf5 45%, #c2418f); box-shadow: 0 18px 40px rgba(106, 76, 245, .4); margin-bottom: 26px; }
.onb h1 { font-size: 34px; font-weight: 820; letter-spacing: -.04em; line-height: 1.1; }
.onb p { color: var(--muted); font-size: 16px; margin-top: 10px; line-height: 1.5; }
.onb .feat { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.onb .feat span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--text-2); }
.onb .feat .ic { color: var(--c); }
.onb .grow { flex: 1; min-height: 24px; }

.settings-group { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 2px 16px; box-shadow: var(--card-shadow); }
.settings-group .list-row .bubble { width: 36px; height: 36px; border-radius: 12px; }

@media (min-width: 600px) {
  body { background: var(--bg); }
}

/* ---------- stepper ---------- */
.stepper { display: flex; align-items: center; gap: 4px; background: var(--surface-2); border-radius: 14px; padding: 4px; flex-shrink: 0; }
.stepper button { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--text-2); transition: background .15s, transform .15s; }
.stepper button:active { background: var(--surface-3); transform: scale(.9); }
.stepper button[disabled] { opacity: .3; }
.stepper b { min-width: 52px; text-align: center; font-weight: 750; font-size: 15px; }
.stepper b small { font-size: 12px; color: var(--muted); font-weight: 600; }
.controls .side[disabled] { opacity: .35; }

/* ---------- iPhone / PWA ---------- */
/* iOS Safari zooms the page when focusing inputs smaller than 16px */
input, textarea, select { font-size: max(16px, 1em); }
.quickbar input, .quick input, .search input { font-size: 16px; }
input[type=date], input[type=time] { -webkit-appearance: none; appearance: none; }
.install-tip {
  display: flex; flex-direction: column; gap: 4px; margin-bottom: 26px; padding: 14px 16px; border-radius: 18px;
  background: color-mix(in srgb, var(--c-tasks) var(--tint), var(--surface)); border: 1px solid color-mix(in srgb, var(--c-tasks) 35%, transparent);
  font-size: 14px; color: var(--text-2);
}
.install-tip > b { color: var(--text); font-size: 15px; }
.install-tip svg { color: var(--c-water); }

/* ---------- notifications ---------- */
.status-card b { font-size: 16px; font-weight: 700; display: block; }
.status-card .s { font-size: 13px; color: var(--muted); margin-top: 2px; font-weight: 500; line-height: 1.45; }
.status-card.on { background: linear-gradient(135deg, color-mix(in srgb, var(--c-habits) 12%, var(--surface)), var(--surface) 70%); }
.status-card .btn-row { margin-top: 14px; justify-content: flex-start; }
.status-card .btn-row .btn { flex: 0 0 auto; }
.fine { font-size: 12.5px; color: var(--muted); margin-top: 12px; line-height: 1.5; }
.hint { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); font-size: 13px; font-weight: 550; color: var(--text-2); }
.hint.warn { background: color-mix(in srgb, var(--c-mood) 14%, transparent); color: color-mix(in srgb, var(--c-mood) 70%, var(--text)); }
.hint .btn { flex-shrink: 0; }
.day-dots { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.day-dots button { aspect-ratio: 1; max-width: 44px; width: 100%; justify-self: center; border-radius: 50%; font-size: 13px; font-weight: 700; background: var(--surface-2); color: var(--muted); transition: all .2s var(--spring); }
.day-dots button.on { background: var(--acc); color: #fff; }
.day-dots button:active { transform: scale(.9); }
.time-chip { font-variant-numeric: tabular-nums; }

/* ---------- focus v2 ---------- */
.focus-on {
  display: flex; align-items: center; gap: 8px; margin: 14px auto 0; max-width: 100%; width: fit-content;
  padding: 9px 14px; border-radius: 999px; background: var(--surface); border: 1px dashed var(--line-2);
  color: var(--text-2); font-size: 14px; font-weight: 600;
}
.focus-on span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.focus-on .ic:first-child { color: var(--acc); }
.focus-ring { margin-top: 22px; border-radius: 50%; transition: box-shadow .6s var(--ease); }
.focus-ring.run { box-shadow: 0 0 0 10px color-mix(in srgb, var(--acc) 6%, transparent), 0 0 60px color-mix(in srgb, var(--acc) 22%, transparent); animation: breathe 4s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: 0 0 0 16px color-mix(in srgb, var(--acc) 4%, transparent), 0 0 80px color-mix(in srgb, var(--acc) 30%, transparent); } }
.timer-meta { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: 4px; }
.rounds i.done { background: color-mix(in srgb, var(--acc) 55%, transparent); }
.controls.labeled { align-items: flex-start; margin-bottom: 4px; }
.controls.labeled button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.controls.labeled small { font-size: 11px; font-weight: 700; letter-spacing: .02em; }
.controls.labeled .side { height: 64px; width: 64px; color: var(--text-2); }
.controls.labeled .side[disabled] { opacity: .35; pointer-events: none; }
.controls.labeled .main { width: 92px; height: 92px; }
.chip.extend { margin: 6px auto 0; display: flex; width: fit-content; }
.focus-today { display: flex; align-items: center; gap: 16px; margin-top: 22px; }
.focus-today .t { font-weight: 700; }
.focus-today .s { font-size: 13px; color: var(--muted); margin-top: 2px; }
.presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.presets button { padding: 12px 8px; border-radius: 16px; background: var(--surface-2); border: 1.5px solid transparent; text-align: center; transition: all .2s; }
.presets button b { display: block; font-size: 14px; }
.presets button small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; margin-top: 3px; }
.presets button.on { border-color: var(--acc); background: color-mix(in srgb, var(--acc) var(--tint), transparent); }
.presets button.on b { color: var(--acc); }

/* ---------- money: review + reports ---------- */
.sms-offer b { font-size: 15.5px; display: block; }
.sms-offer .s, .review .s { font-size: 13px; color: var(--muted); margin-top: 3px; line-height: 1.45; font-weight: 500; }
.sms-offer .btn-row { margin-top: 14px; justify-content: flex-end; }
.sms-offer .btn-row .btn { flex: 0 0 auto; }
.review { border-color: color-mix(in srgb, var(--c-mood) 35%, var(--line)); margin-bottom: 14px; padding-bottom: 10px; }
.review .rv:last-child { padding-bottom: 2px; }
.rv { padding: 12px 0; border-top: 1px solid var(--line); }
.rv:first-child { border-top: 0; padding-top: 2px; }
.rv-top { display: flex; align-items: center; gap: 8px; }
.rv-top b { font-size: 18px; font-weight: 780; letter-spacing: -.02em; }
.rv-top b.in { color: var(--c-habits); }
.rv-top b small { font-size: 12px; color: var(--muted); }
.link-btn { display: block; margin: 8px auto 0; color: var(--acc); font-weight: 650; font-size: 14px; padding: 6px 10px; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 14px; box-shadow: var(--card-shadow); }
.kpi small { font-size: 12.5px; color: var(--muted); font-weight: 600; display: block; }
.kpi b { font-size: 24px; font-weight: 800; letter-spacing: -.03em; display: block; margin: 2px 0; }
.kpi span { font-size: 12px; font-weight: 650; }
.up { color: var(--c-danger); }
.down { color: var(--c-habits); }
.pace p { font-size: 13.5px; color: var(--text-2); line-height: 1.5; margin-top: 12px; }
.pace-bar { position: relative; height: 12px; border-radius: 99px; background: var(--surface-3); }
.pace-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: var(--c-money); transition: width .7s var(--ease); }
.pace.bad .pace-bar i { background: var(--c-danger); }
.pace-bar em { position: absolute; top: -4px; bottom: -4px; width: 3px; border-radius: 3px; background: var(--text); transform: translateX(-50%); }
.insight { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; font-size: 14px; font-weight: 550; color: var(--text-2); line-height: 1.45; }
.insight + .insight { border-top: 1px solid var(--line); }
.insight span { font-size: 18px; line-height: 1.2; }
.bars { position: relative; display: flex; align-items: flex-end; gap: 3px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; min-width: 0; }
.bar-pair { display: flex; align-items: flex-end; gap: 2px; width: 100%; justify-content: center; }
.bar-pair i { flex: 1; max-width: 26px; border-radius: 5px 5px 2px 2px; transition: height .6s var(--ease); }
.bar-pair i.b2 { background: color-mix(in srgb, var(--c-habits) 55%, transparent); }
.bar-col small { font-size: 10px; color: var(--muted); font-weight: 650; height: 12px; white-space: nowrap; }
.bar-col .bv { font-size: 9.5px; color: var(--muted); font-weight: 650; min-height: 12px; white-space: nowrap; }
.bar-col.hl small { color: var(--text); }
.bar-col.hl .bar-pair i:last-child { filter: brightness(1.15); box-shadow: 0 0 0 2px color-mix(in srgb, var(--acc) 30%, transparent); }
.bars-avg { position: absolute; left: 0; right: 0; border-top: 1.5px dashed color-mix(in srgb, var(--text) 30%, transparent); z-index: 1; pointer-events: none; }
.bars-avg span { position: absolute; right: 0; top: -16px; font-size: 10px; font-weight: 700; color: var(--muted); background: var(--surface); padding: 0 4px; border-radius: 4px; }
.donut-row { display: flex; align-items: center; gap: 18px; margin-bottom: 8px; }
.legend-list { flex: 1; display: flex; flex-direction: column; gap: 7px; font-size: 13px; font-weight: 600; color: var(--text-2); min-width: 0; }
.legend-list div { display: flex; align-items: center; gap: 8px; }
.legend-list i { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.legend-list b { margin-left: auto; color: var(--text); }
.legend-inline { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.legend-inline i { width: 9px; height: 9px; border-radius: 3px; margin-left: 6px; }
.tod { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.tod span { font-size: 16px; }
.tod .tl { font-size: 12px; font-weight: 600; color: var(--text-2); }
.tod b { font-size: 12px; min-width: 30px; text-align: right; }

/* ---------- cycle tracker v2 ---------- */
.flow-pick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.flow-pick button { padding: 10px 2px 8px; border-radius: 14px; background: var(--surface-2); font-size: 11.5px; font-weight: 650; color: var(--text-2); display: flex; flex-direction: column; align-items: center; gap: 5px; border: 1.5px solid transparent; transition: all .2s; }
.flow-pick button.on { border-color: var(--c-cycle); background: color-mix(in srgb, var(--c-cycle) var(--tint), transparent); color: var(--c-cycle); }
.flow-pick .drops { display: flex; gap: 1px; height: 14px; align-items: center; color: var(--c-cycle); }
.goal-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.goal-pick button { padding: 12px 6px; border-radius: 16px; background: var(--surface-2); border: 1.5px solid transparent; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.goal-pick button span { font-size: 22px; }
.goal-pick button b { font-size: 12.5px; line-height: 1.25; }
.goal-pick button small { font-size: 11px; color: var(--muted); font-weight: 550; line-height: 1.3; }
.goal-pick button.on { border-color: var(--c-cycle); background: color-mix(in srgb, var(--c-cycle) var(--tint), transparent); }
.goal-line { margin-top: 14px; padding: 9px 12px; border-radius: 14px; font-size: 13.5px; font-weight: 650; background: color-mix(in srgb, #14b8a6 14%, transparent); color: #14b8a6; }
.goal-line.avoid { background: color-mix(in srgb, var(--c-mood) 16%, transparent); color: color-mix(in srgb, var(--c-mood) 75%, var(--text)); }
.cyc-hero .btn-row .btn { flex: 1; }
.phase-card { background: linear-gradient(150deg, color-mix(in srgb, var(--pc) 13%, var(--surface)), var(--surface) 65%); }
.phase-card .row { align-items: flex-start; }
.ph-e { font-size: 30px; line-height: 1; }
.phase-card b { font-size: 16px; }
.phase-card .s { font-size: 13.5px; color: var(--text-2); margin-top: 3px; line-height: 1.45; }
.phase-card .seg button.on { color: var(--pc); }
.tips { margin: 12px 0 0; padding: 0; list-style: none; }
.tips li { position: relative; padding: 8px 0 8px 22px; font-size: 14px; color: var(--text-2); line-height: 1.45; border-top: 1px solid var(--line); }
.tips li:first-child { border-top: 0; }
.tips li::before { content: ""; position: absolute; left: 4px; top: 15px; width: 7px; height: 7px; border-radius: 50%; background: var(--pc); }
.flags .insight { font-size: 13.5px; }
.cyc-bar { display: grid; grid-template-columns: 48px 1fr 28px; align-items: center; gap: 10px; margin: 8px 0; }
.cyc-bar small { font-size: 11.5px; color: var(--muted); font-weight: 650; }
.cyc-bar b { font-size: 13px; text-align: right; }
.cyc-bar .track { position: relative; display: flex; height: 12px; border-radius: 99px; background: var(--surface-2); overflow: visible; }
.cyc-bar .track i.p { background: var(--c-cycle); border-radius: 99px 0 0 99px; }
.cyc-bar .track i.r { background: color-mix(in srgb, var(--c-cycle) 28%, transparent); border-radius: 0 99px 99px 0; }
.cyc-bar .track em { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text); opacity: .35; }
.sym-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.sym-row:first-of-type { border-top: 0; }
.sym-row .e { font-size: 22px; line-height: 1.2; }
.sym-row .t { font-weight: 650; font-size: 14.5px; }
.sym-row .s { font-size: 12.5px; color: var(--muted); margin-top: 2px; font-weight: 550; }
.mood-tops { font-size: 20px; letter-spacing: 2px; }
.bbt { width: 100%; height: auto; display: block; }
.bbt .ln { fill: none; stroke: var(--c-cycle); stroke-width: 2.2; stroke-linejoin: round; }
.bbt .pt { fill: var(--surface); stroke: var(--c-cycle); stroke-width: 2; }
.bbt .cover { stroke: var(--muted); stroke-dasharray: 4 4; stroke-width: 1; }
.bbt .shift { stroke: #14b8a6; stroke-width: 1.5; stroke-dasharray: 3 3; }
.cal button.lg::before { content: ""; position: absolute; top: 3px; right: 22%; width: 5px; height: 5px; border-radius: 50%; background: var(--c-mood); }

/* ---------- money: editable balance & budget ---------- */
.budget-line { display: block; width: 100%; text-align: start; color: inherit; margin-top: 2px; border-radius: 12px; }
.budget-line .bl { display: flex; align-items: center; gap: 6px; font-size: 12.5px; margin-top: 6px; opacity: .92; font-weight: 600; }
.budget-line:active { opacity: .7; }
.money-hero .split > .split-btn { flex: 1; background: rgba(255,255,255,.14); border-radius: 14px; padding: 10px 12px; text-align: start; color: #fff; transition: background .2s, transform .15s; }
.money-hero .split > .split-btn:active { transform: scale(.97); background: rgba(255,255,255,.22); }
.split-btn small { font-size: 12px; opacity: .85; font-weight: 600; display: flex; align-items: center; gap: 4px; }
.split-btn b { font-size: 16px; font-weight: 750; display: block; margin-top: 2px; }
.split-btn .set { display: inline-block; margin-top: 4px; font-size: 11.5px; font-weight: 700; background: rgba(255,255,255,.22); padding: 2px 8px; border-radius: 999px; }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* ---------- habits: manage mode ---------- */
.habit.manage .h-top { gap: 10px; }
.habit .del { width: 30px; height: 30px; border-radius: 50%; background: var(--c-danger); color: #fff; display: grid; place-items: center; flex-shrink: 0; transition: transform .15s; }
.habit .del:active { transform: scale(.85); }
.habit.manage .icon-btn[disabled] { opacity: .25; }
.swipe > .swipe-fg > .card { margin: 0; }
.swipe:has(.habit) { border-radius: var(--r-lg); }
.swipe:has(.habit) .swipe-bg { border-radius: var(--r-lg); }

/* ---------- cycle: tip of the day ---------- */
.tip-card { background: linear-gradient(140deg, color-mix(in srgb, var(--pc) 14%, var(--surface)), var(--surface) 70%); }
.tip-card h3 .ic { color: var(--pc); }
.tip-card p { font-size: 15.5px; line-height: 1.55; font-weight: 550; color: var(--text); }
.tip-card .link-btn { color: var(--pc); font-size: 13.5px; }

/* ---------- reminders ---------- */
.tpl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tpl { text-align: start; padding: 14px; border-radius: 18px; background: color-mix(in srgb, var(--c) 10%, var(--surface-2)); border: 1px solid color-mix(in srgb, var(--c) 22%, transparent); display: flex; flex-direction: column; gap: 3px; }
.tpl .e { font-size: 26px; margin-bottom: 4px; }
.tpl b { font-size: 14.5px; }
.tpl small { font-size: 11.5px; color: var(--muted); font-weight: 550; line-height: 1.35; }
.rem-head { display: flex; align-items: center; gap: 12px; }
.rem-emoji { width: 54px; height: 54px; border-radius: 18px; font-size: 28px; display: grid; place-items: center; flex-shrink: 0; background: color-mix(in srgb, var(--c) 18%, var(--surface-2)); border: 1.5px dashed color-mix(in srgb, var(--c) 50%, transparent); }
.field-title.bad::placeholder { color: var(--c-mood); }
.preview { display: flex; align-items: flex-start; gap: 10px; margin-top: 20px; padding: 12px 14px; border-radius: 16px; background: color-mix(in srgb, var(--c-habits) 12%, transparent); color: var(--text-2); font-size: 13.5px; line-height: 1.45; }
.preview .ic { color: var(--c-habits); margin-top: 1px; }
.preview.bad { background: color-mix(in srgb, var(--c-mood) 14%, transparent); }
.preview.bad .ic { color: var(--c-mood); }
.hint-card { display: flex; align-items: center; gap: 10px; width: 100%; text-align: start; margin-bottom: 12px; font-size: 13.5px; font-weight: 600; color: color-mix(in srgb, var(--c-mood) 70%, var(--text)); border-color: color-mix(in srgb, var(--c-mood) 35%, var(--line)); }
.rem { display: flex; align-items: center; gap: 13px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; transition: opacity .2s; }
.rem .e { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; font-size: 23px; background: color-mix(in srgb, var(--c) 16%, transparent); flex-shrink: 0; }
.rem .t { font-weight: 680; font-size: 15.5px; }
.rem .s { font-size: 12.5px; color: var(--muted); margin-top: 2px; font-weight: 550; }
.rem .n { font-size: 12px; font-weight: 700; margin-top: 4px; color: var(--muted); }
.rem .n.on { color: var(--c); }
.rem.off { opacity: .55; }
.rem .toggle.on { background: var(--c); }

/* ---------- people ---------- */
.av { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; flex-shrink: 0;
  background: color-mix(in srgb, var(--c-people) var(--tint), var(--surface-2)); }
.av.lg { width: 54px; height: 54px; font-size: 28px; }
.top .av { width: 38px; height: 38px; font-size: 20px; }
.av-pick { width: 44px; padding: 0; justify-content: center; font-size: 20px; }
.me-card { display: flex; align-items: center; gap: 14px; }
.me-card .grow { flex: 1; min-width: 0; }
.notice { display: flex; align-items: center; gap: 12px; width: 100%; text-align: start; font-size: 14px; font-weight: 600; color: var(--c-people);
  background: color-mix(in srgb, var(--c-people) 10%, var(--surface)); }
.notice .grow { flex: 1; }
.search-row { display: flex; gap: 8px; }
.search-row .grow { flex: 1; min-width: 0; }
.form-err { color: var(--c-danger); font-size: 13.5px; font-weight: 600; margin: 10px 4px 0; text-align: start; }
.rel-tag { font-size: 11.5px; font-weight: 650; color: var(--c-people); margin-left: 4px; white-space: nowrap; }
.list-row .s.hot { color: var(--c-people); font-weight: 600; }
.badge.unread { background: var(--c-people); color: #fff; }
.tab-dot { position: absolute; top: 2px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--c-people); border: 2px solid var(--surface); }
.tabbar .pill, .app-tile .ico { position: relative; }
.app-tile .ico .tab-dot { top: -2px; right: -2px; }
.people-card .pq { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.people-card .pq:first-of-type { border-top: 0; padding-top: 0; }
.people-card .pq span { color: var(--text-2); }

.rel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rel-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 6px; border-radius: 16px; background: var(--surface-2);
  border: 1.5px solid transparent; font-size: 13px; transition: transform .15s var(--ease), border-color .2s; }
.rel-btn span { font-size: 24px; }
.rel-btn b { font-weight: 650; }
.rel-btn:active { transform: scale(.96); }
.rel-btn.on { border-color: var(--c-people); background: color-mix(in srgb, var(--c-people) var(--tint), transparent); color: var(--c-people); }
.rel-btn.prop { border-style: dashed; border-color: var(--c-people); }
.rel-btn[disabled] { opacity: .5; }

.pair-tabs { margin-top: 2px; }
.pair-tabs button { gap: 6px; }
.q-card { text-align: center; }
.q-card h3 { font-size: 18px; font-weight: 720; margin-top: 4px; }
.q-card > p { font-size: 14px; margin-top: 6px; }
.q-card.today, .q-card.past { text-align: start; }
.q-card.today { background: linear-gradient(160deg, color-mix(in srgb, var(--c-people) 14%, var(--surface)), var(--surface) 70%); }
.q-head { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 700; color: var(--c-people); text-transform: uppercase; letter-spacing: .05em; }
.q-head .muted { text-transform: none; letter-spacing: 0; font-weight: 600; }
.q-text { font-size: 21px; font-weight: 720; letter-spacing: -.02em; line-height: 1.3; margin-top: 10px; }
.q-text.sm { font-size: 16px; font-weight: 650; margin-top: 6px; }
.q-status { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; margin: 10px 2px 0; }
.answers { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.ans { padding: 12px 14px; border-radius: 16px; background: var(--surface-2); font-size: 15px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.ans small { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 3px; }
.ans.mine { background: color-mix(in srgb, var(--c-people) var(--tint), var(--surface-2)); }
.ans.waiting { color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 8px; }

.pair-view.chatting { padding-bottom: calc(var(--composer-h, 62px) + 110px + env(safe-area-inset-bottom)); }
.kb .pair-view.chatting { padding-bottom: calc(var(--composer-h, 62px) + var(--kbb, 0px) + 24px); }
.chat { display: flex; flex-direction: column; gap: 4px; margin-top: 14px; }
.chat-sep { align-self: center; font-size: 12px; font-weight: 650; color: var(--muted); margin: 12px 0 6px; }
.msg { max-width: 80%; align-self: flex-start; background: var(--surface); border: 1px solid var(--line); padding: 8px 12px 6px; border-radius: 18px 18px 18px 6px; }
.msg.me { align-self: flex-end; background: var(--c-people); color: #fff; border-color: transparent; border-radius: 18px 18px 6px 18px; }
.msg .txt { font-size: 15.5px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg .meta { display: flex; align-items: center; justify-content: flex-end; gap: 3px; font-size: 11px; opacity: .7; margin-top: 2px; }
.msg .meta .seen { opacity: 1; }
.msg.failed { background: color-mix(in srgb, var(--c-danger) 20%, var(--surface)); color: var(--text); cursor: pointer; }
.composer { position: fixed; left: 50%; transform: translateX(-50%); width: calc(100% - 24px); max-width: 536px; z-index: 41;
  bottom: calc(90px + env(safe-area-inset-bottom)); display: flex; align-items: flex-end; gap: 8px; padding: 6px;
  background: var(--glass); backdrop-filter: blur(22px) saturate(1.6); -webkit-backdrop-filter: blur(22px) saturate(1.6);
  border: 1px solid var(--line-2); border-radius: 24px; box-shadow: var(--shadow); }
.kb .composer { bottom: calc(var(--kbb, 0px) + 8px); } /* sits right on the keyboard, whatever its height */
.composer textarea { flex: 1; min-width: 0; resize: none; border: 0; outline: none; background: transparent; font-size: 16px; line-height: 1.4; padding: 10px 10px; max-height: 140px; }
.composer .send { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--c-people); color: #fff; flex-shrink: 0; transition: opacity .2s, transform .15s; }
.composer .send:disabled { opacity: .35; }
.composer .send:active { transform: scale(.92); }

/* chat: replies and reactions */
.msg { position: relative; transition: transform .15s var(--ease), box-shadow .2s; }
.msg.picked { transform: scale(1.02); box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.msg.flash { animation: msgflash 1.3s ease; }
@keyframes msgflash { 0%, 60% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-people) 60%, transparent); } 100% { box-shadow: none; } }
.msg.reacted { margin-bottom: 12px; }
.quote { display: flex; flex-direction: column; gap: 1px; margin: 0 -4px 6px; padding: 5px 9px; border-radius: 10px; border-left: 3px solid var(--c-people);
  background: color-mix(in srgb, var(--c-people) 10%, transparent); font-size: 13px; cursor: pointer; max-width: 100%; }
.msg.me .quote { border-left-color: #fff; background: rgba(255, 255, 255, .16); }
.quote b { font-size: 12px; }
.quote span { opacity: .85; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.rx { position: absolute; bottom: -14px; right: 8px; display: flex; gap: 1px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 1px 5px; font-size: 14px; line-height: 20px; cursor: pointer; }
.msg:not(.me) .rx { right: auto; left: 8px; }
.msg-tools { align-self: flex-start; display: flex; align-items: center; gap: 2px; padding: 4px 6px; margin: 2px 0 8px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px; box-shadow: var(--shadow); max-width: 100%; overflow-x: auto; }
.msg-tools.me { align-self: flex-end; }
.msg-tools .rx-btn { font-size: 22px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; transition: transform .12s; flex-shrink: 0; }
.msg-tools .rx-btn:active { transform: scale(1.25); }
.msg-tools .rx-btn.on { background: color-mix(in srgb, var(--c-people) 20%, transparent); }
.msg-tools .sep { width: 1px; height: 24px; background: var(--line-2); margin: 0 4px; flex-shrink: 0; }
.msg-tools .tool { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--text-2); flex-shrink: 0; }
.composer { flex-wrap: wrap; }
.reply-bar { flex-basis: 100%; display: flex; align-items: center; gap: 8px; padding: 6px 8px 2px 10px; color: var(--c-people); font-size: 13px; min-width: 0; }
.reply-bar .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; border-left: 3px solid var(--c-people); padding-left: 8px; color: var(--text); }
.reply-bar .grow span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reply-bar button { width: 30px; height: 30px; display: grid; place-items: center; color: var(--muted); }

.upd-card { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.upd-card .grow { flex: 1; min-width: 0; }

/* chat: photos */
.msg.photo { padding: 4px 4px 6px; }
.msg.photo .txt, .msg.photo .meta { padding: 0 8px; }
.msg.photo .quote { margin: 0 0 4px; }
.pic { display: block; width: min(240px, 62vw); max-height: 340px; border-radius: 14px; overflow: hidden; background: var(--surface-2); position: relative; padding: 0; margin-bottom: 4px; }
.pic img { width: 100%; height: 100%; object-fit: cover; display: block; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.pic-wait { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
.pic-up { position: absolute; right: 6px; bottom: 6px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .5); color: #fff; }
.msg { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.composer .attach { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--c-people); flex-shrink: 0; }
.attach-bar { flex-basis: 100%; display: flex; align-items: center; gap: 10px; padding: 6px 8px 2px; font-size: 13px; color: var(--muted); min-width: 0; }
.attach-bar img { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; }
.attach-bar .grow { flex: 1; min-width: 0; }
.attach-bar button { width: 30px; height: 30px; display: grid; place-items: center; color: var(--muted); }
.viewer { position: fixed; inset: 0; z-index: 200; background: rgba(0, 0, 0, .94); display: grid; place-items: center; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
.viewer img { max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer .close { position: absolute; top: calc(14px + env(safe-area-inset-top)); right: 14px; width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; display: grid; place-items: center; }

/* chat: edited and deleted messages */
.msg.deleted { background: transparent; border: 1px dashed var(--line-2); color: var(--muted); }
.msg.me.deleted { background: transparent; color: var(--muted); border-color: var(--line-2); }
.msg .txt.gone { display: flex; align-items: center; gap: 5px; font-style: italic; font-size: 14px; }
.msg.editing { outline: 2px solid color-mix(in srgb, var(--c-people) 60%, transparent); outline-offset: 2px; }
.msg-tools .tool.danger { color: var(--c-danger); }

/* chat: back to the latest message */
.jump-latest { position: fixed; right: max(18px, calc(50% - 250px)); bottom: calc(var(--composer-h, 62px) + 104px + env(safe-area-inset-bottom)); z-index: 41;
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--text);
  border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.kb .jump-latest { bottom: calc(var(--composer-h, 62px) + var(--kbb, 0px) + 18px); }
.jump-latest .badge { position: absolute; top: -6px; right: -4px; height: 20px; min-width: 20px; font-size: 11px; padding: 0 5px; }

/* date & time picker */
.picker .tp-big { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 0 0 14px; }
.picker .tp-big b { font-size: 46px; font-weight: 750; letter-spacing: -.03em; font-variant-numeric: tabular-nums; min-width: 150px; text-align: center; }
.picker .tp-big button { width: 42px; height: 42px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; }
.tp-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.tp-grid button { height: 40px; border-radius: 12px; background: var(--surface-2); font-weight: 650; font-variant-numeric: tabular-nums; font-size: 14.5px; }
.tp-grid button.on { background: var(--acc, var(--c-tasks)); color: #fff; }
.tp-grid button.near { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--acc, var(--c-tasks)) 50%, transparent); }
.dp-cal button.sel { background: var(--acc, var(--c-tasks)); color: #fff; }
.dp-cal button.sel small { color: rgba(255, 255, 255, .8); }
.dp-cal button.td:not(.sel) { border-color: color-mix(in srgb, var(--acc, var(--c-tasks)) 60%, transparent); }
.dp-cal button.off { opacity: .22; }
.date-field { text-align: start; width: 100%; }

.rem.past { opacity: .62; }
.rem.past .n { color: var(--muted); font-style: italic; }
.meta .passed { color: #e5873a; font-weight: 650; }

/* Today: coming up & recently */
.agenda-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: start; padding: 9px 0; border-bottom: 1px solid var(--line); }
.agenda-row:last-child { border-bottom: 0; }
.agenda-row .grow { flex: 1; min-width: 0; }
.agenda-row .t { font-weight: 620; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda-row .s { font-size: 12.5px; color: var(--muted); }
.agenda-row .when { font-size: 13px; font-weight: 700; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.agenda-row .when.now { color: var(--c-people); }
.recent-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 14px; }
.recent-row .e { width: 24px; text-align: center; }
.recent-row .grow { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-row .muted { font-size: 12px; white-space: nowrap; }

.h-day.rest i { opacity: .35; border-style: dashed; }
.h-day.rest small { opacity: .5; }

/* money: your own categories */
.cat-grid .cat-new { border: 1.5px dashed var(--line-2); color: var(--muted); }
.cat-maker { margin-top: 10px; background: var(--surface-2); border: 0; }
.cat-maker .cat-e { width: 50px; height: 50px; border-radius: 14px; background: var(--surface); display: grid; place-items: center; font-size: 28px; flex-shrink: 0; }
.cat-maker .grow { flex: 1; min-width: 0; }
.emoji-grid.sm button { font-size: 20px; }

/* chat: files and saving */
.file-card { display: flex; align-items: center; gap: 10px; width: min(250px, 64vw); padding: 8px 10px; margin-bottom: 4px; border-radius: 14px; background: rgba(127, 127, 127, .14); text-align: start; color: inherit; }
.file-card .fi { font-size: 26px; }
.file-card .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.file-card b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-card small { font-size: 12px; opacity: .75; }
.msg.photo .file-card, .msg .file-card + .txt { margin-top: 2px; }
.viewer .save { position: absolute; bottom: calc(20px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); height: 44px; padding: 0 18px; border-radius: 22px; background: rgba(255, 255, 255, .16); color: #fff; display: flex; align-items: center; gap: 8px; font-weight: 650; }
.attach-menu { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.attach-menu button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 10px; border-radius: 18px; background: var(--surface-2); }
.attach-menu small { color: var(--muted); font-size: 12px; }

.sheet-wrap.top { z-index: 150; }
.dp-cal button.out { visibility: hidden; }

/* the conversation's header and its Daily question / Chat tabs stay in reach while scrolling */
.pair-bar { position: sticky; top: 0; z-index: 30; margin: 0 -18px; padding: env(safe-area-inset-top) 18px 8px; background: var(--bg); box-shadow: 0 8px 14px -12px rgba(0, 0, 0, .5); }
.pair-view { padding-top: 0; }

.rem .left { font-size: 12.5px; font-weight: 650; color: var(--text-2); font-variant-numeric: tabular-nums; margin-top: 2px; }

.emoji-own { margin-top: 8px; padding: 9px 12px; gap: 10px; }
.emoji-own input { background: none; border: 0; outline: none; font-size: 15px; min-width: 0; padding: 0; }

.cd-hero .cd-left { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; margin: 4px 0 2px; opacity: .95; }
.cd .n .left { display: block; font-variant-numeric: tabular-nums; font-weight: 650; color: var(--text-2); margin-top: 2px; }

/* ---------- storage health ---------- */
.store-banner { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 14px 10px; background: color-mix(in srgb, var(--c-danger) 16%, var(--surface)); border-bottom: 1px solid color-mix(in srgb, var(--c-danger) 40%, transparent); font-size: 13px; color: var(--text); }
.store-banner .ic { color: var(--c-danger); flex-shrink: 0; }
.store-banner b { display: block; font-size: 13.5px; }
.store-banner span { color: var(--text-2); }
input.check { width: 22px; height: 22px; accent-color: var(--acc, var(--c-tasks)); flex-shrink: 0; }

/* ---------- money: review flags, transfers ---------- */
.rv-tag { height: 19px; font-size: 11px; margin-inline-start: 6px; vertical-align: 2px; background: color-mix(in srgb, var(--c-habits) 16%, transparent); color: var(--c-habits); }
.rv-tag.warn { background: color-mix(in srgb, var(--c-mood) 18%, transparent); color: color-mix(in srgb, var(--c-mood) 75%, var(--text)); }
.money-hero .unrev { font-size: 12.5px; opacity: .85; font-weight: 600; margin-top: 2px; }
.tx.pend { border-style: dashed; }
.tx .v.tr { color: var(--text-2); }
.suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; font-size: 12.5px; color: color-mix(in srgb, var(--c-mood) 75%, var(--text)); font-weight: 600; }

/* ---- quick capture, timeline, weekly review, Today extras ---- */
.capture-in { min-height: 84px; font-size: 16px; resize: none; }
.capture-kinds { margin-top: 12px; flex-wrap: wrap; }
.capture-kinds .chip.on { background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c); border-color: color-mix(in srgb, var(--c) 40%, transparent); }
.capture-plan { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--card2, color-mix(in srgb, var(--text) 6%, transparent)); font-size: 14px; font-weight: 600; }
.day-nav { display: flex; align-items: center; gap: 8px; padding: 10px 12px; }
.tl-row { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.tl-row:last-child { border-bottom: 0; }
.tl-row .e { font-size: 20px; width: 26px; text-align: center; flex: none; }
.tl-row .when { font-size: 12.5px; font-weight: 700; color: var(--muted); width: 42px; flex: none; padding-top: 3px; font-variant-numeric: tabular-nums; }
.tl-row .t { font-weight: 650; font-size: 15px; overflow-wrap: anywhere; }
.tl-row .s { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.review-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.review-grid .card { margin: 0; }
.review-grid .stat .k { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.review-grid .stat .v { font-size: 26px; font-weight: 800; margin-top: 2px; }
.review-grid .stat .v small { font-size: 13px; font-weight: 650; color: var(--muted); }
.review-grid .stat .d { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.hab-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.hab-row .e { font-size: 18px; }
.hab-row .n { font-size: 13px; font-weight: 700; color: var(--muted); min-width: 34px; text-align: end; font-variant-numeric: tabular-nums; }
.hab-row .bar { height: 7px; border-radius: 9px; background: color-mix(in srgb, var(--text) 9%, transparent); overflow: hidden; display: block; }
.hab-row .bar i { display: block; height: 100%; border-radius: 9px; }
.wk-bars { display: flex; gap: 8px; align-items: flex-end; height: 92px; margin: 6px 0 10px; }
.wk-bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; }
.wk-bar .col { flex: 1; width: 100%; max-width: 28px; border-radius: 8px; background: color-mix(in srgb, var(--text) 7%, transparent); display: flex; align-items: flex-end; overflow: hidden; }
.wk-bar .col i { display: block; width: 100%; background: var(--c-habits); border-radius: 8px; }
.wk-bar small { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.ins { font-size: 14px; margin-top: 8px; line-height: 1.45; }
.top3 { margin: -2px 0 8px; padding: 8px 10px 4px; border-radius: 14px; background: color-mix(in srgb, var(--c-mood) 10%, transparent); }
.top3-h { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 750; color: var(--c-mood); margin-bottom: 2px; }
.mini-task .star { background: none; border: 0; color: var(--muted); opacity: .45; padding: 4px; margin-inline-start: 2px; display: flex; min-width: 40px; min-height: 40px; align-items: center; justify-content: center; }
.mini-task .star.on { color: var(--c-mood); opacity: 1; }
.mini-task .star.on svg { fill: currentColor; }
.wrap-card .mini-task .btn { margin-inline-start: auto; }
.review-nudge { display: flex; align-items: center; gap: 12px; }
.today-custom { display: flex; align-items: center; gap: 6px; margin: 18px auto 4px; }
.diag-row .btn { flex: none; }

/* ---- Tasks | Reminders, skip next ---- */
.plan-seg { margin: 4px 0 14px; }
.plan-seg button { display: flex; align-items: center; justify-content: center; gap: 6px; }
.filter-chips { margin: 12px 0 4px; }
.filter-chips .chip { min-height: 36px; }
.filter-chips .badge { height: 18px; min-width: 18px; font-size: 11px; padding: 0 5px; background: transparent; color: inherit; opacity: .75; }
.foot-hint { text-align: center; font-size: 12.5px; color: var(--muted); margin-top: 20px; line-height: 1.5; }
.mini-btn { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; min-height: 36px; padding: 0 12px; border-radius: 11px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: inherit; font-size: 12.5px; font-weight: 650; cursor: pointer; }
.mini-btn:active { transform: scale(.97); }
.link-sm { background: none; border: 0; padding: 0 6px; min-height: 36px; margin-inline-start: 4px; color: var(--acc, var(--c-tasks)); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.skip-line { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-top: 4px; font-size: 12px; font-weight: 650; color: var(--muted); }
.rem .n .left { font-weight: 600; color: var(--muted); }
.preview-actions { display: flex; align-items: center; gap: 6px; margin: -4px 0 12px; }
.preview-actions .mini-btn { margin-top: 0; }

/* ---- shared: buttons that look like list rows; keyboard focus; reduced motion ---- */
.row-btn { width: 100%; text-align: start; }
:focus-visible { outline: 2.5px solid var(--acc, var(--c-tasks)); outline-offset: 2px; border-radius: 10px; }
button:focus:not(:focus-visible), input:focus:not(:focus-visible) { outline: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* named versions of styles that used to be repeated inline */
.btn.destructive { background: var(--c-danger); color: #fff; }
.btn.icon-only { flex: 0 0 56px; padding: 0; }
.bubble.sm { width: 30px; height: 30px; border-radius: 10px; }
.settings-group.flat { box-shadow: none; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
