/* Layout: витрина на слоновой кости, логотип — главный жест, плитка 4:5; на телефоне нижняя панель как в приложении */
:root {
  --bg: #F5F0E6;
  --surface: #FBF8F2;
  --ink: #2C2E31;
  --muted: #7D776F;
  --line: #E1D9CA;
  --accent: #8B6A56;
  --on-accent: #FBF8F2;
  --on-ink: #F5F0E6;
  --danger: #9E4537;
  --ok: #5C7656;
  --shade: rgba(36, 34, 31, .46);
  --photo-chip: rgba(251, 248, 242, .86);
  --font-ui: 'Jost', 'Futura', 'Century Gothic', 'Avenir Next', system-ui, sans-serif;
  --r: 2px;
  --tabbar: 62px;
  --head: 64px;
  --cols-phone: 2;
  --cols-pc: 3;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.55 var(--font-ui);
  font-variant-numeric: lining-nums;
  min-height: 100%;
}
body.lock { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 1.5px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent); color: var(--on-accent); }
img { max-width: 100%; }

.wrap {
  max-width: 1240px;
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.narrow { max-width: 760px; }

/* ---------- типографика ---------- */
.lbl {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .16em;
  color: var(--muted);
}
.h-sec {
  margin: 0;
  font-size: 15px;
  font-weight: 300;
  letter-spacing: .3em;
}
.h-page {
  margin: 0;
  font-size: clamp(24px, 3.2vw, 34px);
  font-weight: 200;
  letter-spacing: .2em;
  line-height: 1.2;
  text-wrap: balance;
}
.muted { color: var(--muted); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
p { margin: 0; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid var(--ink);
  border-radius: var(--r);
  background: var(--ink);
  color: var(--on-ink);
  font-size: 14px;
  letter-spacing: .08em;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); background: transparent; }
.btn.accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: 13px; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.lnk {
  background: none;
  border: 0;
  padding: 0;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 4px;
  font-size: inherit;
}
.lnk:hover { color: var(--accent); }
.icon-btn {
  width: 40px; height: 40px;
  display: inline-grid; place-items: center;
  background: none; border: 0; padding: 0; color: var(--ink);
}
.icon-btn svg, .tb svg, .nb svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- баннер ---------- */
.banner {
  background: var(--ink);
  color: var(--on-ink);
  font-size: 12.5px;
  letter-spacing: .12em;
  overflow: hidden;
}
.banner .wrap { min-height: 34px; display: flex; align-items: center; justify-content: center; text-align: center; padding-block: 6px; }
.banner a { color: inherit; text-underline-offset: 3px; }
.banner.marquee .wrap { justify-content: flex-start; overflow: hidden; max-width: none; padding-left: 0; padding-right: 0; }
.banner .track { display: inline-flex; gap: 64px; white-space: nowrap; animation: run 26s linear infinite; padding-left: 64px; }
@keyframes run { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .banner .track { animation: none; } }

/* ---------- шапка ---------- */
.head .wrap { height: var(--head); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo-sm {
  background: none; border: 0; padding: 0;
  font-size: 19px; font-weight: 200; letter-spacing: .44em; margin-right: -.44em;
  color: var(--ink);
}
.home-page .head .logo-sm { visibility: hidden; }
.topnav { display: flex; align-items: center; gap: 2px; }
.nb {
  position: relative;
  display: inline-flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 12px;
  background: none; border: 0;
  font-size: 14px; letter-spacing: .06em; color: var(--ink);
}
.nb::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 6px; height: 1px; background: var(--accent); transform: scaleX(0); transition: transform .2s; }
.nb:hover::after, .nb.on::after { transform: scaleX(1); }
.cnt {
  display: inline-grid; place-items: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px;
  background: var(--accent); color: var(--on-accent);
  font-size: 11px; letter-spacing: 0; font-variant-numeric: tabular-nums;
}
.cnt[hidden] { display: none !important; }

/* ---------- герой ---------- */
.hero { text-align: center; padding-block: clamp(48px, 13vh, 150px) clamp(40px, 9vh, 110px); }
.wordmark {
  margin: 0;
  font-size: clamp(40px, 8.8vw, 100px);
  font-weight: 200;
  letter-spacing: .44em;
  margin-right: -.44em;
  line-height: 1;
}
.slogan {
  margin-top: clamp(14px, 2.4vw, 26px);
  font-size: clamp(11.5px, 1.5vw, 16px);
  font-weight: 300;
  letter-spacing: .3em;
  margin-right: -.3em;
  color: var(--muted);
}
.hero-cue { margin-top: clamp(28px, 6vh, 60px); }
.hero-cue button { background: none; border: 0; color: var(--muted); font-size: 12px; letter-spacing: .2em; display: inline-flex; flex-direction: column; align-items: center; gap: 8px; }
.hero-cue span { width: 1px; height: 28px; background: var(--muted); }

/* ---------- секции ---------- */
.sec { padding-block: 8px 56px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-block: 8px 22px; flex-wrap: wrap; }
.page-head { padding-block: clamp(20px, 4vw, 44px) clamp(18px, 3vw, 32px); display: grid; gap: 10px; }

/* ---------- плитка ---------- */
.grid {
  --cols: var(--cols-phone);
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: clamp(22px, 3vw, 40px) clamp(10px, 1.8vw, 24px);
}
@media (min-width: 760px) { .grid { --cols: var(--cols-pc); } }
.grid + .grid { margin-top: clamp(22px, 3vw, 40px); }
.tile { min-width: 0; cursor: pointer; }
.ph { position: relative; aspect-ratio: 4 / 5; max-width: 100%; background: var(--line); overflow: hidden; }
.slides { display: flex; height: 100%; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.slides::-webkit-scrollbar { display: none; }
.sl { flex: 0 0 100%; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; }
.sl img { display: block; width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.dots { position: absolute; left: 0; right: 0; bottom: 6px; display: flex; justify-content: center; gap: 0; pointer-events: none; }
.dot { pointer-events: auto; width: 18px; height: 18px; padding: 0; border: 0; background: none; display: grid; place-items: center; }
.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .5); box-shadow: 0 0 0 .5px rgba(0, 0, 0, .18); transition: background .2s, transform .2s; }
.dot.on::before { background: #fff; transform: scale(1.15); }
.arr {
  position: absolute; top: 50%; translate: 0 -50%;
  width: 34px; height: 34px; border: 0; border-radius: 50%;
  background: var(--photo-chip); color: var(--ink);
  font-size: 18px; line-height: 1; display: grid; place-items: center;
  opacity: 0; transition: opacity .2s;
}
.arr.l { left: 8px; } .arr.r { right: 8px; }
.ph:hover .arr { opacity: 1; }
@media (hover: none) { .arr { display: none; } }
.badges { position: absolute; top: 8px; left: 8px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; pointer-events: none; }
.bdg { font-size: 10.5px; letter-spacing: .1em; padding: 3px 7px 2px; background: var(--photo-chip); color: var(--ink); }
.bdg.new { background: var(--accent); color: var(--on-accent); }
.bdg.order { background: var(--ink); color: var(--on-ink); }
.t-meta { padding-top: 10px; display: grid; gap: 1px; }
.t-name { font-size: 14px; letter-spacing: .02em; line-height: 1.35; }
.t-price { font-size: 14px; font-variant-numeric: tabular-nums; }
.old { color: var(--muted); text-decoration: line-through; margin-left: 8px; font-size: 12.5px; }
.sentinel { height: 1px; }
.loading-more { text-align: center; padding: 24px 0 0; color: var(--muted); font-size: 12px; letter-spacing: .2em; }

/* ---------- отзывы-лента ---------- */
.revband { background: var(--surface); border-block: 1px solid var(--line); padding-block: clamp(32px, 5vw, 56px); margin-block: clamp(32px, 5vw, 56px); }
.revs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.rev { display: grid; gap: 8px; align-content: start; min-width: 0; }
.stars { color: var(--accent); letter-spacing: .14em; font-size: 13px; }
.rev-who { font-size: 12.5px; color: var(--muted); letter-spacing: .06em; }
.demo-note { font-size: 12px; color: var(--muted); }

/* ---------- футер ---------- */
.foot { border-top: 1px solid var(--line); padding-block: 40px calc(32px + var(--foot-pad, 0px)); margin-top: 24px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.foot-col { display: grid; gap: 8px; align-content: start; font-size: 13.5px; }
.foot-col button, .foot-col a { text-align: left; background: none; border: 0; padding: 0; color: var(--ink); font-size: 13.5px; }
.foot-col button:hover, .foot-col a:hover { color: var(--accent); }
.foot-logo { font-size: 18px; font-weight: 200; letter-spacing: .44em; }
.req { font-size: 12px; color: var(--muted); line-height: 1.6; }

/* ---------- нижняя панель ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: none;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}
.tb {
  position: relative;
  height: var(--tabbar);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  background: none; border: 0; padding: 0;
  font-size: 10.5px; letter-spacing: .03em; color: var(--muted);
}
.tb.on { color: var(--ink); }
.tb .cnt { position: absolute; top: 7px; left: calc(50% + 6px); }

/* ---------- выпадающий список / шторка ---------- */
.dd-wrap { position: fixed; inset: 0; z-index: 60; }
.dd-wrap[hidden] { display: none !important; }
.dd-bg { position: absolute; inset: 0; background: transparent; }
.dd {
  position: fixed;
  width: 320px;
  max-height: min(70vh, 560px);
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(36, 34, 31, .14);
  padding: 18px;
  display: grid; gap: 14px; align-content: start;
}
.dd-title { display: flex; align-items: center; justify-content: space-between; }
.cat-list { display: grid; gap: 2px; }
.ck {
  display: flex; align-items: center; gap: 12px;
  min-height: 40px; padding: 0 4px;
  cursor: pointer; user-select: none;
}
.ck input { appearance: none; -webkit-appearance: none; flex: 0 0 18px; width: 18px; height: 18px; margin: 0; border: 1px solid var(--muted); border-radius: var(--r); background: var(--surface); display: grid; place-items: center; }
.ck input:checked { background: var(--ink); border-color: var(--ink); }
.ck input:checked::after { content: ""; width: 9px; height: 5px; border-left: 1.5px solid var(--on-ink); border-bottom: 1.5px solid var(--on-ink); transform: translateY(-1px) rotate(-45deg); }
.ck.sub { padding-left: 34px; min-height: 36px; font-size: 14px; color: var(--muted); }
.ck .n { margin-left: auto; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 32px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 16px;
  background: var(--surface); font-size: 13px; color: var(--ink);
}
.chip.on { border-color: var(--ink); background: var(--ink); color: var(--on-ink); }
.chip .x { font-size: 15px; line-height: 1; opacity: .7; }

/* ---------- каталог ---------- */
.ctl { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding-bottom: 18px; }
.ctl .grow { flex: 1 1 200px; min-width: 0; }
.search { position: relative; }
.search input, .search input[type=search] { padding-left: 38px; width: 100%; }
.search svg { position: absolute; left: 12px; top: 50%; translate: 0 -50%; width: 17px; height: 17px; fill: none; stroke: var(--muted); stroke-width: 1.4; }
.found { font-size: 12.5px; color: var(--muted); letter-spacing: .06em; padding-bottom: 14px; }
.cols-row { display: flex; gap: 10px; flex-wrap: wrap; padding-bottom: 22px; }
.col-card { flex: 1 1 220px; min-width: 0; position: relative; aspect-ratio: 16 / 9; max-width: 100%; overflow: hidden; border: 0; padding: 0; background: var(--line); text-align: left; }
.col-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.col-card span { position: absolute; left: 12px; bottom: 10px; background: var(--photo-chip); padding: 4px 10px 3px; font-size: 13px; letter-spacing: .14em; color: var(--ink); }
.empty { text-align: center; padding: 56px 16px; display: grid; gap: 14px; justify-items: center; }

/* ---------- формы ---------- */
.field { display: grid; gap: 6px; min-width: 0; }
.field > span { font-size: 12px; letter-spacing: .1em; color: var(--muted); }
.field > span b { color: var(--accent); font-weight: 400; }
input[type=text], input[type=tel], input[type=email], input[type=number], input[type=date], input[type=password], input[type=search], input[type=time], select, textarea {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--ink);
}
textarea { padding: 12px 14px; min-height: 96px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
.field.err input, .field.err textarea { border-color: var(--danger); }
.err-msg { font-size: 12px; color: var(--danger); }
.form { display: grid; gap: 16px; }
.frow { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 14px; }
.opt-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 10px; }
.opt {
  display: grid; gap: 2px; text-align: left;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface);
  cursor: pointer;
}
.opt.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.opt b { font-weight: 400; font-size: 14.5px; }
.opt small { color: var(--muted); font-size: 12.5px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); }
.consent input { margin-top: 3px; accent-color: var(--ink); }
.note { font-size: 13px; color: var(--muted); line-height: 1.55; }
.box { border: 1px solid var(--line); background: var(--surface); padding: 18px; display: grid; gap: 12px; }

