/* ODS UI v1: components shared by every ODS app (Standard §8a). Plain CSS, tokens from tokens.css.
   Rules: spacing only from --space-*; colours only from tokens; every tap target >= 48px. */

/* ---------- Base ---------- */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; background: var(--paper); color: var(--ink); font: 17px/1.5 var(--font-sans); }
body { min-height: 100vh; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
a { color: var(--brand-text); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-display); color: var(--ink); margin: 0; }
h1 { font-size: var(--text-xl); line-height: 1.2; font-weight: 700; letter-spacing: -.015em; }
h2 { font-size: var(--text-lg); line-height: 1.3; font-weight: 650; letter-spacing: -.005em; }
h3 { font-size: var(--text-md); line-height: 1.35; font-weight: 650; }
p { margin: 0 0 var(--space-3); }
p:last-child { margin-bottom: 0; }
code { font-size: .85em; word-break: break-word; }
.muted { color: var(--muted); }
.small { font-size: var(--text-sm); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--radius-sm); }

/* ---------- Header and tab bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: var(--space-4);
  min-height: 56px; padding: 0 var(--gutter); padding-top: env(safe-area-inset-top);
  background: var(--brand); color: var(--brand-ink); }
.brand { flex: 1; display: flex; align-items: center; gap: var(--space-3); color: inherit; text-decoration: none; font-weight: 700; font-size: 1.0625rem; letter-spacing: -.01em; min-height: var(--tap); }
.brand img { display: block; width: 30px; height: 30px; border-radius: 8px; box-shadow: 0 0 0 1px rgba(255,255,255,.18); }
.who { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); }
.who #who-name { opacity: .85; }
.bell { position: relative; background: none; border: 0; color: inherit; width: var(--tap); height: var(--tap); border-radius: var(--radius-sm); cursor: pointer; display: grid; place-items: center; }
.bell:hover { background: rgba(255,255,255,.1); }
.badge { position: absolute; top: 6px; right: 6px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; border-radius: 9px; padding: 1px 6px; }

/* Phones: tab bar fixed to the bottom. */
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: space-around;
  background: var(--surface); border-top: 1px solid var(--line);
  padding: var(--space-1) var(--space-2) calc(var(--space-1) + env(safe-area-inset-bottom)); }
.nav:empty { display: none; }
.nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 56px;
  color: var(--muted); text-decoration: none; font-size: var(--text-xs); font-weight: 600; }
.nav a svg { width: 24px; height: 24px; padding: 2px 14px; box-sizing: content-box; border-radius: 999px; transition: background .15s; }
.nav a.active { color: var(--ink); }
.nav a.active svg { background: var(--brand-soft); color: var(--brand-text); }
/* Wide screens: the tabs sit in the header. */
@media (min-width: 761px) {
  .nav { position: static; flex: 0 0 auto; order: 2; background: transparent; border: 0; padding: 0; gap: var(--space-1); }
  .who { order: 3; }
  .nav a { flex: 0 0 auto; flex-direction: row; gap: var(--space-2); min-height: 40px; padding: 0 var(--space-3); border-radius: var(--radius-sm);
    color: rgba(255,255,255,.78); font-size: var(--text-sm); }
  .nav a svg { width: 18px; height: 18px; padding: 0; background: none !important; color: inherit !important; }
  .nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
  .nav a.active { color: #fff; background: rgba(255,255,255,.16); }
}

/* ---------- Page layout ---------- */
.banner { padding: var(--space-3) var(--gutter); text-align: center; font-weight: 600; font-size: var(--text-sm); background: var(--warn-wash); color: var(--warn); }
.banner.bad { background: var(--bad-wash); color: var(--bad); }
.banner.demo { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-2) var(--space-4); font-weight: 400; background: var(--brand-soft); color: var(--ink); }
.banner.demo label { display: inline-flex; align-items: center; gap: var(--space-2); margin: 0; font-weight: 600; white-space: nowrap; }
.banner.demo select { width: auto; max-width: 62vw; min-height: 36px; padding: 0 var(--space-3); font-size: var(--text-sm); }
.main { flex: 1; width: 100%; max-width: var(--content-max); margin: 0 auto;
  padding: var(--space-6) var(--gutter) var(--space-7); }
