/* Шаблон сайта груминг-салона. Цвета задаются только переменными из companies/<slug>.json:
   --primary, --primary-text, --accent, --bg, --surface, --text, --wa, --wa-text.
   Всё остальное (линии, приглушённый текст, подложки, тени) вычисляется из них через color-mix. */

:root {
  --line: color-mix(in srgb, var(--text) 11%, transparent);
  --line-strong: color-mix(in srgb, var(--text) 20%, transparent);
  --muted: color-mix(in srgb, var(--text) 70%, var(--bg));
  --soft: color-mix(in srgb, var(--primary) 7%, var(--surface));
  --soft-2: color-mix(in srgb, var(--primary) 13%, var(--surface));
  --accent-soft: color-mix(in srgb, var(--accent) 22%, var(--surface));
  --sunken: color-mix(in srgb, var(--text) 4%, var(--bg));
  --shadow-s: 0 1px 2px color-mix(in srgb, var(--text) 6%, transparent);
  --shadow: 0 1px 2px color-mix(in srgb, var(--text) 5%, transparent), 0 10px 30px -8px color-mix(in srgb, var(--text) 14%, transparent);
  --shadow-l: 0 24px 60px -16px color-mix(in srgb, var(--text) 28%, transparent);
  --r-s: 14px;
  --r: 20px;
  --r-l: 28px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --t: .28s;
  --gutter: 20px;
  --header-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.55 Manrope, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.lock { overflow: hidden; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
a { color: inherit; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, h4 { margin: 0; font-weight: 800; letter-spacing: -.025em; line-height: 1.08; }
p { margin: 0; }
svg { flex: none; }
.ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ico-fill { fill: currentColor; stroke: none; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 60%, transparent); outline-offset: 2px; border-radius: 10px; }

.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 22px; border-radius: 999px;
  font-weight: 700; font-size: 16px; text-decoration: none; text-align: center; line-height: 1.2;
  transition: transform .15s var(--ease), box-shadow var(--t) var(--ease), background-color var(--t);
  user-select: none;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--primary); color: var(--primary-text); box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--primary) 70%, transparent); }
.btn-wa { background: var(--wa); color: var(--wa-text); box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--wa) 70%, transparent); }
.btn-ghost { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.btn-soft { background: var(--soft-2); color: var(--text); }
.btn-lg { min-height: 60px; font-size: 17px; padding: 0 28px; }
.btn-block { width: 100%; }
.btn-sm { min-height: 48px; padding: 0 16px; font-size: 15px; }
.btn .ico { width: 22px; height: 22px; }
.link { display: inline-flex; align-items: center; gap: 6px; min-height: 48px; font-weight: 700; color: var(--primary); text-decoration: none; }
.link-muted { color: var(--muted); font-weight: 600; }

/* ---------- Шапка ---------- */
.hdr {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t), box-shadow var(--t);
}
.hdr.scrolled { border-bottom-color: var(--line); }
.hdr .wrap { display: flex; align-items: center; gap: 12px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; margin-right: auto; min-height: 48px; }
.brand img, .mono { width: 38px; height: 38px; border-radius: 12px; }
.mono { display: grid; place-items: center; background: var(--primary); color: var(--primary-text); font-weight: 800; font-size: 17px; }
.brand b { font-weight: 800; font-size: 17px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hdr-nav { display: none; gap: 4px; }
.hdr-nav a { padding: 0 12px; min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; font-weight: 600; color: var(--muted); border-radius: 999px; }
.hdr-nav a:hover { color: var(--text); background: var(--sunken); }
.hdr .btn { min-height: 44px; padding: 0 16px 0 12px; font-size: 15px; }
.hdr .btn span { display: none; }
@media (min-width: 380px) { .hdr .btn span { display: inline; } }
@media (min-width: 960px) { .hdr-nav { display: flex; } }

/* ---------- Первый экран ---------- */
.hero { padding: 8px 0 8px; }
.hero .wrap { display: grid; gap: 22px; }
.hero-media {
  position: relative; border-radius: var(--r-l); overflow: hidden; aspect-ratio: 4 / 3.3;
  background: var(--sunken); box-shadow: var(--shadow);
  margin: 0 calc(var(--gutter) * -1 + 8px);
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-badge {
  position: absolute; left: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 8px;
  background: color-mix(in srgb, var(--surface) 90%, transparent); color: var(--text);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  padding: 10px 14px; border-radius: 999px; font-weight: 700; font-size: 14px; box-shadow: var(--shadow-s);
}
.hero-badge .ico { width: 18px; height: 18px; color: var(--accent); }
.hero-text { display: grid; gap: 14px; }
.hero h1 { font-size: clamp(34px, 9.5vw, 64px); }
.hero .eyebrow { margin-bottom: -6px; }
.hero .slogan { font-size: 18px; color: var(--muted); max-width: 34ch; }
.hero-cta { display: grid; gap: 10px; margin-top: 6px; }
.cta-main { justify-content: space-between; text-align: left; padding: 10px 22px 10px 26px; min-height: 68px; }
.cta-main small { display: block; font-size: 13.5px; font-weight: 600; opacity: .8; margin-top: 2px; }
.swipe-hint { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 13.5px; margin-top: 14px; }
.swipe-hint .ico { width: 16px; height: 16px; }
.swipe-hint + .price-card { margin-top: 8px; }
@media (min-width: 720px) { .swipe-hint { display: none; } }
.hero-meta { display: grid; gap: 6px; font-size: 14.5px; color: var(--muted); margin-top: 4px; }
.hero-meta div { display: flex; gap: 8px; align-items: flex-start; }
.hero-meta .ico { width: 18px; height: 18px; margin-top: 2px; }
.open-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--wa); margin: 7px 5px 0 5px; flex: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--wa) 18%, transparent); }
.open-dot.closed { background: var(--muted); box-shadow: none; }
.repeat-btn { justify-content: flex-start; padding-left: 10px; gap: 12px; }
.repeat-btn .ava { width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); display: grid; place-items: center; }
.repeat-btn .ava .ico { width: 20px; height: 20px; }
@media (min-width: 860px) {
  .hero { padding: 32px 0 24px; }
  .hero .wrap { grid-template-columns: 1.05fr 1fr; align-items: center; gap: 56px; }
  .hero-media { order: 2; margin: 0; aspect-ratio: 4 / 4.6; }
  .hero-cta { grid-template-columns: max-content; }
}

