/* Porchlight styles.
 * Layout: each person's screen is a "pane" (top bar, scrolling content, tab bar). One pane
 * fills the device; with Both sides on a wide screen, two panes sit side by side as phones.
 * Palette: warm linen neutrals do most of the work, twilight indigo owns every action and
 * selection, and ember is a small spark of warmth. Moods run cool and low (rough) through
 * a quiet stone (okay) to warm and bright (great), and are never reused for anything else.
 */
:root {
  /* Lights, mids and darks sit well apart, so cards, chips and secondary words stay clear on a
     dim phone at night or in glare: white cards on a deeper linen, borders you can see, and no
     text under 4.5:1 contrast on any surface it sits on. */
  --bg: #efebe2;
  --surface: #ffffff;
  --oat: #f4f0e8;
  --tray: #e3ddd3;
  --segment: #ffffff;
  --line: #dad3c7;
  --line-strong: #cfc7b8;
  --ink: #1c2230;
  --ink-2: #4a505e;
  --ink-3: #585d6a;
  --disabled: #e5e0d6;
  --disabled-ink: #66615a;
  --primary: #26334d;
  --primary-hover: #1d2840;
  --on-primary: #ffffff;
  --primary-tint: #e9ecf2;
  --ember: #d96b43;
  --ember-tint: #fcede6;
  --ember-ink: #a5462a;
  --glow-core: #ffd8bf;
  --ok: #3f7d5c;
  --ok-tint: #e5efe8;
  --warn: #9c6118;
  --warn-tint: #f8eddd;
  --stop: #b2433a;
  --stop-tint: #f7e3e0;
  --m1: #3e4c72;
  --m2: #7092b5;
  --m3: #b8a88c;
  --m4: #f2c55a;
  --m5: #ec9f0c;
  --glow: #f4b740;
  --glow-tint: #fdf1d8;
  --glow-hi: #ffd56e;
  --face-ink: #1c2230;
  --face-ink-light: #f3efe9;
  --tone-sage: #3a6b66;
  --tone-plum: #6e4f6f;
  --tone-clay: #a0563c;
  --tone-dusk: #3e5277;
  --tone-moss: #5e6b3a;
  --tone-rose: #8e4e62;
  --tone-teal: #2c7a7b;
  --tone-ocean: #2f5f8f;
  --tone-gold: #8a6512;
  --tone-berry: #8c3a6e;
  --tone-slate: #4b5563;
  --tone-forest: #2f6b3f;
  --tone-indigo: #4b3f8f;
  --tone-cocoa: #6b4a3a;
  --toast: #1f2533;
  --toast-ink: #f4f2ee;
  --split-bg: #e6e1d6;
  --shadow-sm: 0 1px 2px rgba(24, 32, 38, .07);
  --shadow: 0 1px 3px rgba(24, 32, 38, .06), 0 4px 14px rgba(60, 45, 25, .05);
  --shadow-lg: 0 24px 60px rgba(28, 34, 48, .18), 0 4px 12px rgba(28, 34, 48, .06);

  --f-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --f-body: "Figtree", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-sm: 12px;
  --r: 18px;
  --r-lg: 24px;
  --sa-top: env(safe-area-inset-top, 0px);
  --sa-bottom: env(safe-area-inset-bottom, 0px);
  --col: 600px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121419; --surface: #1b1e25; --oat: #23262f; --tray: #252934; --segment: #323746; --line: #343843; --line-strong: #444a57;
    --ink: #edeae4; --ink-2: #b4b7bf; --ink-3: #9a9ea8; --disabled: #262a33; --disabled-ink: #8f939c;
    --primary: #dce2ee; --primary-hover: #eef1f7; --on-primary: #18202f; --primary-tint: #282e3c;
    --ember: #e8825c; --ember-tint: #352520; --ember-ink: #f2a98b; --glow-core: #ffe2cf;
    --ok: #6db58c; --ok-tint: #1d2d24; --warn: #e0a656; --warn-tint: #33291a; --stop: #ee8277; --stop-tint: #3a2220;
    --m1: #6b7ca3; --m2: #93adc8; --m3: #aaa395; --m4: #eecb72; --m5: #f2b232; --glow: #f6be4f; --glow-tint: #3a3020; --glow-hi: #ffdb7d;
    --tone-sage: #4f8a83; --tone-plum: #8f6a90; --tone-clay: #b56a4f; --tone-dusk: #5a70a0; --tone-moss: #7b884f; --tone-rose: #a8657a; --tone-teal: #3f9798; --tone-ocean: #4d7fb2; --tone-gold: #ad8530; --tone-berry: #a9568b; --tone-slate: #6b7585; --tone-forest: #4b8a5a; --tone-indigo: #6a5fb0; --tone-cocoa: #8a6654;
    --toast: #2b303c; --toast-ink: #f4f2ee; --split-bg: #0d0f13;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3); --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .22);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121419; --surface: #1b1e25; --oat: #23262f; --tray: #252934; --segment: #323746; --line: #343843; --line-strong: #444a57;
  --ink: #edeae4; --ink-2: #b4b7bf; --ink-3: #9a9ea8; --disabled: #262a33; --disabled-ink: #8f939c;
  --primary: #dce2ee; --primary-hover: #eef1f7; --on-primary: #18202f; --primary-tint: #282e3c;
  --ember: #e8825c; --ember-tint: #352520; --ember-ink: #f2a98b; --glow-core: #ffe2cf;
  --ok: #6db58c; --ok-tint: #1d2d24; --warn: #e0a656; --warn-tint: #33291a; --stop: #ee8277; --stop-tint: #3a2220;
  --m1: #6b7ca3; --m2: #93adc8; --m3: #aaa395; --m4: #eecb72; --m5: #f2b232; --glow: #f6be4f; --glow-tint: #3a3020; --glow-hi: #ffdb7d;
  --tone-sage: #4f8a83; --tone-plum: #8f6a90; --tone-clay: #b56a4f; --tone-dusk: #5a70a0; --tone-moss: #7b884f; --tone-rose: #a8657a; --tone-teal: #3f9798; --tone-ocean: #4d7fb2; --tone-gold: #ad8530; --tone-berry: #a9568b; --tone-slate: #6b7585; --tone-forest: #4b8a5a; --tone-indigo: #6a5fb0; --tone-cocoa: #8a6654;
  --toast: #2b303c; --toast-ink: #f4f2ee; --split-bg: #0d0f13;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3); --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .22);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .5);
  color-scheme: dark;
}
.host-padded { --sa-top: 0px; --sa-bottom: 0px; }

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
html { font-size: calc(15px * var(--text-zoom, 1)); -webkit-text-size-adjust: 100%; touch-action: manipulation; }
/* Scale type, not padding, gaps or the available layout width. */
body {
  margin: 0; background: var(--bg); color: var(--ink); overflow: hidden; overflow: clip;
  font: 400 1rem/1.5 var(--f-body); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; text-align: inherit; }
