/* ==========================================================================
   АртЛента — стили
   ========================================================================== */

:root {
  --bg:        #08080c;
  --bg-2:      #0e0e15;
  --surface:   #15151f;
  --surface-2: #1d1d2a;
  --surface-3: #262636;
  --line:      rgba(255,255,255,.09);
  --line-2:    rgba(255,255,255,.16);
  --text:      #f4f4f7;
  --muted:     #9494ab;
  --muted-2:   #6c6c85;

  --accent:    #7c5cff;
  --accent-2:  #ff4d8d;
  --cyan:      #25f4ee;
  --ok:        #2fd6a8;
  --warn:      #ffb020;
  --danger:    #ff4f5e;

  --grad:      linear-gradient(135deg, #7c5cff 0%, #ff4d8d 100%);
  --grad-soft: linear-gradient(135deg, rgba(124,92,255,.18), rgba(255,77,141,.18));

  --r-sm: 10px;
  --r:    16px;
  --r-lg: 22px;
  --r-xl: 30px;

  --tab-h: 62px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);

  --shadow: 0 18px 44px rgba(0,0,0,.55);
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ---------- Светлая тема ----------
   Переопределяем только переменные. Компоненты, которым нужен
   настоящий чёрный (видео, камера, превью), остаются тёмными —
   так их и надо видеть. */
[data-theme="light"] {
  --bg:        #f2f2f6;
  --bg-2:      #ffffff;
  --surface:   #ffffff;
  --surface-2: #eeeef3;
  --surface-3: #e3e3ec;
  --line:      rgba(0,0,0,.10);
  --line-2:    rgba(0,0,0,.18);
  --text:      #14141b;
  --muted:     #56566b;
  --muted-2:   #85859c;

  --accent:    #6a45f0;
  --accent-2:  #e0357c;
  --cyan:      #009e99;
  --ok:        #12a077;
  --warn:      #a86a00;
  --danger:    #d32f2f;

  --grad:      linear-gradient(135deg, #6a45f0 0%, #e0357c 100%);
  --grad-soft: linear-gradient(135deg, rgba(106,69,240,.13), rgba(224,53,124,.13));

  --shadow: 0 14px 34px rgba(20,20,40,.16);
}

/* Затемняющие подложки в светлой теме делаем мягче */
[data-theme="light"] .overlay--modal,
[data-theme="light"] .overlay--sheet {
  background: rgba(255,255,255,.62);
}
[data-theme="light"] .avatar:not([style*="background"]) { background: #d8d8e2; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* touch-action: manipulation убирает задержку в 300 мс и двойной тап-зум,
   но — в отличие от preventDefault() в обработчике touchend — не
   подавляет click. Именно поэтому кнопки не «залипали»: глобальный
   перехват гасил синтезированный click при любом втором касании.
   pan-x оставлен у горизонтальных каруселей, иначе их нельзя было бы
   листать пальцем. */
body,
button,
a,
input,
textarea,
select,
[role="button"],
.tab,
.mini-btn,
.icon-btn,
.seg__btn,
.rail-btn,
.text-btn,
.card,
.drop {
  touch-action: manipulation;
}
/* Явные свайпы в интерфейсе: горизонтальные ленты листаются пальцем */
.hscroll,
.carousel,
.gallery--h {
  touch-action: pan-x pan-y;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
}

body { overflow: hidden; }

button, input, textarea, select { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; padding: 0; }
a { color: var(--cyan); text-decoration: none; }
svg { fill: currentColor; }
img, video { display: block; max-width: 100%; }
::selection { background: var(--accent); color: #fff; }

.hidden, [hidden] { display: none !important; }

/* ---------- Предупреждение о среде ---------- */
.env-warning {
  position: fixed; left: 10px; right: 10px; top: calc(var(--safe-t) + 10px);
  z-index: 300; padding: 10px 12px; border-radius: var(--r);
  background: rgba(255,176,32,.14); border: 1px solid rgba(255,176,32,.4);
  color: #ffd591; font-size: 12px; line-height: 1.35; backdrop-filter: blur(12px);
}
.env-warning code { background: rgba(0,0,0,.4); padding: 1px 5px; border-radius: 5px; font-size: 11px; }

/* ================= ЗАСТАВКА ================= */
/* Показывается на холодном старте и сама уходит.
   Оформление намеренно сдержанное: почти чёрный фон, один металлический
   акцент, зерно и очень медленное движение. Яркая палитра прошлой версии
   выглядела как обычный промо-экран; «дорогой» эффект дают не яркость,
   а тёмная база, тонкая бликовая линия и воздух. Тема тёмная независимо
   от настроек: заставка — это обложка, а не интерфейс. */

.splash {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  /* База не плоская: тёплый чёрный с холодным подтоном снизу */
  background:
    radial-gradient(130% 90% at 50% -10%, #191030 0%, #0C0817 46%, #050409 100%),
    linear-gradient(180deg, #050409 0%, #08060F 100%);
  transition: opacity .7s ease, visibility .7s ease;
}
/* Уходящая заставка не должна перехватывать нажатия. */
.splash.is-gone { opacity: 0; visibility: hidden; pointer-events: none; }

/* Зерно. Без него большие градиенты выглядят пластиковыми: это самый
   дешёвый и самый заметный признак «дизайна из генератора». */
.splash::after {
  content: '';
  position: absolute;
  inset: -50%;
  pointer-events: none;
  opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.42'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.splash__bg { position: absolute; inset: 0; }
.splash__blob {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
}
/* Пятна не яркие: глубокий фиолет, сливовый и тёплое золото.
   Все они приглушены — работает не цвет, а медленное наложение. */
.splash__blob--a {
  width: 62vw; height: 62vw;
  top: -18vw; left: -14vw;
  opacity: .30;
  filter: blur(90px);
  background: radial-gradient(circle, #4B2273 0%, transparent 70%);
  animation: splashDrift1 22s ease-in-out infinite alternate;
}
.splash__blob--b {
  width: 56vw; height: 56vw;
  bottom: -20vw; right: -12vw;
  opacity: .26;
  filter: blur(96px);
  background: radial-gradient(circle, #6B2246 0%, transparent 70%);
  animation: splashDrift2 26s ease-in-out infinite alternate;
}
.splash__blob--c {
  width: 42vw; height: 42vw;
  top: 38%; left: 30%;
  opacity: .12;
  filter: blur(80px);
  background: radial-gradient(circle, #C9A227 0%, transparent 68%);
  animation: splashDrift3 19s ease-in-out infinite alternate;
}
@keyframes splashDrift1 { to { transform: translate3d(7vw, 5vh, 0) scale(1.12); } }
@keyframes splashDrift2 { to { transform: translate3d(-6vw, -4vh, 0) scale(1.08); } }
@keyframes splashDrift3 { to { transform: translate3d(-5vw, 6vh, 0) scale(.88); } }

/* Медленные полосы света: тонкая бликовая линия, которая проходит
   по фону. Движение почти незаметно — именно это читается как дорого. */
.splash__bg::after {
  content: '';
  position: absolute;
  top: -40%;
  left: -60%;
  width: 45%;
  height: 180%;
  background: linear-gradient(90deg, transparent, rgba(226,197,138,.055), transparent);
  transform: rotate(18deg);
  animation: splashSweep 14s ease-in-out infinite;
}
@keyframes splashSweep {
  0%, 100% { transform: translateX(0) rotate(18deg); opacity: 0; }
  35%      { opacity: 1; }
  100%     { transform: translateX(320%) rotate(18deg); opacity: 0; }
}

/* Карточки — стеклянные плашки вместо ярких прямоугольников:
   полупрозрачная заливка, волосяная рамка и слабый блик. */
.splash__cards { position: absolute; inset: 0; }
.splash__card {
  position: absolute;
  width: 84px;
  border-radius: 16px;
  opacity: 0;
  background: linear-gradient(150deg, rgba(255,255,255,.055) 0%, rgba(255,255,255,.012) 100%);
  border: 1px solid rgba(226,197,138,.14);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255,255,255,.06);
  backdrop-filter: blur(2px);
  animation: splashFloat var(--dur) ease-in forwards;
}
@keyframes splashFloat {
  0%   { opacity: 0; transform: translate3d(0, 24vh, 0) rotate(var(--r1)) scale(.86); }
  14%  { opacity: .85; }
  72%  { opacity: .6; }
  100% { opacity: 0; transform: translate3d(var(--dx), -44vh, 0) rotate(var(--r2)) scale(1.03); }
}

.splash__center {
  position: relative;
  text-align: center;
  padding: 0 24px;
  transform: translateY(-2vh);
}

/* Логотип: кольцо вместо сплошного круга, тонкое и золотое. */
.splash__mark {
  position: relative;
  width: 112px;
  height: 112px;
  margin: 0 auto 30px;
  display: grid;
  place-items: center;
  animation: splashPop 1.1s cubic-bezier(.16, .84, .28, 1) both;
}
.splash__mark img {
  width: 58px; height: 58px;
  position: relative;
  z-index: 1;
  border-radius: 13px;
  box-shadow: 0 10px 34px rgba(0, 0, 0, .6), 0 0 0 1px rgba(226,197,138,.22);
}
.splash__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(226,197,138,.18);
  border-top-color: rgba(240,218,174,.75);
  animation: splashSpin 3.4s cubic-bezier(.62, .04, .28, .96) infinite;
}
@keyframes splashPop {
  from { opacity: 0; transform: scale(.72); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes splashSpin { to { transform: rotate(360deg); } }

/* Заголовок, полоса и кнопка выхода переехали в glass.css.
   Правило простое, но стоит его проговорить: пока здесь лежала
   вторая реализация, она просачивалась в новую и ломала её.
   Полоса стояла position: absolute; left: 50% плюс
   animation: splashTitle ... both — и `both` держал конечное
   transform: translateY(0), который затирал translateX(-50%)
   из того же правила. В итоге полоса стояла не по центру.
   На заполнении висел отдельный @keyframes splashBar, который
   за 2.8 с доводил её до 100% на автопилоте, то есть настоящий
   ход загрузки не показывался вовсе. Две реализации одного
   экрана — хуже, чем одна неидеальная. */

.splash__tag {
  margin: 16px 0 0;
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(246, 241, 231, .46);
}

/* Полоска загрузки живёт в glass.css вместе с настоящим ходом
   загрузки. Здесь её больше нет намеренно: старый вариант был
   волосяной, золотой и доводился до 100% своим таймером за 2.8 с,
   независимо от того, грузилось приложение или уже зависло. */

.splash__skip {
  position: absolute;
  right: 18px;
  /* сверху отступ статус-бара: --safe-t, а не --safe-b */
  top: calc(var(--safe-t) + 16px);
  padding: 9px 16px;
  border: 1px solid rgba(246, 241, 231, .12);
  border-radius: 999px;
  background: rgba(255, 255, 255, .03);
  color: rgba(246, 241, 231, .42);
  font: 400 11px/1 inherit;
  letter-spacing: .08em;
  cursor: pointer;
}
.splash__skip:active { background: rgba(226,197,138,.1); color: rgba(246,241,231,.7); }

/* Телефон: пропорции ниже, чтобы метка не давила на экран.
   Заголовок, знак и полоса здесь больше не упоминаются: ими
   владеет glass.css, а правило из более раннего файла при равной
   специфичности всё равно проигрывает — оно было мёртвым и только
   мешало читать. Подгонка под узкий и низкий экран — там же. */
@media (max-width: 420px) {
  .splash__tag { font-size: 11px; letter-spacing: .13em; padding: 0 6px; }
  .splash__card { width: 62px; border-radius: 13px; }
  .splash__blob { filter: blur(70px); }
}

/* Очень низкие экраны — поднимаем блок, чтобы полоса не налезала */
@media (max-height: 560px) {
  .splash__center { transform: translateY(-6vh); }
}

/* Уважаем системную настройку «меньше движения» */
@media (prefers-reduced-motion: reduce) {
  .splash__blob, .splash__card, .splash__ring, .splash__title span,
  .splash__bar i, .splash__mark, .splash__title, .splash__tag, .splash__skip,
  .splash__bg::after {
    animation: none !important;
  }
  .splash__mark, .splash__title, .splash__tag, .splash__bar, .splash__skip { opacity: 1; }
  .splash__bar i { width: 100%; }
  .splash__card { display: none; }
  .splash__bg::after { display: none; }
}
/* ---------- Каркас ---------- */
.app {
  position: relative;
  width: 100%; max-width: 520px; margin: 0 auto;
  height: 100vh; height: 100dvh;
  background: var(--bg);
  overflow: hidden;
}
@media (min-width: 560px) {
  .app { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
}

.screen { position: absolute; inset: 0; display: none; flex-direction: column; }
.screen.is-active { display: flex; animation: fade .22s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.screen__scroll {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--tab-h) + var(--safe-b) + 16px);
}
.screen__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(var(--safe-t) + 14px) 16px 10px;
}
.screen__head--sticky {
  position: sticky; top: 0; z-index: 5;
  background: linear-gradient(180deg, var(--bg) 65%, transparent);
  backdrop-filter: blur(14px);
}
.screen__title { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.4px; }
.text-btn { color: var(--muted); font-size: 13px; font-weight: 600; }
.text-btn:active { opacity: .6; }
.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 50%; background: rgba(255,255,255,.08); color: var(--text);
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:active { transform: scale(.92); }

/* ---------- Таб-бар ---------- */
.tabbar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 60;
  height: calc(var(--tab-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  background: rgba(10,10,16,.82);
  backdrop-filter: blur(22px) saturate(140%);
  border-top: 1px solid var(--line);
}
/* Вкладка построена на фиксированной сетке из двух строк:
   первая строка под иконку всегда одной высоты (29px), вторая — под подпись.
   Раньше высота строки гуляла: у «Продать» иконка-кнопка выше, чем у
   остальных, и подписи висели на разной высоте. */
.tab {
  position: relative; height: 100%;
  display: grid;
  grid-template-rows: 29px auto;
  align-content: center;
  justify-items: center;
  gap: 3px;
  color: var(--muted-2); font-size: 9.5px; font-weight: 600;
}
.tab > svg {
  width: 21px; height: 21px;
  align-self: center; justify-self: center;
  transition: transform .2s var(--ease);
}
.tab > span:not(.tab__plus):not(.tab__badge) {
  line-height: 11px; height: 11px;
  display: flex; align-items: center; justify-content: center;
  white-space: nowrap;
}
.tab.is-active { color: var(--text); }
.tab.is-active > svg { transform: translateY(-1px); }
.tab:active > svg { transform: scale(.88); }
.tab__plus {
  width: 42px; height: 29px; display: grid; place-items: center; border-radius: 9px;
  align-self: center; justify-self: center;
  background: var(--grad); color: #fff; box-shadow: 0 6px 18px rgba(124,92,255,.45);
}
.tab__plus svg { width: 21px; height: 21px; }
.tab__badge {
  position: absolute; top: 5px; left: 50%; translate: 8px 0;
  min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: var(--accent-2); color: #fff; font-size: 10px; font-style: normal;
  display: grid; place-items: center; font-weight: 800;
}
.tab__badge--money { background: var(--ok); }

/* бейдж на иконке в шапке ленты */
.icon-btn { position: relative; }
.icon-btn__badge {
  position: absolute; top: -2px; right: -2px;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: var(--accent-2); color: #fff; font-size: 9.5px; font-style: normal;
  display: grid; place-items: center; font-weight: 800;
}

/* ==========================================================================
   ЛЕНТА
   ========================================================================== */

/* Фон экрана ленты берём из темы: в тёмной он почти чёрный,
   а в светлой пустое состояние и сетка должны читаться.
   Сами видео остаются чёрными — за это отвечают .card и .video-tile. */
.screen--feed { background: var(--bg); }

/* ---------- Светлая тема: точечные правки ---------- */

/* Таб-бар: в тёмной теме тёмный, в светлой — светлый */
[data-theme="light"] .tabbar { background: rgba(255,255,255,.88); }

/* Карточка кошелька всегда лежит на тёмном градиенте, поэтому текст
   на ней принудительно светлый: переменные темы здесь не работают. */
.wallet-card,
.wallet-card--dev { color: #f4f4f7; }
.wallet-card b,
.wallet-card strong,
.wallet-card .wallet-card__sum { color: #fff; }
.wallet-card span { color: #b9b9cd; }
.wallet-card .pill { color: #fff; }

.feed__head {
  position: absolute; top: 0; left: 0; right: 0; z-index: 20;
  padding: calc(var(--safe-t) + 10px) 12px 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: linear-gradient(180deg, rgba(0,0,0,.6), transparent);
  pointer-events: none;
}
.feed__head > * { pointer-events: auto; }
.feed__head .icon-btn { background: rgba(0,0,0,.35); backdrop-filter: blur(10px); }

.seg {
  display: flex; gap: 4px; padding: 4px; border-radius: 999px;
  background: rgba(0,0,0,.35); backdrop-filter: blur(12px);
}
.seg__btn { padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; color: rgba(255,255,255,.72); }
.seg__btn.is-active { background: #fff; color: #111; }

.feed {
  flex: 1; min-height: 0;
  overflow-y: scroll; overscroll-behavior-y: contain;
  scroll-snap-type: y mandatory; scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.feed::-webkit-scrollbar { display: none; }

.card {
  position: relative; height: 100%; height: 100dvh;
  scroll-snap-align: start; scroll-snap-stop: always;
  display: grid; overflow: hidden; background: var(--bg);
}
/* Само изображение/видео остаётся на тёмной подложке: так медиа
   читается в обеих темах. А вот пустая карточка берёт фон темы. */
.card__media { position: absolute; inset: 0; background: #0b0b10; }
[data-theme="light"] .card__media { background: #d9d9e4; }
.card__media img, .card__media video {
  width: 100%; height: 100%; object-fit: cover; background: #0b0b10;
}
[data-theme="light"] .card__media img,
[data-theme="light"] .card__media video { background: #d9d9e4; }
.card__stack { position: absolute; inset: 0; display: grid; }
.card__stack > * { grid-area: 1/1; opacity: 0; transition: opacity .35s var(--ease); }
.card__stack > .is-on { opacity: 1; }

.card__shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0,0,0,.55) 0%, transparent 22%, transparent 45%, rgba(0,0,0,.82) 100%),
    linear-gradient(90deg, rgba(0,0,0,.35), transparent 40%);
}

.card__bars {
  position: absolute; top: calc(var(--safe-t) + 58px); left: 10px; right: 56px;
  display: flex; gap: 4px; z-index: 12;
}
.card__bars i { flex: 1; height: 2.5px; border-radius: 2px; background: rgba(255,255,255,.28); overflow: hidden; }
.card__bars i b { display: block; height: 100%; width: 0; background: #fff; border-radius: 2px; }
.card__bars i.is-done b { width: 100%; }
.card__bars i.is-on b { animation: barfill linear forwards; }
@keyframes barfill { from { width: 0 } to { width: 100% } }

.card__info {
  position: absolute; left: 14px; right: 76px; bottom: calc(var(--tab-h) + var(--safe-b) + 14px);
  z-index: 12;
}
.author { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; overflow: hidden; flex: none;
  background: var(--grad-soft); border: 1.5px solid var(--line-2);
  display: grid; place-items: center; font-size: 15px; font-weight: 800;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--lg { width: 78px; height: 78px; font-size: 28px; }
.avatar--sm { width: 30px; height: 30px; font-size: 12px; }
/* Размер для стеклянной плашки профиля. Класса не было вовсе, и
   аватар попадал на общий размер — рядом с именем он оказывался
   либо слишком крупным, либо начинал гулять по высоте. */
.avatar--md { width: 62px; height: 62px; font-size: 21px; flex: none; }
.author__name { display: flex; align-items: center; gap: 5px; font-weight: 800; font-size: 14.5px; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.author__handle { font-size: 12px; color: rgba(255,255,255,.65); }
/* Отметка о подтверждённых правах. Красная вместо прежней голубой:
   голубая была у всех подряд и ничего не значила, теперь её выдаёт
   владелец площадки конкретным людям. */
.vbadge {
  width: 16px; height: 16px; flex: none;
  filter: drop-shadow(0 0 4px rgba(232, 56, 79, .55));
  animation: vmark 2.6s ease-in-out infinite;
}

/* Галочка сразу после ника: @ник ✓ */
.vcheck {
  width: 14px; height: 14px; flex: none;
  margin-left: 4px; vertical-align: -2px;
  filter: drop-shadow(0 0 4px rgba(232, 56, 79, .55));
  animation: vmark 2.6s ease-in-out infinite;
}
.handle {
  display: inline-flex; align-items: center;
  white-space: nowrap;
}

/* Мягкое свечение: метка «дышит», но не мигает. Частота медленная,
   иначе рядом с текстом она отвлекает и утомляет. */
@keyframes vmark {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
    filter: drop-shadow(0 0 3px rgba(232, 56, 79, .45));
  }
  50% {
    transform: scale(1.14);
    opacity: .88;
    filter: drop-shadow(0 0 8px rgba(232, 56, 79, .85));
  }
}

/* Уважаем системную настройку «меньше движения»: у человека,
   которому анимация мешает, метка остаётся, но перестаёт дышать. */
@media (prefers-reduced-motion: reduce) {
  .vbadge, .vcheck { animation: none; }
}

.card__title {
  margin: 0 0 5px; font-size: 17px; font-weight: 800; line-height: 1.25; letter-spacing: -.2px;
  text-shadow: 0 2px 10px rgba(0,0,0,.7);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card__desc {
  margin: 0 0 8px; font-size: 13px; color: rgba(255,255,255,.8); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  text-shadow: 0 1px 6px rgba(0,0,0,.7);
}
.card__desc.is-open { -webkit-line-clamp: 8; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 9px; }
.tag {
  font-size: 11px; font-weight: 700; color: rgba(255,255,255,.92);
  background: rgba(255,255,255,.13); padding: 4px 9px; border-radius: 999px;
  backdrop-filter: blur(8px);
}

.price-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.price {
  display: inline-flex; align-items: baseline; gap: 2px; padding: 7px 13px; border-radius: 12px;
  background: var(--grad); color: #fff; font-weight: 900; font-size: 17px;
  box-shadow: 0 8px 22px rgba(124,92,255,.4);
}
.price small { font-size: 10px; font-weight: 700; opacity: .85; }
/* «Печатает…» в чате. Раньше собеседник не видел ничего: человек
   набирал текст, а другой не понимал, дошло ли сообщение. */
.chat-typing {
  padding: 4px 14px 6px;
  font-size: 12px;
  color: var(--muted);
  font-style: italic;
  min-height: 18px;
}
.chat-typing::after {
  content: '';
  display: inline-block;
  width: 3px; height: 3px; margin-left: 4px;
  border-radius: 50%; background: var(--muted);
  animation: typedot 1.2s ease-in-out infinite;
}
@keyframes typedot {
  0%, 100% { opacity: .25; transform: translateY(0); }
  50%      { opacity: 1;   transform: translateY(-2px); }
}
@media (prefers-reduced-motion: reduce) {
  .chat-typing::after { animation: none; }
}

/* Отметки прочтения под своим сообщением. */
.msg__state { font-size: 10px; color: var(--muted-2); margin-left: 4px; }
.msg--read .msg__state { color: var(--ok); }

/* ---------- Люди в поиске ---------- */
.search-people { margin: 0 0 18px; }
.search-people__h {
  font-size: 12px; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; color: var(--muted-2); margin-bottom: 10px;
}
.search-people__row {
  display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px;
  scrollbar-width: thin; -webkit-overflow-scrolling: touch;
}
.spcard {
  display: flex; align-items: center; gap: 9px;
  flex: 0 0 auto; max-width: 78%;
  padding: 8px 10px; border-radius: var(--r);
  background: var(--card); border: 1px solid var(--line);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: border-color .18s ease, background .18s ease;
}
.spcard:active { background: var(--card-2); }
@media (hover: hover) { .spcard:hover { border-color: var(--accent); } }
.spcard__b { min-width: 0; display: flex; flex-direction: column; }
.spcard__b b {
  font-size: 13px; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; max-width: 110px;
}
.spcard__b i { font-style: normal; font-size: 11.5px; }
.spcard__act { margin-left: auto; }
.spcard__act .mini-btn { white-space: nowrap; }

.price--sold { background: rgba(255,255,255,.14); box-shadow: none; }
/* Бесплатная работа: зелёный, чтобы отличалась от обычной цены. */
.price--free { background: rgba(47, 214, 168, .2); color: var(--ok); box-shadow: none; }
.lic-chip {
  font-size: 10.5px; font-weight: 700; padding: 5px 9px; border-radius: 8px;
  background: rgba(0,0,0,.5); border: 1px solid var(--line-2); color: rgba(255,255,255,.85);
}

.card__rail {
  position: absolute; right: 8px; bottom: calc(var(--tab-h) + var(--safe-b) + 14px); z-index: 14;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.rail-btn {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: #fff; font-size: 10.5px; font-weight: 700; text-shadow: 0 1px 6px rgba(0,0,0,.7);
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.6));
}
.rail-btn__ic {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0,0,0,.32); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.12);
}
.rail-btn svg { width: 24px; height: 24px; }
.rail-btn:active .rail-btn__ic { transform: scale(.9); }
.rail-btn.is-on { color: var(--accent-2); }
.rail-btn.is-on svg { fill: var(--accent-2); }
.rail-btn--buy .rail-btn__ic { background: var(--grad); border-color: transparent; width: 50px; height: 50px; }
.rail-btn--buy svg { width: 25px; height: 25px; }

.card__pause {
  position: absolute; inset: 0; z-index: 10; display: grid; place-items: center;
  color: rgba(255,255,255,.85); opacity: 0; transition: opacity .2s; pointer-events: none;
}
.card.is-paused .card__pause { opacity: 1; }
.card__pause svg { width: 74px; height: 74px; filter: drop-shadow(0 4px 20px rgba(0,0,0,.6)); }

.heart-burst {
  position: absolute; z-index: 15; pointer-events: none; color: var(--accent-2);
  animation: burst .85s var(--ease) forwards; translate: -50% -50%;
}
@keyframes burst {
  0%   { opacity: 0; scale: .3; rotate: -18deg; }
  25%  { opacity: 1; scale: 1.15; rotate: 8deg; }
  60%  { opacity: 1; scale: 1; rotate: 0deg; }
  100% { opacity: 0; scale: 1.35; rotate: 0deg; }
}

.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 7px;
  font-size: 10px; font-weight: 800; letter-spacing: .2px; text-transform: uppercase;
}
.badge svg { width: 11px; height: 11px; }
.badge--pending { background: rgba(255,176,32,.16); color: var(--warn); }
.badge--verified { background: rgba(47,214,168,.16); color: var(--ok); }
.badge--rejected { background: rgba(255,79,94,.16); color: var(--danger); }
.badge--sold { background: rgba(255,255,255,.14); color: var(--muted); }

.mute-btn {
  position: absolute; right: 12px; top: calc(var(--safe-t) + 58px); z-index: 20;
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0,0,0,.4); color: #fff; backdrop-filter: blur(10px);
}
.mute-btn svg { width: 18px; height: 18px; }
.mute-btn .ico-off { display: none; }
.mute-btn.is-muted .ico-on { display: none; }
.mute-btn.is-muted .ico-off { display: block; }

.fab {
  position: absolute; right: 14px; bottom: calc(var(--tab-h) + var(--safe-b) + 18px); z-index: 30;
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  background: var(--grad); color: #fff; box-shadow: 0 12px 30px rgba(124,92,255,.5);
  animation: pulse 2.6s infinite;
}

/* Кнопка «+» в ленте. Снизу справа она закрывала колонку действий,
   а слева снизу — автора и название ролика: в карточке заняты оба
   угла. Убираем её наверх, под шапку, где ничего нет. */
.fab--feed {
  right: 14px; left: auto; bottom: auto;
  top: calc(var(--safe-t) + 104px);
  animation: none;
}

/* На «Рынке» прокрутка идёт списком, и кнопка закрывала последнюю
   работу в выдаче. Отступ снизу оставляет ей место. */
#screen-market .screen__scroll,
#screen-search .screen__scroll {
  padding-bottom: calc(var(--tab-h) + var(--safe-b) + 92px);
}
/* Кнопка добавления остаётся видимой и при наличии публикаций. */
.fab.is-hidden { display: none; }
.fab svg { width: 28px; height: 28px; }
.fab:active { transform: scale(.92); }
@keyframes pulse {
  0%,100% { box-shadow: 0 12px 30px rgba(124,92,255,.45), 0 0 0 0 rgba(124,92,255,.4); }
  55%     { box-shadow: 0 12px 30px rgba(124,92,255,.45), 0 0 0 14px rgba(124,92,255,0); }
}

/* ---------- Пустая лента / онбординг ---------- */
.welcome { padding: calc(var(--safe-t) + 74px) 16px 30px; text-align: center; }
.welcome__badge {
  width: 78px; height: 78px; margin: 0 auto 16px; border-radius: 24px;
  background: var(--grad); display: grid; place-items: center;
  box-shadow: 0 18px 44px rgba(124,92,255,.42);
}
.welcome__badge svg { width: 42px; height: 42px; color: #fff; }
.welcome h2 { margin: 0 0 8px; font-size: 25px; font-weight: 900; letter-spacing: -.5px; }
.welcome p { margin: 0 0 20px; color: var(--muted); font-size: 14px; }
.feats { display: grid; gap: 10px; text-align: left; margin-bottom: 22px; }
.feat {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px;
  border-radius: var(--r); background: var(--surface); border: 1px solid var(--line);
}
.feat__ico {
  width: 38px; height: 38px; flex: none; border-radius: 11px; display: grid; place-items: center;
  background: var(--grad-soft); color: var(--accent);
}
.feat__ico svg { width: 20px; height: 20px; }
.feat b { display: block; font-size: 14px; margin-bottom: 2px; }
.feat span { font-size: 12.5px; color: var(--muted); line-height: 1.4; }

/* ==========================================================================
   Общие элементы
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 20px; border-radius: 15px;
  font-size: 15px; font-weight: 800; letter-spacing: -.2px;
  background: var(--surface-2); color: var(--text);
  transition: transform .12s var(--ease), opacity .12s, filter .12s;
}
.btn svg { width: 19px; height: 19px; }
.btn:active { transform: scale(.975); }
.btn[disabled] { opacity: .4; pointer-events: none; }
.btn--primary { background: var(--grad); color: #fff; box-shadow: 0 10px 26px rgba(124,92,255,.34); }
.btn--ghost { background: transparent; border: 1px solid var(--line-2); color: var(--muted); }
.btn--soft { background: var(--grad-soft); color: #cdbdff; border: 1px solid rgba(124,92,255,.3); }
.btn--ok { background: rgba(47,214,168,.14); color: var(--ok); border: 1px solid rgba(47,214,168,.3); }
.btn--danger { background: rgba(255,79,94,.12); color: var(--danger); border: 1px solid rgba(255,79,94,.3); }
.btn--block { width: 100%; }
.btn--sm { height: 38px; padding: 0 14px; font-size: 13px; border-radius: 12px; }

.chip {
  padding: 7px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  background: var(--surface-2); color: var(--muted); white-space: nowrap;
  border: 1px solid transparent; transition: .15s;
}
.chip.is-active { background: rgba(124,92,255,.18); color: #c9b8ff; border-color: rgba(124,92,255,.42); }
.chip:active { transform: scale(.95); }
.chips { display: flex; gap: 8px; padding: 12px 16px 6px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.filters { display: flex; gap: 8px; padding: 8px 16px 14px; overflow-x: auto; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }

.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; background: rgba(255,255,255,.07); color: var(--muted);
}
.pill--ok { background: rgba(47,214,168,.13); color: var(--ok); }
.pill--warn { background: rgba(255,176,32,.13); color: var(--warn); }

.card-skeleton { height: 74px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.sk { background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 37%, var(--surface) 63%);
      background-size: 400% 100%; animation: sk 1.3s infinite linear; }
@keyframes sk { 0% { background-position: 100% 50% } 100% { background-position: 0 50% } }

.empty { padding: 44px 26px; text-align: center; color: var(--muted); }
.empty__ico { width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 20px; display: grid; place-items: center;
              background: var(--surface-2); color: var(--muted-2); }
.empty__ico svg { width: 28px; height: 28px; }
.empty b { display: block; color: var(--text); font-size: 16px; margin-bottom: 6px; }
.empty p { margin: 0 0 18px; font-size: 13.5px; line-height: 1.5; }

/* ==========================================================================
   Формы
   ========================================================================== */
.field { margin-bottom: 16px; }
.field__label { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.field__label b { font-size: 13px; font-weight: 700; }
.field__label span { font-size: 11.5px; color: var(--muted-2); }
.field__hint { font-size: 12px; color: var(--muted); line-height: 1.45; margin: 7px 0 0; }

.input, .textarea, .select {
  width: 100%; padding: 14px 15px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
  font-size: 15px; outline: none; transition: border-color .15s, background .15s;
  -webkit-appearance: none; appearance: none;
}
.input:focus, .textarea:focus, .select:focus { border-color: rgba(124,92,255,.6); background: var(--surface-2); }
.input::placeholder, .textarea::placeholder { color: var(--muted-2); }
.textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%239494ab'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 20px; padding-right: 40px;
}
.input--price { font-size: 22px; font-weight: 800; letter-spacing: -.5px; }

.switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 0; }
.switch__t b { display: block; font-size: 14px; }
.switch__t span { font-size: 12px; color: var(--muted); }
.switch__box {
  width: 46px; height: 27px; border-radius: 999px; background: var(--surface-3); flex: none;
  position: relative; transition: background .2s var(--ease);
}
.switch__box::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 21px; height: 21px;
  border-radius: 50%; background: #fff; transition: transform .2s var(--ease);
}
.switch.is-on .switch__box { background: var(--grad); }
.switch.is-on .switch__box::after { transform: translateX(19px); }

/* ---------- Загрузка файлов ---------- */
.drop {
  border: 1.5px dashed var(--line-2); border-radius: var(--r-lg); background: var(--surface);
  padding: 26px 18px; text-align: center; transition: .18s;
}
.drop.is-over { border-color: var(--accent); background: rgba(124,92,255,.08); }
.drop__ico {
  width: 54px; height: 54px; margin: 0 auto 12px; border-radius: 17px; display: grid; place-items: center;
  background: var(--grad-soft); color: #c9b8ff;
}
.drop__ico svg { width: 26px; height: 26px; }
.drop b { display: block; font-size: 15px; margin-bottom: 5px; }
.drop span { font-size: 12.5px; color: var(--muted); }
.drop--required { border-color: rgba(255,176,32,.45); }
.drop--required .drop__ico { background: rgba(255,176,32,.13); color: var(--warn); }

.media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.media-cell {
  position: relative; aspect-ratio: 1; border-radius: 13px; overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--line);
}
.media-cell img, .media-cell video { width: 100%; height: 100%; object-fit: cover; }
.media-cell__x {
  position: absolute; top: 5px; right: 5px; width: 24px; height: 24px; border-radius: 50%;
  background: rgba(0,0,0,.65); display: grid; place-items: center; font-size: 12px; color: #fff;
  backdrop-filter: blur(6px);
}
.media-cell__n {
  position: absolute; left: 5px; bottom: 5px; padding: 2px 7px; border-radius: 6px;
  background: rgba(0,0,0,.6); font-size: 10px; font-weight: 700;
}
.media-cell.is-cover::after {
  content: 'Обложка'; position: absolute; left: 5px; top: 5px; padding: 2px 7px; border-radius: 6px;
  background: var(--grad); font-size: 9.5px; font-weight: 800; text-transform: uppercase;
}

/* ---------- Видео-плитки ---------- */
.video-pick { display: grid; gap: 10px; margin-top: 12px; }
.video-tile {
  position: relative; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line);
  background: var(--surface); display: flex; gap: 12px; padding: 10px; align-items: center;
}
.video-tile video { width: 74px; height: 98px; object-fit: cover; border-radius: 12px; background: #000; flex: none; }
.video-tile__t { flex: 1; min-width: 0; }
.video-tile__t b { font-size: 13.5px; display: block; margin-bottom: 4px; }
.video-tile__t span { font-size: 12px; color: var(--muted); }
.rec-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--danger); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .25 } }

/* ==========================================================================
   Визард
   ========================================================================== */
.wiz {
  flex: 1; min-height: 0; display: flex; flex-direction: column;
  padding-bottom: calc(var(--tab-h) + var(--safe-b));
}
.wiz__bar { height: 3px; background: var(--surface-2); margin: 0 16px; border-radius: 3px; overflow: hidden; }
.wiz__bar i { display: block; height: 100%; width: 20%; background: var(--grad); transition: width .3s var(--ease); }
.wiz__steps {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px;
  list-style: none; margin: 0; padding: 14px 12px 4px;
}
.wiz__steps li { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--muted-2); font-size: 10px; font-weight: 700; }
.wiz__steps li b {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-2); font-size: 12px; transition: .2s var(--ease);
}
.wiz__steps li.is-active { color: var(--text); }
.wiz__steps li.is-active b { background: var(--grad); color: #fff; }
.wiz__steps li.is-done b { background: rgba(47,214,168,.2); color: var(--ok); }
.wiz__body {
  flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 12px 16px 16px;
}
.wiz__foot {
  display: flex; gap: 10px; padding: 12px 16px 14px;
  border-top: 1px solid var(--line); background: var(--bg-2);
}
.wiz__foot .btn { flex: 1; }
.wiz__foot .btn--ghost { flex: 0 0 110px; }

.step-title { margin: 4px 0 4px; font-size: 18px; font-weight: 800; letter-spacing: -.3px; }
.step-sub { margin: 0 0 16px; font-size: 13px; color: var(--muted); }

/* Плашка лимита публикаций в мастере загрузки.
   Фон — обычный --surface-2, а не color-mix: color-mix в проекте больше
   нигде не применяется и ломается на старых WebView. Акцент держим на
   рамке и тексте, они уже переключаются темой. */
.quota-note {
  margin: 0 0 14px;
  padding: 9px 12px;
  border-radius: 11px;
  border: 1px solid var(--cyan);
  background: var(--surface-2);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  text-align: center;
}
.quota-note--over { border-color: var(--danger); color: var(--danger); }

/* ---------- Итог проверки ---------- */
.score {
  display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line); margin-bottom: 14px;
}
.score__ring { position: relative; width: 68px; height: 68px; flex: none; }
.score__ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score__ring circle { fill: none; stroke-width: 6; stroke-linecap: round; }
.score__ring .tr { stroke: var(--surface-3); }
.score__ring .vl { stroke: var(--grad); transition: stroke-dashoffset 1s var(--ease); }
.score__num {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 17px; font-weight: 900;
}
.score__t b { display: block; font-size: 15px; margin-bottom: 3px; }
.score__t span { font-size: 12.5px; color: var(--muted); }

.check { display: flex; gap: 11px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.check:last-child { border-bottom: 0; }
.check__ic {
  width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-3); color: var(--muted-2); font-size: 12px; font-weight: 900; margin-top: 1px;
}
.check.is-ok .check__ic { background: rgba(47,214,168,.16); color: var(--ok); }
.check.is-fail .check__ic { background: rgba(255,79,94,.14); color: var(--danger); }
.check.is-warn .check__ic { background: rgba(255,176,32,.16); color: var(--warn); }
.check__t b { display: block; font-size: 13.5px; font-weight: 700; }
.check__t span { font-size: 12px; color: var(--muted); line-height: 1.4; }

.licence-pick { display: grid; gap: 8px; }
.lic-opt {
  display: flex; gap: 11px; padding: 13px; border-radius: 14px; background: var(--surface);
  border: 1.5px solid var(--line); align-items: flex-start; transition: .15s;
}
.lic-opt.is-on { border-color: var(--accent); background: rgba(124,92,255,.08); }
.lic-opt__radio {
  width: 19px; height: 19px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; margin-top: 1px;
  display: grid; place-items: center;
}
.lic-opt.is-on .lic-opt__radio { border-color: var(--accent); }
.lic-opt.is-on .lic-opt__radio::after { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.lic-opt b { font-size: 13.5px; display: block; }
.lic-opt span { font-size: 12px; color: var(--muted); line-height: 1.4; }

/* ==========================================================================
   Поиск
   ========================================================================== */
.search { position: relative; margin: 0 16px 4px; }
.search__ico {
  position: absolute; left: 14px; top: 50%; translate: 0 -50%;
  width: 20px; height: 20px; color: var(--muted); pointer-events: none;
}
.search__input {
  width: 100%; height: 46px; padding: 0 42px 0 42px; border-radius: 15px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
  font-size: 15px; outline: none; -webkit-appearance: none; appearance: none;
}
.search__input:focus { border-color: rgba(124,92,255,.6); background: var(--surface-2); }
.search__input::-webkit-search-cancel-button { display: none; }
.search__clear {
  position: absolute; right: 12px; top: 50%; translate: 0 -50%;
  width: 24px; height: 24px; border-radius: 50%; display: none; place-items: center;
  background: var(--surface-3); color: var(--muted); font-size: 11px;
}
.search.has-text .search__clear { display: grid; }

.search__sug {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r);
  box-shadow: var(--shadow); overflow: hidden; max-height: 60vh; overflow-y: auto;
  padding: 6px;
}
.sug__head { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px;
             color: var(--muted-2); padding: 8px 10px 5px; }
.sug {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; padding: 10px; border-radius: 10px; text-align: left; font-size: 13.5px;
}
.sug:hover, .sug:active { background: var(--surface-2); }
.sug__t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sug__k { font-size: 10.5px; color: var(--muted-2); flex: none; }
.sug__x { font-size: 12px; color: var(--muted-2); padding: 2px 6px; flex: none; }

.search-count {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 16px 2px; font-size: 12.5px; color: var(--muted);
}
.search-active { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.advanced { padding: 8px 16px 4px; }
.adv-row { display: flex; align-items: center; gap: 8px; }
.adv-btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted); font-size: 12.5px; font-weight: 700; flex: 1;
}
.adv-btn svg { width: 16px; height: 16px; }
.adv-btn.is-on { background: rgba(124,92,255,.18); color: #c9b8ff; border: 1px solid rgba(124,92,255,.35); }
.adv-views { display: flex; gap: 4px; background: var(--surface-2); padding: 3px; border-radius: 10px; }
.adv-view { width: 32px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: var(--muted-2); }
.adv-view svg { width: 16px; height: 16px; }
.adv-view.is-on { background: var(--bg-2); color: var(--text); }

.adv-panel { margin-top: 12px; padding: 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.adv-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px;
             color: var(--muted-2); margin-bottom: 8px; }
.price-range { display: flex; align-items: center; gap: 8px; }
.price-range .input { padding: 11px 13px; font-size: 14px; }
.price-range span { color: var(--muted-2); flex: none; }

mark { background: rgba(124,92,255,.32); color: #fff; border-radius: 3px; padding: 0 2px; }
.work__title mark, .work-row__title mark { background: rgba(124,92,255,.4); }

/* список вместо сетки */
.grid--list { grid-template-columns: 1fr; gap: 10px; }
.work--row {
  aspect-ratio: auto; display: flex; align-items: stretch; gap: 12px; padding: 10px;
  min-height: 128px;
}
.work--row .work__shade { display: none; }
.work--row img, .work--row video { position: static; width: 104px; height: 108px; border-radius: 11px; object-fit: cover; flex: none; }
.work--row .work__b { position: static; display: none; }
.work--row .work__tags { top: 8px; left: 8px; }
.work-row__b { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.work-row__title { font-size: 14.5px; font-weight: 800; margin-bottom: 3px; line-height: 1.25; }
.work-row__meta { font-size: 11.5px; color: var(--muted); margin-bottom: 7px; }
.work-row__tags { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 7px; }
.work-row__badges { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: auto; }
.work-row__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }

.work__sold--warn { background: rgba(255,176,32,.9); color: #1a1200; }

/* ==========================================================================
   Сетка работ
   ========================================================================== */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 0 12px 20px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.work {
  position: relative; aspect-ratio: 3/4; border-radius: 14px; overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--line);
}
.work img, .work video { width: 100%; height: 100%; object-fit: cover; }
.work__shade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,.8)); }
.work__b {
  position: absolute; left: 8px; right: 8px; bottom: 7px;
}
.work__title {
  font-size: 12.5px; font-weight: 700; margin-bottom: 3px;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.work__meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.work__price { font-size: 13px; font-weight: 900; }
.work__stat { font-size: 11px; color: rgba(255,255,255,.75); font-weight: 600; }
.work__tags { position: absolute; top: 7px; left: 7px; display: flex; gap: 5px; }
.work__vk { color: var(--cyan); width: 15px; height: 15px; }
.work__sold {
  position: absolute; top: 7px; right: 7px; padding: 3px 8px; border-radius: 6px;
  background: rgba(0,0,0,.65); font-size: 10px; font-weight: 800; text-transform: uppercase; color: #fff;
}

/* ==========================================================================
   Корзина
   ========================================================================== */
.cart-list { padding: 4px 16px 8px; display: grid; gap: 10px; }
.cart-item {
  display: flex; gap: 12px; padding: 11px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line);
}
.cart-item__img {
  width: 76px; height: 100px; border-radius: 12px; overflow: hidden; flex: none;
  background: var(--surface-2);
}
.cart-item__img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item__b { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cart-item__b b { font-size: 13.5px; line-height: 1.3; margin-bottom: 3px;
                  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cart-item__b span { font-size: 11.5px; color: var(--muted); }
.cart-item__f { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cart-item__p { font-size: 16px; font-weight: 900; }
.cart-item__x { color: var(--danger); font-size: 12px; font-weight: 700; padding: 6px 8px; border-radius: 8px; }

.cart-total {
  position: sticky; bottom: 0; margin-top: 10px; padding: 16px;
  border-top: 1px solid var(--line); background: rgba(14,14,21,.94); backdrop-filter: blur(16px);
}
.cart-total__row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.cart-total__row b { font-size: 22px; font-weight: 900; letter-spacing: -.5px; }
.cart-total__row span { font-size: 12.5px; color: var(--muted); }
.cart-total small { display: block; font-size: 11px; color: var(--muted-2); margin-bottom: 12px; }

/* ==========================================================================
   Профиль
   ========================================================================== */
/* Значок заявок на кнопке «Люди». */
.peoplebadge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--danger);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 17px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--bg);
}
.peoplebadge[hidden] { display: none; }
.prof-head__top .icon-btn { position: relative; }

/* Поиск людей слева сверху, настройки справа. Кнопки лежат поверх
   фото, поэтому им нужен свой тёмный подслой — иначе на светлой
   картинке иконки не видно. */
.prof-head__top { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.prof-head__top .icon-btn {
  background: rgba(10,10,16,.42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-color: rgba(255,255,255,.14);
}
.prof-head__h { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.prof-head__bio { font-size: 13px; color: var(--muted); max-width: 340px; margin: 0 auto 14px; line-height: 1.45; }
.prof-stats { display: flex; justify-content: center; gap: 26px; margin-bottom: 14px; }
.prof-stats div b { display: block; font-size: 17px; font-weight: 900; }
.prof-stats div span { font-size: 11.5px; color: var(--muted); }

/* ---------- Шапка профиля: фото + стеклянная плашка ---------- */

/* Фото занимает верх и уходит вниз: плашка ложится поверх него,
   а не вытесняет. */
/* Выбор своего градиента: сетка заготовок и два ручных цвета. */
.accent-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 12px;
}
.accent-sw {
  position: relative; height: 46px; border-radius: 12px; border: 2px solid transparent;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.18);
}
.accent-sw span {
  position: absolute; left: 8px; bottom: 6px; font-size: 10.5px; font-weight: 700;
  color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.7);
}
.accent-sw.is-on { border-color: var(--fg); }

.accent-own { display: flex; align-items: center; gap: 10px; }
.accent-pick { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: none; }
.accent-pick span { font-size: 10.5px; color: var(--muted); }
.accent-pick input[type="color"] {
  width: 46px; height: 34px; padding: 0; border: 1px solid var(--line);
  border-radius: 9px; background: none; cursor: pointer;
}

/* Кружок на кнопке профиля — текущий цвет человека. */
.accent-dot {
  width: 18px; height: 18px; border-radius: 50%; display: block;
  background: var(--grad);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.25);
}

/* Место под метку «в сети» справа в строке чатов. */
.chat-row__pres { flex: none; align-self: center; }
.chat-row__pres .presence { margin-top: 0; }

/* Кнопка-раздел в карточке работы: открывает комментарии отдельным
   окном. Похожа на пункт меню, но это единственное действие. */
.sec__open {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 14px 15px; text-align: left;
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface);
}
.sec__open b { display: block; font-size: 14px; }
.sec__open > span:nth-child(2) > span { font-size: 12px; color: var(--muted); }
.sec__open-ico {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  display: grid; place-items: center;
  background: var(--grad-soft); color: var(--accent);
}
.sec__open-ico svg { width: 18px; height: 18px; }

/* Окно комментариев: список растёт, поле ввода прибито к низу. */
.cw { display: flex; flex-direction: column; min-height: 0; }
.cw__under {
  font-size: 12px; color: var(--muted); padding: 0 2px 10px;
  border-bottom: 1px solid var(--line); margin-bottom: 4px;
}
.cw__list {
  flex: 1; min-height: 180px; max-height: 52vh; overflow-y: auto;
  padding: 4px 0 8px;
}
.cw__empty { font-size: 13px; color: var(--muted); text-align: center; padding: 26px 8px; }
.cw__composer {
  display: flex; gap: 8px; align-items: flex-end;
  padding-top: 10px; border-top: 1px solid var(--line);
}
.cw__composer .textarea { flex: 1; min-height: 44px; max-height: 120px; resize: none; }
.cw__send { flex: none; }

/* Аватар и имя автора в комментарии — ссылка на его профиль. */
.comment__ava { flex: none; cursor: pointer; }
.comment__name--tap { cursor: pointer; }
.comment__handle {
  font-style: normal; font-weight: 500; color: var(--muted);
  font-size: 12px; margin-left: 5px;
}

/* Загрузка видео в ленту */
.vu { padding: 12px 14px 40px; max-width: 620px; margin: 0 auto; }
.vu__stage {
  position: relative; border-radius: 16px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  margin-bottom: 16px;
}
.vu__video { display: block; width: 100%; max-height: 58vh; background: #000; }
.vu__pick {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  width: 100%; padding: 46px 20px; text-align: center;
}
.vu__pick b { font-size: 16px; font-weight: 700; }
.vu__pick > span:last-child { font-size: 12.5px; color: var(--muted); max-width: 260px; }
.vu__pick-ico {
  width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center;
  background: var(--grad); color: #fff; margin-bottom: 6px;
}
.vu__change {
  position: absolute; right: 10px; top: 10px;
  padding: 7px 13px; border-radius: 20px; font-size: 12px; font-weight: 700;
  background: rgba(0,0,0,.62); color: #fff; backdrop-filter: blur(6px);
}
.vu__note {
  font-size: 12px; color: var(--muted); line-height: 1.45;
  margin: 4px 0 18px; padding: 11px 13px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--line);
}

/* Числа профиля приходят с сервера. Пока счётчик не приехал,
   показываем тире, а не ноль: ноль читается как «у него ничего
   нет», и человек успевал на это посмотреть. */
.glass__stats > div[data-pending] b { opacity: .45; }

/* Метка присутствия: зелёная точка с мягким свечением и слова.
   В плотном списке людей второстепенно «был 3 часа назад» —
   там важно, открыт ли человек прямо сейчас. */
.presence {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-style: normal; color: var(--muted-2);
  white-space: nowrap; margin-top: 2px;
}
.presence__dot {
  width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: var(--muted-2); opacity: .55;
}
.presence.is-on { color: #35d07f; }
.presence.is-on .presence__dot {
  background: #35d07f; opacity: 1;
  box-shadow: 0 0 0 3px rgba(53,208,127,.18);
  animation: presence-pulse 2.2s ease-in-out infinite;
}
@keyframes presence-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(53,208,127,.18); }
  50%      { box-shadow: 0 0 0 6px rgba(53,208,127,.06); }
}

/* В плотном списке оставляем только точку. */
.presence.is-short .presence__txt { display: none; }

/* Свой градиент человека. Цвета приходят в переменные на экране
   профиля (см. A.util.applyAccent), поэтому красится только он,
   а не весь интерфейс. */
.prof-theme {
  --btn-ink: var(--accent-ink, #fff);
}

/* Тени у кнопок были зашиты фиолетовым цветом и к тому же
   раскинуты широко: 26–30px размытия с плотностью .34–.45
   давали ореол вокруг каждой кнопки. В профиле этого больше
   нет — тень короткая и слабая, цвет берётся из переменной
   человека, а при отсутствии остаётся прежняя фиолетовая. */
.prof-theme .btn,
.prof-theme .btn--primary,
.prof-theme .price,
.prof-theme .wallet-card--tap,
.prof-theme .welcome__badge {
  box-shadow: 0 3px 10px var(--accent-glow, rgba(124,92,255,.2));
}
.prof-theme .btn { color: var(--btn-ink); }
/* Мягкая кнопка берёт цвет человека текстом и рамкой. Тег
   «Разработчик» намеренно не перекрашиваем: у него своя заливка
   и жёлтая пульсирующая точка, он должен оставаться читаемым
   при любом градиенте. */
.prof-theme .btn--soft { color: var(--accent); border-color: rgba(255,255,255,.16); }

/* Плашка плашки-подложки под фотографией тоже берёт цвет человека. */
.prof-theme .glass { border-color: rgba(255,255,255,.18); }

/* Шапка профиля. Раньше здесь была отдельная полоса с фото на всю
   ширину экрана (prof-head__bg) и затемнение поверх неё. В профиле
   обе убраны: картинка переехала на саму стеклянную плашку, где она
   обрезается по форме панели и не занимает пол-экрана. Стили оставлены
   — они ещё нужны шапке страницы работы. */
.prof-head { padding: calc(var(--safe-t) + 12px) 14px 18px; text-align: center; position: relative; }

.prof-head__bg {
  position: absolute; inset: 0 0 auto; height: 250px; z-index: -2;
  background: var(--grad);
  background-size: cover;
  background-position: center;
}

/* Затемнение и размытие поверх фото.
   Без него данные на плашке не читаются: на светлой картинке белый
   текст пропадает, на тёмной — пропадает само фото. */
.prof-head__veil {
  position: absolute; inset: 0 0 auto; height: 250px; z-index: -1;
  background:
    linear-gradient(180deg, rgba(8,8,12,.55) 0%, rgba(8,8,12,.35) 40%, rgba(8,8,12,.92) 88%, var(--bg) 100%);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
}

/* Сама плашка. backdrop-filter даёт матовое стекло: сквозь неё
   видно размытое то, что под ней. overflow:hidden обязателен — он
   обрезает картинку фона точно по скруглённому контуру панели,
   иначе фото вылезало бы за углы прямоугольником. */
.glass {
  position: relative;
  overflow: hidden;
  margin: 8px auto 14px;
  max-width: 420px;
  padding: 16px 16px 14px;
  border-radius: 22px;
  background: linear-gradient(150deg, rgba(255,255,255,.14), rgba(255,255,255,.06));
  border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 10px 30px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.14);
  text-align: left;
}

/* Фон плашки — картинка человека. Слой внутри .glass, поэтому
   overflow:hidden выше обрезает её по форме панели.
   Минус единица: inset:0 отсчитывается от внутреннего края рамки,
   и картинка не доходила до скругления, оставляя светлую полосу
   по всему периметру. Растягиваем слой под саму рамку. */
.glass__bg {
  position: absolute; inset: -1px; z-index: 0; pointer-events: none;
  background-size: cover;
  background-position: center;
}

/* Затемнение между картинкой и текстом. Ник у модератора тёмно-красный
   и на светлой картинке пропадал, поэтому прижимаем фон сильнее, чем
   для обычного белого текста. */
.glass__tint {
  position: absolute; inset: -1px; z-index: 1; pointer-events: none;
  background: linear-gradient(165deg, rgba(9,9,13,.52), rgba(9,9,13,.74));
}

/* Всё, что не картинка и не затемнение, идёт поверх. */
.glass > *:not(.glass__bg):not(.glass__tint) { position: relative; z-index: 2; }

/* Блик по верхней кромке — стекло читается объёмным. */
.glass::before {
  content: '';
  position: absolute; left: 16px; right: 16px; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent);
}

