/* Слой рабочей версии поверх Studio: вход, данные API, установка. Токены — DESIGN.md */

/* пока проверяем сессию и пока гость, приложение не показываем: visibility, а не display,
   чтобы Studio успела измерить вкладки при запуске */
body[data-auth="loading"] > :not(.production-auth):not(.svg-defs),
body[data-auth="guest"] > :not(.production-auth):not(.svg-defs) { visibility: hidden; }
body[data-auth="guest"] { overflow: hidden; }

/* Вход и вступление */
.production-auth {
  --entry-paper: var(--studio-page, #f2eee6);
  --entry-surface: var(--studio-panel, #fffdf9);
  --entry-ink: var(--studio-ink, #171613);
  --entry-muted: var(--studio-muted, #655f56);
  --entry-line: var(--studio-line, #988a76);
  --entry-line-soft: var(--studio-line-soft, #d8cfc1);
  --entry-frame: var(--studio-frame, #171613);
  --entry-frame-soft: var(--studio-frame-soft, #24221d);
  --entry-on-frame: var(--studio-on-frame, #f7f1e7);
  --entry-bronze-dark: var(--studio-accent-dark, #65491f);
  --entry-danger: var(--studio-urgent, #934b3a);
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--entry-paper);
  color: var(--entry-ink);
  font-family: Manrope, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
}
.production-auth[hidden] { display: none; }

/* без min-height: с ним строка сетки застревала на высоте экрана и длинная форма
   вылезала за колонку без нижнего отступа; до экрана колонку и так растягивает сетка */
.entry-copy {
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-width: 0;
  padding: 32px clamp(24px, 6vw, 88px);
}
.entry-copy > * { width: 100%; max-width: 440px; }

.entry-head { display: flex; align-items: center; gap: 16px; }
.entry-logo {
  display: grid;
  place-items: center;
  flex: none;
  width: 132px;
  height: 69px;
  padding: 0;
  border-radius: 0;
  background: transparent;
}
.entry-logo img { width: 100%; height: auto; }
.entry-positioning {
  margin: 0;
  padding-left: 16px;
  border-left: 1px solid var(--entry-line-soft);
  color: var(--entry-muted);
  font-size: 12px;
  line-height: 1.5;
}

.entry-body { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-bottom: 24px; }
.entry-nav { display: flex; gap: 8px; }
.entry-nav button { flex: 1; min-height: 46px; padding: 10px 16px; border: 1px solid var(--entry-line-soft); border-radius: 10px; color: var(--entry-muted); background: var(--entry-surface); font-size: 14px; font-weight: 600; }
.entry-nav button[aria-current="page"] { border-color: var(--entry-ink); background: var(--entry-ink); color: var(--entry-on-frame); }
.entry-label-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.entry-label-row .entry-link { font-size: 12px; min-height: 32px; padding: 5px 9px; border: 1px solid var(--entry-line-soft); border-radius: 8px; text-decoration: none; }
.entry-eyebrow {
  margin: 0 0 14px;
  color: var(--entry-bronze-dark);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.entry-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(32px, 3.5vw, 48px);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: 0;
}
.entry-title:focus { outline: none; }
.entry-lead { max-width: 40ch; margin: 18px 0 0; color: var(--entry-muted); }

.entry-inviter { display: flex; align-items: center; gap: 12px; margin: 0 0 22px; }
.entry-inviter-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--entry-frame);
  color: var(--entry-on-frame);
  font-size: 14px;
  font-weight: 600;
}
.entry-inviter small { display: block; color: var(--entry-muted); font-size: 12px; line-height: 1.4; }
.entry-inviter strong { display: block; font-size: 14px; font-weight: 600; line-height: 1.4; }

/* форма на карточке: граница поля #988A76 даёт 3:1 к её фону, к бумаге было бы меньше */
.entry-form {
  margin-top: 32px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.entry-form > * + * { margin-top: 18px; }
.entry-field { display: grid; gap: 8px; }
.entry-label { font-size: 12px; font-weight: 600; line-height: 1.4; }
.entry-input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--entry-line);
  border-radius: 10px;
  background: var(--entry-surface);
  color: var(--entry-ink);
  font: inherit;
  /* 16px — иначе iOS приближает страницу при фокусе */
  font-size: 16px;
}
.entry-input[aria-invalid="true"] { border-color: var(--entry-danger); }
.entry-hint { margin: 0; color: var(--entry-muted); font-size: 12px; line-height: 1.5; }

.entry-password { position: relative; }
.entry-password .entry-input { padding-right: 52px; }
.entry-reveal {
  position: absolute;
  top: 1px;
  right: 1px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 9px;
  color: var(--entry-muted);
}
.entry-reveal[aria-pressed="true"] { color: var(--entry-ink); }
.production-auth .entry-reveal:focus-visible { outline-offset: -3px; }

/* фото и логотип в заявке и при вступлении: прозрачное поле файла лежит поверх плашки — выбор открывается нажатием в любом месте */
.entry-field[hidden] { display: none; }
.entry-picker { position: relative; display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 10px 12px 10px 10px; border: 1px dashed var(--entry-line); border-radius: 10px; background: var(--entry-surface); }
.entry-picker.is-picked { border-style: solid; }
.entry-picker:has(.entry-file[aria-invalid="true"]) { border-color: var(--entry-danger); }
.entry-picker:has(.entry-file:focus-visible) { outline: 3px solid var(--studio-focus, #765b34); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .entry-picker:hover { border-color: var(--entry-ink); } }
.entry-picker-preview { position: relative; display: grid; place-items: center; flex: none; width: 52px; height: 52px; overflow: hidden; border-radius: 50%; background: var(--entry-paper); color: var(--entry-muted); }
.entry-picker.is-logo .entry-picker-preview { border-radius: 8px; }
.entry-picker-preview svg { width: 22px; height: 22px; }
.entry-picker-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.entry-picker.is-logo .entry-picker-preview img { padding: 4px; background: #fff; object-fit: contain; }
.entry-picker-preview img[hidden] { display: none; }
.entry-picker-text { display: grid; flex: 1; gap: 2px; min-width: 0; }
.entry-picker-text strong { font-size: 14px; font-weight: 600; line-height: 1.4; }
.entry-picker-text small { color: var(--entry-muted); font-size: 12px; line-height: 1.5; }
/* длинное имя файла с телефона — в одну строку с многоточием */
.entry-picker.is-picked .entry-picker-text small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.entry-file { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.entry-picker-remove { position: relative; z-index: 1; flex: none; min-width: 44px; min-height: 44px; padding: 0 12px; border: 1px solid var(--entry-line-soft); border-radius: 8px; background: var(--entry-surface); color: var(--entry-ink); font-size: 13px; font-weight: 600; }
.entry-picker-remove[hidden] { display: none; }

.entry-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 10px;
  background: var(--entry-ink);
  color: var(--entry-on-frame);
  font-size: 14px;
  font-weight: 600;
}
.entry-submit:hover { background: var(--entry-frame-soft); }
.entry-submit[aria-disabled="true"] { cursor: progress; }
.entry-submit svg { width: 18px; height: 18px; }

.entry-error { color: var(--entry-danger); font-size: 13px; font-weight: 600; line-height: 1.5; }
/* пустая строка ошибки не должна оставлять дыру под кнопкой */
.entry-form > .entry-error:empty { margin: 0; }

.entry-switch { margin: 18px 0 0; color: var(--entry-muted); font-size: 13px; }
.entry-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 2px;
  color: var(--entry-bronze-dark);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.entry-help {
  display: grid;
  gap: 10px;
  margin: 24px 0 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--entry-line-soft);
  color: var(--entry-muted);
  font-size: 13px;
  line-height: 1.55;
}
.entry-help p { margin: 0; }
.entry-help strong { color: var(--entry-ink); font-weight: 600; }
.entry-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.entry-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid var(--entry-line);
  border-radius: 10px;
  background: var(--entry-surface);
  color: var(--entry-ink);
  font-size: 14px;
  font-weight: 600;
  /* «На главную» — ссылка в виде кнопки: подчёркивание от ссылки ей не нужно */
  text-decoration: none;
}
.entry-secondary:hover { border-color: var(--entry-ink); }
/* «Пароль изменён» над формой входа: итог действия, а не ошибка. Пустой блок остаётся в дереве
   с нулевой высотой — иначе читалка не объявит текст, появившийся в скрытом регионе */
.entry-notice { margin: 20px 0 0; padding: 12px 14px; border: 1px solid rgba(193, 163, 108, .55); border-radius: 10px; background: #f7f1e4; color: var(--entry-ink); font-size: 13px; font-weight: 500; line-height: 1.55; }
.entry-notice:empty { margin: 0; padding: 0; border: 0; }
/* длинная почта в тексте не должна раздвигать колонку на телефоне */
:is([data-recovery-lead], [data-reset-lead]) { overflow-wrap: anywhere; }

.entry-visual {
  position: sticky;
  top: 24px;
  align-self: start;
  height: calc(100dvh - 48px);
  margin: 24px 24px 24px 0;
  overflow: hidden;
  border-radius: 24px;
  background: var(--entry-frame) url("assets/entry-threshold.webp") 50% 50% / cover no-repeat;
}
/* подпись по ширине текста: на всю ширину тёмная плашка закрывала полкартинки пустотой */
.entry-caption {
  position: absolute;
  bottom: 24px;
  left: 24px;
  max-width: min(460px, calc(100% - 48px));
  display: grid;
  gap: 8px;
  padding: 20px 24px;
  border: 1px solid rgba(247, 241, 231, .14);
  border-radius: 16px;
  background: rgba(23, 22, 19, .86);
  color: var(--entry-on-frame);
}
.entry-caption p { margin: 0; }
.entry-caption-kicker { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.entry-caption-text { max-width: 30ch; font-size: 20px; font-weight: 600; line-height: 1.35; letter-spacing: -.02em; }
.entry-credit { color: rgba(247, 241, 231, .78); font-size: 12px; }

@media (max-width: 899px) {
  .production-auth { grid-template-columns: minmax(0, 1fr); }
  .entry-visual { display: none; }
  .entry-copy { align-items: center; gap: 32px; padding: 24px 16px 32px; }
  .entry-copy > * { max-width: 480px; }
  .entry-body { justify-content: flex-start; }
}
/* на планшете картинка полосой сверху, иначе нижняя треть экрана пустует;
   на телефоне её нет, чтобы форма оставалась на первом экране */
@media (min-width: 600px) and (max-width: 899px) {
  .entry-visual {
    display: block;
    position: relative;
    top: auto;
    order: -1;
    height: 240px;
    margin: 16px 16px 0;
    border-radius: 16px;
  }
  .entry-caption { display: none; }
}
@media (max-width: 479px) {
  .entry-form { padding: 0; }
  .entry-logo { width: 120px; height: 63px; }
}

/* ---------- Рабочие экраны на живых данных ---------- */

/* Занятая кнопка: aria-disabled вместо disabled, фокус остаётся на месте */
body.studio [data-busy="1"] { cursor: progress; opacity: .72; }
/* заголовок экрана получает фокус программно при переходе — он не нажимается, и системное синее кольцо на нём смотрелось как выделение; h1 так же гасит прототип */
body.studio :is(h2, h3, h4)[tabindex="-1"]:focus { outline: none; }

/* город агента в шапке — как в карточке агента. Сжимается первым: меню и кнопки не сжимаются и не переносятся,
   длинное название уходит в многоточие, полное — в подсказке */
body.studio .header-city { display: flex; flex: 0 1 auto; align-items: center; gap: 6px; min-width: 0; margin: 0; color: #c9c0b2; font-size: 13px; line-height: 1.3; white-space: nowrap; }
body.studio .header-city[hidden] { display: none; }
body.studio .header-city svg { width: 15px; height: 15px; stroke: var(--studio-gold); stroke-width: 1.7; }
body.studio .header-city [data-self-city-name] { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
body.studio :is(.primary-nav, .header-tools) { flex: none; }
body.studio .primary-nav button { white-space: nowrap; }
/* в переписке шапка — ячейка сетки body: без min-width: 0 она растягивалась по длине города и уводила кнопки за край */
body.studio[data-screen="chat"] > .site-header { min-width: 0; }
@media (max-width: 1080px) {
  /* как на остальных экранах: в переписке пункты были шире, и меню прыгало при переходе */
  body.studio[data-screen="chat"] .primary-nav button { padding-inline: 12px; }
}
/* 768 px — iPad: «Краснодар» влезает целиком, когда промежутки между логотипом, городом, меню и кнопками чуть уже */
@media (min-width: 761px) and (max-width: 960px) {
  body.studio .header-inner, body.studio[data-screen="chat"] .header-inner { gap: 18px; }
}
/* на 320–370 px «Краснодар» влезает целиком: логотип чуть меньше, промежутки уже; в переписке правила шапки весомее */
@media (max-width: 370px) {
  body.studio .header-inner, body.studio[data-screen="chat"] .header-inner { gap: 8px; }
  body.studio :is(.brand, .brandmark), body.studio[data-screen="chat"] :is(.brand, .brandmark) { width: 82px; height: 41px; }
  body.studio .header-city { gap: 4px; font-size: 12px; }
  body.studio .header-city svg { width: 13px; height: 13px; }
}

/* Счётчики: шапка, док, колокольчик */
body.studio .nav-count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--studio-gold);
  color: var(--studio-frame);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
body.studio .dock-count {
  position: absolute;
  top: 5px;
  left: calc(50% + 5px);
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--studio-accent-dark);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
body.studio .bell-dot {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--studio-gold);
  box-shadow: 0 0 0 2px var(--studio-frame);
  pointer-events: none;
}

/* Тост */
body.studio .toast {
  bottom: 24px;
  z-index: 90;
  width: max-content;
  max-width: min(440px, calc(100% - 32px));
  border: 1px solid rgba(193, 163, 108, .38);
  border-radius: 12px;
  background: var(--studio-frame);
  color: var(--studio-on-frame);
  box-shadow: var(--studio-shadow-float);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  text-align: left;
}
body.studio .toast:not(:empty) { padding: 13px 18px; }
/* пустой регион остаётся в дереве доступности, но не рисуется */
body.studio .toast:empty { border-color: transparent; background: transparent; box-shadow: none; }
/* в переписке снизу поле ввода — тост уходит наверх */
body.studio[data-screen="chat"] .toast { top: calc(80px + env(safe-area-inset-top)); bottom: auto; }

/* Пустые состояния и загрузка */
body.studio .empty-state {
  grid-column: 1 / -1;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: clamp(44px, 7vw, 72px) 24px;
  border: 1px dashed var(--studio-line);
  border-radius: var(--studio-radius-panel);
  background: rgba(255, 253, 249, .55);
  color: var(--studio-muted);
  text-align: center;
}
body.studio .empty-mark { color: var(--studio-accent); font-size: 44px; line-height: 1; }
body.studio .empty-state h2 {
  margin: 4px 0 0;
  color: var(--studio-ink);
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.3;
}
body.studio .empty-state p { max-width: 440px; margin: 0; font-size: 14px; line-height: 1.7; }
body.studio .empty-state .button { width: auto; margin: 10px 0 0; gap: 10px; }
body.studio .deals-empty { margin-top: 20px; }

body.studio .property-skeleton {
  display: grid;
  align-content: start;
  gap: 12px;
  padding-bottom: 22px;
  overflow: hidden;
  border: 1px solid var(--studio-line-soft);
  border-radius: var(--studio-radius-card);
  background: var(--studio-panel);
}
body.studio .property-skeleton span {
  display: block;
  height: 14px;
  margin: 0 20px;
  border-radius: 6px;
  background: linear-gradient(90deg, #ece6db 0%, #f7f3ec 50%, #ece6db 100%) 0 0 / 200% 100%;
  animation: studio-skeleton 1.4s ease-in-out infinite;
}
body.studio .property-skeleton span:first-child { height: auto; min-height: 235px; margin: 0 0 8px; border-radius: 0; aspect-ratio: 1.95; }
body.studio .property-skeleton span:nth-child(2) { width: 46%; height: 22px; }
body.studio .property-skeleton span:last-child { width: 72%; }
@keyframes studio-skeleton {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

/* Каталог: карточка без фото, приватный объект, автор */
body.studio .property-card.is-api .photo-link { position: relative; }
body.studio .photo-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--studio-selected);
  color: var(--studio-muted);
  font-size: 13px;
  font-weight: 600;
}
body.studio .photo-empty svg,
body.studio .detail-photo-empty svg {
  box-sizing: content-box;
  width: 22px;
  height: 22px;
  padding: 13px;
  border: 1px solid rgba(139, 107, 56, .38);
  border-radius: 50%;
  color: var(--studio-accent-dark);
}
body.studio .property-ownership.is-private {
  border: 1px dashed var(--studio-accent);
  background: var(--studio-panel);
  color: var(--studio-accent-dark);
}
/* Карточка объекта */
/* одна колонка и на компьютере (владелец, 11.10: «чтобы не было таких отвратительных пустых полей»): в две колонки фото стояло
   у верха окна, а под ним, пока листалось длинное описание, пустовала половина окна. 640 — фото крупное, строка описания
   не длиннее ~70 знаков. В низком окне ноутбука уже: под кадром 4:3 остаётся 140px на тип объекта и название, а не одно фото;
   не уже 520, пока кадр 4:3 такой ширины помещается в окно по высоте (телефон боком — 844×390) */
body.studio .property-dialog { width: min(640px, max(min(520px, calc((100dvh - 40px) * 4 / 3)), calc((100dvh - 180px) * 4 / 3)), calc(100vw - 32px)); overflow: hidden auto; }
body.studio .property-dialog[open] { display: block; }
/* крестик держится у верха окна, пока листается описание: в одну колонку фото уходит вверх вместе с ним, а с ним уезжал и крестик.
   Отрицательный отступ снизу гасит место кнопки в потоке — фото по-прежнему от самого верха */
body.studio .property-dialog > .dialog-close { position: sticky; top: 10px; right: auto; z-index: 3; display: flex; margin: 10px 10px -54px auto; }
/* рамка — по форме первого фото (--detail-ratio ставит production-app.js, от 4:3 до 16:9): в рамке на всю высоту окна размытые
   поля занимали 57–68 % кадра («фото с обрезанными краями замутнение», владелец 10.10). Предела высоты нет: через форму рамки
   он сужал бы её, и по бокам снова появлялись бы поля */
body.studio .detail-gallery { position: relative; width: 100%; aspect-ratio: var(--detail-ratio, 3 / 2); overflow: hidden; background: var(--studio-selected); }
/* фото — лента как в презентации (владелец, 06.10): палец, тачпад и колесо листают, кадр встаёт по месту; плавность стрелок —
   из скрипта: со scroll-behavior: smooth тачпад тянет ленту рывками */
body.studio :is(.detail-track, .viewer-track) { position: absolute; inset: 0; display: flex; overflow: auto hidden; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; }
body.studio :is(.detail-track, .viewer-track)::-webkit-scrollbar { display: none; }
/* overflow: hidden — размытые поля увеличены на 1.3 и иначе заходили бы на соседний кадр */
body.studio :is(.detail-slide, .viewer-slide) { position: relative; flex: 0 0 100%; min-width: 0; height: 100%; margin: 0; overflow: hidden; scroll-snap-align: start; scroll-snap-stop: always; }
body.studio .detail-ambient { position: absolute; inset: 0; width: 100%; height: 100%; filter: blur(28px) saturate(1.15) brightness(.78); transform: scale(1.3); }
body.studio .detail-photo { position: absolute; inset: 0; display: block; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 0; background: none; cursor: zoom-in; }
body.studio .detail-photo img { display: block; width: 100%; height: 100%; object-fit: contain; }
/* кольцо внутри кадра: снаружи его срезает лента; светлая подложка — чтобы кольцо читалось и на тёмном снимке */
body.studio .detail-photo:focus-visible { outline-offset: -3px; box-shadow: inset 0 0 0 6px #f7f1e7; }
/* счётчик и стрелки — как в презентации: тёмная плашка справа внизу, круглые стрелки по бокам */
body.studio :is(.detail-count, .viewer-count) { position: absolute; right: 16px; bottom: 16px; z-index: 2; margin: 0; padding: 3px 11px; border-radius: 999px; background: rgba(23, 22, 19, .72); color: #f7f1e7; font-size: 13px; line-height: 1.5; font-variant-numeric: tabular-nums; pointer-events: none; }
body.studio :is(.detail-nav, .viewer-nav) { position: absolute; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid rgba(247, 241, 231, .3); border-radius: 50%; background: rgba(23, 22, 19, .72); color: #f7f1e7; transition: background-color .15s ease, opacity .15s ease, transform .16s ease-out; }
body.studio :is(.detail-nav, .viewer-nav) { top: 50%; transform: translateY(-50%); }
body.studio :is(.detail-prev, .viewer-prev) { left: 16px; }
body.studio :is(.detail-next, .viewer-next) { right: 16px; }
body.studio :is(.detail-nav, .viewer-nav) svg { width: 18px; height: 18px; }
body.studio :is(.detail-nav, .viewer-nav):active:not(:disabled) { transform: translateY(-50%) scale(.94); }
body.studio .viewer-close:active { transform: scale(.94); }
body.studio :is(.detail-nav, .viewer-nav):disabled { opacity: .3; cursor: default; }
body.studio :is(.detail-nav, .viewer-nav, .viewer-close):focus-visible { outline-color: #f7f1e7; outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  body.studio :is(.detail-nav, .viewer-nav):not(:disabled):hover { background: rgba(23, 22, 19, .9); }
}
/* на телефоне листают пальцем — стрелки только закрывали бы кадр */
@media (pointer: coarse) {
  body.studio :is(.detail-nav, .viewer-nav) { display: none; }
}
/* просмотр на весь экран: ничего, кроме кадра, крестика и счётчика; касание — ×2,5 в точке касания, второе — как было */
body.studio .photo-viewer { inset: 0; width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; overflow: hidden; border: 0; border-radius: 0; background: #0d0c0b; color: #f7f1e7; box-shadow: none; transition: opacity .2s var(--ease-smooth-out); }
@starting-style { body.studio .photo-viewer[open] { opacity: 0; } }
body.studio .photo-viewer::backdrop { background: transparent; backdrop-filter: none; }
body.studio .viewer-slide img { display: block; width: 100%; height: 100%; object-fit: contain; transform-origin: 0 0; transition: transform .24s cubic-bezier(.23, 1, .32, 1); cursor: zoom-in; touch-action: pan-x; user-select: none; -webkit-user-select: none; }
/* увеличенный кадр двигает палец, а не лента */
body.studio .viewer-slide img.is-zoomed { cursor: grab; touch-action: none; }
body.studio .viewer-slide img.is-dragging { cursor: grabbing; transition: none; }
body.studio .viewer-track.is-zoomed { overflow-x: hidden; }
/* крестик — квадратный, как в карточке объекта (владелец, 06.10): вид от .dialog-close, здесь только место над кадром */
body.studio .viewer-close { top: calc(10px + env(safe-area-inset-top)); right: calc(10px + env(safe-area-inset-right)); z-index: 3; }
body.studio .viewer-count { bottom: calc(16px + env(safe-area-inset-bottom)); }
/* смахивание: кнопки и счётчик уходят, остаётся только кадр — как в Telegram */
body.studio .photo-viewer :is(.viewer-close, .viewer-count) { transition: opacity .15s ease; }
body.studio .photo-viewer.is-swiping :is(.viewer-close, .viewer-nav, .viewer-count) { opacity: 0; pointer-events: none; }
body.studio .detail-photo-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--studio-muted);
  font-size: 13px;
  font-weight: 600;
}
body.studio .detail-copy { display: flex; flex-direction: column; min-width: 0; padding: 30px 40px 34px; }
body.studio .detail-kicker {
  margin: 0 56px 0 0;
  color: var(--studio-accent-dark);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
body.studio .property-dialog h2 { margin: 12px 0 8px; font-size: clamp(26px, 2.6vw, 34px); line-height: 1.12; }
body.studio #detail-address { margin: 0; color: var(--studio-muted); font-size: 13px; line-height: 1.5; }
/* закладка — справа от цены, куда показал владелец 06.10; скрытая (свой объект) колонку не держит — отступ у неё самой */
body.studio .detail-summary { grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 0; margin: 20px 0; padding: 18px 0; border-color: var(--studio-line-soft); }
body.studio .detail-price-box { display: grid; gap: 6px; min-width: 0; }
body.studio .detail-summary > #detail-save { margin-left: 16px; }
body.studio .detail-summary strong { font-size: 28px; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
body.studio .detail-summary span { color: var(--studio-muted); font-size: 13px; }
body.studio .detail-copy > #detail-presentation { margin-top: 18px; }
/* сообщение редактора важнее серой подсказки про черновик — дубль и ошибки иначе сливаются с ней */
body.studio .property-editor-actions .feedback:not(:empty) { margin: 0 0 6px; color: var(--studio-ink); font-size: 13px; font-weight: 600; line-height: 1.5; }
body.studio .detail-author { gap: 16px; margin: 22px 0; }
/* автор объекта — карточкой, как у клиента (просьба владельца 06.10 «вытянуть ФИО»): крупное фото, имя жирно, стаж, город, логотип справа.
   Вся карточка — кнопка кабинета агента */
body.studio .detail-agent { display: flex; flex: 1 1 auto; align-items: center; gap: 14px; min-width: 0; margin: 0; padding: 14px 16px; border: 1px solid var(--studio-line-soft); border-radius: var(--studio-radius-card); background: var(--studio-panel); color: inherit; font: inherit; text-align: left; cursor: pointer; }
body.studio .detail-agent .avatar.mini { flex: none; width: 52px; height: 52px; background: var(--studio-selected); color: var(--studio-accent-dark); font-size: 16px; }
body.studio .detail-agent-text { display: grid; flex: 1 1 auto; gap: 3px; min-width: 0; }
body.studio .detail-agent > svg { flex: none; width: 16px; height: 16px; color: var(--studio-muted); }
body.studio .detail-agent strong { font-size: 17px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
/* компания и специализация бывают длинными — многоточие на телефоне оставляло «Коммерческая недви…», а под вторую строку место есть */
body.studio .detail-agent small { color: var(--studio-muted); font-size: 13px; line-height: 1.45; overflow-wrap: break-word; }
body.studio .detail-agent small[hidden] { display: none; }
/* факт и кусок места вместе со своей «·» переносятся целиком; кусок шире строки переносится внутри себя */
body.studio #detail-agent-meta > span:not(.agent-rating),
body.studio .detail-agent-place > span > span { display: inline-block; }
/* рядом с логотипом и на 320 «Стаж работы: 5–10 лет» в строку не влезает — рвём перед значением, а не «5–» и «10 лет» */
body.studio .detail-agent-years { white-space: nowrap; }
/* метка — у первой строки места: (13 × 1,45 − 13) / 2 ≈ 3 px */
body.studio .detail-agent-place { display: flex; align-items: flex-start; gap: 5px; }
body.studio .detail-agent-place svg { flex: none; width: 13px; height: 13px; margin-top: 3px; }
body.studio .detail-agent-logo { flex: none; max-width: 72px; max-height: 40px; width: auto; height: auto; object-fit: contain; }
body.studio .detail-agent-logo[hidden] { display: none; }
body.studio .detail-actions { display: grid; gap: 10px; margin-top: auto; }
body.studio .detail-actions .button { width: 100%; margin: 0; }
body.studio .detail-actions .button.primary { justify-content: space-between; }
body.studio .detail-status { margin: 0; color: var(--studio-muted); font-size: 12px; line-height: 1.5; }
body.studio .detail-owner-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
body.studio .detail-owner-buttons .button.secondary { justify-content: center; gap: 10px; }
body.studio .detail-owner-buttons svg { width: 16px; height: 16px; }
/* во всю ширину под кнопками выше (владелец 07.10), красный остаётся */
body.studio button.text-button.detail-delete { justify-self: stretch; justify-content: center; gap: 8px; border-color: rgba(147, 75, 58, .35); color: var(--studio-urgent); }
body.studio .detail-delete svg { width: 16px; height: 16px; }
body.studio .detail-copy > .feedback:not(:empty) { margin: 12px 0 0; }

/* Редактор: загруженные фото и выбор типа */
body.studio .property-photo-existing { display: grid; gap: 10px; margin-bottom: 14px; }
body.studio .photo-existing-head { margin: 0; color: var(--studio-muted); font-size: 12px; }
body.studio .photo-existing-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
body.studio .photo-existing-list li { position: relative; min-width: 0; }
body.studio .photo-existing-list figure { position: relative; margin: 0; overflow: hidden; border-radius: 10px; background: var(--studio-selected); aspect-ratio: 4 / 3; }
body.studio .photo-existing-list img { display: block; width: 100%; height: 100%; object-fit: cover; }
body.studio .photo-cover {
  position: absolute;
  bottom: 6px;
  left: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(23, 22, 19, .78);
  color: var(--studio-on-frame);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}
/* кнопка 44×44 ради пальца, кружок внутри меньше — фото не закрывает */
body.studio .photo-remove {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
}
body.studio .photo-remove::before { position: absolute; inset: 6px; border-radius: 50%; background: rgba(23, 22, 19, .72); content: ""; }
body.studio .photo-remove svg { position: relative; width: 16px; height: 16px; }
body.studio .photo-remove:focus-visible { outline-offset: -3px; }
body.studio .choice-cards.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Профиль */
body.studio .profile-properties-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 28px;
  border: 1px dashed var(--studio-line);
  border-radius: var(--studio-radius-card);
  background: rgba(255, 253, 249, .55);
}
body.studio .profile-properties-empty p { max-width: 560px; margin: 0; color: var(--studio-muted); font-size: 14px; line-height: 1.7; }
body.studio .profile-properties-empty .button { flex: none; gap: 10px; width: auto; margin: 0; }
body.studio .profile-actions { flex-wrap: wrap; }
body.studio .profile-actions :is(.eho-install-button, [data-admin-open], [data-stats-open]) { gap: 10px; }
body.studio .eho-install-button svg { width: 18px; height: 18px; flex: none; }
/* кнопки настроек в полстроки телефона: «Выйти из аккаунта» ломалось на две строки — друг под другом */
@media (max-width: 460px) {
  body.studio .account-action-buttons { flex-direction: column; }
  body.studio .account-action-buttons .button { flex: none; width: 100%; }
}
body.studio .admin-pending {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--studio-accent-dark);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}
body.studio .avatar-editor-monogram {
  display: grid;
  place-items: center;
  flex: none;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: var(--studio-frame);
  color: var(--studio-gold-bright);
  font-family: var(--serif);
  font-size: 26px;
  letter-spacing: .04em;
}
/* логотип в настройках: квадрат, а не круг — логотипы бывают вытянутые, обрезать их нельзя */
body.studio .logo-editor img { border-radius: 12px; padding: 8px; background: #fff; object-fit: contain; object-position: center; }
body.studio .logo-editor-empty { display: grid; place-items: center; flex: none; width: 82px; height: 82px; border: 1px dashed #bbb2a5; border-radius: 12px; color: var(--studio-muted); }
body.studio .logo-editor-empty svg { width: 26px; height: 26px; }
body.studio .logo-editor-empty[hidden], body.studio .logo-remove[hidden] { display: none; }
body.studio .logo-editor-actions { display: flex; flex-wrap: wrap; gap: 8px; }
body.studio .logo-remove { font: inherit; font-size: 13px; cursor: pointer; }
/* у логотипа поле файла — не единственный путь к выбору: с клавиатуры фокус видно на кнопке «Выбрать логотип» */
body.studio .logo-editor:has(#profile-logo:focus-visible) .avatar-upload[for="profile-logo"] { outline: 3px solid var(--studio-focus); outline-offset: 3px; }

/* Формы в окнах: пометку «обязательно» studio.js вставляет между подписью и полем — в сетке метки она вставала отдельной строкой с отступом; ставим справа в строку подписи, как в редакторе объекта */
body.studio dialog form label:has(> .field-status) { grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-items: baseline; }
body.studio dialog form label > .field-status { margin-left: 0; justify-self: end; }
/* подсказка под полем — на всю ширину, как само поле: иначе жмётся в левую колонку рядом с «Необязательно» */
body.studio dialog form label:has(> .field-status) > :is(input, select, textarea, .field-help) { grid-column: 1 / -1; }
/* в паре полей у соседа под полем подсказка — сетка метки раздавала лишнюю высоту своим строкам, и поле без подсказки вытягивалось с 48 до 60; радио-карточки и зону фото (label с file) не трогаем — у них своя раскладка */
body.studio dialog form label:has(> :is(input:not([type="radio"]):not([type="checkbox"]):not([type="file"]):not([type="hidden"]), select, textarea)) { align-content: start; }

/* Сделки */
body.studio .deal-object > .deal-object-empty {
  display: grid;
  place-items: center;
  flex: none;
  width: 112px;
  height: 82px;
  margin: 0;
  border-radius: 10px;
  background: var(--studio-selected);
  color: var(--studio-accent-dark);
}
body.studio .deal-object-empty svg { width: 22px; height: 22px; }
body.studio .deal-row.is-api .deal-progress { grid-template-columns: repeat(5, minmax(0, 1fr)); }
body.studio .deal-row.is-done { background: #f7f4ee; }
body.studio .deal-row.is-done .deal-object h2 { color: var(--studio-muted); }
body.studio .deal-avatar { overflow: hidden; }
body.studio .deal-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }

body.studio .deal-dialog { width: min(560px, calc(100vw - 32px)); }
body.studio .deal-dialog-kicker { margin: 0; color: var(--studio-accent-dark); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
body.studio .deal-dialog-kicker + h2 { margin-top: 8px; }
body.studio .dialog-lead { margin: -8px 0 0; color: var(--studio-muted); font-size: 14px; line-height: 1.65; }
body.studio .deal-dialog-grid { margin: 20px 0 4px; border-color: var(--studio-line-soft); }
body.studio .deal-dialog-grid > div { border-color: var(--studio-line-soft); }
body.studio .deal-dialog-grid span { color: var(--studio-muted); }
body.studio .deal-form { gap: 16px; margin-top: 20px; }
body.studio .deal-form label:not(.editor-check) { color: var(--studio-ink); font-weight: 600; }
/* дизайн задаёт .editor-check display:flex !important и перебивает [hidden] — галочка «Требует действия» висела у закрытых сделок */
body.studio .editor-check[hidden] { display: none !important; }
body.studio .deal-form :is(input:not([type="checkbox"]), select, textarea) {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  color: var(--studio-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
}
body.studio .deal-form select { padding-block: 0; }
body.studio .deal-form textarea { min-height: 92px; }
body.studio .deal-form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
body.studio .deal-form-actions { display: flex; gap: 10px; }
body.studio .deal-form-actions .button { width: auto; margin: 0; }
body.studio .deal-form-actions .button.secondary { gap: 10px; }
body.studio .deal-form-actions .button.primary { flex: 1; justify-content: space-between; }
body.studio .deal-form-actions svg { width: 16px; height: 16px; }
body.studio .deal-form-status { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 16px; border-top: 1px solid var(--studio-line-soft); }
body.studio button.text-button.deal-cancel { color: var(--studio-urgent); }
body.studio .deal-form > .button { width: 100%; margin: 4px 0 0; justify-content: space-between; }
/* пустая строка ошибки не должна давать лишний отступ сетки */
body.studio .deal-form > .feedback:empty { margin-top: -16px; }

/* Общение: список диалогов */
body.studio .chat-inbox-item { grid-template-columns: 44px minmax(0, 1fr) auto; }
body.studio .chat-inbox-meta { display: grid; align-self: start; justify-items: end; gap: 6px; padding-top: 1px; }
body.studio .chat-inbox-meta time { color: var(--studio-muted); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
body.studio .chat-inbox-unread {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--studio-accent-dark);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
}
body.studio .chat-inbox-item.is-unread .chat-inbox-name { font-weight: 700; }
body.studio .chat-inbox-item.is-unread .chat-inbox-preview { color: var(--studio-ink); }
body.studio .chat-inbox-item.is-unread .chat-inbox-meta time { color: var(--studio-accent-dark); font-weight: 600; }

/* Общение: переписка */
/* #827563 на панели — 4.42:1, для 12px мало */
body.studio .chat-keyboard-hint { color: var(--studio-muted); }
/* фото — кнопка: касание открывает просмотр, ссылки и подписи под снимком нет (владелец, 07.10) */
body.studio .chat-file-item .chat-image-link {
  display: block;
  width: fit-content;
  max-width: 100%;
  min-height: 0;
  margin-bottom: 4px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 10px;
  background: none;
  color: inherit;
  line-height: 0;
  cursor: zoom-in;
}
body.studio .chat-file-item .chat-image-link img { display: block; margin: 0; border-radius: 0; }
body.studio .chat-attachment-chip > svg { flex: none; width: 20px; height: 20px; margin-left: 4px; color: var(--studio-accent-dark); }
body.studio .chat-file-meta { display: block; margin-bottom: 6px; color: var(--studio-muted); font-size: 12px; }
/* короткое сообщение — одной строкой с временем, пузырь вытянут по горизонтали (владелец, 07.10: «чуть вытянутее»). Время встаёт
   в конец последней строки текста, документа или реакций — там под него оставлено место; не влезло — место переносится на новую
   строку, и время с ним. У голосового время — в строке длительности, как в Telegram; на фото без подписи — плашкой поверх снимка.
   Не флекс с переносом: ширину пузыря он считает так, будто всё в одну строку, — у фото оставалось чёрное поле справа */
body.studio[data-screen="chat"] .chat-bubble { --time-room: 44px; position: relative; padding: 8px 14px 7px; }
/* у своих рядом с временем галочки */
body.studio[data-screen="chat"] .chat-message-row.is-own .chat-bubble:not(.is-deleted) { --time-room: 64px; }
body.studio[data-screen="chat"] .chat-bubble p { line-height: 1.55; }
body.studio[data-screen="chat"] .chat-bubble > .chat-file-item { margin: 0; }
body.studio[data-screen="chat"] .chat-bubble > p + .chat-file-item { margin-top: 4px; }
body.studio[data-screen="chat"] .chat-bubble > .chat-reactions { margin: 6px 0 0; }
body.studio[data-screen="chat"] .chat-bubble:is(:has(> p + .chat-reactions[hidden]), :has(> .chat-file-item > :is(a, .chat-voice-message)):has(> .chat-reactions[hidden]), :has(> .chat-reactions:not([hidden]))) > .chat-message-time {
  position: absolute; right: 14px; bottom: 7px; margin: 0; white-space: nowrap;
}
body.studio[data-screen="chat"] .chat-bubble > p:has(+ .chat-reactions[hidden])::after,
body.studio[data-screen="chat"] .chat-bubble > .chat-file-item:has(+ .chat-reactions[hidden]) > a::after,
body.studio[data-screen="chat"] .chat-bubble > .chat-reactions:not([hidden])::after { content: ""; display: inline-block; flex: none; width: var(--time-room); height: 1px; }
/* фото без рамки, как в Telegram (владелец, 08.10): снимок во всю ширину пузыря и крупнее, пузырь не шире снимка. Цитата, подпись
   и реакции — с полями; время на голом фото — плашкой поверх снимка. Пузырь обрезает углы снимка своим скруглением */
body.studio[data-screen="chat"] .chat-bubble.has-photo { width: min-content; padding: 0; overflow: hidden; }
body.studio[data-screen="chat"] .chat-bubble.has-photo > .chat-quoted-message { margin: 8px 10px; }
body.studio[data-screen="chat"] .chat-bubble.has-photo > p { padding: 6px 14px 7px; }
body.studio[data-screen="chat"] .chat-bubble.has-photo > .chat-reactions { margin: 6px 14px 7px; }
body.studio[data-screen="chat"] .chat-bubble.has-photo .chat-image-link { position: relative; width: 100%; margin: 0; border-radius: 0; }
body.studio[data-screen="chat"] .chat-bubble.has-photo .chat-image-link img { width: auto; height: auto; min-width: 160px; min-height: 120px; max-width: 320px; max-height: 400px; object-fit: cover; }
/* рамку фокуса снаружи срезал бы пузырь — рисуем её внутри снимка, тёмную со светлой: видна на любом фото */
body.studio[data-screen="chat"] .chat-bubble.has-photo .chat-image-link:focus-visible { outline: none; }
body.studio[data-screen="chat"] .chat-bubble.has-photo .chat-image-link:focus-visible::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 3px #171613, inset 0 0 0 5px #f7f1e7; pointer-events: none; }
/* плашка .62, а не .55: на белой стене или документе белое время иначе 4:1, ниже нормы 4,5:1 */
body.studio[data-screen="chat"] .chat-bubble.has-photo:not(:has(> p)):has(> .chat-reactions[hidden]) > .chat-message-time {
  position: absolute; right: 8px; bottom: 8px; margin: 0; padding: 2px 8px; border-radius: 10px; background: rgba(23, 22, 19, .62); color: #fff; line-height: 16px;
  white-space: nowrap; pointer-events: none;
}
body.studio[data-screen="chat"] .chat-bubble.has-photo:not(:has(> p)):has(> .chat-reactions[hidden]) > .chat-message-time .chat-message-status { color: rgba(255, 255, 255, .9); }
body.studio[data-screen="chat"] .chat-bubble.has-photo:not(:has(> p)):has(> .chat-reactions[hidden]) > .chat-message-time .chat-message-status.is-read { color: var(--studio-gold-bright); }
@media (max-width: 760px) {
  body.studio[data-screen="chat"] .chat-bubble.has-photo .chat-image-link img { max-width: min(260px, calc(100vw - 74px)); max-height: 340px; }
}
/* свои сообщения — чёрные с белым текстом, как кнопки и меню (владелец, 07.10); чужие — белые, как были.
   Всё в своём чёрном пузыре светлое: время и галочки, цитата, реакции; удалённое — пунктиром, как было.
   Со вложением пузырь белый и у своих — ниже */
body.studio .chat-message-row.is-own .chat-bubble:not(.is-deleted, .has-file) { background: var(--studio-frame); color: var(--studio-on-frame); }
body.studio .chat-message-row.is-own .chat-bubble:not(.is-deleted, .has-file) :is(.chat-message-time, .chat-message-status) { color: rgba(247, 241, 231, .62); }
body.studio .chat-message-row.is-own .chat-bubble:not(.is-deleted, .has-file) .chat-message-status.is-read { color: var(--studio-gold); }
body.studio .chat-message-row.is-own .chat-bubble:not(.is-deleted, .has-file) .chat-quoted-message { border-left-color: var(--studio-gold); background: rgba(247, 241, 231, .08); color: rgba(247, 241, 231, .78); }
body.studio .chat-message-row.is-own .chat-bubble:not(.is-deleted, .has-file) .chat-quoted-message strong { color: var(--studio-gold-bright); }
body.studio .chat-message-row.is-own .chat-bubble:not(.is-deleted, .has-file) :is(.chat-file-item, .chat-file-item a) { color: var(--studio-on-frame); }
/* рамка реакции — 4:1 к чёрному */
body.studio .chat-message-row.is-own .chat-bubble:not(.is-deleted, .has-file) .chat-reaction { border-color: rgba(247, 241, 231, .45); background: rgba(247, 241, 231, .1); color: var(--studio-on-frame); }
body.studio .chat-message-row.is-own .chat-bubble:not(.is-deleted, .has-file) .chat-reaction[aria-pressed="true"] { border-color: var(--studio-gold); background: rgba(193, 163, 108, .22); }
body.studio .chat-message-row.is-own .chat-bubble:not(.is-deleted, .has-file) .chat-reaction-count { color: rgba(247, 241, 231, .72); }
body.studio .chat-message-row.is-own .chat-bubble:not(.is-deleted, .has-file) .chat-reaction[aria-pressed="true"] .chat-reaction-count { color: var(--studio-gold-bright); }
/* коричневая рамка фокуса на чёрном не видна */
body.studio .chat-message-row.is-own .chat-bubble:not(.is-deleted, .has-file) :focus-visible { outline-color: var(--studio-gold-bright); }
/* вложения без чёрной подложки, как в Telegram (владелец, 08.10: «меня вообще бесит черный фон вложений», «а можно без этой
   подложки?»): голосовое, документ, фото с подписью, ответом или реакцией — в белом пузыре, как у коллег; фото само по себе —
   без пузыря и тени, только снимок со скруглёнными углами и время поверх. Пока снимок грузится — светлое место под него */
body.studio[data-screen="chat"] .chat-message-row.is-own .chat-bubble.has-file:not(.is-deleted) { background: #fff; }
body.studio[data-screen="chat"] .chat-message-row .chat-bubble.has-photo:not(:has(> p, > .chat-quoted-message)):has(> .chat-reactions[hidden]) { background: transparent; box-shadow: none; }
body.studio[data-screen="chat"] .chat-bubble.has-photo .chat-image-link { background: #e9e3d8; }


/* Пригласить коллегу */
body.studio .colleagues-screen { width: min(100%, 1168px); padding-top: 32px; padding-bottom: 120px; }
body.studio .colleagues-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 16px 0 10px;
  border: 1px solid var(--studio-line);
  border-radius: var(--studio-radius-control);
  background: var(--studio-panel);
  color: var(--studio-ink);
  font-size: 12px;
  font-weight: 600;
}
body.studio .colleagues-back svg { width: 16px; height: 16px; }
body.studio .colleagues-head { padding: 28px 0 28px; border-bottom: 1px solid var(--studio-line); }
body.studio .colleagues-head h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
}
body.studio .colleagues-head h1:focus { outline: none; }
body.studio .colleagues-head p { max-width: 620px; margin: 16px 0 0; color: var(--studio-muted); font-size: 14px; line-height: 1.65; }
body.studio .colleagues-layout { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); align-items: start; gap: 40px; margin-top: 32px; }
body.studio .invite-create {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 32px;
  border: 1px solid var(--studio-line);
  border-radius: var(--studio-radius-panel);
  background: var(--studio-panel);
  box-shadow: var(--studio-shadow-card);
}
/* золото — только сигнал: короткая черта над формой приглашения */
body.studio .invite-create::before { position: absolute; top: -1px; left: 32px; width: 54px; height: 2px; background: var(--studio-gold); content: ""; }
body.studio :is(.invite-create, .invite-history) h2 { margin: 0; font-family: var(--serif); font-size: 22px; font-weight: 400; letter-spacing: 0; line-height: 1.25; }
body.studio .invite-field { display: grid; gap: 8px; color: var(--studio-ink); font-size: 12px; font-weight: 600; }
body.studio .invite-field :is(input, select) {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--studio-line);
  border-radius: var(--studio-radius-control);
  background: #f5f1e9;
  color: var(--studio-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
}
body.studio .invite-field input { text-overflow: ellipsis; }
body.studio .invite-field small { color: var(--studio-muted); font-size: 12px; font-weight: 500; line-height: 1.5; }
body.studio .invite-create-button { width: 100%; min-height: 50px; margin: 4px 0 0; justify-content: space-between; isolation: isolate; }
body.studio .invite-result { display: grid; gap: 12px; padding: 18px; border: 1px solid rgba(193, 163, 108, .55); border-radius: var(--studio-radius-card); background: #f7f1e4; }
body.studio .invite-result .invite-field input { background: var(--studio-panel); font-size: 13px; }
body.studio .invite-result-actions { display: flex; flex-wrap: wrap; gap: 8px; }
body.studio .invite-result-actions .button { flex: 1 1 140px; gap: 10px; min-height: 44px; margin: 0; padding-inline: 16px; }
body.studio .invite-result-actions svg { width: 17px; height: 17px; }
body.studio .invite-result-note { margin: 0; color: var(--studio-muted); font-size: 12px; line-height: 1.55; }
body.studio .invite-create > .feedback { margin: 0; font-size: 13px; line-height: 1.5; }
body.studio .invite-create > .feedback:empty { margin-top: -18px; }
body.studio .invite-history { min-width: 0; padding-top: 8px; }
body.studio .invite-history-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--studio-line); }
body.studio #invite-joined-count:not(:empty) {
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--studio-selected);
  color: var(--studio-accent-dark);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
body.studio .invite-row {
  display: grid;
  /* колонки по факту: у отозванной и использованной кнопки нет, а пустая третья колонка оставляла зазор 16 px — статус не доходил до края */
  grid-template-columns: minmax(0, 1fr);
  grid-auto-columns: auto;
  grid-auto-flow: column;
  align-items: center;
  gap: 8px 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--studio-line-soft);
}
body.studio .invite-row-text { display: grid; gap: 4px; min-width: 0; }
body.studio .invite-row-text strong { overflow: hidden; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
body.studio .invite-row-text span { color: var(--studio-muted); font-size: 12px; }
body.studio .invite-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 300px;
  padding: 6px 11px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #efebe4;
  color: var(--studio-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}
body.studio .invite-status.is-active { border-color: #c9d3bf; background: #edf1e8; color: var(--studio-positive); }
body.studio .invite-status.is-active::before { flex: none; width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ""; }
body.studio .invite-status.is-used { background: #f3ead9; color: var(--studio-accent-dark); }
body.studio .invite-status.is-revoked { background: #f7ebe7; color: var(--studio-urgent); }
body.studio .invite-row button.text-button[data-invite-revoke] { color: var(--studio-urgent); }
/* после отзыва кнопок в строке нет — фокус держит сама строка; кольцо как у кнопок, а не системное синее */
body.studio .invite-row[tabindex="-1"]:focus-visible { outline: 3px solid var(--studio-focus); outline-offset: 3px; }
body.studio #invite-history-title:focus { outline: none; }
body.studio .invite-list-empty {
  margin: 16px 0 0;
  padding: 28px 24px;
  border: 1px dashed var(--studio-line);
  border-radius: var(--studio-radius-card);
  color: var(--studio-muted);
  font-size: 14px;
  line-height: 1.7;
  text-align: center;
}

/* Уведомления */
body.studio .notifications-dialog { width: min(560px, calc(100vw - 32px)); padding: 30px 0 12px; }
body.studio .notifications-dialog h2 { margin: 0 0 14px; padding: 0 76px 0 30px; font-size: 26px; line-height: 1.2; }
body.studio .notification-list { display: grid; gap: 2px; max-height: min(60vh, 520px); padding: 0 12px; overflow-y: auto; overscroll-behavior: contain; }
body.studio .notification-item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  width: 100%;
  min-height: 64px;
  padding: 12px 14px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--studio-ink);
  text-align: left;
}
body.studio .notification-item:focus-visible { outline-offset: -3px; }
body.studio .notification-item.is-unread { background: #f6efe2; }
body.studio .notification-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--studio-selected); color: var(--studio-accent-dark); }
body.studio .notification-mark svg { width: 18px; height: 18px; }
body.studio .notification-item.is-unread .notification-mark { background: var(--studio-frame); color: var(--studio-gold-bright); }
body.studio .notification-text { display: grid; gap: 3px; min-width: 0; padding-top: 2px; }
body.studio .notification-text strong { font-size: 13px; font-weight: 600; line-height: 1.4; }
body.studio .notification-text span {
  display: -webkit-box;
  overflow: hidden;
  color: var(--studio-muted);
  font-size: 12px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
body.studio .notification-item time { padding-top: 3px; color: var(--studio-muted); font-size: 12px; white-space: nowrap; }
body.studio .notification-empty { margin: 0; padding: 8px 30px 22px; color: var(--studio-muted); font-size: 14px; line-height: 1.7; }

/* Администрирование */
body.studio .admin-search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  margin: 18px 38px 6px;
  padding: 0 14px;
  border: 1px solid var(--studio-line);
  border-radius: var(--studio-radius-control);
  background: #f5f1e9;
  color: var(--studio-muted);
}
body.studio .admin-search:focus-within { outline: 3px solid var(--studio-focus); outline-offset: 3px; }
body.studio .admin-search svg { flex: none; width: 18px; height: 18px; }
/* рамка у метки-обёртки, у самого поля её снимаем */
body.studio .admin-dialog .admin-search input {
  flex: 1;
  width: auto;
  min-width: 0;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--studio-ink);
  font-size: 14px;
  appearance: none;
}
body.studio .admin-dialog .admin-search input:focus,
body.studio .admin-dialog .admin-search input:focus-visible { outline: none; }
body.studio .admin-list { display: grid; padding: 8px 38px 28px; }
body.studio .admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--studio-line-soft);
}
/* просьба сменить пароль ждёт администратора так же, как заявка на вступление */
body.studio .admin-row:is(.is-pending, .is-reset-requested) { margin: 4px -14px; padding-inline: 14px; border-bottom-color: transparent; border-radius: 14px; background: #f6efe2; }
body.studio .admin-person { display: flex; align-items: center; gap: 12px; min-width: 0; }
body.studio .admin-person .avatar.mini { width: 40px; height: 40px; background: var(--studio-selected); color: var(--studio-accent-dark); font-size: 13px; }
body.studio .admin-person > div { display: grid; gap: 2px; min-width: 0; }
body.studio .admin-person strong { overflow: hidden; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
body.studio .admin-person :is(span, small) { overflow: hidden; color: var(--studio-muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
/* компания, город и дата входа — переносом: многоточие съедало «в ЭХО с …» */
body.studio .admin-person small { white-space: normal; }
body.studio .admin-row.is-blocked .admin-person strong { color: var(--studio-muted); }
body.studio .admin-row.is-blocked .avatar { filter: grayscale(1); }
/* ширина — под доступ, роль и отметку, кнопки уходят второй строкой: в одну строку они схлопывали колонку с именем в ноль */
body.studio .admin-controls { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: flex-end; gap: 10px; width: 470px; }
body.studio .admin-controls > label:not(.admin-check) { display: grid; gap: 5px; min-width: 150px; color: var(--studio-muted); font-size: 12px; font-weight: 600; }
body.studio .admin-dialog .admin-controls select { min-height: 44px; padding: 0 12px; }
body.studio .admin-check { display: flex; align-items: center; gap: 8px; min-height: 44px; color: var(--studio-ink); font-size: 12px; font-weight: 600; cursor: pointer; }
body.studio .admin-check input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--studio-ink); }
body.studio .admin-empty { margin: 0; padding: 8px 38px 28px; color: var(--studio-muted); font-size: 14px; }

/* Подтверждение */
body.studio .confirm-dialog { width: min(440px, calc(100vw - 32px)); padding: 30px 30px 26px; }
body.studio .confirm-dialog h2 { margin: 0 0 10px; font-size: 24px; line-height: 1.25; }
body.studio .confirm-dialog p { margin: 0; color: var(--studio-muted); font-size: 14px; line-height: 1.65; }
body.studio .confirm-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 26px; }
body.studio .confirm-actions .button { width: auto; min-width: 120px; margin: 0; }
body.studio .button.primary.is-danger { border-color: var(--studio-urgent); background: var(--studio-urgent); color: #fff; }

/* Установка приложения */
body.studio .install-guide { width: min(520px, calc(100vw - 32px)); }
body.studio .install-guide h2 { max-width: 14ch; margin: 0 0 10px; }
body.studio .install-guide > p { margin: 0; color: var(--studio-muted); font-size: 14px; line-height: 1.65; }
body.studio .install-steps { display: grid; margin: 24px 0; padding: 0; border-top: 1px solid var(--studio-line-soft); list-style: none; }
body.studio .install-step { display: grid; grid-template-columns: 34px 1fr; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--studio-line-soft); }
body.studio .install-step > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--studio-accent);
  border-radius: 50%;
  color: var(--studio-accent-dark);
  font-size: 12px;
  font-weight: 700;
}
body.studio .install-step strong { display: block; margin-bottom: 4px; font-size: 14px; font-weight: 600; }
body.studio .install-step p { margin: 0; color: var(--studio-muted); font-size: 13px; line-height: 1.55; }
body.studio .install-guide > .button { width: 100%; margin: 0; }

@media (hover: hover) and (pointer: fine) {
  body.studio .notification-item:hover { background: #f1ece3; }
  body.studio .notification-item.is-unread:hover { background: #f1e7d4; }
  body.studio .colleagues-back:hover { border-color: var(--studio-accent); color: var(--studio-accent-dark); }
  body.studio button.text-button:is(.detail-delete, .deal-cancel, [data-invite-revoke]):hover {
    border-color: var(--studio-urgent);
    background: #f7ebe7;
    color: var(--studio-urgent);
  }
  body.studio .photo-remove:hover::before { background: var(--studio-urgent); }
  body.studio .button.primary.is-danger:hover { border-color: #7c3d2f; background: #7c3d2f; }
}

@media (max-width: 1000px) {
  /* над доком */
  body.studio .toast { bottom: calc(92px + env(safe-area-inset-bottom)); }
}

@media (max-width: 900px) {
  body.studio .colleagues-layout { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  body.studio .invite-create { max-width: 560px; }
  /* окно уже 820 — настройки уходят под имя, иначе на 768 колонку с именем и почтой сжимало до многоточий */
  body.studio .admin-row { grid-template-columns: minmax(0, 1fr); }
  body.studio .admin-controls { justify-content: flex-start; width: auto; }
  body.studio .admin-controls > label:not(.admin-check) { flex: 1 1 130px; min-width: 0; }
}

@media (max-width: 760px) {
  body.studio[data-screen="chat"] .toast { top: calc(68px + env(safe-area-inset-top)); }
  body.studio .profile-properties-empty { flex-direction: column; align-items: stretch; gap: 16px; padding: 20px; }
  body.studio .profile-properties-empty .button { justify-content: space-between; }
  body.studio .deal-object > .deal-object-empty { width: 92px; height: 72px; border-radius: 11px; }
  body.studio .colleagues-screen { padding-top: 20px; }
  body.studio .colleagues-head { padding: 22px 0; }
  body.studio .colleagues-head p { font-size: 13px; }
  body.studio .colleagues-layout { margin-top: 24px; }
  body.studio .invite-create { padding: 24px 20px; }
  body.studio .invite-create::before { left: 20px; }
  body.studio .invite-field :is(input, select) { font-size: 16px; }
  body.studio .invite-result .invite-field input { font-size: 16px; }
  body.studio .invite-row { grid-template-columns: minmax(0, 1fr) auto; grid-auto-flow: row; }
  body.studio .invite-row .invite-status { grid-row: 2; grid-column: 1; justify-self: start; }
  body.studio .invite-row [data-invite-revoke] { grid-row: 1 / span 2; grid-column: 2; }
}

@media (max-width: 700px) {
  body.studio .property-dialog[open] { display: block; }
  /* рамка 4:3, как у ленты презентации на телефоне: снимок 3:2 встаёт во всю ширину */
  body.studio .detail-gallery { position: relative; height: auto; min-height: 0; aspect-ratio: 4 / 3; }
  body.studio .detail-copy { padding: 26px 22px 24px; }
  body.studio .detail-actions { margin-top: 0; }
  body.studio .detail-summary strong { font-size: 24px; }
  body.studio .choice-cards.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.studio .deal-form-row { grid-template-columns: minmax(0, 1fr); }
  body.studio .deal-form-actions { flex-direction: column-reverse; }
  body.studio .deal-form-actions .button { width: 100%; }
  body.studio .deal-form-actions .button.secondary { justify-content: center; }
  body.studio .deal-form :is(input:not([type="checkbox"]), select, textarea) { font-size: 16px; }
  body.studio .notifications-dialog { padding: 26px 0 8px; }
  body.studio .notifications-dialog h2 { padding-inline: 20px 70px; font-size: 24px; }
  body.studio .notification-list { padding: 0 6px; }
  body.studio .notification-item { gap: 12px; padding: 12px; }
  body.studio .notification-empty { padding-inline: 20px; }
  body.studio .admin-search { margin: 16px 20px 6px; }
  body.studio .admin-dialog .admin-search input { font-size: 16px; }
  body.studio .admin-list { padding: 6px 20px 22px; }
  body.studio .admin-row.is-pending { margin-inline: -10px; padding-inline: 10px; }
  body.studio .admin-dialog .admin-controls select { font-size: 16px; }
  body.studio .admin-empty { padding-inline: 20px; }
  body.studio .eho-install-button { flex-basis: 100%; justify-content: center; }
}



@media (max-width: 480px) {
  body.studio .confirm-dialog { padding: 26px 22px 22px; }
  body.studio .confirm-actions { flex-direction: column-reverse; }
  body.studio .confirm-actions .button { width: 100%; }
  body.studio .detail-owner-buttons { grid-template-columns: minmax(0, 1fr); }
  body.studio .invite-create { padding: 22px 16px; }
  body.studio .invite-create::before { left: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  body.studio .property-skeleton span { animation: none !important; }
}
/* заголовки страниц, окон и разделов — Prata (--serif из style.css), решение владельца 04.10; остальное — Manrope.
   У Prata одно начертание: жирное браузер дорисовал бы сам, у Manrope настоящие 600 и 700 этим не задеты */
body.studio { --sans: Manrope, Arial, sans-serif; font-synthesis-weight: none; }
body.studio :is(button, input, textarea, select) { font-family: var(--sans); }
/* подсветку касания телефон рисует над всем, что с «рукой»: у карточки объекта или запроса Chrome вспыхивал голубым
   поверх окна, которое касание открыло. У кнопок и ссылок её нет (style.css) — теперь нет нигде */
body.studio { -webkit-tap-highlight-color: transparent; }

/* Public admission uses the existing entry shell and its responsive layout. */
.entry-consent { display:flex; align-items:flex-start; gap:12px; font-size:13px; line-height:1.6; cursor:pointer; }
.entry-consent input { width:20px; height:20px; flex:none; margin-top:2px; accent-color:var(--entry-ink); }
textarea.entry-input { padding:12px 14px; resize:vertical; }
/* стрелка своя: системная на iOS и Windows другой высоты и цвета, поле выбивалось из формы */
select.entry-input { appearance:none; padding-right:42px; background:var(--entry-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23655f56' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 16px center / 12px 8px; color:var(--entry-ink); cursor:pointer; }
.entry-input[readonly] { background:var(--entry-paper); color:var(--entry-muted); }
.admission-section { padding:24px 36px; border-bottom:1px solid var(--studio-line-soft); }
.admission-row { padding:20px 0; border-top:1px solid var(--studio-line-soft); overflow-wrap:anywhere; }
.admission-row h4 { margin:0 0 8px; font-size:18px; }
.admission-row p { margin:6px 0; font-size:14px; }
.admission-row label { display:grid; gap:8px; font-size:13px; margin:14px 0; }
.admission-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:14px; }
/* фото и логотип из заявки: по ним администратор решает, кого пускать в каталог */
.admission-head { display:flex; align-items:center; gap:14px; margin:0 0 8px; }
.admission-row .admission-head h4 { margin:0; }
.admission-photo { display:block; flex:none; width:64px; height:64px; overflow:hidden; padding:0; border:1px solid var(--studio-line-soft); border-radius:50%; background:none; cursor:zoom-in; }
.admission-photo img { width:100%; height:100%; object-fit:cover; }
.admission-logo { display:block; max-width:160px; max-height:48px; margin:10px 0 4px; object-fit:contain; }

@media(max-width:600px) { .admission-section { padding:20px; } }
/* фото в редакторе (владелец 06.10): «Сделать главным» и «Удалить» друг под другом, карточка кончается под «Удалить» */
.editor-media-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(168px,1fr));align-items:start;gap:12px;padding:0;list-style:none;margin:12px 0 20px}
.editor-media-list li{min-width:0;padding:10px;border:1px solid #988a76;border-radius:14px;background:#fffdf9}
.editor-media-list :is(img,video){width:100%;height:112px;object-fit:cover;border-radius:8px;display:block}
.editor-media-list p{margin:8px 0;font-size:14px;font-weight:600}
body.studio .editor-media-list .editor-heif-preview{min-height:0;height:112px;margin:0;font-size:13px;font-weight:400}
.editor-media-actions{display:grid;gap:6px}
.editor-media-actions button{width:100%;border:1px solid #988a76;background:#fffdf9;border-radius:8px;padding:6px 8px;min-height:44px;font:inherit;font-size:13px;line-height:1.2;cursor:pointer}
.editor-media-actions button:disabled{opacity:.45;cursor:default}
/* «Удалить» у фото красным текстом, рамка прежняя (владелец 07.10) */
.editor-media-actions button[data-media-action="remove"]{color:var(--studio-urgent)}
.detail-videos video{display:block;width:100%;max-height:460px;margin:16px 0;background:#171613}
@media(max-width:480px){.editor-media-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.editor-media-list li{padding:8px}.editor-media-list :is(img,video),body.studio .editor-media-list .editor-heif-preview{height:96px}}
body.studio #filter-error { color:#873e30; font-size:14px; }
body.studio .editor-heif-preview { display:grid; place-content:center; min-height:110px; padding:12px; border:1px dashed var(--studio-line); border-radius:12px; font-size:14px; }

/* «Найти объект»: форма повторяет клиентскую версию по просьбе владельца — белые поля, тонкая бежевая рамка, кнопка на всю ширину.
   С 09.10 поля и «Поиск» скруглены, как поля редактора («именно вот эту часть сделаем полукруглой»), квадратные — только категории */
body.studio .find-form { --find-line: #ddd4c4; --find-muted: #949089; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 28px; }
body.studio .find-form .find-wide { grid-column: span 2; }
/* строка поиска с подсказками: список ложится под поле поверх формы и ячейку сетки не занимает */
body.studio .find-form .find-search { position: relative; display: grid; min-width: 0; }
body.studio .find-form :is(input, select) { width: 100%; min-width: 0; height: 48px; margin: 0; padding: 0 13px; border: 1px solid var(--find-line); border-radius: var(--studio-radius-control); background-color: #fff; box-shadow: none; color: var(--studio-ink); font: 400 16px/1.2 var(--sans); text-overflow: ellipsis; -webkit-appearance: none; appearance: none; }
/* серый темнее клиентского #b4b4b4: там 2:1 к белому, а других подписей у полей нет — на солнце не прочитать */
body.studio .find-form input::placeholder { color: var(--find-muted); opacity: 1; }
body.studio .find-form input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
body.studio .find-form input::-webkit-inner-spin-button,
body.studio .find-form input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
/* пустая кнопка очистки у поиска всё равно занимает место и режет плейсхолдер на 320–360; с текстом крестик возвращается */
body.studio .find-form #search:placeholder-shown::-webkit-search-cancel-button { display: none; }
body.studio .find-select { position: relative; min-width: 0; }
body.studio .find-form .find-select select { padding-right: 36px; color: transparent; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23b4b4b4' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 13px center / 12px 8px; }
/* список вариантов в Windows берёт цвет у селекта — без этого пункты прозрачные */
body.studio .find-select option { color: var(--studio-ink); background: #fff; }
body.studio .find-select span { position: absolute; top: 0; bottom: 0; left: 14px; right: 37px; overflow: hidden; color: var(--studio-ink); font-size: 16px; line-height: 48px; white-space: nowrap; text-overflow: ellipsis; pointer-events: none; }
body.studio .find-select.is-empty span { color: var(--find-muted); }
body.studio .find-form .find-error { grid-column: 1 / -1; margin: 0; }
/* цвета «Поиска» — премиум-кнопка (в конце файла) */
body.studio .find-form .find-submit { grid-column: 1 / -1; min-height: 48px; margin: 0; padding: 0 18px; border-radius: var(--studio-radius-control); font: 700 15px/1.2 var(--sans); }
/* категории над формой: кремовые в золотой рамке, выбранная — золотая (по макету владельца, в конце файла); сама радиокнопка
   растянута на кнопку, прозрачна и лежит поверх неё — нажатие ловит поле, а не кнопка */
body.studio .find-form .find-kinds { grid-column: 1 / -1; min-width: 0; margin: 0 0 4px; padding: 0; border: 0; }
body.studio .find-kinds > div { display: flex; flex-wrap: wrap; gap: 8px; }
body.studio .find-kinds label { position: relative; display: flex; }
body.studio .find-form .find-kinds input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; }
body.studio .find-kinds span { display: flex; flex: 1; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--find-line); background: #fff; color: var(--studio-ink); font: 500 15px/1.2 var(--sans); white-space: nowrap; }
body.studio .find-kinds input:focus-visible + span { outline: 3px solid var(--studio-focus); outline-offset: 3px; }
/* поля другой категории спрятаны атрибутом hidden — правила формы не должны его перебить */
body.studio .find-form [hidden] { display: none; }
/* у домов внизу категория, комнаты и вид расчёта — последний на две колонки, чтобы ряд был полным */
body.studio .find-form[data-kind="house"] .find-payment { grid-column: span 2; }
/* «Мои объекты» и «Избранное» из профиля: вкладок в каталоге больше нет, плашка говорит, что лента не вся */
body.studio .catalog-scope { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -8px 0 24px; padding: 2px 4px 2px 16px; border: 1px solid #ddd4c4; background: #fff; }
body.studio .catalog-scope p { margin: 0; color: var(--studio-ink); font-size: 15px; font-weight: 600; }
body.studio .catalog-scope .text-button { min-height: 44px; padding: 0 12px; border: 0; border-radius: 0; background: none; color: var(--studio-accent-dark); font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 899px) { body.studio .find-form { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* как в клиентской версии на телефоне: подпись селекта 13 px, стрелка ближе к краю */
@media (max-width: 750px) {
  body.studio .find-form .find-select select { padding-left: 10px; padding-right: 30px; background-position: right 9px center; background-size: 11px 7px; }
  body.studio .find-select span { left: 11px; right: 24px; font-size: 13px; }
  /* на телефоне кнопки категорий переносятся в две строки и тянутся на всю ширину, как у клиента */
  body.studio .find-kinds label { flex: 1 1 auto; }
  /* у коммерции селекты в половину ширины, как у клиента: подпись уже 390 px и «Помещение свободного назначения»
     переносятся на вторую строку, остаток — в многоточие; целиком вид видно в открытом списке */
  body.studio .find-form[data-kind="commercial"] .find-select span { top: 50%; bottom: auto; transform: translateY(-50%); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.3; white-space: normal; }
}
/* сотки длиннее метров: «Площадь от, сот.» в 16 px на 351–370 не влезает в половину ширины */
@media (max-width: 370px) { body.studio .find-select span { font-size: 12px; } body.studio .find-form input[type="number"]::placeholder { font-size: 14px; } }
/* на 320 «Вид расчёта: любой» не влезает и в 12 px, а плейсхолдер поиска в 16 px — селекты на всю ширину, плейсхолдер мельче */
@media (max-width: 350px) {
  body.studio .find-form .find-select { grid-column: 1 / -1; }
  body.studio .find-select span { font-size: 13px; }
  body.studio .find-form #search::placeholder { font-size: 14px; }
  /* на 320 «Площадь от, сот.» и в 14 px упирается в отступы */
  body.studio .find-form input { padding: 0 11px; }
  /* иначе «Земельные участки» и «Коммерция» не встают в одну строку и кнопки идут в три ряда */
  body.studio .find-kinds span { padding: 0 10px; }
}
@media (forced-colors: active) {
  body.studio .find-form .find-select select { color: CanvasText; appearance: auto; background-image: none; }
  body.studio .find-select span, body.studio .find-form[data-kind] .find-select span { display: none; }
}

/* Объекты: поля по типу, карта, характеристики, эксклюзив и проверка администратором */
body.studio .editor-field-row.is-auto { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
body.studio .detail-map { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; min-height: 44px; padding: 0; border: 0; background: none; color: var(--studio-accent-dark); font-size: 13px; font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
body.studio .detail-map svg { width: 15px; height: 15px; }
/* карта объекта: окно поверх объекта, на телефоне — на весь экран, как в приложениях объявлений */
body.studio .map-dialog { width: min(960px, calc(100vw - 32px)); height: min(720px, calc(100dvh - 40px)); padding: 0; overflow: hidden; }
body.studio .map-dialog[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
body.studio .map-head { padding: 24px 72px 16px 28px; }
body.studio .map-head h2 { margin: 6px 0 0; font-size: 20px; line-height: 1.3; overflow-wrap: anywhere; }
body.studio .map-note { margin: 6px 0 0; color: var(--studio-muted); font-size: 13px; line-height: 1.5; }
body.studio .map-frame { position: relative; min-height: 0; background: #ebe6dc; }
body.studio .map-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
body.studio .map-status { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 24px; color: var(--studio-muted); font-size: 14px; text-align: center; }
body.studio .map-external { display: inline-flex; align-items: center; justify-self: start; gap: 6px; min-height: 44px; margin: 4px 28px 8px; color: var(--studio-accent-dark); font-size: 13px; font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
body.studio .map-external svg { width: 14px; height: 14px; }
@media (max-width: 700px) {
  body.studio .map-dialog { inset: 0; width: 100%; height: 100dvh; max-width: none; max-height: none; margin: 0; border-radius: 0; }
  body.studio .map-dialog .dialog-close { top: calc(10px + env(safe-area-inset-top)); }
  body.studio .map-head { padding: calc(18px + env(safe-area-inset-top)) 64px 12px 18px; }
  body.studio .map-head h2 { font-size: 17px; }
  body.studio .map-external { margin: 2px 18px calc(6px + env(safe-area-inset-bottom)); }
}
body.studio .detail-summary { margin-top: 8px; }
body.studio .detail-specs { display: grid; grid-template-columns: minmax(0, max-content) minmax(0, 1fr); gap: 8px 18px; margin: 0 0 20px; font-size: 13px; line-height: 1.5; }
body.studio .detail-specs:empty { display: none; }
body.studio .detail-specs dt { color: var(--studio-muted); }
body.studio .detail-specs dd { margin: 0; color: var(--studio-ink); font-weight: 500; overflow-wrap: anywhere; }
body.studio .detail-specs dd small { color: var(--studio-muted); font-size: 12px; font-weight: 400; }
body.studio .detail-egrn { display: grid; gap: 10px; margin-top: 18px; padding: 16px 18px; border: 1px solid var(--studio-line-soft); border-radius: var(--studio-radius-control); background: #f8f4ec; }
body.studio .detail-egrn.is-verified { border-color: rgba(139, 107, 56, .45); }
body.studio .detail-egrn h3 { margin: 0; font-size: 14px; font-weight: 700; }
body.studio .detail-egrn p { margin: 0; color: var(--studio-muted); font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
body.studio .detail-egrn .button { justify-self: start; gap: 8px; width: auto; margin: 0; }
body.studio .detail-egrn .button svg { width: 16px; height: 16px; }
body.studio .detail-note { margin: 0; padding: 12px 14px; border-left: 3px solid var(--studio-urgent); border-radius: 8px; background: #f7ece7; color: var(--studio-ink); font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
body.studio .property-ownership.is-exclusive { color: var(--studio-gold-bright); }
/* демо-набор: пометка заметнее статуса, но не тревожная — это не ошибка */
body.studio .property-ownership.is-demo { border-color: var(--studio-accent-dark); background: var(--studio-accent-dark); color: #fff; }
body.studio .detail-demo { margin: 0 0 16px; padding: 10px 14px; border-left: 3px solid var(--studio-accent); border-radius: 8px; background: #f4ecdd; color: var(--studio-ink); font-size: 13px; line-height: 1.55; }
body.studio .detail-demo strong { font-weight: 700; }
body.studio .agent-demo { color: var(--studio-accent-dark); font-weight: 600; }
body.studio .property-ownership.is-rejected { border: 1px solid var(--studio-urgent); background: #fbf2ee; color: var(--studio-urgent); }
body.studio .confirm-reason { display: grid; gap: 7px; margin-top: 18px; color: var(--studio-ink); font-size: 13px; font-weight: 600; }
body.studio .confirm-reason textarea { width: 100%; min-height: 96px; padding: 11px 13px; resize: vertical; color: var(--studio-ink); font: inherit; font-size: 14px; font-weight: 500; line-height: 1.5; }
body.studio .confirm-reason textarea[aria-invalid="true"] { border-color: var(--studio-urgent); }
body.studio .confirm-reason-error { color: var(--studio-urgent); font-size: 12px; font-weight: 500; }
body.studio .confirm-reason-error:empty { display: none; }
body.studio .moderation-mode { display: flex; align-items: flex-start; gap: 12px; margin: 14px 0 0; color: var(--studio-ink); font-size: 14px; font-weight: 600; line-height: 1.5; cursor: pointer; }
body.studio .moderation-mode input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--studio-ink); }
body.studio .moderation-mode small { display: block; margin-top: 4px; color: var(--studio-muted); font-size: 12px; font-weight: 500; }
body.studio #moderation-status { margin: 14px 0 0; color: var(--studio-muted); font-size: 13px; line-height: 1.6; }
body.studio #moderation-status:empty { display: none; }
body.studio .moderation-row { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 4px 16px; }
body.studio .moderation-row > img, body.studio .moderation-row > .moderation-thumb { grid-row: span 3; width: 112px; height: 84px; border-radius: 10px; object-fit: cover; background: var(--studio-selected); }
body.studio .moderation-row h4 { margin: 0; font-size: 16px; }
body.studio .moderation-row p { margin: 0; color: var(--studio-muted); font-size: 13px; }
body.studio .moderation-row .admission-actions { grid-column: 1 / -1; }
body.studio .admin-users-title { margin: 24px 38px 0; }
/* технические ошибки: заголовок с кнопкой проверки, строки как у заявок; стек не раздвигает окно */
body.studio .errors-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
body.studio .errors-head h3 { margin: 0; }
body.studio .errors-help { margin: 10px 0 0; color: var(--studio-muted); font-size: 13px; line-height: 1.6; }
body.studio .errors-summary { margin: 12px 0 0; color: var(--studio-ink); font-size: 14px; font-weight: 600; line-height: 1.5; }
body.studio .errors-status { margin: 8px 0 0; color: var(--studio-muted); font-size: 13px; line-height: 1.6; }
body.studio .errors-status:empty { display: none; }
body.studio .errors-resolved { display: inline-flex; align-items: center; gap: 10px; margin: 14px 0 6px; color: var(--studio-ink); font-size: 14px; font-weight: 600; cursor: pointer; }
body.studio .errors-resolved input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--studio-ink); }
body.studio .errors-empty { margin: 12px 0 0; color: var(--studio-muted); font-size: 13px; }
body.studio .error-row h4 { margin: 6px 0; font-size: 16px; line-height: 1.4; }
body.studio .error-row p { margin: 0; color: var(--studio-muted); font-size: 13px; line-height: 1.5; }
body.studio .error-row .error-when { color: var(--studio-ink); font-weight: 600; }
body.studio .error-detail { margin-top: 10px; }
/* свой значок вместо системного: системный ▶ на iPhone рисуется синим эмодзи */
body.studio .error-detail summary { display: flex; align-items: center; gap: 8px; width: fit-content; list-style: none; color: var(--studio-ink); font-size: 13px; font-weight: 600; cursor: pointer; }
body.studio .error-detail summary::-webkit-details-marker { display: none; }
body.studio .error-detail summary::before { flex: none; width: 6px; height: 6px; margin-left: 2px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; content: ""; transform: translateX(-2.1px) rotate(-45deg); }
body.studio .error-detail[open] summary::before { transform: translateY(-2.1px) rotate(45deg); }
body.studio .error-detail pre { max-height: 280px; margin: 8px 0 0; padding: 12px 14px; overflow: auto; border-radius: 10px; background: var(--studio-selected); color: var(--studio-ink);
  font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
/* тема «Технические ошибки» только у администраторов: display:flex строк перебивает атрибут hidden, черта под последней видимой не нужна */
body.studio .push-topics label[hidden] { display: none; }
body.studio .push-topics label:has(+ label[hidden]:last-of-type) { border-bottom: 0; }
@media (max-width: 700px) {
  body.studio .editor-field-row.is-auto { grid-template-columns: minmax(0, 1fr); grid-auto-flow: row; }
}
@media (max-width: 600px) {
  body.studio .moderation-row { grid-template-columns: 76px minmax(0, 1fr); gap: 4px 12px; }
  body.studio .moderation-row > img, body.studio .moderation-row > .moderation-thumb { width: 76px; height: 57px; }
  body.studio .admin-users-title { margin: 20px 20px 0; }
  body.studio .detail-specs { gap: 6px 14px; }
}
body.studio .detail-egrn .feedback:empty { display: none; }
body.studio .detail-egrn .feedback { padding-top: 0; color: var(--studio-ink); }
/* три значка (тип, «Мой объект», «Эксклюзив») не должны заезжать под закладку */
body.studio .property-badges { flex-wrap: wrap; max-width: calc(100% - 84px); }

/* Актуальность объекта и срок публикации */
body.studio .detail-actuality { display: grid; gap: 10px; margin-top: 18px; padding: 16px 18px; border: 1px solid var(--studio-line-soft); border-radius: var(--studio-radius-control); background: #f8f4ec; }
body.studio .detail-actuality.is-actual { border-color: rgba(139, 107, 56, .45); }
body.studio .detail-actuality h3 { margin: 0; font-size: 14px; font-weight: 700; }
body.studio .detail-actuality > p { margin: 0; color: var(--studio-muted); font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
body.studio .detail-actuality > p:focus { outline: none; }
body.studio .detail-actuality > .button { justify-self: start; gap: 8px; width: auto; margin: 0; }
/* «Запросить актуальность» — золотом, акцент владельца 06.10; текст тёмный: на золоте 7,5:1 */
body.studio .detail-actuality > .button.is-gold { border: 1px solid #a8884f; background: var(--studio-gold); color: var(--studio-ink); }
body.studio .detail-actuality .feedback:empty { display: none; }
body.studio .detail-actuality .feedback { padding-top: 0; color: var(--studio-ink); }
body.studio .actuality-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
body.studio .actuality-item { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 8px 12px; padding: 10px 12px; border-radius: 10px; background: var(--studio-panel); }
body.studio .actuality-item .avatar.mini { width: 36px; height: 36px; background: var(--studio-selected); color: var(--studio-accent-dark); font-size: 12px; }
body.studio .actuality-who { display: grid; gap: 1px; min-width: 0; font-size: 13px; line-height: 1.4; }
body.studio .actuality-who small { color: var(--studio-muted); font-size: 12px; }
body.studio .actuality-answer { display: flex; flex-wrap: wrap; gap: 6px; }
body.studio .actuality-answer .button { width: auto; min-height: 40px; margin: 0; padding-inline: 12px; font-size: 13px; }
body.studio .actuality-state { color: var(--studio-muted); font-size: 12px; font-weight: 600; text-align: right; }
body.studio .actuality-state.is-actual { color: var(--studio-accent-dark); }
/* как «Удалить объект» — во всю ширину стопки и высотой 46 по DESIGN.md: половинная выбивалась (владелец 07.10) */
body.studio button.text-button.detail-extend { justify-self: stretch; justify-content: center; gap: 8px; color: var(--studio-accent-dark); }
body.studio .detail-extend svg { width: 16px; height: 16px; }
body.studio .detail-status.is-expiring { color: var(--studio-ink); font-weight: 600; }
body.studio .property-ownership.is-expiring { border: 1px solid rgba(193, 163, 108, .6); background: #fbf4e6; color: var(--studio-accent-dark); }
body.studio .field-help { color: var(--studio-muted); font-size: 12px; font-weight: 500; line-height: 1.5; }

@media (max-width: 700px) {
  body.studio .actuality-item { grid-template-columns: 36px minmax(0, 1fr); }
  body.studio .actuality-item > :is(.actuality-answer, .actuality-state) { grid-column: 1 / -1; text-align: left; }
  body.studio .actuality-answer .button { flex: 1 1 0; }
}

/* Презентация для клиента: ссылка без входа, её просмотры и PDF для печати */
body.studio .detail-copy > #detail-presentation { gap: 10px; }
body.studio #detail-presentation svg { width: 17px; height: 17px; }
body.studio .presentation-dialog { width: min(600px, calc(100vw - 32px)); }
/* длинное название объекта не должно уходить под крестик */
body.studio .presentation-dialog .deal-dialog-kicker { padding-right: 40px; overflow-wrap: anywhere; }
body.studio #presentation-form.is-draft .deal-form-actions .button { flex: 1; }
body.studio .presentation-result { margin-top: 20px; }
body.studio .presentation-result .invite-result-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* «Поделиться» есть не во всех браузерах: без неё «Скопировать» во всю строку, мессенджеры парой под ней */
body.studio .presentation-result [data-presentation-copy]:has(+ [hidden]) { grid-column: 1 / -1; }
/* мессенджеры — официальные круглые значки со своими цветами и лёгкой тенью, как на странице покупателя */
body.studio .presentation-result .brand-icon { width: 24px; height: 24px; border-radius: 50%; stroke: none; box-shadow: 0 2px 6px #17161333; }
/* цена для клиента — шрифтом цены, как в окне объекта и на странице покупателя (владелец, 06.10) */
body.studio #presentation-form input[name="price"] { font-family: Georgia, Gelasio, serif; font-size: 20px; font-weight: 400; letter-spacing: 0; }
/* и бюджет в запросе (владелец 09.10: «Шрифт стоимости в запросах») */
body.studio #request-form input:is([name="budget_min"], [name="budget_max"]) { font-family: Georgia, Gelasio, serif; font-size: 20px; font-weight: 400; letter-spacing: 0; }

/* Чат: реакции, галочки, удалённые, догрузка истории, меню сообщения */
body.studio .chat-reactions { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 2px; }
body.studio .chat-reaction {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 44px; min-height: 32px; padding: 0 10px;
  border: 1px solid #d9cfbf; border-radius: 999px; background: rgba(255, 253, 249, .72); color: var(--studio-ink); font-size: 15px; line-height: 1;
}
body.studio .chat-reaction[aria-pressed="true"] { border-color: var(--studio-accent); background: #f3ead8; }
body.studio .chat-reaction-count { color: var(--studio-muted); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
body.studio .chat-reaction[aria-pressed="true"] .chat-reaction-count { color: var(--studio-accent-dark); }
body.studio .chat-reaction:focus-visible { outline-offset: 2px; }
/* вес выше, чем у пузыря своего сообщения в chat-fullscreen.css */
body.studio .chat-messages .chat-message-row .chat-bubble.is-deleted { border: 1px dashed var(--studio-line-soft); background: transparent; box-shadow: none; }
body.studio .chat-bubble .chat-deleted-text { color: var(--studio-muted); font-size: 13px; font-style: italic; line-height: 1.6; }
/* отправлено светлее, прочитано темнее — различие и формой, и цветом */
body.studio .chat-message-status { display: inline-flex; margin-left: 4px; vertical-align: -3px; color: #8a7a60; }
body.studio .chat-message-status svg { width: 16px; height: 16px; stroke-width: 1.8; }
body.studio .chat-message-status.is-read { color: var(--studio-accent-dark); }
body.studio .chat-message-status.is-read svg { stroke-width: 2; }
body.studio .chat-unread-divider { display: flex; align-items: center; gap: 12px; color: var(--studio-accent-dark); font-size: 12px; font-weight: 600; letter-spacing: .03em; }
body.studio .chat-unread-divider::before,
body.studio .chat-unread-divider::after { content: ''; flex: 1; height: 1px; background: #c9b48c; }
body.studio .chat-older { display: flex; justify-content: center; }
body.studio .chat-older-button {
  min-height: 44px; padding: 0 18px; border: 1px solid var(--studio-line-soft); border-radius: 999px;
  background: var(--studio-panel); color: var(--studio-ink); font-size: 13px;
}
body.studio .chat-older-button[aria-disabled="true"] { color: var(--studio-muted); cursor: progress; }
/* пустая строка статуса остаётся в дереве — иначе экранный диктор может не прочитать появившийся текст */
body.studio .chat-connection {
  flex: none; margin: 0; padding: 8px 24px; border-top: 1px solid #e6d6b8; background: #fbf4e6;
  color: var(--studio-accent-dark); font-size: 12px; line-height: 1.5; text-align: center;
}
body.studio .chat-connection:empty { padding: 0; border: 0; }
/* нулевая высота: липнет к низу ленты и не меняет её прокрутку */
body.studio .chat-jump-dock { position: sticky; bottom: 0; z-index: 2; height: 0; pointer-events: none; }
body.studio .chat-jump {
  position: absolute; right: 0; bottom: 14px; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 12px;
  border: 1px solid var(--studio-line-soft); border-radius: 999px; background: var(--studio-panel); color: var(--studio-ink);
  box-shadow: 0 8px 22px rgba(42, 39, 34, .14); font-size: 13px; font-weight: 600; white-space: nowrap; pointer-events: auto;
}
body.studio .chat-jump svg { width: 18px; height: 18px; }
body.studio .message-actions { width: 300px; max-width: calc(100vw - 24px); padding: 8px; border-radius: var(--studio-radius-card); }
/* у сообщения на компьютере — всплывающее меню без затемнения, координаты ставит скрипт */
body.studio .message-actions.is-anchored { position: fixed; inset: auto; margin: 0; }
body.studio .message-actions.is-anchored::backdrop { background: transparent; backdrop-filter: none; }
body.studio .message-actions button:focus-visible { outline-offset: -2px; }
body.studio .message-actions-reactions { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; padding-bottom: 6px; border-bottom: 1px solid var(--studio-line-soft); }
body.studio .message-actions-emoji { height: 44px; border-radius: var(--studio-radius-control); font-size: 22px; line-height: 1; }
body.studio .message-actions-emoji[aria-pressed="true"] { background: #f3ead8; box-shadow: inset 0 0 0 1px var(--studio-accent); }
body.studio .message-actions-list { display: grid; gap: 2px; padding-top: 6px; }
body.studio .message-actions-list button {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0 12px;
  border-radius: var(--studio-radius-control); color: var(--studio-ink); font-size: 14px; text-align: left;
}
body.studio .message-actions-list svg { width: 18px; height: 18px; color: var(--studio-muted); }
body.studio .message-actions-list .is-danger,
body.studio .message-actions-list .is-danger svg { color: var(--studio-urgent); }
body.studio .message-actions-list .message-actions-cancel { justify-content: center; margin-top: 4px; background: #f3efe8; font-weight: 600; }
body.studio .message-actions.is-anchored .message-actions-cancel { display: none; }
@media (hover: hover) and (pointer: fine) {
  body.studio .chat-reaction:hover { border-color: var(--studio-accent); }
  body.studio .chat-older-button:not([aria-disabled="true"]):hover { border-color: var(--studio-line); background: #f6f1e8; }
  body.studio .chat-jump:hover { background: #f6f1e8; }
  body.studio .message-actions-emoji:hover,
  body.studio .message-actions-list button:hover { background: #f3eee5; }
}
/* на телефоне меню открывают долгим нажатием, как в клиентской версии; кнопка «ещё» остаётся для клавиатуры */
@media (hover: none) {
  body.studio .chat-more-button:not(:focus-visible) { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
  body.studio .chat-bubble { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
  body.studio .chat-bubble a { -webkit-touch-callout: default; }
}
@media (max-width: 760px) {
  body.studio .message-actions { width: min(420px, calc(100vw - 24px)); max-width: none; margin: auto auto calc(12px + env(safe-area-inset-bottom)); padding: 10px; border-radius: 20px; }
  body.studio .message-actions-list button { min-height: 48px; font-size: 15px; }
  body.studio .chat-connection { padding-inline: 12px; }
}

/* Отзывы: карточка коллеги, оценка звёздами, подтверждение завершения сделки */
body.studio .stars { position: relative; display: inline-flex; flex: none; vertical-align: middle; }
body.studio .stars-base, body.studio .stars-fill { display: inline-flex; }
/* закрашенный ряд обрезан по оценке: ширина задаётся скриптом через --fill */
body.studio .stars-fill { position: absolute; inset: 0 auto 0 0; width: var(--fill, 0%); overflow: hidden; }
body.studio .stars svg { width: 16px; height: 16px; stroke-width: 1.4; }
body.studio .stars-base svg { stroke: var(--studio-line); }
body.studio .stars-fill svg { fill: var(--studio-gold); stroke: var(--studio-accent); }
body.studio .agent-rating { display: inline-flex; align-items: center; gap: 4px; color: var(--studio-ink); font-weight: 600; white-space: nowrap; }
body.studio .agent-rating svg { width: 13px; height: 13px; fill: var(--studio-gold); stroke: var(--studio-accent); stroke-width: 1.4; }

/* класс text-button тянет из дизайна рамку, фон и высоту кнопки — имя партнёра должно читаться ссылкой */
body.studio button.text-button.deal-partner-link { position: relative; justify-self: start; min-height: 24px; padding: 0; border: 0; border-radius: 4px; background: none; color: var(--studio-ink); font-size: 13px; font-weight: 600; line-height: 1.5; text-align: left; text-decoration: underline; text-decoration-color: var(--studio-line); text-underline-offset: 3px; }
/* подпись 24px, а нажимать удобнее шире — подложка, как у фактов профиля */
body.studio .deal-partner-link::after { content: ""; position: absolute; inset: -8px -6px; }
body.studio .deal-confirm { display: grid; gap: 14px; margin: 16px 0 0; padding: 16px 18px; border: 1px solid var(--studio-line-soft); border-radius: var(--studio-radius-card); background: var(--studio-page); }
body.studio .deal-confirm.is-urgent { border-color: #d9b9ad; background: #fbf2ed; }
body.studio .deal-confirm p { margin: 0; color: var(--studio-ink); font-size: 14px; line-height: 1.6; }
body.studio .deal-confirm-actions { display: flex; flex-wrap: wrap; gap: 10px; }
body.studio .deal-confirm-actions:not(:has(.button:not([hidden]))) { display: none; }
body.studio .deal-confirm-actions .button { width: auto; min-height: 44px; margin: 0; gap: 10px; }
body.studio .deal-confirm-actions svg { width: 16px; height: 16px; }

body.studio .agent-dialog { width: min(600px, calc(100vw - 32px)); }
/* профиль — как у клиента (06.10): рамка, слева фото, «в сети» и логотип, справа имя, агентство, стаж, город и оценка.
   В разметке колонка с фото идёт после имени — читалка начинает с имени, на экране фото слева */
body.studio .agent-profile { display: grid; grid-template-columns: 140px minmax(0, 1fr); grid-template-areas: "kicker kicker" "aside main" "aside details"; column-gap: 32px; align-items: start; margin-top: 20px; padding: 26px 32px 30px; border: 1px solid var(--studio-line-soft); border-radius: var(--studio-radius-card); background: var(--studio-panel); }
body.studio .agent-profile > .deal-dialog-kicker { grid-area: kicker; margin: 0 0 20px; }
body.studio .agent-main { grid-area: main; min-width: 0; }
body.studio .agent-aside { grid-area: aside; display: grid; justify-items: start; gap: 12px; min-width: 0; }
body.studio .agent-details { grid-area: details; min-width: 0; }
body.studio .agent-avatar { width: 140px; height: 140px; background: var(--studio-selected); color: var(--studio-accent-dark); font-size: 40px; }
body.studio .agent-main :is(h1, h2) { margin: 0; font-family: var(--serif); font-size: 36px; font-weight: 400; line-height: 1.15; letter-spacing: 0; overflow-wrap: anywhere; }
body.studio .agent-company { margin: 10px 0 0; color: var(--studio-ink); font-size: 15px; font-weight: 500; line-height: 1.45; overflow-wrap: anywhere; }
body.studio .agent-city { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; color: var(--studio-muted); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
body.studio .agent-city svg { flex: none; width: 14px; height: 14px; }
body.studio :is(.agent-company, .agent-city, .agent-presence)[hidden] { display: none; }
body.studio .agent-presence { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--studio-muted); font-size: 13px; line-height: 1.4; }
body.studio .agent-presence .online-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--studio-online); box-shadow: 0 0 0 3px rgba(34, 197, 94, .25); }
body.studio .agent-logo { display: block; max-width: 140px; max-height: 56px; width: auto; height: auto; margin: 0; object-fit: contain; }
body.studio .agent-logo[hidden] { display: none; }
body.studio .agent-score { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 14px 0 0; }
body.studio .agent-score strong { font-size: 20px; font-weight: 600; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
body.studio .agent-score strong:empty { display: none; }
body.studio .agent-score .stars svg { width: 18px; height: 18px; }
body.studio .agent-score > span:last-child { color: var(--studio-muted); font-size: 13px; }
/* точка стоит перед каждым фактом, а у первого в строке уходит под обрезку слева — перенос не начинает строку с «·» */
body.studio .agent-facts { display: flex; flex-wrap: wrap; align-items: center; margin: 16px 0 0 -17px; color: var(--studio-muted); font-size: 12px; line-height: 1.7; clip-path: inset(0 0 0 17px); }
body.studio .agent-facts > span { position: relative; padding-left: 17px; }
body.studio .agent-facts > span::before { content: "·"; position: absolute; left: 0; width: 17px; color: var(--studio-line); text-align: center; }
body.studio .agent-verified { display: inline-flex; align-items: center; gap: 5px; color: var(--studio-positive); font-weight: 600; }
body.studio .agent-verified svg { width: 14px; height: 14px; stroke-width: 2; }
body.studio .agent-about { margin: 16px 0 0; color: var(--studio-ink); font-size: 14px; line-height: 1.7; white-space: pre-line; overflow-wrap: anywhere; }
body.studio .agent-actions { display: flex; gap: 10px; margin-top: 18px; }
body.studio .agent-actions .button { width: auto; min-height: 44px; margin: 0; gap: 10px; }
body.studio .agent-actions svg { width: 16px; height: 16px; }
body.studio :is(.agent-review-box, .agent-reviews) { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--studio-line-soft); }
body.studio :is(.agent-review-box, .agent-reviews) h3 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
body.studio .review-form { gap: 12px; margin-top: 14px; }
body.studio .review-stars { display: flex; flex-wrap: wrap; align-items: center; min-inline-size: 0; margin: 0; padding: 0; border: 0; }
body.studio .review-stars legend { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; width: 100%; margin: 0 0 4px; padding: 0; color: var(--studio-ink); font-size: 14px; font-weight: 600; }
/* бейдж ставит дизайн только в label, у звёзд fieldset — пишем руками, в ту же колонку, что у «Отзыва» */
body.studio .review-stars legend > .field-status { margin-left: 0; }
body.studio .review-stars label { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--studio-radius-control); cursor: pointer; }
/* сама радиокнопка прозрачна поверх звезды: стрелки, пробел и нажатие работают как у обычной группы */
body.studio .review-stars input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; background: none; opacity: 0; cursor: pointer; appearance: none; }
body.studio .review-stars label:has(input:focus-visible) { outline: 2px solid var(--studio-focus); outline-offset: -2px; }
body.studio .review-stars svg { width: 30px; height: 30px; fill: transparent; stroke: var(--studio-line); stroke-width: 1.3; transition: fill .12s, stroke .12s; }
/* закрашены выбранная звезда и все до неё */
body.studio .review-stars :where(label:has(input:checked), label:has(~ label input:checked)) svg { fill: var(--studio-gold); stroke: var(--studio-accent); }
body.studio .review-stars.is-invalid svg { stroke: var(--studio-urgent); }
body.studio .review-text { display: grid; gap: 8px; color: var(--studio-ink); font-size: 14px; font-weight: 600; }
body.studio .review-text textarea { min-height: 116px; color: var(--studio-ink); font-size: 14px; font-weight: 500; line-height: 1.6; }
body.studio .review-text textarea[aria-invalid="true"] { border-color: var(--studio-urgent); }
body.studio .review-counter { justify-self: end; margin-top: -6px; color: var(--studio-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
body.studio .review-counter.is-near { color: var(--studio-urgent); }
body.studio .review-form > .feedback:empty { margin-top: -12px; }
body.studio .review-form > .button { width: 100%; margin: 4px 0 0; justify-content: space-between; }
body.studio .agent-review-list { display: grid; margin-top: 6px; }
body.studio .agent-review { padding: 16px 0; border-bottom: 1px solid var(--studio-line-soft); }
body.studio .agent-review:last-child { border-bottom: 0; padding-bottom: 4px; }
body.studio .agent-review:focus-visible { outline: 2px solid var(--studio-focus); outline-offset: 4px; border-radius: 8px; }
body.studio .agent-review header { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
body.studio .agent-review .avatar.mini { width: 36px; height: 36px; background: var(--studio-selected); color: var(--studio-accent-dark); font-size: 12px; }
body.studio .agent-review header div { display: grid; gap: 2px; min-width: 0; }
body.studio .agent-review strong { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
body.studio .agent-review small { color: var(--studio-muted); font-size: 12px; }
body.studio .agent-review p { margin: 10px 0 0 48px; color: var(--studio-ink); font-size: 14px; line-height: 1.65; white-space: pre-line; overflow-wrap: anywhere; }
body.studio .agent-review-mine { display: inline-block; margin-left: 4px; padding: 1px 8px; border-radius: 999px; background: var(--studio-selected); color: var(--studio-accent-dark); font-size: 11px; font-weight: 600; vertical-align: 1px; }
body.studio .agent-reviews-empty { margin: 8px 0 0; color: var(--studio-muted); font-size: 14px; line-height: 1.6; }
body.studio .agent-reviews .agent-more { width: 100%; margin-top: 12px; }
body.studio .agent-reviews > .feedback:empty { display: none; }
@media (hover: hover) and (pointer: fine) {
  body.studio .detail-agent:hover { border-color: var(--studio-line); background: var(--studio-page); }
  body.studio .detail-actuality > .button.is-gold:hover { border-color: var(--studio-accent); background: #b39257; }
  body.studio .detail-agent:hover strong { text-decoration: underline; text-underline-offset: 3px; }
  /* наведение показывает будущую оценку: заливка до звезды под курсором, выбранная не мешает */
  body.studio .review-stars:has(label:hover) label svg { fill: transparent; stroke: var(--studio-line); }
  body.studio .review-stars:has(label:hover) :is(label:hover, label:has(~ label:hover)) svg { fill: var(--studio-gold); stroke: var(--studio-accent); }
}
@media (max-width: 480px) {
  body.studio .agent-review header { grid-template-columns: 36px minmax(0, 1fr); }
  body.studio .agent-review header .stars { grid-column: 2; }
  body.studio .agent-review p { margin-left: 0; }
  body.studio :is(.deal-confirm-actions, .agent-actions) .button { flex: 1 1 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  body.studio .review-stars svg { transition: none; }
}

/* Push-уведомления: блок в настройках профиля, предложение в колокольчике, строка у администратора */
body.studio .push-panel { padding: 0 38px 28px 262px; }
body.studio .push-lead { max-width: 540px; margin: 0; color: var(--studio-muted); font-size: 13px; line-height: 1.6; }
body.studio .push-lead:empty { display: none; }
body.studio .push-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
body.studio .push-actions:not(:has(> :not([hidden]))) { display: none; }
/* живой регион не прячем через display: пустой он просто без отступа, иначе читалка пропустит первое сообщение */
body.studio .push-status { margin: 12px 0 0; color: var(--studio-accent-dark); font-size: 12px; font-weight: 600; line-height: 1.55; }
body.studio .push-status:empty { margin: 0; }
body.studio .push-topics { display: grid; min-width: 0; margin: 22px 0 0; padding: 0; border: 0; }
body.studio :is(.push-topics legend, .push-devices-title) { margin: 0 0 4px; padding: 0; color: var(--studio-ink); font-size: 13px; font-weight: 600; }
/* разделы — как в макете настроек: текст слева, флажок справа, строки через линию */
body.studio .push-topics label { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 0; border-bottom: 1px solid var(--studio-line-soft); cursor: pointer; }
body.studio .push-topics label:last-of-type { border-bottom: 0; }
body.studio .push-topics label > span { display: grid; gap: 3px; min-width: 0; color: var(--studio-ink); font-size: 14px; font-weight: 600; }
body.studio .push-topics label small { color: var(--studio-muted); font-size: 12px; font-weight: 500; line-height: 1.5; }
body.studio .push-topics input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--studio-ink); }
body.studio .push-devices { margin-top: 22px; }
body.studio .push-device-list { display: grid; margin: 0; padding: 0; list-style: none; }
body.studio .push-device { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; padding: 8px 0; border-bottom: 1px solid var(--studio-line-soft); }
body.studio .push-device:last-child { border-bottom: 0; }
body.studio .push-device-text { display: grid; gap: 3px; min-width: 0; }
body.studio .push-device-text strong { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
body.studio .push-device-text small { color: var(--studio-muted); font-size: 12px; }
body.studio .push-device .text-button { flex: none; }
body.studio .push-panel > .form-note { margin: 18px 0 0; line-height: 1.55; }
body.studio .push-offer { margin: 0 30px 14px; padding: 16px 18px; border: 1px solid var(--studio-line-soft); border-radius: var(--studio-radius-card); background: var(--studio-page); }
body.studio .push-offer p { display: grid; gap: 4px; margin: 0; }
body.studio .push-offer strong { font-size: 14px; font-weight: 600; }
body.studio .push-offer p span { color: var(--studio-muted); font-size: 12px; line-height: 1.55; }
body.studio .push-offer-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
body.studio .admin-person .admin-push { margin: 0; color: var(--studio-muted); font-size: 12px; }
body.studio button.admin-push-test { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 12px; font-weight: 600; }
body.studio .admin-push-test svg { width: 16px; height: 16px; flex: none; }
body.studio .admin-person .admin-reset { margin: 0; color: var(--studio-muted); font-size: 12px; }
body.studio .admin-row.is-reset-requested :is(.admin-reset, .admin-reset-link) { color: var(--studio-accent-dark); font-weight: 600; }
body.studio button.admin-reset-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 12px; font-weight: 600; }
body.studio .admin-reset-link svg { width: 16px; height: 16px; flex: none; }
body.studio .reset-link-dialog #reset-link-text { overflow-wrap: anywhere; }
body.studio .reset-link-dialog .invite-field { margin-top: 18px; }
body.studio .reset-link-dialog .invite-result-actions { margin-top: 12px; }
body.studio .reset-link-dialog .invite-result-note { margin-top: 12px; font-size: 12px; line-height: 1.55; }
@media (max-width: 700px) {
  body.studio .push-panel { padding: 0 20px 24px; }
  body.studio .push-actions .button { flex: 1 1 100%; justify-content: center; }
  body.studio .push-offer { margin: 0 20px 12px; padding: 14px 16px; }
  body.studio .push-offer-actions > * { flex: 1 1 auto; justify-content: center; }
}

/* Персональные данные: согласие на входе, «Мои данные» в настройках, выгрузка и удаление у администратора */
.entry-nav[hidden] { display: none; }
.entry-legal { margin: 0; color: var(--entry-muted); font-size: 12px; line-height: 1.5; }
.entry-legal a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.entry-legal a:hover { color: var(--entry-ink); }
.entry-consent a { color: var(--entry-bronze-dark); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.entry-consent input[aria-invalid="true"] { outline: 2px solid var(--entry-danger); outline-offset: 2px; }
.entry-help-actions { display: flex; flex-wrap: wrap; column-gap: 20px; }
/* что удалится — строками «раздел — сколько», как выписка */
.entry-data { display: grid; margin: 24px 0 0; padding: 0; }
.entry-data[hidden] { display: none; }
.entry-data div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--entry-line-soft); font-size: 13px; line-height: 1.45; }
.entry-data div:first-child { border-top: 1px solid var(--entry-line-soft); }
.entry-data dt { color: var(--entry-muted); }
.entry-data dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.entry-submit.is-danger { background: var(--entry-danger); }
.entry-submit.is-danger:hover { background: #7c3d2f; }

body.studio .data-panel { padding: 0 38px 28px 262px; }
body.studio .data-lead { max-width: 540px; margin: 0; color: var(--studio-muted); font-size: 13px; line-height: 1.6; }
body.studio .data-counts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); column-gap: 28px; max-width: 540px; margin: 16px 0 0; padding: 0; }
body.studio .data-counts[hidden] { display: none; }
body.studio .data-counts div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--studio-line-soft); font-size: 13px; line-height: 1.45; }
body.studio .data-counts dt { color: var(--studio-muted); }
body.studio .data-counts dd { margin: 0; color: var(--studio-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
/* живой регион не прячем: пустой он просто без отступа */
body.studio .data-status { margin: 12px 0 0; color: var(--studio-muted); font-size: 12px; line-height: 1.55; }
body.studio .data-status:empty { margin: 0; }
body.studio .data-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
body.studio .data-actions .button { gap: 10px; }
body.studio .data-actions .button svg { width: 16px; height: 16px; flex: none; }
body.studio .data-actions .data-erase { border-color: rgba(147, 75, 58, .35); color: var(--studio-urgent); }
body.studio .data-actions .data-erase:hover { border-color: var(--studio-urgent); }
body.studio .data-panel > .form-note { margin: 18px 0 0; line-height: 1.55; }
body.studio .data-panel > .form-note a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

body.studio .admin-data-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 12px; font-weight: 600; text-decoration: none; }
body.studio .admin-data-link svg { width: 16px; height: 16px; flex: none; }
/* выгрузка — ссылка, а дизайн оформляет кнопкой только button.text-button: без этого у соседей разные рамка, фон и радиус */
body.studio a.admin-data-link { padding: 9px 14px; border: 1px solid var(--studio-line); border-radius: var(--studio-radius-control); background: var(--studio-panel); color: var(--studio-ink); }
body.studio a.admin-data-link:hover { border-color: var(--studio-accent); background: var(--studio-panel); color: var(--studio-accent-dark); }
body.studio button.admin-erase { color: var(--studio-urgent); }
body.studio .admin-privacy { margin: 0; padding: 14px 38px; border-bottom: 1px solid var(--studio-line-soft); background: #f7f1e4; color: var(--studio-ink); font-size: 13px; line-height: 1.55; }
body.studio .admin-privacy[hidden] { display: none; }
body.studio .admin-privacy a { color: var(--studio-accent-dark); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
/* своя галочка администратора — полосой под шапкой, как и пометка о реквизитах: касается и заявок, и объектов */
body.studio .admin-mail { margin: 0; padding: 16px 36px; border-bottom: 1px solid var(--studio-line-soft); }
body.studio .admin-mail[hidden] { display: none; }
/* отступ как у разделов ниже: галочка стоит по одной линии с их заголовками */
@media (max-width: 600px) { body.studio .admin-mail { padding: 16px 20px; } }
@media (max-width: 700px) {
  body.studio .data-panel { padding: 0 20px 24px; }
  body.studio .data-actions .button { flex: 1 1 100%; justify-content: center; }
  body.studio .admin-privacy { padding: 14px 20px; }
}

/* помощь: темы — те же раскрывашки, что «Сменить пароль» в настройках, только ниже: двенадцать тем по 94px не помещались и в два экрана;
   ответ без второй колонки настроек — строка до 640px читается легче */
/* «Помощь» последней в ряду профиля: в браузере рядом всегда «Установить ЭХО», и с подписью она одна переносилась на вторую строку —
   на компьютере значок с подсказкой, на телефоне подпись; нечётной кнопке в сетке из двух столбцов — вся строка */
body.studio .profile-actions .profile-help { gap: 10px; }
@media (min-width: 761px) {
  body.studio .profile-actions .profile-help { width: 46px; min-width: 46px; padding: 0; justify-content: center; }
  body.studio .profile-help span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-width: 760px) {
  /* с «Тарифами» (на месте «Сделок» с волны 46) кнопок нечётно, когда «Установить ЭХО» скрыта: «Управление сетью» и «Статистика сети»
     (волна 49) у администратора видны парой и чётность не меняют; в своём кабинете их нет — всегда пять */
  body.studio .profile-actions:has(> [data-install-app][hidden]) > .profile-help,
  body.studio .agent-own-actions > .profile-help { grid-column: 1 / -1; }
}
/* помощь длиннее остальных окон: крестик уезжал вместе с темами, а на iPhone нет Escape и фона вокруг окна почти не видно — держим его у верхнего края */
/* у .icon-button inline-flex: absolute делал кнопку блочной, sticky — нет, без display: flex она встаёт в строку слева и сдвигает шапку */
body.studio .help-dialog > .dialog-close { position: sticky; top: 10px; display: flex; margin: 10px 10px -54px auto; }
body.studio .help-topic summary { min-height: 72px; padding-block: 16px; }
body.studio .help-answer { max-width: 716px; padding: 0 38px 24px; }
body.studio .help-answer p { margin: 0 0 12px; color: var(--studio-ink); font-size: 14px; line-height: 1.6; }
body.studio .help-answer p:last-child { margin-bottom: 0; }
body.studio .help-answer a { color: var(--studio-accent-dark); text-decoration: underline; text-underline-offset: 3px; }
body.studio .help-contact { padding: 26px 38px 32px; }
body.studio .help-contact h3 { margin: 0 0 8px; font-size: 16px; font-weight: 600; }
body.studio .help-contact p { max-width: 560px; margin: 0; color: var(--studio-muted); font-size: 13px; line-height: 1.6; }
body.studio .help-admins { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
body.studio .help-admins[hidden] { display: none; }
body.studio .help-admin { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 5px 16px 5px 5px; border: 1px solid var(--studio-line); border-radius: 999px; background: var(--studio-panel); color: var(--studio-ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
body.studio .help-admin:hover { border-color: var(--studio-accent); color: var(--studio-accent-dark); }
body.studio .help-admin .avatar { flex: none; }
@media (max-width: 700px) {
  body.studio .help-topic summary { min-height: 64px; padding-block: 14px; }
  body.studio .help-answer { padding: 0 20px 20px; }
  body.studio .help-contact { padding: 22px 20px max(24px, env(safe-area-inset-bottom)); }
}
/* «Тарифы» на месте «Сделок» в профиле (владелец, 11.10): платных тарифов пока нет — окно с текстом владельца */
body.studio .tariffs-dialog { width: min(600px, calc(100vw - 32px)); }
body.studio .tariffs-body { padding: 24px 38px 30px; }
body.studio .tariffs-lead { margin: 0 0 16px; font-family: var(--serif); font-size: 24px; font-weight: 400; line-height: 1.3; color: var(--studio-ink); text-wrap: balance; }
body.studio .tariffs-free { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; padding: 13px 16px; border: 1px solid rgba(193, 163, 108, .6); border-radius: var(--studio-radius-control); background: var(--studio-panel); color: var(--studio-ink); font-size: 15px; font-weight: 600; line-height: 1.5; }
body.studio .tariffs-free svg { width: 26px; height: 26px; padding: 5px; border-radius: 50%; background: var(--studio-accent-dark); color: #f7f1e7; stroke-width: 2.2; }
body.studio .tariffs-body > p:not([class]) { margin: 0 0 14px; color: var(--studio-ink); font-size: 15px; line-height: 1.65; }
body.studio .tariffs-motto { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--studio-line-soft); font-family: var(--serif); font-size: 20px; line-height: 1.4; color: var(--studio-accent-dark); text-wrap: balance; }
body.studio .tariffs-actions { margin-top: 22px; }
@media (max-width: 700px) {
  body.studio .tariffs-body { padding: 22px 20px max(26px, env(safe-area-inset-bottom)); }
  body.studio .tariffs-lead { font-size: 22px; }
  body.studio .tariffs-actions .button { width: 100%; justify-content: center; }
}
/* «Статистика сети» у администратора (владелец, 11.10): суммы за день, без того, кто именно заходил */
body.studio .stats-dialog { width: min(880px, calc(100vw - 32px)); }
body.studio .stats-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 22px 38px; border-bottom: 1px solid var(--studio-line-soft); }
/* с весом: .agent-kinds ниже по файлу ставит 16 px снизу — период уезжал вверх от середины полосы */
body.studio .stats-toolbar .stats-period { margin: 0; }
body.studio .stats-status { margin: 0; color: var(--studio-muted); font-size: 14px; }
body.studio .stats-content[aria-busy="true"] { opacity: .55; }
body.studio .stats-section { padding: 26px 38px; border-bottom: 1px solid var(--studio-line-soft); }
body.studio .stats-section h3 { margin: 0 0 16px; color: var(--studio-ink); font: 400 22px/1.25 var(--serif); }
body.studio .stats-section h4 { margin: 0 0 10px; color: var(--studio-muted); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
body.studio .stats-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
body.studio :is(.stats-kpi, .stats-group, .stats-tiles > div) { border: 1px solid var(--studio-line-soft); border-radius: var(--studio-radius-card); background: var(--studio-panel); }
body.studio .stats-kpi { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 16px 18px; }
body.studio .stats-kpi-label { color: var(--studio-muted); font-size: 13px; line-height: 1.35; }
body.studio .stats-kpi-value { color: var(--studio-ink); font: 400 34px/1.1 var(--serif); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
body.studio .stats-kpi small { color: var(--studio-muted); font-size: 13px; line-height: 1.4; }
body.studio .stats-charts { display: grid; gap: 24px; }
body.studio .stats-chart { margin: 0; }
body.studio .stats-chart figcaption { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; color: var(--studio-ink); font-size: 14px; font-weight: 600; }
body.studio .stats-chart figcaption strong { font: 400 22px/1 var(--serif); font-variant-numeric: tabular-nums; }
/* столбик — доля самого большого дня; высоту задаёт --value из production-app.js */
body.studio .stats-bars { display: flex; align-items: flex-end; justify-content: space-between; gap: 2px; height: 120px; border-bottom: 1px solid var(--studio-line); }
body.studio .stats-bars > span { flex: 1 1 0; max-width: 40px; height: calc(var(--value, 0) * 100%); min-height: 2px; border-radius: 2px 2px 0 0; background: linear-gradient(180deg, #a7824a, #86652f); }
body.studio .stats-bars > span.is-zero { background: var(--studio-line-soft); }
/* дни до начала счёта — штриховка во всю высоту: не ноль, а «не считали» */
body.studio .stats-bars > span.is-before { height: 100%; border-radius: 0; background: repeating-linear-gradient(135deg, rgba(152, 138, 118, .3) 0 2px, transparent 2px 6px); }
body.studio .stats-axis { display: flex; justify-content: space-between; margin-top: 6px; color: var(--studio-muted); font-size: 12px; }
body.studio :is(.stats-columns, .stats-groups) { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px 28px; }
body.studio .stats-groups { gap: 16px; }
body.studio .stats-list ul { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
body.studio .stats-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 6px 12px; }
body.studio .stats-list-label { color: var(--studio-ink); font-size: 14px; }
body.studio .stats-list-value { white-space: nowrap; }
body.studio .stats-list-value strong { color: var(--studio-ink); font-size: 15px; font-variant-numeric: tabular-nums; }
body.studio .stats-list-value small { margin-left: 6px; color: var(--studio-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
body.studio .stats-meter { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: #ece4d6; overflow: hidden; }
/* #a7824a на дорожке — 2,8:1, полоску почти не видно; #86652f — 4,2:1 */
body.studio .stats-meter > span { display: block; width: calc(var(--value, 0) * 100%); height: 100%; border-radius: inherit; background: #86652f; }
body.studio :is(.stats-empty, .stats-list-note) { margin: 0; color: var(--studio-muted); font-size: 13px; line-height: 1.5; }
body.studio .stats-list-note { margin-top: 12px; }
/* разделы — по убыванию сверху вниз, потом во второй столбец */
body.studio #stats-views ul { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(4, auto); grid-auto-flow: column; column-gap: 32px; }
body.studio .stats-group { min-width: 0; padding: 18px 20px; }
body.studio .stats-group-value { display: block; color: var(--studio-ink); font: 400 34px/1.1 var(--serif); font-variant-numeric: tabular-nums; }
body.studio .stats-group > p { margin: 4px 0 12px; color: var(--studio-muted); font-size: 13px; line-height: 1.45; }
body.studio .stats-group dl { margin: 0; }
body.studio .stats-group dl > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 0; border-top: 1px solid var(--studio-line-soft); font-size: 14px; }
body.studio .stats-group dt { color: var(--studio-muted); }
body.studio .stats-group dd { margin: 0; color: var(--studio-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
body.studio .stats-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 0; }
/* число сверху, подпись под ним; чтец читает в порядке разметки — подпись, потом число */
body.studio .stats-tiles > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 4px; padding: 14px 16px; }
body.studio .stats-tiles dt { color: var(--studio-muted); font-size: 13px; line-height: 1.35; }
body.studio .stats-tiles dd { margin: 0; color: var(--studio-ink); font: 400 26px/1.1 var(--serif); font-variant-numeric: tabular-nums; }
body.studio .stats-note { margin: 0; padding: 20px 38px 30px; color: var(--studio-muted); font-size: 13px; line-height: 1.6; }
@media (max-width: 700px) {
  /* статус встаёт строкой под период; пустой не должен добавлять зазор снизу — отступ только у статуса с текстом */
  body.studio .stats-toolbar { padding: 18px 20px; row-gap: 0; }
  body.studio .stats-status:not(:empty) { margin-top: 12px; }
  body.studio .stats-period { flex: 1 1 100%; }
  /* кнопки — по трети ширины, а не по длине подписи: на 320–360 «90 дней» шире трети, и кнопки расходились */
  body.studio .stats-period :is(label, span) { min-width: 0; }
  body.studio .stats-period label { flex: 1 1 0; }
  body.studio .stats-period span { padding: 0 8px; }
  body.studio .stats-section { padding: 22px 20px; }
  body.studio .stats-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  body.studio .stats-kpi { padding: 14px; }
  body.studio .stats-kpi-value { font-size: 26px; }
  body.studio .stats-bars { gap: 1px; height: 96px; }
  body.studio #stats-views ul { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-auto-flow: row; }
  body.studio .stats-group-value { font-size: 30px; }
  body.studio .stats-note { padding: 18px 20px max(26px, env(safe-area-inset-bottom)); }
}
/* контрастная тема стирает заливки и градиенты — столбики и полосы системным цветом текста */
@media (forced-colors: active) {
  body.studio :is(.stats-bars > span, .stats-meter > span) { forced-color-adjust: none; background: CanvasText; }
  body.studio .stats-bars > span.is-zero { background: GrayText; }
  body.studio .stats-bars > span.is-before { background: repeating-linear-gradient(135deg, GrayText 0 2px, Canvas 2px 6px); }
  body.studio .stats-meter { forced-color-adjust: none; border: 1px solid CanvasText; background: Canvas; }
}
/* «в сети»: точка у аватара коллеги. Аватар режет фото по кругу через overflow — с точкой круг держит сама картинка */
body.studio :is(.avatar, .chat-avatar, .deal-avatar).is-online { position: relative; overflow: visible; }
body.studio :is(.avatar, .chat-avatar, .deal-avatar).is-online > img { border-radius: 50%; }
/* лампочка яркая, с зелёным ореолом — просьба владельца 06.10; подпись «В сети» темнее лампочки, иначе на светлом фоне не читается (4,9:1) */
body.studio { --studio-online: #22c55e; --studio-online-text: #15803d; }
body.studio :is(.avatar, .chat-avatar, .deal-avatar).is-online::after { content: ""; position: absolute; right: 2%; bottom: 2%; width: clamp(8px, 25%, 14px); aspect-ratio: 1; border-radius: 50%; background: var(--studio-online); box-shadow: 0 0 0 2px var(--studio-panel), 0 0 0 4px rgba(34, 197, 94, .3); }
body.studio .online-label { color: var(--studio-online-text); font-weight: 600; }
/* ИНН заявителя и итог сверки с ФНС */
.admission-inn { margin:12px 0; padding:12px 14px; border:1px solid var(--studio-line-soft); border-radius:10px; }
.admission-row .admission-inn p { margin:4px 0; }
.admission-inn-number { font-variant-numeric:tabular-nums; user-select:all; }
.admission-fns[data-fns="rejected"] strong { color:var(--studio-urgent); }
.admission-fns-link a { color:var(--studio-accent-dark); text-underline-offset:3px; }
/* пустой живой регион не прячем через display:none — иначе читалка может не заметить появившийся текст */
.admission-row .admission-inn-note:empty { margin:0; }
/* Подсказки адреса: список внутри подписи поля, подпись — точка отсчёта */
/* в строке из двух полей сетка тянет подпись до высоты соседней — список отрывался от поля */
body.studio label:has(> [data-suggest]) { position:relative; align-self:start; }
body.studio .suggest-list { position:absolute; z-index:30; top:calc(100% + 4px); left:0; right:0; max-height:264px; margin:0; padding:6px; overflow-y:auto; overscroll-behavior:contain; list-style:none; border:1px solid var(--studio-line); border-radius:10px; background:var(--studio-panel); box-shadow:var(--studio-shadow-float); color:var(--studio-ink); font-size:14px; font-weight:400; letter-spacing:normal; text-align:left; }
body.studio .suggest-option { display:grid; gap:2px; align-content:center; min-height:44px; padding:8px 10px; border-radius:8px; cursor:pointer; overflow-wrap:anywhere; }
body.studio .suggest-option small { color:var(--studio-muted); font-size:12px; line-height:1.4; }
body.studio .suggest-option:hover { background:var(--studio-page); }
/* выбранный стрелками вариант заметнее наведённого мышью */
body.studio .suggest-option[aria-selected="true"] { background:var(--studio-selected); box-shadow:inset 0 0 0 2px var(--studio-focus); }
/* контрастная тема стирает заливку и тень — выбранный стрелками вариант системным выделением, иначе его не отличить */
@media (forced-colors: active) {
  body.studio .suggest-option[aria-selected="true"] { forced-color-adjust: none; background: Highlight; color: HighlightText; }
  body.studio .suggest-option[aria-selected="true"] small { color: HighlightText; }
}
/* Приветственный экран клиентской версии (V16), app-launch.js: 0,2 с темноты → знак ЭХО из глубины 2,6 с →
   «Недвижимости» с 2,85 с → «Добро пожаловать» с 3,85 с за 1,65 с → мягкий выход. Цвета, шрифты и тайминги — клиентские */
#launch-intro { display:none; }
html.launch-active, html.launch-active body { background:#010101; }
/* приложение под заставкой не должно ни мелькнуть, ни поймать фокус с клавиатуры */
html.launch-active body > :not(#launch-intro) { visibility:hidden; }
/* visible — заставка тоже ребёнок body: экран входа прячет всех, кроме себя, пока вход не проверен и у гостя */
html.launch-active #launch-intro { display:flex; visibility:visible; position:fixed; inset:0; z-index:2147483000; align-items:center; justify-content:center; overflow:hidden; cursor:pointer; contain:paint;
  background:radial-gradient(circle at 50% 47%, #15120d 0, #090909 30%, #040404 68%, #010101 100%); }
.launch-intro-stage { position:relative; width:min(92vw, 520px); height:min(88vh, 650px); display:flex; flex-direction:column; align-items:center; justify-content:center; perspective:1400px; transform:translateY(-1.5vh); }
.launch-intro-halo { position:absolute; width:min(76vw, 390px); aspect-ratio:1; border-radius:50%; background:radial-gradient(circle, #b58a4516 0, #8e672d0b 30%, transparent 70%); opacity:.12; transform:scale(1.02); pointer-events:none; }
.launch-intro-welcome { position:relative; z-index:4; margin-bottom:32px; color:#b88a4c; font:italic 400 clamp(25px, 6.8vw, 39px)/1.05 Georgia, "Times New Roman", serif; letter-spacing:.025em; opacity:0; text-shadow:0 1px 8px #9d71301a;
  animation:launch-welcome 1.65s cubic-bezier(.22,.61,.36,1) 3.85s forwards; }
.launch-intro-logo { position:relative; z-index:3; width:min(78vw, 390px); display:flex; flex-direction:column; align-items:center; opacity:.001; transform:translate3d(0,0,-500px) scale(.52); will-change:transform, opacity; backface-visibility:hidden;
  animation:launch-depth 2.6s cubic-bezier(.2,.64,.2,1) .2s both; }
/* фоном, а не <img>: страница просит знак, только когда заставка показана; для запуска без сети его заранее кладёт в кэш service worker */
.launch-intro-mark { width:100%; aspect-ratio:720 / 288; background:url(assets/launch-mark.webp) center / contain no-repeat; filter:drop-shadow(0 5px 12px #000c) drop-shadow(0 0 9px #b7833526); }
/* «—— Недвижимости ——» по образцу владельца 09.10: слово светлее, золотые черты расходятся от него, пока оно проявляется */
.launch-intro-title { display:flex; align-items:center; margin-top:18px; color:#d9d3ca; font:400 clamp(10px, 2.7vw, 13px)/1.2 Arial, sans-serif; letter-spacing:.8em; text-transform:uppercase; white-space:nowrap; opacity:0;
  animation:launch-fade .9s cubic-bezier(.22,.61,.36,1) 2.85s forwards; }
.launch-intro-title::before, .launch-intro-title::after { content:''; flex:none; width:2.6em; height:1px; background:#a8864f; animation:launch-line .9s cubic-bezier(.23,1,.32,1) 3.05s both; }
.launch-intro-title::before { margin-right:1.1em; transform-origin:100% 50%; }
/* разрядка стоит и после последней буквы — справа отступ меньше на неё, иначе просветы у черт разные */
.launch-intro-title::after { margin-left:.3em; transform-origin:0 50%; }
#launch-intro.is-leaving { animation:launch-exit .22s ease-out forwards; }
@keyframes launch-depth { from { opacity:.001; transform:translate3d(0,0,-500px) scale(.52); } to { opacity:1; transform:translate3d(0,0,0) scale(1); } }
@keyframes launch-fade { from { opacity:0; } to { opacity:1; } }
@keyframes launch-line { from { transform:scaleX(0); } }
@keyframes launch-welcome { from { opacity:0; } to { opacity:1; } }
@keyframes launch-exit { to { opacity:0; visibility:hidden; transform:scale(1.012); } }
@keyframes launch-fade-out { to { opacity:0; visibility:hidden; } }
@media (max-width:640px) {
  .launch-intro-stage { width:100vw; height:100svh; min-height:100vh; }
  .launch-intro-logo { width:min(80vw, 355px); }
  .launch-intro-welcome { margin-bottom:27px; font-size:clamp(24px, 7vw, 33px); }
  .launch-intro-title { margin-top:16px; font-size:10px; letter-spacing:.7em; }
  .launch-intro-title::after { margin-left:.4em; }
}
/* без наезда из глубины: фазы, их порядок и длительность те же, остаётся только проявление.
   !important — бандл при reduce глушит все анимации (animation:none!important), и заставка стояла бы пустой до запасного таймера */
@media (prefers-reduced-motion:reduce) {
  .launch-intro-logo { transform:none; animation:launch-fade 2.6s cubic-bezier(.2,.64,.2,1) .2s both !important; }
  .launch-intro-title { animation:launch-fade .9s cubic-bezier(.22,.61,.36,1) 2.85s forwards !important; }
  /* черты сразу целиком и проявляются вместе со словом */
  .launch-intro-title::before, .launch-intro-title::after { animation:none !important; }
  .launch-intro-welcome { animation:launch-welcome 1.65s cubic-bezier(.22,.61,.36,1) 3.85s forwards !important; }
  #launch-intro.is-leaving { animation:launch-fade-out .22s ease-out forwards !important; }
}

/* Волна 22, правки владельца 05.10: цена шрифтом Georgia, по две карточки в ряд на телефоне, строки «Подпись: значение» в окне объекта,
   ФИО агента — ссылка на его кабинет, кабинет агента с его объектами */
/* Georgia — как в клиентской версии, владельцу она нравится больше. На Android её нет — Gelasio со своего сервера, он повторяет её метрики */
@font-face { font-family: Gelasio; src: url('assets/fonts/gelasio-400-latin.woff2') format('woff2'); font-weight: 400; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* знака рубля нет и в Georgia — он всегда отсюда */
@font-face { font-family: Gelasio; src: url('assets/fonts/gelasio-400-latin-ext.woff2') format('woff2'); font-weight: 400; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* начертание обычное, как у клиента */
body.studio .property-card.is-api .property-price,
body.studio .detail-summary #detail-price { font-family: Georgia, Gelasio, serif; font-weight: 400; letter-spacing: 0; }
body.studio .property-card.is-api .property-price { font-size: 24px; line-height: 1.2; }
body.studio .detail-summary #detail-price { font-size: 32px; line-height: 1.15; }
/* цена за м² сразу за ценой, а не у правого края */
body.studio .property-card.is-api .property-price-row { justify-content: flex-start; column-gap: 10px; }
body.studio .detail-price-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; margin: 0; }
body.studio .detail-price-line #detail-meter { white-space: nowrap; font-variant-numeric: tabular-nums; }
body.studio .detail-published { margin: 0; color: var(--studio-muted); font-size: 13px; }

/* строки окна объекта — «Подпись: значение», как у клиента: подпись жирная, значение серое */
body.studio .detail-specs { grid-template-columns: minmax(0, 1fr); gap: 7px; font-size: 14px; }
body.studio .detail-specs > div { min-width: 0; }
body.studio .detail-specs dt { display: inline; color: var(--studio-ink); font-weight: 600; }
/* двоеточие — псевдоэлементом: в разметке подпись чистая, её же читают сценарии и читалка */
body.studio .detail-specs dt::after { content: ":"; }
body.studio .detail-specs dd { display: inline; margin: 0 0 0 .3em; color: var(--studio-muted); font-weight: 400; }
/* «Читать» в строку высотой 21 px — площадка нажатия добирает до 44 */
body.studio .detail-read { position: relative; display: inline-flex; align-items: center; gap: 3px; padding: 0; color: var(--studio-accent-dark); font-weight: 600;
  text-decoration-line: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
body.studio .detail-read::before { content: ""; position: absolute; inset: -12px -8px; }
body.studio .detail-read svg { width: 14px; height: 14px; transform: rotate(90deg); transition: transform 160ms cubic-bezier(.23, 1, .32, 1); }
body.studio .detail-read[aria-expanded="true"] svg { transform: rotate(-90deg); }
/* id весомее: style.css красит #detail-description в серый 12 px со времён прототипа */
body.studio .detail-specs #detail-description { display: block; margin: 8px 0 0; color: var(--studio-ink); font-size: 14px; line-height: 1.7; white-space: pre-line; overflow-wrap: anywhere; }

/* карточка в ленте — как у клиента: название, «Площадь:», цена, район, улица; категория, цена за м² и агент — в окне объекта
   (владелец, 06.10: с ними карточка вытягивалась). Окно открывает любая точка карточки; закладка и стрелки фото делают своё */
body.studio .property-card.is-api { cursor: pointer; }
body.studio .catalog-screen .property-card.is-api .property-info { padding-bottom: 20px; }
body.studio .catalog-screen .property-card.is-api .property-title { margin-top: 0; }
/* название — кнопка: с клавиатуры объект открывает она */
body.studio .title-link { display: block; width: 100%; padding: 0; letter-spacing: inherit; text-align: left; }
/* подпись жирная, значение серое — как строки окна объекта; двоеточие в разметке: строки короткие, читалке так проще */
body.studio .card-specs { display: grid; gap: 2px; margin: 8px 0 0; font-size: 14px; line-height: 1.5; }
body.studio .card-specs dt { display: inline; color: var(--studio-ink); font-weight: 600; }
body.studio .card-specs dd { display: inline; margin: 0; color: var(--studio-muted); overflow-wrap: anywhere; }
body.studio .catalog-screen .property-card.is-api .property-price-row { margin-top: 12px; }
body.studio .card-place { margin-top: 10px; color: var(--studio-muted); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
/* кабинет агента — <dialog>, а общее «dialog p» из бандла (13px, интерлиньяж 1.9) раздувало в нём район и улицу */
body.studio .card-place p { font-size: inherit; line-height: inherit; }
/* «пос. Знаменский» переносится целиком, а не висит «Район: пос.»; пара шире строки переносится внутри по пробелу — слово не рвётся */
body.studio .card-place .place-pair { display: inline-block; }
/* ФИО агента в окне объекта — ссылка на его кабинет: подчёркнуто всегда, на телефоне наведения нет */
body.studio .detail-agent #detail-agent-name { text-decoration-line: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); }
@media (hover: hover) and (pointer: fine) {
  body.studio .detail-agent:hover #detail-agent-name { text-decoration-color: currentColor; }
  body.studio .property-card.is-api:hover .title-link { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
}

/* Кабинет агента: шире прежней карточки коллеги — ниже профиля его объекты в три колонки */
body.studio .agent-dialog { width: min(960px, calc(100vw - 32px)); overscroll-behavior: contain; }
/* крестик едет вместе с окном: кабинет длинный, а на телефоне вокруг окна нет фона, по которому можно закрыть.
   При открытии он в углу рамки профиля, вровень с «Агент ЭХО», а не на её линии; липкий top браузер считает от паддинга окна */
body.studio .agent-dialog > .dialog-close { position: sticky; top: 10px; right: auto; z-index: 3; display: flex; margin: 36px 16px -80px auto; }
body.studio .agent-experience { margin: 4px 0 0; color: var(--studio-ink); font-size: 13px; font-weight: 500; line-height: 1.5; }
body.studio .agent-about { max-width: 68ch; }
body.studio .agent-actions { flex-wrap: wrap; }
body.studio .agent-dialog .agent-actions .button { flex: 0 1 auto; justify-content: center; }
/* «Объекты агента» надписью и крупное «Объекты» — как у клиента; рамка профиля сама отделяет раздел, линия не нужна */
body.studio .agent-objects { margin-top: 40px; }
body.studio .agent-objects > .deal-dialog-kicker { margin: 0; }
body.studio .agent-objects h3 { margin: 8px 0 20px; font-family: var(--serif); font-size: 32px; font-weight: 400; line-height: 1.15; letter-spacing: 0; }
/* фильтр по категориям — те же кнопки, что над поиском; переменные цвета там заданы на форме */
body.studio .agent-kinds { --find-line: #ddd4c4; --find-muted: #949089; min-width: 0; margin: 0 0 16px; padding: 0; border: 0; }
body.studio .agent-kinds input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; appearance: none; }
body.studio .agent-kinds span { gap: 6px; }
/* число на кремовой кнопке — темнее прежнего #949089 (тот читался бы на 2,6:1), на золотой выбранной — тёмное */
body.studio .agent-kinds small { color: #6b655c; font-size: 13px; font-variant-numeric: tabular-nums; }
body.studio .agent-kinds input:checked + span small { color: #33240f; }
/* категории видны всегда, пустая — неактивна: сразу видно, чего у агента нет */
body.studio .agent-kinds input:disabled { cursor: default; }
body.studio .agent-kinds input:disabled + span { border-color: #e8e1d5; background: transparent; box-shadow: none; color: var(--find-muted); }
body.studio .agent-kinds input:disabled + span small { color: inherit; }
/* карточки кабинета стоят внутри <dialog>: «dialog h2» из прототипа даёт названию 20 px снизу, в ленте их нет */
body.studio .agent-object-grid .property-title { margin-bottom: 0; }
body.studio .agent-objects-empty { margin: 0; color: var(--studio-muted); font-size: 14px; line-height: 1.6; }
/* лента отзывов на месте кабинета (владелец 06.10): «N отзывов» у оценки открывают её, «Назад» возвращает */
body.studio .agent-dialog:not([data-view="reviews"]) :is(.agent-feed-head, .agent-review-box, .agent-reviews) { display: none; }
body.studio .agent-dialog[data-view="reviews"] :is(.agent-profile, .agent-own-actions, .agent-objects) { display: none; }
/* крестик вровень с «Назад»; в сумме отступы нулевые — ленту он не сдвигает */
body.studio .agent-dialog[data-view="reviews"] > .dialog-close { margin-top: 20px; margin-bottom: -64px; }
body.studio .agent-count { min-height: 0; margin: -12px 0; padding: 12px 0; border: 0; background: none; color: var(--studio-muted); font: inherit; font-size: 13px; line-height: 1.3; text-align: left;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); cursor: pointer; }
@media (hover: hover) and (pointer: fine) {
  body.studio .agent-count:hover { color: var(--studio-ink); text-decoration-color: currentColor; }
}
body.studio .agent-count:focus-visible { outline: 2px solid var(--studio-focus); outline-offset: 2px; border-radius: 4px; }
body.studio .agent-feed-head { display: grid; justify-items: start; gap: 8px; margin-top: 20px; }
body.studio .agent-back { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; margin: 0 0 4px -10px; padding: 0 14px 0 6px; border: 0; border-radius: 999px; background: none; color: var(--studio-ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
body.studio .agent-back svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
@media (hover: hover) and (pointer: fine) {
  body.studio .agent-back:hover { background: var(--studio-selected); }
}
body.studio .agent-back:focus-visible { outline: 2px solid var(--studio-focus); outline-offset: 2px; }
body.studio .agent-feed-head h2 { margin: 0; font-size: 36px; line-height: 1.15; overflow-wrap: anywhere; }
body.studio .agent-feed-head h2:focus { outline: none; }
body.studio .agent-feed-head .agent-score { margin-top: 2px; }
/* свой профиль — та же карточка, что кабинет агента; ниже кнопки и цифры, как были */
body.studio .profile-head { max-width: 1120px; margin: 0 auto; padding-top: 48px; }
body.studio .profile-head > .agent-profile { margin-top: 0; }
body.studio .agent-score.is-loading { visibility: hidden; }
body.studio .profile-objects { max-width: 1120px; margin: 0 auto; }

@media (max-width: 760px) {
  /* по две карточки в ряд, как в клиентской ленте */
  body.studio .catalog-screen .property-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  body.studio .catalog-screen .property-card.is-api .property-visual > .photo-link { min-height: 0; aspect-ratio: 1; }
  /* листать фото — в окне объекта */
  body.studio .catalog-screen .property-card.is-api .photo-pager { display: none; }
  body.studio .catalog-screen .property-card.is-api .property-badges { top: 6px; left: 6px; gap: 4px; max-width: calc(100% - 12px); }
  body.studio .catalog-screen .property-card.is-api .property-visual:has(> .save-button:not([hidden])) .property-badges { max-width: calc(100% - 62px); }
  body.studio .catalog-screen .property-card.is-api .property-ownership { min-height: 22px; padding: 2px 7px; line-height: 1.25; }
  body.studio .catalog-screen .property-card.is-api .save-button { top: 6px; right: 6px; }
  body.studio .catalog-screen .property-card.is-api .property-info { padding: 10px 10px 12px; }
  body.studio .catalog-screen .property-card.is-api .property-title { font-size: 14px; line-height: 1.3; letter-spacing: -.01em; }
  /* две строки названия; max-height — на случай, если движок не даст кнопке -webkit-box */
  body.studio .catalog-screen .property-card.is-api .title-link { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; max-height: 2.6em; overflow: hidden; }
  body.studio .card-specs { gap: 0; margin-top: 5px; font-size: 12px; line-height: 1.4; }
  /* перенос — только на случай цены шире карточки: прятать часть цены многоточием нельзя */
  body.studio .catalog-screen .property-card.is-api .property-price { font-size: 18px; white-space: normal; overflow-wrap: anywhere; }
  body.studio .catalog-screen .property-card.is-api .property-price-row { margin-top: 6px; gap: 0 8px; }
  body.studio .card-place { margin-top: 5px; font-size: 12px; line-height: 1.35; }

  /* на телефоне кабинет — отдельный экран, как карта объекта */
  body.studio .agent-dialog { inset: 0; width: 100%; max-width: none; height: 100%; height: 100dvh; max-height: none; margin: 0; border-radius: 0;
    padding: calc(20px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) calc(28px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
  body.studio .agent-dialog > .dialog-close { top: calc(10px + env(safe-area-inset-top)); margin: 10px 10px -54px auto; }
  /* кнопки — на всю ширину рамки; до 480 px «Написать агенту» и «Написать отзыв» — каждая своей строкой */
  body.studio .agent-dialog .agent-actions .button { flex: 1 1 auto; }
  /* рядом с фото — имя и данные, факты и кнопки — на всю ширину под ними */
  body.studio .agent-profile { grid-template-columns: 88px minmax(0, 1fr); grid-template-areas: "kicker kicker" "aside main" "details details"; column-gap: 16px; margin-top: 0; padding: 18px 18px 20px; }
  body.studio .agent-avatar { width: 88px; height: 88px; font-size: 26px; }
  body.studio :is(.agent-main :is(h1, h2), .agent-feed-head h2) { font-size: 26px; }
  body.studio .agent-feed-head { margin-top: 0; }
  body.studio .profile-head { padding-top: 20px; }
  body.studio .agent-dialog[data-view="reviews"] > .dialog-close { margin-top: 0; margin-bottom: -44px; }
  body.studio .agent-company { margin-top: 8px; font-size: 14px; }
  body.studio .agent-logo { max-width: 88px; max-height: 44px; }
  body.studio .agent-objects { margin-top: 32px; }
  body.studio .agent-objects h3 { margin-bottom: 16px; font-size: 26px; }
}
@media (max-width: 700px) {
  body.studio .detail-summary #detail-price { font-size: 28px; }
  body.studio .detail-agent { gap: 12px; padding: 12px 14px; }
  body.studio .detail-agent .avatar.mini { width: 48px; height: 48px; font-size: 15px; }
  body.studio .detail-agent strong { font-size: 16px; }
}
@media (max-width: 370px) {
  /* на узком экране логотип отнимает место у имени — агентство и так написано строкой */
  body.studio .detail-agent-logo { display: none; }
  body.studio .catalog-screen .property-card.is-api .property-info { padding-inline: 8px; }
  body.studio .catalog-screen .property-card.is-api .property-price { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  body.studio .detail-read svg { transition: none; }
  body.studio :is(.photo-viewer, .viewer-slide img, .detail-nav, .viewer-nav, .viewer-close) { transition: none; }
}

/* Запросы покупателей (волна 38): экран в системе «Сделок» — та же шапка и рельс вкладок, запросы — карточками */
body.studio .requests-header > div { min-width: 0; }
body.studio .requests-new { flex: none; gap: 8px; width: auto; margin: 0; }
body.studio .requests-new svg { width: 16px; height: 16px; }
/* «Актуальность» делится на свои «Входящие / Исходящие» — второй рельс светлее, читается уровнем ниже */
body.studio .requests-toolbar { flex-wrap: wrap; justify-content: flex-start; gap: 10px 12px; }
body.studio .request-tabs button, body.studio .request-ask-tabs button { white-space: nowrap; }
body.studio .request-ask-tabs { border-color: var(--studio-line-soft); background: transparent; }
body.studio .request-ask-tabs button[aria-pressed="true"] { background: var(--studio-selected); box-shadow: none; }
body.studio .request-tabs span:empty, body.studio .request-ask-tabs span:empty { display: none; }
body.studio .requests-note { max-width: 680px; margin: 0 0 16px; color: var(--studio-muted); font-size: 13px; line-height: 1.6; }
body.studio .requests-note:empty { display: none; }
body.studio .request-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 12px; }
body.studio .request-list[aria-busy="true"]:empty::before { content: "Загружаем запросы…"; color: var(--studio-muted); font-size: 13px; }
body.studio .request-card { display: grid; align-content: start; gap: 6px; min-width: 0; padding: 16px 18px; border: 1px solid var(--studio-line); border-radius: var(--studio-radius-card);
  background: var(--studio-panel); cursor: pointer; transition: border-color var(--duration-quick) ease, box-shadow var(--duration-fast) var(--ease-smooth-out); }
body.studio .request-card.ask-card { cursor: default; }
body.studio .request-card.is-archived { border-color: var(--studio-line-soft); background: #f4f0e8; }
body.studio .request-card-kicker { margin: 0; color: var(--studio-accent-dark); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
body.studio .request-card h2 { margin: 0; font-family: var(--sans); font-size: 16px; font-weight: 600; line-height: 1.35; letter-spacing: -.01em; }
body.studio .request-card-open { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; overflow-wrap: anywhere; cursor: pointer; }
body.studio .request-card-open:focus-visible { outline: 2px solid var(--studio-focus); outline-offset: 3px; border-radius: 4px; }
body.studio .request-card-params { margin: 0; color: var(--studio-ink); font-size: 14px; line-height: 1.5; font-variant-numeric: tabular-nums; }
body.studio .request-card-note { margin: 0; color: var(--studio-muted); font-size: 13px; line-height: 1.5; }
body.studio .request-card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--studio-line-soft); }
body.studio .request-card-foot > .avatar.mini { width: 32px; height: 32px; background: var(--studio-selected); color: var(--studio-accent-dark); font-size: 12px; }
body.studio .request-card-who { display: grid; flex: 1 1 140px; gap: 1px; min-width: 0; margin: 0; color: var(--studio-muted); font-size: 12px; line-height: 1.4; }
body.studio .request-card-who strong { color: var(--studio-ink); font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
body.studio .request-card-matches { margin-left: auto; padding: 5px 10px; border-radius: 999px; background: #efe9de; color: var(--studio-muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
body.studio .request-card-matches.has-matches { background: var(--studio-frame); color: var(--studio-gold-bright); }
/* вопрос об актуальности: человек кнопкой открывает его карточку; аватар слева, хотя в разметке после имени */
body.studio .ask-person { display: flex; flex: 1 1 200px; align-items: center; gap: 10px; min-width: 0; min-height: 44px; margin: 0; padding: 0; border: 0; background: none;
  color: var(--studio-ink); font: inherit; text-align: left; cursor: pointer; }
body.studio p.ask-person { color: var(--studio-muted); font-size: 13px; cursor: default; }
body.studio .ask-person > .avatar { order: -1; width: 36px; height: 36px; background: var(--studio-selected); color: var(--studio-accent-dark); font-size: 12px; }
body.studio .ask-person:focus-visible { outline: 2px solid var(--studio-focus); outline-offset: 3px; border-radius: 8px; }
body.studio .ask-person-text { display: grid; gap: 1px; min-width: 0; font-size: 13px; line-height: 1.4; }
body.studio .ask-person-text strong { font-weight: 600; overflow-wrap: anywhere; }
body.studio .ask-person-text small { color: var(--studio-muted); font-size: 12px; overflow-wrap: anywhere; }
body.studio .ask-answers { display: flex; flex-wrap: wrap; gap: 8px; }
body.studio .ask-answers .button { width: auto; min-height: 44px; margin: 0; padding-inline: 16px; font-size: 13px; }
body.studio .ask-state { margin: 0 0 0 auto; color: var(--studio-muted); font-size: 12px; font-weight: 600; line-height: 1.4; }
body.studio .ask-state.is-actual { color: var(--studio-accent-dark); }

/* окно запроса: условия, автор, действия и подбор */
body.studio .request-view-dialog { width: min(680px, calc(100vw - 32px)); }
body.studio .request-view-dialog .deal-dialog-kicker { padding-right: 40px; }
body.studio .request-view-dialog h2 { padding-right: 40px; overflow-wrap: anywhere; }
body.studio .request-view-dialog h2:focus { outline: none; }
body.studio .request-view-author { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; margin-top: 16px; padding: 10px 14px;
  border: 1px solid var(--studio-line-soft); border-radius: var(--studio-radius-control); background: #f8f4ec; color: var(--studio-ink); font: inherit; text-align: left; cursor: pointer; }
body.studio .request-view-author > .avatar { order: -1; width: 40px; height: 40px; background: var(--studio-selected); color: var(--studio-accent-dark); font-size: 13px; }
body.studio .request-view-author:focus-visible { outline: 2px solid var(--studio-focus); outline-offset: 2px; }
body.studio .request-view-author-text { display: grid; gap: 1px; min-width: 0; font-size: 14px; line-height: 1.4; }
body.studio .request-view-author-text strong { font-weight: 600; overflow-wrap: anywhere; }
body.studio .request-view-author-text small { color: var(--studio-muted); font-size: 12px; overflow-wrap: anywhere; }
body.studio .request-view-params { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 0; line-height: 1.4; }
body.studio .request-view-params span { padding: 5px 10px; border-radius: 999px; background: var(--studio-selected); color: var(--studio-ink); font-size: 12px; font-weight: 600; }
body.studio .request-view-facts { display: grid; grid-template-columns: minmax(0, max-content) minmax(0, 1fr); gap: 8px 18px; margin: 18px 0 0; font-size: 13px; line-height: 1.55; }
body.studio .request-view-facts > div { display: contents; }
body.studio .request-view-facts dt { color: var(--studio-muted); }
body.studio .request-view-facts dd { margin: 0; color: var(--studio-ink); white-space: pre-line; overflow-wrap: anywhere; }
body.studio .request-view-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 20px; }
body.studio .request-view-actions .button { gap: 8px; width: auto; min-height: 44px; margin: 0; }
body.studio .request-view-actions .text-button { gap: 8px; min-height: 44px; padding-inline: 12px; }
body.studio .request-view-actions svg { width: 16px; height: 16px; }
body.studio button.text-button.request-remove { color: var(--studio-urgent); }
/* несколько кнопок — в ряд одной ширины (владелец 09.10: «Выравниваем красиво кнопки») */
body.studio .request-view-actions:not([data-count="1"]) { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-items: stretch; }
body.studio .request-view-actions:not([data-count="1"]) > * { width: 100%; justify-content: center; padding-inline: 12px; text-align: center; }
body.studio #request-view-feedback { margin: 10px 0 0; color: var(--studio-ink); font-size: 13px; }
body.studio #request-view-feedback:empty { display: none; }
body.studio .request-matches { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--studio-line-soft); }
body.studio .request-matches h3 { margin: 0; font-size: 16px; font-weight: 700; }
body.studio .request-matches h3:focus { outline: none; }
body.studio .request-matches-hint { margin: 6px 0 0; color: var(--studio-muted); font-size: 12px; line-height: 1.6; }
body.studio .request-match-list { display: grid; gap: 8px; margin-top: 14px; }
body.studio .request-match-list:empty { display: none; }
body.studio .request-match { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; border: 1px solid var(--studio-line-soft); border-radius: var(--studio-radius-control); background: var(--studio-panel); }
body.studio .request-match-open { display: grid; flex: 1 1 260px; grid-template-columns: 72px minmax(0, 1fr) auto; align-items: center; gap: 14px; min-width: 0; padding: 10px 14px 10px 10px;
  border: 0; border-radius: inherit; background: none; color: var(--studio-ink); font: inherit; text-align: left; cursor: pointer; }
body.studio .request-match-open:focus-visible { outline: 2px solid var(--studio-focus); outline-offset: -2px; }
body.studio .request-match-photo { display: grid; place-items: center; width: 72px; height: 54px; overflow: hidden; border-radius: 8px; background: var(--studio-selected); color: var(--studio-accent-dark); }
body.studio .request-match-photo img { width: 100%; height: 100%; object-fit: cover; }
body.studio .request-match-photo svg { width: 20px; height: 20px; }
body.studio .request-match-text { display: grid; gap: 2px; min-width: 0; line-height: 1.45; }
body.studio .request-match-text strong { overflow: hidden; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
body.studio .request-match-text span { font-size: 13px; font-variant-numeric: tabular-nums; }
body.studio .request-match-text small { color: var(--studio-muted); font-size: 12px; }
body.studio .request-match-score { padding: 6px 10px; border-radius: 999px; background: var(--studio-frame); color: var(--studio-gold-bright); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
body.studio .request-match-offer { flex: none; width: auto; min-height: 44px; margin: 0 10px 0 0; padding-inline: 14px; }
body.studio .request-matches-loading { margin: 0; color: var(--studio-muted); font-size: 13px; }
body.studio .request-matches-empty { display: grid; gap: 12px; margin-top: 14px; padding: 16px 18px; border: 1px dashed var(--studio-line); border-radius: var(--studio-radius-control); }
body.studio .request-matches-empty p { margin: 0; color: var(--studio-muted); font-size: 13px; line-height: 1.6; }
body.studio .request-matches-empty .button { justify-self: start; width: auto; margin: 0; }
body.studio .request-form-hint { margin: 0; color: var(--studio-muted); font-size: 12px; line-height: 1.6; }

/* «Сделки» живут в профиле — над шапкой возврат в него, как у «Пригласить коллегу» */
body.studio .deals-back { margin-top: 28px; }
body.studio .deals-back + .deals-header { padding-top: 24px; }
/* отзыв о коллеге без сделки: форма раскрывается кнопкой на месте правила */
body.studio .agent-review-start { justify-self: start; gap: 8px; width: auto; margin: 14px 0 0; }

@media (hover: hover) and (pointer: fine) {
  body.studio .request-card:not(.ask-card):hover { border-color: #a4937a; box-shadow: var(--studio-shadow-card); }
  body.studio .ask-person:hover strong, body.studio .request-view-author:hover strong { text-decoration: underline; text-underline-offset: 3px; }
  body.studio .request-match:has(.request-match-open:hover) { border-color: rgba(139, 107, 56, .5); background: #fbf8f2; }
}
@media (max-width: 760px) {
  body.studio .requests-new { margin-top: 18px; }
  body.studio .deals-back { margin-top: 16px; }
  body.studio .deals-back + .deals-header { padding-top: 18px; }
}
@media (max-width: 700px) {
  body.studio .request-view-facts { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  body.studio .request-view-facts dd + dt, body.studio .request-view-facts > div + div dt { margin-top: 10px; }
  body.studio .request-view-actions .button.primary { flex: 1 1 100%; justify-content: center; }
  /* на телефоне действие со статусом — во всю ширину, «Изменить» и «Удалить» — парой под ним */
  body.studio .request-view-actions:not([data-count="1"]) { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.studio .request-view-actions:not([data-count="1"]) > * { grid-column: 1 / -1; }
  body.studio .request-view-actions:not([data-count="1"]) > :is([data-request-edit], [data-request-edit]:not([hidden]) ~ [data-request-remove]) { grid-column: auto; }
  body.studio .request-match-open { grid-template-columns: 56px minmax(0, 1fr) auto; gap: 10px; padding: 8px 10px 8px 8px; }
  body.studio .request-match-photo { width: 56px; height: 44px; }
}
@media (max-width: 420px) {
  /* три вкладки во всю ширину; узкие поля — чтобы «Актуальность» с числом влезла в строку */
  body.studio .request-tabs, body.studio .request-ask-tabs { flex: 1 1 100%; }
  body.studio .request-tabs button, body.studio .request-ask-tabs button { flex: 1 1 auto; padding-inline: 8px; }
  body.studio .requests-new { width: 100%; justify-content: center; }
  body.studio .request-match-offer { flex: 1 1 100%; margin: 0 8px 8px; }
  body.studio .ask-state { margin-left: 0; }
  /* крупный шрифт в настройках телефона не уводит страницу вбок — третья вкладка уходит строкой ниже */
  body.studio .request-tabs { flex-wrap: wrap; }
}
@media (max-width: 350px) {
  /* на 320 три вкладки были шире экрана на 25 px: WebKit листал страницу вбок, Chrome резал «Актуальность» */
  body.studio .request-tabs { gap: 2px; }
  body.studio .request-tabs button { padding-inline: 5px; }
  body.studio .request-tabs span { margin-left: 3px; }
}
@media (prefers-reduced-motion: reduce) {
  body.studio .request-card { transition: none; }
}

/* Волна 39, правки владельца 09.10 */
/* комиссия в рублях или процентах: переключатель «₽ / %» внутри поля, как «₽» у цены */
body.studio .editor-commission { position: relative; display: grid; gap: 7px; margin-top: 16px; color: #5d5851; font-size: 12px; }
body.studio .editor-commission > label { display: block; margin: 0; }
body.studio .editor-commission-box { position: relative; }
/* !important — у полей окна правило с :not() весомее */
body.studio .editor-commission-box input { padding-right: 108px !important; }
body.studio .commission-unit { position: absolute; top: 4px; right: 4px; bottom: 4px; display: flex; gap: 2px; }
body.studio .commission-unit label { position: relative; display: flex; margin: 0; cursor: pointer; }
body.studio .commission-unit input { position: absolute; opacity: 0; pointer-events: none; }
body.studio .commission-unit span { display: grid; place-items: center; width: 46px; border-radius: 8px; color: #736b61; font: 600 15px/1 var(--sans); }
body.studio .commission-unit input:checked + span { background: #eee6d9; box-shadow: inset 0 0 0 1px #78613f; color: #2a2722; }
body.studio .commission-unit input:focus-visible + span { outline: 2px solid #9b8059; outline-offset: 1px; }
body.studio .editor-commission .field-help.is-error { color: var(--studio-urgent); }
/* «Отменить изменения» сливалась с карточкой: красный текст, рамка прежняя */
body.studio #editor-discard { color: var(--studio-urgent); }
/* Волна 41, правки владельца 09.10: все тёмные кнопки — премиум и живые, как «Пригласить коллегу» («Можем все кнопки черного
   цвета сделать такими на всей площадке и при переключении с белых на черное они тоже менялись»): тёмный градиент, золотая рамка
   градиентом, светлое золото текста, блик. Рамка — второй слой фона под прозрачной границей, так градиент повторяет скругление.
   Шапка, нижнее меню, счётчики, стрелки фото, подсказка и запись голосового, красные кнопки — прежние: блик в навигации,
   которая всегда на экране, мелькал бы без остановки, а красное должно остаться красным */
body.studio .button.primary:not(.is-danger),
body.studio .entry-submit:not(.is-danger),
body.studio .find-form .find-submit,
body.studio .network-note .text-button,
body.studio .chat-send-button:is(:enabled, :disabled),
body.studio .chat-voice-message > .chat-voice-play,
body.studio .chat-voice-retry {
  border: 1.5px solid transparent;
  background: linear-gradient(180deg, #2c241a 0%, #16120e 100%) padding-box,
    linear-gradient(115deg, #f2dba6 0%, #b08a4c 28%, #6f5328 50%, #c9a868 74%, #f0d9a2 100%) border-box;
  box-shadow: 0 10px 22px -12px rgba(23, 18, 10, .7), inset 0 1px 0 rgba(255, 236, 196, .18);
  color: #efd6a0;
}
/* у шагов правая граница теперь у каждого и заходит под соседа: у выбранного рамка замкнута, линия между шагами прежней толщины */
body.studio .property-editor-steps button:not(:last-child) { margin-right: -1px; border-right: 1px solid #d5cec3; }
body.studio .property-editor-steps button[aria-current="step"] { z-index: 1; }
/* переключатели, ставшие тёмными, — тот же вид, но граница прежней ширины: соседи и подписи не сдвигаются */
body.studio .entry-nav button[aria-current="page"],
body.studio .property-editor-steps button[aria-current="step"],
body.studio #detail-save[aria-pressed="true"],
body.studio .save-button[aria-pressed="true"] {
  border-color: transparent;
  background: linear-gradient(180deg, #2c241a 0%, #16120e 100%) padding-box,
    linear-gradient(115deg, #f2dba6 0%, #b08a4c 28%, #6f5328 50%, #c9a868 74%, #f0d9a2 100%) border-box;
  box-shadow: 0 10px 22px -12px rgba(23, 18, 10, .7), inset 0 1px 0 rgba(255, 236, 196, .18);
  color: #efd6a0;
}
body.studio .property-editor-steps button[aria-current="step"] small { color: #c9a868; }

/* блик раз в 3 с вместо 5,6 («интервал мерцания сделать почаще»), у всех кнопок разом: начало каждой анимации production-app.js
   ставит на общую сетку. Полоса под текстом и обрезана рамкой; в покое и до первого прохода её не видно */
body.studio .entry-submit:not(.is-danger),
body.studio .find-form .find-submit,
body.studio .chat-send-button:enabled,
body.studio .chat-voice-message > .chat-voice-play,
body.studio .chat-voice-retry,
body.studio .entry-nav button[aria-current="page"],
body.studio #detail-save[aria-pressed="true"] { position: relative; }
body.studio .button.primary:not(.is-danger),
body.studio .entry-submit:not(.is-danger),
body.studio .find-form .find-submit,
body.studio .network-note .text-button,
body.studio .chat-send-button:enabled,
body.studio .chat-voice-message > .chat-voice-play,
body.studio .chat-voice-retry,
body.studio .entry-nav button[aria-current="page"],
body.studio .property-editor-steps button[aria-current="step"],
body.studio #detail-save[aria-pressed="true"],
body.studio .save-button[aria-pressed="true"] { overflow: hidden; isolation: isolate; }
body.studio .button.primary:not(.is-danger)::after,
body.studio .entry-submit:not(.is-danger)::after,
body.studio .find-form .find-submit::after,
body.studio .network-note .text-button::after,
body.studio .chat-send-button:enabled::after,
body.studio .chat-voice-message > .chat-voice-play::after,
body.studio .chat-voice-retry::after,
body.studio .entry-nav button[aria-current="page"]::after,
body.studio .property-editor-steps button[aria-current="step"]::after,
body.studio #detail-save[aria-pressed="true"]::after,
body.studio .save-button[aria-pressed="true"]::after {
  position: absolute;
  inset: -80% auto -80% -38%;
  z-index: -1;
  width: 24%;
  content: "";
  opacity: 0;
  transform: rotate(16deg);
  background: linear-gradient(90deg, transparent, rgba(255, 244, 211, .4), transparent);
  animation: echo-gold-sweep 3s linear infinite;
  pointer-events: none;
}
/* ход ровный («плавнее ход световой полосы… очень быстрое мерцание», 09.10): с 48 % до конца цикла с постоянной скоростью — над кнопкой
   около секунды, а не 0,2–0,3 с рывком, разгорается и гаснет постепенно. Пауза до 48 % та же — на неё завязан SWEEP_REST в production-app.js.
   Только transform и opacity — без пересчёта раскладки на каждом кадре; конец прохода за правым краем и у квадратной закладки */
@keyframes echo-gold-sweep {
  0%, 48% { transform: translateX(0) rotate(16deg); opacity: 0; }
  60%, 78% { opacity: 1; }
  100% { transform: translateX(750%) rotate(16deg); opacity: 0; }
}
/* неактивная не зовёт нажать — без блика; у пустого поля «Отправить» значок приглушён, но виден */
body.studio :is(.button.primary, .entry-submit):disabled::after { display: none; }
body.studio .chat-send-button:disabled { color: rgba(239, 214, 160, .5); }

@media (hover: hover) and (pointer: fine) {
  body.studio .commission-unit input:not(:checked) + span:hover { background: #ece5d9; color: #2a2722; }
  /* ID не в :is() у «Отменить сделку»: он поднял бы вес всего списка */
  body.studio #editor-discard:hover { border-color: var(--studio-urgent); background: #f7ebe7; color: var(--studio-urgent); }
  body.studio .button.primary:not(.is-danger):hover,
  body.studio .entry-submit:not(.is-danger):hover,
  body.studio .find-form .find-submit:hover,
  body.studio .network-note .text-button:hover,
  body.studio .chat-send-button:enabled:hover,
  body.studio .chat-voice-message > .chat-voice-play:hover,
  body.studio .chat-voice-retry:hover {
    border-color: transparent;
    background: linear-gradient(180deg, #3a2f22 0%, #1d1812 100%) padding-box,
      linear-gradient(115deg, #f8e6bb 0%, #c29a58 28%, #80602f 50%, #d8b878 74%, #f6e3b4 100%) border-box;
    color: #f6e4bb;
  }
}
@media (prefers-reduced-motion: reduce) {
  body.studio .button.primary:not(.is-danger)::after,
  body.studio .entry-submit:not(.is-danger)::after,
  body.studio .find-form .find-submit::after,
  body.studio .network-note .text-button::after,
  body.studio .chat-send-button:enabled::after,
  body.studio .chat-voice-message > .chat-voice-play::after,
  body.studio .chat-voice-retry::after,
  body.studio .entry-nav button[aria-current="page"]::after,
  body.studio .property-editor-steps button[aria-current="step"]::after,
  body.studio #detail-save[aria-pressed="true"]::after,
  body.studio .save-button[aria-pressed="true"]::after { display: none; animation: none; }
}
/* категории — по макету владельца 09.10 («Давай так оформим главный экран»): кремовые в золотой рамке, выбранная — золотая, без блика,
   углы чуть скруглены. Рамка той же ширины, что была, и жирность не меняется — при выборе подписи и соседи не сдвигаются;
   выбранная чуть плотнее обводкой текста. Те же кнопки — у категорий в профиле и в кабинете коллеги */
body.studio .find-kinds span {
  border-color: transparent;
  border-radius: 3px;
  background: linear-gradient(180deg, #fdf8ee 0%, #f3e6d1 100%) padding-box,
    linear-gradient(135deg, #ecd5a2 0%, #b8925a 34%, #e6c991 62%, #a7824a 100%) border-box;
  box-shadow: 0 8px 14px -11px rgba(84, 60, 22, .55), inset 0 1px 0 rgba(255, 255, 255, .8);
}
body.studio .find-kinds input:checked + span {
  border-color: transparent;
  background: linear-gradient(180deg, rgba(255, 248, 230, .45) 0%, rgba(255, 248, 230, 0) 48%) padding-box,
    linear-gradient(100deg, #b48f57 0%, #d1ab6c 24%, #edcb91 48%, #d6b073 72%, #b18c55 100%) padding-box,
    linear-gradient(135deg, #f8e5b6 0%, #c69f5c 38%, #f3d9a0 66%, #ad874a 100%) border-box;
  box-shadow: 0 9px 16px -10px rgba(92, 64, 20, .6), inset 0 1px 0 rgba(255, 249, 232, .65);
  color: #1d160c;
  -webkit-text-stroke: .3px currentColor;
}
@media (hover: hover) and (pointer: fine) {
  body.studio .find-kinds input:not(:checked):not(:disabled):hover + span {
    background: linear-gradient(180deg, #fffcf6 0%, #f8eddc 100%) padding-box,
      linear-gradient(135deg, #f3dfb0 0%, #c49e62 34%, #efd49e 62%, #b48e52 100%) border-box;
  }
}

/* нижнее меню — по макету владельца 09.10 («нижние меню тоже как на картинке без переливания»): тёмная панель в золотой рамке,
   значки золотом, выбранный раздел — бронзовая плашка в золотой рамке, между разделами тонкие линии. Ни блика, ни анимаций.
   Варианты с [data-screen="chat"] — ради веса: у экрана переписки в studio.css свои цвета меню. Сплошной цвет под градиентами —
   для контрастной темы: градиенты она убирает, и без него меню стало бы прозрачным поверх карточек */
body.studio .signature-dock,
body.studio[data-screen="chat"] .signature-dock {
  border: 1.5px solid transparent;
  background: linear-gradient(180deg, #211c16 0%, #13110e 100%) padding-box,
    linear-gradient(115deg, #f2dba6 0%, #a17c44 28%, #5e4421 50%, #c3a062 74%, #efd7a1 100%) border-box #13110e;
  box-shadow: 0 14px 32px -12px rgba(18, 14, 8, .6), inset 0 1px 0 rgba(255, 236, 196, .1);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
body.studio .signature-dock button,
body.studio[data-screen="chat"] .signature-dock button {
  position: relative;
  border: 1.5px solid transparent;
  background: transparent;
  box-shadow: none;
  color: #ddd6cb;
}
body.studio .signature-dock button svg,
body.studio[data-screen="chat"] .signature-dock button svg { color: #e2c48c; }
body.studio .signature-dock button[aria-current="page"],
body.studio[data-screen="chat"] .signature-dock button[aria-current="page"] {
  background: linear-gradient(160deg, rgba(255, 238, 200, .16) 0%, rgba(255, 238, 200, 0) 55%) padding-box,
    linear-gradient(160deg, #5a4831 0%, #382d20 50%, #221c15 100%) padding-box,
    linear-gradient(115deg, #f7e3b2 0%, #b8925a 30%, #74572b 52%, #d6b577 76%, #f4dda9 100%) border-box;
  box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .75);
  color: #efd29b;
}
body.studio .signature-dock button[aria-current="page"] svg,
body.studio[data-screen="chat"] .signature-dock button[aria-current="page"] svg { color: #f1d49c; }
/* линия — посередине зазора в 4 px между разделами; у выбранного её нет, рамки хватает */
body.studio .signature-dock button + button::before {
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: -4px;
  width: 1px;
  content: "";
  background: rgba(226, 196, 140, .16);
  pointer-events: none;
}
body.studio .signature-dock button[aria-current="page"]::before,
body.studio .signature-dock button[aria-current="page"] + button::before { display: none; }
/* отклик на нажатие и наведение: свои правила меню в бандле слабее этих */
body.studio .signature-dock button:not([aria-current="page"]):active { background: rgba(226, 196, 140, .14); }
@media (hover: hover) and (pointer: fine) {
  body.studio .signature-dock button:not([aria-current="page"]):hover { background: rgba(226, 196, 140, .1); color: #f6ecd9; }
}
/* контрастная тема: рамки категорий и меню — системным цветом, выбранный раздел — системным выделением, как выбранная категория ниже */
@media (forced-colors: active) {
  body.studio .find-kinds span { border-color: ButtonText; }
  body.studio .signature-dock { border-color: CanvasText; }
  /* значки — цветом подписи: заданный цвет у svg контрастная тема не перекрашивает, золотой на белом почти не виден */
  body.studio .signature-dock button svg,
  body.studio[data-screen="chat"] .signature-dock button svg { color: inherit; }
  body.studio .signature-dock button[aria-current="page"],
  body.studio[data-screen="chat"] .signature-dock button[aria-current="page"] { forced-color-adjust: none; border-color: Highlight; background: Highlight; color: HighlightText; }
  body.studio .signature-dock button[aria-current="page"] svg,
  body.studio[data-screen="chat"] .signature-dock button[aria-current="page"] svg { color: HighlightText; }
}
/* контрастная тема Windows: градиенты и тени браузер убирает. Рамка кнопок — системным цветом кнопки (Firefox иначе рисует её серой,
   как у неактивной), выбранное — системным выделением вместе с подписями: иначе выбранная вкладка, категория, шаг и закладка
   не отличались бы от остальных. Блика там не видно — не гоняем его */
@media (forced-colors: active) {
  body.studio .button.primary:not(.is-danger),
  body.studio .entry-submit:not(.is-danger),
  body.studio .find-form .find-submit,
  body.studio .network-note .text-button,
  body.studio .chat-send-button:is(:enabled, :disabled),
  body.studio .chat-voice-message > .chat-voice-play,
  body.studio .chat-voice-retry { border-color: ButtonText; }
  body.studio .entry-nav button[aria-current="page"],
  body.studio .find-kinds input:checked + span,
  body.studio .property-editor-steps button[aria-current="step"],
  body.studio #detail-save[aria-pressed="true"],
  body.studio .save-button[aria-pressed="true"] { forced-color-adjust: none; border-color: Highlight; background: Highlight; color: HighlightText; }
  /* small в :is() — ради веса: с одной * золотое число выбранной категории в профиле (.agent-kinds … small) перебило бы */
  body.studio :is(.find-kinds input:checked + span, .property-editor-steps button[aria-current="step"]) :is(*, small) { color: HighlightText; }
  body.studio .button.primary:not(.is-danger)::after,
  body.studio .entry-submit:not(.is-danger)::after,
  body.studio .find-form .find-submit::after,
  body.studio .network-note .text-button::after,
  body.studio .chat-send-button:enabled::after,
  body.studio .chat-voice-message > .chat-voice-play::after,
  body.studio .chat-voice-retry::after,
  body.studio .entry-nav button[aria-current="page"]::after,
  body.studio .property-editor-steps button[aria-current="step"]::after,
  body.studio #detail-save[aria-pressed="true"]::after,
  body.studio .save-button[aria-pressed="true"]::after { display: none; }
}

/* окно — статичная форма (владелец 09.10: «Плавает форма эта как-то, типо влево вправо… а не как статическая форма»):
   вбок окно не прокручивается, у края не пружинит и прокрутку странице не передаёт, а страница под окном заперта.
   Место под полосу прокрутки держим, только если полоса была (класс ставит production-app.js), — иначе страница прыгала бы вбок */
body.studio dialog[open] { overflow-x: hidden; overscroll-behavior: none; }
html:has(body.studio dialog[open]) { overflow: hidden; }
html.has-scrollbar:has(body.studio dialog[open]) { scrollbar-gutter: stable; }
