/* TapTalk
   Layout: phone-first, one screen. Sentence bar on top, 2/4/6 big "key" buttons in the middle,
   Home + page arrows + grown-up gear at the bottom. Grown-up screens slide up as sheets.
   Word colors follow the Fitzgerald key used by TouchChat and most AAC apps. */
: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;
  --scrim: rgb(14 22 33 / .5);

  --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;

  --font-ui: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Fredoka", "Atkinson Hyperlegible", system-ui, sans-serif;
  --r-lg: 22px;
  --r-md: 14px;
  --key-depth: 5px;
}
@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;
    --scrim: rgb(0 0 0 / .6);
    --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;
    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;
  --scrim: rgb(0 0 0 / .6);
  --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;
  color-scheme: dark;
}

[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-ui); font-size: 16px;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
  touch-action: manipulation; overflow: hidden;
}
button, label.btn { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, label.btn:focus-within, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
button:disabled { cursor: default; }

/* ---------- Main app ---------- */
.app {
  height: 100%; display: grid; grid-template-rows: auto auto 1fr auto; grid-template-columns: minmax(0, 1fr);
  gap: 10px; padding-block: 10px; max-width: 1000px; margin: 0 auto;
  padding-left: max(14px, env(safe-area-inset-left, 0px));
  padding-right: max(14px, env(safe-area-inset-right, 0px));
}

/* Sentence bar */
.strip { display: flex; gap: 8px; min-height: 68px; }
.sentence {
  flex: 1; min-width: 0; display: flex; gap: 6px; align-items: center; overflow-x: auto; scrollbar-width: none;
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--r-lg); padding: 5px 8px;
}
.sentence::-webkit-scrollbar { display: none; }
.sentence:empty::before { content: attr(data-empty); color: var(--muted); padding-left: 6px; font-size: .98rem; }
.chip {
  flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 7px; min-width: 48px;
  border-radius: 12px; border: 0; background: var(--fill, var(--surface-2)); box-shadow: inset 0 -3px 0 var(--edge, var(--line));
}
.chip .e { font-size: 1.45rem; line-height: 1; }
.chip img { width: 30px; height: 30px; object-fit: cover; border-radius: 7px; display: block; }
.chip .t { font-size: .76rem; font-weight: 700; white-space: nowrap; }
.chip.pop { animation: pop .22s ease-out; }
@keyframes pop { from { transform: scale(.6); opacity: .2; } to { transform: scale(1); opacity: 1; } }

.sbtn {
  flex: none; width: 62px; border-radius: var(--r-lg); border: 2px solid var(--line); background: var(--surface);
  display: grid; place-items: center; align-content: center; gap: 3px; padding: 4px 0; font-size: .74rem; font-weight: 700;
}
.sbtn svg { width: 26px; height: 26px; }
.sbtn.speak {
  width: 92px; font-size: .95rem; color: var(--accent-ink); background: var(--accent); border-color: var(--accent-strong);
  box-shadow: 0 4px 0 var(--accent-strong); margin-bottom: 4px;
}
.sbtn.speak:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--accent-strong); }
.sbtn.speak .ic-stop { display: none; }
.sbtn.speak.speaking .ic-say { display: none; }
.sbtn.speak.speaking .ic-stop { display: block; }
.sbtn.speak.speaking { animation: breathe 1.2s ease-in-out infinite; }
@keyframes breathe { 50% { filter: brightness(1.15); } }

/* Board heading */
.board-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 30px; padding-inline: 4px; }
.crumb { display: flex; align-items: baseline; gap: 6px; min-width: 0; font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; text-wrap: balance; }
.crumb .home-link { color: var(--muted); font-size: 1rem; font-weight: 500; }
.crumb .title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dots { display: flex; gap: 7px; flex: none; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); transition: transform .2s, background .2s; }
.dots i.on { background: var(--ink); transform: scale(1.25); }

/* Board grid */
.board { min-height: 0; display: grid; gap: 14px; padding: 6px 4px calc(var(--key-depth) + 2px); }
.board.n2 { grid-template-columns: 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); }
.board.n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); }
.board.n6 { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); }
@media (orientation: landscape) {
  .board.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: 1fr; }
  .board.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: 1fr; }
  .board.n6 { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); }
}
@media (orientation: landscape) and (min-height: 700px) {
  .board.n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); }
}
.board.enter-next { animation: slide-l .22s ease-out; }
.board.enter-prev { animation: slide-r .22s ease-out; }
.board.enter-in { animation: zoom-in .2s ease-out; }
@keyframes slide-l { from { transform: translateX(24px); opacity: .3; } }
@keyframes slide-r { from { transform: translateX(-24px); opacity: .3; } }
@keyframes zoom-in { from { transform: scale(.96); opacity: .3; } }

