/* Аквариум рехаб, стили сайта.
   Палитра «Гибрид»: светлые секции из палитры «Мох и туман»,
   тёмные «подводные» секции из палитры «Тёмная вода».
   Все пары текст/фон проходят WCAG 2.2 AA (контраст от 4.5:1). */

:root {
  --bg: #EDF0EA;
  --surface: #FFFFFF;
  --ink: #15201A;
  --muted: #4C5A51;
  --line: #D5DDD3;
  --primary: #2D5A39;
  --on-primary: #FFFFFF;
  --accent: #8A5D36;
  --leaf: #6FA055;
  /* тёмные секции */
  --deep: #0D1613;
  --deep-ink: #ECE8DC;
  --deep-muted: #A6B1A4;
  --deep-primary: #B5DB72;
  --deep-on-primary: #0D1613;
  --deep-accent: #D3A46C;
  --water1: #1C3D33;
  --water2: #07130F;
  --sand: #D9CDB4;
  --wood: #9A6A40;
  --wood-dark: #5A3C22;
  --stone: #8A8E87;
  --stone-dark: #555A54;
  --plant1: #6FAE4A;
  --plant2: #2F6A35;
  --plant3: #B5DB72;
}

:root {
  --radius: 22px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgb(0 0 0 / .06), 0 8px 30px rgb(0 0 0 / .06);
  --font-display: "Lora", Georgia, serif;
  --font-body: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}
/* внутри тёмных секций кнопки и акценты берутся из «Тёмной воды» */
.dark { --primary: var(--deep-primary); --on-primary: var(--deep-on-primary); --accent: var(--deep-accent); }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.55 var(--font-body);
  transition: background .4s, color .4s;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 500; letter-spacing: -.01em; line-height: 1.1; margin: 0 0 .4em; }
h1 { font-size: clamp(40px, 6.4vw, 84px); }
h2 { font-size: clamp(30px, 4.2vw, 54px); }
h3 { font-size: clamp(20px, 2vw, 24px); }
p { margin: 0 0 1em; }
.lead { font-size: clamp(18px, 1.6vw, 21px); color: var(--muted); max-width: 36em; }
.eyebrow { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--accent); margin-bottom: 14px; display: inline-flex; gap: 8px; align-items: center; }
.eyebrow::before { content: ""; width: 8px; height: 8px; background: currentColor; border-radius: 50% 0 50% 0; }
em.hand { font-style: italic; color: var(--accent); }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 600; font-size: 16px; text-decoration: none; white-space: nowrap;
  transition: transform .15s, background .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 6px 20px -8px var(--primary); }
.btn-ghost { border-color: currentColor; background: transparent; }
.btn-sm { min-height: 42px; padding: 0 18px; font-size: 15px; }
.btn svg { width: 18px; height: 18px; }

/* ---------- шапка ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  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 color-mix(in srgb, var(--line) 70%, transparent);
}
.header .wrap { display: flex; align-items: center; gap: 24px; height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo svg { width: 38px; height: 38px; }
.logo b { font-family: var(--font-display); font-weight: 500; font-size: 22px; line-height: 1; letter-spacing: -.01em; }
.logo small { display: block; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.nav { display: flex; gap: 2px; margin-left: auto; }
.nav a { text-decoration: none; padding: 10px 14px; border-radius: 999px; font-weight: 500; font-size: 15.5px; }
.nav a:hover, .nav a[aria-current="page"] { background: color-mix(in srgb, var(--primary) 10%, transparent); }
.header .btn { margin-left: 8px; }
.burger { display: none; margin-left: auto; width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface); }
@media (max-width: 960px) {
  .nav, .header .btn { display: none; }
  .burger { display: grid; place-items: center; margin-left: 0; }
  .h-contacts { margin-left: auto; }
  .h-phone span { display: none; }
  .h-phone { width: 44px; padding: 0; justify-content: center; border: 1.5px solid var(--line); background: var(--surface); }
  .nav.open a { font-size: 20px; padding: 14px 4px; border-radius: 0; border-bottom: 1px solid var(--line); }
}

/* мобильная «полка» с главным действием */
.dock {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60;
  display: none; gap: 8px; padding: 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(12px); box-shadow: 0 10px 40px -10px rgb(0 0 0 / .35);
}
.dock .btn { flex: 1; min-height: 48px; }
.dock .btn-icon { flex: 0 0 48px; padding: 0; border: 1.5px solid var(--line); }
@media (max-width: 960px) { .dock { display: flex; } body { padding-bottom: 84px; } }
.dock { transition: transform .3s, opacity .3s; }
.dock.dock-hide { transform: translateY(140%); opacity: 0; pointer-events: none; }

/* ---------- HERO ---------- */
.hero { padding: clamp(32px, 6vw, 80px) 0 clamp(40px, 6vw, 72px); position: relative; }
.hero .wrap { display: grid; grid-template-columns: 1fr 1.12fr; gap: clamp(24px, 4vw, 64px); align-items: center; }
.hero h1 { margin-bottom: .3em; }
.hero h1 .w { display: inline-block; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 32px; }
.facts { display: flex; gap: 28px; flex-wrap: wrap; padding: 0; margin: 0; list-style: none; }
.facts li { font-size: 14px; color: var(--muted); max-width: 12em; }
.facts b { display: block; font-family: var(--font-display); font-size: 24px; font-weight: 500; color: var(--ink); line-height: 1.1; }
@media (max-width: 960px) { .hero .wrap { grid-template-columns: 1fr; } }

/* аквариум на первом экране: растёт при прокрутке */
.tank-stage { position: relative; }
.tank {
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius);
  overflow: hidden; box-shadow: 0 30px 60px -30px rgb(0 0 0 / .45), inset 0 0 0 1px rgb(255 255 255 / .08);
  background: linear-gradient(180deg, var(--water1), var(--water2));
}
.tank svg { width: 100%; height: 100%; }
.tank .glass { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, rgb(255 255 255 / .14) 0 12%, transparent 12% 70%, rgb(255 255 255 / .06) 70% 74%, transparent 74%); }
.day-badge {
  position: absolute; left: 16px; top: 16px; z-index: 2;
  padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: rgb(0 0 0 / .35); color: #fff; backdrop-filter: blur(6px); font-variant-numeric: tabular-nums;
}
.day-badge i { font-style: normal; opacity: .7; font-weight: 400; }
.tank-mascot { position: absolute; right: -4%; bottom: -8%; width: 31%; z-index: 3; cursor: pointer; filter: drop-shadow(0 18px 18px rgb(0 0 0 / .25)); }
@media (max-width: 560px) { .tank-mascot { width: 34%; right: -2%; } }

/* облачко реплик персонажа */
.bubble {
  position: absolute; z-index: 4; right: 26%; bottom: 58%; max-width: 260px;
  background: var(--surface); color: var(--ink); padding: 14px 16px; border-radius: 18px 18px 4px 18px;
  font-size: 15px; line-height: 1.4; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(8px) scale(.96); transform-origin: bottom right; transition: opacity .25s, transform .25s;
  pointer-events: none;
}
.bubble.show { opacity: 1; transform: none; }
.bubble b { color: var(--accent); }

