/* ==========================================================================
   iКонструктор — стили
   ========================================================================== */

:root {
  --ink: #0b0b0b;
  --ink-2: #151515;
  --ink-3: #232323;
  --paper: #f1f0ec;
  --paper-2: #e8e7e2;
  --card: #fafaf8;
  --white: #fff;
  --line: rgba(11, 11, 11, .12);
  --line-dark: rgba(255, 255, 255, .14);
  --muted: #64645f;
  --muted-dark: #9c9c97;
  --accent: #d7b77f;

  --f-sans: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --f-pixel: "Tiny5", var(--f-mono);
  --f-bubble: "Russo One", "Golos Text", system-ui, sans-serif;
  --f-script: "Mr Dafoe", "Marck Script", cursive;

  --wrap: 1240px;
  --gut: clamp(16px, 4vw, 40px);
  --header-h: 68px;
  --sec-y: clamp(72px, 10vw, 132px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  background: var(--ink);
  color: var(--ink);
  font: 400 16px/1.55 var(--f-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button, input { font: inherit; color: inherit; }
::selection { background: var(--ink); color: var(--white); }
.dark ::selection { background: var(--white); color: var(--ink); }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gut) * 2); margin: 0 auto; padding: 0 var(--gut); }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--white); color: var(--ink); padding: 10px 14px; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px dashed currentColor; outline-offset: 4px; }

.dark  { background: var(--ink); color: var(--white); }
.light { background: var(--paper); color: var(--ink); }

/* ---------- Типографика ---------- */
.eyebrow {
  font: 500 12px/1 var(--f-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}
.eyebrow--dark, .dark .eyebrow { color: var(--muted-dark); }
.h2 {
  font-weight: 700;
  font-size: clamp(28px, 3.2vw, 46px);   /* один размер для всех заголовков блоков */
  line-height: 1.04;
  letter-spacing: -.03em;
  text-wrap: balance;
}
.h3 { font-weight: 700; font-size: clamp(22px, 2.2vw, 28px); letter-spacing: -.02em; line-height: 1.15; }
.lead { margin-top: 18px; max-width: 34em; font-size: clamp(16px, 1.3vw, 18px); color: var(--muted); }
.dark .lead { color: var(--muted-dark); }
.script {
  font-family: var(--f-script);
  font-weight: 400;
  line-height: 1;
  letter-spacing: .01em;
  white-space: nowrap;
}

/* ---------- Логотип ---------- */
.logo { fill: currentColor; width: 100%; height: auto; aspect-ratio: 1685 / 141; }

/* ---------- Кнопки (пиксельные углы) ---------- */
.btn {
  --s: 3px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 17px 24px;
  border: 0;
  font: 600 15px/1 var(--f-sans);
  letter-spacing: -.005em;
  cursor: pointer;
  white-space: nowrap;
  clip-path: polygon(
    var(--s) 0, calc(100% - var(--s)) 0, calc(100% - var(--s)) var(--s), 100% var(--s),
    100% calc(100% - var(--s)), calc(100% - var(--s)) calc(100% - var(--s)), calc(100% - var(--s)) 100%,
    var(--s) 100%, var(--s) calc(100% - var(--s)), 0 calc(100% - var(--s)), 0 var(--s), var(--s) var(--s));
  transition: background-color .2s, color .2s, transform .2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--sm { padding: 12px 16px; font-size: 14px; }
.btn--light { background: var(--white); color: var(--ink); }
.btn--light:hover { background: var(--accent); color: var(--ink); }
.btn--dark { background: var(--ink); color: var(--white); }
.btn--dark:hover { background: var(--accent); color: var(--ink); }
.btn--ghost-light { background: transparent; color: var(--white); box-shadow: inset 0 0 0 2px rgba(255,255,255,.35); }
.btn--ghost-light:hover { box-shadow: inset 0 0 0 2px var(--white); }
.px-arrow { width: 18px; height: auto; fill: currentColor; shape-rendering: crispEdges; transition: transform .25s var(--ease); }
.btn:hover .px-arrow { transform: translateX(4px); }

.px-icon { width: 28px; height: 28px; fill: currentColor; shape-rendering: crispEdges; flex: none; }

/* ---------- Пиксельная реплика (speech bubble) ---------- */
.bubble {
  --cell: 3px;
  position: relative;
  display: inline-block;
  max-width: 100%;
  padding: 8px 14px 10px;
  border: calc(var(--cell) * 4) solid transparent;
  border-image: url("../assets/bubble-light.svg") 4 fill / calc(var(--cell) * 4) stretch;
  color: var(--ink);
  font: 400 clamp(17px, 1.6vw, 21px)/1.25 var(--f-bubble);
  letter-spacing: .005em;
}
.bubble::after {
  content: "";
  position: absolute;
  left: calc(var(--cell) * 2);
  top: calc(100% + var(--cell) * 3);
  width: calc(var(--cell) * 8);
  height: calc(var(--cell) * 8);
  background: url("../assets/tail-light.svg") 0 0 / 100% 100% no-repeat;
}
.bubble--dark { border-image-source: url("../assets/bubble-dark.svg"); }
.bubble--dark::after {
  top: calc(100% + var(--cell));
  width: calc(var(--cell) * 10);
  height: calc(var(--cell) * 10);
  background-image: url("../assets/tail-dark.svg");
}
.caret {
  display: inline-block;
  width: .46em;
  height: .86em;
  margin-left: .08em;
  vertical-align: -.1em;
  background: currentColor;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }


/* ---------- Маскот + облачко: всё в координатах картинки маскота (985×1395),
   поэтому облачко всегда одинакового вида относительно маскота и не зависит от ширины экрана ---------- */
/* --u = высота маскота / 1395; скрипт пересчитывает при изменении размера, 0.5px — запасное значение без JS */
.stage { position: absolute; left: 0; bottom: 0; display: block; --u: 0.5px; }
.stage__img { display: block; height: 100%; width: auto; max-width: none; }
.stage__bubble {
  position: absolute;
  left: calc(692 * var(--u));
  top: calc(-62 * var(--u));
  width: calc(461 * var(--u));
  max-width: none;
  display: block;
  --cell: calc(5.5 * var(--u));
  padding: calc(16 * var(--u)) calc(28 * var(--u)) calc(24 * var(--u));
  font-size: calc(52 * var(--u));
  line-height: 1.21;
  letter-spacing: 0;
  text-wrap: wrap;
  margin: 0;
}
.bubble__ghost { color: transparent; }
.bubble__live { position: absolute; left: 0; top: 0; right: 0; padding: inherit; }
html.no-js .bubble__ghost, .bubble.is-static .bubble__ghost { color: inherit; }
.bubble.is-static .bubble__live { display: none; }
.stage__sign { position: absolute; left: calc(720 * var(--u)); top: calc(330 * var(--u)); font-size: calc(110 * var(--u)); transform: rotate(-10deg); }

/* дизеринг-фон */
.dither {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255,255,255,.16) 1.1px, transparent 1.6px) 0 0 / 9px 9px;
  -webkit-mask: radial-gradient(closest-side, #000 20%, transparent 100%);
          mask: radial-gradient(closest-side, #000 20%, transparent 100%);
  pointer-events: none;
}

/* ---------- Появление при скролле ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ==========================================================================
   Шапка
   ========================================================================== */
.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  color: var(--white);
  transition: background-color .3s, box-shadow .3s;
}
.header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(11, 11, 11, .86);
  -webkit-backdrop-filter: blur(14px);
          backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line-dark);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.header.is-scrolled::before { opacity: 1; }