.glass__top { display: flex; align-items: center; gap: 14px; }
.glass__ava { flex: none; }
.glass__id { min-width: 0; flex: 1; }
.glass__name {
  margin: 0; font-size: 19px; font-weight: 900; letter-spacing: -.3px;
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
}
/* Ник на профильной панели. Раньше цвет был зашит белым, и в
   светлой теме панель становилась светлой — ник оказывался белым
   по белому, контраст 1:1, то есть его не было видно совсем.
   Берём приглушённый цвет темы: в тёмной он светлый и читается на
   тёмном стекле, в светлой — тёмный и читается на светлом. */
.glass__handle { margin-top: 4px; font-size: 13px; color: var(--muted); }
.glass__bio {
  margin: 13px 0 0; font-size: 13px; line-height: 1.5;
  color: rgba(255,255,255,.82); white-space: pre-wrap;
}
.glass__stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
  margin-top: 15px; padding-top: 13px;
  border-top: 1px solid rgba(255,255,255,.12);
  text-align: center;
}
.glass__stats b { display: block; font-size: 16px; font-weight: 900; }
.glass__stats span { font-size: 10.5px; color: rgba(255,255,255,.6); }

/* Фолбэк для старых браузеров: плашка остаётся видимой даже
   без backdrop-filter, просто не просвечивает. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: rgba(20,20,28,.86); }
  .prof-head__veil { background: linear-gradient(180deg, rgba(8,8,12,.6) 0%, rgba(8,8,12,.5) 40%, rgba(8,8,12,.95) 88%, var(--bg) 100%); }
}

.sec { padding: 4px 16px 18px; }
.sec__h { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 12px; }
.sec__h b { font-size: 15px; font-weight: 800; }
.sec__h span { font-size: 12px; color: var(--muted); }

/* Подзаголовок внутри «Моих работ»: отделяет товары от видео,
   чтобы в одном списке не лежало два разных вида без разницы. */
