/* Host stand + setup + guest pages. Dark by default: host stands live in dim dining rooms.
   Type never below 16px; tap targets 56px, primary actions 64px.
   Look: near-black with one warm accent (gold by default; each venue may pick emerald, rose or
   violet). Serif only for the venue name and headings; every working label stays in the sans at
   regular weight. Glows mark status only. Every accent keeps 7:1+ contrast on the background. */
:root {
  --bg: #0c0c0e;
  --s1: #141416;
  --s2: #1c1c20;
  --s3: #26262b;
  --line: #2e2e34;
  --text: #edeae4;
  --muted: #a8a39b;
  --gold: #c9a962;
  --gold-ink: #15110a;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --booked: #8d8d8d;
  --arrived: #5b9bd5;
  --seated: #5faf7a;
  --late: #e0a04a;
  --noshow: #d9675f;
  --done: #5f5f5f;
  --radius: 14px;
  --tap: 56px;
  --tap-lg: 64px;
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}
[data-accent="emerald"] { --gold: #5bbf8f; --gold-ink: #06160e; }
[data-accent="rose"] { --gold: #e08a9c; --gold-ink: #1d0a0f; }
[data-accent="violet"] { --gold: #b7a3e0; --gold-ink: #120d1d; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-size: 17px; line-height: 1.35; }
body { min-height: 100dvh; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
a { color: var(--gold); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); }
.row-gap { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* buttons */
.btn { min-height: var(--tap); padding: 0 20px; border-radius: 12px; border: 1px solid var(--line); background: var(--s2); font-weight: 600; font-size: 17px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; }
.btn:active { transform: scale(0.98); }
.btn.lg { min-height: var(--tap-lg); font-size: 19px; padding: 0 26px; }
.btn.primary { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }
.btn.blue { background: #1f3346; border-color: var(--arrived); color: #d7e8f8; }
.btn.green { background: #1c3324; border-color: var(--seated); color: #d6f0de; }
.btn.red { background: #3a1e1c; border-color: var(--noshow); color: #f6d6d3; }
.btn.ghost { background: transparent; }
.btn.small { min-height: 44px; font-size: 16px; padding: 0 14px; }
.btn[disabled] { opacity: 0.45; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 16px; font-weight: 600; border: 1px solid currentColor; white-space: nowrap; }
.chip.booked { color: var(--booked); }
.chip.arrived { color: var(--arrived); }
.chip.seated { color: var(--seated); }
.chip.late { color: var(--late); }
.chip.long { color: var(--late); }
.chip.no_show { color: var(--noshow); }
.chip.cancelled, .chip.done { color: var(--done); }

/* fields */
.field { display: grid; gap: 6px; }
.field > span, .field > label { font-size: 16px; color: var(--muted); }
.input, select.input, textarea.input { min-height: var(--tap); width: 100%; background: var(--s1); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 18px; }
textarea.input { min-height: 96px; resize: vertical; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg button { min-width: var(--tap); min-height: var(--tap); border-radius: 12px; border: 1px solid var(--line); background: var(--s2); font-size: 19px; font-weight: 700; }
.seg button[aria-pressed="true"] { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }

/* ───────── host stand ───────── */
.app { display: grid; grid-template-rows: auto 1fr; grid-template-columns: minmax(0, 1fr); height: 100dvh; }
.top { display: flex; align-items: center; gap: 12px; padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top)); background: var(--s1); border-bottom: 1px solid var(--line); flex-wrap: wrap; position: sticky; top: 0; z-index: 5; }
.brand { font-family: var(--serif); font-weight: 600; font-size: 22px; letter-spacing: 0.3px; color: var(--gold); margin-right: 4px; }
.datebar { display: flex; align-items: center; gap: 4px; }
.datebar .btn { min-width: 48px; padding: 0 12px; }
.datebar .day { font-weight: 700; font-size: 18px; min-width: 104px; text-align: center; }
.waitstrip { display: flex; gap: 8px; }
.waitstrip button { min-height: 48px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--s2); font-size: 17px; font-weight: 700; }
.waitstrip button .lbl { color: var(--muted); font-weight: 600; margin-right: 6px; }
.waitstrip button.over { border-color: var(--gold); }
.search { flex: 1 1 160px; min-width: 150px; max-width: 320px; }
.search input { min-height: 48px; font-size: 17px; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--seated); display: inline-block; }
.dot.off { background: var(--noshow); }
.dot.sync { background: var(--late); }
.stats { color: var(--muted); font-size: 16px; white-space: nowrap; }
@media (max-width: 1365px) and (min-width: 1000px) { .stats { display: none; } .brand { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }
.main { display: grid; grid-template-columns: minmax(0, 3fr) minmax(320px, 2fr); min-height: 0; }
.col { overflow-y: auto; -webkit-overflow-scrolling: touch; min-height: 0; padding: 8px 12px 120px; }
.col + .col { border-left: 1px solid var(--line); background: #111114; }
.tabs { display: none; }
@media (max-width: 999px) {
  .main { grid-template-columns: minmax(0, 1fr); } /* never wider than the screen */
  .col + .col { border-left: 0; }
  .tabs { display: flex; gap: 6px; padding: 8px 12px; background: var(--s1); border-bottom: 1px solid var(--line); overflow-x: auto; }
  .tabs button { min-height: 48px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--s2); font-weight: 700; white-space: nowrap; }
  .tabs button[aria-selected="true"] { background: var(--gold); color: var(--gold-ink); }
  .col[data-hidden="true"] { display: none; }
  .search { order: 10; max-width: none; flex-basis: 100%; }
  .desktop-only { display: none; }
}
.group-h { position: sticky; top: 0; z-index: 2; background: var(--bg); padding: 10px 4px 6px; font-size: 16px; font-weight: 700; color: var(--muted); letter-spacing: 0.3px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.col + .col .group-h { background: #111114; }
.group-h.now { color: var(--gold); }
.group-h.attn { color: var(--late); }

.res { background: var(--s1); border: 1px solid var(--line); border-radius: var(--radius); margin: 8px 0; overflow: hidden; }
.res > .head { width: 100%; display: grid; grid-template-columns: 112px 1fr auto auto; gap: 12px; align-items: center; padding: 12px 14px; min-height: 68px; background: none; border: 0; text-align: left; }
.res .time { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.res .name { font-size: 22px; font-weight: 650; line-height: 1.2; overflow-wrap: anywhere; }
.res .sub { font-size: 16px; color: var(--muted); margin-top: 2px; display: flex; gap: 10px; flex-wrap: wrap; }
.res .party { font-size: 22px; font-weight: 800; min-width: 44px; text-align: center; background: var(--s3); border-radius: 10px; padding: 6px 8px; font-variant-numeric: tabular-nums; }
.res.s-arrived { border-color: var(--arrived); box-shadow: 0 0 14px rgba(91, 155, 213, 0.22); }
.res.s-seated { border-left: 6px solid var(--seated); }
.res.s-long { border-left: 6px solid var(--late); box-shadow: 0 0 14px rgba(224, 160, 74, 0.2); }
.long { color: var(--late); font-weight: 600; }
.res.s-late { border-color: var(--late); }
.res.s-done, .res.s-cancelled, .res.s-no_show { opacity: 0.55; }
.res.glow { animation: glow 3s ease-out; }
@media (max-width: 520px) {
  /* Phones: narrower time column; the status chip drops under the name so nothing is cut off. */
  .res > .head { grid-template-columns: 84px minmax(0, 1fr) auto; gap: 10px; padding: 10px 12px; }
  .res .time { font-size: 18px; }
  .res > .head > .chip { grid-column: 2 / -1; justify-self: start; }
  .tabs { gap: 4px; padding: 8px; }
  .tabs button { padding: 0 10px; font-size: 15px; }
}
@keyframes glow { 0% { box-shadow: 0 0 0 4px var(--gold); } 100% { box-shadow: 0 0 0 0 transparent; } }
.res .body { padding: 0 14px 14px; display: grid; gap: 12px; }
.res .notes { background: var(--s2); border-radius: 10px; padding: 10px 12px; font-size: 18px; }
.res .notes.allergy { border-left: 4px solid var(--noshow); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.actions .btn { flex: 1 1 140px; }
.sizes { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sizes button { min-width: var(--tap); min-height: var(--tap); border-radius: 12px; border: 1px solid var(--line); background: var(--s2); font-weight: 800; font-size: 18px; }
.sizes button.pick { background: var(--seated); color: #0d1f13; border-color: var(--seated); }
.sizes button { padding: 0 12px; }
.sizes button small { font-weight: 500; color: var(--muted); font-size: 16px; }
.sizes button.pick small { color: inherit; }
.sizes button.special:not(.pick) { border-color: var(--gold); color: var(--gold); }
/* VIP, bottle-service and private bookings (or a VIP-tagged guest): a thin ring in the venue's accent. */
.res.vip { outline: 1px solid var(--gold); outline-offset: 2px; }
.res .sub .kind { color: var(--gold); }
.counter.special b { color: var(--gold); }

.wcard { background: var(--s1); border: 1px solid var(--line); border-radius: var(--radius); margin: 8px 0; padding: 12px 14px; display: grid; gap: 10px; }
.wcard .top-line { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.wcard .name { font-size: 21px; font-weight: 650; }
.wcard .waited { font-variant-numeric: tabular-nums; color: var(--muted); }
.wcard.over { border-color: var(--late); }
.wcard.over .waited { color: var(--late); font-weight: 700; }
.wcard.notified { border-color: var(--arrived); }
.counters { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin: 8px 0; }
.counter { background: var(--s1); border: 1px solid var(--line); border-radius: 12px; padding: 10px; text-align: center; }
.counter b { display: block; font-size: 24px; font-variant-numeric: tabular-nums; }
.msg { background: var(--s1); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin: 8px 0; display: grid; gap: 8px; }
.msg.urgent { border-color: var(--noshow); }
.msg .topic { font-size: 15px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--gold); font-weight: 700; }

.fab { position: fixed; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); z-index: 8; min-height: 72px; padding: 0 28px; border-radius: 999px; font-size: 20px; box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.fab2 { right: auto; left: max(18px, env(safe-area-inset-left)); background: var(--s2); color: var(--text); border-color: var(--line); }

.banner { position: fixed; left: 50%; transform: translateX(-50%); top: max(12px, env(safe-area-inset-top)); z-index: 20; background: var(--gold); color: var(--gold-ink); padding: 14px 22px; border-radius: 14px; font-weight: 700; font-size: 18px; box-shadow: 0 8px 30px rgba(0,0,0,.6); max-width: 92vw; }
.undo { position: fixed; left: 50%; transform: translateX(-50%); bottom: max(100px, calc(env(safe-area-inset-bottom) + 100px)); z-index: 20; background: #f1efe9; color: #111; padding: 8px 8px 8px 18px; border-radius: 14px; display: flex; align-items: center; gap: 14px; font-weight: 600; box-shadow: 0 8px 30px rgba(0,0,0,.6); max-width: 94vw; }
.undo .btn { background: #111; color: #fff; border-color: #111; min-height: 48px; }
.toast-err { background: #3a1e1c; color: #f6d6d3; }
.offline { background: #3b2a12; color: #f6dfb8; padding: 8px 14px; text-align: center; font-weight: 600; }

/* sheets (dialogs) */
dialog.sheet { border: 0; padding: 0; background: var(--s1); color: var(--text); border-radius: 20px; width: min(720px, 96vw); max-height: 92dvh; box-shadow: 0 20px 60px rgba(0,0,0,.7); }
dialog.sheet::backdrop { background: rgba(0,0,0,.6); }
.sheet-h { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--s1); z-index: 1; }
.sheet-h h2 { margin: 0; font-size: 22px; }
.sheet-b { padding: 16px 18px 20px; display: grid; gap: 16px; overflow-y: auto; max-height: calc(92dvh - 70px); }
.sheet-f { display: flex; gap: 10px; flex-wrap: wrap; }
.sheet-f .btn { flex: 1 1 160px; }
.err { color: #f2a9a2; font-weight: 600; }
.alts { display: flex; gap: 8px; flex-wrap: wrap; }

/* login / start shift */
.center { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.card { background: var(--s1); border: 1px solid var(--line); border-radius: 20px; padding: 28px; width: min(460px, 100%); display: grid; gap: 18px; }
.card h1 { margin: 0; font-size: 28px; font-family: var(--serif); font-weight: 600; }
h1, h2 { font-family: var(--serif); font-weight: 600; }
.pin-dots { display: flex; gap: 14px; justify-content: center; }
.pin-dots i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--muted); display: block; }
.pin-dots i.on { background: var(--gold); border-color: var(--gold); }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pad button { min-height: 72px; border-radius: 16px; border: 1px solid var(--line); background: var(--s2); font-size: 28px; font-weight: 700; }

/* guest pages (phone-sized) */
.guest { max-width: 520px; margin: 0 auto; padding: 28px 20px 40px; display: grid; gap: 20px; }
.guest h1 { font-size: 28px; margin: 0; }
.guest .big { font-size: 34px; letter-spacing: 10px; text-align: center; font-variant-numeric: tabular-nums; }
.guest .ok { font-size: 64px; text-align: center; }

/* setup wizard */
.wiz { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 0; min-height: 100dvh; }
.wiz-main { padding: 24px 28px 120px; max-width: 900px; }
.wiz-side { background: #111114; border-left: 1px solid var(--line); padding: 24px; position: sticky; top: 0; height: 100dvh; overflow-y: auto; }
@media (max-width: 1100px) { .wiz { grid-template-columns: minmax(0, 1fr); } .wiz-side { position: static; height: auto; border-left: 0; border-top: 1px solid var(--line); } }
.q { background: var(--s1); border: 1px solid var(--line); border-radius: 18px; padding: 20px; margin: 16px 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.q h2 { margin: 0; font-size: 21px; font-family: inherit; display: flex; gap: 12px; align-items: baseline; }
.q h2 .n { color: var(--gold); font-variant-numeric: tabular-nums; }
.q .hint { color: var(--muted); font-size: 16px; margin: -6px 0 0; }
.tpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.tpl { text-align: left; background: var(--s2); border: 1px solid var(--line); border-radius: 14px; padding: 14px; min-height: 96px; display: grid; gap: 6px; }
.tpl[aria-pressed="true"] { border-color: var(--gold); box-shadow: inset 0 0 0 2px var(--gold); }
.tpl b { font-size: 18px; }
.hours { display: grid; gap: 8px; }
.hours .day { display: grid; grid-template-columns: 110px 120px 1fr 1fr; gap: 8px; align-items: center; }
.hours input[type="time"] { min-height: 48px; }
.steppers { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.stepper { background: var(--s2); border-radius: 14px; padding: 10px; display: grid; gap: 6px; text-align: center; }
.stepper .ctl { display: flex; align-items: center; justify-content: center; gap: 10px; }
.stepper .ctl button { width: 52px; height: 52px; border-radius: 12px; border: 1px solid var(--line); background: var(--s3); font-size: 26px; font-weight: 700; }
.stepper .ctl b { font-size: 26px; min-width: 44px; font-variant-numeric: tabular-nums; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 700px) { .grid2 { grid-template-columns: 1fr; } .hours .day { grid-template-columns: 1fr 1fr; } }
.pre { white-space: pre-wrap; background: var(--s1); border: 1px solid var(--line); border-radius: 12px; padding: 12px; font-size: 15px; line-height: 1.45; max-height: 340px; overflow: auto; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; font-size: 16px; }
.kv code { word-break: break-all; }
.savebar { position: fixed; left: 0; right: 0; bottom: 0; background: rgba(17,17,17,.96); border-top: 1px solid var(--line); padding: 12px 20px; padding-bottom: max(12px, env(safe-area-inset-bottom)); display: flex; gap: 12px; justify-content: flex-end; z-index: 10; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--s3); font-size: 15px; }

/* landing */
.land { max-width: 980px; margin: 0 auto; padding: 40px 22px 80px; display: grid; gap: 22px; }
.land h1 { font-size: 40px; margin: 0; line-height: 1.1; }
.land .tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.land .tile { background: var(--s1); border: 1px solid var(--line); border-radius: 18px; padding: 20px; display: grid; gap: 10px; text-decoration: none; color: var(--text); }
.land .tile b { font-size: 20px; }

/* printable door sign */
.sign { background: #fff; color: #111; width: 8.5in; min-height: 11in; margin: 0 auto; padding: 0.9in 0.8in; display: grid; gap: 28px; justify-items: center; text-align: center; font-family: Georgia, "Times New Roman", serif; }
.sign h1 { font-size: 46px; margin: 0; }
.sign .qr svg { width: 4.2in; height: 4.2in; }
.sign p { font-size: 26px; margin: 0; }
.sign .es { color: #555; font-style: italic; }
@media print { body { background: #fff; } .noprint { display: none !important; } .sign { margin: 0; } }

/* signup form (/signup/<token>): phone-first, one column */
.su { max-width: 640px; margin: 0 auto; padding: 20px 16px 56px; display: grid; gap: 14px; }
.su h1 { font-size: 27px; line-height: 1.2; margin: 0; }
.su > .muted { margin: 0; }
.su-brand { margin: 0; color: var(--gold); font-family: var(--serif); font-size: 18px; letter-spacing: 0.02em; }
.su-lang { display: flex; gap: 8px; justify-content: flex-end; }
.su-lang button { min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; font-size: 16px; }
.su-lang button[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); }
.su .q { margin: 4px 0; }
.su-loc { border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin: 0; display: grid; gap: 12px; min-width: 0; }
.su-loc legend { padding: 0 6px; color: var(--gold); font-weight: 600; }
.su-addr { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 10px; }
.su-tables { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.su-tables label { display: grid; gap: 4px; text-align: center; }
.su-tables .input { text-align: center; padding: 10px 6px; }
.su .field small { font-size: 15px; }
.su .input[aria-invalid="true"] { border-color: var(--noshow); }
.su .check { display: flex; gap: 12px; align-items: flex-start; min-height: 44px; font-size: 17px; }
.su .check input { width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--gold); flex: none; }
.su .seg button { font-size: 17px; padding: 0 14px; }
.su-price { background: var(--s2); border-radius: 14px; padding: 14px 16px; display: grid; gap: 4px; }
.su-price b { font-size: 30px; font-family: var(--serif); color: var(--gold); }
.su-price b small { font-size: 17px; color: var(--muted); font-family: inherit; }
.su-send { width: 100%; }
.su-next { margin: 0; padding-left: 22px; display: grid; gap: 10px; font-size: 18px; }
@media (max-width: 420px) { .su-addr { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .su-addr .field:first-child { grid-column: 1 / -1; } }
.su-made { background: var(--s2); border-radius: 14px; padding: 14px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; overflow-wrap: anywhere; }
.su-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.su-list > li { background: var(--s2); border-radius: 14px; padding: 14px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; overflow-wrap: anywhere; }
.pill.warn { background: #3a2a14; color: var(--late); }
.su-detail { display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; }
.su-detail h3 { margin: 6px 0 0; font-size: 17px; }
.su-detail pre { margin: 0; white-space: pre-wrap; word-break: break-word; background: var(--s1); border: 1px solid var(--line); border-radius: 12px; padding: 12px; font-size: 15px; line-height: 1.45; }
.su h1:focus { outline: none; }
@media (max-width: 520px) { .savebar { padding: 10px 12px max(10px, env(safe-area-inset-bottom)); } .savebar .btn { flex: 1 1 0; min-width: 0; white-space: normal; padding: 0 10px; font-size: 16px; line-height: 1.2; } .wiz-main { padding: 16px 12px 120px; } .wiz .q { padding: 14px; } .steppers { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stepper .ctl { gap: 6px; } .stepper .ctl button { width: 44px; height: 44px; } }
.land-block { display: grid; gap: 18px; }
.land-block[hidden], .su [data-l][hidden] { display: none; }
.land .lead { font-size: 18px; margin: 0; }
