/* ============================================================
   VELOUR — витрина. Фотографии всё, интерфейс почти невидим.
   Чёрный, встык, волосяные линии, мелкая разряженная типографика.
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

:root {
  --h1: 352;
  --bg: #000;
  --bg-2: #0a0a0a;
  --fg: #f2f0ee;
  --fg-2: rgba(242, 240, 238, .62);
  --fg-3: rgba(242, 240, 238, .38);
  --line: rgba(242, 240, 238, .14);
  --line-2: rgba(242, 240, 238, .3);
  --acc: oklch(70% .2 var(--h1));
  --gap: 10px;
  --hdr: 52px;
  --f: ui-sans-serif, system-ui, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --e: cubic-bezier(.22, 1, .36, 1);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f4f2ef;
  --bg-2: #fff;
  --fg: #121110;
  --fg-2: rgba(18, 17, 16, .66);
  --fg-3: rgba(18, 17, 16, .42);
  --line: rgba(18, 17, 16, .14);
  --line-2: rgba(18, 17, 16, .3);
  --acc: oklch(55% .21 var(--h1));
  color-scheme: light;
}

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; }
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-top: var(--hdr);
  overflow-x: hidden;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; }
input { font: inherit; color: inherit; }
dialog { border: 0; padding: 0; color: inherit; max-width: none; max-height: none; }
h1, h2, h3, p { font-weight: 400; }
[hidden] { display: none !important; }
.muted { color: var(--fg-3); }
::selection { background: var(--fg); color: var(--bg); }
:focus-visible { outline: 1px solid var(--fg); outline-offset: 2px; }

.skip { position: fixed; left: 8px; top: -60px; z-index: 999; background: var(--fg); color: var(--bg); padding: 8px 14px; }
.skip:focus { top: 8px; }

.micro {
  font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--fg-3);
}

/* ---------------- шапка ---------------- */
.hdr {
  position: fixed; inset: 0 0 auto; z-index: 100; height: var(--hdr);
  display: flex; align-items: center; gap: 22px; padding: 0 14px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid var(--line);
  transition: transform .35s var(--e);
}
.hdr--hide { transform: translateY(-101%); }
.hdr__logo {
  font-size: 12px; letter-spacing: .3em; text-transform: uppercase; font-weight: 600; flex: none;
  display: flex; align-items: center; min-height: 44px; padding-inline-end: 4px;
}
.hdr__cats {
  display: flex; align-items: center; gap: 18px; overflow-x: auto; scrollbar-width: none;
  margin-inline-end: auto; min-width: 0;
  scroll-snap-type: x proximity;
  /* правый край растворяется — сразу видно, что список листается */
  mask-image: linear-gradient(to right, #000 calc(100% - 26px), transparent);
}
.hdr__cats > * { scroll-snap-align: start; }
.hdr__cats::-webkit-scrollbar { display: none; }
.fchip {
  flex: none; font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--fg-3); position: relative; white-space: nowrap;
  /* палец должен попадать: высота зоны 44px, сам текст остаётся мелким */
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px;
  transition: color .2s;
}
.fchip b { display: none; }
.fchip:hover { color: var(--fg); }
.fchip.is-on { color: var(--fg); }
.fchip.is-on::after {
  content: ""; position: absolute; left: 2px; right: 2px; bottom: 12px; height: 1px; background: currentColor;
}
.hdr__search { flex: none; }
.hdr__search input {
  width: 96px; background: none; border: 0; border-bottom: 1px solid var(--line);
  padding: 3px 0; font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  transition: width .3s var(--e), border-color .2s;
}
.hdr__search input::placeholder { color: var(--fg-3); letter-spacing: .14em; }
.hdr__search input:focus { outline: 0; width: 150px; border-color: var(--fg); }
.hdr__act { display: flex; align-items: center; gap: 8px; flex: none; }
.icobtn { width: 44px; height: 44px; display: grid; place-items: center; color: var(--fg-3); font-size: 13px; touch-action: manipulation; }
.icobtn:hover { color: var(--fg); }
.burger { display: none; width: 44px; height: 44px; place-items: center; touch-action: manipulation; }
.burger i { display: block; width: 16px; height: 1px; background: var(--fg); }
.burger i + i { margin-top: 4px; }

