/* SION39 — Магазин (Telegram Mini App). Тёмная тема под бренд: графит #1F2A36, медь #9a5d26. */
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("fonts/cormorant-garamond-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("fonts/cormorant-garamond-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cormorant Garamond"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("fonts/cormorant-garamond-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Lora"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("fonts/lora-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Lora"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("fonts/lora-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Lora"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("fonts/lora-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  /* Бренд. Контраст: белый на --copper 5,2:1; --copper-hi на --bg 7,1:1; --muted на --surface 6:1 (AA) */
  --bg: #1f2a36;
  --bg-deep: #19222c;
  --surface: #263342;
  --surface-2: #2d3c4d;
  --line: #3a4b5e;
  --line-soft: rgba(255, 255, 255, .07);
  --text: #eef1f4;
  --muted: #aab5c1;
  --copper: #9a5d26;
  --copper-press: #844f1f;
  --copper-hi: #e1ad66;
  --on-copper: #ffffff;
  --photo: #f1ede7;
  --ok: #9fd0ae;
  --err: #f3a593;
  --radius: 16px;
  --f-display: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --f-body: "Lora", Georgia, "Times New Roman", serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  /* Фон страницы: один и тот же у html и у липкой панели разделов (оба fixed), поэтому панель непрозрачная и не видна на фоне */
  --page-bg: radial-gradient(120% 60% at 50% -10%, #2a3848 0%, var(--bg) 55%, var(--bg-deep) 100%);
  /* Telegram задаёт эти переменные сам (telegram-web-app.js); вне Telegram берём env() браузера */
  --safe-top: max(env(safe-area-inset-top, 0px), calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px)));
  --safe-bottom: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px));
  --safe-left: max(env(safe-area-inset-left, 0px), var(--tg-safe-area-inset-left, 0px));
  --safe-right: max(env(safe-area-inset-right, 0px), var(--tg-safe-area-inset-right, 0px));
  color-scheme: dark;
}
[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
/* фон на html (а не на body), чтобы на широком экране градиент шёл по всему окну, а не только по колонке */
html { background-color: var(--bg-deep); background-image: var(--page-bg); background-attachment: fixed; -webkit-text-size-adjust: 100%; }
body {
  margin: 0 auto; max-width: 720px; min-height: var(--tg-viewport-stable-height, 100vh);
  padding: calc(var(--safe-top) + 4px) max(16px, var(--safe-right)) calc(112px + var(--safe-bottom)) max(16px, var(--safe-left));
  color: var(--text); font: 400 15px/1.55 var(--f-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.in-tg { padding-bottom: calc(32px + var(--safe-bottom)); }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: var(--copper-hi); text-underline-offset: 3px; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--copper-hi); outline-offset: 2px; border-radius: 6px; }
img { display: block; max-width: 100%; }
.nw { white-space: nowrap; }

/* ---------- шапка ---------- */
/* Значок, название и корзина в первой строке, подпись во второй на всю ширину: она всегда в одну строку (13 px) и не прыгает,
   когда появляется кнопка корзины. */
.top { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; grid-template-rows: 44px auto; align-items: center; gap: 2px 12px; padding: 14px 0 12px; }
.mark { grid-area: 1 / 1; width: 40px; height: 40px; color: var(--copper-hi); }
.brand-n { grid-area: 1 / 2; font: 600 22px/1 var(--f-display); letter-spacing: .14em; }
.brand-s { grid-area: 2 / 1 / 3 / -1; margin: 0; overflow: hidden; color: var(--muted); font-size: 13px; line-height: 1.4; white-space: nowrap; text-overflow: ellipsis; }
.cart-btn { grid-area: 1 / 3; position: relative; width: 44px; height: 44px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--text); }
.cart-btn svg { width: 22px; height: 22px; }
.cart-n { position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
  background: var(--copper); color: var(--on-copper); font: 600 13px/22px var(--f-body); text-align: center; }
.demo { margin: 0 0 8px; padding: 10px 14px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); font-size: 13px; }
.demo b { color: var(--text); font-weight: 600; }

