/* TapTalk Family dashboard.
   Layout: sidebar navigation on wide screens, tabs across the top on phones. Cards hold one idea each.
   Shares TapTalk's palette and word colors so buttons look the same as on the child's phone. */
:root {
  --bg: #f1f4f9; --surface: #ffffff; --surface-2: #e8edf4; --ink: #16202c; --muted: #586579; --line: #d3dae5;
  --accent: #2f6db5; --accent-strong: #1f5594; --accent-soft: #dce8f7; --accent-ink: #ffffff; --danger: #c63b30; --ok: #2f8a4b;
  --c-people: #e0b400; --c-people-bg: #fff7d1; --c-action: #34a052; --c-action-bg: #e1f4e5;
  --c-describe: #3a7fd5; --c-describe-bg: #e0edfb; --c-thing: #e8832a; --c-thing-bg: #fdebd6;
  --c-social: #d65b96; --c-social-bg: #fbe2ee; --c-question: #8656c6; --c-question-bg: #eee5fa;
  --c-stop: #d8453a; --c-stop-bg: #fbe0dd; --c-folder: #5f7086; --c-folder-bg: #e4e9f0;
  --chart-1: #2f6db5; --chart-2: #34a052; --chart-grid: #e2e7ef;
  --font-ui: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Fredoka", "Atkinson Hyperlegible", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #10161e; --surface: #1b2430; --surface-2: #243040; --ink: #eef2f7; --muted: #a2afc0; --line: #324154;
    --accent: #5d9de6; --accent-strong: #84b6ef; --accent-soft: #1d3350; --accent-ink: #0b1420; --danger: #f07b70; --ok: #5cc27a;
    --c-people-bg: #3a3211; --c-action-bg: #163322; --c-describe-bg: #162b46; --c-thing-bg: #3e2912;
    --c-social-bg: #3d1829; --c-question-bg: #2b2043; --c-stop-bg: #431e1a; --c-folder-bg: #263140;
    --chart-1: #5d9de6; --chart-2: #5cc27a; --chart-grid: #2a3646;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #10161e; --surface: #1b2430; --surface-2: #243040; --ink: #eef2f7; --muted: #a2afc0; --line: #324154;
  --accent: #5d9de6; --accent-strong: #84b6ef; --accent-soft: #1d3350; --accent-ink: #0b1420; --danger: #f07b70; --ok: #5cc27a;
  --c-people-bg: #3a3211; --c-action-bg: #163322; --c-describe-bg: #162b46; --c-thing-bg: #3e2912;
  --c-social-bg: #3d1829; --c-question-bg: #2b2043; --c-stop-bg: #431e1a; --c-folder-bg: #263140;
  --chart-1: #5d9de6; --chart-2: #5cc27a; --chart-grid: #2a3646;
  color-scheme: dark;
}
[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-ui); font-size: 16px; line-height: 1.45; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
a { color: var(--accent-strong); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; margin: 0; text-wrap: balance; line-height: 1.2; }

.boot { min-height: 100vh; display: grid; place-items: center; }
.boot-msg { display: grid; justify-items: center; gap: 12px; color: var(--muted); }

/* Sign-in and simple centered pages */
.center-page { min-height: 100vh; display: grid; place-items: center; padding: 24px max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px)); }
.center-card { width: min(440px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 28px; display: grid; gap: 16px; }
.center-card .logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; }
.center-card h1 { font-size: 1.8rem; }
.lead { color: var(--muted); margin: 0; }

/* Shell */
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; padding: 20px 14px; display: flex; flex-direction: column; gap: 18px;
  background: var(--surface); border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.brand b { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; display: block; line-height: 1.1; }
.brand small { color: var(--muted); font-size: .8rem; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.nav { display: grid; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: .95rem;
}
.nav a .i { width: 22px; text-align: center; }
.nav a:hover { background: var(--surface-2); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-strong); }
.side .spacer { flex: 1; }
.who { font-size: .82rem; color: var(--muted); padding: 0 8px; display: grid; gap: 6px; overflow-wrap: anywhere; }
.main { min-width: 0; padding: 24px clamp(16px, 3vw, 40px) 60px; display: grid; gap: 20px; align-content: start; max-width: 1180px; }
.topline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.topline h1 { font-size: clamp(1.5rem, 3vw, 2rem); }
.kids { display: flex; flex-wrap: wrap; gap: 8px; }
.kid { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; border: 2px solid var(--line); background: var(--surface); font-weight: 700; }
.kid .av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-family: var(--font-display); }
.kid[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }

