/* Сайт Qatty Tätti: корзина, оформление, вход, профиль, отслеживание. Токены — в app.css. */

:root {
  --danger: #FF8A7A;
  --card: #2A3314;
  --line: rgba(255, 255, 255, .10);
  --field: rgba(255, 255, 255, .07);
  --field-border: rgba(255, 255, 255, .16);
}
a { color: inherit; }
a.brand { text-decoration: none; }
.lime { color: var(--lime); }
.media-wrap { position: relative; }
input, textarea, select { font: inherit; color: inherit; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  border: 1px solid var(--field-border); background: var(--glass);
  font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap;
  transition: background .2s, transform .12s, opacity .2s;
}
.btn:active:not(:disabled) { transform: scale(.98); }
.btn.primary { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.btn.primary:hover:not(:disabled) { background: var(--lime-hover); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--white-faint); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: var(--lime); }
.btn.block { display: flex; width: 100%; }
.btn.big { min-height: 56px; font-size: 16px; }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: 13px; }
.btn.grow { flex: 1; }
.btn:disabled { opacity: .5; }
.btn.loading { color: transparent !important; position: relative; pointer-events: none; }
.btn.loading::after {
  content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid var(--ink); border-right-color: transparent; animation: spin .7s linear infinite;
}
.btn.ghost.loading::after { border-color: var(--white); border-right-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  display: inline-block; width: 16px; height: 16px; vertical-align: -3px; border-radius: 50%;
  border: 2px solid var(--lime); border-right-color: transparent; animation: spin .7s linear infinite;
}
.link {
  background: none; border: 0; padding: 0; color: var(--lime); font-weight: 600; font-size: inherit;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;
}
.link.muted { color: var(--white-soft); font-size: 13px; }

.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--white-faint); border: 1px solid var(--line); text-decoration: none; flex: none;
}
.icon-btn.glass { background: rgba(0,0,0,.35); border-color: rgba(255,255,255,.22); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); pointer-events: auto; }
.acc-letter { font-family: var(--head); font-size: 15px; color: var(--lime); }
.acc-ico {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; flex: none;
  background: var(--white-faint); color: var(--white-soft);
}
.acc-ico.on { background: var(--lime); color: var(--ink); font-family: var(--head); font-weight: 700; font-size: 16px; }

.hint { margin: 0; color: var(--white-soft); font-size: 14px; line-height: 1.45; }
.hint.small { font-size: 12px; }
.center { text-align: center; }
.form-error { margin: 0; color: var(--danger); font-size: 14px; font-weight: 600; line-height: 1.4; }
.form-info { margin: 0; color: var(--lime); font-size: 14px; font-weight: 600; }
.form-error[hidden], .form-info[hidden], .field-msg[hidden] { display: none; }
.field-msg { margin: 0; font-size: 13px; color: var(--white-soft); line-height: 1.4; }
.field-msg.ok { color: var(--lime); font-weight: 600; }
.field-msg.err { color: var(--danger); font-weight: 600; }
.hit.gray { background: rgba(0,0,0,.6); color: var(--white); }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 600; color: var(--white-soft); }
.field input, textarea, .promo-row input {
  width: 100%; min-height: 50px; padding: 12px 16px; border-radius: 16px;
  background: var(--field); border: 1px solid var(--field-border); outline: none;
  font-size: 16px; transition: border-color .2s, background .2s;
}
textarea { resize: vertical; min-height: 64px; line-height: 1.4; }
.field input:focus, textarea:focus, .promo-row input:focus { border-color: var(--lime); background: rgba(255,255,255,.1); }
.field input:focus-visible, textarea:focus-visible, .promo-row input:focus-visible { outline: none; }
::placeholder { color: rgba(255,255,255,.35); }

/* тост */
.toast {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 24px); z-index: 90;
  transform: translateX(-50%); max-width: calc(100vw - 32px); width: max-content;
  padding: 12px 18px; border-radius: 16px; background: #0F1307; border: 1px solid var(--line);
  box-shadow: 0 12px 30px rgba(0,0,0,.4); font-weight: 600; font-size: 14px;
  animation: toastIn .3s cubic-bezier(.2,.9,.3,1.2);
}
.toast.ok { border-color: rgba(198,232,91,.5); }
.toast.ok::before { content: "✓  "; color: var(--lime); }
.toast.err { border-color: rgba(255,138,122,.5); color: var(--danger); }
.toast[hidden] { display: none; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } }
body[data-route="menu"] .toast { bottom: auto; top: calc(env(safe-area-inset-top) + 110px); }
body[data-route="cart"] .toast, body[data-route="profile"] .toast { bottom: calc(env(safe-area-inset-bottom) + 24px); }

