/* Չկա — витрина надписей v2 (/buy, /t, /i, /f, /pay, /thanks). Делает tools/build_sale_pages.py; правка руками — только через шаблон.
   Стиль главной «музейная открытка» (hub-museum.css): бумага, графит, бордовый акцент, полоска авиапочты, рамка с уголками, Chka Serif.
   4 шага — один экран, одна мысль. Телефон 390: картинка сверху, текст и кнопка снизу. Компьютер ≥ 960: картинка слева, текст справа. */
@font-face { font-family: "Chka Serif"; font-weight: 100 900; font-display: swap;
  src: url("../engine/fonts/NotoSerifArmenian-armenian.woff2") format("woff2");
  unicode-range: U+0530-058F, U+FB13-FB17; }
@font-face { font-family: "Chka Serif"; font-weight: 100 900; font-display: swap;
  src: url("../engine/fonts/NotoSerif-cyrillic.woff2") format("woff2");
  unicode-range: U+0400-052F, U+2DE0-2DFF, U+A640-A69F; }
@font-face { font-family: "Chka Serif"; font-weight: 100 900; font-display: swap;
  src: url("../engine/fonts/NotoSerif-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #f1e6cf; --surface: #fbf6ea; --surface-2: #ebdfc6; --ink: #2a2420; --muted: #3b332c; --faint: #5b4e43;
  --line: rgba(42, 36, 32, 0.22); --line-2: rgba(42, 36, 32, 0.1);
  --accent: #8a2c33; --accent-strong: #6f2229; --accent-soft: #f1ddd4; --indigo: #2d3f5e; --ok: #3f6d4e;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 2px 3px rgba(42, 36, 32, 0.16), 0 18px 40px -22px rgba(42, 36, 32, 0.45);
  --font: "Chka Serif", "Noto Serif", Georgia, serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --g: max(16px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; overflow-x: clip;
  background: linear-gradient(180deg, rgba(255, 250, 236, 0.6), rgba(255, 250, 236, 0) 460px), var(--bg);
  color: var(--ink); font: 400 17px/1.5 var(--font); }
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

/* язык: показан один (как на сайте) */
html:not([data-lang="hy"]) .i18n-inline[lang="hy"],
html:not([data-lang="ru"]) .i18n-inline[lang="ru"],
html:not([data-lang="en"]) .i18n-inline[lang="en"] { display: none; }
.i18n-inline[lang] { display: inline; }

/* ---------- шапка: авиапочта, логотип, шаги, язык ---------- */
.sbar { position: sticky; top: 0; z-index: 20; background: rgba(241, 230, 207, 0.9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(42, 36, 32, 0.12); }
.sbar::before { content: ""; display: block; height: 5px;
  background: repeating-linear-gradient(135deg, var(--accent) 0 14px, var(--surface) 14px 21px, var(--indigo) 21px 35px, var(--surface) 35px 42px); }
.sbar-in { display: flex; align-items: center; gap: 10px; max-width: 1240px; margin: 0 auto; padding: 6px var(--g); min-height: 54px; }
.logo { display: inline-flex; align-items: center; gap: 3px; font: 700 24px/1 var(--font); color: var(--ink); text-decoration: none; min-height: 44px; }
.logo .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-top: 8px; }
.lsw { display: flex; gap: 2px; margin-left: auto; }
.lsw button { min-width: 44px; height: 44px; padding: 0 8px; border: 0; border-radius: 22px; background: transparent; color: var(--faint);
  font: 700 13px var(--font); letter-spacing: 0.06em; cursor: pointer; }
.lsw button[aria-pressed="true"] { background: var(--accent); color: var(--surface); }

.prog { display: flex; gap: 4px; margin: 0 auto; padding: 0; list-style: none; counter-reset: s; }
.prog li { display: flex; align-items: center; }
.prog li + li::before { content: ""; width: 10px; height: 1px; background: var(--line); margin-right: 4px; }
.prog button { display: inline-flex; align-items: center; gap: 8px; min-width: 44px; min-height: 44px; padding: 0 4px; border: 0; background: none; cursor: pointer; color: var(--faint); }
.prog b { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); font: 700 14px/1 var(--font); background: var(--surface); }
.prog span { display: none; font-size: 15px; }
.prog button[aria-current="step"] { color: var(--ink); }
.prog button[aria-current="step"] b { background: var(--accent); border-color: var(--accent); color: var(--surface); }
.prog button.done b { border-color: var(--accent); color: var(--accent); }
.prog button:disabled { cursor: default; opacity: 0.55; }
html:not(.js) .prog { display: none; }
/* телефон: шаги — тонкая полоска под шапкой (номер шага — в строке над заголовком), шапке хватает места на логотип и язык */
@media (max-width: 699px) {
  .prog { position: absolute; left: 0; right: 0; bottom: -1px; gap: 3px; margin: 0; }
  .prog li { flex: 1; }
  .prog li + li::before { display: none; }
  .prog button { width: 100%; min-width: 0; min-height: 0; height: 3px; padding: 0; background: rgba(42, 36, 32, 0.12); pointer-events: none; }
  .prog button b, .prog button span { display: none; }
  .prog button[aria-current="step"], .prog button.done { background: var(--accent); opacity: 1; }
}

/* ---------- шаги ---------- */
.flow { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 var(--g); }
.step { display: grid; gap: 16px; padding: 14px 0 28px; }
html.js .step:not(.on) { display: none; }
html.js .step.on { animation: in 0.5s var(--ease) both; }
@keyframes in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
html:not(.js) .step + .step { border-top: 1px solid var(--line); }

.panel { position: relative; }
.museum { margin: 0 0 6px; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; color: var(--indigo); }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 700; color: var(--indigo); }
.eyebrow .no { color: var(--accent); }
.eyebrow .what::before { content: "·"; margin-right: 10px; color: var(--line); }
h1, h2 { margin: 0 0 8px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.15; }
h1 { font-size: 30px; }
h2 { font-size: 28px; }
.lead { margin: 0 0 10px; color: var(--muted); }