.sec__h--sub { margin: 16px 0 8px; }
.sec__h--sub b { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

.menu { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.menu__i {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 15px; text-align: left;
  border-bottom: 1px solid var(--line);
}
.menu__i:last-child { border-bottom: 0; }
.menu__ico { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
             background: var(--surface-2); color: var(--muted); flex: none; }
.menu__ico svg { width: 17px; height: 17px; }
.menu__i b { font-size: 14px; font-weight: 600; display: block; }
.menu__i span { font-size: 12px; color: var(--muted); }
.menu__i .chev { margin-left: auto; color: var(--muted-2); width: 18px; height: 18px; }
.menu__i:active { background: var(--surface-2); }

.my-work {
  display: flex; gap: 11px; padding: 11px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line); margin-bottom: 9px;
}
.my-work__img { width: 66px; height: 88px; border-radius: 12px; overflow: hidden; flex: none; background: var(--surface-2); }
.my-work__img img { width: 100%; height: 100%; object-fit: cover; }
.my-work__b { flex: 1; min-width: 0; }
.my-work__b b { font-size: 13.5px; display: block; margin-bottom: 4px;
                display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.my-work__row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.my-work__actions { display: flex; gap: 6px; }
.mini-btn {
  padding: 6px 10px; border-radius: 9px; font-size: 11.5px; font-weight: 700;
  background: var(--surface-2); color: var(--muted);
}
.mini-btn--ok { background: rgba(47,214,168,.13); color: var(--ok); }
.mini-btn--warn { background: rgba(255,176,32,.13); color: var(--warn); }
.mini-btn--danger { background: rgba(255,79,94,.12); color: var(--danger); }

.lic-card {
  display: flex; gap: 12px; padding: 12px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line); margin-bottom: 9px; align-items: center;
}
.lic-card__i { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
               background: var(--grad-soft); color: #c9b8ff; flex: none; }
.lic-card__i svg { width: 22px; height: 22px; }
.lic-card b { font-size: 13px; display: block; }
.lic-card span { font-size: 11.5px; color: var(--muted); display: block; line-height: 1.45; }
.lic-card--bad { border-color: rgba(255,79,94,.4); background: rgba(255,79,94,.06); }

/* ---------- Согласие с политикой ---------- */
.consent {
  display: flex; gap: 10px; align-items: flex-start; margin-top: 16px;
  padding: 12px 13px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line);
  font-size: 12.5px; line-height: 1.5; color: var(--muted); cursor: pointer;
}
.consent input {
  flex: none; width: 18px; height: 18px; margin: 0; accent-color: #7c5cff; cursor: pointer;
}
.consent a { color: var(--cyan); text-decoration: underline; }
.consent b { color: var(--text); }

/* ---------- Настройки: группы ---------- */
.set-group { margin-bottom: 16px; }
.set-group:last-child { margin-bottom: 0; }
.set-group__h {
  font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
  color: var(--muted-2); padding: 0 4px 8px;
}

/* ---------- Кошелёк в профиле: карточка-вход ---------- */
.wallet-card--tap {
  cursor: pointer; text-align: left; width: 100%;
  transition: transform .16s var(--ease), box-shadow .16s var(--ease);
}
.wallet-card--tap:active { transform: scale(.985); }
.wallet-card__go {
  width: 30px; height: 30px; border-radius: 10px; flex: none;
  display: grid; place-items: center;
  background: rgba(255,255,255,.16); color: #fff;
}
.wallet-card__hint {
  margin-top: 12px; padding-top: 11px;
  border-top: 1px solid rgba(255,255,255,.14);
  font-size: 12.5px; color: #b9b9cd;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.wallet-card__hint::after { content: '›'; font-size: 18px; line-height: 1; color: #fff; }

@media (min-width: 2600px) { /* высокие экраны телефонов */
  .wallet-card__sum { letter-spacing: -1px; }
}

/* ---------- Модерация ---------- */
.adm-tabs {
  display: flex; gap: 6px; padding: 10px 16px;
  position: sticky; top: 0; z-index: 2;
  background: var(--bg-2); border-bottom: 1px solid var(--line);
}
.adm-tab {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  padding: 8px 4px; border-radius: 10px; border: 1px solid var(--line);
  background: transparent; color: var(--muted);
  font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.adm-tab.is-active { background: var(--grad-soft); color: var(--accent); border-color: rgba(124,92,255,.4); }
.adm-tab__n {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--accent); color: #fff;
  font-size: 10.5px; line-height: 18px; text-align: center;
}
.adm-body { padding: 14px 16px 28px; display: flex; flex-direction: column; gap: 12px; }
.adm-card {
  padding: 13px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line);
}
.adm-card--warn { border-color: rgba(255,176,32,.4); background: rgba(255,176,32,.06); }
.adm-card__head { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }
.adm-card__meta { font-size: 11.5px; color: var(--muted-2); margin-top: 7px; }
.adm-card__act { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }

/* ---------- Общий раздел: новости и сообщения ---------- */
.board-compose {
  margin: 0 16px 16px; padding: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
}
.board-modes { display: flex; gap: 6px; margin-bottom: 10px; }
.board-modes .seg__btn { flex: 1; }
.pin-row {
  display: flex; align-items: center; gap: 8px;
  margin-top: 10px; font-size: 12.5px; color: var(--muted); cursor: pointer;
}
.pin-row input { width: 17px; height: 17px; margin: 0; accent-color: var(--accent); }

.board-list { padding: 0 16px 24px; display: flex; flex-direction: column; gap: 12px; }
.bcard {
  padding: 14px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line);
}
.bcard--news { border-color: rgba(124,92,255,.42); background: var(--grad-soft); }
.bcard--hidden { opacity: .72; border-style: dashed; }
.bcard__pin {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
  color: var(--accent); margin-bottom: 8px;
}
.bcard__pin--warn { color: var(--warn); }
.bcard__head { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }
.bcard__ava {
  width: 32px; height: 32px; border-radius: 10px; flex: none;
  display: grid; place-items: center;
  background: var(--grad); color: #fff; font-size: 12px; font-weight: 700;
}
.bcard__who { flex: 1; min-width: 0; }
.bcard__who b { display: block; font-size: 13.5px; }
.bcard__who i { font-style: normal; font-size: 11.5px; color: var(--muted-2); }
/* Блок автора в ленте и поиске открывает профиль. Вид курсора и
   приглушение подсказывают это: без них блок выглядит как обычный
   текст, и человек не знает, что на него можно нажать. */