/* ---------- первый экран ---------- */
.hero { padding: 18px 0 6px; }
.hero h1, .h-view { margin: 0; font: 500 44px/1.02 var(--f-display); letter-spacing: -.005em; text-wrap: balance; }
.hero p { margin: 10px 0 0; max-width: 34em; color: var(--muted); font-size: 14px; }
.h-view { font-size: 38px; padding-top: 10px; }

/* ---------- чипы ---------- */
/* Липкая панель разделов непрозрачная: тот же фон, что у страницы (fixed), поэтому карточки под ней не просвечивают. */
.chips-wrap { position: sticky; top: 0; z-index: 4; margin: 14px -16px 0; padding: 10px 16px 8px;
  background-color: var(--bg); background-image: var(--page-bg); background-attachment: fixed; }
/* iOS не умеет fixed-фон (градиент панели не совпал бы со страницей), там панель — сплошной цвет страницы --bg */
@supports (-webkit-touch-callout: none) { .chips-wrap { background-image: none; } }
.chips { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; overscroll-behavior-x: contain;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); padding-right: 28px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; scroll-snap-align: start; min-height: 44px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(38, 51, 66, .7); color: var(--muted); font-size: 14px; white-space: nowrap;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease); }
.chip[aria-selected="true"] { background: var(--copper); border-color: var(--copper); color: var(--on-copper); }
.chips.sub { margin-top: 8px; }
.chips.sub .chip { min-height: 44px; padding: 0 14px; font-size: 13px; background: transparent; }
.chips.sub .chip[aria-selected="true"] { background: var(--surface-2); border-color: var(--copper-hi); color: var(--copper-hi); }

/* ---------- разделы ---------- */
.sec { padding-top: 22px; }
.sec h2, .grp h3.grp-h { margin: 0 0 6px; font: 500 30px/1.1 var(--f-display); }
.grp { margin-top: 18px; }
.grp h3.grp-h { font-size: 24px; margin-bottom: 10px; color: var(--text); }
.grp h3.grp-h small { margin-left: 8px; color: var(--muted); font: 400 13px var(--f-body); }
.note { margin: 0 0 14px; color: var(--muted); font-size: 13px; }
.note-price { display: flex; gap: 8px; align-items: baseline; padding: 10px 12px; border-left: 2px solid var(--copper-hi);
  background: rgba(225, 173, 102, .06); border-radius: 0 10px 10px 0; color: var(--text); }
.empty { padding: 40px 0; text-align: center; color: var(--muted); }

/* ---------- услуги ---------- */
/* Колонки те же, что у товаров (.grid): до 520 px — одна, 520–599 — две, от 600 — три, от 900 — четыре.
   Горизонтальная лента — только на телефоне (< 600 px) и только в разделе «Все»; на планшете и компьютере услуги сеткой, как товары. */