/* открытка: рамка, двойная линия, уголки */
.card { position: relative; padding: 14px; background: var(--surface); border-radius: 3px; box-shadow: var(--shadow); }
.card::before { content: ""; position: absolute; inset: 7px; border: 1px solid var(--line); pointer-events: none; z-index: 1; }
.corner { position: absolute; width: 18px; height: 18px; color: var(--accent); opacity: 0.85; z-index: 2; }
.corner.tl { left: 3px; top: 3px; } .corner.tr { right: 3px; top: 3px; transform: scaleX(-1); }
.corner.bl { left: 3px; bottom: 3px; transform: scaleY(-1); } .corner.br { right: 3px; bottom: 3px; transform: scale(-1); }

/* кнопки */
.snav, .cta { position: sticky; bottom: 0; z-index: 5; display: flex; gap: 10px; align-items: center; margin: 16px calc(-1 * var(--g)) 0;
  padding: 12px var(--g) calc(12px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, var(--bg) 70%, rgba(241, 230, 207, 0)); }
.nx, .btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 0 22px;
  border: 1px solid var(--accent); border-radius: 2px; background: var(--accent); color: var(--surface); text-decoration: none; cursor: pointer;
  font: 700 18px/1.1 var(--font); letter-spacing: 0.02em; transition: background 0.35s var(--ease), border-color 0.35s var(--ease), transform 0.35s var(--ease), opacity 0.35s; }
.nx svg { width: 20px; height: 20px; flex: none; }
.nx:active, .btn:active { transform: translateY(1px) scale(0.98); transition-duration: 0.12s; }
.nx:disabled { opacity: 0.4; cursor: default; }
.bk { flex: none; min-height: 54px; min-width: 64px; padding: 0 16px; border: 1px solid var(--ink); border-radius: 2px; background: transparent; cursor: pointer; font-weight: 700; font-size: 16px; }
@media (hover: hover) and (pointer: fine) {
  .nx:not(:disabled):hover, .btn:hover { background: var(--ink); border-color: var(--ink); transform: translateY(-2px); }
  .bk:hover { background: var(--surface); }
}
[tabindex="-1"]:focus { outline: none; }
:focus-visible { outline: 2px solid var(--indigo); outline-offset: 3px; }
html:not(.js) .snav { display: none; }

