/* Self-hosted Roboto — no Google Fonts round-trip on open */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/static/fonts/roboto-cyrillic-400.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/static/fonts/roboto-vietnamese-400.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/static/fonts/roboto-latin-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Costera Food — one design system for client, kitchen, courier and admin screens. */

:root {
  color-scheme: light;
  --font: 'Roboto', system-ui, sans-serif;
  --font-display: 'Roboto', system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 180ms;

  --bg: #f2f2f7;
  --surface: #ffffff;
  --fill: #f2f2f7;
  --fill-2: #e5e5ea;
  --line: #e5e5ea;
  --line-2: #d1d1d6;
  --ink: #1c1c1e;
  --ink-2: #3a3a3c;
  --muted: #8e8e93;
  --muted-2: #aeaeb2;
  --red: #ff3b30;
  --red-press: #d70015;
  --red-soft: #ffe5e3;
  --green: #34c759;
  --green-press: #248a3d;
  --green-soft: #e8f8ed;
  --amber: #ff9f0a;
  --amber-soft: #fff4e0;

  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 20px;
  --s6: 24px;
  --s8: 32px;
  --pad: 16px;

  --r-xs: 10px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 20px;
  --r-pill: 999px;

  --h-input: 48px;
  --h-btn: 50px;
  --h-btn-sm: 40px;

  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-md: 15px;
  --fs-base: 16px;
  --fs-lg: 17px;
  --fs-xl: 22px;
  --fs-2xl: 28px;
  --fs-money: 34px;

  --shadow-1: none;
  --shadow-2: none;
  --shadow-3: 0 8px 28px rgba(0, 0, 0, 0.12);

  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --tabbar-h: 62px;
  --tabbar-gap: 10px;
  --vnav-h: 56px;
}

/* Base ------------------------------------------------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

html, body, button, input, select, textarea, a, summary, label { -webkit-tap-highlight-color: transparent; }

/* Do NOT set overflow-x on html/body/.shell — it unpins position:sticky (search).
   Clip bleed on individual overflowing widgets instead.
   Merchant home: clip page sideways scroll without touching customer sticky. */
.shell {
  overflow-x: visible;
}
body.vendor,
body.vendor .shell {
  overflow-x: clip;
  max-width: 100%;
}
body.vendor .v-head {
  gap: 10px;
  max-width: 100%;
}
body.vendor .v-head h1 {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.vendor .v-card,
body.vendor .v-today,
body.vendor .group {
  max-width: 100%;
  overflow-wrap: anywhere;
}
body.vendor .pill-row.pill-scroll {
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--fs-base)/1.4 var(--font);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p { margin: 0; }

h1 { font-size: var(--fs-2xl); line-height: 1.15; font-weight: 750; letter-spacing: -0.02em; }
h2 { font-size: var(--fs-lg); line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: var(--fs-md); line-height: 1.3; font-weight: 600; }

a { color: inherit; text-decoration: none; }

img, table { max-width: 100%; }

button, input, select, textarea { font: inherit; color: inherit; }

button { cursor: pointer; }

button:disabled { cursor: default; opacity: 0.55; }

:focus { outline: none; }

:focus-visible { outline: 2px solid rgba(238, 42, 47, 0.45); outline-offset: 2px; }

input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }

[hidden] { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.muted { color: var(--muted); }
.small { font-size: var(--fs-sm); }
.strong { font-weight: 700; }
.center { text-align: center; justify-content: center; }

/* Page shells ----------------------------------------------------------------------------------- */

.shell {
  width: min(100%, 520px);
  margin: 0 auto;
  padding: calc(var(--s3) + var(--safe-t)) var(--pad) calc(var(--tabbar-h) + var(--tabbar-gap) + var(--s6) + var(--safe-b));
}

body.vendor .shell {
  padding: calc(var(--s4) + var(--safe-t)) var(--pad) calc(var(--vnav-h) + var(--s6) + var(--safe-b));
}
body.admin .shell,
body.print .shell { padding-bottom: calc(var(--s8) + var(--safe-b)); }
/* Courier tabbar must clear the pickup/deliver CTA — do not shrink below tab height. */
body.courier .shell {
  padding-bottom: calc(var(--tabbar-h) + var(--tabbar-gap) + var(--s8) + var(--safe-b));
}
body.admin .shell { width: min(100%, 1100px); }

body.chat .shell {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  flex-direction: column;
  padding-top: 0;
  padding-bottom: calc(72px + var(--safe-b));
}

/* Dish detail: topbar owns safe-area (WebViews often report inset 0). */
body.dish-page .shell {
  padding-top: 0;
}

.topbar {
  display: flex;
  align-items: center;
  min-height: 44px;
  margin: 0 calc(-1 * var(--pad)) var(--s2);
  padding: max(36px, calc(var(--safe-t) + var(--s2))) var(--pad) var(--s2);
  background: var(--bg);
}

.topbar .back {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  min-height: 0;
  margin: 0;
  flex: none;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-1);
  color: var(--ink);
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
}

.page-title { margin: var(--s2) 0 var(--s3); }

.prose { padding-top: var(--s2); }
.prose > h1 { margin: var(--s3) 0 var(--s2); }
.prose > p { margin: var(--s2) 0; }
.prose h2 { margin: var(--s6) 0 var(--s2); }

/* Back link: a round button, never a bare glyph */
.back {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  min-height: 40px;
  margin: var(--s1) 0 var(--s3);
  font-size: var(--fs-lg);
  font-weight: 700;
}

a.back:only-child, .chat-head .back, .hero-back {
  justify-content: center;
}

.chat-head .back,
.hero-back {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  min-height: 0;
  margin: 0;
  flex: none;
  border-radius: 50%;
  color: var(--red);
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
}

/* Shared glass chrome (tabbar, hearts, search, floating bars) ---------------------------------- */
.glass {
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 28px rgba(17, 17, 26, 0.14), 0 0 0 1px rgba(17, 17, 26, 0.04);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
}

/* Floating tab bar ------------------------------------------------------------------------------ */

.tabbar {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-gap) + var(--safe-b));
  z-index: 40;
  display: grid;
  width: min(488px, calc(100% - 24px));
  height: var(--tabbar-h);
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  padding: 0 var(--s1);
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 28px rgba(17, 17, 26, 0.14), 0 0 0 1px rgba(17, 17, 26, 0.04);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
}

.tab {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #8e8e93;
  font-size: 11px;
  font-weight: 500;
  line-height: 13px;
}

.tab-label { max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.tab.is-current { color: var(--red); font-weight: 600; }

.tab-icon {
  position: relative;
  display: grid;
  width: 44px;
  height: 30px;
  place-items: center;
  border-radius: var(--r-pill);
  transition: background-color 0.15s;
}

.tab.is-current .tab-icon { background: var(--red-soft); }

.tab svg, .vtab svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tab-badge {
  position: absolute;
  top: -4px;
  right: 2px;
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

/* Kitchen bottom bar: full-width red, like the original panel */
.vendor-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  display: grid;
  height: calc(var(--vnav-h) + var(--safe-b));
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding-bottom: var(--safe-b);
  background: var(--red);
}

.vtab {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 44px;
  min-width: 0;
  color: #fff;
}

.vtab.is-current::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 32px;
  height: 3px;
  margin-left: -16px;
  border-radius: 0 0 3px 3px;
  background: #ffd23f;
}

.vtab .tab-badge {
  top: 8px;
  right: calc(50% - 22px);
  border-color: var(--red);
  background: #ffd23f;
  color: var(--ink);
}

/* Inputs ---------------------------------------------------------------------------------------- */

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--h-input);
  padding: 0 6px 0 var(--s4);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.search.glass {
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 28px rgba(17, 17, 26, 0.14), 0 0 0 1px rgba(17, 17, 26, 0.04);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
}

.search:focus-within { border-color: var(--line-2); box-shadow: 0 0 0 4px rgba(17, 17, 26, 0.05); }

.search.glass:focus-within {
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 28px rgba(17, 17, 26, 0.16), 0 0 0 1px rgba(17, 17, 26, 0.06);
}

.search-form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  height: 100%;
  margin: 0;
}

.search svg,
.search-filter svg {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: #9a9aa0;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.search input,
.search-form input {
  width: 100%;
  min-width: 0;
  height: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  font-size: var(--fs-base);
  -webkit-appearance: none;
  appearance: none;
}

.search input::-webkit-search-cancel-button,
.search-form input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }

summary.search-filter {
  display: grid;
  width: 40px;
  height: 40px;
  flex: none;
  place-items: center;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #8e8e93;
  list-style: none;
  cursor: pointer;
}

summary.search-filter::-webkit-details-marker { display: none; }

summary.search-filter.is-set {
  color: var(--ink);
  background: rgba(17, 17, 26, 0.06);
}

summary.search-filter.is-set svg { stroke: var(--ink); }

.cuisine-details { position: relative; flex: none; }