button:disabled { cursor: default; }
:focus-visible { outline: 2.5px solid var(--primary); outline-offset: 2px; border-radius: 8px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- icons, faces, logo, avatars ---------- */
.ic { width: 22px; height: 22px; flex: none; }
.ic-sm { width: 18px; height: 18px; }
.ic-xs { width: 14px; height: 14px; vertical-align: -2px; }

.face { flex: none; display: block; overflow: visible; }
.face-1 { --fm: var(--m1); --fi: var(--face-ink-light); }
.face-2 { --fm: var(--m2); --fi: var(--face-ink); }
.face-3 { --fm: var(--m3); --fi: var(--face-ink); }
.face-4 { --fm: var(--m4); --fi: var(--face-ink); }
.face-5 { --fm: var(--m5); --fi: var(--face-ink); }
.face-body { fill: var(--fm); }
.face-hi { fill: #ffffff; opacity: .2; }
.face-feat { fill: var(--fi); }
.face-feat .ln { fill: none; stroke: var(--fi); stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.face-feat .brow { stroke-width: 1.8; }
.face-4 .cheek { fill: #e9895a; opacity: .35; }
.face-5 .cheek { fill: #e0722f; opacity: .35; }

.logo { display: block; flex: none; overflow: visible; }
.logo-metal { fill: var(--logo-metal, var(--primary)); }
.logo-metal-ln { stroke: var(--logo-metal, var(--primary)); stroke-width: 1.8; stroke-linecap: round; fill: none; }
.logo-glass { fill: var(--glow); }
.logo-core { fill: #fff6df; }
.logo-halo { fill: var(--glow); opacity: .1; transform-origin: 16px 17px; animation: halo 6.5s ease-in-out infinite; animation-delay: var(--sync, 0s); }
.logo-glass { animation: glass 6.5s ease-in-out infinite; animation-delay: var(--sync, 0s); }
.logo-core { animation: core 6.5s ease-in-out infinite; animation-delay: var(--sync, 0s); }
@keyframes halo { 0%, 100% { opacity: .06; transform: scale(.9); } 50% { opacity: .34; transform: scale(1.06); } }
@keyframes glass { 0%, 100% { fill: var(--glow); } 50% { fill: var(--glow-hi); } }
@keyframes core { 0%, 100% { opacity: .65; } 50% { opacity: 1; } }
.logo-xs { width: 18px; height: 18px; }
.logo-hero { width: 44px; height: 44px; }
/* The top of an adult's Home (views-home.js PL.brandBar): the lantern with a soft glow, the
   name, and hello. */
/* A tab's page title (PL.pageHead): an icon tile in the lantern's colors, then the words. */
.page-head { display: flex; align-items: center; gap: 12px; }
.page-head > div { min-width: 0; }
.page-head .h-page { margin-top: 2px; }
.page-ic { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 13px; background: var(--glow-tint); color: var(--ink); }
.page-ic .ic { width: 22px; height: 22px; }
/* The welcome screen's lantern, glowing, above the name. */
.welcome-lamp { display: grid; place-items: center; width: 72px; height: 72px; margin-bottom: 12px; border-radius: 22px; background: var(--glow-tint); }
.logo-welcome { width: 52px; height: 52px; }
.block.brand-bar { flex-direction: row; align-items: center; gap: 10px; padding-bottom: 4px; }
.brand-lamp { position: relative; display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--glow-tint); }
.logo-brand { width: 30px; height: 30px; }
.brand-word { font: 700 1.35rem/1 var(--f-display); letter-spacing: -.02em; color: var(--ink); }
.brand-side { margin-left: auto; min-width: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.brand-hi { max-width: 100%; font-size: .85rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trial-pill { display: inline-flex; align-items: center; gap: 4px; min-height: 28px; padding: 3px 10px; border-radius: 999px; background: var(--glow-tint); color: var(--ink-2); font-size: .78rem; font-weight: 600; white-space: nowrap; }
.trial-pill.is-soon { background: var(--ember-tint); color: var(--ember-ink); }
.logo-xl { width: 96px; height: 96px; margin: 0 auto; }


.avatar { flex: none; width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--av); color: #ffffff; }
.avatar svg { width: 60%; height: 60%; }
.av-xs { width: 20px; height: 20px; }
.av-sm { width: 26px; height: 26px; }
.av-md { width: 34px; height: 34px; }
.av-lg { width: 46px; height: 46px; }

/* ---------- app and panes ---------- */
.app { height: 100%; }
.pane { position: relative; display: flex; flex-direction: column; overflow: hidden; overflow: clip; background: var(--bg); height: 100%; }
.pane-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
/* No top bar: just the phone's safe area, and the urgent alerts when there are any. */
.topbar { flex: none; padding-top: var(--sa-top); background: var(--bg); z-index: 5; }

.pane-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.main {
  max-width: var(--col); margin: 0 auto; display: flex; flex-direction: column; gap: 26px;
  padding-block: 22px 32px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.tabbar { flex: none; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: var(--sa-bottom); z-index: 5; }
.tabbar-in { max-width: var(--col); margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); }
.tab { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 2px 10px; color: var(--ink-3); }
.tab-ic { position: relative; display: grid; place-items: center; padding: 3px 16px; border-radius: 99px; transition: background .2s; }
/* The current tab gets a soft pill behind its icon, never a dot, so it can't be mistaken for something new. */
.tab[aria-current="page"] .tab-ic { background: var(--primary-tint); }
.tab-label { font-size: 0.766667rem; font-weight: 600; }
.tab[aria-current="page"] { color: var(--primary); }
.tab[aria-current="page"] .ic { stroke-width: 2.3; }
.tab[aria-current="page"] .tab-label { font-weight: 750; }
.badge { position: absolute; top: -2px; right: -5px; width: 9px; height: 9px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 0 2px var(--surface); }
.badge.pop { animation: badge-pop .5s var(--ease-spring); }
@keyframes badge-pop { 0% { transform: scale(0); } 60% { transform: scale(1.35); } 100% { transform: scale(1); } }
.badge.num { top: -4px; right: 2px; width: auto; min-width: 17px; height: 17px; padding: 0 5px; display: grid; place-items: center; font: 700 0.7rem/1 var(--f-body); font-style: normal; color: #ffffff; font-variant-numeric: tabular-nums; }

/* ---------- type ---------- */
.eyebrow { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); }
.h-page { font: 700 2rem/1.1 var(--f-display); letter-spacing: -.022em; margin-top: 4px; }
.h-sec { font: 650 1.133333rem/1.25 var(--f-display); letter-spacing: -.005em; margin-bottom: 10px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.sec-head .h-sec { margin-bottom: 0; }
.lede { color: var(--ink-2); margin-top: 6px; max-width: 36em; }
.fine { font-size: 0.866667rem; color: var(--ink-3); line-height: 1.45; }
.fine.center { text-align: center; }
.empty { color: var(--ink-3); text-align: center; padding: 18px 8px; }
.empty.sm { padding: 10px; font-size: 0.866667rem; }
.f-label { display: block; font: 650 0.966667rem/1.3 var(--f-display); margin-bottom: 8px; }
.explain .opt { display: block; font-size: 0.866667rem; color: var(--ink-3); margin-top: 2px; }
.pick small { font-size: 0.766667rem; font-weight: 600; color: inherit; opacity: .8; margin-left: 4px; }
.field + .coach-btn, .field + .coach-box, .field > .tone + .coach-btn, .field > .tone + .coach-box { margin-top: 4px; }
.pick:disabled { cursor: default; }
.f-label .opt { font: 500 0.8rem var(--f-body); color: var(--ink-3); margin-left: 4px; }
.explain { font-size: 0.933333rem; color: var(--ink-2); }
.block { display: flex; flex-direction: column; }
.block-top { gap: 2px; }
.block-top > .btn, .block-top > .row-actions { margin-top: 14px; align-self: flex-start; }
.block > .fine { margin-top: 8px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); }
.list-card { padding: 4px 16px; }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 18px;
  border-radius: 99px; font-weight: 650; background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink);
  transition: transform .12s, background .2s, opacity .2s;
}
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { background: var(--disabled); border-color: transparent; color: var(--disabled-ink); box-shadow: none; }
.btn-primary { background: var(--primary); border-color: transparent; color: var(--on-primary); }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-quiet { background: var(--oat); border-color: transparent; }
.btn-ghost { background: transparent; border-color: var(--line-strong); }
.btn-small { min-height: 36px; padding: 6px 14px; font-size: 0.933333rem; }
.btn-block { width: 100%; }
.btn.confirm { background: var(--stop); border-color: transparent; color: #ffffff; }
.btn-stop { background: var(--stop); color: #ffffff; border-color: transparent; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); flex: none; }
.icon-btn:hover { background: var(--oat); }
.icon-btn.sm { width: 44px; height: 44px; }
.icon-btn.danger { background: var(--stop-tint); color: var(--stop); }
.link-btn { color: var(--ink-3); font-size: 0.9rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; align-self: flex-start; padding: 4px 0; }
.link-btn.danger { color: var(--stop); align-self: center; margin-top: 4px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.row-btn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 14px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); font-weight: 600; color: var(--ink); }
.row-btn span { flex: 1; }
.row-btn.danger { background: var(--stop-tint); color: var(--stop); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 99px; font-size: 0.933333rem; font-weight: 600;
  background: var(--oat); border: 1px solid var(--line-strong); color: var(--ink); transition: background .15s, border-color .15s, box-shadow .15s;
}
.chip small { font-weight: 600; color: var(--ink-3); }
.chip-sm { padding: 6px 12px; font-size: 0.9rem; }
.chip[aria-pressed="true"] { background: var(--primary-tint); border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); color: var(--ink); }
.chip-suggest { border-style: dashed; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 0.833333rem; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: var(--oat); color: var(--ink-2); }
.pill { display: inline-block; font-size: 0.733333rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 2px 8px; border-radius: 99px; background: var(--oat); color: var(--ink-2); vertical-align: 1px; }
.pill-new { background: var(--ember-tint); color: var(--ember-ink); }

.seg { display: flex; gap: 3px; padding: 3px; border-radius: 99px; background: var(--tray); }
.seg-btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 10px; border-radius: 99px; font-size: 0.933333rem; font-weight: 650; color: var(--ink-2); white-space: nowrap; }
.seg-btn[aria-pressed="true"] { background: var(--segment); color: var(--ink); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }


input:not([type="file"]), textarea {
  width: 100%; font-size: 1.066667rem; padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); resize: vertical; line-height: 1.45;
}
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-tint); }
.inline-add { display: flex; gap: 8px; margin-top: 10px; }
.inline-add input { flex: 1; min-width: 0; padding: 9px 12px; }
.mini-field { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; font-size: 0.833333rem; font-weight: 600; color: var(--ink-3); }
.mini-field input { padding: 9px 12px; }
.field { display: flex; flex-direction: column; }
.field.two { flex-direction: row; gap: 10px; }

/* ---------- mood buttons ---------- */
.mood-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.mood-btn { display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 0; }
.mood-pill {
  width: 100%; aspect-ratio: 1; max-width: 66px; display: grid; place-items: center; border-radius: 20px;
  background: var(--oat); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent);
  transition: transform .18s cubic-bezier(.3, .7, .4, 1.4), background .2s, box-shadow .2s;
}
.mood-pill.m-1 { background: color-mix(in srgb, var(--m1) 14%, var(--oat)); }
.mood-pill.m-2 { background: color-mix(in srgb, var(--m2) 18%, var(--oat)); }
.mood-pill.m-4 { background: color-mix(in srgb, var(--m4) 22%, var(--oat)); }
.mood-pill.m-5 { background: color-mix(in srgb, var(--m5) 18%, var(--oat)); }
.mood-btn:hover .mood-pill { transform: translateY(-2px); }
.mood-btn:active .mood-pill { transform: scale(.94); }
.mood-lbl { font-size: 0.766667rem; font-weight: 650; color: var(--ink-2); text-align: center; line-height: 1.15; }
.mood-btn[aria-pressed="true"] .mood-pill { background: var(--surface); box-shadow: 0 0 0 2px var(--primary), var(--shadow); }
.mood-btn[aria-pressed="true"] .mood-lbl { color: var(--ink); }
.mood-row:has([aria-pressed="true"]) .mood-btn:not([aria-pressed="true"]) .face { opacity: .5; }

/* ---------- kid home ---------- */
.hero {
  border-radius: var(--r-lg); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 20px 16px 16px;
  display: flex; flex-direction: column; gap: 16px;
  background:
    radial-gradient(220px 160px at 100% 0%, color-mix(in srgb, var(--glow) 16%, transparent), transparent 70%),
    var(--surface);
}
.hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-inline: 4px; }
.hero-title { font: 700 2.133333rem/1.05 var(--f-display); letter-spacing: -.025em; margin-top: 4px; }
.hero-mark { width: 52px; height: 52px; display: grid; place-items: center; flex: none; }

.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quick {
  display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r); background: var(--surface);
  border: 1px solid var(--line); font-weight: 600; font-size: 0.933333rem; line-height: 1.25; box-shadow: var(--shadow); transition: transform .12s;
  position: relative; overflow: hidden; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: manipulation;
}
.quick-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--primary-tint); color: var(--primary); }
.quick-ic .ic { width: 20px; height: 20px; }