/* ---------- карточка товара ---------- */
.ov {
  position: fixed; inset: 0; z-index: 50;
  background: var(--shade);
  display: flex; align-items: center; justify-content: center;
  padding: max(24px, env(safe-area-inset-top, 0px)) max(24px, env(safe-area-inset-right, 0px)) max(24px, env(safe-area-inset-bottom, 0px)) max(24px, env(safe-area-inset-left, 0px));
}
.ov[hidden] { display: none !important; }
.cardp {
  position: relative;
  width: min(1100px, 100%);
  max-height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--surface);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
}
.cp-media { position: sticky; top: 0; align-self: start; min-width: 0; z-index: 1; }
.cp-media .ph { aspect-ratio: 4 / 5; }
.cp-info { padding: clamp(22px, 3vw, 40px); display: grid; gap: 18px; align-content: start; min-width: 0; }
.cp-name { margin: 0; font-size: clamp(22px, 2.4vw, 30px); font-weight: 300; letter-spacing: .06em; line-height: 1.25; text-wrap: balance; }
.cp-price { font-size: 20px; font-variant-numeric: tabular-nums; }
.avail { font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: flex-start; }
.avail i { flex: 0 0 7px; width: 7px; height: 7px; margin-top: 7px; border-radius: 50%; background: var(--ok); display: inline-block; }
.avail.order i { background: var(--accent); }
.cp-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cp-actions .close-line { grid-column: 1 / -1; justify-self: center; }
.specs { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 18px; margin: 0; font-size: 14px; }
.specs dt { color: var(--muted); font-size: 12.5px; letter-spacing: .08em; padding-top: 2px; }
.specs dd { margin: 0; }
.cp-desc { font-size: 14.5px; line-height: 1.65; }
.cp-more { grid-column: 1 / -1; border-top: 1px solid var(--line); padding: 24px clamp(22px, 3vw, 40px) 32px; display: grid; gap: 18px; }
.mini { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.x-close {
  position: absolute; top: 10px; right: 10px; z-index: 3;
  width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: var(--photo-chip); color: var(--ink);
  display: grid; place-items: center; font-size: 22px; line-height: 1;
}
.rev-list { display: grid; gap: 16px; }
.rev-item { display: grid; gap: 4px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.rev-item:last-child { border-bottom: 0; }
.rev-photo { width: 84px; aspect-ratio: 4 / 5; max-width: 100%; object-fit: cover; margin-top: 4px; }

/* ---------- корзина и оформление ---------- */
.two { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: clamp(24px, 4vw, 56px); align-items: start; }
.crow { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 16px; padding-block: 18px; border-bottom: 1px solid var(--line); align-items: start; }
.crow:first-child { padding-top: 0; }
.crow img { width: 84px; aspect-ratio: 4 / 5; max-width: 100%; object-fit: cover; display: block; background: var(--line); cursor: pointer; }
.crow-info { display: grid; gap: 4px; min-width: 0; }
.crow-name { background: none; border: 0; padding: 0; text-align: left; font-size: 15px; color: var(--ink); }
.crow-side { display: grid; gap: 10px; justify-items: end; }
.step { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.step button { width: 34px; height: 34px; border: 0; background: none; font-size: 17px; }
.step span { min-width: 26px; text-align: center; font-variant-numeric: tabular-nums; }
.summary { position: sticky; top: 16px; border: 1px solid var(--line); background: var(--surface); padding: 22px; display: grid; gap: 14px; }
.sumline { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; font-variant-numeric: tabular-nums; }
.sumline.total { font-size: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.sumline .minus { color: var(--accent); }
.apply { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.applied { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; padding: 8px 12px; background: var(--bg); border: 1px dashed var(--accent); }
.msg { font-size: 12.5px; }
.msg.bad { color: var(--danger); }
.msg.good { color: var(--ok); }
.qr { width: 180px; height: 180px; image-rendering: pixelated; background: #fff; padding: 10px; border: 1px solid var(--line); }

/* ---------- сертификаты ---------- */
.cert-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.postcard {
  position: relative;
  aspect-ratio: 7 / 4.6;
  max-width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 24px 50px rgba(36, 34, 31, .1);
  display: grid; grid-template-rows: 1fr auto; padding: clamp(18px, 4%, 30px);
  overflow: hidden;
}
.postcard::before { content: ""; position: absolute; inset: 10px; border: 1px solid var(--line); pointer-events: none; }
.pc-top { display: grid; align-content: center; justify-items: center; text-align: center; gap: 6px; }
.pc-logo { font-size: clamp(22px, 4.4vw, 40px); font-weight: 200; letter-spacing: .44em; margin-right: -.44em; }
.pc-kind { font-size: clamp(9px, 1.2vw, 12px); letter-spacing: .32em; margin-right: -.32em; color: var(--muted); }
.pc-sum { font-size: clamp(20px, 3.6vw, 34px); font-weight: 300; letter-spacing: .06em; margin-top: 8px; font-variant-numeric: tabular-nums; }
.pc-text { font-size: clamp(11px, 1.3vw, 13.5px); color: var(--muted); max-width: 30ch; line-height: 1.45; margin-top: 4px; overflow-wrap: anywhere; }
.pc-bot { display: flex; justify-content: space-between; align-items: end; gap: 8px; font-size: clamp(9px, 1.1vw, 11.5px); letter-spacing: .1em; color: var(--muted); position: relative; }
.pc-code { font-variant-numeric: tabular-nums; color: var(--ink); }

/* ---------- контакты / доставка / документы ---------- */
.lockup { display: grid; justify-items: start; gap: 8px; }
.lockup .w { font-size: clamp(30px, 5vw, 52px); font-weight: 200; letter-spacing: .44em; line-height: 1; }
.lockup .s { font-size: 12.5px; font-weight: 300; letter-spacing: .3em; color: var(--muted); }
.clist { display: grid; border-top: 1px solid var(--line); }
.crow2 { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding-block: 14px; border-bottom: 1px solid var(--line); }
.crow2 .v { user-select: text; overflow-wrap: anywhere; }
.footnote { font-size: 12px; color: var(--muted); }
.dblocks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.dblock { border: 1px solid var(--line); background: var(--surface); padding: 20px; display: grid; gap: 10px; align-content: start; }
.dblock h3 { margin: 0; font-weight: 400; font-size: 17px; letter-spacing: .04em; }
.dmeta { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.dmeta b { font-weight: 400; color: var(--muted); font-size: 12px; letter-spacing: .1em; display: block; }
.doc { max-width: 70ch; display: grid; gap: 14px; font-size: 14.5px; line-height: 1.7; padding-bottom: 32px; }
.doc h2 { margin: 18px 0 0; font-size: 16px; font-weight: 400; letter-spacing: .06em; }
.more-list { display: grid; border-top: 1px solid var(--line); }
.more-list button, .more-list a { display: flex; justify-content: space-between; align-items: center; min-height: 54px; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 0 4px; font-size: 16px; letter-spacing: .04em; color: var(--ink); text-align: left; }
.more-list button::after, .more-list a::after { content: "›"; color: var(--muted); font-size: 20px; }
.rating-in { display: inline-flex; gap: 2px; }
.rating-in button { background: none; border: 0; font-size: 24px; color: var(--line); padding: 0 2px; line-height: 1; }
.rating-in button.on { color: var(--accent); }

/* ---------- тост ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 90;
  translate: -50% 0;
  max-width: min(440px, calc(100% - 32px));
  background: var(--ink); color: var(--on-ink);
  padding: 12px 18px; font-size: 13.5px; letter-spacing: .02em; line-height: 1.45;
  box-shadow: 0 12px 30px rgba(36, 34, 31, .25);
  transition: opacity .25s, transform .25s;
}
.toast[hidden] { display: block !important; opacity: 0; transform: translateY(8px); pointer-events: none; }

/* ---------- админка ---------- */
.adm-top { border-bottom: 1px solid var(--line); background: var(--surface); }
.adm-top .wrap { min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-block: 8px; }
.adm-brand { display: flex; align-items: baseline; gap: 14px; }
.adm-brand .w { font-size: 18px; font-weight: 200; letter-spacing: .44em; }
.adm { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 32px; padding-block: 24px 64px; align-items: start; }
.adm-nav { position: sticky; top: 16px; display: grid; gap: 2px; }
.adm-nav button { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; background: none; border: 0; border-left: 2px solid transparent; text-align: left; font-size: 14px; color: var(--ink); letter-spacing: .03em; }
.adm-nav button.on { border-left-color: var(--accent); background: var(--surface); }
.adm-main { display: grid; gap: 18px; min-width: 0; }
.adm-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.adm-h h2 { margin: 0; font-size: 22px; font-weight: 300; letter-spacing: .1em; }
.panel { background: var(--surface); border: 1px solid var(--line); padding: clamp(16px, 2.4vw, 24px); display: grid; gap: 16px; min-width: 0; }
.panel h3 { margin: 0; font-size: 15px; font-weight: 400; letter-spacing: .08em; }
.panel-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.flag {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 16px; border: 1px solid var(--line); background: var(--bg);
}
.flag.on { border-color: var(--accent); }
.flag-t { display: grid; gap: 2px; }
.flag-t b { font-weight: 400; }
.sw { position: relative; flex: 0 0 46px; width: 46px; height: 26px; }
.sw input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.sw span { position: absolute; inset: 0; border-radius: 13px; background: var(--line); transition: background .2s; }
.sw span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .2s; }
.sw input:checked + span { background: var(--accent); }
.sw input:checked + span::after { transform: translateX(20px); }
.sw input:focus-visible + span { outline: 1.5px solid var(--accent); outline-offset: 2px; }
.line-sw { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; font-size: 14px; }
.list { display: grid; }
.li { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding-block: 12px; border-bottom: 1px solid var(--line); }
.li:last-child { border-bottom: 0; }
.li img { width: 56px; aspect-ratio: 4 / 5; max-width: 100%; object-fit: cover; display: block; background: var(--line); }
.li-main { display: grid; gap: 2px; min-width: 0; }
.li-main b { font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li-act { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.mini-btn { min-width: 32px; height: 32px; padding: 0 10px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); font-size: 13px; color: var(--ink); }
.mini-btn:hover { border-color: var(--ink); }
.mini-btn.danger { color: var(--danger); }
.mini-btn.danger.armed { background: var(--danger); color: var(--surface); border-color: var(--danger); }
.pill { display: inline-flex; align-items: center; min-height: 22px; padding: 0 9px; border-radius: 11px; font-size: 11.5px; letter-spacing: .06em; border: 1px solid var(--line); white-space: nowrap; }
.pill.s-new { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.pill.s-conf { border-color: var(--ink); }
.pill.s-paid { border-color: var(--ok); color: var(--ok); }
.pill.s-sent { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.pill.s-done { background: var(--ok); border-color: var(--ok); color: var(--surface); }
.pill.s-cancel { border-color: var(--danger); color: var(--danger); }
.pill.hid { border-style: dashed; color: var(--muted); }
.ord { border: 1px solid var(--line); background: var(--surface); }
.order-h { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 14px 16px; cursor: pointer; background: none; border: 0; width: 100%; text-align: left; color: var(--ink); }
.order-b { border-top: 1px solid var(--line); padding: 16px; display: grid; gap: 14px; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.seg { justify-self: start; display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); flex-wrap: wrap; }
.seg button { min-height: 36px; padding: 0 14px; border: 0; background: none; font-size: 13px; color: var(--ink); }
.seg button.on { background: var(--ink); color: var(--on-ink); }
.ph-edit { display: flex; gap: 10px; flex-wrap: wrap; }
.ph-cell { position: relative; width: 96px; }
.ph-cell img { width: 96px; aspect-ratio: 4 / 5; max-width: 100%; object-fit: cover; display: block; }
.ph-cell .ph-ctl { display: flex; justify-content: space-between; margin-top: 4px; }
.ph-cell .ph-ctl button { width: 30px; height: 26px; border: 1px solid var(--line); background: var(--surface); font-size: 12px; }
.ph-add { width: 96px; aspect-ratio: 4 / 5; max-width: 100%; border: 1px dashed var(--muted); display: grid; place-items: center; color: var(--muted); font-size: 12px; text-align: center; cursor: pointer; position: relative; }
.ph-add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.color-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 10px; }
.color-in { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); padding: 8px 10px; background: var(--surface); }
.color-in input[type=color] { width: 34px; height: 34px; border: 0; padding: 0; background: none; cursor: pointer; }
.color-in span { display: grid; font-size: 13px; }
.color-in small { color: var(--muted); font-variant-numeric: tabular-nums; }
.tg-feed { display: grid; gap: 10px; max-height: 520px; overflow: auto; padding: 14px; background: var(--bg); border: 1px solid var(--line); }
.tgm { max-width: 520px; background: var(--surface); border: 1px solid var(--line); padding: 10px 12px; display: grid; gap: 6px; font-size: 13.5px; line-height: 1.5; white-space: pre-line; }
.tgm .who { font-size: 11px; letter-spacing: .1em; color: var(--accent); }
.tgm .t { font-size: 11px; color: var(--muted); justify-self: end; }
.tgk { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 4px; white-space: normal; }
.tgk button { min-height: 32px; border: 1px solid var(--line); background: var(--bg); font-size: 12.5px; color: var(--ink); }
.tgk button:hover { border-color: var(--accent); }
.tg-img { width: 100%; max-width: 240px; aspect-ratio: 4 / 5; object-fit: cover; display: block; }
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.tbl th { text-align: left; font-weight: 400; color: var(--muted); font-size: 12px; letter-spacing: .06em; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 6px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl td input, .tbl td select { min-height: 36px; padding: 0 8px; }
.login { max-width: 380px; margin: clamp(40px, 10vh, 100px) auto; display: grid; gap: 16px; }
.hint { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.warnbox { border: 1px solid var(--accent); background: var(--bg); padding: 12px 14px; font-size: 13px; line-height: 1.55; }

/* ---------- телефон ---------- */
@media (max-width: 759px) {
  .topnav { display: none; }
  .tabbar { display: grid; }
  body { --foot-pad: calc(var(--tabbar) + env(safe-area-inset-bottom, 0px)); }
  body.has-tabbar { padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom, 0px)); }
  .toast { bottom: calc(var(--tabbar) + 14px + env(safe-area-inset-bottom, 0px)); }
  .head .wrap { height: 56px; justify-content: center; }
  .home-page .head { display: none; }
  .head { position: relative; }
  .revs { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 82%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .rev { scroll-snap-align: start; }
  .foot-grid { grid-template-columns: 1fr; }
  .two, .cert-wrap { grid-template-columns: minmax(0, 1fr); }
  .summary { position: static; }
  .crow { grid-template-columns: 72px minmax(0, 1fr); }
  .crow img { width: 72px; }
  .crow-side { grid-column: 2; justify-items: start; grid-auto-flow: column; justify-content: space-between; align-items: center; }
  .crow2 { grid-template-columns: minmax(0, 1fr) auto; }
  .crow2 .k { grid-column: 1 / -1; }
  .ov { padding: 0; align-items: stretch; }
  .cardp { width: 100%; max-height: none; height: 100%; grid-template-columns: minmax(0, 1fr); align-content: start; }
  .cp-info { padding-bottom: 8px; }
  .cardp { padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }
  .cp-media { position: relative; }
  .cp-actions { position: fixed; left: 0; right: 0; bottom: 0; z-index: 55; background: var(--surface); border-top: 1px solid var(--line); padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
  .cp-actions .close-line { display: none; }
  .x-close { top: calc(10px + env(safe-area-inset-top, 0px)); right: calc(10px + env(safe-area-inset-right, 0px)); }
  .opt-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mini { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dd { left: 0 !important; right: 0; bottom: 0; top: auto !important; width: auto; max-height: 78vh; border: 0; border-top: 1px solid var(--line); box-shadow: 0 -12px 30px rgba(36, 34, 31, .16); padding: 20px max(16px, env(safe-area-inset-right, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); border-radius: 14px 14px 0 0; }
  .dd-bg { background: var(--shade); }
  .adm { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-top: 12px; }
  .adm-nav { position: static; display: flex; overflow-x: auto; gap: 4px; padding-bottom: 4px; scrollbar-width: none; }
  .adm-nav::-webkit-scrollbar { display: none; }
  .adm-nav button { flex: 0 0 auto; border-left: 0; border-bottom: 2px solid transparent; }
  .adm-nav button.on { border-bottom-color: var(--accent); }
  .order-h { grid-template-columns: auto minmax(0, 1fr) auto; }
  .order-h .o-sum { display: none; }
  .li { grid-template-columns: 48px minmax(0, 1fr); }
  .li img { width: 48px; }
  .li-act { grid-column: 1 / -1; justify-content: flex-start; }
}

/* ================= v4: блоки, редактор, админка ================= */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-block: 14px 0; font-size: 12.5px; color: var(--muted); }
.crumbs button { background: none; border: 0; padding: 0; color: var(--muted); font-size: inherit; }
.crumbs button:hover { color: var(--accent); }
.crumbs [aria-current] { color: var(--ink); }

/* герой */
.hero.hs-m .wordmark { font-size: clamp(34px, 6.4vw, 72px); }
.hero.hs-s .wordmark { font-size: clamp(28px, 4.2vw, 48px); }
.hero.hs-s, .hero.hs-m { padding-block: clamp(40px, 8vh, 96px) clamp(32px, 6vh, 72px); }
.hero.ha-left { text-align: left; }
.hero.ha-left .wordmark, .hero.ha-left .slogan { margin-right: 0; }
.hero.ha-left .hero-cue button { align-items: flex-start; }
.hero.hb-surface { background: var(--surface); }
.hero.hb-ink { background: var(--ink); color: var(--on-ink); }
.hero.hb-ink .slogan, .hero.hb-ink .hero-cue button { color: var(--line); }
.hero.hb-ink .hero-cue span { background: var(--line); }
.hero.hb-image { background: linear-gradient(rgba(20, 18, 16, .42), rgba(20, 18, 16, .42)), var(--hero-img) center / cover no-repeat; color: #fff; }
.hero.hb-image .slogan, .hero.hb-image .hero-cue button { color: rgba(255, 255, 255, .86); }
.hero.hb-image .hero-cue span { background: rgba(255, 255, 255, .86); }
.hero h1.wordmark, .hero h2.wordmark { font-weight: 200; }

/* блоки */
.sec-head .h-sec, .sec-head h1.h-sec, .sec-head h2.h-sec { margin: 0; }
.prow { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 24%); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: thin; }
.prow .tile { scroll-snap-align: start; }
.tblock { display: grid; gap: 16px; max-width: 70ch; }
.tblock.ta-center { margin-inline: auto; text-align: center; }
.tblock h1.h-sec, .tblock h2.h-sec, .tblock h1.h-page, .tblock h2.h-page { margin: 0; }
.tblock.ts-lead .rich { font-size: clamp(16px, 1.6vw, 19px); font-weight: 300; line-height: 1.6; }
.rich { display: grid; gap: 12px; font-size: 15px; line-height: 1.7; }
.rich ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.rich b { font-weight: 500; }
.itext { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 56px); align-items: center; }
.itext.is-right .itext-ph, .itext.is-right > :first-child { order: 2; }
.itext-ph { aspect-ratio: 4 / 5; }
.itext-ph img, .bimg img, .gal img { width: 100%; height: 100%; object-fit: cover; display: block; }
.itext-body { display: grid; gap: 16px; justify-items: start; }
.itext-body .h-sec { margin: 0; }
.gal { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 760px) { .gal { grid-template-columns: repeat(var(--gc, 3), minmax(0, 1fr)); } }
.gal figure { margin: 0; display: grid; gap: 6px; }
.gal .ph { aspect-ratio: 4 / 5; }
.gal figcaption { font-size: 12.5px; color: var(--muted); }
.feats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 24px; }
.feat { display: grid; gap: 8px; align-content: start; padding-top: 16px; border-top: 1px solid var(--ink); }
.feat b { font-weight: 400; font-size: 16px; letter-spacing: .04em; }
.feat p { color: var(--muted); font-size: 14px; }
.cta { display: grid; gap: 14px; justify-items: start; padding: clamp(24px, 4vw, 48px); }
.cta .h-sec { margin: 0; font-size: 18px; }
.cta.cs-ink { background: var(--ink); color: var(--on-ink); }
.cta.cs-accent { background: var(--accent); color: var(--on-accent); }
.cta.cs-outline { border: 1px solid var(--ink); }
.cta.cs-ink p, .cta.cs-accent p { opacity: .82; }
.btn.ghost.inv { border-color: currentColor; color: inherit; }
.btn.ghost.inv:hover { background: var(--surface); color: var(--ink); border-color: var(--surface); }

/* ---------- праздничная подборка ---------- */
.fest {
  --fest-fg: var(--on-ink);
  --fest-mute: rgba(245, 240, 230, .74);
  --fest-kick: #E8836B;
  --fest-thread: rgba(245, 240, 230, .32);
  --fest-silver: #D3D6DA;
  --fest-flake: rgba(255, 255, 255, .8);
  position: relative; isolation: isolate; overflow: hidden;
  background: radial-gradient(ellipse 75% 70% at 50% 0%, #3B3E43 0%, rgba(59, 62, 67, 0) 72%), var(--ink);
  color: var(--fest-fg);
  padding-bottom: clamp(44px, 6vw, 76px);
  margin-bottom: clamp(36px, 6vw, 72px);
}
.fest.ft-snow {
  --fest-fg: var(--ink);
  --fest-mute: var(--muted);
  --fest-kick: #B0412A;
  --fest-thread: rgba(44, 46, 49, .3);
  --fest-silver: #8E939A;
  --fest-flake: rgba(139, 106, 86, .45);
  background: linear-gradient(180deg, var(--surface) 0%, #EEE6D8 100%);
  border-block: 1px solid var(--line);
}
.fest-garland { display: block; width: 100%; height: clamp(80px, 8vw, 112px); }
.fest-thread { fill: none; stroke: var(--fest-thread); stroke-width: 1; }
.fest-wire { stroke: var(--fest-silver); stroke-width: 1.2; }
.fest-pin { stroke: var(--fest-silver); }
.ft-snow .fest-garland circle, .ft-snow .fest-garland ellipse { stroke: rgba(44, 46, 49, .16); stroke-width: .7; }
.fest-snow { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.fest-snow::before, .fest-snow::after {
  content: ""; position: absolute; left: 0; right: 0; top: -720px; bottom: 0;
  animation: fest-fall 72s linear infinite;
}
.fest-snow::before {
  background-image:
    radial-gradient(circle at 12% 18%, var(--fest-flake) 0 1px, transparent 1.7px),
    radial-gradient(circle at 63% 41%, var(--fest-flake) 0 1.1px, transparent 1.8px),
    radial-gradient(circle at 37% 77%, var(--fest-flake) 0 .9px, transparent 1.6px),
    radial-gradient(circle at 86% 88%, var(--fest-flake) 0 1px, transparent 1.7px);
  background-size: 180px 180px, 240px 240px, 144px 144px, 360px 360px;
  opacity: .5;
}
.fest-snow::after {
  background-image:
    radial-gradient(circle at 24% 30%, var(--fest-flake) 0 1.7px, transparent 2.6px),
    radial-gradient(circle at 74% 66%, var(--fest-flake) 0 1.4px, transparent 2.2px);
  background-size: 360px 360px, 240px 240px;
  opacity: .75;
  animation-duration: 44s;
}
@keyframes fest-fall { to { transform: translateY(720px); } }
@media (prefers-reduced-motion: reduce) { .fest-snow::before, .fest-snow::after { animation: none; } }
.fest-in { display: grid; gap: clamp(28px, 4vw, 48px); padding-top: clamp(6px, 1.6vw, 18px); }
.fest-head { display: grid; justify-items: center; gap: 14px; max-width: 660px; margin-inline: auto; text-align: center; }
.fest-kicker { margin: 0; display: inline-flex; align-items: center; gap: 12px; font-size: 12px; letter-spacing: .3em; color: var(--fest-kick); }
.fest-kicker span { margin-right: -.3em; }
.fest-kicker svg { width: 13px; height: 13px; flex: none; }
.fest-title { margin: 0 -.26em 0 0; font-size: clamp(26px, 4.6vw, 50px); font-weight: 200; letter-spacing: .26em; line-height: 1.2; }
.fest-text { color: var(--fest-mute); }
.fest-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(22px, 3vw, 40px) clamp(10px, 1.8vw, 24px);
}
@media (min-width: 760px) { .fest-grid { grid-template-columns: repeat(var(--fc, 4), minmax(0, 1fr)); } }
.fest .old { color: var(--fest-mute); }
.fest :focus-visible { outline-color: currentColor; }
.fest-foot { display: flex; justify-content: center; }
.eb-body .fest { margin-bottom: 0; }
.faq { display: grid; max-width: 760px; }
.faq .h-sec { margin: 0 0 12px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 16px 30px 16px 0; font-size: 15.5px; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 13px; font-size: 20px; color: var(--muted); font-weight: 200; }
.faq details[open] summary::after { content: "−"; }
.faq details .rich { padding-bottom: 16px; color: var(--muted); }
.spacer { padding-block: 8px; }
.spacer.sp-m { padding-block: 24px; }
.spacer.sp-l { padding-block: 48px; }
.spacer hr { border: 0; border-top: 1px solid var(--line); margin: 0; }
.cat-text { max-width: 70ch; padding-block: 40px 16px; color: var(--muted); }
.sec-head h1.h-sec { font-size: 15px; }

/* плавающая кнопка «Редактировать» */
.fab-edit { position: fixed; z-index: 45; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); min-height: 42px; padding: 0 18px; border: 0; border-radius: 21px; background: var(--ink); color: var(--on-ink); font-size: 13px; letter-spacing: .06em; box-shadow: 0 10px 26px rgba(36, 34, 31, .25); }
.fab-edit:hover { background: var(--accent); }

/* ---------- визуальный редактор ---------- */
body.editing { padding-top: 56px; }
#editbar[hidden] { display: none; }
.editbar { position: fixed; top: 0; left: 0; right: 0; z-index: 70; min-height: 56px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px)); padding-top: calc(8px + env(safe-area-inset-top, 0px)); background: var(--ink); color: var(--on-ink); }
.editbar .eb-title { font-size: 12px; letter-spacing: .2em; opacity: .7; }
.editbar select { width: auto; min-height: 36px; background: transparent; color: var(--on-ink); border-color: rgba(255, 255, 255, .25); }
.editbar select option { color: #222; }
.editbar .btn.ghost { color: var(--on-ink); border-color: rgba(255, 255, 255, .35); }
.editbar .btn.ghost:hover { border-color: var(--on-ink); color: var(--on-ink); }
.editbar .btn:not(.ghost) { background: var(--on-ink); color: var(--ink); border-color: var(--on-ink); }
.editbar .eb-saved { font-size: 12px; opacity: .6; margin-left: auto; }
.eb { position: relative; outline: 1px dashed transparent; outline-offset: -1px; transition: outline-color .15s; }
.eb:hover { outline-color: var(--muted); }
.eb.sel { outline: 2px solid var(--accent); outline-offset: -2px; }
.eb.hid > .eb-body { opacity: .35; }
.eb-body { cursor: pointer; min-height: 24px; }
.eb-bar { position: absolute; top: 6px; left: max(8px, env(safe-area-inset-left, 0px)); z-index: 5; display: none; flex-wrap: wrap; gap: 2px; align-items: center; padding: 3px; background: var(--ink); color: var(--on-ink); box-shadow: 0 6px 18px rgba(0, 0, 0, .2); }
.eb:hover .eb-bar, .eb.sel .eb-bar { display: flex; }
@media (hover: none) { .eb.sel .eb-bar { display: flex; } .eb:not(.sel) .eb-bar { display: none; } }
.eb-bar .eb-name { font-size: 11.5px; letter-spacing: .1em; padding: 0 8px; opacity: .8; }
.eb-bar button { min-height: 30px; padding: 0 9px; border: 0; background: transparent; color: var(--on-ink); font-size: 12.5px; }
.eb-bar button:hover { background: rgba(255, 255, 255, .14); }
.eb-bar button.danger { color: #f0b3a8; }
.eb-add-row { display: flex; justify-content: center; height: 0; position: relative; z-index: 4; }
.eb-add-row.top { height: auto; padding-block: 8px; }
.eb-add { transform: translateY(-50%); min-height: 28px; padding: 0 12px; border: 1px solid var(--accent); border-radius: 14px; background: var(--surface); color: var(--accent); font-size: 12px; letter-spacing: .06em; opacity: 0; transition: opacity .15s; }
.eb-add-row.top .eb-add { transform: none; opacity: 1; }
.eb:hover .eb-add, .eb.sel .eb-add, .eb-add:focus-visible { opacity: 1; }
@media (hover: none) { .eb-add { opacity: 1; } }

/* панель настроек */
.drawer { position: fixed; z-index: 80; top: 0; right: 0; bottom: 0; width: min(400px, 100%); background: var(--surface); border-left: 1px solid var(--line); box-shadow: -16px 0 40px rgba(36, 34, 31, .12); display: grid; grid-template-rows: auto minmax(0, 1fr); padding-top: env(safe-area-inset-top, 0px); }
.drawer[hidden] { display: none; }
.dr-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 12px 20px; border-bottom: 1px solid var(--line); }
.dr-body { overflow: auto; padding: 18px 20px 28px; display: grid; gap: 16px; align-content: start; overscroll-behavior: contain; }
.dr-foot { display: flex; gap: 12px; align-items: center; padding-top: 6px; }
body.editing.drawer-open #view, body.editing.drawer-open #foot { margin-right: 400px; }
.bpick { display: grid; gap: 8px; }
.bpick-i { display: grid; gap: 3px; text-align: left; padding: 12px 14px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: var(--r); }
.bpick-i:hover { border-color: var(--accent); }
.bpick-i b { font-weight: 400; font-size: 14.5px; }
.bpick-i small { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.img-field { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; }
.img-prev { width: 96px; aspect-ratio: 4 / 5; max-width: 100%; background: var(--line); display: grid; place-items: center; overflow: hidden; }
.img-prev img { width: 100%; height: 100%; object-fit: cover; }
.pick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.pick-ph { padding: 0; border: 2px solid transparent; background: none; aspect-ratio: 4 / 5; max-width: 100%; }
.pick-ph:hover { border-color: var(--accent); }
.pick-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pick-list { display: grid; gap: 6px; }
.pick-i { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; font-size: 13px; }
.pick-i img { width: 36px; aspect-ratio: 4 / 5; object-fit: cover; }
.items { display: grid; gap: 10px; }
.item-box { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); background: var(--bg); }

/* ---------- админка: оболочка ---------- */
.adm-top .wrap { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; }
.adm-burger { display: none; align-items: center; gap: 8px; background: none; border: 1px solid var(--line); border-radius: var(--r); min-height: 38px; padding: 0 12px; color: var(--ink); font-size: 14px; }
.adm-burger svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.3; }
.adm-search { position: relative; max-width: 460px; width: 100%; justify-self: center; }
.adm-search input { min-height: 38px; }
.adm-results { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 14px 30px rgba(36, 34, 31, .12); display: grid; max-height: 60vh; overflow: auto; }
.adm-results button { display: grid; gap: 1px; text-align: left; padding: 9px 12px; background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 14px; }
.adm-results button:hover { background: var(--bg); }
.adm-actions { display: flex; gap: 10px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.adm-g { font-size: 11px; letter-spacing: .18em; color: var(--muted); padding: 14px 12px 4px; }
.adm-nav .danger-t { color: var(--danger); font-size: 13px; }
.adm-nav .cnt { margin-left: auto; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 10px; }
.kpi { display: grid; gap: 4px; align-content: start; padding: 16px; background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.kpi-l { font-size: 12px; color: var(--muted); letter-spacing: .06em; }
.kpi-v { font-size: 22px; font-weight: 400; letter-spacing: .01em; overflow-wrap: anywhere; }
.delta { font-size: 12.5px; }
.delta.good { color: var(--ok); }
.delta.bad { color: var(--danger); }
.todo { display: grid; gap: 6px; }
.todo-i, .quick-i { display: grid; gap: 2px; text-align: left; padding: 12px 14px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: var(--r); font-size: 14.5px; cursor: pointer; position: relative; }
.todo-i:hover, .quick-i:hover { border-color: var(--accent); }
.todo-i b { font-weight: 400; }
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 8px; }
.quick-i input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 18px; }
.ed2 { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 1100px) { .ed2 { grid-template-columns: minmax(0, 1fr); } }

/* загрузка */
.drop { position: relative; display: grid; gap: 8px; justify-items: center; text-align: center; padding: 26px 18px; border: 1.5px dashed var(--muted); background: var(--surface); cursor: pointer; border-radius: var(--r); }
.drop:hover { border-color: var(--accent); }
.drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop b { font-weight: 400; font-size: 15.5px; }
.drop-mode { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.drop-ov { position: fixed; inset: 0; z-index: 95; display: none; place-items: center; background: rgba(139, 106, 86, .18); border: 3px dashed var(--accent); pointer-events: none; }
.drop-ov span { background: var(--ink); color: var(--on-ink); padding: 14px 20px; font-size: 15px; }
body.drop-on .drop-ov { display: grid; }

/* таблица товаров */
.ctable .tbl td { padding: 4px 6px; }
.ctable .tbl tr.is-draft td { background: color-mix(in srgb, var(--bg) 60%, var(--line)); }
.ctable td > input[type=checkbox], .ctable th > input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--ink); }
.ctable select { min-width: 120px; }
.thumb { padding: 0; border: 0; background: var(--line); width: 40px; aspect-ratio: 4 / 5; display: block; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dot-s { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); vertical-align: middle; }
.dot-s.mid { background: color-mix(in srgb, var(--ok) 45%, var(--accent)); }
.dot-s.warn { background: var(--accent); }
.dot-s.bad { background: var(--danger); }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.pcard { position: relative; display: grid; gap: 6px; background: var(--surface); border: 1px solid var(--line); padding: 6px; min-width: 0; }
.pcard.selected { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.pcard.is-draft { border-style: dashed; }
.pcard-ph { aspect-ratio: 4 / 5; background: var(--line); cursor: grab; touch-action: none; position: relative; }
.pcard-ph img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.pcard-handle { position: absolute; right: 6px; bottom: 6px; background: var(--photo-chip); padding: 0 6px; font-size: 13px; letter-spacing: -2px; }
.pcard-ck { position: absolute; top: 10px; left: 10px; background: var(--photo-chip); padding: 4px; line-height: 0; }
.pcard-ck input { width: 18px; height: 18px; accent-color: var(--ink); margin: 0; }
.pcard-b { display: grid; gap: 1px; text-align: left; background: none; border: 0; padding: 2px 2px 0; color: var(--ink); }
.pcard-b b { font-weight: 400; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard-b span { font-size: 12px; color: var(--muted); }
.pcard-st { position: absolute; top: 10px; right: 10px; display: flex; gap: 4px; align-items: center; }
.dragging { opacity: .55; outline: 2px solid var(--accent); }
.sorting, .sorting * { cursor: grabbing !important; user-select: none; }
.drag { touch-action: none; cursor: grab; }
.bulk { position: sticky; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 20; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 10px 12px; background: var(--ink); color: var(--on-ink); box-shadow: 0 12px 30px rgba(36, 34, 31, .3); }
.bulk select, .bulk input[type=number] { width: auto; min-height: 32px; padding: 0 8px; background: var(--surface); }
.bulk .mini-btn { background: transparent; color: var(--on-ink); border-color: rgba(255, 255, 255, .3); }
.bulk .mini-btn.danger { color: #f0b3a8; }
.bulk .bprice { display: inline-flex; gap: 6px; align-items: center; }
.bulk .consent { color: var(--on-ink); font-size: 12.5px; }
.progress { height: 3px; background: var(--line); }
.progress div { height: 100%; background: var(--accent); transition: width .25s; }
.wiz { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 18px; align-items: start; }
.wiz-media { display: grid; gap: 12px; min-width: 0; }
.wiz-foot { position: sticky; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 20; display: flex; gap: 8px; align-items: center; padding: 10px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 10px 26px rgba(36, 34, 31, .12); }
.ph-cell img.drag { cursor: grab; }
.ph-cover { position: absolute; top: 4px; left: 4px; font-size: 10px; letter-spacing: .08em; background: var(--accent); color: var(--on-accent); padding: 2px 6px; }

/* сниппет поиска */
.snip { display: grid; gap: 3px; padding: 14px 16px; background: #fff; border: 1px solid var(--line); font-family: Arial, 'Helvetica Neue', sans-serif; max-width: 620px; }
.snip-url { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #3c763d; color: #006621; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.snip-fav { flex: 0 0 18px; width: 18px; height: 18px; border-radius: 50%; background: #2C2E31; color: #F5F0E6; display: grid; place-items: center; font-size: 11px; }
.snip-t { font-size: 18px; line-height: 1.3; color: #1a0dab; }
.snip-d { font-size: 13.5px; line-height: 1.45; color: #333; }
.cnt-len { font-size: 11.5px; font-variant-numeric: tabular-nums; padding: 1px 6px; border-radius: 9px; background: var(--bg); color: var(--ok); white-space: nowrap; }
.cnt-len.warn { color: var(--accent); }
.cnt-len.bad { color: var(--danger); }
.vars { display: flex; flex-wrap: wrap; gap: 4px; }
.vars code { font-size: 12px; padding: 2px 6px; background: var(--bg); border: 1px solid var(--line); }

/* страницы */
.blist { display: grid; gap: 6px; }
.bl-i { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; background: var(--bg); border: 1px solid var(--line); }
.bl-i.hid .bl-t { opacity: .45; }
.bl-h { font-size: 15px; letter-spacing: -2px; color: var(--muted); padding: 4px 6px; }
.bl-t { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 8px; }
details.rt { border-top: 1px solid var(--line); padding-block: 12px; }
details.rt summary { cursor: pointer; }

/* SEO */
.seo-top { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 18px; }
.score-c { justify-items: center; text-align: center; align-content: center; }
.score { width: 132px; height: 132px; border-radius: 50%; border: 6px solid var(--ok); display: grid; place-items: center; align-content: center; }
.score.warn { border-color: var(--accent); }
.score.bad { border-color: var(--danger); }
.score span { font-size: 40px; font-weight: 200; line-height: 1; }
.score small { font-size: 12px; color: var(--muted); }
.cf { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 6px 18px; font-size: 14px; }
.cf li { display: flex; gap: 8px; align-items: baseline; }
.cf-i { width: 16px; flex: 0 0 16px; color: var(--ok); }
.cf .no .cf-i { color: var(--danger); }
.iss-g { display: grid; gap: 4px; padding-top: 10px; }
.iss { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.iss-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.iss.bad .iss-dot { background: var(--danger); }
.iss.warn .iss-dot { background: var(--accent); }
.pre-wrap { position: relative; }
.pre { margin: 0; max-height: 360px; overflow: auto; padding: 14px; background: var(--ink); color: var(--on-ink); font: 12px/1.55 ui-monospace, 'SF Mono', Menlo, Consolas, monospace; white-space: pre; }
.pre-copy { position: absolute; top: 8px; right: 8px; }

/* маркетинг */
.chart { position: relative; width: 100%; }
.chart .tip { position: absolute; pointer-events: none; display: grid; gap: 2px; min-width: 140px; padding: 8px 10px; background: var(--ink); color: var(--on-ink); font-size: 12.5px; box-shadow: 0 8px 20px rgba(36, 34, 31, .2); }
.chart .tip b { font-weight: 400; opacity: .75; }
.funnel { display: grid; gap: 8px; }
.fn-row { display: grid; grid-template-columns: minmax(110px, 160px) minmax(0, 1fr) 60px 44px; gap: 10px; align-items: center; font-size: 13.5px; }
.fn-track { height: 18px; background: var(--bg); }
.fn-bar { height: 100%; background: var(--accent); border-radius: 0 4px 4px 0; }
.fn-v { text-align: right; }
.fn-c { text-align: right; color: var(--muted); font-size: 12.5px; }
.ibar { position: relative; display: flex; align-items: center; gap: 8px; min-height: 22px; }
.ibar div { height: 14px; max-width: 70%; background: var(--accent); border-radius: 0 4px 4px 0; min-width: 2px; }
.ibar span { font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.qr-row { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 18px; align-items: start; }
.qr-box { width: 200px; height: 200px; max-width: 100%; display: grid; place-items: center; background: #fff; border: 1px solid var(--line); text-align: center; padding: 10px; }
.qr-box img { image-rendering: pixelated; width: 180px; height: 180px; }
code.url { display: block; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line); font-size: 12.5px; overflow-wrap: anywhere; user-select: all; }
.plan { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 18px; }
.plan-c { align-content: start; }
.checks { display: grid; gap: 0; }
.checks .ck { min-height: 36px; font-size: 14px; align-items: flex-start; padding-block: 6px; }
.checks .ck input { margin-top: 1px; }

.toast { display: flex; align-items: center; gap: 14px; }
.toast-btn { background: none; border: 0; padding: 0; color: var(--on-ink); text-decoration: underline; text-underline-offset: 3px; font-size: 13.5px; white-space: nowrap; }
.consent input[type=checkbox] { flex: 0 0 auto; }

@media (max-width: 759px) {
  .itext { grid-template-columns: minmax(0, 1fr); }
  .itext.is-right .itext-ph, .itext.is-right > :first-child { order: 0; }
  .prow { grid-auto-columns: 44%; }
  body.editing.drawer-open #view, body.editing.drawer-open #foot { margin-right: 0; }
  body.editing { padding-top: 0; }
  .editbar { top: auto; bottom: 0; padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); padding-top: 8px; }
  .editbar .eb-title, .editbar .eb-saved { display: none; }
  .editbar select { flex: 1 1 140px; }
  body.editing .tabbar { display: none; }
  body.editing.has-tabbar { padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }
  .drawer { top: auto; left: 0; width: 100%; max-height: 62vh; border-left: 0; border-top: 1px solid var(--line); box-shadow: 0 -16px 40px rgba(36, 34, 31, .18); border-radius: 14px 14px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
  body.editing.drawer-open #view { padding-bottom: 62vh; }
  .eb-bar { left: 4px; right: 4px; top: 4px; }
  .adm-top .wrap { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
  .adm-search { grid-column: 1 / -1; grid-row: 2; max-width: none; }
  .adm-burger { display: inline-flex; }
  .adm-brand .w, .adm-sub { display: none; }
  .adm-actions [data-saved] { display: none; }
  .adm-nav { display: none !important; }
  .adm-nav.open { display: grid !important; overflow: visible; padding: 8px; background: var(--surface); border: 1px solid var(--line); }
  .adm-nav.open button { border-bottom: 0; border-left: 2px solid transparent; }
  .adm-nav.open button.on { border-left-color: var(--accent); }
  .seo-top { grid-template-columns: minmax(0, 1fr); }
  .wiz { grid-template-columns: minmax(0, 1fr); }
  .qr-row { grid-template-columns: minmax(0, 1fr); }
  .fn-row { grid-template-columns: minmax(0, 1fr) 54px 40px; }
  .fn-row .fn-track { grid-column: 1 / -1; grid-row: 2; }
  .fab-edit { bottom: calc(var(--tabbar) + 14px + env(safe-area-inset-bottom, 0px)); }
}
.adm-main > * { min-width: 0; }
@media (min-width: 760px) { body.editing .drawer { top: 56px; } }

.sw { display: inline-block; vertical-align: middle; }
::placeholder { color: var(--muted); opacity: .75; }
details.iss-grp > summary { list-style: none; cursor: pointer; }
details.iss-grp > summary::-webkit-details-marker { display: none; }
@media (max-width: 759px) { body.editing .toast { bottom: calc(130px + env(safe-area-inset-bottom, 0px)); } }
.table-wrap { position: relative; }
.dot-s { position: relative; }
.panel > *, .form > *, .box > * { min-width: 0; }
.hero { overflow: hidden; }


/* аналитика: пути, посетители, соцсети */
.kpi-btn { text-align: left; font: inherit; color: inherit; cursor: pointer; }
.kpi-btn:hover { border-color: var(--ink); }
.path { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 4px; }
.pchip { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; font-size: 12.5px; background: var(--bg); border: 1px solid var(--line); white-space: nowrap; }
.pchip.ok { background: var(--ok); border-color: var(--ok); color: var(--surface); }
.pchip.out { border-style: dashed; color: var(--muted); background: none; }
.parr { color: var(--muted); font-size: 12px; }
.steps { list-style: none; margin: 6px 0 0; padding: 0 0 0 14px; border-left: 1px solid var(--line); display: grid; gap: 2px; }
.steps li { position: relative; display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; padding: 3px 0; }
.steps li::before { content: ''; position: absolute; left: -18px; top: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--surface); border: 1px solid var(--muted); }
.steps li > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.steps li.ok::before { background: var(--ok); border-color: var(--ok); }
.steps li.ok > span:first-child { color: var(--ok); }
.steps li.out { color: var(--muted); }
.steps li.out::before { border-style: dashed; }
.visitors { display: grid; gap: 0; border-top: 1px solid var(--line); }
.vis { border-bottom: 1px solid var(--line); }
.vis > summary, .jr > summary { list-style: none; cursor: pointer; }
.vis > summary::-webkit-details-marker, .jr > summary::-webkit-details-marker { display: none; }
.vis > summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto 14px; gap: 12px; align-items: center; min-height: 48px; padding: 8px 0; font-size: 13.5px; }
.vis > summary::after, .jr > summary::after { content: '+'; color: var(--muted); font-size: 16px; }
.vis[open] > summary::after, .jr[open] > summary::after { content: '−'; }
.vis-id { font-variant-numeric: tabular-nums; color: var(--muted); }
.vis-body { display: grid; gap: 14px; padding: 4px 0 16px; }
.jr-v { display: grid; gap: 2px; }
.jr { border: 1px solid var(--line); padding: 0 14px; background: var(--bg); }
.jr > summary { display: grid; grid-template-columns: minmax(0, 1fr) 14px; align-items: center; gap: 10px; min-height: 48px; padding: 8px 0; font-size: 13.5px; }
.jr-h { display: grid; gap: 2px; min-width: 0; }
.soc { display: grid; gap: 8px; }
.soc-r { display: grid; grid-template-columns: minmax(90px, 150px) minmax(0, 1fr) 56px 40px; gap: 10px; align-items: center; font-size: 13.5px; }
.soc-r .num { text-align: right; }
.soc-r .fn-track { height: 14px; }
.buy-r { display: grid; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.buy-r:last-child { border-bottom: 0; }
.tbl tr.lost td { color: var(--danger); }
.tbl tr.lost .ibar div { background: var(--danger); }
.tbl .delta, .tbl .delta + .hint { font-size: 11.5px; }
@media (max-width: 759px) {
  .soc-r { grid-template-columns: minmax(0, 1fr) 50px 36px; }
  .soc-r .fn-track { grid-column: 1 / -1; grid-row: 2; }
  .vis > summary { grid-template-columns: auto minmax(0, 1fr) 14px; }
  .vis > summary .pill { grid-column: 2; grid-row: 2; justify-self: start; }
  .vis > summary::after { grid-column: 3; grid-row: 1; }
}
.two-col { align-items: start; }
.kpis.k4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
@media (max-width: 759px) { .kpis.k4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tbl td[style*="text-align:right"] { white-space: nowrap; }
.pr { display: grid; grid-template-columns: minmax(0, 1fr) 80px 64px 140px; gap: 6px 14px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.pr > .num { text-align: right; }
.pr i { font-style: normal; display: none; }
.pr-h { font-size: 12px; color: var(--muted); letter-spacing: .06em; padding-top: 0; }
.pr-h span:nth-child(2), .pr-h span:nth-child(3) { text-align: right; }
@media (max-width: 759px) {
  .pr { grid-template-columns: auto auto minmax(0, 1fr); }
  .pr .path { grid-column: 1 / -1; }
  .pr > .num { text-align: left; }
  .pr i { display: inline; }
  .pr-h { display: none; }
}
.kpis.k3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
@media (max-width: 759px) { .kpis.k3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* бухгалтерия */
:root { --c-item: color-mix(in srgb, var(--ink) 52%, var(--surface)); --c-pack: color-mix(in srgb, var(--ink) 32%, var(--surface)); --c-exp: color-mix(in srgb, var(--ink) 16%, var(--surface)); --c-ship: color-mix(in srgb, var(--ink) 8%, var(--surface)); }
.acc-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.acc-tools input[type=search] { flex: 1 1 220px; max-width: 320px; min-height: 40px; }
.acc-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); }
.acc-legend span, .stack-l div { display: inline-flex; align-items: center; gap: 6px; }
.acc-legend i, .stack-l i { width: 10px; height: 10px; border-radius: 2px; flex: 0 0 10px; }
.stackbar { display: flex; height: 22px; gap: 2px; overflow: hidden; }
.stackbar span { min-width: 2px; }
.stackbar span:first-child { border-radius: 2px 0 0 2px; }
.stackbar span:last-child { border-radius: 0 2px 2px 0; }
.stackbar.sm { height: 14px; }
.stack-l { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 8px 18px; font-size: 13.5px; }
.stack-l div { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto auto; gap: 8px; }
.stack-l.sm { grid-template-columns: minmax(0, 1fr); gap: 4px; font-size: 13px; }
.stack-l b { font-weight: 400; text-align: right; }
.stack-l .hint { min-width: 34px; text-align: right; }
.abc { display: inline-grid; place-items: center; width: 22px; height: 22px; font-size: 11.5px; border: 1px solid var(--line); color: var(--muted); }
.abc-A { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.abc-B { border-color: var(--accent); color: var(--accent); }
.th-sort { background: none; border: 0; padding: 0; font: inherit; color: inherit; letter-spacing: inherit; cursor: pointer; white-space: nowrap; }
.th-sort.on { color: var(--ink); }
.thumb-s { width: 36px; height: 45px; object-fit: cover; display: block; background: var(--bg); }
.tbl tr.clk { cursor: pointer; }
.tbl tr.clk:hover td { background: var(--bg); }
.tbl tr.soon td { background: color-mix(in srgb, var(--danger) 6%, transparent); }
.tbl tr.recv td { background: var(--bg); }
.pill.mv-in { border-color: var(--ok); color: var(--ok); }
.pill.mv-out { border-color: var(--ink); }
.pill.mv-adj { border-style: dashed; color: var(--muted); }
.acc-head { grid-template-columns: 96px minmax(0, 1fr); align-items: start; gap: 18px; }
.acc-head > img { width: 96px; height: 120px; object-fit: cover; background: var(--bg); }
.inline { display: flex; gap: 8px; align-items: center; }
.inline > input { flex: 1 1 auto; min-width: 0; }
.ro { min-height: 44px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 0 12px; background: var(--bg); border: 1px solid var(--line); font-size: 14.5px; }
.acc-sec { display: grid; gap: 10px; }
.cost-lines { display: grid; gap: 8px; }
.cost-line { display: grid; grid-template-columns: minmax(0, 1fr) 120px 36px; gap: 8px; align-items: center; }
.cost-line .mini-btn { min-height: 40px; }
.acc-sub { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 14px; }
.acc-sub b { font-weight: 400; font-size: 16px; }
.acc-total { border-top: 1px solid var(--ink); font-size: 15px; }
.acc-total b { font-size: 20px; }
.acc-mk { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.acc-mk input[type=range] { width: 100%; accent-color: var(--accent); }
.acc-price { display: grid; gap: 4px; padding: 14px 16px; background: var(--bg); }
.acc-big { font-size: 34px; font-weight: 300; letter-spacing: .01em; line-height: 1.1; }
#acc-fixbar { position: sticky; bottom: 12px; z-index: 6; }
.acc-fix { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 14px 18px; background: var(--ink); color: var(--on-ink); font-size: 14px; box-shadow: 0 12px 30px rgba(36, 34, 31, .22); }
.acc-fix .hint, .acc-fix summary { color: color-mix(in srgb, var(--on-ink) 70%, transparent); }
.acc-fix .btn { background: var(--on-ink); color: var(--ink); border-color: var(--on-ink); }
.acc-fix .btn.ghost { background: none; color: var(--on-ink); border-color: color-mix(in srgb, var(--on-ink) 45%, transparent); }
.acc-fix.ok { position: static; background: none; color: var(--ok); box-shadow: none; padding: 0 2px; }
.acc-fix-b { display: flex; gap: 8px; }
.acc-prev { display: grid; gap: 4px; max-height: 220px; overflow: auto; padding-top: 8px; font-size: 13px; }
.acc-prev div { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; }
.acc-prev .hint { text-decoration: line-through; }
@media (max-width: 759px) {
  .acc-head { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .acc-head > img { width: 64px; height: 80px; }
  .cost-line { grid-template-columns: minmax(0, 1fr) 92px 36px; }
  .acc-tools input[type=search] { max-width: none; }
  #acc-fixbar { bottom: 8px; }
}
.thumb-s { max-width: none; }
.tbl .lnk { text-align: left; }
.pills { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.m-only { display: none; }
@media (max-width: 759px) { .acc-tbl .d { display: none; } .acc-tbl .m-only { display: block; } .acc-tbl td { padding-inline: 6px; } }
@media (max-width: 759px) { .acc-tbl .d-txt { display: none; } .acc-tbl .inline input[type=number] { width: 52px !important; flex-basis: 52px !important; } .acc-tbl .inline { gap: 4px; } }

/* заказ через мессенджер и публикация */
.msg-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.msg-btn { flex: 1 1 120px; text-decoration: none; text-align: center; justify-content: center; }
.msg-pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: 13.5px; line-height: 1.55; color: var(--ink); }
.pub-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; counter-reset: pub; }
.pub-steps > li { counter-increment: pub; }
.pub-steps > li > h3::before, .pub-steps > li > .panel-h > h3::before { content: counter(pub) '. '; color: var(--muted); }
.todo-i.bad { border-color: var(--danger); }
.todo-i.bad b { color: var(--danger); }
div.todo-i { cursor: default; }
details.later > summary { cursor: pointer; padding: 14px 16px; border: 1px dashed var(--line); color: var(--muted); font-size: 14px; }
details.later[open] > summary { margin-bottom: 4px; }

/* количество в наличии: − число + */
.stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); vertical-align: middle; }
.stepper button { width: 34px; min-height: 36px; border: 0; background: none; font-size: 17px; color: var(--ink); cursor: pointer; }
.stepper button:hover:not(:disabled) { background: var(--bg); }
.stepper button:disabled { color: var(--line); cursor: default; }
.stepper input { width: 46px; min-height: 36px; border: 0; border-inline: 1px solid var(--line); border-radius: 0; text-align: center; padding: 0 2px; font-variant-numeric: tabular-nums; background: none; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.field > .stepper { justify-self: start; }
.field > .stepper button { width: 44px; min-height: 44px; }
.field > .stepper input { width: 64px; min-height: 44px; font-size: 16px; }
@media (max-width: 759px) { .acc-tbl td[style*="min-width:150px"] { min-width: 0 !important; } }
@media (max-width: 759px) {
  .acc-tbl td[style*="min-width:130px"] { min-width: 0 !important; }
  .acc-tbl .stepper button { width: 30px; }
  .acc-tbl .stepper input { width: 38px; }
}

/* ---------- сохранение: ошибки и предупреждения ---------- */
.save-bad { color: var(--danger) !important; }
.storebar { position: sticky; top: 0; z-index: 90; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; padding: 10px 16px; background: var(--danger); color: var(--surface); font-size: 13px; line-height: 1.45; }
.storebar[hidden] { display: none !important; }
.storebar b { font-weight: 500; }
.storebar-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.storebar .btn { background: var(--surface); color: var(--ink); border-color: var(--surface); }
.storebar .btn.ghost { background: transparent; color: var(--surface); }
.store-warn { border-color: var(--danger); margin-bottom: 16px; }
.store-warn a { color: var(--danger); }