/* The key: colored face, darker bottom edge that compresses when pressed */
.tile {
  --edge: var(--line); --fill: var(--surface);
  position: relative; min-width: 0; min-height: 0; padding: 10px 8px 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: var(--fill); border: 3px solid var(--edge); border-radius: var(--r-lg);
  box-shadow: 0 var(--key-depth) 0 color-mix(in srgb, var(--edge) 72%, #000);
  transition: transform .07s ease, box-shadow .07s ease;
}
.tile.pressed { transform: translateY(calc(var(--key-depth) - 1px)); box-shadow: 0 1px 0 color-mix(in srgb, var(--edge) 72%, #000); }
.tile .e { font-size: clamp(2.6rem, 12.5vmin, 7.2rem); line-height: 1.05; }
.tile .t {
  font-size: clamp(1.15rem, 4.6vmin, 2.15rem); font-weight: 700; line-height: 1.1; text-align: center;
  overflow-wrap: anywhere; max-width: 100%;
}
.tile.has-photo { padding: 8px 8px 6px; justify-content: stretch; }
.tile .pic { flex: 1; width: 100%; min-height: 0; border-radius: calc(var(--r-lg) - 10px); overflow: hidden; background: var(--surface-2); }
.tile .pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile.flash::after {
  content: ""; position: absolute; inset: -3px; border-radius: inherit; border: 4px solid var(--ink); opacity: 0;
  animation: flash .45s ease-out;
}
@keyframes flash { 0% { opacity: .55; } 100% { opacity: 0; } }

/* Folder: looks like a small stack of cards, with an arrow badge */
.tile.folder {
  box-shadow:
    0 var(--key-depth) 0 color-mix(in srgb, var(--edge) 72%, #000),
    7px -7px 0 -3px var(--surface),
    7px -7px 0 0 var(--edge);
}
.tile.folder.pressed { box-shadow: 0 1px 0 color-mix(in srgb, var(--edge) 72%, #000), 7px -7px 0 -3px var(--surface), 7px -7px 0 0 var(--edge); }
.badge {
  position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--edge); color: var(--surface); display: grid; place-items: center; font-weight: 700; font-size: 1.3rem; line-height: 1;
}
.rec-dot { position: absolute; top: 10px; left: 10px; width: 12px; height: 12px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 3px var(--fill); }
.tile.empty { visibility: hidden; }
.tile.add { border-style: dashed; background: transparent; box-shadow: none; color: var(--muted); }
.tile.add .t { font-size: 1.1rem; }
.tile.is-hidden { opacity: .45; border-style: dashed; }
.tile.is-hidden .hidden-tag {
  position: absolute; bottom: 8px; right: 8px; font-size: .75rem; font-weight: 700; padding: 3px 8px; border-radius: 999px;
  background: var(--ink); color: var(--bg);
}
body.editing .tile:not(.empty):not(.add)::before {
  content: "✎"; position: absolute; top: 8px; left: 8px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 1rem; z-index: 1;
}

.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); }

/* Bottom bar */
.bar { display: grid; grid-template-columns: 1.15fr 1fr 1fr 62px; gap: 8px; min-height: 66px; padding-bottom: 4px; }
.bar button {
  border-radius: var(--r-lg); border: 2px solid var(--line); background: var(--surface);
  display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 1.05rem;
  box-shadow: 0 4px 0 var(--line);
}
.bar button:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.bar button svg { width: 32px; height: 32px; }
.bar button:disabled { opacity: .3; box-shadow: none; }
.gear { position: relative; overflow: hidden; }
.gear svg { width: 26px !important; height: 26px !important; position: relative; color: var(--muted); }
.gear .fill { position: absolute; inset: auto 0 0 0; height: 0; background: var(--accent); opacity: .35; }

/* Edit banner + toast */
.editbanner {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 15;
  bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: 8px; padding: 7px 7px 7px 16px; border-radius: 999px;
  background: var(--ink); color: var(--bg); font-weight: 700; font-size: .95rem; white-space: nowrap;
  max-width: calc(100% - 28px); box-shadow: 0 8px 24px rgb(0 0 0 / .25);
}
.editbanner span { overflow: hidden; text-overflow: ellipsis; }
.editbanner button { border: 0; border-radius: 999px; padding: 9px 14px; font-weight: 700; background: var(--bg); color: var(--ink); flex: none; }
.editbanner button.go { background: var(--accent); color: var(--accent-ink); }
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 60; top: calc(14px + env(safe-area-inset-top, 0px));
  padding: 12px 18px; border-radius: 14px; background: var(--ink); color: var(--bg); font-weight: 700; font-size: .95rem;
  max-width: calc(100% - 28px); box-shadow: 0 8px 24px rgb(0 0 0 / .25); text-align: center;
}

/* ---------- Sheets (grown-up screens) ---------- */
.scrim { position: fixed; inset: 0; z-index: 20; background: var(--scrim); display: flex; align-items: flex-end; justify-content: center; }
.scrim.center { align-items: center; padding: 16px; }
.sheet {
  width: min(620px, 100%); max-height: calc(100% - 20px - env(safe-area-inset-top, 0px)); overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg); color: var(--ink); border-radius: 26px 26px 0 0;
  padding: 0 max(18px, env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px));
  -webkit-user-select: text; user-select: text; animation: sheet-up .24s ease-out;
}
.scrim.center .sheet { border-radius: 24px; padding-bottom: 20px; max-height: calc(100% - 32px); }
@keyframes sheet-up { from { transform: translateY(40px); opacity: .4; } }
.sheet-head {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 0 12px; background: var(--bg);
}
.sheet-head h2 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; text-wrap: balance; }
.close { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--surface-2); font-size: 1.3rem; font-weight: 700; flex: none; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: grid; gap: 12px; margin-bottom: 12px; }
.card h3 { margin: 0; font-size: .76rem; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hint { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.45; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 16px;
  border-radius: 12px; border: 2px solid var(--line); background: var(--surface); font-weight: 700; font-size: .98rem;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 50%, var(--line)); }
