/* Kitty Board: "Bright & friendly" look.
   Layout: light peach canvas, rounded white surfaces, colourful board gradients, floating tab bar on phones.
   Every colour comes from the tokens below; the dark set swaps them (system setting or the Appearance choice). */
:root {
  --bg: #FFF7F2;
  --bg2: #FFEFE7;
  --surface: #FFFFFF;
  --surface2: #FBF6F9;
  --fill: rgba(43, 34, 54, .06);
  --fill2: rgba(43, 34, 54, .1);
  --ink: #2B2236;
  --soft: #756A80;
  --faint: #91879A;
  --line: #F0E6EC;
  --line2: #E4D7DF;
  --list-bg: rgba(255, 255, 255, .66);
  --pink: #FF5C8A;
  --pink-deep: #C93C6A;
  --pink-soft: #FFE4EC;
  --blue: #4E8CFF;
  --blue-soft: #E3EDFF;
  --lilac: #A67CFF;
  --lilac-soft: #EFE7FF;
  --mint: #22B98F;
  --mint-soft: #DCF5EE;
  --sun: #FFB547;
  --sun-soft: #FFF1D9;
  --red: #BD3359;
  --red-soft: #FFE1E8;
  --kitty: #FF5C8A; /* person pink: fixed, so app themes (which re-tint --pink) never change hearts or jars */
  --kitty-soft: #FFE4EC;
  --kitty-deep: #E8457A;
  --logo: #E8645A;
  --accent2: #FF9A6B;
  --jo: var(--blue);
  --jo-soft: var(--blue-soft);
  --olivia: var(--mint);
  --olivia-soft: var(--mint-soft);
  --both: var(--lilac);
  --both-soft: var(--lilac-soft);
  --navbar: #2B2236;
  --navbar-ink: #A9A0B5;
  --overlay: rgba(30, 22, 40, .45);
  --shadow-sm: 0 2px 6px rgba(43, 34, 54, .06);
  --shadow: 0 6px 16px rgba(43, 34, 54, .08);
  --shadow-lg: 0 20px 44px rgba(43, 34, 54, .2);
  --f-display: 'Fredoka', 'Nunito', system-ui, sans-serif;
  --f-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tabbar-h: 0px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17131D; --bg2: #1D1724; --surface: #231C2B; --surface2: #2A2233; --fill: rgba(255, 255, 255, .06); --fill2: rgba(255, 255, 255, .11);
    --ink: #F4EEF8; --soft: #B3A8C0; --faint: #7E7389; --line: #33293D; --line2: #43374E; --list-bg: rgba(35, 28, 43, .78);
    --pink: #FF6E97; --pink-deep: #FF5C8A; --pink-soft: #3B1F2D; --blue: #74A3FF; --blue-soft: #1E2A46; --lilac: #B795FF; --lilac-soft: #2D2346;
    --mint: #3FD3A8; --mint-soft: #15342C; --sun: #FFC266; --sun-soft: #3A2E18; --red: #FF6B8E; --red-soft: #401D29;
    --kitty: #FF6E97; --kitty-soft: #3B1F2D; --kitty-deep: #FF5C8A;
    --navbar: #0F0C14; --navbar-ink: #8D8399; --overlay: rgba(5, 3, 8, .62);
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, .3); --shadow: 0 6px 16px rgba(0, 0, 0, .35); --shadow-lg: 0 20px 44px rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #17131D; --bg2: #1D1724; --surface: #231C2B; --surface2: #2A2233; --fill: rgba(255, 255, 255, .06); --fill2: rgba(255, 255, 255, .11);
  --ink: #F4EEF8; --soft: #B3A8C0; --faint: #7E7389; --line: #33293D; --line2: #43374E; --list-bg: rgba(35, 28, 43, .78);
  --pink: #FF6E97; --pink-deep: #FF5C8A; --pink-soft: #3B1F2D; --blue: #74A3FF; --blue-soft: #1E2A46; --lilac: #B795FF; --lilac-soft: #2D2346;
  --mint: #3FD3A8; --mint-soft: #15342C; --sun: #FFC266; --sun-soft: #3A2E18; --red: #FF6B8E; --red-soft: #401D29;
  --kitty: #FF6E97; --kitty-soft: #3B1F2D; --kitty-deep: #FF5C8A;
  --navbar: #0F0C14; --navbar-ink: #8D8399; --overlay: rgba(5, 3, 8, .62);
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, .3); --shadow: 0 6px 16px rgba(0, 0, 0, .35); --shadow-lg: 0 20px 44px rgba(0, 0, 0, .55);
  color-scheme: dark;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--f-body); font-size: 15px; line-height: 1.45; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
body.modal-open { overflow: hidden; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; line-height: 1.15; font-family: var(--f-display); font-weight: 600; text-wrap: balance; }
hr { border: 0; border-top: 1px solid var(--line); margin: 10px 0; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--pink) 55%, transparent); outline-offset: 2px; }
.muted { color: var(--soft); }
.small { font-size: 13px; }
.row { display: flex; align-items: center; }
.gap { gap: 8px; }
.push { margin-left: auto; }
.grow { flex: 1; min-width: 0; }
.wrap-row { flex-wrap: wrap; margin-top: 8px; }

/* ---------- Buttons and controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: var(--fill);
  color: var(--ink); padding: 9px 16px; border-radius: 999px; font-weight: 800; font-size: 14px;
  transition: background .15s, transform .1s, box-shadow .15s;
}
.btn:hover { background: var(--fill2); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn.primary { background: var(--ink); color: var(--bg); box-shadow: var(--shadow-sm); }
.btn.primary:hover { background: color-mix(in srgb, var(--ink) 88%, var(--pink)); }
.btn.danger { background: var(--red-soft); color: var(--red); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--fill); }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn.big { padding: 13px 22px; font-size: 16px; }
.btn.full { width: 100%; }
.btn.helpme { background: linear-gradient(135deg, var(--pink-soft), var(--lilac-soft)); color: var(--ink); }
.btn.helpme:hover { filter: brightness(.98); box-shadow: var(--shadow-sm); }
.btn.helpme.wide { width: 100%; padding: 11px; font-size: 16px; margin: 4px 0 10px; }
.btn.helpme.on { background: linear-gradient(135deg, var(--pink), var(--lilac)); color: #fff; box-shadow: 0 8px 20px color-mix(in srgb, var(--pink) 35%, transparent); }
.btn.helpme.on .smiley circle:first-child { fill: #fff; stroke: #fff; }

.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none; border: 0; background: transparent;
  border-radius: 12px; color: var(--soft); transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--fill); color: var(--ink); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn.recording { background: var(--red); color: #fff; animation: pulse 1.2s infinite; }
.icon-btn.send { background: var(--ink); color: var(--bg); }
.icon-btn.send:disabled { opacity: .45; }
.icon-btn.light { color: var(--soft); }
.icon-btn.light.on { color: var(--sun); }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--red) 25%, transparent); } }

.link { background: none; border: 0; padding: 0; color: var(--pink-deep); font-weight: 800; font-size: 13px; text-decoration: none; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.link.danger { color: var(--red); }
.link:disabled { color: var(--soft); cursor: default; text-decoration: none; }

.chip-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 0; background: var(--surface);
  border-radius: 999px; font-size: 13px; font-weight: 800; color: var(--ink); white-space: nowrap; box-shadow: var(--shadow-sm);
  transition: transform .1s, background .15s;
}
.chip-btn:hover { background: var(--surface2); }
.chip-btn:active { transform: scale(.96); }
.chip-btn.on { background: var(--ink); color: var(--bg); }
.chip-btn.danger { color: var(--red); }
.chip-btn:disabled { opacity: .45; cursor: default; }
.chip-btn.for-pink.on { background: var(--kitty); color: #fff; }
.chip-btn.for-blue.on { background: var(--jo); color: #fff; }
.chip-btn.for-mint.on { background: var(--olivia); color: #fff; }
.chip-btn.for-both.on { background: var(--both); color: #fff; }

.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; border: 0;
  color: #fff; font-size: 12px; font-weight: 800; line-height: 1.55;
}
.chip.add { background: var(--fill); color: var(--soft); padding: 2px 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 13px; font-weight: 800; color: var(--soft); }
input:not([type=checkbox]):not([type=radio]):not([type=file]), textarea, select {
  width: 100%; border: 2px solid var(--line2); border-radius: 14px; padding: 10px 12px; background: var(--surface);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, textarea:focus, select:focus { border-color: var(--pink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--pink) 18%, transparent); }
textarea { resize: vertical; }
.check { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; cursor: pointer; }
.check input { width: 19px; height: 19px; accent-color: var(--mint); cursor: pointer; flex: none; }
.error { color: var(--red); font-weight: 700; font-size: 14px; margin: 4px 0 10px; }
.name-row { display: flex; align-items: center; gap: 8px; }

/* Board icons */
.b-icon {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 12px; flex: none;
  background: rgba(255, 255, 255, .9); line-height: 1;
}
.b-icon.small { width: 24px; height: 24px; border-radius: 8px; font-size: 14px; background: var(--fill); }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px;
  padding: calc(10px + var(--safe-top)) max(18px, env(safe-area-inset-right)) 10px max(18px, env(safe-area-inset-left));
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font-family: var(--f-display); font-weight: 600; font-size: 20px; }
.nav { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; }
.nav a {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; text-decoration: none;
  font-weight: 800; font-size: 14px; color: var(--soft); transition: background .15s, color .15s;
}
.nav a:hover { background: var(--fill); color: var(--ink); }
.nav a.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.nav .count { background: var(--pink); color: #fff; font-size: 11px; padding: 1px 7px; border-radius: 999px; }
.nav .heart { color: var(--kitty); font-size: 14px; }
.nav .heart-count { background: var(--kitty); }
.nav .heart-count.c-blue { background: var(--jo); }
.nav .heart-count.c-mint { background: var(--olivia); }
.crumb { color: var(--soft); font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 10px; margin-left: 4px; border-left: 2px solid var(--line2); }
.top-right { display: flex; align-items: center; gap: 4px; }
.sync-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--mint); margin: 0 8px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--mint) 22%, transparent); }
.sync-dot.saving { background: var(--sun); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sun) 25%, transparent); animation: blink 1s infinite; }
.sync-dot.offline { background: var(--faint); box-shadow: none; }
@keyframes blink { 50% { opacity: .35; } }
.install-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: 0;
  background: linear-gradient(135deg, var(--pink), var(--accent2)); color: #fff; font-weight: 800; font-size: 13px; box-shadow: var(--shadow-sm);
}

/* Phone tab bar */
.tabbar { display: none; }