.kid-card { display: flex; flex-direction: column; gap: 12px; }
.ci-top { display: flex; align-items: center; gap: 12px; }
.ci-mood { font: 650 1.133333rem/1.2 var(--f-display); }
.ci-meta { font-size: 0.866667rem; color: var(--ink-3); margin-top: 2px; }
.status { font-size: 0.933333rem; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.status-glow { color: var(--ember-ink); font-weight: 600; }
.bubble { padding: 10px 14px; border-radius: 18px; background: var(--oat); line-height: 1.45; overflow-wrap: anywhere; border: 1px solid transparent; }
.bubble.sm { padding: 7px 12px; font-size: 0.933333rem; }

.teasers { display: grid; grid-template-columns: 1fr; gap: 10px; }
.teaser { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); text-align: left; }
.teaser b { font: 650 1.066667rem/1.3 var(--f-display); }
.teaser-k { font-size: 0.8rem; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; display: flex; align-items: center; gap: 6px; }
.teaser-sub { font-size: 0.9rem; color: var(--ink-2); }
.meter { display: block; height: 5px; border-radius: 99px; background: var(--oat); overflow: hidden; margin-top: 8px; }
.meter i { display: block; height: 100%; border-radius: 99px; background: var(--primary); }

.chart-card { padding: 14px 12px 12px; }
.mw { display: flex; flex-direction: column; gap: 12px; }
.mw-grid { display: grid; grid-template-columns: auto repeat(7, 1fr); align-items: center; gap: 6px 2px; }
.mw-h { text-align: center; font-size: 0.733333rem; font-weight: 700; color: var(--ink-3); letter-spacing: .04em; }
.mw-label { font-size: 0.766667rem; font-weight: 650; color: var(--ink-3); padding-right: 8px; white-space: nowrap; }
.mw-cell { display: grid; place-items: center; height: 38px; border-radius: 12px; }
.mw-cell.is-today { background: var(--oat); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.mw-cell.is-future { opacity: 0; }
.mw-none { width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); }

.help-line { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--r); background: var(--primary-tint); color: var(--ink); font-size: 0.933333rem; border: 1.5px solid color-mix(in srgb, var(--primary) 22%, transparent); }
.help-line > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.help-line b { font: 650 1rem/1.2 var(--f-display); }
.help-line small { font-size: 0.866667rem; color: var(--ink-2); }
.help-ic { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: var(--on-primary); }
.help-more { flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 7px 12px; border-radius: 99px; background: var(--primary); color: var(--on-primary); font-weight: 650; font-size: 0.866667rem; white-space: nowrap; }
.tell-card { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; }
.tell-card p { font-size: 0.933333rem; color: var(--ink-2); margin-bottom: 4px; }
.care { padding: 14px 16px; border-radius: var(--r); background: var(--primary-tint); display: flex; flex-direction: column; gap: 6px; font-size: 0.933333rem; }
.care .btn { text-decoration: none; }

.felt { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--line); font-size: 0.9rem; color: var(--ink-2); font-weight: 600; }
.felt-done > span { flex: 1; min-width: 0; }
.felt-done .link-btn, .felt-done + .link-btn { font-size: 0.9rem; }
.hist-felt { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; }
.hist-main .hist-felt.yes { color: var(--ember-ink); }
.start-card { padding: 4px 14px; }
.start-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 0; text-align: left; color: var(--ink-3); }
.start-row + .start-row { border-top: 1px solid var(--line); }
.start-row > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; color: var(--ink); }
.start-row small { font-size: 0.866667rem; color: var(--ink-3); }

/* ---------- parent home ---------- */
.ci-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; position: relative; overflow: hidden; }
.ci-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 90px; pointer-events: none; background: linear-gradient(180deg, color-mix(in srgb, var(--mood) 13%, transparent), transparent); }
.ci-card > * { position: relative; }
.ci-card.is-new { border-color: color-mix(in srgb, var(--ember) 45%, var(--line)); }
.ci-note { font-size: 1.066667rem; line-height: 1.45; padding: 10px 14px; border-radius: var(--r-sm); background: var(--oat); }
.boundary { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--primary-tint); }
.boundary .ic { color: var(--primary); }
.boundary div { display: flex; flex-direction: column; }
.boundary span { font-size: 0.8rem; color: var(--ink-2); font-weight: 600; }
.boundary b { font: 650 1.066667rem/1.25 var(--f-display); }
.boundary.sm { margin-top: 10px; margin-bottom: 14px; }
.coach h3 { font-size: 0.8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.coach ul { display: flex; flex-direction: column; gap: 6px; }
.coach li { position: relative; padding-left: 16px; font-size: 0.966667rem; color: var(--ink-2); }
.coach li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--primary); }
.ci-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.ci-actions .btn { flex: 1 1 auto; }

.promise { display: flex; align-items: center; gap: 12px; }
.promise + .promise { margin-top: 8px; }
.promise-ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-tint); color: var(--primary); flex: none; }
.promise-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.promise-txt span { font-size: 0.9rem; color: var(--ink-2); overflow-wrap: anywhere; }
.promise.overdue { border-color: color-mix(in srgb, var(--ember) 50%, var(--line)); background: var(--ember-tint); }
.promise.overdue .promise-ic { background: var(--ember); color: #ffffff; }

.trend { display: flex; flex-direction: column; gap: 12px; padding: 14px 14px 16px; }
.insights { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; }
.insights li { display: flex; gap: 10px; font-size: 0.933333rem; color: var(--ink-2); }
.insights .ic { color: var(--primary); margin-top: 2px; }
.insights b { color: var(--ink); }
.hist { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; }
.hist + .hist { border-top: 1px solid var(--line); }
.hist-btn { width: 100%; text-align: left; color: inherit; }
.hist-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.hist-main b { font-weight: 650; }
.hist-main span { font-size: 0.866667rem; color: var(--ink-3); }
.hist-main .hist-reply { color: var(--ink-2); overflow-wrap: anywhere; }
.hist-when { font-size: 0.833333rem; color: var(--ink-3); white-space: nowrap; }

/* ---------- sheets ---------- */
.sheet-root { position: absolute; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.scrim { position: absolute; inset: 0; background: rgba(20, 22, 30, .42); }
.scrim.enter { animation: fade .32s ease; }
/* overflow: hidden keeps a page sliding across inside the sheet, even where the sheet is a box
   in the middle of a wide screen. */
.sheet, .under-sheet, .fall-sheet {
  position: relative; width: 100%; max-width: 600px; max-height: 92%; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border-radius: 26px 26px 0 0; box-shadow: var(--shadow-lg); padding-bottom: var(--sa-bottom);
}
/* A sheet opened from a list rises over it. The list waits underneath, set back a little, and
   comes forward again when the sheet on top drops away. */
.sheet-under-root, .sheet-fall { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; }
.sheet-under-root { z-index: 49; }
.sheet-fall { z-index: 52; pointer-events: none; }
.under-sheet { transform: translateY(-14px) scale(.94); transform-origin: 50% 0; }
.under-sheet.to-under { animation: to-under .46s var(--ease-ios); }
@keyframes to-under { from { transform: none; } }
.sheet.from-under { animation: from-under .42s var(--ease-ios); }
@keyframes from-under { from { transform: translateY(-14px) scale(.94); } }
.fall-sheet { animation: sheet-down .32s cubic-bezier(.4, 0, .9, .6) both; }
.scrim.over { background: rgba(20, 22, 30, .22); }
.sheet-under-root.leaving .under-sheet { animation: sheet-down .3s cubic-bezier(.4, 0, .9, .6) both; }
.sheet-under-root.leaving .scrim { animation: fade-out .3s ease both; }
.sheet:focus { outline: none; }
/* Like an iOS sheet: it slides up from the bottom edge, solid the whole way; only the dimming fades. */
.sheet.enter { animation: sheet-up .46s var(--ease-ios); }
@keyframes sheet-up { from { transform: translateY(100%); } }
@keyframes rise { from { transform: translateY(36px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 20px 12px 8px 20px; position: relative; }
.sheet-head h2 { flex: 1; font: 700 1.333333rem/1.2 var(--f-display); letter-spacing: -.01em; }
.grabber { position: absolute; top: 8px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 99px; background: var(--line-strong); }
.sheet-body { overflow-y: auto; padding: 6px 20px 20px; display: flex; flex-direction: column; gap: 20px; overscroll-behavior: contain; }
.sheet-foot { padding: 12px 20px 16px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
@media (min-width: 720px) {
  .sheet-root, .sheet-under-root, .sheet-fall { align-items: center; padding: 24px; }
  .sheet, .under-sheet, .fall-sheet { border-radius: 26px; max-height: 86%; }
  /* In the middle of a wide screen a sheet has no bottom edge to slide from, so it fades in
     and out with a small drift instead of stopping halfway down the screen. */
  .sheet.enter { animation-name: box-in; }
  .fall-sheet, .sheet-root.leaving .sheet, .sheet-under-root.leaving .under-sheet { animation-name: box-out; }
  .grabber { display: none; }
}
/* The check-in is one fixed card whose contents change, not a new window per step: it keeps
   its height, and each step sweeps in sideways with a little bounce (see PL.renderSheet). */
.sheet.sheet-steps { height: 92%; overflow: hidden; }
.sheet-steps .sheet-body { flex: 1; min-height: 0; }
@media (min-width: 720px) { .sheet.sheet-steps { height: min(86%, 780px); } }
/* Like a phone's own navigation: going forward, the new page slides over the old one, which
   drifts back behind it; going back, the top page slides away to show the one underneath. */
.step-ghost { position: absolute; left: 0; right: 0; overflow: hidden; pointer-events: none; background: var(--surface); }
.sheet-body.in-fwd, .sheet-body.in-back { position: relative; background: var(--surface); }
/* The same push, back and swipe-back are used for pages on the main screen (a gameplan, a
   feeling's notes): see .pane-scroll.in-* below. --from is where a swipe-back let go. */
.in-fwd { z-index: 2; box-shadow: -12px 0 24px -16px rgba(20, 22, 30, .35); animation: step-in-fwd .5s var(--ease-ios) both; }
.in-back { z-index: 0; animation: step-in-back .46s var(--ease-ios) both; }
.out-fwd { z-index: 1; animation: step-out-fwd .5s var(--ease-ios) both; }
.out-back { z-index: 2; box-shadow: -12px 0 24px -16px rgba(20, 22, 30, .35); animation: step-out-back .42s var(--ease-ios) both; }
@keyframes step-in-fwd { from { transform: translateX(100%); } }
@keyframes step-in-back { from { transform: translateX(calc(-28% + var(--from-pct, 0%))); opacity: calc(.6 + var(--from-k, 0) * .4); } }
@keyframes step-out-fwd { to { transform: translateX(-28%); opacity: .5; } }
@keyframes step-out-back { from { transform: translateX(var(--from, 0px)); } to { transform: translateX(100%); } }
/* The title and the buttons under a step change with it instead of snapping. */
.title-in { animation: title-in .34s var(--ease-ios) .07s both; }
.title-in.rev { animation-name: title-in-back; }
@keyframes title-in { from { opacity: 0; transform: translateX(18px); } }
@keyframes title-in-back { from { opacity: 0; transform: translateX(-18px); } }
.title-out { position: absolute; margin: 0; pointer-events: none; animation: title-out .16s ease-out both; }
.title-out.rev { animation-name: title-out-back; }
@keyframes title-out { to { opacity: 0; transform: translateX(-18px); } }
@keyframes title-out-back { to { opacity: 0; transform: translateX(18px); } }
.foot-new { animation: foot-in .24s ease both; }
@keyframes foot-in { from { opacity: .25; } }
/* While a finger drags a page or a sheet, it follows exactly; nothing eases. */
.dragging, .dragging * { transition: none !important; }
.sheet-head { touch-action: none; }
.sheet-head, .grabber { cursor: grab; }

.b-list { display: flex; flex-direction: column; gap: 8px; }
.b-opt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--surface); }
.b-opt > span { flex: 1; display: flex; flex-direction: column; }
.b-opt small { color: var(--ink-3); font-size: 0.866667rem; }
.b-opt .ic { color: var(--ink-3); }
.b-opt .radio { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-strong); flex: none; }
.when-chips { padding: 2px 0 6px 46px; }

.ci-mini { display: flex; gap: 12px; align-items: flex-start; }
.ci-mini > div { display: flex; flex-direction: column; font-size: 0.933333rem; color: var(--ink-2); }
.ci-mini b { color: var(--ink); font-size: 1rem; }
.emoji-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.emoji-btn { aspect-ratio: 1; max-width: 100%; border-radius: 16px; border: 1px solid var(--line-strong); font-size: 2rem; display: grid; place-items: center; background: var(--surface); }
.emoji-btn[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-tint); box-shadow: 0 0 0 1px var(--primary); }
.emoji-btn.sm { width: 40px; height: 40px; font-size: 1.333333rem; border-radius: 12px; aspect-ratio: auto; }

.tone { margin-top: 10px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--oat); display: flex; flex-direction: column; gap: 8px; font-size: 0.9rem; --tc: var(--ink-3); }
.tone[data-level="warm"], .tone[data-level="ok"] { --tc: var(--ok); }
.tone[data-level="check"] { --tc: var(--warn); background: var(--warn-tint); }
.tone[data-level="pause"] { --tc: var(--stop); background: var(--stop-tint); }
.tone-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.tone-row b { color: var(--tc); font-weight: 700; }
.tone-note { color: var(--ink-2); }
.tone-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tc); align-self: center; }
.tone-issues { display: flex; flex-direction: column; gap: 8px; }
.tone-issues li { display: flex; flex-direction: column; gap: 1px; padding-left: 12px; border-left: 2px solid var(--warn); color: var(--ink-2); }
.tone-issues li.sev-high, .tone-issues li.sev-block { border-color: var(--stop); }
.tone-issues li.sev-low { border-color: var(--line-strong); }
.tone-issues b { color: var(--ink); }

