:root {
  --brand: #8a5a2b;
  --bg: #faf6f0;
  --card: #ffffff;
  --ink: #2b2118;
  --soft: #7a6a5a;
  --line: #eadfd2;
  --ok: #2f9e5b;
  --bad: #c0392b;
  --radius: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
main { max-width: 720px; margin: 0 auto; padding: 16px; }
header.top { background: var(--brand); color: #fff; padding: 14px 16px; padding-top: calc(14px + env(safe-area-inset-top)); }
header.top h1 { margin: 0; font-size: 20px; }
header.top .sub { opacity: .85; font-size: 14px; }
h1 { font-size: 26px; margin: 8px 0 4px; }
h2 { font-size: 19px; margin: 18px 0 8px; }
p.muted, .muted { color: var(--soft); font-size: 15px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 12px 0; }
label { display: block; font-weight: 600; margin: 12px 0 4px; font-size: 15px; }
input, select { width: 100%; font-size: 17px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); }
input[type=color] { padding: 4px; height: 46px; }
input[type=checkbox] { width: 22px; height: 22px; }
button, .btn { display: inline-block; font-size: 17px; font-weight: 600; padding: 13px 18px; border-radius: 12px; border: 0; background: var(--brand); color: #fff; cursor: pointer; text-decoration: none; text-align: center; }
button.secondary, .btn.secondary { background: #efe6db; color: var(--ink); }
button.danger { background: #fbe9e7; color: var(--bad); }
button.small { font-size: 14px; padding: 8px 12px; }
button:disabled { opacity: .5; }
.wide { width: 100%; margin-top: 14px; }
.row { display: flex; gap: 10px; align-items: center; }
.row > * { flex: 1; }
.row > .fit { flex: 0 0 auto; }
.error { color: var(--bad); font-weight: 600; min-height: 1.2em; margin-top: 10px; }
.success { color: var(--ok); font-weight: 600; }
.code { font-family: ui-monospace, Menlo, monospace; font-size: 34px; letter-spacing: 6px; text-align: center; padding: 10px; background: #fff8ef; border-radius: 12px; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; background: #efe6db; font-size: 13px; }
.dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; vertical-align: middle; margin-right: 6px; }
.steps { display: flex; gap: 6px; margin: 8px 0 4px; }
.steps span { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.steps span.on { background: var(--brand); }
.tabs { display: flex; gap: 6px; overflow-x: auto; margin: 10px 0; }
.tabs button { flex: 0 0 auto; background: #efe6db; color: var(--ink); font-size: 15px; padding: 9px 14px; }
.tabs button.on { background: var(--brand); color: #fff; }
.hidden { display: none !important; }

/* Kid checklist */
.slot h2 { display: flex; justify-content: space-between; align-items: baseline; }
.tick { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: #fff; color: var(--ink); border: 2px solid var(--line); margin: 8px 0; padding: 14px; font-size: 18px; }
.tick .box { width: 30px; height: 30px; border-radius: 9px; border: 2px solid var(--line); display: grid; place-items: center; flex: 0 0 30px; font-size: 18px; }
.tick.done { border-color: var(--ok); background: #effaf3; }
.tick.done .box { background: var(--ok); border-color: var(--ok); color: #fff; }
.tick .emoji { font-size: 22px; }

/* Week grid */
.week { width: 100%; border-collapse: collapse; font-size: 14px; }
.week th, .week td { text-align: center; padding: 6px 2px; }
.week th:first-child, .week td:first-child { text-align: left; }
.cell { display: inline-block; min-width: 34px; padding: 4px 0; border-radius: 8px; background: #f3ece3; }
.cell.full { background: var(--ok); color: #fff; }
.cell.part { background: #f6d58e; }
.cell.future { background: transparent; color: var(--line); }
.cell.today { outline: 2px solid var(--brand); }

/* Routine editor */
.item { border-top: 1px solid var(--line); padding: 10px 0; }
.item .row input[type=text] { flex: 3; }
.days { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.days button { font-size: 13px; padding: 6px 8px; background: #efe6db; color: var(--ink); }
.days button.on { background: var(--brand); color: #fff; }

/* Menu across the header */
.top-nav { display: flex; gap: 6px; overflow-x: auto; margin: 10px -4px 0; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
.top-nav a { flex: 0 0 auto; color: #fff; opacity: .85; text-decoration: none; font-weight: 600; font-size: 15px;
  padding: 7px 12px; border-radius: 999px; background: rgba(255,255,255,.14); }
.top-nav a.on { opacity: 1; background: #fff; color: var(--brand); }

/* Home tiles */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 12px 0; }
.tile { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px;
  text-decoration: none; color: var(--ink); min-height: 120px; }
.tile .icon { font-size: 30px; }
.tile strong { display: block; font-size: 18px; margin-top: 6px; }
.tile small { color: var(--soft); display: block; margin-top: 4px; }
.tile.soon { opacity: .55; }
.tile .badge { float: right; background: var(--bad); color: #fff; border-radius: 999px; padding: 2px 8px; font-size: 13px; font-weight: 700; }
.chips { display: flex; gap: 6px; overflow-x: auto; margin: 10px 0; }
.chips button { flex: 0 0 auto; background: #efe6db; color: var(--ink); font-size: 15px; padding: 8px 14px; }
.chips button.on { background: var(--brand); color: #fff; }
.daynav { display: flex; align-items: center; gap: 10px; margin: 10px 0; }
.daynav h2 { flex: 1; text-align: center; margin: 0; }

/* Money */
.big-money { font-size: 40px; font-weight: 700; margin: 4px 0; }
.bar { height: 12px; background: #f1e8dc; border-radius: 6px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--brand); }
.daydots { display: flex; gap: 6px; margin: 8px 0; }
.daydots span { flex: 1; text-align: center; font-size: 12px; padding: 6px 0; border-radius: 8px; background: #f3ece3; }
.daydots span.ok { background: var(--ok); color: #fff; }
.daydots span.future { background: transparent; color: var(--soft); border: 1px dashed var(--line); }
.list-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.list-row:first-child { border-top: 0; }
.list-row .grow { flex: 1; }
.plus { color: var(--ok); font-weight: 700; }
.minus { color: var(--bad); font-weight: 700; }
.pots { display: flex; gap: 8px; }
.pots > div { flex: 1; background: #fff8ef; border-radius: 12px; padding: 10px; text-align: center; }
.pots strong { display: block; font-size: 18px; }
.amount-input { max-width: 130px; }

/* Today's race: one thermometer per kid */
.race { display: flex; justify-content: space-around; align-items: flex-end; gap: 10px; padding-top: 8px; }
.racer { display: flex; flex-direction: column; align-items: center; text-align: center; flex: 1; min-width: 70px;
  text-decoration: none; color: inherit; }
.racer .flag { font-size: 22px; height: 28px; }
.thermo { position: relative; width: 30px; height: 150px; border-radius: 15px; background: #f1e8dc;
  border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); overflow: hidden; }
.thermo .fill { position: absolute; left: 0; right: 0; bottom: 0; height: 0; border-radius: 0 0 12px 12px;
  transition: height 1.2s ease-out; }
.thermo .marks { position: absolute; inset: 0; background: repeating-linear-gradient(to top, transparent 0 29px, rgba(0,0,0,.08) 29px 30px); }
.bulb { width: 50px; height: 50px; border-radius: 50%; margin-top: -10px; border: 3px solid #fff;
  box-shadow: 0 0 0 1px var(--line); display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 15px; position: relative; z-index: 1; }
.racer .name { font-weight: 700; margin-top: 6px; }
.racer .score { font-size: 13px; color: var(--soft); }
.racer.me .name { text-decoration: underline; }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 12px 0 4px; align-items: center; }
.button-row > button { flex: 0 0 auto; min-width: 140px; }
textarea { width: 100%; font-size: 17px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff;
  color: var(--ink); font-family: inherit; resize: vertical; }

/* Tests and the study coach */
.test-row { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.test-row:first-of-type { border-top: 0; }
.test-row .grow, .grow { flex: 1; min-width: 0; }
.log-row { padding: 8px 0; border-top: 1px solid var(--line); font-size: 15px; }
.q { border-top: 1px solid var(--line); padding: 12px 0; }
.q .choices { display: grid; gap: 6px; margin-top: 8px; }
.q .choices button { text-align: left; background: #fff; color: var(--ink); border: 2px solid var(--line); font-weight: 500; }
.q .choices button.right { border-color: var(--ok); background: #effaf3; }
.q .choices button.wrong { border-color: var(--bad); background: #fbe9e7; }
.q .reveal { background: #fff8ef; border-radius: 12px; padding: 10px 12px; margin-top: 8px; }
.chat .kid { background: #efe6db; border-radius: 14px 14px 4px 14px; padding: 9px 12px; margin: 8px 0 8px 40px; }
.chat .coach { background: #fff8ef; border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; padding: 9px 12px; margin: 8px 40px 8px 0; white-space: pre-wrap; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.thumbs .file { position: relative; width: 92px; }
.thumbs img, .thumbs .doc { width: 92px; height: 92px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); display: grid; place-items: center; background: #fff8ef; font-size: 30px; }
.thumbs .x { position: absolute; top: -6px; right: -6px; width: 26px; height: 26px; padding: 0; border-radius: 50%; font-size: 14px; }
.thumbs small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--soft); }

/* Check-ins */
.big-status { text-align: center; }
.big-status .emoji { font-size: 52px; }
.big-status.ok { border: 2px solid var(--ok); background: #effaf3; }
.card.alert { border: 2px solid #f0b429; background: #fff8e6; }
.card.focus { outline: 3px solid var(--brand); }
.photos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
.photos img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.hs-help details, details { margin-top: 6px; }
details summary { cursor: pointer; }
.small-note { font-size: 14px; text-align: center; margin: 14px 0; }

/* Calendar */
.card.day.today { border: 2px solid var(--brand); }
.event { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line); }
.card.day h2 + .event { border-top: 0; }
.event .when { width: 92px; flex: 0 0 92px; font-size: 14px; font-variant-numeric: tabular-nums; color: var(--soft); padding-top: 2px; }
.event .bar { width: 4px; align-self: stretch; border-radius: 2px; flex: 0 0 4px; }
.cal-row { padding: 10px 0; border-top: 1px solid var(--line); }
.cal-row:first-child { border-top: 0; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 12px; }
.swatch { width: 36px; height: 36px; border-radius: 50%; padding: 0; border: 3px solid transparent; flex: 0 0 auto; }
.swatch.on { border-color: var(--ink); }

/* Calendar time grid (day / 3 days / week), adapted from the home version's calendar */
.cal-toolbar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.seg { display: inline-flex; background: #efe6db; border-radius: 12px; padding: 3px; }
.seg button { background: transparent; color: var(--ink); border: 0; padding: 8px 12px; font-size: 15px; font-weight: 600; border-radius: 9px; width: auto; }
.seg button.on { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.cal-nav { display: inline-flex; gap: 6px; }
.cal-nav button { min-width: 44px; }
.range-label { font-weight: 700; margin: 4px 0 8px; }
#grid { --gutter: 46px; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.tl-head, .tl-allday { display: grid; grid-template-columns: var(--gutter) repeat(var(--days), minmax(0, 1fr)); }
.tl-head { position: sticky; top: 0; z-index: 3; background: #fff; border-bottom: 1px solid var(--line); }
.tl-dayname { text-align: center; padding: 6px 2px; color: var(--soft); }
.tl-dayname .wd { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.tl-dayname .dn { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-weight: 700; font-size: 16px; color: var(--ink); }
.tl-dayname.is-today .wd { color: var(--brand); }
.tl-dayname.is-today .dn { background: var(--brand); color: #fff; }
.tl-allday { border-bottom: 1px solid var(--line); }
.tl-allday-label { font-size: 11px; color: var(--soft); text-align: right; padding: 6px 6px 0 0; }
.tl-allday-cell { display: grid; gap: 3px; padding: 4px 2px; border-left: 1px solid var(--line); min-width: 0; align-content: start; }
.tl-allday-chip { text-align: left; border: 0; border-radius: 6px; padding: 3px 6px; font-size: 12px; font-weight: 600; width: auto;
  background: color-mix(in srgb, var(--c) 22%, #fff); color: var(--ink); border-left: 3px solid var(--c);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-body { position: relative; display: grid; grid-template-columns: var(--gutter) repeat(var(--days), minmax(0, 1fr)); }
.tl-gutter { position: relative; }
.tl-hour { position: absolute; right: 6px; transform: translateY(-0.5em); font: 600 11px ui-monospace, Menlo, monospace; color: var(--soft); }
.tl-hour:first-child { transform: none; }
.tl-col { position: relative; border-left: 1px solid var(--line); min-width: 0;
  background-image: linear-gradient(to bottom, var(--line) 1px, transparent 1px); }
.tl-col.is-today { background-color: color-mix(in srgb, var(--brand) 6%, #fff); }
.tl-event { position: absolute; z-index: 1; overflow: hidden; text-align: left; padding: 3px 5px; border: 0; border-radius: 7px;
  background: color-mix(in srgb, var(--c) 22%, #fff); border-left: 3px solid var(--c); color: var(--ink); width: auto; }
.tl-event .t { display: block; font-size: 12.5px; font-weight: 700; line-height: 1.2; overflow-wrap: break-word; hyphens: auto; }
.tl-event .m { display: block; font-size: 11.5px; line-height: 1.25; color: var(--soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-now { position: absolute; left: 0; right: 0; height: 2px; background: #e5341b; z-index: 2; pointer-events: none; }
.tl-now::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #e5341b; }
.sheet { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet-card { background: #fff; width: 100%; max-width: 560px; border-radius: 18px 18px 0 0; padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); }
.sheet-title { font-size: 19px; }

/* Support page and legal pages */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { text-align: center; } .stat strong { display: block; font-size: 24px; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px 12px; margin-top: 8px; }
.legal-footer { text-align: center; font-size: 14px; color: var(--soft); margin: 24px 0 8px; }
.legal-footer a { color: var(--soft); }
.legal h2 { margin-top: 22px; }
.legal p, .legal li { line-height: 1.5; }
.legal .todo { background: #fff3cd; padding: 0 4px; border-radius: 4px; }
.wide-seg { display: flex; width: 100%; margin-bottom: 10px; }
.wide-seg button { flex: 1; }
.or { text-align: center; margin: 10px 0; }

/* NestNav brand row on top of every page */
.brand-row { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; margin-bottom: 8px; }
.brand-badge { display: inline-flex; align-items: center; gap: 6px; background: #fff; color: #1A2340; border-radius: 999px;
  padding: 4px 12px 4px 8px; font-weight: 800; font-size: 16px; letter-spacing: -0.02em; }
.brand-logo { display: inline-flex; }
.brand-family { font-size: 14px; font-weight: 600; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.landing-logo { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -0.02em; color: #1A2340; }

/* Check-in on the My day page */
.ci-ask { margin: 6px 0 14px; font-size: 18px; padding: 14px; }
.ci-wrap { margin: 6px 0 14px; }
.ci-title { font-size: 18px; margin: 8px 0; }
a.ci-line { display: flex; gap: 10px; align-items: center; text-decoration: none; color: inherit; }
a.ci-line > span:nth-child(2) { flex: 1; }
a.ci-line.ci-waiting { border: 2px solid var(--brand); }

/* Settings: folded sections */
details.set-group { background: var(--card, #fff); border: 1px solid var(--line); border-radius: 14px; margin: 10px 0; padding: 0 12px; }
details.set-group > summary { list-style: none; display: flex; gap: 12px; align-items: center; padding: 14px 0; }
details.set-group > summary::-webkit-details-marker { display: none; }
details.set-group > summary::after { content: "›"; margin-left: auto; font-size: 22px; color: var(--soft); transition: transform .15s; }
details.set-group[open] > summary::after { transform: rotate(90deg); }
details.set-group > summary small { display: block; color: var(--soft); font-size: 13px; font-weight: 400; }
details.set-group .set-icon { font-size: 24px; width: 30px; text-align: center; }
details.set-group[open] { padding-bottom: 12px; }
details.set-group .card { box-shadow: none; }
details.set-group h3 { font-size: 16px; margin: 10px 0 6px; }

/* Money: one card per kid */
.payday-banner { border: 2px solid var(--brand); }
.money-card { border-top: 6px solid var(--kid, var(--brand)); }
.money-card h3 { font-size: 16px; margin: 16px 0 4px; }
.money-head { display: flex; align-items: center; gap: 10px; }
.money-head .grow { flex: 1; font-size: 18px; }
.money-balance { font-size: 30px; font-weight: 700; }
.small-pots { margin-top: 8px; }
.therm { margin-top: 12px; padding: 10px; border-radius: 12px; background: #faf6f0; }
.therm-label { margin-bottom: 6px; }
.therm-bar { height: 18px; border-radius: 9px; background: #efe6db; overflow: hidden; }
.therm-bar > span { display: block; height: 100%; border-radius: 9px; background: linear-gradient(90deg, var(--ok), var(--kid, var(--brand))); transition: width .4s; }
.payline { margin-top: 10px; }
details.fold { margin: 6px 0; }
details.fold > summary { color: var(--brand); font-weight: 600; padding: 8px 0; }
.job-row { margin: 6px 0; }
.job-tick { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; }
.job-tick .grow { flex: 1; }
.job-tick.ask { border-color: var(--brand); }
.job-actions { margin: 4px 0 0 40px; }
.job-actions { display: flex; flex-direction: row; gap: 8px; flex-wrap: wrap; }
.job-actions button { width: auto; flex: 0 0 auto; margin: 0; }
.job-tick:disabled { opacity: 1; cursor: default; }
.earned { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.earned-amount { font-size: 32px; font-weight: 700; color: var(--ok); }
.wallet-part { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }

.set-heading { font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--soft); margin: 22px 4px 4px; }
.approve-row { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.approve-row:last-child { border-bottom: 0; }
.approve-row .grow { flex: 1; }
.approve-actions { display: flex; gap: 6px; }
.approve-actions button, .approve-actions a { width: auto; margin: 0; white-space: nowrap; }
.approve-card { border: 2px solid var(--brand); }
.small-link { display: inline-block; margin: 8px 0; font-size: 14px; }
.emoji-input { width: 64px; flex: 0 0 64px; text-align: center; }
.wallet-buttons { margin-top: 10px; flex-wrap: wrap; gap: 8px; }
.wallet-buttons .btn, .wallet-buttons button { width: auto; margin: 0; }
.manage-wallet { margin-top: 10px; }
.small-print { font-size: 13px; }
.btn.small { font-size: 14px; padding: 8px 12px; }
.button-row.job-actions > button, .button-row.wallet-buttons > button { min-width: 0; }
.job-actions { margin-left: 4px; gap: 8px; }
.wallet-buttons > * { flex: 0 0 auto; display: inline-block; width: auto; margin: 0 !important; }
.wallet-buttons > * { flex: 1 1 0; padding: 9px 6px; white-space: nowrap; }
.button-row.wallet-buttons { flex-wrap: nowrap; }
.wallet-buttons > * { min-width: 0 !important; font-size: 14px; }

/* ---------------------------------------------------------------- family assistant */
.nina-face { display: inline-flex; width: 52px; height: 52px; border-radius: 50%; overflow: hidden; background: #fff4e5;
  flex: 0 0 auto; box-shadow: 0 0 0 3px #fff, 0 2px 10px rgba(0,0,0,.18); }
.nina-face img, .nina-face svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.nina-face.big { width: 84px; height: 84px; }
.nina-face.mid { width: 46px; height: 46px; box-shadow: 0 0 0 2px #fff; }
.nina-home { display: flex; gap: 14px; align-items: center; background: linear-gradient(135deg, #fff8ef, #fff); }
.nina-home-text { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.nina-home-text strong { font-size: 19px; }
.nina-home-text .muted { font-size: 14px; }
.nina-home-buttons { display: flex; gap: 8px; margin-top: 6px; }
.nina-home-buttons button { flex: 1; padding: 11px 8px; font-size: 16px; margin: 0; width: auto; }
.nina-float { position: fixed; right: calc(16px + env(safe-area-inset-right)); bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 50; padding: 0; border-radius: 50%; background: transparent; width: 60px; height: 60px; }
.nina-float .nina-face { width: 60px; height: 60px; }
body.nina-open .nina-float { display: none; }
body.nina-open { overflow: hidden; }
.nina-panel { position: fixed; inset: 0; z-index: 60; background: rgba(20,15,10,.35); display: none; align-items: flex-end; }
.nina-panel.open { display: flex; }
.nina-sheet { background: var(--bg, #faf6f0); width: 100%; max-width: 640px; margin: 0 auto; border-radius: 20px 20px 0 0;
  height: min(78vh, 640px); display: flex; flex-direction: column; padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -6px 30px rgba(0,0,0,.2); }
.nina-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.nina-title { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.nina-status { font-size: 13px; }
.nina-icon { background: transparent; color: var(--ink); padding: 6px 8px; font-size: 18px; width: auto; margin: 0; }
.nina-talk-list { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; -webkit-overflow-scrolling: touch; }
.nina-bubble { max-width: 85%; padding: 10px 13px; border-radius: 16px; line-height: 1.4; font-size: 16px; white-space: pre-wrap; }
.nina-bubble.me { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.nina-bubble.her { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.nina-empty { text-align: center; }
.nina-chip { display: block; width: 100%; margin: 6px 0; background: #fff; color: var(--ink); border: 1px solid var(--line);
  font-weight: 500; font-size: 15px; padding: 10px; }
.nina-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); align-items: center; }
.nina-input { flex: 1; font-size: 16px; padding: 12px; border-radius: 22px; border: 1px solid var(--line); min-width: 0; margin: 0; }
.nina-mic, .nina-send { width: 46px; height: 46px; border-radius: 50%; padding: 0; font-size: 20px; margin: 0; flex: 0 0 46px; }
.nina-send { background: var(--ink, #2b2118); }
.nina-mic.on { background: #c94a36; box-shadow: 0 0 0 calc(var(--level, 0) * 14px) rgba(201,74,54,.25); }
.nina-panel[data-state="listening"] .nina-head .nina-face,
.nina-panel[data-state="speaking"] .nina-head .nina-face { animation: nina-pulse 1.1s ease-in-out infinite; }
.nina-panel[data-state="thinking"] .nina-head .nina-face { animation: nina-pulse 2s ease-in-out infinite; opacity: .85; }
@keyframes nina-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
main { padding-bottom: 90px; }
.nina-pic { display: flex; gap: 14px; align-items: center; }
.nina-pic-img, .nina-pic-empty { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; flex: 0 0 96px; }
.nina-pic-empty { background: #f3ebe0; display: flex; align-items: center; justify-content: center; font-size: 13px; text-align: center; }
.nina-pic-side { flex: 1; min-width: 0; }
.file-btn { cursor: pointer; display: inline-block; }
.nina-kids { margin: 0 0 8px 30px; }