/* Building blocks */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 20px; display: grid; gap: 14px; min-width: 0; align-content: start; }
.card h2 { font-size: 1.15rem; }
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.hint { color: var(--muted); font-size: .92rem; margin: 0; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 9px 16px; border-radius: 12px;
  border: 2px solid var(--line); background: var(--surface); font-weight: 700; font-size: .95rem; text-decoration: none; color: var(--ink);
}
.btn:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.danger { color: var(--danger); }
.btn.armed { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.small { min-height: 34px; padding: 5px 12px; font-size: .88rem; border-radius: 10px; }
.btn:disabled { opacity: .5; cursor: default; }
.seg { display: inline-flex; border: 2px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: transparent; padding: 7px 14px; font-weight: 700; font-size: .9rem; }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.field { display: grid; gap: 6px; }
.field > label, .field > span { font-weight: 700; font-size: .92rem; }
.input, select.input, textarea.input { width: 100%; padding: 11px 13px; border-radius: 12px; border: 2px solid var(--line); background: var(--bg); }
textarea.input { min-height: 70px; resize: vertical; }
.check { display: flex; align-items: center; gap: 10px; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.pill.ok { background: color-mix(in srgb, var(--ok) 15%, var(--surface)); color: var(--ok); }
.pill.warn { background: var(--c-thing-bg); color: color-mix(in srgb, var(--c-thing) 70%, var(--ink)); }
.empty { text-align: center; padding: 28px 16px; color: var(--muted); display: grid; gap: 10px; justify-items: center; }
.empty .big { font-size: 2.4rem; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: grid; gap: 2px; }
.stat b { font-family: var(--font-display); font-weight: 600; font-size: 1.8rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: .84rem; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--font-ui); }
.chart .grid { stroke: var(--chart-grid); stroke-width: 1; }
.legend { display: flex; gap: 14px; font-size: .84rem; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.bars { display: grid; gap: 8px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 9em) 1fr 3em; gap: 10px; align-items: center; font-size: .92rem; }
.bar-row > span:first-child { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .track { height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar-row .track i { display: block; height: 100%; border-radius: 99px; background: var(--chart-2); }
.bar-row > span:last-child { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; }
.chip { padding: 4px 10px; border-radius: 999px; border: 2px solid var(--edge, var(--line)); background: var(--fill, var(--surface-2)); font-size: .88rem; font-weight: 700; }
.timeline { display: grid; gap: 18px; }
.day h3 { font-family: var(--font-ui); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.says { display: grid; gap: 6px; }
.say { display: grid; grid-template-columns: 4.5em 1fr; gap: 12px; align-items: baseline; padding: 10px 14px; border-radius: 12px; background: var(--bg); }
.say time { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.say q { font-size: 1.08rem; font-weight: 700; quotes: "“" "”"; }

/* Buttons editor */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-weight: 700; }
.crumbs button { border: 0; background: none; color: var(--accent-strong); padding: 2px 4px; font-weight: 700; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; }
.tile {
  --edge: var(--line); --fill: var(--surface);
  position: relative; aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 8px;
  border-radius: 18px; border: 3px solid var(--edge); background: var(--fill); box-shadow: 0 4px 0 color-mix(in srgb, var(--edge) 72%, #000);
  min-width: 0; overflow: hidden;
}
.tile .e { font-size: 2.4rem; line-height: 1; }
.tile .t { font-weight: 700; text-align: center; font-size: .95rem; line-height: 1.1; overflow-wrap: anywhere; }
.tile .pic { flex: 1; width: 100%; min-height: 0; border-radius: 10px; overflow: hidden; }
.tile .pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .badge { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; background: var(--edge); color: var(--surface); display: grid; place-items: center; font-weight: 700; }
.tile .rec { position: absolute; top: 8px; left: 8px; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); }
.tile.hidden-btn { opacity: .45; border-style: dashed; }
.tile.selected { outline: 4px solid var(--ink); outline-offset: 3px; }
.tile.add { border-style: dashed; box-shadow: none; background: transparent; color: var(--muted); }
.k-people { --edge: var(--c-people); --fill: var(--c-people-bg); } .k-action { --edge: var(--c-action); --fill: var(--c-action-bg); }
.k-describe { --edge: var(--c-describe); --fill: var(--c-describe-bg); } .k-thing { --edge: var(--c-thing); --fill: var(--c-thing-bg); }
.k-social { --edge: var(--c-social); --fill: var(--c-social-bg); } .k-question { --edge: var(--c-question); --fill: var(--c-question-bg); }
.k-stop { --edge: var(--c-stop); --fill: var(--c-stop-bg); } .k-folder { --edge: var(--c-folder); --fill: var(--c-folder-bg); }
.panel { position: sticky; top: 20px; }
.types { display: flex; flex-wrap: wrap; gap: 8px; }
.types button { width: 38px; height: 38px; border-radius: 10px; border: 4px solid var(--edge); background: var(--fill); }
.types button[aria-pressed="true"] { outline: 3px solid var(--ink); outline-offset: 2px; }
.file-in { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.savebar {
  position: sticky; bottom: 16px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-radius: 16px; background: var(--ink); color: var(--bg); box-shadow: 0 10px 30px rgb(0 0 0 / .25);
}
.savebar .btn { border-color: transparent; }
.savebar .btn:not(.primary) { background: var(--bg); color: var(--ink); }

/* Lists */
.list { display: grid; gap: 8px; }
.item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--bg); }
.item .what { display: grid; gap: 2px; min-width: 0; }
.item .what b { overflow-wrap: anywhere; }
.item .what small { color: var(--muted); }
.code { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.4rem, 8vw, 3.6rem); letter-spacing: .14em; text-align: center; padding: 14px; border-radius: 16px; background: var(--accent-soft); color: var(--accent-strong); }
.linkbox { display: flex; gap: 8px; }
.linkbox input { flex: 1; min-width: 0; }
.steps { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; z-index: 50; max-width: calc(100% - 32px);
  padding: 12px 18px; border-radius: 14px; background: var(--ink); color: var(--bg); font-weight: 700; box-shadow: 0 10px 30px rgb(0 0 0 / .25);
}
.readonly-note { padding: 12px 16px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-strong); font-weight: 700; }

/* Report (also what prints) */
.report { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: clamp(20px, 4vw, 40px); display: grid; gap: 22px; }
.report header { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-bottom: 2px solid var(--line); padding-bottom: 16px; }
.report h1 { font-size: 1.8rem; }
.report h2 { font-size: 1.1rem; margin-bottom: 8px; }

@media (max-width: 1100px) { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } .editor { grid-template-columns: minmax(0, 1fr); } .panel { position: static; } }
@media (max-width: 820px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: sticky; top: 0; height: auto; z-index: 10; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); border-right: 0; border-bottom: 1px solid var(--line); }
  .side .spacer, .who { display: none; }
  .nav { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; width: 100%; scrollbar-width: none; }
  .nav a { padding: 8px 10px; }
  .main { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media print {
  body { background: #fff; color: #000; }
  .side, .topline .row, .toast, .no-print { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; max-width: none; }
  .report { border: 0; padding: 0; }
}

/* ---------- Redesign: spacing, centered content, icons, stronger cards ---------- */
:root { --shadow: 0 1px 2px rgb(16 24 40 / .05), 0 2px 8px rgb(16 24 40 / .06); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #0c1218; --surface: #151e29; --surface-2: #1e2936; --line: #283546; --shadow: 0 0 0 1px rgb(255 255 255 / .02); }
}
:root[data-theme="dark"] { --bg: #0c1218; --surface: #151e29; --surface-2: #1e2936; --line: #283546; --shadow: 0 0 0 1px rgb(255 255 255 / .02); }

.shell { grid-template-columns: 252px minmax(0, 1fr); }
.main { width: 100%; max-width: 1240px; margin-inline: auto; gap: 24px; padding-top: 28px; }
#view { display: grid; gap: 20px; align-content: start; min-width: 0; }
.card { box-shadow: var(--shadow); border-radius: 18px; padding: 22px; }
.card h2 { font-size: 1.12rem; display: flex; align-items: center; gap: 8px; }
.card .count { font-family: var(--font-ui); font-size: .78rem; font-weight: 700; color: var(--muted); background: var(--surface-2); padding: 2px 9px; border-radius: 999px; }
.grid2, .grid3 { gap: 20px; }

/* Sidebar */
.side { padding: 22px 14px 18px; gap: 22px; }
.brand { padding: 0 10px; }
.nav a { gap: 12px; padding: 10px 12px; color: var(--muted); font-weight: 700; }
.nav a svg { width: 20px; height: 20px; flex: none; }
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--accent-strong); background: var(--accent-soft); }
.nav a .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-thing); margin-left: auto; }
.fam-pick { margin: 0 4px; }
.who { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 4px 10px; align-items: center; padding: 12px; border-radius: 14px; background: var(--surface-2); font-size: .85rem; }
.who .av { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-family: var(--font-display); font-weight: 600; grid-row: span 2; }
.who-text { min-width: 0; display: grid; }
.who-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.who-text small { color: var(--muted); }
.linkish { grid-column: 2; justify-self: start; border: 0; background: none; padding: 2px 0; color: var(--accent-strong); font-weight: 700; font-size: .85rem; }

