/* WellConnected — mobile-first. Tokens and touch sizes carried over from the matchmaker. */
:root {
  --bg: #f5f6f3; --card: #ffffff; --card2: #eff1ec; --line: #dcdfd6;
  --text: #1d2420; --muted: #5e6a62; --primary: #1f6b4f; --primary-d: #17543e; --on-primary: #ffffff;
  --accent: #b5542b; --danger: #c2362f; --ok: #237a4b; --warn: #a86b00;
  --fill-bg: #e6f4ea; --over-bg: #fbe9e7;
  --radius: 14px; --shadow: 0 1px 3px rgba(20, 30, 25, .07);
  color-scheme: light;
}
/* Dark: follows the device (Appearance: System), or forced by Settings → Appearance (data-theme on <html>). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141816; --card: #1c211e; --card2: #252b27; --line: #333b36;
    --text: #e7ece8; --muted: #9aa69e; --primary: #4fb38a; --primary-d: #3f9673; --on-primary: #0f1a15;
    --accent: #e08a5f; --danger: #ef6b61; --ok: #5cc28a; --warn: #e0a83a;
    --fill-bg: #1d3326; --over-bg: #3a2220; --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141816; --card: #1c211e; --card2: #252b27; --line: #333b36;
  --text: #e7ece8; --muted: #9aa69e; --primary: #4fb38a; --primary-d: #3f9673; --on-primary: #0f1a15;
  --accent: #e08a5f; --danger: #ef6b61; --ok: #5cc28a; --warn: #e0a83a;
  --fill-bg: #1d3326; --over-bg: #3a2220; --shadow: none;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); line-height: 1.5; font-size: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.6rem; line-height: 1.2; margin: .2em 0 .4em; }
h2 { font-size: 1.15rem; margin: 0 0 .6em; }
h3 { font-size: 1.05rem; margin: 0; }
.wrap { max-width: 820px; margin: 0 auto; padding: 16px 16px 64px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.lead { font-size: 1.02rem; margin-top: 0; }
.hint { font-size: .875rem; color: var(--muted); margin: -4px 0 12px; }
[hidden] { display: none !important; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.1rem; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--primary); position: relative; }
.brand-mark::after { content: ""; position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); right: -7px; bottom: -4px; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { padding: 8px 10px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: .95rem; }
.nav a.on { color: var(--text); background: var(--card2); }
.nav a:hover { text-decoration: none; color: var(--text); }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: #fff; font-size: .75rem; text-align: center; line-height: 20px; }

/* Cards, forms */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow); }
input, select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--card2); border: 1px solid var(--line);
  border-radius: 10px; padding: 11px 12px; min-height: 46px;
}
textarea { min-height: auto; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: 0; }
input[type=file] { padding: 9px; }
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; accent-color: var(--primary); }
label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 12px; font-weight: 600; }
label > input, label > textarea, label > select { margin-top: 4px; font-weight: 400; }
label small { display: block; font-weight: 400; margin-top: 4px; }
fieldset { border: 0; padding: 0; margin: 0 0 12px; }
legend { font-size: .85rem; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.radio { display: flex; gap: 8px; align-items: center; font-weight: 400; color: var(--text); font-size: .95rem; margin-bottom: 6px; }
.grid2 { display: grid; grid-template-columns: 1fr; gap: 0 12px; }
@media (min-width: 640px) { .grid2 { grid-template-columns: 1fr 1fr; } .grid2 .span2 { grid-column: 1 / -1; } }
details.more > summary, details.edit-fields > summary { cursor: pointer; color: var(--primary); font-weight: 600; font-size: .9rem; padding: 6px 0 10px; }
.form-error { color: var(--danger); font-size: .92rem; }
.form-ok { color: var(--ok); font-size: .92rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 16px;
  border-radius: 10px; border: 1px solid transparent; font: inherit; font-weight: 600; cursor: pointer;
  background: var(--card2); color: var(--text); -webkit-tap-highlight-color: transparent;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: .55; cursor: default; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: .9rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover:not(:disabled) { background: var(--primary-d); }
.btn-ghost { background: transparent; border-color: var(--line); }
.btn-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); background: transparent; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--primary); cursor: pointer; text-align: left; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.count { font-weight: 400; font-size: 1rem; }

/* Auth */
.auth-card { max-width: 420px; margin: 8vh auto 0; }
.auth-links { font-size: .9rem; text-align: center; margin-bottom: 0; }

