:root {
  --bg: #f6f7f9; --card: #fff; --text: #16191f; --muted: #5d6573; --line: #dfe3ea;
  --accent: #1f5eff; --accent-text: #fff; --accent-soft: #e7eeff; --danger: #c62828; --ok: #1b7f3b;
  --radius: 14px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0f1115; --card: #181b21; --text: #eef0f4; --muted: #a2a9b6; --line: #2b303a;
    --accent: #6f95ff; --accent-text: #0b0d12; --accent-soft: #1c2640; --danger: #ff7b7b; --ok: #5fd38b; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
main { max-width: 560px; margin: 0 auto; padding: 24px 16px 48px; }
main.wide { max-width: 1100px; }
h1 { font-size: 1.5rem; line-height: 1.2; margin: 0 0 6px; }
h2 { font-size: 1.1rem; margin: 0 0 10px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 0 0 16px; }
label { display: block; font-weight: 600; margin: 14px 0 6px; }
input[type=text], input[type=password], input[type=tel], input[type=email], textarea, select {
  width: 100%; font: inherit; color: inherit; background: var(--bg); border: 1px solid var(--line);
  border-radius: 10px; padding: 11px 12px; }
textarea { min-height: 84px; resize: vertical; }
input:focus-visible, textarea:focus-visible, select:focus-visible, button:focus-visible, .choice:focus-within {
  outline: 3px solid var(--accent); outline-offset: 2px; }
button, .btn { font: inherit; font-weight: 600; border: 1px solid transparent; border-radius: 10px; padding: 11px 16px;
  background: var(--accent); color: var(--accent-text); cursor: pointer; text-decoration: none; display: inline-block; }
button.secondary, .btn.secondary { background: transparent; color: var(--text); border-color: var(--line); }
button.danger { background: transparent; color: var(--danger); border-color: var(--line); }
button.small, .btn.small { padding: 6px 10px; font-size: .85rem; }
button:disabled { opacity: .55; cursor: default; }
.block { width: 100%; }
.choices { display: grid; gap: 8px; }
.choice { position: relative; display: flex; align-items: center; gap: 12px; padding: 13px 14px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--bg); cursor: pointer; font-weight: 500; margin: 0; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .ico { font-size: 1.35rem; width: 1.6rem; text-align: center; flex: none; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { margin: 0; font-weight: 500; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; background: var(--bg); position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.error { color: var(--danger); font-weight: 600; min-height: 1.2em; margin-top: 10px; }
.hidden { display: none !important; }
.done { text-align: center; padding: 28px 18px; }
.done .big { font-size: 2.6rem; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.spacer { flex: 1; }
@media (prefers-reduced-motion: no-preference) { .choice, .chip, button { transition: background .12s, border-color .12s; } }

/* admin */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin: 0 0 16px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; text-align: left; color: var(--text); font-weight: 400; }
.tile.active { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.tile .n { font-size: 1.6rem; font-weight: 700; display: block; }
.tile .l { font-size: .85rem; color: var(--muted); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
td.actions { white-space: nowrap; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--accent-soft); white-space: nowrap; }
.pill.none { background: transparent; border: 1px dashed var(--line); color: var(--muted); }
.pill.cant { background: color-mix(in srgb, var(--danger) 18%, transparent); }
.pill.arrived, .pill.here { background: color-mix(in srgb, var(--ok) 20%, transparent); }
.sess-list a { color: inherit; }
.linkbox { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; word-break: break-all; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-weight: 600; z-index: 10; }
@media (max-width: 640px) {
  table.stack thead { display: none; }
  table.stack tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
  table.stack td { display: block; border: 0; padding: 3px 0; }
  table.stack td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: .8rem; }
}

/* four big one-tap answers */
.big-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 16px; }
.big-choices button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 116px; padding: 14px 8px; font-size: 1.05rem; background: var(--card); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius); }
.big-choices button span { font-size: 2.1rem; line-height: 1; }
.big-choices button[aria-pressed=true] { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.big-choices button[data-s=cant] { color: var(--danger); }
button.chip { color: var(--text); font-weight: 500; }
.pill.bus, .pill.driving { background: var(--accent-soft); }