/* settings */
.settings { display: flex; flex-direction: column; gap: 22px; }
.person-card { display: flex; flex-direction: column; gap: 14px; padding: 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); }
.mini-field.grow { flex: 1; }
.saved { font-size: 0.8rem; font-weight: 700; color: var(--ok); opacity: 0; align-self: flex-end; padding-bottom: 10px; }
.saved.show { animation: saved 1.6s ease both; }
@keyframes saved { 10%, 70% { opacity: 1; } 100% { opacity: 0; } }
.set-group { display: flex; flex-direction: column; gap: 8px; }
.set-k { font-size: 0.833333rem; font-weight: 700; color: var(--ink-3); }
.pron-custom { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tog-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 0; }
.tog-row > span { flex: 1; display: flex; flex-direction: column; }
.tog-row b { font-weight: 650; }
.tog-row small { font-size: 0.866667rem; color: var(--ink-3); }
.tog-row[aria-pressed="true"] .switch { background: var(--primary); }
.tog-row[aria-pressed="true"] .switch > i { transform: translateX(18px); }
.set-sec .seg + .set-k { margin-top: 8px; }

/* family */
.set-sec { display: flex; flex-direction: column; gap: 8px; }
.set-sec .f-label { margin-bottom: 2px; }
.person-row { display: flex; align-items: center; gap: 10px; }
.person-row input { flex: 1; min-width: 0; padding: 9px 12px; }
.glyphs { display: flex; flex-wrap: wrap; gap: 8px; }
.glyph-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--oat); color: var(--ink-2); }
.glyph-btn svg { width: 20px; height: 20px; }
.glyph-btn[aria-pressed="true"] { background: var(--av); color: #ffffff; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--av); }
.tones { display: flex; flex-wrap: wrap; gap: 8px; }
.tone-btn { width: 44px; height: 44px; flex: none; border: 10px solid transparent; border-radius: 50%; background: var(--av); background-clip: padding-box; }
.tone-btn[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--av); }

/* ---------- gameplans ---------- */
.ev-card { display: flex; align-items: center; gap: 14px; text-align: left; width: 100%; }
.date-tile { flex: none; width: 52px; padding: 7px 0; border-radius: 14px; background: var(--oat); display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.date-tile b { font: 700 1.4rem/1.1 var(--f-display); }
.date-tile small { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.ev-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ev-main b { font: 650 1.1rem/1.25 var(--f-display); }
.ev-sub { font-size: 0.866667rem; color: var(--ink-3); }
.ev-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-top: 4px; }
.ev-status { display: inline-flex; align-items: center; gap: 5px; font-size: 0.833333rem; font-weight: 600; color: var(--ink-2); }
.ev-status-ask { color: var(--ember-ink); }
.ev-chev { color: var(--ink-3); }
.loadm { display: inline-flex; align-items: center; gap: 6px; font-size: 0.833333rem; font-weight: 600; color: var(--ink-2); }
.loadm-dots { display: inline-flex; gap: 3px; }
.loadm-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.loadm-dots i.on { background: var(--primary); }
.ring { position: relative; width: 42px; height: 42px; flex: none; display: grid; place-items: center; }
.ring > svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: var(--oat); stroke-width: 3.5; }
.ring-fill { fill: none; stroke: var(--primary); stroke-width: 3.5; stroke-linecap: round; }
.ring b { position: relative; font-size: 0.733333rem; font-weight: 750; color: var(--ink-2); font-variant-numeric: tabular-nums; display: grid; place-items: center; }
.ring.is-done { background: var(--primary); border-radius: 50%; width: 36px; height: 36px; margin: 3px; }
.ring.is-done > svg { display: none; }
.ring.is-done b { color: var(--on-primary); }
.back { display: inline-flex; align-items: center; gap: 4px; font-weight: 650; color: var(--ink-2); margin-bottom: 10px; align-self: flex-start; padding: 4px 0; }
.ev-detail-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 0.866667rem; color: var(--ink-2); font-weight: 600; }
.plan-sec { display: flex; flex-direction: column; gap: 12px; }
.plan-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.plan-head h2 { font: 650 1.133333rem/1.25 var(--f-display); }
.plan-head p { font-size: 0.9rem; color: var(--ink-3); margin-top: 2px; }
.edited { display: inline-flex; align-items: center; gap: 5px; font-size: 0.8rem; color: var(--ink-3); font-weight: 600; white-space: nowrap; }
.senses { display: flex; flex-direction: column; gap: 10px; }
.sense-row { display: flex; flex-direction: column; gap: 6px; font-size: 0.933333rem; font-weight: 600; }
.sense-seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.sense-seg button { outline: none; padding: 7px 4px; border-radius: 10px; font-size: 0.833333rem; font-weight: 600; color: var(--ink-3); background: var(--oat); text-align: center; }
.sense-seg button[aria-pressed="true"].lv-0 { background: var(--primary-tint); color: var(--ink); }
.sense-seg button[aria-pressed="true"].lv-1 { background: color-mix(in srgb, var(--primary) 28%, var(--surface)); color: var(--ink); }
.sense-seg button[aria-pressed="true"].lv-2 { background: color-mix(in srgb, var(--primary) 62%, var(--surface)); color: var(--on-primary); }
.sense-seg button[aria-pressed="true"].lv-3 { background: var(--primary); color: var(--on-primary); }
.signal-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.signal-input { width: 72px !important; text-align: center; font-size: 1.733333rem !important; padding: 6px !important; }
.sign-list { display: flex; flex-direction: column; gap: 8px; }
.sign-row { display: flex; align-items: center; gap: 10px; }
.sign-row b { flex: 1; }
.sign-row span { font-size: 0.866667rem; color: var(--ink-3); font-weight: 600; }
.sign-row span.ok { color: var(--primary); }
.debrief { border-color: color-mix(in srgb, var(--ember) 40%, var(--line)); }

