:root {
  --bg: #faf6f0; --card: #ffffff; --ink: #2b211b; --muted: #6f625a; --line: #e4d9cc;
  --brand: #6b3f24; --brand-ink: #ffffff; --ok: #1f7a43; --ok-bg: #e6f4ec;
  --warn: #8a5a00; --warn-bg: #fff3d6; --bad: #a12626; --bad-bg: #fbe6e6;
  --radius: 12px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.wrap { max-width: 760px; margin: 0 auto; padding: 16px 16px 64px; }
.topbar { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; justify-content: space-between; background: var(--brand); color: var(--brand-ink); padding: 10px 16px; }
.topbar a, .topbar .linklike { color: var(--brand-ink); text-decoration: none; font-size: 16px; }
.topbar .brand { font-weight: 700; font-size: 18px; }
.topbar nav { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
h1 { font-size: 1.7rem; line-height: 1.2; margin: 8px 0 12px; }
h2 { font-size: 1.25rem; margin: 24px 0 8px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 12px 0; }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }
label { display: block; font-weight: 600; margin: 12px 0 4px; }
input[type=text], input[type=email], input[type=tel], input[type=date], input[type=time], input[type=number], input[type=password], input[type=file], select, textarea {
  width: 100%; font: inherit; padding: 12px; border: 1px solid #c9bcae; border-radius: 10px; background: #fff; color: var(--ink);
}
textarea { min-height: 96px; }
.row { display: grid; gap: 0 12px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .row.two { grid-template-columns: 1fr 1fr; } .row.three { grid-template-columns: 1fr 1fr 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 5px; width: 20px; height: 20px; }
button, .btn { font: inherit; font-weight: 600; background: var(--brand); color: var(--brand-ink); border: 0; border-radius: 10px; padding: 13px 20px; cursor: pointer; text-decoration: none; display: inline-block; min-height: 48px; }
button.secondary, .btn.secondary { background: #efe6da; color: var(--ink); }
button.danger { background: var(--bad); }
button.big { width: 100%; font-size: 1.15rem; padding: 16px; }
button:disabled { opacity: .55; cursor: wait; }
button.linklike { background: none; padding: 0; min-height: 0; text-decoration: underline; font-weight: 400; }
form.inline { display: inline; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.flash { padding: 12px 14px; border-radius: 10px; margin: 12px 0; }
.flash.ok { background: var(--ok-bg); color: var(--ok); }
.flash.err { background: var(--bad-bg); color: var(--bad); }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .82rem; font-weight: 700; }
.badge.verified { background: var(--ok-bg); color: var(--ok); }
.badge.gps { background: var(--warn-bg); color: var(--warn); }
.badge.flag { background: var(--bad-bg); color: var(--bad); }
.badge.draft { background: #eee; color: #555; }
.badge.published { background: var(--ok-bg); color: var(--ok); }
.badge.cancelled { background: var(--bad-bg); color: var(--bad); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.tablewrap { overflow-x: auto; }
.pill-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pill-row button { background: #efe6da; color: var(--ink); border: 2px solid transparent; }
.pill-row button[aria-pressed=true] { border-color: var(--brand); background: #fff; }
.countdown { font-size: 2rem; font-weight: 700; color: var(--brand); }
.arrival { max-width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); }
.big-id { font-size: 2.4rem; font-weight: 800; letter-spacing: .06em; color: var(--brand); }
.status { min-height: 1.5em; margin-top: 10px; }
.status.err { color: var(--bad); font-weight: 600; }
.cf-turnstile { margin: 14px 0 4px; }
.notice { background: #f3ece3; border-radius: 10px; padding: 10px 12px; }
/* iPad host mode */
body.host { background: #1c1410; color: #fff; }
body.host .wrap { max-width: none; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; text-align: center; padding: 20px; }
.host-qr { width: min(78vmin, 640px); background: #fff; padding: 14px; border-radius: 18px; }
.host-qr svg { width: 100%; height: auto; display: block; }
.host-bar { width: min(78vmin, 640px); height: 8px; background: #46352b; border-radius: 4px; margin-top: 14px; overflow: hidden; }
.host-bar > div { height: 100%; background: #e0a96d; width: 100%; }
body.host .muted { color: #cdbfb3; }
body.host button.secondary { background: #3a2c23; color: #fff; }
body.host input { max-width: 320px; text-align: center; font-size: 1.6rem; }
.flush { margin-top: 0; }
.prewrap { white-space: pre-wrap; }
/* Home page */
body.home { background: #faf6f0; }
body.home .wrap { max-width: none; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.home-inner { text-align: center; }
.home-art { width: min(78vw, 380px); height: auto; display: block; margin: 0 auto 8px; }
.home-inner h1 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 8vw, 3.4rem); letter-spacing: .02em; color: #4a2a17; margin: 0; }
/* 2-step login */
.center { text-align: center; }
.setup-qr { width: min(70vw, 260px); margin: 0 auto; background: #fff; padding: 8px; border-radius: 10px; }
.setup-qr svg { width: 100%; height: auto; display: block; }
.keybox { display: inline-block; padding: 8px 12px; background: #f3ece3; border-radius: 8px; font-size: 1.05rem; letter-spacing: .08em; word-break: break-all; }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.codes code { background: #f3ece3; padding: 10px; border-radius: 8px; text-align: center; font-size: 1.1rem; letter-spacing: .06em; }
.tempbox { font-size: 1.5rem; font-weight: 700; letter-spacing: .05em; word-break: break-all; background: #fff3d6; padding: 14px; border-radius: 10px; text-align: center; }