.sheet {
  position: fixed; inset: 0; z-index: 95; background: var(--bg);
  display: grid; place-items: center; padding: 40px;
}
.sheet__in { display: grid; gap: 2px; text-align: center; }
.sheet__in a {
  font-size: 16px; letter-spacing: .18em; text-transform: uppercase; color: var(--fg-2);
  display: flex; align-items: center; justify-content: center; min-height: 48px;
}
.sheet__in a:hover { color: var(--fg); }

/* ---------------- стена ---------------- */
.wall {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
  padding: var(--gap);
}
@media (min-width: 640px) { .wall { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 980px) { .wall { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1500px) { .wall { grid-template-columns: repeat(5, 1fr); } }
/* мало моделей — меньше колонок: сетка сходится без пустых мест */
@media (min-width: 640px) {
  .wall:has(> :nth-child(2):last-child) { grid-template-columns: repeat(2, 1fr); }
  .wall:has(> :nth-child(3):last-child) { grid-template-columns: repeat(3, 1fr); }
  .wall:has(> :nth-child(6):last-child) { grid-template-columns: repeat(3, 1fr); }
  .wall:has(> :nth-child(9):last-child) { grid-template-columns: repeat(3, 1fr); }
}
.wall.is-swapping { opacity: .25; }
.wall { transition: opacity .15s linear; }

.tile {
  position: relative; display: block; overflow: hidden;
  aspect-ratio: 3 / 4; background: var(--c, var(--bg-2));
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  content-visibility: auto;
  contain-intrinsic-size: auto 420px;
}
.tile img, .mvph img, .mv__img {
  -webkit-user-drag: none; user-select: none; -webkit-touch-callout: none;
}
.tile__img, .tile__vid {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform .9s var(--e), opacity .35s linear;
}
.tile__vid { opacity: 0; }
.tile.playing .tile__vid { opacity: 1; }
.tile:hover .tile__img { transform: scale(1.035); }
.tile__ph {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 40px; color: var(--fg-3);
}
.tile__dot {
  position: absolute; right: 9px; top: 9px; width: 4px; height: 4px; border-radius: 50%;
  background: #fff; opacity: .85; box-shadow: 0 0 0 1px rgba(0, 0, 0, .35);
}
.tile__name {
  position: absolute; inset: auto 0 0; padding: 34px 10px 9px;
  font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, .62), transparent);
  opacity: .9;
}
@media (hover: hover) and (pointer: fine) {
  .tile__name { opacity: 0; transform: translateY(4px); transition: opacity .25s, transform .25s var(--e); }
  .tile:hover .tile__name, .tile:focus-visible .tile__name { opacity: 1; transform: none; }
}

.empty { padding: 80px 20px; text-align: center; color: var(--fg-3); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.empty a { color: var(--fg); border-bottom: 1px solid var(--line-2); }

.more { display: grid; place-items: center; min-height: 64px; padding: 24px 0 40px; }
.more__spin { display: flex; gap: 5px; }
.more__spin i { width: 4px; height: 4px; border-radius: 50%; background: var(--fg-3); animation: blink 1s infinite; }
.more__spin i:nth-child(2) { animation-delay: .15s; }
.more__spin i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: .2; } }