/* Page header */
.topline { align-items: flex-end; }
.titles { display: grid; gap: 4px; min-width: 0; }
.titles p { margin: 0; color: var(--muted); }
.kid { box-shadow: var(--shadow); }

/* Stats get a colored top edge so each number is easy to find */
.stat { box-shadow: var(--shadow); border-top: 4px solid var(--c, var(--chart-1)); }
.stats .stat:nth-child(1) { --c: var(--c-describe); } .stats .stat:nth-child(2) { --c: var(--c-action); }
.stats .stat:nth-child(3) { --c: var(--c-people); } .stats .stat:nth-child(4) { --c: var(--c-social); }
.stats .stat:nth-child(5) { --c: var(--c-thing); } .stats .stat:nth-child(6) { --c: var(--c-question); }

/* Welcome checklist */
.welcome { padding: 28px; gap: 20px; }
.welcome-head h2 { font-size: 1.5rem; }
.gs { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.gs li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 16px; border-radius: 16px; background: var(--bg); border: 1px solid var(--line); }
.gs li.now { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); background: var(--accent-soft); }
.gs .n { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; background: var(--surface); border: 2px solid var(--line); }
.gs li.now .n { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.gs li div { display: grid; gap: 2px; }
.gs li div span { color: var(--muted); font-size: .92rem; }

/* Family & sharing */
.fam-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.span2 { grid-column: 1 / -1; }
.rows { display: grid; gap: 8px; }
.rowitem { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); flex-wrap: wrap; }
.rowitem .what { flex: 1; min-width: 160px; display: grid; gap: 1px; }
.rowitem .what b { overflow-wrap: anywhere; }
.rowitem .what em { font-style: normal; color: var(--muted); font-weight: 400; }
.rowitem .what small { color: var(--muted); }
.rowitem .ico, .role .ico, .privacy .ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--accent-strong); flex: none; }
.rowitem .ico svg, .role .ico svg, .privacy .ico svg { width: 20px; height: 20px; }
.rowitem .av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; flex: none; background: var(--c-describe-bg); color: var(--ink); border: 2px solid var(--c-describe); }
.rowitem .av.role-owner { background: var(--c-people-bg); border-color: var(--c-people); }
.rowitem .av.role-viewer { background: var(--c-action-bg); border-color: var(--c-action); }
.empty-state { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: start; padding: 22px; border-radius: 16px; background: var(--bg); border: 2px dashed var(--line); }
.empty-state h3 { font-size: 1.2rem; margin-bottom: 8px; }
.empty-state .steps { margin-bottom: 14px; color: var(--muted); }
.big-ico { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-strong); }
.big-ico svg { width: 32px; height: 32px; }
.roles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.role { display: grid; gap: 6px; justify-items: start; align-content: start; text-align: left; padding: 16px; border-radius: 16px; border: 2px solid var(--line); background: var(--bg); }
.role:hover { border-color: var(--accent); }
.role b { font-size: 1rem; }
.role span:last-child { color: var(--muted); font-size: .88rem; }
.sub { font-family: var(--font-ui); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.settings { gap: 18px; }
.privacy { display: flex; gap: 12px; align-items: flex-start; }
.code { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent); }