.author--tap { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.author--tap .avatar { transition: transform .18s ease, box-shadow .18s ease; }
.author--tap:active .avatar { transform: scale(.94); }
@media (hover: hover) {
  .author--tap:hover .avatar { box-shadow: 0 0 0 2px var(--accent); }
}

.bcard__badge {
  font-size: 10px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
  padding: 3px 8px; border-radius: 20px;
  background: rgba(124,92,255,.18); color: var(--accent);
}
.bcard__title { font-size: 15px; font-weight: 800; margin: 0 0 6px; letter-spacing: -.2px; }
.bcard__text { font-size: 13.5px; line-height: 1.55; color: var(--text); margin: 0; }
.bcard__act { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }

/* ---------- Запись видео ---------- */
.rec { position: relative; border-radius: var(--r); overflow: hidden; background: #000; }
.rec__view { width: 100%; aspect-ratio: 9/16; object-fit: cover; display: block; max-height: 46vh; }
.rec__hint { font-size: 12px; color: var(--muted); padding: 10px 12px 0; line-height: 1.4; }
.rec__time {
  position: absolute; top: 10px; left: 10px; padding: 4px 10px; border-radius: 8px;
  background: rgba(0,0,0,.6); font-family: Consolas, monospace; font-size: 13px; font-weight: 700; color: #fff;
}
.rec__dot { position: absolute; top: 12px; right: 12px; width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.35); }
.rec__dot.is-on { background: var(--danger); animation: blink 1s infinite; }

/* ---------- Разрешения ---------- */
.perm { display: flex; gap: 12px; align-items: flex-start; padding: 13px 0; border-bottom: 1px solid var(--line); }
.perm:last-child { border-bottom: 0; }
.perm__ico {
  width: 38px; height: 38px; border-radius: 12px; flex: none; display: grid; place-items: center;
  background: var(--grad-soft); color: #c9b8ff;
}
.perm__b { flex: 1; min-width: 0; }
.perm__b b { display: block; font-size: 14px; margin-bottom: 4px; }
.perm__b i { display: block; font-size: 12px; color: var(--muted); font-style: normal; line-height: 1.4; margin-bottom: 7px; }
.perm__meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.perm__need { font-size: 10.5px; color: var(--muted-2); }
.perm > .mini-btn { flex: none; align-self: center; }

/* ---------- Вход через соцсети ---------- */
.auth-box { display: grid; gap: 8px; }
.auth-btn {
  justify-content: flex-start; gap: 10px; background: var(--surface);
  border: 1px solid var(--line-2); color: var(--text); font-weight: 700;
}
.auth-btn:active { transform: scale(.98); }
.auth-btn svg { flex: none; }
.auth-btn--vk { border-color: rgba(0,119,255,.35); }

/* Полноэкранный вход до входа в приложение. Перекрывает всё приложение
   и не закрывается нажатием вне формы: это не лист, а дверь. */
.authgate {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--safe-t) + 16px) 18px calc(var(--safe-b) + 16px);
  overflow-y: auto;
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(106,69,240,.28), transparent 62%),
    radial-gradient(90% 60% at 110% 110%, rgba(224,53,124,.18), transparent 60%),
    var(--bg);
}
.authgate__box {
  width: 100%;
  max-width: 400px;
  margin: auto;
}
.authgate__logo {
  display: block;
  width: 66px;
  height: 66px;
  margin: 0 auto 14px;
  border-radius: 19px;
}
.authgate__t {
  margin: 0;
  text-align: center;
  font-size: 27px;
  font-weight: 800;
  letter-spacing: .01em;
}
.authgate__s {
  margin: 7px 0 4px;
  text-align: center;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--muted);
}
.authgate__forms {
  margin-top: 10px;
}
.authgate__note {
  margin: 16px 0 0;
  text-align: center;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted-2);
}