/* ---------- Home ---------- */
.home { max-width: 1120px; margin: 0 auto; padding: 22px 18px calc(60px + var(--tabbar-h)); }
.home-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.home-hero h1 { font-size: 32px; letter-spacing: -.01em; }
.home-hero p { margin: 4px 0 0; font-weight: 600; }
.pri-summary {
  display: inline-flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 999px; background: var(--surface);
  box-shadow: var(--shadow-sm); text-decoration: none; font-size: 14px; font-weight: 700; transition: transform .15s;
}
.pri-summary:hover { transform: translateY(-1px); }
.pri-summary svg { color: var(--pink); }
.pri-summary.has-overdue { background: var(--red-soft); color: var(--red); }
.section-h { display: flex; align-items: center; gap: 8px; font-family: var(--f-display); font-size: 17px; font-weight: 600; color: var(--soft); margin: 24px 0 12px; }
.section-h.first { margin-top: 0; }
.starred-grid { margin-bottom: 22px; }
.board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 22px 12px; padding-top: 12px; }
.board-tile {
  position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 128px; padding: 12px 12px 13px; border-radius: 20px;
  text-decoration: none; color: #fff; isolation: isolate; border: 0; text-align: left;
  background: var(--bpat, none), linear-gradient(135deg, var(--bc), var(--bc2)); box-shadow: 0 10px 20px color-mix(in srgb, var(--bc) 26%, transparent);
  transition: transform .18s ease, box-shadow .18s ease;
}
.board-tile:hover { transform: translateY(-3px); box-shadow: 0 16px 28px color-mix(in srgb, var(--bc) 34%, transparent); }
.board-tile:hover .tile-ears i:first-child { animation: ear-flick .5s ease-in-out; }
.board-tile:hover .tile-ears i:last-child { animation: ear-flick .5s .08s ease-in-out; }
.tile-ears { position: absolute; top: -12px; left: 16px; display: flex; gap: 24px; z-index: -1; }
.tile-ears i { width: 0; height: 0; border-left: 12px solid transparent; border-right: 12px solid transparent; border-bottom: 17px solid var(--bc); transform-origin: 50% 100%; }
.bt-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; border-radius: inherit; }
.board-tile.has-cover::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(180deg, rgba(20, 12, 30, .05) 20%, rgba(20, 12, 30, .72)); z-index: -1; }
.bt-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; margin-bottom: auto; }
.board-tile .b-icon { width: 40px; height: 40px; border-radius: 13px; background: rgba(255, 255, 255, .94); box-shadow: 0 3px 8px rgba(0, 0, 0, .08); }
.bt-people { display: inline-flex; align-items: center; gap: 2px; }
.bt-view { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-left: 3px; border-radius: 50%; background: rgba(255, 255, 255, .92); color: #2B2236; }
.bt-view svg { width: 13px; height: 13px; }
.bt-title { font-family: var(--f-display); font-weight: 600; font-size: 16px; line-height: 1.15; margin-top: 8px; }
.bt-meta { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; opacity: .95; }
.bt-meta .kb-glyph { color: #fff; }
.bt-prog { display: block; height: 5px; border-radius: 99px; background: rgba(255, 255, 255, .3); overflow: hidden; }
.bt-prog i { display: block; height: 100%; background: #fff; border-radius: 99px; transition: width .4s; }
.board-tile.new {
  background: transparent; color: var(--soft); border: 2px dashed var(--line2); box-shadow: none; align-items: center; justify-content: center;
  gap: 6px; font-weight: 800;
}
.board-tile.new::before { display: none; }
.board-tile.new:hover { color: var(--pink-deep); border-color: var(--pink); transform: translateY(-2px); }
.archived-boards { margin-top: 30px; }
.archived-boards summary { cursor: pointer; display: flex; align-items: center; gap: 8px; color: var(--soft); font-weight: 800; }
.arch-list { margin-top: 10px; background: var(--surface); border-radius: 18px; padding: 6px 14px; box-shadow: var(--shadow-sm); }
.arch-row { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.arch-row:last-child { border-bottom: 0; }
.dot { width: 12px; height: 12px; border-radius: 4px; flex: none; }

/* Empty states */
.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 26px 16px; color: var(--soft); }
.empty-state strong { font-family: var(--f-display); font-weight: 600; font-size: 18px; color: var(--ink); }
.empty-state p { margin: 0 0 6px; max-width: 42ch; }
.illo { filter: drop-shadow(0 6px 10px rgba(43, 34, 54, .1)); flex: none; }
.illo .i-paper { fill: var(--surface); stroke: var(--line2); stroke-width: 2; }
.illo .i-ink { fill: var(--ink); }
.illo .i-pink { fill: var(--pink); }
.illo .i-blue { fill: var(--blue); }
.illo .i-lilac { fill: var(--lilac); }
.illo .i-mint { fill: var(--mint); }
.illo .i-sun, .illo .i-sunray { fill: var(--sun); }
.illo .i-line { fill: var(--line2); }
.illo .i-edge { fill: none; stroke: var(--line2); stroke-width: 2; }
.illo .i-face { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.illo .i-face-light { fill: none; stroke: var(--sun); stroke-width: 2.5; stroke-linecap: round; }

/* ---------- Board ---------- */
.view-board { height: calc(100dvh - 58px - var(--safe-top) - var(--tabbar-h)); }
.board {
  height: 100%; display: flex; flex-direction: column;
  background: var(--bpat2, none), linear-gradient(160deg, color-mix(in srgb, var(--bc) 18%, var(--bg)), color-mix(in srgb, var(--bc2) 14%, var(--bg)) 70%);
}
.board-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; flex-wrap: wrap; }
.board-bar .b-icon { background: var(--surface); box-shadow: var(--shadow-sm); width: 38px; height: 38px; }
.board-title {
  flex: 0 1 auto; width: auto; min-width: 120px; max-width: 420px; background: transparent !important; border: 2px solid transparent !important;
  font-family: var(--f-display); font-weight: 600; font-size: 22px; padding: 4px 8px !important; border-radius: 12px; box-shadow: none !important;
}
.board-title:hover { background: var(--fill) !important; }
.board-title:focus { background: var(--surface) !important; border-color: var(--pink) !important; }
.board-chips { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.board-chips .chip {
  flex: none; display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 12px; border-radius: 999px; border: 0;
  background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 900; white-space: nowrap; box-shadow: var(--shadow-sm); transition: transform .1s, background .15s;
}
.board-chips .chip svg { width: 15px; height: 15px; }
.board-chips button.chip:active { transform: scale(.95); }
.board-chips .chip.active { background: var(--ink); color: var(--bg); }
.board-chips .rewards-tag { padding: 0 10px; background: var(--pink-soft); color: var(--pink-deep); box-shadow: none; }
.board-chips .nudge-chip { color: var(--lilac); }
.board-chips .nudge-chip span { color: var(--ink); }
.board-chips .nudge-chip:hover .kb-glyph { animation: paw-tap .5s ease-in-out; }
.board-chips .menu-chip { padding: 0 10px; color: var(--soft); }
.nudge-cards .menu-item .kb-glyph { color: var(--lilac); }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: var(--surface);
  border: 0; font-weight: 800; font-size: 14px; box-shadow: var(--shadow-sm); transition: transform .1s;
}
.pill:hover { background: var(--surface2); }
.pill:active { transform: scale(.96); }
.pill.active { background: var(--ink); color: var(--bg); }
.share-tag {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 999px; border: 0;
  background: var(--surface); color: var(--ink); font-size: 12.5px; font-weight: 800; white-space: nowrap; box-shadow: var(--shadow-sm);
}
.share-tag svg { width: 14px; height: 14px; }
.share-tag.dark { background: var(--blue-soft); color: var(--blue); box-shadow: none; }
.rewards-tag { background: var(--pink-soft); color: var(--pink-deep); box-shadow: none; }

.filter-panel {
  margin: 0 16px 10px; padding: 14px 16px; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; gap: 10px; animation: drop .18s ease-out;
}
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }
.fp-row { display: flex; align-items: center; gap: 8px; }
.fp-row.wrap { flex-wrap: wrap; }
.fp-label { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--soft); min-width: 84px; }
.fp-search { flex: 1; }
.label-toggle { border: 2px solid var(--lc); background: transparent; color: var(--ink); border-radius: 999px; padding: 3px 11px; font-size: 13px; font-weight: 800; }
.label-toggle.on { background: var(--lc); color: #fff; }
.seg { display: inline-flex; gap: 4px; margin-left: 6px; }

.lists {
  flex: 1; display: flex; align-items: flex-start; gap: 14px; overflow-x: auto; overflow-y: hidden;
  padding: 4px 16px calc(18px + var(--safe-bottom)); scroll-padding: 16px;
}
.list {
  flex: 0 0 292px; max-height: 100%; display: flex; flex-direction: column; background: var(--list-bg);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-radius: 22px; box-shadow: var(--shadow-sm);
}
.list-head { display: flex; align-items: flex-start; gap: 4px; padding: 10px 8px 4px 10px; cursor: grab; }
.list-title {
  flex: 1; border: 2px solid transparent !important; background: transparent !important; resize: none; overflow: hidden; box-shadow: none !important;
  font-family: var(--f-display); font-weight: 600; font-size: 16px; padding: 4px 6px !important; border-radius: 10px; line-height: 1.25; cursor: pointer;
}
.list-title:focus { background: var(--surface) !important; border-color: var(--pink) !important; cursor: text; }
.list-count { font-size: 12px; font-weight: 800; color: var(--soft); background: var(--surface); border-radius: 999px; padding: 1px 9px; margin-top: 7px; }
.list-sorted { font-size: 12px; font-weight: 700; color: var(--soft); padding: 0 14px 4px; display: flex; align-items: center; gap: 5px; }
.list-cards { flex: 1 1 auto; overflow-y: auto; padding: 4px 10px; min-height: 14px; display: flex; flex-direction: column; gap: 9px; }
.list-cards:empty::before {
  content: 'Nothing here yet'; display: block; text-align: center; color: var(--faint); font-size: 13px; font-weight: 700;
  border: 2px dashed var(--line2); border-radius: 14px; padding: 34px 8px 12px;
  background: no-repeat center 8px / 36px 22px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 24'%3E%3Cpath d='M6 15 8.5 3.5l8 6.5h7l8-6.5L34 15v9H6z' fill='%23A79CB2'/%3E%3Ccircle cx='15' cy='18' r='1.8' fill='%23FFB547'/%3E%3Ccircle cx='25' cy='18' r='1.8' fill='%23FFB547'/%3E%3C/svg%3E");
}
.composer-wrap { padding: 6px 10px 10px; }
.add-card-btn {
  width: 100%; display: flex; align-items: center; gap: 6px; padding: 9px 10px; border: 0; background: transparent;
  border-radius: 14px; color: var(--soft); font-weight: 800; text-align: left;
}
.add-card-btn:hover { background: var(--surface); color: var(--ink); }
.composer textarea { resize: none; border-radius: 14px; box-shadow: var(--shadow-sm); }
.composer-row { display: flex; align-items: center; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.add-list { background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 0; }
.add-list input { background: var(--list-bg) !important; border: 2px dashed var(--line2) !important; font-weight: 800; border-radius: 18px !important; }

.card {
  background: var(--surface); border-radius: 16px; padding: 10px 12px; box-shadow: var(--shadow-sm); cursor: pointer;
  border: 2px solid transparent; transition: border-color .15s, box-shadow .15s, transform .15s, opacity .2s;
  user-select: none; -webkit-user-select: none;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.card:focus-visible { outline: 0; border-color: var(--pink); }
.card.flagged { box-shadow: inset 4px 0 0 var(--red), var(--shadow-sm); }
.card.dim { opacity: .28; }
.card-cover { margin: -10px -12px 9px; border-radius: 14px 14px 0 0; overflow: hidden; background: var(--fill); max-height: 170px; }
.card-cover img { width: 100%; height: auto; max-height: 170px; object-fit: cover; min-height: 60px; }
.card-labels { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.card-labels .chip { font-size: 11px; padding: 0 8px; }
.card-title { font-weight: 800; font-size: 14.5px; word-break: break-word; }
.badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.badges:empty { display: none; }
.badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 800; color: var(--soft);
  border-radius: 999px; padding: 2px 8px; background: var(--fill); border: 0;
}
.badge svg { width: 14px; height: 14px; }
.badge.done { background: var(--mint-soft); color: var(--mint); }
.badge.flag { background: var(--red-soft); color: var(--red); }
.badge.due { cursor: pointer; }
.badge.due.soon { background: var(--sun-soft); color: color-mix(in srgb, var(--sun) 70%, var(--ink)); }
.badge.due.overdue { background: var(--red-soft); color: var(--red); }
.badge.due.done { background: var(--mint-soft); color: var(--mint); }
.badge.due.later, .badge.due.none { background: var(--fill); color: var(--soft); }
.badge.ai, .badge:has(.hearts) { padding: 0; background: transparent; }
.badge.task-progress .ring { width: 15px; height: 15px; }
.ring { flex: none; }
.ring-bg { fill: none; stroke: var(--line2); stroke-width: 3; }
.ring-fg { fill: none; stroke: var(--mint); stroke-width: 3; stroke-linecap: round; transition: stroke-dasharray .3s; }
.ring.full .ring-bg { stroke: var(--mint); }

.drag-ghost { opacity: .3; }
.drag-chosen { box-shadow: var(--shadow-lg) !important; }
.drag-active { transform: rotate(3deg) scale(1.03); box-shadow: var(--shadow-lg) !important; }
.sortable-fallback { opacity: 1 !important; }

/* ---------- Overlays ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 50; background: var(--overlay); display: flex; justify-content: center; align-items: flex-start;
  overflow-y: auto; padding: calc(40px + var(--safe-top)) 16px 40px; backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
#sheet { z-index: 60; }
.sheet-card { width: 100%; max-width: 720px; background: var(--bg); border-radius: 28px; box-shadow: var(--shadow-lg); padding: 22px 24px 24px; animation: rise .22s ease-out; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.sheet-head h2 { display: flex; align-items: center; gap: 8px; font-size: 24px; }
.sheet-foot { position: sticky; bottom: -40px; margin: 0 -24px -24px; padding: 12px 24px calc(16px + var(--safe-bottom)); background: var(--bg); border-top: 1px solid var(--line); }
.settings { max-width: 540px; }
.settings section { background: var(--surface); border-radius: 20px; padding: 16px 18px; margin-bottom: 12px; box-shadow: var(--shadow-sm); }
.settings h3 { font-size: 17px; margin-bottom: 10px; }
.settings .sub-h { margin-top: 18px; }
.settings .about { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.settings .pw-toggle { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.settings .pw-toggle .field { width: 100%; }
.push-prefs { display: flex; flex-direction: column; gap: 9px; margin-bottom: 8px; }

.swatches { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 10px; }
.swatch { width: 32px; height: 32px; border-radius: 12px; border: 3px solid transparent; transition: transform .12s; }
.swatch:hover { transform: scale(1.08); }
.swatches.big .swatch { width: 42px; height: 42px; border-radius: 14px; }
.swatch.on { border-color: var(--surface); box-shadow: 0 0 0 3px var(--ink); }
.icon-grid { display: flex; flex-wrap: wrap; gap: 6px; max-height: 196px; overflow-y: auto; padding: 4px; }
.icon-pick { width: 44px; height: 44px; border-radius: 14px; border: 0; background: var(--surface); display: grid; place-items: center; box-shadow: var(--shadow-sm); transition: transform .1s; }
.icon-pick:hover svg { animation: wiggle .5s ease-in-out; }
@keyframes wiggle { 30% { transform: rotate(-8deg) scale(1.06); } 60% { transform: rotate(5deg); } }
.icon-pick:hover { transform: scale(1.08); }
.icon-pick.on { background: var(--pink-soft); box-shadow: 0 0 0 2px var(--pink); }
.preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 9px; margin-bottom: 8px; }
.preset {
  position: relative; text-align: left; background: var(--surface); border: 2px solid transparent; border-radius: 18px; padding: 12px 12px 12px 56px;
  display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow-sm); min-height: 64px; justify-content: center; transition: transform .12s;
}
.preset:hover { transform: translateY(-1px); }
.preset .b-icon { position: absolute; left: 12px; top: 12px; background: var(--surface2); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--bc) 40%, transparent); }
.preset strong { font-weight: 800; }
.preset small { color: var(--soft); font-size: 12px; }
.preset.on { border-color: var(--pink); background: color-mix(in srgb, var(--pink-soft) 60%, var(--surface)); }
.rewards-toggle { margin: 4px 0 12px; font-weight: 700; }

.drawer { justify-content: flex-end; padding: 0; }
.drawer-panel { width: min(420px, 100%); min-height: 100%; background: var(--bg); padding: calc(18px + var(--safe-top)) 18px 24px; box-shadow: var(--shadow-lg); animation: slide-in .22s ease-out; }
@keyframes slide-in { from { transform: translateX(30px); opacity: 0; } }
.lightbox { flex-direction: column; align-items: center; justify-content: center; background: rgba(12, 8, 16, .92); color: #fff; }
.lightbox img { max-height: 82vh; border-radius: 14px; object-fit: contain; min-width: 120px; min-height: 80px; background: #222; }
.lightbox p { opacity: .7; font-size: 14px; }
.lb-close { position: fixed; top: calc(14px + var(--safe-top)); right: 14px; color: #fff; }

/* ---------- Popovers ---------- */
.popover {
  position: fixed; z-index: 80; background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-lg);
  max-height: min(560px, calc(100vh - 24px)); overflow-y: auto; animation: pop .14s ease-out; transform-origin: top left;
}
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(-4px); } }
.popover.sheet {
  left: 0 !important; right: 0; bottom: 0; top: auto !important; width: 100% !important; border-radius: 26px 26px 0 0;
  max-height: 82vh; padding-bottom: var(--safe-bottom); animation: rise .2s ease-out;
}
@keyframes rise { from { transform: translateY(30px); opacity: 0; } }
.pop-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 10px 4px 16px; font-family: var(--f-display); font-weight: 600; font-size: 16px; position: sticky; top: 0; background: var(--surface); z-index: 1; }
.pop-body { padding: 4px 16px 16px; }
.pop-sub { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--soft); margin: 14px 0 6px; }
.menu { display: flex; flex-direction: column; gap: 2px; }
.menu-item { display: flex; align-items: center; gap: 10px; padding: 10px; border: 0; background: none; border-radius: 12px; text-align: left; font-weight: 800; font-size: 14px; }
.menu-item span { display: flex; flex-direction: column; }
.menu-item small { color: var(--soft); font-weight: 600; font-size: 12px; }
.menu-item:hover { background: var(--fill); }
.menu-item.on { background: var(--pink-soft); color: var(--pink-deep); }
.menu-item.danger { color: var(--red); }
.label-row { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.label-row .chip, .label-pick { flex: 1; }
.label-pick { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.label-pick .chip { padding: 6px 12px; font-size: 13px; }
.label-pick input { width: 19px; height: 19px; accent-color: var(--pink); }
.label-new { margin-top: 8px; border-top: 1px solid var(--line); }
.quick-dates { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.seg-choice { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }

/* ---------- Card popup ---------- */
.modal-card { --pop-bg: var(--surface); }
.modal-card .mc-main .desc-view:not(.empty), .modal-card .comment-text, .modal-card .mc-more-toggle { background: var(--surface2); box-shadow: none; }
.modal-card .quick-btn, .modal-card .chip-btn { background: var(--fill); box-shadow: none; }
.modal-card .quick-btn.flag-on { background: var(--red-soft); }
#modal { padding-top: calc(32px + var(--safe-top)); }
.modal-card {
  width: 100%; max-width: 760px; background: var(--surface); border-radius: 28px; box-shadow: var(--shadow-lg);
  display: grid; grid-template-columns: 1fr; overflow: hidden; margin-bottom: 40px;
}
.modal-card.entering { animation: sheet-up .28s cubic-bezier(.2, .9, .3, 1.1); }
@keyframes sheet-up { from { opacity: 0; transform: translateY(26px) scale(.98); } }
.modal-card.with-ai { max-width: 1180px; grid-template-columns: minmax(0, 1fr) 400px; }
.mc-main { padding: 0 24px 26px; min-width: 0; }
.mc-cover { margin: 0 -24px 12px; background: var(--fill); max-height: 260px; overflow: hidden; }
.mc-cover img { width: 100%; max-height: 260px; object-fit: cover; min-height: 80px; }
.mc-head { display: flex; align-items: flex-start; gap: 8px; padding-top: 20px; }
.mc-title {
  flex: 1; font-family: var(--f-display); font-size: 24px; font-weight: 600; border: 2px solid transparent !important; background: transparent !important;
  resize: none; overflow: hidden; padding: 4px 8px !important; margin-left: -8px; line-height: 1.2; box-shadow: none !important;
}
.mc-title:focus { background: var(--surface) !important; border-color: var(--pink) !important; }
.mc-close { margin-top: 2px; background: var(--fill); border-radius: 50%; }
.mc-sub { font-size: 14px; color: var(--soft); margin: 2px 0 12px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-weight: 600; }
.archived-tag { display: inline-flex; gap: 4px; align-items: center; background: var(--sun-soft); color: color-mix(in srgb, var(--sun) 70%, var(--ink)); font-weight: 800; padding: 2px 10px; border-radius: 999px; }
.mc-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 2px 0 6px; }
.mc-quick .chip { padding: 5px 11px; font-size: 13px; cursor: pointer; }
.mc-quick .due-row { display: inline-flex; align-items: center; gap: 6px; }
.mc-quick .badge.due { font-size: 13px; padding: 5px 11px; }
.quick-btn {
  display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border: 0; border-radius: 999px;
  background: var(--surface); color: var(--soft); font-weight: 800; font-size: 13px; box-shadow: var(--shadow-sm); transition: color .15s;
}
.quick-btn:hover { color: var(--ink); }
.quick-btn svg { width: 14px; height: 14px; }
.quick-btn.flag-on { background: var(--red-soft); color: var(--red); box-shadow: none; }
.hearts-btn { padding: 2px; background: transparent; box-shadow: none; }
.complete-toggle { font-size: 13px; font-weight: 800; color: var(--soft); }
.mc-section { margin-top: 18px; }
.mc-section h3 { display: flex; align-items: center; gap: 8px; font-size: 17px; margin-bottom: 8px; }
.desc-view { background: var(--surface); border-radius: 16px; padding: 11px 14px; cursor: text; min-height: 44px; box-shadow: var(--shadow-sm); word-break: break-word; }
.desc-view.empty { color: var(--soft); background: var(--fill); box-shadow: none; min-height: 0; padding: 9px 14px; font-weight: 600; }
.desc-view p, .bubble p, .comment-text p, .prop-preview p { margin: 0 0 4px; }
.desc-view ul, .bubble ul, .comment-text ul, .prop-preview ul { margin: 2px 0 6px; padding-left: 20px; }
.md-h { font-weight: 800; }
.desc-edit { margin-bottom: 8px; min-height: 120px; }

.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.thumb { background: var(--surface); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-sm); }
.thumb-img { display: block; width: 100%; padding: 0; border: 0; background: var(--fill); aspect-ratio: 4 / 3; }
.thumb-img img { width: 100%; height: 100%; object-fit: cover; }
.thumb-actions { display: flex; justify-content: space-between; padding: 7px 10px; }
.thumb.uploading { display: grid; place-items: center; aspect-ratio: 4 / 3; color: var(--soft); gap: 4px; align-content: center; }
.add-thumb {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; aspect-ratio: 4 / 3;
  border: 2px dashed var(--line2); background: transparent; color: var(--pink-deep); font-weight: 800; box-shadow: none;
}
.add-thumb small { color: var(--soft); font-weight: 600; }
.add-thumb:hover { border-color: var(--pink); background: var(--pink-soft); }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line2); border-top-color: var(--pink); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.cl-head { display: flex; align-items: center; gap: 8px; }
.cl-title { flex: 1; font-weight: 800; border-color: transparent !important; background: transparent !important; padding: 4px 6px !important; box-shadow: none !important; font-family: var(--f-display); font-size: 17px; }
.cl-title:focus { background: var(--surface) !important; border-color: var(--pink) !important; }
.cl-static { font-size: 17px; }
.cl-del { width: 30px; height: 30px; opacity: .5; }
.cl-del:hover { opacity: 1; color: var(--red); }
.progress { display: flex; align-items: center; gap: 10px; margin: 6px 0 4px; }
.pct { font-size: 12px; font-weight: 800; color: var(--soft); width: 36px; }
.bar { flex: 1; height: 8px; background: var(--fill2); border-radius: 99px; overflow: hidden; }
.bar div { height: 100%; background: linear-gradient(90deg, var(--lilac), var(--pink)); border-radius: 99px; transition: width .3s; }
.bar div.full { background: var(--mint); }
.tasks { display: flex; flex-direction: column; }
.task { display: flex; align-items: flex-start; gap: 6px; padding: 3px 4px; border-radius: 12px; transition: background .15s; }
.task:hover { background: var(--fill); }
.task .check { padding-top: 7px; }
.task-text {
  flex: 1; border: 2px solid transparent !important; background: transparent !important; resize: none; overflow: hidden; box-shadow: none !important;
  padding: 5px 6px !important; line-height: 1.35; min-height: 32px; font-weight: 600;
}
.task-text:focus { background: var(--surface) !important; border-color: var(--pink) !important; }
.task.done .task-text { text-decoration: line-through; color: var(--faint); }
.task-due { display: inline-flex; align-items: center; gap: 4px; border: 0; background: transparent; color: var(--faint); font-size: 12px; font-weight: 800; padding: 6px 7px; border-radius: 999px; white-space: nowrap; }
.task-due:hover { background: var(--fill2); color: var(--ink); }
.task-due.has { background: var(--fill); color: var(--soft); }
.task-due.has.soon { background: var(--sun-soft); color: color-mix(in srgb, var(--sun) 70%, var(--ink)); }
.task-due.has.overdue { background: var(--red-soft); color: var(--red); }
.task-due.has.done { background: var(--mint-soft); color: var(--mint); }
.task-del { opacity: .45; }
.task:hover .task-del { opacity: 1; }
.task-heart { border: 0; background: transparent; color: var(--faint); font-size: 15px; padding: 5px 4px; border-radius: 999px; line-height: 1; }
.task-heart:hover { background: var(--fill); color: var(--pink); }
.task-heart.has { padding: 4px 2px; }
.task-add { display: flex; gap: 4px; margin-top: 6px; padding-left: 30px; }
.checklist .task-add input { background: var(--fill); border-style: dashed; border-color: var(--line2); }
.checklist .task-add input:focus { background: var(--surface); border-style: solid; }
.add-cl { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; }