/* ---------- ① что это ---------- */
.s1 .stage, .step[data-step="1"] .stage { position: relative; padding: 4px 6px 30px 0; }
.ba { margin: 0; }
.ba-btn { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; overflow: hidden; border-radius: 1px; }
.ba-btn img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.ba-1 { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s var(--ease); }
.ba.after .ba-1 { opacity: 1; }
.ba-chip { position: absolute; left: 10px; top: 10px; padding: 4px 10px; background: rgba(251, 246, 234, 0.92); border: 1px solid var(--line);
  font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--indigo); }
.ba .c1, .ba.after .c0 { display: none; } .ba.after .c1 { display: inline; color: var(--accent); }
.pstamp { position: absolute; right: -8px; top: -12px; z-index: 3; display: grid; place-items: center; width: 70px; height: 84px; transform: rotate(6deg);
  background: radial-gradient(circle, transparent 2.3px, var(--surface) 2.8px) -4px -4px / 8px 8px; color: var(--accent);
  filter: drop-shadow(0 3px 3px rgba(42, 36, 32, 0.3)); }
.pstamp::before { content: ""; position: absolute; inset: 4px; background: var(--surface); }
.pstamp::after { content: ""; position: absolute; inset: 8px; border: 1.5px solid var(--accent); }
.pstamp b, .pstamp i { position: relative; z-index: 1; }
.pstamp b { font-size: 25px; line-height: 1; margin-top: 12px; }
.pstamp i { font-style: normal; font-size: 13px; font-weight: 700; margin-top: -16px; }
.mini { position: absolute; right: 2px; bottom: 0; z-index: 4; width: 36%; margin: 0; padding: 6px 6px 4px; background: #fff; transform: rotate(4deg);
  box-shadow: 0 1px 2px rgba(42, 36, 32, 0.22), 0 10px 22px -8px rgba(42, 36, 32, 0.45); }
.mini img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; object-position: 10% 50%; }
.mini figcaption { margin-top: 3px; font-size: 12px; text-align: center; font-style: italic; color: var(--faint); }
.how { margin: 14px 0 0; padding: 0; list-style: none; counter-reset: h; display: grid; gap: 8px; }
.how li { counter-increment: h; display: flex; gap: 12px; align-items: baseline; }
.how li::before { content: counter(h); flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--accent); color: var(--accent); font-weight: 700; font-size: 14px; transform: translateY(-2px); }

/* ---------- ② место на рисунке ---------- */
.car { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; grid-template-areas: "t t t" "p th n"; align-items: center; row-gap: 10px; column-gap: 8px; }
.car .track { grid-area: t; }
.track { display: flex; gap: 10px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none;
  margin: 0 calc(-1 * var(--g)); padding: 0 var(--g) 4px; scroll-padding: 0 var(--g); -webkit-overflow-scrolling: touch; outline: none; }
.track::-webkit-scrollbar { display: none; }
.track.drag { scroll-snap-type: none; cursor: grabbing; }
.track.drag * { pointer-events: none; }
.fr { flex: 0 0 88%; margin: 0; scroll-snap-align: start; scroll-snap-stop: always; user-select: none; -webkit-user-select: none; }
.frpic { position: relative; margin: 0 auto; background: var(--surface); padding: 6px; box-shadow: var(--shadow); border-radius: 2px; }
.frpic img { width: 100%; height: auto; -webkit-user-drag: none; user-select: none; }
.fr figcaption { margin-top: 8px; font-size: 15px; color: var(--muted); }
.fr figcaption b { color: var(--accent); margin-right: 6px; letter-spacing: 0.05em; }
/* стрелки — вне рисунка: на телефоне в ряду под кадром (по бокам от миниатюр), на компьютере — по бокам кадра */
.arr { display: block; width: 48px; height: 48px; padding: 0; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); cursor: pointer; box-shadow: 0 4px 12px -6px rgba(42, 36, 32, 0.45); transition: opacity 0.3s, transform 0.3s var(--ease); }
.arr svg { width: 24px; height: 24px; display: block; margin: auto; }
.arr.prev svg { transform: scaleX(-1); }
.arr.prev { grid-area: p; justify-self: start; } .arr.next { grid-area: n; justify-self: end; }
.arr:disabled { opacity: 0.3; pointer-events: none; }
.thumbs { grid-area: th; display: flex; gap: 8px; justify-content: center; }
.thumbs button { width: 44px; height: 44px; padding: 3px; border: 1px solid var(--line); border-radius: 2px; background: var(--surface); cursor: pointer; opacity: 0.7; }
.thumbs button img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 70%; }
.thumbs button[aria-current="true"] { opacity: 1; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

/* метка места: бумажный ярлык + булавка; выбранная — бордовая; проданная — штемпель */
.spot { position: absolute; z-index: 3; width: 56px; height: 56px; margin: -28px 0 0 -28px; padding: 0; border: 0; background: none; cursor: pointer; }
.spot .pin { position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--accent);
  border: 2.5px solid var(--surface); box-shadow: 0 2px 6px rgba(42, 36, 32, 0.55); transition: transform 0.35s var(--ease); }