/* ---------- несколько аккаунтов ---------- */

.acclist { margin-top: 16px; }
.acclist__h {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
  padding-left: 2px;
}
.acc {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.acc:hover { border-color: var(--line-2); background: var(--surface-2); }
.acc__ava {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.acc__ava img { width: 100%; height: 100%; object-fit: cover; }
.acc__ava--plus {
  background: transparent;
  border: 1px dashed var(--line-2);
  color: var(--muted);
  font-size: 23px;
  font-weight: 300;
}
.acc__b { flex: 1; min-width: 0; }
.acc__b b { display: block; font-size: 14.5px; font-weight: 700; }
.acc__b i { font-style: normal; font-size: 12px; color: var(--muted); }
.acc__go { flex: none; width: 18px; height: 18px; fill: var(--muted-2); }
.acc__act { flex: none; margin-left: auto; }

/* Тег «Разработчик» после ника владельца площадки.
   Виден всем, поэтому заметный: живая точка, мягкое свечение и
   лёгкое дыхание фона. Движение отключается для тех, кто просил
   меньше анимации: prefers-reduced-motion. */
.devtag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  vertical-align: middle;
  margin-left: 8px;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .02em;
  white-space: nowrap;
  color: #ffe9b8;
  background: linear-gradient(120deg, rgba(255, 199, 89, .22), rgba(224, 53, 124, .18));
  border: 1px solid rgba(255, 199, 89, .45);
  box-shadow: 0 0 0 rgba(255, 199, 89, 0);
  animation: devtag-breathe 2.8s ease-in-out infinite;
}
.devtag__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffc759;
  box-shadow: 0 0 8px rgba(255, 199, 89, .9);
  animation: devtag-pulse 2.8s ease-in-out infinite;
}
@keyframes devtag-breathe {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 199, 89, .28); }
  50%      { box-shadow: 0 0 12px 1px rgba(255, 199, 89, .22); }
}
@keyframes devtag-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .55; transform: scale(.78); }
}
@media (prefers-reduced-motion: reduce) {
  .devtag, .devtag__dot { animation: none; }
}

