/* Doorlist app — one token set, paper-and-ink. Matches doorlist1 site. */
:root {
  color-scheme: light dark;
  --paper: #F3F1EA;
  --paper-2: #E9E6DD;
  --panel: #FFFFFF;
  --ink: #15171B;
  --soft: #4E535B;
  --mute: #575C64;
  --line: #D7D3C8;
  --line-soft: #E4E0D6;
  --blue: #2036B8;
  --blue-ink: #FFFFFF;
  --blue-tint: #E6E9F7;
  --red: #F0532F;
  --red-deep: #C93A1A;
  --red-solid: #D93B1A;
  --red-tint: #FCE6DF;
  --good: #2F6B4F;
  --good-tint: #E2EEE7;
  --focus: #2036B8;
  /* Added for dark mode; in light they equal what was hard-coded before. */
  --blue-text: #2036B8;
  --blue-hover: #18299A;
  --soft-hover: #DFDBD0;
  --late-bg: #FFF4F0;
  --wa-bg: #DCF3E4;
  --wa-ink: #1D4B33;
  --preview-bg: #E7F3EC;
  --deep: #15171B;
  --on-deep: #F3F1EA;
  --on-ink: #FFFFFF;
  --on-red: #15171B;
  --shine: rgba(255,255,255,.7);

  --font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-lg: 14px;
  --r-md: 10px;
  --r-sm: 6px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --fast: 140ms;
  --side: 248px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.2; overflow-wrap: break-word; min-width: 0; }
h1 { font-size: 28px; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
p { margin: 0; }
a { color: var(--blue-text); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.noscript { padding: 32px; }
.muted { color: var(--mute); }
.soft { color: var(--soft); }
.small { font-size: 14px; }
.tiny { font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.stack > * + * { margin-top: 12px; }
.stack-lg > * + * { margin-top: 24px; }
.row { display: flex; align-items: center; gap: 12px; }
.row.wrap { flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.grow { flex: 1; min-width: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  border: 1px solid var(--ink); border-radius: var(--r-md);
  background: var(--panel); color: var(--ink);
  font-weight: 500; font-size: 15px; text-decoration: none; cursor: pointer;
  transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease), color var(--fast) var(--ease);
}
.btn:hover { background: var(--paper-2); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: var(--blue-ink); }
.btn.primary:hover { background: var(--blue-hover); }
.btn.hold { background: var(--red); border-color: var(--red); color: var(--on-red); }
.btn.hold:hover { background: #E2401B; }
.btn.quiet { border-color: var(--line); color: var(--soft); }
.btn.quiet:hover { color: var(--ink); border-color: var(--soft); background: var(--panel); }
.btn.link { border: 0; background: none; padding: 0 8px; min-height: 44px; color: var(--soft); text-decoration: underline; text-underline-offset: 3px; }
.btn.link:hover { color: var(--ink); background: none; }
.btn.sm { min-height: 44px; padding: 0 12px; font-size: 14px; border-radius: var(--r-sm); }
.btn.lg { min-height: 56px; padding: 0 24px; font-size: 17px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ---------- Fields ---------- */
.field { display: grid; gap: 6px; }
.field > span { font-size: 14px; font-weight: 500; color: var(--soft); }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--panel); font-size: 16px;
  transition: border-color var(--fast) var(--ease);
}
.textarea { min-height: 88px; resize: vertical; line-height: 1.45; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--mute); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 1px var(--blue); }
.phone-input { display: flex; align-items: stretch; }
.phone-input .prefix {
  display: grid; place-items: center; padding: 0 12px;
  border: 1px solid var(--line); border-right: 0; border-radius: var(--r-md) 0 0 var(--r-md);
  background: var(--paper-2); color: var(--soft); font-size: 16px;
}
.phone-input .input { border-radius: 0 var(--r-md) var(--r-md) 0; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--soft); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--blue); flex: none; }
.field .stepper { justify-self: start; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel); }
.stepper button { width: 52px; height: 52px; border: 0; background: none; font-size: 22px; cursor: pointer; color: var(--ink); }
.stepper button:hover { background: var(--paper-2); }
.stepper button:first-child { border-radius: var(--r-md) 0 0 var(--r-md); }
.stepper button:last-child { border-radius: 0 var(--r-md) var(--r-md) 0; }
.stepper output { min-width: 56px; text-align: center; font-size: 22px; font-weight: 600; }

/* ---------- Surfaces ---------- */
.panel { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r-lg); padding: 20px; }
.panel.flat { background: transparent; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.divider { height: 1px; background: var(--line-soft); border: 0; margin: 16px 0; }
.badge {
  display: inline-flex; align-items: center; height: 24px; padding: 0 8px;
  border-radius: var(--r-sm); background: var(--paper-2); color: var(--soft);
  font-size: 13px; font-weight: 500; white-space: nowrap;
}
.badge.blue { background: var(--blue-tint); color: var(--blue-text); }
.badge.red { background: var(--red-tint); color: var(--red-deep); }
.badge.good { background: var(--good-tint); color: var(--good); }

/* Signature: the docket slip — a token number with a perforated tear line */
.slip {
  position: relative; display: inline-grid; justify-items: center; gap: 2px;
  min-width: 132px; padding: 14px 20px 16px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md);
}
.slip::before {
  content: ""; position: absolute; left: 10px; right: 10px; top: 34px;
  border-top: 2px dashed var(--line);
}
.slip .slip-label { font-size: 13px; color: var(--mute); line-height: 20px; }
.slip .slip-no { font-size: 56px; font-weight: 600; line-height: 1; padding-top: 12px; letter-spacing: -0.01em; }
.slip.ready { border-color: var(--red); }
.slip.ready::before { border-color: var(--red); }
.slip.ready .slip-no { color: var(--red-deep); }
.token { font-weight: 600; font-size: 15px; min-width: 40px; color: var(--soft); }

/* ---------- Layout: phone pages (guest, join) ---------- */
.phone-page { min-height: 100dvh; display: flex; flex-direction: column; max-width: 480px; margin: 0 auto; padding: 20px 20px calc(24px + env(safe-area-inset-bottom)); }
.phone-page main { flex: 1; display: flex; flex-direction: column; }
.brandbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; margin-bottom: 24px; }
.brandmark { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; font-size: 17px; color: var(--ink); text-decoration: none; }
.brandmark .logo { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; background: var(--blue); color: var(--on-deep); font-weight: 700; font-size: 15px; }
.foot-note { margin-top: 24px; font-size: 13px; color: var(--mute); text-align: center; }
.foot-note a { color: var(--soft); }

/* Kiosk (door phone join screen) */
.kiosk { max-width: 560px; }
.kiosk h1 { font-size: 32px; }
.kiosk .field > span { font-size: 15px; }
.big-state { flex: 1; display: grid; place-content: center; justify-items: center; text-align: center; gap: 16px; padding: 24px 0; }