@media (min-width: 761px) { .main { padding-top: var(--space-7); padding-bottom: var(--space-8); } }
.narrow { max-width: var(--form-max); }
.footer { width: 100%; max-width: var(--content-max); margin: 0 auto; display: flex; justify-content: space-between; gap: var(--space-3);
  padding: var(--space-5) var(--gutter) calc(96px + env(safe-area-inset-bottom)); font-size: var(--text-xs); color: var(--muted); }
.footer a { color: inherit; }
@media (min-width: 761px) { .footer { padding-bottom: var(--space-6); border-top: 1px solid var(--line); } }
@media (max-width: 760px) { .footer { padding-top: 0; flex-direction: column; gap: var(--space-1); } }

/* Page head: back link, title, one line of context, one action */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-6); flex-wrap: wrap; }
.page-head .titles { min-width: 0; flex: 1 1 260px; }
.page-head .lead { color: var(--muted); margin: var(--space-2) 0 0; }
.back { display: inline-flex; align-items: center; gap: var(--space-1); min-height: 32px; margin-bottom: var(--space-2); color: var(--muted); text-decoration: none; font-size: var(--text-sm); font-weight: 600; }
.back:hover { color: var(--ink); }
.back::before { content: ''; width: 8px; height: 8px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-right: 4px; }

/* Sections: a title above a card or list */
.section { margin-top: var(--space-7); }
.section:first-child { margin-top: 0; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-3); }
.section-title h2 { font-size: var(--text-md); }
.section-title a { font-size: var(--text-sm); font-weight: 600; text-decoration: none; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--card-pad); margin: 0 0 var(--space-4); box-shadow: var(--shadow); }
.card > h2, .card > h3 { margin-bottom: var(--space-2); }
.card > h2 + p, .card > h3 + p { margin-top: 0; }
.danger-zone { box-shadow: none; background: transparent; border-style: dashed; }
.danger-zone h3 { color: var(--bad); }
.empty { text-align: center; padding: var(--space-8) var(--card-pad); color: var(--muted); }
.empty .icon { width: 48px; height: 48px; margin: 0 auto var(--space-3); border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.empty .icon svg { width: 24px; height: 24px; }
.empty p { margin-bottom: var(--space-4); }

/* ---------- List rows (inside a card, flush to its edges) ---------- */
.rows { list-style: none; margin: 0 0 var(--space-4); padding: 0; }
.rows.card { padding: 0; overflow: hidden; }
.rows li { display: flex; align-items: center; gap: var(--space-3); min-height: 64px; padding: var(--space-3) var(--card-pad); border-bottom: 1px solid var(--line); }
.rows li:last-child { border-bottom: 0; }
.rows li.link { padding: 0; }
.rows li.link > a.grow { display: flex; align-items: center; gap: var(--space-3); min-height: 64px; padding: var(--space-3) var(--card-pad); }
.rows li.link > a.grow:hover { background: var(--surface-2); }
.rows li.link > .btn { margin-right: var(--card-pad); }
.rows .grow { flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.rows .text { flex: 1; min-width: 0; }
.rows .text b, .rows .grow > b { display: block; font-weight: 600; overflow-wrap: anywhere; }
.rows .sub { display: block; color: var(--muted); font-size: var(--text-sm); margin-top: 2px; }
.chev { flex: 0 0 auto; width: 8px; height: 8px; border-right: 2px solid var(--line-strong); border-top: 2px solid var(--line-strong); transform: rotate(45deg); margin-right: 4px; }
.avatar { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: .875rem; font-weight: 700; letter-spacing: .02em;
  background: var(--brand-soft); color: var(--brand-text); }
.avatar.lg { flex-basis: 56px; width: 56px; height: 56px; font-size: 1.125rem; }
.tile-icon { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); }
.tile-icon svg { width: 20px; height: 20px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: var(--space-3) 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; padding-bottom: 0; }
.list li:first-child { padding-top: 0; }

/* Tiles: company cards on Home */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--space-3); margin-bottom: var(--space-4); }
.tile { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4) var(--card-pad); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); color: inherit; text-decoration: none; min-height: 72px; }
.tile:hover { border-color: var(--line-strong); }
.tile b { display: block; font-weight: 600; }
.tile .sub { color: var(--muted); font-size: var(--text-sm); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: var(--tap); padding: 0 var(--space-5);
  border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: color-mix(in srgb, var(--brand) 88%, #000); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); background: transparent; }
.btn.danger:hover { background: var(--bad-wash); }
.btn.quiet { border-color: transparent; background: transparent; color: var(--brand-text); padding: 0 var(--space-3); }
.btn.quiet:hover { background: var(--surface-2); }
.btn:disabled, .btn.disabled { opacity: .5; cursor: default; pointer-events: none; }
.btn.small { min-height: 40px; padding: 0 var(--space-4); font-size: var(--text-sm); }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; border-color: rgba(255,255,255,.35); color: inherit; }
.btn.ghost:hover { background: rgba(255,255,255,.1); }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-5); }
@media (max-width: 520px) { .actions.stack-sm { flex-direction: column; } .actions.stack-sm .btn { width: 100%; } }

