/* Хачапури Хаус — design tokens from TASK.md (project tokens, not official brand colours) */
:root {
  --bg: #F8F0E4;
  --card: #FFF9F1;
  --text: #30291F;
  --muted: #746A5D;
  --accent: #465326;
  --accent-press: #39441F;
  --accent-soft: #E9E6D3;
  --border: #E4D9CB;
  --gold: #C5A572; /* branding only */
  --danger: #A23A2C;
  --r-card: 16px;
  --r-btn: 14px;
  --gap: 12px;
  --side: 16px;
  --tab-h: 64px;
  --safe-t: max(var(--tg-top, 0px), env(safe-area-inset-top, 0px));
  --safe-b: max(var(--tg-bottom, 0px), env(safe-area-inset-bottom, 0px));
  --font: system-ui, -apple-system, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: var(--app-h, 100vh);
  background: var(--bg);
  color: var(--text);
  font: 400 16px/22px var(--font);
  overflow-x: hidden;
  overscroll-behavior-y: none;
}
#app { max-width: 480px; margin: 0 auto; min-height: var(--app-h, 100vh); position: relative; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: default; }
input, textarea { font: inherit; color: var(--text); caret-color: var(--accent); }
img { display: block; max-width: 100%; }
.ic { width: 24px; height: 24px; flex: none; }
.muted { color: var(--muted); }
.small { font-size: 13px; line-height: 18px; }
.center { text-align: center; }
.accent { color: var(--accent); }
.grow { flex: 1; min-width: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input:focus-visible, textarea:focus-visible { outline: none; }

.screen {
  padding: calc(var(--safe-t) + 8px) var(--side) 24px;
}
.has-tabs .screen { padding-bottom: calc(var(--tab-h) + var(--safe-b) + 24px); }
.has-cta .screen { padding-bottom: calc(86px + var(--safe-b) + 16px); }
.has-tabs.has-cta .screen { padding-bottom: calc(var(--tab-h) + 86px + var(--safe-b) + 16px); }

/* ---------- header ---------- */
.hdr { display: flex; align-items: center; gap: 8px; min-height: 56px; margin-bottom: 8px; }
.hdr h1 { font-size: 28px; line-height: 34px; font-weight: 700; letter-spacing: -0.01em; flex: 1; min-width: 0; }
.hdr.with-back h1 { font-size: 24px; line-height: 30px; }
.hdr-back, .icon-btn {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 22px; flex: none; color: var(--text);
}
.hdr-back { margin-left: -10px; }
.icon-btn { margin-right: -10px; }
.icon-btn:active, .hdr-back:active { background: var(--accent-soft); }

/* ---------- buttons ---------- */
.btn {
  min-height: 52px; padding: 0 20px; border-radius: var(--r-btn);
  font-size: 17px; font-weight: 600; line-height: 22px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background-color .15s, transform .1s;
}
.btn.wide { width: 100%; }
.btn.primary { background: var(--accent); color: #FFF9F1; }
.btn.primary:active:not(:disabled) { background: var(--accent-press); transform: scale(.99); }
.btn.primary:disabled { background: #A9AC97; color: #F4EFE4; }
.btn.secondary { background: var(--card); border: 1px solid var(--border); color: var(--text); }
.btn.outline { background: var(--card); border: 1px solid var(--border); color: var(--accent); }
.btn.danger { background: var(--danger); color: #FFF9F1; }
.btn[aria-busy="true"] { opacity: .8; }
.link { color: var(--accent); font-size: 15px; font-weight: 600; display: inline-flex; align-items: center; gap: 2px; min-height: 44px; }
.link .ic { width: 18px; height: 18px; }

/* add (+) and steppers — 44px tap zones */
.add { width: 44px; height: 44px; display: grid; place-items: center; margin: -4px; }
.add span { width: 36px; height: 36px; border-radius: 18px; background: var(--accent); color: #FFF9F1; display: grid; place-items: center; transition: transform .1s; }
.add:active span { transform: scale(.92); }
.add .ic { width: 20px; height: 20px; stroke-width: 2.4; }
.stepper {
  display: inline-flex; align-items: center; height: 44px; border-radius: 22px;
  background: var(--card); box-shadow: inset 0 0 0 1px var(--border); flex: none;
}
.stepper button { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 22px; color: var(--text); }
.stepper button:active:not(:disabled) { background: var(--accent-soft); }
.stepper button:disabled { color: #C4BAAD; }
.stepper .ic { width: 18px; height: 18px; stroke-width: 2.3; }
.stepper output { min-width: 20px; text-align: center; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stepper.round { background: var(--accent); box-shadow: none; color: #FFF9F1; }
.stepper.round button { color: #FFF9F1; }
.stepper.round button:active:not(:disabled) { background: var(--accent-press); }
.soldout { font-size: 13px; line-height: 18px; color: var(--danger); font-weight: 600; }

.price { font-size: 18px; line-height: 24px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.price.big { font-size: 24px; line-height: 30px; }

/* ---------- bottom navigation ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  max-width: 480px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: var(--card); border-top: 1px solid var(--border);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 12px; line-height: 16px; color: var(--muted); font-weight: 500;
}
.tabbar a.on { color: var(--accent); font-weight: 700; }
.tabbar a.on .ic { stroke-width: 2.3; }
.ti { position: relative; display: grid; }
.badge {
  position: absolute; top: -7px; left: 14px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--accent); color: #FFF9F1; font-size: 12px; line-height: 20px; font-weight: 700; text-align: center;
  border: 2px solid var(--card); box-sizing: content-box; transform: translate(0, -2px);
}

/* fixed CTA above the safe area (and above the tabbar when both exist) */
.cta-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 19;
  max-width: 480px; margin: 0 auto;
  padding: 12px var(--side) calc(12px + var(--safe-b));
  background: linear-gradient(to bottom, rgba(248, 240, 228, 0), var(--bg) 18px);
}
.has-tabs .cta-bar { bottom: calc(var(--tab-h) + var(--safe-b)); padding-bottom: 12px; }
/* While the keyboard is open fixed bars would cover the focused field: the tabbar hides and
   the CTA drops into the normal flow right after the form, still reachable by scrolling. */
body.kb .tabbar { display: none; }
body.kb .cta-bar { position: static; background: none; padding: 0 var(--side) calc(16px + var(--safe-b)); }
body.kb .screen { padding-bottom: 16px; }

/* ---------- skeletons ---------- */
.sk, .sk-chip { background: linear-gradient(90deg, #EFE5D6 0%, #F7EFE3 50%, #EFE5D6 100%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; border-radius: 10px; }
.sk.l1, .sk.l2 { display: block; height: 14px; margin: 6px 0; }
.sk.l1 { width: 70%; } .sk.l2 { width: 40%; }
.row-sk { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.row-sk .ph { width: 96px; height: 80px; border-radius: 14px; flex: none; }
.sk-lines { flex: 1; }
.card-sk { background: var(--card); border-radius: var(--r-card); padding: 0 0 12px; overflow: hidden; }
.card-sk .sk:first-child { display: block; aspect-ratio: 4 / 3; border-radius: 0; margin-bottom: 8px; }
.card-sk .sk.l1, .card-sk .sk.l2 { margin: 8px 12px; }
.sk-chip { width: 88px; height: 36px; border-radius: 18px; flex: none; border: 0; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
  .sk, .sk-chip { animation: none; }
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- photos ---------- */
.ph, .pop-ph, .dp { display: block; overflow: hidden; background: #E9DDCB; flex: none; }
.ph img, .pop-ph img, .dp img { width: 100%; height: 100%; object-fit: cover; }
.noimg { display: grid; place-items: center; color: #B3A693; }
.noimg .ic { width: 28px; height: 28px; }

/* ---------- home ---------- */
.s-home { padding-top: 0; }
.hero {
  position: relative; margin: 0 calc(-1 * var(--side)); height: calc(clamp(330px, 100vw, 430px) + var(--safe-t) * .7);
  overflow: hidden; background: #3B2A1A;
}
.hero.sk { border-radius: 0; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(32, 21, 10, .9) 0, rgba(32, 21, 10, .72) calc(var(--safe-t) + 110px), rgba(32, 21, 10, 0) calc(var(--safe-t) + 210px)),
    linear-gradient(to top, rgba(30, 20, 10, .82) 0%, rgba(30, 20, 10, .35) 32%, rgba(30, 20, 10, 0) 52%);
}
.hero-logo {
  position: absolute; z-index: 1; left: 50%; top: calc(var(--safe-t) - 2px); transform: translateX(-50%);
  width: min(260px, 66vw); height: auto;
}
.hero-title {
  position: absolute; z-index: 1; left: var(--side); right: var(--side); bottom: 52px;
  color: #FFF9F1; font-size: 26px; line-height: 31px; font-weight: 700; letter-spacing: -0.01em;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .35); max-width: 330px;
}
.ways { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); margin-top: -36px; }
.way {
  min-height: 116px; border-radius: var(--r-card); padding: 14px 10px 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 4px;
  background: var(--card); border: 1px solid var(--border); color: var(--text);
  box-shadow: 0 4px 14px rgba(48, 41, 31, .07); transition: background-color .15s, color .15s;
}
.way .ic { width: 30px; height: 30px; color: var(--accent); margin-bottom: 4px; stroke-width: 1.7; }
.way b { font-size: 17px; line-height: 22px; font-weight: 600; }
.way span { font-size: 13px; line-height: 17px; color: var(--muted); }
.way.on { background: var(--accent); border-color: var(--accent); color: #FFF9F1; }
.way.on .ic, .way.on span { color: #FFF9F1; }
.way.on span { opacity: .86; }
.way.sk { border: 0; box-shadow: none; }
.sect { margin-top: 24px; }
.sect-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sect-head h2 { font-size: 24px; line-height: 30px; font-weight: 700; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.pop { background: var(--card); border-radius: var(--r-card); overflow: hidden; display: flex; flex-direction: column; border: 1px solid #EFE5D7; }
.pop-open { display: block; flex: 1; }
.pop-ph { aspect-ratio: 4 / 3; width: 100%; }
.pop h3 { font-size: 15px; line-height: 20px; font-weight: 600; padding: 10px 12px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: break-word; }
.pop-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 4px 8px 8px 12px; min-height: 52px; }
.pop-foot:has(.stepper) { flex-wrap: wrap; }
.pop-foot:has(.stepper) .qty-slot { width: 100%; }
.pop-foot .stepper { width: 100%; justify-content: space-between; }
.demo-note { margin-top: 24px; font-size: 13px; line-height: 18px; color: var(--muted); text-align: center; }
.off .ph img, .off .pop-ph img { filter: grayscale(.8); opacity: .7; }

/* ---------- menu ---------- */
.chips {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--side)) 4px; padding: 0 var(--side) 8px;
  scroll-padding: 0 var(--side);
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 36px; padding: 0 16px; border-radius: 18px; display: inline-flex; align-items: center;
  background: var(--card); border: 1px solid var(--border); font-size: 15px; font-weight: 500; white-space: nowrap; position: relative;
}
.chip::after { content: ""; position: absolute; inset: -4px 0; } /* 44px tap height */
.chip.on { background: var(--accent); border-color: var(--accent); color: #FFF9F1; font-weight: 600; }
.search { margin-bottom: 8px; }
.search input {
  width: 100%; height: 44px; border-radius: var(--r-btn); border: 1px solid var(--border); background: var(--card);
  padding: 0 14px; font-size: 16px; outline: none; -webkit-appearance: none; appearance: none;
}
.cat-row, .dish-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); position: relative; }
.list > :last-child { border-bottom: 0; }
.cat-row .ph, .dish-row .ph { width: 96px; height: 80px; border-radius: 14px; }
.dr-body { flex: 1; min-width: 0; }
.cat-row h3 { font-size: 18px; line-height: 24px; font-weight: 600; }
.cat-row p { font-size: 15px; line-height: 20px; margin-top: 2px; }
.cat-row .chev { color: var(--text); width: 22px; height: 22px; }
.dish-open { display: flex; gap: 14px; align-items: flex-start; flex: 1; min-width: 0; padding-right: 48px; }
.dish-row h3 { font-size: 16px; line-height: 21px; font-weight: 600; overflow-wrap: break-word; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.dish-row p { font-size: 13px; line-height: 18px; margin-top: 2px; }
.dish-row .price { display: block; margin-top: 6px; }
.dish-row .qty-slot { position: absolute; right: 0; bottom: 12px; }
.dish-row:has(.stepper) .dish-open { padding-right: 0; }
.dish-row:has(.stepper) .dr-body { min-height: 80px; }
@media (max-width: 370px) {
  .dish-row:has(.stepper) .dish-open { padding-bottom: 50px; }
}
.dish-row .soldout { display: block; padding: 0 2px 4px; }

/* ---------- dish ---------- */
.s-dish { padding: 0 0 24px; }
.dish-photo { position: relative; height: clamp(280px, 86vw, 400px); background: #3B2A1A; }
.dish-photo.sk { border-radius: 0; }
.dp { width: 100%; height: 100%; }
.dp img { image-rendering: auto; }
.photo-note {
  position: absolute; left: var(--side); top: calc(var(--safe-t) + 12px); padding: 4px 10px; border-radius: 12px;
  background: rgba(30, 22, 14, .62); color: #FFF9F1; font-size: 12px; line-height: 16px;
}
.has-back-float .photo-note { left: 68px; }
.float-back {
  position: absolute; z-index: 3; top: calc(var(--safe-t) + 8px); left: 12px; width: 44px; height: 44px; border-radius: 22px;
  display: grid; place-items: center; background: rgba(255, 249, 241, .92); color: var(--text);
}
.float-back ~ .dish-photo .photo-note { left: 66px; }
.dish-card {
  position: relative; margin-top: -24px; background: var(--bg); border-radius: 24px 24px 0 0; padding: 22px var(--side) 0;
}
.dish-card h1 { font-size: 26px; line-height: 32px; font-weight: 700; letter-spacing: -0.01em; overflow-wrap: break-word; }
.ingredients { margin-top: 8px; color: var(--muted); }
.meta { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--muted); font-size: 15px; }
.meta .ic { width: 20px; height: 20px; }
.price-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }
.in-cart { margin-top: 12px; font-size: 14px; }

/* ---------- cart ---------- */
.cart-list { display: grid; gap: var(--gap); }
.cart-row { display: flex; gap: 12px; padding: 12px; background: var(--card); border-radius: var(--r-card); position: relative; border: 1px solid #EFE5D7; }
.cr-ph .ph { width: 80px; height: 72px; border-radius: 12px; }
.cr-body { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; }
.cr-body h3 { font-size: 16px; line-height: 21px; font-weight: 600; padding-right: 30px; overflow-wrap: break-word; }
.cr-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.cr-del { position: absolute; top: 2px; right: 2px; width: 44px; height: 44px; display: grid; place-items: center; color: var(--muted); }
.cr-del .ic { width: 20px; height: 20px; }
.label { font-size: 15px; line-height: 20px; font-weight: 600; margin: 24px 0 8px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg button {
  height: 52px; border-radius: var(--r-btn); display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--card); border: 1px solid var(--border); font-size: 16px; font-weight: 600;
}
.seg button .ic { width: 22px; height: 22px; }
.seg button.on { background: var(--accent); border-color: var(--accent); color: #FFF9F1; }
.totals { margin: 20px 0 16px; }
.trow { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 0; font-size: 16px; }
.trow span:last-child { font-weight: 600; font-variant-numeric: tabular-nums; }
.trow.total { margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 22px; line-height: 28px; font-weight: 700; }
.trow.total span:last-child { font-weight: 700; }
.totals .small { margin-top: 4px; }
.s-cart > .small.center { margin-top: 10px; }

/* ---------- states ---------- */
.state { text-align: center; padding: 32px 8px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.state h2 { font-size: 22px; line-height: 28px; font-weight: 700; }
.state .btn { margin-top: 12px; min-width: 200px; }
.state-ic { width: 56px; height: 56px; border-radius: 28px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 4px; }
.state.empty { padding-top: 8px; }
.empty-ill { width: min(220px, 60vw); height: auto; margin-bottom: 4px; }
.pad-top { padding-top: calc(var(--safe-t) + 72px); }
.notice { margin: 12px 0; padding: 12px 14px; border-radius: 12px; font-size: 15px; line-height: 20px; }
.notice.error { background: #F6E1D9; color: #7A2A1F; }
.notice.info { background: var(--accent-soft); color: var(--accent); }

/* ---------- checkout ---------- */
#checkout { display: grid; gap: var(--gap); }
.field-card {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px; background: var(--card); border-radius: var(--r-card);
  border: 1px solid #EFE5D7; text-align: left; width: 100%; min-height: 64px;
}
.field-card.invalid { border-color: var(--danger); }
.field-card .lead { color: var(--text); margin-top: 1px; }
.field-card > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.field-card b { font-size: 16px; line-height: 22px; font-weight: 500; overflow-wrap: break-word; }
.field-card .chev { color: var(--text); align-self: center; width: 22px; height: 22px; }
.fc-label { font-size: 15px; line-height: 20px; font-weight: 600; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.field-card input, .field-card textarea {
  width: 100%; border: 0; background: transparent; padding: 4px 0 0; font-size: 16px; line-height: 22px; outline: none; resize: none;
  -webkit-appearance: none; appearance: none;
}
.field-card textarea { min-height: 44px; }
.field-card input::placeholder, .field-card textarea::placeholder, .fld input::placeholder { color: #A69B8C; }
.small-btn { font-size: 13px; min-height: 28px; margin: -6px 0; padding: 0 2px; font-weight: 600; }
.err { color: var(--danger); font-size: 13px; line-height: 18px; margin-top: 2px; }
.paybar { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--card); border-radius: var(--r-card); padding: 10px 10px 10px 16px; border: 1px solid var(--border); box-shadow: 0 -2px 16px rgba(48, 41, 31, .06); }
.paybar > div { display: flex; flex-direction: column; }
.paybar .price { font-size: 20px; line-height: 26px; }
.paybar .btn { min-width: 140px; }
#checkout .demo-note { margin-top: 4px; }

/* ---------- addresses ---------- */
.addr-list { display: grid; gap: var(--gap); }
.addr { display: flex; align-items: center; background: var(--card); border-radius: var(--r-card); border: 1px solid #EFE5D7; padding-right: 14px; }
.addr.on { border-color: var(--accent); }
.addr-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 14px 4px 14px 14px; text-align: left; min-height: 64px; }
.addr-main .grow { display: flex; flex-direction: column; gap: 2px; }
.addr-main b { font-size: 16px; line-height: 22px; font-weight: 600; overflow-wrap: break-word; }
.default { color: var(--accent); font-size: 13px; line-height: 18px; font-weight: 600; }
.radio { width: 24px; height: 24px; border-radius: 12px; border: 2px solid var(--border); display: grid; place-items: center; flex: none; }
.addr.on .radio { background: var(--accent); border-color: var(--accent); color: #FFF9F1; }
.radio .ic { width: 15px; height: 15px; stroke-width: 3; }
.add-addr { margin-top: 20px; }
.add-addr .ic { width: 22px; height: 22px; }
.overlay { position: fixed; inset: 0; background: rgba(30, 24, 16, .42); z-index: 40; animation: fade .15s ease-out; }
.sheet, .dialog {
  position: fixed; z-index: 41; left: 0; right: 0; margin: 0 auto; max-width: 480px; background: var(--card);
}
.sheet { bottom: 0; border-radius: 20px 20px 0 0; padding: 8px var(--side) calc(12px + var(--safe-b)); animation: up .18s ease-out; }
.sheet-title { padding: 12px 0 8px; color: var(--muted); font-size: 14px; text-align: center; }
.sheet-btn { width: 100%; min-height: 52px; display: flex; align-items: center; gap: 12px; font-size: 17px; border-top: 1px solid var(--border); }
.sheet-btn.danger { color: var(--danger); }
.sheet-btn.cancel { justify-content: center; font-weight: 600; }
.dialog { top: 50%; transform: translateY(-50%); width: calc(100% - 48px); border-radius: 20px; padding: 22px 20px 18px; text-align: center; animation: fade .15s ease-out; }
.dialog h2 { font-size: 20px; line-height: 26px; }
.dialog p { margin-top: 6px; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(24px); opacity: .4; } }

/* ---------- address editor ---------- */
.form { display: grid; gap: 14px; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fld { display: flex; flex-direction: column; gap: 6px; }
.fld > span { font-size: 15px; line-height: 20px; font-weight: 500; }
.fld i { font-style: normal; color: var(--muted); font-size: 13px; font-weight: 400; }
.fld input, .fld textarea {
  width: 100%; min-height: 48px; border-radius: 12px; border: 1px solid var(--border); background: var(--card);
  padding: 12px 14px; font-size: 16px; line-height: 22px; outline: none; resize: none; -webkit-appearance: none; appearance: none;
}
.fld input:focus, .fld textarea:focus { border-color: #B9AD98; }
.fld.invalid input { border-color: var(--danger); }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; font-size: 16px; position: relative; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; width: 52px; height: 32px; right: 0; margin: 0; }
.toggle i { width: 52px; height: 32px; border-radius: 16px; background: #D8CDBE; position: relative; flex: none; transition: background-color .15s; }
.toggle i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 13px; background: #FFF9F1; box-shadow: 0 1px 3px rgba(0,0,0,.18); transition: transform .15s; }
.toggle input:checked + i { background: var(--accent); }
.toggle input:checked + i::after { transform: translateX(20px); }
.toggle input:disabled + i { opacity: .55; }
.toggle input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- success ---------- */
.s-success { position: relative; overflow: hidden; padding-top: calc(var(--safe-t) + 28px); }
.leaf { position: absolute; width: 170px; height: auto; opacity: .9; pointer-events: none; top: calc(var(--safe-t) - 10px); }
.leaf.l { left: -78px; transform: rotate(-24deg); }
.leaf.r { right: -78px; transform: rotate(24deg); }
.done { position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 0 12px; }
.done-mark { width: 72px; height: 72px; border-radius: 36px; background: var(--accent); color: #FFF9F1; display: grid; place-items: center; margin-bottom: 6px; }
.done-mark .ic { width: 38px; height: 38px; stroke-width: 2.6; }
.done h1 { font-size: 28px; line-height: 34px; font-weight: 700; }
.done p { max-width: 320px; }
.receipt { position: relative; margin-top: 24px; background: var(--card); border-radius: var(--r-card); border: 1px solid #EFE5D7; padding: 6px 16px; }
.rc { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid #EFE5D7; }
.rc:last-child { border-bottom: 0; }
.rc > div { display: flex; flex-direction: column; min-width: 0; }
.rc .fc-label { font-size: 13px; line-height: 18px; font-weight: 400; color: var(--muted); }
.rc b { font-size: 17px; line-height: 22px; font-weight: 600; overflow-wrap: break-word; }
.rc .lead { color: var(--accent); }

/* narrow phones */
@media (max-width: 350px) {
  :root { --side: 12px; }
  .hdr h1 { font-size: 24px; line-height: 30px; }
  .hero-title { font-size: 22px; line-height: 27px; }
  .cat-row .ph, .dish-row .ph { width: 84px; height: 70px; }
  .dish-open, .cat-row, .dish-row { gap: 10px; }
  .way span { font-size: 12px; }
  .seg button { font-size: 15px; gap: 6px; }
  .paybar .btn { min-width: 120px; padding: 0 14px; }
}
/* desktop Telegram / wide windows */
@media (min-width: 481px) {
  .hero { margin: 0; border-radius: 0 0 var(--r-card) var(--r-card); }
}