.spot .tag { position: absolute; left: 50%; bottom: 40px; transform: translateX(-50%); white-space: nowrap; padding: 5px 10px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 2px; box-shadow: 0 4px 10px -4px rgba(42, 36, 32, 0.5); font-size: 14px; font-weight: 700; color: var(--ink);
  transition: background 0.3s, color 0.3s; }
.spot .tag::after { content: ""; position: absolute; left: 50%; top: 100%; width: 1px; height: 8px; background: var(--ink); opacity: 0.5; }
.spot.er .tag { transform: translateX(-82%); } .spot.er .tag::after { left: 82%; }
.spot.el .tag { transform: translateX(-18%); } .spot.el .tag::after { left: 18%; }
.spot.on .tag { background: var(--accent); border-color: var(--accent); color: var(--surface); }
.spot.on .pin { transform: scale(1.35); background: var(--ink); }
.spot.sold { cursor: not-allowed; }
.spot.sold .pin { background: #8c8378; }
.spot.sold .tag { background: var(--surface-2); color: var(--faint); text-decoration: line-through; }
.stamp { position: absolute; left: 50%; top: 50%; width: 92px; height: 92px; margin: -46px 0 0 -46px; color: #22355a; transform: rotate(-14deg); opacity: 0.92; pointer-events: none; }
.spot.sold .tag { opacity: 0; }
html.js .step.on .spot { animation: drop 0.5s var(--ease) both; }
html.js .step.on .spot:nth-child(3) { animation-delay: 0.08s; }
@keyframes drop { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

.free { margin: 0 0 8px; font-weight: 700; }
.sel { padding: 12px 14px; border-left: 3px solid var(--accent); background: var(--surface); }
.sel p { margin: 0; }
.sel-none { color: var(--faint); font-style: italic; }
.sel-k { color: var(--faint); }
.sel-t { color: var(--ink); }

/* ---------- ③ имя + пример художника ---------- */
.card-pv { padding: 14px; }
.ex { margin: 0; }
.ex-in { position: relative; overflow: hidden; }
.ex-in img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.ex:not([data-kind="couple"]) .ex-c, .ex[data-kind="couple"] .ex-n { display: none; }
.ex figcaption { position: relative; z-index: 2; margin: 8px 4px 0; font-size: 14px; font-style: italic; color: var(--faint); }
/* шаг 3: крупно — вырезка выбранного места, сбоку в углу — маленький пример художника */
.pick { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr) 36%; gap: 12px; align-items: start; }
.crop { margin: 0; }
.crop-in { --vw: 1; position: relative; overflow: hidden; width: calc(100% * var(--vw)); aspect-ratio: var(--vw) / 1; margin: 0 auto; }
.crop-in img { position: absolute; left: 0; top: 0; width: calc(100% / var(--vw)); max-width: none; height: 100%; }
.exm { padding: 5px 5px 4px; background: #fff; transform: rotate(2deg); margin-top: 6px;
  box-shadow: 0 1px 2px rgba(42, 36, 32, 0.22), 0 10px 22px -8px rgba(42, 36, 32, 0.45); }
.exm figcaption { margin: 4px 2px 0; font-size: 12px; line-height: 1.25; text-align: center; }
.yours { position: relative; z-index: 2; margin: 10px 4px 4px; padding-top: 10px; border-top: 1px dashed var(--line); text-align: center; }
.yk { display: block; font-size: 14px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--indigo); }
.yv { display: block; margin-top: 2px; font-size: 38px; line-height: 1.15; letter-spacing: 0.06em; overflow-wrap: anywhere; color: var(--ink); }
.yv.empty { color: var(--faint); font-weight: 400; }
.names { margin: 0; }
.fld { display: grid; gap: 6px; }
.fld label { font-size: 14px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--indigo); }
.fld input { width: 100%; min-height: 56px; padding: 0 16px; border: 1px solid var(--line); border-bottom: 2px solid var(--ink); border-radius: 2px;
  background: var(--surface); color: var(--ink); font: 600 24px/1 var(--font); letter-spacing: 0.08em; text-transform: uppercase; }
