/* Канвас: светлая доска как в Figma. Один акцент, два радиуса (--r-sm для мелочи, --r для карточек),
   фреймы без скругления, как в Figma. Размеры внутри фреймов в em: на десктопе база 28px мира, на мобиле 15px. */
:root {
  --canvas: #F5F5F5;
  --panel: #FFFFFF;
  --line: #E6E6E6;
  --ink: #1E1E1E;
  --muted: #6B6B6B;
  --soft: #9A9A9A;
  --hover: #F2F2F2;
  --accent: #FF3B30;
  --accent-tint: #FFECEA;
  --paper: #FBF0CD;
  --paper-ink: #3B3220;
  --comp: #9747FF;      /* компоненты, как в Figma */
  --comp-tint: #F1EAFF;
  --tg: #24A1DE;        /* главный контакт в цвете Telegram, как в макете */
  --r-sm: 6px;
  --r: 12px;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --top: 0px;
  --side: 234px; /* панель слоёв 214 + поля 10 */
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--canvas);
  color: var(--ink);
  font: 400 14px/1.4 "Golos Text", system-ui, sans-serif;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
p, h1, h2, h3, ul { margin: 0; }
.lucide { width: 1em; height: 1em; flex: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Масштаб и кнопки (живут в нижней панели) ---------- */
.zoom { display: flex; align-items: center; gap: 2px; align-self: stretch; margin: -6px 0; padding: 0 8px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.ibtn {
  height: 32px; min-width: 32px; padding: 0 8px; border-radius: var(--r-sm);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: background-color .15s;
}
.ibtn .lucide { width: 16px; height: 16px; }
.ibtn:hover { background: var(--hover); }
.zoom-val { font: 500 12px/1 var(--mono); min-width: 54px; color: var(--muted); }
.btn {
  display: inline-flex; align-items: center; gap: .45em; height: 32px; padding: 0 14px;
  border-radius: var(--r-sm); font-weight: 600; text-decoration: none; white-space: nowrap;
}
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #E8352B; }
.btn-ink { background: var(--ink); color: #fff; }
.cta { height: 40px; padding: 0 16px; font-size: 14px; }

/* ---------- Слои ---------- */
.layers {
  position: fixed; top: 10px; left: 10px; bottom: 10px; z-index: 15; width: 214px;
  padding: 12px 8px 0; background: var(--panel); border-radius: 16px; box-shadow: 0 1px 4px rgba(12, 12, 13, .05), 0 1px 4px rgba(12, 12, 13, .1);
}
.layers-h { display: flex; align-items: center; gap: 8px; padding: 4px 0 10px 12px; font-size: 12px; font-weight: 600; color: var(--muted); }
.layers ul { list-style: none; padding: 0; display: grid; gap: 1px; }
.layers button {
  width: 100%; height: 33px; padding: 8px 12px; border-radius: var(--r-sm); font-size: 12px;
  display: flex; align-items: center; gap: 8px; text-align: left; white-space: nowrap;
  transition: background-color .15s;
}
.layers button .lucide { width: 12px; height: 12px; color: var(--soft); }
.layers button:hover { background: var(--hover); }
.layers button[aria-current="true"] { background: var(--accent-tint); }
.layers button[aria-current="true"] .lucide { color: var(--accent); }
.layers button.is-comp, .layers button.is-comp .lucide { color: var(--comp); }
.layers button.is-comp[aria-current="true"] { background: var(--comp-tint); }

/* ---------- Полотно ---------- */
.viewport {
  position: fixed; inset: var(--top) 0 0 0; overflow: hidden; touch-action: none; user-select: none;
  background-color: var(--canvas);
  background-image: radial-gradient(circle, #D2D2D2 1px, transparent 1.3px);
}
.viewport.grid-off { background-image: none; }
.viewport.is-panning, body[data-tool="hand"] .viewport, body.space-hand .viewport { cursor: grab; }
.viewport.is-panning { cursor: grabbing; }
.world { position: absolute; left: 0; top: 0; width: 1px; height: 1px; transform-origin: 0 0; opacity: 0; transition: opacity .4s; }
.world.is-ready { opacity: 1; }
.world.is-moving { will-change: transform; }
.world img { -webkit-user-drag: none; }

/* ---------- Фреймы ---------- */
.frame { position: absolute; left: var(--x, 0); top: var(--y, 0); font-size: 28px; line-height: 1.35; }
.frame-label {
  position: absolute; left: 0; bottom: 100%; padding-bottom: 6px;
  font: 600 14px/1.4 "Golos Text", system-ui, sans-serif; color: var(--muted); white-space: nowrap;
  transform: scale(calc(1 / var(--z, 1))); transform-origin: 0 100%;
}
.frame-body { position: relative; padding: 2em; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .05); transition: opacity .25s; }
.frame-body:hover { outline: calc(1px / var(--z, 1)) solid var(--accent); }
.frame.is-selected .frame-body { outline: calc(2px / var(--z, 1)) solid var(--accent); }
.frame.is-selected .frame-label { color: var(--accent); }
.is-comp .frame-label { display: flex; align-items: center; gap: 4px; color: var(--comp); }
.is-comp .frame-label .lucide { width: 12px; height: 12px; }
.is-comp .frame-body:hover { outline-color: var(--comp); }
.frame.is-comp.is-selected .frame-body { outline-color: var(--comp); }
.frame.is-comp.is-selected .frame-label { color: var(--comp); }
body.is-diving::after { content: ""; position: fixed; inset: 0; z-index: 40; background: #fff; pointer-events: none; animation: dive-fade .75s ease-in forwards; }
@keyframes dive-fade { 0%, 55% { opacity: 0; } 100% { opacity: 1; } }
.frame img { display: block; width: 100%; height: auto; background: #EFEFEF; box-shadow: 0 0 0 1px rgba(0, 0, 0, .06); }
.frame h2 { font-size: 2.2em; line-height: 1; font-weight: 700; letter-spacing: -.03em; }
.frame .btn { height: auto; padding: .55em .9em; font-size: .8em; border-radius: var(--r-sm); }
.f-intro { width: 800px; }
.f-case { width: 1200px; }
.f-opyt { width: 1320px; }
.f-opyt .frame-body { padding-bottom: 1.57em; }
.f-kon { width: 800px; }
.f-res { width: 1320px; }

/* Интро */
.f-intro .frame-body { display: grid; grid-template-columns: 280px 1fr; gap: 1.6em 1.7em; align-items: start; }
.photo { aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--r); }
.f-intro h1 { font-size: 2.6em; line-height: .98; font-weight: 700; letter-spacing: -.035em; }
.role { margin: .5em 0 1.1em; color: var(--muted); }
.pitch { font-size: 1.3em; line-height: 1.2; font-weight: 600; letter-spacing: -.015em; }
.facts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .5em 1.4em; padding: 0; list-style: none; font-size: .8em; color: var(--muted); }
.facts li { display: flex; align-items: center; gap: .4em; }
.facts .status { color: var(--accent); font-weight: 600; }

/* Кейс */
.f-case .frame-body { display: grid; grid-template-columns: 400px 1fr; gap: 1.7em; }
.case-text { display: flex; flex-direction: column; }
.meta { margin: .55em 0 1.1em; font-size: .75em; color: var(--muted); }
.thesis { font-size: 1.3em; line-height: 1.2; font-weight: 600; letter-spacing: -.015em; }
.stats { margin-top: auto; padding: 1.1em 0 0; list-style: none; display: grid; grid-template-columns: minmax(5.36em, auto) 1fr; /* число не уже 150, как в компоненте «Цифра» */ gap: .3em .6em; }
.stats li { display: grid; grid-template-columns: subgrid; grid-column: 1 / -1; align-items: baseline; font-size: .8em; color: var(--muted); }
.stats b { font-size: 1.9em; line-height: 1.1; font-weight: 700; letter-spacing: -.03em; color: var(--ink); }
.btn-case { margin-top: 1.2em; align-self: flex-start; background: var(--comp); }
.btn-case:hover { background: #8A3BF0; }
.case-media { display: grid; gap: 16px; align-content: start; }
.cover { aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r); }
.shots { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 16px; }
.shots img { aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: var(--r-sm); }

/* Стикеры с решениями кейса: висят под фреймом, слегка заходя на него */
.notes { position: absolute; left: 2em; right: 2em; top: calc(100% - .9em); display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; align-items: start; pointer-events: none; }
.note {
  pointer-events: auto; padding: .85em 1em 1.1em; border-radius: var(--r-sm);
  background: var(--paper); color: var(--paper-ink); font-size: .82em; line-height: 1.38;
  box-shadow: 0 1px 2px rgba(60, 45, 10, .08), 0 14px 26px -12px rgba(60, 45, 10, .28);
  rotate: var(--rot, 0deg); cursor: grab; transition: opacity .25s, scale .2s, box-shadow .2s;
}
.note:nth-child(1) { --rot: -1.6deg; }
.note:nth-child(2) { --rot: 1.1deg; margin-top: .87em; }
.note:nth-child(3) { --rot: -.7deg; margin-top: .26em; }
.note.is-lifted { scale: 1.03; cursor: grabbing; box-shadow: 0 2px 4px rgba(60, 45, 10, .1), 0 24px 40px -14px rgba(60, 45, 10, .35); z-index: 3; }
.note h3 { display: flex; align-items: center; gap: .4em; margin-bottom: .45em; font-size: .78em; font-weight: 600; }

/* Студия: шапка в две колонки, ниже плитки проектов (крупные первым рядом, как в Figma 712 + 360 и 3 × 352) */
.f-studio { width: 1200px; }
.f-studio .frame-body { display: grid; gap: 40px; }
.studio-head { display: grid; grid-template-columns: 460px 1fr; gap: 48px; }
.studio-head .meta { margin: .5em 0 0; font-size: .79em; }
.studio-note { margin-top: .5em; font-size: .79em; line-height: 1.35; color: var(--muted); }
.studio-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 32px 16px; }
.proj { grid-column: span 2; display: flex; flex-direction: column; gap: 14px; text-decoration: none; }
.proj.is-big:first-child { grid-column: span 4; }
.proj.is-big + .proj.is-big { grid-column: span 2; }
.frame .proj img { aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r); transition: translate .3s cubic-bezier(.2, .8, .2, 1), box-shadow .2s; }
.frame .proj.is-big img { aspect-ratio: auto; height: 12.7em; }
a.proj:hover img { translate: 0 -4px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .06), 0 14px 30px -12px rgba(0, 0, 0, .3); }
.proj-cap { display: flex; flex-direction: column; gap: 4px; }
.proj-cap b { font-weight: 600; line-height: 1.3; }
.proj-cap span { font-size: .79em; color: var(--muted); }

