/* ==========================================================
   Chore & Calm – styles
   Sizes use rem. Root size changes with the Text size setting,
   so everything (text, buttons, tap targets) grows together.
   ========================================================== */

/* ---------- Text size ---------- */
html { font-size: 100%; }
html[data-text="large"] { font-size: 112.5%; }
html[data-text="xl"] { font-size: 125%; }

/* ---------- Themes (soft pastels) ---------- */
:root,
html[data-theme="meadow"] {
  --bg: #EEF8F1;
  --bg2: #DFF2E7;
  --surface: #FFFFFF;
  --surface2: #F6FBF8;
  --ink: #2B3A35;
  --muted: #5E6F69;
  --line: #D3E6DB;
  --primary: #4FA57E;
  --primary-soft: #D5EFE1;
  --primary-ink: #FFFFFF;
  --accent: #F6C453;
  --accent-soft: #FDF0CB;
  --danger: #C8546A;
  --danger-soft: #FBE3E8;
  --warn: #9A6A10;
  --blob1: #FCE6A4;
  --blob2: #F8CFD8;
  --blob3: #C4E1F6;
}
html[data-theme="sky"] {
  --bg: #EEF6FD; --bg2: #DCEEFB; --surface2: #F5FAFE; --ink: #26364A; --muted: #586A80; --line: #D2E3F2;
  --primary: #4C8FD0; --primary-soft: #D7E9F9; --blob1: #FCE6A4; --blob2: #D8F0E3; --blob3: #E3DAF6;
}
html[data-theme="blossom"] {
  --bg: #FDF1F4; --bg2: #FBE3EA; --surface2: #FEF7F9; --ink: #3E2C33; --muted: #75606A; --line: #F1D7DF;
  --primary: #C9668A; --primary-soft: #F8DCE6; --blob1: #FCE6A4; --blob2: #D8EFE6; --blob3: #DDE9FA;
}
html[data-theme="peach"] {
  --bg: #FEF4EC; --bg2: #FDE8D8; --surface2: #FFF9F4; --ink: #3D2F26; --muted: #76655A; --line: #F2DCCB;
  --primary: #D27B45; --primary-soft: #FBE1CF; --blob1: #FCEFB4; --blob2: #F8D3DA; --blob3: #D7ECF5;
}
html[data-theme="lavender"] {
  --bg: #F5F1FC; --bg2: #ECE5F8; --surface2: #FAF8FE; --ink: #302A45; --muted: #665F7E; --line: #E0D8F1;
  --primary: #7F69C4; --primary-soft: #E5DDF7; --blob1: #FCE6A4; --blob2: #F8D3E0; --blob3: #CFEADF;
}