/* Аватар в профиле человека — крупный, как в своём профиле */
.pfava {
  width: 84px;
  height: 84px;
  margin: 0 auto 10px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-size: 30px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 22px rgba(0, 0, 0, .3);
}
.pfava img { width: 100%; height: 100%; object-fit: cover; }
.prof-note {
  margin: 10px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--muted-2);
}

/* ---------- люди: друзья, профиль ---------- */

/* Плитка работы в чужом профиле: кадр, название и цена. */
.grid--2 { grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 0; }
.tile {
  display: block;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  overflow: hidden;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, transform .12s;
}
.tile:active { transform: scale(.985); }
.tile:hover { border-color: var(--line-2); }
.tile img, .tile__ph {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--surface-2);
}
.tile__t {
  display: block;
  padding: 7px 9px 0;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tile__p {
  display: block;
  padding: 1px 9px 8px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--accent);
}

/* Ник модератора площадки — переливающийся красный градиент.
   Раньше роль показывалась отдельным тегом «Модерация», потом
   градиентом шло имя, а теперь он идёт по самому нику — вместе с
   красной галочкой прав акцент читается в одной строке.

   Палитра: алый → тёмно-бордовый и обратно. Градиент короткий и
   без пятен между цветами: нике нужно читать, а не созерцать. */

/* Запасной вариант — просто красный текст. Если браузер не умеет
   красить текст градиентом, ник останется читаемым, а не исчезнет:
   без этой строки text-fill-color:transparent сделал бы его невидимым. */
.rolename {
  color: #ff2d55;
  background-image: linear-gradient(
    90deg,
    #ff2d55 0%, #c8102e 22%, #8a0a1f 42%,
    #ff2d55 58%, #9c0d22 78%, #ff2d55 100%
  );
  background-size: 260% 100%;
  animation: neonflow 7s linear infinite;
}

/* Прозрачная заливка включается только если обрезка по тексту
   поддерживается — тогда вместо букв виден бегущий градиент. */
@supports (-webkit-background-clip: text) or (background-clip: text) {
  .rolename {
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }
}