/* загрузка */
.boot { min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 18px; }
.boot .brand { font-size: 26px; }
/* текст для поисковиков под заставкой (до запуска JS); app.js заменяет его живым меню */
.seo-static { max-width: 760px; margin: 0 auto; padding: 24px 16px 64px; line-height: 1.5; }
.seo-static h1 { font-size: 24px; } .seo-static h2 { font-size: 19px; margin-top: 24px; } .seo-static h3 { font-size: 15px; margin: 14px 0 4px; }
.seo-static ul { padding-left: 18px; } .seo-static li { margin: 4px 0; }
.skeleton { display: flex; flex-direction: column; gap: 10px; padding: 8px 0; }
.sk { height: 52px; border-radius: 16px; background: linear-gradient(90deg, var(--white-faint), rgba(255,255,255,.05), var(--white-faint)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty .btn { margin-top: 12px; justify-self: center; }

/* ═══════════════════ меню: добавки к web-menu ═══════════════════ */

.m-top-right { display: flex; align-items: center; gap: 10px; }
.m-buy { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding-top: 4px; }
.m-buy .sizes { display: flex; flex-wrap: wrap; gap: 8px; }
.add-round {
  pointer-events: auto; flex: none;
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  background: var(--lime); color: var(--ink); border: 0;
  font-size: 26px; font-weight: 700; line-height: 1;
  box-shadow: 0 8px 22px rgba(198,232,91,.35);
  transition: transform .15s;
}
.add-round:active { transform: scale(.92); }
.add-round.sm { width: 40px; height: 40px; font-size: 20px; box-shadow: none; }
.soldout { pointer-events: none; font-size: 13px; font-weight: 700; color: var(--white-soft); padding-bottom: 10px; white-space: nowrap; }

.d-side .brand { display: block; }
.d-account {
  margin-top: auto; display: flex; align-items: center; gap: 12px;
  padding: 12px; border-radius: 20px; text-decoration: none;
  background: var(--green-deep); border: 1px solid var(--line);
  transition: border-color .2s;
}
.d-account:hover { border-color: rgba(198,232,91,.5); }
.d-account b { display: block; font-size: 15px; }
.d-account small { display: block; font-size: 12px; color: var(--white-soft); font-weight: 600; margin-top: 2px; }
.d-account small.lime { color: var(--lime); }
.d-nav { margin-bottom: 14px; }
.card-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 10px; }
.card-body .card-foot .sizes { margin-top: 0; padding-top: 0; }
.card.out { opacity: .6; }
.card:hover .add-round { transform: scale(1.08); }
.d-main { padding-bottom: 120px; }

/* карточка товара: выбор и покупка */
.meta .lime { color: var(--lime); }
.toppings { display: flex; flex-direction: column; gap: 8px; }
.topping {
  display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 16px; text-align: left;
  background: var(--glass); border: 1px solid var(--white-faint); font-size: 15px;
}
.topping .tick { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; border: 1.5px solid var(--field-border); color: transparent; }
.topping.on { border-color: var(--lime); }
.topping.on .tick { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.topping b { font-size: 14px; color: var(--white-soft); }
.composition { margin: 0; color: var(--white-soft); font-size: 14px; line-height: 1.45; }
.sheet-buy {
  position: sticky; bottom: -32px; margin: auto -32px -32px; padding: 20px 32px 28px;
  display: flex; gap: 12px; align-items: center;
  background: linear-gradient(to top, var(--green-deep) 78%, rgba(46,56,24,0));
}
.stepper {
  display: inline-flex; align-items: center; height: 52px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--white-faint); flex: none;
}
.stepper button { width: 44px; height: 100%; background: none; border: 0; font-size: 22px; font-weight: 600; border-radius: 999px; }
.stepper button:disabled { opacity: .3; }
.stepper output { min-width: 22px; text-align: center; font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; }
.stepper.sm { height: 38px; }
.stepper.sm button { width: 36px; font-size: 18px; }
.stepper.sm output { font-size: 15px; }
#sheet-add { min-height: 52px; font-size: 16px; padding: 0 16px; }

/* плавающая корзина */
.cart-fab {
  position: fixed; z-index: 40; right: 24px; bottom: 24px;
  display: flex; align-items: center; gap: 12px;
  padding: 8px 22px 8px 8px; border-radius: 999px; text-decoration: none;
  background: var(--lime); color: var(--ink);
  box-shadow: 0 14px 34px rgba(0,0,0,.4), 0 0 0 1px rgba(0,0,0,.06);
  animation: pop .3s ease;
}
.cart-fab[hidden] { display: none; }
.cart-fab.bump { animation: bump .45s cubic-bezier(.2,.9,.3,1.4); }
@keyframes bump { 40% { transform: scale(1.1); } }
.fab-ico { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: var(--lime); }
.fab-ico i {
  position: absolute; top: -4px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: var(--white); color: var(--ink); font-style: normal; font-weight: 800; font-size: 11px;
  display: grid; place-items: center; border: 2px solid var(--lime);
}
.fab-text small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; opacity: .7; }
.fab-text b { display: block; font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }

@media (max-width: 899px) {
  /* на телефоне корзина — под шапкой, чтобы не закрывать ролик и рулетку */
  body[data-route="menu"] .cart-fab {
    top: calc(env(safe-area-inset-top) + 62px); bottom: auto; right: 16px;
    padding: 5px 14px 5px 5px; gap: 8px;
  }
  body[data-route="menu"] .fab-ico { width: 34px; height: 34px; }
  body[data-route="menu"] .fab-ico svg { width: 17px; height: 17px; }
  body[data-route="menu"] .fab-text small { display: none; }
  body[data-route="menu"] .fab-text b { font-size: 14px; }
  .cart-fab { right: 16px; bottom: calc(env(safe-area-inset-bottom) + 16px); }
  .sheet-buy { bottom: 0; margin: auto calc(-1 * var(--screen)) 0; padding: 18px var(--screen) calc(env(safe-area-inset-bottom) + 14px); }
  .sheet-body { padding-bottom: 0 !important; min-height: calc(42dvh + 28px); }
}

/* модальное окно */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(8,10,4,.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .25s ease; }
.modal-card {
  position: relative; width: min(440px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto;
  background: var(--green-deep); border: 1px solid var(--line); border-radius: 28px; padding: 28px 24px 24px;
  box-shadow: 0 30px 80px rgba(0,0,0,.5); animation: sheetIn .35s cubic-bezier(.2,.9,.3,1.1);
}
.modal-close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; background: var(--white-faint); border: 0; font-size: 14px; z-index: 1; }
body.modal-open { overflow: hidden; }
@media (max-width: 899px) {
  .modal { place-items: end stretch; padding: 0; }
  .modal-card { width: 100%; border-radius: 28px 28px 0 0; padding-bottom: calc(env(safe-area-inset-bottom) + 24px); animation-name: sheetUp; }
}

/* ═══════════════════ страницы ═══════════════════ */

body:not([data-route="menu"]) { background: radial-gradient(1200px 500px at 50% -200px, #33401a 0%, var(--green-black) 70%) no-repeat, var(--green-black); }
.pg { width: min(1080px, 100%); margin: 0 auto; padding: 0 16px calc(env(safe-area-inset-bottom) + 40px); display: flex; flex-direction: column; gap: 16px; }
.pg.narrow { width: min(600px, 100%); }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 10px; margin: 0 -16px;
  background: rgba(34,41,15,.82); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.topbar .brand { font-size: 17px; }
.topbar .icon-btn { justify-self: end; }
.topbar-right { justify-self: end; display: flex; align-items: center; gap: 10px; }

/* переключатель языка РУС / ҚАЗ */
.lang-sw { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: var(--white-faint); border: 1px solid var(--line); flex: none; }
.lang-sw button {
  font: 700 11px/1 var(--body); letter-spacing: .04em; color: var(--white-soft);
  padding: 7px 9px; border: 0; border-radius: 999px; background: none; cursor: pointer;
}
.lang-sw button:hover { color: var(--white); }
.lang-sw button.on { background: var(--lime); color: var(--ink); }
.lang-sw.glass { background: rgba(0,0,0,.35); border-color: rgba(255,255,255,.22); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); pointer-events: auto; }
.lang-sw.side { align-self: flex-start; margin: -10px 0 18px; }
.topbar-back { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; font-weight: 600; font-size: 14px; color: var(--white-soft); justify-self: start; padding: 8px 8px 8px 0; }
.topbar-back:hover { color: var(--white); }
.page-title { margin: 8px 0 0; font-family: var(--head); font-weight: 700; font-size: clamp(28px, 7vw, 44px); letter-spacing: -.05em; line-height: 1.05; }

.page-grid { display: grid; gap: 16px; align-items: start; }
@media (min-width: 900px) {
  .pg { padding-left: 32px; padding-right: 32px; }
  .pg.narrow { width: min(664px, 100%); }
  .topbar { margin: 0 -32px; padding-left: 32px; padding-right: 32px; }
  .page-grid { grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; }
  .summary.sticky { position: sticky; top: 84px; }
}
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.card-box { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.box-title { margin: 0; font-family: var(--head); font-weight: 600; font-size: 17px; letter-spacing: -.03em; }
.section-title { margin: 8px 0 0; font-family: var(--head); font-weight: 700; font-size: 20px; letter-spacing: -.03em; }
.row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 15px; }
.row.accent { color: var(--lime); }
.row.total { font-size: 18px; padding-top: 10px; border-top: 1px solid var(--line); margin-top: 4px; }
.row.total b { font-family: var(--head); font-weight: 700; font-size: 24px; letter-spacing: -.03em; }

.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 60px 20px; }
.empty-state h2 { margin: 6px 0 0; font-family: var(--head); font-size: 24px; letter-spacing: -.04em; }
.empty-state p { margin: 0 0 10px; color: var(--white-soft); }
.empty-ico { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 28px; background: var(--card); color: var(--lime); }
.empty-ico svg { width: 40px; height: 40px; }