/* ---------------- кнопки ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px;
  background: var(--fg); color: var(--bg);
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600;
  transition: opacity .2s;
}
.btn:hover { opacity: .82; }
.btn--sm { padding: 9px 14px; font-size: 10px; }
.btn--ghost { background: none; color: var(--fg); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1px var(--fg); opacity: 1; }

.ico {
  display: inline-grid; place-items: center; width: 18px; height: 18px;
  font-size: 8px; font-weight: 700; letter-spacing: .04em;
  box-shadow: inset 0 0 0 1px currentColor; opacity: .75;
}
.ico--of::before { content: "OF"; }
.ico--fansly::before { content: "FA"; }
.ico--ig::before { content: "IG"; }
.ico--tg::before { content: "TG"; }
.ico--tt::before { content: "TT"; }
.ico--x::before { content: "X"; }
.ico--rd::before { content: "RD"; }
.ico--yt::before { content: "YT"; }
.ico--web::before { content: "WW"; }
.ico--link::before { content: "↗"; }

/* ---------------- страница модели ---------------- */
.mv { display: block; }
.mv__top {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 46px); align-items: center;
  padding: 0 0 clamp(24px, 4vw, 56px);
}
.mv__lead {
  position: relative; display: block; width: 100%; padding: 0; overflow: hidden;
  aspect-ratio: 3 / 4; background: var(--c, var(--bg-2)); cursor: zoom-in;
}
.mv__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mv__count {
  position: absolute; right: 12px; bottom: 12px; padding: 5px 9px;
  background: rgba(0, 0, 0, .5); backdrop-filter: blur(8px); color: #fff;
  font-size: 10px; letter-spacing: .16em;
}
.mv__info { padding: 0 clamp(16px, 3vw, 48px) 0 0; max-width: 46ch; }
.mv__name {
  font-size: clamp(30px, 5.6vw, 62px); line-height: .96; letter-spacing: -.035em; font-weight: 500;
}
.mv__tag { margin-top: 14px; color: var(--fg-2); font-size: 15px; }
.mv__bio { margin-top: 18px; color: var(--fg-2); font-size: 14px; }
.mv__bio p + p { margin-top: .8em; }
.mv__bio strong { color: var(--fg); font-weight: 600; }

.mv__links { display: grid; gap: 1px; margin-top: 26px; }
.mvlink {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 15px 0; border-top: 1px solid var(--line);
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  transition: padding-left .25s var(--e), color .2s;
}
.mvlink:last-child { border-bottom: 1px solid var(--line); }
.mvlink i { color: var(--fg-3); font-style: normal; }
.mvlink:hover { padding-left: 8px; }
.mvlink:hover i { color: var(--fg); }
.mvlink--first { color: var(--fg); font-weight: 600; }
.mvlink--first i { color: var(--acc); }

.mv__meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 22px; }
.mvtag {
  font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--fg-3);
  padding-bottom: 2px; border-bottom: 1px solid transparent;
}
.mvtag:hover { color: var(--fg); border-color: var(--line-2); }
.mvtag--btn.done { color: var(--acc); }

.mv__wall { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); padding: 0 var(--gap); }
@media (min-width: 980px) { .mv__wall { grid-template-columns: repeat(3, 1fr); } }
.mvph { position: relative; display: block; overflow: hidden; background: var(--c, var(--bg-2)); }
.mvph img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3 / 4; transition: transform .8s var(--e); }
.mvph:hover img { transform: scale(1.03); }
.mvph__play {
  position: absolute; inset: 0; margin: auto; width: 40px; height: 40px; display: grid; place-items: center;
  color: #fff; font-size: 11px; background: rgba(0, 0, 0, .42); backdrop-filter: blur(6px); border-radius: 50%;
}

.mv__end { padding: clamp(40px, 7vw, 96px) 14px; text-align: center; }
.mv__endh { font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: var(--fg-3); margin-bottom: 18px; }
.mv__links--end { max-width: 420px; margin-inline: auto; }

