/* Carpool — neutral utility. Layout: one 560px column, sticky filter header, sticky bottom action bar. */
:root {
  --bg: #f4f6f4; --surface: #ffffff; --border: #d9dfda; --text: #17201b; --muted: #5a665f;
  --accent: #1f5b45; --accent-ink: #ffffff; --accent-soft: #e3efe8; --focus: #2b6fd6;
  --ok: #1f6b3a; --warn: #8a5300; --danger: #a12a1f; --wa: #1a7f4b;
  --radius: 10px; --tap: 44px; --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 16px/1.45 var(--font); -webkit-text-size-adjust: 100%; }
#app { max-width: 560px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-left, 0px)) calc(96px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-right, 0px)); }
.boot { padding: 48px 0; color: var(--muted); text-align: center; }
h1 { font-size: 1.35rem; line-height: 1.2; margin: 0; text-wrap: balance; }
h2 { font-size: 1.05rem; margin: 0; }
h3 { font-size: .95rem; margin: 0; }
p { margin: 0; }
a { color: var(--accent); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.num { font-variant-numeric: tabular-nums; }
.stack { display: grid; gap: var(--s3); }
.stack-lg { display: grid; gap: var(--s5); }
.row { display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; }
.spread { display: flex; gap: var(--s2); align-items: center; justify-content: space-between; }
.grow { flex: 1 1 auto; min-width: 0; }

header.top { padding: calc(var(--s4) + env(safe-area-inset-top, 0px)) 0 var(--s2); display: grid; gap: 2px; }
.eyebrow { font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

.sticky { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: var(--s2) 0; display: grid; gap: var(--s2); border-bottom: 1px solid var(--border); }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 3px; gap: 3px; }
.seg button { min-height: 38px; border: 0; border-radius: 8px; background: transparent; font: 600 .95rem var(--font); color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.chips { display: flex; gap: var(--s2); overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; min-height: 36px; padding: 0 var(--s3); border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font: 500 .875rem var(--font); color: var(--text); white-space: nowrap; }
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s4); display: grid; gap: var(--s2); }
.card.full { background: #f7f8f7; }
.card .time { font-size: 1.15rem; font-weight: 700; }
.route { font-size: .95rem; overflow-wrap: anywhere; }
.seats { font-weight: 600; font-size: .9rem; }
.seats.full { color: var(--danger); }
.seats.ok { color: var(--ok); }
.pill { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 2px 10px; font-size: .78rem; font-weight: 600; background: var(--accent-soft); color: var(--accent); }
.pill.warn { background: #fbefdc; color: var(--warn); }
.pill.mute { background: #eceeec; color: var(--muted); }
.note { font-size: .9rem; color: var(--muted); overflow-wrap: anywhere; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--tap); padding: 0 var(--s4); border-radius: var(--radius); border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); font: 600 .95rem var(--font); text-decoration: none; cursor: pointer; }
.btn.secondary { background: var(--surface); color: var(--accent); }
.btn.quiet { background: transparent; border-color: var(--border); color: var(--text); }
.btn.danger { background: var(--surface); color: var(--danger); border-color: #e3b9b4; }
.btn.wa { background: var(--wa); border-color: var(--wa); }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; min-height: 32px; }

.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--surface); border-top: 1px solid var(--border); padding: var(--s3) max(16px, env(safe-area-inset-right, 0px)) calc(var(--s3) + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.bar .inner { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }

form { display: grid; gap: var(--s4); }
label.f { display: grid; gap: 6px; font-weight: 600; font-size: .9rem; }
label.f .hint { font-weight: 400; color: var(--muted); font-size: .82rem; }
input[type=text], input[type=tel], input[type=email], input[type=time], input[type=date], input[type=number], input[type=search], select, textarea {
  width: 100%; min-height: var(--tap); padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); font: 16px var(--font); color: var(--text);
}
textarea { min-height: 72px; resize: vertical; }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: var(--s2); }
legend { font-weight: 600; font-size: .9rem; padding: 0; margin-bottom: 6px; }
.check { display: flex; align-items: center; gap: var(--s2); min-height: var(--tap); font-weight: 500; }
.check input { width: 22px; height: 22px; }
.radio-list { display: grid; gap: var(--s2); }
.radio-list label { display: flex; gap: var(--s3); align-items: center; padding: var(--s3); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); min-height: var(--tap); }
.radio-list input { width: 20px; height: 20px; flex: 0 0 auto; }
.stepper { display: inline-flex; align-items: center; gap: var(--s3); }
.stepper button { width: var(--tap); height: var(--tap); border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); font-size: 1.3rem; }
.stepper output { min-width: 2ch; text-align: center; font-weight: 700; font-size: 1.15rem; }

.suggest { display: grid; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.suggest button { text-align: left; border: 0; border-top: 1px solid var(--border); background: transparent; padding: 10px 12px; font: 15px var(--font); min-height: var(--tap); }
.suggest button:first-child { border-top: 0; }
.picked { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); padding: 10px 12px; border: 1px solid var(--accent); border-radius: var(--radius); background: var(--accent-soft); }

.banner { border-radius: var(--radius); padding: var(--s3) var(--s4); font-size: .9rem; display: grid; gap: var(--s2); }
.banner.info { background: #e8f0fb; color: #1d3f72; }
.banner.warn { background: #fbefdc; color: #5e3900; }
.banner.error { background: #fbe4e1; color: #7a1d14; }
.banner.ok { background: #e2f2e7; color: #174d2a; }
.disclose { font-size: .85rem; color: var(--muted); }

.person { display: grid; gap: 6px; padding: var(--s3) 0; border-top: 1px solid var(--border); }
.person:first-child { border-top: 0; padding-top: 0; }
.person .phone { font-variant-numeric: tabular-nums; user-select: all; }
.section-title { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s2); margin-top: var(--s2); }
.copybox { display: flex; gap: var(--s2); }
.copybox input { flex: 1 1 auto; min-width: 0; font-size: .85rem; }
.back { min-height: var(--tap); display: inline-flex; align-items: center; }
.empty { padding: var(--s5) var(--s4); text-align: center; color: var(--muted); border: 1px dashed var(--border); border-radius: var(--radius); background: var(--surface); }
.footer { text-align: center; font-size: .8rem; color: var(--muted); padding: var(--s5) 0 var(--s2); }
.footer a { color: var(--muted); }
.table-wrap { overflow-x: auto; }
table.mini { border-collapse: collapse; width: 100%; font-size: .85rem; }
table.mini th, table.mini td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

.pt8 { padding-top: 8px; } .pt12 { padding-top: 12px; } .pt16 { padding-top: 16px; } .pt24 { padding-top: 24px; } .pt32 { padding-top: 32px; } .pt48 { padding-top: 48px; }
.chip-label { align-self: center; flex: 0 0 auto; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.stat { gap: 2px; } .stat-n { font-size: 1.3rem; }
.list { margin: 0; padding-left: 1.1em; }
.sum { min-height: 44px; display: flex; align-items: center; cursor: pointer; }
.sum.strong { font-weight: 600; }