@media (max-width: 900px) { .fam-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 820px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .who { display: none; }
  .side { padding: 10px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); gap: 8px; }
  .nav a span { white-space: nowrap; }
  .fam-pick { display: none; }
  .main { padding-top: 18px; }
}
@media (max-width: 560px) {
  .roles, .empty-state { grid-template-columns: minmax(0, 1fr); }
  .gs li { grid-template-columns: 40px minmax(0, 1fr); }
  .gs li > .btn, .gs li > .pill { grid-column: 1 / -1; justify-self: start; }
}

/* Sign out on phones, About me editor */
.signout-sm { display: none; }
@media (max-width: 820px) {
  .signout-sm { display: inline-flex; margin-left: auto; border: 2px solid var(--line); background: var(--surface); border-radius: 10px; padding: 6px 12px; font-weight: 700; font-size: .88rem; color: var(--ink); }
  .side .brand { flex: 1; }
  .side { flex-wrap: wrap; }
}
.about-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.about-photo { width: 72px; height: 72px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; font-size: 2rem; background: var(--surface-2); border: 3px solid var(--accent); }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 820px) { .side .brand { order: 0; } .signout-sm { order: 1; } .side .nav { order: 2; } }

/* ---------- TapTalk brand kit: navy #0B1F44, blue #0EA5FF, yellow #FFD600, green #22C55E, red #FF3B30,
   purple #8B5CF6; Rubik for headings and big labels, Inter for text. Word-type colors keep their usual
   AAC meanings in brand shades. ---------- */