/* «Куда мне дальше?»: светлая стопка компаний, кнопки и выбранное справа. Карточка в px: на телефоне она того же размера */
.f-kuda { width: 800px; }
.kuda-lead { margin: .5em 0 1em; font-size: .79em; line-height: 1.35; color: var(--muted); }
.kuda { display: grid; grid-template-columns: 340px 1fr; gap: 40px; }
.f-kuda .swipe-card-stack {
  --swipe-card-stack-bg: #F2F2F2; --swipe-card-stack-left: var(--accent); --swipe-card-stack-right: #14AE5C;
  --swipe-card-stack-width: 260px; --swipe-card-stack-radius: 18px; --swipe-card-stack-peek: 14px;
  padding: 56px 40px 27px; border-radius: 24px;
}
/* колонка колоды по её ширине: иначе её растягивает собственная ширина SVG-логотипа */
.f-kuda .swipe-card-stack__deck { grid-template-columns: minmax(0, 1fr); }
.f-kuda .swipe-card-stack__card { min-width: 0; gap: 8px; padding: 14px 14px 20px; box-shadow: 0 12px 30px rgba(0, 0, 0, .14); }
.f-kuda .swipe-card-stack__card h3 { padding: 4px 4px 0; font-size: 20px; line-height: 1.25; font-weight: 600; }
.f-kuda .swipe-card-stack__card p { padding: 0 4px; font-size: 15px; line-height: 1.35; color: var(--muted); }
.f-kuda .swipe-card-stack__card p a { color: var(--accent); }
.co { position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 14px; }
.co__kind { font-size: 30px; line-height: 1; font-weight: 700; letter-spacing: -.03em; }
.co__meta { font-size: 14px; color: var(--muted); }
.co--you { background: var(--accent); color: #fff; }
.co--you .co__meta { color: rgba(255, 255, 255, .85); }
.co--brand { align-items: center; justify-content: center; background: #F5F5F5; }
.co--brand .co__meta { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; }
.frame .co .co__logo { display: block; flex: none; height: 58px; margin-top: -12px; object-fit: contain; background: none; box-shadow: none; }
/* логотип-маска (VK) красится фоном, поэтому правило выше по специфичности его не трогает */
.frame .co .co__logo--mask { height: auto; background: var(--logo-color); -webkit-mask: var(--logo) center / contain no-repeat; mask: var(--logo) center / contain no-repeat; }
.kuda-side { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.kuda-btns { display: flex; gap: 12px; }
.kbtn { display: inline-flex; align-items: center; gap: .36em; padding: .43em .71em .43em .57em; border-radius: var(--r); background: var(--hover); font-size: .79em; font-weight: 600; transition: background-color .15s, scale .15s; }
.kbtn .lucide { width: 1em; height: 1em; }
.kbtn:hover { background: #E6E6E6; }
.kbtn:active { scale: .96; }
.kbtn-yes { background: #14AE5C; color: #fff; }
.kbtn-yes:hover { background: #119B52; }
.kuda-label { margin-top: 8px; font-size: .64em; font-weight: 600; color: var(--muted); }
.pick__chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; list-style: none; }
.pick__chips li { display: inline-flex; align-items: center; justify-content: center; width: 132px; height: 44px; border-radius: var(--r); background: var(--hover); font-size: 13px; font-weight: 600; animation: chip-in .4s cubic-bezier(.34, 1.56, .64, 1) both; }
@keyframes chip-in { from { scale: .6; opacity: 0; } }
.frame .pick__logo { display: block; height: 24px; object-fit: contain; background: none; box-shadow: none; }
.frame .pick__logo--mask { height: auto; max-height: 24px; background: var(--logo-color); -webkit-mask: var(--logo) center / contain no-repeat; mask: var(--logo) center / contain no-repeat; }
.pick__chips .pick__empty { width: auto; height: auto; justify-content: flex-start; background: none; font-size: .64em; font-weight: 400; color: var(--muted); animation: none; }

/* Опыт: строка = лого, компания и роль, что делал, когда, полоска на шкале 2019-2027 */
.axis, .job { display: grid; grid-template-columns: 2.29em 9em 1fr 6.39em 8.5em; column-gap: .89em; }
.axis { margin-top: .9em; height: 1.1em; padding: 0 .71em; }
.axis-in { grid-column: 5; position: relative; font: 500 .5em/1 var(--mono); color: var(--soft); }
.axis-in span { position: absolute; top: 0; translate: -50% 0; }
.jobs { padding: 0; list-style: none; display: grid; gap: .29em; }
/* строка как карточка (отступ 20, скругление 12): при наведении на компанию с сайтом подсвечивается, у курсора открывается превью */
.job { position: relative; padding: .71em; border-radius: var(--r); align-items: start; transition: background-color .2s, opacity .3s; }
.jobs.is-peek .job:not(.is-hot) { opacity: .35; }
@media (hover: hover) { .job:has(.job-link):hover { background: var(--canvas); } }
.frame .job-logo { width: 2.2em; height: 2.2em; border-radius: 31%; object-fit: cover; display: grid; place-items: center; background: var(--hover); color: var(--muted); }
.job-co b { display: block; font-weight: 600; }
.job-co span { display: block; }
/* ссылка растянута на всю строку; кнопка кейса лежит поверх неё */
.job-link { text-decoration: none; }
.job-link::after { content: ""; position: absolute; inset: 0; }
.job-case { position: relative; z-index: 1; }
.job-co span, .job-when { font-size: .72em; color: var(--muted); }
.job-what { font-size: .78em; line-height: 1.3; padding-top: .15em; }
.job-when { text-align: right; white-space: nowrap; padding-top: .35em; }
.job-case {
  display: inline-flex; align-items: center; gap: .4em; margin-top: .4em; padding: .25em .6em;
  border: 1px solid var(--line); border-radius: var(--r-sm); font-size: .82em; font-weight: 600;
  transition: border-color .15s, color .15s;
}
.job-case:hover { border-color: var(--accent); color: var(--accent); }
.track { align-self: start; margin-top: 1em; position: relative; display: block; height: .22em; border-radius: var(--r-sm); background: var(--hover); }
.track i { position: absolute; top: 0; bottom: 0; left: var(--a); width: var(--w); border-radius: var(--r-sm); background: var(--ink); }
.frame .job-logo.is-app { border-radius: 0; background: none; box-shadow: none; }

/* Ресурсы и контакты */
.cards, .contacts { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 1em; }
.res, .contact {
  display: flex; text-decoration: none; padding: .9em 1em; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--canvas); transition: border-color .15s, background-color .15s;
}
.res { flex-direction: column; gap: 20px; padding: 1em; }
.res-text { display: flex; flex-direction: column; gap: .2em; }
.res b, .contact b { display: flex; align-items: center; justify-content: space-between; gap: .5em; font-weight: 600; }
.res-text > span:not(.btn) { font-size: .79em; color: var(--muted); }
.res p { font-size: .79em; }
.frame .res-pic { aspect-ratio: 16 / 9; object-fit: cover; object-position: top; border-radius: 8px; }
/* Большая карточка: текст слева, справа компьютер и телефон внахлёст (раскладка из Figma, 784×420) */
.res-main { grid-column: 1 / -1; flex-direction: row; gap: 1em; }
.res-main .res-text { flex: 0 0 12.15em; }
.res-main b { font-size: 1.57em; line-height: 1.1; font-weight: 700; letter-spacing: -.03em; }
.res-main .btn { margin-top: auto; align-self: flex-start; font-size: .79em; }
.res-duo { position: relative; flex: 1; aspect-ratio: 784 / 420; border-radius: 8px; background: #EAEAEA; overflow: hidden; }
.frame .res-duo img { position: absolute; height: auto; box-shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 16px 36px rgba(0, 0, 0, .14); transition: translate .4s cubic-bezier(.2, .8, .2, 1); }
.frame .duo-desk { left: 4.6%; top: 8.6%; width: 79.1%; border-radius: 8px; }
.frame .duo-phone { left: 74%; top: 13.8%; width: 21.9%; border-radius: .8em; outline: .14em solid var(--ink); }
.res-main:hover .duo-desk { translate: 0 -2%; }
.res-main:hover .duo-phone { translate: 0 -5%; }
.res:hover, .contact:hover { border-color: var(--ink); }
.contact { align-items: center; justify-content: space-between; gap: 1em; }
.contact span span { display: block; font-size: .75em; color: var(--muted); }
.contact.main { grid-column: 1 / -1; padding: 1em 1.1em; font-size: 1.15em; background: var(--tg); border-color: var(--tg); color: #fff; }
.contact.main span span { color: rgba(255, 255, 255, .85); }
.contact .tg { width: 2em; height: 2em; flex: none; }
.contact.main:hover { background: #1E90C9; }

/* Окно превью сайта: строка браузера с адресом и скриншот, лента едет на номер строки */
.site-pv { position: fixed; left: 0; top: 0; z-index: 30; width: 320px; height: 232px; pointer-events: none; will-change: transform; }
.site-pv__frame { width: 100%; height: 100%; overflow: hidden; border-radius: var(--r); background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .06), 0 24px 48px -14px rgba(0, 0, 0, .35); scale: 0; transform-origin: 0 50%; transition: scale .3s cubic-bezier(.25, .46, .45, .94); }
.site-pv.is-on .site-pv__frame { scale: 1; transition-duration: .4s; }
.site-pv__track { height: 100%; transform: translateY(calc(var(--i, 0) * -100%)); transition: transform .45s cubic-bezier(.25, .46, .45, .94); }
.site-pv figure { margin: 0; height: 100%; display: flex; flex-direction: column; }
.site-pv__bar { flex: none; display: flex; align-items: center; gap: 5px; height: 32px; padding: 0 12px; border-bottom: 1px solid var(--line); background: var(--canvas); }
.site-pv__bar i { width: 8px; height: 8px; border-radius: 50%; background: #D9D9D9; }
.site-pv__bar b { margin-left: 8px; font: 500 12px/1 var(--mono); color: var(--muted); }
.site-pv img { flex: 1; min-height: 0; width: 100%; object-fit: cover; object-position: top; }

/* Режим комментариев: остаются только стикеры */
body[data-tool="comment"] .frame-body { opacity: .3; }

/* ---------- Соавторы ---------- */
.peer { position: absolute; left: 0; top: 0; z-index: 6; transform-origin: 0 0; pointer-events: none; }
.peer svg { display: block; width: 22px; height: 22px; margin: -4px 0 0 -4px; fill: var(--c); stroke: #fff; stroke-width: 1.6; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .25)); }
.peer-tag { position: absolute; left: 13px; top: 15px; padding: 3px 7px; border-radius: var(--r-sm); background: var(--c); color: #fff; font: 500 12px/1.2 "Golos Text", system-ui, sans-serif; white-space: nowrap; }
.peer-ring { position: absolute; left: -12px; top: -12px; width: 24px; height: 24px; border: 2px solid var(--c); border-radius: 50%; opacity: 0; }
.peer.is-click .peer-ring { animation: ring .7s ease-out; }
@keyframes ring { from { transform: scale(.3); opacity: .9; } to { transform: scale(1.5); opacity: 0; } }
.peer-sel { position: absolute; z-index: 5; pointer-events: none; border: calc(2px / var(--z, 1)) solid var(--c); opacity: 0; transition: opacity .25s; }
.peer-sel.on { opacity: 1; }

/* ---------- Нижняя панель и подсказка ---------- */
.toolbar, .hint { position: fixed; left: 50%; translate: -50% 0; z-index: 15; }
.toolbar {
  bottom: 16px; display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: var(--r); background: var(--panel);
  box-shadow: 0 0 0 1px var(--line), 0 10px 28px rgba(0, 0, 0, .08);
}
.tools { display: flex; gap: 4px; }
.tools button { width: 40px; height: 40px; border-radius: var(--r-sm); display: grid; place-items: center; transition: background-color .15s; }
.tools button .lucide { width: 20px; height: 20px; }
.tools button:hover, .zoom .ibtn:hover { background: var(--hover); }
.tools button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.hint {
  bottom: 80px; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--r-sm);
  background: var(--ink); color: #fff; font-size: 13px; white-space: nowrap; pointer-events: none;
  transition: opacity .3s, translate .3s;
}
.hint .lucide { width: 14px; height: 14px; }
.hint.is-hidden { opacity: 0; translate: -50% 8px; }

/* ---------- Мобильная версия: без свободного полотна, фреймы стопкой ---------- */
@media (max-width: 759px) {
  html { scroll-snap-type: y proximity; scroll-padding-top: 84px; }
  html, body { height: auto; }
  body { overflow: visible; }
  .toolbar, .hint, .peer, .peer-sel, .layers-h { display: none; }
  .layers { position: sticky; top: 0; left: auto; bottom: auto; width: auto; padding: 8px 12px; border: 0; border-radius: 0; box-shadow: none; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
  .layers ul { display: flex; gap: 4px; }
  .layers button { width: auto; height: 36px; padding: 0 12px; }
  .viewport { position: static; overflow: visible; background: none; touch-action: auto; user-select: auto; }
  .world { position: static; width: auto; height: auto; padding: 4px 16px 56px; transform: none !important; opacity: 1; }
  .frame { position: relative; left: auto; top: auto; width: auto; margin-top: 40px; font-size: 15px; scroll-snap-align: start; }
  .frame-label { transform: none; }
  .frame-body { padding: 20px; }
  .frame-body:hover { outline: 0; }
  .f-intro .frame-body, .f-case .frame-body { grid-template-columns: 1fr; gap: 20px; }
  .studio-head, .kuda { grid-template-columns: 1fr; gap: 20px; }
  .studio-grid { grid-template-columns: 1fr 1fr; gap: 20px 10px; }
  .proj, .proj.is-big + .proj.is-big { grid-column: span 1; }
  .proj.is-big:first-child { grid-column: span 2; }
  .frame .proj.is-big img { height: auto; aspect-ratio: 4 / 3; }
  .frame .proj.is-big:first-child img { aspect-ratio: 2 / 1; }
  .f-kuda .swipe-card-stack { padding: 48px 16px 24px; }
  .frame .photo { width: 112px; }
  .shots { gap: 8px; }
  .case-media { gap: 8px; }
  .notes { position: static; grid-template-columns: 1fr; gap: 10px; margin-top: 12px; }
  .note { translate: none !important; cursor: auto; }
  .note:nth-child(n) { margin-top: 0; }
  .cards, .contacts { grid-template-columns: 1fr; gap: 10px; }
  .res-main { flex-direction: column; }
  .res-main .res-text { flex: none; }
  .res-main .btn { margin-top: .6em; }
  .axis, .job { grid-template-columns: 2.2em 1fr auto; row-gap: .4em; }
  .axis-in, .job-what, .track { grid-column: 2 / -1; }
  .job-when { grid-column: 3; grid-row: 1; }
  .job-what:empty { display: none; }
}

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