/* корзина */
.lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.line { display: grid; grid-template-columns: 84px 1fr auto; gap: 14px; padding: 12px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); }
.line-thumb { width: 84px; height: 84px; border-radius: 16px; overflow: hidden; background: var(--green); }
.line-thumb img, .line-thumb .media { width: 100%; height: 100%; object-fit: cover; }
.line-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.line-name { font-family: var(--head); font-weight: 600; font-size: 16px; letter-spacing: -.03em; line-height: 1.2; }
.line-meta { font-size: 13px; color: var(--white-soft); }
.line-ctrl { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 6px; }
.line-price { font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.line-remove { align-self: start; width: 34px; height: 34px; border-radius: 50%; background: none; border: 0; color: var(--white-soft); display: grid; place-items: center; }
.line-remove:hover { color: var(--danger); background: var(--white-faint); }
#clear { align-self: flex-start; }

.perks { display: flex; flex-direction: column; gap: 10px; }
.perk { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.45; }
.perk.strong { background: rgba(198,232,91,.1); border: 1px solid rgba(198,232,91,.3); border-radius: 16px; padding: 12px; }
.perk-ico { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: rgba(198,232,91,.14); color: var(--lime); font-weight: 800; font-size: 15px; }
.perk-ico svg { width: 18px; height: 18px; }

/* оформление */
.segmented { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 999px; background: rgba(0,0,0,.25); border: 1px solid var(--line); }
.segmented button { min-height: 44px; border-radius: 999px; background: none; border: 0; font-weight: 700; font-size: 15px; color: var(--white-soft); transition: background .2s, color .2s; }
.segmented button.on { background: var(--lime); color: var(--ink); }
.venues { display: flex; flex-direction: column; gap: 8px; }
.venue, .pay-option {
  position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  padding: 14px; border-radius: 18px; cursor: pointer;
  background: var(--field); border: 1.5px solid var(--line); transition: border-color .2s, background .2s;
}
.venue input, .pay-option input { position: absolute; opacity: 0; pointer-events: none; }
.venue b, .pay-option b, .who b { display: block; font-size: 15px; }
.venue small, .pay-option small, .who small { display: block; font-size: 13px; color: var(--white-soft); margin-top: 2px; line-height: 1.35; }
.venue-ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--white-faint); color: var(--white-soft); }
.tick { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--field-border); color: transparent; }
.venue.on, .pay-option.on { border-color: var(--lime); background: rgba(198,232,91,.07); }
.venue.on .venue-ico { background: var(--lime); color: var(--ink); }
.venue.on .tick, .pay-option.on .tick { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.venue:has(input:focus-visible) { outline: 3px solid var(--lime); outline-offset: 2px; }
.pay-option.static { cursor: default; grid-template-columns: auto 1fr; }
.kaspi-logo { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: #F14635; color: #fff; font-weight: 800; font-size: 20px; font-family: var(--head); }
.addr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.addr-grid .span2 { grid-column: span 2; }
#mode-body:not(:empty) { margin-top: 2px; }
.delivery-quote:empty { display: none; }
.delivery-quote { margin-top: 12px; }
.dq-box { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: rgba(198,232,91,.1); border: 1px solid rgba(198,232,91,.3); }
.dq-box b { display: block; } .dq-box small { display: block; font-size: 13px; color: var(--white-soft); margin-top: 2px; }
.dq-ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--lime); color: var(--ink); flex: none; }