/* ---------- Forms ---------- */
.field { margin-bottom: var(--space-5); }
label, .label { display: block; font-weight: 600; font-size: var(--text-sm); color: var(--ink); margin: 0 0 var(--space-2); }
input, select, textarea { width: 100%; min-height: var(--tap); padding: 0 var(--space-4); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); font: inherit; }
textarea { padding: var(--space-3) var(--space-4); }
select { appearance: none; -webkit-appearance: none; padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
input::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-text); box-shadow: var(--focus); }
input:disabled, select:disabled { background: var(--surface-2); color: var(--muted); }
.hint { color: var(--muted); font-size: var(--text-sm); margin: var(--space-2) 0 0; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 var(--space-4); }
.check { display: flex; align-items: center; gap: var(--space-3); min-height: var(--tap); font-weight: 600; font-size: var(--text-md); margin: 0; cursor: pointer; }
.check input { width: 22px; height: 22px; min-height: 0; margin: 0; padding: 0; accent-color: var(--brand); flex: 0 0 auto; }
.form-foot { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; margin-top: var(--space-6); padding-top: var(--space-5); border-top: 1px solid var(--line); }

/* Choice cards (radio buttons that look like options). Stacked on phones, side by side when there is room. */
.choices { display: grid; grid-template-columns: 1fr; gap: var(--space-2); }
@media (min-width: 521px) { .choices { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } }
.choices.stack { grid-template-columns: 1fr; }
.choices label { margin: 0; position: relative; }
.choices input { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; min-height: 0; padding: 0; border: 0; }
.choices span { display: grid; grid-template-columns: 20px 1fr; column-gap: var(--space-3); row-gap: 2px; align-items: start; align-content: start; min-height: var(--tap); height: 100%;
  padding: var(--space-3) var(--space-4); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; font-weight: 600; font-size: var(--text-md); }
.choices span::before { content: ''; grid-row: 1 / span 2; width: 18px; height: 18px; margin-top: 3px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface); }
.choices span small { grid-column: 2; font-weight: 400; color: var(--muted); font-size: var(--text-sm); }
.choices input:checked + span { border-color: var(--brand-text); background: color-mix(in srgb, var(--brand-soft) 60%, var(--surface)); }
.choices input:checked + span::before { border-color: var(--brand-text); background: radial-gradient(circle, var(--brand-text) 0 4px, var(--surface) 5px); }
.choices input:focus-visible + span { box-shadow: var(--focus); }

/* Disclosure: "More options" */
details.more { margin: 0 0 var(--space-5); }
details.more > summary { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--tap); cursor: pointer; font-weight: 600; color: var(--brand-text); list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: ''; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; margin-right: 4px; }
details.more[open] > summary::before { transform: rotate(45deg); }
details.more[open] > summary { margin-bottom: var(--space-3); }
details.more.card { padding-top: var(--space-2); padding-bottom: var(--space-2); }
details.more.card[open] { padding-bottom: var(--card-pad); }