.btn.armed { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.wide { width: 100%; }
.btn svg { width: 20px; height: 20px; flex: none; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg button {
  min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 2px solid var(--line); background: var(--surface); font-weight: 700;
}
.seg button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.field { display: grid; gap: 6px; }
.field > label { font-weight: 700; font-size: .95rem; }
.field input[type="text"] {
  font: inherit; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--line); background: var(--bg); color: var(--ink); width: 100%;
}
.check { display: flex; align-items: center; gap: 12px; font-size: 1rem; min-height: 32px; }
.check input { width: 24px; height: 24px; accent-color: var(--accent); flex: none; }
.slider { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; font-size: .9rem; color: var(--muted); }
.slider input { width: 100%; accent-color: var(--accent); }
.foot { text-align: center; color: var(--muted); font-size: .82rem; margin: 6px 0 0; }

/* Size picker (shared by settings and setup) */
.sizes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.size {
  display: grid; gap: 8px; justify-items: center; padding: 12px 8px; border-radius: 16px; border: 3px solid var(--line); background: var(--surface);
  font-weight: 700; font-size: .92rem; text-align: center;
}
.size small { font-weight: 400; color: var(--muted); font-size: .78rem; }
.size[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.mini { display: grid; gap: 4px; width: 44px; height: 62px; }
.mini i { border-radius: 5px; background: var(--c-thing-bg); border: 2px solid var(--c-thing); }
.mini.n2 { grid-template-rows: 1fr 1fr; }
.mini.n4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.mini.n6 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr 1fr; }

/* Children */
.kids { display: flex; flex-wrap: wrap; gap: 8px; }
.kid {
  display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 6px 14px 6px 6px; border-radius: 999px;
  border: 2px solid var(--line); background: var(--surface); font-weight: 700;
}
.kid .av { width: 32px; height: 32px; 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); }
.kid.add { padding: 6px 14px; color: var(--accent-strong); border-style: dashed; }