/* ---------- Акция ---------- */
.offer { margin-top: 18px; }
.offer-card {
  display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: var(--r);
  background: var(--accent-soft); color: var(--text); font-weight: 600;
}
.offer-card .ic { width: 44px; height: 44px; border-radius: 14px; background: var(--surface); display: grid; place-items: center; flex: none; }

/* ---------- Секции ---------- */
.sec { padding: 56px 0 8px; }
.sec-head { display: grid; gap: 8px; margin-bottom: 22px; }
.eyebrow { font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.sec h2 { font-size: clamp(28px, 7vw, 44px); }
.sec-sub { color: var(--muted); font-size: 16px; max-width: 52ch; }
@media (min-width: 860px) { .sec { padding-top: 96px; } .sec-head { margin-bottom: 32px; } }

/* Калькулятор-тизер */
.calc-teaser {
  display: grid; gap: 18px; padding: 24px; border-radius: var(--r-l);
  background: var(--primary); color: var(--primary-text); position: relative; overflow: hidden;
}
.calc-teaser h2 { font-size: clamp(26px, 6.5vw, 40px); }
.calc-teaser p { opacity: .86; }
.calc-teaser .btn { background: var(--primary-text); color: var(--primary); }
.calc-teaser .chips-row { display: flex; flex-wrap: wrap; gap: 8px; }
.calc-teaser .pill { display: inline-flex; gap: 6px; align-items: center; padding: 8px 12px; border-radius: 999px; background: color-mix(in srgb, var(--primary-text) 14%, transparent); font-size: 14px; font-weight: 600; }
.calc-teaser .pill .ico { width: 16px; height: 16px; }
.teaser-art { position: absolute; right: -30px; top: -30px; width: 180px; height: 180px; opacity: .12; color: var(--primary-text); pointer-events: none; }
@media (min-width: 860px) { .calc-teaser { padding: 48px; grid-template-columns: 1fr auto; align-items: end; } .teaser-art { width: 300px; height: 300px; } }

/* ---------- До / после ---------- */
.carousel { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 4px var(--gutter) 6px; scroll-padding: 0 var(--gutter); }
.carousel::-webkit-scrollbar { display: none; }
.carousel > * { scroll-snap-align: start; flex: none; }
.ba { width: min(86vw, 420px); }
.ba-frame { position: relative; aspect-ratio: 4 / 5; border-radius: var(--r-l); overflow: hidden; background: var(--sunken); box-shadow: var(--shadow); --pos: 50%; user-select: none; -webkit-user-select: none; }
.ba-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ba-frame .ba-before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba-label { position: absolute; top: 14px; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; background: color-mix(in srgb, var(--surface) 88%, transparent); color: var(--text); }
.ba-label.l { left: 14px; } .ba-label.r { right: 14px; }
.ba-handle {
  position: absolute; top: 0; bottom: 0; left: var(--pos); width: 56px; margin-left: -28px;
  display: grid; place-items: center; touch-action: none; cursor: ew-resize; border-radius: 0;
}
.ba-handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; margin-left: -1.5px; background: var(--surface); box-shadow: 0 0 12px color-mix(in srgb, var(--text) 30%, transparent); }
.ba-knob { position: relative; width: 48px; height: 48px; border-radius: 50%; background: var(--surface); color: var(--text); display: grid; place-items: center; box-shadow: var(--shadow); }
.ba-knob .ico { width: 24px; height: 24px; }
.ba figcaption { padding: 12px 4px 0; font-weight: 600; font-size: 15px; color: var(--muted); }
.car-nav { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.car-nav button { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px var(--line-strong); background: var(--surface); }

/* ---------- Мастера ---------- */
.master { width: min(70vw, 280px); }
.master .ph { aspect-ratio: 4 / 5; border-radius: var(--r); overflow: hidden; background: var(--sunken); }
.master .ph img { width: 100%; height: 100%; object-fit: cover; }
.master h3 { font-size: 20px; margin-top: 14px; }
.master .exp { display: inline-block; margin-top: 6px; font-size: 13px; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: var(--accent-soft); }
.master p { color: var(--muted); font-size: 15px; margin-top: 8px; }

/* ---------- Прайс ---------- */
.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--sunken); box-shadow: inset 0 0 0 1px var(--line); gap: 4px; }
.seg button { min-height: 44px; padding: 0 18px; border-radius: 999px; font-weight: 700; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-s); }
.price-card { margin-top: 16px; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ptable { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 560px; }
.ptable th, .ptable td { padding: 13px 10px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.ptable th:first-child, .ptable td:first-child { text-align: left; position: sticky; left: 0; background: var(--surface); white-space: normal; min-width: 150px; padding-left: 16px; }
.ptable thead th { font-size: 13px; color: var(--muted); font-weight: 700; vertical-align: bottom; }
.ptable thead th small { display: block; font-weight: 500; }
.ptable tbody tr:last-child td { border-bottom: 0; }
.ptable td:first-child b { display: block; font-weight: 700; }
.ptable td:first-child small { color: var(--muted); }
.plist { list-style: none; margin: 0; padding: 0; }
.plist li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.plist li:last-child { border-bottom: 0; }
.plist li span:last-child { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.plist small { display: block; color: var(--muted); }
.price-sub { font-size: 18px; margin: 28px 0 0; }
.note { color: var(--muted); font-size: 14px; margin-top: 14px; display: flex; gap: 8px; }
.note .ico { width: 18px; height: 18px; margin-top: 2px; }

/* ---------- Как проходит ---------- */
.steps { display: grid; gap: 12px; counter-reset: st; }
.step-card { display: grid; grid-template-columns: 52px 1fr; gap: 14px; padding: 18px; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow-s); border: 1px solid var(--line); }
.step-card .ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--soft-2); color: var(--primary); position: relative; }
.step-card .ic::after { counter-increment: st; content: counter(st); position: absolute; right: -6px; top: -6px; width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: var(--primary-text); font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.step-card h3 { font-size: 17px; letter-spacing: -.01em; margin-bottom: 4px; }
.step-card p { color: var(--muted); font-size: 15px; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .steps { grid-template-columns: repeat(4, 1fr); } .step-card { grid-template-columns: 1fr; } }

/* ---------- Отзывы ---------- */
.rating-sum { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.rating-sum b { font-size: 40px; font-weight: 800; letter-spacing: -.03em; }
.stars { display: inline-flex; gap: 2px; color: var(--accent); }
.stars .ico { width: 18px; height: 18px; }
.stars .off { color: var(--line-strong); }
.review { width: min(84vw, 360px); padding: 20px; border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow-s); border: 1px solid var(--line); display: grid; gap: 12px; align-content: start; }
.review-top { display: flex; gap: 12px; align-items: center; }
.review-top img, .review-top .mono { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.review-top b { display: block; }
.review-top small { color: var(--muted); }
.review p { font-size: 15.5px; }
.review-top small { display: block; font-size: 13px; }
.rv-body { display: grid; gap: 12px; }
.review.clamp:not(.open) .rv-body { max-height: 13.5em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.rv-more { justify-self: start; min-height: 32px; font-size: 14.5px; }
.rv-reply { padding: 12px 14px; border-radius: var(--r-s); background: var(--soft); border-left: 3px solid var(--accent); }
.rv-reply b { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.rv-reply p { font-size: 14.5px; color: var(--muted); }

/* ---------- Фото работ ---------- */
.photos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; grid-auto-flow: dense; }
.ph-item { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: var(--r); overflow: hidden; background: var(--sunken); }
.photos.sp-m > :first-child { grid-column: span 2; aspect-ratio: 8 / 5; }
@media (min-width: 720px) { .photos { gap: 14px; } }
@media (min-width: 1040px) {
  .photos.c3 { grid-template-columns: repeat(3, 1fr); }
  .photos.c4 { grid-template-columns: repeat(4, 1fr); }
  .photos.sp-m > :first-child { grid-column: auto; aspect-ratio: 4 / 5; }
  .photos.sp-d > :first-child { grid-column: span 2; aspect-ratio: 8 / 5; }
}
.ph-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.ph-cap { position: absolute; left: 8px; right: 8px; bottom: 8px; padding: 6px 10px; border-radius: 12px; font-size: 13px; font-weight: 700; text-align: left; background: color-mix(in srgb, var(--surface) 88%, transparent); color: var(--text); }
@media (hover: hover) { .ph-item:hover img { transform: scale(1.04); } }
.lightbox { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 56px 12px 24px; background: rgba(10, 10, 10, .9); }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; display: grid; gap: 10px; justify-items: center; max-width: 100%; }
.lightbox img { max-width: min(100%, 720px); max-height: calc(100vh - 140px); max-height: calc(100dvh - 140px); border-radius: var(--r); object-fit: contain; }
.lightbox figcaption { color: #fff; font-weight: 600; text-align: center; }
.lightbox .icon-btn { position: absolute; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .14); color: #fff; }
.lb-x { top: 10px; right: 10px; }
.lb-nav { top: 50%; margin-top: -24px; }
.lb-nav.l { left: 10px; } .lb-nav.r { right: 10px; }

/* ---------- Команда без фото ---------- */
.team { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.team li { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.team .mono { width: 48px; height: 48px; border-radius: 50%; font-size: 19px; flex: none; }
.team b { display: block; font-size: 17px; }
.team small { color: var(--muted); font-size: 14px; }

/* ---------- Преимущества на первом экране ---------- */
.features { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.features li { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px 7px 10px; border-radius: 999px; background: var(--soft-2); font-size: 14px; font-weight: 700; }
.features .ico { width: 18px; height: 18px; color: var(--primary); }
.pdetail { margin-top: 4px; font-size: 13.5px; }
.more-breeds summary { list-style: none; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; border-top: 1px solid var(--line); font-weight: 700; color: var(--primary); cursor: pointer; }
.more-breeds summary::-webkit-details-marker { display: none; }
.more-breeds summary .ico { transition: transform var(--t) var(--ease); }
.more-breeds[open] summary { border-bottom: 1px solid var(--line); }
.more-breeds[open] summary .ico { transform: rotate(180deg); }
.brand img.round { border-radius: 50%; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; }
.faq details { border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 60px; padding: 14px 18px; font-weight: 700; font-size: 16.5px; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ico { transition: transform var(--t) var(--ease); color: var(--muted); }
.faq details[open] summary .ico { transform: rotate(180deg); }
.faq details p { padding: 0 18px 18px; color: var(--muted); }

/* ---------- Контакты ---------- */
.contacts { display: grid; gap: 14px; }
.c-card { padding: 22px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 16px; align-content: start; }
.c-row { display: flex; gap: 12px; align-items: flex-start; }
.c-row .ic { width: 44px; height: 44px; border-radius: 14px; background: var(--soft-2); color: var(--primary); display: grid; place-items: center; flex: none; }
.c-row b { display: block; }
.c-row span { color: var(--muted); }
.hours { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.hours li { display: flex; justify-content: space-between; padding: 8px 12px; border-radius: 10px; font-variant-numeric: tabular-nums; }
.hours li.today { background: var(--soft-2); font-weight: 700; }
.hours li span:last-child { color: var(--muted); }
.hours li.today span:last-child { color: var(--text); }
.c-actions { display: grid; gap: 10px; }
@media (min-width: 860px) { .contacts { grid-template-columns: 1.2fr 1fr; } }

.foot { padding: 48px 0 calc(110px + var(--safe-b)); color: var(--muted); font-size: 14px; text-align: center; }
@media (min-width: 860px) { .foot { padding-bottom: 48px; } }

/* ---------- Нижняя панель на телефоне ---------- */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  padding: 10px var(--gutter) calc(10px + var(--safe-b));
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  display: flex; gap: 10px;
  transform: translateY(110%); transition: transform .35s var(--ease);
}
.dock.show { transform: none; }
.dock .btn-primary { flex: 1; }
.dock .btn-wa { width: 56px; padding: 0; flex: none; }
@media (min-width: 860px) { .dock { display: none; } }

.resume {
  position: fixed; left: 12px; right: 12px; bottom: calc(84px + var(--safe-b)); z-index: 35;
  max-width: 460px; margin: 0 auto; padding: 16px; border-radius: var(--r);
  background: var(--surface); box-shadow: var(--shadow-l); border: 1px solid var(--line);
  display: grid; gap: 12px; animation: up .4s var(--ease) both;
}
.resume b { font-size: 17px; }
.resume p { color: var(--muted); font-size: 14.5px; }
.resume-actions { display: flex; gap: 8px; }
.resume-actions .btn { flex: 1; min-height: 48px; }
@media (min-width: 860px) { .resume { bottom: 24px; left: auto; right: 24px; } }
@keyframes up { from { opacity: 0; transform: translateY(16px); } }

/* =====================================================================
   Мастер записи (калькулятор)
   ===================================================================== */
.wiz { position: fixed; inset: 0; z-index: 100; display: flex; justify-content: center; align-items: stretch; }
.wiz[hidden] { display: none; }
.wiz-backdrop { position: absolute; inset: 0; background: color-mix(in srgb, var(--text) 45%, transparent); animation: fade .25s both; }
.wiz-panel {
  position: relative; width: 100%; max-width: 100%; height: 100%;
  background: var(--bg); display: flex; flex-direction: column; overflow: hidden;
  animation: sheet .38s var(--ease) both;
}
@media (min-width: 600px) {
  .wiz { align-items: center; padding: 24px; }
  .wiz-panel { max-width: 480px; height: min(880px, 100%); border-radius: var(--r-l); box-shadow: var(--shadow-l); }
}
@keyframes fade { from { opacity: 0; } }
@keyframes sheet { from { opacity: 0; transform: translateY(24px); } }

.wiz-top { padding: 8px 12px 10px; padding-top: max(8px, env(safe-area-inset-top)); display: grid; gap: 8px; background: var(--bg); }
.wiz-bar { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: var(--text); }
.icon-btn:hover { background: var(--sunken); }
.wiz-title { flex: 1; text-align: center; font-size: 14px; font-weight: 700; color: var(--muted); }
.progress { height: 6px; border-radius: 99px; background: var(--sunken); overflow: hidden; margin: 0 8px; }
.progress i { display: block; height: 100%; border-radius: inherit; background: var(--primary); transition: width .45s var(--ease); }

.wiz-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 8px 20px 28px; }
.wiz-step { display: grid; gap: 22px; }
.wiz-step.fwd { animation: inR .32s var(--ease) both; }
.wiz-step.back { animation: inL .32s var(--ease) both; }
@keyframes inR { from { opacity: 0; transform: translateX(28px); } }
@keyframes inL { from { opacity: 0; transform: translateX(-28px); } }
.q { font-size: 28px; line-height: 1.12; }
.q-sub { color: var(--muted); margin-top: 8px; }
.group { display: grid; gap: 10px; }
.group > .lbl { font-weight: 800; font-size: 16px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.group > .lbl small { color: var(--muted); font-weight: 600; font-size: 13.5px; }

/* Выбираемые карточки */
.opt {
  position: relative; display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px;
  padding: 12px 16px; border-radius: 18px; text-align: left;
  background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line);
  transition: box-shadow .18s, background-color .18s, transform .12s var(--ease);
}
.opt:active { transform: scale(.985); }
.opt:hover { box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.opt[aria-pressed="true"], .opt[aria-checked="true"] { background: var(--soft); box-shadow: inset 0 0 0 2.5px var(--primary); }
.opt .chk {
  margin-left: auto; width: 26px; height: 26px; border-radius: 50%; flex: none;
  box-shadow: inset 0 0 0 2px var(--line-strong); display: grid; place-items: center; color: transparent;
  transition: background-color .18s, box-shadow .18s;
}
.opt .chk .ico { width: 16px; height: 16px; stroke-width: 3; }
.opt[aria-pressed="true"] .chk, .opt[aria-checked="true"] .chk { background: var(--primary); box-shadow: none; color: var(--primary-text); }
.opt .t { display: grid; gap: 2px; min-width: 0; }
.opt .t b { font-weight: 700; font-size: 16.5px; line-height: 1.25; }
.opt .t small { color: var(--muted); font-size: 14px; line-height: 1.35; }
.opt .media { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--soft-2); color: var(--primary); flex: none; }
.opt .media .ico { width: 26px; height: 26px; }
.opt[disabled] { opacity: 1; cursor: default; background: var(--sunken); box-shadow: none; }
.opt[disabled] .t b { color: var(--muted); }

.pet-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pet-card { flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 22px 12px 18px; min-height: 168px; gap: 10px; }
.pet-card .big { width: 84px; height: 84px; color: var(--primary); }
.pet-card b { font-size: 19px; font-weight: 800; }
.pet-card .chk { position: absolute; top: 12px; right: 12px; margin: 0; }

.field { display: grid; gap: 8px; }
.field label, .field .lbl { font-weight: 800; }
.field small.hint { color: var(--muted); font-size: 13.5px; }
.input {
  width: 100%; min-height: 56px; padding: 14px 16px; border-radius: 16px; font-size: 16px;
  background: var(--surface); border: 0; box-shadow: inset 0 0 0 1.5px var(--line-strong);
  transition: box-shadow .18s; -webkit-appearance: none; appearance: none;
}
.input::placeholder { color: color-mix(in srgb, var(--text) 45%, var(--surface)); }
.input:focus { outline: none; box-shadow: inset 0 0 0 2.5px var(--primary); }
textarea.input { min-height: 96px; resize: vertical; }
.field.err .input { box-shadow: inset 0 0 0 2.5px var(--accent); }
.err-msg { color: var(--text); background: var(--accent-soft); border-radius: 12px; padding: 10px 14px; font-size: 14.5px; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.err-msg .ico { width: 18px; height: 18px; }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

.search { position: relative; }
.search .ico { position: absolute; left: 16px; top: 17px; color: var(--muted); }
.search .input { padding-left: 48px; }
.sugg { display: grid; gap: 8px; }
.sugg .opt { min-height: 58px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 2px 20px 4px; scroll-padding: 0 20px; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip {
  min-height: 48px; padding: 0 16px; border-radius: 999px; font-weight: 700; font-size: 15px; white-space: nowrap;
  background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: none;
  transition: box-shadow .18s, background-color .18s;
}
.chip[aria-pressed="true"] { background: var(--primary); color: var(--primary-text); box-shadow: none; }
.chip small { font-weight: 600; opacity: .75; }
.date-chip { flex-direction: column; gap: 0; min-width: 76px; min-height: 64px; border-radius: 18px; line-height: 1.2; }
.date-chip small { font-size: 12.5px; }
.time-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.time-grid .chip { padding: 0 6px; }
.time-grid .chip.any { grid-column: span 2; }

.picked { display: grid; gap: 14px; padding: 18px; border-radius: var(--r); background: var(--soft); box-shadow: inset 0 0 0 2.5px var(--primary); }
.picked-top { display: flex; align-items: center; gap: 14px; }
.picked-top .media { width: 56px; height: 56px; border-radius: 16px; background: var(--surface); color: var(--primary); display: grid; place-items: center; }
.picked-top b { font-size: 19px; display: block; line-height: 1.2; }
.picked-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: var(--surface); font-size: 13.5px; font-weight: 700; }
.tag.pop { background: var(--accent-soft); }
.tag.inc { background: var(--soft-2); color: var(--primary); }
.picked-actions { display: flex; gap: 4px 16px; flex-wrap: wrap; }

.sizes { display: grid; gap: 10px; }
.size-opt .sil { width: 64px; height: 48px; display: flex; align-items: flex-end; justify-content: center; color: var(--primary); flex: none; }
.weight-row { display: flex; gap: 10px; align-items: center; }
.weight-row .input { max-width: 120px; }
.coats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.coats .opt { flex-direction: column; align-items: flex-start; gap: 8px; min-height: 104px; padding: 14px; }
.coats .opt .chk { position: absolute; right: 12px; top: 12px; }
.coat-ic { width: 40px; height: 28px; color: var(--primary); }

.segbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; padding: 5px; border-radius: 18px; background: var(--sunken); box-shadow: inset 0 0 0 1px var(--line); }
.segbar button { min-height: 52px; border-radius: 14px; font-weight: 700; font-size: 15px; display: grid; place-content: center; text-align: center; line-height: 1.15; padding: 4px; }
.segbar button small { font-size: 12px; font-weight: 600; color: var(--muted); }
.segbar button[aria-pressed="true"] { background: var(--surface); box-shadow: 0 0 0 2px var(--primary), var(--shadow-s); }

.svc { align-items: flex-start; padding: 16px; }
.svc .media { width: 48px; height: 48px; }
.svc .t { flex: 1; gap: 4px; }
.svc .meta { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; margin-top: 4px; font-size: 14px; color: var(--muted); }
.svc .meta .price { color: var(--text); font-weight: 800; font-size: 16px; }
.svc .chk { margin-top: 2px; }
.svc .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 2px; }
.addon { min-height: 60px; padding: 10px 14px; }
.addon .media { width: 40px; height: 40px; border-radius: 12px; }
.addon .media .ico { width: 20px; height: 20px; }
.addon .price { margin-left: auto; font-weight: 800; white-space: nowrap; font-size: 15px; }
.addon .chk { margin-left: 4px; }

.add-pet { border: 2px dashed var(--line-strong); border-radius: 18px; min-height: 64px; display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 700; padding: 10px 16px; text-align: center; }
.add-pet small { display: block; color: var(--muted); font-weight: 600; }

.visit { display: grid; gap: 10px; }

/* Итог */
.sum-card { border-radius: var(--r-l); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.sum-sec { padding: 18px 20px; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.sum-sec:last-child { border-bottom: 0; }
.sum-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.sum-head h3 { font-size: 19px; letter-spacing: -.01em; }
.sum-head .link { min-height: 40px; font-size: 14.5px; }
.sum-sec .muted { color: var(--muted); font-size: 15px; }
.honest { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-s); background: var(--soft); color: var(--muted); font-size: 14px; }
.honest .ico { width: 20px; height: 20px; color: var(--primary); flex: none; }
.svc .meta > span { display: inline-flex; align-items: center; gap: 5px; }
.svc .meta .ico { width: 15px; height: 15px; }
.sum-picks { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 8px; font-size: 15.5px; }
.sum-picks li { display: flex; align-items: flex-start; gap: 10px; }
.sum-picks .ico { width: 18px; height: 18px; margin-top: 2px; padding: 2px; border-radius: 50%; background: var(--soft-2); color: var(--primary); stroke-width: 2.4; flex: none; }
.sum-picks .disc { color: var(--primary); font-weight: 700; }
.sum-lines { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 6px; font-size: 15px; }
.sum-lines li { display: flex; justify-content: space-between; gap: 12px; }
.sum-lines li span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--muted); }
.sum-total { background: var(--soft); }
.sum-total .big { font-size: 28px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.sum-kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 15px; }
.sum-kv dt { color: var(--muted); }
.sum-kv dd { margin: 0; font-weight: 600; }

.sent { text-align: center; justify-items: center; padding-top: 24px; }
.sent .ok { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; background: var(--soft-2); color: var(--primary); animation: pop .5s var(--ease) both; }
.sent .ok .ico { width: 48px; height: 48px; stroke-width: 2.4; }
.sent .q-sub { max-width: 34ch; }
.sent .card-row { width: 100%; display: grid; gap: 10px; text-align: left; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }

/* Нижняя панель мастера */
.wiz-foot {
  padding: 12px 16px calc(12px + var(--safe-b)); background: var(--surface);
  border-top: 1px solid var(--line); display: grid; gap: 10px;
  box-shadow: 0 -12px 30px -18px color-mix(in srgb, var(--text) 30%, transparent);
}
.foot-row { display: flex; align-items: center; gap: 12px; }
.foot-price { flex: 1; min-width: 0; line-height: 1.2; }
.foot-price small { display: block; color: var(--muted); font-size: 13px; font-weight: 600; }
.foot-price b { display: block; font-size: 20px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.foot-price b.bump { animation: bump .35s var(--ease); }
@keyframes bump { 40% { transform: scale(1.06); color: var(--primary); } }
.wiz-foot .btn-primary { min-width: 140px; }
.foot-hint { text-align: center; color: var(--muted); font-size: 13.5px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
.sum-head > div { display: flex; align-items: center; gap: 4px; }
.sum-head .link-muted { width: 44px; justify-content: center; }
.tag.inc { white-space: normal; text-align: left; }

/* =====================================================================
   Анимации и подсказки
   ===================================================================== */
:root { --spring: cubic-bezier(.34, 1.56, .64, 1); --out: cubic-bezier(.16, 1, .3, 1); }

/* Переход между шагами: шаг слегка въезжает, а его блоки появляются по очереди. */
.wiz-step.fwd { animation: stepR .42s var(--out) both; }
.wiz-step.back { animation: stepL .42s var(--out) both; }
.wiz-step.fwd > *, .wiz-step.back > * { animation: rise .5s var(--out) both; }
.wiz-step > *:nth-child(2) { animation-delay: .04s; }
.wiz-step > *:nth-child(3) { animation-delay: .08s; }
.wiz-step > *:nth-child(4) { animation-delay: .12s; }
.wiz-step > *:nth-child(5) { animation-delay: .16s; }
.wiz-step > *:nth-child(n+6) { animation-delay: .2s; }
@keyframes stepR { from { transform: translateX(36px); } }
@keyframes stepL { from { transform: translateX(-36px); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* Окно записи: на телефоне выезжает снизу, при закрытии уезжает обратно. */
.wiz-panel { animation: sheetUp .5s var(--out) both; }
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } }
.wiz.closing .wiz-panel { animation: sheetDown .26s ease-in both; }
.wiz.closing .wiz-backdrop { animation: fadeOut .26s ease-in both; }
@keyframes sheetDown { to { transform: translateY(60px); opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
.wiz-backdrop { backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }

/* Отклик на нажатие: карточка «пружинит», галочка выскакивает. */
.opt, .chip, .segbar button { transition: box-shadow .2s, background-color .2s, color .2s, transform .18s var(--out); }
.opt:active, .chip:active, .segbar button:active { transform: scale(.97); }
.opt.just { animation: tap .4s var(--spring); }
.opt.just[aria-pressed="true"] .chk { animation: chk .45s var(--spring); }
.opt.just[aria-pressed="true"] .media { animation: wiggle .5s var(--out); }
.chip.just[aria-pressed="true"], .segbar button.just[aria-pressed="true"] { animation: tap .4s var(--spring); }
@keyframes tap { 0% { transform: scale(.97); } 60% { transform: scale(1.015); } 100% { transform: none; } }
@keyframes chk { 0% { transform: scale(.3); } 100% { transform: none; } }
@keyframes wiggle { 30% { transform: rotate(-8deg) scale(1.08); } 60% { transform: rotate(5deg); } }
.opt .chk .ico { transition: transform .2s var(--spring); }
.opt[aria-pressed="false"] .chk .ico { transform: scale(.4); }
.pet-card .big { transition: transform .3s var(--spring); }
.pet-card[aria-pressed="true"] .big { transform: scale(1.06); }

/* Появляющиеся блоки (время после даты, адрес после «на дом», выбранная порода). */
.appear, .picked { animation: rise .45s var(--out) both; }
.err-msg { animation: rise .3s var(--out) both; }

/* Плашка второго питомца с отменой. */
.extra-pet {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 6px 6px 6px 14px; border-radius: 999px; background: var(--soft-2); font-weight: 700; font-size: 15px;
}
.extra-pet > span { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.extra-pet > span .ico { width: 18px; height: 18px; color: var(--primary); }
.extra-pet-x {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px;
  background: var(--surface); font-weight: 700; font-size: 14px; box-shadow: var(--shadow-s); white-space: nowrap;
}
.extra-pet-x .ico { width: 16px; height: 16px; }

/* Нижняя панель: подсказка до выбора услуги, потом — цена. */
.foot-price { position: relative; min-height: 44px; display: grid; align-items: center; }
.foot-price > * { grid-area: 1 / 1; }
.fp-hint { font-size: 14px; font-weight: 600; color: var(--muted); line-height: 1.3; transition: opacity .25s, transform .3s var(--out); }
.fp-val { transition: opacity .25s, transform .35s var(--out); }
.foot-price:not(.empty) .fp-hint { opacity: 0; transform: translateY(-8px); pointer-events: none; }
.foot-price.empty .fp-val { opacity: 0; transform: translateY(10px); }
.foot-price.appear .fp-val { animation: priceIn .55s var(--spring) both; }
@keyframes priceIn { from { opacity: 0; transform: translateY(14px) scale(.96); } }

/* Кнопка «Далее»: приглушена, пока шаг не заполнен; «оживает», когда можно идти дальше. */
.btn-next { transition: opacity .25s, box-shadow .25s, transform .15s var(--ease); opacity: .55; box-shadow: none; }
.btn-next.ready { opacity: 1; box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--primary) 70%, transparent); }
.btn-next.nudge { animation: nudge .55s var(--spring); }
.btn-next.ready .ico { animation: arrow 1.6s ease-in-out .6s 2; }
@keyframes nudge { 40% { transform: scale(1.06); } }
@keyframes arrow { 50% { transform: translateX(4px); } }
.btn-next .ico { transition: transform .2s; }

/* Страница: блоки проявляются при прокрутке. */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--out), transform .7s var(--out); }
.reveal.in { opacity: 1; transform: none; }
.btn { transition: transform .15s var(--ease), box-shadow .25s var(--ease), background-color .25s, filter .2s; }
@media (hover: hover) {
  .btn:hover { filter: brightness(1.06); }
  .btn-primary:hover, .btn-wa:hover { transform: translateY(-1px); }
  .opt:hover { box-shadow: inset 0 0 0 1.5px var(--line-strong), var(--shadow-s); }
  .salon:hover, .review:hover, .step-card:hover { transform: translateY(-2px); }
}
.review, .step-card { transition: transform .3s var(--out), box-shadow .3s; }
.faq details[open] p { animation: rise .35s var(--out) both; }
.hero-media img { animation: heroIn 1s var(--out) both; }
@keyframes heroIn { from { opacity: 0; transform: scale(1.04); } }
.hero-text > * { animation: rise .6s var(--out) both; }
.hero-text > *:nth-child(2) { animation-delay: .05s; }
.hero-text > *:nth-child(3) { animation-delay: .1s; }
.hero-text > *:nth-child(n+4) { animation-delay: .15s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  .btn-next.ready .ico { animation: none; }
}
/* Первый экран: не прячем полностью (opacity > 0), чтобы не задерживать отрисовку главного контента. */
@keyframes heroIn { from { opacity: .01; transform: scale(1.04); } }
.hero-text > * { animation-name: heroRise; }
@keyframes heroRise { from { opacity: .01; transform: translateY(14px); } }