.choice { display: grid; gap: 10px; }
.choice-card { text-align: left; padding: 16px; border-radius: 18px; background: var(--field); border: 1.5px solid var(--line); display: flex; flex-direction: column; gap: 4px; transition: border-color .2s; }
.choice-card b { font-size: 16px; }
.choice-card small { color: var(--white-soft); font-size: 13px; line-height: 1.4; }
.choice-card.primary { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.choice-card.primary small { color: rgba(27,31,18,.7); }
.choice-card:hover { border-color: var(--lime); }
@media (min-width: 560px) { .choice { grid-template-columns: 1fr 1fr; } }
.who { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; }

.bonus-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.bonus-head .hint { font-size: 13px; margin-top: 2px; }
.bonus-balance { font-family: var(--head); font-weight: 700; font-size: 34px; letter-spacing: -.05em; color: var(--lime); line-height: 1; white-space: nowrap; }
.bonus-balance small { font-size: 18px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; cursor: pointer; }
.switch-row b { display: block; font-size: 15px; }
.switch-row small { display: block; font-size: 13px; color: var(--white-soft); margin-top: 2px; }
.switch { appearance: none; -webkit-appearance: none; flex: none; width: 52px; height: 32px; border-radius: 16px; background: rgba(255,255,255,.2); position: relative; cursor: pointer; transition: background .2s; margin: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: var(--white); transition: transform .2s; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.switch:checked { background: var(--lime); }
.switch:checked::after { transform: translateX(20px); }
.switch:disabled { opacity: .4; cursor: default; }
.spend { display: flex; flex-direction: column; gap: 6px; padding: 4px 0; }
.spend[hidden] { display: none; }
.spend input[type=range] { width: 100%; accent-color: var(--lime); height: 28px; }
.spend-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; color: var(--white-soft); }
.spend-row b { font-size: 18px; }
.stamps-mini { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 13px; color: var(--white-soft); font-weight: 600; border-top: 1px solid var(--line); padding-top: 12px; }
.stamp-dots { display: flex; gap: 5px; }
.stamp-dots i { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid rgba(198,232,91,.5); }
.stamp-dots i.on { background: var(--lime); border-color: var(--lime); }
.promo-row { display: flex; gap: 10px; }
.promo-row input { text-transform: uppercase; flex: 1; min-width: 0; }
.promo-row input::placeholder { text-transform: none; }
.promo-row .btn { min-height: 50px; }

.summary .mini-lines { max-height: 260px; overflow-y: auto; }
.mini-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.mini-lines li { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; line-height: 1.35; }
.mini-lines small { color: var(--white-soft); font-size: 12px; }
.mini-lines b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.totals { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); transition: opacity .2s; }
.totals.dim { opacity: .55; }
.earn { align-self: flex-start; margin-top: 4px; padding: 6px 12px; border-radius: 999px; background: rgba(198,232,91,.14); color: var(--lime); font-weight: 700; font-size: 13px; }
.eta { margin: 0; font-size: 14px; color: var(--white-soft); }

/* вход */
.auth { display: flex; flex-direction: column; gap: 16px; }
.auth-head { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.auth-head h2 { margin: 0; font-family: var(--head); font-weight: 700; font-size: 26px; letter-spacing: -.04em; line-height: 1.1; padding-right: 30px; }
.auth-head p { margin: 0; color: var(--white-soft); font-size: 15px; line-height: 1.45; }
.auth-head b { color: var(--white); white-space: nowrap; }
.code-input { font-size: 30px !important; letter-spacing: .5em; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; min-height: 64px !important; padding-left: calc(16px + .5em) !important; }
.resend { display: flex; justify-content: center; align-items: center; gap: 8px; min-height: 24px; font-size: 14px; color: var(--white-soft); }
.resend b { color: var(--white); font-variant-numeric: tabular-nums; }
.resend [hidden] { display: none; }
.auth-wrap { padding: 28px 22px; margin-top: 12px; }
.auth-perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.auth-perks li { display: flex; gap: 12px; align-items: center; font-size: 14px; color: var(--white-soft); }
.auth-perks b { color: var(--white); }
@media (min-width: 600px) { .auth-perks { grid-template-columns: 1fr 1fr; } }

/* профиль */
.profile-head { display: flex; align-items: center; gap: 16px; padding-top: 12px; }
.avatar { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 22px; background: var(--lime); color: var(--ink); font-family: var(--head); font-weight: 700; font-size: 28px; flex: none; }
.profile-id { min-width: 0; flex: 1; }
.profile-id h1 { margin: 0; font-family: var(--head); font-weight: 700; font-size: 26px; letter-spacing: -.04em; line-height: 1.15; overflow-wrap: anywhere; }
.profile-id h1 .link { font-family: var(--body); font-size: 13px; letter-spacing: 0; vertical-align: middle; margin-left: 6px; }
.profile-id p { margin: 4px 0 0; color: var(--white-soft); font-size: 15px; }
.name-form { display: flex; gap: 8px; flex-wrap: wrap; }
.name-form input { flex: 1 1 180px; min-height: 44px; padding: 8px 14px; border-radius: 14px; background: var(--field); border: 1px solid var(--lime); font-size: 16px; outline: none; }

.bonus-hero {
  position: relative; overflow: hidden;
  background: var(--lime); color: var(--ink); border-radius: 30px; padding: 24px 22px 22px;
  display: flex; flex-direction: column; gap: 6px;
  box-shadow: 0 20px 50px rgba(198,232,91,.18);
}
.bonus-hero::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.45), rgba(255,255,255,0) 70%); pointer-events: none;
}
.bonus-hero-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.bonus-hero-rate { font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: rgba(27,31,18,.1); position: relative; z-index: 1; }
.bonus-hero-value { font-family: var(--head); font-weight: 700; font-size: clamp(56px, 18vw, 96px); letter-spacing: -.06em; line-height: 1; font-variant-numeric: tabular-nums; }
.bonus-hero-value small { font-size: .45em; margin-left: 6px; letter-spacing: 0; }
.bonus-hero p { margin: 0 0 10px; font-size: 14px; font-weight: 600; color: rgba(27,31,18,.72); }
.bonus-hero .btn { align-self: flex-start; position: relative; z-index: 1; }