/* Insights */
.stats3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat { background: var(--bg); border-radius: 12px; padding: 10px; display: grid; gap: 2px; }
.stat b { font-family: var(--font-display); font-weight: 600; font-size: 1.6rem; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat span { font-size: .78rem; color: var(--muted); }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; align-items: end; height: 96px; }
.week .day { display: grid; grid-template-rows: 1fr auto auto; height: 100%; gap: 3px; text-align: center; font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.week .col { display: flex; align-items: flex-end; }
.week .barv { width: 100%; border-radius: 6px 6px 2px 2px; background: var(--accent); min-height: 3px; }
.week .barv.zero { background: var(--line); }
.week .today { color: var(--ink); font-weight: 700; }
.words { display: grid; gap: 6px; }
.wrow { display: grid; grid-template-columns: minmax(0, 7.5em) 1fr 2.5em; gap: 10px; align-items: center; font-size: .92rem; }
.wrow span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.wrow .track { height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.wrow .track i { display: block; height: 100%; background: var(--c-action); border-radius: 99px; }
.wrow span:last-child { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }

/* Editor */
.preview { display: grid; place-items: center; padding: 6px 0 4px; }
.preview .tile { width: 168px; height: 168px; }
.types { display: flex; flex-wrap: wrap; gap: 10px; }
.types button { width: 46px; height: 46px; border-radius: 14px; 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; }
.recstatus { font-size: .9rem; color: var(--muted); }
.btn.rec { color: var(--danger); }
.btn.rec.armed { color: #fff; animation: breathe 1s ease-in-out infinite; }
.choice { display: grid; gap: 10px; }
.choice .btn { justify-content: flex-start; min-height: 64px; font-size: 1.05rem; }
.choice .btn .e { font-size: 1.6rem; }
.confirm { background: var(--c-stop-bg); border: 2px solid var(--c-stop); border-radius: 14px; padding: 14px; display: grid; gap: 10px; }

/* ---------- Full-screen pages: voice picker + setup ---------- */
.page {
  position: fixed; inset: 0; z-index: 30; background: var(--bg); overflow-y: auto;
  padding-block: max(20px, env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-bottom, 0px));
  padding-left: max(18px, env(safe-area-inset-left, 0px)); padding-right: max(18px, env(safe-area-inset-right, 0px));
  -webkit-user-select: text; user-select: text;
}
.page-inner { max-width: 560px; min-height: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.page h1, .page h2 { font-family: var(--font-display); font-weight: 600; margin: 0; text-wrap: balance; }
.page h1 { font-size: clamp(2rem, 8vw, 2.6rem); line-height: 1.1; }
.page h2 { font-size: clamp(1.6rem, 6vw, 2rem); line-height: 1.15; }
.page .lead { font-size: 1.08rem; line-height: 1.5; color: var(--muted); margin: 0; max-width: 34em; }
.page .grow { flex: 1; }
.page .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.page .actions .btn { flex: 1; min-height: 56px; font-size: 1.08rem; }
.progress { display: flex; gap: 6px; }
.progress i { flex: 1; height: 6px; border-radius: 99px; background: var(--line); }
.progress i.on { background: var(--accent); }
.hero-icon { width: 96px; height: 96px; border-radius: 24px; box-shadow: 0 10px 30px rgb(47 109 181 / .3); }
.demo { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.demo .tile { aspect-ratio: 1; padding: 6px; pointer-events: none; }
.demo .tile .e { font-size: 2.4rem; }
.demo .tile .t { font-size: 1rem; }
.names { display: grid; gap: 10px; }
.name-row { display: flex; gap: 8px; }
.name-row input { flex: 1; min-width: 0; font: inherit; font-size: 1.1rem; padding: 14px 16px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); }
.name-row button { width: 52px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); font-size: 1.2rem; flex: none; }
.tips { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.tips li { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px; line-height: 1.45; }
.tips .ti { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 1.4rem; background: var(--accent-soft); }
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.vcard {
  display: grid; justify-items: center; align-content: center; gap: 6px; min-height: 132px; padding: 14px 8px;
  border-radius: var(--r-lg); border: 4px solid var(--line); background: var(--surface);
}
.vcard .big { font-size: 2.6rem; line-height: 1; }
.vcard b { font-size: 1.15rem; }
.vcard small { font-size: .74rem; color: var(--muted); overflow-wrap: anywhere; }
.vcard[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }

@media (max-width: 480px) {
  .sbtn { width: 52px; font-size: .66rem; }
  .sbtn svg { width: 24px; height: 24px; }
  .sbtn.speak { width: 76px; font-size: .85rem; }
  .bar { grid-template-columns: 1fr 1fr 1fr 54px; }
  .bar .home span { display: none; }
  .sizes { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
