:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #171a1f;
  background: #f6f7f4;
  font-synthesis: none;
  --orange: #fd5516;
  --orange-dark: #d93808;
  --green: #40ac1b;
  --red: #c73131;
  --blue: #3978cf;
  --amber: #a76400;
  --ink: #171a1f;
  --muted: #66707a;
  --line: #dfe3df;
  --surface: #ffffff;
  --shadow: 0 18px 55px rgb(20 28 22 / 10%);
}

* { box-sizing: border-box; }

body {
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top right, rgb(253 85 22 / 10%), transparent 34rem),
    #f6f7f4;
}

button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button:disabled, input:disabled, select:disabled, textarea:disabled { cursor: wait; opacity: .62; }
[hidden] { display: none !important; }

h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); line-height: 1.05; }
h2 { margin-bottom: 0; font-size: clamp(1.35rem, 3vw, 1.8rem); }
h3 { margin-bottom: .35rem; }

.eyebrow {
  margin-bottom: .45rem;
  color: var(--orange-dark);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .16em;
}

.muted { color: var(--muted); }

.boot-layout,
.auth-layout {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  padding: max(1.2rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1.2rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  place-items: center;
}

.boot-card {
  display: grid;
  justify-items: center;
  gap: 1.25rem;
  width: min(100%, 25rem);
  padding: 2rem;
  color: var(--muted);
  text-align: center;
}

.boot-brand-mark { width: min(13.5rem, 62vw); height: auto; }
.boot-spinner {
  width: 2.25rem;
  height: 2.25rem;
  border: .25rem solid rgb(253 85 22 / 18%);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: boot-spin .8s linear infinite;
}
.boot-card p { margin: 0; font-size: .9rem; font-weight: 700; }

@keyframes boot-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .boot-spinner { animation: none; border-top-color: var(--green); }
}

.participant-support-center { display: grid; gap: 1rem; max-width: 64rem; margin: 0 auto; }
.participant-support-heading,
.participant-support-card-top,
.participant-support-summary,
.participant-support-actions { display: flex; align-items: center; justify-content: space-between; gap: .7rem; }
.participant-support-heading h2 { margin: 0; font-size: 1.35rem; }
.participant-support-actions { flex-wrap: wrap; justify-content: flex-end; }
.participant-support-actions button,
.participant-support-form button,
.participant-support-compose button {
  min-height: 2.65rem;
  padding: .55rem .85rem;
  border: 1px solid var(--line);
  border-radius: .8rem;
  font-weight: 800;
}
.participant-support-actions .primary,
.participant-support-form .primary,
.participant-support-compose .primary { border-color: var(--orange-dark); color: #fff; background: var(--orange-dark); }
.participant-support-actions .secondary { color: var(--ink); background: var(--surface); }
.participant-support-list,
.participant-support-messages { display: grid; gap: .65rem; }
.participant-support-card { width: 100%; display: grid; gap: .35rem; border: 1px solid var(--line); border-radius: 1rem; padding: 1rem; color: var(--ink); background: var(--surface); text-align: left; }
.participant-support-card-meta,
.participant-support-card small,
.participant-support-summary span,
.participant-support-summary small { color: var(--muted); }
.participant-support-unread { min-width: 1.6rem; border-radius: 99px; padding: .2rem .45rem; color: #fff; background: var(--orange-dark); text-align: center; }
.participant-support-empty,
.participant-support-closed { border: 1px dashed var(--line); border-radius: 1rem; padding: 1.25rem; color: var(--muted); text-align: center; }
.participant-support-error { border: 1px solid rgb(199 49 49 / 45%); border-radius: .9rem; padding: .8rem 1rem; color: #9f2525; background: rgb(199 49 49 / 8%); }
.participant-support-form,
.participant-support-compose { display: grid; gap: .8rem; }
.participant-support-field { margin: 0; }
.participant-support-field > span { display: block; margin-bottom: .45rem; font-weight: 750; }
.participant-support-order-context { display: flex; align-items: flex-start; gap: .65rem; margin: 0; border: 1px solid var(--line); border-radius: .9rem; padding: .8rem; background: var(--surface); }
.participant-support-order-context input { width: 1.2rem; min-height: 1.2rem; margin-top: .12rem; }
.participant-support-summary { align-items: flex-start; flex-direction: column; border: 1px solid var(--line); border-radius: 1rem; padding: .9rem 1rem; background: var(--surface); }
.participant-support-messages { max-height: min(50dvh, 34rem); overflow-y: auto; padding: .25rem; }
.participant-support-message { justify-self: start; max-width: min(88%, 34rem); border: 1px solid var(--line); border-radius: 1rem 1rem 1rem .25rem; padding: .75rem .9rem; background: var(--surface); }
.participant-support-message.is-own { justify-self: end; border-color: rgb(64 172 27 / 42%); border-radius: 1rem 1rem .25rem 1rem; background: rgb(64 172 27 / 8%); }
.participant-support-message p { margin: .35rem 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.participant-support-message time { color: var(--muted); font-size: .72rem; }
.participant-support-system { justify-self: center; width: min(92%, 34rem); border: 1px solid rgb(255 90 31 / 30%); border-radius: 1rem; padding: .7rem 1rem; background: rgb(255 90 31 / 7%); text-align: center; }
.participant-support-system strong { color: var(--orange-dark); font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; }
.participant-support-system p { margin: .3rem 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.participant-support-system time { color: var(--muted); font-size: .7rem; }
.participant-support-compose { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.participant-support-compose textarea { min-height: 4.25rem; }
.participant-support-rating, .participant-support-rating-form { display: grid; gap: .75rem; }
.participant-support-rating { border: 1px solid var(--line); border-radius: 1rem; padding: 1rem; background: var(--surface); text-align: center; }
.participant-support-rating p, .participant-support-rating blockquote { margin: 0; color: var(--muted); }
.participant-support-rating blockquote { border-left: 3px solid var(--orange-dark); padding-left: .75rem; text-align: left; white-space: pre-wrap; }
.participant-support-rating-stars { display: flex; direction: ltr; justify-content: center; gap: .35rem; }
.participant-support-rating-star { width: 2.75rem; min-height: 2.75rem; border: 1px solid rgb(255 90 31 / 35%); border-radius: .75rem; padding: 0; color: var(--orange-dark); background: rgb(255 90 31 / 7%); font-size: 1.45rem; }
.participant-support-rating-star:disabled { opacity: .55; }
.participant-support-rating-score { direction: ltr; color: var(--orange-dark); font-size: 1.45rem; letter-spacing: .12rem; }
.participant-support-rating-unavailable { margin: 0; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; color: var(--ink-soft); background: var(--surface-soft); text-align: center; }

@media screen and (max-width: 560px) {
  .participant-support-heading { align-items: flex-start; flex-direction: column; }
  .participant-support-actions { width: 100%; justify-content: stretch; }
  .participant-support-actions button { flex: 1; }
  .participant-support-compose { grid-template-columns: 1fr; }
}

.auth-card {
  width: min(100%, 31rem);
  padding: clamp(1.5rem, 5vw, 2.75rem);
  border: 1px solid var(--line);
  border-radius: 1.65rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.app-update-card { display: grid; gap: 1rem; }
.app-update-wordmark {
  width: min(13.5rem, 62vw);
  height: 3.2rem;
  background: url("./icons/nomi-food-logo.png?v=20260825-session-restore-shell-r138") left center / contain no-repeat;
}
.app-update-card h1 { margin-bottom: 0; }
.app-update-body { margin: 0; color: #4f585f; line-height: 1.55; }
.app-update-version {
  margin: 0;
  padding: .72rem .85rem;
  border-radius: .75rem;
  color: #7b280d;
  background: #fff1eb;
  font-size: .9rem;
  font-weight: 800;
}
.app-update-card .button { width: 100%; }

.brand-mark {
  display: block;
  width: min(13.5rem, 62vw);
  height: auto;
  margin-bottom: 1.2rem;
}

.stack { display: grid; gap: 1rem; margin-top: 1.5rem; }
label { display: grid; gap: .42rem; color: #2a3036; font-size: .9rem; font-weight: 700; }
input, select, textarea {
  width: 100%;
  min-height: 2.85rem;
  padding: .7rem .82rem;
  border: 1px solid #cdd3ce;
  border-radius: .8rem;
  color: var(--ink);
  background: #fff;
}
textarea { min-height: 7rem; resize: vertical; }
.remember-login-field {
  grid-template-columns: 1.25rem minmax(0, 1fr);
  align-items: start;
  min-height: 2.75rem;
  padding: .3rem .1rem;
  column-gap: .65rem;
  row-gap: .18rem;
  cursor: pointer;
}
.remember-login-field input[type="checkbox"] {
  width: 1.2rem;
  height: 1.2rem;
  min-height: 1.2rem;
  margin: .08rem 0 0;
  padding: 0;
  accent-color: var(--orange-dark);
  cursor: pointer;
}
.remember-login-label { line-height: 1.4; }
.remember-login-help {
  grid-column: 2;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 500;
  line-height: 1.45;
}
input:focus, select:focus, textarea:focus, button:focus-visible, summary:focus-visible {
  outline: 3px solid rgb(253 85 22 / 24%);
  outline-offset: 2px;
}

.button {
  min-height: 2.75rem;
  padding: .67rem 1rem;
  border: 1px solid transparent;
  border-radius: .8rem;
  font-weight: 800;
}
.button-primary { color: #fff; background: var(--orange-dark); }
.button-primary:hover { background: #b82d05; }
.button-secondary { border-color: #ccd2cd; color: var(--ink); background: #fff; }
.button-quiet { color: var(--ink); background: #eef0ed; }
.button-danger { border-color: rgb(199 49 49 / 25%); color: #a61f1f; background: #fff2f2; }

.auth-help { margin: 1rem 0 0; color: #4f585f; font-size: .84rem; line-height: 1.5; }
.security-note { margin: 1rem 0 0; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.auth-actions { display: grid; gap: .65rem; }
.auth-actions .button { width: 100%; }
.alert { padding: .85rem 1rem; border-radius: .75rem; font-size: .9rem; }
.alert-error { color: #8b1f1f; background: #fff0f0; }

.app-layout {
  min-height: 100dvh;
  padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
  color: #172019;
  background:
    radial-gradient(circle at 8% 4%, rgb(253 85 22 / 11%), transparent 25rem),
    radial-gradient(circle at 94% 14%, rgb(64 172 27 / 9%), transparent 28rem),
    linear-gradient(145deg, #f8f6f0 0%, #f2f6ef 52%, #f7f3ed 100%);
}

.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .85rem;
  min-height: 4.55rem;
  padding: max(.55rem, env(safe-area-inset-top)) max(.85rem, env(safe-area-inset-right)) .55rem max(.85rem, env(safe-area-inset-left));
  border-bottom: 1px solid rgb(205 212 203 / 82%);
  background: rgb(255 254 250 / 94%);
  box-shadow: 0 8px 28px rgb(37 47 38 / 8%);
  backdrop-filter: blur(20px) saturate(1.15);
  transform: translateY(0);
  transition: transform 190ms ease, box-shadow 190ms ease;
  will-change: transform;
}
.topbar.is-hidden { box-shadow: none; transform: translateY(calc(-100% - 1px)); }

.restaurant-brand, .topbar-actions, .operational-slot, .section-actions {
  display: flex;
  align-items: center;
}
.restaurant-brand { min-width: 0; gap: .7rem; }
.restaurant-brand-mark {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  width: 3rem;
  height: 3rem;
  overflow: hidden;
  border: 1px solid #d7ded5;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, var(--orange), #e63e0d);
  box-shadow: 0 7px 18px rgb(218 61 12 / 16%);
  font-size: 1.15rem;
  font-weight: 900;
  place-items: center;
}
.restaurant-brand-mark.has-image { color: transparent; background: #fff; }
.restaurant-brand-mark img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: .2rem;
  border-radius: inherit;
  box-sizing: border-box;
  object-fit: contain;
  background: #fff;
}
.restaurant-brand-copy { min-width: 0; }
.restaurant-brand .eyebrow { margin-bottom: .12rem; font-size: .62rem; letter-spacing: .14em; }
.restaurant-brand h1 {
  max-width: min(31vw, 26rem);
  margin: 0 0 .02rem;
  padding-block: .02em .08em;
  overflow: hidden;
  font-size: clamp(1.08rem, 1.55vw, 1.38rem);
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.restaurant-location { margin: 0; color: var(--muted); font-size: .68rem; }
.topbar-actions { justify-content: flex-end; gap: .55rem; }
.operational-slot { gap: .42rem; }
.connection-pill, .operational-pill, .operational-toggle {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 2.35rem;
  padding: .48rem .68rem;
  border: 1px solid #d7ded7;
  border-radius: 999px;
  color: #49534b;
  background: rgb(255 255 255 / 84%);
  font-size: .72rem;
  font-weight: 850;
  white-space: nowrap;
}
.status-dot { width: .58rem; height: .58rem; border-radius: 999px; background: #a0a9a1; }
.connection-pill.is-online .status-dot, .operational-pill.is-accepting .status-dot, .operational-toggle.is-accepting .status-dot { background: #25a35a; box-shadow: 0 0 0 4px rgb(37 163 90 / 12%); }
.connection-pill.is-offline .status-dot, .operational-pill.is-paused .status-dot, .operational-toggle.is-paused .status-dot { background: #d34343; box-shadow: 0 0 0 4px rgb(211 67 67 / 11%); }
.operational-pill.is-accepting { border-color: #cbe1d0; color: #166534; }
.operational-pill.is-paused { border-color: #efc5c5; color: #a62525; background: #fff8f8; }

.app-menu-wrap { position: relative; flex: 0 0 auto; }
.app-menu-toggle {
  display: grid;
  width: 2.8rem;
  height: 2.8rem;
  padding: .66rem;
  border: 1px solid #ffd0bf;
  border-radius: .85rem;
  color: var(--orange-dark);
  background: #fff1eb;
  box-shadow: 0 5px 14px rgb(217 56 8 / 9%);
  place-content: center;
  gap: .25rem;
}
.app-menu-toggle > span {
  display: block;
  width: 1.18rem;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 160ms ease, opacity 160ms ease;
}
.app-menu {
  position: absolute;
  top: calc(100% + .65rem);
  right: 0;
  width: min(22rem, calc(100vw - 1.5rem));
  max-height: min(42rem, calc(100dvh - 5.75rem));
  padding: .8rem;
  overflow: auto;
  border: 1px solid #d8ded6;
  border-radius: 1.15rem;
  background: rgb(255 254 251 / 98%);
  box-shadow: 0 24px 70px rgb(31 42 33 / 20%);
}
.app-menu-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .25rem .25rem .7rem; }
.app-menu-heading .eyebrow { margin-bottom: .12rem; }
.app-menu-heading h2 { font-size: 1.22rem; }
.app-menu-close {
  display: grid;
  flex: 0 0 auto;
  width: 2.35rem;
  height: 2.35rem;
  border: 0;
  border-radius: 999px;
  color: #4a534c;
  background: #eef1ed;
  font-size: 1.45rem;
  place-items: center;
}
.app-menu-operational { padding: 0 0 .65rem; }
.app-menu-operational:empty { display: none; }
.app-update-notice {
  display: grid;
  gap: .35rem;
  margin: 0 0 .7rem;
  padding: .8rem;
  border: 1px solid #f2c3b1;
  border-radius: .85rem;
  color: #752609;
  background: #fff3ed;
}
.app-update-notice > span { color: #6c5147; font-size: .78rem; line-height: 1.4; }
.app-update-notice > small { color: #8a3b1d; font-weight: 750; }
.app-update-notice .button { width: 100%; margin-top: .25rem; }
.operational-toggle {
  justify-content: flex-start;
  width: 100%;
  min-height: 3.15rem;
  border-color: #cbe1d0;
  color: #166534;
  background: #f4fbf6;
  text-align: left;
}
.operational-toggle.is-paused { border-color: #efc5c5; color: #a62525; background: #fff8f8; }
.tabs { display: grid; gap: .35rem; }
.tab {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  gap: .7rem;
  min-height: 3.15rem;
  padding: .62rem .75rem;
  border: 1px solid #e0e5de;
  border-radius: .82rem;
  color: #576159;
  background: #fff;
  font-weight: 800;
  white-space: nowrap;
  text-align: left;
}
.tab-icon { color: var(--orange-dark); font-size: 1.05rem; }
.tab.is-active { border-color: #ffd1c1; color: #a92c07; background: #fff1ec; }
.tab-arrow { color: #929b94; font-size: 1.4rem; font-weight: 500; }
.support-unread {
  position: absolute;
  right: 2.25rem;
  min-width: 1.45rem;
  padding: .15rem .4rem;
  border-radius: 99px;
  color: #fff;
  background: var(--orange-dark);
  font-size: .68rem;
  font-style: normal;
  text-align: center;
}
.app-menu-action {
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 1fr);
  align-items: center;
  width: 100%;
  min-height: 3.05rem;
  margin-top: .35rem;
  padding: .62rem .78rem;
  border: 1px solid #e0e5de;
  border-radius: .82rem;
  color: #313a33;
  background: #fff;
  gap: .65rem;
  font-weight: 800;
  text-align: left;
}
.logout-button { color: #9d2929; background: #fff7f7; }

.workspace { width: 100%; margin: 0 auto; padding: .62rem max(.72rem, env(safe-area-inset-right)) 0 max(.72rem, env(safe-area-inset-left)); }
.panel { display: grid; gap: .62rem; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: .8rem; padding: .15rem .2rem; }
.section-heading .eyebrow { margin-bottom: .25rem; }
.section-heading h2 { font-size: clamp(1.25rem, 2vw, 1.65rem); }
.section-actions { gap: .75rem; }
.last-updated { margin: 0; color: var(--muted); font-size: .78rem; }
.board-heading { min-height: 2.2rem; align-items: center; }
.board-heading > div:first-child { display: flex; align-items: baseline; gap: .6rem; }
.board-heading .eyebrow { margin: 0; }
.board-heading h2 { margin: 0; font-size: 1.05rem; }
.restaurant-rating-summary {
  display: flex;
  align-items: center;
  width: fit-content;
  min-height: 3.2rem;
  padding: .55rem .8rem;
  border: 1px solid #eadbcf;
  border-radius: .9rem;
  color: #4a382d;
  background: linear-gradient(135deg, #fff8f1, #fffdf9);
  box-shadow: 0 6px 18px rgb(79 52 32 / 6%);
  gap: .65rem;
}
.ratings-list, .history-list {
  display: grid;
  gap: .75rem;
}
.history-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
}
.history-summary-card {
  display: grid;
  min-height: 4.6rem;
  padding: .8rem .9rem;
  border: 1px solid #dde3dc;
  border-radius: .9rem;
  background: #fff;
  box-shadow: 0 7px 20px rgb(37 53 41 / 5%);
  align-content: center;
  gap: .12rem;
}
.history-summary-card span { color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.history-summary-card strong { font-size: 1.08rem; }
.history-day {
  overflow: hidden;
  border: 1px solid #d9dfd8;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 9px 26px rgb(31 47 35 / 5%);
}
.history-day-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .72rem .9rem;
  border-bottom: 1px solid #e2e7e1;
  background: #f8faf7;
}
.history-day-heading h3 { margin: 0; font-size: .82rem; }
.history-order-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  width: 100%;
  min-height: 4.55rem;
  padding: .72rem .9rem;
  border: 0;
  border-bottom: 1px solid #e8ece7;
  color: var(--ink);
  background: #fff;
  gap: .8rem;
  text-align: left;
}
.history-order-row:last-child { border-bottom: 0; }
.history-order-row:hover { background: #fffaf7; }
.history-order-identity { display: grid; min-width: 0; gap: .18rem; }
.history-order-identity strong { overflow-wrap: anywhere; }
.history-order-identity span { color: var(--muted); font-size: .75rem; }
.history-order-value { display: grid; justify-items: end; gap: .25rem; }
.history-order-arrow { color: #929b94; font-size: 1.45rem; }
.rating-card {
  display: grid;
  padding: .9rem 1rem;
  border: 1px solid #eadfce;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 8px 24px rgb(58 42 29 / 5%);
  gap: .55rem;
}
.rating-card-heading { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.rating-card-heading strong { color: #665449; }
.rating-card-heading time { color: var(--muted); font-size: .72rem; }
.rating-card-stars { color: #f29a16; font-size: 1.12rem; letter-spacing: .05em; }
.rating-card-comment { margin: 0; color: #3e3935; line-height: 1.48; white-space: pre-wrap; overflow-wrap: anywhere; }
.restaurant-rating-icon { color: #f39a18; font-size: 1.45rem; line-height: 1; }
.restaurant-rating-copy { display: grid; grid-template-columns: auto auto; align-items: baseline; gap: .08rem .5rem; }
.restaurant-rating-label { grid-column: 1 / -1; color: #78685d; font-size: .66rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.restaurant-rating-value { font-size: 1.12rem; }
.restaurant-rating-count, .restaurant-rating-empty { color: #665b53; font-size: .75rem; }

.connection-banner {
  padding: .7rem 1.25rem;
  color: #704400;
  background: #fff2c9;
  text-align: center;
  font-size: .88rem;
  font-weight: 750;
}
.connection-banner-global { position: fixed; z-index: 50; inset: 0 0 auto; padding-top: max(.7rem, env(safe-area-inset-top)); }

.order-board {
  display: grid;
  grid-template-columns: minmax(17.5rem, 34fr) minmax(21rem, 47fr) minmax(15rem, 19fr);
  height: max(30rem, calc(100dvh - 11.8rem));
  min-height: 0;
  overflow: hidden;
  border: 1px solid #d5ddd4;
  border-radius: 1.1rem;
  background: rgb(249 250 247 / 86%);
  box-shadow: 0 16px 42px rgb(31 47 35 / 8%);
}
.new-order-bubble {
  position: fixed;
  z-index: 25;
  bottom: max(1rem, env(safe-area-inset-bottom));
  left: max(1rem, env(safe-area-inset-left));
  display: grid;
  width: 4.25rem;
  height: 4.25rem;
  padding: 0;
  border: .28rem solid rgb(255 255 255 / 88%);
  border-radius: 50%;
  color: #fff;
  background: #169b59;
  box-shadow: 0 14px 34px rgb(20 104 63 / 28%);
  cursor: pointer;
  font-size: 1.85rem;
  font-weight: 950;
  line-height: 1;
  place-items: center;
  transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.new-order-bubble:hover { background: #11864c; transform: translateY(-2px); }
.new-order-bubble:active { box-shadow: 0 8px 20px rgb(20 104 63 / 24%); transform: translateY(1px) scale(.97); }
.new-order-bubble:focus-visible { outline: 3px solid #172019; outline-offset: 3px; }
.new-order-bubble.has-arrived { animation: new-order-arrival 1.05s ease-out; }

@keyframes new-order-arrival {
  0% { box-shadow: 0 0 0 0 rgb(22 155 89 / 42%), 0 14px 34px rgb(20 104 63 / 28%); transform: scale(.72); }
  45% { box-shadow: 0 0 0 1.15rem rgb(22 155 89 / 0%), 0 16px 38px rgb(20 104 63 / 32%); transform: scale(1.08); }
  100% { box-shadow: 0 0 0 0 rgb(22 155 89 / 0%), 0 14px 34px rgb(20 104 63 / 28%); transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .new-order-bubble, .new-order-bubble:hover, .new-order-bubble:active, .new-order-bubble.has-arrived { animation: none; transform: none; }
}
.order-lane { display: flex; min-width: 0; min-height: 0; flex-direction: column; border-right: 1px solid #dfe4de; }
.lane-awaiting { background: linear-gradient(180deg, #fff9f5, #fbfaf7); }
.lane-preparing { background: linear-gradient(180deg, #f7faff, #f8faf7); }
.lane-ready { background: linear-gradient(180deg, #f5fbf6, #f8faf7); }
.order-lane:nth-child(3) { border-right: 0; }
.order-lane-heading {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.2rem;
  padding: .72rem .9rem;
  border-bottom: 1px solid #dfe4de;
  background: rgb(255 255 255 / 90%);
  backdrop-filter: blur(12px);
}
.order-lane-heading h3 { margin: 0; font-size: .84rem; letter-spacing: .1em; text-transform: uppercase; }
.lane-count {
  display: inline-grid;
  min-width: 1.7rem;
  height: 1.7rem;
  padding: 0 .4rem;
  border-radius: 999px;
  color: #5d675f;
  background: #eef1ed;
  font-size: .75rem;
  font-weight: 900;
  place-items: center;
}
.lane-awaiting .lane-count { color: #9b2b0a; background: #fff0e9; }
.lane-preparing .lane-count { color: #265ea9; background: #eaf2ff; }
.lane-ready .lane-count { color: #17663c; background: #e8f7ee; }
.order-lane-list {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  padding: .85rem;
  overflow-y: auto;
  flex-direction: column;
  gap: .8rem;
  overscroll-behavior: contain;
  scrollbar-color: #c8cfc8 transparent;
  scrollbar-width: thin;
}
.lane-empty {
  display: grid;
  flex: 1 1 auto;
  min-height: 13rem;
  padding: 1.5rem;
  border: 1px dashed #cfd8ce;
  border-radius: 1rem;
  color: #536057;
  background:
    linear-gradient(145deg, rgb(255 255 255 / 88%), rgb(250 251 248 / 72%));
  text-align: center;
  place-content: center;
}
.lane-empty p { margin: .3rem 0 0; font-size: .78rem; }
.lane-empty-icon { margin-bottom: .6rem; color: #9ba49c; font-size: 1.8rem; }

.order-card {
  padding: .95rem;
  border: 1px solid #dbe1db;
  border-top: 4px solid #9aa39c;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 7px 20px rgb(37 53 41 / 6%);
}
.order-card.status-awaiting_restaurant { border-top-color: var(--orange); }
.order-card.status-accepted, .order-card.status-preparing { border-top-color: var(--blue); }
.order-card.status-ready_for_pickup { border-top-color: var(--green); }
.order-card.status-collected { border-top-color: #d49a24; }
.order-card.status-rejected, .order-card.status-missed, .order-card.status-cancelled { border-top-color: #9ca39e; }
.order-header, .order-total, .order-items > li { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.order-header h3 { margin: 0; overflow-wrap: anywhere; font-size: 1rem; }
.order-header-actions { display: grid; justify-items: end; gap: .38rem; }
.order-detail-button {
  min-height: 2rem;
  padding: .34rem .62rem;
  border: 1px solid #d8dfd8;
  border-radius: 999px;
  color: #39453c;
  background: #fff;
  font-size: .7rem;
  font-weight: 800;
}
.order-detail-button:hover { border-color: #b9c5ba; background: #f7f9f6; }
.order-number { margin: 0 0 .18rem; color: #5b655d; font-size: .78rem; font-weight: 900; letter-spacing: .08em; }
.status-chip { padding: .38rem .58rem; border-radius: 999px; color: #49534b; background: #edf0ed; font-size: .7rem; font-weight: 850; white-space: nowrap; }
.status-chip-awaiting_restaurant { color: #a72e09; background: #fff0e9; }
.status-chip-accepted, .status-chip-preparing { color: #245da9; background: #eaf2ff; }
.status-chip-ready_for_pickup { color: #16653b; background: #e8f7ee; }
.status-chip-collected { color: #76520a; background: #fff3d4; }
.order-timing { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin: .7rem 0; color: var(--muted); font-size: .74rem; }
.order-minute-badge {
  display: inline-grid;
  flex: 0 0 auto;
  place-content: center;
  inline-size: clamp(3.4rem, 4.5vw, 4rem);
  aspect-ratio: 1;
  padding: .18rem;
  border: 3px solid currentColor;
  border-radius: 50%;
  color: #168552;
  background: #f0fbf5;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}
.order-minute-value { font-size: clamp(1.05rem, 1.7vw, 1.28rem); font-weight: 900; }
.order-minute-unit {
  display: block;
  margin-top: .12rem;
  color: currentColor;
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .02em;
}
.order-minute-badge.is-wide .order-minute-value { font-size: clamp(.88rem, 1.35vw, 1.05rem); }
.deadline.is-overdue { color: #b42323; background: #fff0f0; }
.order-items { display: grid; gap: .52rem; margin: .8rem 0; padding: 0; list-style: none; }
.order-items > li { align-items: start; }
.order-items strong { white-space: nowrap; }
.order-item-copy { display: grid; min-width: 0; gap: .28rem; }
.order-item-copy > span { overflow-wrap: anywhere; font-weight: 720; }
.order-options { display: grid; gap: .15rem; margin: 0; padding-left: 1.1rem; color: var(--muted); font-size: .75rem; }
.order-options li { display: list-item; }
.order-note { margin: .2rem 0 0; color: #714c18; font-size: .78rem; line-height: 1.45; overflow-wrap: anywhere; }
.order-customer-note { margin: 0 0 .8rem; padding: .7rem .78rem; border-radius: .65rem; background: #fff5df; }
.order-fulfillment {
  display: grid;
  gap: .55rem;
  margin: .72rem 0;
  padding: .72rem .78rem;
  border: 1px solid #dfe5df;
  border-radius: .78rem;
  background: #f8faf7;
}
.order-fulfillment.is-delivery { border-color: #ffd4c5; background: #fff8f4; }
.order-fulfillment.is-pickup { border-color: #cfe6d6; background: #f5fbf7; }
.order-fulfillment-heading { display: flex; align-items: center; gap: .45rem; }
.order-fulfillment-icon { font-size: 1rem; }
.order-fulfillment-heading strong { font-size: .82rem; }
.order-fulfillment-row { display: grid; gap: .12rem; min-width: 0; }
.order-fulfillment-label { color: #667168; font-size: .66rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.order-fulfillment-value { margin: 0; overflow-wrap: anywhere; color: #2f3931; font-size: .78rem; line-height: 1.42; }
.order-fulfillment-note { color: #714c18; }
.order-payment-status { color: #704400; }
.order-phone-value { display: flex; align-items: center; min-height: 2.2rem; flex-wrap: wrap; gap: .45rem; }
.order-phone-reveal, .order-phone-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.2rem;
  padding: .42rem .65rem;
  border: 1px solid #cfe1d3;
  border-radius: .62rem;
  color: #16653b;
  background: #f3faf5;
  font-size: .76rem;
  font-weight: 850;
  text-decoration: none;
}
.order-history-privacy { margin: .05rem 0 0; color: var(--muted); font-size: .72rem; line-height: 1.4; }
.order-phone-error { color: #a92323; font-size: .72rem; line-height: 1.35; }
.order-total { padding-top: .75rem; border-top: 1px solid #e2e6e1; }
.order-total:has(small) { flex-wrap: wrap; }
.order-total > small { flex-basis: 100%; font-size: .75rem; line-height: 1.45; color: #596257; }
.order-review {
  display: grid;
  gap: .45rem;
  margin-top: .78rem;
  padding: .75rem .8rem;
  border: 1px solid #f0d5a3;
  border-radius: .78rem;
  background: #fffaf0;
}
.order-review-heading { display: flex; align-items: center; justify-content: space-between; gap: .7rem; font-size: .8rem; }
.order-review-stars { color: #f29a16; font-size: .95rem; letter-spacing: .04em; white-space: nowrap; }
.order-review-comment { margin: 0; overflow-wrap: anywhere; color: #443b34; font-size: .78rem; line-height: 1.45; white-space: pre-wrap; }
.order-review-time { color: #7a7068; font-size: .68rem; }
.order-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; margin-top: .8rem; }
.order-actions .button, .prep-select { min-width: 0; min-height: 2.7rem; }
.order-actions .button-primary { grid-column: 1 / -1; }
.prep-select { width: 100%; }
.menu-shell, .hours-card, .empty-state {
  border: 1px solid #d9dfd8;
  border-radius: 1.2rem;
  background: #fff;
  box-shadow: 0 10px 32px rgb(31 47 35 / 6%);
}
.menu-shell { overflow: hidden; }
.menu-segments {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .35rem;
  margin: .9rem;
  padding: .3rem;
  border: 1px solid #dce2dc;
  border-radius: 1rem;
  background: #f5f7f4;
}
.menu-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 3.15rem;
  border: 0;
  border-radius: .75rem;
  color: #626c64;
  background: transparent;
  font-weight: 850;
}
.menu-segment.is-active { color: #fff; background: var(--orange-dark); box-shadow: 0 5px 14px rgb(217 56 8 / 18%); }
.menu-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0 .9rem .9rem; }
.menu-toolbar:empty { display: none; }
.menu-back {
  flex: 0 0 auto;
  min-height: 2.75rem;
  padding: .55rem .75rem;
  border: 1px solid #d8ded8;
  border-radius: .75rem;
  color: #374139;
  background: #fff;
  font-weight: 800;
}
.menu-search { position: relative; flex: 1 1 28rem; max-width: 42rem; }
.menu-search input { padding-left: 2.5rem; background: #fbfcfa; }
.search-icon { position: absolute; z-index: 1; left: .9rem; top: 50%; color: #737d75; font-size: 1.1rem; transform: translateY(-50%); }
.menu-readonly-note { margin: 0; color: var(--muted); font-size: .8rem; line-height: 1.4; text-align: right; }
.menu-list { border-top: 1px solid #e0e5df; }
.menu-nav-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  min-height: 5.15rem;
  padding: .8rem 1.1rem;
  border: 0;
  border-bottom: 1px solid #e6eae5;
  color: var(--ink);
  background: #fff;
  gap: .9rem;
  text-align: left;
}
button.menu-nav-row:hover { background: #fffaf7; }
.menu-nav-row:last-child { border-bottom: 0; }
.menu-row-icon, .availability-mark {
  display: grid;
  width: 2.85rem;
  height: 2.85rem;
  overflow: hidden;
  border-radius: .8rem;
  color: #c43b10;
  background: #fff0e9;
  font-size: 1.15rem;
  font-weight: 900;
  place-items: center;
}
.menu-row-copy { display: grid; min-width: 0; gap: .24rem; }
.menu-row-copy strong { overflow: hidden; font-size: 1rem; text-overflow: ellipsis; white-space: nowrap; }
.menu-row-copy .muted { font-size: .78rem; }
.menu-row-arrow { color: #8a948c; font-size: 1.65rem; }
.menu-dish-row { grid-template-columns: auto minmax(0, 1fr) auto auto; }
.menu-price { color: #b4320b; white-space: nowrap; }
.availability-mark { border-radius: .85rem; }
.menu-product-thumbnail.has-item-image { background: #f4f5f1; }
.menu-product-thumbnail .menu-product-image { object-fit: cover; }
.availability-mark img, .availability-option-icon img, .availability-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tone-available { color: #187243; background: #e6f6ed; }
.tone-today { color: #9b6000; background: #fff3d9; }
.tone-indefinite { color: #a52828; background: #fde9e9; }
.tone-hidden { color: #59635b; background: #edf0ed; }
.modifier-group-row {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 0 .75rem 0 0;
  gap: .25rem;
}
.modifier-group-availability {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  min-height: 5.15rem;
  padding: .8rem 1.1rem;
  border: 0;
  color: inherit;
  background: transparent;
  gap: .9rem;
  text-align: left;
}
.modifier-group-open {
  display: flex;
  align-items: center;
  min-height: 2.85rem;
  padding: .45rem .65rem;
  border: 1px solid #dde3dc;
  border-radius: .72rem;
  color: #657067;
  background: #f8faf7;
  gap: .3rem;
  font-size: .76rem;
  font-weight: 850;
}
.modifier-group-availability:hover, .modifier-group-open:hover { background: #fff6f1; }
.modifier-group-availability:focus-visible, .modifier-group-open:focus-visible { outline-offset: 2px; }
.modifier-open-label { white-space: nowrap; }
.modifier-group-open .menu-row-arrow { line-height: .8; }
.modifier-option-row { grid-template-columns: auto minmax(0, 1fr) auto auto; }

.availability-dialog, .reject-dialog, .order-detail-dialog, .install-help-dialog {
  width: min(calc(100% - 2rem), 43rem);
  max-height: min(90dvh, 48rem);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid #d8ded8;
  border-radius: 1.35rem;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 28px 90px rgb(25 35 28 / 28%);
}
.availability-dialog::backdrop, .reject-dialog::backdrop, .order-detail-dialog::backdrop, .install-help-dialog::backdrop { background: rgb(25 31 27 / 52%); backdrop-filter: blur(3px); }
.app-install-login { margin-top: 1.15rem; padding-top: 1.15rem; border-top: 1px solid var(--line); }
.app-install-login .app-install-button { display: flex; justify-content: center; gap: .6rem; width: 100%; }
.app-install-note { margin: .75rem 0 0; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.install-help-dialog { width: min(calc(100% - 2rem), 34rem); }
.install-help-content { padding: 1.1rem 1.35rem 0; overflow-wrap: anywhere; line-height: 1.55; }
.install-help-content p { margin: 0 0 1rem; }
.install-help-content h3 { margin: 1rem 0 .6rem; font-size: 1rem; }
.install-help-content ol { margin: 0 0 1.1rem; padding-left: 1.4rem; }
.install-help-content li + li { margin-top: .65rem; }
.install-help-content .app-install-note { padding: .9rem; border-radius: .8rem; background: #fff3e9; color: #754622; }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; gap: 1rem; padding: 1.25rem 1.35rem; border-bottom: 1px solid #e0e5df; }
.dialog-heading h2 { overflow-wrap: anywhere; }
.availability-dialog-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}
.dialog-heading-copy { min-width: 0; }
.availability-media {
  width: 5rem;
  height: 5rem;
  overflow: hidden;
  border: 1px solid #dce4dc;
  border-radius: 1.15rem;
  background: #f5f8f4;
  box-shadow: 0 8px 22px rgb(45 61 49 / 10%);
}
.availability-media[hidden] { display: none; }
.availability-media-art { display: block; width: 100%; height: 100%; }
.availability-media.has-item-image { border-color: rgb(253 85 22 / 24%); }
.availability-media.has-item-image img { object-fit: contain; background: #fff; }
.dialog-close {
  display: grid;
  flex: 0 0 auto;
  width: 2.9rem;
  height: 2.9rem;
  border: 0;
  border-radius: 999px;
  color: #4b554d;
  background: #eef1ed;
  font-size: 1.65rem;
  place-items: center;
}
.availability-options { display: grid; padding: .15rem 1.35rem; }
.availability-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: 6.4rem;
  padding: 1rem .2rem;
  border: 0;
  border-bottom: 1px solid #e2e7e1;
  color: var(--ink);
  background: #fff;
  gap: 1rem;
  text-align: left;
}
.availability-option:last-child { border-bottom: 0; }
.availability-option[aria-checked="true"] { background: linear-gradient(90deg, rgb(253 85 22 / 5%), transparent 64%); }
.availability-option-icon { display: grid; width: 3.65rem; height: 3.65rem; overflow: hidden; border: 0; border-radius: 1rem; place-items: center; }
.availability-option.tone-available .availability-option-icon { border: 0; color: #187243; background: #e6f6ed; }
.availability-option.tone-today .availability-option-icon { border: 0; color: #9b6000; background: #fff3d9; }
.availability-option.tone-indefinite .availability-option-icon { border: 0; color: #a52828; background: #fde9e9; }
.availability-option.tone-hidden .availability-option-icon { border: 0; color: #59635b; background: #edf0ed; }
.availability-copy { display: grid; gap: .3rem; }
.availability-copy strong { font-size: 1rem; }
.availability-copy span { color: var(--muted); font-size: .8rem; line-height: 1.4; }
.availability-radio { color: var(--orange-dark); font-size: 1.35rem; }
.dialog-help { margin: 0; padding: .9rem 1.35rem 1.2rem; color: var(--muted); font-size: .78rem; }
.reject-dialog form { margin: 0; }
.reject-reason { padding: 1.2rem 1.35rem 0; }
.dialog-actions { display: flex; justify-content: flex-end; gap: .65rem; padding: 1rem 1.35rem 1.35rem; }
.order-detail-dialog { width: min(calc(100% - 2rem), 48rem); }
.order-detail-content { display: grid; gap: 1rem; padding: 1.15rem 1.35rem .25rem; }
.order-detail-summary { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.order-detail-summary p { margin: 0; color: var(--muted); font-size: .8rem; }
.order-detail-summary-meta { display: flex; align-items: center; justify-content: flex-end; gap: .65rem; }
.order-detail-section { display: grid; gap: .55rem; }
.order-detail-section > h3 { margin: 0; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; }
.order-detail-content .order-items { margin: 0; padding: .85rem; border: 1px solid #e0e5df; border-radius: .8rem; }
.order-detail-content .order-total { padding: .9rem .1rem 0; }
.order-detail-actions { padding-top: .8rem; }

.hours-card { padding: 1.15rem; }
.hours-fields { display: grid; gap: .65rem; }
.hours-row { grid-template-columns: minmax(7rem, 10rem) 1fr; align-items: center; }
.field-help { color: var(--muted); font-size: .78rem; line-height: 1.45; }
.hours-card .button { margin-top: .65rem; }
.empty-state { padding: 2rem; text-align: center; }

.toast {
  position: fixed;
  z-index: 60;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  max-width: min(26rem, calc(100vw - 2rem));
  padding: .9rem 1rem;
  border-radius: .85rem;
  color: #fff;
  background: #1d2921;
  box-shadow: var(--shadow);
  font-weight: 750;
}
.toast.is-error { background: #922b2b; }

@media (max-width: 1180px) {
  .restaurant-brand h1 { max-width: 36vw; }
}

@media (max-width: 900px) {
  .order-board {
    grid-auto-columns: minmax(20rem, 84vw);
    grid-auto-flow: column;
    grid-template-columns: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-color: #c8cfc8 transparent;
    scrollbar-width: thin;
  }
  .order-lane { grid-column: auto; scroll-snap-align: start; }
  .order-lane { border-right: 1px solid #dfe4de; }
  .history-list { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .topbar { gap: .55rem; padding-inline: max(.65rem, env(safe-area-inset-left)) max(.65rem, env(safe-area-inset-right)); }
  .restaurant-brand h1 { max-width: 42vw; }
  .app-menu {
    position: fixed;
    top: calc(env(safe-area-inset-top) + 4.45rem);
    right: max(.6rem, env(safe-area-inset-right));
    left: max(.6rem, env(safe-area-inset-left));
    width: auto;
    max-height: calc(100dvh - env(safe-area-inset-top) - 5.1rem);
  }
  .workspace { padding: .55rem max(.55rem, env(safe-area-inset-right)) 0 max(.55rem, env(safe-area-inset-left)); }
  .section-heading { align-items: stretch; flex-direction: column; }
  .board-heading { align-items: center; flex-direction: row; }
  .section-actions { justify-content: space-between; }
  .menu-toolbar { align-items: stretch; flex-direction: column; }
  .menu-search { max-width: none; }
  .menu-readonly-note { text-align: left; }
  .modifier-open-label { display: none; }
  .hours-row { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .connection-pill { display: none; }
  .restaurant-brand h1 { max-width: 50vw; }
}

@media (max-width: 560px) {
  .topbar { min-height: 4.25rem; }
  .restaurant-brand-mark { width: 2.75rem; height: 2.75rem; }
  .restaurant-brand h1 { max-width: 48vw; font-size: 1rem; }
  .restaurant-location { display: none; }
  .operational-pill, .operational-toggle { padding-inline: .55rem; font-size: .7rem; }
  .board-heading .section-actions { display: grid; grid-template-columns: 1fr; }
  .board-heading h2 { display: none; }
  .restaurant-rating-summary { width: 100%; }
  .order-board { height: max(28rem, calc(100dvh - 11rem)); grid-auto-columns: calc(100vw - 1.1rem); border-radius: 1rem; }
  .menu-segment { min-height: 3rem; }
  .menu-nav-row { min-height: 4.7rem; padding: .75rem; gap: .65rem; }
  .modifier-group-row { padding: 0 .5rem 0 0; gap: .15rem; }
  .modifier-group-availability { min-height: 4.7rem; padding: .7rem .75rem; gap: .65rem; }
  .modifier-group-open { min-width: 2.55rem; padding-inline: .45rem; justify-content: center; }
  .menu-row-icon, .availability-mark { width: 2.55rem; height: 2.55rem; }
  .menu-price { font-size: .82rem; }
  .availability-dialog, .reject-dialog, .order-detail-dialog {
    width: 100%;
    max-width: none;
    max-height: calc(100dvh - env(safe-area-inset-top));
    margin: auto 0 0;
    border-width: 1px 0 0;
    border-radius: 1.25rem 1.25rem 0 0;
  }
  .availability-options { padding-inline: 1rem; }
  .order-detail-summary { align-items: flex-start; flex-wrap: wrap; }
  .order-detail-summary > div:first-child { flex: 1 1 10rem; min-width: 0; }
  .order-detail-summary-meta { flex: 0 0 auto; flex-wrap: wrap; }
  .availability-option { min-height: 5.7rem; gap: .75rem; }
  .availability-dialog-heading { padding: 1rem; gap: .75rem; }
  .availability-dialog-heading h2 { font-size: 1.25rem; }
  .availability-media { width: 4rem; height: 4rem; border-radius: .95rem; }
  .availability-option-icon { width: 3.15rem; height: 3.15rem; border-radius: .85rem; }
  .dialog-actions { display: grid; grid-template-columns: 1fr; }
  .dialog-actions .button { width: 100%; }
}

@media (max-width: 390px) {
  .auth-layout { padding: max(.8rem, env(safe-area-inset-top)) max(.75rem, env(safe-area-inset-right)) max(.8rem, env(safe-area-inset-bottom)) max(.75rem, env(safe-area-inset-left)); }
  .auth-card { padding: 1.25rem; border-radius: 1.25rem; }
  .auth-card h1 { font-size: 1.75rem; }
  .brand-mark { width: min(11.5rem, 62vw); height: auto; margin-bottom: 1rem; }
  .stack { margin-top: 1.15rem; }
  .button { min-height: 3rem; }
  .restaurant-brand .eyebrow { font-size: .55rem; letter-spacing: .1em; }
  .restaurant-brand h1 { max-width: calc(100vw - 11rem); }
  .operational-pill { width: 2.35rem; padding-inline: 0; justify-content: center; }
  .operational-pill .status-copy { display: none; }
  .app-menu-toggle { width: 2.65rem; height: 2.65rem; }
  .menu-row-copy strong { font-size: .92rem; }
  .menu-row-copy .muted { font-size: .72rem; }
  .order-actions { grid-template-columns: 1fr; }
  .order-actions .button-primary { grid-column: auto; }
}

@media (max-width: 340px) {
  .restaurant-brand { gap: .5rem; }
  .restaurant-brand-mark { width: 2.625rem; height: 2.625rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .button, .tab, .app-menu-action, .app-menu-toggle, .menu-nav-row, .menu-segment, .availability-option { transition: background-color 140ms ease, color 140ms ease, transform 140ms ease; }
  .button:active, .menu-nav-row:active, .availability-option:active { transform: translateY(1px); }
}

@media (prefers-reduced-motion: reduce) {
  .topbar, .app-menu-toggle > span { transition: none; }
}

/* Fixed restaurant workstation shell. The page and the three-column board do
   not move; each order lane and every secondary panel owns its own scrolling. */
body.is-restaurant-workstation {
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}
.app-layout {
  display: flex;
  width: 100%;
  height: 100dvh;
  min-height: 0;
  padding-bottom: 0;
  overflow: hidden;
  flex-direction: column;
  background: #09100d;
}
.topbar {
  position: relative;
  top: auto;
  flex: 0 0 auto;
  min-height: 4.65rem;
  border-bottom-color: #24312b;
  color: #f8fbf9;
  background: #121c18;
  box-shadow: none;
  transform: none;
  backdrop-filter: none;
  will-change: auto;
}
.topbar.is-hidden { box-shadow: none; transform: none; }
.restaurant-brand h1 { max-width: min(52vw, 32rem); margin: 0; color: #f8fbf9; }
.restaurant-brand-mark { border-color: #38463f; box-shadow: none; }
.topbar .connection-pill,
.topbar .operational-pill {
  border-color: #33433b;
  color: #d8e0dc;
  background: #18241f;
}
.connection-pill.is-connected .status-dot {
  background: #22b66f;
  box-shadow: 0 0 0 4px rgb(34 182 111 / 14%);
}
.connection-pill.is-checking .status-dot {
  background: #f0a91a;
  box-shadow: 0 0 0 4px rgb(240 169 26 / 13%);
}
.connection-pill.is-disconnected .status-dot {
  background: #ef334f;
  box-shadow: 0 0 0 4px rgb(239 51 79 / 13%);
}
.operational-pill { cursor: pointer; }
.operational-pill.is-online .status-dot,
.operational-toggle.is-online .status-dot { background: #16a566; }
.operational-pill.is-busy .status-dot,
.operational-toggle.is-busy .status-dot { background: #ffad0d; }
.operational-pill.is-offline .status-dot,
.operational-toggle.is-offline .status-dot { background: #ef173c; }
.operational-toggle-status { margin-left: auto; opacity: .7; }
.app-menu-toggle {
  border-color: #38463f;
  color: #f7faf8;
  background: #1a2822;
  box-shadow: none;
}
.workspace {
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  padding: .65rem max(.65rem, env(safe-area-inset-right)) max(.65rem, env(safe-area-inset-bottom)) max(.65rem, env(safe-area-inset-left));
  overflow: hidden;
  overscroll-behavior: contain;
}
#orders-panel { display: block; height: 100%; min-height: 0; overflow: hidden; }
.workspace > .panel:not(#orders-panel) {
  height: 100%;
  min-height: 0;
  align-content: start;
  padding: .85rem;
  padding-bottom: max(.65rem, env(safe-area-inset-bottom));
  border-radius: .9rem;
  color: var(--ink);
  background: #f6f7f4;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: #405048 transparent;
  scrollbar-width: thin;
}
.order-board {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border: 1px solid #26332d;
  border-radius: 1.15rem;
  color: #f5f8f6;
  background: #0c1411;
  box-shadow: none;
  grid-template-columns: minmax(0, 34fr) minmax(0, 47fr) minmax(0, 19fr);
}
.order-lane {
  min-width: 0;
  min-height: 0;
  border-right-color: #26332d;
  background: #0c1411;
}
.lane-awaiting,
.lane-preparing,
.lane-ready { background: #0c1411; }
.order-lane-heading {
  position: relative;
  flex: 0 0 auto;
  min-height: 3.2rem;
  border-bottom-color: #26332d;
  color: #f5f8f6;
  background: #101a16;
  backdrop-filter: none;
}
.order-lane-heading h3 { font-size: clamp(.66rem, 1vw, .84rem); }
.lane-count,
.lane-awaiting .lane-count,
.lane-preparing .lane-count,
.lane-ready .lane-count {
  color: #d6dfda;
  background: #26352e;
}
.order-lane-list {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #405048 transparent;
  scrollbar-width: thin;
}
.lane-empty {
  min-height: 0;
  border-color: #2e3d36;
  color: #9eaaa4;
  background: #0f1814;
}
.lane-empty strong { color: #b9c3be; }
.lane-empty-icon { color: #67746d; }
.order-lane-list > .order-card { color: #172019; }
.app-language-field {
  margin-top: .55rem;
  padding: .65rem .2rem .2rem;
  border-top: 1px solid #e0e5de;
  gap: .35rem;
}
.app-language-field span { color: #59635b; font-size: .72rem; }
.app-language-field select { min-height: 2.65rem; }

.operational-dialog {
  width: min(calc(100% - 1.25rem), 42rem);
  max-height: calc(100dvh - max(.75rem, env(safe-area-inset-top)));
  margin: auto auto 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 1.35rem 1.35rem 0 0;
  color: #172019;
  background: #fff;
  box-shadow: 0 -18px 70px rgb(0 0 0 / 28%);
}
.operational-dialog::backdrop { background: rgb(2 8 5 / 68%); backdrop-filter: blur(2px); }
.operational-sheet { max-height: inherit; padding-bottom: max(.7rem, env(safe-area-inset-bottom)); overflow: auto; }
.operational-sheet-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  padding: 1.15rem 1.25rem .75rem;
  gap: 1rem;
}
.operational-sheet-heading h2 { font-size: 1.3rem; }
.operational-sheet-heading p { margin: .25rem 0 0; color: #68736c; font-size: .8rem; }
.operational-mode-options { display: grid; padding: 0 1.15rem; }
.operational-mode-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: 5.25rem;
  padding: .85rem .15rem;
  border: 0;
  border-bottom: 1px solid #e3e8e4;
  color: #172019;
  background: #fff;
  gap: .8rem;
  text-align: left;
}
.operational-mode-option:last-child { border-bottom: 0; }
.operational-mode-option[aria-checked="true"] { background: linear-gradient(90deg, rgb(24 154 91 / 5%), transparent); }
.operational-mode-dot { width: .85rem; height: .85rem; border-radius: 999px; }
.operational-mode-option.is-online .operational-mode-dot { background: #13a364; }
.operational-mode-option.is-busy .operational-mode-dot { background: #ffad0d; }
.operational-mode-option.is-offline .operational-mode-dot { background: #ef173c; }
.operational-mode-copy { display: grid; gap: .2rem; }
.operational-mode-copy strong { font-size: 1rem; }
.operational-mode-copy small { color: #737d77; font-size: .77rem; }
.operational-mode-radio { color: #647068; font-size: 1.35rem; }
.operational-busy-controls {
  display: grid;
  margin: .35rem 1.15rem 0;
  padding: .95rem;
  border: 1px solid #f0d596;
  border-radius: 1rem;
  background: #fff9ea;
  gap: .8rem;
}
.operational-busy-controls label {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .75rem;
}
.operational-busy-input { display: flex; align-items: center; gap: .4rem; }
.operational-busy-input select { width: 5.5rem; min-height: 2.55rem; }
.operational-busy-apply { color: #fff; background: #198f59; }
.operational-busy-apply:hover { background: #117a49; }

@media (max-width: 620px) {
  .topbar { min-height: 4.25rem; }
  .connection-pill {
    display: inline-flex;
    width: 2.35rem;
    padding-inline: 0;
    justify-content: center;
  }
  .connection-pill .status-copy { display: none; }
  .restaurant-brand h1 { max-width: calc(100vw - 11rem); font-size: 1rem; }
  .workspace { padding: 0; }
  .order-board { border-width: 0; border-radius: 0; }
  .new-order-bubble { bottom: max(4.6rem, calc(env(safe-area-inset-bottom) + 4.1rem)); }
  .operational-dialog { width: 100%; max-width: none; }
}

@media (max-width: 900px) {
  .order-board {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: minmax(0, 36fr) minmax(0, 40fr) minmax(0, 24fr);
    overflow: hidden;
    scroll-snap-type: none;
  }
  .order-lane { grid-column: auto; scroll-snap-align: none; }
  .order-lane-list { padding: .55rem; gap: .55rem; }
  .order-card { padding: .7rem; }
}

/* Compact live-order cards. The board stays fixed while a card acts as one
   large, accessible control that opens the complete order. */
.order-card.order-card-compact {
  position: relative;
  padding: 0;
  overflow: hidden;
}
.order-card-open {
  display: grid;
  width: 100%;
  min-width: 0;
  padding: .72rem .78rem .76rem;
  border: 0;
  color: inherit;
  background: transparent;
  gap: .42rem;
  text-align: left;
}
.order-card-open:hover { background: #f7faf7; }
.order-card-open:active { background: #f0f5f1; }
.order-card-open:focus-visible {
  outline: 3px solid rgb(253 85 22 / 34%);
  outline-offset: -3px;
}
.order-compact-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  min-width: 0;
  gap: .55rem;
}
.order-compact-identity {
  display: grid;
  min-width: 0;
  gap: .08rem;
}
.order-compact-identity .order-number { margin: 0; }
.order-compact-identity h3 {
  margin: 0;
  overflow: hidden;
  font-size: clamp(.78rem, 1.1vw, .96rem);
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.order-compact-heading .status-chip {
  flex: 0 1 auto;
  max-width: 50%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.order-compact-timing {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  color: #657068;
  gap: .55rem;
  font-size: .7rem;
}
.order-compact-timing > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.order-compact-timing > .order-minute-badge { margin-left: auto; }
.order-compact-facts {
  display: flex;
  align-items: center;
  min-width: 0;
  padding-top: .4rem;
  border-top: 1px solid #e5e9e5;
  color: #59645c;
  gap: .35rem .55rem;
  font-size: .7rem;
  white-space: nowrap;
}
.order-compact-facts > span:not(.order-card-arrow) {
  overflow: hidden;
  text-overflow: ellipsis;
}
.order-compact-facts > strong {
  margin-left: auto;
  color: #172019;
  font-size: .78rem;
}
.order-card-arrow {
  flex: 0 0 auto;
  color: #68736c;
  font-size: 1.35rem;
  font-weight: 500;
  line-height: .75;
}
.order-card.is-alerting {
  border-color: #ee7347;
  border-top-color: #e64216;
  animation: order-card-attention 1.6s ease-in-out infinite;
}
.order-card.is-alerting .order-card-open {
  background: linear-gradient(135deg, #fff9f5, #fff);
}
.order-card.is-alerting .status-chip {
  color: #fff;
  background: #d94318;
}
@keyframes order-card-attention {
  0%, 100% { box-shadow: 0 7px 20px rgb(37 53 41 / 6%), 0 0 0 0 rgb(238 90 38 / 0%); }
  50% { box-shadow: 0 10px 26px rgb(197 59 19 / 16%), 0 0 0 4px rgb(238 90 38 / 14%); }
}

/* The decision area belongs to the detail view, keeping the live board calm. */
.order-detail-decision {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: .9rem;
  border: 1px solid #dfe6df;
  border-radius: .95rem;
  background: #f7faf7;
  gap: .65rem;
}
.order-detail-decision > .button { width: 100%; min-width: 0; }
.order-detail-decision > .button-primary { grid-column: 1 / -1; }
.order-detail-decision .button-primary,
.order-accept-actions .button-primary { background: #198f59; }
.order-detail-decision .button-primary:hover,
.order-accept-actions .button-primary:hover { background: #117a49; }
.order-preparation-suggestion {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  padding: .72rem .8rem;
  border: 1px solid #cfe4d6;
  border-radius: .75rem;
  color: #345241;
  background: #eef8f1;
  gap: .75rem;
  font-size: .78rem;
}
.order-preparation-suggestion strong {
  flex: 0 0 auto;
  color: #146d43;
  font-size: .95rem;
  white-space: nowrap;
}

/* Preparation-time picker: suggested time plus exact five-minute choices. */
.order-accept-dialog {
  width: min(calc(100% - 2rem), 44rem);
  max-height: min(92dvh, 48rem);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #d8ded8;
  border-radius: 1.35rem;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 28px 90px rgb(25 35 28 / 32%);
}
.order-accept-dialog::backdrop {
  background: rgb(2 8 5 / 68%);
  backdrop-filter: blur(3px);
}
.order-accept-dialog form {
  display: flex;
  max-height: inherit;
  margin: 0;
  overflow: hidden;
  flex-direction: column;
}
.order-accept-heading { flex: 0 0 auto; }
.order-accept-heading > div { min-width: 0; }
.order-accept-heading h2 {
  max-width: 35rem;
  margin: 0;
  font-size: clamp(1.2rem, 3vw, 1.65rem);
  line-height: 1.18;
}
.order-accept-help {
  flex: 0 0 auto;
  margin: 0;
  padding: .85rem 1.35rem 0;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.45;
  text-align: center;
}
.order-accept-options {
  display: grid;
  flex: 1 1 auto;
  min-height: 0;
  padding: 1.15rem 1.35rem;
  overflow: auto;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .85rem;
  overscroll-behavior: contain;
  scrollbar-color: #c8cfc8 transparent;
  scrollbar-width: thin;
}
.preparation-minute {
  position: relative;
  display: grid;
  width: min(100%, 5.5rem);
  aspect-ratio: 1;
  min-height: 0;
  justify-self: center;
  padding: .4rem;
  border: 2px solid #d8ded9;
  border-radius: 50%;
  color: #172019;
  background: #fff;
  box-shadow: 0 5px 14px rgb(35 50 39 / 7%);
  gap: .08rem;
  place-content: center;
  text-align: center;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease, transform 140ms ease;
}
.preparation-minute:hover {
  border-color: #6ab38a;
  background: #f3faf5;
  transform: translateY(-1px);
}
.preparation-minute strong { font-size: clamp(1.12rem, 3vw, 1.45rem); line-height: 1; }
.preparation-minute small {
  max-width: 4.4rem;
  overflow: hidden;
  color: #51715f;
  font-size: .52rem;
  font-weight: 800;
  line-height: 1.05;
  text-overflow: ellipsis;
}
.preparation-minute.is-suggested:not(.is-selected) { border-color: #65a982; }
.preparation-minute.is-outside-grid {
  width: 100%;
  min-height: 4.7rem;
  aspect-ratio: auto;
  border-radius: 1rem;
  grid-column: 1 / -1;
}
.preparation-minute.is-selected,
.preparation-minute[aria-checked="true"] {
  border-color: #198f59;
  color: #fff;
  background: #198f59;
  box-shadow: 0 7px 18px rgb(25 143 89 / 25%);
}
.preparation-minute.is-selected small,
.preparation-minute[aria-checked="true"] small { color: #eafff1; }
.preparation-minute:focus-visible { outline-color: rgb(25 143 89 / 35%); }
.order-accept-actions {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  padding-top: .75rem;
  border-top: 1px solid #e0e5df;
  background: #fff;
}

@media (max-width: 900px) {
  .order-card.order-card-compact { padding: 0; }
  .order-card-open { padding: .62rem .65rem .68rem; }
  .order-compact-heading .status-chip { max-width: 46%; padding: .32rem .45rem; font-size: .62rem; }
  .order-compact-facts { gap: .28rem .4rem; font-size: .63rem; }
  .order-compact-facts > strong { font-size: .72rem; }
}

@media (max-width: 560px) {
  .order-accept-dialog {
    width: 100%;
    max-width: none;
    max-height: calc(100dvh - env(safe-area-inset-top));
    margin: auto 0 0;
    border-width: 1px 0 0;
    border-radius: 1.25rem 1.25rem 0 0;
  }
  .order-accept-heading { padding: 1rem; }
  .order-accept-heading h2 { font-size: 1.22rem; }
  .order-accept-help { padding: .72rem 1rem 0; }
  .order-accept-options { padding: .9rem 1rem; gap: .55rem; }
  .preparation-minute { width: min(100%, 4.75rem); padding: .28rem; }
  .preparation-minute small { max-width: 3.6rem; font-size: .45rem; }
  .order-accept-actions {
    grid-template-columns: 1fr;
    padding: .75rem 1rem max(1rem, env(safe-area-inset-bottom));
  }
  .order-accept-actions #order-accept-submit { order: -1; }
}

@media (max-width: 390px) {
  .order-detail-decision { grid-template-columns: 1fr; padding: .75rem; }
  .order-detail-decision > .button-primary,
  .order-preparation-suggestion { grid-column: auto; }
  .order-compact-heading { display: grid; }
  .order-compact-heading .status-chip { max-width: 100%; justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  .order-card.is-alerting { animation: none; box-shadow: 0 0 0 3px rgb(238 90 38 / 18%); }
  .preparation-minute { transition: none; }
  .preparation-minute:hover { transform: none; }
}
:root .order-courier-tracking { display: grid; gap: .3rem; margin-top: .6rem; padding: .8rem .9rem; border: 1px solid rgba(36,153,89,.25); border-radius: .85rem; background: rgba(36,153,89,.08); text-align: left; line-height: 1.45; }
:root .order-courier-tracking strong { font-size: .93rem; }:root .order-courier-tracking small { color: #687582; font-size: .8rem; }:root .order-courier-tracking.is-at_restaurant { border-color: #299759; background: rgba(36,153,89,.16); }
:root { --language-control-width: 152px; }
.global-language-field { position: fixed; z-index: 120; top: max(10px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); display: flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 12px; background: #fff; border: 1px solid #e1e5e1; box-shadow: 0 2px 8px #10281614; max-width: var(--language-control-width); }
.global-language-field > span, .dialog-language-field > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.global-language-field select, .dialog-language-field select { width: auto; min-height: 36px; padding: 6px 24px 6px 8px; font: inherit; background-color: #fff; color: #16261c; border: 1px solid #d2dbd4; border-radius: 8px; }
.dialog-language-field { display: flex; justify-content: flex-end; margin-bottom: 12px; }
body .topbar { padding-right: calc(var(--language-control-width) + 24px); }
body .auth-layout { padding-top: 76px; }
@media (max-width: 620px) { :root { --language-control-width: 118px; } .global-language-field { right: 8px; padding: 2px 4px; } .global-language-field select { font-size: 13px; max-width: 108px; } }

/* Planned orders remain visible without taking controls from the live lanes. */
.order-board:has(.lane-scheduled) {
  grid-template-columns: minmax(0, 29fr) minmax(0, 29fr) minmax(0, 18fr) minmax(0, 24fr);
}
.order-board:has(.lane-scheduled) .order-lane:nth-child(3) { border-right: 1px solid #26332d; }
.lane-scheduled { border-right: 0; }
.order-scheduled-time { display: block; color: #984513; font-size: .82rem; overflow-wrap: anywhere; }
.order-scheduled-notice { padding: .8rem; border-radius: .8rem; background: #fff2e7; color: #763710; }
.status-chip-scheduled { color: #984513; background: #fff0df; }
@media (max-width: 900px) {
  .order-board:has(.lane-scheduled) { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); }
  .order-board:has(.lane-scheduled) .order-lane { border-bottom: 1px solid #26332d; }
}
