/* Шлейф — прототип мини-приложения.
   Все цвета заданы токенами темы. Темы переключаются атрибутом data-theme на <html>,
   а превью на странице «Оформление» используют тот же атрибут на своём блоке. */

/* Слива: тёмная вечерняя, как в презентации */
:root, [data-theme="plum"] {
  --bg: #140B19; --raise: #22132B; --raise-2: #33203F;
  --fg: #F3ECF5; --muted: #AE9CB6;
  --accent: #E6C79C; --accent-2: #EFB3C3; --on-accent: #140B19;
  --ok: #95D8B6; --warn: #F2C46D; --bad: #F08A8A; --info: #9EC2F2;
  --line: rgba(243, 236, 245, .12); --glass: rgba(243, 236, 245, .05); --field: rgba(243, 236, 245, .06);
  --bar: rgba(20, 11, 25, .88); --glow-1: rgba(239, 179, 195, .12); --glow-2: rgba(230, 199, 156, .08);
  --bubble: #2A1A33; --bubble-me: #5A3149; --bubble-me-fg: #F3ECF5;
  --shadow: rgba(0, 0, 0, .5);
  --display: "Prata", "Didot", Georgia, serif;
  --body: "Manrope", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}
/* Графит и золото: строгая тёмная, как бутик нишевой парфюмерии */
[data-theme="noir"] {
  --bg: #0D0D0F; --raise: #18181B; --raise-2: #232327;
  --fg: #EEEAE2; --muted: #9A958B;
  --accent: #D4B26A; --accent-2: #EBD6A4; --on-accent: #0D0D0F;
  --ok: #8FCFA6; --warn: #E9B95A; --bad: #EB8A7E; --info: #9DB8DD;
  --line: rgba(238, 234, 226, .11); --glass: rgba(238, 234, 226, .04); --field: rgba(238, 234, 226, .05);
  --bar: rgba(13, 13, 15, .9); --glow-1: rgba(212, 178, 106, .10); --glow-2: rgba(212, 178, 106, .04);
  --bubble: #1D1D21; --bubble-me: #3A3122; --bubble-me-fg: #F3E9D2;
  --shadow: rgba(0, 0, 0, .6);
  color-scheme: dark;
}
/* Пудра: светлая и нежная, винный акцент */
[data-theme="powder"] {
  --bg: #FAF3F2; --raise: #FFFFFF; --raise-2: #FFFFFF;
  --fg: #2B1A22; --muted: #8A7079;
  --accent: #8C2F4B; --accent-2: #C8607E; --on-accent: #FFFFFF;
  --ok: #2E8A5C; --warn: #B0731A; --bad: #C0392B; --info: #2F6FB3;
  --line: rgba(43, 26, 34, .10); --glass: rgba(140, 47, 75, .04); --field: #FFFFFF;
  --bar: rgba(250, 243, 242, .92); --glow-1: rgba(200, 96, 126, .14); --glow-2: rgba(185, 139, 78, .10);
  --bubble: #FFFFFF; --bubble-me: #8C2F4B; --bubble-me-fg: #FFFFFF;
  --shadow: rgba(90, 30, 50, .16);
  color-scheme: light;
}
/* Ирис: светлая лавандовая, спокойная */
[data-theme="iris"] {
  --bg: #F4F1F9; --raise: #FFFFFF; --raise-2: #FFFFFF;
  --fg: #221A33; --muted: #7B7190;
  --accent: #5E3F96; --accent-2: #9C7DD3; --on-accent: #FFFFFF;
  --ok: #2E8A5C; --warn: #A86E12; --bad: #C0392B; --info: #2F6FB3;
  --line: rgba(34, 26, 51, .10); --glass: rgba(94, 63, 150, .05); --field: #FFFFFF;
  --bar: rgba(244, 241, 249, .92); --glow-1: rgba(156, 125, 211, .20); --glow-2: rgba(94, 63, 150, .08);
  --bubble: #FFFFFF; --bubble-me: #5E3F96; --bubble-me-fg: #FFFFFF;
  --shadow: rgba(40, 20, 80, .14);
  color-scheme: light;
}
/* Как в Telegram: по умолчанию светлая тема Telegram; внутри Telegram цвета подставляются из его темы */
[data-theme="tg"] {
  --bg: #FFFFFF; --raise: #FFFFFF; --raise-2: #FFFFFF;
  --fg: #000000; --muted: #8E8E93;
  --accent: #2481CC; --accent-2: #2481CC; --on-accent: #FFFFFF;
  --ok: #31A24C; --warn: #C27C0E; --bad: #E53935; --info: #2481CC;
  --line: rgba(0, 0, 0, .08); --glass: #F1F1F4; --field: #F1F1F4;
  --bar: rgba(255, 255, 255, .94); --glow-1: transparent; --glow-2: transparent;
  --bubble: #F1F1F4; --bubble-me: #2481CC; --bubble-me-fg: #FFFFFF;
  --shadow: rgba(0, 0, 0, .12);
  --display: "Manrope", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; min-height: 100dvh; background: var(--bg); color: var(--fg);
  font: 15px/1.45 var(--body); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  background-image: radial-gradient(90% 50% at 10% 0%, var(--glow-1), transparent 70%), radial-gradient(70% 40% at 100% 100%, var(--glow-2), transparent 70%);
  background-attachment: fixed;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.boot { text-align: center; color: var(--muted); padding: 40vh 16px 0; }

/* ---------- каркас ---------- */
.shell { max-width: 560px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; }
.top {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px; background: var(--bar); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.top-l { display: flex; align-items: center; gap: 8px; min-width: 0; }
.top-r { display: flex; align-items: center; gap: 6px; flex: none; }
.back, .ib { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--glass); flex: none; border: 0; }
.back svg, .ib svg { width: 18px; height: 18px; stroke: var(--fg); fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.in-tg .back { display: none; }
/* кнопка «?» зовёт прочитать правила, пока человек их не открыл: пульсирующее кольцо, точка и лёгкое покачивание */
.ib.pulse { position: relative; background: color-mix(in srgb, var(--accent) 24%, transparent); animation: nudge 5s ease-in-out infinite; }
.ib.pulse svg { stroke: var(--accent); }
.ib.pulse::before { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--accent-2); animation: ring 2.2s ease-out infinite; pointer-events: none; }
.ib.pulse::after { content: ""; position: absolute; top: -3px; right: -3px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent-2); border: 2px solid var(--bg); }
@keyframes ring { from { transform: scale(.95); opacity: .95; } to { transform: scale(1.75); opacity: 0; } }
@keyframes nudge { 0%, 80%, 100% { rotate: 0deg; } 84% { rotate: -16deg; } 88% { rotate: 14deg; } 92% { rotate: -9deg; } 96% { rotate: 4deg; } }
.box.glow { animation: glow 2.4s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-2) 28%, transparent), 0 0 26px color-mix(in srgb, var(--accent-2) 30%, transparent); } }
@media (prefers-reduced-motion: reduce) { .ib.pulse, .ib.pulse::before, .box.glow { animation: none; } .ib.pulse::before { opacity: .7; } }
.ttl { font-family: var(--display); font-size: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ttl.mark { font-size: 26px; }
.role { display: flex; background: var(--glass); border: 1px solid var(--line); border-radius: 20px; padding: 3px; flex: none; }
.role a { padding: 6px 11px; border-radius: 16px; font-size: 13px; font-weight: 600; color: var(--muted); }
.role a.on { background: var(--accent); color: var(--on-accent); }
.top.wrap { flex-wrap: wrap; row-gap: 8px; }
.top.wrap .role { width: 100%; }
.top.wrap .role a { flex: 1; text-align: center; }
@media (max-width: 400px) {
  .role a { padding: 6px 8px; font-size: 12px; }
  .ttl { font-size: 19px; }
  .ttl.mark { font-size: 23px; }
}
.main { flex: 1; padding: 16px 16px calc(100px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 18px; }

.tabs {
  position: fixed; left: 50%; bottom: 0; translate: -50% 0; width: 100%; max-width: 560px; z-index: 10;
  display: grid; grid-template-columns: repeat(var(--n, 4), 1fr); padding: 8px 4px calc(8px + env(safe-area-inset-bottom, 0px));
  background: var(--bar); backdrop-filter: blur(14px); border-top: 1px solid var(--line);
}
.tab { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; font-size: 11px; font-weight: 600; color: var(--muted); }
.tab svg { width: 23px; height: 23px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.tab.on { color: var(--accent); }
.badge { position: absolute; top: 0; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent-2); color: var(--on-accent); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }

/* ---------- общие элементы ---------- */
h1, h2, h3 { margin: 0; font-weight: 400; text-wrap: balance; }
h1 { font-family: var(--display); font-size: 30px; line-height: 1.15; }
h2 { font-family: var(--display); font-size: 21px; }
[data-theme="tg"] h1, [data-theme="tg"] h2 { font-weight: 700; }
.sec { display: flex; flex-direction: column; gap: 10px; }
.sec-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.link { color: var(--accent); font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.box { background: var(--glass); border: 1px solid var(--line); border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.box.accent { background: linear-gradient(140deg, color-mix(in srgb, var(--accent-2) 14%, transparent), color-mix(in srgb, var(--accent) 8%, transparent)); border-color: color-mix(in srgb, var(--accent-2) 35%, transparent); }
.empty { text-align: center; color: var(--muted); padding: 40px 16px; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.empty .bt svg { height: 110px; opacity: .8; }
.num { font-variant-numeric: tabular-nums; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 14px; border: 0;
  font-weight: 700; font-size: 15.5px; color: var(--on-accent); background: linear-gradient(120deg, var(--accent-2), var(--accent)); text-align: center;
}
.btn:disabled { opacity: .5; cursor: default; }
.btn.ghost { background: var(--glass); color: var(--fg); border: 1px solid var(--line); }
.btn.small { min-height: 38px; padding: 0 14px; font-size: 14px; border-radius: 12px; }
.btn.danger { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); border: 1px solid color-mix(in srgb, var(--bad) 35%, transparent); }
.btn.wide { width: 100%; }
.btn.icon { width: 48px; padding: 0; flex: none; }
.btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }

.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border-radius: 20px; padding: 7px 13px; font-size: 13.5px; font-weight: 600; border: 1px solid var(--line); color: var(--muted); background: none; white-space: nowrap; }
.chip.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.chip .c { opacity: .7; margin-left: 4px; }
select.chip { background: var(--bg); }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { border-radius: 10px; padding: 4px 10px; font-size: 12.5px; font-weight: 600; background: var(--glass); border: 1px solid var(--line); color: var(--muted); }
.pill.gold { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.pill.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.st { display: inline-flex; align-items: center; gap: 6px; border-radius: 10px; padding: 3px 10px; font-size: 12.5px; font-weight: 700; white-space: nowrap; background: color-mix(in srgb, currentColor 13%, transparent); }
.st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st.new { color: var(--warn); }
.st.paid { color: var(--accent-2); }
.st.sent { color: var(--info); }
.st.done { color: var(--ok); }
.st.confirmed { color: var(--accent); }
.st.cancelled { color: var(--muted); }

/* поля */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 600; color: var(--muted); }
.inp, select.inp, textarea.inp {
  width: 100%; min-height: 48px; border-radius: 14px; border: 1px solid var(--line); background: var(--field);
  padding: 12px 14px; font-size: 16px; outline: none;
}
textarea.inp { min-height: 90px; resize: vertical; }
.inp:focus { border-color: var(--accent); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
/* выбор бренда из справочника */
.bpick { position: relative; display: flex; flex-direction: column; gap: 6px; }
.bp-list { position: absolute; z-index: 20; top: 52px; left: 0; right: 0; max-height: 300px; overflow-y: auto; border-radius: 14px; border: 1px solid var(--line); background: var(--raise); box-shadow: 0 12px 30px rgb(0 0 0 / .25); padding: 4px; }
.bp-item { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; width: 100%; text-align: left; padding: 11px 12px; border-radius: 10px; background: none; border: 0; font-size: 15px; font-weight: 600; color: var(--fg); cursor: pointer; }
.bp-item small { font-weight: 400; color: var(--muted); font-size: 13px; }
.bp-item:hover, .bp-item:focus-visible { background: var(--glass); outline: none; }
.bp-item.req { color: var(--accent); border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; }
.bp-note { min-height: 1.2em; }
.bp-list:not([hidden]) ~ .bp-note { visibility: hidden; } /* пока открыты подсказки, пояснение под полем не просвечивает */
/* помощь */
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; padding: 12px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--accent); font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq details > div { padding: 0 0 12px; color: var(--muted); display: flex; flex-direction: column; gap: 8px; line-height: 1.5; }
.faq details > div b { color: var(--fg); }
.faq details > div p { margin: 0; }
.intro { display: flex; flex-direction: column; gap: 14px; }
.intro li { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: start; }
.intro li i { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 700; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.intro ol { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.search { position: relative; }
.search svg { position: absolute; left: 14px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; stroke: var(--muted); fill: none; stroke-width: 2; }
.search .inp { padding-left: 42px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); }
.seg label { position: relative; text-align: center; padding: 10px 6px; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--accent); color: var(--on-accent); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt span { display: block; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--glass); font-weight: 600; cursor: pointer; }
.opt input:checked + span { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.check input { width: 22px; height: 22px; accent-color: var(--accent); }
.err { color: var(--bad); font-weight: 600; font-size: 14px; }
.err:empty { display: none; }
form .only-full, form .only-decant { display: none; }
form[data-type="full"] .only-full, form[data-type="decant"] .only-decant { display: flex; }
/* оформление заказа: адрес не нужен при самовывозе, срок — только для брони */
#orderForm[data-pickup="1"] .only-ship, #orderForm:not([data-mode="reserve"]) .only-reserve { display: none; }
.grid2 .field.wide { grid-column: 1 / -1; }

/* ---------- карточки товаров ---------- */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 520px) { .grid { gap: 12px; } }
.card { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 10px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); min-width: 0; }
.ph { position: relative; height: 128px; border-radius: 13px; overflow: hidden; display: grid; place-items: end center; padding-bottom: 6px;
  background: radial-gradient(70% 80% at 50% 75%, color-mix(in srgb, var(--c, #C98B5A) 30%, transparent), transparent 75%), var(--glass); }
.ph .bt svg { height: 112px; }
.photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph .tag { position: absolute; left: 8px; top: 8px; border-radius: 8px; padding: 3px 8px; font-size: 11px; font-weight: 700; background: var(--bar); color: var(--accent); }
.bt { display: inline-flex; }
.bt svg { display: block; width: auto; overflow: visible; }
.brand { text-transform: uppercase; letter-spacing: .1em; font-size: 10.5px; font-weight: 700; color: var(--accent); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nm { font-weight: 700; font-size: 15px; line-height: 1.25; min-height: 38px; }
.lvl { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.lvl i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.lvl.big { height: 8px; border-radius: 4px; }
.meta { color: var(--muted); font-size: 12px; }
.sel { font-size: 12px; color: var(--muted); }
.sel i { font-style: normal; color: var(--accent); }
.row { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-top: 2px; }
.row b { font-size: 15.5px; white-space: nowrap; }
.heart { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 6px 2px 6px 8px; color: var(--muted); font-size: 13px; font-weight: 600; }
.heart svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.heart.on { color: var(--accent-2); }
.heart.on svg { fill: currentColor; }

/* ---------- страница товара ---------- */
.hero { position: relative; height: 300px; border-radius: 24px; overflow: hidden; display: grid; place-items: end center; padding-bottom: 14px;
  background: radial-gradient(60% 70% at 50% 75%, color-mix(in srgb, var(--c, #C98B5A) 38%, transparent), transparent 75%), var(--glass); border: 1px solid var(--line); }
.hero .bt svg { height: 260px; }
.price { font-family: var(--display); font-size: 34px; line-height: 1; }
.price small { font-family: var(--body); font-size: 15px; color: var(--muted); }
.favline { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.favbtn { display: inline-flex; align-items: center; gap: 8px; border-radius: 14px; padding: 10px 14px; border: 1px solid var(--line); background: var(--glass); font-weight: 700; }
.favbtn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.favbtn.on { color: var(--accent-2); border-color: color-mix(in srgb, var(--accent-2) 40%, transparent); }
.favbtn.on svg { fill: currentColor; }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.av { width: 46px; height: 46px; border-radius: 50%; flex: none; display: grid; place-items: center; font-family: var(--display); font-size: 21px; color: var(--on-accent); background: linear-gradient(140deg, var(--accent-2), var(--accent)); }
.av.big { width: 72px; height: 72px; font-size: 32px; }
/* фото поверх буквы: если картинка не загрузится, останется буква */
.av { position: relative; overflow: hidden; }
.av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.av-edit { display: flex; align-items: center; gap: 14px; }
.av-edit .sec { gap: 8px; }
.who b { display: block; font-size: 16px; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 10px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; }
.steps li::before { content: counter(s); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.dock { position: fixed; left: 50%; bottom: 0; translate: -50% 0; width: 100%; max-width: 560px; z-index: 11; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); background: var(--bar); backdrop-filter: blur(14px); border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.dock > .btn:not(.icon) { flex: 1; }
.dock .sum { display: flex; flex-direction: column; line-height: 1.1; }
.dock .sum b { font-size: 19px; }
.has-dock .tabs { display: none; }

/* ---------- списки заказов и товаров ---------- */
.list { display: flex; flex-direction: column; gap: 10px; }
.item { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; padding: 12px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); }
.thumb { position: relative; width: 64px; height: 76px; border-radius: 12px; overflow: hidden; display: grid; place-items: end center; padding-bottom: 3px; background: radial-gradient(70% 80% at 50% 75%, color-mix(in srgb, var(--c, #C98B5A) 30%, transparent), transparent 75%), var(--glass); }
.thumb .bt svg { height: 68px; }
.item-b { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.item-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.item-h b { font-size: 15px; line-height: 1.25; }
.item .btns { margin-top: 6px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.copyrow { display: flex; gap: 8px; align-items: flex-start; }
.copyrow p { margin: 0; flex: 1; min-width: 0; font-weight: 600; user-select: text; overflow-wrap: anywhere; }

/* таймлайн заказа */
.tl { display: grid; grid-template-columns: repeat(5, 1fr); position: relative; text-align: center; }
.tl::before { content: ""; position: absolute; left: 10%; right: 10%; top: 15px; height: 2px; background: var(--line); }
.tl .bar { position: absolute; left: 10%; top: 15px; height: 2px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.tl div { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.tl i { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--line); background: var(--raise); display: grid; place-items: center; }
.tl i svg { width: 15px; height: 15px; stroke: var(--accent); fill: none; stroke-width: 3; opacity: 0; }
.tl .on { color: var(--fg); }
.tl .on i { border-color: var(--accent); box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 40%, transparent); }
.tl .on i svg { opacity: 1; }
.tl small { font-weight: 500; font-size: 11px; color: var(--muted); }

/* сводка продавца */
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpi { padding: 14px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.kpi span { color: var(--muted); font-size: 13px; }
.kpi b { font-family: var(--display); font-weight: 400; font-size: 26px; line-height: 1; }
.todo { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.todo a { padding: 12px; border-radius: 18px; display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line); background: var(--glass); font-size: 13px; line-height: 1.25; }
.todo a b { font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1; }
.todo a.hot { border-color: color-mix(in srgb, var(--warn) 45%, transparent); background: color-mix(in srgb, var(--warn) 8%, transparent); }
.todo a.hot b { color: var(--warn); }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bars div { display: grid; grid-template-columns: minmax(0, 1fr) 90px 28px; align-items: center; gap: 10px; font-size: 14px; }
.bars span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bars .fb { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.bars .fb i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.bars b { text-align: right; color: var(--accent-2); }

/* форма товара */
.pic-edit { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: center; }
.pic-edit .ph { height: 150px; }
.pic-edit .ph .bt svg { height: 130px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.sw { position: relative; }
.sw input { position: absolute; opacity: 0; pointer-events: none; }
.sw span { display: block; width: 30px; height: 30px; border-radius: 50%; background: var(--c); border: 2px solid transparent; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .2); cursor: pointer; }
.sw input:checked + span { border-color: var(--fg); }
.sw input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.kinds { display: flex; gap: 8px; }
.kinds .opt span { padding: 4px 8px; }
.kinds .bt svg { height: 46px; }
.filebtn { position: relative; overflow: hidden; }
.filebtn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* отзывы */
.rev { padding: 14px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.rev small { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); }
.stars { color: var(--accent); letter-spacing: 1px; white-space: nowrap; }
.starpick { display: flex; gap: 4px; }
.starpick button { border: 0; background: none; font-size: 30px; line-height: 1; color: var(--line); padding: 2px; }
.starpick button.on { color: var(--accent); }
.stats3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stats3 div, .stats3 .stat { padding: 12px; border-radius: 14px; background: var(--glass); display: flex; flex-direction: column; gap: 2px; }
.stats3 .stat { border: 0; text-align: left; color: inherit; }
button.kpi { font: inherit; color: inherit; }
.box.bad { border-color: color-mix(in srgb, var(--bad) 55%, transparent); background: color-mix(in srgb, var(--bad) 9%, transparent); }
.stats3 b { font-family: var(--display); font-weight: 400; font-size: 22px; }
.stats3 span { color: var(--muted); font-size: 12px; }

/* ---------- чаты ---------- */
.threads { display: flex; flex-direction: column; }
.thread { display: grid; grid-template-columns: 50px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.thread .av { width: 50px; height: 50px; }
.thread b { display: block; font-size: 15.5px; }
.thread p { margin: 0; color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread .tm { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-size: 12px; color: var(--muted); }
.thread .un { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--accent-2); color: var(--on-accent); font-size: 12px; font-weight: 700; line-height: 22px; text-align: center; }
.msgs { display: flex; flex-direction: column; gap: 6px; }
.day { align-self: center; margin: 10px 0 4px; padding: 3px 12px; border-radius: 12px; background: var(--glass); color: var(--muted); font-size: 12px; font-weight: 600; }
.msg { max-width: 82%; padding: 9px 12px 6px; border-radius: 18px 18px 18px 6px; background: var(--bubble); border: 1px solid var(--line); align-self: flex-start; display: flex; flex-direction: column; gap: 6px; overflow-wrap: anywhere; white-space: pre-wrap; }
.msg.me { align-self: flex-end; border-radius: 18px 18px 6px 18px; background: var(--bubble-me); color: var(--bubble-me-fg); border-color: transparent; }
.msg time { align-self: flex-end; font-size: 11px; opacity: .65; margin-top: -2px; }
.msg img { display: block; max-width: 100%; max-height: 320px; border-radius: 12px; object-fit: cover; }
.ctx { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 10px; align-items: center; padding: 6px 8px; border-radius: 12px; background: color-mix(in srgb, var(--bg) 35%, transparent); white-space: normal; color: inherit; }
.ctx .thumb { width: 40px; height: 48px; border-radius: 8px; padding-bottom: 2px; }
.ctx .thumb .bt svg { height: 42px; }
.ctx-t { min-width: 0; }
.ctx b { display: block; font-size: 13.5px; }
.ctx small { display: block; font-size: 12.5px; opacity: .75; }
.composer { flex-direction: column; align-items: stretch; gap: 8px; }
.composer .quick { margin: 0 -16px; }
.composer form { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { flex: 1; min-height: 44px; max-height: 140px; resize: none; border-radius: 22px; padding: 11px 16px; }
.composer .btn.icon { width: 44px; min-height: 44px; border-radius: 50%; }
.composer .attach { background: var(--glass); color: var(--fg); border: 1px solid var(--line); }
.composer .pending { display: flex; align-items: center; gap: 10px; }
.composer .pending .ctx { flex: 1; background: var(--glass); }
.chat-main { padding-bottom: 190px; }
.chat-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.chat-head .av { width: 34px; height: 34px; font-size: 16px; }
.chat-head small { display: block; color: var(--muted); font-size: 12px; font-family: var(--body); }

/* ---------- оформление ---------- */
.themes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tp { display: flex; flex-direction: column; gap: 8px; text-align: left; padding: 0; border: 0; background: none; }
.tp-screen { position: relative; border-radius: 20px; overflow: hidden; background: var(--bg); color: var(--fg); border: 2px solid var(--line); padding: 10px; display: flex; flex-direction: column; gap: 8px;
  background-image: radial-gradient(90% 50% at 10% 0%, var(--glow-1), transparent 70%); font-family: var(--body); }
.tp.on .tp-screen { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.tp-top { display: flex; justify-content: space-between; align-items: center; }
.tp-top b { font-family: var(--display); font-size: 17px; font-weight: 400; }
.tp-top i { font-style: normal; font-size: 9px; font-weight: 700; padding: 3px 7px; border-radius: 9px; background: var(--accent); color: var(--on-accent); }
.tp-card { border-radius: 12px; padding: 6px; background: var(--glass); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.tp-card .ph { height: 74px; border-radius: 9px; }
.tp-card .ph .bt svg { height: 66px; }
.tp-card .brand { font-size: 8px; margin-top: 2px; }
.tp-card .nm { font-size: 11px; min-height: 0; }
.tp-card .row b { font-size: 11.5px; }
.tp-btn { border-radius: 10px; padding: 7px; font-size: 11px; font-weight: 700; text-align: center; color: var(--on-accent); background: linear-gradient(120deg, var(--accent-2), var(--accent)); }
.tp-dots { display: flex; gap: 4px; }
.tp-dots i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--line); }
.tp-label b { display: block; font-size: 15px; color: var(--fg); }
.tp-label span { font-size: 12.5px; color: var(--muted); line-height: 1.35; display: block; }
.tp-label .pill { margin-top: 4px; display: inline-block; }

/* ---------- фото: лента на странице товара, плитки в формах, просмотр на весь экран ---------- */
.hero[data-act="zoom"], .gal img[data-act="zoom"] { cursor: zoom-in; }
.gal-track { position: absolute; inset: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.gal-track::-webkit-scrollbar { display: none; }
.gal-track img { flex: none; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: center; scroll-snap-stop: always; }
.gal-dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.gal-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .5); box-shadow: 0 0 0 1px rgba(0, 0, 0, .25); }
.gal-dots i.on { background: #fff; width: 18px; border-radius: 4px; }
#viewer { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .94); animation: fade .2s both; }
#viewer .gal { position: absolute; inset: 0; }
#viewer .gal-track img { object-fit: contain; cursor: default; }
#viewer .ib { position: absolute; right: 16px; top: calc(14px + env(safe-area-inset-top, 0px)); background: rgba(255, 255, 255, .16); }
#viewer .ib svg { stroke: #fff; }
#viewer .gal-dots { bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
.thumbs, .plist-t { display: flex; flex-wrap: wrap; gap: 8px; }
.tph { position: relative; width: 76px; height: 76px; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--glass); flex: none; }
.tph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbs .tph { cursor: zoom-in; }
.tph .x { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .6); }
.tph .x svg { width: 12px; height: 12px; stroke: #fff; fill: none; stroke-width: 2.6; stroke-linecap: round; }
.tph.main { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.tph.main::after { content: "Главное"; position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 0; text-align: center; font-size: 10.5px; font-weight: 700; background: var(--accent); color: var(--on-accent); }
.plist-t img[data-act="mainPic"] { cursor: pointer; }
.tph.add { display: grid; place-items: center; border-style: dashed; color: var(--accent); cursor: pointer; }
.tph.add svg { width: 26px; height: 26px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
.desc { margin: 0; white-space: pre-line; overflow-wrap: anywhere; line-height: 1.55; }
.rev .thumbs .tph { width: 60px; height: 60px; }

/* строка магазина (поиск, избранное, комиссия) */
.srow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); }
.srow .who { flex: 1; }
.srow .who > div { min-width: 0; }
.srow .who > div > span { display: block; }
.box.warn { border-color: color-mix(in srgb, var(--warn) 50%, transparent); background: color-mix(in srgb, var(--warn) 8%, transparent); }
.pill.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.btn.small.ghost.danger { color: var(--bad); }

/* ---------- шторка и уведомления ---------- */
#sheet { position: fixed; inset: 0; z-index: 30; }
.sheet-bg { position: absolute; inset: 0; background: rgba(5, 2, 8, .55); animation: fade .2s both; }
.sheet-card {
  position: absolute; left: 50%; bottom: 0; translate: -50% 0; width: 100%; max-width: 560px; max-height: 88dvh; overflow: auto;
  background: var(--raise); border-radius: 24px 24px 0 0; border: 1px solid var(--line); padding: 20px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: 14px; animation: up .25s cubic-bezier(.2, .8, .2, 1) both;
}
.sheet-card::before { content: ""; align-self: center; width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin-top: -8px; }
@keyframes up { from { translate: -50% 40px; opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.toast {
  position: fixed; left: 50%; top: calc(64px + env(safe-area-inset-top, 0px)); translate: -50% 0; z-index: 40; width: calc(100% - 32px); max-width: 520px;
  padding: 14px 16px; border-radius: 16px; background: var(--raise-2); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); box-shadow: 0 18px 40px var(--shadow);
  font-weight: 600; display: flex; gap: 12px; align-items: center; animation: drop .3s cubic-bezier(.2, .8, .2, 1) both;
}
.toast.bad { border-color: color-mix(in srgb, var(--bad) 50%, transparent); }
.toast .av { width: 34px; height: 34px; font-size: 16px; }
@keyframes drop { from { translate: -50% -20px; opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sheet-card, .sheet-bg, .toast { animation: none; } }