/* High contrast: white page, dark ink, strong outlines */
html.hc {
  --bg: #FFFFFF; --bg2: #FFFFFF; --surface: #FFFFFF; --surface2: #FFFFFF;
  --ink: #000000; --muted: #1F1F1F; --line: #000000;
  --primary: #0B5C3A; --primary-soft: #E5F2EB; --primary-ink: #FFFFFF;
  --danger: #A0001E; --warn: #6B4300;
  --blob1: transparent; --blob2: transparent; --blob3: transparent;
}
html.hc .card, html.hc .btn, html.hc .input, html.hc .kidbubble, html.hc .pinkey,
html.hc .seg, html.hc .switch, html.hc .modal { border: 2px solid #000 !important; }
html.hc .seg__btn[aria-pressed="true"],
html.hc .themeopt[aria-pressed="true"],
html.hc .modecard[aria-pressed="true"],
html.hc .buddyopt[aria-pressed="true"] { background: #000; color: #fff; }
html.hc [aria-pressed="true"] .modecard__hint { color: #fff; }
html.hc .switch { background: #fff; }
html.hc .switch .switch__knob { background: #000; }
html.hc .switch[aria-checked="true"] { background: var(--primary); }
html.hc .switch[aria-checked="true"] .switch__knob { background: #fff; }

/* ---------- Fonts (system fonts only, works offline) ---------- */
html[data-font="rounded"] { --font: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", "Arial Rounded MT Bold", "Segoe UI", system-ui, sans-serif; }
html[data-font="clear"]   { --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
html[data-font="easy"]    { --font: Verdana, Tahoma, "Trebuchet MS", "DejaVu Sans", sans-serif; letter-spacing: .01em; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font, system-ui, sans-serif);
  font-size: 1.125rem;          /* 18px */
  line-height: 1.5;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 12%, var(--blob1) 0, transparent 22rem),
    radial-gradient(circle at 92% 18%, var(--blob2) 0, transparent 20rem),
    radial-gradient(circle at 70% 96%, var(--blob3) 0, transparent 24rem),
    var(--bg);
  background-attachment: fixed;
  -webkit-tap-highlight-color: transparent;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }      /* 28px parent headings */
h3 { font-size: 1.375rem; }     /* 22px card titles */
p { margin: 0 0 .75em; }
a { color: var(--primary); }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: .5rem; }
.icon { width: 1.4em; height: 1.4em; flex: none; }
.muted { color: var(--muted); }
.note { background: var(--accent-soft); padding: .75rem 1rem; border-radius: 1rem; }
.text-warn { color: var(--warn); font-weight: 700; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 99; background: var(--surface); padding: .75rem 1rem; border-radius: 1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 3.25rem;            /* 52px */
  padding: .6rem 1.25rem;
  font-size: 1.125rem; font-weight: 700;
  border: 0; border-radius: 999px;
  cursor: pointer; text-decoration: none;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
  user-select: none;
}
.btn:active { transform: scale(.97); }
.btn[disabled], .btn.is-disabled { opacity: .5; cursor: not-allowed; }
.btn--primary { background: var(--primary); color: var(--primary-ink); box-shadow: 0 .25rem 0 rgba(0,0,0,.12); }
.btn--soft { background: var(--surface); color: var(--ink); box-shadow: 0 .125rem .5rem rgba(40,60,50,.08); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: rgba(0,0,0,.04); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--big { min-height: 4rem; font-size: 1.375rem; padding: .8rem 2rem; }
.btnrow { display: flex; flex-wrap: wrap; gap: .75rem; }
.filebtn { position: relative; }
.iconbtn {
  display: inline-grid; place-items: center;
  width: 3.25rem; height: 3.25rem;
  border: 0; border-radius: 1rem;
  background: var(--surface2); color: var(--ink); cursor: pointer;
}
.iconbtn:disabled { opacity: .35; cursor: default; }
.iconbtn--danger { color: var(--danger); }

/* ---------- Cards, fields, controls ---------- */
.card {
  background: var(--surface);
  border-radius: 1.5rem;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 .25rem 1.25rem rgba(40,60,50,.07);
  border: 1px solid var(--line);
}
.card--danger { border-color: var(--danger-soft); }
.stack > * + * { margin-top: 1rem; }
.field { display: block; border: 0; padding: 0; margin: 0 0 1.25rem; min-width: 0; }
.field__label { display: block; font-weight: 700; font-size: 1.125rem; margin-bottom: .5rem; padding: 0; }
.field__error { display: block; color: var(--danger); font-weight: 700; margin-top: .4rem; }
.input {
  width: 100%; min-height: 3.25rem;
  padding: .6rem 1rem;
  font-size: 1.125rem;
  border: 2px solid var(--line); border-radius: 1rem;
  background: var(--surface2);
}
.input:focus { border-color: var(--primary); outline: none; }
.input--short { width: 6rem; text-align: center; }
.input--time { width: 9.5rem; }

.row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .5rem 0; flex-wrap: wrap; }
.row + .row { border-top: 1px solid var(--line); padding-top: 1rem; }
.row__text { display: flex; flex-direction: column; min-width: 0; flex: 1 1 12rem; }
.row__title { font-weight: 700; font-size: 1.125rem; }
.row__hint { color: var(--muted); font-size: 1rem; }

.switch {
  position: relative; flex: none;
  width: 4.25rem; height: 2.5rem;
  border: 0; border-radius: 999px; padding: 0;
  background: #C9D3CF; cursor: pointer;
  transition: background-color .2s ease;
}
.switch::before { content: ""; position: absolute; inset: -.5rem; } /* bigger tap area */
.switch__knob {
  position: absolute; top: .25rem; left: .25rem;
  width: 2rem; height: 2rem; border-radius: 50%;
  background: #fff; box-shadow: 0 .1rem .3rem rgba(0,0,0,.2);
  transition: transform .2s ease;
}
.switch[aria-checked="true"] { background: var(--primary); }
.switch[aria-checked="true"] .switch__knob { transform: translateX(1.75rem); }

.seg { display: flex; flex-wrap: wrap; gap: .35rem; background: var(--surface2); padding: .35rem; border-radius: 1.25rem; border: 1px solid var(--line); }
.seg__btn {
  flex: 1 1 auto; min-height: 3.25rem; padding: .5rem 1rem;
  border: 0; border-radius: 1rem; background: transparent;
  font-size: 1.125rem; font-weight: 700; color: var(--muted); cursor: pointer;
}
.seg__btn[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 .125rem .5rem rgba(0,0,0,.1); }

.chip { display: inline-block; padding: .15rem .75rem; border-radius: 999px; font-size: 1rem; font-weight: 700; background: var(--primary-soft); color: var(--ink); }
.chip--little { background: #FBE0E8; }
.chip--kid { background: #FDF0CB; }
.chip--big { background: #2E3A55; color: #E6F1FF; }

.meter { height: 1rem; border-radius: 999px; background: var(--surface2); border: 1px solid var(--line); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--primary); border-radius: inherit; }
.meter--warn span { background: var(--accent); }

/* ---------- Avatars ---------- */
.avatar {
  --size: 5rem;
  display: inline-grid; place-items: center; flex: none;
  width: var(--size); height: var(--size);
  border-radius: 50%;
  background: var(--av-bg, var(--primary-soft));
  box-shadow: inset 0 0 0 .25rem rgba(255,255,255,.7);
  overflow: hidden;
}
.avatar svg { width: 82%; height: 82%; }
.avatar--photo img { width: 100%; height: 100%; object-fit: cover; }
.avatar__initial { font-size: calc(var(--size) * .45); font-weight: 800; color: var(--av-deep, var(--primary)); }

/* ---------- Top bar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem clamp(1rem, 3vw, 2rem);
}
.topbar__title { font-size: 1.75rem; margin: 0; text-align: center; flex: 1; }
.brand { display: flex; align-items: center; gap: .6rem; }
.brand__logo { width: 3.25rem; height: 3.25rem; border-radius: 1rem; background: var(--primary); display: grid; place-items: center; }
.brand__logo svg { width: 85%; height: 85%; }
.brand__name { font-size: 1.6rem; font-weight: 800; letter-spacing: -.01em; }

/* ---------- Demo banner ---------- */
.demo-banner {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center; gap: 1rem; flex-wrap: wrap;
  padding: .5rem 1rem;
  background: var(--accent-soft); border-bottom: 1px solid var(--line);
  font-weight: 700;
}
.demo-banner__btn { min-height: 2.75rem; padding: .35rem 1.1rem; font-size: 1rem; }

/* ---------- Home / profile picker ---------- */
.picker { padding: 1rem clamp(1rem, 4vw, 3rem) 3rem; text-align: center; }
.picker__title { font-size: clamp(2.25rem, 5vw, 3.25rem); margin: .5rem 0 2rem; }
.picker__list {
  list-style: none; margin: 0 auto; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(1rem, 3vw, 2rem);
  max-width: 72rem;
}
.picker__list li { flex: 1 1 15rem; max-width: 21rem; }
.kidbubble {
  display: flex; flex-direction: column; align-items: center; gap: .75rem;
  height: 100%; min-height: 3.5rem;
  padding: 1.75rem 1.25rem 1.5rem;
  border-radius: 2rem;
  background: var(--surface);
  color: var(--ink); text-decoration: none;
  box-shadow: 0 .5rem 1.5rem rgba(40,60,50,.1);
  border: 1px solid var(--line);
  transition: transform .2s cubic-bezier(.3,1.6,.5,1), box-shadow .2s ease;
}
.kidbubble:hover { transform: translateY(-.25rem); box-shadow: 0 .75rem 2rem rgba(40,60,50,.14); }
.kidbubble:active { transform: scale(.97); }
.kidbubble .avatar { --size: clamp(7rem, 16vw, 10rem); }
.kidbubble__name { font-size: 2rem; font-weight: 800; }
/* Little: round, extra soft */
.kidbubble--little { background: linear-gradient(180deg, #FFF4F7, #FFFFFF); border-radius: 3rem; }
.kidbubble--little .avatar { box-shadow: 0 0 0 .5rem #FBE0E8, inset 0 0 0 .25rem rgba(255,255,255,.7); }
/* Kid: sunny */
.kidbubble--kid { background: linear-gradient(180deg, #FFF9E6, #FFFFFF); }
.kidbubble--kid .avatar { box-shadow: 0 0 0 .5rem #FDF0CB, inset 0 0 0 .25rem rgba(255,255,255,.7); }
/* Big Kid: cooler and less babyish */
.kidbubble--big { background: linear-gradient(160deg, #2E3A55, #3E4E72); color: #F2F6FF; border-color: #2E3A55; border-radius: 1.5rem; }
.kidbubble--big .avatar { border-radius: 1.5rem; box-shadow: 0 0 0 .3rem #6FD3C1; }
.kidbubble--big .chip--big { background: #6FD3C1; color: #1D2740; }
html.hc .kidbubble--big { background: #000; color: #fff; }

.empty { text-align: center; color: var(--muted); padding: 2rem 1rem; }
.empty__title { font-size: 1.75rem; font-weight: 800; color: var(--ink); }

/* ---------- PIN pad ---------- */
.pinpad { max-width: 24rem; margin: 0 auto; padding: 2rem 1rem; text-align: center; }
.pinpad__title { font-size: 2rem; margin-bottom: .25rem; }
.pinpad__hint { color: var(--muted); min-height: 1.6em; }
.pinpad__hint--error { color: var(--danger); font-weight: 700; }
.pinpad__demo { background: var(--accent-soft); border-radius: 1rem; padding: .5rem; font-weight: 700; margin-top: 1rem; }
.pinpad__dots { display: flex; justify-content: center; gap: 1rem; margin: 1rem 0 1.5rem; }
.pindot { width: 1.25rem; height: 1.25rem; border-radius: 50%; border: 3px solid var(--primary); transition: background-color .15s ease; }
.pindot--on { background: var(--primary); }
.pinpad__keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: .85rem; }
.pinkey {
  min-height: 4.25rem; border: 0; border-radius: 1.5rem;
  background: var(--surface); box-shadow: 0 .25rem 0 var(--line);
  font-size: 2rem; font-weight: 800; cursor: pointer;
  display: grid; place-items: center;
}
.pinkey:active { transform: translateY(.15rem); box-shadow: 0 .1rem 0 var(--line); }
.pinkey--soft { background: var(--surface2); font-size: 1.125rem; }
.pinpad__footer { display: flex; justify-content: space-between; margin-top: 1.25rem; gap: .5rem; flex-wrap: wrap; }
.shake { animation: shake .4s ease; }
@keyframes shake { 20%, 60% { transform: translateX(-.5rem); } 40%, 80% { transform: translateX(.5rem); } }

/* ---------- Setup wizard ---------- */
.screen--setup { padding: clamp(1rem, 4vw, 3rem) 1rem; }
.setup { max-width: 34rem; margin: 0 auto; text-align: center; padding: 2rem clamp(1.25rem, 4vw, 2.5rem); }
.setup--wide { max-width: 44rem; text-align: left; }
.setup--wide h1, .setup--wide .setup__lead { text-align: center; }
.setup--wide .btn--big { display: flex; width: 100%; margin-top: 1rem; }
.setup__logo { width: 6rem; height: 6rem; margin: 0 auto 1rem; border-radius: 1.75rem; background: var(--primary); display: grid; place-items: center; }
.setup__logo svg { width: 85%; }
.setup__lead { font-size: 1.25rem; color: var(--muted); }
.setup__small { display: flex; align-items: center; justify-content: center; gap: .5rem; color: var(--muted); font-size: 1rem; margin-top: 1.25rem; }
.setup__buddies { display: flex; justify-content: center; gap: .5rem; margin: 1.5rem 0; }
.setup__buddies svg { width: 4.5rem; height: 4.5rem; }
.setup__kids { display: flex; justify-content: center; gap: .75rem; margin-bottom: 1rem; }
.setup__kids .avatar { --size: 7rem; }
.setup .pinpad { padding-top: .5rem; }
.steps { list-style: none; display: flex; justify-content: center; gap: .5rem; padding: 0; margin: 0 0 1.5rem; }
.steps__dot { width: 2.5rem; height: .5rem; border-radius: 999px; background: var(--line); }
.steps__dot--on { background: var(--primary); }

/* ---------- Child form ---------- */
.kidform__preview { display: flex; justify-content: center; margin-bottom: 1rem; }
.kidform__preview .avatar { --size: 7rem; }
.modecards { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .75rem; }
.modecard {
  display: flex; flex-direction: column; align-items: flex-start; gap: .15rem; text-align: left;
  min-height: 3.5rem; padding: .85rem 1rem;
  border: 2px solid var(--line); border-radius: 1.25rem;
  background: var(--surface2); cursor: pointer;
}
.modecard[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 2px var(--primary) inset; }
.modecard__name { font-size: 1.375rem; font-weight: 800; }
.modecard__ages { font-weight: 700; }
.modecard__hint { color: var(--muted); font-size: 1rem; }
.buddygrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr)); gap: .6rem; margin-top: .75rem; }
.buddyopt {
  display: flex; flex-direction: column; align-items: center; gap: .25rem;
  padding: .6rem .4rem; min-height: 3.5rem;
  border: 2px solid var(--line); border-radius: 1.25rem; background: var(--surface2);
  cursor: pointer; font-size: 1rem; font-weight: 700;
}
.buddyopt svg { width: 3.5rem; height: 3.5rem; }
.buddyopt[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-soft); }
.picpanel { margin-top: .75rem; display: flex; flex-wrap: wrap; gap: .75rem; }
.picpanel[data-panel="buddy"] { display: block; }
.swatches { display: flex; flex-wrap: wrap; gap: .75rem; }
.swatch {
  width: 3.5rem; height: 3.5rem; border-radius: 50%;
  border: 3px solid #fff; background: var(--sw);
  box-shadow: 0 0 0 2px var(--line); cursor: pointer;
}
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 4px var(--primary); }

/* ---------- Parent area ---------- */
.screen--parent { min-height: 100vh; background: rgba(255,255,255,.35); }
.topbar--parent { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
html.is-demo .topbar--parent { top: 3.6rem; }
.parent { display: grid; grid-template-columns: 15rem 1fr; gap: 2rem; max-width: 72rem; margin: 0 auto; padding: 1.5rem clamp(1rem, 3vw, 2rem) 4rem; }
.parentnav { display: flex; flex-direction: column; gap: .4rem; position: sticky; top: 7rem; align-self: start; }
.parentnav__item {
  display: flex; align-items: center; gap: .75rem;
  min-height: 3.25rem; padding: .5rem 1rem; border-radius: 1rem;
  color: var(--ink); text-decoration: none; font-weight: 700;
}
.parentnav__item:hover { background: var(--surface); }
.parentnav__item[aria-current="page"] { background: var(--primary); color: var(--primary-ink); }
.parent__main { min-width: 0; }
.panel { display: flex; flex-direction: column; gap: 1.25rem; }
.panel__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.panel__head h2 { margin: 0; }
.kidlist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .75rem; }
.kidrow { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem; flex-wrap: wrap; }
.kidrow .avatar { --size: 4.5rem; }
.kidrow__text { flex: 1 1 10rem; display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; }
.kidrow__name { font-size: 1.375rem; font-weight: 800; }
.kidrow__actions { display: flex; gap: .4rem; }
.reminder { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; background: var(--accent-soft); margin-bottom: 1.25rem; }
.reminder span { flex: 1 1 14rem; font-weight: 700; }
.themes { display: flex; flex-wrap: wrap; gap: .6rem; }
.themeopt {
  display: flex; align-items: center; gap: .5rem;
  min-height: 3.25rem; padding: .5rem 1rem;
  border: 2px solid var(--line); border-radius: 1rem; background: var(--surface2);
  font-weight: 700; cursor: pointer;
}
.themeopt[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-soft); }
.themeopt__dots { display: flex; }
.themeopt__dots i { width: 1.1rem; height: 1.1rem; border-radius: 50%; margin-left: -.3rem; border: 2px solid #fff; }
[data-theme-opt="meadow"] i:nth-child(1) { background: #4FA57E; } [data-theme-opt="meadow"] i:nth-child(2) { background: #DFF2E7; } [data-theme-opt="meadow"] i:nth-child(3) { background: #F6C453; }
[data-theme-opt="sky"] i:nth-child(1) { background: #4C8FD0; } [data-theme-opt="sky"] i:nth-child(2) { background: #DCEEFB; } [data-theme-opt="sky"] i:nth-child(3) { background: #F6C453; }
[data-theme-opt="blossom"] i:nth-child(1) { background: #C9668A; } [data-theme-opt="blossom"] i:nth-child(2) { background: #FBE3EA; } [data-theme-opt="blossom"] i:nth-child(3) { background: #F6C453; }
[data-theme-opt="peach"] i:nth-child(1) { background: #D27B45; } [data-theme-opt="peach"] i:nth-child(2) { background: #FDE8D8; } [data-theme-opt="peach"] i:nth-child(3) { background: #F6C453; }
[data-theme-opt="lavender"] i:nth-child(1) { background: #7F69C4; } [data-theme-opt="lavender"] i:nth-child(2) { background: #ECE5F8; } [data-theme-opt="lavender"] i:nth-child(3) { background: #F6C453; }
.preview__kid { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.taskcard-demo {
  display: flex; align-items: center; gap: .75rem;
  padding: 1rem 1.5rem; border-radius: 1.5rem;
  background: var(--primary-soft); font-size: 1.75rem; font-weight: 800;
}
.taskcard-demo .icon { color: var(--primary); width: 2.25rem; height: 2.25rem; }

/* ---------- Modals & toasts ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(30,40,36,.45);
  display: grid; place-items: center; padding: 1rem;
  animation: fade .2s ease;
}
.modal {
  width: min(40rem, 100%); max-height: calc(100dvh - 2rem); overflow: auto;
  background: var(--surface); border-radius: 1.75rem; padding: 1.5rem clamp(1.25rem, 4vw, 2rem);
  box-shadow: 0 1rem 3rem rgba(0,0,0,.2);
  animation: pop .25s cubic-bezier(.3,1.4,.5,1);
}
.modal__title { font-size: 1.75rem; }
.modal__actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; position: sticky; bottom: -1.5rem; background: var(--surface); padding: .75rem 0; }
#toasts { position: fixed; left: 50%; bottom: calc(1.5rem + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: .5rem; width: min(30rem, calc(100% - 2rem)); pointer-events: none; }
.toast {
  background: var(--ink); color: #fff; padding: .85rem 1.25rem; border-radius: 1.25rem;
  font-weight: 700; text-align: center; box-shadow: 0 .5rem 1.5rem rgba(0,0,0,.2);
  animation: pop .25s ease; transition: opacity .5s ease, transform .5s ease;
}
.toast--warn { background: #7A4E00; }
.toast--out { opacity: 0; transform: translateY(.5rem); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.92); } }

/* ---------- Reduced motion ---------- */
html.reduce-motion *, html.reduce-motion *::before, html.reduce-motion *::after {
  animation-duration: .001ms !important; animation-iteration-count: 1 !important;
  transition-duration: .001ms !important; scroll-behavior: auto !important;
}

/* ---------- Phones ---------- */
@media (max-width: 760px) {
  .parent { grid-template-columns: 1fr; gap: 1rem; padding-top: 1rem; }
  .parentnav { display: grid; grid-template-columns: 1fr 1fr; position: static; gap: .4rem; }
  .parentnav__item { background: var(--surface); }
  .demo-banner { gap: .5rem; flex-wrap: nowrap; justify-content: space-between; font-size: 1rem; }
  .demo-banner__btn { flex: none; }
  .topbar--parent { flex-wrap: wrap; }
  .topbar--parent .topbar__title { order: -1; flex-basis: 100%; font-size: 1.5rem; }
  html.is-demo .topbar--parent { top: 0; position: static; }
  .brand__name { font-size: 1.3rem; }
  .picker__list li { flex-basis: 100%; max-width: 26rem; }
  .kidbubble { flex-direction: row; text-align: left; padding: 1rem 1.25rem; gap: 1rem; flex-wrap: wrap; }
  .kidbubble .avatar { --size: 5.5rem; }
  .kidrow__actions { width: 100%; justify-content: flex-end; }
}
@media (max-width: 420px) {
  .btn--parent { padding: .6rem 1rem; }
  .brand__name { display: none; }
}