.profile-grid { display: grid; gap: 16px; }
@media (min-width: 760px) { .profile-grid { grid-template-columns: 1fr 1fr; } }
.stamps-head { display: flex; justify-content: space-between; align-items: baseline; }
.stamps-head b { font-family: var(--head); font-size: 28px; color: var(--lime); letter-spacing: -.04em; }
.stamps-head small { color: var(--white-soft); font-size: 16px; }
.stamp-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.stamp { aspect-ratio: 1; border-radius: 16px; display: grid; place-items: center; border: 1.5px dashed rgba(198,232,91,.4); color: rgba(198,232,91,.45); }
.stamp svg { width: 55%; height: 55%; }
.stamp.on { background: var(--lime); border: 1.5px solid var(--lime); color: var(--ink); animation: pop .4s ease backwards; }
.stamp.gift:not(.on) { border-style: solid; background: rgba(198,232,91,.1); color: var(--lime); }
.ref-code { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 10px 10px 18px; border-radius: 18px; background: var(--field); border: 1.5px dashed rgba(198,232,91,.5); }
.ref-code b { font-family: var(--head); font-size: 22px; letter-spacing: .04em; color: var(--lime); }

.history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.history li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.history li:last-child { border-bottom: 0; }
.history li > span b { display: block; font-size: 15px; font-weight: 600; }
.history li > span small { display: block; font-size: 12px; color: var(--white-soft); margin-top: 2px; }
.history .plus { color: var(--lime); font-size: 17px; white-space: nowrap; }
.history .minus { color: var(--white-soft); font-size: 17px; white-space: nowrap; }
.history + .link { align-self: flex-start; }

.orders { display: flex; flex-direction: column; gap: 8px; }
.order-card {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: 18px; background: var(--field); border: 1px solid var(--line); text-decoration: none;
  transition: border-color .2s;
}
a.order-card:hover { border-color: rgba(198,232,91,.5); }
.order-card.big { background: var(--card); border-color: rgba(198,232,91,.4); padding: 18px; }
.order-main { min-width: 0; }
.order-main b { display: block; font-family: var(--head); font-weight: 600; font-size: 16px; letter-spacing: -.02em; }
.order-main small { display: block; font-size: 13px; color: var(--white-soft); margin-top: 3px; }
.order-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.order-side b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.status-pill { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--white-faint); color: var(--white-soft); white-space: nowrap; }
.status-pill.st-accepted, .status-pill.st-preparing { background: rgba(198,232,91,.16); color: var(--lime); }
.status-pill.st-ready { background: var(--lime); color: var(--ink); }
.status-pill.st-cancelled { background: rgba(255,138,122,.15); color: var(--danger); }
.logout { margin-top: 8px; color: var(--white-soft); }

