/* VCardScanner — design tokens + components. Dark-first (booths are dim), light pair provided.
   Rules of the road: semantic tokens only in components, 4px spacing scale, 44px touch targets,
   transform/opacity animations only, everything respects prefers-reduced-motion. */

:root {
  /* surfaces & text */
  --bg: #0f1419; --surface: #161d26; --surface-2: #1e2732; --surface-3: #263241;
  --border: #2a3542; --border-strong: #3a4756;
  --text: #e6edf3; --text-2: #b6c2cf; --muted: #8b98a5; --on-primary: #ffffff;
  /* brand & semantic */
  --primary: #3b82f6; --primary-hover: #2563eb; --primary-press: #1d4ed8; --ring: #60a5fa;
  --success: #22c55e; --warning: #f59e0b; --danger: #ef4444; --info: #3b82f6;
  /* status chips (bg / fg pairs, checked for ≥4.5:1 on their own bg) */
  --ok-bg: rgba(34,197,94,.16); --ok-fg: #86efac;
  --warn-bg: rgba(245,158,11,.16); --warn-fg: #fcd34d;
  --bad-bg: rgba(239,68,68,.16); --bad-fg: #fca5a5;
  --info-bg: rgba(59,130,246,.16); --info-fg: #93c5fd;
  --admin-bg: rgba(168,85,247,.18); --admin-fg: #d8b4fe;
  /* shape, motion, sizing */
  --r-sm: 8px; --r-md: 10px; --r-lg: 12px; --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(0,0,0,.4); --shadow-2: 0 8px 24px rgba(0,0,0,.45);
  --t-fast: 120ms; --t-base: 200ms; --t-slow: 300ms; --ease-out: cubic-bezier(.2,.8,.2,1);
  --icon: 20px; --icon-lg: 24px; --tap: 44px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}
/* Light palette. Applied when the device prefers light (and the user hasn't forced dark), or when
   the user forces light via the toggle (theme.js sets <html data-theme>). Same block twice on
   purpose — CSS can't share a declaration list between a media query and a selector. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f4f6f9; --surface: #ffffff; --surface-2: #f1f4f8; --surface-3: #e6ebf1;
    --border: #dde3ea; --border-strong: #c7d0da;
    --text: #0f172a; --text-2: #334155; --muted: #5b6b7d;
    --primary: #2563eb; --primary-hover: #1d4ed8; --primary-press: #1e40af; --ring: #3b82f6;
    --ok-bg: #dcfce7; --ok-fg: #166534; --warn-bg: #fef3c7; --warn-fg: #92400e;
    --bad-bg: #fee2e2; --bad-fg: #991b1b; --info-bg: #dbeafe; --info-fg: #1e40af;
    --admin-bg: #f3e8ff; --admin-fg: #6b21a8;
    --shadow-1: 0 1px 2px rgba(15,23,42,.08); --shadow-2: 0 8px 24px rgba(15,23,42,.12);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f4f6f9; --surface: #ffffff; --surface-2: #f1f4f8; --surface-3: #e6ebf1;
  --border: #dde3ea; --border-strong: #c7d0da;
  --text: #0f172a; --text-2: #334155; --muted: #5b6b7d;
  --primary: #2563eb; --primary-hover: #1d4ed8; --primary-press: #1e40af; --ring: #3b82f6;
  --ok-bg: #dcfce7; --ok-fg: #166534; --warn-bg: #fef3c7; --warn-fg: #92400e;
  --bad-bg: #fee2e2; --bad-fg: #991b1b; --info-bg: #dbeafe; --info-fg: #1e40af;
  --admin-bg: #f3e8ff; --admin-fg: #6b21a8;
  --shadow-1: 0 1px 2px rgba(15,23,42,.08); --shadow-2: 0 8px 24px rgba(15,23,42,.12);
  color-scheme: light;
}
/* The camera/scan surface stays dark in every theme — booths are dim and a white viewfinder card
   is unpleasant; matches docs/UI.md §11. */
.dropzone { color-scheme: dark; }