/* ---------- Layout: staff door (phone-first, works on tablet) ---------- */
.door { max-width: 760px; margin: 0 auto; padding: 0 16px calc(104px + env(safe-area-inset-bottom)); }
.door-top { position: sticky; top: 0; z-index: 5; background: var(--paper); padding: 8px 0 12px; }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--paper-2); border-radius: var(--r-md); }
.tabs button, .tabs a {
  flex: 1; min-height: 44px; border: 0; border-radius: var(--r-sm); background: none;
  font-size: 15px; font-weight: 500; color: var(--soft); cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease);
}
.tabs [aria-selected="true"] { background: var(--panel); color: var(--ink); }
.tabs .count { color: var(--mute); font-weight: 400; }
.qlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.qitem {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 14px 16px; background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r-lg);
}
.qitem.is-ready { border-color: var(--red); }
.qitem.is-over { background: var(--red-tint); border-color: var(--red); }
.qitem .who { font-weight: 600; font-size: 17px; overflow-wrap: anywhere; }
.qitem .meta { font-size: 14px; color: var(--mute); }
.qitem .acts { display: flex; gap: 8px; }
.qitem .acts-wide { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; padding-left: 52px; }
.timer { font-weight: 600; color: var(--red-deep); }
.empty { padding: 40px 16px; text-align: center; color: var(--mute); }
.fab {
  position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: min(728px, calc(100% - 32px)); display: flex; gap: 8px; z-index: 20;
}
.fab .btn { flex: 1; }
.switch { white-space: nowrap; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 15px; font-weight: 500; }
.switch input { appearance: none; width: 44px; height: 26px; border-radius: 13px; background: var(--line); position: relative; margin: 0; cursor: pointer; transition: background-color var(--fast) var(--ease); }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--panel); transition: transform var(--fast) var(--ease); }
.switch input:checked { background: var(--good); }
.switch input:checked::after { transform: translateX(18px); }

/* ---------- Layout: dashboard (owner, admin) ---------- */
.dash { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100dvh; }
.side { border-right: 1px solid var(--line-soft); padding: 20px 16px; display: flex; flex-direction: column; gap: 24px; position: sticky; top: 0; height: 100dvh; }
.side nav { display: grid; gap: 2px; }
.side nav a {
  display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 0 12px;
  border-radius: var(--r-sm); color: var(--soft); text-decoration: none; font-size: 15px; font-weight: 500;
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease);
}
.side nav a:hover { background: var(--paper-2); color: var(--ink); }
.side nav a[aria-current="page"] { background: var(--panel); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-soft); }
.side .place { display: grid; gap: 2px; padding: 0 12px; }
.side .place strong { font-size: 15px; }
.side .bottom { margin-top: auto; display: grid; gap: 8px; padding: 0 12px; }
.main { padding: 28px 32px 48px; max-width: 1200px; width: 100%; }
.main-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.main-head p { margin-top: 4px; color: var(--soft); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r-lg); padding: 16px 20px; display: grid; gap: 4px; }
.stat .label { font-size: 14px; color: var(--soft); }
.stat .value { font-size: 30px; font-weight: 600; line-height: 1.15; }
.stat .cmp { font-size: 13px; color: var(--mute); }
.grid-2 { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; font-weight: 500; font-size: 13px; color: var(--mute); padding: 0 12px 8px; border-bottom: 1px solid var(--line-soft); }
.table td { white-space: nowrap; padding: 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .r { text-align: right; }
.table-wrap { overflow-x: auto; }
.bars { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; align-items: end; height: 120px; }
.bars .bar { background: var(--paper-2); border-radius: 4px 4px 0 0; min-height: 4px; }
.bars .bar.peak { background: var(--blue); }
.bars-x { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; font-size: 12px; color: var(--mute); text-align: center; margin-top: 6px; }
.locked { border: 1px dashed var(--line); border-radius: var(--r-lg); padding: 24px; display: grid; gap: 12px; justify-items: start; background: transparent; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.plan-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.plan-card { display: grid; gap: 8px; align-content: start; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); cursor: pointer; transition: border-color var(--fast) var(--ease); }
.plan-card:hover { border-color: var(--soft); }
.plan-card:has(input:checked) { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.plan-card input { position: absolute; opacity: 0; pointer-events: none; }
.plan-card .price { font-size: 22px; font-weight: 600; }
.plan-card ul { margin: 0; padding-left: 18px; color: var(--soft); font-size: 14px; display: grid; gap: 2px; }
.steps { list-style: none; margin: 0 0 24px; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.steps li { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--mute); }
.steps li + li::before { content: ""; width: 20px; height: 1px; background: var(--line); }
.steps .n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); font-size: 13px; }
.steps [aria-current="step"] { color: var(--ink); font-weight: 500; }
.steps [aria-current="step"] .n { background: var(--blue); border-color: var(--blue); color: var(--blue-ink); }
.steps .done .n { background: var(--paper-2); color: var(--soft); }
.poster { aspect-ratio: 210 / 297; max-width: 240px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel); padding: 20px; display: grid; align-content: space-between; }
.poster .qr { aspect-ratio: 1; border: 2px dashed var(--line); border-radius: var(--r-sm); display: grid; place-items: center; color: var(--mute); font-size: 13px; text-align: center; padding: 8px; }
.game-frame { aspect-ratio: 9 / 16; max-height: 560px; width: 100%; max-width: 320px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--deep); color: var(--on-deep); display: grid; place-content: center; justify-items: center; gap: 12px; padding: 24px; text-align: center; }

/* Hub */
.hub { max-width: 1080px; margin: 0 auto; padding: 20px 20px 64px; }
.hub-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hub-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 48px; align-items: center; padding: 48px 0 56px; }
.hub-copy { display: grid; gap: 20px; align-content: center; }
.hub-demo { justify-self: start; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line-soft); font-size: 14px; color: var(--soft); }
.hub-demo::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--good); }
.hub-copy h1 { font-size: clamp(36px, 6vw, 56px); line-height: 1.04; font-weight: 700; letter-spacing: -0.02em; max-width: 12ch; }
.hub-copy p { font-size: 18px; color: var(--soft); max-width: 34ch; }
.hub-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hub-cta .btn.quiet { background: var(--panel); }

