:root {
  --bg: #f5f6f8; --card: #fff; --ink: #1b2430; --muted: #627084; --line: #dfe3ea;
  --brand: #0f766e; --brand-ink: #fff; --warn: #b45309; --bad: #b91c1c; --ok: #15803d; --soft: #eef6f5;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
main { max-width: 1080px; margin: 0 auto; padding: 16px 16px 64px; }
main.narrow { max-width: 520px; }
h1 { font-size: 1.5rem; margin: 8px 0 2px; line-height: 1.25; }
h2 { font-size: 1.1rem; margin: 0 0 10px; }
h3 { font-size: 1rem; margin: 0; }
p { margin: 0 0 10px; }
a { color: var(--brand); }
.muted { color: var(--muted); font-size: .9rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-top: 16px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.spread { justify-content: space-between; }
.grow { flex: 1 1 200px; min-width: 0; }

label { display: block; font-weight: 600; font-size: .9rem; margin: 14px 0 4px; }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid #b9c1cd; border-radius: 8px; font: inherit; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
textarea { min-height: 110px; resize: vertical; }
button, .btn { display: inline-block; padding: 10px 16px; border-radius: 8px; border: 1px solid var(--brand); background: var(--brand); color: var(--brand-ink); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
button.ghost, .btn.ghost { background: #fff; color: var(--brand); }
button.danger { background: #fff; color: var(--bad); border-color: var(--bad); }
button.small, .btn.small { padding: 5px 10px; font-size: .85rem; }
button:disabled { opacity: .55; cursor: default; }
button.block { width: 100%; margin-top: 18px; padding: 13px; }

.choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.choice label { margin: 0; font-weight: 500; border: 1px solid #b9c1cd; border-radius: 8px; padding: 10px 12px; cursor: pointer; display: flex; gap: 8px; align-items: center; background: #fff; }
.choice input { width: auto; }
.choice label:has(input:checked) { border-color: var(--brand); background: var(--soft); font-weight: 600; }
.error { color: var(--bad); font-weight: 600; margin-top: 12px; }
[hidden] { display: none !important; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.tile b { display: block; font-size: 1.6rem; line-height: 1.2; }
.tile span { color: var(--muted); font-size: .85rem; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.cols > .card { margin-top: 0; }
.cols { margin-top: 16px; }

.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
td.num, th.num { text-align: right; }
.pill { display: inline-block; padding: 1px 9px; border-radius: 99px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.pill.yes { background: #dcfce7; color: var(--ok); }
.pill.no { background: #fee2e2; color: var(--bad); }
.pill.maybe { background: #e0e7ff; color: #3730a3; }
.pill.pending { background: #fef3c7; color: var(--warn); }
.pill.plain { background: #e8ecf1; color: var(--muted); }

.linkbox { background: var(--soft); border: 1px dashed var(--brand); border-radius: 8px; padding: 8px 12px; word-break: break-all; font-family: ui-monospace, Consolas, monospace; font-size: .88rem; }
.cabs { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-top: 12px; }
.cab { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #fff; }
.cab.over { border-color: var(--bad); }
.cab .fields { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 8px 0; }
.cab .fields input { padding: 6px 8px; font-size: .88rem; }
.cab .fields input:first-child { grid-column: 1 / -1; }
.rider { display: flex; gap: 8px; align-items: center; padding: 5px 0; border-top: 1px solid var(--line); font-size: .92rem; }
.rider .grow { flex: 1 1 auto; }
.rider select { width: auto; max-width: 130px; padding: 4px 6px; font-size: .82rem; }
.notice { background: #fef3c7; border: 1px solid #f1d38a; border-radius: 8px; padding: 8px 12px; margin-top: 10px; font-size: .92rem; }

/* Full-screen "you are checked in" confirmation, shown on the guest's phone to the organiser at the entry. */
.welcome { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: linear-gradient(160deg, #0f766e, #15803d); color: #fff; text-align: center; overflow-y: auto; }
.welcome[hidden] { display: none; }
.welcome-box { width: 100%; max-width: 420px; }
.welcome .tick { width: 112px; height: 112px; margin: 0 auto 18px; border-radius: 50%; background: #fff; color: #15803d; font-size: 4.2rem; line-height: 112px; font-weight: 700;
  animation: pop .45s ease-out; }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.12); } 100% { transform: scale(1); opacity: 1; } }
.welcome h1 { color: #fff; font-size: 2rem; margin: 0 0 6px; }
.welcome .wname { font-size: 1.6rem; font-weight: 700; margin: 14px 0 2px; }
.welcome .wmeta { font-size: 1.05rem; opacity: .9; margin: 0; }
.welcome .wtime { font-size: 2.2rem; font-weight: 700; margin: 18px 0 2px; font-variant-numeric: tabular-nums; }
.welcome .wdate { opacity: .9; margin: 0 0 18px; }
.welcome .wnote { background: rgba(255,255,255,.18); border-radius: 10px; padding: 12px 14px; font-size: 1.1rem; font-weight: 600; margin: 0 0 18px; }
.welcome button { background: #fff; color: #166534; border: 0; }
.pausebar { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 30; display: flex; gap: 10px; align-items: center; justify-content: space-between;
  background: #1f2937; color: #fff; padding: 10px 14px; border-radius: 10px; font-size: .92rem; box-shadow: 0 4px 16px rgba(0,0,0,.25); }
.pausebar[hidden] { display: none; }
.notice.ok { background: #dcfce7; border-color: #9fd9b4; }
.pill.ready { background: #fef3c7; color: var(--warn); }
.pill.onway { background: #dbeafe; color: #1d4ed8; }
.pill.reached { background: #dcfce7; color: var(--ok); }
dialog { border: 0; border-radius: 12px; padding: 20px; width: min(480px, 94vw); box-shadow: 0 10px 40px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(15, 23, 42, .5); }
#toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%) translateY(80px); background: #1b2430; color: #fff; padding: 10px 16px; border-radius: 8px; transition: transform .2s; max-width: 92vw; z-index: 50; }
#toast.show { transform: translateX(-50%); }
#toast.bad { background: var(--bad); }

.summary { list-style: none; padding: 0; margin: 12px 0 0; }
.summary li { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.summary li span:first-child { color: var(--muted); }
.summary li span:last-child { font-weight: 600; text-align: right; }

@media print {
  body { background: #fff; font-size: 12pt; }
  main { max-width: none; padding: 0; }
  .noprint { display: none !important; }
  .card, .sheetcab { border: 0; padding: 0; }
  .sheetcab { break-inside: avoid; }
}
.sheetcab { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-top: 14px; }
.sheetcab table th, .sheetcab table td { border: 1px solid #999; }
.sheetcab .meta { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 4px 0 10px; }
