:root {
  --bg: #fffdf5; --surface: #fff; --ink: #26241c; --muted: #6b6759;
  --line: #e4dfce; --accent: #b4541f; --accent-dark: #783513;
  --soft: #f3ead5; --ok: #2f6b3f; --danger: #a8261b;
}
* { box-sizing: border-box; }
html { background: var(--bg); color: var(--ink); }
body { margin: 0; font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; padding-bottom: 84px; }
a { color: var(--accent-dark); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 20; background: var(--ink); color: #fff; padding: 10px; }
.skip:focus { top: 12px; }
.topbar { max-width: 860px; margin: 0 auto; padding: 18px 20px 0; display: flex; align-items: center; justify-content: space-between; }
.brand { color: var(--ink); font-weight: 900; letter-spacing: .18em; text-decoration: none; }
main { max-width: 860px; margin: 0 auto; padding: 22px 18px 40px; }
.auth { max-width: 460px; margin: 7vh auto 0; }
.page-head { margin-bottom: 22px; }
h1 { margin: 2px 0 5px; font-size: clamp(26px, 6vw, 38px); line-height: 1.12; }
h2 { margin: 0 0 8px; font-size: 18px; }
h3 { margin: 0 0 6px; font-size: 16px; }
p { margin: 0 0 10px; }
.eyebrow { color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.muted, .fine { color: var(--muted); }
.fine { font-size: 13px; margin-top: 24px; }
label { display: block; font-weight: 700; margin: 20px 0 6px; }
input, textarea, select { width: 100%; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); padding: 13px; }
textarea { min-height: 76px; resize: vertical; }
input:focus, textarea:focus, select:focus, button:focus-visible, a:focus-visible { outline: 3px solid #e5ad83; outline-offset: 2px; }
.primary, .secondary, .option { border-radius: 10px; padding: 13px 15px; font-weight: 700; }
.primary { width: 100%; margin-top: 12px; border: 0; background: var(--accent); color: #fff; }
.secondary, .option { border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.primary:disabled, .secondary:disabled, .option:disabled { opacity: .55; cursor: default; }
.quiet, .link { border: 0; background: none; color: var(--accent-dark); padding: 8px 0; }
.link { text-decoration: underline; }
.error { color: var(--danger); margin-top: 12px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin-bottom: 14px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stack { display: grid; gap: 10px; }
.option { width: 100%; text-align: left; }
.option strong, .option span { display: block; }
.option span { color: var(--muted); font-size: 14px; font-weight: 400; margin-top: 3px; }
.stat { font-size: 28px; font-weight: 800; line-height: 1.1; }
.pill { display: inline-block; border-radius: 999px; background: var(--soft); padding: 3px 9px; font-size: 12px; font-weight: 800; }
.pill.ok { background: #e0efdf; color: var(--ok); }
.pill.soon { background: #f8e5d7; color: var(--accent-dark); }
.row { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.route-card { color: inherit; text-decoration: none; }
.route-card:hover { border-color: var(--accent); }
.reward { border-left: 4px solid var(--accent); }
.chosen { border-color: var(--ok); background: #f4f8f2; }
.success { color: var(--ok); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.form-grid .wide, .wide { grid-column: 1 / -1; }
.form-grid label { margin-top: 12px; }
.legal { max-height: 60vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; background: #faf8f0; padding: 16px; margin-top: 18px; font-size: 15px; line-height: 1.6; }
.legal h3 { margin: 22px 0 8px; font-size: 19px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; }
.legal h3:first-child { margin-top: 0; }
.legal p { margin: 0 0 12px; white-space: pre-wrap; }
.check { display: flex; align-items: flex-start; gap: 8px; font-weight: 500; font-size: 15px; line-height: 1.5; }
.check input { width: auto; margin-top: 5px; flex: 0 0 auto; }
.minor-card { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.minor-card legend { font-weight: 800; padding: 0 6px; }
.external::after { content: " ↗"; color: var(--accent); }
.barcode-card { text-align: center; overflow: hidden; }
.barcode-card svg { width: 100%; max-width: 560px; height: 150px; background: #fff; }
.barcode-number { font: 16px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; word-break: break-all; }
.chat-log { min-height: 260px; max-height: 55vh; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.bubble { max-width: 82%; border: 1px solid var(--line); border-radius: 14px; padding: 11px 13px; white-space: pre-wrap; }
.bubble.user { align-self: flex-end; background: var(--ink); color: var(--bg); }
.bubble.cliff { align-self: flex-start; background: var(--surface); }
.chat-compose { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
.chat-compose .primary { width: auto; margin: 0; }
.nav { position: fixed; z-index: 10; bottom: 0; left: 0; right: 0; display: flex; justify-content: center; gap: 2px; padding: 8px max(8px, env(safe-area-inset-left)) calc(8px + env(safe-area-inset-bottom)); background: rgba(255,253,245,.96); border-top: 1px solid var(--line); backdrop-filter: blur(8px); }
.nav a { min-width: 62px; padding: 8px 7px; border-radius: 9px; color: var(--muted); text-decoration: none; text-align: center; font-size: 13px; font-weight: 700; }
.nav a.active { background: var(--ink); color: var(--bg); }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .nav { gap: 12px; } .nav a { min-width: 92px; } }
@media (max-width: 430px) { main { padding-inline: 12px; } .card { padding: 15px; } .grid { grid-template-columns: 1fr 1fr; } .form-grid, .minor-card { grid-template-columns: 1fr; } }
/* Kiosk mode (/waiver?kiosk=1): a shared iPad at arm's length, so every target is finger-sized. */
body.kiosk { font-size: 18px; }
body.kiosk input { padding: 17px; }
body.kiosk .primary, body.kiosk .secondary { padding: 18px; font-size: 20px; }
body.kiosk .check input { width: 30px; height: 30px; margin-top: 0; }
body.kiosk .link { padding: 14px 0; }
body.kiosk label { font-size: 19px; }
body.kiosk .legal { max-height: 68vh; font-size: 17px; }
body.kiosk .legal h3 { font-size: 23px; }
body.kiosk .check { font-size: 18px; gap: 12px; }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