/* Add box */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 12px; margin-bottom: 4px; scrollbar-width: thin; }
.tab { flex: 0 0 auto; border: 1px solid var(--line); background: transparent; color: var(--muted); border-radius: 999px; padding: 8px 14px; font: inherit; font-size: .92rem; font-weight: 600; cursor: pointer; }
.tab.on { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.event-fields { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }
.previews { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 12px; }
.previews img { max-width: 100%; max-height: 220px; border-radius: 10px; border: 1px solid var(--line); }
.working { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .92rem; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--primary); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

/* Review */
.review-group { margin-bottom: 28px; }
.group-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.group-head h2 { margin: 0; }
.group-head p { margin: 2px 0 0; }
.group-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.item-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.item-head p { margin: 2px 0 0; }
.conf { flex: 0 0 auto; font-size: .8rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.conf-high { background: var(--fill-bg); color: var(--ok); }
.conf-mid { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.conf-low { background: var(--over-bg); color: var(--danger); }
.conf-in-low { border-color: var(--danger); }
.conf-in-mid { border-color: var(--warn); }
.match-banner { background: color-mix(in srgb, var(--accent) 12%, var(--card)); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.diff { border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; margin-bottom: 10px; }
.diff-row { display: grid; grid-template-columns: minmax(110px, .8fr) 1fr 1fr; gap: 10px; padding: 8px 10px; border-top: 1px solid var(--line); margin: 0; font-weight: 400; color: var(--text); font-size: .92rem; word-break: break-word; }
.diff-row:first-child { border-top: 0; }
.diff-head { font-size: .8rem; color: var(--muted); font-weight: 700; background: var(--card2); }
.diff-field { display: flex; gap: 6px; align-items: flex-start; font-weight: 600; color: var(--muted); }
.diff-fill .diff-new { background: var(--fill-bg); border-radius: 6px; padding: 0 4px; }
.diff-overwrite .diff-new { background: var(--over-bg); border-radius: 6px; padding: 0 4px; }
.diff > p { padding: 0 10px; }
.review-item.done { opacity: .75; }
.notice { background: var(--over-bg); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; font-size: .92rem; }
.empty { text-align: center; padding: 28px 16px; }

/* People */
#people-q { margin: 4px 0 14px; }
.people-list { list-style: none; padding: 0; margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.people-list li { border-top: 1px solid var(--line); }
.people-list li:first-child { border-top: 0; }
.people-list li.muted, .people-list li.form-error { padding: 16px; }
.people-list a { display: block; padding: 12px 16px; color: var(--text); }
.people-list a:hover { background: var(--card2); text-decoration: none; }
.pl-name { display: block; font-weight: 600; }
.pl-sub, .pl-met { display: block; font-size: .875rem; color: var(--muted); }

/* Person */
.person-head h1 { margin-top: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.chip { font-size: .8rem; padding: 2px 10px; border-radius: 999px; background: var(--card2); color: var(--muted); font-weight: 600; text-transform: capitalize; }
.chip-tag { text-transform: none; }
.facts { margin: 0; }
.facts > div { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 8px 0; border-top: 1px solid var(--line); }
.facts > div:first-child { border-top: 0; }
@media (min-width: 640px) { .facts > div { grid-template-columns: 160px 1fr; gap: 12px; } }
.facts dt { font-size: .85rem; color: var(--muted); font-weight: 600; }
.facts dd { margin: 0; word-break: break-word; }
.prov { display: block; margin-top: 2px; font-size: .78rem; color: var(--muted); background: none; border: 0; padding: 0; font-family: inherit; cursor: pointer; text-align: left; }
button.prov:hover { color: var(--primary); text-decoration: underline; }
.timeline, .sources { list-style: none; padding: 0; margin: 0; }
.timeline li, .sources li { padding: 8px 0; border-top: 1px solid var(--line); }
.timeline li:first-child, .sources li:first-child { border-top: 0; }
.timeline strong { display: block; }
.timeline p { margin: 2px 0 0; }
.danger-zone { background: transparent; box-shadow: none; }
.dialog { width: min(92vw, 720px); max-height: 85vh; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--text); padding: 16px; }
.dialog::backdrop { background: rgba(0, 0, 0, .45); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.dialog-head h2 { margin: 0; }
.raw { white-space: pre-wrap; word-break: break-word; background: var(--card2); border-radius: 10px; padding: 12px; font-size: .85rem; max-height: 55vh; overflow: auto; }

/* Toast, QR */
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(20px + env(safe-area-inset-bottom)); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; z-index: 50; max-width: min(92vw, 520px); font-size: .95rem; }
.qr-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .88); z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 16px; }
.qr-frame { position: relative; width: min(92vw, 560px); }
.qr-frame video { width: 100%; border-radius: 12px; background: #000; display: block; }
.qr-target { position: absolute; inset: 15%; border: 2px solid rgba(255, 255, 255, .75); border-radius: 12px; pointer-events: none; }

/* Phase 2: profiles */
.onboard, .welcome { background: color-mix(in srgb, var(--primary) 10%, var(--card)); border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px; }
.onboard p { margin: 0 0 8px; }
.welcome h1 { margin-top: 0; }
.drafted { border-color: var(--primary); background: var(--fill-bg); }
.suggest { display: block; margin-top: 4px; font-weight: 400; font-size: .85rem; color: var(--text); background: var(--fill-bg); border-radius: 8px; padding: 6px 8px; }
.chip-ok { background: var(--fill-bg); color: var(--ok); }
.chip-miss { background: var(--over-bg); color: var(--danger); }
.tools { margin-top: 4px; }
.filters { margin: 4px 0 12px; }
.filters input[type=search] { margin-bottom: 8px; }
.dots { display: inline-flex; gap: 3px; margin-left: 8px; vertical-align: middle; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.dot.on { background: var(--ok); }
.batch > summary { cursor: pointer; font-weight: 600; color: var(--primary); }
.batch-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.batch-row p { margin: 2px 0 0; }
.batch-progress progress { width: 100%; height: 10px; accent-color: var(--primary); }
.review-all { margin-bottom: 18px; }

/* Phase 3: matches */
.match-run-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.match-run-row p { margin: 0; }
.match-reason { margin: 0 0 8px; font-size: 1rem; }
.match-line { margin: 0 0 6px; font-size: .93rem; }
.match.liked { border-color: color-mix(in srgb, var(--ok) 55%, var(--line)); }
.feedback [aria-pressed=true] { background: var(--fill-bg); border-color: var(--ok); }
.tab-count { font-weight: 400; opacity: .8; }
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-top: 10px; }
.aff-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.aff-table th, .aff-table td { padding: 8px 10px; border-top: 1px solid var(--line); text-align: left; vertical-align: middle; }
.aff-table th { border-top: 0; background: var(--card2); color: var(--muted); font-size: .8rem; }
.aff-table input { width: 90px; min-height: 36px; padding: 6px 8px; }

/* Phase 4: drafts and intros */
.muted-on { opacity: .8; font-weight: 400; }
.warn-text { color: var(--warn); }
.danger-text { color: var(--danger); }
.busy { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.draft-dialog textarea { line-height: 1.5; }
.sent-ask { margin-top: 14px; padding: 12px; border-radius: 10px; background: var(--fill-bg); }
.sent-ask p { margin: 0; }
.keep { margin-top: 12px; }
.sub-form { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.match-act { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 10px; }
.steps { display: flex; flex-wrap: wrap; gap: 4px 6px; list-style: none; padding: 0; margin: 4px 0 10px; font-size: .8rem; }
.steps li { padding: 2px 10px; border-radius: 999px; background: var(--card2); color: var(--muted); font-weight: 600; }
.steps li.done { background: var(--fill-bg); color: var(--ok); }
.steps li.done::before { content: "✓ "; }
.steps li.now { background: var(--primary); color: var(--on-primary); }
.next { margin: 0 0 6px; }
.intro-side { display: flex; justify-content: space-between; align-items: center; gap: 4px 12px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line); }
.intro-side p { margin: 2px 0 0; }
.intro-side .actions { margin-top: 0; }
.intro-main { border-top: 1px solid var(--line); padding-top: 10px; }
.intro.highlight { border-color: var(--primary); }
.outcome { margin-top: 10px; }

/* Review: collapsible groups, "Current → Will become", failed reads */
details.review-group > summary { cursor: pointer; list-style: none; }
details.review-group > summary::-webkit-details-marker { display: none; }
details.review-group > summary h2::before { content: '▸'; display: inline-block; width: 1.1em; color: var(--muted); transition: transform .15s; }
details.review-group[open] > summary h2::before { transform: rotate(90deg); }
details.review-group > .group-actions { margin-bottom: 10px; }
details.review-group:not([open]) { margin-bottom: 12px; }
.diff-arrow { color: var(--muted); font-weight: 700; margin-right: 6px; }
.diff-off .diff-new { opacity: .45; text-decoration: line-through; background: none !important; }
.failed-list { list-style: none; padding: 0; margin: 0; }
.failed-list li { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line); }
.failed-list li p { margin: 2px 0 0; }
@media (prefers-reduced-motion: reduce) { details.review-group > summary h2::before { transition: none; } }
.tag-filter { display: flex; gap: 8px; align-items: center; font-weight: 600; font-size: .92rem; margin-bottom: 8px; }
.tag-filter select { width: auto; max-width: 100%; }
.pl-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }

/* Today */
.today-item h3 { margin: 6px 0 4px; }
.today-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.today-kind { background: color-mix(in srgb, var(--primary) 14%, var(--card)); color: var(--primary); }
.today-reason { margin: 0 0 4px; }
.today-state { color: var(--ok); font-weight: 700; font-size: .9rem; }
.today-done, .today-snoozed, .today-skipped { opacity: .7; box-shadow: none; }
.today-done .today-reason { color: var(--muted); }
.today-alldone { font-weight: 600; }
.today-foot { margin-top: 6px; }
.notice-soft { background: color-mix(in srgb, var(--accent) 10%, var(--card)); }
.usage-note { margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; font-size: .92rem; }
.usage-warn { background: color-mix(in srgb, var(--warn) 16%, var(--card)); }
.usage-out { background: var(--over-bg); }
.usage-bar { width: 100%; height: 10px; accent-color: var(--primary); }
.usage-table td { padding: 2px 10px 2px 0; font-size: .92rem; }
.usage-table td:last-child { text-align: right; }
.danger-zone > summary { cursor: pointer; font-weight: 600; color: var(--danger); }

/* Admin */
.admin-panel { margin-top: 12px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.admin-table th, .admin-table td { text-align: left; padding: 8px 8px; border-top: 1px solid var(--line); vertical-align: top; }
.admin-table th { font-size: .8rem; color: var(--muted); border-top: 0; }
.admin-table select, .admin-table input { min-width: 0; }
.stats { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 8px; }
.stat { display: flex; flex-direction: column; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; min-width: 160px; flex: 1 1 160px; }
.stat strong { font-size: 1.4rem; }
.plan-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.plan-row input { flex: 1 1 120px; width: auto; margin: 0; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85rem; }
.prompt-old { white-space: pre-wrap; word-break: break-word; background: var(--card2); padding: 10px; border-radius: 8px; max-height: 320px; overflow: auto; }
details.prompt > summary { cursor: pointer; }

/* Footer and legal pages */
.site-foot { text-align: center; font-size: .85rem; color: var(--muted); padding: 24px 16px calc(24px + env(safe-area-inset-bottom, 0px)); }
.site-foot a { color: var(--muted); }
.legal { max-width: 760px; margin-inline: auto; }
.legal h2 { margin-top: 22px; }
.draft-banner { background: color-mix(in srgb, var(--warn) 16%, var(--card)); border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
.legal-note { color: var(--muted); font-style: italic; }

/* Templates */
a.tpl-card { display: block; color: inherit; text-decoration: none; }
a.tpl-card:hover { border-color: var(--primary); }
.tpl-card h2 { margin: 0 0 4px; }
.tpl-new { background: color-mix(in srgb, var(--accent) 16%, var(--card)); color: var(--accent); }
.checklist { max-height: 220px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin-bottom: 10px; }
.checklist .radio { margin-bottom: 4px; }
fieldset.inline { border: 0; padding: 0; margin: 6px 0 10px; display: flex; flex-wrap: wrap; gap: 4px 16px; }
fieldset.inline legend { font-weight: 600; font-size: .92rem; padding: 0; margin-bottom: 4px; }
.tag-note { display: block; margin: 4px 0 12px; }
.compose { background: var(--card2); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
.num-inline { width: 5.5em; display: inline-block; min-height: 32px; padding: 4px 6px; margin: 0 4px; }
.tpl-preview { margin: 6px 0 0; }
.tpl-people { list-style: none; padding: 0; margin: 0 0 8px; }
.tpl-people li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.tpl-people li .radio { margin: 0; }
button.chip { border: 0; cursor: pointer; font: inherit; font-size: .8rem; }
.rhythm-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.rhythm-row strong { min-width: 11em; }
.rhythm-row select { width: auto; margin: 0; }
.rhythm-row label.inline { display: inline-flex; align-items: center; margin: 0; font-weight: 400; }
.touch-quote { margin: 0 0 10px; padding: 6px 12px; border-left: 3px solid var(--line); color: var(--muted); font-style: italic; }

/* Import (Phase 8a) and People filters */
.imp-map select { width: auto; min-width: 11em; margin: 0; }
.imp-map td { vertical-align: middle; }
.filter-row { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.export-links { margin: 4px 0 10px; color: var(--muted); }
.danger-link { color: var(--danger); margin-left: auto; }

/* Integrations (Phase 8b) */
.scope-list { list-style: none; padding: 0; margin: 6px 0 10px; }
.scope-list li { padding: 5px 0; border-top: 1px solid var(--line); }
.scope-list code { font-size: .85rem; }
.log-list { list-style: none; padding: 0; max-height: 260px; overflow: auto; }
.log-list li { padding: 3px 0; border-top: 1px solid var(--line); word-break: break-word; }

/* Integrations: one box per webhook */
.card-inner { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin: 10px 0; background: var(--card2); }
.card-inner .form-error { margin: 6px 0; }
pre.small { white-space: pre-wrap; word-break: break-word; background: var(--card2); border: 1px solid var(--line); border-radius: 8px; padding: 8px; }

/* ---- Voice notes (Add) */
.card form h3 { margin-top: 1.25rem; }
.voice-record { display: flex; flex-direction: column; align-items: center; gap: .6rem; padding: .5rem 0; text-align: center; }
.rec-btn { display: inline-flex; align-items: center; gap: .6rem; min-width: 12rem; min-height: 3.5rem; padding: .8rem 1.4rem; border-radius: 999px;
  border: 2px solid currentColor; background: transparent; color: inherit; font: inherit; font-size: 1.1rem; font-weight: 600; cursor: pointer;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent; justify-content: center; }
.rec-btn:focus-visible { outline: 3px solid var(--danger); outline-offset: 3px; }
.rec-dot { width: .95rem; height: .95rem; border-radius: 50%; background: var(--danger); flex: none; }
.rec-btn.on { background: var(--danger); border-color: var(--danger); color: #fff; }
.rec-btn.on .rec-dot { background: #fff; border-radius: 3px; animation: rec-pulse 1.2s ease-in-out infinite; }
@keyframes rec-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .rec-btn.on .rec-dot { animation: none; } }
.rec-status { display: flex; align-items: center; gap: .75rem; min-height: 2rem; font-variant-numeric: tabular-nums; }
.rec-level { display: none; width: 8rem; height: .45rem; border-radius: 999px; background: var(--line); overflow: hidden; }
.rec-status.live .rec-level { display: inline-block; }
.rec-level span { display: block; height: 100%; width: 0; background: var(--ok); transition: width .08s linear; }
.rec-hint { max-width: 34rem; }
.link-like { cursor: pointer; text-decoration: underline; display: inline; font-weight: normal; }
.voice-transcript audio { width: 100%; margin-bottom: .75rem; }
.voice-unread { margin-bottom: .75rem; }
.voice-unread ul.plain { list-style: none; padding: 0; margin: .25rem 0 0; }
.voice-unread li { padding: .3rem 0; border-top: 1px solid var(--line); }
#source-body audio { width: 100%; margin: .5rem 0; }

/* ==== App shell (stage 1 of the app redesign): bottom tabs on phones, a sidebar on wide screens, the Add sheet ==== */
.ic { flex: none; }
body.shell .wrap { padding-top: calc(14px + env(safe-area-inset-top)); padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
body.shell .site-foot { display: none; }
body.shell .toast { bottom: calc(100px + env(safe-area-inset-bottom)); }
.form-note { margin: 8px 0; padding: 10px 12px; border-radius: 10px; background: var(--fill-bg); color: var(--text); font-size: .95rem; }

/* Bottom tabs (phones and tablets) */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 6px 4px env(safe-area-inset-bottom); background: color-mix(in srgb, var(--card) 94%, transparent); backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
.tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 54px;
  color: var(--muted); font-size: .7rem; font-weight: 650; letter-spacing: .01em; -webkit-tap-highlight-color: transparent; }
.tabbar a:hover { text-decoration: none; }
.tabbar a.on { color: var(--primary); }
.tabbar .badge { position: absolute; top: 0; left: calc(50% + 4px); min-width: 20px; line-height: 20px; padding: 0 5px; background: var(--danger); font-weight: 700; }
.tab-plus { width: 56px; height: 56px; border-radius: 50%; background: var(--primary); color: var(--on-primary); display: flex; align-items: center; justify-content: center;
  margin-top: -24px; box-shadow: 0 4px 14px color-mix(in srgb, var(--primary) 40%, transparent); }
.tabbar a.tab-add:active .tab-plus { transform: scale(.94); }

/* Sidebar (wide screens) */
.sidebar { display: none; }
@media (min-width: 900px) {
  .tabbar { display: none; }
  body.shell { padding-left: 252px; }
  body.shell .wrap { padding-top: 28px; padding-bottom: 64px; }
  body.shell .site-foot { display: block; }
  body.shell .toast { bottom: 24px; }
  .sidebar { display: flex; flex-direction: column; gap: 4px; position: fixed; top: 0; bottom: 0; left: 0; width: 252px; box-sizing: border-box; z-index: 30;
    padding: 20px 14px; background: var(--card); border-right: 1px solid var(--line); overflow-y: auto; }
  .sidebar .brand { padding: 4px 8px 16px; }
  .side-add { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 12px; }
  .side-add:hover { text-decoration: none; }
  .side-nav { display: flex; flex-direction: column; gap: 2px; }
  .side-nav a { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 10px; border-radius: 10px; color: var(--text); font-weight: 550; }
  .side-nav a .ic { color: var(--muted); }
  .side-nav a:hover { text-decoration: none; background: var(--card2); }
  .side-nav a.on { background: var(--fill-bg); color: var(--primary); }
  .side-nav a.on .ic { color: var(--primary); }
  .side-nav .badge { margin-left: auto; background: var(--danger); font-weight: 700; }
  .side-sep { height: 1px; background: var(--line); margin: 10px 6px; }
}

/* Captures waiting to send */
.outbox-note { position: fixed; z-index: 29; left: 12px; right: 12px; bottom: calc(88px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 10px;
  padding: 8px 8px 8px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 4px 16px rgba(0, 0, 0, .12); font-size: .9rem; }
.outbox-note .outbox-text { flex: 1; }
@media (min-width: 900px) { .outbox-note { left: 272px; right: auto; max-width: 520px; bottom: 20px; } }

/* The Add sheet: slides up on phones, a centred panel on wide screens */
dialog.sheet { margin: auto auto 0; width: 100%; max-width: 100%; max-height: 92vh; box-sizing: border-box; overflow-y: auto; border: 0; color: var(--text);
  background: var(--bg); border-radius: 22px 22px 0 0; padding: 8px 16px calc(20px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 30px rgba(0, 0, 0, .2); }
dialog.sheet::backdrop { background: rgba(10, 16, 13, .45); }
dialog.sheet[open] { animation: sheet-up .22s ease-out; }
@keyframes sheet-up { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { dialog.sheet[open] { animation: none; } }
@media (min-width: 900px) { dialog.sheet { margin: auto; max-width: 520px; border-radius: 20px; padding: 12px 20px 20px; } .sheet-grab { display: none; } }
.sheet-grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 8px; }
.sheet-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.sheet-top h2 { margin: 0; font-size: 1.35rem; }
.sheet-x { width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%; border: 0; background: var(--card2); color: var(--text); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.sheet-wait { margin: 0 0 10px; padding: 8px 12px; border-radius: 10px; background: var(--fill-bg); }
.sheet-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sheet-tile { display: flex; flex-direction: column; justify-content: space-between; gap: 10px; min-height: 112px; box-sizing: border-box; padding: 14px; border-radius: 18px;
  background: var(--card); color: var(--text); border: 1px solid var(--line); -webkit-tap-highlight-color: transparent; }
.sheet-tile:hover { text-decoration: none; border-color: var(--primary); }
.sheet-tile strong { display: block; font-size: 1rem; }
.sheet-sub { display: block; font-size: .82rem; color: var(--muted); }
.sheet-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--fill-bg); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.sheet-tile.big { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.sheet-tile.big .sheet-sub { color: inherit; opacity: .85; }
.sheet-tile.big .sheet-ic { background: color-mix(in srgb, var(--on-primary) 18%, transparent); color: var(--on-primary); }
.sheet-tile:active { transform: scale(.98); }
.sheet-list { margin-top: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.sheet-row { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 14px; color: var(--text); border-top: 1px solid var(--line); }
.sheet-row:first-child { border-top: 0; }
.sheet-row:hover { text-decoration: none; background: var(--card2); }
.sheet-row > .ic:first-child { color: var(--primary); }
.sheet-row span { flex: 1; }
.sheet-row > .ic:last-child { color: var(--muted); }

/* More (phones) */
.more-head { margin: 20px 4px 8px; font-size: .8rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.more-list { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.more-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 0 14px; box-sizing: border-box; color: var(--text);
  border: 0; border-top: 1px solid var(--line); background: none; font: inherit; text-align: left; cursor: pointer; }
.more-row:first-child { border-top: 0; }
.more-row:hover { text-decoration: none; background: var(--card2); }
.more-row > .ic:last-child { color: var(--muted); }
.more-ic { width: 32px; height: 32px; border-radius: 9px; background: var(--fill-bg); color: var(--primary); display: flex; align-items: center; justify-content: center; flex: none; }
.more-t { flex: 1; display: flex; flex-direction: column; }
.more-meta { font-size: .85rem; color: var(--muted); }
.more-me { padding: 12px 14px; }
.more-av { width: 46px; height: 46px; border-radius: 50%; background: var(--card2); display: flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.more-out, .more-out .more-ic { color: var(--danger); }
.more-out .more-ic { background: var(--over-bg); }
.more-install { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 14px; border-radius: 16px; background: var(--fill-bg); }

/* Add: one big button for the camera */
.capture-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 54px; font-size: 1.05rem; margin-bottom: 8px; }

/* ==== App redesign, stage 2: app-style pages ==== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.card { border-radius: 16px; }
.back-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; font-size: 1rem; }

/* Large titles that stay pinned under the status bar while the page scrolls */
body.shell .wrap { padding-top: 0; }
body.shell .wrap > .page-head { position: sticky; top: 0; z-index: 15; margin: 0 -16px 8px; padding: calc(12px + env(safe-area-inset-top)) 16px 10px;
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
body.shell .wrap > .page-head h1 { margin: 0; font-size: 2rem; letter-spacing: -.02em; line-height: 1.1; }
body.shell .wrap > .page-head .count { font-size: 1.05rem; }
body.shell .wrap > p:first-child, body.shell .wrap > .usage-note:first-child, body.shell .wrap > .onboard:first-child { margin-top: calc(10px + env(safe-area-inset-top)); }
@media (min-width: 900px) { body.shell .wrap > .page-head { padding-top: 22px; } }

/* Touch targets: 44 px on phones, buttons and links in action rows included */
@media (max-width: 899px) {
  .btn-sm { min-height: 44px; padding: 0 14px; }
  .actions .linklike, .linklike.small { min-height: 44px; display: inline-flex; align-items: center; }
  .actions > .btn-primary:first-child { flex: 1 1 100%; }
  .card { padding: 16px; }
}

/* Chips (filters) */
.chip-bar { display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 10px; }
.chip-bar::-webkit-scrollbar { display: none; }
.chip-btn { flex: none; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; }
.chip-btn span { color: var(--muted); font-weight: 500; }
.chip-btn.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip-btn.on span { color: inherit; opacity: .8; }
/* The tab rows on Add, Matches and Intros read as chips too */
.tabs { scrollbar-width: none; }
.tab { min-height: 40px; }

/* Segmented control (Settings → Appearance) and section tabs (a person) */
.segmented { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; padding: 3px; margin: 0; border: 0; border-radius: 12px; background: var(--card2); }
.segmented label { position: relative; margin: 0; }
.segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmented span { display: flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 10px; font-weight: 600; color: var(--muted); }
.segmented input:checked + span { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
.segmented input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 1px; }
.segmented-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3px; padding: 3px; margin: 4px 0 12px; border-radius: 12px; background: var(--card2);
  position: sticky; top: calc(4px + env(safe-area-inset-top)); z-index: 12; }
.segmented-tabs button { min-height: 42px; border: 0; border-radius: 10px; background: none; font: inherit; font-size: .92rem; font-weight: 600; color: var(--muted); cursor: pointer; }
.segmented-tabs button.on { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }

/* Switches (Settings) */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 52px; margin: 6px 0; font-weight: 500; cursor: pointer; }
.switch-row input[type="checkbox"] { appearance: none; -webkit-appearance: none; flex: none; width: 51px; height: 31px; min-height: 0; padding: 0; margin: 0; border: 0; border-radius: 16px;
  background: var(--line); position: relative; cursor: pointer; transition: background .15s; }
.switch-row input[type="checkbox"]::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: left .15s; }
.switch-row input[type="checkbox"]:checked { background: var(--primary); }
.switch-row input[type="checkbox"]:checked::after { left: 22px; }
.switch-row input[type="checkbox"]:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .switch-row input[type="checkbox"], .switch-row input[type="checkbox"]::after { transition: none; } }
.settings-form h3 { margin: 20px 0 4px; font-size: .8rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
#appearance h2 { margin-bottom: 10px; }
.more-install { margin: 0 0 14px; }

/* Review */
.review-count { flex: none; align-self: center; margin: 0 6px 0 0; font-weight: 700; }
.review-chips { position: sticky; top: calc(64px + env(safe-area-inset-top)); z-index: 14; background: var(--bg); padding-top: 4px; }
details.review-group > summary.group-head { position: sticky; top: calc(112px + env(safe-area-inset-top)); z-index: 13; background: var(--bg); }
.review-group .actions .btn, .review-item .actions .btn { min-height: 48px; }
@media (max-width: 899px) { .review-item .actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); } .review-item .actions > * { width: 100%; } }

/* People: pinned search and chips, A–Z, initials */
.search-bar { position: sticky; top: calc(64px + env(safe-area-inset-top)); z-index: 14; margin: 0 -16px; padding: 4px 16px 0; background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.search-bar input[type="search"] { border-radius: 12px; }
.search-bar .chip-bar { margin-top: 8px; }
.filters-more { margin: 0 0 12px; }
.filters-more > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; color: var(--primary); }
.people-list a { display: flex; align-items: center; gap: 12px; min-height: 60px; }
.pl-av { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--card2); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; color: var(--text); }
.pl-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pl-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.people-list li.pl-letter { padding: 10px 16px 4px; font-size: .8rem; font-weight: 700; color: var(--muted); background: var(--bg); border-top: 0; }

/* A person */
.person-bar { display: flex; align-items: center; justify-content: space-between; padding-top: calc(4px + env(safe-area-inset-top)); }
.person-top { text-align: center; padding: 4px 0 12px; }
.person-av { width: 80px; height: 80px; border-radius: 50%; margin: 0 auto 10px; background: var(--card2); display: flex; align-items: center; justify-content: center; font-size: 1.7rem; font-weight: 700; }
.person-top h1 { margin: 0; font-size: 1.7rem; }
.person-top .lead { margin: 4px 0 6px; color: var(--muted); }
.person-top .chips { justify-content: center; }
.quick-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.quick { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 72px; padding: 6px 4px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--card); color: var(--primary); font: inherit; font-size: .8rem; font-weight: 650; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.quick small { font-size: .7rem; color: var(--muted); font-weight: 500; }
.quick:active { transform: scale(.97); }
.tab-empty { display: none; }
#person-matches[hidden] + .tab-empty { display: block; }
.completeness .chips { margin: 0; }

/* My profile: the Save button stays in reach */
.save-bar { position: sticky; bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 12; margin: 12px -16px -16px; padding: 12px 16px; border-radius: 0 0 16px 16px;
  background: color-mix(in srgb, var(--card) 94%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-top: 1px solid var(--line); }
@media (min-width: 900px) { .save-bar { bottom: 0; } }

/* Dialogs slide up from the bottom on phones */
@media (max-width: 899px) {
  dialog.dialog { margin: auto auto 0; width: 100%; max-width: 100%; max-height: 90vh; border-radius: 22px 22px 0 0; border: 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
    background: var(--bg); box-shadow: 0 -8px 30px rgba(0, 0, 0, .2); }
  dialog.dialog[open] { animation: sheet-up .22s ease-out; }
}
@media (max-width: 899px) and (prefers-reduced-motion: reduce) { dialog.dialog[open] { animation: none; } }

/* Wide tables scroll sideways inside their card on phones */
@media (max-width: 899px) { .admin-table, .usage-table, .aff-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; } }

/* Log in, sign up and password pages: a launch screen */
.auth-brand { padding: calc(36px + env(safe-area-inset-top)) 16px 0; text-align: center; }
.auth-brand a { display: inline-flex; flex-direction: column; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 1.35rem; }
.auth-brand a:hover { text-decoration: none; }
.auth-brand img { border-radius: 18px; box-shadow: 0 8px 24px color-mix(in srgb, var(--primary) 30%, transparent); }
body.plain .auth-card { margin-top: 20px; border: 0; background: transparent; box-shadow: none; }
body.plain .auth-card h1 { text-align: center; font-size: 1.15rem; color: var(--muted); font-weight: 600; }
body.plain .auth-card .btn-block { min-height: 52px; font-size: 1.05rem; border-radius: 14px; }
@media (min-width: 900px) {
  .review-chips, .search-bar { top: 74px; }
  details.review-group > summary.group-head { top: 122px; }
  .segmented-tabs { top: 8px; }
}

/* ==== App redesign, stage 3: pull to refresh, transitions ==== */
/* Pull to refresh (Today): our own, so the browser's bounce or reload doesn't fight it */
body.has-ptr { overscroll-behavior-y: contain; }
.ptr { position: fixed; z-index: 40; left: 50%; top: calc(env(safe-area-inset-top) + 6px); transform: translate(-50%, calc(var(--pull, 0px) - 56px)); pointer-events: none;
  transition: transform .2s ease-out; }
.ptr.ptr-pulling { transition: none; }
.ptr-ring { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--card); color: var(--muted);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .18); }
.ptr-ring svg { transform: rotate(var(--turn, 0deg)); }
.ptr.ptr-ready .ptr-ring { color: var(--primary); }
.ptr.ptr-busy .ptr-ring { color: var(--primary); }
.ptr.ptr-busy .ptr-ring svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { width: 44px; padding: 0; }
.icon-btn.spinning svg { animation: spin .8s linear infinite; }
@media (prefers-reduced-motion: reduce) { .ptr, .ptr-ring svg { transition: none; } .ptr.ptr-busy .ptr-ring svg, .icon-btn.spinning svg { animation-duration: 3s; } }

/* Page transitions: pages fade into each other where the browser supports it (Chrome, Edge, Safari 18+);
   the tabs and sidebar stay put. Elsewhere pages simply load as before. Off with Reduce Motion. */
@view-transition { navigation: auto; }
.tabbar { view-transition-name: tabbar; }
.sidebar { view-transition-name: sidebar; }
::view-transition-old(root) { animation: wc-out .16s ease-in both; }
::view-transition-new(root) { animation: wc-in .2s ease-out both; }
@keyframes wc-out { to { opacity: 0; } }
@keyframes wc-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
/* Switching within a page (a person's tabs, Review's chips, the Add tabs) */
.ptab:not([hidden]), .review-group:not([hidden]), .add-box .panel:not([hidden]) { animation: wc-in .18s ease-out; }
@media (prefers-reduced-motion: reduce) { .ptab:not([hidden]), .review-group:not([hidden]), .add-box .panel:not([hidden]) { animation: none; } }
/* Taps feel immediate */
.tabbar a:active .ic, .more-row:active, .sheet-row:active, .people-list a:active { opacity: .7; }