:root {
  --bg: #f4f7fc; --surface: #ffffff; --surface-2: #e9eef6; --ink: #0b1f44; --muted: #4f5f76; --line: #d6deea;
  --accent: #0ea5ff; --accent-strong: #0a6fb0; --accent-soft: #e0f3ff; --accent-ink: #0b1f44; --danger: #d92d22;
  --c-people: #f2c200;   --c-people-bg: #fff7cc;
  --c-action: #22c55e;   --c-action-bg: #e3f8eb;
  --c-describe: #0ea5ff; --c-describe-bg: #e0f3ff;
  --c-thing: #f08a24;    --c-thing-bg: #fdecd8;
  --c-social: #e0569b;   --c-social-bg: #fce4f0;
  --c-question: #8b5cf6; --c-question-bg: #efe8fe;
  --c-stop: #ff3b30;     --c-stop-bg: #ffe5e3;
  --c-folder: #5b6b82;   --c-folder-bg: #e6ebf2;
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Rubik", "Inter", system-ui, sans-serif;
  --chart-1: #0ea5ff; --chart-2: #22c55e; --chart-grid: #e3e9f2;
  --shadow: 0 1px 2px rgb(11 31 68 / .05), 0 2px 10px rgb(11 31 68 / .07);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a1424; --surface: #12203a; --surface-2: #1a2b48; --ink: #eef3fa; --muted: #a9b6c9; --line: #263a5e;
    --accent: #38b6ff; --accent-strong: #8dd3ff; --accent-soft: #11304f; --accent-ink: #061226; --danger: #ff7a70;
    --c-people-bg: #3a3210; --c-action-bg: #0f3321; --c-describe-bg: #0f2c45; --c-thing-bg: #3e2a12;
    --c-social-bg: #3d1730; --c-question-bg: #281d4a; --c-stop-bg: #44191a; --c-folder-bg: #1d2b40;
    color-scheme: dark;
    --chart-1: #38b6ff; --chart-2: #4ade80; --chart-grid: #22355a;
    --shadow: 0 0 0 1px rgb(255 255 255 / .03);
  }
}
:root[data-theme="dark"] {
    --bg: #0a1424; --surface: #12203a; --surface-2: #1a2b48; --ink: #eef3fa; --muted: #a9b6c9; --line: #263a5e;
    --accent: #38b6ff; --accent-strong: #8dd3ff; --accent-soft: #11304f; --accent-ink: #061226; --danger: #ff7a70;
    --c-people-bg: #3a3210; --c-action-bg: #0f3321; --c-describe-bg: #0f2c45; --c-thing-bg: #3e2a12;
    --c-social-bg: #3d1730; --c-question-bg: #281d4a; --c-stop-bg: #44191a; --c-folder-bg: #1d2b40;
    color-scheme: dark;
    --chart-1: #38b6ff; --chart-2: #4ade80; --chart-grid: #22355a;
    --shadow: 0 0 0 1px rgb(255 255 255 / .03);
}

h1, h2, h3 { font-weight: 700; letter-spacing: -.01em; }
.brand b, .tile .t, .stat b, .code, .kid .av, .who .av, .gs .n { font-family: var(--font-display); }
.btn.primary { box-shadow: 0 3px 0 var(--accent-strong); }
.nav a[aria-current="page"] svg { color: var(--accent); }
.side { background: var(--surface); }