/* ---------- vault ---------- */
.v-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.v-tile {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; padding: 14px; min-height: 84px;
  border-radius: var(--r); text-align: left; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--chip, var(--line)); box-shadow: var(--shadow);
}
.v-tile b { font: 650 1.066667rem/1.2 var(--f-display); color: var(--ink); }
.v-count { position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; gap: 4px; font-size: 0.8rem; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: var(--oat); color: var(--ink-2); }
.switch { width: 46px; height: 28px; border-radius: 99px; background: var(--line-strong); position: relative; flex: none; transition: background .2s; }
.switch > i { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #ffffff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25), 0 2px 6px rgba(0, 0, 0, .08); }
.v-kind { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--oat); color: var(--ink-2); flex: none; }
.vnote { padding: 24px 20px; border-radius: var(--r-lg); display: flex; flex-direction: column; gap: 12px; background: radial-gradient(240px 180px at 100% 0%, color-mix(in srgb, var(--ember) 12%, transparent), transparent 70%), var(--oat); }
.vn-title { font: 700 1.6rem/1.15 var(--f-display); letter-spacing: -.015em; }
.vn-text { font-size: 1.2rem; line-height: 1.55; white-space: pre-wrap; }
.vn-sign { display: flex; align-items: center; gap: 8px; font-weight: 650; color: var(--ink-2); }
.vn-media audio { width: 100%; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pager span { font-size: 0.9rem; color: var(--ink-3); font-weight: 600; }
.rec { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 18px; border-radius: var(--r); background: var(--oat); text-align: center; }
.rec audio { width: 100%; }
.rec-btn { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--ember); color: #ffffff; box-shadow: 0 8px 22px color-mix(in srgb, var(--ember) 35%, transparent); }
.rec-btn .ic { width: 28px; height: 28px; }
.rec-pulse { width: 60px; height: 60px; border-radius: 50%; background: var(--ember); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.82); opacity: .6; } }
.rec-timer { font: 700 1.733333rem var(--f-display); font-variant-numeric: tabular-nums; }
.upload { display: inline-flex; align-items: center; gap: 6px; font-size: 0.9rem; font-weight: 600; color: var(--primary); cursor: pointer; position: relative; }
.upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }

/* ---------- suggestions, nudges, ideas ---------- */
.sugg { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.sugg-k { font-size: 0.8rem; font-weight: 700; color: var(--ink-3); }
.sugg-chip { background: var(--oat); border-color: transparent; color: var(--ink-2); font-weight: 550; text-align: left; }
.sugg-chip:hover { background: var(--surface); border-color: var(--line-strong); }
.sugg-chip[aria-pressed="true"] { background: var(--primary-tint); border-color: var(--primary); color: var(--ink); font-weight: 650; }
.chip-more { background: transparent; border-style: dashed; color: var(--ink-3); }
.nudge-row { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; }
.nudge-row + .nudge-row { border-top: 1px solid var(--line); }
.rem-row { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; }
.rem-row + .rem-row { border-top: 1px solid var(--line); }
.nudge-who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nudge-who span { font-size: 0.866667rem; color: var(--ink-3); }
.nudge-times .chip { border-style: dashed; }
.nudge-times .chip[aria-pressed="true"] { border-style: solid; }


/* ---------- check-in: one question per screen ---------- */
.steps { display: flex; gap: 6px; justify-content: center; }
.steps i { width: 26px; height: 4px; border-radius: 99px; background: var(--line-strong); transition: background .3s; }
.steps i.on { background: var(--primary); }
.ci-moodbar { display: flex; align-items: center; gap: 10px; font: 650 1rem/1 var(--f-display); color: var(--ink-2); }
.picks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.picks-sm { display: flex; flex-wrap: wrap; }
.pick {
  position: relative; display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 12px 16px; border-radius: var(--r); text-align: left;
  font: 650 1.033333rem/1.25 var(--f-display); color: var(--ink); background: var(--surface); border: 1.5px solid var(--line-strong);
  transition: transform .14s var(--ease-out), background .25s, border-color .25s, color .25s;
}
.picks-sm .pick { min-height: 44px; padding: 9px 14px; border-radius: 99px; font: 600 0.966667rem/1.2 var(--f-body); }
.pick::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--chip); flex: none; opacity: .85; transition: transform .25s var(--ease-spring); }
.picks-sm .pick::before { width: 8px; height: 8px; }
.pick:active { transform: scale(.96); }
.pick[aria-pressed="true"] { background: var(--chip); border-color: var(--chip); color: #ffffff; }
.pick[aria-pressed="true"]::before { background: #ffffff; transform: scale(1.2); }
.b-opt[aria-pressed="true"] { border-color: var(--chip, var(--primary)); background: color-mix(in srgb, var(--chip, var(--primary)) 12%, var(--surface)); }
.b-opt[aria-pressed="true"] .ic { color: var(--chip, var(--primary)); }
.b-opt[aria-pressed="true"] .radio { border: 6px solid var(--chip, var(--primary)); }
.preview { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: var(--r); background: var(--oat); }
.in-sheet .mood-pill { max-width: 46px; border-radius: 14px; }
.in-sheet { justify-items: center; }
.preview-k { margin-bottom: 8px; }
.preview-line { font: 650 1.2rem/1.35 var(--f-display); }
.preview .ci-note { background: var(--surface); }
.off-btn { width: 100%; text-align: left; }
.preview .boundary.sm { margin: 0; background: var(--surface); }
/* A tapped choice blooms: a ring of its own color opens out and fades. The animation stays on
   the control itself. Rows (toggles, options) animate only their switch or radio dot. */
.bloom { animation: bloom .5s var(--ease-out); }
@keyframes bloom { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--chip, var(--primary)) 50%, transparent); transform: scale(.96); } 45% { transform: scale(1.03); } 100% { box-shadow: 0 0 0 12px transparent; transform: scale(1); } }
@keyframes press { 0% { transform: scale(.8); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
.mood-btn.bloom, .tog-row.bloom, .b-opt.bloom, .seg-btn.bloom, .sense-seg .bloom, .draft.bloom, .feel-row.bloom { animation: none; }
.mood-btn.bloom .mood-pill { animation: bloom .5s var(--ease-out); }
.b-opt.bloom .radio { animation: press .35s var(--ease-spring); }

/* topics come six at a time */
.picks.page-in .pick { animation: view-in .32s var(--ease-out) both; }
.picks.page-in .pick:nth-child(2) { animation-delay: .03s; } .picks.page-in .pick:nth-child(3) { animation-delay: .06s; }
.picks.page-in .pick:nth-child(4) { animation-delay: .09s; } .picks.page-in .pick:nth-child(5) { animation-delay: .12s; } .picks.page-in .pick:nth-child(6) { animation-delay: .15s; }
.more-topics { align-self: stretch; }
/* The spin reel */
.reel-card { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; border-radius: var(--r); background: var(--primary-tint); }
.reel { flex: 1; height: 52px; overflow: hidden; border-radius: 14px; background: var(--surface); position: relative;
  -webkit-mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent); mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent); }
.reel-card:not(.is-spinning) .reel { -webkit-mask-image: none; mask-image: none; }
.reel-strip { display: flex; flex-direction: column; will-change: transform; }
.reel-item { height: 52px; flex: none; display: flex; align-items: center; gap: 10px; padding: 0 14px; font: 650 1.133333rem/1 var(--f-display); color: var(--ink); white-space: nowrap; overflow: hidden; }
.reel-item::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--chip, var(--ink-3)); flex: none; }
.reel-idle { color: var(--ink-2); font: 600 1rem/1 var(--f-body); }
.reel-idle::before { display: none; }
.reel-pick { width: 100%; text-align: left; justify-content: flex-start; }
.reel-pick .ic-sm { margin-left: auto; color: var(--ink-3); }
.reel-pick[aria-pressed="true"] { background: color-mix(in srgb, var(--chip) 16%, var(--surface)); }
.reel-pick[aria-pressed="true"] .ic-sm { color: var(--primary); }
.reel-btn { flex: none; min-width: 92px; }
.is-spinning .reel-btn { opacity: .6; pointer-events: none; }
.reel-land .reel { animation: reel-land .7s var(--ease-out); }
@keyframes reel-land { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--glow) 70%, transparent); transform: scale(1); } 35% { transform: scale(1.03); } 100% { box-shadow: 0 0 0 14px transparent; transform: scale(1); } }
/* topics: picked elsewhere, page dots */
.tags.also { align-items: center; min-height: 26px; }
.tags.also > span { font-size: 0.866667rem; color: var(--ink-3); margin-right: 2px; }
button.tag { display: inline-flex; align-items: center; gap: 4px; }
.explain .of { float: right; color: var(--ink-3); font-size: 0.866667rem; }
.page-dots { display: inline-flex; gap: 4px; margin-left: 4px; }
.page-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); }
.page-dots i.on { background: var(--primary); }
.tag-on { display: inline-flex; align-items: center; gap: 4px; background: var(--primary-tint); color: var(--ink); }
/* press and hold to send: a quick signal or the exit signal fills while you hold */
.quick > * { position: relative; }
.quick::before { content: ""; position: absolute; inset: 0; background: var(--primary-tint); transform: scaleX(0); transform-origin: left; }
.quick.holding::before { transform: scaleX(1); transition: transform .65s linear; }
.quick.holding { transform: scale(.98); }
.exit-live { display: flex; align-items: center; gap: 14px; padding: 14px 14px 14px 16px; border-radius: var(--r); background: var(--surface); border: 1.5px solid var(--ember); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ember) 14%, transparent); }
.exit-live > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.exit-live .eyebrow { color: var(--ember); margin: 0; }
.exit-live b { font: 650 1.066667rem/1.25 var(--f-display); }
.exit-live small { font-size: 0.866667rem; color: var(--ink-2); }
.exit-btn { position: relative; flex: none; width: 64px; height: 64px; border-radius: 50%; font-size: 2.133333rem; display: grid; place-items: center; background: var(--oat); overflow: hidden;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }
.exit-btn::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: color-mix(in srgb, var(--ember) 40%, transparent); transform: scale(0); }
.exit-btn.holding::before { transform: scale(1); transition: transform .65s linear; }
.exit-btn.holding { transform: scale(.94); }
.quick.armed, .exit-btn.armed { outline: 2px solid var(--ember); outline-offset: 2px; }
.exit-btn.nudge-hold, .quick.nudge-hold { animation: shake-x .3s ease; }
@keyframes shake-x { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
/* gameplans: kid-only parts, the exit signal, what changed since a sign-off */
.readonly { padding: 12px 14px; border-radius: var(--r-sm); background: var(--oat); color: var(--ink-2); white-space: pre-wrap; }
.signal-grid { flex-basis: 100%; display: grid; grid-template-columns: repeat(6, 40px); gap: 6px; }
.plan-sec .f-label { margin: 4px 0 -4px; }
.signal-hint { font-size: 0.866667rem; color: var(--ink-3); }
.changed { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--ember) 10%, var(--surface)); font-size: 0.933333rem; }
.changed > b { display: flex; align-items: center; gap: 6px; color: var(--ember); font-size: 0.866667rem; }
.changed p span { display: block; font-size: 0.8rem; color: var(--ink-3); }
.changed s { color: var(--ink-3); }
.exit-plan { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--ember) 12%, var(--surface)); }
.exit-plan span { font-size: 0.8rem; color: var(--ink-3); }
.exit-plan b { font-size: 1rem; }
/* suggestion chips next to a field */
.sugg + textarea, .sugg + input { margin-top: 10px; }
.field > .sugg, .f-label + .sugg { margin-top: 0; }
/* vault: the note editor */
.for-feel { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--oat); }
.for-feel span { font-size: 0.833333rem; font-weight: 700; color: var(--ink-3); }
.for-feel b { font: 700 1.333333rem/1.2 var(--f-display); }
/* promises and times */
.chip-time { display: block; font-size: 0.733333rem; font-weight: 500; color: var(--ink-3); margin-top: 1px; }
.chip:has(.chip-time) { display: inline-flex; flex-direction: column; align-items: flex-start; text-align: left; line-height: 1.2; padding: 7px 12px; border-radius: 12px; height: auto; min-height: 0; }
.promise-btns { display: flex; flex-direction: column; gap: 6px; flex: none; }
/* settings */
.person-h { font: 650 1.066667rem/1 var(--f-display); }
.nudge-at { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 0.866667rem; color: var(--ink-2); }
.nudge-at input { width: auto; padding: 6px 10px; }
/* new */