/* ---------- секции ---------- */
section { padding: clamp(56px, 8vw, 110px) 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: clamp(28px, 4vw, 48px); flex-wrap: wrap; }
.section-head p { margin: 0; max-width: 30em; color: var(--muted); }
.dark { background: radial-gradient(ellipse 60% 40% at 20% 0%, rgb(181 219 114 / .08), transparent 70%), radial-gradient(ellipse 50% 50% at 90% 100%, rgb(211 164 108 / .07), transparent 70%), var(--deep); color: var(--deep-ink); border-radius: clamp(24px, 4vw, 48px); margin: 0 clamp(8px, 1.4vw, 20px); }
.dark .lead, .dark .section-head p, .dark .muted { color: var(--deep-muted); }
.dark .eyebrow { color: var(--deep-primary); }
.dark .btn-ghost { color: var(--deep-ink); }

/* направления (услуги) */
.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.service {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px 24px; display: flex; flex-direction: column; gap: 10px; min-height: 280px;
  text-decoration: none; transition: transform .2s, box-shadow .2s;
}
.service:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.service .ico { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: color-mix(in srgb, var(--leaf) 22%, transparent); color: var(--primary); margin-bottom: 8px; }
.service p { color: var(--muted); font-size: 15.5px; margin: 0; }
.service .more::after { content: ""; width: 7px; height: 7px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); margin-left: 2px; }
.service .more { margin-top: auto; font-weight: 600; font-size: 15px; display: flex; gap: 6px; align-items: center; color: var(--accent); }
@media (max-width: 1060px) { .services { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .services { grid-template-columns: 1fr; } .service { min-height: 0; } }

/* ---------- конструктор композиции ---------- */
.builder { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
@media (max-width: 960px) { .builder { grid-template-columns: 1fr; } }
.b-stage { position: relative; border-radius: var(--radius); overflow: hidden; background: linear-gradient(180deg, var(--water1), var(--water2)); touch-action: none; user-select: none; -webkit-user-select: none; }
.b-stage svg { width: 100%; height: auto; display: block; }
.b-stage .piece { cursor: grab; }
.b-stage .piece.dragging { cursor: grabbing; }
.b-stage .piece.sel .outline { stroke: var(--leaf); stroke-width: 3; stroke-dasharray: 6 5; fill: none; }
.chip-btn { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 0; background: rgb(255 255 255 / .9); color: #1b1b16; font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.chip-btn[aria-pressed="true"] { background: var(--leaf); color: #111; }
.chip-btn:disabled { opacity: .45; cursor: default; }
.b-side { display: flex; flex-direction: column; gap: 14px; }
.b-panel { background: color-mix(in srgb, var(--deep-ink) 7%, transparent); border: 1px solid color-mix(in srgb, var(--deep-ink) 14%, transparent); border-radius: var(--radius); padding: 18px; }
.b-panel h3 { font-size: 17px; font-family: var(--font-body); font-weight: 600; margin: 0 0 12px; }
.tray { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tray button { aspect-ratio: 1; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--deep-ink) 18%, transparent); background: color-mix(in srgb, var(--deep-ink) 6%, transparent); padding: 6px; }
.tray button:hover { background: color-mix(in srgb, var(--deep-ink) 14%, transparent); }
.seg { display: flex; gap: 6px; }
.seg button { flex: 1; min-height: 40px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--deep-ink) 18%, transparent); background: transparent; font-weight: 600; font-size: 14px; }
.seg button[aria-pressed="true"] { background: var(--deep-ink); color: var(--deep); }
.verdict { display: flex; gap: 12px; align-items: flex-start; }
.verdict .mini-mascot { width: 56px; flex: 0 0 56px; }
.verdict p { margin: 0; font-size: 15px; }
.score { display: flex; gap: 4px; margin: 10px 0 0; }
.score i { flex: 1; height: 6px; border-radius: 6px; background: color-mix(in srgb, var(--deep-ink) 15%, transparent); }
.score i.on { background: var(--leaf); }

/* ---------- диагност ---------- */
.doctor { display: grid; grid-template-columns: 300px 1fr; gap: clamp(20px, 4vw, 56px); align-items: start; }
@media (max-width: 860px) { .doctor { grid-template-columns: 1fr; } .doctor .d-mascot { max-width: 160px; } }
.symptoms { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 22px; padding: 0; list-style: none; }
.symptoms button {
  min-height: 46px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface);
  font-weight: 500; font-size: 15.5px; transition: background .15s, border-color .15s;
}
.symptoms button[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.answer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 3vw, 32px); min-height: 220px; }
.answer h3 { margin-bottom: 8px; }
.answer .tag { display: inline-block; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; margin-bottom: 12px; }
.tag.ok { background: color-mix(in srgb, var(--leaf) 25%, transparent); }
.tag.warn { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.answer ol { padding-left: 1.2em; margin: 0 0 18px; }
.answer li { margin-bottom: 6px; }
.answer .empty { color: var(--muted); }

/* ---------- проекты ---------- */
.projects { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 1fr); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
.project { scroll-snap-align: start; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--line); text-decoration: none; }
.dark .project { background: color-mix(in srgb, var(--deep-ink) 6%, transparent); border-color: color-mix(in srgb, var(--deep-ink) 12%, transparent); }
.project .art { aspect-ratio: 4 / 3; }
.project .art svg { width: 100%; height: 100%; }
.project .meta { padding: 16px 18px 20px; }
.project .meta h3 { font-size: 20px; margin-bottom: 4px; }
.project .meta p { margin: 0; font-size: 14.5px; }
.project .tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.project .tags li { font-size: 12.5px; padding: 4px 10px; border-radius: 999px; border: 1px solid color-mix(in srgb, currentColor 20%, transparent); }

/* ---------- как попасть ---------- */
.visit { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; }
@media (max-width: 860px) { .visit { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 3vw, 32px); }
.people { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.people a { display: flex; justify-content: space-between; align-items: center; gap: 12px; text-decoration: none; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--bg); }
.people a:hover { border-color: var(--primary); }
.people b { font-size: 18px; font-variant-numeric: tabular-nums; }
.people span { color: var(--muted); font-size: 14px; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 14px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; }
.steps li::before { content: counter(s); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--leaf) 25%, transparent); font-weight: 700; }