@keyframes neonflow {
  0%   { background-position: 0% 50%; }
  100% { background-position: 260% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .rolename { animation: none; }
}

/* Теги ролей у человека. Модерация — красный неон, VIP — золото. */

/* Тег модератора: маленький, красный, со свечением.
   Раньше был фиолетовым и по размеру не отличался от остальных тегов,
   а рядом с красной галочкой прав выглядел вторым одинаковым значком.
   Теперь он явно меньше и светится, поэтому глаз сразу видит, где
   галочка, а где роль. */
.bcard__badge--mod {
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: .6px;
  padding: 2px 7px;
  border-radius: 20px;
  background: rgba(232, 56, 79, .13);
  color: #ff6b7d;
  border: 1px solid rgba(232, 56, 79, .32);
  text-shadow: 0 0 6px rgba(232, 56, 79, .85);
  animation: neonmod 2.2s ease-in-out infinite;
}

/* Неон: свечение мягко усиливается и затухает. Градиент не используем —
   он в анимации перерисовывается целиком и заметно грузит телефон,
   поэтому меняем только прозрачность и размытие тени. */
@keyframes neonmod {
  0%, 100% {
    box-shadow: 0 0 5px rgba(232, 56, 79, .35), inset 0 0 4px rgba(232, 56, 79, .16);
    text-shadow: 0 0 5px rgba(232, 56, 79, .7);
    border-color: rgba(232, 56, 79, .32);
  }
  50% {
    box-shadow: 0 0 13px rgba(232, 56, 79, .7), inset 0 0 9px rgba(232, 56, 79, .38);
    text-shadow: 0 0 11px rgba(232, 56, 79, 1);
    border-color: rgba(232, 56, 79, .62);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bcard__badge--mod { animation: none; }
}

.bcard__badge--vip {
  background: rgba(255, 199, 89, .18);
  color: #ffc759;
}
/* Значки ролей и кнопки действий стояли с margin-left:auto оба.
   Свободное место делилось между двумя auto-отступами, и значок
   уезжал в середину строки прямо на ник — он и лежал поверх
   текста. Теперь отступ только у кнопок, а значки живут внутри
   колонки с именем и переносятся по строкам. */
.menu__tags {
  display: flex; gap: 5px; flex-wrap: wrap;
  max-width: 100%; margin: 3px 0 2px;
}
.menu__act { display: flex; gap: 6px; margin-left: auto; flex: none; }
.menu__act .mini-btn { pointer-events: auto; }

/* Имя и ник внутри строки обязаны уметь сжиматься: без min-width:0
   длинный ник не обрезается, выходит за пределы своей колонки и
   рисуется поверх значков напротив. Обрезается только ник —
   значкам и переносы нужны целиком. */
.menu__main > span { min-width: 0; flex: 1; }
.menu__main > span b,
.menu__main > span > span:not(.menu__tags) {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.prof__head { display: flex; align-items: center; gap: 13px; margin-bottom: 10px; }

/* Аватар в профиле крупный: это первое, на что смотрят. Пока его
   не было вовсе — только инициалы в строке списка. */
.prof__ava {
  flex: none;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 4px 16px rgba(0, 0, 0, .22);
}
.prof__ava img { width: 100%; height: 100%; object-fit: cover; }
.prof__id { min-width: 0; }
.prof__id b { display: block; font-size: 19px; font-weight: 800; line-height: 1.25; }
.prof__id i { font-size: 13px; color: var(--muted); font-style: normal; }
.prof__bio { margin: 12px 0; font-size: 13.5px; line-height: 1.5; color: var(--text); }
.prof__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 14px 0 4px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.prof__stats > div { text-align: center; }
.prof__stats b { display: block; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.prof__stats span { font-size: 11.5px; color: var(--muted); }
.prof__act { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.prof__act .btn { flex: 1 1 132px; justify-content: center; }

/* Строка списка делится на кликабельную часть и кнопки действий:
   раньше всё было одной кнопкой, и кнопки внутри неё не работали. */
.menu__main {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.menu__i .bcard__ava { flex: none; }

/* ---------- чат: вложения ---------- */

/* Кнопки слева и справа от поля ввода. Уже в .composer, но здесь
   размер под палец — 40px минимум. */
.composer__act {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color .15s, background .15s;
}
.composer__act svg { width: 21px; height: 21px; fill: currentColor; }
.composer__act:hover { color: var(--text); background: var(--surface-2); }
.composer__act:disabled { opacity: .4; }

.msg__img {
  display: block;
  width: 100%;
  max-width: 240px;
  border-radius: 10px;
  margin-bottom: 5px;
}
.msg__file, .msg__voice, .msg__geo {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  margin-bottom: 4px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .09);
  color: var(--text);
  font-size: 13px;
  text-decoration: none;
  border: 0;
  font-family: inherit;
}
.msg__file svg, .msg__voice svg, .msg__geo svg { width: 19px; height: 19px; fill: currentColor; flex: none; }
.msg__file b { display: block; font-weight: 600; }
.msg__file i { font-style: normal; font-size: 11.5px; color: var(--muted); }
.msg__voice { cursor: pointer; }
.msg__voice:active { background: rgba(255, 255, 255, .16); }
.msg__cap { display: block; margin-top: 4px; font-size: 13px; opacity: .92; }

/* ---------- голосовое ---------- */

.vr { text-align: center; padding: 10px 0 4px; }
.vr__pulse {
  width: 74px;
  height: 74px;
  margin: 6px auto 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, var(--accent-2), var(--accent));
  opacity: .55;
  transform: scale(.85);
  transition: transform .12s ease-out, opacity .12s ease-out;
}
.vr__time { font-size: 30px; font-weight: 800; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.vr__warn { margin-top: 6px; font-size: 11.5px; color: var(--muted-2); }
.vr__act { display: flex; gap: 9px; margin-top: 18px; }
.vr__act .btn { flex: 1; justify-content: center; }

/* ---------- звонок ---------- */

.callbox { text-align: center; padding: 8px 0 4px; }
.callbox__stage {
  min-height: 190px;
  border-radius: 15px;
  background: #000;
  display: grid;
  place-items: center;
  overflow: hidden;
  margin-bottom: 14px;
}
.callbox__stage video { width: 100%; max-height: 340px; object-fit: cover; }
.callbox__local {
  width: 88px;
  height: 122px;
  margin: 0 auto 12px;
  border-radius: 12px;
  background: var(--surface-2);
  overflow: hidden;
}
.callbox__local video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.callbox__ava {
  width: 78px;
  height: 78px;
  margin: 14px auto 12px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 27px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.callbox__t { display: block; font-size: 18px; font-weight: 800; }
.callbox__act { display: flex; gap: 9px; margin-top: 18px; }
.callbox__act .btn { flex: 1; justify-content: center; }

/* Плашка над списком работ: сколько ждёт одобрения. */
.adm-note {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 11px;
  background: rgba(255, 176, 32, .12);
  border: 1px solid rgba(255, 176, 32, .28);
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.45;
}
.bcard__badge--ok { background: rgba(47, 214, 168, .16); color: var(--ok); }

/* Обложка работы в карточке модерации: маленький квадрат, чтобы видеть,
   что именно скрывают или удаляют, а не только название. */
.adm-card__cover {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--surface-2);
}

/* Переключатель «Вход» / «Регистрация». Две равные кнопки в общей
   подложке: активная поднята фоном, чтобы читалось с одного взгляда. */
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-top: 14px;
  padding: 4px;
  border-radius: 12px;
  background: var(--surface-2);
}
.auth-tabs__b {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  padding: 9px 10px;
  border-radius: 9px;
  cursor: pointer;
  transition: background .18s, color .18s;
}
.auth-tabs__b.is-on {
  background: var(--bg-2);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
}

/* Форма входа по логину и паролю. Отступ сверху отделяет её от кнопки ВК
   и от плашки «вход не настроен», чтобы не сливались в одно полотно.
   Поля внутри идут по конвенции проекта: .field > .field__label + input. */
.auth-pass {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 2px;
}
.auth-pass[hidden] { display: none; }
.auth-pass .field { margin-bottom: 12px; }
.auth-pass .field:last-of-type { margin-bottom: 14px; }

/* Поле пароля с глазом. Кнопка наезжает на правый край инпута,
   поэтому справа запас под иконку, и сам инпут остаётся .input —
   оформление общее с остальными формами приложения. */
.pass {
  position: relative;
}
.pass .input {
  padding-right: 46px;
}
.pass__eye {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted-2);
  cursor: pointer;
  transition: color .15s, background .15s;
}
.pass__eye svg { width: 19px; height: 19px; fill: currentColor; }
.pass__eye:hover { color: var(--text); }
.pass__eye.is-on { color: var(--accent); background: rgba(124, 92, 255, .12); }
.auth-hint { font-size: 11.5px; color: var(--muted-2); margin-top: 10px; line-height: 1.45; }

/* лицензионный код */
.code-chip {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 6px;
  padding: 4px 9px; border-radius: 8px; font-size: 11px;
  background: rgba(124,92,255,.14); border: 1px solid rgba(124,92,255,.3); color: #c9b8ff;
}
.code-chip b { font-family: Consolas, ui-monospace, monospace; letter-spacing: 1px; font-size: 11px; }
.code-chip svg { color: #c9b8ff; }
.code-chip:active { transform: scale(.96); }

.lic-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.lic-row:last-child { border-bottom: 0; }
.lic-row__i {
  width: 32px; height: 32px; border-radius: 10px; flex: none; display: grid; place-items: center;
  background: rgba(124,92,255,.14); color: #c9b8ff;
}
.lic-row__b { flex: 1; min-width: 0; }
.lic-row__b b {
  display: block; font-size: 13px; font-weight: 800; letter-spacing: 1px;
  font-family: Consolas, ui-monospace, monospace; color: #c9b8ff;
}
.lic-row__b i { display: block; font-size: 11.5px; color: var(--muted); font-style: normal; margin-top: 2px; }

.kv { display: grid; gap: 0; margin: 4px 0 10px; }
.kv__r {
  display: flex; justify-content: space-between; gap: 12px; padding: 8px 0;
  border-bottom: 1px solid var(--line); font-size: 13px;
}
.kv__r:last-child { border-bottom: 0; }
.kv__r i { color: var(--muted); font-style: normal; flex: none; }
.kv__r b { font-weight: 600; text-align: right; word-break: break-word; min-width: 0; }

/* ==========================================================================
   Модалки / шторки / тосты
   ========================================================================== */
.overlay {
  position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.66);
  backdrop-filter: blur(6px); display: flex; animation: fadein .2s;
}
@keyframes fadein { from { opacity: 0 } to { opacity: 1 } }
.overlay.is-closing { animation: fadeout .2s forwards; }
@keyframes fadeout { to { opacity: 0 } }

.modal {
  margin: auto; width: calc(100% - 28px); max-width: 440px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-xl);
  box-shadow: var(--shadow); overflow: hidden; animation: pop .26s var(--ease);
  max-height: calc(100dvh - 60px); display: flex; flex-direction: column;
}
@keyframes pop { from { transform: scale(.9) translateY(18px); opacity: 0 } to { transform: none; opacity: 1 } }
.modal__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 8px; }
.modal__head b { font-size: 17px; font-weight: 800; }
/* min-height:0 обязателен и здесь.
   В flex-колонке (а .modal как раз flex-колонка с max-height)
   элемент по умолчанию не сжимается ниже своего содержимого:
   overflow-y:auto не включается, и низ окна просто срезается
   родителем с overflow:hidden. На невысоком экране половина формы —
   включая согласие и кнопки — оказывалась недостижимой, и прокрутить
   её было нечем. */
.modal__body { padding: 4px 18px 18px; overflow-y: auto; min-height: 0; }
.modal__foot { padding: 12px 18px calc(16px + var(--safe-b)); display: flex; gap: 10px; }
.modal__foot .btn { flex: 1; }

.sheet {
  position: absolute; left: 50%; bottom: 0; width: 100%; max-width: 520px; max-height: 88dvh;
  transform: translateX(-50%);
  background: var(--bg-2); border-top: 1px solid var(--line); border-radius: var(--r-xl) var(--r-xl) 0 0;
  display: flex; flex-direction: column; animation: up .3s var(--ease);
  padding-bottom: calc(var(--tab-h) + var(--safe-b));
}
@keyframes up { from { transform: translate(-50%, 100%) } to { transform: translate(-50%, 0) } }
.sheet__grab { width: 40px; height: 4px; border-radius: 4px; background: var(--line-2); margin: 10px auto 6px; }
.sheet__head { padding: 6px 18px 12px; display: flex; align-items: center; justify-content: space-between; }
.sheet__head b { font-size: 17px; font-weight: 800; }
/* То же для листа снизу: без min-height:0 содержимое не сжимается,
   прокрутка не работает, низ срезается — те же симптомы. */
.sheet__body { padding: 0 16px 20px; overflow-y: auto; min-height: 0; }

.viewer {
  position: absolute; left: 50%; top: 0; bottom: 0; width: 100%; max-width: 520px;
  transform: translateX(-50%);
  background: #000; display: grid; place-items: center;
  z-index: 5;
}
.viewer img, .viewer video { max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer__x {
  position: absolute; top: calc(var(--safe-t) + 14px); right: 14px; width: 38px; height: 38px;
  border-radius: 50%; background: rgba(0,0,0,.5); display: grid; place-items: center; font-size: 18px;
}
.viewer__nav {
  position: absolute; top: 50%; translate: 0 -50%; width: 42px; height: 60px;
  display: grid; place-items: center; font-size: 24px; color: #fff; background: rgba(0,0,0,.35);
}
.viewer__nav--prev { left: 0; border-radius: 0 12px 12px 0; }
.viewer__nav--next { right: 0; border-radius: 12px 0 0 12px; }
.viewer__count {
  position: absolute; bottom: calc(var(--safe-b) + 18px); left: 50%; translate: -50% 0;
  padding: 6px 13px; border-radius: 999px; background: rgba(0,0,0,.6); font-size: 12px; font-weight: 700;
}

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gallery__i { position: relative; aspect-ratio: 1; border-radius: 13px; overflow: hidden; background: var(--surface-2); }
.gallery__i img { width: 100%; height: 100%; object-fit: cover; }
.gallery__i b {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 5px; font-size: 10px; font-weight: 700;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.8));
}