/* ---------- help lines ---------- */
button.help-line { width: 100%; text-align: left; align-items: center; }
.help-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.help-row + .help-row { border-top: 1px solid color-mix(in srgb, var(--ink) 10%, transparent); }
.help-row > div:first-child { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.help-row span { font-size: 0.933333rem; }
.help-row small { font-size: 0.833333rem; color: var(--ink-3); }
.help-btns { display: flex; gap: 6px; flex: none; }
.help-btns .btn { text-decoration: none; }

/* ---------- nudges, asks, coach ---------- */
.nudge-card, .nudge-row-card, .ask-card { display: flex; align-items: center; gap: 12px; }
.nudge-card > span:not(.avatar), .nudge-row-card > span:not(.avatar), .ask-card > span:not(.avatar), .ask-row > span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.nudge-card small, .nudge-row-card small, .ask-card small, .ask-row small { font-size: 0.866667rem; color: var(--ink-3); }
.nudge-card { background: var(--primary-tint); border-color: transparent; }
.ask-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; color: var(--ink-3); }
.ask-row b { color: var(--ink); }
.asked { margin-top: 10px; }
.ci-summary { font: 650 1.2rem/1.35 var(--f-display); }
.coach-btn { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 14px 16px; border-radius: var(--r); background: var(--primary-tint); color: var(--ink); }
.coach-btn > .ic:first-child { color: var(--primary); }
.coach-btn > span { flex: 1; display: flex; flex-direction: column; }
.coach-btn small { font-size: 0.866667rem; color: var(--ink-2); }
.coach-box { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: var(--r); background: var(--primary-tint); }
.coach-box.is-loading, .coach-box .is-loading { flex-direction: row; align-items: center; gap: 10px; display: flex; color: var(--ink-2); font-weight: 600; font-size: 0.933333rem; }
.coach-head { display: flex; align-items: center; justify-content: space-between; }
.coach-head b { display: inline-flex; align-items: center; gap: 6px; font: 650 1rem/1 var(--f-display); }
.coach-head .link-btn { align-self: auto; padding: 0; }
.draft { display: flex; flex-direction: column; gap: 3px; text-align: left; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1.5px solid transparent; font-size: 1rem; line-height: 1.45; }
.draft small { font-size: 0.766667rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
button.draft:hover { border-color: var(--line-strong); }
.draft[aria-pressed="true"] { border-color: var(--primary); }
.coach-dots { display: inline-flex; gap: 4px; }
.coach-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); animation: dots 1s ease-in-out infinite; }
.coach-dots i:nth-child(2) { animation-delay: .15s; } .coach-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dots { 0%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.tone-now { margin-left: auto; min-height: 30px; padding: 4px 12px; font-size: 0.866667rem; }

/* ---------- vault: parent ---------- */
.feel-list { padding: 2px 16px; }
.feel-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 13px 0; text-align: left; color: var(--ink-3); }
.feel-row + .feel-row { border-top: 1px solid var(--line); }
.feel-row > span { flex: 1; display: flex; flex-direction: column; }
.feel-row b { font: 650 1.066667rem/1.25 var(--f-display); color: var(--ink); }
.feel-row small { font-size: 0.866667rem; color: var(--ink-3); }
.feel-n, .feel-add { font-style: normal; font-size: 0.8rem; font-weight: 700; padding: 3px 9px; border-radius: 99px; display: inline-flex; align-items: center; gap: 4px; }
.feel-n { background: var(--oat); color: var(--ink-2); }
.feel-add { background: var(--primary-tint); color: var(--primary); }
.v-note { display: flex; flex-direction: column; gap: 10px; }
.v-note header { display: flex; align-items: center; gap: 12px; }
.v-note header div { display: flex; flex-direction: column; }
.v-note header small { font-size: 0.833333rem; color: var(--ink-3); }
.v-note p { white-space: pre-wrap; color: var(--ink-2); }
.v-note footer { display: flex; gap: 8px; }