/* отслеживание */
.track-hero { margin-top: 12px; padding: 26px 22px; border-radius: 30px; background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.track-hero .caps { color: var(--white-soft); }
.track-hero h1 { margin: 0; font-family: var(--head); font-weight: 700; font-size: clamp(34px, 10vw, 52px); letter-spacing: -.05em; line-height: 1; color: var(--lime); }
.track-hero p { margin: 0; color: var(--white-soft); font-size: 15px; line-height: 1.45; }
.track-hero.st-ready { background: var(--lime); border-color: var(--lime); }
.track-hero.st-ready h1, .track-hero.st-ready p, .track-hero.st-ready .caps { color: var(--ink); }
.track-hero.cancelled h1 { color: var(--danger); }
.earn-pill { align-self: flex-start; margin-top: 6px; padding: 6px 12px; border-radius: 999px; background: rgba(198,232,91,.14); color: var(--lime); font-weight: 700; font-size: 13px; }
.track-hero.st-ready .earn-pill { background: rgba(27,31,18,.12); color: var(--ink); }
.timeline { list-style: none; margin: 0; padding: 4px 4px 4px 8px; display: flex; flex-direction: column; }
.timeline li { position: relative; display: flex; gap: 16px; padding-bottom: 22px; color: var(--white-soft); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: 13px; top: 30px; bottom: 2px; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline li.done::before { background: var(--lime); }
.timeline .dot { position: relative; flex: none; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--field-border); display: grid; place-items: center; background: var(--green-black); color: var(--ink); }
.timeline li.done .dot { background: var(--lime); border-color: var(--lime); }
.timeline li.now .dot { border-color: var(--lime); background: var(--lime); box-shadow: 0 0 0 6px rgba(198,232,91,.2); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 11px rgba(198,232,91,.06); } }
.timeline b { display: block; color: var(--white); font-size: 16px; }
.timeline li.now b { color: var(--lime); }
.timeline li:not(.done):not(.now) b { color: var(--white-soft); }
.timeline small { display: block; font-size: 13px; margin-top: 2px; }
.addr { display: flex; gap: 10px; align-items: flex-start; margin: 0; font-size: 15px; line-height: 1.4; }
.addr svg { flex: none; margin-top: 2px; color: var(--lime); }
.addr b { display: block; }
.addr small { display: block; color: var(--white-soft); font-size: 13px; }

@media (max-width: 420px) {
  .card-box { padding: 16px; border-radius: 22px; }
  .line { grid-template-columns: 68px 1fr auto; gap: 12px; }
  .line-thumb { width: 68px; height: 68px; }
}

@media (prefers-reduced-motion: reduce) {
  .timeline li.now .dot { animation: none; }
}

@media (max-width: 519px) { .contact-grid { grid-template-columns: 1fr; } }
body[data-route="profile"] .pg, body[data-route="notfound"] .pg { padding-bottom: calc(env(safe-area-inset-bottom) + 110px); }

/* ═══════════════════ ПРЕВЬЮ КАТАЛОГА (/preview/<token>) ═══════════════════ */
/* плашка сверху на всех страницах; всё, что прибито к верху экрана, сдвигаем на её высоту */