.fld input::placeholder { color: rgba(42, 36, 32, 0.3); }
.fld input:focus { outline: none; border-bottom-color: var(--accent); box-shadow: 0 2px 0 var(--accent); }
.g-couple { display: grid; grid-template-columns: minmax(0, 120px) auto minmax(0, 120px); justify-content: center; gap: 10px; align-items: end; }
.g-couple .hint { grid-column: 1 / -1; text-align: center; }
.g-couple input { padding: 0; text-align: center; font-size: 40px; letter-spacing: 0; }
.left-n { font-weight: 700; color: var(--ink); }
.plus { padding-bottom: 12px; font-size: 26px; font-weight: 700; color: var(--accent); }
.hint { margin: 2px 0 0; font-size: 14px; color: var(--faint); }
.bad { margin: 8px 0 0; color: var(--accent); font-weight: 700; }

/* ---------- ④ итог и оплата ---------- */
.crop-sum { max-width: 360px; }
.sum { margin: 12px 4px 4px; display: grid; gap: 6px; position: relative; z-index: 2; }
.sum div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 6px; border-bottom: 1px dashed var(--line); }
.sum dt { color: var(--faint); }
.sum dd { margin: 0; font-weight: 700; text-align: right; }
.price { display: flex; align-items: baseline; gap: 12px; margin: 6px 0 10px; }
.price b { font-size: 52px; line-height: 1; }
.price span { color: var(--muted); }
.promise { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.promise li { padding-left: 22px; position: relative; color: var(--muted); }
.promise li::before { content: ""; position: absolute; left: 2px; top: 0.55em; width: 10px; height: 6px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }
.cta { flex-direction: row-reverse; }
.card-note { margin: 4px 0 0; font-size: 13px; color: var(--faint); text-align: center; }

/* ---------- телефон: шаг = один экран (100dvh), картинка забирает всё, что осталось от текста ---------- */
/* шапка 62px + подвал ≈31px; .flow растягивается на остаток экрана, шаг — колонка: картинка (flex:1, без процентов — дети absolute) + панель с кнопкой внизу */
@media (max-width: 959px) {
  .flow { display: flex; flex-direction: column; }
  html.js .step.on { flex: 1 1 auto; display: flex; flex-direction: column; gap: 8px; padding: 8px 0 0; min-height: 0; }
  html.js .step.on > .panel { margin-top: auto; }
  footer.sfoot { padding: 6px var(--g) calc(6px + env(safe-area-inset-bottom, 0px)); font-size: 12px; line-height: 1.5; }
  .snav, .cta { margin-top: 6px; padding-top: 8px; padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
  .nx, .btn, .bk { min-height: 48px; }
  .museum { margin-bottom: 2px; }
  .eyebrow { margin-bottom: 2px; }

  /* ① картинка: квадрат по высоте остатка, карточка и «пара» внутри него */
  html.js .step[data-step="1"] .stage { flex: 1 1 0; min-height: 110px; align-self: center; aspect-ratio: 1; width: auto; max-width: 100%;
    max-height: min(420px, calc(100vw - 2 * var(--g))); padding: 0; position: relative; }
  .step[data-step="1"] .card { position: absolute; inset: 4px 6px 24px 0; display: flex; padding: 10px; }
  .step[data-step="1"] .card::before { inset: 5px; }
  .step[data-step="1"] .ba { flex: 1; min-width: 0; }
  .step[data-step="1"] .ba-btn { height: 100%; }
  .step[data-step="1"] .ba-btn img { height: 100%; max-height: none; aspect-ratio: auto; }
  .step[data-step="1"] .pstamp { transform: rotate(6deg) scale(0.8); transform-origin: top right; }
  .step[data-step="1"] .mini { width: 34%; padding: 4px 4px 2px; }
  .step[data-step="1"] .mini figcaption { margin-top: 2px; font-size: 11px; line-height: 1.2; }
  .step[data-step="1"] .how { margin-top: 8px; gap: 5px; }

  /* ② кадр по высоте остатка: стрелки и миниатюры — одним рядом под ним */
  html.js .step[data-step="2"] .stage { flex: 1 1 0; min-height: 160px; display: flex; flex-direction: column;
    max-height: calc((100vw - 2 * var(--g)) * 0.94 * 1.094 + 90px); }
  html.js .step[data-step="2"] .car { flex: 1 1 0; min-height: 0; grid-template-columns: 44px minmax(0, 1fr) 44px; grid-template-rows: minmax(0, 1fr) auto; row-gap: 4px; align-items: center; }
  .step[data-step="2"] .car .track { align-self: stretch; }
  .step[data-step="2"] .fr { display: flex; flex-direction: column; height: 100%; flex-basis: 94%; }
  .step[data-step="2"] .frpic { flex: 1 1 0; min-height: 0; aspect-ratio: 1000 / 1094; align-self: center; max-width: 100%; margin: 0; }
  .step[data-step="2"] .frpic img { position: absolute; left: 6px; top: 6px; width: calc(100% - 12px); height: calc(100% - 12px); object-fit: cover; }
  .step[data-step="2"] .fr figcaption { flex: none; margin-top: 4px; font-size: 14px; line-height: 1.3; }
  .step[data-step="2"] .arr { width: 44px; height: 44px; }
  .step[data-step="2"] .lead { margin-bottom: 4px; }
  .step[data-step="2"] .free { margin-bottom: 4px; }
  .step[data-step="2"] .sel { padding: 6px 12px; }

  .step[data-step="3"] .card-pv, .step[data-step="4"] .card-pv { max-width: 420px; margin: 0 auto; width: 100%; }
  .step[data-step="4"] .crop-sum { max-width: 150px; margin: 0 auto; }
  .step[data-step="4"] .price { margin: 2px 0 6px; }
  .step[data-step="4"] .sum { margin-top: 8px; gap: 4px; }
}
/* узкий телефон: текст компактнее */
@media (max-width: 599px) {
  h1 { font-size: 26px; margin-bottom: 4px; } h2 { font-size: 24px; margin-bottom: 4px; }
  .museum, .eyebrow { font-size: 12px; }
  .step[data-step="1"] .lead, .step[data-step="1"] .how { font-size: 15px; line-height: 1.35; }
  .step[data-step="1"] .lead { margin-bottom: 0; }
  .how li::before { width: 22px; height: 22px; font-size: 13px; }
  .step[data-step="2"] .lead { font-size: 15px; line-height: 1.35; }
}
/* метка у левого края кадра не выходит за рамку */
@media (max-width: 599px) {
  .spot.el .tag { transform: translateX(-8%); } .spot.el .tag::after { left: 8%; }
}
/* совсем низкий (360×640) */
@media (max-width: 599px) and (max-height: 680px) {
  .step[data-step="4"] .crop-sum { max-width: 84px; }
  .step[data-step="3"] .yv { font-size: 32px; }
}
/* низкий телефон (375×667 и т. п.) */
@media (max-width: 599px) and (max-height: 720px) {
  h1 { font-size: 23px; } h2 { font-size: 22px; }
  .step[data-step="1"] .lead, .step[data-step="1"] .how, .step[data-step="2"] .lead { font-size: 14px; line-height: 1.3; }
  .step[data-step="1"] .how { margin-top: 6px; gap: 3px; }
  .step[data-step="2"] .free, .step[data-step="2"] .sel { font-size: 15px; }
  .step[data-step="4"] .crop-sum { max-width: 112px; }
  .price b { font-size: 44px; }
  .promise { gap: 3px; }
  .step[data-step="4"] .sum { margin-top: 6px; gap: 3px; }
  .nx, .btn, .bk { min-height: 46px; }
}
@media (min-width: 600px) { h1 { font-size: 36px; } }

/* ---------- компьютер: две колонки, картинка большая ---------- */
/* на компьютере шаг = один экран без вертикальной прокрутки: --hdr шапка, --ftr подвал, --avail — высота под картинку и текст; всё ниже считается от неё */
@media (min-width: 960px) {
  :root { --hdr: 62px; --ftr: 46px; --avail: calc(100vh - 156px); }
  body { font-size: 18px; }
  footer.sfoot { padding: 12px var(--g); }
  .prog span { display: inline; }
  .prog li + li::before { width: 22px; }
  .step { grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr); gap: 56px; align-items: center; padding: 24px 0;
    min-height: calc(100vh - var(--hdr) - var(--ftr)); }
  html:not(.js) .step { min-height: 0; }
  h1 { font-size: 46px; } h2 { font-size: 40px; }
  .snav, .cta { position: static; margin: 24px 0 0; padding: 0; background: none; }
  .nx, .btn { flex: 0 1 auto; min-width: 240px; }
  .step[data-step="1"] .stage { max-width: min(600px, calc(var(--avail) - 30px)); justify-self: center; width: 100%; }
  .mini { width: 34%; right: -28px; bottom: -6px; }
  .track { margin: 0; padding: 0 0 4px; scroll-padding: 0; gap: 0; }
  .fr { flex: 0 0 100%; }
  .frpic { width: min(100%, calc((var(--avail) - 118px) * 0.914)); }
  .car { grid-template-columns: 56px minmax(0, 1fr) 56px; grid-template-areas: "p t n" ". th ."; column-gap: 14px; row-gap: 14px; }
  .car .arr { align-self: center; width: 56px; height: 56px; }
  .thumbs button { width: 56px; height: 56px; }
  .step[data-step="3"] .stage { max-width: 720px; width: 100%; justify-self: center; }
  .step[data-step="4"] .stage { max-width: 560px; width: 100%; justify-self: center; }
  .pick { --cw: min(470px, calc(var(--avail) - 130px)); grid-template-columns: var(--cw) minmax(0, 190px); justify-content: center; gap: 18px; }
  .step[data-step="4"] .crop-sum { max-width: calc(var(--avail) - 175px); margin: 0 auto; }
  .cta { flex-direction: row; }
  .card-note { text-align: left; }
}
/* низкое окно (1280×720): текст компактнее */
@media (min-width: 960px) and (max-height: 800px) {
  body { font-size: 17px; line-height: 1.4; }
  h1 { font-size: 36px; } h2 { font-size: 32px; }
  .step { gap: 40px; }
  .price b { font-size: 42px; }
  .how { margin-top: 8px; gap: 6px; }
  .nx, .btn, .bk { min-height: 48px; }
  .snav, .cta { margin-top: 14px; }
}

/* ---------- /pay и /thanks ---------- */
.center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; width: 100%; max-width: 560px;
  margin: 0 auto; padding: 32px var(--g); text-align: center; }
.paybox p { margin: 6px 0; font-size: 20px; }
.paybox .small { font-size: 15px; }
.paybox a { color: var(--accent); min-height: 44px; display: inline-flex; align-items: center; }
.card-th { padding: 34px 26px 28px; width: 100%; }
.card-th h1 { position: relative; z-index: 2; }
.card-th p { position: relative; z-index: 2; color: var(--muted); }
.th-sel b { color: var(--ink); letter-spacing: 0.04em; }
.card-th .nx { position: relative; z-index: 2; width: 100%; margin-top: 10px; }
[data-share] .ok { display: none; } [data-share].done .ok { display: inline; } [data-share].done .lbl { display: none; }

.sfoot { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 18px var(--g) calc(18px + env(safe-area-inset-bottom, 0px));
  font-size: 14px; color: var(--faint); border-top: 1px solid rgba(42, 36, 32, 0.12); }
.sfoot-mark { font-weight: 700; color: var(--ink); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }
