/* ==========================================================================
   АртЛента — стили
   ========================================================================== */

: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; }

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(120% 80% at 50% 0%, #1b1033 0%, #0b0716 55%, #07050f 100%);
  transition: opacity .5s ease, visibility .5s ease;
}
/* Уходящая заставка не должна перехватывать нажатия. */
.splash.is-gone { opacity: 0; visibility: hidden; pointer-events: none; }

.splash__bg { position: absolute; inset: 0; }
.splash__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .5;
  will-change: transform;
}
.splash__blob--a {
  width: 58vw; height: 58vw;
  top: -14vw; left: -12vw;
  background: radial-gradient(circle, #7c5cff 0%, transparent 70%);
  animation: splashDrift1 11s ease-in-out infinite alternate;
}
.splash__blob--b {
  width: 52vw; height: 52vw;
  bottom: -16vw; right: -10vw;
  background: radial-gradient(circle, #e0357c 0%, transparent 70%);
  animation: splashDrift2 13s ease-in-out infinite alternate;
}
.splash__blob--c {
  width: 46vw; height: 46vw;
  top: 32%; left: 26%;
  background: radial-gradient(circle, #25f4ee 0%, transparent 70%);
  opacity: .3;
  animation: splashDrift3 9s ease-in-out infinite alternate;
}
@keyframes splashDrift1 { to { transform: translate3d(8vw, 6vh, 0) scale(1.15); } }
@keyframes splashDrift2 { to { transform: translate3d(-7vw, -5vh, 0) scale(1.1); } }
@keyframes splashDrift3 { to { transform: translate3d(-6vw, 7vh, 0) scale(.85); } }

/* Мелкие карточки, как работы в ленте, всплывают снизу */
.splash__cards { position: absolute; inset: 0; }
.splash__card {
  position: absolute;
  width: 84px;
  height: 108px;
  border-radius: 14px;
  opacity: 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
  animation: splashFloat var(--dur) ease-in forwards;
}
/* Карточки заметны почти сразу: иначе на быстром запуске первые полсекунды
   фон выглядит пустым и анимация теряется. */
@keyframes splashFloat {
  0%   { opacity: 0; transform: translate3d(0, 26vh, 0) rotate(var(--r1)) scale(.8); }
  10%  { opacity: .62; }
  70%  { opacity: .5; }
  100% { opacity: 0; transform: translate3d(var(--dx), -46vh, 0) rotate(var(--r2)) scale(1.04); }
}

.splash__center {
  position: relative;
  text-align: center;
  padding: 0 24px;
  transform: translateY(-2vh);
}

.splash__mark {
  position: relative;
  width: 104px;
  height: 104px;
  margin: 0 auto 22px;
  display: grid;
  place-items: center;
  animation: splashPop .8s cubic-bezier(.2, .9, .25, 1.2) both;
}
.splash__mark img {
  width: 62px; height: 62px;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 6px 20px rgba(124, 92, 255, .55));
}
.splash__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, .16);
  border-top-color: #25f4ee;
  border-right-color: #7c5cff;
  animation: splashSpin 1.6s cubic-bezier(.6, .05, .3, .95) infinite;
}
@keyframes splashPop {
  from { opacity: 0; transform: scale(.6); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes splashSpin { to { transform: rotate(360deg); } }

.splash__title {
  margin: 0;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -.5px;
  line-height: 1.05;
  animation: splashTitle .7s cubic-bezier(.2, .8, .25, 1) .12s both;
}
.splash__title span {
  background: linear-gradient(100deg, #7c5cff 0%, #e0357c 45%, #25f4ee 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: splashShimmer 3.4s linear infinite;
}
@keyframes splashTitle {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes splashShimmer {
  from { background-position: 0% 50%; }
  to   { background-position: 220% 50%; }
}

.splash__tag {
  margin: 12px 0 0;
  font-size: 14px;
  color: rgba(255, 255, 255, .72);
  animation: splashTitle .7s cubic-bezier(.2, .8, .25, 1) .26s both;
}

.splash__bar {
  position: absolute;
  left: 50%;
  bottom: calc(42px + var(--safe-b));
  transform: translateX(-50%);
  width: 132px;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .12);
  overflow: hidden;
  animation: splashTitle .6s ease .5s both;
}
.splash__bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 3px;
  background: linear-gradient(90deg, #7c5cff, #e0357c);
  animation: splashBar 2.1s cubic-bezier(.4, .1, .2, 1) forwards;
}
@keyframes splashBar { to { width: 100%; } }

.splash__skip {
  position: absolute;
  right: 14px;
  /* сверху отступ статус-бара: --safe-t, а не --safe-b */
  top: calc(var(--safe-t) + 12px);
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  color: rgba(255, 255, 255, .7);
  font: 600 12px/1 inherit;
  cursor: pointer;
  animation: splashTitle .5s ease .8s both;
}
.splash__skip:active { background: rgba(255, 255, 255, .16); }

/* Телефон: заголовок и карточки должны быть соразмерны экрану,
   иначе на 360px карточки занимают пол-экрана и выглядят как мусор. */
@media (max-width: 420px) {
  .splash__title { font-size: 34px; }
  .splash__mark { width: 88px; height: 88px; margin-bottom: 18px; }
  .splash__mark img { width: 52px; height: 52px; }
  .splash__tag { font-size: 13px; padding: 0 4px; }
  .splash__card { width: 60px; border-radius: 11px; box-shadow: 0 8px 22px rgba(0, 0, 0, .3); }
  .splash__blob { filter: blur(46px); }
}

/* Очень низкие экраны — поднимаем блок, чтобы полоска не налезала */
@media (max-height: 560px) {
  .splash__center { transform: translateY(-6vh); }
  .splash__mark { width: 76px; height: 76px; margin-bottom: 12px; }
  .splash__mark img { width: 46px; height: 46px; }
  .splash__title { font-size: 30px; }
  .splash__bar { bottom: calc(24px + var(--safe-b)); }
}

/* Уважаем системную настройку «меньше движения» */
@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 {
    animation: none !important;
  }
  .splash__mark, .splash__title, .splash__tag, .splash__bar, .splash__skip { opacity: 1; }
  .splash__bar i { width: 100%; }
  .splash__card { 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; }
.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: 15px; height: 15px; color: var(--cyan); flex: none; }

/* Галочка сразу после ника: @ник ✓ */
.vcheck {
  width: 13px; height: 13px; color: var(--cyan); flex: none;
  margin-left: 4px; vertical-align: -1px;
}
.handle {
  display: inline-flex; align-items: center;
  white-space: nowrap;
}
.vbadge path { fill: var(--cyan); }

.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; }
.price--sold { background: rgba(255,255,255,.14); 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 прячем */
.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; }

/* ==========================================================================
   Профиль
   ========================================================================== */
.prof-head { padding: calc(var(--safe-t) + 20px) 16px 18px; text-align: center; position: relative; }
.prof-head__bg {
  position: absolute; inset: 0 0 auto; height: 130px; z-index: -1;
  background: var(--grad); opacity: .18; filter: blur(42px);
}
.prof-head__top { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 6px; }
.prof-head .avatar { margin: 0 auto 10px; }
.prof-head h2 { margin: 0 0 2px; font-size: 20px; font-weight: 900; display: flex; align-items: center; justify-content: center; gap: 6px; }
.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); }

.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); }

.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); }
.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); }
.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; }
.modal__body { padding: 4px 18px 18px; overflow-y: auto; }
.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; }
.sheet__body { padding: 0 16px 20px; overflow-y: auto; }

.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__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; }

.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; }
}