/* ---------- test drive ---------- */
.demo-phone { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 26px; border: 1.5px solid var(--line-strong); background: var(--bg); box-shadow: var(--shadow); }
.demo-cap { display: flex; align-items: center; gap: 6px; justify-content: center; font-size: 0.833333rem; font-weight: 650; color: var(--ink-3); }
.demo-step { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); }
.demo-q { font: 700 1.6rem/1.15 var(--f-display); letter-spacing: -.02em; }
.demo-next { align-self: flex-end; }
.demo-push { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 0.9rem; }
.demo-card { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.demo-card .boundary.sm { margin: 0; }
.demo-end { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 12px 0; }
.testing { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: var(--r); background: var(--glow-tint); border: 2px solid var(--glow); }
.testing-k { align-self: flex-start; font: 700 0.733333rem/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase; padding: 5px 9px; border-radius: 99px; background: var(--glow); color: #2b1a00; }
.testing-row { display: flex; align-items: center; gap: 10px; font-size: 1.033333rem; }
.testing-btn { background: var(--primary); color: var(--on-primary); border-color: transparent; }
.testing p { font-size: 0.866667rem; color: var(--ink-2); }
.sheet-back { margin-left: -10px; }

/* ---------- the lantern glow ---------- */
.glow { position: absolute; inset: 0; z-index: 72; pointer-events: none; overflow: hidden; overflow: clip; touch-action: none; opacity: 0; transition: opacity .9s ease; }
.glow.is-on { opacity: 1; }
.glow.is-closing { opacity: 0; pointer-events: none; }
.glow-light {
  position: absolute; left: 50%; top: calc(34% + 52px); width: 300px; height: 300px; margin: -150px 0 0 -150px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--glow) 42%, transparent) 0%, color-mix(in srgb, var(--glow) 16%, transparent) 45%, transparent 70%);
  transform: scale(.5); opacity: 0; transition: transform 1.6s cubic-bezier(.2, .7, .2, 1), opacity 1.2s ease;
}
.glow.is-on .glow-light { transform: scale(1); opacity: 1; }
.glow-flies { position: absolute; inset: 0; width: 100%; height: 100%; }
.glow-center { position: absolute; left: 0; right: 0; top: 34%; display: flex; flex-direction: column; align-items: center; gap: 14px; pointer-events: none; }
.glow-lamp { opacity: 0; transform: scale(.8); transition: opacity 1.1s ease .25s, transform 1.4s var(--ease-out) .25s; filter: drop-shadow(0 0 26px var(--glow)); }
.glow.is-on .glow-lamp { opacity: 1; transform: scale(1); }
.logo-glow { width: 104px; height: 104px; }
.logo-glow .logo-halo { animation: none; opacity: .3; }
.glow-word { margin: 0; padding: 6px 16px; border-radius: 99px; background: color-mix(in srgb, var(--surface) 92%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: var(--shadow); font: 700 1.733333rem/1.15 var(--f-display); letter-spacing: -.015em; color: var(--ink); opacity: 0; transform: translateY(6px); transition: opacity .9s ease .6s, transform 1.1s var(--ease-out) .6s; }
.glow.is-on .glow-word { opacity: 1; transform: none; }

/* ---------- things move, they don't vanish (PL.flipPlay) ---------- */
/* Stand-ins for things on their way out sit in this layer above the screen, under the bars. */
.flip-layer { position: absolute; inset: 0; z-index: 4; overflow: hidden; pointer-events: none; }
.sheet > .flip-layer { z-index: 3; }

/* ---------- feedback: hints, toasts, urgent alerts ---------- */
/* A hint floats over the screen next to the button, so nothing moves. */
.hint { position: absolute; z-index: 70; max-width: min(300px, calc(100% - 16px)); padding: 8px 12px; border-radius: 12px; background: var(--primary); color: var(--on-primary); font-size: 0.9rem; font-weight: 600; line-height: 1.35; box-shadow: var(--shadow); pointer-events: none; animation: fade .18s ease; transition: opacity .25s; }
.hint.out { opacity: 0; }
.nope { animation: shake-x .3s ease; }
.toast-root, .push-root { position: absolute; left: 0; right: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding-inline: 12px; }
.toast-root { bottom: calc(76px + var(--sa-bottom)); }
.push-root { top: calc(8px + var(--sa-top)); }
.pane.sheet-open .toast-root { bottom: auto; top: calc(10px + var(--sa-top)); }
/* With a sheet open, notifications shrink to one line above it, so they never cover its buttons. */
.pane.sheet-open .push-root .push { padding-block: 6px; }
.pane.sheet-open .push-root .push-app, .pane.sheet-open .push-root .push br, .pane.sheet-open .push-root .push-go { display: none; }
.pane.sheet-open .push-root .push > div > span:last-child { display: block; max-height: 1.35em; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pane.sheet-open .push-root .toast + .toast { display: none; }
.pane.sheet-open .push-root .push b::after { content: ' · '; font-weight: 400; }
.toast {
  pointer-events: auto; max-width: 520px; width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  border-radius: 16px; background: var(--toast); color: var(--toast-ink); box-shadow: var(--shadow-lg); font-size: 0.966667rem;
  animation: rise .25s ease; transition: opacity .25s, transform .25s;
}
.toast.out { opacity: 0; transform: translateY(6px); }
.toast-msg { flex: 1; min-width: 0; }
.toast-msg ul { margin-top: 4px; display: flex; flex-direction: column; gap: 2px; opacity: .82; font-size: 0.9rem; }
.toast-msg li::before { content: "· "; }
.toast-btn { font-weight: 700; color: var(--glow-core); padding: 4px 6px; }
.toast-warn { background: var(--stop); color: #ffffff; }
.toast-push { cursor: pointer;
  background: color-mix(in srgb, var(--surface) 94%, transparent); color: var(--ink); border: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); animation: drop .35s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes drop { from { transform: translateY(-24px); opacity: 0; } }
.push { display: flex; gap: 10px; align-items: flex-start; }
.push .logo { margin-top: 2px; }
.push > div { flex: 1; display: flex; flex-direction: column; font-size: 0.933333rem; }
.push-go { color: var(--ink-3); align-self: center; }
.push-app { font-size: 0.766667rem; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }

/* ---------- motion ---------- */
/* Rough check-in: an alert the parent can't miss */
.urgent-bar { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); background: var(--m1); color: #ffffff; animation: urgent 1.6s ease-in-out infinite; animation-delay: var(--sync, 0s); }
.urgent-stack .urgent-bar + .urgent-bar { border-top: 1px solid rgba(255,255,255,.18); }
.urgent-bar > span { flex: 1; display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.urgent-bar small { font-size: 0.833333rem; opacity: .85; }
.urgent-bar i { font-style: normal; font-weight: 700; font-size: 0.866667rem; padding: 6px 12px; border-radius: 99px; background: #ffffff; color: var(--m1); flex: none; }
@keyframes urgent { 50% { filter: brightness(1.22); } }
.toast-urgent { background: var(--m1); color: #ffffff; border-color: transparent; animation: drop .35s var(--ease-spring), nag 2.4s ease-in-out infinite 1s; }
.toast-urgent .push-app, .toast-urgent .push-go { color: rgba(255, 255, 255, .8); }
@keyframes nag { 0%, 84%, 100% { transform: none; } 88% { transform: rotate(-1.4deg) scale(1.02); } 92% { transform: rotate(1.4deg) scale(1.02); } 96% { transform: rotate(-.8deg); } }
.badge.num.urgent { background: var(--stop); animation: badge-urgent .9s ease-in-out infinite; animation-delay: var(--sync, 0s); }
@keyframes badge-urgent { 50% { transform: scale(1.3); box-shadow: 0 0 0 2px var(--surface), 0 0 0 7px color-mix(in srgb, var(--stop) 30%, transparent); } }
.ci-card.is-urgent { border-color: var(--m1); box-shadow: 0 0 0 2px var(--m1), var(--shadow); }
:root { --ease-out: cubic-bezier(.2, .8, .2, 1); --ease-spring: cubic-bezier(.3, .7, .4, 1.5); --ease-ios: cubic-bezier(.32, .72, 0, 1); }

/* Views ease in when you change tabs; their sections follow one after another. */
.main.view-enter > * { animation: view-in .28s var(--ease-out) both; }
.main.view-enter > :nth-child(2) { animation-delay: .02s; }
.main.view-enter > :nth-child(3) { animation-delay: .04s; }
.main.view-enter > :nth-child(4) { animation-delay: .06s; }
.main.view-enter > :nth-child(n+5) { animation-delay: .08s; }
@keyframes view-in { from { opacity: .15; transform: translateY(6px); } }
/* Switching kids: the picker you tapped stays put (its highlight slides); the porch changes under it. */
.main.view-enter.kid-switch > .porch-pick { animation: none; }
.tabbar.tab-enter .tab[aria-current="page"] .tab-ic { animation: tab-hop .45s var(--ease-spring); }
@keyframes tab-hop { 40% { transform: translateY(-3px) scale(1.08); } }

/* Taps: toggles, chips, faces and checks pop. */
.btn, .chip, .quick, .teaser, .v-tile, .ev-card, .seg-btn, .b-opt { transition: transform .14s var(--ease-out), background .2s, border-color .2s, box-shadow .2s; }
.quick:active, .teaser:active, .v-tile:active, .ev-card:active, .b-opt:active, .chip:active { transform: scale(.97); }

/* Sheets slide back down past the bottom edge when closed (from wherever a drag left them). */
.sheet-root.leaving { pointer-events: none; }
.sheet-root.leaving .sheet { animation: sheet-down .3s cubic-bezier(.4, 0, .9, .6) both; }
.sheet-root.leaving .scrim { animation: fade-out .3s ease both; }
@keyframes sheet-down { to { transform: translateY(100%); } }
@keyframes box-in { from { transform: translateY(24px) scale(.98); opacity: 0; } }
@keyframes box-out { to { transform: translateY(24px) scale(.98); opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }

/* The other person's answer un-blurs when you unlock it. */

/* Two-week calendar faces pop in one after another; plan rings fill in. */
.view-enter .mw-cell .face { animation: face-in .4s var(--ease-spring) both; animation-delay: calc(var(--i, 0) * 25ms + .15s); }
@keyframes face-in { from { transform: scale(.4); opacity: 0; } }
.view-enter .ring-fill { animation: ring-in .9s var(--ease-out) both .15s; }
@keyframes ring-in { from { stroke-dasharray: 0 999; } }
.view-enter .meter i { animation: bar-in .8s var(--ease-out) both .15s; }
@keyframes bar-in { from { width: 0; } }

/* New things glow in; unread badges breathe. */
.ci-card.is-new { animation: new-in .6s var(--ease-out) both; }
@keyframes new-in { from { opacity: 0; transform: translateY(-8px) scale(.98); } }
.badge { animation: badge 2.4s ease-in-out infinite; animation-delay: var(--sync, 0s); }
@keyframes badge { 50% { box-shadow: 0 0 0 2px var(--surface), 0 0 0 5px color-mix(in srgb, var(--ember) 25%, transparent); } }

/* ---------- wider ---------- */
@media (min-width: 560px) {
  .teasers { grid-template-columns: 1fr 1fr; }
  .teasers > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .v-grid { grid-template-columns: repeat(3, 1fr); }
  .quick-grid { grid-template-columns: repeat(4, 1fr); }
  .quick { flex-direction: column; align-items: flex-start; }
  .sense-row { flex-direction: row; align-items: center; justify-content: space-between; }
  .sense-seg { width: 340px; flex: none; }
}
@media (min-width: 900px) {
  :root { --col: 760px; }
  .board { display: grid; grid-template-columns: repeat(3, 1fr); align-items: start; }
}
@media (max-width: 370px) {
  .mood-lbl { font-size: 0.666667rem; }
  .hero-title { font-size: 1.866667rem; }
  .h-page { font-size: 1.733333rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- the family: who it goes to, whose space, cards and short threads ---------- */
.av-stack { display: inline-flex; }
.av-stack .avatar { box-shadow: 0 0 0 2px var(--bg); }
.av-stack .avatar + .avatar { margin-left: -10px; }
.to-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.to-bar > span { font-size: 0.866667rem; font-weight: 650; color: var(--ink-3); margin-right: 2px; }
.to-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 5px; border-radius: 99px; border: 1.5px solid var(--line-strong); background: var(--surface); font-size: 0.933333rem; font-weight: 600; color: var(--ink-3); }
.to-pill .avatar { opacity: .45; }
.to-pill[aria-pressed="true"] { border-color: var(--primary); color: var(--ink); background: var(--primary-tint); }
.to-pill[aria-pressed="true"] .avatar { opacity: 1; }
.sheet-foot .to-bar { margin-bottom: 4px; justify-content: center; }
.set-sec .to-bar > span { display: none; }
.note-bar { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 14px; padding: 12px 14px; border-radius: 99px; background: var(--surface); border: 1.5px solid var(--line); color: var(--ink-3); font-size: 1rem; text-align: left; }
.note-bar .ic { color: var(--primary); }
/* porch picker: an adult with several kids, top of Home, Gameplans and Vault */
.porch-pick { display: flex; flex-direction: column; gap: 8px; }
.porch-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 99px; background: var(--tray); }
.porch-tab { flex: 1; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 99px; font-weight: 650; font-size: 1rem; color: var(--ink-2); }
.porch-tab > span:not(.avatar) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.porch-tab .avatar { flex: none; opacity: .55; }
.porch-tab[aria-selected="true"] { background: var(--segment); color: var(--ink); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.porch-tab[aria-selected="true"] .avatar { opacity: 1; }
.porch-tab .badge { position: static; flex: none; box-shadow: none; }
.porch-note { font-size: 0.833333rem; color: var(--ink-3); text-align: center; line-height: 1.4; }
.ci-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; }
.ci-row > span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ci-row b { font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ci-row small { font-size: 0.833333rem; color: var(--ink-3); }
.ci-row em { font-style: normal; font-size: 0.9rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ci-row.is-new { border-color: color-mix(in srgb, var(--ember) 45%, var(--line)); background: linear-gradient(180deg, var(--ember-tint), var(--surface) 70%); }
.ci-row.is-new em { color: var(--ink); font-weight: 600; }
.see-all { margin-top: 8px; }
.ci-row .face, .ci-row .avatar { flex: none; }
.thread { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.msg { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; max-width: 88%; }
.msg.mine { align-self: flex-end; align-items: flex-end; }
.msg.mine .bubble { background: var(--primary-tint); border-top-right-radius: 6px; }
.msg.theirs .bubble { border-top-left-radius: 6px; }
.msg-who { display: inline-flex; align-items: center; gap: 5px; font-size: 0.8rem; font-weight: 650; color: var(--ink-3); }
.msg-emoji { font-size: 1.866667rem; line-height: 1; }
.msg-status { display: inline-flex; align-items: center; gap: 5px; font-size: 0.9rem; color: var(--ink-2); font-weight: 600; }
.msg-when { font-size: 0.733333rem; color: var(--ink-3); }
.sheet-foot > .to-bar { margin-bottom: 8px; }
.to-pill:disabled { opacity: .45; }
.reply-row { display: flex; gap: 8px; justify-content: center; margin-bottom: 8px; }
.coord { font-size: 0.833333rem; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.coord .ic { color: var(--ok, var(--primary)); }
.pick-people { display: flex; flex-wrap: wrap; gap: 6px; }
.member-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; width: 100%; text-align: left; }
.member-row + .member-row { border-top: 1px solid var(--line); }
.member-row > span:not(.avatar) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.member-row small { font-size: 0.833333rem; color: var(--ink-3); }
/* settings: switch to anyone's phone while testing */
.testing-who { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.testing-who .testing-btn { width: auto; display: inline-flex; align-items: center; gap: 6px; }

/* ---------- feeling native ----------
   Pages pushed from a list (a gameplan, a feeling's notes) slide in over it, the way a phone's
   own navigation does, and slide away again on Back or a swipe from the left edge. */
.pane-body { position: relative; }
.pane-scroll.in-fwd, .pane-scroll.in-back { position: relative; background: var(--bg); }
.pane-ghost { position: absolute; left: 0; right: 0; overflow: hidden; pointer-events: none; background: var(--bg); }
.pane-ghost.out-fwd { z-index: 1; }
.pane-ghost.out-back { z-index: 3; }
.pane-ghost.peek { z-index: 0; transform: translateX(-28%); opacity: .6; }
.pane-scroll.dragging { position: relative; z-index: 2; background: var(--bg); }
/* A copy of the old page is a still picture of it: nothing inside it starts over. */
.pane-ghost *, .step-ghost * { animation: none !important; }
/* The way back stays at the top of a pushed page while it scrolls, like a navigation bar. */
.nav-back {
  position: sticky; top: 0; z-index: 4; margin: -22px -16px -18px; padding: 10px 16px 8px;
  background: color-mix(in srgb, var(--bg) 86%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
}
.nav-back .back { margin: 0; }
/* Segmented controls and the porch picker: the highlight slides to what you picked. */
.seg, .porch-tabs { position: relative; }
.seg-thumb { position: absolute; z-index: 0; border-radius: 99px; background: var(--segment); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); pointer-events: none; }
.thumb-anim > .seg-btn, .thumb-anim > .porch-tab { position: relative; z-index: 1; }
.thumb-anim > [aria-pressed="true"], .thumb-anim > [aria-selected="true"] { background: transparent !important; box-shadow: none !important; }
/* Taps feel like an app, not a page: no text selection or callout menu on buttons and labels,
   while anything someone wrote (messages, notes, fields) can still be selected and copied. */
.tabbar, .sheet-head, button, .chip, .pick, .tag, .pill, .badge, .eyebrow, .h-sec, .mood-lbl, .seg, .porch-pick, .tog-row, .grabber {
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.bubble, .ci-note, .ci-summary, .vn-text, input, textarea { -webkit-user-select: text; user-select: text; }
@media (pointer: coarse) { textarea { resize: none; } }
/* On an adult's Home the warm-note bar comes first, so the heading stays with the card it's about. */
.note-bar.note-bar-top { margin: 4px 0 18px; }
/* Quick signals: the heading and who they go to, on one row. */
.qs-head { flex-wrap: wrap; row-gap: 6px; margin-bottom: 12px; }
.qs-head > div:first-child { display: flex; flex-direction: column; gap: 1px; }
.qs-head .fine { font-size: 0.833333rem; }
.qs-head .to-bar { margin: 0; flex-wrap: wrap; min-width: 0; }
.qs-head .to-bar > span { font-size: 0.833333rem; }
.qs-head .to-pill { padding: 2px 10px 2px 3px; font-size: 0.866667rem; gap: 5px; }
.qs-head .to-pill .avatar { width: 22px; height: 22px; }
.invite-btn { margin-top: 10px; align-self: flex-start; }
.plan-card { display: flex; padding: 14px 16px; margin-bottom: 10px; }
.plan-card span { display: flex; flex-direction: column; gap: 2px; }
.plan-card small { font-size: 0.866667rem; color: var(--ink-3); }
/* A family group with nobody else in it yet: a quiet dashed outline, not a squashed card. */
.empty-group { padding: 14px 16px; border: 1.5px dashed var(--line-strong); border-radius: var(--r); font-size: 0.933333rem; color: var(--ink-2); line-height: 1.45; }
/* Setting up someone's phone: the QR to point a camera at, and the digits to type. */
.pair-qr { align-self: center; width: min(220px, 70%); aspect-ratio: 1; padding: 10px; border-radius: var(--r); background: #ffffff; border: 1px solid var(--line); }
.pair-qr svg { display: block; width: 100%; height: 100%; }
.pair-code { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.pair-code span { font-size: 0.866667rem; color: var(--ink-3); font-weight: 600; }
.pair-code b { font: 700 2.266667rem/1.1 var(--f-display); letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.pair-code small { font-size: 0.866667rem; color: var(--ink-3); }
.code-input { font: 700 1.733333rem/1.2 var(--f-display); letter-spacing: .12em; text-align: center; font-variant-numeric: tabular-nums; }
/* A kid's birthday: two short boxes, MM / YYYY. */
.born-row { display: flex; align-items: center; gap: 8px; color: var(--ink-3); }
.born-row input { text-align: center; font-variant-numeric: tabular-nums; }
.born-row .born-m { width: 4.5em; }
.born-row .born-y { width: 6em; }
.young-points { display: grid; gap: 8px; margin: 12px 0; padding-inline-start: 1.25em; list-style: disc; }
.young-note { margin-top: 10px; }
/* Someone opened in the family list is part of that list, not a card inside a card: no box of
   its own, just the same dividers as the rows around it. */
.list-card > .person-card { padding: 14px 0; border: 0; border-radius: 0; background: none; }
.list-card > .person-card + .member-row, .list-card > .member-row + .person-card, .list-card > .person-card + .person-card { border-top: 1px solid var(--line); }
/* Help for the adult when a kid's words sound serious: calm, unmissable, never alarming. */
.safety { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: var(--r-sm); background: var(--warn-tint); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); }
.safety b { font: 650 1.033333rem/1.3 var(--f-display); color: var(--ink); }
.safety p { font-size: 0.933333rem; line-height: 1.45; color: var(--ink); }
.safety small { font-size: 0.833333rem; color: var(--ink-2); }
.safety .help-btns { display: flex; gap: 8px; }
.ask-note { margin-top: -6px; }


/* Keep compact controls comfortably tappable without overlapping hit areas. */
button.chip, .btn-small, .seg-btn, .porch-tab, .to-pill, .sense-seg button, .back, .link-btn { min-height: 44px; min-width: 44px; }
.back { display: inline-flex; align-items: center; }
.seg-btn { white-space: normal; min-width: 0; overflow-wrap: anywhere; }
.main, .sheet-body, .sheet-foot { overflow-wrap: anywhere; }
.kid-welcome { display: grid; gap: 8px; padding-block: 12px; }

/* The family pass (pass.js): the card on an adult's Home, and the sheet's plans. */
.pass-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; background: var(--glow-tint, var(--surface)); }
.pass-card > span:last-child { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pass-card small { color: var(--ink-2); }
.pass-card .row-actions { margin-top: 6px; }
.pass-ic { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--primary); }
.pass-list { list-style: none; margin: 10px 0 14px; padding: 0; display: grid; gap: 6px; }
.pass-list li { display: flex; gap: 8px; align-items: center; }
.plan-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 12px; }
.plan-opt { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); text-align: left; min-height: 44px; }
.plan-opt[aria-pressed="true"] { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.plan-price { font-size: 1.25rem; font-weight: 700; }
.plan-price small { font-size: .8rem; font-weight: 500; color: var(--ink-2); }
.plan-note { position: absolute; top: -9px; right: 10px; font-style: normal; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--primary); color: var(--on-primary); }

/* The welcome screen (app.js): a phone that isn't in a family yet. */
.welcome-top { padding-top: 24px; }
.welcome-ask { margin-bottom: 12px; }
.welcome-list { display: grid; gap: 12px; }
.welcome-row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 72px; padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-align: left; box-shadow: var(--shadow-sm); }
.welcome-row > span:not(.welcome-ic) { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.welcome-row b { font-weight: 700; }
.welcome-row small { color: var(--ink-2); font-weight: 400; line-height: 1.4; }
.welcome-ic { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--oat); }
.welcome-fine { margin-top: 12px; }
.choice-list { display: grid; gap: 12px; margin-top: 4px; }

/* The notice a parent reads before agreeing to the privacy policy (views-account.js). */
.direct-notice { padding: 12px 14px; margin: 4px 0 10px; }
.direct-notice ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 6px; }
.direct-notice li { font-size: .9rem; line-height: 1.4; color: var(--ink-2); }

/* A person's phones (Settings → People), and the check number when a phone joins. */
.phones .phone-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.phones .phone-row:first-of-type { border-top: 0; }
.phones .phone-row > span { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.phones .phone-row small { color: var(--ink-2); }
.pair-check { font-size: 1rem; }
.pair-check b { font-size: 1.6rem; letter-spacing: .12em; margin-left: 6px; }
.build-line { text-align: center; margin-top: 18px; }