/* ---------- футер ---------- */
.footer { padding: 56px 0 48px; margin-top: 24px; background: var(--deep); color: var(--deep-muted); font-size: 14.5px; }
.footer b { color: var(--deep-ink); }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between; }
.footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.footer a { text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.not-we { font-size: 14px; color: var(--muted); }


/* ---------- каталог ---------- */
.cat-hero { padding: clamp(28px, 5vw, 56px) 0 12px; }
.cat-hero h1 { font-size: clamp(36px, 5vw, 64px); }
.tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 12px; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding-left: var(--gutter); padding-right: var(--gutter); }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: 0 0 auto; min-height: 46px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 500; font-size: 15.5px; display: inline-flex; align-items: center; gap: 8px; }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tabs button small { opacity: .65; font-size: 13px; }
.cat-layout { display: grid; grid-template-columns: 250px 1fr; gap: 32px; padding: 16px 0 80px; }
@media (max-width: 960px) { .cat-layout { grid-template-columns: 1fr; gap: 12px; } }
.filters { position: sticky; top: 126px; align-self: start; display: flex; flex-direction: column; gap: 22px; }
.filters fieldset { border: 0; padding: 0; margin: 0; }
.filters legend { font-weight: 600; font-size: 14px; margin-bottom: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.filters label { display: flex; gap: 10px; align-items: center; padding: 6px 0; font-size: 15.5px; cursor: pointer; }
.filters input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--primary); }
.search { position: relative; }
.search input { width: 100%; min-height: 48px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); padding: 0 16px 0 44px; font: inherit; color: var(--ink); }
.search svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }
.filter-toggle { display: none; }
@media (max-width: 960px) {
  .filters { position: fixed; inset: auto 0 0 0; top: auto; z-index: 80; background: var(--bg); border-radius: 24px 24px 0 0; padding: 20px var(--gutter) 24px; max-height: 80vh; overflow: auto; box-shadow: 0 -20px 60px rgb(0 0 0 / .3); transform: translateY(105%); transition: transform .3s; }
  .filters.open { transform: none; }
  .filter-toggle { display: inline-flex; }
}
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .found { color: var(--muted); font-size: 15px; margin-right: auto; }
.applied { display: flex; gap: 8px; flex-wrap: wrap; }
.applied button { min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: color-mix(in srgb, var(--leaf) 18%, var(--surface)); font-size: 14px; display: inline-flex; gap: 6px; align-items: center; }
.applied .reset { background: transparent; text-decoration: underline; border-color: transparent; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
@media (max-width: 560px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
.item { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; text-align: left; padding: 0; transition: transform .2s, box-shadow .2s; }
.item:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.item .art { aspect-ratio: 1; position: relative; background: color-mix(in srgb, var(--bg), var(--ink) 4%); }
.item .art svg { width: 100%; height: 100%; }
.item .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.item h3 { font-size: 18px; margin: 0; font-family: var(--font-display); }
.item .latin { font-style: italic; font-size: 13.5px; color: var(--muted); margin-top: -2px; }
.item .attrs { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.item .attrs span { font-size: 12px; padding: 3px 8px; border-radius: 8px; background: var(--bg); color: var(--muted); }
.item .price { margin-top: auto; padding-top: 8px; font-weight: 600; font-size: 16px; }
@media (max-width: 560px) { .item h3 { font-size: 16px; } .item .body { padding: 10px 12px 12px; } .item .attrs span:nth-child(n+3) { display: none; } }
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }

/* карточка товара (диалог) */
dialog.product { border: 0; padding: 0; border-radius: 28px; max-width: 920px; width: calc(100% - 24px); background: var(--surface); color: var(--ink); box-shadow: 0 40px 100px rgb(0 0 0 / .4); }
dialog.product::backdrop { background: rgb(10 14 10 / .55); backdrop-filter: blur(4px); }
.pd { display: grid; grid-template-columns: 1fr 1fr; }
.pd .art { background: color-mix(in srgb, var(--bg), var(--ink) 4%); min-height: 320px; }
.pd .art svg { width: 100%; height: 100%; }
.pd .info { padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.pd h2 { font-size: 32px; margin: 0; }
.pd .latin { font-style: italic; color: var(--muted); margin-top: -4px; }
.pd table { border-collapse: collapse; width: 100%; font-size: 15px; margin: 6px 0; }
.pd th { text-align: left; font-weight: 500; color: var(--muted); padding: 7px 12px 7px 0; width: 44%; vertical-align: top; }
.pd td { padding: 7px 0; border-bottom: 1px solid var(--line); }
.pd th { border-bottom: 1px solid var(--line); }
.pd .note { font-size: 14.5px; background: color-mix(in srgb, var(--leaf) 14%, transparent); border-radius: 14px; padding: 12px 14px; }
.pd .cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 10px; }
dialog.product { position: fixed; }
dialog.product .close { position: absolute; z-index: 2; cursor: pointer; right: 14px; top: 14px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--surface); box-shadow: var(--shadow); font-size: 22px; line-height: 1; }
@media (max-width: 760px) { .pd { grid-template-columns: 1fr; } .pd .art { min-height: 0; aspect-ratio: 4/3; } dialog.product { margin: auto 12px 12px; border-radius: 24px; max-height: 92vh; } }

/* окно «связаться» */
dialog.contact { border: 0; border-radius: 24px; padding: 24px; width: min(440px, calc(100% - 24px)); background: var(--surface); color: var(--ink); }
dialog.contact::backdrop { background: rgb(10 14 10 / .55); }
dialog.contact h2 { font-size: 26px; }
dialog.contact textarea { width: 100%; min-height: 96px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); padding: 12px; font: inherit; font-size: 15px; resize: vertical; }
dialog.contact .row { display: grid; gap: 8px; margin-top: 14px; }

/* появление при прокрутке */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s, transform .7s; }
.reveal.in { opacity: 1; transform: none; }

/* персонаж: анимации */
@keyframes wave { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-18deg); } 75% { transform: rotate(10deg); } }
.mascot .arm-r.waving { animation: wave .9s ease-in-out 2; transform-origin: 150px 210px; transform-box: view-box; }
@keyframes sway { 0%,100% { transform: rotate(-1.2deg); } 50% { transform: rotate(1.2deg); } }
.mascot .body { animation: sway 6s ease-in-out infinite; transform-origin: 120px 366px; transform-box: view-box; }
@keyframes bubble-up { from { transform: translateY(0); opacity: .8; } to { transform: translateY(-420px); opacity: 0; } }
.tank .b { animation: bubble-up linear infinite; }
@keyframes leaf-sway { 0%,100% { transform: rotate(-2deg); } 50% { transform: rotate(2.5deg); } }
.tank .sway { animation: leaf-sway 5s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }

.d-mascot { max-width: 240px; }

.dark .project .meta p { color: var(--deep-muted); }

/* ---------- v3: фото из админки ---------- */
.art.photo { background: #E9ECE6; }
.art.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.noart { width: 100%; height: 100%; display: grid; place-items: center; align-content: center; gap: 4px; color: var(--muted); font-size: 13px; }
.noart .mascot { width: 42%; height: auto; }
.gallery { display: flex; flex-direction: column; background: color-mix(in srgb, var(--bg), var(--ink) 4%); }
.gallery .art { flex: 1; aspect-ratio: 1; min-height: 0; }
.thumbs { display: flex; gap: 8px; padding: 10px; overflow-x: auto; }
.thumbs button { flex: 0 0 64px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: none; cursor: pointer; }
.thumbs button[aria-current] { border-color: var(--primary); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd .pill { align-self: flex-start; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--bg); }
.pd .sku { color: var(--muted); font-size: 13.5px; align-self: center; }
.filters label .n { color: var(--muted); margin-left: auto; font-size: 13px; }
.empty-mascot { width: 120px; margin: 0 auto 8px; }
.socials { display: inline-flex; gap: 14px; }
.dark .mascot, .doctor .mascot { filter: drop-shadow(0 0 1.5px rgb(255 255 255 / .35)); }
dialog.contact .close { float: right; border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; color: var(--ink); }
dialog.contact .muted { color: var(--muted); margin-top: -4px; }
dialog.contact label { font-weight: 600; font-size: 14px; }
dialog.contact .or { margin: 18px 0 8px; font-weight: 600; font-size: 14px; }

/* ---------- v4: контакты в шапке ---------- */
.h-contacts { display: flex; align-items: center; gap: 6px; }
.h-phone, .h-ico { display: inline-flex; align-items: center; gap: 8px; height: 44px; border-radius: 999px; text-decoration: none; color: var(--ink); white-space: nowrap; }
.h-phone { padding: 0 12px 0 10px; font-weight: 600; font-size: 15.5px; }
.h-phone svg { width: 18px; height: 18px; color: var(--primary); flex: none; }
.h-phone:hover { background: color-mix(in srgb, var(--primary) 10%, transparent); }
.h-ico { width: 44px; justify-content: center; border: 1.5px solid var(--line); background: var(--surface); }
.h-ico svg, .h-phone svg { width: 20px; height: 20px; }
.h-ico:hover { border-color: var(--primary); color: var(--primary); }
@media (min-width: 961px) and (max-width: 1240px) { .h-phone span { display: none; } .h-phone { width: 44px; padding: 0; justify-content: center; border: 1.5px solid var(--line); } .nav a { padding: 10px 10px; } }
@media (max-width: 400px) { .h-contacts { gap: 4px; } .h-ico, .h-phone { width: 40px; height: 40px; } .header .wrap { gap: 10px; } }

/* ---------- v4: объёмный заголовок первого экрана ---------- */
.hero h1.t3d { perspective: 900px; perspective-origin: 30% 50%; }
.t3d .w { display: block; transform-style: preserve-3d; will-change: transform; transform-origin: 0 60%; }
.t3d .ch { display: inline-block; transform-style: preserve-3d; will-change: transform; }
.t3d .ch > span { display: inline-block; animation: ch-in .9s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i) * 28ms + 150ms); transform-origin: 50% 100%; }
.t3d .wd { display: inline-block; white-space: nowrap; transform-style: preserve-3d; }
.t3d .sp { display: inline-block; width: .26em; }
@keyframes ch-in { from { opacity: 0; transform: translateZ(-220px) rotateX(-80deg) translateY(.4em); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .t3d .ch > span { animation: none; } }

/* ---------- v4: верхняя полоса шапки с адресом и картой ---------- */
.topbar { background: var(--ink); color: #E4EADF; font-size: 13.5px; }
.tb-in { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); height: 34px; display: flex; align-items: center; gap: 16px; }
.tb-addr { display: inline-flex; align-items: center; gap: 8px; min-width: 0; color: inherit; text-decoration: none; }
.tb-addr svg { width: 15px; height: 15px; flex: none; color: #A9CF62; }
.tb-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-map { flex: none; color: #A9CF62; text-decoration: underline; text-underline-offset: 3px; }
.tb-addr:hover .tb-map { color: #fff; }
.tb-addr.no-map .tb-map { display: none; }
.tb-note { margin-left: auto; flex: none; color: #B9C4B6; }
@media (max-width: 720px) { .tb-note { display: none; } .tb-in { height: 32px; font-size: 13px; } .tb-map { margin-left: auto; } .tb-addr { flex: 1; } }
html { scroll-padding-top: 120px; }

/* ---------- v5 ---------- */
.pt0 { padding-top: 0; }
.not-we { margin-top: 20px; }
.status { --st: #8C8C8C; }
.status::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: var(--st); flex: none; }

/* первый экран: факты */
.facts li > span { display: block; }
@media (max-width: 560px) {
  .hero .actions .btn { flex: 1; }
  .facts { display: grid; gap: 10px; }
  .facts li { max-width: none; display: grid; grid-template-columns: 112px 1fr; gap: 12px; align-items: baseline; font-size: 14px; }
  .facts b { font-size: 18px; }
}
.hero-photo { margin: 0; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }

/* разделы каталога на главной: картинка сверху, подпись на сплошном фоне снизу */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 250px; gap: 14px; }
.cat {
  position: relative; border-radius: var(--radius); overflow: hidden; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s;
}
.cat:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.cat.big { grid-column: span 2; grid-row: span 2; }
.cat .art { position: relative; flex: 1; min-height: 0; overflow: hidden; background: color-mix(in srgb, var(--bg), var(--ink) 3%); }
.cat .art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.cat .art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cat .label { padding: 14px 16px 16px; border-top: 1px solid var(--line); background: var(--surface); }
.cat h3 { margin: 0 0 2px; font-size: clamp(18px, 1.8vw, 22px); overflow-wrap: anywhere; hyphens: auto; }
.cat.big h3 { font-size: clamp(22px, 2.4vw, 30px); }
.cat .label span { display: block; font-size: 14px; line-height: 1.35; color: var(--muted); }
.cat .count { position: absolute; top: 12px; right: 12px; z-index: 1; font-size: 13px; font-weight: 600; background: var(--surface); padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); }
.cat .noart { position: absolute; inset: 0; }
.cat .noart .mascot { width: 34%; }
@media (max-width: 1060px) { .bento { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) {
  .bento { grid-template-columns: repeat(2, 1fr); grid-auto-rows: auto; gap: 10px; }
  .cat .art { flex: none; aspect-ratio: 4 / 3; }
  .cat.big { grid-row: auto; }
  .cat.big .art { aspect-ratio: 16 / 9; }
  .cat .label { padding: 10px 12px 12px; }
  .cat h3 { font-size: 17px; }
  .cat .label span { font-size: 13px; }
  .cat .count { top: 8px; right: 8px; font-size: 12px; padding: 3px 8px; }
}

/* шапка на телефоне: полоса с адресом уезжает при прокрутке, меню открывается под шапкой */
@media (max-width: 960px) {
  .nav.open { display: flex; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: var(--bg); padding: 4px var(--gutter) 20px; border-bottom: 1px solid var(--line); box-shadow: 0 20px 40px -20px rgb(0 0 0 / .3); }
}
@media (max-width: 720px) { .header { top: -32px; } .header .wrap { height: 64px; } html { scroll-padding-top: 80px; } }

/* подвал: ссылки удобного размера для пальца */
.f-name { font-family: var(--font-display); font-size: 20px; }
.footer nav { gap: 0 20px; }
.footer nav a, .footer .socials a, .f-small { display: inline-flex; align-items: center; min-height: 44px; }
.footer .socials { gap: 18px; }
.f-small { font-size: 13.5px; text-decoration: underline !important; text-underline-offset: 3px; }

/* работы, отзывы, студия */
.reviews { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.review { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 20px; display: flex; flex-direction: column; gap: 14px; }
.review blockquote { margin: 0; font-size: 16.5px; }
.review figcaption { margin-top: auto; font-size: 14.5px; color: var(--muted); }
.review figcaption b { color: var(--ink); margin-right: 6px; }
.steps li span { display: block; color: var(--muted); }
.visit-dl { margin: 20px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 15.5px; }
.visit-dl dt { color: var(--muted); }
.visit-dl dd { margin: 0; }

/* конструктор: кнопки под сценой, а не поверх неё */
.b-col { min-width: 0; }
.b-toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.b-toolbar [data-act="guides"] { margin-left: auto; }
@media (max-width: 560px) { .b-toolbar { display: grid; grid-template-columns: repeat(4, 1fr); } .b-toolbar .chip-btn { justify-content: center; padding: 0 6px; } .b-toolbar [data-act="guides"] { margin-left: 0; grid-column: span 2; } .b-toolbar [data-act="clear"] { grid-column: span 2; } }
.builder-page { margin-top: 16px; }
.builder-page h1 { font-size: clamp(32px, 4.4vw, 54px); }

/* каталог: статус в одну строку, метки, диапазоны */
.item { text-decoration: none; color: inherit; }
.item .status { position: absolute; left: 8px; top: 8px; max-width: calc(100% - 16px); display: flex; align-items: center; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--surface); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .labels { position: absolute; left: 8px; bottom: 8px; display: flex; gap: 4px; flex-wrap: wrap; }
.label-tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--accent); color: #fff; }
.item.is-sold .art > :first-child { filter: grayscale(.7); opacity: .75; }
@media (max-width: 560px) { .item .status { font-size: 11.5px; padding: 3px 8px; } }
.pd .pills { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pd .pill { display: inline-flex; align-items: center; }
.pd .sku a { color: inherit; }
.range .rng { display: flex; gap: 8px; align-items: center; }
.range input { width: 100%; min-height: 44px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); padding: 0 12px; font: inherit; color: var(--ink); }
.filters label .lbl { flex: 1; }
.filters label { min-height: 40px; }
.applied:not(:empty) { margin-bottom: 14px; }
.seo-h { font-size: 22px; margin-top: 10px; grid-column: 1 / -1; }
.seo-list { grid-column: 1 / -1; margin: 0 0 16px; }
.seo-list a { line-height: 2; }

/* страница позиции */
.item-page { padding-top: 20px; padding-bottom: 60px; }
.crumbs { font-size: 14.5px; color: var(--muted); margin-bottom: 16px; }
.crumbs a { color: inherit; display: inline-flex; min-height: 44px; align-items: center; }
.pd-page { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; overflow: hidden; }
.pd-page h1 { font-size: clamp(30px, 3.6vw, 44px); margin: 4px 0 0; }
.pd-page .gallery .art { aspect-ratio: 1; }
.pd-page .gallery .art img { width: 100%; height: 100%; object-fit: cover; }
.more-items { padding: 40px 0 0; }
.more-items h2 { font-size: clamp(24px, 3vw, 34px); }
.more-items .grid { margin-bottom: 20px; }

/* уведомление о cookie */
.cookie { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 90; max-width: 560px; margin: 0 auto; display: flex; gap: 12px 16px; align-items: center; flex-wrap: wrap;
  background: var(--deep); color: var(--deep-ink); padding: 14px 16px; border-radius: 18px; box-shadow: 0 20px 50px -10px rgb(0 0 0 / .45); font-size: 14.5px; }
.cookie p { margin: 0; flex: 1 1 240px; }
.cookie a { color: var(--deep-primary); }
.cookie div { display: flex; gap: 8px; }
.cookie .btn-primary { background: var(--deep-primary); color: var(--deep-on-primary); }
.cookie .btn-ghost { color: var(--deep-ink); }
@media (max-width: 960px) { .cookie { bottom: 84px; } }

/* текстовые страницы */
.prose { max-width: 760px; padding-top: 40px; padding-bottom: 60px; }
.prose h1 { font-size: clamp(30px, 4vw, 46px); }
.prose h2 { font-size: 22px; margin-top: 1.6em; }
.prose .muted { color: var(--muted); }
.ph { border-bottom: 1.5px dashed var(--accent); color: var(--accent); }
/* последняя плитка не остаётся одна в ряду */
@media (min-width: 1061px) { .bento .cat:last-child:nth-child(4n+2) { grid-column: 1 / -1; flex-direction: row; } .bento .cat:last-child:nth-child(4n+2) .label { border-top: 0; border-left: 1px solid var(--line); width: 40%; align-self: stretch; display: flex; flex-direction: column; justify-content: flex-end; } }
@media (max-width: 760px) { .bento .cat:last-child:nth-child(even) { grid-column: 1 / -1; } .bento .cat:last-child:nth-child(even) .art { aspect-ratio: 16 / 9; } }
.art .noart .mascot { width: 40%; height: auto; }
.cat .art .noart .mascot { width: 30%; }
/* на узком экране в шапке только телефон и меню, ВКонтакте и Telegram есть в окне связи и в подвале */
@media (max-width: 480px) { .h-contacts .h-ico { display: none; } }
@media (max-width: 860px) { .doctor .d-mascot { max-width: 110px; } }

/* ---------- v6 ---------- */
/* первый экран: три факта в один ряд на широких экранах */
@media (min-width: 561px) {
  .facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .facts li { max-width: none; }
  .facts b { font-size: 21px; margin-bottom: 4px; }
}

/* шторка фильтров на телефоне: заголовок, крестик, закреплённые кнопки внизу */
.f-head, .f-foot { display: none; }
@media (max-width: 960px) {
  .filters { padding-top: 0; padding-bottom: 0; gap: 18px; }
  .f-head { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 2; background: var(--bg); padding: 16px 0 8px; margin-bottom: -6px; }
  .f-head b { font-family: var(--font-display); font-size: 22px; font-weight: 500; }
  .f-close { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface); font-size: 22px; line-height: 1; color: var(--ink); }
  .f-foot { display: flex; gap: 10px; position: sticky; bottom: 0; z-index: 2; background: var(--bg); padding: 12px 0 calc(16px + env(safe-area-inset-bottom)); margin-top: 4px; border-top: 1px solid var(--line); }
  .f-foot .btn { flex: 1; min-height: 50px; }
  .f-foot .btn-ghost { flex: 0 0 auto; }
  .f-foot .btn:disabled { opacity: .5; }
  body.sheet-open .dock { transform: translateY(140%); opacity: 0; pointer-events: none; }
  body.sheet-open { overflow: hidden; }
}

/* карточка каталога: статус и метки не обрезаются, а переносятся */
.item .status { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.2; }
.item .labels { right: 8px; }
.label-tag { line-height: 1.25; }

/* гайды: рамка по высоте ответа */
.answer { min-height: 0; }

/* конструктор: подсказка вместо неактивных кнопок, сетка предметов внутри панели */
.chip-btn[hidden] { display: none; }
.b-hint { margin: 12px 0 0; font-size: 14.5px; color: var(--deep-muted); }
.b-hint[hidden] { display: none; }
.tray { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tray button { min-width: 0; }
@media (max-width: 560px) { .b-toolbar .chip-btn { font-size: 13px; } }

/* подвал: телефон */
.f-phone { display: inline-flex; align-items: center; min-height: 44px; color: var(--deep-ink); font-weight: 600; }
.nowrap { white-space: nowrap; }

/* v6.1: «Что не так с аквариумом?» не шире экрана, длинная кнопка ответа переносится */
.doctor { grid-template-columns: 300px minmax(0, 1fr); }
@media (max-width: 860px) { .doctor { grid-template-columns: minmax(0, 1fr); } }
.doctor > * { min-width: 0; }
.answer .btn { white-space: normal; text-align: center; line-height: 1.25; padding-top: 12px; padding-bottom: 12px; max-width: 100%; }

/* v6.1: конструктор на телефоне, кнопки в три колонки без пустых мест */
@media (max-width: 560px) {
  .b-toolbar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .b-toolbar [data-act="guides"] { grid-column: span 2; }
  .b-toolbar [data-act="clear"] { grid-column: span 1; }
}

/* v6.1: метки на карточках каталога компактнее на телефоне */
@media (max-width: 560px) {
  .item .label-tag { font-size: 11px; padding: 3px 8px; letter-spacing: -.01em; }
}

/* ---------- v7 ---------- */
/* шапка: название студии всегда в одну строку, шапке нужно больше места, чем основной сетке */
.header .wrap { max-width: 1360px; gap: 18px; }
.logo { flex: none; white-space: nowrap; }
.logo .logo-mark { flex: none; width: 40px; height: 40px; display: grid; place-items: center; }
.logo .logo-mark svg, .logo .logo-mark img { width: 40px; height: 40px; display: block; }
.logo .logo-mark img { border-radius: 50%; object-fit: cover; }
.logo-text { display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.logo b { display: block; font-size: 21px; line-height: 1.05; white-space: nowrap; }
.logo small { margin-top: 0; font-size: 10.5px; line-height: 1; white-space: nowrap; letter-spacing: .12em; }
.nav { flex: 0 1 auto; min-width: 0; }
.nav a { white-space: nowrap; }
.h-contacts { flex: none; }
.header .btn { flex: none; white-space: nowrap; }
@media (min-width: 961px) and (max-width: 1400px) { .h-phone span { display: none; } .h-phone { width: 44px; padding: 0; justify-content: center; border: 1.5px solid var(--line); } }
@media (min-width: 961px) and (max-width: 1120px) { .nav a { padding: 10px 8px; font-size: 15px; } .header .wrap { gap: 12px; } .header .btn { margin-left: 0; padding: 0 14px; } }
@media (max-width: 400px) { .logo b { font-size: 19px; } .logo small { font-size: 9.5px; letter-spacing: .1em; } .logo .logo-mark, .logo .logo-mark svg, .logo .logo-mark img { width: 34px; height: 34px; } .logo { gap: 8px; } }

/* фото целиком, без обрезки: снимок вписан в рамку, свободное место закрыто размытой копией того же снимка */
.art.photo { position: relative; overflow: hidden; background: #DDE2DA; }
.art.photo .ph-bg { position: absolute; inset: -24px; background-size: cover; background-position: center; filter: blur(22px) saturate(1.15); opacity: .7; transform: translateZ(0); pointer-events: none; }
.art.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.grid .item.is-sold .art.photo > .ph-bg + img { filter: grayscale(.7); opacity: .75; }

/* карточки каталога одинаковые: рамка фото одной пропорции на весь раздел, текст выравнивается по высоте */
.grid { align-items: stretch; --ar: 4 / 5; }
.grid.ar-land { --ar: 4 / 3; }
.grid.ar-square { --ar: 1 / 1; }
.grid .item .art { aspect-ratio: var(--ar); flex: none; overflow: hidden; }
.grid .item .art > svg { position: absolute; inset: 0; }
.grid .item .art .noart { position: absolute; inset: 0; }
.grid .item .body { min-height: 0; }
.grid .item h3 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.grid .item .latin { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grid .item .price, .pd .price-big { font-family: var(--font-body, inherit); font-weight: 700; color: var(--ink); }
.grid .item .price { margin-top: auto; padding-top: 8px; font-size: 17px; }
.pd .price-big { font-size: 26px; margin: 4px 0 2px; }
.pd .price-big small { font-size: 14px; font-weight: 500; color: var(--muted); margin-left: 6px; }

/* карточка позиции и окно быстрого просмотра: фото целиком */
.gallery .art { aspect-ratio: 4 / 5; flex: none; }
.pd-page .gallery .art { aspect-ratio: 4 / 5; }
.pd-page .gallery .art img, .gallery .art img { object-fit: contain; }
.pd .art { min-height: 0; }
@media (max-width: 760px) { .pd .art, .gallery .art { aspect-ratio: 1; } }

/* работы на главной и плитки разделов */
.project .art { position: relative; overflow: hidden; }
.project .art img { object-fit: contain; }
.cat .art.photo img { object-fit: contain; }
.project { display: flex; flex-direction: column; color: inherit; }
.project .meta { flex: 1; display: flex; flex-direction: column; }
.project .more-link { margin-top: auto; padding-top: 12px; font-weight: 600; color: var(--primary); }
.dark .project .more-link { color: var(--deep-primary); }

/* фильтры каталога на компьютере: своя прокрутка, колесо мыши листает их, когда курсор над ними */
@media (min-width: 961px) {
  .filters { max-height: calc(100vh - 140px); overflow-y: hidden; overscroll-behavior: contain; padding-right: 8px; margin-right: -8px; scrollbar-width: thin; scrollbar-gutter: stable; }
  .filters:hover, .filters:focus-within { overflow-y: auto; }
}

/* сортировка */
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sort { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; font-size: 14.5px; color: var(--muted); }
.sort select { min-height: 42px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 15px; padding: 0 34px 0 12px; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; cursor: pointer; }
@media (max-width: 960px) { .sort { margin-left: 0; } .sort span { display: none; } .toolbar .filter-toggle { margin-left: auto; } }

/* первый экран: заголовок без анимации, вторая строка тёмная */
.hero h1 em.hand { color: var(--ink); }
.hero h1 .w { display: inline; }

/* страница работы */
.work-page .pd-page .info .tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 0; padding: 0; list-style: none; }
.work-page .pd-page .info .tags li { font-size: 13.5px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); }
.work-page .lead-sm { font-size: 17px; color: var(--muted); margin: 4px 0 0; }
.work-page .pill { background: var(--bg); }
.work-page .gallery .art > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.work-page .gallery .art { position: relative; aspect-ratio: 4 / 3; }
.work-details { margin-top: 36px; }
.work-details h2 { font-size: clamp(24px, 3vw, 34px); margin-bottom: 18px; }
.work-story { max-width: 760px; font-size: 17px; margin-bottom: 26px; }
.work-story p { margin: 0 0 1em; }
.work-info { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin: 0; }
.work-info .wi { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; }
.work-info .wi.wide { grid-column: span 2; }
.work-info dt { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 8px; }
.work-info dd { margin: 0; font-size: 16px; }
.work-info ul { margin: 0; padding-left: 18px; }
.work-info .wi.wide ul { columns: 2; column-gap: 28px; }
.work-info li { margin: 2px 0; break-inside: avoid; }
@media (max-width: 600px) { .work-info .wi.wide { grid-column: auto; } .work-info .wi.wide ul { columns: 1; } }
.work-page .more-items .projects { grid-auto-columns: minmax(260px, 1fr); }

/* иконки «Что мы делаем»: рисунок из набора студии, цвет берётся из темы */
.service .ico.ico-img { width: 68px; height: 68px; border-radius: 18px; }
.service .ico.ico-img::before { content: ""; width: 50px; height: 50px; background: currentColor; -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }

/* фон всех страниц сайта: мшистый акваскейп стоит на месте при прокрутке и просвечивает сквозь страницу */
.home-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: url("/assets/img/home-bg.webp") center 30% / cover no-repeat; opacity: .242; }
.home-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 35%, transparent), color-mix(in srgb, var(--bg) 10%, transparent) 40%, color-mix(in srgb, var(--bg) 35%, transparent)); }
@media (max-width: 760px) { .home-bg { background-image: url("/assets/img/home-bg-960.webp"); background-position: 30% center; opacity: .242; } }
body .header { background: color-mix(in srgb, var(--bg) 88%, transparent); }

/* конструктор: свой размер аквариума и цвет фона */
.dims { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 6px; align-items: end; }
.dims > span { padding-bottom: 12px; color: var(--deep-muted); }
.dims label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--deep-muted); }
.dims input { width: 100%; min-width: 0; min-height: 44px; border-radius: 12px; border: 1.5px solid color-mix(in srgb, var(--deep-ink) 22%, transparent); background: color-mix(in srgb, var(--deep-ink) 8%, transparent); color: var(--deep-ink); font: inherit; font-size: 17px; font-weight: 600; text-align: center; padding: 0 4px; -moz-appearance: textfield; }
.dims input::-webkit-outer-spin-button, .dims input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.dims input:focus { outline: 2px solid var(--deep-primary); outline-offset: 1px; }
.dims-hint { margin: 8px 0 0; font-size: 13px; color: var(--deep-muted); }
.seg [data-bg] { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 6px; }
.seg [data-bg][aria-checked="true"] { background: var(--deep-ink); color: var(--deep); }
.sw { width: 14px; height: 14px; border-radius: 50%; flex: none; border: 1px solid rgb(128 128 128 / .6); }
.sw-blue { background: linear-gradient(180deg, #bfe3f2, #6fb3d6); }
.sw-white { background: #fff; }
.sw-black { background: #111; }
.b-stage[data-bg="blue"] { background: linear-gradient(180deg, #cfeaf6 0%, #8cc4e0 55%, #5f9fc4 100%); }
.b-stage[data-bg="white"] { background: linear-gradient(180deg, #ffffff, #eef1f0); }
.b-stage[data-bg="black"] { background: linear-gradient(180deg, #1a1d1c, #050606); }
.b-stage svg { max-height: 72vh; }

/* окно быстрого просмотра и страницы позиции и работы: рамка фото по пропорции самого снимка */
.project .art { flex: none; }
.gallery .art.photo { aspect-ratio: var(--pr, 4 / 5); max-height: 78vh; }
@media (min-width: 761px) {
  dialog.product .gallery { justify-content: center; }
  dialog.product .gallery .art.photo { aspect-ratio: var(--pr, 4 / 5); max-height: 80vh; }
}
@media (max-width: 760px) { .gallery .art.photo { aspect-ratio: var(--pr, 1); max-height: 70vh; } }
@media (min-width: 961px) and (max-width: 1100px) { .h-contacts .h-ico { display: none; } .nav { flex-shrink: 0; } }
/* плашка статуса на странице позиции стоит в строке, а не поверх фото */
.pd .status.pill { position: static; max-width: none; }
@media (max-width: 960px) { .toolbar .found { flex-basis: 100%; margin-right: 0; } .toolbar .sort { flex: 1 1 0; min-width: 0; } .toolbar .sort select { width: 100%; } .toolbar .filter-toggle { margin-left: 0; flex: 1 1 0; } }

/* v7.3: длинные слова и ссылки переносятся, а не вылезают за карточку */
.work-info .wi, .work-info dd, .work-details, .pd .info, .grid .item .body, .project .meta { min-width: 0; }
.work-info dt, .work-info dd, .work-info li, .work-story, .work-page .lead-sm, .work-page .tags li,
.pd h1, .pd h2, .pd .latin, .pd th, .pd td, .pd .note, .pd .sku,
.grid .item h3, .grid .item .attrs span, .project .meta h3, .project .meta p, .project .tags li,
.review blockquote, .service p, .answer, .cat .label { overflow-wrap: anywhere; }
/* фон не зависит от прокрутки и наведения: свой слой, всегда во весь экран */
.home-bg { transform: translateZ(0); backface-visibility: hidden; }

/* v7.3: плитки разделов на главной по форме фото, «кирпичная» раскладка без пустых полей */
.bento { display: block; columns: 3; column-gap: 14px; }
.bento .cat, .bento .cat.big { display: flex; flex-direction: column; break-inside: avoid; -webkit-column-break-inside: avoid; margin: 0 0 14px; grid-column: auto; grid-row: auto; }
.bento .cat .art { flex: none; aspect-ratio: var(--pr, 4 / 3); }
.bento .cat .art.photo img { object-fit: cover; }
.bento .cat .art.photo .ph-bg { display: none; }
.bento .cat:last-child:nth-child(n) { grid-column: auto; flex-direction: column; }
.bento .cat:last-child:nth-child(n) .label { border-top: 1px solid var(--line); border-left: 0; width: auto; display: block; }
.bento .cat:last-child:nth-child(n) .art { aspect-ratio: var(--pr, 4 / 3); }
.bento .cat.big h3 { font-size: clamp(18px, 1.8vw, 22px); }
@media (max-width: 760px) { .bento { columns: 2; column-gap: 10px; } .bento .cat, .bento .cat.big { margin-bottom: 10px; } }
/* колонки карточки товара не растягиваются под строку миниатюр: миниатюры прокручиваются внутри */
.pd { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.pd > * { min-width: 0; }
@media (max-width: 760px) { .pd { grid-template-columns: minmax(0, 1fr); } }

/* v7.4: телефон. Поля ввода не мельче 16 px, иначе iPhone увеличивает страницу при нажатии и не возвращает масштаб */
@media (max-width: 960px) {
  input, select, textarea, .sort select, .search input, dialog.contact textarea { font-size: 16px; }
}
/* окно товара: крестик закреплён и виден при прокрутке, на телефоне окно открывается шторкой во всю ширину */
dialog.product { overscroll-behavior: contain; }
dialog.product .close { position: sticky; top: 12px; float: right; margin: 12px 12px -56px 0; display: grid; place-items: center; z-index: 5; }
dialog.contact form[method="dialog"] { position: sticky; top: 0; float: right; z-index: 2; margin: -8px -8px 0 8px; }
dialog.contact .close { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); box-shadow: 0 2px 10px rgb(0 0 0 / .12); float: none; }
dialog.contact { max-height: calc(100dvh - 24px); overscroll-behavior: contain; }
@media (max-width: 760px) {
  dialog.product { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 22px 22px 0 0; max-height: 92vh; max-height: 92dvh; }
  dialog.product .close { width: 44px; height: 44px; }
  dialog.contact { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 22px 22px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); }
}

/* фото студии в блоке «Приходите в студию»: на компьютере «кирпичики» без обрезки, на телефоне лента с прокруткой пальцем */
.studio-gallery { columns: 3; column-gap: 12px; margin: 0 0 24px; }
.studio-gallery[data-n="1"] { columns: 1; max-width: 760px; }
.studio-gallery[data-n="2"] { columns: 2; }
.sg-item { display: block; width: 100%; padding: 0; margin: 0 0 12px; border: 0; border-radius: 18px; overflow: hidden; background: var(--surface); cursor: zoom-in; break-inside: avoid; -webkit-column-break-inside: avoid; aspect-ratio: var(--pr, 4 / 3); position: relative; box-shadow: 0 1px 0 var(--line); }
.sg-item .ph-bg { display: none; }
.sg-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.sg-item:hover img { transform: scale(1.03); }
.sg-item:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
@media (max-width: 760px) {
  .studio-gallery, .studio-gallery[data-n] { columns: auto; display: flex; align-items: center; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 calc(var(--gutter) * -1) 20px; padding: 0 var(--gutter) 6px; scrollbar-width: none; max-width: none; }
  .studio-gallery::-webkit-scrollbar { display: none; }
  .sg-item { flex: 0 0 auto; width: min(85vw, calc(260px * var(--pr, 1.333))); height: auto; margin: 0; scroll-snap-align: start; }
  .studio-gallery[data-n="1"] .sg-item { width: 100%; height: auto; }
}

/* просмотр фото на весь экран */
dialog.lightbox { border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; background: rgb(8 12 9 / .94); color: #fff; overscroll-behavior: contain; }
dialog.lightbox::backdrop { background: rgb(8 12 9 / .6); }
html.lb-open { overflow: hidden; }
.lb-top { position: fixed; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: calc(10px + env(safe-area-inset-top)) 12px 10px 18px; z-index: 3; }
.lb-count { font-size: 15px; opacity: .85; }
.lb-close, .lb-nav { width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgb(255 255 255 / .14); color: #fff; font-size: 30px; line-height: 1; display: grid; place-items: center; cursor: pointer; }
.lb-close:hover, .lb-nav:hover { background: rgb(255 255 255 / .26); }
.lb-fig { margin: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 70px 72px 24px; box-sizing: border-box; }
.lb-fig img { max-width: 100%; max-height: calc(100% - 30px); object-fit: contain; border-radius: 10px; }
.lb-fig figcaption { margin-top: 10px; font-size: 15px; opacity: .85; text-align: center; min-height: 20px; }
.lb-nav { position: fixed; top: 50%; transform: translateY(-50%); z-index: 3; }
.lb-prev { left: 12px; } .lb-next { right: 12px; }
@media (max-width: 760px) { .lb-fig { padding: 64px 8px 84px; } .lb-nav { top: auto; bottom: calc(18px + env(safe-area-inset-bottom)); transform: none; } .lb-prev { left: calc(50% - 60px); } .lb-next { right: calc(50% - 60px); } }
/* длинная кнопка «Скопировать текст и открыть ВКонтакте» переносится на узком телефоне */
dialog.contact .row .btn { white-space: normal; text-align: center; line-height: 1.25; padding-top: 12px; padding-bottom: 12px; min-width: 0; }
.pd .cta .btn { white-space: normal; text-align: center; line-height: 1.25; max-width: 100%; }
/* вкладки каталога на компьютере переносятся на вторую строку, а не прячутся за край; на телефоне лента с прокруткой, как раньше */
@media (min-width: 961px) { .tabs { flex-wrap: wrap; overflow: visible; margin: 0; padding-left: 0; padding-right: 0; } }

/* v7.9: видео в первом экране главной */
.hero-media { position: relative; min-width: 0; }
.hero-video { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: #0d1613 url("/assets/media/hero-poster.jpg") center / cover no-repeat; box-shadow: 0 30px 60px -30px rgb(0 0 0 / .45); }
.hero-video .hv, .hero-video .hv-m { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; border: 0; }
.hero-video .hv-m { display: none; }
.hv-sound { position: absolute; left: 14px; bottom: 14px; z-index: 2; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 16px 10px 14px; border: 1px solid rgb(255 255 255 / .5); border-radius: 999px; background: rgb(13 22 19 / .55); color: #fff; font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1; cursor: pointer; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: background .2s, color .2s; }
.hv-sound:hover, .hv-sound:focus-visible { background: #fff; color: var(--ink); }
.hv-sound .bars { display: inline-flex; align-items: flex-end; gap: 3px; height: 14px; }
.hv-sound .bars i { display: block; width: 3px; height: 5px; border-radius: 1px; background: #B5DB72; }
.hv-sound:hover .bars i, .hv-sound:focus-visible .bars i { background: var(--primary); }
.hv-sound[aria-pressed="true"] .bars i { animation: hv-eq 1.1s ease-in-out infinite; }
.hv-sound[aria-pressed="true"] .bars i:nth-child(2) { animation-delay: .25s; }
.hv-sound[aria-pressed="true"] .bars i:nth-child(3) { animation-delay: .5s; }
@keyframes hv-eq { 0%, 100% { height: 4px; } 50% { height: 14px; } }
.hv-credit { margin: 10px 4px 0; font-size: 12px; line-height: 1.4; color: var(--muted, #5b6660); }
.hv-credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 560px) {
  .hero-video { aspect-ratio: 4 / 5; background-image: url("/assets/media/hero-m-poster.jpg"); }
  .hero-video .hv { display: none; }
  .hero-video .hv-m { display: block; }
}
@media (prefers-reduced-motion: reduce) { .hv-sound .bars i { animation: none !important; } }