html.pv { --pv: calc(env(safe-area-inset-top) + 40px); }
.pv-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 45;
  height: var(--pv); box-sizing: border-box;
  padding: env(safe-area-inset-top) 12px 0;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: repeating-linear-gradient(-45deg, #F2C230 0 14px, #E9B516 14px 28px);
  color: #1B1F12; font-size: 13px; line-height: 1.2; white-space: nowrap;
  box-shadow: 0 2px 12px rgba(0,0,0,.35);
}
.pv-bar b { font-weight: 800; letter-spacing: 1px; }
.pv-dot { width: 8px; height: 8px; border-radius: 50%; background: #B3261E; flex: none; animation: pv-blink 1.6s ease-in-out infinite; }
@keyframes pv-blink { 50% { opacity: .25; } }
.pv-text { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pv-exit {
  margin-left: 6px; flex: none; min-height: 28px; padding: 4px 12px; border: 0; border-radius: 999px;
  background: #1B1F12; color: #fff; font: inherit; font-weight: 700; font-size: 12px; cursor: pointer;
}
.pv-exit:hover { background: #000; }
.pv-exit:focus-visible { outline: 2px solid #1B1F12; outline-offset: 2px; }
@media (max-width: 420px) {
  .pv-bar { justify-content: space-between; font-size: 12px; }
  .pv-text { display: none; }
  .pv-bar b::after { content: ' — не опубликовано'; font-weight: 600; letter-spacing: 0; }
}
@media (prefers-reduced-motion: reduce) { .pv-dot { animation: none; } }

html.pv body { padding-top: var(--pv); }
html.pv .m { top: var(--pv); }
html.pv .m-top { padding-top: 12px; }
html.pv .d-side { top: var(--pv); height: calc(100vh - var(--pv)); }
html.pv .topbar { top: var(--pv); padding-top: 10px; }
html.pv .boot, html.pv .empty { min-height: calc(100dvh - var(--pv)); }
html.pv .d-sec { scroll-margin-top: calc(var(--pv) + 24px); }
@media (max-width: 899px) {
  html.pv body[data-route="menu"] .cart-fab { top: calc(var(--pv) + 62px); }
  html.pv body[data-route="menu"] .toast { top: calc(var(--pv) + 110px); }
}

/* бейджи черновика */
.hit.pv-badge { background: #F2C230; color: #1B1F12; }
.hit.pv-badge.new { background: #FF7A45; color: #1B1F12; }
.m-badges { display: flex; gap: 6px; }
.pst-head .pv-badge { margin-bottom: 6px; }
.pv-hint { color: #F2C230; }
.btn[disabled] { cursor: not-allowed; }

/* ─── карта адреса доставки (addrmap.js) ─── */
.addr-map { position: relative; height: 260px; margin-bottom: 12px; border-radius: 18px; overflow: hidden; background: var(--field); border: 1px solid var(--line); isolation: isolate; }
.addr-map .am-canvas { position: absolute; inset: 0; }
.addr-map .am-canvas canvas { outline: none; }
.am-pin { position: absolute; left: 50%; top: 50%; z-index: 2; width: 40px; height: 52px; margin: -52px 0 0 -20px; pointer-events: none;
  transition: transform .18s cubic-bezier(.3,.7,.4,1.4); filter: drop-shadow(0 4px 6px rgba(0,0,0,.35)); }
.am-pin i { position: absolute; left: 50%; bottom: -3px; width: 10px; height: 4px; margin-left: -5px; border-radius: 50%; background: rgba(0,0,0,.45);
  transition: transform .18s, opacity .18s; }
.addr-map.moving .am-pin { transform: translateY(-12px); transition-timing-function: ease-out; }
.addr-map.moving .am-pin i { transform: translateY(12px) scale(1.6); opacity: .5; }
.am-tools { position: absolute; right: 10px; top: 10px; z-index: 3; display: flex; flex-direction: column; gap: 8px; }
.am-btn { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; border: 0; background: var(--ink); color: var(--lime);
  box-shadow: 0 2px 10px rgba(0,0,0,.3); cursor: pointer; }
.am-btn.busy svg { animation: spin 1s linear infinite; }
.am-tip { position: absolute; left: 10px; top: 10px; z-index: 3; margin: 0; padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: rgba(27,31,18,.82); color: #fff; pointer-events: none; transition: opacity .3s; max-width: calc(100% - 72px); }
.addr-map.moving .am-tip { opacity: 0; }
.am-loading { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; background: var(--card); transition: opacity .35s; }
.addr-map.loaded .am-loading { opacity: 0; pointer-events: none; }
.addr-map .maplibregl-ctrl-attrib { font-size: 10px; }
.addr-map.full { position: fixed; inset: 0; z-index: 1000; height: auto; margin: 0; border-radius: 0; border: 0; }
.addr-map.full .am-tools { top: max(12px, env(safe-area-inset-top)); right: 12px; }
.addr-map.full .am-tip { top: max(14px, env(safe-area-inset-top)); left: 12px; font-size: 13px; }
html.am-lock, html.am-lock body { overflow: hidden; }
.addr-note { margin: -4px 0 12px; font-size: 13px; line-height: 1.4; color: var(--white-soft); }
.addr-note.warn { color: var(--danger); font-weight: 600; }

.addr-street { position: relative; }
.addr-street > label { display: flex; flex-direction: column; gap: 6px; }
.addr-street > label > span { font-size: 13px; font-weight: 600; color: var(--white-soft); }
.addr-street input { width: 100%; }
.addr-sugg { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20; margin: 0; padding: 6px; list-style: none;
  background: var(--card); border: 1px solid var(--field-border); border-radius: 16px; box-shadow: 0 12px 30px rgba(0,0,0,.4); max-height: 300px; overflow-y: auto; }
.addr-sugg li { padding: 10px 12px; border-radius: 11px; cursor: pointer; }
.addr-sugg li b { display: block; font-weight: 600; }
.addr-sugg li small { display: block; font-size: 12px; color: var(--white-soft); margin-top: 2px; }
.addr-sugg li:hover, .addr-sugg li.on { background: var(--white-faint); }
@media (min-width: 900px) { .addr-map { height: 300px; } }
@media (prefers-reduced-motion: reduce) { .am-pin, .am-pin i { transition: none; } }