.mv__flip { position: fixed; inset: auto 0 auto; top: 50%; z-index: 60; pointer-events: none; }
.flip {
  position: absolute; top: 0; translate: 0 -50%; pointer-events: auto;
  width: 46px; height: 46px; display: grid; place-items: center; font-size: 14px;
  background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(10px);
  color: var(--fg-2); box-shadow: inset 0 0 0 1px var(--line);
  transition: color .2s, background .2s;
}
.flip:hover { color: var(--fg); background: var(--bg); }
.flip--prev { left: 0; }
.flip--next { right: 0; }
@media (max-width: 900px) { .mv__flip { display: none; } }

.mv__more { padding-top: clamp(20px, 4vw, 50px); }
.mv__moreh {
  font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: var(--fg-3);
  padding: 0 14px 14px;
}

.stickycta {
  position: fixed; inset: auto 0 0; z-index: 80;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  transform: translateY(110%); transition: transform .3s var(--e);
}
.stickycta.show { transform: none; }
.stickycta__t { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; }
@media (min-width: 900px) { .stickycta { display: none; } }

/* ---------------- футер ---------------- */
.foot {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 22px 14px calc(22px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); margin-top: 40px;
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--fg-3);
}
.foot__logo { color: var(--fg-2); }
.foot__links { display: flex; gap: 14px; align-items: center; }
.foot__links a:hover { color: var(--fg); }
.foot__18 { box-shadow: inset 0 0 0 1px var(--line); padding: 3px 5px; }
.p-model .foot { margin-bottom: 56px; }

.totop {
  position: fixed; right: 12px; bottom: 12px; z-index: 70; width: 44px; height: 44px;
  display: grid; place-items: center; color: var(--fg-2);
  background: color-mix(in srgb, var(--bg) 76%, transparent); backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px var(--line);
  opacity: 0; transition: opacity .25s;
}
.totop.show { opacity: 1; }
.p-model .totop { bottom: 64px; }

/* ============================================================
   СТОРИС-ВЬЮЕР
   ============================================================ */