input::placeholder, textarea::placeholder { color: #a1a1a7; opacity: 1; }

.field {
  display: flex;
  min-height: 56px;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 8px var(--s4);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field:focus-within { border-color: var(--line-2); box-shadow: 0 0 0 4px rgba(17, 17, 26, 0.05); }

.field > span { color: var(--muted); font-size: var(--fs-xs); line-height: 16px; }

.phone-vn-row,
.profile-phone-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  width: 100%;
}

.phone-cc {
  flex: none;
  color: var(--ink);
  font-size: var(--fs-base);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.phone-vn-row input,
.profile-phone-row input {
  flex: 1;
  min-width: 0;
}

.profile-phone-row {
  margin-top: 4px;
  padding: 0 2px;
}

.profile-phone-row .phone-cc {
  color: var(--muted);
  font-size: var(--fs-sm);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-width: 0;
  border: 0;
  padding: 0;
  background-color: transparent;
  font-size: var(--fs-base);
  line-height: 22px;
}

.field textarea { min-height: 66px; resize: vertical; }

.field input[type="file"] { padding: 4px 0; font-size: var(--fs-sm); color: var(--muted); }

.field input[type="file"]::file-selector-button {
  margin-right: 10px;
  height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--fill);
  color: var(--ink);
  font: 600 var(--fs-sm) var(--font);
}

select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 28px !important;
  background-image:
    linear-gradient(45deg, transparent 50%, #8e8e93 50%),
    linear-gradient(135deg, #8e8e93 50%, transparent 50%);
  background-position: calc(100% - 13px) 52%, calc(100% - 8px) 52%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}

.sheet-form { display: flex; flex-direction: column; gap: 10px; margin: var(--s4) 0; }
.sheet-form .primary { margin-top: var(--s1); }

.checks { margin: 0; padding: 0; border: 0; }
.checks legend { margin-bottom: var(--s2); padding: 0; color: var(--muted); font-size: var(--fs-sm); }

/* iOS-like toggle row */
.switch {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  padding: var(--s3) 0;
  cursor: pointer;
}

.switch + .switch, .row-field + .switch, .switch + .tip-row, .tip-row + .row-field { border-top: 1px solid var(--line); }

.switch > span { min-width: 0; }
.switch strong { display: block; font-weight: 600; }
.switch em { display: block; color: var(--ink-2); font-size: var(--fs-sm); font-style: normal; }
.switch small { display: block; margin-top: 2px; color: var(--muted); font-size: var(--fs-sm); line-height: 1.35; }

.switch input[type="checkbox"] {
  position: relative;
  width: 51px;
  height: 31px;
  flex: none;
  margin: 0;
  border-radius: var(--r-pill);
  background: #e3e3e8;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  transition: background-color 0.2s;
}

.switch input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s;
}

.switch input[type="checkbox"]:checked { background: var(--green); }
.switch input[type="checkbox"]:checked::after { transform: translateX(20px); }

/* Buttons --------------------------------------------------------------------------------------- */

.primary,
.primary-link,
.btn-green,
.btn-red,
.ghost {
  display: flex;
  width: 100%;
  height: var(--h-btn);
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  padding: 0 var(--s5);
  border: 0;
  border-radius: var(--r-md);
  background: var(--red);
  color: #fff;
  font-size: var(--fs-base);
  font-weight: 600;
  line-height: 1;
  text-align: center;
  transition: background-color 0.15s, transform 0.1s;
}

.primary:active, .primary-link:active { background: var(--red-press); transform: scale(0.99); }

.btn-green { background: var(--green); }
.btn-green:active { background: var(--green-press); }

.btn-red { background: var(--red); }

.ghost {
  border: 1.5px solid var(--red);
  background: var(--surface);
  color: var(--red);
}

.primary-link { margin-top: var(--s3); }

.dark, .row-link.center { background: var(--ink); color: #fff; }

.btn-line,
.mini {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 var(--s4);
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--ink);
  font-size: var(--fs-md);
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

.mini { min-height: var(--h-btn-sm); border-color: var(--ink); background: var(--ink); color: #fff; font-size: var(--fs-sm); font-weight: 600; }
.mini.line { border-color: var(--line-2); background: var(--surface); color: var(--ink); }
.mini.line.is-current { border-color: var(--ink); background: var(--ink); color: #fff; }

.btn-line.wide {
  display: flex;
  width: 100%;
  min-height: var(--h-btn);
  justify-content: space-between;
  border-radius: var(--r-md);
  padding: 0 var(--s4);
  font-size: var(--fs-base);
}

.btn-line.danger, .danger { color: var(--red); }

.quiet {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 var(--s4);
  border: 0;
  border-radius: var(--r-pill);
  background: var(--fill);
  color: var(--ink-2);
  font-size: var(--fs-md);
  font-weight: 500;
}

form:has(> .primary:only-of-type) { margin: 0; }

/* Chips, pills, segmented ----------------------------------------------------------------------- */

.chips { display: flex; flex-wrap: wrap; gap: var(--s2); }

.chip { position: relative; display: inline-flex; cursor: pointer; }

.chip input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }

.chip span {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  padding: 0 var(--s4);
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  background: var(--surface);
  font-size: var(--fs-md);
  line-height: 1.2;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.chip input:checked + span { border-color: var(--ink); background: var(--ink); color: #fff; }
.chip input:focus-visible + span { box-shadow: 0 0 0 3px rgba(238, 42, 47, 0.3); }

.pills, .langbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin: 0 0 var(--s4);
}

.pill, .lang-pill {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  padding: 0 var(--s4);
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--ink);
  font-size: var(--fs-md);
  font-weight: 500;
  white-space: nowrap;
}

.pill.is-current, .lang-pill.is-current { border-color: var(--ink); background: var(--ink); color: #fff; }

.lang-pill { min-width: 52px; justify-content: center; }

.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  margin: 0 0 var(--s4);
  padding: 3px;
  border-radius: var(--r-pill);
  background: var(--fill-2);
}

.seg a {
  display: flex;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-pill);
  color: var(--ink-2);
  font-size: var(--fs-md);
  font-weight: 500;
}

.seg a.is-current { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 4px rgba(17, 17, 26, 0.12); }

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  background: var(--fill);
  color: var(--ink-2);
  font-size: var(--fs-xs);
  font-weight: 600;
}

.tag.off { background: var(--fill-2); color: var(--muted); }

/* Feedback -------------------------------------------------------------------------------------- */

.warn, .note, .notice-bar, .closed-banner {
  margin: var(--s3) 0;
  padding: var(--s3) var(--s4);
  border-radius: var(--r-sm);
  font-size: var(--fs-md);
  line-height: 1.35;
}

.warn { background: var(--red-soft); color: #b3261e; }
.note { background: var(--green-soft); color: #13652d; }
.notice-bar, .closed-banner { background: var(--red-soft); color: #c8141d; }

.warn.small, small.warn, p.warn.small { padding: 0; background: none; font-size: var(--fs-sm); }
.cart-copy .warn { margin: 2px 0 0; padding: 0; background: none; font-size: var(--fs-sm); }

.empty {
  margin: var(--s8) var(--s4);
  color: var(--muted);
  font-size: var(--fs-md);
  text-align: center;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s3);
  margin: var(--s8) 0;
  padding: var(--s8) var(--s4);
  border-radius: var(--r-lg);
  background: var(--surface);
  color: var(--muted);
  text-align: center;
}

.empty-icon {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 50%;
  background: var(--fill);
}

.empty-icon svg { width: 30px; height: 30px; fill: none; stroke: var(--muted-2); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.empty-state p { max-width: 280px; font-size: var(--fs-base); }

.empty-state .primary-link { width: auto; min-width: 220px; margin-top: var(--s2); }

/* Cards, groups, rows --------------------------------------------------------------------------- */

.sheet,
.paycard,
.cancel,
.a-card,
.summary,
.courier-card,
.v-today,
.stop {
  margin: var(--s3) 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}

.group,
.v-card,
.c-card,
.cart-group {
  margin: var(--s4) 0;
  border: none;
  border-radius: var(--r-lg);
  background: var(--surface);
}

.group { overflow: hidden; padding: 0; }

.group-label {
  margin: var(--s6) var(--s1) var(--s2);
  color: var(--muted);
  font-size: var(--fs-md);
  font-weight: 500;
}

.list-row {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  margin: 0;
  padding: var(--s3) var(--s4);
  font-size: var(--fs-base);
}

.list-row + .list-row { border-top: 1px solid var(--line); }

a.list-row::after,
details.list-row > summary::after {
  content: "";
  width: 8px;
  height: 8px;
  flex: none;
  margin-left: auto;
  border-top: 1.8px solid var(--muted-2);
  border-right: 1.8px solid var(--muted-2);
  transform: rotate(45deg);
}

a.list-row strong, a.list-row small { display: block; }
a.list-row:has(small) { flex-wrap: wrap; }
a.list-row:has(small) > strong { flex: 1 1 calc(100% - 30px); }
a.list-row small { flex-basis: 100%; order: 3; margin-top: -6px; color: var(--muted); font-size: var(--fs-sm); }

details.list-row { display: block; padding: 0; }
details.list-row > summary {
  display: flex;
  min-height: 54px;
  align-items: center;
  padding: var(--s3) var(--s4);
  list-style: none;
  cursor: pointer;
}
details.list-row > summary::-webkit-details-marker { display: none; }
details.list-row[open] > summary::after { transform: rotate(135deg); }
details.list-row > .sheet-form { margin: 0; padding: 0 var(--s4) var(--s4); }

.list-row.muted { color: var(--muted); font-size: var(--fs-md); }

.row-link {
  display: flex;
  min-height: var(--h-btn);
  align-items: center;
  justify-content: space-between;
  margin: var(--s2) 0;
  padding: 0 var(--s4);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  font-weight: 500;
}

.row-link > svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--muted-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.row-link-end {
  display: inline-flex; align-items: center; gap: 8px; flex: none; margin-left: auto;
}
.row-link-end > svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--muted-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chat-badge {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; background: var(--red); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 1;
}

.row-link.center { justify-content: center; border-color: var(--ink); }

.row-actions { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; margin-top: var(--s3); }
.row-actions form { margin: 0; }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); margin: var(--s2) 0; }
.two > form, .two > details { margin: 0; min-width: 0; }
.two .btn-line, .two .btn-green, .two .btn-red { width: 100%; }

.avatar {
  display: grid;
  width: 48px;
  height: 48px;
  flex: none;
  place-items: center;
  border-radius: 50%;
  background: var(--fill-2);
  color: var(--ink-2);
  font-size: var(--fs-md);
  font-weight: 700;
}

.avatar.lg { width: 64px; height: 64px; font-size: var(--fs-xl); }

/* Restaurants (home) ---------------------------------------------------------------------------- */

.finder {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: calc(-1 * (var(--s3) + var(--safe-t))) calc(-1 * var(--pad)) 0;
  padding: calc(var(--s2) + max(var(--safe-t), 12px)) var(--pad) var(--s3);
  /* No gray bar behind search/filter — pills already have their own white glass. */
  background: transparent;
}

.finder form { margin: 0; }

.finder:has(details[open]) { z-index: 80; }

.finder-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.finder-bar > .search {
  flex: 1;
  min-width: 0;
}

.finder-bar > .cuisine-details {
  position: relative;
  flex: none;
  margin: 0;
}

.finder-bar > .cuisine-details > summary.search-filter {
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 28px rgba(17, 17, 26, 0.14), 0 0 0 1px rgba(17, 17, 26, 0.04);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
}

.cuisine-btn, summary.cuisine-btn {
  display: flex;
  height: var(--h-input);
  align-items: center;
  gap: 10px;
  padding: 0 var(--s4);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  color: var(--ink-2);
  font-size: var(--fs-base);
  list-style: none;
  cursor: pointer;
}

summary.cuisine-btn::-webkit-details-marker { display: none; }

summary.cuisine-btn svg {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: #9a9aa0;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

summary.cuisine-btn span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

summary.cuisine-btn.is-set { border-color: var(--ink); color: var(--ink); font-weight: 600; }

summary.cuisine-btn::after {
  content: "";
  width: 7px;
  height: 7px;
  flex: none;
  margin: -3px 2px 0 auto;
  border-right: 1.8px solid #8e8e93;
  border-bottom: 1.8px solid #8e8e93;
  transform: rotate(45deg);
}

/* Bottom sheet */
.cuisine-details[open] .sheet-layer {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(17, 17, 26, 0.4);
  animation: fade 0.18s ease-out;
}

.cuisine-form {
  position: relative;
  width: min(520px, 100%);
  max-height: min(78vh, 620px);
  overflow: auto;
  padding: 28px var(--pad) calc(var(--s4) + var(--safe-b));
  border-radius: 24px 24px 0 0;
  background: var(--surface);
  box-shadow: var(--shadow-3);
  animation: rise 0.22s ease-out;
}

.cuisine-form::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  width: 40px;
  height: 5px;
  margin-left: -20px;
  border-radius: var(--r-pill);
  background: var(--fill-2);
}

.sheet-title { margin: 0 0 var(--s4); font-size: var(--fs-lg); font-weight: 700; }

.sheet-actions {
  position: sticky;
  bottom: calc(-1 * (var(--s4) + var(--safe-b)));
  display: flex;
  gap: 10px;
  margin: var(--s5) calc(-1 * var(--pad)) calc(-1 * (var(--s4) + var(--safe-b)));
  padding: var(--s3) var(--pad) calc(var(--s4) + var(--safe-b));
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.sheet-actions .quiet { height: var(--h-btn); padding: 0 var(--s5); border-radius: var(--r-md); }
.sheet-actions .primary { flex: 1; }

@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(24px); opacity: 0.6; } }

.promo-row { display: flex; gap: var(--s3); margin: var(--s1) calc(-1 * var(--pad)) var(--s3); padding: 0 var(--pad); overflow-x: auto; scrollbar-width: none; }
.promo-row::-webkit-scrollbar { display: none; }

.promo-banner {
  display: flex;
  min-width: 82%;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3);
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
}

.promo-banner img { width: 64px; height: 64px; flex: none; border-radius: var(--r-sm); object-fit: cover; }
.promo-banner strong, .promo-banner small { display: block; }
.promo-banner small { color: var(--muted); font-size: var(--fs-sm); }

.grid { display: flex; flex-direction: column; gap: var(--s4); }
/* Skip layout/paint for off-screen restaurant cards — cold open with 50+ cards. */
.grid > .card {
  content-visibility: auto;
  contain-intrinsic-size: auto 220px;
}

.card { position: relative; }

.card-link {
  display: block;
  overflow: hidden;
  border-radius: 18px;
  color: #fff;
  box-shadow: none;
  isolation: isolate;
}

.card-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }

.cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.card-shade {
  position: absolute;
  inset: 40% 0 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.66), rgba(0, 0, 0, 0.2) 55%, transparent);
}

.card-body {
  position: absolute;
  right: var(--s4);
  bottom: var(--s4);
  left: var(--s4);
  display: flex;
  align-items: flex-end;
  gap: var(--s3);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.mark {
  display: grid;
  width: 56px;
  height: 56px;
  flex: none;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: var(--fs-md);
  font-weight: 750;
  letter-spacing: 0.02em;
  text-shadow: none;
}

.mark.sm { width: 34px; height: 34px; border: 1px solid var(--line); font-size: 12px; }
.mark.lg { width: 76px; height: 76px; border: 3px solid #fff; font-size: 24px; box-shadow: var(--shadow-2); }
.mark.has-photo { padding: 0; overflow: hidden; background: #fff; }
.mark.has-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.media-preview {
  display: block;
  width: 72px;
  height: 72px;
  margin: 0 0 var(--s2);
  border-radius: 12px;
  object-fit: cover;
  background: var(--wash, #f3f4f6);
}
.media-preview.wide {
  width: 100%;
  max-width: 280px;
  height: 120px;
}
.media-preview.no-photo { border: 1px dashed var(--line); }

.card-copy { display: flex; min-width: 0; flex-direction: column; gap: 2px; padding-bottom: 2px; }

.card-name {
  overflow: hidden;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.card-meta { display: flex; gap: var(--s3); font-size: var(--fs-sm); font-weight: 500; }
.meta-bit { display: inline-flex; align-items: center; gap: 4px; }
.meta-bit i { font-style: normal; }
.meta-bit svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.star { color: #ffc531; font-style: normal; }

.card-kitchens { overflow: hidden; font-size: var(--fs-sm); white-space: nowrap; text-overflow: ellipsis; opacity: 0.92; }

.card[data-status="paused"] .card-media { filter: grayscale(0.7); }
.card[data-status="paused"] .card-link { opacity: 0.8; }

.fav-form { position: absolute; top: 2px; right: 2px; z-index: 2; margin: 0; }
.dish-card > .fav-form,
.dish-hero > .fav-form { top: 2px; right: 2px; }
.dish-hero { position: relative; }

/* Iris: heart has no round white container — icon only, top-right inside card. */
.fav, .dish-fav {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.fav svg, .dish-fav svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linejoin: round;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.45));
}

.fav[aria-pressed="true"] svg, .dish-fav[aria-pressed="true"] svg { fill: var(--red); stroke: var(--red); }

.tone-0 { background: radial-gradient(circle at 30% 20%, #d4654a, #6d241c 72%); }
.tone-1 { background: radial-gradient(circle at 70% 10%, #2f6a45, #163528 70%); }
.tone-2 { background: radial-gradient(circle at 40% 30%, #c9843a, #6a3a16 72%); }
.tone-3 { background: radial-gradient(circle at 20% 20%, #3e5d86, #1c2838 74%); }
.tone-4 { background: radial-gradient(circle at 60% 20%, #8a4034, #3a1c18 72%); }

.paused-toggle { display: flex; justify-content: center; margin: var(--s5) 0 var(--s3); }
#paused .grid { margin-top: var(--s2); }

/* Store page ------------------------------------------------------------------------------------ */

.store-hero {
  position: relative;
  height: 210px;
  margin: calc(-1 * (var(--s3) + var(--safe-t))) calc(-1 * var(--pad)) 0;
  overflow: hidden;
  background: var(--fill-2);
}

.store-hero img { display: block; width: 100%; height: 100%; object-fit: cover; }

.hero-back {
  position: absolute;
  top: max(52px, calc(var(--safe-t) + 12px));
  left: var(--s3);
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 28px rgba(17, 17, 26, 0.14), 0 0 0 1px rgba(17, 17, 26, 0.04);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  color: var(--ink);
}

.store-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  margin: var(--s4) 0;
}

.store-head > div { min-width: 0; }
.store-head h1 { font-size: var(--fs-xl); line-height: 1.2; overflow-wrap: anywhere; }
.store-facts { margin-top: 2px; color: var(--muted); font-size: var(--fs-md); }

/* Dish grid — one component for the store page and the Dishes tab ------------------------------ */

.dish-section { margin-top: var(--s4); }
.dish-section:first-of-type { margin-top: var(--s1); }

.section-title { margin: 0 0 var(--s3); font-size: var(--fs-xl); }

.section-store {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  margin: 0 0 var(--s3);
}

.section-name {
  min-width: 0;
  overflow: hidden;
  font-size: var(--fs-lg);
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.section-note {
  flex: none;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: var(--fill-2);
  color: var(--ink-2);
  font-size: var(--fs-xs);
  font-weight: 600;
}

.section-store > svg {
  width: 20px;
  height: 20px;
  flex: none;
  margin-left: auto;
  fill: none;
  stroke: var(--muted-2);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dish-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.dish-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: var(--s3);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-1), 0 4px 14px rgba(17, 17, 26, 0.05);
  content-visibility: auto;
  contain-intrinsic-size: auto 220px;
}

.dish-card > :not(.dish-media) { margin-right: var(--s3); margin-left: var(--s3); }

.dish-media {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--fill-2);
}

.dish-media img { display: block; width: 100%; height: 100%; object-fit: cover; }

.dish-blank {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  background: linear-gradient(160deg, #f1f1f4, #e4e4e9);
}

.dish-blank svg { width: 44px; height: 44px; fill: none; stroke: #c4c4ca; stroke-width: 1.4; }

.dish-card .dish-fav,
.dish-hero .dish-fav { width: 34px; height: 34px; }
.dish-card .dish-fav svg,
.dish-hero .dish-fav svg { width: 17px; height: 17px; }

.dish-flag {
  position: absolute;
  bottom: var(--s2);
  left: var(--s2);
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: rgba(28, 28, 30, 0.78);
  color: #fff;
  font-size: var(--fs-xs);
  font-weight: 600;
}

.dish-weight {
  position: absolute;
  right: var(--s2);
  bottom: var(--s2);
  z-index: 1;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  background: rgba(28, 28, 30, 0.72);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 14px;
  white-space: nowrap;
}

.dish-sub.dish-rating {
  display: flex;
  align-items: center;
  gap: 3px;
}

.dish-sub.dish-rating .star {
  color: #e6a100;
  font-style: normal;
  font-size: 11px;
  line-height: 1;
}

.dish-hit {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}

/* Full-bleed photo: hit link has no side margin; name/meta keep the card gutter. */
.dish-card > .dish-hit { margin-right: 0; margin-left: 0; }

.dish-name {
  display: -webkit-box;
  margin-top: 10px;
  margin-right: var(--s3);
  margin-left: var(--s3);
  overflow: hidden;
  font-size: var(--fs-md);
  font-weight: 600;
  line-height: 20px;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.dish-sub {
  margin-top: 2px;
  margin-right: var(--s3);
  margin-left: var(--s3);
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 14px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.dish-foot {
  display: flex;
  min-width: 0;
  min-height: 32px;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-top: auto;
  padding-top: var(--s2);
}

.dish-price {
  min-width: 0;
  overflow: hidden;
  color: var(--green-press);
  font-size: var(--fs-md);
  font-weight: 700;
  line-height: 18px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.add-form {
  flex: none;
  margin: 0 0 0 auto;
  max-width: 100%;
}

.qty {
  display: inline-flex;
  height: 36px;
  min-width: 36px;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  border-radius: var(--r-pill);
  background: transparent;
}

.qty-btn {
  display: inline-grid;
  width: 36px;
  height: 36px;
  flex: none;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--fill);
  color: var(--ink);
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
}

.qty-btn:active { background: var(--fill-2); }

.qty-btn.qty-plus {
  background: var(--green);
  color: #fff;
  font-weight: 700;
  box-shadow: none;
}

.qty-btn.qty-plus:active {
  background: var(--green-press);
  color: #fff;
  transform: scale(0.96);
}

.qty:not([data-qty="0"]) {
  min-width: 108px;
  padding: 2px;
  background: var(--green-soft);
}

.qty:not([data-qty="0"]) .qty-btn {
  width: 32px;
  height: 32px;
  background: transparent;
  color: var(--green-press);
  box-shadow: none;
}

.qty:not([data-qty="0"]) .qty-btn.qty-plus {
  background: var(--green);
  color: #fff;
  box-shadow: 0 2px 8px rgba(52, 199, 89, 0.28);
}

.qty:not([data-qty="0"]) .qty-btn.qty-plus:active {
  background: var(--green-press);
  color: #fff;
}

.qty-num {
  min-width: 28px;
  font-size: var(--fs-md);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
  color: var(--green-press);
}

.qty[data-qty="0"] .qty-minus,
.qty[data-qty="0"] .qty-num { display: none; }

/* 2-col store/menu cards (~185px): compact stepper must fit beside price. */
.dish-card .qty {
  height: 32px;
  min-width: 32px;
}
.dish-card .qty-btn {
  width: 32px;
  height: 32px;
  font-size: 18px;
}
.dish-card .qty:not([data-qty="0"]) {
  min-width: 96px;
}
.dish-card .qty:not([data-qty="0"]) .qty-btn {
  width: 28px;
  height: 28px;
}
.dish-card .qty-num {
  min-width: 22px;
  font-size: var(--fs-sm);
}

.dish-buy-ctl .qty {
  height: 44px;
  min-width: 44px;
}
.dish-buy-ctl .qty-btn {
  width: 44px;
  height: 44px;
  font-size: 26px;
}
.dish-buy-ctl .qty:not([data-qty="0"]) {
  min-width: 128px;
}
.dish-buy-ctl .qty:not([data-qty="0"]) .qty-btn {
  width: 40px;
  height: 40px;
}
.dish-buy-ctl .qty-num {
  min-width: 32px;
  font-size: var(--fs-lg);
}

.dish-card.is-off .dish-media img,
.dish-card.is-off .dish-blank { opacity: 0.5; filter: grayscale(0.6); }

.dish-card.is-off .dish-name,
.dish-card.is-off .dish-price { color: var(--muted); }

.dish-section.is-closed .section-store { color: var(--muted); }

/* Cart & checkout ------------------------------------------------------------------------------- */

.cart-group { padding: var(--s3) var(--s4) var(--s4); }

.store-label {
  margin: var(--s2) 0 var(--s1);
  color: var(--muted);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.cart-line { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) 0; }
.cart-line + .cart-line { border-top: 1px solid var(--line); }

.cart-thumb, .line-img, .menu-thumb, .thumb {
  display: block;
  width: 60px;
  height: 60px;
  flex: none;
  border-radius: var(--r-sm);
  background: var(--fill-2);
  object-fit: cover;
}

.cart-copy { display: flex; min-width: 0; flex: 1; flex-direction: column; gap: 2px; }
.cart-copy strong { font-size: var(--fs-md); font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.cart-copy small { color: var(--muted); font-size: var(--fs-sm); }

.stepper { display: flex; flex: none; align-items: center; height: 36px; border-radius: var(--r-pill); background: var(--fill); }
.stepper form { margin: 0; }
.stepper span { min-width: 22px; font-weight: 700; font-size: var(--fs-md); text-align: center; }

.step-btn {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  font-size: 20px;
  line-height: 1;
}

.checkout { display: flex; flex-direction: column; margin-top: var(--s4); }
.checkout > .field, .checkout > .promo-field { margin: 5px 0; }
.checkout > .primary { margin-top: var(--s3); }
.checkout > .warn { margin: 2px var(--s1) var(--s1); padding: 0; background: none; color: #c8141d; font-size: var(--fs-md); }

.checkout-card {
  margin: 0 0 var(--s3);
  padding: 0 var(--s4);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}

.row-field {
  display: flex;
  min-height: 64px;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) 0;
}

.row-field > span:last-child { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.row-field small { color: var(--muted); font-size: var(--fs-sm); }
.row-field b { font-weight: 600; }

.row-field select {
  width: 100%;
  margin: 0;
  padding: 2px 0;
  border: 0;
  background-color: transparent;
  color: var(--ink);
  font-size: var(--fs-base);
  font-weight: 600;
}

.row-icon {
  display: grid;
  width: 24px;
  flex: none;
  place-items: center;
  color: var(--muted);
}

.row-icon svg,
.locate svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.locate svg { width: 18px; height: 18px; margin-right: 6px; color: var(--red); }

.address-card { display: flex; flex-direction: column; padding: var(--s4); }

.card-title { margin: 0 0 var(--s3); font-size: var(--fs-lg); font-weight: 700; }

.address-card .field { margin: 0 0 10px; border-color: transparent; background: var(--fill); }

.address-card .field:last-child { margin-bottom: 0; }

.address-card .addr-list { margin: 0 calc(-1 * var(--s4)) 10px; padding: 0 var(--s4); }

.tip-row { padding: var(--s3) 0; }

.tip-toggle {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.tip-toggle:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.tip-toggle-text { min-width: 0; }
.tip-toggle-text strong { display: block; font-weight: 600; }
.tip-toggle-text em {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: var(--fs-sm);
  font-style: normal;
}

.tip-chevron {
  width: 10px;
  height: 10px;
  flex: none;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}

.tip-row.is-open .tip-chevron { transform: rotate(-135deg); }

.tip-choices { margin-top: 10px; }
.tip-choices[hidden] { display: none !important; }

.map {
  height: 220px;
  margin: 0 0 var(--s3);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--fill-2);
  z-index: 0;
}
#map .leaflet-control-attribution { display: none !important; }

.locate { align-self: flex-start; margin: 0 0 var(--s2); }

.locate-err {
  margin: 0 0 var(--s2);
  color: var(--red);
  font-size: var(--fs-sm);
}

.locate-err[hidden] { display: none; }

.addr-list { display: flex; gap: var(--s2); margin: 0 calc(-1 * var(--pad)) var(--s2); padding: 0 var(--pad); overflow-x: auto; scrollbar-width: none; }
.addr-list:empty { display: none; }
.addr-chip { display: block; flex: none; max-width: 75vw; overflow: hidden; line-height: 40px; white-space: nowrap; text-overflow: ellipsis; }

.summary { padding: var(--s3) var(--s4); }
.summary .store-label:first-child { margin-top: var(--s1); }

.dot-line { display: flex; align-items: baseline; gap: var(--s2); margin: 6px 0; font-size: var(--fs-md); }
.dot-line > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.dot-line i { flex: 1; min-width: 12px; border-bottom: 1.5px dotted var(--line-2); transform: translateY(-4px); }
.dot-line > span:last-child { white-space: nowrap; font-weight: 600; }

.sum-line {
  display: flex;
  justify-content: space-between;
  gap: var(--s3);
  margin: 8px 0;
  color: var(--muted);
  font-size: var(--fs-md);
}

.sum-line > span:last-child { color: var(--ink-2); white-space: nowrap; }
.sum-line small { color: var(--muted); }
.sum-line.total { margin-top: var(--s3); color: var(--ink); font-size: var(--fs-lg); font-weight: 750; }
.sum-line.total > span:last-child { color: var(--ink); }
.sum-line.sale, .sum-line.sale > span:last-child { color: var(--green); }
.sum-line.strong { color: var(--ink); font-weight: 700; }
.sum-line.strong > span:last-child { color: var(--ink); }
.sum-line.soft { font-size: var(--fs-sm); }

.promo-field { background: var(--fill); border-color: transparent; }

/* Orders ---------------------------------------------------------------------------------------- */

.order-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 0 10px;
  padding: 14px var(--s4);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}

.order-hist {
  margin: 0 0 10px;
}
.order-hist > .order-link {
  margin-bottom: 0;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.order-hist .review-box {
  margin: 0;
  padding: 12px var(--s4) 14px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  background: var(--surface);
}
.order-hist .review-box > .group-label {
  margin: 0 0 8px;
}
.review-form.is-done {
  opacity: 0.55;
  pointer-events: none;
}

.order-top, .order-low { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); }
.order-top strong { font-size: var(--fs-base); }
.order-top b { font-size: var(--fs-base); white-space: nowrap; }
.order-mid { overflow: hidden; color: var(--ink-2); font-size: var(--fs-md); white-space: nowrap; text-overflow: ellipsis; }
.order-low em { color: var(--red); font-size: var(--fs-sm); font-style: normal; font-weight: 600; }
.order-low small { color: var(--muted); font-size: var(--fs-sm); white-space: nowrap; }

.back:has(+ .status-hot) { margin-bottom: 0; font-size: 24px; letter-spacing: -0.02em; }
.status-hot { margin-top: var(--s2); color: var(--red); font-size: var(--fs-lg); font-weight: 700; }
.eta { margin-top: 2px; font-size: var(--fs-md); }

.sub-order { margin: var(--s4) 0 0; }

.line-card {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin: 0 0 10px;
  padding: 10px;
  border-radius: var(--r-lg);
  background: var(--surface);
}

.line-card > div:nth-child(2) { min-width: 0; flex: 1; }
.line-card strong { display: block; font-size: var(--fs-md); font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.line-card p { margin-top: 2px; color: var(--muted); font-size: var(--fs-sm); }
.line-card b { flex: none; font-size: var(--fs-md); font-weight: 700; white-space: nowrap; }
.line-photo { width: 64px; height: 64px; flex: none; overflow: hidden; border-radius: var(--r-sm); background: var(--fill-2); }
.line-photo .line-img { width: 100%; height: 100%; border-radius: 0; }

/* Order dish reviews --------------------------------------------------------------------------- */
.review-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 var(--s4);
}
.review-form {
  margin: 0;
  padding: 12px;
  border-radius: var(--r-lg);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.review-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.review-thumb {
  flex: none;
  width: 56px;
  height: 56px;
  overflow: hidden;
  border-radius: var(--r-sm);
  background: var(--fill-2);
}
.review-thumb .line-img,
.review-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}
.review-meta {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.review-name {
  color: inherit;
  text-decoration: none;
}
.review-name strong {
  display: block;
  font-size: var(--fs-md);
  font-weight: 650;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.review-store {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.review-form .stars {
  display: inline-flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  align-items: center;
  gap: 2px;
  margin-top: 4px;
}
.review-form .star-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.review-form .star-pick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--fill-2);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.review-form .star-input:checked ~ .star-pick,
.review-form .star-pick:hover,
.review-form .star-pick:hover ~ .star-pick {
  color: var(--amber);
}
.review-form .star-input:focus-visible + .star-pick {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
  border-radius: 6px;
}
.review-form .star-pick:active {
  transform: scale(1.08);
}
.review-comment {
  margin: 0;
  padding: 10px 12px;
}
.review-comment textarea {
  min-height: 52px;
  max-height: 52px;
  resize: none;
  line-height: 1.35;
}
.review-form > .primary,
.review-box > .primary[data-review-send-all] {
  margin: 0;
  min-height: var(--h-btn-sm);
  height: var(--h-btn-sm);
  font-size: var(--fs-md);
}
.review-box > .primary[data-review-send-all] {
  margin-top: 2px;
}
.review-box > .primary[data-review-send-all]:disabled {
  opacity: 0.55;
}

.sums { margin: var(--s3) 0; padding: 0 var(--s1); }

.paycard { display: flex; flex-direction: column; gap: 2px; padding: 14px var(--s4); }
.paycard span { color: var(--muted); font-size: var(--fs-sm); }
.paycard strong { font-weight: 600; }

.address { margin-bottom: var(--s3); font-size: var(--fs-base); line-height: 1.4; overflow-wrap: anywhere; }

.courier-card { display: flex; align-items: center; gap: var(--s3); padding: 14px var(--s4); }
.courier-card > div { min-width: 0; flex: 1; }
.courier-card strong { display: block; }
.courier-card a.muted { display: block; font-size: var(--fs-md); }

.reveal { margin-top: 6px; }
.reveal summary {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 6px 14px;
  border: 1px solid var(--line-2);
  border-radius: 18px;
  line-height: 1.3;
  color: var(--ink-2);
  font-size: var(--fs-sm);
  list-style: none;
  cursor: pointer;
}
.reveal summary::-webkit-details-marker { display: none; }
.reveal a { display: inline-flex; min-height: 40px; align-items: center; margin-top: 2px; color: var(--red); font-size: var(--fs-base); font-weight: 600; }
.courier-card a.muted { display: inline-flex; min-height: 32px; align-items: center; }

.cancel { padding: var(--s4); }
.cancel h2 { margin-bottom: 4px; font-size: var(--fs-lg); }
.cancel .chips { margin: var(--s3) 0; }
.cancel .field { margin-bottom: var(--s3); }

.ready-in { margin: var(--s2) 0; color: var(--green); font-weight: 600; }

.progress {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin: var(--s5) 0 var(--s2);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.dot { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.dot i { position: relative; z-index: 1; width: 12px; height: 12px; border: 2px solid var(--bg); border-radius: 50%; background: var(--line-2); }
.dot + .dot::before { content: ""; position: absolute; top: 5px; right: 50%; width: 100%; height: 2px; background: var(--line-2); }
.dot.on { color: var(--ink); font-weight: 600; }
.dot.on i { background: var(--red); }
.dot.on + .dot.on::before { background: var(--red); }

/* Placed (success) */
.success { display: flex; flex-direction: column; align-items: center; padding: var(--s6) 0 0; text-align: center; }
.success .check {
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  margin: var(--s2) 0 var(--s5);
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 40px;
  box-shadow: 0 10px 24px rgba(238, 42, 47, 0.3);
}
.success h1 { margin-bottom: var(--s2); }
.success > p { margin: 2px 0; }
.success .muted { font-size: var(--fs-md); }
.eta-range {
  width: 100%;
  margin: var(--s5) 0 var(--s2) !important;
  padding: 14px var(--s4);
  border-radius: var(--r-md);
  background: var(--surface);
  font-size: var(--fs-xl);
  font-weight: 750;
  text-align: left;
}
.steps { width: 100%; margin: var(--s3) 0 var(--s5); text-align: left; }
.step { display: flex; align-items: center; gap: var(--s3); min-height: 44px; color: var(--muted-2); }
.step i { width: 22px; height: 22px; flex: none; border: 2px solid var(--line-2); border-radius: 50%; }
.step.on { color: var(--ink); font-weight: 600; }
.step.on i { position: relative; border-color: var(--ink); background: var(--ink); }
.step.on i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 6px;
  width: 5px;
  height: 9px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
}
.eta-range small { display: block; margin-bottom: 2px; color: var(--muted); font-size: var(--fs-sm); font-weight: 500; }
.success .primary-link, .success .row-link { width: 100%; }
.success .primary-link.dark:active { background: #000; }
.text-link { display: block; width: 100%; padding: 14px; color: var(--ink); font-size: var(--fs-base); font-weight: 500; text-align: center; }

/* Chat ------------------------------------------------------------------------------------------ */

.chat-head {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  margin: 0 calc(-1 * var(--pad)) var(--s3);
  padding: calc(var(--s2) + var(--safe-t)) var(--s2) var(--s2);
  border-bottom: 1px solid var(--line);
  background: rgba(244, 244, 246, 0.92);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.chat-head h1 { overflow: hidden; font-size: var(--fs-base); font-weight: 700; text-align: center; white-space: nowrap; text-overflow: ellipsis; }

.thread { display: flex; flex: 1; flex-direction: column; gap: var(--s2); padding: var(--s2) 0; }

.bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 20px;
  font-size: var(--fs-md);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.bubble.mine { align-self: flex-end; border-bottom-right-radius: 6px; background: var(--red); color: #fff; }
.bubble.theirs { align-self: flex-start; border-bottom-left-radius: 6px; background: var(--surface); box-shadow: var(--shadow-1); }
.bubble img { display: block; max-width: 220px; max-height: 260px; margin-bottom: 6px; border-radius: 14px; }
.bubble a { display: block; }

/* Floating glass composer — no full-width bar, icons live inside the pill. */
.chat-form {
  position: fixed;
  left: 50%;
  bottom: calc(10px + var(--safe-b));
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 2px;
  width: min(488px, calc(100% - 24px));
  height: 52px;
  margin: 0;
  padding: 4px 4px 4px 6px;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 28px rgba(17, 17, 26, 0.14), 0 0 0 1px rgba(17, 17, 26, 0.04);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
}

.chat-form > input[name="body"] {
  height: 100%;
  min-width: 0;
  flex: 1;
  padding: 0 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: var(--fs-base);
  color: var(--ink);
}

.chat-form > input[name="body"]:focus {
  outline: none;
}

.chat-form > input[name="body"]::placeholder {
  color: #9a9aa0;
}

.cam {
  position: relative;
  display: grid;
  width: 40px;
  height: 40px;
  flex: none;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #6c6c70;
  cursor: pointer;
  font-size: 20px;
  -webkit-tap-highlight-color: transparent;
}
.cam input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.cam svg,
.send svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cam:active { color: var(--ink); }
.cam:focus-visible,
.send:focus-visible {
  outline: none;
  box-shadow: var(--ring, 0 0 0 3px rgba(28, 28, 30, 0.16));
}

.send {
  display: grid;
  width: 40px;
  height: 40px;
  flex: none;
  place-items: center;
  padding: 0 0 0 2px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--red);
  font-size: 18px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.send:active { color: var(--red-press); }

/* Profile --------------------------------------------------------------------------------------- */

.profile-head { display: flex; align-items: center; gap: var(--s4); margin: var(--s3) 0 var(--s4); }
.profile-head > div { min-width: 0; }
.profile-head h1 { font-size: var(--fs-xl); overflow-wrap: anywhere; }
.profile-head .muted { margin-top: 2px; font-size: var(--fs-md); }

.list-row:has(.langs),
.lang-row {
  gap: var(--s2);
  padding-right: 12px;
  position: relative;
  z-index: 2;
}
.list-row:has(.langs) > span:first-child,
.lang-row > .lang-label {
  flex: 1 1 auto;
  min-width: 0;
  padding-right: var(--s2);
}
.langs {
  display: flex;
  flex: none;
  flex-shrink: 0;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  position: relative;
  z-index: 2;
}
.langs .lang-pill {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 48px;
  min-height: 44px;
  padding: 0 14px;
  font-size: var(--fs-md);
  font-weight: 600;
  line-height: 1;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}
.langs .lang-pill::before {
  content: "";
  position: absolute;
  inset: -6px -4px;
}

/* Kitchen panel --------------------------------------------------------------------------------- */

.v-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  margin: var(--s2) 0 var(--s4);
}

.v-head > div:first-child { min-width: 0; }
.v-head h1 { font-size: var(--fs-xl); line-height: 1.2; overflow-wrap: anywhere; }
.v-head .muted { margin-top: 2px; font-size: var(--fs-md); }

.v-state { margin-top: 2px; font-size: var(--fs-sm); font-weight: 600; }
.v-state.ok { color: var(--green); }
.v-state.off, .v-state.wait { color: var(--muted); }
.v-state.bad { color: var(--red); }

.v-actions { display: flex; flex: none; gap: 10px; align-items: center; }
.v-actions form { margin: 0; }

.round, .power {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  font-size: var(--fs-sm);
  font-weight: 700;
}

.power svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; }
.power.on { border-color: var(--green); color: var(--green); }

.v-today { padding: var(--s4); }
.v-today > p { margin: 2px 0; }
.v-big { font-size: var(--fs-xl); font-weight: 750; }

.v-list { margin-top: var(--s2); }

.v-card, .c-card, .a-card { padding: var(--s4); }
.v-card > * + *, .c-card > * + * { margin-top: 10px; }
.v-card > form + form, .v-card > .btn-line + .btn-line { margin-top: var(--s2); }
.v-card.new { border: 1px solid #f6c9cb; box-shadow: 0 4px 16px rgba(232, 32, 42, 0.06); }
.v-card.new .cancel-box > summary.btn-red { border: 1.5px solid var(--red); background: var(--surface); color: var(--red); }

.v-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s3);
  padding-bottom: var(--s3);
  border-bottom: 1px solid var(--line);
}

.v-card-head strong { font-size: var(--fs-lg); }
.v-sum { font-size: var(--fs-xl); font-weight: 600; white-space: nowrap; }

.v-timer { color: var(--green); font-size: var(--fs-md); font-weight: 700; font-variant-numeric: tabular-nums; }
.v-timer.late, .warn-timer { color: var(--red); }
.v-status { color: var(--ink-2); font-weight: 600; }
.v-courier-none { color: var(--ink-2); }

.v-line { display: flex; justify-content: space-between; gap: var(--s3); font-size: var(--fs-md); }
.v-line b { flex: none; font-weight: 600; }

.money { padding-top: var(--s2); border-top: 1px solid var(--line); }
.money .sum-line { margin: 4px 0; font-size: var(--fs-sm); }

.more-time { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.more-time > span { flex: 1 1 100%; }
.more-time form { flex: 1; margin: 0; }
.more-time .btn-line { width: 100%; }

.half, .cancel-box, .add-box, .register, .cat-tools { margin: var(--s2) 0 0; }
.half > summary, .cancel-box > summary, .add-box > summary, .register > summary { list-style: none; cursor: pointer; }
.half > summary::-webkit-details-marker, .cancel-box > summary::-webkit-details-marker, .add-box > summary::-webkit-details-marker,
.register > summary::-webkit-details-marker, .cat-tools > summary::-webkit-details-marker { display: none; }
.half > summary { width: 100%; }
.half[open] > summary, .cancel-box[open] > summary { opacity: 0.6; }
.half .sheet-form, .cancel-box .sheet-form { margin: var(--s2) 0 0; }

.register { margin-top: var(--s5); }
.register > summary {
  display: flex;
  height: var(--h-btn);
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: var(--surface);
  font-weight: 600;
}

.alarm {
  position: fixed;
  right: var(--s3);
  bottom: calc(var(--vnav-h) + var(--s3) + var(--safe-b));
  left: var(--s3);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: var(--s3);
  max-width: 496px;
  margin: 0 auto;
}

.alarm-text,
.alarm-ok {
  display: flex;
  min-height: 64px;
  align-items: center;
  margin: 0;
  padding: var(--s3) var(--s4);
  border: 0;
  border-radius: var(--r-lg);
  color: #fff;
  font-size: var(--fs-md);
  font-weight: 600;
  line-height: 1.3;
  box-shadow: var(--shadow-3);
}

.alarm-text { flex: 1; background: rgba(232, 32, 42, 0.86); animation: alarm-pulse 1.2s ease-in-out infinite; }
.alarm-ok { flex: none; max-width: 46%; background: var(--ink); }

@keyframes alarm-pulse { 50% { background: rgba(232, 32, 42, 0.6); } }

.mini-map { height: 140px; border-radius: var(--r-md); overflow: hidden; background: var(--fill-2); z-index: 0; }

.menu-cat { margin: var(--s5) 0; }
.cat-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s2); }
.cat-tools > summary { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); list-style: none; cursor: pointer; }
.cat-tools[open] { flex-basis: 100%; }

.menu-row { margin: 0 0 var(--s2); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.menu-row > summary { display: flex; align-items: center; gap: var(--s3); padding: 10px var(--s4) 10px var(--s3); list-style: none; cursor: pointer; }
.menu-row > summary::after {
  content: "";
  width: 8px;
  height: 8px;
  flex: none;
  margin: -4px 2px 0 auto;
  border-right: 1.8px solid var(--muted-2);
  border-bottom: 1.8px solid var(--muted-2);
  transform: rotate(45deg);
}
.menu-row[open] > summary::after { margin-top: 4px; transform: rotate(-135deg); }
.cat-tools > summary svg { width: 18px; height: 18px; fill: none; stroke: var(--ink-2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.menu-row > summary::-webkit-details-marker { display: none; }
.menu-row > summary > span:nth-child(2) { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.menu-row > summary strong { font-weight: 600; overflow-wrap: anywhere; }
.menu-row > summary small { color: var(--muted); font-size: var(--fs-sm); }
.menu-row .menu-thumb { width: 52px; height: 52px; }
.menu-row > .sheet-form, .menu-row > .row-actions { margin: 0; padding: 0 var(--s3) var(--s3); }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: var(--s3) 0; }
.stat { padding: 14px var(--s4); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.stat span { display: block; color: var(--muted); font-size: var(--fs-sm); }
.stat strong { display: block; margin-top: 4px; font-size: var(--fs-xl); font-weight: 750; overflow-wrap: anywhere; }

.table { width: 100%; border-collapse: collapse; overflow: hidden; border-radius: var(--r-md); background: var(--surface); font-size: var(--fs-sm); }
.table th, .table td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.table th:first-child, .table td:first-child { text-align: left; }
.table th { color: var(--muted); font-weight: 600; }

/* Courier --------------------------------------------------------------------------------------- */

body.courier .v-head + form { margin: 0 0 var(--s4); }
.gps { margin-top: 4px; }

.offer { border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }

.stop { margin: 10px 0 0; padding: var(--s3) 14px; border-color: var(--line); background: var(--bg); }
.stop > * + * { margin-top: 4px; }
.stop strong { display: block; overflow-wrap: anywhere; }
.stop-kind { display: flex; align-items: center; gap: var(--s2); color: var(--muted); font-size: var(--fs-sm); font-weight: 600; }
.stop-kind::before { content: ""; width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--amber); }
.stop-kind.drop::before { background: var(--red); }
.pay-line { display: flex; justify-content: space-between; gap: var(--s3); padding-top: 6px; font-size: var(--fs-md); }
.pay-line b { white-space: nowrap; }
.stop .row-actions .btn-line, .stop .row-actions form { flex: 1; }
.stop .row-actions form .btn-green { height: 44px; border-radius: var(--r-pill); }

/* Admin ----------------------------------------------------------------------------------------- */

.admin-nav { overflow-x: auto; flex-wrap: nowrap; margin-right: calc(-1 * var(--pad)); padding-right: var(--pad); scrollbar-width: none; }
.admin-nav::-webkit-scrollbar { display: none; }

.filters { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; margin: var(--s3) 0; }
.filters input, .filters select, .inline select, .inline input {
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  background-color: var(--surface);
  font-size: var(--fs-base);
}
.inline { display: inline-flex; flex-wrap: wrap; gap: var(--s2); align-items: center; margin: 4px 0; }
.sub { color: var(--muted); font-size: var(--fs-sm); }
.a-card > * + * { margin-top: var(--s2); }

.fleet-map { height: 420px; border-radius: var(--r-lg); overflow: hidden; z-index: 0; }
.fleet-map.full { position: fixed; inset: 0; z-index: 90; height: auto; border-radius: 0; }
.ops-map { height: min(62vh, 560px); min-height: 320px; }
.ops-map-wrap { position: relative; margin: var(--s2) 0; }
.ops-full { position: absolute; top: 10px; left: 10px; z-index: 500; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.ops-summary { margin: var(--s2) 0 var(--s1); font-weight: 650; line-height: 1.35; }
.ops-legend { margin: var(--s3) 0 var(--s2); }
.ops-legend h2 { margin: 0 0 var(--s2); font-size: 0.78rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted, #6b7280); }
.ops-legend-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ops-legend-item { display: flex; gap: 10px; align-items: flex-start; font-size: 0.92rem; line-height: 1.35; }
.ops-legend-item i { width: 12px; height: 12px; border-radius: 50%; margin-top: 4px; flex: none; }
.ops-scooter { background: transparent !important; border: 0 !important; }
.ops-scooter.is-stale { opacity: 0.55; filter: grayscale(0.7); }
.ops-scooter.is-busy svg circle { fill: #f0a202; }
.ops-store-logo { background: transparent !important; border: 0 !important; }
.ops-store-logo span {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  overflow: hidden; border: 2px solid #4b5563; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.ops-store-logo img { width: 100%; height: 100%; object-fit: cover; }
.leaflet-tooltip.ops-chip {
  background: #fff; color: #111; border: 0; border-radius: 6px; padding: 4px 8px;
  font-size: 12px; font-weight: 600; box-shadow: 0 1px 4px rgba(0,0,0,.2); white-space: nowrap;
}
.leaflet-tooltip.ops-chip::before { display: none; }
.leaflet-tooltip.ops-chip.is-stale { color: #6b7280; }
body.ops-fs .ops-full { position: fixed; top: 12px; left: 12px; z-index: 100; }
@media (max-width: 640px) {
  .ops-map { height: min(58vh, 480px); min-height: 280px; }
  .ops-legend-item { font-size: 0.86rem; }
}
.register-link {
  margin: var(--s5) 0 var(--s2);
  text-align: center;
}
.register-link .text-link {
  font-weight: 600;
}

/* Print ----------------------------------------------------------------------------------------- */

.receipt { max-width: 380px; margin: 0 auto; padding: var(--s4); background: var(--surface); border-radius: var(--r-md); }
.receipt h1 { font-size: var(--fs-xl); }
.receipt .big { margin: var(--s2) 0; font-size: var(--fs-2xl); font-weight: 800; }
.receipt table { width: 100%; margin: var(--s3) 0; border-collapse: collapse; }
.receipt td { padding: 6px 0; border-bottom: 1px dashed var(--line-2); }
.receipt td:last-child { text-align: right; white-space: nowrap; }

@media print {
  body { background: #fff; }
  .no-print, .tabbar, .vendor-nav { display: none !important; }
  .shell { padding: 0; }
}

/* Larger screens -------------------------------------------------------------------------------- */

@media (min-width: 700px) {
  .dish-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid { display: grid; grid-template-columns: 1fr 1fr; }
  .shell:has(.dish-grid), .shell:has(#feed) { width: min(100%, 760px); }
  .store-hero { height: 280px; border-radius: 0 0 var(--r-lg) var(--r-lg); }
  .tabbar { width: min(488px, calc(100% - 24px)); }
}

@media (min-width: 1100px) {
  .dish-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .shell:has(.dish-grid), .shell:has(#feed) { width: min(100%, 1040px); }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .cuisine-details[open] .sheet-layer { align-items: center; }
  .cuisine-form { border-radius: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}


/* Cart terms near submit — not a top agreement banner */
.checkout-legal {
  margin: 10px 4px 0;
  font-size: var(--fs-sm);
  color: var(--muted);
  text-align: center;
}
.checkout-legal.below-submit {
  margin-top: 12px;
  margin-bottom: 4px;
}
.checkout-legal .text-link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--text);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}
.terms-dialog {
  border: 0;
  border-radius: 16px;
  padding: 0;
  width: min(92vw, 420px);
  max-height: 80vh;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
}
.terms-dialog::backdrop { background: rgba(0, 0, 0, 0.45); }
.terms-dialog-inner { display: flex; flex-direction: column; gap: 12px; padding: 18px; }
.terms-dialog-inner h2 { margin: 0; font-size: 1.1rem; }
.terms-dialog-body {
  overflow: auto;
  max-height: 48vh;
  font-size: var(--fs-sm);
  line-height: 1.45;
  color: var(--text);
}
.terms-article {
  margin: 8px 0 20px;
  font-size: var(--fs-md);
  line-height: 1.5;
  white-space: normal;
}

/* Courier panel (VI rebuild) */
.c-dist { margin: 0; color: var(--c-muted); font-size: 13px; }
.c-map-wrap { border-radius: 12px; overflow: hidden; border: 1px solid #e6e6ea; }
.c-mini-map { height: 160px; border-radius: 0; }
.c-map-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 10px; background: #fff; font-size: 12px; color: var(--c-muted);
}
.c-nav-btn {
  flex: none; display: inline-flex; align-items: center; height: 34px; padding: 0 12px;
  border-radius: 999px; background: #111; color: #fff; font-size: 12px; font-weight: 700; text-decoration: none;
}
.c-store-title { margin: 8px 0 0; font-size: 1.15rem; }
.c-offer-top {
  display: flex;
  justify-content: flex-end;
  margin: -4px 0 8px;
}
.c-offer-top form { margin: 0; }
.c-offer-decline {
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}
.c-offer-bottom { margin-top: 14px; }
.c-offer-bottom form { margin: 0; }
.c-offer-accept {
  width: 100%;
  min-height: 52px;
  font-size: 1.05rem;
  font-weight: 750;
}
.c-docs-block .c-doc-grid { margin-top: 12px; }
.c-doc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0 14px;
}
.c-doc-slot {
  display: grid;
  gap: 6px;
  justify-items: stretch;
  text-align: center;
  margin: 0;
}
.c-doc-slot figcaption { margin: 0; line-height: 1.2; }
.c-doc-open {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  line-height: 0;
}
.c-doc-thumb {
  display: block;
  width: 100%;
  min-height: 96px;
  aspect-ratio: 1;
  height: auto;
  max-height: none;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--fill);
}
.c-doc-empty {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 14px;
  border: 1px dashed var(--line-2);
  color: var(--muted);
  background: var(--fill);
}
.c-avatar-btn {
  display: inline-block;
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 50%;
  line-height: 0;
  cursor: pointer;
}
.c-doc-slot.is-broken .c-doc-thumb,
.c-avatar-btn.is-broken .c-avatar,
img[data-img-fallback].is-broken {
  opacity: 0.35;
  filter: grayscale(1);
}
.cf-image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.88);
}
.cf-image-lightbox[hidden] { display: none !important; }
.cf-image-lightbox-img {
  max-width: min(100%, 720px);
  max-height: min(86vh, 960px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  background: #111;
}
.cf-image-lightbox-close {
  position: absolute;
  top: calc(10px + env(safe-area-inset-top, 0px));
  right: 12px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.c-bep { padding: 12px; border-radius: 12px; background: #1c1c1f; color: #fff; }
.c-bep.is-ready { background: #1c1c1f; }
.c-bep.is-cook { background: #1c1c1f; }
.c-bep-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.c-bep-label { margin: 0; font-size: 11px; letter-spacing: .06em; opacity: .7; font-weight: 700; }
.c-bep-name { display: block; margin-top: 2px; font-size: 1rem; }
.c-bep-state { margin: 4px 0 0; font-weight: 700; }
.c-bep.is-ready .c-bep-state { color: #7dffa8; }
.c-pick-btn { height: 40px; padding: 0 14px; white-space: nowrap; }
.c-bep .c-money-line, .c-bep .c-line { color: rgba(255,255,255,.82); }
.c-line { margin: 2px 0 0; font-size: 13px; }

.c-khach { padding: 14px; border-radius: 12px; border: 1px solid #e6e6ea; background: #fff; }
.c-khach-label { margin: 0; color: var(--c-muted); font-size: 11px; font-weight: 700; letter-spacing: .06em; }
.c-addr { display: block; margin-top: 4px; font-size: 1.05rem; line-height: 1.3; }
.c-note { margin: 8px 0 0; padding: 10px 12px; border-radius: 10px; background: #fff4cc; color: #333; font-size: 13px; }
.c-comm { display: flex; gap: 8px; margin-top: 12px; }
.c-call { flex: 1; height: 48px; }
.c-zalo {
  flex: none; display: grid; place-items: center; width: 48px; height: 48px;
  border-radius: 12px; background: #0068ff; color: #fff; font-weight: 800; font-size: 11px; text-decoration: none;
}
.c-store-calls, .c-chats { display: grid; gap: 6px; margin-top: 10px; }
.c-link, .c-chat-link {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid #e6e6ea;
  background: #fff; color: #111; text-decoration: none; font-weight: 600; font-size: 14px;
}
.c-footer-actions { display: grid; gap: 10px; margin-top: 14px; }
.c-release {
  display: block; width: 100%; border: 0; background: transparent; color: #8a8a90;
  font-size: 14px; font-weight: 600; padding: 8px; cursor: pointer;
}
.c-cta { width: 100%; height: 52px; border-radius: 14px; }

.c-ledger {
  margin: 0 0 12px; padding: 16px; border-radius: 16px; background: #fff; border: 1px solid #e6e6ea;
}
.c-ledger.soft { background: #fafafb; }
.c-ledger-title { margin: 0 0 6px; color: var(--c-muted); font-size: 11px; font-weight: 700; letter-spacing: .05em; }
.c-ledger-big { margin: 0 0 8px; font-size: 1.7rem; font-weight: 800; }
.c-ledger-big.ok { color: var(--c-green); }
.c-ledger-big.bad { color: var(--c-red); }
.c-row-between { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.c-inbox { display: grid; gap: 8px; }
.c-inbox-row {
  display: grid; gap: 2px; padding: 14px; border-radius: 14px; background: #fff;
  border: 1px solid #e6e6ea; color: inherit; text-decoration: none;
}
.c-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: var(--fill);
  border: 1px solid var(--line);
}

body.courier .alarm { display: none; } /* loud overlay replaces floating alarm */


/* Vendor panel — old-app parity */
.v-state.is-open { color: var(--green); font-weight: 600; }
.v-state.is-closed { color: var(--muted); }
.v-big { font-size: var(--fs-2xl); font-weight: 800; margin: var(--s1) 0; }
.v-today {
  margin: 0 0 var(--s4);
  padding: var(--s4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}
.v-list { display: grid; gap: var(--s3); margin-top: var(--s3); }
.v-card { margin: 0; }
.menu-bulk { display: flex; flex-wrap: wrap; gap: var(--s2); margin: 0 0 var(--s4); align-items: center; }
.menu-bulk .file-pill { cursor: pointer; min-height: 44px; }
.menu-bulk .file-pill input { display: none; }
.inline-import { display: inline; }
.pill-row { display: flex; flex-wrap: wrap; gap: var(--s2); margin: 0 0 var(--s4); }
.pill-row .pill { min-height: 44px; }
.pill-row.pill-scroll {
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
  margin-left: calc(-1 * var(--pad, 16px));
  margin-right: calc(-1 * var(--pad, 16px));
  padding-left: var(--pad, 16px);
  padding-right: var(--pad, 16px);
}
.pill-row.pill-scroll::-webkit-scrollbar { display: none; }
.pill-row.pill-scroll .pill {
  flex: none;
  white-space: nowrap;
}
.menu-cat-bar {
  display: block;
  margin: 0 0 var(--s4);
}
.menu-cat-bar .pill-scroll {
  width: 100%;
  margin: 0;
}
.menu-cat-hint {
  margin: 0 0 var(--s3);
  line-height: 1.4;
}
body.vendor .menu-new-dish {
  margin: var(--s3) 0 var(--s4);
  position: relative;
  z-index: 1;
}
body.vendor .menu-new-dish[hidden] { display: none; }
body.vendor button.btn-green.wide[data-open-new-dish] {
  display: block;
  width: 100%;
  margin: 0 0 var(--s3);
}
.import-flash {
  position: sticky;
  top: calc(8px + env(safe-area-inset-top, 0px));
  z-index: 40;
  margin: 0 0 var(--s3);
  box-shadow: var(--shadow-2);
}
.cat-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); margin: var(--s4) 0 var(--s2); }
.cat-reorder {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  flex: none;
  margin: 0;
}
.cat-reorder form { margin: 0; display: block; }
.cat-reorder .sort-btn {
  min-width: 32px;
  min-height: 28px;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface, #fff);
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
  box-shadow: none;
}
.cat-reorder .sort-btn:active { background: var(--fill, #f3f3f5); color: var(--text); }
body.vendor .menu-cat { margin: 0 0 var(--s4); }
body.vendor .langbar { margin: 0 0 var(--s4); }
/* Vendor catalog rows only — must not override the client menu .dish-card card. */
body.vendor .dish-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: var(--s3);
  padding: var(--s3) 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  position: relative;
  overflow: hidden;
}
body.vendor .dish-card .dish-media {
  position: relative;
  width: 96px;
  height: 96px;
  aspect-ratio: auto;
  border-radius: 12px;
  overflow: hidden;
  background: var(--wash);
}
body.vendor .dish-card .no-video {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(200, 40, 40, 0.88);
  color: #fff;
  font-size: 11px;
  text-align: center;
  padding: 3px 4px;
}
body.vendor .dish-price { color: var(--red); font-weight: 700; margin: 2px 0; }
.dish-tools { grid-column: 1 / -1; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.sort-step {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 0;
  background: var(--surface, #fff);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.sort-step .sort-btn {
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-size: 18px;
  line-height: 1;
  box-shadow: none;
}
.sort-step .sort-btn:active { background: var(--fill, #f3f3f5); }
.sort-step .sort-num {
  width: 48px;
  min-height: 36px;
  margin: 0;
  padding: 0 4px;
  border: 0;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-variant-numeric: tabular-nums;
  text-align: center;
  -moz-appearance: textfield;
}
.sort-step .sort-num::-webkit-outer-spin-button,
.sort-step .sort-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.btn-yellow { background: #f5c518; color: #111; border: 0; border-radius: 999px; padding: 8px 14px; font-weight: 700; }
body.vendor .dish-card[data-dish-edit] { cursor: pointer; }
body.vendor .eye-toggle { margin: 0; }
body.vendor .eye-btn {
  width: 40px;
  height: 40px;
  padding: 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
body.vendor .eye-btn svg { width: 22px; height: 22px; display: block; }
body.vendor .eye-btn.is-off { color: var(--muted); opacity: 0.85; }
.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.field-row .field { min-width: 0; margin: 0; }
@media (max-width: 420px) {
  .field-row { grid-template-columns: 1fr; }
}
.dish-edit-form { margin: 0; }
body.vendor .dish-edit-panel {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  margin-top: 4px;
  background: var(--wash, #f6f6f8);
  border: 1px solid var(--line);
  border-radius: 12px;
}
body.vendor .dish-edit-panel[hidden] { display: none !important; }
body.vendor .dish-card.is-editing { overflow: visible; }
body.vendor .dish-edit-panel .btn-line.danger { margin-top: 4px; }
.accept-prep, .ready-photo { margin: 12px 0; gap: 10px; }
.ready-photo [data-ready-input] { width: 100%; }
.ready-preview { display: grid; gap: 10px; margin-top: 10px; }
.ready-preview-actions { display: flex; gap: 10px; }
.ready-preview-actions .btn-green,
.ready-preview-actions .btn-line { flex: 1; min-height: 44px; }
.ready-preview img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: 12px;
  background: #111;
}
.ready-preview .row-actions { display: flex; gap: 8px; }
.ready-photo [data-ready-open] { width: 100%; }
.c-settle-qr {
  display: block;
  width: min(100%, 220px);
  margin: 10px auto 0;
  border-radius: 12px;
  background: #fff;
}
.c-dist { margin: 6px 0 8px; font-weight: 700; color: #111; }
.c-map-wrap { margin: 8px 0 12px; border-radius: 12px; overflow: hidden; border: 1px solid #e6e6ea; }
.c-map-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 10px; background: #fff; font-size: 13px; font-weight: 600;
}
.c-nav-btn {
  flex: none; padding: 8px 12px; border-radius: 10px; background: #111; color: #fff;
  text-decoration: none; font-size: 12px; font-weight: 700;
}
.c-ready-photo { display: block; margin: 8px 0; }
.c-ready-photo img {
  width: 100%; max-height: 160px; object-fit: cover; border-radius: 10px;
}
.apps-actions { display: grid; gap: 10px; margin-top: 16px; }
.cf-toast,
.cf-toast a {
  display: none !important;
}

/* Top sticky new-order banner (vendor + courier) — always above the board */
.v-loud,
.c-loud,
.cf-order-loud {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 220;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 0;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 14px;
  background: #e8202a;
  color: #fff;
  text-align: center;
  box-shadow: 0 10px 28px rgba(232, 32, 42, 0.35);
  animation: loud-banner-pulse 1.4s ease-in-out infinite;
}
.v-loud-title,
.c-loud-title,
.cf-order-loud-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #fff;
  line-height: 1.2;
}
.v-loud-sub,
.c-loud-sub,
.cf-order-loud-sub {
  margin: 0;
  max-width: 26rem;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.92);
}
@keyframes loud-banner-pulse {
  0%, 100% { background: #e8202a; }
  50% { background: #c41019; }
}
/* Leave room under the sticky banner so content is not covered */
body.has-loud.courier .shell,
body.has-loud.vendor .shell,
body.courier:has(.c-loud) .shell,
body.vendor:has(.v-loud) .shell {
  padding-top: calc(76px + env(safe-area-inset-top, 0px));
}
body.vendor .alarm,
body.courier .alarm { display: none; }

/* Courier chrome — head, online toggle, money, tags, dark CTAs */
body.courier .c-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
}
body.courier .c-head h1 {
  margin: 0 0 4px;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
body.courier .c-online {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--muted);
}
body.courier .c-online.is-on { color: #0a7a3e; }
body.courier .c-online.is-off { color: var(--muted); }
body.courier .c-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
body.courier .c-head .gps { margin: 4px 0 0; }
body.courier .c-online-form { margin: 0; }
body.courier .c-online-btn {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  color: #fff;
}
body.courier .c-online-btn svg {
  width: 26px;
  height: 26px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}
body.courier .c-online-btn.is-on { background: #0a7a3e; }
body.courier .c-online-btn.is-off { background: #111; }
body.courier .c-go,
body.courier .c-stop,
body.courier .btn-dark,
.btn-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}
body.courier .c-go {
  background: #0a7a3e;
  color: #fff;
}
body.courier .c-stop {
  background: #111;
  color: #fff;
}
body.courier .btn-dark,
.btn-dark {
  background: #111;
  color: #fff;
}
body.courier .c-offer-accept.btn-dark {
  width: 100%;
  min-height: 52px;
  border-radius: 14px;
  font-size: 1.05rem;
}
body.courier .c-money {
  display: grid;
  gap: 6px;
  margin: 0 0 10px;
}
body.courier .c-money-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  font-size: 0.95rem;
}
body.courier .c-money-line b { font-weight: 800; }
body.courier .c-money-line.soft { color: var(--muted); font-size: 0.88rem; }
body.courier .c-money-line.soft b { color: var(--ink); }
body.courier .c-money-line:first-child {
  font-size: 1.35rem;
  font-weight: 800;
}
body.courier .c-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 8px;
}
body.courier .c-tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
  font-size: 12px;
  font-weight: 700;
}
body.courier .c-tag.cash { background: #ecfdf5; color: #047857; }
body.courier .c-tag.door { background: #fff7ed; color: #c2410c; }
body.courier .c-tag.dist { background: #eff6ff; color: #1d4ed8; }
body.courier .c-tag.ready { background: #ecfdf5; color: #047857; }
body.courier .c-tag.cook { background: #fff7ed; color: #c2410c; }
body.courier .c-tag.go { background: #eff6ff; color: #1d4ed8; }
body.courier .c-pick-label {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
body.courier .c-pick-name {
  margin: 2px 0 0;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.25;
}
body.courier .c-card.offer {
  padding: 16px;
  border: 1px solid #f5a524;
  box-shadow: 0 0 0 2px rgba(245, 165, 36, 0.12);
}
body.courier .c-empty {
  display: grid;
  place-items: center;
  gap: 10px;
  margin: 32px 0;
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
}
body.courier .c-zone {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--fill);
  border: 1px solid var(--line);
}
body.courier .c-zone-title {
  margin: 0 0 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--muted);
  text-transform: uppercase;
}
body.courier .c-zone-body { margin: 0; font-weight: 650; }
.v-acc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  margin: 0 0 var(--s3);
  overflow: hidden;
}
.v-acc > summary {
  list-style: none;
  padding: var(--s4);
  min-height: 44px;
  font-size: var(--fs-base);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
}
.v-acc > summary::-webkit-details-marker { display: none; }
.v-acc > summary::after { content: "▾"; color: var(--muted); flex: none; }
.v-acc[open] > summary::after { content: "▴"; }
.v-acc-body {
  padding: 0 var(--s4) var(--s4);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}
.v-acc-body > .sheet-form { margin: 0; gap: var(--s3); }
.v-acc-body > .muted { margin: 0; font-size: var(--fs-sm); line-height: 1.45; }
.v-acc-body .field,
.v-acc-body .check { margin: 0; }
.v-acc-body > .v-acc,
.v-acc-body > #pos > .v-acc {
  margin: 0;
  background: color-mix(in srgb, var(--surface) 88%, var(--line));
}
.v-acc-body > .profile-foot {
  margin: var(--s2) 0 0;
}
.v-acc-body .v-danger {
  margin: 0;
  padding: 12px;
}
.tier-row { display: flex; align-items: center; gap: var(--s2); margin: 0; }
.tier-row input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0 var(--s3);
  border: 1px solid var(--line-2);
  border-radius: var(--r-xs);
  background: var(--surface);
}
.hours-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: var(--s2);
  align-items: center;
  margin: 0;
}
.hours-row input[type="time"] {
  min-width: 0;
  width: 100%;
  min-height: 44px;
  padding: 0 6px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-xs);
  background: var(--surface);
  font-size: var(--fs-sm);
}
.hours-row .check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  white-space: nowrap;
  font-size: var(--fs-sm);
}
.profile-foot { display: grid; gap: var(--s3); margin: var(--s4) 0 calc(var(--s6) + var(--safe-b)); }
.store-row { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; margin: 0 0 var(--s3); }
.review-card { padding: 12px 0; border-bottom: 1px solid var(--line); }
.review-card.is-unread { background: #fff8e6; margin: 0 -12px; padding: 12px; border-radius: 12px; }
.map#vendor-map, #vendor-map { height: 220px; border-radius: 12px; margin: 10px 0; border: 1px solid var(--line); }
.icon-btn { min-width: 36px; }
.empty-state .empty-ico { width: 96px; height: 96px; color: var(--muted); margin: 24px auto 8px; display: block; }

/* Profile --------------------------------------------------------------------------------------- */

.profile-head { display: flex; align-items: center; gap: var(--s4); margin: var(--s3) 0 var(--s4); }
.profile-head > div { min-width: 0; }
.profile-head h1 { font-size: var(--fs-xl); overflow-wrap: anywhere; }
.profile-head .muted { margin-top: 2px; font-size: var(--fs-md); }

.profile-head-edit {
  position: relative;
  align-items: flex-start;
  gap: var(--s3);
  padding-right: 0;
}
.profile-inline {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: var(--s3);
  margin: 0;
}
.avatar-tap {
  position: relative;
  display: grid;
  flex: none;
  cursor: pointer;
}
.avatar-tap .avatar.lg { border: 1px solid var(--line-2); }
.avatar-tap input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.profile-fields {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 6px;
}
.profile-name-input,
.profile-phone-input {
  width: 100%;
  margin: 0;
  padding: 2px 0;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: inherit;
  font: inherit;
  outline: none;
}
.profile-name-input {
  font-size: var(--fs-xl);
  font-weight: 700;
  line-height: 1.2;
}
.profile-phone-input {
  color: var(--muted);
  font-size: var(--fs-md);
}
.profile-name-input:focus,
.profile-phone-input:focus { border-bottom-color: var(--line-2); }
.profile-about {
  margin: var(--s4) 0 calc(var(--s6) + var(--safe-b));
}
.profile-about > summary {
  color: var(--muted);
  font-size: var(--fs-sm);
  font-weight: 550;
}
.profile-about > .v-acc-body {
  padding: 0;
  gap: 0;
  border-top: 1px solid var(--line);
}
.profile-tools {
  display: flex;
  flex: none;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  padding-top: 2px;
}
.head-notify { margin: 0; }
.head-switch {
  min-height: 0;
  padding: 0;
  border: 0;
}
.head-switch input[type="checkbox"] {
  width: 42px;
  height: 26px;
}
.head-switch input[type="checkbox"]::after {
  width: 22px;
  height: 22px;
}
.head-switch input[type="checkbox"]:checked {
  background: var(--red);
}
.head-switch input[type="checkbox"]:checked::after { transform: translateX(16px); }
.avatar.has-photo { overflow: hidden; padding: 0; background: var(--fill); }
.avatar.has-photo img { width: 100%; height: 100%; object-fit: cover; }
.care-btn {
  position: static;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 28px rgba(17, 17, 26, 0.14), 0 0 0 1px rgba(17, 17, 26, 0.04);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  color: var(--ink);
}
.care-btn svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.menu-lang {
  cursor: default;
  gap: 10px;
  /* Same vertical size as sibling menu rows (addresses / favorites). */
  min-height: 54px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.menu-lang .menu-label {
  flex: 0 1 auto;
  white-space: nowrap;
}
.menu-lang .profile-langs,
.profile-lang-bar .profile-langs {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 0;
  margin-left: auto;
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  height: 30px;
  box-sizing: border-box;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
/* Beat later `.langs .lang-pill { min-height: 44px }` — that was making this row taller. */
.menu-lang .profile-langs .lang-pill,
.profile-lang-bar .profile-langs .lang-pill {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  min-width: 32px;
  width: auto;
  min-height: 0;
  height: 24px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 24px;
}
.menu-lang .profile-langs .lang-pill.is-current,
.profile-lang-bar .profile-langs .lang-pill.is-current {
  background: var(--ink);
  color: #fff;
  border-color: transparent;
}
.menu-lang .profile-langs .lang-pill::before,
.profile-lang-bar .profile-langs .lang-pill::before {
  content: "";
  position: absolute;
  inset: -6px -3px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.ref-share .ref-link {
  margin: 8px 0;
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: var(--fill);
  font-size: var(--fs-sm);
  word-break: break-all;
}
.ref-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.ref-stats .list-row b,
.ref-stats .list-row strong { font-variant-numeric: tabular-nums; }
.pad-x { padding-left: var(--s4); padding-right: var(--s4); }

/* Profile menu — Apple-style glass square tiles (icon face + caption). */
section.group.profile-menu,
.profile-menu {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: visible;
  margin: var(--s3) 0;
  padding: 0 !important;
}
.profile-menu.profile-tiles {
  display: grid;
  gap: var(--s4);
  margin: var(--s4) 0 var(--s5);
}
body.app:has(.profile-tiles) {
  --bg: #F6F1E8;
  --fill: #efe9df;
  --fill-2: #e5ddd0;
  --line: rgba(28, 28, 30, 0.08);
  background: #F6F1E8;
}
.profile-tile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 10px;
  justify-items: center;
}
.profile-tile {
  display: flex;
  width: 100%;
  max-width: 112px;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-align: center;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.profile-tile-face {
  display: grid;
  width: 100%;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 22px;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0.42) 100%);
  box-shadow:
    0 10px 28px rgba(28, 22, 16, 0.1),
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 0 0 1px rgba(28, 28, 30, 0.03);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  transition:
    transform var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease),
    background var(--dur) var(--ease);
}
.profile-tile-ico {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--ink);
}
.profile-tile-ico svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.profile-tile-cap {
  display: -webkit-box;
  width: 100%;
  max-height: 2.6em;
  overflow: hidden;
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 550;
  letter-spacing: -0.01em;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}
.profile-tile:active .profile-tile-face {
  transform: scale(0.94);
  background:
    linear-gradient(165deg, rgba(255, 229, 227, 0.9) 0%, rgba(255, 255, 255, 0.55) 100%);
  box-shadow:
    0 4px 14px rgba(28, 22, 16, 0.1),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
}
@media (hover: hover) and (pointer: fine) {
  .profile-tile:hover .profile-tile-face {
    background:
      linear-gradient(165deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.55) 100%);
    box-shadow:
      0 14px 32px rgba(28, 22, 16, 0.12),
      0 1px 0 rgba(255, 255, 255, 0.98) inset,
      0 0 0 1px rgba(255, 59, 48, 0.08);
  }
  .profile-tile:hover .profile-tile-ico { color: var(--red); }
}
.profile-tile:focus-visible .profile-tile-face {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}
.profile-lang-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.4) 100%);
  box-shadow:
    0 8px 24px rgba(28, 22, 16, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
}
.profile-lang-ico {
  display: grid;
  width: 22px;
  height: 22px;
  flex: none;
  place-items: center;
  color: var(--ink);
}
.profile-lang-ico svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.profile-lang-label {
  flex: 0 1 auto;
  color: var(--ink-2);
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
}
.menu-row {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: var(--s3);
  padding: 8px 2px;
  color: inherit;
  text-decoration: none;
}
.menu-row + .menu-row { border-top: 1px solid rgba(0, 0, 0, 0.06); }
.menu-ico {
  display: grid;
  width: 28px;
  height: 28px;
  flex: none;
  place-items: center;
  color: var(--ink);
}
.menu-ico svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.menu-label { flex: 1 1 auto; min-width: 0; font-size: var(--fs-base); }
.menu-meta { flex: none; color: var(--muted); font-size: var(--fs-md); }
.menu-chevron {
  width: 7px;
  height: 7px;
  flex: none;
  margin-left: 8px;
  margin-right: 2px;
  border-top: 1.7px solid var(--muted-2);
  border-right: 1.7px solid var(--muted-2);
  transform: rotate(45deg);
  opacity: 0.55;
}
.menu-toggle { cursor: default; }
.menu-toggle .notify-form { margin: 0 0 0 auto; }
.menu-toggle .switch {
  min-height: 0;
  padding: 0;
  border: 0;
}
.menu-toggle .switch input[type="checkbox"]:checked { background: var(--red); }

.account-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin: var(--s5) 0 var(--s3);
  padding: 4px 2px 0;
}
.text-action {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: var(--fs-base);
  font-weight: 500;
  cursor: pointer;
}
.text-action.danger { color: var(--red); }

.subhead {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin: var(--s2) 0 var(--s4);
}
.subhead h1 { flex: 1; font-size: var(--fs-xl); }
.subhead .back {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
  text-decoration: none;
}
.group.pad, .pad { padding: var(--s4); }
.pad-x { padding: 0 var(--s4); }
.avatar-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s2);
  margin-bottom: var(--s3);
  color: var(--muted);
  font-size: var(--fs-sm);
  cursor: pointer;
}
.avatar-upload input { display: none; }
.addr-row form { margin: 0; }
.theme-choice input { margin: 0; }
.lang-hit {
  display: inline-flex;
  min-width: 48px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-pill);
  color: inherit;
  font-weight: 600;
  text-decoration: none;
  touch-action: manipulation;
}

.list-row:has(.langs),
.lang-row {
  gap: var(--s2);
  padding-right: 12px;
  position: relative;
  z-index: 2;
}
.list-row:has(.langs) > span:first-child,
.lang-row > .lang-label {
  flex: 1 1 auto;
  min-width: 0;
  padding-right: var(--s2);
}
.langs {
  display: flex;
  flex: none;
  flex-shrink: 0;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  position: relative;
  z-index: 2;
}
.langs.lang-page {
  flex-wrap: wrap;
  width: 100%;
  justify-content: space-between;
}
.langs .lang-pill {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 48px;
  min-height: 44px;
  padding: 0 14px;
  font-size: var(--fs-md);
  font-weight: 600;
  line-height: 1;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}
.langs .lang-pill::before {
  content: "";
  position: absolute;
  inset: -6px -4px;
}

body.theme-dark {
  color-scheme: dark;
  --bg: #111114;
  --surface: #1c1c1f;
  --fill: #2a2a2e;
  --fill-2: #333338;
  --line: #2e2e33;
  --line-2: #3a3a40;
  --ink: #f4f4f6;
  --ink-2: #d0d0d6;
  --muted: #9a9aa2;
  --muted-2: #6e6e76;
}

/* Kitchen panel --------------------------------------------------------------------------------- */

/* Kitchen panel --------------------------------------------------------------------------------- */

.v-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  margin: var(--s2) 0 var(--s4);
}

.v-head > div:first-child { min-width: 0; }
.v-head h1 { font-size: var(--fs-xl); line-height: 1.2; overflow-wrap: anywhere; }
.v-head .muted { margin-top: 2px; font-size: var(--fs-md); }

.v-state { margin-top: 2px; font-size: var(--fs-sm); font-weight: 600; }
.v-state.ok { color: var(--green); }
.v-state.off, .v-state.wait { color: var(--muted); }
.v-state.bad { color: var(--red); }

.v-actions { display: flex; flex: none; gap: 10px; align-items: center; }
.v-actions form { margin: 0; }

.round, .power {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  font-size: var(--fs-sm);
  font-weight: 700;
}

.power svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; }
.power.on { border-color: var(--green); color: var(--green); }

.v-today { padding: var(--s4); }
.v-today > p { margin: 2px 0; }
.v-big { font-size: var(--fs-xl); font-weight: 750; }

.v-list { margin-top: var(--s2); }

.v-card, .c-card, .a-card { padding: var(--s4); }
.v-card > * + *, .c-card > * + * { margin-top: 10px; }
.v-card > form + form, .v-card > .btn-line + .btn-line { margin-top: var(--s2); }
.v-card.new { border: 1px solid #f6c9cb; box-shadow: 0 4px 16px rgba(232, 32, 42, 0.06); }
.v-card.new .cancel-box > summary.btn-red { border: 1.5px solid var(--red); background: var(--surface); color: var(--red); }

.v-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s3);
  padding-bottom: var(--s3);
  border-bottom: 1px solid var(--line);
}

.v-card-head strong { font-size: var(--fs-lg); }
.v-sum { font-size: var(--fs-xl); font-weight: 600; white-space: nowrap; }

.v-timer { color: var(--green); font-size: var(--fs-md); font-weight: 700; font-variant-numeric: tabular-nums; }
.v-timer.late, .warn-timer { color: var(--red); }
.v-status { color: var(--ink-2); font-weight: 600; }
.v-courier-none { color: var(--ink-2); }

.v-line { display: flex; justify-content: space-between; gap: var(--s3); font-size: var(--fs-md); }
.v-line b { flex: none; font-weight: 600; }

.money { padding-top: var(--s2); border-top: 1px solid var(--line); }
.money .sum-line { margin: 4px 0; font-size: var(--fs-sm); }

.more-time { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.more-time > span { flex: 1 1 100%; }
.more-time form { flex: 1; margin: 0; }
.more-time .btn-line { width: 100%; }

.half, .cancel-box, .add-box, .register, .cat-tools { margin: var(--s2) 0 0; }
.half > summary, .cancel-box > summary, .add-box > summary, .register > summary { list-style: none; cursor: pointer; }
.half > summary::-webkit-details-marker, .cancel-box > summary::-webkit-details-marker, .add-box > summary::-webkit-details-marker,
.register > summary::-webkit-details-marker, .cat-tools > summary::-webkit-details-marker { display: none; }
.half > summary { width: 100%; }
.half[open] > summary, .cancel-box[open] > summary { opacity: 0.6; }
.half .sheet-form, .cancel-box .sheet-form { margin: var(--s2) 0 0; }

.register { margin-top: var(--s5); }
.register > summary {
  display: flex;
  height: var(--h-btn);
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: var(--surface);
  font-weight: 600;
}

.alarm {
  position: fixed;
  right: var(--s3);
  bottom: calc(var(--vnav-h) + var(--s3) + var(--safe-b));
  left: var(--s3);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: var(--s3);
  max-width: 496px;
  margin: 0 auto;
}

.alarm-text,
.alarm-ok {
  display: flex;
  min-height: 64px;
  align-items: center;
  margin: 0;
  padding: var(--s3) var(--s4);
  border: 0;
  border-radius: var(--r-lg);
  color: #fff;
  font-size: var(--fs-md);
  font-weight: 600;
  line-height: 1.3;
  box-shadow: var(--shadow-3);
}


.photo-field { position: relative; min-width: 0; }
.photo-field .photo-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.photo-name,
[data-photo-name] {
  display: block;
  max-width: 100%;
  margin: 6px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: break-all;
}
.photo-field .photo-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.photo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: var(--fill);
  color: var(--ink);
  font: 600 var(--fs-sm) / 1.2 var(--font);
  cursor: pointer;
}
.photo-btn:active { background: var(--fill-2); }


/* Support care chat (admin inbox) --------------------------------------------------------------- */
a.support-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
a.support-row:active { opacity: 0.85; }
.care-empty { margin-top: var(--s3); text-align: center; }
body.chat .care-empty { padding-bottom: 4rem; }

/* Vendor analytics money breakdown + admin ops */
.stats-block { margin: var(--s4) 0 var(--s5); }
.stats-block > h2 { margin: 0 0 var(--s2); font-size: var(--fs-lg); }
.stats-block .v-big { margin: 0 0 4px; }
.v-money {
  margin: var(--s3) 0 var(--s2);
  padding: 12px var(--s4);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.v-money .sum-line { margin: 6px 0; font-size: var(--fs-md); }
.v-money .sum-line.strong { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.stats-ops { margin-top: var(--s3); }
.lead-ops { color: var(--muted); margin: 0 0 var(--s3); }
.ops-queue { margin: var(--s4) 0; padding: var(--s3) 0; border-top: 1px solid var(--line); }
.ops-queue-head { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:8px; }
.ops-queue-head h2 { margin:0; font-size:1rem; }
.ops-queue ul { margin:0; padding-left:1.1rem; }
.ops-queue li { margin:4px 0; }
.ops-money { margin: var(--s4) 0; padding-top: var(--s3); border-top: 1px solid var(--line); }
.ops-money h2, .ops-money h3 { margin: 12px 0 8px; }
.table-wrap { overflow-x:auto; -webkit-overflow-scrolling:touch; }
body.admin .table { width:100%; border-collapse:collapse; font-size:.86rem; }
body.admin .table th, body.admin .table td { text-align:left; padding:6px 8px; border-bottom:1px solid var(--line); vertical-align:top; }
body.vendor .alarm { z-index: 40; }

/* Apple-like polish (phase 3) ------------------------------------------------------------------- */
h1, .v-big, .c-ledger-big, .stat strong {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
}
.stats-block .v-big, .c-ledger-big {
  font-size: var(--fs-money);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.primary, .primary-link, .btn-line, .pill, .tab {
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.cuisine-details[open] .sheet-layer > .sheet,
.sheet {
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.alarm {
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
body.admin .stat, body.vendor .stat {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  padding: var(--s3);
}
body.admin .stat span, body.vendor .stat span { color: var(--muted); font-size: var(--fs-xs); }
body.admin .stat strong, body.vendor .stat strong {
  display: block; margin-top: 4px; font-size: var(--fs-xl); font-variant-numeric: tabular-nums;
}

.cf-streetview a {
  width: 34px;
  height: 34px;
  line-height: 34px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: #1a1a1a !important;
  text-decoration: none;
}
.c-pending-hint {
  max-width: 220px;
  margin: 0;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--fill, #f3f3f5);
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.35;
}
.analytics-ranges { margin: 0 0 var(--s4); flex-wrap: wrap; }

/* Profile bell + notices ----------------------------------------------------------------------- */
.bell-btn { position: relative; }
.bell-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  display: inline-grid;
  place-items: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
}
.notices-head { position: relative; }
.notices-clear-icon {
  margin: 0;
  margin-left: auto;
  display: grid;
  place-items: center;
}
.notices-clear-icon .icon-tool {
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: var(--ink);
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  border-radius: 12px;
}
.notices-clear-icon .icon-tool svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.notices-section-title {
  margin: var(--s4) var(--pad) var(--s2);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
}
.notices-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0 calc(-1 * var(--pad));
  border-top: 1px solid var(--line);
}
.notice-row {
  display: grid;
  gap: 4px;
  padding: var(--s3) var(--pad);
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}
.notice-row.is-history {
  opacity: 0.72;
}
.notice-row strong {
  font-size: var(--fs-base);
  font-weight: 650;
}
.notice-row.is-history strong {
  font-weight: 550;
}
.notice-row span {
  color: var(--ink);
  font-size: var(--fs-md);
  line-height: 1.35;
}
.notice-row small {
  color: var(--muted);
  font-size: var(--fs-xs);
}

/* Favorites ------------------------------------------------------------------------------------- */
.fav-head h1 { margin: 0; }
.fav-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 0 var(--s5);
  padding: 0;
}
.fav-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 28px rgba(17, 17, 26, 0.08), 0 0 0 1px rgba(17, 17, 26, 0.04);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
}
.fav-card-main {
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}
.fav-mark {
  display: grid;
  width: 56px;
  height: 56px;
  flex: none;
  place-items: center;
  border-radius: 16px;
  background: var(--fill);
  color: var(--ink-2);
  font-size: var(--fs-md);
  font-weight: 700;
}
.fav-card-copy {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}
.fav-card-title {
  display: block;
  font-size: var(--fs-base);
  font-weight: 650;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.fav-card-sub {
  display: block;
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1.3;
}
.fav-card-price {
  display: block;
  margin-top: 2px;
  color: var(--green-press);
  font-size: var(--fs-md);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.fav-thumb {
  flex: none;
  width: 72px;
  height: 72px;
  border-radius: 16px;
  object-fit: cover;
  background: var(--fill);
}
.fav-unsave {
  display: flex;
  flex: none;
  align-items: center;
  margin: 0;
}
.fav-unsave .fav-remove,
button.fav-remove {
  appearance: none;
  -webkit-appearance: none;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(220, 60, 70, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--red);
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 650;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(17, 17, 26, 0.06);
  cursor: pointer;
}
.fav-unsave .fav-remove:active {
  background: var(--red-soft);
  border-color: transparent;
  color: var(--red);
  transform: scale(0.97);
}
.display-reels {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: var(--s2);
}
.display-reels .primary-link {
  align-self: stretch;
  text-align: center;
}

/* Open referral stats -------------------------------------------------------------------------- */
.ref-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 var(--pad) var(--s4);
}
.ref-metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}
.ref-metric span {
  color: var(--muted);
  font-size: var(--fs-xs);
}
.ref-metric strong {
  font-size: var(--fs-lg);
  font-variant-numeric: tabular-nums;
}
.ref-wall {
  max-height: 420px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.ref-wall-row,
.ref-event {
  align-items: flex-start;
}
.ref-wall-row span,
.ref-event span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.ref-event small {
  display: block;
  color: var(--muted);
  font-size: var(--fs-xs);
}

/* Dish detail page ----------------------------------------------------------------------------- */
body.dish-page {
  background: var(--bg);
}
body.dish-page .shell {
  padding-left: 0;
  padding-right: 0;
  padding-bottom: calc(96px + var(--safe-b));
}
body.dish-page .tabbar { display: none; }
.dish-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  /* WebViews often report safe-area 0 — keep a hard floor under the status bar. */
  padding: calc(14px + max(var(--safe-t), 44px)) var(--pad) 10px;
  background: transparent;
  pointer-events: none;
}
.dish-topbar .back,
.dish-topbar .dish-fav-form,
.dish-topbar .dish-fav {
  pointer-events: auto;
}
.dish-topbar .back {
  display: grid;
  width: 40px;
  height: 40px;
  min-height: 0;
  margin: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 28px rgba(17, 17, 26, 0.14), 0 0 0 1px rgba(17, 17, 26, 0.04);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  color: var(--ink);
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
}
.dish-topbar .fav-form,
.dish-topbar .dish-fav-form {
  /* Cancel card .fav-form absolute — sit in the flex row under status bar. */
  position: static;
  top: auto;
  right: auto;
  z-index: auto;
  margin: 0 0 0 auto;
}
.dish-topbar .dish-fav {
  width: 40px;
  height: 40px;
  margin: 0;
  color: var(--ink);
}
.dish-hero {
  position: relative;
  margin: 0;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--fill);
}
.dish-hero-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.dish-hero-blank {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: #c4c4ca;
}
.dish-hero-blank svg { width: 64px; height: 64px; }
.dish-sheet {
  position: relative;
  z-index: 1;
  margin-top: -28px;
  padding: 22px var(--pad) 24px;
  border-radius: 28px 28px 0 0;
  background: var(--bg);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.04);
}
.dish-title {
  margin: 0 0 6px;
  font-size: clamp(1.35rem, 5vw, 1.7rem);
  font-weight: 740;
  line-height: 1.15;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}
.dish-store-link {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: var(--fs-md);
  text-decoration: none;
}
.dish-store-link:active { color: var(--ink); }
.dish-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}
.dish-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--fill);
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: 550;
}
.dish-about {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: var(--fs-md);
  line-height: 1.45;
}
.dish-kbju {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: var(--fs-sm);
}
.dish-video {
  display: block;
  width: 100%;
  margin: 0 0 16px;
  border-radius: var(--r-lg);
  background: #000;
}
.dish-page .reviews {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}
.dish-page .review-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}
.dish-buy-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px var(--pad) calc(12px + var(--safe-b));
  border-top: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 -8px 28px rgba(17, 17, 26, 0.1);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
}
.theme-dark .dish-buy-bar,
body.theme-dark .dish-buy-bar {
  background: rgba(20, 20, 22, 0.94);
}
.dish-buy-price { flex: none; min-width: 0; }
.dish-buy-price .dish-price.lg {
  color: var(--green-press);
  font-size: var(--fs-xl);
  font-weight: 740;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.dish-buy-ctl {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}
.dish-buy-ctl .qty,
.dish-buy-ctl form {
  margin: 0;
}
.dish-buy-ctl .qty {
  min-height: 48px;
}
.dish-buy-ctl .notice-bar {
  margin: 0;
  width: 100%;
  text-align: center;
}


/* Vendor open/closed status + order tabs (ASSET 78) */
.v-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: var(--fs-sm);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
}
.v-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.v-status-pill.is-open {
  color: #0b7a3b;
  background: #e8f8ee;
  border-color: #b7e6c7;
}
.v-status-pill.is-closed {
  color: #6b7280;
  background: #f3f4f6;
  border-color: #e5e7eb;
}
.v-status-pill.is-pending,
.v-status-pill.is-blocked {
  color: #9a3412;
  background: #fff7ed;
  border-color: #fed7aa;
}
.v-power-form, .v-open-form { margin: 0; }
.v-power-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 0;
  line-height: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.v-power-btn svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.v-power-btn.is-on {
  color: #0b7a3b;
  border-color: #b7e6c7;
  background: #e8f8ee;
}
.v-power-btn.is-off {
  color: #991b1b;
  border-color: #fecaca;
  background: #fef2f2;
}
button.v-open-toggle {
  font: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  text-align: left;
  gap: 8px;
}
button.v-open-toggle .v-open-hint {
  display: inline-block;
  margin-left: 6px;
  padding-left: 8px;
  border-left: 1px solid currentColor;
  opacity: 0.72;
  font-weight: 600;
  font-size: 12px;
}
.v-pos-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dish-ico-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font-weight: 650;
  font-size: var(--fs-sm);
  color: var(--ink-2);
}
.dish-ico-label svg {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dish-edit-form .field > .dish-ico-label { display: inline-flex; }
.dish-edit-form .field > span:not(.dish-ico-label) { display: none; }
.dish-switch-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.dish-switch .dish-ico-label { margin: 0; }
.dish-media-row { align-items: stretch; }
.dish-media-field input[type="file"] {
  padding: 10px;
  border: 1px dashed var(--line-2);
  border-radius: 10px;
  background: #fff;
}
.dish-macro-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 520px) {
  .dish-macro-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dish-switch-row { grid-template-columns: 1fr; }
}
.v-segs {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  margin: 0 0 var(--s4);
  padding: 2px 2px 10px;
}
.v-segs::-webkit-scrollbar { display: none; }
.v-seg {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: inherit;
  text-decoration: none;
  font-size: var(--fs-sm);
  font-weight: 650;
  white-space: nowrap;
  scroll-snap-align: start;
}
.v-seg.is-current {
  background: #111;
  border-color: #111;
  color: #fff;
}
.menu-bulk {
  display: grid;
  gap: var(--s2);
  margin: 0 0 var(--s4);
}
.menu-bulk .btn-green.wide { width: 100%; }
.menu-export-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s2);
}
.menu-export-row .inline-import { display: block; }
.menu-export-row .file-pill { display: flex; width: 100%; justify-content: center; }
.menu-template-link {
  justify-self: start;
  margin-top: 2px;
  font-size: var(--fs-sm);
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.account-map {
  height: 220px;
  margin: 0 0 var(--s3);
  border-radius: var(--r-sm);
  overflow: hidden;
  border: 1px solid var(--line);
}
.account-map[hidden] { display: none; }
.profile-addr-actions { margin: 0 0 var(--s2); }
#vendor-map.map { min-height: 260px; }
[data-import-name]:not([hidden]) {
  display: block;
  margin-top: 6px;
}

/* Dish Reels (profile / display) --------------------------------------------------------------- */
body.reels-page {
  --reel-h: 100dvh;
  background: #0b0b0c;
  color: #fff;
}
body.reels-page .shell { padding: 0; max-width: none; }
body.reels-page .tabbar { display: none; }
.reel-head {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 10px;
  background: linear-gradient(to bottom, rgba(0,0,0,.55), transparent);
  color: #fff;
}
.reel-head h1 { margin: 0; font-size: 1rem; font-weight: 700; }
.reel-head .back { color: #fff; font-size: 1.4rem; text-decoration: none; }
.reel-feed {
  height: var(--reel-h);
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
.reel-card {
  position: relative;
  height: var(--reel-h);
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: #111;
}
.reel-stage { position: absolute; inset: 0; }
.reel-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #111;
}
.reel-shade {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.72) 0%, rgba(0,0,0,.15) 42%, rgba(0,0,0,.35) 100%);
  pointer-events: none;
}
.reel-meta {
  position: absolute;
  left: 14px; right: 78px;
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  z-index: 2;
}
.reel-store { margin: 0 0 4px; font-size: 13px; opacity: .85; }
.reel-title { margin: 0; font-size: 1.2rem; line-height: 1.25; text-shadow: 0 1px 8px rgba(0,0,0,.45); }
.reel-rail {
  position: absolute;
  right: 10px;
  bottom: calc(110px + env(safe-area-inset-bottom, 0px));
  z-index: 3;
  display: grid;
  gap: 14px;
  justify-items: center;
}
.reel-btn {
  display: grid;
  place-items: center;
  gap: 4px;
  width: 48px;
  min-height: 48px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  color: #fff;
  backdrop-filter: blur(8px);
  cursor: pointer;
  font: 700 11px/1 var(--font);
}
.reel-btn svg {
  width: 22px; height: 22px;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.reel-btn.is-on { background: #ef3d3d; }
.reel-comments { position: relative; }
.reel-comments > summary { list-style: none; }
.reel-comments > summary::-webkit-details-marker { display: none; }
.reel-comments-body {
  position: absolute;
  right: 56px; bottom: 0;
  width: min(70vw, 260px);
  max-height: 42vh;
  overflow: auto;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(20,20,22,.92);
  color: #fff;
  box-shadow: 0 10px 28px rgba(0,0,0,.35);
}
.reel-comment { margin: 0 0 8px; font-size: 12px; line-height: 1.35; }
.reel-more { color: #fff; font-size: 12px; font-weight: 700; }
.reel-order {
  position: absolute;
  left: 12px; right: 12px;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(10px);
}
.reel-price { font-weight: 800; font-size: 1.05rem; }
.reel-order .qty { background: rgba(0,0,0,.25); border-radius: 999px; }
.reel-empty { padding: 40vh 24px 0; text-align: center; color: #ddd; }


/* Iris 09.11 — vendor header / menu icons / courier history accordion */
.v-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.v-head > h1 { margin: 0; min-width: 0; flex: 1; font-size: var(--fs-xl); line-height: 1.2; overflow-wrap: anywhere; }
.v-actions { display: flex; flex: none; gap: 10px; align-items: center; }
.menu-bulk-icons { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 var(--s4); }
.icon-tool {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; width: auto; min-width: 52px; max-width: 76px; min-height: 48px;
  border: 0; border-radius: 0; background: transparent; color: var(--ink);
  padding: 4px 2px; cursor: pointer; text-decoration: none;
}
.icon-tool svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-tool-label {
  display: block; font-size: 10px; line-height: 1.15; font-weight: 600; text-align: center;
  color: inherit; opacity: .88; max-width: 4.6rem; overflow-wrap: anywhere;
}
.icon-tool.is-add { background: transparent; color: var(--ink); border: 0; }
.icon-tool.file-pill { margin: 0; }
.icon-tool.file-pill input { display: none; }
.dish-edit-actions { display: flex; gap: 10px; align-items: center; margin-top: var(--s3); }
.dish-edit-actions .primary { flex: 1; }
body.vendor .stats-block { margin: var(--s5) 0; padding-top: var(--s3); border-top: 1px solid var(--line); }
body.vendor .stats-block:first-of-type { border-top: 0; padding-top: 0; }
.c-delivered-block .c-hist-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.c-delivered-block .c-hist {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface, #fff);
}
.c-hist { padding: 0; overflow: hidden; }
.c-hist-toggle {
  display: block; width: 100%; margin: 0; padding: var(--s4); border: 0; background: transparent;
  color: inherit; text-align: left; font: inherit; cursor: pointer;
}
.c-hist-toggle .c-row-between { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.c-earn-sm { font-weight: 700; color: var(--green, #34c759); white-space: nowrap; }
.c-hist-detail { display: none; padding: 0 var(--s4) var(--s4); border-top: 1px solid var(--line); }
.c-hist-detail .c-money-line { margin: 6px 0; }
.c-hist-lines { margin-top: 8px; }
.c-hist-lines .c-line { margin: 2px 0; font-size: 13px; }
.c-hist.is-open .c-hist-detail { display: block; }
.c-hist.is-open .c-hist-toggle { background: var(--fill, #f6f6f8); }
/* doc thumbs sized in .c-doc-grid block above */

.c-settle-qr{display:block;width:min(220px,70vw);height:auto;margin:10px auto;border-radius:12px;background:#fff}
.v-danger{margin:24px 0 40px;padding:16px;border:1px solid #f1b4b4;border-radius:16px;background:#fff5f5}
.v-danger h2{margin:0 0 8px;font-size:16px;color:#b42318}
.field.is-invalid,.photo-field.is-invalid,label.is-invalid{outline:2px solid #d92d20;border-radius:12px}
.c-pending-hint{margin:8px 0 0;font-size:13px;color:#9a3412;max-width:16rem}

/* Iris 10.11 — courier analytics meters + profile icon actions */
.c-section { margin-bottom: var(--s4); }
.c-section-kicker {
  margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted);
}
.c-meter {
  height: 8px; border-radius: 999px; background: var(--fill-2); overflow: hidden; margin: 8px 0 12px;
}
.c-meter > i {
  display: block; height: 100%; border-radius: inherit; background: var(--green);
}
.c-meter.is-debt > i { background: var(--red); }
.profile-icons {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; margin: 16px 0 28px;
}
.profile-icons .icon-tool-form { margin: 0; }
.icon-tool.is-danger { background: #fff5f5; color: #b42318; border-color: #f1b4b4; }
.c-reloc {
  margin: 12px 0; padding: 12px; border-radius: 14px; background: var(--fill);
}
body.vendor .pills.pill-scroll { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 8px; scrollbar-width: none; }
body.vendor .pills.pill-scroll::-webkit-scrollbar { display: none; }
body.vendor .pills.pill-scroll .pill { flex: none; }

/* POS */
.pos-new { margin: 0 0 16px; }
.pos-ticket {
  margin: 12px 0 20px;
  padding: 14px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.pos-ticket h2 { margin: 0 0 10px; font-size: 1.1rem; }
.pos-line {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  margin: 6px 0;
}
.pos-line-actions { display: inline-flex; gap: 4px; }
.pos-pay { display: grid; gap: 8px; margin-top: 14px; }
.pos-total { margin: 0; font-size: 1.35rem; font-weight: 800; }
.pos-history .list-row { display: flex; justify-content: space-between; gap: 10px; }

/* Customer dish card: plus sits bottom-right inside the card */
.dish-card .dish-foot {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  padding-right: 2px;
  padding-bottom: 2px;
}
.dish-card .add-form,
.dish-card .qty {
  margin-left: auto;
  margin-bottom: 0;
}
.dish-card .qty-btn.qty-plus {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  box-shadow: none;
}

/* Iris UI cleanup: flatten unnecessary boxed containers */
.profile-head,
.profile-menu,
.profile-about,
.account-actions {
  border: 0;
  box-shadow: none;
}
.profile-about {
  background: transparent;
}
body.courier .c-ledger,
body.courier .c-docs-block {
  border: 0;
  box-shadow: none;
  background: transparent;
  padding-left: 0;
  padding-right: 0;
}
/* Iris: my-order trip cards — flatten unnecessary boxed chrome */
body.courier .c-card.trip {
  border: 0;
  box-shadow: none;
  background: transparent;
  padding-left: 0;
  padding-right: 0;
}
body.courier .c-card.trip .c-khach,
body.courier .c-card.trip .c-reloc,
body.courier .c-card.trip .c-money {
  border: 0;
  box-shadow: none;
}
body.vendor .menu-cat,
body.vendor .v-today,
body.vendor .stats-block,
body.vendor .group {
  border: 0;
  box-shadow: none;
}
body.vendor .dish-card {
  border: 0;
  box-shadow: none;
  background: transparent;
  padding-left: 0;
  padding-right: 0;
}
.order-link {
  border: 0;
  box-shadow: none;
}
.reloc-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}
body.courier .photo-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Dish add-ons (client + vendor) -------------------------------------------------------------- */
.dish-addons { margin: var(--s4) 0; display: grid; gap: var(--s3); }
.addon-group {
  margin: 0;
  padding: var(--s3);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.addon-group legend {
  padding: 0 var(--s2);
  font-weight: 600;
  font-size: var(--fs-sm);
}
.addon-opt {
  display: flex;
  gap: var(--s3);
  align-items: flex-start;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.addon-group .addon-opt:first-of-type,
.addon-opt.loose { border-top: 0; }
.addon-opt input { margin-top: 3px; flex: none; }
.addon-opt span { min-width: 0; line-height: 1.35; }
.cart-addons { display: block; color: var(--muted); margin-top: 2px; }
.dish-choose {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  font-weight: 600;
}
.addon-attach { margin: var(--s3) 0; display: grid; gap: var(--s2); }
.check-grid { display: grid; gap: 6px; }
.check-grid .check.indent,
label.check.indent { padding-left: 1.4rem; font-size: var(--fs-sm); color: var(--muted); }
body.vendor .addon-attach .check { display: block; }