/* ── extras used by the newer screens ─────────────────────────────────────── */
.links-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.links-row .link-btn { font-size: 14px; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 52px; }
.pw-wrap .btn.icon { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); min-height: 40px; min-width: 40px; border: 0; background: transparent; color: var(--muted); }
.select-inline { display: inline-flex; align-items: center; gap: 8px; }
.select-inline select { min-height: 40px; padding: 6px 32px 6px 10px; font-size: 14px; width: auto; }
.row .badge.cat { background: var(--surface-3); color: var(--text-2); text-transform: none; letter-spacing: 0; }
.row.processing .thumb { opacity: .6; }
.recent-head { display: flex; align-items: center; justify-content: space-between; margin: 16px 0 8px; }
.recent-head h3 { margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--muted); }

/* ── base ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; background: var(--bg); color: var(--text);
  font: 400 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; touch-action: manipulation;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: var(--r-sm); }
.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; }
.skip { position: absolute; left: 8px; top: -48px; z-index: 1000; padding: 8px 12px; background: var(--primary); color: var(--on-primary); border-radius: var(--r-sm); }
.skip:focus { top: 8px; }

.ic { width: var(--icon); height: var(--icon); flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px; }
.ic-lg { width: var(--icon-lg); height: var(--icon-lg); }
.ic-xl { width: 40px; height: 40px; stroke-width: 1.5; }

/* ── layout ────────────────────────────────────────────────────────────── */
.app { max-width: 720px; margin: 0 auto; padding: 12px 16px calc(84px + env(safe-area-inset-bottom)); }
.app.wide { max-width: 1120px; padding-bottom: 32px; }
@media (min-width: 768px) { .app { padding-left: 24px; padding-right: 24px; } }

header.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 4px 0 12px; }
header.top h1 { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 600; margin: 0; letter-spacing: -.01em; }
header.top h1 .ic { color: var(--primary); }
.top-actions { display: flex; gap: 8px; align-items: center; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px;
  border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--border);
  font-size: 13px; font-weight: 500; color: var(--text-2); white-space: nowrap;
}
.chip b { color: var(--text); font-variant-numeric: tabular-nums; }
.chip .ic { width: 16px; height: 16px; }
a.chip:hover { text-decoration: none; border-color: var(--border-strong); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow-1); }
.card h2 { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; margin: 0 0 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.card h2 .ic { width: 16px; height: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-head h2 { margin: 0; }

/* ── forms ─────────────────────────────────────────────────────────────── */
label { display: block; font-size: 13px; font-weight: 500; color: var(--text-2); margin: 12px 0 6px; }
label:first-child { margin-top: 0; }
.hint { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
input, select, textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: var(--r-md);
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); font-size: 16px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
input::placeholder { color: var(--muted); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 30%, transparent); }
input.otp { letter-spacing: .45em; font-size: 28px; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }
.field-error { display: flex; align-items: flex-start; gap: 6px; margin-top: 6px; font-size: 13px; color: var(--bad-fg); }

/* ── buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px; border-radius: var(--r-md); border: 1px solid transparent;
  background: var(--primary); color: var(--on-primary); font-size: 16px; font-weight: 600;
  transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast) var(--ease-out), opacity var(--t-fast);
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--primary-hover); text-decoration: none; }
.btn:active { background: var(--primary-press); transform: scale(.98); }
.btn:disabled, .btn[aria-busy="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.btn.block { width: 100%; margin-top: 12px; }
.btn.ghost { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.ghost:active { background: var(--surface-3); }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: var(--r-sm); }
.btn.sm .ic { width: 16px; height: 16px; }
.btn.ok { background: var(--success); color: #052e16; } .btn.ok:hover { background: #16a34a; }
.btn.bad { background: var(--danger); } .btn.bad:hover { background: #dc2626; }
.btn.icon { min-width: var(--tap); min-height: var(--tap); padding: 0; border-radius: var(--r-md); }
.btn .spinner { width: 18px; height: 18px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--primary); font-weight: 500; min-height: var(--tap); }

/* ── feedback ──────────────────────────────────────────────────────────── */
.msg { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: var(--r-sm); font-size: 14px; margin-top: 12px; border: 1px solid transparent; }
.msg .ic { width: 18px; height: 18px; margin-top: 1px; }
.msg.err { background: var(--bad-bg); color: var(--bad-fg); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.msg.ok { background: var(--ok-bg); color: var(--ok-fg); border-color: color-mix(in srgb, var(--success) 35%, transparent); }
.msg.info { background: var(--info-bg); color: var(--info-fg); border-color: color-mix(in srgb, var(--info) 35%, transparent); }

.toast-host { position: fixed; left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 100; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.wide ~ .toast-host, .toast-host.top { bottom: auto; top: 12px; }
.toast {
  pointer-events: auto; margin: 0 auto; max-width: 560px; width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-3); color: var(--text); border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-2); font-size: 14px; animation: toast-in var(--t-slow) var(--ease-out);
}
.toast.ok .ic { color: var(--success); } .toast.err .ic { color: var(--danger); } .toast.info .ic { color: var(--info); }
.toast.leaving { animation: toast-out var(--t-base) ease-in forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--border-strong); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { position: relative; overflow: hidden; background: var(--surface-2); border-radius: 6px; min-height: 14px; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--text) 8%, transparent), transparent); animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }

/* ── navigation ────────────────────────────────────────────────────────── */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex;
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom);
}
.tabs button {
  flex: 1; min-height: 60px; background: none; border: 0; color: var(--muted); font-size: 12px; font-weight: 500;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; position: relative;
  transition: color var(--t-fast);
}
.tabs button .ic { width: 24px; height: 24px; }
.tabs button.active { color: var(--primary); }
.tabs button.active::before { content: ""; position: absolute; top: 0; width: 32px; height: 3px; border-radius: 0 0 3px 3px; background: var(--primary); }
.tabs button:active { color: var(--primary-hover); }

/* ── capture ───────────────────────────────────────────────────────────── */
.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: 160px; justify-content: center;
  border: 2px dashed var(--border-strong); border-radius: var(--r-lg); padding: 24px 16px; text-align: center; color: var(--text-2); cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast) var(--ease-out);
}
.dropzone:hover, .dropzone:focus-within { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 6%, transparent); }
.dropzone:active { transform: scale(.99); }
.dropzone .ic-xl { color: var(--primary); }
.dropzone strong { color: var(--text); font-weight: 600; }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }

/* ── lists & rows ──────────────────────────────────────────────────────── */
.list { display: flex; flex-direction: column; gap: 8px; }
.row {
  display: flex; gap: 12px; align-items: center; padding: 10px 10px 10px 12px; min-height: 64px;
  background: var(--surface-2); border-radius: var(--r-md); border: 1px solid var(--border); text-align: left; width: 100%;
  transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast) var(--ease-out);
}
.row.clickable { cursor: pointer; }
.row.clickable:hover { border-color: var(--border-strong); }
.row.clickable:active { transform: scale(.995); background: var(--surface-3); }
.row .grow { flex: 1; min-width: 0; }
.row .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .s { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .row-actions { display: flex; align-items: center; gap: 4px; }
.thumb { width: 56px; height: 40px; object-fit: cover; border-radius: 6px; background: var(--surface-3); flex: none; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 32px 16px; text-align: center; color: var(--muted); }
.empty .ic-xl { color: var(--border-strong); }

.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; padding: 3px 8px; border-radius: var(--r-pill); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.badge .ic { width: 12px; height: 12px; stroke-width: 2.5; }
.badge.ready, .badge.approved, .badge.topup, .badge.refund { background: var(--ok-bg); color: var(--ok-fg); }
.badge.review, .badge.pending, .badge.adjust { background: var(--warn-bg); color: var(--warn-fg); }
.badge.processing, .badge.member { background: var(--info-bg); color: var(--info-fg); }
.badge.failed, .badge.blocked, .badge.spend { background: var(--bad-bg); color: var(--bad-fg); }
.badge.admin { background: var(--admin-bg); color: var(--admin-fg); }

/* ── contact detail ────────────────────────────────────────────────────── */
.cardimg { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: contain; border-radius: var(--r-md); background: #000; margin-bottom: 12px; }
.field { display: grid; grid-template-columns: 96px 1fr; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 15px; align-items: start; }
.field:last-of-type { border-bottom: 0; }
.field .k { color: var(--muted); font-size: 13px; padding-top: 2px; }
.field .k small { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.field .v { overflow-wrap: anywhere; }
.field .v a { color: var(--text); text-decoration: underline; text-decoration-color: var(--border-strong); }
.field.low .v { position: relative; padding-left: 10px; }
.field.low .v::before { content: ""; position: absolute; left: 0; top: 2px; bottom: 2px; width: 3px; border-radius: 2px; background: var(--warning); }
.field.low .k::after { content: "check"; display: inline-block; margin-left: 6px; font-size: 10px; padding: 1px 5px; border-radius: 4px; background: var(--warn-bg); color: var(--warn-fg); text-transform: uppercase; letter-spacing: .04em; }
.actions-row { display: flex; gap: 8px; margin-top: 12px; }
.actions-row .btn { flex: 1; }
.skel-fields .field .v { height: 16px; width: 60%; }

/* ── stats & tables ────────────────────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } }
.stat { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 14px; }
.stat .v { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.stat .l { font-size: 12px; color: var(--muted); font-weight: 500; }

.tablewrap { overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:hover { background: color-mix(in srgb, var(--text) 3%, transparent); }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.filters { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.filters select, .filters input { width: auto; flex: 1; min-width: 140px; }
.muted { color: var(--muted); font-size: 13px; }
pre.log { white-space: pre-wrap; word-break: break-all; max-height: 360px; overflow: auto; font-size: 12px; margin: 0; color: var(--text-2); }

/* ── onboarding (first run) ────────────────────────────────────────────── */
.onboard { position: fixed; inset: 0; z-index: 200; display: flex; align-items: flex-end; justify-content: center; background: rgba(0,0,0,.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
@media (min-width: 640px) { .onboard { align-items: center; } }
.onboard-card {
  width: 100%; max-width: 480px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px 20px 0 0;
  padding: 24px 20px calc(20px + env(safe-area-inset-bottom)); box-shadow: var(--shadow-2); animation: sheet-in var(--t-slow) var(--ease-out);
}
@media (min-width: 640px) { .onboard-card { border-radius: 16px; padding-bottom: 20px; } }
.onboard-art { display: flex; align-items: center; justify-content: center; width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 20px; background: color-mix(in srgb, var(--primary) 14%, transparent); color: var(--primary); }
.onboard-art .ic { width: 36px; height: 36px; stroke-width: 1.75; }
.onboard h2 { font-size: 22px; font-weight: 700; margin: 0 0 8px; text-align: center; letter-spacing: -.01em; text-transform: none; color: var(--text); }
.onboard p { margin: 0 0 20px; text-align: center; color: var(--text-2); font-size: 16px; line-height: 1.55; }
.dots { display: flex; justify-content: center; gap: 6px; margin-bottom: 16px; }
.dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); transition: background var(--t-fast), transform var(--t-fast); }
.dots span.on { background: var(--primary); transform: scale(1.25); }
.onboard-actions { display: flex; gap: 8px; }
.onboard-actions .btn { flex: 1; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* ── contact detail sheet ──────────────────────────────────────────────── */
.sheet-backdrop { position: fixed; inset: 0; z-index: 150; background: rgba(0,0,0,.5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fade-in var(--t-base); }
.sheet {
  position: fixed; z-index: 160; left: 0; right: 0; bottom: 0; max-height: 92dvh; overflow: auto; -webkit-overflow-scrolling: touch;
  background: var(--surface); border: 1px solid var(--border); border-bottom: 0; border-radius: 20px 20px 0 0; box-shadow: var(--shadow-2);
  padding: 8px 16px calc(16px + env(safe-area-inset-bottom)); animation: sheet-in var(--t-slow) var(--ease-out);
}
.sheet .grabber { width: 40px; height: 4px; border-radius: 2px; background: var(--border-strong); margin: 4px auto 12px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.sheet-head h2 { margin: 0; font-size: 17px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--text); }
@media (min-width: 1024px) {
  .sheet { left: auto; top: 0; bottom: 0; width: 460px; max-height: none; border-radius: 0; border-left: 1px solid var(--border); border-bottom: 1px solid var(--border); animation: slide-in var(--t-slow) var(--ease-out); }
  .sheet .grabber { display: none; }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
body.sheet-open { overflow: hidden; }

/* scan-tab category picker */
.precat { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.precat label { margin: 0; white-space: nowrap; }
.precat select { flex: 1; min-height: 44px; }
.err-detail { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--bad-fg); word-break: break-word; }

/* ── motion preferences ────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .skeleton::after { display: none; }
}