.header__in { height: 100%; display: flex; align-items: center; gap: 32px; }
.header__logo { width: 150px; flex: none; }
.nav { display: flex; align-items: center; gap: 28px; margin-left: auto; font-size: 14px; }
.nav a:not(.btn) { position: relative; opacity: .78; transition: opacity .2s; }
.nav a:not(.btn):hover { opacity: 1; }
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease);
}
.nav a:not(.btn):hover::after { transform: scaleX(1); }
.nav__cta { display: none; }
.burger { display: none; }

@media (max-width: 1080px) {
  :root { --header-h: 52px; }
  .header__in { gap: 12px; }
  .header__cta { margin-left: auto; }
  .burger {
    display: grid; place-content: center; gap: 5px;
    width: 40px; height: 40px; padding: 0; border: 0; background: transparent; cursor: pointer;
  }
  .burger span { display: block; width: 22px; height: 2px; background: currentColor; transition: transform .3s var(--ease), opacity .2s; }
  .menu-open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-open .burger span:nth-child(2) { opacity: 0; }
  .menu-open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav {
    position: fixed;
    inset: var(--header-h) 0 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 12px var(--gut) 32px;
    background: var(--ink);
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -.02em;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .25s, transform .3s var(--ease), visibility 0s .3s;
  }
  .nav a:not(.btn) { opacity: 1; padding: 16px 0; border-bottom: 1px solid var(--line-dark); }
  .nav a:not(.btn)::after { display: none; }
  .nav__cta { display: inline-flex; margin-top: 28px; font-size: 16px; }
  .menu-open .nav { opacity: 1; visibility: visible; transform: none; transition: opacity .25s, transform .3s var(--ease); }
  .menu-open { overflow: hidden; }
  .menu-open .header { background: var(--ink); }
}
@media (max-width: 420px) { .header__logo { width: 124px; } .header__cta { display: none; } .burger { margin-left: auto; } }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { position: relative; padding-top: var(--header-h); overflow: hidden; }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 24px;
  min-height: min(860px, calc(100svh - var(--header-h) - 58px));
}
.hero__text { padding: clamp(40px, 7vh, 88px) 0 clamp(56px, 9vh, 104px); align-self: center; }
.hero__title { margin: 0; }
.hero__logo { width: min(100%, 600px); }
.hero__slogan {
  display: block;
  margin-top: 26px;
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.1;
}
.hero__lead { margin-top: 18px; max-width: 30em; color: var(--muted-dark); font-size: clamp(15px, 1.2vw, 17px); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero__model { display: flex; align-items: baseline; gap: 14px; margin-top: 48px; }
.hero__num { font: 400 46px/1 var(--f-pixel); }
.hero__name { font-size: 18px; color: var(--muted-dark); }
.features {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: 40px;
  padding-top: 36px;
  border-top: 1px solid var(--line-dark);
  font-size: 14px;
  line-height: 1.35;
  color: #cfcfca;
}
.features li { display: flex; flex-direction: column; gap: 16px; }
.features__ico { display: block; width: 38px; height: 38px; object-fit: contain; object-position: left center; }

.hero__visual { position: relative; min-height: 520px; }
.hero__visual .dither { inset: 4% -20% -10% -10%; }
.hero__stage { height: min(94%, 760px); filter: drop-shadow(0 30px 60px rgba(0,0,0,.5)); }
@media (min-width: 961px) and (max-width: 1240px) { .hero__stage { height: min(86%, 760px); } }   /* на узких ноутбуках облачко не должно упираться в край */
.hero__script {
  position: absolute;
  right: 0;
  bottom: 12%;
  font-size: clamp(34px, 3.6vw, 52px);
  transform: rotate(-12deg);
  opacity: .9;
}

/* бегущая строка */
.ticker {
  position: relative;
  border-top: 1px solid var(--line-dark);
  overflow: hidden;
  font: 500 12px/1 var(--f-mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #d6d6d1;
}
.ticker__track { display: flex; align-items: center; width: max-content; padding: 11px 0; animation: ticker 40s linear infinite; }
.ticker span, .ticker i { flex: none; padding: 0 22px; font-style: normal; }
.ticker i { display: flex; color: var(--muted-dark); }
.bolt { display: block; width: 17px; height: 17px; }
@keyframes ticker { to { transform: translateX(-50%); } }

@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; min-height: 0; gap: 0; padding-top: 28px; }
  .hero__text { display: contents; }      /* дети .hero__text становятся элементами сетки, чтобы поставить подписи под Джобса */
  .hero__visual { order: 1; }
  .features { order: 2; margin: 0; padding: 44px 0 56px; }
  .hero__visual { min-height: 0; height: clamp(380px, 110vw, 620px); margin: 0 calc(var(--gut) * -1); }
  .hero__stage { left: 4%; height: 92%; }
  .hero__script { right: 6%; bottom: 10%; }
}
@media (max-width: 560px) {
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 16px; padding: 40px 0 52px; }
  .features li { flex-direction: row; align-items: center; gap: 14px; }
  .features__ico { width: 34px; height: 34px; flex: none; object-position: center; }
  .hero__actions .btn { flex: 1 1 auto; }
  .hero__visual { height: clamp(360px, 112vw, 520px); }
  .hero__visual { margin-top: 18px; }
  .hero__stage { left: 1%; height: 100%; }
  .hero__model { margin-top: 36px; }
}