.svc { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 520px) { .svc { grid-template-columns: 1fr 1fr; } }
@media (min-width: 600px) { .svc { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .svc { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 599px) {
  .svc.scroll { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain;
    margin: 0 -16px; padding: 0 16px 4px; scroll-padding: 0 16px; }
  .svc.scroll::-webkit-scrollbar { display: none; }
  .svc.scroll .scard { flex: 0 0 min(78%, 300px); scroll-snap-align: start; }
}
.back { min-height: 44px; margin-top: 6px; padding: 0 2px; border: 0; background: none; color: var(--muted); font-size: 14px; }
.scard { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--surface); }
.art { display: block; width: 100%; height: auto; color: #c9d1da; background: linear-gradient(180deg, #2b394a, #243140); border-bottom: 1px solid var(--line-soft); }
.art .g { stroke: var(--copper-hi); }
.art .t { fill: var(--muted); stroke: none; font: 9px var(--f-body); }
.scard .body { display: flex; flex-direction: column; gap: 4px; flex: 1; padding: 14px 16px 16px; }
.scard h3 { margin: 0; font: 600 20px/1.2 var(--f-display); }
.scard p { margin: 0; color: var(--muted); font-size: 13px; }
/* цена слева, кнопка занимает остаток строки; если вместе не помещаются (узкая колонка), кнопка уходит на свою строку на всю ширину */
.scard .row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: auto; padding-top: 12px; }
.scard .row .btn { flex: 1 1 auto; min-width: 104px; }
.scard .price { color: var(--muted); font-size: 13px; }

/* ---------- товары ---------- */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (min-width: 600px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 330px) { .grid { grid-template-columns: 1fr; } }
.card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--surface); }
.ph { position: relative; display: block; width: 100%; aspect-ratio: 1 / 1; padding: 0; border: 0; background: var(--photo); overflow: hidden; }
.ph img { width: 100%; height: 100%; object-fit: contain; padding: 8%; transition: opacity .3s var(--ease); }
.ph img.loading { opacity: 0; }
.ph.ico { display: grid; place-items: center; background: linear-gradient(160deg, #2d3c4d, #243140); color: var(--copper-hi); }
.ph.ico svg { width: 38%; height: 38%; opacity: .9; }
.card .cb { display: flex; flex-direction: column; gap: 6px; flex: 1; padding: 12px 12px 12px; }
.card h4 { margin: 0; font: 500 14px/1.35 var(--f-body); overflow-wrap: anywhere; }
.card .spec { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.card .vl { margin: 0; color: var(--muted); font-size: 13px; }
.card .vl b { color: var(--text); font-weight: 500; }
.card .foot-c { display: flex; flex-direction: column; gap: 10px; margin-top: auto; padding-top: 4px; }
.price { font-weight: 600; font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.price small { margin-left: 2px; color: var(--muted); font-weight: 400; font-size: 13px; }
.price.req { color: var(--muted); font-weight: 500; font-size: 13px; white-space: normal; }

/* цвета вариантов */
.sw { display: flex; flex-wrap: wrap; gap: 0; margin: -6px 0 -6px -6px; }
/* кружки сеткой с ровным переносом: до 3 цветов — в ряд, 4 — 2×2 (в широкой карточке 4 в ряд), 5–6 — 3+2 / 3+3, 7–8 — по 4;
   одинокий кружок на второй строке не остаётся. Зона нажатия 44 px (в узкой карточке по ширине чуть меньше). */
.sw-dots { display: grid; grid-template-columns: repeat(3, minmax(0, 44px)); justify-content: start; }
.sw-dots[data-n="4"] { grid-template-columns: repeat(2, minmax(0, 44px)); }
.sw-dots[data-n="7"], .sw-dots[data-n="8"] { grid-template-columns: repeat(4, minmax(0, 44px)); }
@media (min-width: 640px) { .sw-dots[data-n="4"] { grid-template-columns: repeat(4, minmax(0, 44px)); } }
.sw-b { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; background: none; border-radius: 50%; }
.sw-dots .sw-b { width: 100%; }
.sw-b i { width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); box-shadow: 0 0 0 2px var(--surface);
  background: var(--surface-2); transition: box-shadow .2s var(--ease); }
.sw-b[aria-checked="true"] i { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--copper-hi); }
.sw-b.txt { width: auto; min-width: 44px; padding: 0 10px; border-radius: 999px; font-size: 13px; color: var(--muted); }
.sw-b.txt[aria-checked="true"] { color: var(--copper-hi); }
.s-white { background: #f4f4f2 !important; } .s-grey { background: #8c939b !important; } .s-gold { background: linear-gradient(135deg, #e6c476, #a8803a) !important; }
.s-black { background: #141414 !important; } .s-bronze { background: #8a5a35 !important; } .s-copper { background: #b06a33 !important; }
.s-silver { background: linear-gradient(135deg, #e1e4e8, #9aa1a8) !important; } .s-beige { background: #e1d3bd !important; } .s-brown { background: #5b3b25 !important; }

/* ---------- кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border-radius: 12px; border: 1px solid transparent; font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: background-color .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease), transform .12s var(--ease); }
.btn:active { transform: scale(.98); }
.btn-main { background: var(--copper); color: var(--on-copper); }
.btn-main:active { background: var(--copper-press); }
.btn-out { border-color: var(--copper-hi); color: var(--copper-hi); background: transparent; }
.btn-out[aria-pressed="true"] { background: var(--copper); border-color: var(--copper); color: var(--on-copper); }
.btn-ghost { border-color: var(--line); background: transparent; color: var(--text); }
.btn-add { width: 100%; }
/* «−» и «+» — кнопки 44×44 px; рамка нарисована внутри (inset), чтобы они занимали все 44 px высоты */
.qty { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 44px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--copper-hi); }
.qty button { width: 44px; height: 44px; border: 0; border-radius: 12px; background: none; color: var(--copper-hi); font-size: 20px; line-height: 1; }
.qty span { min-width: 28px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }

/* ---------- заявка ---------- */
#checkout { max-width: 640px; margin-inline: auto; }
.lines { margin: 18px 0 22px; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.lines li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.lines .ln { min-width: 0; overflow-wrap: anywhere; }
.lines .ln small { display: block; color: var(--muted); font-size: 13px; }
.lines .ls { font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.lines .lc { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; }
.lines .lc .qty { width: auto; }
.lines .rm { min-height: 44px; padding: 0 10px; border: 0; background: none; color: var(--muted); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.lines .rm-solo { margin-left: -10px; } /* у услуги «Убрать» стоит одно: текст встаёт ровно под название, зона нажатия остаётся 44 px */
.lines li.total { font-weight: 600; font-size: 16px; border-bottom: 0; }
.lines li.total small { font-weight: 400; }
form { display: flex; flex-direction: column; gap: 16px; }
.fld { display: flex; flex-direction: column; gap: 6px; }
.fld > span, .seg legend { color: var(--muted); font-size: 13px; }
input[type="text"], input:not([type]), input[type="tel"], textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-deep);
  color: var(--text); caret-color: var(--copper-hi); font-size: 16px; transition: border-color .18s var(--ease); }
input:focus, textarea:focus { border-color: var(--copper-hi); outline: none; }
textarea { min-height: 88px; resize: vertical; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; padding: 0; border: 0; }
@media (max-width: 479px) { .seg { grid-template-columns: 1fr; } } /* на телефоне варианты друг под другом: «Доставка по городу» целиком в одну строку */
.seg legend { padding: 0; margin-bottom: 6px; }
.seg label { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; font-size: 14px; }
.seg label:has(input:checked) { border-color: var(--copper-hi); background: rgba(225, 173, 102, .08); }
.seg input, .consent input { accent-color: var(--copper); width: 20px; height: 20px; margin: 0; flex: none; }
/* согласие: нажимается вся строка (label), минимум 52 px; ссылка «политика» добирает зону нажатия до 44 px+ паддингом (внизу, где пусто) */
.consent { display: flex; align-items: flex-start; gap: 12px; min-height: 52px; padding: 12px 14px 14px; border-radius: 12px; background: rgba(255, 255, 255, .03); font-size: 13px; line-height: 1.5; cursor: pointer; }
.consent input { margin-top: 1px; }
.consent span { flex: 1; }
.consent a { display: inline-block; padding: 2px 8px 24px; margin: -2px -8px -24px; }
.err { min-height: 1.4em; margin: 0; color: var(--err); font-size: 14px; }

/* ---------- готово ---------- */
.done { max-width: 640px; margin-inline: auto; padding-top: 48px; text-align: center; }
.done svg { width: 72px; height: 72px; margin: 0 auto 12px; color: var(--copper-hi); }
.done-no { margin: 10px 0 4px; font: 500 30px/1.1 var(--f-display); color: var(--copper-hi); font-variant-numeric: tabular-nums; }
.done p { color: var(--muted); max-width: 30em; margin-inline: auto; }

/* ---------- подвал ---------- */
.foot { margin-top: 40px; padding: 20px 0 8px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; line-height: 1.6; text-align: center; }
.foot p { margin: 0 auto 8px; max-width: 48em; }
.foot-sro { color: var(--text); }
.foot-links { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 0 10px; }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; }
/* две ссылки с точкой занимают ~335 px (13 px): на экранах уже 380 px они не помещаются в строку, поэтому столбиком и без точки */
@media (max-width: 379px) { .foot-links { flex-direction: column; gap: 0; } .foot-links span { display: none; } }

/* ---------- фото на весь экран ---------- */
.lb { position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: calc(56px + var(--safe-top)) 16px calc(24px + var(--safe-bottom)); background: rgba(14, 19, 25, .94); }
.lb img { max-width: 100%; max-height: 74vh; border-radius: 14px; background: var(--photo); object-fit: contain; }
.lb p { margin: 0; color: var(--muted); font-size: 13px; text-align: center; }
.lb-x { position: absolute; top: calc(8px + var(--safe-top)); right: 8px; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--surface); color: var(--text); }
.lb-x svg { width: 22px; height: 22px; }

/* ---------- нижняя панель вне Telegram ---------- */
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  padding: 24px max(16px, var(--safe-right)) calc(14px + var(--safe-bottom)) max(16px, var(--safe-left));
  background: linear-gradient(rgba(25, 34, 44, 0), var(--bg-deep) 40%); }
/* Подпись в две строки: сверху «Оформить заявку», ниже мельче «3 поз. · 2 670 ₽ + 1 расчёт» (счётчик и сумма). Раньше всё было одной строкой
   и на 360 и 390 px рвалось посреди «1 / поз.». Теперь верхняя строка короткая, нижняя помещается с запасом, а числа внутри неё склеены со
   словами неразрывными пробелами (cartParts в app.js): если строка всё же не влезет, она разорвётся только между «кусками». Высота кнопки почти
   та же, что у однострочной («Отправить заявку», «Вернуться в каталог»), поэтому панель не прыгает при смене экрана. */
.bar .btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; width: 100%; max-width: 688px; margin: 0 auto; min-height: 54px; padding: 8px 20px; font-size: 16px; line-height: 1.3; text-align: center; white-space: normal; }
.bar #bar-label, .bar #bar-sum { max-width: 100%; text-wrap: balance; }
.bar #bar-sum { font-size: 13px; font-weight: 400; font-variant-numeric: tabular-nums; }
.bar #bar-sum:empty { display: none; }
.toast { position: fixed; left: 50%; bottom: calc(90px + var(--safe-bottom)); z-index: 40; transform: translateX(-50%); max-width: calc(100% - 32px);
  padding: 10px 16px; border-radius: 12px; background: var(--surface-2); color: var(--text); font-size: 13px; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
body.in-tg .toast { bottom: calc(20px + var(--safe-bottom)); }

/* ---------- широкий экран ---------- */
/* От 900 px колонка шире (до 1100 px) и товары по 4 в ряд; до 900 px раскладка прежняя (колонка 720 px, 3 в ряд). Телефон не затронут. */
@media (min-width: 900px) {
  body { max-width: 1100px; }
}

/* ---------- движение ---------- */
@media (prefers-reduced-motion: no-preference) {
  .view.enter { animation: view-in .32s var(--ease) both; }
  .card.enter, .scard.enter { animation: card-in .36s var(--ease) both; animation-delay: calc(var(--i, 0) * 28ms); }
  .lb:not([hidden]) { animation: fade .2s ease both; }
  .toast:not([hidden]) { animation: view-in .24s var(--ease) both; }
  @keyframes view-in { from { opacity: 0; transform: translateY(8px); } }
  @keyframes card-in { from { opacity: 0; transform: translateY(10px); } }
  @keyframes fade { from { opacity: 0; } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}
.d1 { --i: 1; } .d2 { --i: 2; } .d3 { --i: 3; } .d4 { --i: 4; } .d5 { --i: 5; } .d6 { --i: 6; } .d7 { --i: 7; } .d8 { --i: 8; }