/* ---------- Chips and filters ---------- */
.chip { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font-size: var(--text-xs); font-weight: 600; background: var(--surface-2); color: var(--ink-2); vertical-align: 2px; margin-left: var(--space-1); }
.chip.good { background: var(--good-wash); color: var(--good); }
.chip.warn { background: var(--warn-wash); color: var(--warn); }
.chip.bad { background: var(--bad-wash); color: var(--bad); }
.chips { display: flex; gap: var(--space-2); overflow-x: auto; padding-bottom: var(--space-1); margin: 0 calc(-1 * var(--gutter)) var(--space-4); padding-left: var(--gutter); padding-right: var(--gutter); scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips a { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--space-4); border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink-2); text-decoration: none; font-size: var(--text-sm); font-weight: 600; }
.chips a[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
@media (min-width: 761px) { .chips { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; } }

/* ---------- Setup checklist ---------- */
.progress { display: flex; align-items: center; gap: var(--space-3); margin: var(--space-3) 0 var(--space-2); font-size: var(--text-sm); color: var(--muted); }
.progress .bar { flex: 1; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.progress .bar i { display: block; height: 100%; background: var(--good); border-radius: 3px; }
.steps { list-style: none; margin: var(--space-2) 0 0; padding: 0; }
.steps li { display: flex; gap: var(--space-4); align-items: flex-start; padding: var(--space-4) 0; border-bottom: 1px solid var(--line); }
.steps li:last-child { border-bottom: 0; padding-bottom: 0; }
.steps.flush { margin-top: 0; }
.steps.flush li:first-child { padding-top: 0; }
.steps .num { flex: 0 0 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: var(--text-sm); background: var(--surface-2); color: var(--ink-2); }
.steps li.done .num { background: var(--good-wash); color: var(--good); }
.steps li.next .num { background: var(--brand); color: var(--brand-ink); }
.steps li.later { opacity: .6; }
.steps .what { flex: 1; min-width: 0; }
.steps .what b { display: block; font-weight: 600; }
.steps .what .muted { display: block; font-size: var(--text-sm); margin-top: 2px; }
.steps .what .btn { margin-top: var(--space-3); }
.done-note { display: flex; align-items: flex-start; gap: var(--space-4); }
.done-note h2 { margin-bottom: var(--space-1); }
.done-note .num { flex: 0 0 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--good-wash); color: var(--good); font-weight: 700; }

/* ---------- Data ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--space-3); }
.stat { padding: var(--space-3) var(--space-4); background: var(--surface-2); border-radius: var(--radius-sm); }
.stat b { display: block; font-size: var(--text-lg); }
.stat span { font-size: var(--text-xs); color: var(--muted); }
.table-wrap { overflow-x: auto; margin: 0 calc(-1 * var(--card-pad)); padding: 0 var(--card-pad); }
table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
th, td { text-align: left; padding: var(--space-3) var(--space-3); border-bottom: 1px solid var(--line); vertical-align: top; }
th:first-child, td:first-child { padding-left: 0; }
th { color: var(--muted); font-weight: 600; font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .05em; }
.meta { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); color: var(--muted); font-size: var(--text-sm); }

/* Person header */
.person-head { display: flex; align-items: center; gap: var(--space-4); margin-bottom: var(--space-6); }
.person-head h1 { overflow-wrap: anywhere; }
.person-head .lead { color: var(--muted); margin: var(--space-1) 0 0; overflow-wrap: anywhere; }
.rows li > form { flex: 1; padding: var(--space-2) 0; }

/* ---------- Feedback ---------- */
.toast { position: fixed; left: 50%; bottom: calc(88px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: max-content; max-width: calc(100vw - 2 * var(--gutter));
  background: var(--ink); color: var(--paper); padding: var(--space-3) var(--space-5); border-radius: var(--radius-sm); box-shadow: var(--shadow); z-index: 30; font-weight: 600; font-size: var(--text-sm); }
.toast.bad { background: var(--bad); color: #fff; }
@media (min-width: 761px) { .toast { bottom: var(--space-6); } }
.signin { max-width: 420px; margin: var(--space-8) auto; text-align: center; padding: var(--space-7) var(--card-pad); }
.signin img { border-radius: 14px; margin-bottom: var(--space-4); }
.signin h1 { margin-bottom: var(--space-2); }
.signin .btn { width: 100%; margin-top: var(--space-5); }

@media (max-width: 760px) { .who #who-name { display: none; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- Clock and time (milestone 2) ---------- */
.btn.xl { min-height: 64px; font-size: var(--text-lg); border-radius: var(--radius); padding: 0 var(--space-6); }
.actions.center { justify-content: center; }
.clock-card { text-align: center; padding: var(--space-7) var(--card-pad); }
.clock-card .btn.xl { margin-top: var(--space-5); }
.clock-card form { text-align: left; }
.clock-state { font-size: var(--text-lg); font-weight: 650; margin: 0; display: flex; align-items: center; justify-content: center; gap: var(--space-2); }
.timer { font-size: var(--text-2xl); font-weight: 700; letter-spacing: -.02em; line-height: 1.15; margin: var(--space-2) 0 var(--space-1); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--good); display: inline-block; }
.dot.break { background: var(--warn); }
.note { box-shadow: none; background: var(--surface-2); border-color: var(--line); }
.note.warn { background: var(--warn-wash); border-color: transparent; }
.note.warn h3, .note.warn p { color: var(--warn); }
.pin-show { font-size: var(--text-xl); letter-spacing: .2em; margin-left: var(--space-2); }
.facts { display: grid; grid-template-columns: minmax(96px, auto) 1fr; gap: var(--space-3) var(--space-4); margin: 0; }
.facts dt { color: var(--muted); font-size: var(--text-sm); padding-top: 2px; }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.photo-row { display: flex; gap: var(--space-4); margin-top: var(--space-5); }
.photo-row figure { margin: 0; }
.photo-row img { display: block; width: 132px; height: 99px; object-fit: cover; border-radius: var(--radius-sm); background: var(--surface-2); }
.photo-row figcaption { font-size: var(--text-xs); color: var(--muted); margin-top: var(--space-1); }
.break-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 var(--space-4); align-items: end; padding: var(--space-4); margin-bottom: var(--space-3); background: var(--surface-2); border-radius: var(--radius-sm); }
.break-row .btn { justify-self: start; margin-bottom: var(--space-2); }
.break-row .field { margin-bottom: var(--space-3); }

/* ---------- Kiosk mode: a shared tablet, big targets, nothing else on screen ---------- */
body.kiosk .nav, body.kiosk .who, body.kiosk .footer, body.kiosk .banner { display: none; }
body.kiosk .main { max-width: 960px; padding-bottom: var(--space-8); }
@media (min-height: 900px) { body.kiosk .main { padding-top: 8vh; } }
.k-head { text-align: center; margin-bottom: var(--space-6); }
.k-head .lead, .k-done .lead { color: var(--muted); margin: var(--space-2) 0 0; font-size: var(--text-lg); }
.k-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 200px)); justify-content: center; gap: var(--space-3); }
.k-name { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-3); min-height: 132px; padding: var(--space-4) var(--space-3);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--ink); font: inherit; font-weight: 600; text-align: center; cursor: pointer; }
.k-name:hover, .k-name:active { border-color: var(--brand-text); background: var(--surface-2); }
.k-center { max-width: 420px; margin: 0 auto; text-align: center; }
.k-center h1 { margin-top: var(--space-4); }
.k-dots { display: flex; justify-content: center; gap: var(--space-3); margin: var(--space-6) 0; }
.k-dots i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-strong); }
.k-dots i.opt { border-style: dashed; opacity: .6; }
.k-dots i.on { background: var(--ink); border-color: var(--ink); border-style: solid; opacity: 1; }
.k-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); max-width: 340px; margin: 0 auto; }
.k-pad button { min-height: 76px; border-radius: var(--radius); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--text-xl); font-weight: 650; cursor: pointer; }
.k-pad button:active { background: var(--surface-2); }
.k-pad button.ok { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); font-size: var(--text-lg); }
.k-pad button:disabled { opacity: .4; }
.k-actions { margin: var(--space-6) 0 var(--space-4); display: grid; gap: var(--space-3); }
.k-two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.k-two:has(> :only-child) { grid-template-columns: 1fr; }
.k-cam { width: 132px; height: 99px; object-fit: cover; border-radius: var(--radius-sm); background: var(--surface-2); margin: 0 auto; display: block; transform: scaleX(-1); }
.k-done { padding-top: var(--space-8); }
.k-done .tick { width: 104px; height: 104px; margin: 0 auto var(--space-5); border-radius: 50%; display: grid; place-items: center; background: var(--good-wash); color: var(--good); font-size: var(--text-2xl); font-weight: 700; }
.k-foot { text-align: center; margin-top: var(--space-8); color: var(--muted); font-size: var(--text-sm); }
.k-foot a { color: inherit; }
.nw { white-space: nowrap; }
