/*
  VYRON STORE — Mini App.
  Тёмный графит, мягкие скругления, моноширинные подписи и один янтарный акцент.
  Все блоки стоят на одной сетке: внешний отступ --g, внутренний --p. Ширина приложения ограничена,
  чтобы и в Telegram на компьютере оно выглядело как на телефоне.
*/
:root {
  --bg: #16130E;
  --panel: #1e1a14;
  --raised: #28231a;
  --line: #322c22;
  --line-2: #463e30;
  --text: #EBE5D6;
  --muted: #a39c8b;
  --dim: #6f6858;
  --accent: #FF4A1C;
  --accent-ink: #16130E;
  --olive: #b3a983;
  --danger: #ff7a5c;
  --ok: #9cc07f;
  /* служебные: фон за приложением, «стекло» шапки и панелей, вторичный текст, тень, бумага чека */
  --html: #0e0c08;
  --bg-rgb: 22, 19, 14;
  --glass: rgba(22, 19, 14, .94);
  --glass-2: rgba(30, 26, 20, .97);
  --soft: #d2ccbc;
  --shade: rgba(0, 0, 0, .45);
  --ph: rgba(255, 255, 255, .025);
  --paper: #EBE5D6;
  --sans: "Helvetica Neue", Helvetica, Inter, Roboto, "Segoe UI", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Roboto Mono", Menlo, Consolas, "Courier New", monospace;
  --g: 16px;
  --p: 16px;
  --r: 18px;
  --r-s: 12px;
  --app: 480px;
  --top: 56px;
  --dock: calc(82px + env(safe-area-inset-bottom));
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html { background: var(--html); }
body { margin: 0 auto; max-width: var(--app); min-height: 100vh; background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 15px; line-height: 1.45; overscroll-behavior-y: none; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, ol { margin: 0; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.mono { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.acc { color: var(--accent); }
.pad { padding-inline: var(--g); }
.gap { height: 14px; }

/* ---------- шапка и нижняя панель ---------- */
.top { position: fixed; top: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: var(--app); height: var(--top); z-index: 30;
  display: flex; align-items: center; gap: 8px; padding: 0 var(--g); background: var(--glass); border-bottom: 1px solid var(--line); }
.brand { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1; }
.brand b { font-size: 16px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand span { margin-top: 5px; font-family: var(--mono); font-size: 9.5px; letter-spacing: .2em; color: var(--accent); }
.top-title { display: none; }
.top-actions { display: flex; gap: 8px; }
.round-btn, .cart-pill { position: relative; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--panel); border: 1px solid var(--line); }
.cart-pill .count { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--accent-ink);
  font-family: var(--mono); font-size: 10.5px; font-weight: 700; display: grid; place-items: center; }
.cart-pill .count[data-zero] { display: none; }

.view { padding: calc(var(--top) + 16px) 0 calc(var(--dock) + 24px); }
.dock { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(10px + env(safe-area-inset-bottom)); width: calc(100% - 20px); max-width: calc(var(--app) - 20px); z-index: 30;
  display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line-2); border-radius: 22px; overflow: hidden; background: var(--glass-2); box-shadow: 0 12px 30px var(--shade); }
.dock a { position: relative; height: 62px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; color: var(--dim);
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; }
.dock a.active { color: var(--text); }
.dock a.active svg { color: var(--accent); }
.dock a.active::after { content: ""; position: absolute; bottom: 7px; left: 50%; width: 18px; height: 3px; margin-left: -9px; border-radius: 2px; background: var(--accent); }

.loader { width: 64px; height: 3px; margin: 120px auto; border-radius: 2px; background: var(--line-2); position: relative; overflow: hidden; }
.loader::after { content: ""; position: absolute; inset: 0 60% 0 0; border-radius: 2px; background: var(--accent); animation: load .9s ease-in-out infinite alternate; }
@keyframes load { to { inset: 0 0 0 60%; } }
/* уведомление — сверху под шапкой: не закрывает кнопки покупки и нижнюю панель */
.toast { position: fixed; top: calc(var(--top) + 10px); left: 16px; right: 16px; width: fit-content; max-width: min(420px, calc(100% - 32px)); margin: 0 auto; z-index: 95; cursor: pointer;
  animation: drop .2s ease-out; padding: 10px 16px; border-radius: 14px; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 14px; text-align: center; box-shadow: 0 8px 24px rgba(0, 0, 0, .4); }

/* ---------- заголовки и общие блоки ---------- */
.sect { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 34px var(--g) 12px; }
.sect h2 { font-size: 18px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; line-height: 1.1; }
.sect h2::before { content: "/ "; color: var(--accent); }
.sect a, .sect span { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.page-h { margin: 0 var(--g); }
.page-h h1 { font-size: 30px; font-weight: 800; letter-spacing: -.005em; text-transform: uppercase; line-height: 1.02; overflow-wrap: anywhere; }
.page-h .mono { display: block; margin-bottom: 8px; }
.back { display: inline-flex; align-items: center; gap: 8px; margin: 0 var(--g) 14px; padding: 7px 12px 7px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.empty { margin: 20px var(--g) 0; padding: 34px 20px; border: 1px dashed var(--line-2); border-radius: var(--r); text-align: center; color: var(--muted); }
.empty b { display: block; margin-bottom: 8px; color: var(--text); font-size: 16px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.box, .label, .index, .list, .p-info, .form-card, .track, .steps, .pass, .benefits { margin: 0 var(--g); border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); overflow: hidden; }
.box { padding: var(--p); white-space: pre-line; }
.box + .box { margin-top: 10px; }
.box .mono { display: block; margin-bottom: 8px; }

/* ---------- кнопки и поля ---------- */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 54px; padding: 0 18px; border-radius: 15px; background: var(--text); color: var(--bg);
  font-family: var(--mono); font-weight: 700; font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; text-align: center; }
.btn.signal { background: var(--accent); color: var(--accent-ink); }
.btn.line { background: transparent; color: var(--text); border: 1px solid var(--line-2); }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid rgba(232, 105, 74, .5); }
.btn.auto { width: auto; display: inline-flex; padding: 0 24px; }
.btn:active { opacity: .82; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .35; pointer-events: none; }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; margin-bottom: 7px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.input { width: 100%; min-height: 50px; padding: 13px 14px; border: 1px solid var(--line-2); border-radius: var(--r-s); background: var(--bg); outline: none; font-size: 16px; color: var(--text); }
.input::placeholder { color: var(--dim); }
textarea.input { min-height: 90px; resize: vertical; }
.input:focus { border-color: var(--accent); }
.after { margin: 14px var(--g) 0; display: grid; gap: 10px; }
.warn { color: var(--danger); font-size: 13px; font-weight: 600; }
.note { color: var(--muted); font-size: 13px; }
.link { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); border-bottom: 1px dashed rgba(255, 74, 28, .5); }

/* ---------- витрина ---------- */
.label-head { display: flex; justify-content: space-between; gap: 10px; padding: 11px var(--p); border-bottom: 1px solid var(--line); }
.label-img { height: 200px; background: #0c0d0c; border-bottom: 1px solid var(--line); overflow: hidden; }
.label-img img { width: 100%; height: 100%; object-fit: cover; }
.hero-art { display: block; width: 100%; height: 200px; stroke: none; border-bottom: 1px solid var(--line); background: radial-gradient(120% 90% at 78% 12%, #26291f 0%, #151715 58%, #101210 100%); }
.hero-body { padding: 18px var(--p) 18px; }
.hero h1 { font-size: 30px; font-weight: 800; letter-spacing: -.005em; line-height: 1.04; text-transform: uppercase; overflow-wrap: anywhere; }
.hero p { margin-top: 10px; color: var(--muted); }
.route { display: flex; align-items: center; gap: 10px; margin-top: 18px; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; }
.route i { position: relative; flex: 1; height: 1px; background: repeating-linear-gradient(90deg, var(--line-2) 0 6px, transparent 6px 11px); }
.route i::after { content: ""; position: absolute; left: 0; top: -4px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(255, 74, 28, .18); animation: travel 3.800s cubic-bezier(.6, 0, .3, 1) infinite; }
@keyframes travel { 0% { left: 0; opacity: 0; } 8% { opacity: 1; } 78% { left: calc(100% - 9px); opacity: 1; } 100% { left: calc(100% - 9px); opacity: 0; } }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.facts div { padding: 13px var(--p); }
.facts div + div { border-left: 1px solid var(--line); }
.facts b { display: block; font-family: var(--mono); font-size: 22px; font-weight: 700; line-height: 1.1; }
.facts span { font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.stamp { display: inline-block; padding: 4px 9px; border: 1px solid var(--accent); border-radius: 7px; color: var(--accent); font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.ticker { margin-top: 16px; overflow: hidden; border-block: 1px solid var(--line); }
.ticker div { display: inline-flex; gap: 22px; padding: 9px 0; white-space: nowrap; font-family: var(--mono); font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); animation: ticker 30s linear infinite; }
.ticker i { color: var(--accent); font-style: normal; }
@keyframes ticker { to { transform: translateX(-50%); } }

.search { margin: 0 var(--g); }
.search form { display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.search form:focus-within { border-color: var(--accent); }
.search svg { flex: none; width: 17px; height: 17px; color: var(--muted); }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 16px; color: var(--text); }
.search input::placeholder { color: var(--dim); }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 var(--g); }
.tile { position: relative; min-height: 108px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; }
.tile:nth-child(3n + 1):last-child { grid-column: 1 / -1; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .34; filter: grayscale(.4); }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(var(--bg-rgb), 0) 20%, rgba(var(--bg-rgb), .88) 100%); }
.tile > * { position: relative; z-index: 1; }
.tile .mono { color: var(--accent); }
.tile b { display: block; margin-top: 4px; font-size: 16px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; line-height: 1.15; overflow-wrap: anywhere; }

.benefits a, .benefits div { display: flex; align-items: center; gap: 14px; padding: 14px var(--p); }
.benefits > * + * { border-top: 1px solid var(--line); }
.benefits i { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 74, 28, .12); color: var(--accent); font-style: normal; }
.benefits i svg { width: 16px; height: 16px; }
.benefits span { flex: 1; font-size: 14.500px; }

/* ---------- карточка товара в списке ---------- */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 var(--g); }
.scroller { display: flex; gap: 10px; overflow-x: auto; padding: 0 var(--g) 4px; scroll-padding-inline: var(--g); scroll-snap-type: x proximity; scrollbar-width: none; }
.scroller::-webkit-scrollbar, .chips::-webkit-scrollbar, .gallery::-webkit-scrollbar, .thumbs::-webkit-scrollbar { display: none; }
.scroller .card { flex: 0 0 calc((100% - 10px) / 2.150); scroll-snap-align: start; }
.card { position: relative; display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); overflow: hidden; }
.card:active { background: var(--raised); }
.thumb { position: relative; aspect-ratio: 1 / 1.12; background: var(--raised); overflow: hidden; }
.thumb img { position: relative; width: 100%; height: 100%; object-fit: cover; }
.ph { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--mono); font-size: 40px; font-weight: 700; color: var(--line-2); background: repeating-linear-gradient(135deg, transparent 0 9px, var(--ph) 9px 10px); }
.card.out .thumb img { filter: grayscale(1) brightness(.55); }
.tagmark { position: absolute; left: 8px; bottom: 8px; z-index: 1; padding: 4px 8px; border-radius: 6px; background: var(--accent); color: var(--accent-ink); font-family: var(--mono); font-size: 9.5px; font-weight: 700; letter-spacing: .1em; }
.tagmark.ink { background: rgba(17, 19, 17, .86); color: #eceae1; }
.tagmark.ghost { background: rgba(17, 19, 17, .86); color: #9a9e94; }
.fav { position: absolute; top: 8px; right: 8px; z-index: 1; width: 34px; height: 34px; border-radius: 50%; background: rgba(17, 19, 17, .72); display: grid; place-items: center; color: #eceae1; }
.fav svg { width: 16px; height: 16px; }
.fav.on { background: var(--accent); color: var(--accent-ink); }
.fav.on svg { fill: currentColor; }
/* строки карточки имеют фиксированную высоту — цены в соседних карточках стоят на одной линии */
.card-body { display: grid; grid-template-rows: 14px 37px 14px auto; gap: 6px; padding: 12px 12px 13px; }
.card-brand { font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--olive); line-height: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-name { font-size: 14px; font-weight: 600; line-height: 18.500px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { font-family: var(--mono); font-size: 10px; line-height: 14px; color: var(--muted); letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta.hot { color: var(--accent); }
.card-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 7px; font-family: var(--mono); font-size: 14px; font-weight: 700; line-height: 1.2; }
.card-price s { font-size: 10.5px; font-weight: 400; color: var(--dim); }
.card-price em { font-style: normal; font-size: 10.5px; color: var(--accent); }

/* ---------- списки: разделы, бренды, меню ---------- */
.index a { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 10px var(--p); }
.index a + a, .list > * + * { border-top: 1px solid var(--line); }
.index a:active, .list > a:active { background: var(--raised); }
.index .no { flex: none; width: 22px; font-family: var(--mono); font-size: 10.5px; color: var(--accent); letter-spacing: .08em; }
.index b { flex: 1; min-width: 0; font-size: 16px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; line-height: 1.2; overflow-wrap: anywhere; }
.index .qty { flex: none; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.index img { flex: none; width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.arrow { flex: none; font-family: var(--mono); color: var(--dim); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 0 var(--g) 8px; scroll-padding-inline: var(--g); scrollbar-width: none; }
.chip { flex: none; padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; color: var(--text); }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip.off { border-style: dashed; color: var(--dim); text-decoration: line-through; }
.chips.big { flex-wrap: wrap; overflow: visible; padding: 0; }
.chips.big .chip { min-width: 48px; text-align: center; padding: 12px; border-radius: 12px; font-size: 12px; font-weight: 700; background: var(--bg); border-color: var(--line-2); }
.chips.big .chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.filter-label { margin: 14px var(--g) 8px; }
.more { margin: 14px var(--g) 0; }

/* ---------- товар ---------- */
.gallery { display: flex; margin: 0 var(--g); border: 1px solid var(--line); border-radius: var(--r); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; background: var(--raised); }
.gallery > div { position: relative; flex: 0 0 100%; aspect-ratio: 1 / 1.1; scroll-snap-align: center; }
.gallery img { position: relative; width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 10px var(--g) 0; scrollbar-width: none; }
.thumbs button { flex: none; width: 54px; height: 60px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--raised); opacity: .55; }
.thumbs button.on { border-color: var(--accent); opacity: 1; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.p-info { margin-top: 12px; }
.p-head { padding: var(--p); }
.p-head .mono { color: var(--olive); }
.p-head h1 { margin-top: 8px; font-size: 23px; font-weight: 800; letter-spacing: .005em; line-height: 1.1; text-transform: uppercase; overflow-wrap: anywhere; }
.p-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.p-tags span { padding: 5px 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); font-family: var(--mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.p-tags span.hot { color: var(--accent); border-color: rgba(255, 74, 28, .45); }
.p-price { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; padding: 14px var(--p); border-top: 1px solid var(--line); font-family: var(--mono); font-size: 22px; font-weight: 700; }
.p-price s { font-size: 13px; font-weight: 400; color: var(--dim); }
.p-price .stamp { margin-left: auto; }
.p-row { padding: var(--p); border-top: 1px solid var(--line); }
.p-row-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.p-row > .mono { display: block; margin-bottom: 10px; }
.p-text { white-space: pre-line; color: var(--soft); }
.specs div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 9px 0; font-size: 14px; }
.specs div + div { border-top: 1px solid var(--line); }
.specs span { flex: none; font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.specs b { font-weight: 500; text-align: right; }
.p-links { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.p-links > * { display: flex; align-items: center; justify-content: center; gap: 8px; height: 50px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.p-links > * + * { border-left: 1px solid var(--line); }
.p-links svg { width: 15px; height: 15px; }
.cta { position: sticky; bottom: var(--dock); z-index: 5; display: flex; gap: 10px; margin: 14px var(--g) 0; padding: 8px 0; background: linear-gradient(180deg, rgba(17, 19, 17, 0), var(--bg) 45%); }
.cta .fav-btn { flex: none; width: 54px; height: 54px; border-radius: 15px; border: 1px solid var(--line-2); background: var(--panel); display: grid; place-items: center; }
.fav-btn.on { color: var(--accent); border-color: var(--accent); }
.fav-btn.on svg { fill: currentColor; }

/* просмотр фото во весь экран и выезжающая панель */
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(8, 9, 8, .96); display: flex; align-items: center; justify-content: center; padding: 16px; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 14px; }
.lightbox button { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%; background: var(--panel); border: 1px solid var(--line-2); font-size: 20px; }
.sheet-back { position: fixed; inset: 0; z-index: 80; background: rgba(8, 9, 8, .72); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: var(--app); max-height: 82vh; overflow-y: auto; padding: 10px var(--g) calc(24px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; background: var(--panel); border-top: 1px solid var(--line-2); animation: rise .22s ease-out; }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
.sheet::before { content: ""; display: block; width: 40px; height: 4px; margin: 0 auto 16px; border-radius: 2px; background: var(--line-2); }
.sheet h3 { font-size: 18px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 12px; }
.sheet p { white-space: pre-line; color: var(--soft); margin-bottom: 18px; }

/* ---------- чек: корзина и заказ (светлая «бумага» на тёмном) ---------- */
.receipt { --text: #151715; --muted: #5f635b; --dim: #8a8e85; --line: rgba(21, 23, 21, .16); --line-2: rgba(21, 23, 21, .45); --raised: #d8d5ca; --panel: #dfdcd1; --danger: #b8401f; --ok: #2f6b3a;
  position: relative; margin: 0 var(--g); padding: 4px var(--p) 24px; background: var(--paper); color: var(--text); border-radius: var(--r) var(--r) 0 0;
  --tooth: 8px; -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - var(--tooth)) no-repeat, conic-gradient(from -45deg at 50% 100%, transparent 90deg, #000 0) bottom / 14px var(--tooth) repeat-x;
  mask: linear-gradient(#000 0 0) top / 100% calc(100% - var(--tooth)) no-repeat, conic-gradient(from -45deg at 50% 100%, transparent 90deg, #000 0) bottom / 14px var(--tooth) repeat-x; }
.r-line { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px dashed var(--line-2); }
.r-line .thumb { flex: none; width: 66px; aspect-ratio: 1 / 1.15; border-radius: 10px; }
.r-line .ph { font-size: 22px; }
.r-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.r-name { font-weight: 700; line-height: 1.25; }
.r-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.r-foot b { font-family: var(--mono); font-size: 14px; white-space: nowrap; }
.stepper { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.stepper button { width: 34px; height: 32px; font-size: 17px; }
.stepper button:active { background: var(--text); color: var(--paper); }
.stepper span { min-width: 30px; text-align: center; font-family: var(--mono); font-weight: 700; border-inline: 1px solid var(--line-2); line-height: 32px; }
.x-btn { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); text-decoration: underline; align-self: flex-start; margin-top: 4px; }
.row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 5px 0; font-family: var(--mono); font-size: 13px; }
.row > span:first-child { color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-size: 11px; }
.row > span:last-child { white-space: nowrap; }
.row.total { margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line-2); font-size: 19px; font-weight: 700; }
.row.total > span:first-child { color: var(--text); font-size: 12px; }
.form-card { padding: 0 var(--p) 2px; }
.form-card + .form-card { margin-top: 10px; }
.form-card > .mono { display: flex; align-items: center; gap: 10px; margin: 0 calc(var(--p) * -1) 14px; padding: 12px var(--p); border-bottom: 1px solid var(--line); color: var(--text); }
.form-card > .mono i { color: var(--accent); font-style: normal; }
.option { display: flex; width: 100%; gap: 12px; align-items: flex-start; padding: 13px 12px; margin-bottom: 8px; border: 1px solid var(--line-2); border-radius: var(--r-s); text-align: left; background: var(--bg); }
.option.on { border-color: var(--accent); }
.option .tick { flex: none; width: 18px; height: 18px; margin-top: 2px; border-radius: 50%; border: 1px solid var(--line-2); }
.option.on .tick { background: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 4px var(--bg); }
.option b { font-weight: 700; }
.option .price { margin-left: auto; white-space: nowrap; font-family: var(--mono); font-weight: 700; font-size: 12.5px; }
.promo-row { display: flex; gap: 8px; margin-bottom: 6px; }
.promo-row .btn { width: auto; flex: none; min-height: 50px; padding: 0 16px; border-radius: var(--r-s); }

.track { padding: var(--p); margin-top: 12px; }
.track h3 { margin: 6px 0 16px; font-size: 20px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.track ol { list-style: none; padding: 0; display: flex; }
.track li { position: relative; flex: 1; padding-top: 16px; font-family: var(--mono); font-size: 8.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--dim); line-height: 1.25; }
.track li::before { content: ""; position: absolute; top: 4px; left: 0; right: 0; height: 1px; background: var(--line-2); }
.track li::after { content: ""; position: absolute; top: 0; left: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line-2); }
.track li.done { color: var(--text); }
.track li.done::before { background: var(--accent); }
.track li.done::after { background: var(--accent); border-color: var(--accent); }
.track li:last-child { flex: 0 0 auto; }
.track li:last-child::before { display: none; }
.track.cancelled h3 { color: var(--danger); }

/* ---------- под заказ ---------- */
.steps { list-style: none; padding: 0; }
.steps li { display: flex; gap: 14px; padding: 14px var(--p); }
.steps li + li { border-top: 1px solid var(--line); }
.steps i { flex: none; width: 24px; padding-top: 3px; font-family: var(--mono); font-style: normal; font-size: 11px; color: var(--accent); letter-spacing: .08em; }
.steps b { display: block; margin-bottom: 3px; font-size: 13.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.steps span { color: var(--muted); font-size: 14px; }

/* перелёт: полосы, вид сверху -> крен -> вид сбоку, след */
.route.fly { align-items: flex-end; margin-top: 14px; }
.route.fly i { height: 64px; background: none; perspective: 220px; }
.route.fly i::after { display: none; }
.arc { position: absolute; inset: auto 0 0 0; width: 100%; height: 60px; overflow: visible; }
.arc path { fill: none; stroke: var(--line-2); stroke-width: 1.500; stroke-dasharray: 5 5; }
.arc .trail { stroke: var(--accent); stroke-width: 2; stroke-dasharray: 100 100; stroke-dashoffset: 100; stroke-linecap: round; opacity: .85; animation: trail 7s linear infinite; }
.rw { position: absolute; bottom: 0; width: 16%; height: 8px; border-radius: 3px; background: #2e281f; overflow: hidden; }
.rw::before { content: ""; position: absolute; left: 6%; right: 6%; top: 50%; height: 1.500px; margin-top: -.75px; background: repeating-linear-gradient(90deg, #cfcdc4 0 5px, transparent 5px 9px); }
.rw::after { content: ""; position: absolute; top: 1px; bottom: 1px; width: 2px; background: var(--accent); }
.rw-a { left: -3%; } .rw-a::after { left: 2px; }
.rw-b { right: -3%; } .rw-b::after { right: 2px; }
.plane { position: absolute; left: -15px; bottom: -11px; width: 30px; height: 30px; color: var(--accent); animation: fly-x 7s linear infinite; }
.plane-y { display: block; width: 100%; height: 100%; animation: fly-y 7s infinite; }
.plane-r { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; animation: fly-nose 7s linear infinite; }
.plane svg.pv { position: absolute; inset: 0; width: 100%; height: 100%; fill: currentColor; stroke: none; backface-visibility: hidden; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .45)); }
.plane svg.pv-top { animation: view-top 7s linear infinite; }
.plane svg.pv-side { animation: view-side 7s linear infinite; }
.pv-side .win { fill: var(--panel); }
@keyframes fly-x { 0% { left: -15px; opacity: 0; } 3% { opacity: 1; } 96% { opacity: 1; } 100% { left: calc(100% - 15px); opacity: 0; } }
@keyframes fly-y {
  0%, 8% { transform: translateY(0); animation-timing-function: cubic-bezier(.5, 1, .89, 1); }
  50% { transform: translateY(-48px); animation-timing-function: cubic-bezier(.11, 0, .5, 0); }
  92%, 100% { transform: translateY(0); }
}
@keyframes fly-nose { 0%, 6% { transform: rotate(0deg); } 13% { transform: rotate(-40deg); } 50% { transform: rotate(0deg); } 85% { transform: rotate(36deg); } 93%, 100% { transform: rotate(0deg); } }
@keyframes view-top { 0%, 38% { transform: rotateX(0deg); opacity: 1; } 52%, 100% { transform: rotateX(88deg); opacity: 0; } }
@keyframes view-side { 0%, 44% { transform: rotateX(-88deg); opacity: 0; } 58%, 100% { transform: rotateX(0deg); opacity: 1; } }
@keyframes trail { 0% { stroke-dashoffset: 100; opacity: .85; } 94% { stroke-dashoffset: 5; opacity: .85; } 100% { stroke-dashoffset: 0; opacity: 0; } }

/* ---------- кабинет ---------- */
.pass-top { padding: var(--p) var(--p) 18px; background: radial-gradient(120% 120% at 100% 0%, rgba(255, 74, 28, .14), transparent 55%); }
.pass h1 { margin: 26px 0 6px; font-size: 25px; font-weight: 800; letter-spacing: .01em; line-height: 1.08; text-transform: uppercase; overflow-wrap: anywhere; }
.pass-foot { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.pass-foot div { padding: 12px var(--p); min-width: 0; }
.pass-foot div + div { border-left: 1px solid var(--line); }
.pass-foot b { display: block; margin-top: 3px; font-family: var(--mono); font-size: 15px; }
.list > a, .list > button { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 56px; padding: 12px var(--p); text-align: left; font-weight: 600; }
.list small { display: block; margin-top: 3px; font-family: var(--mono); font-size: 10px; font-weight: 400; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; }
.list .state { flex: none; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; padding: 4px 10px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--muted); white-space: nowrap; }
.list .state.on { border-color: var(--accent); color: var(--accent); }
.faq details { padding: 14px var(--p); }
.faq summary { font-weight: 700; cursor: pointer; }
.faq p { margin-top: 8px; color: var(--muted); white-space: pre-line; }
.foot { padding: 28px var(--g) 4px; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  .ticker div, .route i::after, .plane, .plane-y, .plane-r, .plane svg.pv-top, .plane svg.pv-side, .arc .trail, .hero-art * { animation: none !important; }
  .plane { left: calc(50% - 15px); } .plane-y { transform: translateY(-48px); } .pv-top { opacity: 0; }
}

/* плавающая панель покупки на странице товара */
.cta { margin: 14px 10px 0; padding: 8px; border: 1px solid var(--line-2); border-radius: 22px; background: var(--glass-2); box-shadow: 0 10px 26px var(--shade); bottom: calc(var(--dock) + 2px); }
.cta .fav-btn { background: var(--bg); }

/* ---------- управление магазином ---------- */
.adm-list > a { gap: 12px; }
.adm-thumb { position: relative; flex: none; width: 46px; height: 52px; border-radius: 10px; overflow: hidden; background: var(--raised); }
.adm-thumb img { position: relative; width: 100%; height: 100%; object-fit: cover; }
.adm-thumb .ph { font-size: 18px; }
.adm-main { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.adm-main small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
select.input { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 22px, calc(100% - 14px) 22px; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
select.input option { background: var(--panel); color: var(--text); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.v-row { display: grid; grid-template-columns: 1fr 1fr 70px 40px; gap: 8px; margin-bottom: 8px; }
.v-row .input { min-height: 46px; padding: 10px 12px; }
.v-del { border: 1px solid var(--line-2); border-radius: var(--r-s); color: var(--muted); font-size: 18px; }
.toggles { display: grid; gap: 4px; padding-bottom: 12px; }
.toggle { display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; }
.toggle input { appearance: none; -webkit-appearance: none; flex: none; width: 44px; height: 26px; border-radius: 13px; background: var(--line-2); position: relative; transition: background .15s; }
.toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--text); transition: transform .15s; }
.toggle input:checked { background: var(--accent); }
.toggle input:checked::after { transform: translateX(18px); background: var(--accent-ink); }
.adm-photos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding-bottom: 10px; }
.adm-photo, .adm-add { position: relative; aspect-ratio: 1 / 1.12; border-radius: 12px; overflow: hidden; background: var(--raised); border: 1px solid var(--line); }
.adm-photo img { width: 100%; height: 100%; object-fit: cover; }
.adm-photo button { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; background: rgba(17, 19, 17, .82); color: #eceae1; font-size: 16px; line-height: 1; }
.adm-add { display: grid; place-items: center; border-style: dashed; border-color: var(--line-2); color: var(--accent); font-size: 26px; cursor: pointer; }

/* ---------- широкий экран: компьютер и планшет ---------- */
@media (min-width: 900px) {
  :root { --app: 1180px; --g: 28px; --top: 64px; }
  body { font-size: 16px; }
  .brand b { font-size: 19px; }
  .dock { max-width: 460px; }
  .view { padding-top: calc(var(--top) + 28px); }
  /* служебные страницы — узкой колонкой по центру */
  .view:not([data-wide]) { max-width: 760px; margin-inline: auto; }
  .grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .scroller { gap: 16px; }
  .scroller .card { flex: 0 0 calc((100% - 48px) / 4.300); }
  .tiles { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .tile { min-height: 150px; }
  .tile:nth-child(3n + 1):last-child { grid-column: auto; }
  .card-body { grid-template-rows: 14px 40px 14px auto; padding: 14px; }
  .card-name { font-size: 15px; line-height: 20px; }
  .page-h h1 { font-size: 42px; }
  .sect { margin-top: 48px; }
  .sect h2 { font-size: 22px; }
  /* витрина: графика слева, текст справа */
  .label.hero { display: grid; grid-template-columns: 1.150fr 1fr; grid-template-rows: auto 1fr auto; }
  .label.hero .label-head { grid-column: 1 / -1; }
  .label.hero .hero-art, .label.hero .label-img { grid-row: 2 / 4; height: 100%; min-height: 340px; border-bottom: 0; border-right: 1px solid var(--line); }
  .label.hero .hero-body { align-self: center; padding: 36px; }
  .label.hero .facts { align-self: end; }
  .hero h1 { font-size: 46px; }
  .hero p { font-size: 17px; }
  .search { max-width: 560px; }
  /* «Привезём»: карточка без графики остаётся в одну колонку */
  .view:not([data-wide]) .label.hero { display: block; }
  /* товар: фото слева, описание и покупка справа */
  .p-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; margin: 0 var(--g); }
  .p-layout .gallery, .p-layout .p-info, .p-layout .cta { margin-inline: 0; }
  .p-layout .thumbs { padding-inline: 0; }
  .p-media { position: sticky; top: calc(var(--top) + 20px); }
  .p-layout .p-info { margin-top: 0; }
  .p-layout .cta { position: static; margin-top: 14px; }
  .sheet-back { align-items: center; }
  .sheet { max-width: 520px; border-radius: 22px; border: 1px solid var(--line-2); }
  .sheet::before { display: none; }
  .lightbox img { max-height: 92vh; }
}


/* ---------- постер на витрине: название магазина и световой блик ---------- */
.poster { position: relative; height: 210px; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; border-bottom: 1px solid var(--line);
  background: radial-gradient(90% 120% at 50% 50%, #26211a 0%, #16130E 72%); container-type: inline-size; }
.poster b { display: block; font-weight: 900; line-height: .86; letter-spacing: -.045em; font-size: 25cqw; white-space: nowrap; }
.poster-ghost { color: transparent; -webkit-text-stroke: 1px #3a3327; opacity: .9; }
.poster-word { color: transparent; background: linear-gradient(105deg, #4a4e45 0%, #4a4e45 38%, #fffdf2 50%, #4a4e45 62%, #4a4e45 100%) 100% 0 / 260% 100%; -webkit-background-clip: text; background-clip: text;
  animation: flash 5s cubic-bezier(.6, 0, .3, 1) infinite; }
@keyframes flash { 0%, 12% { background-position: 100% 0; } 70%, 100% { background-position: 0 0; } }
.poster-cap { position: absolute; left: var(--p); top: 12px; z-index: 1; font-size: 9.5px; color: var(--dim); }
.poster-cap.right { left: auto; top: auto; right: var(--p); bottom: 12px; color: var(--accent); }

/* по полоске маршрута едет посылка */
.route:not(.fly) i::after { top: -6px; width: 15px; height: 12px; border-radius: 3px; box-shadow: none;
  background: linear-gradient(#16130E, #16130E) center / 100% 1.500px no-repeat, linear-gradient(#16130E, #16130E) center / 1.500px 100% no-repeat, var(--accent);
  animation-name: travel-box; }
@keyframes travel-box { 0% { left: 0; opacity: 0; } 8% { opacity: 1; } 78% { left: calc(100% - 15px); opacity: 1; } 100% { left: calc(100% - 15px); opacity: 0; } }

@media (min-width: 900px) {
  .label.hero .poster { grid-row: 2 / 4; height: 100%; min-height: 340px; border-bottom: 0; border-right: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) { .poster-word { animation: none; background-position: 50% 0; } }

/* карточка-форма без заголовка: отступ сверху, как у остальных */
.form-card > .field:first-child { margin-top: var(--p); }

/* всплывающая форма панели и настройки */
.sheet form .field:last-of-type { margin-bottom: 16px; }
.sheet-acts { display: grid; gap: 8px; margin-top: 4px; }
.sheet textarea.input { min-height: 96px; resize: vertical; }
label.btn { cursor: pointer; }
.set-img { display: block; width: 100%; max-height: 220px; object-fit: cover; border-radius: var(--r-s); border: 1px solid var(--line); }
.list > button > span:first-child, .list > a > span:first-child { min-width: 0; }

@keyframes drop { from { transform: translateY(-10px); opacity: 0; } }

/* корзина: убрать вещь; товар: убрать прямо со страницы */
.x-round { flex: none; align-self: flex-start; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line-2); color: var(--muted); font-size: 18px; line-height: 1; }
.x-round:active { background: var(--text); color: var(--paper); }
.cta .btn.slim { width: auto; flex: none; padding: 0 16px; }

/* ---------- светлая тема ---------- */
:root[data-theme="light"] {
  --bg: #EBE5D6;
  --panel: #F6F2E7;
  --raised: #ded7c5;
  --line: #d4cdba;
  --line-2: #b2aa94;
  --text: #16130E;
  --muted: #6a6353;
  --dim: #9b937f;
  --accent: #E8400F;
  --accent-ink: #16130E;
  --olive: #7a704d;
  --danger: #c2371a;
  --ok: #3d7a36;
  --html: #dbd4c2;
  --bg-rgb: 246, 242, 231;
  --glass: rgba(235, 229, 214, .94);
  --glass-2: rgba(246, 242, 231, .97);
  --soft: #3a352b;
  --shade: rgba(60, 52, 30, .18);
  --ph: rgba(0, 0, 0, .04);
  --paper: #fbf8ef;
}
:root[data-theme="light"] .receipt { filter: drop-shadow(0 1px 0 var(--line-2)) drop-shadow(0 6px 14px rgba(60, 52, 30, .1)); }
:root[data-theme="light"] .tile img { opacity: .5; }
/* постер и взлётные полосы остаются тёмными — на светлом фоне это читается как плакат */
:root[data-theme="light"] .poster-cap { color: #8a826f; }
:root[data-theme="light"] .poster-cap.right { color: #FF4A1C; }

/* ---------- движение: только transform и opacity, чтобы прокрутка не тормозила ---------- */
@keyframes rise-in { from { opacity: 0; transform: translateY(14px); } }
@keyframes card-in { from { opacity: 0; transform: translateY(18px) scale(.97); } }
@keyframes pop { 40% { transform: scale(1.35); } }
@keyframes bump { 30% { transform: scale(1.18); } 60% { transform: scale(.94); } }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes sheen { 0%, 72% { transform: translateX(-130%) skewX(-18deg); } 100% { transform: translateX(230%) skewX(-18deg); } }

/* страница появляется блоками сверху вниз */
.view.enter > * { animation: rise-in .34s cubic-bezier(.2, .7, .2, 1) both; }
.view.enter > :nth-child(2) { animation-delay: .04s; }
.view.enter > :nth-child(3) { animation-delay: .08s; }
.view.enter > :nth-child(4) { animation-delay: .12s; }
.view.enter > :nth-child(5) { animation-delay: .16s; }
.view.enter > :nth-child(n + 6) { animation-delay: .2s; }
/* карточки вещей и плитки — каскадом */
.grid .card, .scroller .card, .tiles .tile { animation: card-in .42s cubic-bezier(.2, .7, .2, 1) both; }
.grid .card:nth-child(2), .scroller .card:nth-child(2), .tiles .tile:nth-child(2) { animation-delay: .05s; }
.grid .card:nth-child(3), .scroller .card:nth-child(3), .tiles .tile:nth-child(3) { animation-delay: .1s; }
.grid .card:nth-child(4), .scroller .card:nth-child(4), .tiles .tile:nth-child(4) { animation-delay: .15s; }
.grid .card:nth-child(5), .tiles .tile:nth-child(5) { animation-delay: .2s; }
.grid .card:nth-child(6), .tiles .tile:nth-child(6) { animation-delay: .25s; }
.index a, .list > *, .steps li, .benefits > * { animation: rise-in .32s ease-out both; }
.index a:nth-child(2), .list > :nth-child(2), .steps li:nth-child(2), .benefits > :nth-child(2) { animation-delay: .05s; }
.index a:nth-child(3), .list > :nth-child(3), .steps li:nth-child(3), .benefits > :nth-child(3) { animation-delay: .1s; }
.index a:nth-child(n + 4), .list > :nth-child(n + 4), .steps li:nth-child(n + 4), .benefits > :nth-child(n + 4) { animation-delay: .15s; }

/* фото проявляется после загрузки, без «прыжков» */
.thumb img, .gallery img, .adm-thumb img, .thumbs img, .label-img img, .set-img { opacity: 0; transition: opacity .35s ease-out, transform .5s cubic-bezier(.2, .7, .2, 1); }
.thumb img.in, .gallery img.in, .adm-thumb img.in, .thumbs img.in, .label-img img.in, .set-img.in { opacity: 1; }
.tile img { transition: opacity .4s ease-out; }
.tile img:not(.in) { opacity: 0; }
.card .thumb img { transform: scale(1.04); }
.card .thumb img.in { transform: none; }

/* отклик на нажатие */
.btn, .card, .tile, .chip, .round-btn, .cart-pill, .fav, .fav-btn, .x-round, .index a, .back, .stepper button, .dock a { transition: transform .14s ease-out, background-color .2s, border-color .2s, color .2s, opacity .2s; }
.btn:active, .chip:active, .round-btn:active, .cart-pill:active, .x-round:active, .back:active { transform: scale(.96); }
.card:active, .tile:active { transform: scale(.975); }
.fav:active, .fav-btn:active { transform: scale(.86); }
.dock a:active { transform: scale(.92); }
.fav.on svg, .fav-btn.on svg { animation: pop .34s ease-out; }
.cart-pill.bump { animation: bump .42s ease-out; }
.cart-pill.bump .count { animation: pop .42s ease-out; }
.dock a.active::after { animation: grow .28s cubic-bezier(.2, .7, .2, 1); }
.dock a svg { transition: transform .25s cubic-bezier(.2, .7, .2, 1); }
.dock a.active svg { transform: translateY(-1px) scale(1.08); }
.list .state, .chip, .toggle input { transition: background-color .2s, border-color .2s, color .2s; }
.page-h h1 { animation: rise-in .45s cubic-bezier(.2, .7, .2, 1) both; }
.p-price, .stamp { animation: rise-in .4s .12s ease-out both; }
.cta { animation: rise-in .4s .18s cubic-bezier(.2, .7, .2, 1) both; }
.sheet-back, .lightbox { animation: fade .2s ease-out; }
.lightbox img { animation: card-in .28s ease-out; }
@keyframes fade { from { opacity: 0; } }

/* блик на главной кнопке */
.btn.signal { position: relative; overflow: hidden; }
.btn.signal::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 45%; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .34), transparent); transform: translateX(-130%) skewX(-18deg); animation: sheen 5.5s ease-in-out infinite; }

/* смена темы — плавно */
body, .top, .dock, .card, .box, .list, .label, .form-card, .input { transition: background-color .3s, border-color .3s, color .3s; }

/* вне экрана бесконечные анимации стоят */
.still, .still *, .still::after, .still *::after { animation-play-state: paused !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- ленты на компьютере: стрелки и перетаскивание мышью ---------- */
.hwrap { position: relative; }
.harrow { display: none; position: absolute; top: 50%; z-index: 3; width: 42px; height: 42px; margin-top: -21px; border-radius: 50%; place-items: center;
  background: var(--glass-2); border: 1px solid var(--line-2); box-shadow: 0 6px 18px var(--shade); color: var(--text); font-size: 24px; line-height: 1; padding-bottom: 3px;
  transition: transform .14s ease-out, background-color .2s, opacity .2s; }
.harrow.prev { left: calc(var(--g) - 10px); }
.harrow.next { right: calc(var(--g) - 10px); }
.harrow:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.harrow:active { transform: scale(.92); }
.p-layout .harrow.prev { left: 12px; }
.p-layout .harrow.next { right: 12px; }
.hwrap:has(.gallery) .harrow.prev { left: calc(var(--g) + 12px); }
.hwrap:has(.gallery) .harrow.next { right: calc(var(--g) + 12px); }
@media (min-width: 900px) { .p-layout .hwrap:has(.gallery) .harrow.prev { left: 12px; } .p-layout .hwrap:has(.gallery) .harrow.next { right: 12px; } }
@media (hover: hover) and (pointer: fine) {
  .harrow:not([hidden]) { display: grid; }
  .scroller, .gallery, .chips:not(.big), .thumbs { cursor: grab; }
  .dragging { cursor: grabbing; scroll-snap-type: none !important; user-select: none; }
  .dragging * { pointer-events: none; }
}

/* ---------- логотип VYRON ---------- */
.wordmark { display: block; width: auto; height: 17px; fill: currentColor; stroke: none; }
.wordmark .wm-accent { fill: #FF4A1C; }
.brand .wordmark { align-self: flex-start; }
@media (min-width: 900px) { .brand .wordmark { height: 20px; } }
/* постер: логотип по центру, по нему пробегает блик */
.poster { color: #EBE5D6; }
.poster-logo { position: relative; flex: none; width: 78%; max-width: 520px; aspect-ratio: 519 / 100; margin: 12px 0; overflow: hidden; }
.poster-logo .wordmark { width: 100%; height: 100%; }
.poster-logo i { position: absolute; top: -20%; bottom: -20%; left: 0; width: 28%; background: linear-gradient(90deg, transparent, rgba(22, 19, 14, .55), transparent); transform: translateX(-140%) skewX(-18deg); animation: logo-sheen 5s cubic-bezier(.6, 0, .3, 1) infinite; }
@keyframes logo-sheen { 0%, 20% { transform: translateX(-140%) skewX(-18deg); } 70%, 100% { transform: translateX(480%) skewX(-18deg); } }
.poster b { font-size: 19cqw; flex: none; }

/* светлая тема: баннер на бумаге, логотип чёрный */
:root[data-theme="light"] .poster { color: #16130E; background: radial-gradient(90% 120% at 50% 50%, #F6F2E7 0%, #E4DDCB 78%); }
:root[data-theme="light"] .poster-ghost { -webkit-text-stroke: 1px #cfc7b2; }
:root[data-theme="light"] .poster-logo i { background: linear-gradient(90deg, transparent, rgba(246, 242, 231, .7), transparent); }
:root[data-theme="light"] .poster-cap { color: #8a826f; }
:root[data-theme="light"] .poster-cap.right { color: #E8400F; }

/* журнал, история рассылок, карточка человека */
.log-row { padding: 12px var(--p); font-size: 14px; }
.log-row small { display: block; margin-top: 3px; }
.log-row p { margin-top: 6px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; white-space: pre-line; }
.facts-list .row > span:last-child { white-space: normal; text-align: right; overflow-wrap: anywhere; }
.facts-list .row + .row { border-top: 1px solid var(--line); }
.facts-list .row { padding: 9px 0; }
.bc-ready { margin-bottom: 12px; padding: 14px; border: 1px solid var(--accent); border-radius: var(--r-s); }
.bc-ready p { margin: 6px 0 12px; color: var(--muted); font-size: 14px; }
.after.two { grid-template-columns: 1fr 1fr; }

/* ---------- отзывы ---------- */
.stars { color: var(--accent); letter-spacing: 2px; font-size: 14px; white-space: nowrap; }
.stars i { font-style: normal; color: var(--line-2); }
.rating-line { display: inline-flex; align-items: baseline; gap: 8px; }
.rating-line b { font-family: var(--mono); font-size: 15px; }
.reviews { display: grid; gap: 10px; margin: 0 var(--g); }
.review { padding: 14px var(--p); border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); min-width: 0; }
.review-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.review-top .mono { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.review p { margin-top: 8px; font-size: 14.5px; white-space: pre-line; overflow-wrap: anywhere; }
.review-product { display: block; margin-top: 8px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.review-photos { display: flex; gap: 8px; margin-top: 10px; }
.review-photos button { width: 72px; height: 84px; border-radius: 10px; overflow: hidden; background: var(--raised); border: 1px solid var(--line); }
.review-photos img { width: 100%; height: 100%; object-fit: cover; }
.reviews-row .review { flex: 0 0 82%; max-width: 360px; scroll-snap-align: start; }
.reviews-row .review p { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.star-pick { display: flex; gap: 6px; }
.star-pick button { width: 48px; height: 48px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg); color: var(--line-2); font-size: 24px; line-height: 1; transition: transform .14s ease-out, color .2s, border-color .2s; }
.star-pick button.on { color: var(--accent); border-color: var(--accent); }
.star-pick button:active { transform: scale(.9); }
@media (min-width: 900px) { .reviews { grid-template-columns: 1fr 1fr; } .reviews-row .review { flex-basis: 340px; } }

.review-product.sold { color: var(--muted); }

/* дропы */
.drop-hint { margin-top: 12px; padding: 12px; border: 1px dashed var(--accent); border-radius: var(--r-s); font-size: 13.5px; color: var(--muted); }
#drop-clock { font-family: var(--mono); font-weight: 700; color: var(--accent); margin-left: 6px; }
input[type="datetime-local"].input { color-scheme: dark; }
:root[data-theme="light"] input[type="datetime-local"].input { color-scheme: light; }

/* заявки «под заказ» */
.request + .request { margin-top: 10px; }
.request.closed { opacity: .62; }
.pay-box { margin-top: 12px; padding: 12px; border: 1px solid var(--accent); border-radius: var(--r-s); white-space: pre-line; overflow-wrap: anywhere; }
.pay-box .mono { display: block; margin-bottom: 6px; color: var(--accent); }

.p-links.single { grid-template-columns: 1fr; }

/* переключатель темы в шапке: луна в тёмной теме, солнце в светлой */
.round-btn .ico-sun { display: none; }
:root[data-theme="light"] .round-btn .ico-sun { display: block; }
:root[data-theme="light"] .round-btn .ico-moon { display: none; }
.round-btn svg { transition: transform .3s cubic-bezier(.2, .7, .2, 1); }
.round-btn[data-action="theme-toggle"]:active svg { transform: rotate(40deg); }
.warn-box { border-color: var(--accent); }
.warn-box .mono { color: var(--accent); }
@media (max-width: 360px) { .top-actions { gap: 6px; } .round-btn, .cart-pill { width: 36px; height: 36px; } }

/* чек в корзине и заказе: оторванный край с ровными зубцами */
.receipt { --tooth: 8px; --tooth-w: 16px; border-radius: var(--r) var(--r) 0 0; padding-bottom: 28px;
  /* зубцы растягиваются так, чтобы по ширине помещалось целое число: по краям ничего не обрезается */
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - var(--tooth) + .5px) no-repeat,
    conic-gradient(from 135deg at 50% 0, transparent 90deg, #000 0) bottom left / var(--tooth-w) var(--tooth) round no-repeat;
  mask: linear-gradient(#000 0 0) top / 100% calc(100% - var(--tooth) + .5px) no-repeat,
    conic-gradient(from 135deg at 50% 0, transparent 90deg, #000 0) bottom left / var(--tooth-w) var(--tooth) round no-repeat; }

/* чек всегда контрастен странице: на тёмной теме светлая бумага, на светлой — тёплый графит */
:root[data-theme="light"] .receipt { --text: #F4EFE3; --muted: #b9b09d; --dim: #8a826f; --line: rgba(244, 239, 227, .12); --line-2: rgba(244, 239, 227, .26);
  --raised: #3a3329; --panel: #332d24; --danger: #ff8a6e; --ok: #a9c98d; --paper: #2a251d; --accent: #FF6A3D; filter: none;
  background: linear-gradient(180deg, #332d24 0%, #26211a 100%); }
:root[data-theme="light"] .receipt .r-line { border-bottom-color: rgba(244, 239, 227, .22); }
:root[data-theme="light"] .receipt .row.total > span:last-child { color: #fff8ea; }
:root[data-theme="light"] .receipt .stepper, :root[data-theme="light"] .receipt .x-round { background: rgba(244, 239, 227, .06); }
:root[data-theme="light"] .receipt .thumb { box-shadow: 0 0 0 1px rgba(244, 239, 227, .14); }

/* ---------- фото в заказах, отзывы заметнее, менеджер в сети ---------- */
.list > .adm-main, .list > a > .adm-main, .list > button > .adm-main { white-space: nowrap; }
.ask-review { border-color: var(--accent); }
.ask-review > button { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.rating-card { display: flex; align-items: center; gap: 14px; margin: 0 var(--g) 12px; padding: 14px var(--p); border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.rating-card > b { font-family: var(--mono); font-size: 34px; font-weight: 800; line-height: 1; color: var(--accent); }
.rating-card > span:nth-child(2) { flex: 1; min-width: 0; }
.rating-card .stars { font-size: 17px; }
.rating-card small { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.p-rating { display: inline-flex; align-items: baseline; gap: 8px; margin-top: 10px; }
.p-rating[hidden] { display: none; }
.p-rating b { font-family: var(--mono); font-size: 14px; }
.p-rating > span:last-child { font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.list .state.online { border-color: #2fae66; color: #2fae66; }
.list .state.online::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: #2fae66; vertical-align: 1px; }
.benefits .arrow { flex: none; }

/* ---------- финансы: таблица ---------- */
.fin-wrap { margin: 0 var(--g); overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); -webkit-overflow-scrolling: touch; }
.fin { width: 100%; border-collapse: separate; border-spacing: 0; font-family: var(--mono); font-size: 13px; }
.fin th, .fin td { padding: 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.fin tbody tr:last-child th, .fin tbody tr:last-child td, .fin tfoot td { border-bottom: 0; }
.fin th { position: sticky; left: 0; z-index: 1; min-width: 128px; max-width: 150px; background: var(--panel); text-align: left; font-family: var(--sans); font-weight: 600; font-size: 14px; border-right: 1px solid var(--line); }
.fin thead th, .fin thead td { padding: 10px; font-family: var(--mono); font-size: 10px; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.fin td { text-align: right; min-width: 70px; }
.fin th button { display: block; width: 100%; padding: 10px 10px 10px 12px; font-size: 13px; text-align: left; font: inherit; white-space: normal; overflow-wrap: anywhere; }
.fin th small { display: block; margin-top: 3px; font-family: var(--mono); font-size: 10px; font-weight: 400; letter-spacing: .04em; color: var(--muted); }
.fin td input { width: 70px; padding: 12px 10px; border: 0; background: transparent; color: var(--ink); font: inherit; text-align: right; border-radius: 0; }
.fin td input:focus { outline: none; background: color-mix(in srgb, var(--accent) 12%, transparent); box-shadow: inset 0 -2px 0 var(--accent); }
.fin td input.bad { box-shadow: inset 0 -2px 0 #d8402b; }
.fin .fin-profit, .fin tfoot td { padding: 12px 10px; font-weight: 700; }
.fin tfoot td { border-top: 1px solid var(--line-2); background: var(--raised); }
.fin tfoot td:first-child { position: sticky; left: 0; text-align: left; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; border-right: 1px solid var(--line); }
.fin .pos { color: #2fae66; }
.fin .neg, .pass-foot b.neg { color: #e0533d; }
.fin.plain th, .fin.plain td { padding: 11px 12px; }
.fin.plain th { font-weight: 500; white-space: normal; }
.pass-foot b.acc { color: var(--accent); }

/* ---------- «Привезём»: примеры заявок ---------- */
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.chips.wrap .chip { white-space: normal; text-align: left; }

/* ---------- разделы на витрине: настоящее фото вещи или чистая плитка ---------- */
.tile img { opacity: .5; filter: none; }
.tile.plain::after { display: none; }
.tile.plain::before { content: attr(data-n); position: absolute; right: 12px; top: 4px; font-size: 58px; font-weight: 800; line-height: 1; letter-spacing: -.02em; color: transparent; -webkit-text-stroke: 1px var(--line-2); }
.tile.empty .mono { color: var(--muted); }
.tile.empty b { color: var(--muted); }