.mc-more-toggle {
  display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 22px; padding: 12px 14px; border: 0; border-radius: 16px;
  background: var(--surface); text-align: left; font-family: var(--f-display); font-weight: 600; font-size: 16px; box-shadow: var(--shadow-sm);
}
.mc-more-toggle small { flex: 1; color: var(--soft); font-family: var(--f-body); font-weight: 700; font-size: 13px; }
.mc-more-toggle svg { transform: rotate(-90deg); transition: transform .2s; color: var(--soft); }
.mc-more-toggle.open svg { transform: rotate(90deg); }
.mc-more { animation: drop .2s ease-out; }
.mc-more > .mc-section:first-child { margin-top: 12px; }
.mc-actions { display: flex; flex-wrap: wrap; gap: 6px; }

.comment-new { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.comments { display: flex; flex-direction: column; gap: 12px; }
.comment { display: flex; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #FF8FB1, var(--kitty)); color: #fff; display: grid; place-items: center; font-family: var(--f-display); font-weight: 600; flex: none; }
.avatar.ai { background: var(--pink-soft); }
.avatar.c-blue { background: linear-gradient(135deg, #8FB6FF, var(--blue)); }
.avatar.c-mint { background: linear-gradient(135deg, #6FE0C0, var(--mint)); }
.comment-body { flex: 1; min-width: 0; }
.comment-meta { font-size: 13px; }
.comment-text { background: var(--surface); border-radius: 4px 16px 16px 16px; padding: 9px 12px; margin: 3px 0; box-shadow: var(--shadow-sm); word-break: break-word; }
.comment-links { display: flex; gap: 12px; }

/* Help me panel */
.mc-ai { background: var(--surface2); border-left: 1px solid var(--line); display: flex; flex-direction: column; max-height: calc(100dvh - 72px - var(--safe-top)); position: sticky; top: 0; }
.ai-head { display: flex; align-items: flex-start; gap: 10px; padding: 18px 16px 12px; border-bottom: 1px solid var(--line); }
.ai-head div { flex: 1; display: flex; flex-direction: column; }
.ai-head strong { font-family: var(--f-display); font-weight: 600; font-size: 18px; }
.ai-head small { color: var(--soft); font-size: 12.5px; font-weight: 600; }
.ai-thread { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; min-height: 200px; }
.ai-empty { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.ai-empty p { margin: 0 0 4px; color: var(--soft); font-size: 14px; font-weight: 600; }
.ai-empty .chip-btn { white-space: normal; text-align: left; }
.msg { display: flex; flex-direction: column; gap: 6px; max-width: 94%; animation: drop .2s ease-out; }
.msg.user { align-self: flex-end; }
.msg.ai { align-self: flex-start; }
.bubble { padding: 10px 13px; border-radius: 18px; font-size: 14.5px; word-break: break-word; }
.msg.user .bubble { background: var(--ink); color: var(--bg); border-bottom-right-radius: 6px; white-space: pre-wrap; }
.msg.ai .bubble { background: var(--surface); box-shadow: var(--shadow-sm); border-bottom-left-radius: 6px; }
.msg.ai.error .bubble { background: var(--red-soft); color: var(--red); }
.bubble a { color: var(--pink-deep); }
.thinking { display: flex; align-items: center; gap: 8px; padding: 8px 14px 8px 10px; }
@keyframes bounce { 40% { transform: translateY(-5px); opacity: .6; } }
.proposal { background: var(--surface); border: 2px solid color-mix(in srgb, var(--pink) 35%, transparent); border-radius: 18px; padding: 11px 13px; }
.proposal.applied { border-color: color-mix(in srgb, var(--mint) 45%, transparent); background: color-mix(in srgb, var(--mint-soft) 50%, var(--surface)); }
.prop-head { display: flex; gap: 6px; align-items: flex-start; font-weight: 800; font-size: 14px; margin-bottom: 8px; }
.prop-head svg { color: var(--pink); flex: none; margin-top: 2px; }
.prop-preview { font-size: 13.5px; background: var(--fill); border-radius: 12px; padding: 8px 10px; margin-bottom: 8px; max-height: 180px; overflow-y: auto; }
.prop-items { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.prop-items .check { align-items: flex-start; font-size: 13.5px; }
.prop-items .check input { margin-top: 2px; }
.applied-note { display: flex; align-items: center; gap: 6px; color: var(--mint); font-weight: 800; margin: 0; font-size: 14px; }
.msg-tools { display: flex; gap: 12px; padding-left: 4px; }
.ai-input { display: flex; align-items: flex-end; gap: 6px; padding: 10px 12px calc(12px + var(--safe-bottom)); border-top: 1px solid var(--line); background: var(--surface2); }
.ai-input textarea { resize: none; max-height: 140px; border-radius: 18px; }

/* ---------- Priority ---------- */
.priority { max-width: 860px; margin: 0 auto; padding: 22px 18px calc(60px + var(--tabbar-h)); }
.pri-head h1 { display: flex; align-items: center; gap: 10px; font-size: 32px; }
.pri-head h1 svg { width: 28px; height: 28px; color: var(--pink); }
.pri-head p { margin: 4px 0 20px; font-weight: 600; }
.pri-group { margin-bottom: 22px; }
.pri-group h2 { display: flex; align-items: baseline; gap: 8px; font-size: 19px; margin-bottom: 10px; flex-wrap: wrap; }
.pri-group h2 small { font-family: var(--f-body); font-size: 13px; font-weight: 600; color: var(--soft); }
.pri-group .count { font-family: var(--f-body); font-size: 12px; font-weight: 800; background: var(--ink); color: var(--bg); border-radius: 999px; padding: 1px 9px; }
.pri-group.overdue h2 { color: var(--red); }
.pri-group.overdue .count { background: var(--red); color: #fff; }
.pri-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border-radius: 18px;
  box-shadow: var(--shadow-sm); margin-bottom: 8px; cursor: pointer; transition: opacity .3s, transform .3s, box-shadow .15s;
}
.pri-row:hover { box-shadow: var(--shadow); }
.pri-row.overdue { box-shadow: inset 4px 0 0 var(--red), var(--shadow-sm); }
.pri-row.today { box-shadow: inset 4px 0 0 var(--sun), var(--shadow-sm); }
.pri-row.completing { opacity: .25; transform: translateX(10px) scale(.98); }
.pri-check input { width: 22px; height: 22px; accent-color: var(--mint); cursor: pointer; }
.pri-main { flex: 1; min-width: 0; }
.pri-text { font-weight: 800; word-break: break-word; }
.pri-meta { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-top: 3px; flex-wrap: wrap; }
.board-chip { background: var(--bc); color: #fff; font-weight: 800; font-size: 12px; padding: 1px 9px; border-radius: 999px; }
.pri-time { display: flex; align-items: center; gap: 5px; font-weight: 800; font-size: 13px; color: var(--soft); white-space: nowrap; }
.pri-row.overdue .pri-time { color: var(--red); }

/* ---------- Lock and who ---------- */
.lock {
  min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(circle at 20% 15%, color-mix(in srgb, var(--pink) 30%, var(--bg)), transparent 45%),
    radial-gradient(circle at 85% 85%, color-mix(in srgb, var(--lilac) 28%, var(--bg)), transparent 45%), var(--bg);
}
.lock-card { width: 100%; max-width: 390px; background: var(--surface); border-radius: 28px; padding: 30px 26px; box-shadow: var(--shadow-lg); text-align: center; animation: sheet-up .3s ease-out; }
.lock-card h1 { font-size: 30px; margin: 10px 0 4px; }
.lock-card form { text-align: left; margin-top: 18px; display: flex; flex-direction: column; gap: 4px; }
.lock-card .check { margin: 4px 0 14px; }
.lock-logo { display: grid; place-items: center; }
.who-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.who {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 10px; border-radius: 22px; border: 2px solid var(--line);
  background: var(--surface); font-size: 15px; font-weight: 800; transition: transform .15s, border-color .15s;
}
.who:hover { border-color: var(--pink); transform: translateY(-2px); }
.who small { color: var(--soft); font-size: 12px; font-weight: 600; }
.who .avatar { width: 48px; height: 48px; font-size: 20px; }

/* ---------- Toasts ---------- */
#toasts { position: fixed; left: 50%; bottom: calc(20px + var(--safe-bottom) + var(--tabbar-h)); transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; width: max-content; max-width: calc(100vw - 32px); }
.toast {
  display: flex; align-items: center; gap: 14px; background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 999px;
  box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 800; animation: rise .22s ease-out; transition: opacity .25s, transform .25s;
}
/* Long messages wrap inside the screen instead of running off the sides. */
.toast { max-width: 100%; border-radius: 24px; }
#toasts .toast { white-space: normal; } /* .toast.hearts shares the heart badge class, which never wraps */
.toast > span { min-width: 0; overflow-wrap: anywhere; }
.toast > button { flex: none; }
.toast.error { background: var(--red); color: #fff; }
.toast.hearts { background: linear-gradient(135deg, var(--pink), var(--lilac)); color: #fff; }
.toast.out { opacity: 0; transform: translateY(8px); }
.toast-undo { background: none; border: 0; color: var(--pink); font-weight: 900; padding: 0; }
.toast.hearts .toast-undo, .toast.error .toast-undo { color: #fff; text-decoration: underline; }

/* ---------- Rewards ---------- */
.hearts { display: inline-flex; align-items: center; gap: 3px; font-weight: 900; font-size: 12px; padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.hearts.h-pink { background: var(--kitty-soft); color: var(--kitty); }
.hearts.h-blue { background: var(--jo-soft); color: var(--jo); }
.hearts.h-mint { background: var(--olivia-soft); color: var(--olivia); }
.hearts.h-both { background: var(--both-soft); color: var(--both); }
.badge .hearts { font-size: 11.5px; padding: 2px 8px; }
.heart-pick { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.hp { text-align: left; border: 2px solid var(--line); background: var(--surface); border-radius: 14px; padding: 7px 12px; color: var(--pink); font-size: 16px; letter-spacing: 2px; transition: transform .1s; }
.hp:hover { transform: translateX(2px); }
.hp:first-child { color: var(--soft); font-size: 13px; letter-spacing: 0; font-weight: 800; }
.hp.on { border-color: var(--pink); background: var(--pink-soft); }
.heart-burst { position: fixed; left: 50%; bottom: calc(110px + var(--tabbar-h)); z-index: 120; pointer-events: none; width: 0; height: 0; }
.heart-burst i { position: absolute; left: var(--x); bottom: 0; color: var(--c); opacity: 0; animation: float-heart 1.3s var(--d) ease-out forwards; }
@keyframes float-heart { 0% { opacity: 0; transform: translate(-50%, 20px) scale(.4); } 25% { opacity: 1; transform: translate(-50%, 0) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -140px) scale(.9) rotate(var(--x, 0deg)); } }

.rewards-panel { background: var(--surface); border-radius: 26px; box-shadow: var(--shadow); padding: 14px; margin: 0 0 8px; }
.rewards-panel.empty { display: flex; gap: 14px; align-items: center; padding: 16px; }
.rewards-panel.empty strong { font-family: var(--f-display); font-weight: 600; font-size: 17px; }
.rewards-panel.empty p { margin: 2px 0 0; }
.rp-stats { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 10px; }
.rp-stat { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 20px; background: var(--fill); text-decoration: none; min-width: 0; }
.rp-stat.jar { color: #fff; background: radial-gradient(circle at 8% 120%, rgba(255, 255, 255, .25) 0 30%, transparent 31%), linear-gradient(140deg, #FF7AA2, var(--kitty) 55%, var(--kitty-deep)); box-shadow: 0 10px 22px color-mix(in srgb, var(--kitty) 32%, transparent); transition: transform .15s; }
.rp-stat.jar.h-blue { background: radial-gradient(circle at 8% 120%, rgba(255, 255, 255, .25) 0 30%, transparent 31%), linear-gradient(140deg, #8FB6FF, var(--blue) 60%, #3466E0); box-shadow: 0 10px 22px color-mix(in srgb, var(--blue) 32%, transparent); }
.rp-stat.jar:hover { transform: translateY(-2px); }
.rp-stat.jar .rp-label { color: rgba(255, 255, 255, .9); }
.rp-num { font-family: var(--f-display); font-size: 30px; font-weight: 600; line-height: 1.05; font-variant-numeric: tabular-nums; }
.rp-label { font-size: 12.5px; color: var(--soft); font-weight: 700; }
.rp-toggle {
  display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 10px; padding: 10px 6px 4px; border: 0; background: none;
  text-align: left; font-weight: 900; font-size: 14px; color: var(--pink-deep);
}
.rp-toggle small { flex: 1; color: var(--soft); font-weight: 700; font-size: 12.5px; }
.rp-toggle svg { transform: rotate(-90deg); transition: transform .2s; color: var(--soft); }
.rp-toggle.open svg { transform: rotate(90deg); }
.rp-expand { animation: drop .2s ease-out; }
.rp-search { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0; }
.rp-search .fp-label { min-width: 0; margin-right: 4px; }
.rp-search .chip-btn { color: var(--pink); }
.rp-search .chip-btn small { color: var(--soft); font-weight: 700; }
.rp-search .chip-btn.on { background: var(--pink); color: #fff; }
.rp-search .chip-btn.on small { color: #fff; }
.rp-jobs { display: flex; flex-direction: column; gap: 6px; }
.rp-job { display: flex; align-items: center; gap: 10px; text-align: left; border: 0; background: var(--fill); border-radius: 16px; padding: 9px 12px; transition: background .15s, transform .15s; }
.rp-job:hover { background: var(--pink-soft); transform: translateX(2px); }
.rp-job-text { display: flex; flex-direction: column; min-width: 0; }
.rp-job-text strong { font-weight: 800; font-size: 14px; }
.rp-job-text small { color: var(--soft); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-big { font-size: 34px; color: var(--pink); }

.jar-page { max-width: 900px; margin: 0 auto; padding: 22px 18px calc(60px + var(--tabbar-h)); }
.jars { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.jar-card { display: flex; flex-direction: column; gap: 2px; padding: 18px 20px; border-radius: 26px; color: #fff; position: relative; overflow: hidden; }
.jar-card::after { content: ''; position: absolute; right: -24px; top: -24px; width: 100px; height: 100px; border-radius: 50%; background: rgba(255, 255, 255, .16); }
.jar-card.h-pink { background: linear-gradient(140deg, #FF7AA2, var(--kitty) 55%, var(--kitty-deep)); }
.jar-card.h-blue { background: linear-gradient(140deg, #8FB6FF, var(--blue) 60%, #3466E0); }
.jar-card.h-mint { background: linear-gradient(140deg, #6FE0C0, var(--mint) 60%, #129A74); }
.jar-card:not(.mine) { opacity: .82; }
.jar-card.mine { box-shadow: 0 14px 28px color-mix(in srgb, var(--kitty) 30%, transparent); }
.jar-card.mine.h-blue { box-shadow: 0 14px 28px color-mix(in srgb, var(--blue) 30%, transparent); }
.jar-who { font-weight: 800; font-size: 14px; opacity: .92; }
.jar-num { font-family: var(--f-display); font-size: 40px; font-weight: 600; line-height: 1.05; }
.jar-card small { font-weight: 700; opacity: .9; }
.jar-tabs { display: flex; gap: 6px; margin: 18px 0 14px; }
.pill-tab { border: 0; background: var(--surface); padding: 9px 18px; border-radius: 999px; font-weight: 800; color: var(--soft); box-shadow: var(--shadow-sm); }
.pill-tab.on { background: var(--ink); color: var(--bg); }
.prize-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.prize { background: var(--surface); border-radius: 22px; padding: 16px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden; }
.prize::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 6px; background: linear-gradient(90deg, var(--lilac), var(--pink), var(--blue)); }
.prize.h-pink::before { background: var(--kitty); }
.prize.h-blue::before { background: var(--jo); }
.prize.h-mint::before { background: var(--olivia); }
.prize-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.prize-top strong { font-family: var(--f-display); font-weight: 600; font-size: 18px; }
.prize p { margin: 0; }
.prize-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 6px; }
.prize-for { font-size: 12px; font-weight: 800; color: var(--soft); }
.prize-tally { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--soft); }
.tally-marks { flex: none; stroke: var(--pink-deep); stroke-width: 1.8; stroke-linecap: round; fill: none; }
.tally-num { color: var(--pink-deep); font-weight: 900; }
.ledger { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.ledger-row { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 16px; padding: 10px 14px; box-shadow: var(--shadow-sm); }
.ledger-delta { font-weight: 900; min-width: 60px; }
.ledger-delta.h-pink { color: var(--kitty); }
.ledger-delta.h-blue { color: var(--jo); }
.ledger-delta.h-mint { color: var(--olivia); }
.ledger-delta.minus { opacity: .8; }
.ledger-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ledger-text small { color: var(--soft); font-size: 12px; }
.manage-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; align-items: start; }
.manage-box { background: var(--surface); border-radius: 22px; padding: 18px; box-shadow: var(--shadow-sm); }
.manage-box h3 { font-size: 18px; margin-bottom: 12px; }
.prize-admin { margin-top: 16px; display: flex; flex-direction: column; gap: 6px; }
.prize-admin-row { display: flex; align-items: center; gap: 2px; padding: 6px 4px 6px 12px; border-radius: 14px; background: var(--fill); box-shadow: inset 4px 0 0 var(--both); }
.prize-admin-row.h-pink { box-shadow: inset 4px 0 0 var(--kitty); }
.prize-admin-row.h-blue { box-shadow: inset 4px 0 0 var(--jo); }
.prize-admin-row.h-mint { box-shadow: inset 4px 0 0 var(--olivia); }

/* ---------- Home: greeting, jar, today (mock-up v2) ---------- */
.greet { display: flex; flex-direction: column; margin-bottom: 14px; }
.greet h1 { font-size: 26px; line-height: 1.1; }
.greet-sub { color: var(--soft); font-weight: 700; font-size: 14px; text-decoration: none; }
.greet-sub:hover { color: var(--ink); }
.greet-sub.late { color: var(--red); }
.home-label { display: flex; justify-content: space-between; align-items: baseline; margin: 18px 0 8px; font-family: var(--f-display); font-weight: 600; font-size: 16px; color: var(--soft); }
.home-label a, .home-label .link { font-family: var(--f-body); font-size: 13px; font-weight: 900; color: var(--pink-deep); text-decoration: none; }

/* The jar, with ears, opening in place */
.jar-home { position: relative; margin-top: 30px; max-width: 620px; --jar-a: #FF7AA2; --jar-b: var(--kitty); --jar-c: var(--kitty-deep); --jar-ear: #FF7AA2; }
.jar-home.h-blue { --jar-a: #8FB6FF; --jar-b: var(--blue); --jar-c: #3466E0; --jar-ear: #8FB6FF; }
.jar-home.h-mint { --jar-a: #6FE0C0; --jar-b: var(--mint); --jar-c: #129A74; --jar-ear: #6FE0C0; }
.jar-ears { position: absolute; top: -14px; left: 26px; display: flex; gap: 36px; pointer-events: none; }
.jar-ears i { width: 0; height: 0; border-left: 14px solid transparent; border-right: 14px solid transparent; border-bottom: 20px solid var(--jar-ear); transform-origin: 50% 100%; }
.jar-home.open .jar-ears i:first-child { animation: ear-flick .5s ease-in-out; }
.jar-home.open .jar-ears i:last-child { animation: ear-flick .5s .08s ease-in-out; }
@keyframes ear-flick { 35% { transform: rotate(-12deg); } 70% { transform: rotate(6deg); } }
.jar-shell {
  position: relative; border-radius: 24px; overflow: hidden; color: #fff;
  background: radial-gradient(circle at 8% 125%, rgba(255, 255, 255, .22) 0 32%, transparent 33%), linear-gradient(140deg, var(--jar-a), var(--jar-b) 58%, var(--jar-c));
  box-shadow: 0 12px 24px color-mix(in srgb, var(--jar-b) 30%, transparent);
}
.jar-top { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 2px 12px; align-items: end; width: 100%; padding: 16px 18px; border: 0; background: none; color: inherit; text-align: left; }
.jh-big { font-family: var(--f-display); font-weight: 600; font-size: 44px; line-height: 1; display: inline-flex; align-items: center; gap: 8px; }
.jh-big .kb-glyph { filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .12)); }
.jh-label { grid-column: 1; font-weight: 800; font-size: 13px; opacity: .95; display: inline-flex; align-items: center; gap: 4px; }
.jh-chev { display: inline-flex; transform: rotate(-90deg); transition: transform .4s cubic-bezier(.2, .9, .3, 1.3); }
.jh-chev svg { width: 14px; height: 14px; }
.jar-home.open .jh-chev { transform: rotate(90deg); }
.jh-side { grid-row: 1 / span 2; grid-column: 2; display: flex; flex-direction: column; gap: 5px; align-items: flex-end; }
.jh-side span { background: rgba(255, 255, 255, .24); padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 900; white-space: nowrap; }
.jar-drawer { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s cubic-bezier(.2, .9, .3, 1); }
.jar-home.open .jar-drawer { grid-template-rows: 1fr; }
.jar-drawer > div { overflow: hidden; }
.jar-inner { background: var(--surface); color: var(--ink); margin: 0 6px 6px; border-radius: 19px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.jar-inner .rp-job { opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s; transition-delay: calc(var(--i, 0) * 60ms + 120ms); }
.jar-home.open .jar-inner .rp-job { opacity: 1; transform: none; }
.jar-link { align-self: center; font-size: 13px; font-weight: 900; color: var(--jar-c); text-decoration: none; padding: 4px; }
.heart-chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 4px; scrollbar-width: none; }
.heart-chips::-webkit-scrollbar { display: none; }
.hchip {
  flex: none; display: inline-flex; align-items: center; gap: 2px; border: 0; background: var(--pink-soft); border-radius: 999px;
  padding: 6px 11px; font-size: 13px; font-weight: 900; color: var(--pink); transition: transform .1s, background .15s;
}
.hchip small { color: var(--soft); font-weight: 800; margin-left: 4px; }
.hchip:active { transform: scale(.96); }
.hchip.on { background: var(--ink); color: #fff; }
.hchip.on small { color: color-mix(in srgb, #fff 70%, transparent); }

/* Today */
.today { background: var(--surface); border-radius: 20px; padding: 2px 12px; box-shadow: var(--shadow-sm); max-width: 620px; }
.today .trow { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); cursor: pointer; transition: opacity .3s, transform .3s; }
.today .trow:last-child { border: 0; }
.today .trow.completing { opacity: .3; transform: translateX(10px); }
.tck { flex: none; position: relative; width: 22px; height: 22px; cursor: pointer; }
.tck input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.tck span { pointer-events: none; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--line2); transition: background .2s, border-color .2s; }
.tck input:checked + span { background: var(--mint); border-color: var(--mint); animation: tick-pop .3s ease-out; }
.tck span::after { content: ''; position: absolute; left: 6px; top: 2.5px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) scale(0); transition: transform .2s cubic-bezier(.2, .9, .3, 1.4); }
.tck input:checked + span::after { transform: rotate(45deg) scale(1); }
.tck input:focus-visible + span { outline: 2px solid var(--pink); outline-offset: 2px; }
@keyframes tick-pop { 50% { transform: scale(1.18); } }
.tck input:checked + span::after { content: ''; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.tck input:disabled + span { opacity: .4; }
.tt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tt strong { font-weight: 800; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt small { color: var(--soft); font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tw { font-size: 12px; font-weight: 800; color: var(--soft); white-space: nowrap; }
.tw.late { color: var(--red); }
.th { display: inline-flex; align-items: center; gap: 2px; color: var(--pink-deep); font-weight: 900; font-size: 12.5px; }

/* Cat heads for Kitty and Jo */
.person-cat { position: relative; display: inline-grid; place-items: center; flex: none; }
.person-cat svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.person-cat b { position: relative; z-index: 1; color: #fff; font-family: var(--f-display); font-weight: 600; font-size: 10px; margin-top: 3px; }
.person-cat + .person-cat { margin-left: -6px; }

/* Glyphs and icons */
.kb-glyph { display: inline-block; vertical-align: -2px; flex: none; }
.kb-icon { display: block; flex: none; }
.cat-loader .ear-l { animation: perk 1.4s infinite ease-in-out; transform-origin: 30% 40%; }
.cat-loader .ear-r { animation: perk 1.4s .2s infinite ease-in-out; transform-origin: 70% 40%; }
@keyframes perk { 0%, 60%, 100% { transform: rotate(0); } 20% { transform: rotate(-12deg); } 40% { transform: rotate(8deg); } }
.brand:hover .logo-mark .ear-l, .brand:active .logo-mark .ear-l { animation: twitch .5s ease-in-out; transform-origin: 30% 60%; }
.brand:hover .logo-mark .ear-r, .brand:active .logo-mark .ear-r { animation: twitch .5s .08s ease-in-out; transform-origin: 70% 60%; }
@keyframes twitch { 30% { transform: rotate(-10deg); } 60% { transform: rotate(6deg); } }

/* Pin button on a board */
.board-chips .pin-btn { color: var(--soft); }
.pin-btn:active { transform: scale(.95); }
.board-chips .pin-btn.on { background: linear-gradient(135deg, var(--bc), var(--bc2)); color: #fff; }

/* ---------- Help me build a board ---------- */
.hm-board { background: linear-gradient(140deg, var(--pink-soft), var(--lilac-soft)); border-radius: 24px; padding: 16px 18px; margin-bottom: 6px; }
.hm-head { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.hm-head div { display: flex; flex-direction: column; }
.hm-head strong { font-family: var(--f-display); font-weight: 600; font-size: 18px; }
.hm-head small { color: var(--soft); font-size: 13px; font-weight: 600; }
.hm-board textarea { min-height: 96px; resize: none; border-color: transparent; box-shadow: var(--shadow-sm); }
.or-divider { display: flex; align-items: center; gap: 12px; color: var(--soft); font-size: 13px; font-weight: 800; margin: 16px 0; }
.or-divider::before, .or-divider::after { content: ''; flex: 1; height: 2px; border-radius: 2px; background: var(--line); }
.hm-loading { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 40px 10px; text-align: center; }
.hm-loading .bubble { background: var(--surface); box-shadow: var(--shadow-sm); border-radius: 18px; }
.hm-error { background: var(--red-soft); color: var(--red); padding: 12px 14px; border-radius: 16px; font-weight: 700; }
.hm-summary { margin: -4px 0 14px; font-size: 15px; font-weight: 600; }
.hm-lists { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; margin: 2px -4px 0; padding-left: 4px; }
.hm-list { flex: 0 0 220px; background: var(--fill); border-radius: 18px; padding: 8px; display: flex; flex-direction: column; gap: 6px; align-self: flex-start; }
.hm-list-title { font-family: var(--f-display); font-weight: 600; font-size: 15px; padding: 2px 4px; }
.hm-list-title small { color: var(--soft); font-family: var(--f-body); font-weight: 700; }
.hm-card { display: flex; gap: 8px; align-items: flex-start; background: var(--surface); border-radius: 14px; padding: 8px 10px; box-shadow: var(--shadow-sm); cursor: pointer; font-size: 13.5px; font-weight: 600; }
.hm-card input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--pink); flex: none; }
.hm-card span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hm-card strong { font-weight: 800; }
.hm-card small { color: var(--soft); font-size: 12px; }
.hm-card:has(input:not(:checked)) { opacity: .45; }
.hm-dots { display: flex; gap: 3px; flex-direction: row !important; }
.hm-dots i { width: 22px; height: 6px; border-radius: 3px; display: block; }
.hm-refine { background: var(--surface); border-radius: 18px; padding: 10px 12px; box-shadow: var(--shadow-sm); margin: 6px 0 4px; display: flex; flex-direction: column; gap: 6px; }
.hm-refine textarea { resize: none; }
.meta-label { font-size: 12px; font-weight: 800; color: var(--soft); text-transform: uppercase; letter-spacing: .06em; }

/* ---------- Install ---------- */
.install-steps { margin: 4px 0 10px; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }

/* ---------- View-only card popup ---------- */
.modal-card.readonly .quick-btn:not(.flag-on):not(.hearts-btn),
.modal-card.readonly .task-add,
.modal-card.readonly .task-del,
.modal-card.readonly .cl-del,
.modal-card.readonly .add-cl,
.modal-card.readonly .comment-new,
.modal-card.readonly .comment-links,
.modal-card.readonly .thumb-actions,
.modal-card.readonly .add-thumb,
.modal-card.readonly .mc-actions,
.modal-card.readonly .mc-more .mc-section:last-child { display: none; }
.modal-card.readonly .mc-quick button,
.modal-card.readonly .task-due,
.modal-card.readonly .task-heart,
.modal-card.readonly [data-desc-edit] { pointer-events: none; }
.modal-card.readonly .desc-view.empty { display: none; }
.modal-card.readonly .task-due:not(.has), .modal-card.readonly .task-heart:not(.has) { visibility: hidden; }
.modal-card.readonly textarea, .modal-card.readonly input { cursor: default; }
.modal-card.readonly .mc-title:focus, .modal-card.readonly .task-text:focus, .modal-card.readonly .cl-title:focus { background: transparent !important; border-color: transparent !important; box-shadow: none; }

/* ---------- Help me as an overlay below 1100px ---------- */
@media (max-width: 1100px) {
  .modal-card.with-ai { grid-template-columns: 1fr; max-width: 760px; }
  .mc-ai { position: fixed; inset: 0; z-index: 70; max-height: none; border-left: 0; padding-top: var(--safe-top); animation: rise .22s ease-out; }
}

/* ---------- Phones ---------- */
@media (max-width: 700px) {
  :root { --tabbar-h: 84px; }
  body { font-size: 15.5px; }
  .topbar { padding-top: calc(8px + var(--safe-top)); padding-bottom: 8px; gap: 6px; }
  .topbar .nav a, .topbar [data-settings] { display: none; }
  .greet h1 { font-size: 24px; }
  .jh-big { font-size: 40px; }
  .home { padding-top: 14px; }
  .crumb { display: none; } /* the board header below already shows the name; keep the brand */
  .brand { font-size: 18px; }
  .install-btn span { display: none; }
  .install-btn { padding: 8px; }
  .tabbar {
    display: flex; position: fixed; z-index: 40; left: 12px; right: 12px; bottom: calc(10px + var(--safe-bottom));
    background: var(--navbar); border-radius: 26px; padding: 8px 6px; justify-content: space-around; box-shadow: var(--shadow-lg);
  }
  .tabbar a, .tabbar button {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; position: relative; padding: 5px 0; border: 0; background: none;
    color: var(--navbar-ink); text-decoration: none; font-size: 11px; font-weight: 800; border-radius: 18px; transition: color .15s, background .15s;
  }
  .tabbar svg { width: 20px; height: 20px; }
  .tabbar .on { color: #fff; background: rgba(255, 255, 255, .1); }
  .tabbar .on::before, .tabbar .on::after { content: ''; position: absolute; top: -7px; width: 0; height: 0; border-left: 7px solid transparent; border-right: 7px solid transparent; border-bottom: 9px solid rgba(255, 255, 255, .1); }
  .tabbar .on::before { left: 22%; } .tabbar .on::after { right: 22%; }
  .tb-heart { font-size: 18px; line-height: 20px; color: #FF8FB1; }
  .tb-heart.c-blue { color: #8FB6FF; }
  .tb-heart.c-mint { color: #6FE0C0; }
  .tb-heart.c-sun { color: #FFD08A; }
  .tb-count { position: absolute; top: 0; left: 55%; background: var(--pink); color: #fff; font-size: 10px; padding: 0 6px; border-radius: 999px; line-height: 16px; }
  .home-hero h1, .pri-head h1 { font-size: 27px; }
  .board-grid { grid-template-columns: 1fr 1fr; gap: 22px 10px; }
  .board-tile { min-height: 132px; border-radius: 20px; padding: 11px; }
  .bt-title { font-size: 15px; }
  .bt-meta { font-size: 11.5px; }
  .board-bar { padding: 8px 12px; }
  .board-title { font-size: 19px; max-width: calc(100vw - 130px); }
  .board-chips { width: 100%; margin-left: 0; }
  .board-chips .menu-chip { margin-left: auto; }
  .pill { padding: 7px 12px; font-size: 13px; }
  .lists { scroll-snap-type: x proximity; padding: 4px 12px 16px; gap: 10px; }
  .list { flex-basis: 84vw; scroll-snap-align: start; }
  .fp-label { min-width: 100%; }
  .filter-panel { margin: 0 12px 8px; }
  .overlay { padding: 0; }
  #modal { padding-top: 0; }
  .modal-card { border-radius: 0; min-height: 100dvh; margin: 0; }
  .modal-card.entering { animation: sheet-up-phone .3s cubic-bezier(.2, .9, .3, 1); }
  .mc-main { padding: 0 16px calc(30px + var(--safe-bottom)); }
  .mc-head { padding-top: calc(12px + var(--safe-top)); position: sticky; top: 0; background: var(--surface); z-index: 2; margin: 0 -16px; padding-left: 16px; padding-right: 10px; }
  .mc-cover { margin: 0 -16px 8px; }
  .mc-title { font-size: 21px; }
  .sheet-card { border-radius: 0; min-height: 100dvh; padding: calc(16px + var(--safe-top)) 16px calc(24px + var(--safe-bottom)); }
  .sheet-foot { bottom: 0; margin: 0 -16px calc(-24px - var(--safe-bottom)); padding-left: 16px; padding-right: 16px; }
  .preset-grid { grid-template-columns: 1fr; }
  .icon-btn { width: 40px; height: 40px; }
  .task-del { opacity: .8; }
  .rp-stats { grid-template-columns: 1fr 1fr; }
  .rp-stat.jar { grid-column: 1 / -1; flex-direction: row; align-items: baseline; gap: 10px; }
  .rp-num { font-size: 24px; }
  .rp-stat.jar .rp-num { font-size: 34px; }
  .manage-grid { grid-template-columns: 1fr; }
  .jar-num { font-size: 32px; }
  .hm-list { flex-basis: 78vw; }
  .pri-row { padding: 11px 12px; gap: 10px; align-items: flex-start; }
  .pri-time { font-size: 12px; }
}
@keyframes sheet-up-phone { from { transform: translateY(40%); opacity: .4; } }
@media (max-width: 380px) {
  .who-choices { grid-template-columns: 1fr; }
  .who-choices.three { grid-template-columns: repeat(3, 1fr); }
}
/* Nudges: paw prints, gentle wiggles and a 24-hour countdown */
.nudge-pop { display: flex; flex-direction: column; gap: 10px; }
.nudge-jobs { display: flex; flex-direction: column; gap: 4px; max-height: 240px; overflow-y: auto; margin: -2px -4px 0; padding: 2px 4px; }
.nudge-job { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: var(--fill); cursor: pointer; transition: background .15s, transform .1s; }
.nudge-job:active { transform: scale(.98); }
.nudge-job input { position: absolute; opacity: 0; pointer-events: none; }
.nj-box { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line2); color: transparent; background: var(--surface); transition: background .2s, border-color .2s, color .2s; }
.nudge-job input:checked + .nj-box { background: var(--lilac); border-color: var(--lilac); color: #fff; animation: paw-tap .4s ease-in-out; }
.nudge-job:has(input:checked) { background: var(--lilac-soft); }
.nudge-job input:focus-visible + .nj-box { outline: 2px solid var(--lilac); outline-offset: 2px; }
.nj-text { flex: 1; min-width: 0; font-weight: 700; font-size: 14px; display: flex; flex-direction: column; }
.nj-text small { font-size: 11.5px; color: var(--soft); font-weight: 800; }
.nudge-job.whole .nj-text { font-style: italic; }
.nudge-job.off { opacity: .55; cursor: default; }
.nj-hearts { flex: none; display: inline-flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 900; color: var(--pink); }
.nb-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--lilac); color: #fff; font-size: 11px; font-weight: 900; }
.double-toggle { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 14px; background: linear-gradient(120deg, var(--pink-soft), var(--lilac-soft)); font-weight: 800; font-size: 13.5px; cursor: pointer; }
.double-toggle span { display: inline-flex; align-items: center; gap: 5px; }
.double-toggle .kb-glyph { color: var(--sun); }
.double-toggle.off { opacity: .55; cursor: default; }
.nudge-send { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.nudge-btn .kb-glyph, .task-nudge .kb-glyph { color: var(--lilac); }
.nudge-btn.nudged { background: var(--lilac-soft); color: var(--lilac); }
.nudge-btn:hover .kb-glyph { animation: paw-tap .5s ease-in-out; }
.task-nudge { display: inline-flex; align-items: center; gap: 2px; border: 0; background: var(--lilac-soft); color: var(--lilac); padding: 4px 7px; margin-top: 3px; border-radius: 999px; font-size: 11px; font-weight: 900; line-height: 1; }
.task-nudge.double { background: linear-gradient(120deg, var(--pink-soft), var(--lilac-soft)); }
.task-nudge.nudged .kb-glyph { animation: nudge-wiggle 2.8s ease-in-out infinite; }
@keyframes paw-tap { 40% { transform: translateY(-3px) rotate(-12deg); } 70% { transform: translateY(1px) rotate(6deg); } }
@keyframes nudge-wiggle { 0%, 82%, 100% { transform: rotate(0); } 86% { transform: rotate(-14deg); } 90% { transform: rotate(10deg); } 94% { transform: rotate(-6deg); } }

.nudge-banner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 10px 0 0; padding: 10px 12px; border-radius: 16px;
  background: linear-gradient(120deg, var(--lilac-soft), var(--pink-soft)); animation: drop .35s ease-out;
}
.nb-paw { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--surface); color: var(--lilac); animation: nudge-wiggle 2.8s 1s ease-in-out infinite; }
.nb-text { flex: 1 1 60%; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.nb-text strong { font-size: 13.5px; }
.nb-text small { color: var(--soft); font-size: 12px; overflow-wrap: anywhere; }
.nudge-banner .nb-double { margin-left: 44px; }
.nudge-banner .link { margin-left: auto; }
.nb-double, .t-left.double { display: inline-flex; align-items: center; gap: 3px; flex: none; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 900; color: #fff; background: linear-gradient(120deg, var(--pink), var(--lilac)); }

.today.nudges { background: linear-gradient(120deg, var(--surface), color-mix(in srgb, var(--lilac-soft) 60%, var(--surface))); }
.today .trow.nudged { animation: drop .35s calc(var(--i, 0) * 70ms) ease-out both; }
.t-paw { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--lilac-soft); color: var(--lilac); animation: nudge-wiggle 3.2s ease-in-out infinite; }
.today .trow.nudged:nth-child(2) .t-paw { animation-delay: .6s; }
.today .trow.nudged:nth-child(3) .t-paw { animation-delay: 1.2s; }
.t-left { flex: none; font-size: 11.5px; font-weight: 900; color: var(--lilac); white-space: nowrap; }

.bt-nudge { display: grid; place-items: center; width: 26px; height: 26px; margin: 7px auto 0 6px; border-radius: 50%; background: rgba(255, 255, 255, .94); color: #A67CFF; box-shadow: 0 3px 8px rgba(0, 0, 0, .1); animation: nudge-wiggle 3s ease-in-out infinite; }

.paw-burst { position: fixed; z-index: 130; width: 0; height: 0; pointer-events: none; }
.paw-burst i { position: absolute; left: 0; top: 0; color: var(--lilac); opacity: 0; animation: paw-step .9s calc(var(--i) * .16s) ease-out forwards; }
.paw-burst i:nth-child(2) { color: var(--pink); }
@keyframes paw-step {
  0% { opacity: 0; transform: translate(-50%, 0) scale(.5); }
  30% { opacity: 1; transform: translate(calc(-50% + (var(--i) - 1) * 14px), calc(-18px - var(--i) * 16px)) rotate(calc((var(--i) - 1) * 18deg)) scale(1.1); }
  100% { opacity: 0; transform: translate(calc(-50% + (var(--i) - 1) * 14px), calc(-30px - var(--i) * 18px)) rotate(calc((var(--i) - 1) * 18deg)); }
}
.heart-burst.double i { animation-duration: 1.6s; }
.heart-burst.double i:nth-child(n+6) { bottom: 30px; }

/* Double-heart boost */
.boost-card {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin: 14px 0 4px; padding: 12px 14px; border-radius: 20px;
  background: var(--surface); box-shadow: var(--shadow-sm); border: 2px dashed var(--line2);
}
.boost-card.on, .boost-card.soon { border: 0; color: #fff; background: linear-gradient(120deg, var(--pink), var(--lilac) 55%, var(--blue)); background-size: 200% 100%; animation: shimmer 6s ease-in-out infinite; }
.boost-card.soon { opacity: .92; animation: none; }
.boost-glyph { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--sun-soft); color: var(--sun); }
.boost-card.on .boost-glyph { background: rgba(255, 255, 255, .25); color: #fff; animation: twinkle 1.8s ease-in-out infinite; }
.boost-text { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 2px; }
.boost-text strong { font-family: var(--f-display); font-weight: 600; font-size: 16px; }
.boost-text small { font-size: 12.5px; opacity: .85; }
.boost-card:not(.on):not(.soon) .boost-text small { color: var(--soft); opacity: 1; }
.boost-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.boost-card.on .btn.ghost, .boost-card.soon .btn.ghost { color: #fff; background: rgba(255, 255, 255, .2); }
@keyframes shimmer { 50% { background-position: 100% 0; } }
@keyframes pill-bob { 0%, 100% { transform: rotate(-4deg); } 50% { transform: translateY(-3px) rotate(3deg); } }
@keyframes twinkle { 50% { transform: scale(1.12) rotate(14deg); } }

.boost-pill {
  position: absolute; top: -10px; right: 14px; z-index: 2; display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px;
  background: var(--sun); color: #2B2236; font-size: 12px; font-weight: 900; text-decoration: none; box-shadow: 0 4px 10px rgba(0, 0, 0, .12); animation: pill-bob 2.4s ease-in-out infinite;
}
.boost-sparkles { position: absolute; inset: 0 0 auto 0; height: 96px; z-index: 1; pointer-events: none; border-radius: 24px; overflow: hidden; }
.boost-sparkles i { position: absolute; width: 7px; height: 7px; background: #fff; border-radius: 2px; transform: rotate(45deg) scale(0); animation: sparkle 2.6s ease-in-out infinite; }
.boost-sparkles i:nth-child(1) { left: 42%; top: 18%; }
.boost-sparkles i:nth-child(2) { left: 64%; top: 62%; animation-delay: .7s; }
.boost-sparkles i:nth-child(3) { left: 24%; top: 70%; animation-delay: 1.3s; }
.boost-sparkles i:nth-child(4) { left: 80%; top: 26%; animation-delay: 1.9s; }
@keyframes sparkle { 0%, 100% { transform: rotate(45deg) scale(0); opacity: 0; } 50% { transform: rotate(45deg) scale(1); opacity: .9; } }
.jar-home.boosted .jar-shell { background: radial-gradient(circle at 8% 125%, rgba(255, 255, 255, .22) 0 32%, transparent 33%), linear-gradient(140deg, var(--jar-a), var(--jar-b) 45%, var(--lilac) 75%, var(--jar-c)); background-size: 100% 100%, 220% 100%; animation: shimmer 7s ease-in-out infinite; }

/* Card popup tidy: one swipeable row of quick actions, round task ticks, centred task rows */
.mc-quick { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 4px -24px 6px; padding: 2px 24px 4px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 24px), transparent); }
.mc-quick::-webkit-scrollbar { display: none; }
.mc-quick > * { flex: none; }
.mc-quick .quick-btn { height: 34px; }
.mc-tck { width: 26px; height: 26px; margin-top: 7px; }
.mc-tck span::after { left: 8px; top: 4px; width: 6px; height: 11px; }
.task { align-items: center; gap: 8px; padding: 2px 4px; }
.task-tck { width: 22px; height: 22px; }
.task-text { padding: 6px 4px !important; }
.task-del { width: 32px; height: 32px; opacity: .35; }
.task-del svg { width: 15px; height: 15px; }
.task-due { padding: 6px; }
.task-heart { padding: 4px; }
.task-add { padding-left: 34px; }
.cl-head svg:first-child { color: var(--soft); flex: none; }
.cl-head { gap: 4px; }
.progress { margin: 2px 0 6px; }
@media (max-width: 700px) {
  /* iOS zooms into any field under 16px and stays zoomed, cropping the screen */
  input:not([type=checkbox]):not([type=radio]), textarea, select { font-size: max(16px, 1em); }
  .mc-quick { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
  .task-del { opacity: .5; }
}

/* Card ticks: done cards fade, strike through and sink to the bottom of the list */
.card-row { display: flex; align-items: flex-start; gap: 9px; }
.card-body { flex: 1; min-width: 0; }
.card-tck { margin-top: 1px; }
.card-tck input:disabled { cursor: default; }
.card.done { opacity: .62; }
.card.done .card-title { text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: color-mix(in srgb, var(--mint) 70%, transparent); color: var(--soft); }
.card.done:hover { opacity: .9; }
.card.ticking { animation: card-done .42s ease-in forwards; }
.card.ticking .card-title { text-decoration: line-through; text-decoration-color: var(--mint); }
@keyframes card-done { 30% { transform: scale(1.03); box-shadow: 0 0 0 3px color-mix(in srgb, var(--mint) 45%, transparent); } 100% { transform: translateY(14px) scale(.97); opacity: .4; } }
.done-hidden { display: flex; align-items: center; gap: 5px; margin: 2px 12px 6px; font-size: 12.5px; color: var(--soft); }
.done-hidden svg { width: 14px; height: 14px; color: var(--mint); }
.tick-q { margin: 0 0 12px; font-weight: 700; }
.tick-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.tick-btns .btn { flex: 1; justify-content: center; display: inline-flex; align-items: center; gap: 5px; }
.tick-btns svg { width: 15px; height: 15px; }
.toast-action { margin-right: 12px; }

/* Today on home: opens and closes in place like the jar */
.today-toggle { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.today-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--fill2); color: var(--soft); font-family: var(--f-body); font-size: 11.5px; font-weight: 900; }
.today-toggle .jh-chev svg { width: 14px; height: 14px; }
.today-wrap.open .jh-chev { transform: rotate(90deg); }
.today-wrap.open .today-drawer { grid-template-rows: 1fr; }
.today-drawer .today { margin-bottom: 2px; }
.today-wrap .today .trow { transition: opacity .3s, transform .3s; }
.today-wrap:not(.open) .today .trow { opacity: 0; transform: translateY(-6px); }

.share-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.share-who { display: inline-flex; align-items: center; gap: 6px; font-weight: 900; }

/* A nudged task glows; with double hearts the heart pulses and the countdown shows */
.task.nudged-task { background: color-mix(in srgb, var(--lilac-soft) 70%, transparent); box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--lilac) 45%, transparent); animation: nudge-glow 2.4s ease-in-out infinite; }
.task.nudged-task.double { background: linear-gradient(110deg, color-mix(in srgb, var(--pink-soft) 85%, transparent), color-mix(in srgb, var(--lilac-soft) 85%, transparent)); box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--pink) 50%, transparent); animation: nudge-glow-double 1.8s ease-in-out infinite; }
@keyframes nudge-glow { 50% { box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--lilac) 60%, transparent), 0 0 16px 2px color-mix(in srgb, var(--lilac) 35%, transparent); } }
@keyframes nudge-glow-double { 50% { box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--pink) 70%, transparent), 0 0 18px 3px color-mix(in srgb, var(--pink) 38%, transparent); } }
.task-nudge { gap: 4px; }
.task-nudge.double { background: linear-gradient(120deg, var(--pink), var(--lilac)); color: #fff; }
.task-nudge.double .kb-glyph { color: #fff; }
.tn-heart { display: inline-flex; animation: heart-beat 1.1s ease-in-out infinite; }
.task-nudge.nudged .tn-heart .kb-glyph { animation: none; }
.tn-left { font-weight: 800; opacity: .9; }
@keyframes heart-beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.3); } 30% { transform: scale(.95); } 45% { transform: scale(1.18); } 60% { transform: scale(1); } }

/* Kitty's OK for Olivia's hearts */
.approvals { max-width: 620px; margin: 14px 0 4px; padding: 12px; border-radius: 20px; background: linear-gradient(120deg, var(--mint-soft), var(--surface)); box-shadow: var(--shadow-sm); }
.ap-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.ap-head strong { flex: 1; font-family: var(--f-display); font-weight: 600; font-size: 16px; }
.ap-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); animation: drop .3s calc(var(--i, 0) * 60ms) ease-out both; }
.ap-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ap-text small { color: var(--soft); font-size: 12px; }
.ap-row .btn { display: inline-flex; align-items: center; gap: 4px; }
.ap-row .btn svg { width: 14px; height: 14px; }
.jars.three { grid-template-columns: repeat(3, 1fr); }
.jars.one { grid-template-columns: 1fr; }
@media (max-width: 700px) { .jars.three { grid-template-columns: 1fr 1fr; } .jars.three .jar-card.mine { grid-column: 1 / -1; } }

/* Who's using this + PIN pad */
.who-choices.three { grid-template-columns: repeat(3, 1fr); }
.who-choices.three .who { flex-direction: column; align-items: center; gap: 8px; padding: 16px 8px; }
.who .person-cat b { font-size: 18px; }
.pin-card { text-align: center; }
.pin-cat { display: flex; justify-content: center; margin-bottom: 6px; }
.pin-cat .person-cat b { font-size: 24px; }
.who-choices.three .person-cat b { font-size: 17px; }
.pin-card.wrong .pin-cat { animation: head-shake .5s ease-in-out; }
.pin-card.ok .pin-cat { animation: tick-pop .3s ease-out; }
@keyframes head-shake { 20% { transform: rotate(-12deg); } 40% { transform: rotate(10deg); } 60% { transform: rotate(-7deg); } 80% { transform: rotate(4deg); } }
.pin-dots { display: flex; justify-content: center; gap: 14px; margin: 14px 0 18px; }
.pin-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line2); transition: background .15s, border-color .15s, transform .15s; }
.pin-dots i.on { background: var(--pink); border-color: var(--pink); transform: scale(1.1); }
.pin-card.wrong .pin-dots i { background: var(--red); border-color: var(--red); }
.pin-card.ok .pin-dots i { background: var(--mint); border-color: var(--mint); }
.pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 270px; margin: 0 auto; }
.pin-key { height: 58px; border: 0; border-radius: 18px; background: var(--fill); font-family: var(--f-display); font-size: 24px; font-weight: 600; color: var(--ink); transition: transform .08s, background .15s; }
.pin-key:active { transform: scale(.93); background: var(--pink-soft); }
.pin-key.ghost { background: transparent; font-family: var(--f-body); font-size: 14px; font-weight: 800; color: var(--soft); display: grid; place-items: center; }
.pin-key.ghost svg { width: 22px; height: 22px; }

/* Nudged cards on a board, and the card tick in the popup for whole-card nudges */
.card.nudged-card { border-color: color-mix(in srgb, var(--lilac) 55%, transparent); animation: nudge-glow 2.4s ease-in-out infinite; }
.card.nudged-card.double { border-color: color-mix(in srgb, var(--pink) 60%, transparent); background: linear-gradient(115deg, var(--surface) 55%, color-mix(in srgb, var(--pink-soft) 80%, var(--surface))); animation: nudge-glow-double 1.8s ease-in-out infinite; }
.badges .task-nudge { margin-top: 0; padding: 3px 8px; }
.mc-tck.nudged span { border-color: var(--lilac); animation: tick-pulse 1.8s ease-in-out infinite; }
.mc-tck.nudged.double span { border-color: var(--pink); }
@keyframes tick-pulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--pink) 25%, transparent), 0 0 14px 2px color-mix(in srgb, var(--pink) 35%, transparent); } }

/* Product sign-in and the "sun" person colour (pink, blue and mint already exist) */
.signin .code-input { font-family: var(--f-display); font-size: 26px !important; letter-spacing: .3em; text-align: center; }
.colour-pick { display: flex; gap: 12px; justify-content: center; padding: 4px 0; }
.colour-dot { width: 40px; height: 40px; border-radius: 50%; border: 3px solid transparent; transition: transform .15s, border-color .15s; }
.colour-dot.c-pink { background: var(--kitty); }
.colour-dot.c-blue { background: var(--blue); }
.colour-dot.c-mint { background: var(--mint); }
.colour-dot.c-sun { background: var(--sun); }
.colour-dot.on { border-color: var(--ink); transform: scale(1.12); }
.welcome-cat { display: flex; justify-content: center; margin: 4px 0 10px; }
.hearts.h-sun { background: var(--sun-soft); color: color-mix(in srgb, var(--sun) 75%, var(--ink)); }
.chip-btn.for-sun.on { background: var(--sun); color: #2B2236; }
.jar-card.h-sun { background: linear-gradient(140deg, #FFD08A, var(--sun) 60%, #E89A2A); }
.jar-home.h-sun { --jar-a: #FFD08A; --jar-b: var(--sun); --jar-c: #E89A2A; --jar-ear: #FFD08A; }
.prize.h-sun::before { background: var(--sun); }
.ledger-delta.h-sun { color: color-mix(in srgb, var(--sun) 75%, var(--ink)); }
.prize-admin-row.h-sun { box-shadow: inset 4px 0 0 var(--sun); }
.nav .heart-count.c-sun { background: var(--sun); color: #2B2236; }
.avatar.c-sun { background: linear-gradient(135deg, #FFD08A, var(--sun)); }

.invited { background: var(--pink-soft); color: var(--pink-deep); border-radius: 14px; padding: 10px 12px; font-weight: 800; }
.people-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.person-row { display: flex; align-items: center; gap: 10px; }
.person-row small { display: block; }
.invite-out { margin: 12px 0; padding: 12px; border-radius: 16px; background: var(--fill); }
.invite-code { font-family: var(--f-display); font-size: 28px; letter-spacing: .18em; text-align: center; color: var(--pink-deep); margin: 6px 0 10px; user-select: all; }
.join-form { margin-top: 12px; }

.lock-card.wrong { animation: head-shake .5s ease-in-out; }
.kid-out { margin: 4px 0 12px; padding: 12px; border-radius: 16px; background: var(--mint-soft); }
.child-form { margin-top: 12px; padding: 12px; border-radius: 16px; background: var(--fill); }
.person-row .btn.small { flex: none; }

/* Upgrade to Family */
.upgrade-hero { position: relative; display: grid; place-items: center; width: 92px; height: 92px; margin: 6px auto 14px; border-radius: 28px; background: linear-gradient(140deg, #FF7AA2, var(--pink) 55%, var(--lilac)); color: #fff; animation: twinkle 2.6s ease-in-out infinite; }
.upgrade-ears { position: absolute; top: -12px; left: 14px; display: flex; gap: 30px; }
.upgrade-ears i { width: 0; height: 0; border-left: 12px solid transparent; border-right: 12px solid transparent; border-bottom: 17px solid #FF7AA2; }
.perks { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-direction: column; gap: 10px; }
.perks li { display: flex; align-items: center; gap: 10px; font-weight: 800; animation: drop .35s calc(var(--i) * 70ms) ease-out both; }
.perks li .kb-glyph { color: var(--pink); flex: none; }
.prices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.price { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 8px; border-radius: 18px; background: var(--fill); text-align: center; }
.price.best { background: var(--pink-soft); box-shadow: inset 0 0 0 2px var(--pink); }
.price small { color: var(--pink-deep); font-weight: 900; }
/* ---------- Kids suggest prizes ---------- */
.approvals.suggestions { background: linear-gradient(120deg, var(--lilac-soft), var(--surface)); }
.sg-spark { color: var(--sun); display: inline-flex; animation: twinkle 2.4s ease-in-out infinite; }
.sg-row { flex-wrap: wrap; }
.sg-cost { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 9px; border-radius: 999px; background: var(--pink-soft); color: var(--pink-deep); }
.approvals .sg-cost input[name=cost][type=number] { width: 52px; border: 0; border-radius: 999px; background: transparent; font-weight: 900; padding: 4px 2px; color: var(--pink-deep); box-shadow: none; }
.approvals .sg-cost input[name=cost][type=number]:focus { outline: none; box-shadow: none; }
.sg-cost:focus-within { box-shadow: 0 0 0 2px var(--pink); }
.suggest-box { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.suggest-btn { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; background: linear-gradient(120deg, var(--lilac-soft), var(--pink-soft)); color: var(--ink); font-weight: 900; border: 2px dashed color-mix(in srgb, var(--lilac) 55%, transparent); }
.suggest-btn .kb-glyph, .sb-title .kb-glyph { color: var(--sun); }
.suggest-form { width: 100%; max-width: 420px; padding: 14px; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 6px; animation: pop .25s ease-out; }
.sb-title { display: inline-flex; align-items: center; gap: 6px; font-family: var(--f-display); font-weight: 600; font-size: 17px; }
.my-ideas { display: flex; flex-wrap: wrap; gap: 8px; }
.idea { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); border: 2px dashed var(--line2); animation: drop .3s calc(var(--i, 0) * 60ms) ease-out both; }
.idea-wait { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 800; color: var(--lilac); }
.idea-wait .kb-glyph { animation: wait-pulse 1.8s ease-in-out infinite; }

/* ---------- Asking for help (a raised paw, mint and sun, so it never looks like a nudge) ---------- */
.help-btn .kb-glyph { color: var(--mint); }
.help-btn:hover .kb-glyph { animation: paw-wave .6s ease-in-out; }
.help-banner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 10px 0 0; padding: 10px 12px; border-radius: 16px;
  background: linear-gradient(120deg, var(--mint-soft), var(--sun-soft)); animation: drop .35s ease-out;
}
.help-banner.accepted { background: linear-gradient(120deg, var(--mint-soft), var(--surface)); }
.hb-paw { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--surface); color: var(--mint); transform-origin: 50% 90%; animation: paw-wave 2.6s 0.6s ease-in-out infinite; }
.help-banner.accepted .hb-paw { animation: none; }
.hb-btns { display: flex; gap: 6px; margin-left: auto; }
.help-banner .link { margin-left: auto; }
.task-help { display: inline-grid; place-items: center; width: 24px; height: 22px; margin-top: 3px; border-radius: 999px; background: var(--sun-soft); color: color-mix(in srgb, var(--sun) 70%, var(--ink)); flex: none; }
.task-help .kb-glyph { transform-origin: 50% 90%; animation: paw-wave 2.6s ease-in-out infinite; }
.task-help.accepted { background: var(--mint-soft); color: var(--mint); }
.task-help.accepted .kb-glyph { animation: none; }
.badge.help-pill { background: var(--sun-soft); color: color-mix(in srgb, var(--sun) 70%, var(--ink)); }
.badge.help-pill.accepted { background: var(--mint-soft); color: var(--mint); }
.today .trow.help-ask .t-help { background: var(--sun-soft); color: color-mix(in srgb, var(--sun) 70%, var(--ink)); transform-origin: 50% 90%; animation: paw-wave 2.6s ease-in-out infinite; }
.today .trow.help-ask.accepted .t-help { background: var(--mint-soft); color: var(--mint); animation: none; }
.help-go { flex: none; padding: 5px 11px; }
.today .trow.help-ask .tt strong, .today .trow.help-ask .tt small { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 520px) {
  .sg-row .ap-text { flex-basis: 100%; }
  .sg-row .sg-cost { margin-right: auto; }
}
.help-x { flex: none; width: 28px; height: 28px; color: var(--soft); }
.t-otw { color: var(--mint); }
.bt-help { color: #E89A2A; }
.help-job input:checked + .nj-box { background: var(--mint); border-color: var(--mint); color: #fff; animation: paw-wave .5s ease-in-out; }
.help-job:has(input:checked) { background: var(--mint-soft); }
@keyframes paw-wave { 0%, 70%, 100% { transform: rotate(0); } 78% { transform: rotate(-16deg) translateY(-2px); } 86% { transform: rotate(12deg); } 93% { transform: rotate(-6deg); } }

/* ---------- A child's jar: waiting hearts pulse, new hearts drop in, approvals get a sticker ---------- */
.wait-hearts { display: inline-flex; align-items: center; gap: 2px; }
.wait-hearts i { display: inline-flex; animation: wait-pulse 1.8s calc(var(--i, 0) * .22s) ease-in-out infinite; opacity: .75; }
@keyframes wait-pulse { 0%, 100% { transform: scale(.85); opacity: .55; } 50% { transform: scale(1.12); opacity: 1; } }
.jar-drops { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.jar-drops i { position: absolute; top: -30px; left: var(--x); color: #fff; opacity: 0; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .15)); animation: heart-drop 1.3s var(--d) cubic-bezier(.5, 0, .6, 1.4) forwards; }
@keyframes heart-drop { 0% { opacity: 0; transform: translateY(0) rotate(var(--r)); } 15% { opacity: 1; } 70% { opacity: 1; transform: translateY(62px) rotate(0); } 85% { transform: translateY(56px) scale(1.15, .85); } 100% { opacity: 0; transform: translateY(64px) scale(.6); } }
.jar-home.filling .jar-shell { animation: jar-gulp .5s 1s ease-in-out 2; }
.jar-home.filling .jar-ears i:first-child { animation: ear-flick .5s .9s ease-in-out 2; }
.jar-home.filling .jar-ears i:last-child { animation: ear-flick .5s 1s ease-in-out 2; }
.jar-home.filling .jh-big { animation: tick-pop .4s 1.1s ease-out 2; }
@keyframes jar-gulp { 50% { transform: scale(1.025, .975); } }

.kid-joy { position: fixed; inset: 0; z-index: 130; display: grid; place-items: center; padding: 24px; background: color-mix(in srgb, var(--overlay) 55%, transparent); animation: joy-in .25s ease-out; transition: opacity .3s; }
.kid-joy.out { opacity: 0; }
@keyframes joy-in { from { opacity: 0; } }
.kj-sticker {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; width: min(300px, 86vw); padding: 26px 22px 20px; border: 6px solid #fff; border-radius: 34px;
  background: radial-gradient(circle at 20% 15%, rgba(255, 255, 255, .5) 0 18%, transparent 19%), linear-gradient(150deg, var(--pink-soft), var(--lilac-soft) 55%, var(--mint-soft));
  box-shadow: 0 0 0 2px var(--line2), var(--shadow-lg); color: var(--ink); font: inherit; cursor: pointer; transform: rotate(-4deg);
  animation: sticker-slap .6s cubic-bezier(.2, 1.6, .4, 1) both;
}
.kj-ears { position: absolute; top: -26px; left: 0; right: 0; display: flex; justify-content: space-between; padding: 0 44px; pointer-events: none; }
.kj-ears i { width: 0; height: 0; border-left: 20px solid transparent; border-right: 20px solid transparent; border-bottom: 28px solid #fff; transform-origin: 50% 100%; animation: ear-flick .5s .55s ease-in-out 2; }
.kj-cat { display: inline-flex; margin-top: -6px; animation: cat-bounce .9s .5s ease-in-out 3; transform-origin: 50% 100%; }
.kj-cat .happy-cat { filter: drop-shadow(0 6px 8px rgba(43, 34, 54, .18)); }
.kj-title { font-family: var(--f-display); font-weight: 600; font-size: 26px; line-height: 1.1; margin-top: 6px; }
.kj-hearts { display: inline-flex; align-items: center; gap: 6px; font-family: var(--f-display); font-weight: 600; font-size: 36px; color: var(--pink); }
.kj-hearts .kb-glyph { animation: heart-beat 1.2s .7s ease-in-out 2; }
.kj-what { color: var(--soft); font-weight: 800; font-size: 13px; text-align: center; overflow-wrap: anywhere; }
.kj-confetti { position: absolute; left: 50%; top: 42%; width: 0; height: 0; pointer-events: none; }
.kj-confetti i { position: absolute; color: var(--c); opacity: 0; animation: confetti-pop 1.6s var(--d) cubic-bezier(.1, .7, .3, 1) forwards; }
@keyframes sticker-slap { 0% { opacity: 0; transform: scale(1.6) rotate(8deg); } 60% { opacity: 1; transform: scale(.94) rotate(-6deg); } 100% { transform: scale(1) rotate(-4deg); } }
@keyframes cat-bounce { 0%, 100% { transform: translateY(0) scale(1); } 30% { transform: translateY(-16px) scale(.96, 1.05); } 55% { transform: translateY(0) scale(1.08, .92); } 75% { transform: translateY(-5px); } }
@keyframes confetti-pop { 0% { opacity: 0; transform: translate(0, 0) scale(.3); } 12% { opacity: 1; } 40% { opacity: 1; transform: translate(calc(var(--x) * .35), -20vh) rotate(calc(var(--r) * .4)) scale(1.1); } 100% { opacity: 0; transform: translate(calc(var(--x) * .5), 38vh) rotate(var(--r)) scale(1); } }
/* ---------- Sign-up story and steps (product), tips and the help guide ---------- */
.ob-steps { display: flex; justify-content: center; gap: 6px; margin: 10px 0 14px; }
.ob-steps i { width: 22px; height: 6px; border-radius: 3px; background: var(--line2); transition: width .3s, background .3s; }
.ob-steps i.done { background: color-mix(in srgb, var(--pink) 45%, var(--line2)); }
.ob-steps i.on { width: 38px; background: var(--pink); }

.story-wrap { grid-template-columns: minmax(0, 1fr); justify-items: center; }
.story { max-width: 420px; padding: 18px 22px 20px; }
.story-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.story-brand { display: inline-flex; align-items: center; gap: 8px; font-family: var(--f-display); font-weight: 600; font-size: 18px; }
.story-view { overflow: hidden; touch-action: pan-y; border-radius: 24px; outline: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.story-view:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--pink) 40%, transparent); }
.story-track { display: flex; transition: transform .45s cubic-bezier(.2, .9, .3, 1); }
.story-track.dragging { transition: none; cursor: grabbing; }
.story-slide { flex: 0 0 100%; padding: 0 2px 4px; text-align: center; }
.story-art {
  border-radius: 24px; padding: 10px; margin-bottom: 16px; aspect-ratio: 3 / 2;
  background: radial-gradient(circle at 18% 20%, color-mix(in srgb, var(--pink) 22%, var(--surface)), transparent 55%),
    radial-gradient(circle at 85% 85%, color-mix(in srgb, var(--lilac) 24%, var(--surface)), transparent 55%), var(--surface2);
}
.st-art { display: block; width: 100%; height: 100%; overflow: visible; }
.story-slide h2 { font-size: 25px; margin-bottom: 6px; }
.story-slide p { margin: 0 auto; max-width: 320px; min-height: 3em; font-size: 15.5px; }
.story-badge { display: inline-flex; align-items: center; gap: 5px; margin-top: 10px; padding: 3px 11px; border-radius: 999px; background: var(--lilac-soft); color: var(--lilac); font-size: 12.5px; font-weight: 900; }
.story-nav { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 14px 0 14px; }
.story-arrow { width: 38px; height: 38px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--fill); color: var(--ink); transition: background .15s, opacity .15s; }
.story-arrow:hover:not(:disabled) { background: var(--fill2); }
.story-arrow:disabled { opacity: .3; }
.story-arrow.next svg { transform: rotate(180deg); }
.story-dots { display: flex; gap: 7px; }
.story-dot { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 5px; background: var(--line2); transition: width .3s, background .3s; }
.story-dot.on { width: 24px; background: var(--pink); }
.story-signin { margin: 12px 0 0; color: var(--soft); }

/* Story drawings: each moves only while its slide is showing. */
.st-hop, .st-fill, .st-float, .st-drop, .st-gift, .st-bob, .st-ok, .st-gift-heart, .st-cards > *, .st-twinkle > *, .st-type rect, .st-level { transform-box: fill-box; transform-origin: center; }
.story-slide.on .st-hop { animation: st-hop 3.4s ease-in-out infinite; }
@keyframes st-hop { 0%, 15% { transform: none; opacity: 1; } 30% { transform: translate(30px, -36px) rotate(-5deg); } 45%, 86% { transform: translate(60px, -24px); opacity: 1; } 95% { transform: translate(60px, -24px); opacity: 0; } 100% { transform: none; opacity: 0; } }
.story-slide.on .st-fill { animation: st-fill 3s ease-out infinite; }
@keyframes st-fill { 0%, 18% { transform: scale(0); } 32% { transform: scale(1.18); } 40%, 100% { transform: scale(1); } }
.st-check { stroke-dasharray: 1; stroke-dashoffset: 0; }
.story-slide.on .st-check { animation: st-check 3s ease-out infinite; }
@keyframes st-check { 0%, 30% { stroke-dashoffset: 1; } 46%, 100% { stroke-dashoffset: 0; } }
.story-slide.on .st-float { animation: st-float 3s ease-out infinite; }
@keyframes st-float { 0%, 40% { opacity: 0; transform: translateY(18px) scale(.6); } 58% { opacity: 1; transform: translateY(0) scale(1.08); } 84% { opacity: 1; transform: translateY(-6px) scale(1); } 100% { opacity: 0; transform: translateY(-16px); } }
.story-slide.on .st-twinkle > * { animation: st-twinkle 1.8s ease-in-out infinite; }
.story-slide.on .st-twinkle > :nth-child(2) { animation-delay: .5s; }
.story-slide.on .st-twinkle > :nth-child(3) { animation-delay: 1s; }
@keyframes st-twinkle { 50% { opacity: .25; transform: scale(.6); } }
.st-drop { opacity: 0; }
.story-slide.on .st-drop { animation: st-drop 2.7s ease-in infinite; }
.story-slide.on .st-drop.d2 { animation-delay: .9s; }
.story-slide.on .st-drop.d3 { animation-delay: 1.8s; }
@keyframes st-drop { 0% { opacity: 0; transform: translateY(0); } 8% { opacity: 1; } 34% { opacity: 1; transform: translateY(96px) scale(.9); } 40%, 100% { opacity: 0; transform: translateY(100px) scale(.6); } }
.story-slide.on .st-level { animation: st-level 8s ease-out infinite; }
@keyframes st-level { 0% { transform: translateY(26px); } 90%, 100% { transform: translateY(0); } }
.story-slide.on .st-gift { animation: st-wiggle 2.4s ease-in-out infinite; }
@keyframes st-wiggle { 0%, 70%, 100% { transform: rotate(0); } 78% { transform: rotate(-5deg); } 86% { transform: rotate(5deg); } 94% { transform: rotate(-2deg); } }
.story-slide.on .st-bob { animation: st-bob 2.2s ease-in-out infinite; }
.story-slide.on .st-bob.b2 { animation-delay: .35s; }
.story-slide.on .st-bob.b3 { animation-delay: .7s; animation-duration: 1.6s; }
@keyframes st-bob { 50% { transform: translateY(-6px); } }
.story-slide.on .st-ok { animation: st-ok 3.2s ease-out infinite; }
@keyframes st-ok { 0%, 10% { opacity: 0; transform: scale(.5); } 22% { opacity: 1; transform: scale(1.1); } 30%, 88% { opacity: 1; transform: scale(1); } 100% { opacity: 0; } }
.story-slide.on .st-gift-heart { animation: st-gift-heart 3.2s ease-in-out infinite; }
@keyframes st-gift-heart { 0%, 28% { opacity: 0; transform: translate(-64px, -50px) scale(.5); } 40% { opacity: 1; } 62% { transform: translate(0, 0) scale(1.25); } 72%, 88% { opacity: 1; transform: scale(1); } 100% { opacity: 0; } }
.st-type rect { transform-origin: left center; }
.story-slide.on .st-type rect { animation: st-type 3.6s ease-out infinite; }
.story-slide.on .st-type .t2 { animation-delay: .35s; }
@keyframes st-type { 0%, 6% { transform: scaleX(0); } 30%, 100% { transform: scaleX(1); } }
.story-slide.on .st-cards > * { animation: st-card 3.6s ease-out infinite; }
.story-slide.on .st-cards .c2 { animation-delay: .25s; }
.story-slide.on .st-cards .c3 { animation-delay: .5s; }
@keyframes st-card { 0%, 30% { opacity: 0; transform: translateX(14px); } 44%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* Steps after the code */
.onboard .ob-h { font-size: 26px; margin: 4px 0 6px; }
.onboard > .muted { margin: 0 0 4px; }
.ob-family-art { display: flex; align-items: flex-end; justify-content: center; gap: 4px; margin: 4px 0 6px; }
.ob-family-art .cat-face { animation: st-bob 2.2s ease-in-out infinite; }
.ob-family-art .b2 { animation-delay: .35s; }
.ob-family-art .b3 { animation-delay: .7s; margin: 0 0 2px -10px; order: 1; }
.ob-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0 12px; }
.ob-choice {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px 12px; border-radius: 20px; border: 2px solid var(--line);
  background: var(--surface); font-size: 14.5px; transition: transform .15s, border-color .15s, background .15s;
}
.ob-choice > span { display: flex; flex-direction: column; gap: 1px; }
.ob-choice strong { font-weight: 800; }
.ob-choice small { color: var(--soft); font-size: 12px; font-weight: 600; }
.ob-choice:hover:not(:disabled) { border-color: var(--pink); transform: translateY(-2px); }
.ob-choice.done { border-color: var(--mint); background: color-mix(in srgb, var(--mint-soft) 70%, var(--surface)); }
.onboard .invite-out, .onboard .child-form, .ob-added { text-align: left; }
.onboard .child-form { margin: 0 0 12px; }
.ob-added { margin: 0 0 12px; padding: 10px 12px; border-radius: 14px; background: var(--mint-soft); font-size: 14px; }
.ob-added .kb-glyph { color: var(--pink); }
.ob-presets { display: grid; gap: 9px; margin: 16px 0 10px; text-align: left; }
.ob-preset { min-height: 60px; }
.ob-preset.ob-helpme { background: linear-gradient(135deg, color-mix(in srgb, var(--pink-soft) 80%, var(--surface)), color-mix(in srgb, var(--lilac-soft) 90%, var(--surface))); }
.ob-done { position: relative; overflow: hidden; }
.ob-cat { display: grid; place-items: center; margin: 4px 0 6px; }
.ob-cat .happy { animation: ob-jump 1s ease-in-out 2; }
@keyframes ob-jump { 30% { transform: translateY(-12px) scale(1.05, .97); } 55% { transform: translateY(0) scale(1.04, .96); } }
.ob-party { position: absolute; left: 50%; top: 82px; width: 0; height: 0; pointer-events: none; }
.ob-party i { position: absolute; left: -8px; top: -8px; color: var(--c); opacity: 0; animation: ob-burst 1.5s var(--d) cubic-bezier(.2, .8, .3, 1) 2 forwards; }
@keyframes ob-burst { 0% { opacity: 0; transform: rotate(var(--a)) translateY(0) scale(.3); } 18% { opacity: 1; } 100% { opacity: 0; transform: rotate(var(--a)) translateY(-120px) scale(1); } }
.ob-done-btns { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }
.cat-face.pop { animation: ob-pop .35s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes ob-pop { from { transform: scale(.7); } }
@media (max-width: 360px) { .ob-choices { grid-template-columns: 1fr; } }

/* First-use tips */
.coach {
  position: fixed; z-index: 90; width: max-content; max-width: min(260px, calc(100vw - 24px)); padding: 11px 14px 10px; border-radius: 18px;
  background: var(--ink); color: var(--bg); font-size: 14px; font-weight: 700; line-height: 1.35; box-shadow: var(--shadow-lg);
  animation: coach-pop .4s cubic-bezier(.2, 1.4, .4, 1); transition: opacity .2s, transform .2s;
}
.coach::before { content: ''; position: absolute; top: -6px; left: var(--arrow, 50%); width: 14px; height: 14px; border-radius: 3px; background: var(--ink); transform: translateX(-50%) rotate(45deg); }
.coach.above::before { top: auto; bottom: -6px; }
.coach p { position: relative; margin: 0 0 8px; }
.coach-ok { display: block; margin-left: auto; border: 0; border-radius: 999px; padding: 5px 13px; background: var(--pink); color: #fff; font-size: 13px; font-weight: 800; }
.coach.out { opacity: 0; transform: scale(.92); }
@keyframes coach-pop { from { opacity: 0; transform: scale(.7) translateY(6px); } }

/* Help guide */
.help-btn { position: relative; font-size: 13px; font-weight: 900; }
.help-btn::after { content: ''; position: absolute; inset: 8px; border: 2px solid currentColor; border-radius: 50%; }
.help-guide { max-width: 560px; }
.help-guide .sheet-head .kb-glyph { color: var(--pink); }
.help-intro { margin: -6px 0 12px; }
.help-search { margin-bottom: 12px; }
.help-list { display: flex; flex-direction: column; gap: 8px; }
.help-sec { background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-sm); }
.help-sec summary { display: flex; align-items: center; gap: 12px; padding: 10px 14px; cursor: pointer; list-style: none; font-size: 15.5px; }
.help-sec summary::-webkit-details-marker { display: none; }
.help-sec summary strong { font-weight: 800; }
.help-sec .jh-chev { margin-left: auto; color: var(--soft); }
.help-sec[open] .jh-chev { transform: rotate(90deg); }
.help-art { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: var(--surface2); flex: none; }
.help-lock { display: grid; place-items: center; color: var(--lilac); }
.help-lock svg { width: 24px; height: 24px; }
.help-body { padding: 0 16px 12px 68px; animation: pop .2s ease-out; }
.help-body p { margin: 0 0 8px; font-size: 14.5px; }
.help-empty { text-align: center; padding: 12px; }
.help-contact { display: flex; gap: 12px; align-items: flex-start; margin-top: 12px; padding: 14px 16px; border-radius: 18px; background: var(--pink-soft); }
.help-contact .kb-glyph { color: var(--pink); margin-top: 2px; }
.help-contact p { margin: 2px 0 0; user-select: text; }
.help-foot { margin-top: 14px; justify-content: center; }
@media (max-width: 700px) { .help-body { padding-left: 16px; } }

/* Screen-reader-only text (page headings where the visible title is an input). */
.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; }

@media (prefers-reduced-motion: reduce) {
  .story-track { transition: none; }
  .st-drop, .ob-party { display: none; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .jar-drops, .kj-confetti { display: none; }
}

/* App themes (site/js/themes.js sets data-accent and the theme tokens) */
.logo-mark .lm-c { fill: var(--logo); stroke: var(--logo); }
.cat-loader path { fill: var(--pink); }
.theme-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 8px; margin: 2px 0 12px; }
.theme-swatch {
  position: relative; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 16px; border: 2px solid var(--line);
  background: var(--surface); text-align: left; font-weight: 800; font-size: 13px; transition: transform .15s, border-color .15s;
}
.theme-swatch:hover { transform: translateY(-1px); }
.theme-swatch.on { border-color: var(--sw1); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sw1) 22%, transparent); }
.ts-dot { position: relative; flex: none; width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(135deg, var(--sw1), var(--sw2)); margin-top: 4px; }
.ts-dot i { position: absolute; top: -5px; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 8px solid var(--sw1); }
.ts-dot i:first-child { left: 1px; transform: rotate(-14deg); } .ts-dot i:last-child { right: 1px; transform: rotate(14deg); }
.theme-swatch.on .ts-dot i { animation: ear-flick .5s ease-in-out; }
.ts-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ts-lock { margin-left: auto; color: var(--faint); display: inline-flex; }
.ts-lock svg { width: 14px; height: 14px; }
.theme-swatch.locked .ts-dot { opacity: .75; }
.theme-swatch.nudge { animation: swatch-no .4s ease-in-out; }
@keyframes swatch-no { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.theme-note { display: flex; gap: 8px; align-items: flex-start; background: var(--lilac-soft); color: var(--ink); border-radius: 14px; padding: 10px 12px; font-size: 13px; font-weight: 700; }
.theme-note svg { flex: none; margin-top: 2px; color: var(--lilac); }
.plan-tag { display: inline-block; margin-left: 6px; padding: 0 8px; border-radius: 999px; background: var(--lilac-soft); color: var(--lilac); font-size: 11px; font-weight: 900; letter-spacing: 0; text-transform: none; }
/* Live preview: a tiny app drawn with the theme's own tokens (set inline) */
.theme-preview { border-radius: 18px; overflow: hidden; background: var(--bg); border: 1px solid var(--line); margin-bottom: 10px; }
.tp-bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--surface); font-family: var(--f-display); font-weight: 600; font-size: 15px; }
.tp-body { padding: 12px; display: flex; flex-direction: column; gap: 10px; background: linear-gradient(160deg, var(--bg), var(--bg2)); }
.tp-tile { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 16px; color: #fff; font-weight: 800; background: linear-gradient(135deg, var(--pink), var(--accent2)); box-shadow: 0 8px 16px color-mix(in srgb, var(--pink) 25%, transparent); }
.tp-tile i { display: block; height: 6px; border-radius: 9px; background: rgba(255, 255, 255, .85); }
.tp-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tp-btn { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 999px; background: var(--pink-soft); color: var(--pink-deep); font-weight: 900; font-size: 13px; }
.tp-link { color: var(--pink-deep); font-weight: 900; font-size: 13px; }

/* Board themes: soft colours and patterns in the board's look picker */
.swatch.soft { position: relative; display: grid; place-items: center; color: #fff; }
.swatch.locked { opacity: .8; }
.swatch .ts-lock { margin: 0; color: #fff; }
.pattern-pick { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.pattern-opt { height: 48px; border-radius: 12px; border: 2px solid transparent; display: flex; align-items: flex-end; justify-content: center; padding: 3px; color: #fff; font-size: 11px; font-weight: 900; background-size: auto, cover; text-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.pattern-opt.on { border-color: var(--ink); }
.pattern-opt.locked { opacity: .7; }

/* Your cat: the avatar designer (site/js/avatars.js draws the cats) */
.person-cat.custom svg { overflow: visible; }
.cat-editor { display: grid; grid-template-columns: 150px 1fr; gap: 16px; align-items: start; }
.cat-stage { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px 8px; border-radius: 20px; background: radial-gradient(circle at 50% 35%, var(--pink-soft), transparent 70%); }
.cat-stage-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; text-align: center; }
.cat-stage-row small { width: 100%; }
.cat-opts { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cat-row { display: flex; flex-direction: column; gap: 4px; }
.cat-label { font-size: 12px; font-weight: 900; color: var(--soft); text-transform: uppercase; letter-spacing: .04em; }
.cat-choices { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-opt { display: grid; place-items: center; min-width: 46px; height: 46px; padding: 4px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface2); transition: transform .12s, border-color .12s; }
.cat-opt:hover { transform: translateY(-1px); }
.cat-opt.on { border-color: var(--pink); background: var(--pink-soft); }
.cat-opt .face-dot { width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .7); }
.cat-none { font-size: 12px; font-weight: 800; color: var(--soft); padding: 0 4px; }
.cat-who { margin-bottom: 10px; }
.cat-preview svg .cat-ear-l, .cat-preview svg .cat-ear-r { transform-box: fill-box; }
.cat-preview svg .cat-ear-l { transform-origin: 80% 100%; }
.cat-preview svg .cat-ear-r { transform-origin: 20% 100%; }
.cat-preview.wiggle .person-cat { animation: cat-hop .45s cubic-bezier(.3, 1.6, .5, 1); }
.cat-preview.wiggle .cat-ear-l { animation: cat-ear-l .55s ease-in-out; }
.cat-preview.wiggle .cat-ear-r { animation: cat-ear-r .55s .06s ease-in-out; }
.cat-preview.wiggle .cat-acc { animation: twinkle .5s ease-in-out; transform-box: fill-box; transform-origin: center; }
@keyframes cat-hop { 40% { transform: translateY(-6px) scale(1.04, .97); } 70% { transform: translateY(1px) scale(.98, 1.02); } }
@keyframes cat-ear-l { 30% { transform: rotate(-16deg); } 65% { transform: rotate(8deg); } }
@keyframes cat-ear-r { 30% { transform: rotate(16deg); } 65% { transform: rotate(-8deg); } }
@media (max-width: 520px) {
  .cat-editor { grid-template-columns: 1fr; }
  .theme-pick { grid-template-columns: repeat(2, 1fr); }
}

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