:root {
  --ink: #f6f0e5;
  --muted: #a9a397;
  --page: #171511;
  --panel: #211f1a;
  --panel-2: #29261f;
  --line: #3a362d;
  --butter: #f1c75b;
  --sage: #98b89a;
  --coral: #f17c5b;
  --blue: #8eb8c7;
}

* { box-sizing: border-box; }
html { background: var(--page); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif; -webkit-text-size-adjust: 100%; touch-action: pan-x pan-y; }
body { margin: 0; min-height: 100vh; background: #171817; touch-action: pan-x pan-y; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
body.sheet-open { overflow: hidden; overscroll-behavior: none; }
input, textarea { user-select: text; -webkit-user-select: text; -webkit-touch-callout: default; }
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.topbar {
  min-height: 92px; padding: 20px 30px; display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; border-bottom: 1px solid var(--line); background: rgba(23, 21, 17, .94);
  position: sticky; top: 0; z-index: 10; backdrop-filter: blur(18px);
}
.eyebrow { margin: 0 0 3px; color: var(--butter); font-size: 11px; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; }
h1, h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-weight: 500; }
h1 { font-size: 29px; line-height: .9; }
h2 { font-size: 25px; }
nav { display: flex; max-width: 100%; gap: 4px; overflow-x: auto; background: #0f0e0b; padding: 5px; border: 1px solid var(--line); border-radius: 14px; scrollbar-width: none; }
nav::-webkit-scrollbar { display: none; }
.view-tab { flex: 0 0 auto; color: var(--muted); border: 0; background: none; padding: 10px 18px; border-radius: 10px; font-weight: 750; }
.view-tab.active { color: #171511; background: var(--butter); }
.mode-pill { justify-self: end; color: #c9c2b5; font-size: 13px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 999px; background: transparent; }
.mode-pill strong { font-size: inherit; }
.mode-pill span, .live-dot { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: var(--sage); box-shadow: 0 0 12px var(--sage); }
.wake-pill strong { font-size: inherit; }
.wake-pill:not(.active) span { background: var(--butter); box-shadow: 0 0 12px rgba(241,199,91,.5); }
.wake-pill.active { color: #d9edd9; border-color: #45634c; background: #203027; }
.header-actions { justify-self: end; display: flex; align-items: center; gap: 8px; }
.hosting-pill { color: #c9c2b5; font-size: 13px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 999px; background: transparent; }
.hosting-pill span { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: #756f65; }
.hosting-pill.active { color: #d9edd9; border-color: #45634c; background: #203027; }
.hosting-pill.active span { background: var(--sage); box-shadow: 0 0 12px var(--sage); }
.hosting-pill.active.locked { color: #f0dca2; border-color: #6d5d32; background: #30291b; }
.hosting-pill.active.locked span { background: var(--butter); box-shadow: 0 0 12px rgba(241,199,91,.55); }

main { padding: 18px 24px 30px; }
.summary { display: grid; grid-template-columns: repeat(2, minmax(120px, 180px)) 1fr; margin-bottom: 18px; }
.summary > div, .summary-action { display: flex; gap: 9px; align-items: baseline; padding: 8px 18px; border: 0; border-right: 1px solid var(--line); color: var(--ink); background: transparent; }
.summary > :first-child { padding-left: 10px; }
.summary-action { cursor: pointer; border-radius: 10px 10px 0 0; }
.summary-action.active { background: #2a261d; box-shadow: inset 0 -2px var(--butter); }
.summary strong { font-size: 23px; }
.summary span { color: var(--muted); font-size: 13px; font-weight: 700; }
.summary .clock { border: 0; justify-content: flex-end; }

.board { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.75fr) minmax(0, .7fr); gap: 14px; align-items: start; }
.lane { min-width: 0; min-height: calc(100vh - 170px); padding: 16px; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: #20211f; }
.standing-lane { background: #251d1d; border-color: #553232; }
.intake-lane { background: #202227; border-color: #3c475a; }
.seated-lane { background: #1d2621; border-color: #355541; }
.standing-lane .party-card { background: linear-gradient(145deg, #302424, #281f1f); border-color: #513434; }
.intake-lane .party-card { padding: 15px; background: linear-gradient(145deg, #292d35, #23262d); border-color: #414b5d; }
.seated-lane .party-card { background: linear-gradient(145deg, #253029, #202823); border-color: #3b5543; }
.lane-heading { min-height: 55px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.gesture-hint { max-width: 120px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.35; text-align: right; }
.auto-note { max-width: 130px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.35; text-align: right; }
.lane-heading-actions { display: grid; justify-items: end; gap: 7px; }
.manual-add-button { padding: 7px 9px; color: var(--blue); border: 1px solid #4a5b68; border-radius: 9px; background: #252b31; font-size: 10px; font-weight: 850; }
.add-button { width: 39px; height: 39px; border: 1px solid #756638; border-radius: 12px; color: var(--butter); background: #302b1d; font-size: 24px; }
.cards { display: grid; gap: 10px; }
.seated-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.party-card { min-width: 0; max-width: 100%; overflow: hidden; border: 1px solid #454036; border-radius: 16px; background: linear-gradient(145deg, #2b2821, #24211c); box-shadow: 0 8px 24px rgba(0,0,0,.16); transition: border-color .12s ease, box-shadow .12s ease, transform .12s ease; }
.party-card.long-press-active { border-color: var(--butter); box-shadow: 0 0 0 2px rgba(241,199,91,.32), 0 8px 24px rgba(0,0,0,.16); }
.standing-card { padding: 15px; }
.seated-card, .seated-card * { touch-action: pan-x pan-y; }
.seated-card { padding: 15px; min-height: 190px; cursor: pointer; user-select: none; -webkit-user-select: none; }
.seated-card:active { transform: scale(.985); border-color: var(--butter); }
.qr-card { border-color: #4d6b72; }
.card-top, .route-row, .party-meta, .ticket-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.marker { min-width: 0; overflow-wrap: anywhere; font-family: Georgia, "Times New Roman", serif; font-size: 24px; }
.timer { min-width: 43px; color: #b8d0b8; background: #293429; border: 1px solid #405242; border-radius: 999px; padding: 6px 8px; text-align: center; font-size: 12px; font-weight: 850; }
.timer.amber { color: #f4cf69; background: #3a311c; border-color: #665727; }
.route-row { justify-content: flex-start; margin: 15px 0; }
.route { padding: 5px 7px; border-radius: 7px; font-size: 10px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.route.food { color: #bcd2bc; background: #283329; }
.route.drinks { color: #bdd6df; background: #26333a; }
.tickets { margin-left: auto; color: var(--muted); font-size: 11px; }
.party-meta { align-items: flex-start; min-height: 36px; font-size: 12px; }
.party-meta span { color: var(--muted); text-align: right; }
.qr-customer { margin: -6px 0 13px; color: var(--blue); font-size: 12px; font-weight: 800; }
.seat-button, .match-card button, .confirm-seat { width: 100%; margin-top: 12px; padding: 11px; border: 0; border-radius: 10px; color: #171511; background: var(--butter); font-weight: 850; }
.intake-actions { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 12px; }
.intake-actions button { padding: 11px 8px; border-radius: 10px; font-weight: 850; }
.check-in-button { color: var(--ink); border: 1px solid #59657a; background: #343b48; }
.seat-now-button { color: #171511; border: 1px solid var(--butter); background: var(--butter); }
.table-location { display: flex; align-items: end; justify-content: space-between; margin: 18px 0 13px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.table-location span { color: var(--muted); font-size: 12px; font-weight: 750; }
.table-location strong { font-size: 35px; line-height: .9; }
.progress { display: grid; gap: 6px; font-size: 11px; color: #f2c48a; }
.progress span::before { content: "•"; margin-right: 6px; }
.progress .done { color: #a9c9aa; }
.ticket-line { margin-top: 16px; color: var(--muted); font-size: 11px; }
.ticket-line strong { color: var(--ink); }
.alert { color: var(--coral); font-weight: 900; text-transform: uppercase; }
.barista-urgent { display: none; margin: 11px 0 2px; padding: 9px 10px; color: #fff3ee; background: #a52f25; border: 1px solid #ef725f; border-radius: 9px; font-size: 11px; font-weight: 950; letter-spacing: .08em; text-align: center; text-transform: uppercase; }
.drinks-needed-timer { font: inherit; font-variant-numeric: tabular-nums; letter-spacing: .02em; white-space: nowrap; }
body[data-view="barista"] .food-before-drinks,
body[data-view="bar"] .food-before-drinks { border-color: #ef5b4c; box-shadow: 0 0 0 2px rgba(239,91,76,.28), 0 0 24px rgba(239,91,76,.28); animation: urgent-pulse 1.35s ease-in-out infinite; }
body[data-view="barista"] .food-before-drinks .barista-urgent,
body[data-view="bar"] .food-before-drinks .barista-urgent { display: block; }
@keyframes urgent-pulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(239,91,76,.22), 0 0 16px rgba(239,91,76,.18); }
  50% { box-shadow: 0 0 0 3px rgba(239,91,76,.55), 0 0 30px rgba(239,91,76,.42); }
}
@media (prefers-reduced-motion: reduce) {
  body[data-view="barista"] .food-before-drinks,
  body[data-view="bar"] .food-before-drinks { animation: none; }
}
.qr { color: var(--blue); font-weight: 850; }
.count-badge { min-width: 30px; padding: 6px 8px; border-radius: 999px; color: #171511; background: var(--coral); text-align: center; font-weight: 900; }
.match-card { padding: 13px; margin-bottom: 9px; border: 1px solid #504137; border-radius: 13px; background: #2b241f; }
.match-card p { margin: 0 0 5px; color: var(--muted); font-size: 11px; }
.match-card strong { font-size: 13px; }
.match-card .match-marker { display: block; margin: 5px 0; font-family: Georgia, "Times New Roman", serif; font-size: 23px; font-weight: 500; }
.match-card .qr-customer { margin: 4px 0 9px; }
.match-card .route-row { margin: 9px 0; }
.match-card .match-items { margin-bottom: 10px; }
.match-card button { color: var(--ink); background: #45372f; border: 1px solid #6a5041; }
.match-action { display: grid; gap: 5px; margin: 11px 0 13px; padding: 11px; border: 1px solid #735d31; border-radius: 10px; background: #332b1e; }
.match-action > span { color: var(--butter); font-size: 9px; font-weight: 950; letter-spacing: .12em; text-transform: uppercase; }
.match-card .match-action > strong, .match-action > strong { color: var(--ink); font-size: 12px; line-height: 1.4; }
.match-action > small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.system-note { display: flex; align-items: center; margin-top: 20px; padding-top: 15px; border-top: 1px solid var(--line); }
.system-note p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.system-note strong { color: var(--ink); }

body[data-view="host"][data-host-panel="standing"] .board { grid-template-columns: minmax(230px, 300px) minmax(0, 1fr) minmax(210px, 280px); }
body[data-view="host"][data-host-panel="standing"][data-has-matches="false"] .board { grid-template-columns: minmax(230px, 300px) minmax(0, 1fr); }
body[data-has-matches="false"] .match-lane { display: none; }
body[data-view="host"][data-host-panel="standing"] .standing-lane { display: block; }
body[data-view="host"][data-host-panel="standing"] .standing-lane .cards { grid-template-columns: repeat(auto-fit, minmax(225px, 1fr)); }
body[data-view="host"][data-host-panel="standing"] .seated-lane { display: none; }
body[data-view="host"][data-host-panel="seated"] .board { grid-template-columns: 1fr; }
body[data-view="host"][data-host-panel="seated"] .standing-lane,
body[data-view="host"][data-host-panel="seated"] .intake-lane,
body[data-view="host"][data-host-panel="seated"] .match-lane { display: none; }
body[data-view="host"][data-host-panel="seated"] .seated-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
body[data-view="runner"] .match-lane,
body[data-view="expo"] .match-lane,
body[data-view="barista"] .match-lane,
body[data-view="bar"] .match-lane,
body[data-view="line"] .match-lane,
body[data-view="runner"] .intake-lane,
body[data-view="expo"] .intake-lane,
body[data-view="barista"] .intake-lane,
body[data-view="bar"] .intake-lane,
body[data-view="line"] .intake-lane { display: none; }
body[data-view="runner"] .board,
body[data-view="expo"] .board,
body[data-view="barista"] .board,
body[data-view="bar"] .board,
body[data-view="line"] .board { grid-template-columns: 1fr; gap: 18px; }
body[data-view="runner"] .seated-lane,
body[data-view="expo"] .seated-lane,
body[data-view="barista"] .seated-lane,
body[data-view="bar"] .seated-lane,
body[data-view="line"] .seated-lane { order: 1; min-height: auto; }
body[data-view="runner"] .standing-lane,
body[data-view="expo"] .standing-lane,
body[data-view="barista"] .standing-lane,
body[data-view="bar"] .standing-lane,
body[data-view="line"] .standing-lane { display: block; order: 2; min-height: auto; }
body[data-view="runner"] .standing-lane .cards,
body[data-view="barista"] .standing-lane .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
body[data-view="runner"] .seated-grid,
body[data-view="barista"] .seated-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
body[data-view="line"] .seated-grid,
body[data-view="line"] .standing-lane .cards { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
body[data-view="expo"] .seated-grid,
body[data-view="expo"] .standing-lane .cards { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
body[data-view="bar"] .seated-grid,
body[data-view="bar"] .standing-lane .cards { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
body:not([data-view="host"]) .summary { display: none; }
body:not([data-view="host"]) .seat-button { display: none; }
body[data-view="runner"] [data-route="drinks"],
body[data-view="barista"] [data-route="food"],
[data-role-hidden="true"] { display: none !important; }
body[data-view="runner"] .progress,
body[data-view="barista"] .progress { display: none; }
.companion-status { display: none; margin-top: 9px; padding: 7px 9px; border-radius: 8px; font-size: 11px; font-weight: 850; }
body[data-view="runner"] .companion-status { display: block; }
body[data-view="runner"] .party-card .marker { font-size: 34px; line-height: 1; }
body[data-view="barista"] .party-card .marker { font-size: 34px; line-height: 1; }
body[data-view="runner"] .guest-count,
body[data-view="barista"] .guest-count { display: none; }
body[data-view="host"] .standing-card .party-meta {
  min-height: 44px;
  font-size: 15px;
  line-height: 1.3;
}
body[data-view="host"] .standing-card .guest-count { font-size: 16px; }
body[data-view="host"] .standing-card .seating-preference {
  max-width: 55%;
  font-size: 15px;
}
body[data-view="host"] .seated-card .guest-count {
  font-size: 13px;
  font-weight: 800;
}
body[data-view="runner"] .table-location span,
body[data-view="barista"] .table-location span {
  color: #d8d1c4;
  font-size: 17px;
  font-weight: 850;
}
body[data-view="runner"] .ticket-line .ticket-count-label,
body[data-view="barista"] .ticket-line .ticket-count-label {
  color: var(--butter);
  font-size: 17px;
  font-weight: 900;
}
.companion-status.pending { color: #aaaead; background: #242827; border: 1px solid #3b4140; font-weight: 650; }
.companion-status.delivered { color: #b9d9ba; background: #273429; border: 1px solid #405443; }
body[data-view="line"] #hosting-status,
body[data-view="line"] #sound-status,
body[data-view="line"] .gesture-hint { display: none; }
.line-card { display: grid; gap: 12px; min-height: 0; padding: 20px; }
.line-status { color: var(--muted); font-size: 12px; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.line-marker { min-width: 0; overflow-wrap: anywhere; font-family: Georgia, "Times New Roman", serif; font-size: clamp(44px, 5.2vw, 76px); font-weight: 500; line-height: .92; }
.line-metrics { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 18px; margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--line); }
.line-metrics strong { color: var(--ink); font-size: clamp(30px, 3.4vw, 50px); line-height: .95; }
.line-time.amber { color: var(--butter); }
body[data-view="expo"] .header-actions,
body[data-view="expo"] .gesture-hint { display: none; }
.expo-card { display: grid; position: relative; gap: 12px; min-height: 0; padding: 20px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
/* Prevent Android text selection and browser double-tap zoom on bump targets. */
.expo-card, .expo-card * { touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.expo-card.expo-tap-armed {
  border: 2px solid var(--butter);
  box-shadow: 0 0 0 3px rgba(241, 199, 91, .48), 0 0 28px rgba(241, 199, 91, .23);
}
.expo-card.expo-tap-armed::after {
  content: "✓  1 TAP — TAP AGAIN";
  position: absolute; top: 8px; right: 8px; z-index: 1;
  padding: 7px 10px; border-radius: 8px; background: var(--butter);
  color: #171511; font-size: 12px; font-weight: 950; letter-spacing: .02em;
  pointer-events: none;
}
.expo-card.expo-bumping {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(152, 184, 154, .48);
}
.expo-card.expo-bumping::after {
  content: "BUMPING…";
  position: absolute; inset: 0; z-index: 2; display: grid; place-items: center;
  color: #e5f3e7; background: rgba(25, 52, 35, .95);
  font-size: clamp(24px, 4vw, 44px); font-weight: 950; letter-spacing: .06em;
  pointer-events: none;
}
.expo-status { color: var(--muted); font-size: 12px; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.expo-marker { min-width: 0; overflow-wrap: anywhere; font-family: Georgia, "Times New Roman", serif; font-size: clamp(44px, 5.2vw, 76px); font-weight: 500; line-height: .92; }
.expo-metrics { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 18px; margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--line); }
.expo-metrics strong { color: var(--ink); font-size: clamp(30px, 3.4vw, 50px); line-height: .95; }
.expo-time.amber { color: var(--butter); }
body[data-view="bar"] .gesture-hint { display: none; }
.bar-card { position: relative; display: grid; gap: 12px; min-height: 0; padding: 20px; transition: opacity .24s ease, transform .24s ease, border-color .18s ease, box-shadow .18s ease; }
.bar-card > * { transition: opacity .16s ease, transform .16s ease; }
.bar-card::after { content: "✓  BUMPED"; position: absolute; inset: 0; display: grid; place-items: center; color: #effaf0; background: linear-gradient(145deg, #31543a, #203c29); font-size: clamp(28px, 4vw, 48px); font-weight: 950; letter-spacing: .08em; opacity: 0; transform: scale(.92); transition: opacity .18s ease, transform .18s ease; pointer-events: none; }
.bar-card.bump-confirmed { border-color: #78b482; box-shadow: 0 0 0 2px rgba(120,180,130,.38), 0 0 28px rgba(120,180,130,.26); }
.bar-card.bump-confirmed > * { opacity: 0; transform: scale(.96); }
.bar-card.bump-confirmed::after { opacity: 1; transform: scale(1); }
.bar-card.bump-removing { opacity: 0; transform: translateY(-8px) scale(.96); }
.bar-status { color: var(--muted); font-size: 12px; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.bar-marker { min-width: 0; overflow-wrap: anywhere; font-family: Georgia, "Times New Roman", serif; font-size: clamp(44px, 5.2vw, 76px); font-weight: 500; line-height: .92; }
.bar-card .barista-urgent { margin: 5px 0 0; padding: 13px; font-size: 14px; }
.bar-metrics { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 18px; margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--line); }
.bar-metrics strong { color: var(--ink); font-size: clamp(30px, 3.4vw, 50px); line-height: .95; }
.bar-time.amber { color: var(--butter); }

.seat-sheet { display: none; position: fixed; inset: 0; z-index: 30; }
.seat-sheet.open { display: block; }
.sheet-scrim { position: absolute; inset: 0; width: 100%; border: 0; background: rgba(0,0,0,.66); touch-action: none; }
.seat-sheet section { position: absolute; right: 0; top: 0; bottom: 0; width: min(450px, 92vw); padding: 40px 30px max(40px, env(safe-area-inset-bottom)); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; -webkit-overflow-scrolling: touch; background: #211f1a; border-left: 1px solid var(--line); box-shadow: -20px 0 60px rgba(0,0,0,.38); }
.seat-sheet h2 { margin-bottom: 28px; font-size: 34px; }
.section-options { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.section-options button { padding: 15px 10px; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); font-weight: 750; }
.section-options button.selected { color: #171511; border-color: var(--butter); background: var(--butter); }
label { display: grid; gap: 8px; margin-top: 24px; color: var(--muted); font-size: 12px; font-weight: 750; }
input { width: 100%; padding: 16px; color: var(--ink); background: #15130f; border: 1px solid var(--line); border-radius: 12px; font-size: 22px; outline: none; }
input:focus { border-color: var(--butter); }
.table-input-wrap { display: grid; grid-template-columns: 54px 1fr; align-items: stretch; }
.table-input-wrap strong { display: grid; place-items: center; color: var(--butter); background: #2d291e; border: 1px solid var(--line); border-right: 0; border-radius: 12px 0 0 12px; font-size: 22px; }
.table-input-wrap input { border-radius: 0 12px 12px 0; }
input[readonly] { color: var(--ink); background: #1c1b18; cursor: default; }
.number-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.number-pad button { min-height: 48px; color: var(--ink); border: 1px solid #4b473e; border-radius: 11px; background: #302d27; font-size: 19px; font-weight: 850; -webkit-tap-highlight-color: transparent; }
.number-pad button:active { color: #171511; border-color: var(--butter); background: var(--butter); transform: scale(.97); }
.number-pad .key-action { color: var(--muted); font-size: 12px; }
.compact-number-pad button { min-height: 42px; }
.confirm-seat:disabled { opacity: .35; }
.return-standing-action { width: 100%; margin-top: 14px; padding: 12px; color: var(--butter); border: 1px solid #765f2e; border-radius: 10px; background: #30291c; font-weight: 900; }
.return-standing-confirm { margin-top: 16px; padding: 18px; border: 1px solid #765f2e; border-radius: 14px; background: linear-gradient(145deg, #30291c, #272219); }
.return-standing-confirm h3 { margin: 6px 0 10px; font-family: Georgia, "Times New Roman", serif; font-size: 23px; font-weight: 500; }
.return-standing-confirm > p:not(.eyebrow) { margin: 0; color: #c6bcae; font-size: 12px; line-height: 1.5; }
.return-standing-confirm-button { padding: 13px; color: #171511; border: 1px solid var(--butter); border-radius: 11px; background: var(--butter); font-weight: 900; }
.return-standing-confirm-button:disabled { opacity: .45; }
.returned-location { display: block; margin: 10px 0 0; color: var(--butter); font-size: 11px; font-weight: 850; }
.match-reason { margin: -14px 0 22px; color: var(--muted); }
.seat-sheet section.match-panel { width: min(560px, 94vw); }
.match-section-title { margin: 20px 0 12px; font-family: Georgia, "Times New Roman", serif; font-size: 22px; font-weight: 500; }
.match-ticket-context { margin-bottom: 22px; padding: 15px; border: 1px solid #5a493d; border-radius: 13px; background: #2b241f; }
.match-ticket-context > strong { display: block; font-family: Georgia, "Times New Roman", serif; font-size: 28px; font-weight: 500; }
.match-ticket-context > span { display: block; margin-top: 4px; color: var(--blue); font-size: 12px; font-weight: 800; }
.match-ticket-context .route-row { margin: 12px 0 8px; }
.match-items { display: grid; gap: 6px; }
.match-items p { display: grid; grid-template-columns: 58px 1fr; gap: 8px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.35; }
.match-items p strong { color: var(--ink); font-size: 11px; }
.match-items-empty { margin: 8px 0; color: var(--muted); font-size: 11px; }
.match-divider { display: flex; align-items: center; gap: 10px; margin: 30px 0 6px; color: var(--butter); font-size: 10px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.match-divider::before,
.match-divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.match-preference-options,
.match-section-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.match-preference-options button,
.match-section-options button { padding: 13px 8px; color: var(--ink); border: 1px solid var(--line); border-radius: 11px; background: var(--panel-2); font-weight: 750; }
.match-preference-options button.selected,
.match-section-options button.selected { color: #171511; border-color: var(--butter); background: var(--butter); }
.history-result { margin-top: 24px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #181a18; }
.history-result .history-found { color: var(--sage); }
.history-result .history-found strong { display: block; margin-top: 6px; color: var(--ink); font-size: 30px; }
.history-result .history-none { color: var(--muted); }
.history-result small { display: block; margin-top: 8px; color: var(--muted); }
.history-note { margin: 15px 2px 26px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.preference-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.preference-options button { padding: 13px 8px; color: var(--ink); border: 1px solid var(--line); border-radius: 11px; background: var(--panel-2); font-weight: 750; }
.preference-options button.selected { color: #171511; border-color: var(--butter); background: var(--butter); }
.manual-route-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.manual-route-options button { padding: 14px 8px; color: var(--ink); border: 1px solid var(--line); border-radius: 11px; background: var(--panel-2); font-weight: 750; }
.manual-route-options button.selected { color: #171511; border-color: var(--butter); background: var(--butter); }
.manual-destination-card { margin-top: 18px; padding: 17px; border: 1px solid var(--line); border-radius: 15px; }
.manual-destination-card h3 { margin: 2px 0 14px; font-family: Georgia, "Times New Roman", serif; font-size: 23px; font-weight: 500; }
.manual-destination-card .secondary-action,
.manual-destination-card .confirm-seat { margin-top: 16px; }
.standing-destination { border-color: #553232; background: #291f1f; }
.seated-destination { border-color: #355541; background: #1d2821; }
.manual-submit:disabled { opacity: .35; }
.secondary-action { width: 100%; margin-top: 22px; padding: 11px; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; background: #343631; font-weight: 850; }
.secondary-action:disabled { opacity: .35; }
.danger-action { width: 100%; margin-top: 24px; padding: 13px; color: #fff1ed; border: 1px solid #a94d40; border-radius: 11px; background: #7d3028; font-weight: 900; }
.hosting-started { padding: 16px; color: var(--sage); border: 1px solid #405443; border-radius: 12px; background: #202a23; }
.form-error { min-height: 18px; margin: 8px 2px 0; color: var(--coral); font-size: 12px; font-weight: 750; }
.hosting-confirm-card { margin-top: 24px; padding: 22px; border: 1px solid #704039; border-radius: 16px; background: linear-gradient(145deg, #30211f, #251b1a); box-shadow: 0 16px 42px rgba(0,0,0,.25); }
.hosting-confirm-card .confirm-icon { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 16px; color: #2a1512; border-radius: 50%; background: var(--coral); font-weight: 950; }
.hosting-confirm-card h3 { margin: 4px 0 10px; font-family: Georgia, "Times New Roman", serif; font-size: 25px; font-weight: 500; }
.hosting-confirm-card > p:not(.eyebrow) { margin: 0; color: #c6bcb3; font-size: 13px; line-height: 1.5; }
.confirm-preserved { display: flex; gap: 10px; margin-top: 18px; padding: 13px; border: 1px solid #405443; border-radius: 11px; background: #202a23; }
.confirm-preserved > span { flex: 0 0 auto; width: 9px; height: 9px; margin-top: 4px; border-radius: 50%; background: var(--sage); box-shadow: 0 0 10px rgba(152,184,154,.5); }
.confirm-preserved p { margin: 0; color: #aeb9ae; font-size: 11px; line-height: 1.45; }
.confirm-preserved strong { color: #d7e6d7; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 18px; }
.confirm-actions .danger-action { margin: 0; }
.cancel-action { padding: 13px; color: var(--ink); border: 1px solid #514c43; border-radius: 11px; background: #302d27; font-weight: 850; }
.routing-open-button { margin-top: 14px; }
.seat-sheet section.routing-panel { width: min(620px, 96vw); overflow-y: auto; }
.routing-heading { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.routing-heading h2 { margin-bottom: 0; }
.sync-button { flex: 0 0 auto; padding: 10px 12px; color: var(--blue); border: 1px solid #4a5b68; border-radius: 10px; background: #252b31; font-size: 11px; font-weight: 850; }
.routing-summary { margin: 18px 0 12px; color: var(--muted); font-size: 12px; font-weight: 750; }
.routing-list { display: grid; gap: 10px; padding-bottom: 30px; }
.routing-group { padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: #29261f; }
.routing-group.unassigned { border-color: #745f32; }
.routing-group h3 { margin: 0; font-size: 16px; }
.routing-samples { min-height: 17px; margin: 5px 0 12px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.routing-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.routing-options button { padding: 9px 6px; color: var(--muted); border: 1px solid #49453d; border-radius: 9px; background: #211f1a; font-size: 11px; font-weight: 850; }
.routing-options button.selected[data-route="kitchen"] { color: #dcebdc; border-color: #4f6c55; background: #29382d; }
.routing-options button.selected[data-route="barista"] { color: #d9edf2; border-color: #496773; background: #26363c; }
.routing-options button.selected[data-route="ignore"] { color: #d0cbc1; border-color: #625d54; background: #39362f; }
.routing-group[data-saving="true"] { border-color: #7d6a36; box-shadow: 0 0 0 2px rgba(241,199,91,.1); }
.routing-options button:disabled { opacity: .72; }
.routing-save-status { min-height: 16px; margin: 8px 1px -3px; color: var(--muted); font-size: 10px; font-weight: 800; }
.routing-save-status.saving { color: var(--butter); }
.routing-save-status.saved { color: var(--sage); }
.routing-save-status.error { color: var(--coral); }
.owner-page { min-height: 100vh; background: #171817; }
.owner-topbar { grid-template-columns: 1fr auto 1fr; }
.owner-title { color: var(--muted); font-weight: 800; }
.back-to-floor { justify-self: end; color: var(--butter); text-decoration: none; font-size: 12px; font-weight: 850; }
.owner-shell { width: min(920px, calc(100% - 32px)); margin: 0 auto; padding-top: 38px; }
.owner-login-card { width: min(430px, 100%); margin: 7vh auto 0; padding: 28px; border: 1px solid var(--line); border-radius: 18px; background: #211f1a; }
.owner-login-card h2 { margin-bottom: 10px; font-size: 34px; }
.owner-login-card > p:not(.eyebrow) { color: var(--muted); }
.owner-routing { padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: #211f1a; }
.owner-break-guard-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.owner-break-guard-heading h2 { margin-bottom: 7px; }
.break-guard-state { flex: 0 0 auto; padding: 8px 10px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; font-size: 10px; font-weight: 950; letter-spacing: .06em; }
.break-guard-state.live { color: #dcebdc; border-color: #4f6c55; background: #29382d; }
.break-guard-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin: 16px 0 11px; }
.break-guard-metrics span { display: grid; gap: 3px; padding: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 12px; background: #29261f; font-size: 10px; font-weight: 800; }
.break-guard-metrics strong { color: var(--ink); font-size: 22px; }
.break-guard-actions { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 8px; margin-top: 14px; }
.break-guard-actions .confirm-seat { margin: 0; }
.break-guard-report-settings { margin-top: 18px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: #191713; }
.break-guard-report-settings h3 { margin: 0 0 5px; }
.break-guard-reviews { margin-top: 18px; padding: 14px; border: 1px solid #704038; border-radius: 13px; background: #291d1a; }
.break-guard-reviews h3 { margin: 0 0 5px; color: #ffd9d2; }
#break-guard-review-list { display: grid; gap: 8px; margin-top: 11px; }
.break-guard-review { display: grid; grid-template-columns: minmax(180px,1fr) minmax(180px,1fr) auto; gap: 8px; align-items: center; padding: 10px; border-radius: 10px; background: #171511; }
.break-guard-review > div { display: grid; gap: 3px; }
.break-guard-review span { color: #d5aaa2; font-size: 10px; font-weight: 850; }
.break-guard-review select { min-width: 0; }
.break-guard-review-clear { margin: 0; color: #b8d5bc; font-weight: 800; }
.break-guard-history { margin-top: 16px; padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: #191713; }
.break-guard-history summary { color: var(--butter); font-size: 12px; font-weight: 900; cursor: pointer; }
#break-guard-history-list { display: grid; gap: 8px; margin-top: 12px; }
.break-guard-history-item { display: grid; gap: 4px; padding: 11px; border-radius: 10px; background: #29261f; }
.break-guard-history-item span { color: var(--muted); font-size: 11px; line-height: 1.4; }
.manager-portal-link { display: grid; place-items: center; text-align: center; text-decoration: none; }
.break-guard-managers { margin-top: 16px; padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: #191713; }
.break-guard-managers summary { color: var(--butter); font-size: 12px; font-weight: 900; cursor: pointer; }
.break-guard-manager-list { display: grid; gap: 9px; margin-top: 12px; }
.break-guard-manager { display: grid; grid-template-columns: minmax(160px, 1fr) 2fr; gap: 10px; align-items: center; padding: 11px; border: 1px solid var(--line); border-radius: 11px; background: #29261f; }
.break-guard-manager > div:first-child { display: grid; gap: 3px; }
.break-guard-manager > div:first-child span { color: var(--muted); font-size: 10px; }
.break-guard-manager-options { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.break-guard-manager-options button { padding: 8px 3px; color: var(--muted); border: 1px solid var(--line); border-radius: 7px; background: #211f1a; font-size: 9px; font-weight: 900; }
.break-guard-manager-options button.selected { color: #171511; border-color: var(--butter); background: var(--butter); }
.break-guard-manager .routing-save-status { grid-column: 1 / -1; margin: 0; }
.break-guard-manager .manager-rehearsal { grid-column: 1 / -1; justify-self: start; }
.owner-app-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin-top: 15px; }
.owner-app-grid a { display: grid; gap: 4px; min-height: 76px; padding: 13px; color: var(--ink); text-decoration: none; border: 1px solid var(--line); border-radius: 12px; background: #29261f; }
.owner-app-grid a:hover { border-color: var(--butter); }
.owner-app-grid span { color: var(--muted); font-size: 10px; }
.owner-setup-notes { margin-top: 13px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; }
.owner-setup-notes summary { color: var(--butter); font-weight: 900; cursor: pointer; }
.owner-setup-notes li { margin: 7px 0; color: var(--muted); }
.owner-report-settings { display: grid; grid-template-columns: minmax(0, 1fr) 260px 150px; gap: 14px; align-items: end; }
.owner-report-settings h2 { margin-bottom: 7px; }
.owner-report-settings label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 800; }
.owner-report-settings textarea,
.owner-report-settings input { width: 100%; padding: 11px; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; background: #171511; resize: vertical; }
.owner-save-report { grid-column: 2 / 4; margin-top: 0; }
.owner-test-report { grid-column: 2 / 4; }
.report-connection-status { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 11px; }
.owner-manager-email-settings { display: grid; grid-template-columns: minmax(0, .9fr) repeat(2, minmax(210px, 1fr)); gap: 14px; align-items: start; }
.owner-manager-email-heading h2 { margin-bottom: 7px; }
.owner-manager-email-settings label { display: grid; gap: 6px; color: var(--muted); font-size: 11px; font-weight: 800; }
.owner-manager-email-settings label span { color: #827b70; font-size: 10px; font-weight: 650; line-height: 1.35; }
.owner-manager-email-settings textarea { width: 100%; min-height: 82px; padding: 11px; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; background: #171511; resize: vertical; }
.owner-manager-email-actions { grid-column: 2 / 4; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.owner-manager-email-actions .confirm-seat { margin-top: 0; }
.owner-section-divider { height: 1px; margin: 24px 0; background: var(--line); }
.owner-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.logout-button { padding: 10px 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 10px; background: transparent; font-size: 11px; font-weight: 800; }
.table-group { grid-column: span 2; padding: 10px; border: 1px solid #58705f; border-radius: 17px; background: #18201b; }
.table-group-heading { display: flex; align-items: baseline; justify-content: space-between; padding: 2px 4px 10px; }
.table-group-heading strong { font-size: 20px; }
.table-group-heading span { color: var(--sage); font-size: 11px; font-weight: 850; }
.table-group-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.table-group .seated-card { min-height: 175px; }
.table-group[data-visible-count="1"] { grid-column: span 1; }
.table-group[data-visible-count="1"] .table-group-cards { grid-template-columns: 1fr; }
.candidate-list { display: grid; gap: 9px; max-height: 48vh; overflow: auto; }
.candidate { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); text-align: left; }
.candidate span { color: var(--muted); font-size: 11px; }
.candidate .candidate-name { display: grid; gap: 3px; color: var(--ink); }
.candidate .candidate-name em { color: var(--butter); font-size: 9px; font-style: normal; font-weight: 950; letter-spacing: .08em; text-transform: uppercase; }
.candidate.likely { border-color: #735d31; background: #30291d; }
.candidate.selected { color: #171511; border-color: var(--butter); background: var(--butter); }
.candidate.selected span { color: #4a4025; }
.candidate.selected .candidate-name em { color: #574517; }
.removal-reasons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 9px 0 18px; }
.removal-reasons button { padding: 12px 8px; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); font-weight: 800; }
.removal-reasons button.selected { color: #fff1ed; border-color: #a94d40; background: #652a24; }
.removal-cancel { width: 100%; margin-top: 9px; }
.empty-state { margin: 0; padding: 20px 14px; color: var(--muted); font-size: 12px; text-align: center; }
.route.routing-warning { color: var(--butter); border-color: #745f32; background: #3a3020; }
.previous-location { margin: 10px 0 0; color: var(--butter); font-size: 11px; font-weight: 800; }

.completion-flash {
  display: none; position: fixed; inset: 0; z-index: 50; place-content: center; text-align: center;
  background: radial-gradient(circle at center, #473d23 0, #191712 58%); cursor: pointer;
}
.completion-flash.show { display: grid; animation: flash-in .18s ease-out; }
.completion-flash p { margin: 0 0 18px; color: var(--butter); font-size: clamp(16px, 2vw, 24px); font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.completion-flash strong { font-family: Georgia, "Times New Roman", serif; font-size: clamp(38px, 7vw, 86px); font-weight: 500; }
.completion-flash span { font-size: clamp(110px, 23vw, 280px); font-weight: 950; line-height: .82; letter-spacing: -.07em; }
.completion-flash small { margin-top: 34px; color: var(--muted); }
@keyframes flash-in { from { opacity: 0; transform: scale(1.025); } to { opacity: 1; transform: scale(1); } }
.sound-gate {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 24px;
  color: var(--ink); background: radial-gradient(circle at center, #29271f 0, #11100d 68%);
}
.sound-gate[hidden] { display: none; }
.sound-gate section {
  width: min(480px, 100%); padding: 38px; border: 1px solid #5f5538; border-radius: 24px;
  background: #211f19; box-shadow: 0 28px 80px rgba(0,0,0,.48); text-align: center;
}
.sound-gate h2 { margin: 7px 0 12px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(38px, 7vw, 62px); font-weight: 500; }
.sound-gate p:not(.eyebrow) { margin: 0 auto 24px; max-width: 350px; color: var(--muted); font-size: 17px; line-height: 1.45; }
.sound-gate button { width: 100%; padding: 18px; color: #171511; border: 0; border-radius: 14px; background: var(--butter); font-size: 19px; font-weight: 950; }
.sound-gate button:disabled { opacity: .65; }
.sound-gate small { display: block; margin-top: 16px; color: #8f897b; font-size: 12px; line-height: 1.4; }
.toast-message { position: fixed; left: 50%; bottom: 24px; z-index: 60; translate: -50% 20px; opacity: 0; padding: 11px 16px; border-radius: 999px; color: #171511; background: var(--ink); font-weight: 800; transition: .2s ease; pointer-events: none; }
.toast-message.show { translate: -50% 0; opacity: 1; }

@media (max-width: 1050px) {
  .board { grid-template-columns: 280px 1fr; }
  body[data-view="host"][data-host-panel="standing"] .board {
    grid-template-columns: minmax(230px, 300px) minmax(280px, 1fr);
  }
  body[data-view="host"][data-host-panel="standing"] .standing-lane .cards {
    grid-template-columns: repeat(auto-fit, minmax(225px, 1fr));
  }
  body[data-view="host"][data-host-panel="seated"] .seated-grid,
  body[data-view="runner"] .seated-grid,
  body[data-view="expo"] .seated-grid,
  body[data-view="barista"] .seated-grid,
  body[data-view="bar"] .seated-grid,
  body[data-view="line"] .seated-grid,
  body[data-view="runner"] .standing-lane .cards,
  body[data-view="expo"] .standing-lane .cards,
  body[data-view="barista"] .standing-lane .cards,
  body[data-view="bar"] .standing-lane .cards,
  body[data-view="line"] .standing-lane .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .match-lane { grid-column: 1 / -1; min-height: auto; }
  .topbar { grid-template-columns: 1fr auto; }
  nav { order: 3; grid-column: 1 / -1; justify-self: center; margin-top: 12px; }
}
@media (max-width: 720px) {
  .topbar { padding: 16px; }
  .mode-pill { font-size: 0; }
  .header-actions { gap: 5px; }
  .hosting-pill { padding: 9px 10px; font-size: 11px; }
  main { padding: 12px; }
  .summary { grid-template-columns: repeat(2, 1fr); }
  .summary .clock { display: none; }
  .board { grid-template-columns: 1fr; }
  body[data-view="host"][data-host-panel="standing"] .board,
  body[data-view="host"][data-host-panel="standing"][data-has-matches="false"] .board {
    grid-template-columns: minmax(0, 1fr);
  }
  body[data-view="host"][data-host-panel="standing"] .standing-lane .cards,
  body[data-view="host"][data-host-panel="seated"] .seated-grid,
  body[data-view="runner"] .seated-grid,
  body[data-view="expo"] .seated-grid,
  body[data-view="barista"] .seated-grid,
  body[data-view="bar"] .seated-grid,
  body[data-view="line"] .seated-grid,
  body[data-view="runner"] .standing-lane .cards,
  body[data-view="expo"] .standing-lane .cards,
  body[data-view="barista"] .standing-lane .cards,
  body[data-view="bar"] .standing-lane .cards,
  body[data-view="line"] .standing-lane .cards { grid-template-columns: 1fr; }
  .table-group { grid-column: auto; }
  .table-group-cards { grid-template-columns: 1fr; }
  .lane { min-height: auto; }
  .seated-grid { grid-template-columns: 1fr; }
  .match-lane { grid-column: auto; }
}

@media (max-width: 760px) {
  .owner-topbar { grid-template-columns: 1fr auto; }
  .owner-title { display: none; }
  .owner-shell { width: min(100% - 20px, 920px); padding-top: 18px; }
  .owner-routing { padding: 16px; }
  .owner-break-guard-heading { display: grid; }
  .break-guard-state { justify-self: start; }
  .break-guard-metrics { grid-template-columns: 1fr; }
  .break-guard-actions { grid-template-columns: 1fr; }
  .break-guard-manager { grid-template-columns: 1fr; }
  .break-guard-manager-options { grid-template-columns: repeat(3, 1fr); }
  .break-guard-review { grid-template-columns: 1fr; }
  .owner-app-grid { grid-template-columns: 1fr 1fr; }
  .owner-report-settings { grid-template-columns: 1fr; }
  .owner-manager-email-settings { grid-template-columns: 1fr; }
  .owner-manager-email-actions { grid-column: 1; grid-template-columns: 1fr; }
  .owner-save-report,
  .owner-test-report,
  .report-connection-status { grid-column: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .bar-card,
  .bar-card > *,
  .bar-card::after { transition: none; }
}

.compact-view-switcher { display: none; position: relative; justify-self: end; z-index: 20; }
body[data-dedicated="true"] .topbar { min-height: 68px; grid-template-columns: 1fr auto auto; gap: 10px; padding: 11px 20px; }
body[data-dedicated="true"] .topbar nav { display: none; }
body[data-dedicated="true"] .compact-view-switcher { display: block; }
body[data-dedicated="true"] .hosting-pill { display: none; }
body[data-dedicated="true"]:not([data-view="bar"]):not([data-view="barista"]):not([data-view="line"]) .header-actions { display: none; }
.compact-view-switcher summary { display: flex; align-items: center; gap: 8px; padding: 9px 12px; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; background: #24211c; font-size: 12px; font-weight: 850; cursor: pointer; list-style: none; }
.compact-view-switcher summary::-webkit-details-marker { display: none; }
.compact-view-switcher[open] summary { color: #171511; border-color: var(--butter); background: var(--butter); }
.compact-view-menu { position: absolute; top: calc(100% + 8px); right: 0; display: grid; width: 180px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: #171511; box-shadow: 0 16px 42px rgba(0,0,0,.45); }
.compact-view-menu a { padding: 11px 12px; color: var(--ink); border-radius: 8px; font-size: 12px; font-weight: 800; text-decoration: none; }
.compact-view-menu a:hover,
.compact-view-menu a:focus-visible { color: #171511; background: var(--butter); outline: none; }
@media (max-width: 720px) {
  body[data-dedicated="true"] .topbar { grid-template-columns: 1fr auto auto; padding: 10px 12px; }
  body[data-dedicated="true"] .topbar h1 { font-size: 24px; }
  body[data-dedicated="true"] .mode-pill { padding: 8px 9px; }
}

/* Ordering rounds (Oct 30): a later add-on on the same marker is its own card. */
.add-on-flag { margin: 8px 0 2px; padding: 7px 10px; color: #1d1405; background: #f5c044; border-radius: 9px; font-size: 12px; font-weight: 950; letter-spacing: .04em; text-transform: uppercase; text-align: center; line-height: 1.25; }
.line-card .add-on-flag, .expo-card .add-on-flag, .bar-card .add-on-flag { font-size: 14px; padding: 9px 10px; }

/* History (Nov 1): recall a bumped ticket. Shown on the screens that work tickets. */
.recall-button { display: none; align-items: center; gap: 7px; padding: 11px 16px; color: var(--ink); border: 1px solid #5a5446; border-radius: 12px; background: #302d27; font-size: 15px; font-weight: 850; cursor: pointer; touch-action: manipulation; }
.recall-button span { color: var(--butter); font-size: 18px; line-height: 1; }
.recall-button:active { color: #171511; border-color: var(--butter); background: var(--butter); }
.recall-button:active span { color: #171511; }
body[data-view="runner"] .recall-button,
body[data-view="expo"] .recall-button,
body[data-view="barista"] .recall-button,
body[data-view="bar"] .recall-button,
body[data-view="line"] .recall-button { display: inline-flex; }
.seat-sheet section.recall-panel { width: min(600px, 96vw); padding-top: 28px; }
.recall-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.recall-head h2 { margin-bottom: 0; }
.recall-head .cancel-action { flex: 0 0 auto; min-width: 92px; }
.recall-help { margin: 12px 0 16px; color: var(--muted); font-size: 14px; line-height: 1.4; }
#recall-search { padding: 13px 14px; font-size: 18px; }
.recall-list { display: grid; gap: 10px; margin-top: 14px; }
.recall-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #29261f; }
.recall-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.recall-marker { min-width: 0; overflow-wrap: anywhere; font-family: Georgia, "Times New Roman", serif; font-size: 28px; font-weight: 500; line-height: 1; }
.recall-where { color: var(--butter); font-size: 15px; font-weight: 850; }
.recall-flag { display: inline-block; margin-top: 7px; padding: 4px 8px; color: #1d1405; background: #f5c044; border-radius: 7px; font-size: 11px; font-weight: 950; letter-spacing: .04em; text-transform: uppercase; }
.recall-items { margin: 7px 0 0; color: #d6cfc2; font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.recall-tickets { margin: 4px 0 0; color: var(--muted); font-size: 12px; font-weight: 750; }
.recall-side { display: grid; justify-items: end; gap: 3px; text-align: right; }
.recall-time { font-size: 20px; }
.recall-side small { color: var(--muted); font-size: 12px; font-weight: 700; }
.recall-back { margin-top: 8px; min-width: 122px; padding: 12px 14px; color: #171511; border: 0; border-radius: 11px; background: var(--butter); font-weight: 900; touch-action: manipulation; }
.recall-back:disabled { opacity: .55; }
.brought-back-flag { margin: 8px 0 2px; padding: 7px 10px; color: #dff1ff; background: #23465a; border: 1px solid #4f86a3; border-radius: 9px; font-size: 12px; font-weight: 950; letter-spacing: .04em; text-transform: uppercase; text-align: center; line-height: 1.25; }
.line-card .brought-back-flag, .expo-card .brought-back-flag, .bar-card .brought-back-flag { font-size: 14px; padding: 9px 10px; }
@media (max-width: 560px) {
  .recall-row { grid-template-columns: 1fr; }
  .recall-side { justify-items: start; text-align: left; }
}

/* Host table map (Andrew, Nov 5). Hidden unless the device opened the preview link or the
   owner turned the map on for every device. */
.map-panel-tab { display: none; }
body[data-table-map="on"] .map-panel-tab { display: flex; }
body[data-table-map="on"] .summary { grid-template-columns: repeat(3, minmax(110px, 170px)) 1fr; }
.map-lane { display: none; }
body[data-view="host"][data-host-panel="map"] .board { grid-template-columns: minmax(0, 1fr) minmax(230px, 300px); }
body[data-view="host"][data-host-panel="map"] .map-lane { display: block; }
body[data-view="host"][data-host-panel="map"] .standing-lane { display: block; }
body[data-view="host"][data-host-panel="map"] .intake-lane,
body[data-view="host"][data-host-panel="map"] .seated-lane,
body[data-view="host"][data-host-panel="map"] .match-lane { display: none; }
body[data-view="host"][data-host-panel="map"] .standing-lane .cards { grid-template-columns: 1fr; }
.map-lane { background: #1b1c1a; border-color: #3d3a32; }
.map-lane .lane-heading { flex-wrap: wrap; gap: 10px; }
.map-note { margin: 12px 2px 0; color: var(--muted); font-size: 12px; }
.floor-map[hidden] { display: none !important; }
.floor-map svg { display: block; width: 100%; height: auto; touch-action: manipulation; }
.host-floor-map svg { max-height: calc(100vh - 300px); }
.floor-map text { pointer-events: none; font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif; }
.map-zone.street { fill: #1f1e1b; }
.map-zone.room { fill: #23211c; stroke: #3a362d; stroke-width: 3; }
.map-zone-label { fill: #77715f; font-size: 36px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.map-table { cursor: pointer; }
.map-table .map-shape { fill: #2c2a24; stroke: #8a8476; stroke-width: 4; }
.map-table .map-hit { fill: transparent; stroke: none; }
.map-label { fill: var(--ink); font-size: 34px; font-weight: 850; }
.map-minutes { fill: var(--ink); font-size: 30px; font-weight: 800; }
.map-table.state-before .map-shape { fill: #3a3934; stroke: #5d5a52; }
.map-table.state-before .map-label { fill: #a9a397; }
.map-table.state-waiting .map-shape { fill: #3d331b; stroke: #b0912f; }
.map-table.state-waiting text { fill: #f6d36d; }
.map-table.state-late .map-shape { fill: #5a201a; stroke: #ef725f; stroke-width: 6; }
.map-table.state-late text { fill: #ffe0d9; }
.map-table.state-done .map-shape { fill: #22372a; stroke: #5d9a69; }
.map-table.state-done text { fill: #c6e7c8; }
.map-join { stroke-width: 64; stroke-linecap: round; stroke: #3a3934; }
.map-join.state-waiting { stroke: #4a3d1d; }
.map-join.state-late { stroke: #6a2a22; }
.map-join.state-done { stroke: #2a4632; }
.map-join.is-selected, .map-join.is-target { stroke: #b8952f; }
.map-table.hint-fit .map-shape { stroke: #8fd0e6; stroke-width: 7; stroke-dasharray: 16 10; }
.map-table.hint-tight .map-shape { stroke: #6c8f9b; stroke-width: 5; stroke-dasharray: 6 10; }
.map-table.is-selected .map-shape { fill: var(--butter); stroke: #fff3c8; stroke-width: 6; stroke-dasharray: none; }
.map-table.is-selected text { fill: #171511; }
.map-current-ring { fill: none; stroke: var(--butter); stroke-width: 4; stroke-dasharray: 10 10; opacity: .8; }
.floor-map svg.is-mini .map-shape { fill: #2a2823; stroke: #4d483e; stroke-width: 4; }
.floor-map svg.is-mini .is-target .map-shape { fill: var(--butter); stroke: #fff3c8; stroke-width: 8; }
.floor-map svg.is-mini .map-label { fill: #171511; font-size: 46px; }
.map-target-ring { fill: none; stroke: var(--butter); stroke-width: 10; opacity: .55; animation: map-target-pulse 1.1s ease-in-out infinite; }
@keyframes map-target-pulse { 0%, 100% { opacity: .25; } 50% { opacity: .8; } }
@media (prefers-reduced-motion: reduce) { .map-target-ring { animation: none; } }
.map-start { fill: var(--ink); }
.map-start-label { fill: var(--ink); font-size: 46px; font-weight: 900; }

.map-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: 11px; font-weight: 750; }
.map-legend span::before { content: ""; display: inline-block; width: 11px; height: 11px; margin-right: 6px; vertical-align: -1px; border-radius: 3px; border: 2px solid #8a8476; background: #2c2a24; }
.map-legend .legend-before::before { border-color: #5d5a52; background: #3a3934; }
.map-legend .legend-waiting::before { border-color: #b0912f; background: #3d331b; }
.map-legend .legend-late::before { border-color: #ef725f; background: #5a201a; }
.map-legend .legend-done::before { border-color: #5d9a69; background: #22372a; }
.map-legend .legend-fit::before { border: 2px dashed #8fd0e6; background: transparent; }
.map-legend .legend-tight::before { border: 2px dotted #6c8f9b; background: transparent; }
.map-legend-stacked { display: grid; gap: 7px; margin-top: 18px; }

.seat-sheet.map-sheet { z-index: 35; }
.seat-sheet section.map-panel { width: min(1180px, 100vw); display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 22px; align-items: start; padding: 24px 22px max(24px, env(safe-area-inset-bottom)); }
.map-panel h2 { margin-bottom: 8px; font-size: 30px; }
.map-panel .pick-floor-map svg { max-height: calc(100vh - 48px); }
.map-party-facts { margin: 0 0 14px; color: var(--muted); font-size: 14px; font-weight: 750; line-height: 1.4; }
.map-pick-summary { padding: 14px; color: var(--muted); border: 1px solid var(--line); border-radius: 12px; background: #1c1b18; font-size: 13px; line-height: 1.45; }
.map-pick-summary strong { display: block; color: var(--ink); font-size: 30px; line-height: 1.1; word-break: break-all; overflow-wrap: anywhere; }
.map-too-small { display: block; margin-top: 6px; color: var(--coral); font-style: normal; font-weight: 800; }
.map-share-confirm { margin-top: 12px; padding: 14px; border: 1px solid #765f2e; border-radius: 12px; background: #30291c; }
.map-share-confirm p:not(.eyebrow) { margin: 0 0 12px; color: var(--ink); font-size: 14px; line-height: 1.4; }
.map-share-confirm .confirm-actions { margin-top: 0; }
.map-side-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.map-switch { margin: -14px 0 18px; color: var(--blue); border-color: #4a5b68; background: #252b31; }
.map-pick-button { margin-top: 12px; color: var(--blue); border-color: #4a5b68; background: #252b31; }
@media (max-width: 900px) {
  .seat-sheet section.map-panel { grid-template-columns: 1fr; }
  .map-panel .pick-floor-map { order: -1; }
  .map-panel .pick-floor-map svg { max-height: 62vh; }
}

#table-sheet h2 { margin-bottom: 10px; }
#table-sheet[data-state="late"] .eyebrow { color: var(--coral); }
#table-sheet[data-state="done"] .eyebrow { color: var(--sage); }
.table-party { margin-top: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: #29261f; }
.table-party-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.table-party-head strong { font-family: Georgia, "Times New Roman", serif; font-size: 28px; font-weight: 500; }
.table-party p { margin: 4px 0 10px; color: var(--muted); font-size: 13px; }
.table-dept { display: flex; justify-content: space-between; padding: 9px 0; border-top: 1px solid var(--line); font-size: 15px; }
.table-dept span { color: var(--muted); font-weight: 750; }
.table-dept.waiting strong { color: #f6d36d; }
.table-dept.out strong { color: #c6e7c8; }
.table-party .table-move { margin-top: 10px; }
.table-note { margin: 12px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.table-shared { margin: 0; color: var(--sage); font-size: 11px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.table-sheet-done { width: 100%; margin-top: 10px; }

/* Run-to-table flash with the mini map. Pushed tables (C10+C11+C12) get a smaller number. */
.completion-flash .flash-text { display: grid; justify-items: center; }
.completion-flash span.long { font-size: clamp(64px, 11vw, 150px); letter-spacing: -.04em; }
.completion-flash em { margin-top: 18px; color: var(--ink); font-size: clamp(20px, 2.6vw, 34px); font-style: normal; font-weight: 850; }
.completion-flash.with-map { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: center; gap: clamp(20px, 4vw, 60px); padding: 3vw; }
.completion-flash.with-map span.long { font-size: clamp(44px, 5.6vw, 96px); }
.completion-flash .flash-map { width: 100%; max-width: 780px; }
@media (orientation: portrait) {
  .completion-flash.with-map { grid-template-columns: 1fr; justify-items: center; }
  .completion-flash.with-map span.long { font-size: clamp(54px, 11vw, 120px); }
  .completion-flash .flash-map { width: 88vw; }
}
.table-location strong.long { font-size: 24px; word-break: break-all; overflow-wrap: anywhere; text-align: right; }
@media (max-width: 720px) {
  body[data-table-map="on"] .summary { grid-template-columns: repeat(3, 1fr); }
  body[data-view="host"][data-host-panel="map"] .board { grid-template-columns: 1fr; }
}