/* The door-list picture in the hero */
.hub-phone { justify-self: center; width: min(100%, 360px); display: grid; gap: 10px; padding: 16px; border-radius: 28px; background: var(--paper-2); border: 1px solid var(--line); box-shadow: 0 1px 0 var(--shine) inset, 0 24px 48px -28px rgba(21,23,27,.35); animation: rise 420ms var(--ease) 80ms both; }
.hp-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 2px; }
.hp-place { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.hp-dot { width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; color: #fff; font-size: 13px; font-weight: 700; }
.hp-count { font-size: 13px; color: var(--mute); }
.hp-tabs { display: grid; grid-template-columns: repeat(3, 1fr); padding: 4px; border-radius: 12px; background: var(--paper); font-size: 13px; font-weight: 600; color: var(--mute); text-align: center; }
.hp-tabs span { padding: 6px 0; border-radius: 9px; }
.hp-tabs .on { background: var(--panel); color: var(--ink); box-shadow: 0 1px 2px rgba(21,23,27,.08); }
.hp-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border-radius: 14px; background: var(--panel); border-left: 4px solid var(--blue); }
.hp-card.called { border-left-color: var(--red); }
.hp-tok { min-width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: var(--blue-tint); color: var(--blue-text); font-weight: 700; font-size: 17px; }
.hp-card.called .hp-tok { background: var(--red-tint); color: var(--red-deep); }
.hp-who { display: grid; min-width: 0; }
.hp-who strong { font-size: 15px; }
.hp-who span { font-size: 13px; color: var(--mute); }
.hp-btn { padding: 7px 10px; border-radius: 9px; background: var(--blue); color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; }
.hp-card .ring-label { font-size: min(12px, var(--ring-fit, 12px)); }
.hp-wa { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: start; margin-top: 4px; padding: 10px 12px; border-radius: 14px 14px 14px 4px; background: var(--wa-bg); color: var(--wa-ink); font-size: 13px; line-height: 1.4; }
.hp-wa .ic { margin-top: 1px; color: var(--good); }
.hub-phone > .hp-card { animation: rise 360ms var(--ease) both; }
.hub-phone > .hp-card:nth-of-type(1) { animation-delay: 200ms; }
.hub-phone > .hp-card:nth-of-type(2) { animation-delay: 260ms; }
.hub-phone > .hp-card:nth-of-type(3) { animation-delay: 320ms; }
.hub-phone > .hp-wa { animation: rise 360ms var(--ease) 520ms both; }

.hub-sec { display: grid; gap: 16px; padding-top: 40px; }
.hub-sec h2 { font-size: 22px; font-weight: 700; }
.hub-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.hub-steps li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; padding: 18px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line-soft); }
.step-tok { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: var(--ink); color: var(--paper); font-weight: 700; }
.hub-steps strong, .hub-tile strong, .hub-row strong { display: block; font-size: 16px; }
.what { display: block; font-size: 14px; color: var(--soft); margin-top: 2px; }

.hub-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.hub-tile { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: start; padding: 20px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line-soft); color: var(--ink); text-decoration: none; transition: border-color var(--fast) var(--ease), transform var(--fast) var(--ease); }
.hub-tile:hover { border-color: var(--ink); }
.hub-tile:active { transform: scale(.98); }
.hub-tile .who { display: block; font-size: 13px; color: var(--mute); margin-bottom: 2px; }
.hub-ic { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; }
.hub-ic.sm { width: 40px; height: 40px; border-radius: 12px; background: var(--paper-2); color: var(--ink); }
.t-red .hub-ic { background: var(--red-tint); color: var(--red-deep); }
.t-blue .hub-ic { background: var(--blue-tint); color: var(--blue-text); }
.t-green .hub-ic { background: var(--good-tint); color: var(--good); }
.t-ink .hub-ic { background: var(--ink); color: var(--paper); }
.hub-rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.hub-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; padding: 14px 16px; border-radius: var(--r-lg); border: 1px dashed var(--line); color: var(--ink); text-decoration: none; transition: border-color var(--fast) var(--ease), background var(--fast) var(--ease); }
.hub-row:hover { border-style: solid; background: var(--panel); }
.hub .demo-note { margin-top: 40px; text-align: center; }

@media (max-width: 820px) {
  .hub-hero { grid-template-columns: minmax(0, 1fr); gap: 32px; padding: 32px 0 16px; }
  .hub-steps, .hub-tiles, .hub-rows { grid-template-columns: minmax(0, 1fr); }
  .hub-cta .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .hub-phone, .hub-phone > * { animation: none !important; }
}

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 50; box-shadow: 0 8px 24px -12px rgba(0, 0, 0, .45); transform: translate(-50%, 8px); opacity: 0; text-align: center;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: var(--r-md); font-size: 15px;
  transition: opacity 180ms var(--ease), transform 180ms var(--ease); pointer-events: none; max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Demo ribbon */
.demo-note { font-size: 13px; color: var(--mute); }
.demo-note button { font-size: 13px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .dash { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line-soft); padding: 12px 16px; gap: 12px; }
  .dash { align-content: start; }
  /* All six sections visible at once on a phone: two rows of three, short labels */
  .side nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 14px; background: var(--paper-2); }
  .side nav a { justify-content: center; min-height: 44px; padding: 0 6px; font-size: 14px; text-align: center; }
  .side nav a[aria-current="page"] { background: var(--panel); box-shadow: 0 1px 2px rgba(21,23,27,.08); }
  .side nav a .l-full { display: none; }
  .side nav a .l-short { display: inline; }
  .side .bottom { display: none; }
  .main { padding: 20px 16px 40px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2, .plan-cards, .form-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 420px) {
  .qitem { grid-template-columns: 28px minmax(0, 1fr) auto; padding: 12px 14px; }
  .qitem .acts-wide { padding-left: 40px; }
  h1 { font-size: 24px; }
  .kiosk h1 { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0ms !important; animation-duration: 0ms !important; }
}
.form-err { color: var(--red-deep); }
.phone-page main.big-state { display: grid; place-content: center; justify-items: center; }
.phone-page main > .slip { align-self: flex-start; }

/* ---------- Design pass, Dec 2026 ---------- */
.switch { min-height: 44px; }
dialog { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; background: var(--panel); color: var(--ink); width: min(420px, calc(100% - 32px)); }
dialog::backdrop { background: rgba(21, 23, 27, .45); }
.btn.xl { min-height: 48px; }

/* Party-size chips */
.chips { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.chips button {
  min-height: 52px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--panel);
  font-size: 20px; font-weight: 600; cursor: pointer; color: var(--ink);
  transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease), color var(--fast) var(--ease);
}
.chips button:hover { border-color: var(--soft); }
.chips button[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: var(--blue-ink); }
.more-size { margin-top: 12px; }

/* Door list */
.door-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-top: 12px; }
.door-head h1 { font-size: 22px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin: 20px 0 8px; }
.sec-head h2 { font-size: 15px; font-weight: 600; color: var(--soft); }
.qcard { background: var(--panel); border: 1px solid var(--line-soft); border-radius: var(--r-lg); padding: 12px 12px 12px 14px; display: grid; gap: 10px; }
.qcard.at-door { border-left: 3px solid var(--red); }
.qcard.overdue { background: var(--red-tint); }
.qtop { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.qtop .token { min-width: 28px; }
.qtop .who { font-weight: 600; font-size: 17px; overflow-wrap: anywhere; line-height: 1.3; }
.qtop .meta { font-size: 14px; color: var(--mute); white-space: nowrap; }
.party {
  display: inline-grid; place-items: center; min-width: 36px; height: 36px; padding: 0 6px;
  border: 2px solid var(--ink); border-radius: var(--r-sm); font-size: 18px; font-weight: 700; line-height: 1;
}
.qrow { display: flex; gap: 8px; }
.qrow .btn { flex: 1; }
.hold-pill { display: inline-flex; align-items: center; min-height: 28px; padding: 0 8px; border-radius: var(--r-sm); font-weight: 600; color: var(--red-deep); background: var(--red-tint); white-space: nowrap; }
.hold-pill.urgent { background: var(--red-solid); color: #FFFFFF; }
.more { position: relative; }
.more summary { list-style: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--r-sm); cursor: pointer; color: var(--soft); }
.more summary::-webkit-details-marker { display: none; }
.more summary:hover { background: var(--paper-2); }
.more[open] summary { background: var(--paper-2); }
.more .menu { position: absolute; right: 0; top: 48px; z-index: 10; min-width: 180px; display: grid; padding: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); }
.more .menu .btn { justify-content: flex-start; border: 0; text-decoration: none; }
.offline { position: sticky; top: 0; z-index: 30; margin: 0 -16px; padding: 10px 16px; background: var(--deep); color: var(--on-deep); font-size: 14px; font-weight: 500; }

/* Guest status */
.slip.wide { display: grid; width: 100%; min-width: 0; }
.slip .slip-head { width: calc(100% + 40px); margin: -14px -20px 0; padding: 10px 20px; border-radius: var(--r-md) var(--r-md) 0 0; background: var(--red-solid); color: #FFFFFF; font-weight: 600; text-align: center; }
.slip.ready::before { top: 44px; }
.slip.has-head::before { top: 56px; }
.slip.has-head .slip-no { padding-top: 18px; }
.slip .slip-timer { font-size: 44px; font-weight: 600; color: var(--red-deep); line-height: 1.1; }
.now-strip { display: flex; justify-content: space-between; gap: 12px; width: 100%; padding-top: 12px; margin-top: 8px; border-top: 1px solid var(--line-soft); font-size: 14px; color: var(--soft); }
.game-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 16px; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r-lg); }
.game-card strong { display: block; }
.leave-confirm { display: grid; gap: 8px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); }

/* Owner report */
.bars .bar { position: relative; }
.bars .bar .v { position: absolute; left: 0; right: 0; top: -20px; text-align: center; font-size: 12px; color: var(--soft); }
.bars { margin-top: 24px; }
.fab .btn { white-space: nowrap; padding: 0 12px; font-size: 16px; }
.qrow .btn { white-space: nowrap; padding: 0 10px; }
.panel-head > .small { white-space: nowrap; }
.phone-page main.big-state > .slip.wide { justify-self: stretch; }
.slip.has-head::before { top: 52px; }
.slip.has-head .slip-label { margin-top: 16px; }
.slip.has-head .slip-no { color: var(--ink); padding-top: 8px; }
.slip .hold-label { margin-top: 8px; font-size: 14px; color: var(--soft); }

/* Colour swatches, pairing code */
.swatches { border: 0; padding: 0; margin: 0; }
.swatches legend { font-size: 14px; font-weight: 500; color: var(--soft); padding: 0; margin-bottom: 6px; }
.swatches > .row { display: grid; grid-template-columns: repeat(6, 44px); gap: 10px; }
@media (max-width: 380px) { .swatches > .row { grid-template-columns: repeat(6, minmax(0, 44px)); gap: 6px; } .swatch { width: auto !important; aspect-ratio: 1; height: auto !important; min-height: 40px; } }
.swatch { position: relative; width: 44px; height: 44px; border-radius: var(--r-md); background: var(--sw); cursor: pointer; display: inline-block; }
.swatch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.swatch:has(input:checked) { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); }
.swatch:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 4px; }
.pair-code { display: grid; justify-items: start; gap: 4px; padding: 16px; border: 2px dashed var(--line); border-radius: var(--r-md); }
.pair-code .slip-no { font-size: 44px; padding: 0; letter-spacing: 0.04em; }
.pin-input { font-size: 22px; letter-spacing: 0.2em; font-variant-numeric: tabular-nums; }
#recaptcha-box { position: fixed; bottom: 0; right: 0; z-index: 60; }

/* Setup: game template picker and entrance poster */
.game-opt { flex: 1; position: relative; }
.game-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.game-opt span { display: flex; align-items: center; justify-content: center; min-height: 44px; border-radius: var(--r-sm); font-weight: 500; color: var(--soft); }
.game-opt:has(input:checked) span { background: var(--panel); color: var(--ink); }
.game-opt:has(input:focus-visible) span { outline: 2px solid var(--focus); }
.print-poster { display: none; }
@media print {
  @page { size: A4; margin: 0; }
  body { background: #FFFFFF; }
  body * { visibility: hidden; }
  .print-poster, .print-poster * { visibility: visible; }
  .print-poster {
    display: grid; align-content: center; gap: 12mm; position: fixed; inset: 0; padding: 24mm;
    background: #F3F1EA; color: #15171B; font-family: var(--font); text-align: left;
  }
  .pp-name { font-size: 22pt; font-weight: 600; }
  .pp-line { font-size: 18pt; color: #4E535B; max-width: 150mm; }
  .pp-big { font-size: 54pt; font-weight: 700; line-height: 1.05; max-width: 160mm; border-top: 2px dashed #15171B; padding-top: 10mm; }
  .pp-foot { font-size: 11pt; color: #575C64; }
}

/* =====================================================================
   Simple screens, Dec 2026: icons beside words, colour means status,
   one big action per guest, quiet motion.
   Waiting = blue, called to the door = red, seated = green, gone = grey.
   ===================================================================== */
:root {
  --green: #2F6B4F;
  --green-deep: #245540;
  --green-text: #245540;
  --lift: 0 1px 0 rgba(21, 23, 27, .04), 0 10px 24px -16px rgba(21, 23, 27, .28);
  --r-xl: 18px;
}
.ic { flex: none; }

/* Press feedback on everything tappable */
.btn, .chips button, .key, .seg button, .more summary, .swatch, .plan-card {
  transition: transform 90ms var(--ease), background-color var(--fast) var(--ease), border-color var(--fast) var(--ease), color var(--fast) var(--ease);
}
.btn:active:not([disabled]), .chips button:active, .key:active, .seg button:active { transform: scale(.97); }

/* Entry: one short rise when a screen opens */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.rise > * { animation: rise 320ms var(--ease) both; }
.rise > *:nth-child(2) { animation-delay: 40ms; }
.rise > *:nth-child(3) { animation-delay: 80ms; }
.rise > *:nth-child(4) { animation-delay: 120ms; }
.rise > *:nth-child(n+5) { animation-delay: 160ms; }
@keyframes sheet { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
dialog[open] { animation: sheet 240ms var(--ease); box-shadow: 0 24px 48px -24px rgba(21, 23, 27, .45); border: 0; border-radius: 20px; }

/* Big buttons with an icon */
.bigbtn { min-height: 56px; border-radius: 14px; font-size: 17px; font-weight: 600; gap: 10px; }
.btn.go { background: var(--blue); border-color: var(--blue); color: #FFFFFF; }
.btn.go:hover { background: var(--blue-hover); }
.btn.seat { background: var(--green); border-color: var(--green); color: #FFFFFF; }
.btn.seat:hover { background: var(--green-deep); }
.btn.soft { background: var(--paper-2); border-color: transparent; color: var(--ink); }
.btn.soft:hover { background: var(--soft-hover); }

/* Segmented switch with a sliding marker */
.seg { position: relative; display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); padding: 4px; background: var(--paper-2); border-radius: 14px; }
.seg::before {
  content: ""; position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / var(--n, 2));
  background: var(--panel); border-radius: 10px; box-shadow: var(--lift);
  transform: translateX(calc(var(--i, 0) * 100%)); transition: transform 260ms var(--ease);
}
.seg button { position: relative; z-index: 1; min-height: 48px; border: 0; background: none; border-radius: 10px; font-size: 16px; font-weight: 600; color: var(--soft); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.seg button[aria-selected="true"] { color: var(--ink); }
.seg .n { min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px; background: var(--paper); font-size: 13px; display: inline-grid; place-items: center; }

/* Door screen */
.d-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0 12px; }
.d-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.d-title h1 { font-size: 22px; }
.d-title .sub { font-size: 14px; color: var(--mute); }
.openpill { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px 0 10px; border-radius: 24px; background: var(--panel); box-shadow: var(--lift); cursor: pointer; font-weight: 600; font-size: 15px; }
.openpill input { appearance: none; width: 44px; height: 26px; border-radius: 13px; background: var(--line); position: relative; margin: 0; cursor: pointer; transition: background-color var(--fast) var(--ease); }
.openpill input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #FFFFFF; transition: transform 200ms var(--ease); }
.openpill input:checked { background: var(--green); }
.openpill input:checked::after { transform: translateX(18px); }
.sec { display: flex; align-items: center; gap: 8px; margin: 22px 2px 10px; font-size: 15px; font-weight: 600; }
.sec .dot { width: 10px; height: 10px; border-radius: 50%; }
.sec .cnt { color: var(--mute); font-weight: 500; }
.sec.called .dot { background: var(--red); }
.sec.waiting .dot { background: var(--blue); }
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.gcard { position: relative; background: var(--panel); border-radius: var(--r-xl); box-shadow: var(--lift); padding: 14px; display: grid; gap: 12px; }
.gcard::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 0 4px 4px 0; background: var(--blue); }
.gcard.called::before { background: var(--red); }
.gcard.late { background: var(--late-bg); }
.gcard.done::before { background: var(--line); }
.gcard.done.seated::before { background: var(--green); }
.g-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.tok {
  position: relative; display: grid; place-items: center; width: 56px; height: 66px; border-radius: 12px;
  background: var(--paper); border: 1px solid var(--line); font-size: 24px; font-weight: 700; line-height: 1;
}
.tok::before { content: ""; position: absolute; left: 6px; right: 6px; top: 19px; border-top: 1.5px dashed var(--line); }
.tok span { padding-top: 16px; }
.tok small { position: absolute; top: 3px; font-size: 12px; font-weight: 600; color: var(--mute); letter-spacing: 0; }
.g-name { font-size: 18px; font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.g-meta { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 14px; color: var(--soft); white-space: nowrap; }
.pbadge { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px 0 10px; border-radius: 20px; background: var(--ink); color: var(--on-ink); font-size: 19px; font-weight: 700; }
.g-acts { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: stretch; }
.g-acts.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.iconbtn { width: 56px; min-height: 56px; padding: 0; border-radius: 14px; }
.ring { position: relative; display: inline-grid; place-items: center; flex: none; }
.ring svg { position: absolute; inset: 0; }
.ring-track { fill: none; stroke: var(--red-tint); stroke-width: 6; }
.ring-fill { fill: none; stroke: var(--red); stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.ring-label { position: relative; font-size: min(14px, var(--ring-fit, 14px)); font-weight: 700; color: var(--red-deep); white-space: nowrap; }
.gcard.late .ring-fill { stroke: var(--red-solid); }
.late-note { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--red-deep); }
.empty-card { display: grid; justify-items: center; gap: 8px; padding: 32px 16px; border-radius: var(--r-xl); border: 1.5px dashed var(--line); color: var(--mute); text-align: center; }
.actionbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--paper); border-top: 1px solid var(--line-soft);
}
.actionbar .in { max-width: 728px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.offbar { display: flex; align-items: center; gap: 8px; position: sticky; top: 0; z-index: 30; margin: 0 -16px; padding: 10px 16px; background: var(--deep); color: var(--on-deep); font-size: 14px; font-weight: 500; }
.menu-sheet .btn { justify-content: flex-start; gap: 12px; }

/* Party-size chips with a people icon */
.pchips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pchips button { min-height: 64px; border: 1.5px solid var(--line); border-radius: 16px; background: var(--panel); display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 24px; font-weight: 700; color: var(--ink); cursor: pointer; }
.pchips button .ic { color: var(--mute); }
.pchips button[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #FFFFFF; }
.pchips button[aria-pressed="true"] .ic { color: #FFFFFF; }

/* Number keypad (door PIN) */
.pin-dots { display: flex; justify-content: center; gap: 14px; min-height: 20px; }
.pin-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ink); transition: background-color 120ms var(--ease), transform 120ms var(--ease); }
.pin-dots i.on { background: var(--ink); transform: scale(1.05); }
.pin-dots.shake { animation: shake 320ms var(--ease); }
@keyframes shake { 0%, 100% { transform: none; } 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.keypad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.key { min-height: 64px; border: 0; border-radius: 16px; background: var(--panel); box-shadow: var(--lift); font-size: 26px; font-weight: 600; color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.key.fn { background: transparent; box-shadow: none; color: var(--soft); font-size: 16px; }

/* Guest page */
.g-hero { display: grid; justify-items: center; gap: 4px; padding: 20px 16px 16px; background: var(--panel); border-radius: 22px; box-shadow: var(--lift); text-align: center; }
.g-hero .lbl { font-size: 14px; color: var(--mute); }
.g-hero .big { font-size: 72px; font-weight: 700; line-height: 1; letter-spacing: -0.01em; }
.g-hero .tear { width: 100%; border-top: 2px dashed var(--line); margin: 12px 0 8px; }
.qdots { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin: 8px 0 4px; }
.qdots i { width: 14px; height: 14px; border-radius: 50%; background: var(--line); }
.qdots i.you { width: 22px; height: 22px; background: var(--blue); box-shadow: 0 0 0 4px var(--blue-tint); }
.qdots .more { font-size: 13px; color: var(--mute); }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fact { display: grid; gap: 2px; padding: 14px 16px; background: var(--panel); border-radius: 16px; box-shadow: var(--lift); }
.fact .k { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--mute); }
.fact .v { font-size: 22px; font-weight: 700; }
.g-ready { display: grid; justify-items: center; gap: 10px; padding: 0 0 20px; background: var(--panel); border-radius: 22px; box-shadow: var(--lift); overflow: hidden; text-align: center; }
.g-ready .band { width: 100%; padding: 14px; background: var(--red-solid); color: #FFFFFF; font-size: 20px; font-weight: 700; }
.g-ready .ring-label { font-size: min(22px, var(--ring-fit, 22px)); }
.play-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px; background: var(--deep); color: var(--on-deep); border-radius: 18px; }
.play-card .pi { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(243, 241, 234, .12); }
.play-card small { display: block; color: #C9CBD0; font-size: 13px; }
.play-card .btn { background: var(--on-deep); color: var(--deep); border-color: var(--on-deep); min-height: 48px; }

/* Sign-in choice cards */
.choice { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; padding: 18px; border-radius: 18px; background: var(--panel); box-shadow: var(--lift); text-decoration: none; color: var(--ink); border: 0; width: 100%; text-align: left; cursor: pointer; font: inherit; }
.choice .ci { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--blue-tint); color: var(--blue); }
.choice strong { display: block; font-size: 17px; }
.choice span.s { font-size: 14px; color: var(--soft); }

@media (prefers-reduced-motion: reduce) {
  .rise > *, dialog[open], .pin-dots.shake { animation: none !important; }
  .ring-fill, .seg::before { transition: none !important; }
}

/* Tables and seats */
.spots { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.spots.seats { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
.spots.small { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
.spots.small.seats { grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); }
.spot {
  position: relative; display: grid; align-content: start; justify-items: start; gap: 2px; min-height: 92px; padding: 10px 12px;
  border: 1.5px solid var(--line); border-radius: 16px; background: var(--panel); color: var(--ink); text-align: left; cursor: pointer;
  transition: transform 90ms var(--ease), background-color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.spots.seats .spot, .spots.small .spot { min-height: 64px; justify-items: center; align-content: center; text-align: center; padding: 8px; }
.spot:active:not([disabled]) { transform: scale(.97); }
.spot[disabled] { cursor: default; }
.spot .sl { font-size: 20px; font-weight: 700; }
.spot .ss { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--soft); }
.spot .sn { font-size: 13px; color: var(--soft); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spots.seats .spot .sn { display: none; }
.spot .st { font-size: 12px; color: var(--green-text); }
.spot.free { border-color: var(--line); }
.spot.held { background: var(--red-tint); border-color: var(--red); }
.spot.held .sn { color: var(--red-deep); font-weight: 600; }
.spot.busy { background: var(--good-tint); border-color: var(--green); }
.spot.busy .sn { color: var(--green-text); font-weight: 600; }
.spot[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #FFFFFF; }
.spot[aria-pressed="true"] .ss { color: #E6E9F7; }
.legend { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--soft); }
.legend .lg { width: 12px; height: 12px; border-radius: 4px; border: 1.5px solid var(--line); margin-left: 6px; }
.legend .lg.held { background: var(--red-tint); border-color: var(--red); }
.legend .lg.busy { background: var(--good-tint); border-color: var(--green); }
.pick-more summary { list-style: none; cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 600; color: var(--blue); }
.pick-more summary::-webkit-details-marker { display: none; }
.pick-more[open] summary { margin-bottom: 8px; }
.menu-sheet { max-height: calc(100dvh - 32px); overflow-y: auto; }
.table-chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 12px; background: var(--paper-2); font-size: 17px; }
.table-chip strong { font-size: 22px; }

/* Settings: sections, tap-to-pick chips, steppers, table rows, save bar */
.set-sec { display: grid; gap: 16px; }
.set-sec h2 { display: flex; align-items: center; gap: 10px; font-size: 18px; }
.set-sec h2 .ic { color: var(--blue); }
.pick-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pick { position: relative; }
.pick input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.pick span { display: inline-flex; align-items: center; justify-content: center; min-width: 64px; min-height: 48px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--panel); font-weight: 600; font-size: 15px; transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease), color var(--fast) var(--ease), transform 90ms var(--ease); }
.pick:active span { transform: scale(.97); }
.pick input:checked + span { background: var(--blue); border-color: var(--blue); color: #FFFFFF; }
.pick input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.row-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; font-weight: 500; cursor: pointer; }
.stepper-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 500; }
.stepper.big button { width: 56px; height: 56px; }
.stepper output { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 52px; font-size: 18px; font-weight: 700; }
.stepper button { width: 44px; height: 48px; }
.quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px; margin-bottom: 12px; border-radius: 14px; background: var(--paper); font-size: 14px; font-weight: 500; }
.table-rows { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.table-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
.table-row .input { min-height: 48px; font-weight: 600; }
.msg-preview { margin-top: -8px; padding: 12px 14px; border-radius: 4px 14px 14px 14px; background: var(--preview-bg); color: var(--ink); font-size: 14px; max-width: 46ch; }
.save-bar { position: sticky; bottom: 12px; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 12px 12px 18px; border-radius: 18px; background: var(--panel); box-shadow: 0 12px 32px -16px rgba(21, 23, 27, .35); }
@media (max-width: 420px) {
  .table-row { grid-template-columns: minmax(0, 1fr) auto auto; }
  .table-row .stepper button { width: 40px; }
  .save-bar { flex-direction: column; align-items: stretch; }
}

/* Even-width digits only where numbers line up; plain text keeps normal commas and full stops. */
/* Equal-width digits only where numbers change in place; text with commas keeps normal spacing. */
.tok, .pbadge, .ring-label, .g-hero .big, .key, .timer, .slip-no, .spot .sl, .seg .n, .stepper output, .pchips button, .pin-input, .table .token, .hp-tok, .step-tok, .tnum { font-variant-numeric: tabular-nums; }
.menu-sheet .bigbtn { width: 100%; }
#pick .bigbtn { justify-content: flex-start; padding: 0 18px; }
.actionbar .bigbtn { white-space: nowrap; padding: 0 12px; }

/* Restaurant name links in the team table: a full-height tap area */
.table td a.row-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--ink); text-decoration: none; }
.table td a.row-link:hover { color: var(--blue); text-decoration: underline; }

.side nav .l-short { display: none; }
.save-bar button[disabled] { opacity: 1; background: var(--paper-2); border-color: var(--paper-2); color: var(--mute); }

/* ---------- Control room ---------- */
.sec-h { font-size: 17px; font-weight: 600; color: var(--soft); }
.needs { list-style: none; margin: 0; padding: 0; display: grid; }
.needs li { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr); gap: 4px 16px; align-items: center; padding: 4px 0; border-top: 1px solid var(--line-soft); }
.needs li:first-child { border-top: 0; }
.adm-list { display: grid; gap: 8px; }
.adm-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr) 24px; gap: 16px; align-items: center; min-height: 72px; padding: 14px 18px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line-soft); color: var(--ink); text-decoration: none; transition: border-color var(--fast) var(--ease); }
.adm-row:hover { border-color: var(--ink); }
.adm-row > span { display: grid; gap: 2px; min-width: 0; font-size: 14px; }
.adm-name strong { font-size: 16px; }
.adm-bill .badge { justify-self: start; }
.adm-go { color: var(--mute); transform: rotate(180deg); }
.dotlabel { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--mute); }
.dotlabel::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.dotlabel.on { color: var(--good); }
.dotlabel.on::before { background: var(--good); }
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; }
.plain-list li { min-height: 52px; border-top: 1px solid var(--line-soft); gap: 12px; }
.plain-list li:first-child { border-top: 0; }
.log { list-style: none; margin: 0; padding: 0; display: grid; }
.log li { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--line-soft); font-size: 15px; }
.log li:first-child { border-top: 0; }
.btn.danger { background: var(--red-solid); border-color: var(--red-solid); color: #fff; }
.btn.danger:hover { background: var(--red-deep); }
.btn.danger-quiet { color: var(--red-deep); border-color: var(--line); background: var(--panel); justify-self: start; }
.btn.danger-quiet:hover { border-color: var(--red-deep); }
@media (max-width: 900px) {
  .adm-row { grid-template-columns: minmax(0, 1fr) 24px; gap: 6px 12px; }
  .adm-row .adm-name { grid-column: 1; }
  .adm-row .adm-live, .adm-row .adm-bill { grid-column: 1; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
  .adm-row .adm-go { grid-column: 2; grid-row: 1 / span 3; }
  .needs li { grid-template-columns: minmax(0, 1fr); }
  .log li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
@media (max-width: 560px) { .hide-sm { display: none; } }

/* Demo role picker: restaurant name gets the full line, role buttons below it */
.choice.who-pick { grid-template-columns: auto minmax(0, 1fr) !important; }
.choice.who-pick .who-btns { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* Regulars: offer composer and guest list */
.pick-btn { min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font-weight: 500; cursor: pointer; }
.pick-btn:hover { border-color: var(--ink); }
.pick-btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.pick-btn[aria-pressed="true"] .muted { color: var(--paper); opacity: .7; }
.pick-row { display: flex; flex-wrap: wrap; gap: 8px; }
.reg-list { list-style: none; margin: 0; padding: 0; display: grid; }
.reg-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; min-height: 60px; border-top: 1px solid var(--line-soft); }
.reg-list li:first-child { border-top: 0; }
.reg-who { display: grid; min-width: 0; }
.reg-list .btn.sm { min-width: 44px; }

/* Guest's own link as a QR after joining */
.qr-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; padding: 14px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line-soft); }
.qr-card .qr-svg { display: block; width: 132px; height: 132px; border-radius: 8px; }
@media (max-width: 360px) { .qr-card { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; } }

/* Back arrow on inner screens (added by the router when there is a screen to go back to) */
.nav-back { flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; margin-right: 4px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer; animation: fade-in 200ms var(--ease) both; transition: transform var(--fast) var(--ease), border-color var(--fast) var(--ease); }
.nav-back:hover { border-color: var(--ink); }
.nav-back:active { transform: scale(.94); }
.brandbar > .nav-back + * { margin-right: auto; }
.side .place:has(> .nav-back) { grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; align-items: center; }
.side .place > .nav-back { grid-row: span 3; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .nav-back { animation: none; } }

/* Late guest: the note wraps under the name instead of running under the timer */
.g-meta:has(.late-note) { white-space: normal; }
.late-note { display: block; line-height: 1.35; }
.gcard.late .ring-label { font-size: min(12px, var(--ring-fit, 12px)); letter-spacing: -0.01em; }
@media (max-width: 359px) { .g-acts.two .btn { white-space: nowrap; font-size: 15px; padding-inline: 8px; gap: 6px; } }

/* ---------- Dark mode ----------
   Follows the phone unless someone picks Light or Dark (data-theme on <html>).
   Only colour settings change here; sizes and layout are shared with light. */
:root[data-theme="light"] { color-scheme: only light; }
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #121316;
  --paper-2: #1B1D21;
  --panel: #212328;
  --ink: #EEECE6;
  --soft: #BCBFC5;
  --mute: #9A9EA6;
  --line: #383B42;
  --line-soft: #2B2E34;
  --blue: #4A5DDF;
  --blue-ink: #FFFFFF;
  --blue-tint: #232A4A;
  --blue-text: #A3AFFF;
  --blue-hover: #5A6CF0;
  --red: #F0532F;
  --red-deep: #FF8E72;
  --red-solid: #D93B1A;
  --red-tint: #3A231E;
  --good: #82CFA4;
  --good-tint: #1B3127;
  --green: #2F7A55;
  --green-deep: #286A4A;
  --green-text: #82CFA4;
  --focus: #A3AFFF;
  --soft-hover: #2E3137;
  --late-bg: #2A1C18;
  --wa-bg: #173528;
  --wa-ink: #C8EBD6;
  --preview-bg: #173528;
  --deep: #2A2D34;
  --on-deep: #EEECE6;
  --on-ink: #121316;
  --on-red: #15171B;
  --shine: rgba(255,255,255,.04);
  --lift: 0 0 0 1px rgba(255,255,255,.05), 0 10px 24px -16px rgba(0,0,0,.7);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  color-scheme: dark;
  --paper: #121316;
  --paper-2: #1B1D21;
  --panel: #212328;
  --ink: #EEECE6;
  --soft: #BCBFC5;
  --mute: #9A9EA6;
  --line: #383B42;
  --line-soft: #2B2E34;
  --blue: #4A5DDF;
  --blue-ink: #FFFFFF;
  --blue-tint: #232A4A;
  --blue-text: #A3AFFF;
  --blue-hover: #5A6CF0;
  --red: #F0532F;
  --red-deep: #FF8E72;
  --red-solid: #D93B1A;
  --red-tint: #3A231E;
  --good: #82CFA4;
  --good-tint: #1B3127;
  --green: #2F7A55;
  --green-deep: #286A4A;
  --green-text: #82CFA4;
  --focus: #A3AFFF;
  --soft-hover: #2E3137;
  --late-bg: #2A1C18;
  --wa-bg: #173528;
  --wa-ink: #C8EBD6;
  --preview-bg: #173528;
  --deep: #2A2D34;
  --on-deep: #EEECE6;
  --on-ink: #121316;
  --on-red: #15171B;
  --shine: rgba(255,255,255,.04);
  --lift: 0 0 0 1px rgba(255,255,255,.05), 0 10px 24px -16px rgba(0,0,0,.7);
  }
}
:root[data-theme="dark"] dialog::backdrop { background: rgba(0, 0, 0, .6); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) dialog::backdrop { background: rgba(0, 0, 0, .6); } }

/* Theme switch */
.theme-btn { flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer; transition: border-color var(--fast) var(--ease), transform var(--fast) var(--ease); }
.theme-btn:hover { border-color: var(--ink); }
.theme-btn:active { transform: scale(.94); }
.theme-opts { display: grid; gap: 8px; }
.theme-opts label { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 56px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; font-weight: 600; }
.theme-opts label:has(input:checked) { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.theme-opts input { accent-color: var(--blue); width: 20px; height: 20px; margin: 0; }
.top-tools { display: inline-flex; align-items: center; gap: 8px; }

/* On phones the owner and team menus show the theme switch in the top bar */
.theme-sm { display: none; }
@media (max-width: 900px) {
  .side .place { position: relative; padding-right: 64px; }
  .theme-sm { display: block; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); }
}
/* Dark: give every colour swatch an edge so the dark one still shows */
:root[data-theme="dark"] .swatch { box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .swatch { box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); } }
:root[data-theme="dark"] .swatch:has(input:checked), :root:not([data-theme="light"]) .swatch:has(input:checked) { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); }

/* ---------- Alignment fixes across screen sizes ---------- */
/* Done cards on narrow phones: the time wraps instead of running under the button */
.gcard.done .g-meta { white-space: normal; flex-wrap: wrap; row-gap: 2px; }
/* Sheet headings: a little room between the question and the line under it */
.menu-sheet h2 + .soft, .menu-sheet h2 + p, .menu-sheet h2 + .small { margin-top: 4px; }
/* Tables fit phone screens: tighter cells, smaller text */
@media (max-width: 560px) {
  .table { font-size: 14px; }
  .table th { padding: 0 6px 8px; }
  .table td { padding: 10px 6px; }
  .table th:first-child, .table td:first-child { padding-left: 0; }
  .table th:last-child, .table td:last-child { padding-right: 0; }
  .table .badge { padding-inline: 8px; }
}
.table td.wrap { white-space: normal; overflow-wrap: anywhere; min-width: 72px; }
.show-xs { display: none; }
@media (max-width: 400px) {
  .hide-xs { display: none; }
  .show-xs { display: inline-flex; vertical-align: middle; }
  .table .token, .table td.token { min-width: 0; width: 28px; }
  .table td.wrap { min-width: 56px; }
  .table .badge { font-size: 12px; padding: 2px 7px; }
}