.viewer {
  position: fixed; inset: 0; width: 100%; height: 100dvh; background: #000; display: none;
  overscroll-behavior: none;
}
.viewer[open] { display: block; }
.viewer::backdrop { background: #000; }
body:has(.viewer[open]) { overflow: hidden; overscroll-behavior: none; }

.viewer__bars {
  position: absolute; z-index: 6; left: 10px; right: 10px; top: calc(8px + env(safe-area-inset-top));
  display: flex; gap: 3px;
}
.viewer__bars i { flex: 1; height: 1.5px; background: rgba(255, 255, 255, .22); }
.viewer__bars i.is-past { background: rgba(255, 255, 255, .5); }
.viewer__bars i.is-on { background: #fff; }

.viewer__top {
  position: absolute; z-index: 6; left: 10px; right: 10px;
  top: calc(20px + env(safe-area-inset-top));
  display: flex; align-items: center; gap: 12px; color: #fff;
}
.viewer__who { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.viewer__name { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; font-weight: 600; }
.viewer__count { font-size: 10px; letter-spacing: .14em; color: rgba(255, 255, 255, .5); }
.viewer__x {
  margin-left: auto; width: 44px; height: 44px; display: grid; place-items: center;
  color: rgba(255, 255, 255, .8); font-size: 15px; touch-action: manipulation;
}
.viewer__x:hover { color: #fff; }

.viewer {
  --vtop: 54px;
  --vbot: 104px;
}
/* трек: нативный горизонтальный скролл со snap — на iPhone это родная инерция */
.viewer__track {
  position: absolute; inset: 0;
  display: flex; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior: contain;
  scrollbar-width: none;
  touch-action: pan-x pinch-zoom;
  -webkit-overflow-scrolling: touch;
}
.viewer__track::-webkit-scrollbar { display: none; }
.vslide {
  position: relative; flex: 0 0 100%; width: 100%; height: 100%;
  scroll-snap-align: center; scroll-snap-stop: always;
  display: grid; place-items: center;
  padding: var(--vtop) 6px var(--vbot);
  overflow: hidden;
}
.vslide > img:not(.vblur), .vslide > video {
  max-width: 100%;
  max-height: calc(100dvh - var(--vtop) - var(--vbot));
  width: auto; height: auto; object-fit: contain;
  -webkit-user-drag: none; user-select: none; -webkit-touch-callout: none;
}
/* подложка: сильно размытый мелкий кадр под фото, а не второй ряд сетки */
.vslide > .vblur {
  position: absolute; inset: 0; z-index: -1;
  width: 100%; height: 100%; max-width: none; max-height: none;
  object-fit: cover; transform: scale(1.25);
  filter: blur(48px) saturate(1.2); opacity: .22;
}
/* фото проявляется целиком, когда полностью декодировано:
   на медленной сети не видно, как картинка «дорисовывается» сверху вниз */
.vslide > .vphoto { opacity: 0; transition: opacity .22s ease; }
.vslide.is-ready > .vphoto { opacity: 1; }
.vslide.is-ready > .vblur { opacity: .18; }
.vslide > .vblur { transition: opacity .3s ease; }
.vslide--end { padding-inline: 18px; }

.viewer__zone { position: absolute; z-index: 5; top: 54px; bottom: 92px; width: 26%; background: none; }
.viewer__zone--prev { left: 0; }
.viewer__zone--next { right: 0; width: 34%; }
/* на телефоне листаем пальцем, зоны только мешали бы скроллу */
@media (hover: none) and (pointer: coarse) { .viewer__zone { display: none; } }

.viewer__bot {
  position: absolute; z-index: 6; inset: auto 0 0;
  padding: 18px 14px calc(16px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(0, 0, 0, .85), transparent);
  display: grid; gap: 12px; justify-items: start;
}
.viewer__bio {
  color: rgba(255, 255, 255, .78); font-size: 13px; max-width: 60ch;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.viewer__links { display: flex; gap: 8px; flex-wrap: wrap; }
.viewer__links .btn { background: #fff; color: #000; }
.viewer__links .btn--ghost { background: none; color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); }
.viewer__hint {
  position: absolute; z-index: 6; right: 14px; bottom: 104px;
  font-size: 9px; letter-spacing: .2em; text-transform: uppercase; color: rgba(255, 255, 255, .4);
  animation: hintout .3s 3.2s forwards;
}
@keyframes hintout { to { opacity: 0; visibility: hidden; } }

/* финальный слайд со ссылками */
.vend { display: grid; gap: 20px; justify-items: center; text-align: center; padding: 24px; max-width: 460px; }
.vend__h { font-size: clamp(20px, 5vw, 30px); letter-spacing: -.02em; color: #fff; font-weight: 500; }
.vend__h em { font-style: normal; color: var(--acc); }
.vend__p { color: rgba(255, 255, 255, .6); font-size: 13px; }
.vend__links { display: grid; gap: 8px; width: 100%; }
.vend__b {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 18px; background: rgba(255, 255, 255, .08); color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase; font-weight: 600;
  transition: background .2s;
}
.vend__b:first-child { background: #fff; color: #000; box-shadow: none; }
.vend__b:hover { background: rgba(255, 255, 255, .18); }
.vend__b:first-child:hover { background: rgba(255, 255, 255, .88); }
.vend__more { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: rgba(255, 255, 255, .5); border-bottom: 1px solid rgba(255, 255, 255, .25); }

/* ---------------- лайтбокс и 18+ ---------------- */
.lb { position: fixed; inset: 0; width: 100%; height: 100%; background: #000; display: none; place-items: center; }
.lb[open] { display: grid; }
.lb::backdrop { background: #000; }
.lb__fig { display: grid; gap: 10px; place-items: center; padding: 50px 14px; width: 100%; }
.lb__stage { display: grid; place-items: center; max-height: 84svh; width: 100%; }
.lb__stage img, .lb__stage video { max-height: 84svh; max-width: 100%; width: auto; }
.lb__cap { display: flex; gap: 12px; font-size: 10px; letter-spacing: .16em; color: rgba(255, 255, 255, .45); }
.lb__x, .lb__nav {
  position: fixed; z-index: 2; width: 46px; height: 46px; display: grid; place-items: center;
  color: rgba(255, 255, 255, .75); font-size: 16px;
}
.lb__x:hover, .lb__nav:hover { color: #fff; }
.lb__x { top: 12px; right: 12px; }
.lb__nav--prev { left: 6px; top: 50%; translate: 0 -50%; }
.lb__nav--next { right: 6px; top: 50%; translate: 0 -50%; }

.gate {
  position: fixed; inset: 0; z-index: 900; display: grid; place-items: center;
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(18px); padding: 24px;
}
body:has(.gate) { overflow: hidden; }
.gate__card { text-align: center; max-width: 320px; display: grid; gap: 16px; justify-items: center; }
.gate__mark { font-size: 13px; letter-spacing: .3em; font-weight: 600; }
.gate__card p { color: var(--fg-2); font-size: 13px; }
.gate__row { display: flex; gap: 8px; }

/* ---------------- 404 и 500 ---------------- */
/* высота подобрана так, чтобы футер сел на нижний край экрана, а не повис в пустоте */
.errp {
  min-height: calc(100svh - var(--hdr) - 108px);
  display: grid; align-content: center; justify-items: center; text-align: center;
  padding: clamp(46px, 9vw, 96px) 20px clamp(40px, 7vw, 72px);
}
.errp__code {
  font-size: clamp(74px, 21vw, 168px); line-height: .9; font-weight: 500;
  letter-spacing: -.05em; color: var(--fg-3); font-variant-numeric: tabular-nums;
}
.errp__h {
  margin-top: clamp(6px, 2vw, 14px); max-width: 17ch;
  font-size: clamp(26px, 6.4vw, 46px); line-height: 1.05; letter-spacing: -.025em;
  text-wrap: balance;
}
.errp__h em {
  font-family: ui-serif, Georgia, "Times New Roman", serif; font-style: italic; color: var(--acc);
}
.errp__p { margin-top: 14px; max-width: 46ch; color: var(--fg-2); font-size: 14px; text-wrap: balance; }
.errp__cta {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  margin-top: clamp(22px, 4vw, 34px);
}
/* трейс показываем только в debug: длинный, поэтому со своим скроллом */
.errp__tb {
  width: 100%; max-width: 860px; margin-top: 30px; max-height: 42svh; overflow: auto;
  padding: 14px 16px; text-align: left; white-space: pre-wrap; word-break: break-word;
  background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--fg-2);
  font: 11px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---------------- адаптив ---------------- */
@media (max-width: 860px) {
  :root { --hdr: 48px; --gap: 8px; }
  .hdr { gap: 12px; padding: 0 10px; }
  .hdr__cats { gap: 14px; }
  .hdr__search { display: none; }
  .burger { display: grid; }
  .mv__top { grid-template-columns: 1fr; }
  .mv__info { padding: 20px 14px 0; max-width: none; }
  .mv__name { font-size: clamp(28px, 9vw, 44px); }
  .mv__links { margin-top: 20px; }
  /* футер на телефоне переносится в две строки, поэтому запас снизу больше */
  .errp { min-height: calc(100svh - var(--hdr) - 136px); }
  .errp__cta { width: 100%; max-width: 320px; }
  .errp__cta .btn { flex: 1 1 130px; justify-content: center; }
}

@media print { .hdr, .foot, .stickycta, .totop, .mv__flip { display: none !important; } }

/* морф фото плитка → вьюер (View Transitions) */
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-group(vmorph) { animation-duration: .32s; animation-timing-function: var(--e); }
  ::view-transition-old(vmorph), ::view-transition-new(vmorph) { mix-blend-mode: normal; }
  ::view-transition-old(root) { animation-duration: .18s; }
  ::view-transition-new(root) { animation-duration: .24s; }
}
