/* shop.css — клиентское приложение. Мобильный дизайн: тёмная шапка, тёплый фон, коралловый акцент */
:root {
  /* Фирменный стиль DELIVERY: зелёный C40 M3 Y100 K14, тёмно-серый K80, чёрный; шрифт Droid Sans */
  --ink: #141615; --ink-2: #4e4e4e; --muted: #737373; --line: #e5e7e1;
  --bg: #f6f7f2; --card: #fff; --accent: #a6bf01; --accent-2: #5f6f00; --accent-soft: #f2f7d6; --on-accent: #141615;
  --gold: #b7791f; --gold-soft: #fef6e4; --ok: #15803d;
  --r: 18px; --shadow: 0 1px 2px rgba(28,25,23,.06), 0 6px 20px rgba(28,25,23,.06);
  --tab-h: 64px; --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
body { margin: 0; font: 15px/1.45 "Droid Sans", "Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  background: var(--bg); color: var(--ink); }
/* Каркас приложения: шапка сверху, нижняя панель снизу — неподвижны; прокручивается только #scroller.
   Так панель не «прыгает» из-за адресной строки браузера при переходах и прокрутке. */
html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
/* position: fixed + inset: 0 — ровно по краям экрана. Не 100vh / 100dvh: на iPhone в приложении с главного экрана
   они короче экрана на высоту строки состояния, и нижняя панель «висела» с пустой полосой под ней. */
body { position: fixed; inset: 0; width: 100%; height: auto; display: flex; flex-direction: column; }
#scroller { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; position: relative;
  scroll-padding-top: 70px; scroll-padding-bottom: 90px; }
main { padding-bottom: 16px; }
body.locked #scroller { overflow: hidden; }
a { color: var(--accent-2); }
h1 { font-size: 26px; letter-spacing: -.02em; margin: 6px 0 14px; }
h2 { font-size: 18px; letter-spacing: -.01em; margin: 0 0 10px; }
h2.sub { margin: 22px 0 10px; color: var(--ink-2); }
.muted { color: var(--muted); } .small, .tiny { font-size: 13px; } .tiny { font-size: 12px; } .center { text-align: center; }
.warn { color: #b45309; font-weight: 600; margin-top: 6px; } .hint { color: var(--muted); font-size: 13px; margin-top: 6px; }
.gold { color: var(--gold); font-weight: 600; }
main { max-width: 1100px; margin: 0 auto; padding: 0 14px; }
.view { display: none; } .view.active { display: block; } /* без анимации — иначе экран «мигает» при каждом переходе */
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- Шапка ---------- */
.top { position: relative; flex: none; z-index: 30; display: flex; align-items: center; gap: 10px;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 14px 8px; background: #fff; color: var(--ink); border-bottom: 3px solid var(--accent); }
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; }
.brand-mark { width: 44px; height: 32px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-word { height: 22px; width: auto; }
.brand-tag { font-size: 10px; letter-spacing: .04em; margin-top: 3px; color: var(--ink); white-space: nowrap; }
.brand-tag b { color: var(--accent); font-weight: 400; }
#brand-name { display: none; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.top-phone { color: var(--ink-2); text-decoration: none; font-size: 14px; margin-right: 4px; }
.top-promo { border: 1.5px solid #fcd34d; background: #fffbeb; color: #92400e; border-radius: 999px; padding: 4px 10px; font-size: 14px; font-weight: 700; cursor: pointer; position: relative; line-height: 1.2; }
.top-promo.bd { border-color: #f9a8d4; background: #fdf2f8; color: #9d174d; }
.top-promo b { margin-left: 3px; }
.top-bonus { border: 0; background: var(--accent-soft); color: var(--accent-2); border-radius: 999px; padding: 6px 12px; font-size: 14px; font-weight: 700; cursor: pointer; }
.top-bonus small { margin-left: 6px; color: #a8a29e; }
@media (max-width: 480px) { .top-phone { display: none; } }
.notice { background: #fef3c7; color: #92400e; padding: 10px 16px; font-size: 14px; text-align: center; }
.install { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #292524; color: #fff; padding: 10px 16px; font-size: 14px; }
.install .x { margin-left: auto; background: none; border: 0; color: #a8a29e; font-size: 16px; cursor: pointer; }
.ios-hint { color: #fde68a; }

/* ---------- Кнопки, поля ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--accent); color: var(--on-accent); font: 600 15px/1 inherit; padding: 12px 18px; text-decoration: none; transition: transform .08s, background .15s; }
.btn:active { transform: scale(.97); } .btn:disabled { opacity: .55; }
.btn.big { padding: 17px 20px; font-size: 17px; } .btn.small { padding: 8px 12px; font-size: 14px; }
.btn.wide { width: 100%; } .btn.light { background: var(--accent-soft); color: var(--accent-2); }
.btn.ghost { background: transparent; color: var(--muted); margin-top: 8px; }
.btn.apple { background: #000; margin-bottom: 10px; }
.link { background: none; border: 0; color: var(--accent-2); cursor: pointer; padding: 0; font: inherit; text-decoration: underline; }
.inp { width: 100%; border: 1.5px solid var(--line); border-radius: 14px; padding: 13px 14px; font: inherit; background: #fff; color: var(--ink); }
.inp:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.inp.small { width: 110px; padding: 8px 10px; }
textarea.inp { resize: vertical; }
.lbl { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 14px 0 6px; }
.seg { display: flex; gap: 6px; background: #f5f5f4; border-radius: 16px; padding: 4px; }
.seg button { flex: 1; border: 0; background: transparent; border-radius: 12px; padding: 11px 8px; font: 600 14px/1.2 inherit; color: var(--ink-2); cursor: pointer; }
.seg button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.seg-3 button { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 20px; padding: 12px 6px; }
.seg-3 button span { font-size: 13.5px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.chips button { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 14px; font: 500 14px inherit; cursor: pointer; color: var(--ink-2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chips button.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-2); }
.panel { background: var(--card); border-radius: var(--r); padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow); }
.panel.note { background: #eff6ff; color: #1e3a8a; box-shadow: none; }

/* ---------- Меню ---------- */
.cats { position: sticky; top: 0; z-index: 20; display: flex; gap: 8px; overflow-x: auto;
  margin: 0 -14px; padding: 12px 14px; background: linear-gradient(var(--bg) 80%, rgba(250,247,242,0)); scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cats a { flex: none; padding: 9px 16px; border-radius: 999px; background: #fff; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 14px; box-shadow: var(--shadow); }
.cats a.active { background: var(--ink); color: #fff; }
.search { margin: 2px 0 8px; }
.search input { width: 100%; border: 0; border-radius: 14px; padding: 12px 14px 12px 40px; font: inherit; box-shadow: var(--shadow);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%2378716c' stroke-width='2'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='m13 13 4 4'/%3E%3C/svg%3E") 14px 50% no-repeat; }
.group h2 { font-size: 22px; margin: 22px 2px 12px; }
.group h3.subcat { font-size: 16px; margin: 18px 2px 10px; color: var(--ink-2, #4e4e4e); }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(4, 1fr); } }
.card { background: var(--card); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.card-img { position: relative; aspect-ratio: 4 / 3; cursor: pointer; background: #f5f5f4; }
.card-img img, .card-img .ph { width: 100%; height: 100%; object-fit: cover; }
.card-img img { display: block; }
.pill { position: absolute; top: 8px; left: 8px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; letter-spacing: .03em; text-transform: uppercase; }
.ph { display: grid; place-items: center; font-size: 44px; }
.ph-0 { background: linear-gradient(135deg, #fde2d4, #fbc4ab); } .ph-1 { background: linear-gradient(135deg, #e0f2e9, #b7e4c7); }
.ph-2 { background: linear-gradient(135deg, #fef3c7, #fde68a); } .ph-3 { background: linear-gradient(135deg, #e0e7ff, #c7d2fe); }
.ph-4 { background: linear-gradient(135deg, #fce7f3, #fbcfe8); }
.card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; flex: 1; }
.card h3 { font-size: 15px; margin: 0 0 4px; line-height: 1.25; cursor: pointer; }
.desc { margin: 0 0 10px; color: var(--muted); font-size: 12.5px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex: 1; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap; }
.price { font-weight: 700; font-size: 16px; } .price small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.price.big { font-size: 24px; }
.btn.add { padding: 9px 14px; font-size: 14px; }
.qty { display: inline-flex; align-items: center; background: var(--accent-soft); border-radius: 999px; }
.qty button { width: 34px; height: 34px; border: 0; background: transparent; color: var(--accent-2); font-size: 20px; font-weight: 700; cursor: pointer; }
.qty b { min-width: 20px; text-align: center; }
@media (max-width: 380px) { .btn.add { padding: 8px 10px; font-size: 13px; } }

/* Плавающая корзина */
.cart-fab { position: fixed; left: 14px; right: 14px; bottom: calc(var(--tab-h) + var(--safe-b) + 10px); z-index: 25; max-width: 520px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 999px; background: var(--accent); color: var(--on-accent); text-decoration: none;
  box-shadow: 0 10px 30px rgba(228,87,46,.4); }
.cart-fab #fab-count { background: #fff; color: var(--accent-2); border-radius: 999px; min-width: 26px; height: 26px; display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.cart-fab b { flex: 1; } .cart-fab #fab-sum { font-weight: 700; }

/* Нижняя навигация */
.tabbar { position: relative; flex: none; z-index: 30; display: flex; background: #fff;
  border-top: 1px solid var(--line); padding-bottom: var(--safe-b); height: calc(var(--tab-h) + var(--safe-b)); }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--muted); font-size: 11.5px; font-weight: 600; }
.tabbar a i { font-style: normal; font-size: 22px; position: relative; filter: grayscale(1); opacity: .7; }
.tabbar a.active { color: var(--ink); } .tabbar a.active i { filter: none; opacity: 1; }
.badge { position: absolute; top: -4px; right: -12px; background: var(--accent); color: var(--on-accent); border-radius: 999px; font-size: 11px; min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 4px; }
.dot { position: absolute; top: 0; right: -4px; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); border: 2px solid #fff; }

/* Шторка */
.sheet { position: fixed; inset: 0; z-index: 50; background: rgba(28,25,23,.5); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.sheet-box { position: relative; background: #fff; width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; border-radius: 24px 24px 0 0;
  padding: 18px 18px calc(18px + var(--safe-b)); animation: up .22s ease; }
@keyframes up { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
@media (min-width: 700px) { .sheet { align-items: center; } .sheet-box { border-radius: 24px; } }
.sheet-x { position: absolute; top: 12px; right: 12px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); box-shadow: var(--shadow); cursor: pointer; font-size: 15px; }
.pd .pd-img, .pd .ph { width: calc(100% + 36px); margin: -18px -18px 14px; aspect-ratio: 4 / 3; object-fit: cover; display: grid; }
.pd h2 { font-size: 22px; margin-bottom: 2px; }
.comp ul { margin: 6px 0 0; padding-left: 18px; color: var(--ink-2); }
.pd-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }

/* ---------- Корзина ---------- */
.line { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid #f5f5f4; }
.line:last-child { border-bottom: 0; }
.line-img { width: 56px; height: 56px; border-radius: 12px; overflow: hidden; flex: none; cursor: pointer; }
.line-img img, .line-img .ph { width: 100%; height: 100%; object-fit: cover; }
.line-img .ph { font-size: 24px; }
.line-main { flex: 1; min-width: 0; } .line-main small { display: block; color: var(--muted); }
.line-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.line-sum { font-weight: 700; font-size: 14px; }
.pre-box { background: #f5f3ff; border-radius: 14px; padding: 12px; margin-top: 10px; }
.pre-box .seg { background: #ede9fe; } .pre-box .inp { margin-top: 4px; }
.pickup-note { margin-top: 12px; color: var(--ink-2); font-size: 14px; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-top: 8px; }
.slot { border: 1.5px solid var(--line); background: #fff; border-radius: 14px; padding: 10px; cursor: pointer; text-align: left; font: inherit; color: var(--ink); }
.slot b { display: block; font-size: 15px; } .slot small { color: var(--muted); }
.slot.active { border-color: var(--accent); background: var(--accent-soft); }
.slot:disabled { opacity: .45; cursor: not-allowed; text-decoration: line-through; }
#time-at { margin-top: 8px; } #time-mode { margin-bottom: 4px; }
.who { font-size: 15px; } .who .hint { margin-top: 6px; }
.bonus { margin-top: 14px; background: var(--gold-soft); border-radius: 14px; padding: 12px; }
.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; flex-wrap: wrap; }
.switch input { display: none; }
.switch span { width: 44px; height: 26px; border-radius: 999px; background: #d6d3d1; position: relative; transition: .2s; flex: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--gold); } .switch input:checked + span::after { left: 21px; }
.switch em { font-style: normal; color: var(--gold); font-size: 13px; }
#bonus-range { width: 100%; margin: 12px 0 6px; accent-color: var(--gold); }
.bonus-row { display: flex; align-items: center; gap: 8px; }
.stepper-row { display: flex; align-items: center; justify-content: space-between; padding: 4px 0; }
.stepper { display: flex; align-items: center; gap: 12px; } .stepper b { min-width: 18px; text-align: center; }
.stepper button { width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; font-size: 18px; cursor: pointer; }
.summary .sum-line, .sum-line { display: flex; justify-content: space-between; padding: 3px 0; gap: 10px; }
.sum-line.total { font-size: 20px; font-weight: 800; margin-top: 6px; }
.sum-line.gold { color: var(--gold); font-weight: 600; }
.cashback { margin-top: 8px; background: var(--gold-soft); color: #7c4a03; border-radius: 12px; padding: 8px 12px; font-size: 14px; }
.sticky-cta { position: sticky; bottom: 8px; z-index: 10; padding: 4px 0 0; }
.sticky-cta .btn { box-shadow: 0 10px 30px rgba(228,87,46,.35); }
hr { border: 0; border-top: 1px solid var(--line); margin: 8px 0; }
.empty { text-align: center; padding: 50px 10px; color: var(--muted); }
.empty.small { padding: 24px 10px; }
.empty-art { font-size: 54px; margin-bottom: 8px; }

/* ---------- Вход ---------- */
.login { text-align: center; padding: 8px 4px; }
.login .login-google { display: flex; justify-content: center; margin: 14px 0 10px; min-height: 44px; }
.login .login-tg { display: flex; justify-content: center; margin: 4px 0 10px; min-height: 40px; }
.dev-login { display: flex; gap: 8px; margin: 10px 0; }
.panel .login h2 { font-size: 17px; }

/* ---------- Заказы ---------- */
.order-card { display: block; background: var(--card); border-radius: var(--r); padding: 14px 16px; margin-bottom: 10px; box-shadow: var(--shadow); color: inherit; text-decoration: none; border-left: 4px solid var(--accent); }
.order-card.delivered { border-left-color: var(--ok); } .order-card.cancelled { border-left-color: #a8a29e; opacity: .75; }
.oc-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.st { font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-2); }
.st-delivered { background: #dcfce7; color: var(--ok); } .st-cancelled { background: #f5f5f4; color: var(--muted); }
.st-on_the_way, .st-picked_up { background: #dbeafe; color: #1d4ed8; }
.oc-meta { font-size: 13px; color: var(--muted); margin: 4px 0; }
.oc-items { font-size: 14px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oc-foot { display: flex; gap: 10px; align-items: baseline; margin-top: 6px; font-size: 14px; flex-wrap: wrap; }
.back { display: inline-block; margin: 6px 0 10px; text-decoration: none; font-weight: 600; }
.order-hero { background: var(--ink); color: #fff; border-radius: 22px; padding: 18px; margin-bottom: 12px; }
.order-hero.delivered { background: #14532d; } .order-hero.cancelled { background: #57534e; }
.oh-num { color: #a8a29e; font-size: 13px; } .oh-status { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin: 2px 0; }
.oh-when { color: #d6d3d1; font-size: 14px; }
.steps { list-style: none; display: flex; padding: 0; margin: 16px 0 0; }
.steps li { flex: 1; font-size: 11px; color: #a8a29e; text-align: center; position: relative; padding-top: 18px; }
.steps li span { position: absolute; top: 0; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: #57534e; z-index: 1; }
.steps li::before { content: ""; position: absolute; top: 5px; left: -50%; width: 100%; height: 2px; background: #57534e; }
.steps li:first-child::before { display: none; }
.steps li.done, .steps li.now { color: #fff; }
.steps li.done span, .steps li.done::before, .steps li.now::before { background: var(--accent); }
.steps li.now span { background: #fff; box-shadow: 0 0 0 4px rgba(228,87,46,.6); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(228,87,46,.25); } }
.cancelled { margin-top: 10px; color: #e7e5e4; }
.courier-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.courier-head > div:nth-child(2) { flex: 1; } .courier-head small { display: block; color: var(--muted); }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: #dbeafe; display: grid; place-items: center; font-size: 22px; }
.map { border-radius: 14px; overflow: hidden; aspect-ratio: 4 / 3; background: #e7e5e4; }
.map iframe { width: 100%; height: 100%; border: 0; }
.map-foot { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; margin-top: 6px; }

/* ---------- Профиль ---------- */
.profile-head { display: flex; gap: 14px; align-items: center; margin: 8px 0 14px; }
.profile-head h1 { margin: 0; font-size: 22px; }
.ava { width: 58px; height: 58px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-size: 24px; font-weight: 700; object-fit: cover; flex: none; }
.bonus-card { background: radial-gradient(120% 140% at 100% 0%, #3f2d1a 0%, #1c1917 60%); color: #fff; border-radius: 22px; padding: 18px; margin-bottom: 12px; box-shadow: 0 12px 30px rgba(28,25,23,.25); }
.bc-top { display: flex; justify-content: space-between; color: #d6d3d1; font-size: 14px; }
.bc-level { background: #fde68a; color: #78350f; border-radius: 999px; padding: 2px 10px; font-weight: 700; font-size: 13px; }
.bc-balance { font-size: 38px; font-weight: 800; letter-spacing: -.02em; margin: 6px 0 12px; color: #fde68a; }
.bc-bar { height: 8px; border-radius: 999px; background: #44403c; overflow: hidden; }
.bc-bar span { display: block; height: 100%; background: linear-gradient(90deg, #f59e0b, #fde68a); }
.bc-next { font-size: 13px; color: #d6d3d1; margin-top: 8px; }
.bc-tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 8px; margin-top: 14px; }
.bc-tiers div { background: #292524; border-radius: 12px; padding: 8px; text-align: center; color: #a8a29e; }
.bc-tiers div b { display: block; font-size: 18px; color: #e7e5e4; } .bc-tiers div small { font-size: 11px; }
.bc-tiers div.on { background: #78350f; color: #fde68a; } .bc-tiers div.on b { color: #fde68a; }
.rules ul { margin: 8px 0 0; padding-left: 18px; color: var(--ink-2); font-size: 14px; } .rules li { margin: 4px 0; }

/* Уведомление */
.toast { position: fixed; left: 50%; bottom: calc(var(--tab-h) + var(--safe-b) + 80px); transform: translate(-50%, 20px); z-index: 60;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; font-size: 14px; max-width: calc(100% - 28px); width: max-content;
  opacity: 0; pointer-events: none; transition: .25s; box-shadow: 0 10px 30px rgba(0,0,0,.25); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); } .toast.error { background: #b91c1c; }
/* место под плавающую корзину и нижнее меню, чтобы они не закрывали последние карточки */
body.has-fab main { padding-bottom: 90px; }
/* «Курьер приехал» */
#arrived-alert { position: fixed; inset: 0; z-index: 1000; background: rgba(15,23,42,.6); display: flex; align-items: center; justify-content: center; padding: 20px; }
#arrived-alert[hidden] { display: none; }
.arr-card { background: #fff; border-radius: 22px; padding: 24px 20px; max-width: 380px; width: 100%; text-align: center; animation: arrIn .3s ease-out; }
.arr-card h2 { margin: 6px 0; font-size: 24px; } .arr-card p { color: #475569; margin: 0 0 14px; } .arr-card .btn { margin-top: 8px; }
.arr-ico { font-size: 64px; animation: arrBounce 1s infinite; }
@keyframes arrIn { from { transform: scale(.9); opacity: 0; } }
@keyframes arrBounce { 50% { transform: translateY(-8px); } }
.arrived-note { background: #dcfce7; color: #166534; font-size: 16px; }

/* личные промокоды */
.promo { margin-top: 14px; background: #fff7ed; border: 2px solid #fdba74; border-radius: 14px; padding: 12px; }
.promo.on { background: #f0fdf4; border-color: #22c55e; }
.promo-h { font-weight: 700; margin-bottom: 8px; }
.promo-c { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; margin-top: 6px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--card); font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.promo-c .pv { flex: none; min-width: 62px; font-weight: 800; font-size: 18px; color: var(--accent-2); }
.promo-c .pt { flex: 1; min-width: 0; } .promo-c .pt b { display: block; letter-spacing: .5px; } .promo-c .pt small { color: var(--muted); }
.promo-c .pk { flex: none; width: 26px; height: 26px; border-radius: 8px; border: 2px solid #a8a29e; display: grid; place-items: center; color: #fff; font-weight: 800; }
.promo-c.on { border-color: #22c55e; background: #dcfce7; } .promo-c.on .pk { background: #16a34a; border-color: #16a34a; }
.sum-line.promo-l { color: var(--accent-2); font-weight: 600; }
.promo-card .pc-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.promo-card .pv { min-width: 62px; font-weight: 800; font-size: 18px; color: var(--accent-2); }
.promo-card small { display: block; color: var(--muted); }

.gift-banner { display: flex; gap: 10px; align-items: center; margin: 10px 12px 0; padding: 12px 14px; border-radius: 16px; text-decoration: none; color: var(--ink);
  background: linear-gradient(120deg, #fff7ed, #fef3c7); border: 1px solid #fcd34d; font-size: 14px; line-height: 1.35; }
.gift-banner > :first-child { font-size: 24px; }
.gift-banner.bd { background: linear-gradient(120deg, #fdf2f8, #fef3c7); border-color: #f9a8d4; }
.gift-banner.ask { background: #f5f5f4; border-color: var(--line); }
.inp.ro { background: #f5f5f4; color: var(--ink-2); }
/* 💬 Служба заботы */
.page-h { font-size: 24px; margin: 14px 4px 6px; }
.row-link { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); font-size: 22px; }
.row-link span { flex: 1; font-size: 15px; } .row-link small { display: block; font-size: 13px; } .row-link i { font-style: normal; color: var(--muted); }
.chat-item { display: block; text-decoration: none; color: var(--ink); } .chat-item small { display: block; }
.dot-new { background: var(--accent); color: var(--on-accent); font-size: 11px; padding: 1px 7px; border-radius: 99px; }
#view-chat.active { display: flex; flex-direction: column; min-height: calc(100vh - var(--tab-h) - var(--safe-b)); }
.chat-top { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--bg); border-bottom: 1px solid var(--line); }
.chat-top .back { font-size: 30px; text-decoration: none; color: var(--ink); line-height: 1; padding: 0 6px; }
.chat-top small { display: block; color: var(--muted); font-size: 12px; }
.chat-msgs { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 12px; }
.cm { display: flex; } .cm.me { justify-content: flex-end; }
.cm-b { max-width: 82%; padding: 9px 12px; border-radius: 18px; background: var(--card); box-shadow: var(--shadow); font-size: 15px; line-height: 1.4; }
.cm.me .cm-b { background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 6px; }
.cm.ai .cm-b, .cm.staff .cm-b { border-bottom-left-radius: 6px; }
.cm.system .cm-b { background: #fffbeb; border: 1px solid #fde68a; }
.cm.staff .cm-b { background: #fdf2f8; }
.cm-b small { display: block; font-size: 11px; opacity: .7; } .cm-b small.t { text-align: right; margin-top: 3px; }
.cm-b img { display: block; max-width: 100%; max-height: 260px; border-radius: 12px; margin-top: 6px; }
.cm-b .btn { margin-top: 8px; display: inline-block; text-decoration: none; }
.typing { display: flex; gap: 4px; padding: 12px 14px; } .typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; } .typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.chat-quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 8px; }
.chat-quick button { border: 1px solid var(--line); background: var(--card); border-radius: 99px; padding: 8px 12px; font: inherit; font-size: 14px; color: var(--ink); }
.chat-input { position: sticky; bottom: 0; display: flex; align-items: flex-end; gap: 8px; padding: 8px 10px; background: var(--bg); border-top: 1px solid var(--line); flex-wrap: wrap; }
.chat-input textarea { flex: 1; min-width: 0; resize: none; border: 1px solid var(--line); border-radius: 20px; padding: 10px 14px; font: inherit; font-size: 16px; background: var(--card); color: var(--ink); max-height: 120px; }
.chat-photo { font-size: 24px; padding: 6px; cursor: pointer; }
.chat-send { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--accent); color: var(--on-accent); font-size: 18px; }
.chat-prev { width: 100%; display: flex; align-items: center; gap: 8px; } .chat-prev img { height: 64px; border-radius: 10px; }
.chat-prev button { border: 0; background: #e7e5e4; border-radius: 50%; width: 28px; height: 28px; }

.pw-login { display: grid; gap: 8px; margin: 12px 0; }
.chat-new { margin-top: 6px; text-align: left; } .sub-h { margin: 16px 4px 6px; font-size: 16px; }
.tabbar a i { position: relative; }

/* блюда, которые советует помощник */
.chat-prods { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.cp { display: flex; align-items: center; gap: 10px; background: var(--bg); border-radius: 14px; padding: 6px; }
.cp img, .cp-noimg { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex: none; background: #f5f5f4; display: grid; place-items: center; font-size: 26px; }
.cp-t { flex: 1; min-width: 0; } .cp-t b { display: block; font-size: 14px; line-height: 1.25; } .cp-t small { color: var(--muted); }
.cp-add { flex: none; border: 0; background: var(--accent); color: var(--on-accent); border-radius: 99px; padding: 8px 12px; font: inherit; font-size: 13px; font-weight: 700; }
.cp-q { display: flex; align-items: center; gap: 8px; flex: none; } .cp-q button { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--accent); color: var(--on-accent); font-size: 18px; }
.chat-ask { margin: 8px 0 12px; }
.callback-row span small { display: block; font-size: 12px; font-weight: 400; }

/* Страница не масштабируется: без зума двойным тапом, без авто-увеличения при вводе (iOS увеличивает, если шрифт поля < 16px) */
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
input, select, textarea, .inp, .search input { font-size: 16px !important; }

/* Промокоды — шторка из шапки */
.promo-sheet .pc-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.promo-sheet .pv { min-width: 62px; font-weight: 800; font-size: 18px; color: var(--accent-2); }
.promo-sheet small { display: block; color: var(--muted); }
.promo-sheet .btn { margin-top: 14px; }
@media (max-width: 360px) { .top-bonus small { display: none; } .top-promo, .top-bonus { padding: 4px 8px; } .brand-tag { display: none; } }

/* Самовывоз: где забрать, маршрут, «Я подъехал» */
.pk-place { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.pk-place .btn { flex: none; }
.pickup-panel .lbl { margin-top: 6px; }
.here-btn { margin: 10px 0 6px; }
.here-state { background: var(--accent-soft); border-radius: 12px; padding: 12px; font-size: 15px; }
.here-state.out { background: #dcfce7; color: #166534; font-size: 16px; }
.pk-call { display: flex; justify-content: flex-end; margin-top: 8px; }
.pk-call:empty { display: none; }

.pay-box { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.panel > .pay-box:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
#pay.seg button { font-size: 13.5px; }
.pay-btn { display: flex; justify-content: center; text-decoration: none; margin-bottom: 6px; background: #111827; color: #fff; }
.chat-pay { margin-top: 8px; min-width: 220px; }
.chat-pay .pay-btn { font-size: 16px; padding: 12px; }
#time-at { min-width: 0; max-width: 100%; display: block; -webkit-appearance: none; appearance: none; text-align: left; }
/* «Перезвоните мне»: ждём звонка / не дозвонились */
.panel.callback-note { background: #fff7ed; border: 1px solid #fdba74; }
.panel.callback-note .btn { margin-left: 6px; }

/* Опции блюд в корзине: бортик, острота, лапша */
.line { flex-wrap: wrap; }
.line-opts { flex-basis: 100%; margin: -2px 0 2px; }
.cart-subline { display: flex; align-items: center; gap: 10px; padding: 4px 0 10px 18px; border-bottom: 1px solid #f5f5f4; font-size: 14px; }
.cart-subline .name { flex: 1; min-width: 0; font-weight: 600; color: #b45309; }
.cart-subline .q { display: flex; align-items: center; gap: 8px; }
.cart-subline .q button { width: 32px; height: 32px; border-radius: 50%; border: 1px solid #e7e5e4; background: #fff; font-size: 17px; color: inherit; }
.cart-subline .sum { font-size: 13px; color: var(--muted); min-width: 50px; text-align: right; }
.opt-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.opt-chip { font: inherit; font-size: 13px; padding: 6px 12px; border-radius: 999px; border: 1px dashed #f59e0b; background: transparent; color: inherit; }
.opt-chip.on { border-style: solid; background: #fef3c7; color: #92400e; }
.opt-chip small { opacity: .7; }
.pd-opts { margin: 6px 0; }
.cart-subline { flex-wrap: wrap; }
.cart-subline .sub-chips { flex-basis: 100%; }
.cart-subline .sub-chips .opt-chips { margin-top: 0; }
.opt-chip { white-space: nowrap; }