.comment { display: flex; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.comment__b { flex: 1; min-width: 0; }
.comment__b b { font-size: 13px; margin-right: 6px; }
.comment__b b span { color: var(--muted); font-weight: 500; font-size: 12px; margin-left: 5px; }
.comment__b p { margin: 3px 0 0; font-size: 13.5px; line-height: 1.45; word-break: break-word; }
.comment__del { align-self: flex-start; color: var(--muted-2); font-size: 11px; padding: 4px 6px; }

/* ==========================================================================
   Сообщения
   ========================================================================== */
.chat-list { padding: 4px 12px 16px; display: grid; gap: 8px; }
.chat-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 12px; border-radius: var(--r); text-align: left;
  background: var(--surface); border: 1px solid var(--line);
}
.chat-row.is-unread { border-color: rgba(124,92,255,.4); background: rgba(124,92,255,.07); }
.chat-row:active { transform: scale(.99); }
.chat-row__ava {
  width: 48px; height: 48px; border-radius: 50%; overflow: hidden; flex: none;
  background: var(--surface-3); display: grid; place-items: center;
  font-size: 17px; font-weight: 800; color: #fff;
}
.chat-row__ava img { width: 100%; height: 100%; object-fit: cover; }
.chat-row__b { flex: 1; min-width: 0; }
.chat-row__top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.chat-row__top b { font-size: 14px; font-weight: 800; }
.chat-row.is-unread .chat-row__top b { color: #c9b8ff; }
.chat-row__top i { font-size: 11px; color: var(--muted-2); font-style: normal; flex: none; }
.chat-row__post { display: block; font-size: 11.5px; color: var(--muted); margin: 2px 0 4px;
                  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-row__msg {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 12.5px; color: var(--muted); line-height: 1.35;
}
.chat-row__dot {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; flex: none;
  background: var(--accent-2); color: #fff; font-size: 11px; font-weight: 800;
  display: grid; place-items: center;
}

.chat-head {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px;
  border-radius: 14px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 12px;
}
.chat-head__img {
  width: 42px; height: 52px; border-radius: 9px; overflow: hidden; flex: none;
  background: var(--surface-2); display: grid; place-items: center; font-size: 20px;
}
.chat-head__img img { width: 100%; height: 100%; object-fit: cover; }

/* Аватар собеседника в шапке переписки. Круглый: в шапке важно
   узнать человека, а не работать с обложкой работы, как раньше. */
.chat-head__ava {
  width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex: none;
  background: var(--surface-2); display: grid; place-items: center;
  font-size: 14px; font-weight: 700; color: var(--muted);
}
.chat-head__ava img { width: 100%; height: 100%; object-fit: cover; }
.chat-head__b { flex: 1; min-width: 0; }
.chat-head__b b { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-head__b i { font-size: 11.5px; color: var(--muted); font-style: normal; }

/* Аватар с именем в шапке переписки — ссылка на профиль человека. */
.chat-head__who {
  display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0;
  padding: 0; text-align: left;
  -webkit-tap-highlight-color: transparent;
}

.msgs {
  flex: 1; min-height: 200px; overflow-y: auto; padding: 4px 2px 10px;
  display: flex; flex-direction: column; gap: 8px;
}
.msg { display: flex; }
.msg--me { justify-content: flex-end; }
.msg__bubble {
  position: relative; max-width: 78%; padding: 10px 13px 18px; border-radius: 16px;
  background: var(--surface-2); font-size: 13.5px; line-height: 1.45; word-break: break-word;
  white-space: pre-wrap;
}
.msg--them .msg__bubble { border-bottom-left-radius: 6px; }
.msg--me .msg__bubble { background: var(--grad); color: #fff; border-bottom-right-radius: 6px; }
.msg__bubble i {
  position: absolute; right: 10px; bottom: 4px; font-size: 9.5px; font-style: normal; opacity: .65;
}
.msg-sys {
  align-self: center; max-width: 88%; text-align: center;
  font-size: 11.5px; color: var(--muted-2); background: rgba(255,255,255,.05);
  padding: 6px 12px; border-radius: 999px; margin: 2px 0 6px;
}
.msg__bubble--typing { display: flex; gap: 4px; align-items: center; padding: 13px 14px; }
.msg__bubble--typing i {
  position: static; width: 6px; height: 6px; border-radius: 50%; background: var(--muted);
  animation: tdot 1.1s infinite;
}
.msg__bubble--typing i:nth-child(2) { animation-delay: .15s; }
.msg__bubble--typing i:nth-child(3) { animation-delay: .3s; }
@keyframes tdot { 0%, 60%, 100% { opacity: .25; transform: translateY(0) } 30% { opacity: 1; transform: translateY(-3px) } }

.quick { display: flex; gap: 7px; overflow-x: auto; padding: 6px 2px 10px; scrollbar-width: none; }
.quick::-webkit-scrollbar { display: none; }
.composer--chat { position: static; background: none; padding: 0; }

/* ==========================================================================
   Кошелёк
   ========================================================================== */
.wallet-card {
  position: relative; overflow: hidden;
  border-radius: var(--r-xl); padding: 20px;
  background: linear-gradient(140deg, #2a1f52 0%, #3a1c40 55%, #1b2440 100%);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 18px 40px rgba(0,0,0,.5);
}
.wallet-card::after {
  content: ''; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px;
  border-radius: 50%; background: radial-gradient(circle, rgba(124,92,255,.45), transparent 70%);
}
.wallet-card--dev { background: linear-gradient(140deg, #10283a 0%, #0f3a33 60%, #241a45 100%); }
.wallet-card--dev::after { background: radial-gradient(circle, rgba(47,214,168,.4), transparent 70%); }
.wallet-card__top {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 12px; color: rgba(255,255,255,.7); position: relative; z-index: 1;
}
.wallet-card__top b { color: #fff; letter-spacing: 1px; }
.wallet-card__top .vbadge { display: inline-block; vertical-align: -2px; margin-left: 3px; }

.tx__ico--topup { background: rgba(47,214,168,.14); color: var(--ok); }

/* аккаунт разработчика */
.dev-head { text-align: center; padding: 6px 0 4px; }
.dev-ava {
  width: 74px; height: 74px; margin: 0 auto 12px; border-radius: 50%;
  background: linear-gradient(135deg, #2fd6a8, #7c5cff);
  display: grid; place-items: center; font-size: 24px; font-weight: 900; color: #04110d;
  box-shadow: 0 12px 30px rgba(47,214,168,.3);
}
.dev-name { font-size: 20px; font-weight: 900; display: flex; align-items: center; justify-content: center; gap: 6px; }
.dev-name .vbadge { width: 18px; height: 18px; }
.dev-sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.dev-stats { display: flex; justify-content: center; gap: 22px; margin-top: 16px; }
.dev-stats b { display: block; font-size: 15px; font-weight: 800; }
.dev-stats span { font-size: 10.5px; color: var(--muted); }
.wallet-card__sum {
  font-size: 34px; font-weight: 900; letter-spacing: -1px; margin-top: 12px;
  position: relative; z-index: 1;
}
.wallet-card__label { font-size: 12px; color: rgba(255,255,255,.55); position: relative; z-index: 1; }
.wallet-card__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px;
  padding-top: 14px; border-top: 1px solid rgba(255,255,255,.12); position: relative; z-index: 1;
}
.wallet-card__grid b { display: block; font-size: 14px; font-weight: 800; }
.wallet-card__grid span { font-size: 10.5px; color: rgba(255,255,255,.55); }

.wallet-actions { display: grid; gap: 8px; margin-top: 14px; }
.wallet-payout { font-size: 11.5px; color: var(--muted); text-align: center; }

.split-note {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0 4px;
}
.split-note div {
  padding: 10px 12px; border-radius: 13px;
  background: var(--surface); border: 1px solid var(--line);
}
.split-note b { display: block; font-size: 15px; font-weight: 800; }
.split-note span { font-size: 11px; color: var(--muted); line-height: 1.3; display: block; margin-top: 2px; }
.split-note div:last-child { background: rgba(47,214,168,.08); border-color: rgba(47,214,168,.25); }
.split-note div:last-child b { color: var(--ok); }

.notice {
  display: flex; gap: 11px; align-items: flex-start; padding: 13px;
  border-radius: var(--r); background: var(--surface); border: 1px solid var(--line);
  font-size: 12.5px; color: var(--muted); line-height: 1.5;
}
.notice svg { flex: none; margin-top: 2px; color: var(--accent); }
.notice b { color: var(--text); }

.tx { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.tx:last-child { border-bottom: 0; }
.tx__ico {
  width: 36px; height: 36px; border-radius: 11px; flex: none; display: grid; place-items: center;
  background: var(--surface-2); color: var(--muted);
}
.tx__ico--in { background: rgba(47,214,168,.14); color: var(--ok); }
.tx__ico--out { background: rgba(255,176,32,.14); color: var(--warn); }
.tx__ico--dev { background: rgba(124,92,255,.16); color: #c9b8ff; }
.tx__ico--wait { background: rgba(255,176,32,.14); color: var(--warn); }
.tx__b { flex: 1; min-width: 0; }
.tx__b b { display: block; font-size: 14px; font-weight: 800; }
.tx__b i { display: block; font-size: 12px; color: var(--muted); font-style: normal; margin-top: 1px;
           overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx__b i.tx__sub { font-size: 11px; color: var(--muted-2); }

.composer {
  position: sticky; bottom: 0; display: flex; gap: 9px; padding: 11px 0 4px;
  background: linear-gradient(180deg, transparent, var(--bg-2) 30%);
}
.composer .input { flex: 1; padding: 11px 14px; border-radius: 999px; font-size: 14px; }
.composer .btn { width: 42px; height: 42px; padding: 0; border-radius: 50%; flex: none; }
.composer .btn svg { width: 19px; height: 19px; }

.toasts {
  position: fixed; left: 0; right: 0; bottom: calc(var(--tab-h) + var(--safe-b) + 16px);
  z-index: 400; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none;
}
.toast {
  max-width: 88%; padding: 11px 17px; border-radius: 999px;
  background: rgba(30,30,42,.96); border: 1px solid var(--line-2); color: var(--text);
  font-size: 13px; font-weight: 600; box-shadow: var(--shadow); backdrop-filter: blur(14px);
  animation: toastin .3s var(--ease);
}
.toast--ok { border-color: rgba(47,214,168,.45); color: var(--ok); }
.toast--err { border-color: rgba(255,79,94,.45); color: var(--danger); }
.toast.is-out { animation: toastout .25s forwards; }
@keyframes toastin { from { opacity: 0; transform: translateY(14px) scale(.94) } to { opacity: 1; transform: none } }
@keyframes toastout { to { opacity: 0; transform: translateY(-8px) scale(.96) } }

/* ---------- Плашка загрузки ---------- */
.bar {
  position: fixed; top: calc(var(--safe-t) + 8px); left: 50%; translate: -50% 0; z-index: 500;
  width: min(300px, 80%); padding: 11px 15px; border-radius: 14px;
  background: rgba(24,24,34,.96); border: 1px solid var(--line-2); box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}
.bar__t { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; font-weight: 700; margin-bottom: 8px; }
.bar__t span { color: var(--muted); font-weight: 600; }
.bar__tr { height: 4px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.bar__tr i { display: block; height: 100%; width: 0; background: var(--grad); transition: width .25s var(--ease); }

/* ---------- Онбординг ---------- */
.onb { padding: 22px 18px 30px; display: grid; gap: 18px; }
.onb__pick { display: grid; place-items: center; gap: 10px; }
.onb__ava {
  width: 92px; height: 92px; border-radius: 50%; border: 2px dashed var(--line-2);
  display: grid; place-items: center; color: var(--muted-2); overflow: hidden; background: var(--surface);
}
.onb__ava img { width: 100%; height: 100%; object-fit: cover; }
.onb__ava svg { width: 32px; height: 32px; }
.onb__emojis { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.onb__emojis button {
  width: 40px; height: 40px; border-radius: 12px; font-size: 20px; background: var(--surface-2);
  display: grid; place-items: center;
}
.onb__emojis button.is-on { background: var(--grad); }
.onb h2 { margin: 0; font-size: 22px; font-weight: 900; text-align: center; letter-spacing: -.4px; }
.onb p.sub { margin: -12px 0 0; text-align: center; font-size: 13.5px; color: var(--muted); }

/* ---------- Спиннер ---------- */
.spin {
  width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.18);
  border-top-color: #fff; animation: rot .7s linear infinite;
}
@keyframes rot { to { transform: rotate(360deg) } }
.center-spin { display: grid; place-items: center; padding: 50px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