/* ==========================================================================
   Интерактивная разборка
   ========================================================================== */
.explode__track { height: 280vh; position: relative; }
.explode__sticky {
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  padding: 32px 0 28px;                 /* отступ сверху и снизу, чтобы заголовок не прилипал к бегущей строке */
  display: flex;
  align-items: center;
  overflow: hidden;
}
.explode__grid {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
}
.explode__hint {
  display: flex; align-items: center; gap: 10px;
  margin-top: 26px;
  font: 500 12px/1.3 var(--f-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.explode__hint svg { width: 9px; height: 16px; transform: rotate(180deg); fill: currentColor; shape-rendering: crispEdges; animation: nudge 1.6s var(--ease) infinite; }
@keyframes nudge { 50% { transform: rotate(180deg) translateY(-4px); } }
.parts-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
  margin-top: 28px;
  font-size: 14px;
}
.parts-list li {
  display: flex; gap: 12px; align-items: baseline;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  opacity: .5;
  transition: opacity .3s, color .3s;
}
.parts-list li b { font: 700 11px/1 var(--f-mono); }
.parts-list li.is-on { opacity: 1; color: var(--ink); }

.explode__stage { position: relative; display: grid; justify-items: center; }
.scene {
  width: min(100%, calc((100vh - var(--header-h) - 150px) * 1.232));
  min-width: 260px;
  aspect-ratio: 1200 / 974;
}
.exploded { width: 100%; height: 100%; overflow: visible; }
.exploded .part { transform-box: fill-box; transform-origin: center; will-change: transform; }
.exploded image { image-rendering: auto; }
.exploded .labels { opacity: 0; }
.exploded .lines { opacity: 0; fill: none; stroke: #5b5b60; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.exploded .lines circle { stroke-width: 1; }
.exploded .lines .dot { fill: #5b5b60; stroke: none; }

.explode__meter {
  display: flex; align-items: center; gap: 14px;
  width: min(100%, calc((100vh - var(--header-h) - 150px) * 1.232));
  margin-top: 22px;
  font: 500 12px/1 var(--f-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.meter { flex: 1; height: 8px; background: var(--paper-2); position: relative; overflow: hidden; }
.meter__bar {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, var(--ink) 0 6px, transparent 6px 8px);
  transform-origin: left; transform: scaleX(0);
}
.meter__val { width: 4ch; text-align: right; }
.explode__script {
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  font-size: clamp(22px, 1.9vw, 28px);
  line-height: 1.05;
  transform: rotate(-8deg);
  text-align: right;
  color: var(--ink);
  opacity: .8;
}

@media (max-width: 960px) {
  .explode__track { height: 240vh; }
  .explode__grid { grid-template-columns: 1fr; gap: 18px; align-content: center; }
  .explode__text .lead { margin-top: 10px; font-size: 15px; }
  .explode__text .eyebrow { margin-bottom: 10px; }
  .parts-list, .explode__script { display: none; }
  .explode__hint { margin-top: 12px; }
  .scene, .explode__meter { width: min(100%, calc((100svh - var(--header-h) - 290px) * 1.232)); }
  .exploded .labels { display: none; }   /* на телефоне подписи были бы мельче читаемого */
  .explode__meter { margin-top: 14px; }
}
@media (max-width: 960px) and (max-height: 640px) {
  .explode__text .lead { display: none; }
}

/* ==========================================================================
   Общие секции
   ========================================================================== */
.section { padding: var(--sec-y) 0; }
.section--alt { background: var(--paper-2); }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: clamp(36px, 5vw, 60px); }

/* ---------- Что внутри ---------- */
.kit { display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); gap: 16px; }
.kit__item {
  display: flex; flex-direction: column;
  padding: 16px 16px 22px;
  background: var(--card);
  border: 1px solid var(--line);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.kit__item:hover { transform: translateY(-4px); box-shadow: 0 22px 40px -24px rgba(0,0,0,.35); }
.kit__pic { aspect-ratio: 1; margin-bottom: 18px; background: var(--paper); display: grid; place-items: center; }
.kit__pic svg { width: 86%; height: 86%; }
.kit__pic--photo { overflow: hidden; }
.kit__pic--photo img { width: 100%; height: 100%; object-fit: cover; }
.kit__item h3 { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.kit__item p { margin-top: 6px; font-size: 14px; color: var(--muted); line-height: 1.45; }
.kit__item:nth-child(2) { transition-delay: .05s; }
.kit__item:nth-child(3) { transition-delay: .1s; }
.kit__item:nth-child(4) { transition-delay: .15s; }
.kit__item:nth-child(5) { transition-delay: .2s; }
@media (max-width: 1080px) { .kit { grid-template-columns: repeat(var(--md, 3), minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .kit { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kit__item { padding: 10px 10px 16px; }
  .kit__item h3 { font-size: 15px; }
  .kit__item p { font-size: 13px; }
}

/* ---------- Шаги ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 2px solid var(--ink);
  counter-reset: s;
}
.step { padding: 26px 24px 8px 0; position: relative; }
.step + .step { padding-left: 24px; border-left: 1px solid var(--line); }
.step__n { font: 400 42px/1 var(--f-pixel); display: block; margin-bottom: 26px; }
.step h3 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.step p { margin-top: 8px; color: var(--muted); font-size: 15px; }
@media (max-width: 860px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step:nth-child(3) { border-left: 0; padding-left: 0; }
  .step:nth-child(n+3) { border-top: 1px solid var(--line); margin-top: 18px; }
}
@media (max-width: 480px) {
  .steps { grid-template-columns: 1fr; }
  .step, .step + .step { padding: 22px 0 18px; border-left: 0; display: grid; grid-template-columns: 64px 1fr; column-gap: 8px; }
  .step + .step { border-top: 1px solid var(--line); margin-top: 0; }
  .step__n { grid-row: span 2; margin: 0; font-size: 32px; }
}

/* ---------- Буклет ---------- */
.booklet { margin-top: clamp(56px, 8vw, 96px); }
.booklet__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.booklet__nav { display: flex; align-items: center; gap: 8px; }
.booklet__count { font: 500 13px var(--f-mono); margin-right: 8px; color: var(--muted); white-space: nowrap; }
.round-btn {
  width: 46px; height: 46px; border: 0; padding: 0;
  display: grid; place-items: center;
  background: var(--ink); color: var(--white);
  cursor: pointer;
  clip-path: polygon(3px 0, calc(100% - 3px) 0, calc(100% - 3px) 3px, 100% 3px, 100% calc(100% - 3px), calc(100% - 3px) calc(100% - 3px), calc(100% - 3px) 100%, 3px 100%, 3px calc(100% - 3px), 0 calc(100% - 3px), 0 3px, 3px 3px);
  transition: background-color .2s, opacity .2s;
}
.round-btn:hover { background: var(--accent); color: var(--ink); }
.round-btn:disabled { opacity: .3; cursor: default; background: var(--ink); color: var(--white); }
.round-btn svg { width: 16px; fill: currentColor; shape-rendering: crispEdges; }

.booklet__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(420px, 80vw);
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 6px 0 28px;
  margin: 0 calc(var(--gut) * -1);
  padding-inline: var(--gut);
  scroll-padding-inline: var(--gut);
  scrollbar-width: thin;
  scrollbar-color: var(--ink) transparent;
  outline-offset: -2px;
}
.page {
  position: relative;
  scroll-snap-align: start;
  display: flex; flex-direction: column;
  min-height: 500px;
  padding: 26px 24px 0;
  background: #f8f7f3;
  box-shadow: 0 1px 0 rgba(0,0,0,.06), 0 18px 34px -24px rgba(0,0,0,.35);
  overflow: hidden;
}
.page:nth-child(odd) { background: linear-gradient(90deg, #f8f7f3 92%, #ecebe6); }
.page:nth-child(even) { background: linear-gradient(90deg, #e9e8e3, #f8f7f3 8%); }
.page.page--img { display: block; min-height: 0; aspect-ratio: 1; padding: 0; margin: 0; background: #fff; }
.page--img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.carousel.is-static .booklet__nav, [data-carousel].is-static .booklet__nav { display: none; }
.page__step { font: 500 13px var(--f-mono); color: var(--muted); margin-bottom: 4px; }
.page__title { font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.page__text { margin-top: 10px; font-size: 14px; color: #3b3b38; max-width: 26em; }
.page__ill { margin: 20px auto 0; width: 100%; height: auto; }
.page__checks { margin-top: 18px; display: grid; gap: 14px; font-size: 14px; }
.page__checks li { display: flex; gap: 14px; align-items: center; }
.page__checks .px-icon { width: 24px; height: 24px; }
.page__foot { margin-top: auto; display: flex; align-items: flex-end; gap: 4px; padding-top: 18px; }
.bust { flex: none; width: 46%; aspect-ratio: 985 / 640; overflow: hidden; }
.bust img { width: 100%; height: auto; }
.bust--big { width: 62%; aspect-ratio: 985 / 900; }
.page__bubble {
  --cell: 2px;
  align-self: flex-start;
  margin-bottom: 26px;
  font-size: 15px;
  padding: 4px 8px 6px;
}
.page__bubble::after { display: none; }
.page__bubble::before {
  content: "";
  position: absolute;
  left: calc(var(--cell) * -9);
  top: 30%;
  width: calc(var(--cell) * 8);
  height: calc(var(--cell) * 8);
  background: url("../assets/tail-light.svg") 0 0 / 100% 100% no-repeat;
  transform: rotate(90deg) scaleY(-1);
}
.page__no { position: absolute; right: 18px; bottom: 14px; font: 500 11px var(--f-mono); color: var(--muted); }
.page--final .page__title { font-size: 26px; }
.page--final .page__text { font-size: 18px; font-weight: 600; color: var(--ink); }
.page__script { position: absolute; right: 22px; bottom: 44px; font-size: 34px; transform: rotate(-10deg); }

/* ---------- Цитата ---------- */
.quote { position: relative; overflow: hidden; }
.quote__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 80px); align-items: center; }
.quote__visual { position: relative; align-self: end; height: clamp(420px, 44vw, 600px); }
.quote__visual .dither { inset: 0 -10% 0 -20%; }
.quote__stage { height: 100%; }
.quote__text { padding: var(--sec-y) 0; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--line-dark); }
.stats dt { font: 400 clamp(38px, 4vw, 54px)/1 var(--f-pixel); }
.stats dd { margin-top: 8px; font-size: 14px; color: var(--muted-dark); line-height: 1.35; }
@media (max-width: 900px) {
  .quote__grid { grid-template-columns: 1fr; }
  .quote__text { padding: var(--sec-y) 0 0; order: -1; }
  .quote__visual { height: clamp(400px, 112vw, 540px); margin-top: 48px; }
  .quote__stage { left: -2%; }
}
@media (max-width: 560px) {
  .quote__stage { left: 0; height: 100%; }
  .stats dd { font-size: 13px; }
}

/* ---------- Паспорт ---------- */
.passport { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.passport__form { display: grid; gap: 14px; margin-top: 34px; max-width: 440px; }
.field { display: grid; gap: 8px; }
.field span { font: 500 11px var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.field input {
  width: 100%;
  padding: 15px 16px;
  border: 0;
  background: var(--white);
  box-shadow: inset 0 0 0 1.5px var(--line);
  font-size: 16px;
  transition: box-shadow .2s;
  border-radius: 0;
  -webkit-appearance: none;
}
.field input:hover { box-shadow: inset 0 0 0 1.5px rgba(0,0,0,.3); }
.field input:focus { outline: 0; box-shadow: inset 0 0 0 2px var(--ink); }
.field input.is-invalid { box-shadow: inset 0 0 0 2px #d0342c; }

.card {
  position: relative;
  justify-self: center;
  width: min(100%, 460px);
  aspect-ratio: 5 / 6.4;
  padding: clamp(22px, 3vw, 34px);
  background: var(--ink);
  color: var(--white);
  display: flex; flex-direction: column;
  box-shadow: 0 50px 80px -40px rgba(0,0,0,.6);
  transform: rotate(2deg);
  transition: transform .5s var(--ease);
  overflow: hidden;
}
.card:hover { transform: rotate(0); }
.card__top { display: grid; gap: 10px; }
.card__top .logo { width: 140px; }
.card__top span { font: 500 13px var(--f-mono); letter-spacing: .14em; text-transform: uppercase; }
.card__body { display: grid; grid-template-columns: 52px 1fr; gap: 22px; margin-top: 30px; }
.card__phone { width: 44px; height: auto; color: var(--white); }
.card__rows { display: grid; gap: 0; }
.card__rows div { display: grid; grid-template-columns: 1fr 1.25fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-dark); font-size: 13px; }
.card__rows dt { color: var(--muted-dark); font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; align-self: center; }
.card__rows dd { font-family: var(--f-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card__rows dd.is-typed { color: var(--accent); }
.card__foot { margin-top: auto; display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; font-size: 12px; color: #cfcfca; }
.card__foot .script { font-size: 34px; color: var(--white); transform: rotate(-8deg); }
.card__stamp {
  position: absolute; right: 22px; top: 92px;
  padding: 6px 10px;
  font: 400 18px/1 var(--f-pixel);
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
  box-shadow: inset 0 0 0 3px var(--accent);
  transform: rotate(-14deg) scale(1.6);
  opacity: 0;
  transition: opacity .25s, transform .35s cubic-bezier(.3, 1.6, .5, 1);
}
.card.is-signed .card__stamp { opacity: .95; transform: rotate(-14deg) scale(1); }
@media (max-width: 860px) {
  .passport { grid-template-columns: 1fr; }
  .card { margin-top: 8px; }
}
@media (max-width: 420px) {
  .card { aspect-ratio: auto; min-height: 480px; }
  .card__body { grid-template-columns: 1fr; gap: 16px; }
  .card__rows div { grid-template-columns: 1fr 1.1fr; }
}

/* ---------- Коллекция ---------- */
.collection { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.device {
  position: relative;
  padding: 16px 16px 22px;
  background: var(--card);
  border: 1px solid var(--line);
  text-align: center;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.device__pic { aspect-ratio: 3 / 4; display: grid; place-items: center; margin-bottom: 12px; }
.device__pic img { width: 100%; height: 100%; object-fit: cover; }
.device__pic svg { width: 78%; height: auto; filter: grayscale(1); opacity: .55; transition: filter .4s, opacity .4s, transform .5s var(--ease); }
.device:hover .device__pic svg { filter: none; opacity: 1; transform: translateY(-6px) rotate(-3deg); }
.device--live { box-shadow: inset 0 0 0 2px var(--ink); }
.device--live .device__pic svg { filter: none; opacity: 1; }
.device--secret .device__pic svg { opacity: .9; }
.device__no { font: 400 22px/1 var(--f-pixel); }
.device h3 { margin-top: 6px; font-size: 16px; font-weight: 700; }
.device__st { margin-top: 4px; font: 500 11px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.device__st--on { color: var(--ink); }
.device__st--on::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; background: #29b35a; vertical-align: 1px; animation: blink 1.4s steps(1) infinite; }
@media (max-width: 960px) {
  .collection {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: min(220px, 56vw);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin: 0 calc(var(--gut) * -1);
    padding: 4px var(--gut) 18px;
    scroll-padding-inline: var(--gut);
    scrollbar-width: none;
  }
  .collection::-webkit-scrollbar { display: none; }
  .device { scroll-snap-align: start; }
}

/* ---------- Реальные фото 16:9 ---------- */
.photo-gallery { margin-top: clamp(56px, 8vw, 96px); scroll-margin-top: calc(var(--header-h) + 24px); }
.photo-gallery .eyebrow { margin-bottom: 10px; }
.photo-gallery__track {
  display: flex; gap: 20px; overflow-x: auto;
  scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  scrollbar-width: thin; scrollbar-color: var(--muted) transparent;
  padding-bottom: 14px;
}
.photo-gallery__track:focus-visible { outline: 2px solid var(--ink); outline-offset: 5px; }
.photo-gallery__item { flex: 0 0 78%; min-width: 0; margin: 0; scroll-snap-align: start; }
.photo-gallery__item:only-child { flex-basis: 100%; }
.photo-gallery__item img {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 9;
  object-fit: cover; background: var(--card); border: 1px solid var(--line);
}
.photo-gallery__item figcaption { padding-top: 12px; font-size: 14px; line-height: 1.5; color: var(--muted); }
@media (max-width: 600px) {
  .photo-gallery .booklet__head { flex-wrap: wrap; }
  .photo-gallery .booklet__nav { margin-left: auto; }
  .photo-gallery__track { gap: 12px; }
  .photo-gallery__item { flex-basis: 92%; }
}

/* ---------- Отзывы ---------- */
.reviews {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(460px, 80vw);   /* следующая карточка выглядывает справа — видно, что есть ещё */
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  margin: 0 calc(var(--gut) * -1);
  padding: 4px var(--gut) 24px;
  scroll-padding-inline: var(--gut);
  scrollbar-width: none;
  outline-offset: -2px;
}
.reviews::-webkit-scrollbar { display: none; }
.review {
  scroll-snap-align: start;
  display: flex; flex-direction: column; justify-content: space-between; gap: 28px;
  padding: 28px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 16px;
  line-height: 1.5;
}
.review__who { display: flex; align-items: center; gap: 14px; }
.review__who b { display: block; font-size: 15px; }
.ava {
  width: 44px; height: 44px; flex: none;
  display: grid; place-items: center;
  background: var(--ink); color: var(--white);
  font: 400 20px/1 var(--f-pixel);
}
img.ava { object-fit: cover; padding: 0; }
.stars { font-size: 12px; letter-spacing: 2px; color: var(--ink); }
/* ---------- FAQ ---------- */
.faq { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.faq__list { border-top: 2px solid var(--ink); }
.qa { border-bottom: 1px solid var(--line); }
.qa summary {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 22px 0;
  font-size: clamp(17px, 1.5vw, 20px);
  font-weight: 600;
  letter-spacing: -.01em;
  cursor: pointer;
  list-style: none;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: "+";
  flex: none;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  font: 400 22px/1 var(--f-pixel);
  background: var(--ink); color: var(--white);
  transition: transform .3s var(--ease), background-color .2s;
}
.qa[open] summary::after { transform: rotate(45deg); background: var(--accent); color: var(--ink); }
.qa p { padding: 0 48px 24px 0; color: var(--muted); max-width: 40em; }
@media (max-width: 860px) { .faq { grid-template-columns: 1fr; } }

/* ---------- Заказ ---------- */
.order { position: relative; overflow: hidden; padding-top: var(--sec-y); }
.order__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 80px); }
.order__text { padding-bottom: var(--sec-y); }
.order__form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 34px; max-width: 560px; }
.order__form .field--wide { grid-column: 1 / -1; }
.order__hint { grid-column: 1 / -1; margin: -2px 0 0; font-size: 13px; color: var(--muted); }
.order__form .btn { grid-column: 1 / -1; justify-self: start; margin-top: 8px; }
.order__price { margin-top: 22px; font: 400 clamp(30px, 3vw, 40px)/1 var(--f-bubble); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.order__note { grid-column: 1 / -1; min-height: 1.5em; font: 500 13px var(--f-mono); color: var(--muted); }
.order__note.is-ok { color: var(--ink); }
.order__visual { position: relative; align-self: end; height: clamp(420px, 42vw, 580px); }
.order__stage { left: 4%; height: 100%; }
.order__script { position: absolute; right: 2%; bottom: 14%; font-size: clamp(34px, 3.4vw, 48px); transform: rotate(-12deg); }
@media (max-width: 860px) {
  .order__grid { grid-template-columns: 1fr; }
  .order__text { padding-bottom: 0; }
  .order__visual { height: clamp(400px, 112vw, 540px); margin-top: 48px; }
  .order__stage { left: 0; }
}
@media (max-width: 560px) {
  .order__form { grid-template-columns: 1fr; }
  .order__form .btn { justify-self: stretch; }
}

/* ---------- Подвал ---------- */
.footer { padding: 56px 0 32px; }
.footer__top { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; padding-bottom: 36px; border-bottom: 1px solid var(--line-dark); }
.footer__logo { width: 190px; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-left: auto; font-size: 14px; color: #cfcfca; }
.footer__nav a:hover, .footer__soc a:hover { color: var(--white); }
.footer__soc { display: flex; gap: 8px; }
.footer__soc a {
  width: 40px; height: 40px; display: grid; place-items: center;
  font: 400 13px/1 var(--f-pixel);
  color: #cfcfca;
  box-shadow: inset 0 0 0 1.5px var(--line-dark);
  transition: box-shadow .2s, color .2s;
}
.footer__soc a:hover { box-shadow: inset 0 0 0 1.5px var(--white); }
.footer__bottom { display: flex; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; padding-top: 24px; font-size: 13px; color: var(--muted-dark); }
@media (max-width: 760px) {
  .footer__top { flex-direction: column; align-items: flex-start; gap: 24px; }
  .footer__nav { margin-left: 0; }
}

/* ---------- Без анимаций ---------- */
/* ---------- Плавающий док и окно связи ---------- */
.contact-dock[hidden] { display: none; }
.contact-dock {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: calc(100% - 32px);
  padding: 7px 7px 7px 22px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 18px;
  background: rgba(21, 21, 21, .96);
  color: var(--paper);
  box-shadow: 0 8px 32px rgba(0, 0, 0, .25), inset 0 1px rgba(255, 255, 255, .06);
  backdrop-filter: blur(16px);
}
.contact-dock__caption { display: flex; align-items: center; gap: 9px; white-space: nowrap; font: 400 11px/1 var(--f-mono); }
.contact-dot { display: inline-block; flex: 0 0 auto; width: 6px; height: 6px; background: var(--accent); box-shadow: 0 0 0 3px rgba(215, 183, 127, .1); }
.contact-dock__button {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 19px; border: 0; border-radius: 11px;
  background: var(--paper); color: var(--ink); cursor: pointer;
  font-size: 14px; font-weight: 600;
  transition: background .2s, transform .2s;
}
.contact-dock__button svg { width: 20px; height: 20px; }
.contact-dock__button:hover { background: var(--accent); transform: translateY(-1px); }
.contact-open { overflow: hidden; }
html:has(.contact-dock:not([hidden])) .footer { padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)); }
.contact-dialog {
  position: fixed; inset: 0; margin: auto;
  width: min(460px, calc(100% - 32px)); max-height: calc(100dvh - 40px);
  padding: 0; border: 1px solid rgba(11, 11, 11, .16); border-radius: 20px;
  overflow: auto; background: var(--paper); color: var(--ink);
  box-shadow: 0 32px 100px rgba(0, 0, 0, .3);
}
.contact-dialog::backdrop { background: rgba(0, 0, 0, .65); backdrop-filter: blur(5px); }
.contact-dialog[open] { animation: contact-appear .24s var(--ease) both; }
.contact-dialog__body { position: relative; padding: 34px 30px 22px; }
.contact-dialog__close {
  position: absolute; top: 17px; right: 17px; display: grid; place-items: center;
  width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 50%;
  background: transparent; cursor: pointer; transition: background .2s;
}
.contact-dialog__close:hover { background: var(--paper-2); }
.contact-dialog__close svg { width: 18px; height: 18px; }
.contact-dialog__eyebrow { display: flex; align-items: center; gap: 9px; padding-right: 22px; color: var(--muted); font: 400 10px/1.5 var(--f-mono); letter-spacing: .045em; text-transform: uppercase; }
.contact-dialog__intro { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 26px; }
.contact-dialog__intro h2 { font-size: clamp(26px, 5.8vw, 32px); line-height: 1.08; font-weight: 700; letter-spacing: -.045em; }
.contact-dialog__mascot { flex: 0 0 65px; height: 84px; overflow: hidden; }
.contact-dialog__mascot img { width: 65px; height: auto; }
#contact-description { margin-top: 14px; color: var(--muted); font-size: 14px; line-height: 1.65; max-width: 330px; }
.contact-dialog__channels { display: grid; gap: 10px; margin-top: 25px; }
.contact-channel {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 17px 16px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--card);
  color: var(--ink); text-align: left; cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s;
}
.contact-channel:hover { border-color: var(--ink); background: var(--paper-2); transform: translateY(-2px); }
.contact-channel__icon { display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px; background: var(--ink); color: var(--paper); border-radius: 9px; }
.contact-channel__icon svg { width: 27px; height: 27px; }
.contact-channel__text { display: grid; gap: 4px; }
.contact-channel__text strong { font-size: 15px; font-weight: 600; line-height: 1.3; }
.contact-channel__text > span { font-size: 11px; color: var(--muted); }
.contact-channel__arrow { margin-left: auto; font-size: 23px; }
.contact-dialog__status { margin-top: 14px; font-size: 12px; line-height: 1.6; color: var(--muted); }
.contact-dialog__foot { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); margin-top: 26px; padding-top: 16px; color: var(--muted); font: 400 10px/1.4 var(--f-mono); }
.contact-dialog__foot > span { color: var(--ink); font-size: 20px; }
@keyframes contact-appear { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@media (max-width: 480px) {
  .contact-dock { bottom: calc(12px + env(safe-area-inset-bottom, 0px)); gap: 17px; padding-left: 17px; }
  .contact-dialog__body { padding: 30px 22px 20px; }
  .contact-channel { padding: 15px 12px; gap: 11px; }
  .contact-channel__text strong { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .explode__track { height: auto; }
  .explode__sticky { position: static; height: auto; padding: var(--sec-y) 0; }
}

/* Самостоятельные блоки: процесс, фотографии и инструкция. */
.photo-gallery-section .photo-gallery, .instruction-section .booklet { margin-top: 0; }
#how + .photo-gallery-section, #how + .instruction-section,
.photo-gallery-section + .instruction-section { padding-top: 0; }

/* ---------- Просмотр фотографий и увеличение ---------- */
.photo-gallery__zoom { display:block; position:relative; cursor:zoom-in; color:inherit; text-decoration:none; }
.photo-gallery__zoom:focus-visible { outline:3px solid var(--accent); outline-offset:4px; }
.photo-gallery__zoom-hint { position:absolute; right:14px; bottom:14px; display:grid; place-items:center; width:36px; height:36px; background:#111c; color:#fff; border:1px solid #fff7; font:24px/1 system-ui; pointer-events:none; }
.gallery-open { overflow:hidden; }
.gallery-viewer { width:min(1500px,96vw); max-width:96vw; max-height:96dvh; padding:0; border:1px solid #ffffff30; background:#111; color:#fff; margin:auto; }
.gallery-viewer::backdrop { background:#000d; }
.gallery-viewer__shell { display:flex; flex-direction:column; max-height:94dvh; padding:12px; }
.gallery-viewer__title { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.gallery-viewer__toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; padding-bottom:10px; }
.gallery-viewer button { display:grid; place-items:center; flex-shrink:0; min-width:44px; min-height:44px; padding:6px 12px; border:1px solid #ffffff45; background:#222; color:#fff; cursor:pointer; font:22px/1.2 system-ui; border-radius:0; }
.gallery-viewer button:hover:not(:disabled) { background:#444; }
.gallery-viewer button:disabled { opacity:.3; cursor:default; }
.gallery-viewer button:focus-visible,.gallery-viewer__viewport:focus-visible { outline:2px solid #fff; outline-offset:2px; }
.gallery-viewer [data-photo-reset] { min-width:76px; font-size:14px; }
.gallery-viewer__count { min-width:52px; font:13px var(--f-mono); }
.gallery-viewer__scale { display:flex; gap:5px; }
.gallery-viewer__close { font-size:30px!important; }
.gallery-viewer__body { display:grid; grid-template-columns:44px minmax(0,1fr) 44px; align-items:center; gap:8px; min-height:0; }
.gallery-viewer__viewport { grid-column:2; grid-row:1; position:relative; width:100%; height:min(72dvh,900px); overflow:auto; overscroll-behavior:contain; background:#080808; }
.gallery-viewer__viewport.is-zoomed { cursor:grab; touch-action:none; }
.gallery-viewer__viewport.is-zoomed:active { cursor:grabbing; }
.gallery-viewer__stage { display:grid; place-items:center; }
.gallery-viewer__image { display:block; flex-shrink:0; max-width:none; max-height:none; object-fit:contain; cursor:zoom-in; user-select:none; -webkit-user-drag:none; }
.gallery-viewer__viewport.is-zoomed .gallery-viewer__image { cursor:inherit; }
.gallery-viewer__caption { flex-shrink:0; margin:0; padding:10px 4px 0; font-size:14px; line-height:1.4; max-height:10dvh; overflow:auto; color:#ddd; }
.gallery-viewer__caption:empty { display:none; }
.gallery-viewer__error { position:absolute; inset:30% 20px auto; text-align:center; }
@media(max-width:600px) {
  .gallery-viewer { width:100%; max-width:100vw; max-height:100dvh; border:0; }
  .gallery-viewer__shell { padding:8px; max-height:100dvh; }
  .gallery-viewer__body { grid-template-columns:36px minmax(0,1fr) 36px; gap:4px; }
  .gallery-viewer button { min-width:36px; min-height:44px; padding-inline:6px; }
  .gallery-viewer__viewport { height:75dvh; }
  .photo-gallery__zoom-hint { width:30px; height:30px; right:8px; bottom:8px; }
}

.gallery-viewer [hidden] { display:none!important; }
.gallery-viewer__previous { grid-column:1; grid-row:1; }
.gallery-viewer__next { grid-column:3; grid-row:1; }

/* Независимые подборки; мобильные фотографии — вертикальные карточки 9:16. */
.photo-gallery--mobile { display:none; }
.photo-gallery__zoom picture { display:block; }
.photo-gallery--fallback .photo-gallery__item img { object-fit:contain; }
@media (max-width:700px) {
  .photo-gallery--desktop { display:none; }
  .photo-gallery--mobile { display:block; }
  .photo-gallery--reels .photo-gallery__item { flex-basis:88%; max-width:360px; }
  .photo-gallery--reels .photo-gallery__item:only-child { flex-basis:100%; margin-inline:auto; }
  .photo-gallery--reels .photo-gallery__item img { aspect-ratio:9 / 16; }
}