/* Live home page: the "what each person gets" cards are information, not links. */
.hub-tile.still { cursor: default; }
.hub-tile.still:hover { border-color: var(--line-soft); }
.hub-tile.still:active { transform: none; }

/* Live home: the short two-phone demo. */
.try-note { margin-top: -8px; }
.try-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.try-col { display: grid; gap: 8px; min-width: 0; }
.try-label { font-size: 13px; font-weight: 600; color: var(--mute); }
.try-phone { display: grid; gap: 10px; align-content: start; min-height: 380px; padding: 16px; border-radius: 24px; background: var(--paper-2); border: 1px solid var(--line); }
.try-form { display: grid; gap: 16px; }
.try-h { font-size: 16px; }
.try-size { display: flex; flex-wrap: wrap; gap: 8px; }
.try-n { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.try-n[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.try-go { width: 100%; }
.try-state { display: grid; justify-items: center; gap: 8px; padding: 24px 8px 8px; text-align: center; }
.try-state strong { font-size: 18px; }
.try-tok { min-width: 72px; height: 72px; padding: 0 12px; display: grid; place-items: center; border-radius: 18px; background: var(--blue-tint); color: var(--blue-text); font-size: 32px; font-weight: 700; }
.try-state.ready .ring-label { font-size: min(20px, var(--ring-fit, 20px)); }
.try-you { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 6px; background: var(--blue-tint); color: var(--blue-text); font-size: 11px; font-weight: 600; vertical-align: 2px; }
.try-ring { display: grid; place-items: center; min-width: 40px; }
button.hp-btn { border: 0; font-family: inherit; line-height: 1.3; cursor: pointer; }
.hp-btn.quiet { background: var(--panel); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.try-empty { margin: 0; padding: 14px; border-radius: 14px; border: 1px dashed var(--line); color: var(--mute); font-size: 14px; text-align: center; }
.try-foot { grid-column: 1 / -1; display: flex; justify-content: center; }
@media (max-width: 760px) {
  .try-pair { grid-template-columns: minmax(0, 1fr); }
  .try-phone { min-height: 0; }
}

/* Live home: pricing. */
.price-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
.price-card { display: grid; grid-template-rows: auto auto auto auto 1fr auto; gap: 12px; align-content: start; padding: 20px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line-soft); min-width: 0; }
.price-card.lead { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.price-card:not(.lead) { grid-template-rows: auto auto auto 1fr auto; }
.price-tag { justify-self: start; padding: 2px 8px; border-radius: 999px; background: var(--blue-tint); color: var(--blue-text); font-size: 12px; font-weight: 600; }
.price-card h3, .price-addon h3 { margin: 0; font-size: 18px; }
.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 0; }
.price strong { font-size: 32px; font-weight: 700; line-height: 1.1; }
.price span { color: var(--mute); }
.price-card .small { margin: 0; }
.price-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; align-content: start; font-size: 14px; }
.price-list li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: start; }
.price-list .ic { margin-top: 1px; color: var(--good); }
.price-card .btn { width: 100%; }
.price-addon { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 24px; align-items: end; padding: 20px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line-soft); }
@media (max-width: 900px) {
  .price-grid, .price-addon { grid-template-columns: minmax(0, 1fr); }
  .price-addon .btn { width: 100%; }
}
.price-addon-text { display: grid; gap: 12px; min-width: 0; }
