:root {
  --bg: #0a0a0c;
  --bg-2: #0d0f14;
  --card: #111115;
  --card-2: #0e1013;
  --line: #1f2230;
  --neon: #ff4500;
  --neon-2: #ff6a25;
  --neon-soft: rgba(255, 69, 0, .10);
  --neon-glow: rgba(255, 69, 0, .35);
  --neon-line: rgba(255, 69, 0, .28);
  --text: #f4f5f9;
  --muted: #71717a;
  --green: #22c55e;
  --gold: #fbbf24;
}

/* Анимируемое свойство для бегущей неоновой рамки */
@property --border-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-tap-highlight-color: transparent;
}

/* Неоновые блики фона, как у ORIDOS: тёплые радиальные пятна на чёрном */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(620px 420px at 88% -12%, rgba(255, 69, 0, .13), transparent 70%),
    radial-gradient(520px 380px at -14% 34%, rgba(255, 69, 0, .05), transparent 70%),
    radial-gradient(700px 500px at 50% 118%, rgba(255, 69, 0, .04), transparent 70%),
    var(--bg);
}

#app { max-width: 480px; margin: 0 auto; min-height: 100%; padding-bottom: 86px; }

main { padding: 18px 16px 0; }

/* ── Баннер дозаполнения ── */
.fill-banner {
  background: rgba(245, 185, 66, .1);
  border: 1px solid rgba(245, 185, 66, .45);
  color: var(--gold);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 13px; font-weight: 800;
  margin-bottom: 12px; cursor: pointer;
  box-shadow: 0 0 16px rgba(245, 185, 66, .12);
}

.screen.hidden, .hidden { display: none !important; }

/* ── Карточка анкеты: анимированная неоновая рамка ── */
.card {
  position: relative;
  background: var(--card);
  border: 1px solid transparent;
  border-radius: 20px;
  padding: 0;
  overflow: hidden;
  box-shadow:
    0 0 28px rgba(255, 69, 0, .10),
    0 20px 48px rgba(0, 0, 0, .5);
  transition: box-shadow .35s ease, transform .25s ease;
  /* z-index контекст для псевдоэлементов */
}
/* Анимированная бегущая рамка (conic-gradient + mask) */
.card::before {
  content: "";
  position: absolute; inset: 0; z-index: 4;
  border-radius: 20px; padding: 1.5px;
  background: conic-gradient(
    from var(--border-angle),
    transparent 15%,
    rgba(255, 69, 0, .25) 22%,
    var(--neon) 27%,
    var(--neon-2) 30%,
    rgba(255, 69, 0, .25) 33%,
    transparent 40%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: border-spin 4.5s linear infinite;
  pointer-events: none;
}
@keyframes border-spin {
  to { --border-angle: 360deg; }
}
.card::after {
  content: "";
  position: absolute; inset: 0; z-index: 4;
  border-radius: 20px;
  box-shadow: inset 0 0 22px rgba(255, 69, 0, .06);
  pointer-events: none;
}
.card:hover {
  box-shadow:
    0 0 38px rgba(255, 69, 0, .18),
    0 24px 56px rgba(0, 0, 0, .6);
  transform: translateY(-2px);
}
.card-body { padding: 14px 18px 18px; }
/* Фото: на всю карточку, без рамок */
.card-photo {
  position: absolute; inset: 0; height: 100%; width: 100%;
  overflow: hidden;
  background: var(--bg-2);
}
.card-photo .cp-bg { display: none; }
.card-photo img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.reel .card-photo img { filter: brightness(.55); }
.card-photo.noimg img { display: none; }
.seen-tag {
  position: absolute; top: 12px; left: 12px; z-index: 3;
  background: rgba(8, 9, 13, .75); border: 1px solid var(--line);
  color: var(--muted); font-size: 11px; font-weight: 800;
  letter-spacing: .06em; border-radius: 999px; padding: 5px 10px;
}
.card-photo-fallback {
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(ellipse 60% 50% at 75% 15%, rgba(138,43,226,.3), transparent 70%),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(59,130,246,.25), transparent 70%),
    radial-gradient(ellipse 70% 60% at 50% 50%, rgba(255,69,0,.15), transparent 70%),
    linear-gradient(160deg, #0d0f14 0%, #161822 50%, #0d0f14 100%);
}
.card-photo-fallback span {
  font-size: 96px; font-weight: 900; color: rgba(255,255,255,.15);
  text-shadow: 0 0 60px rgba(255,69,0,.3);
}

/* Свернуть/развернуть анкету */
.card-expand {
  width: 100%; margin-top: 10px;
  background: none; border: none; cursor: pointer;
  color: var(--neon-2); font-size: 12px; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase;
  text-shadow: 0 0 10px rgba(255, 138, 61, .4);
  padding: 4px 0;
}
.card-more.hidden { display: none; }

/* ── Вспышка лайка (двойной тап) ── */
.like-flash {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none; color: #ff5d73;
  filter: drop-shadow(0 0 34px rgba(255, 93, 115, .85));
  animation: likepop .68s ease-out forwards;
}
@keyframes likepop {
  0% { transform: scale(.35); opacity: 0; }
  22% { transform: scale(1.18); opacity: 1; }
  58% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.45); opacity: 0; }
}

/* ── Просмотр анкеты из заявки ── */
.view-overlay {
  position: fixed; inset: 0; z-index: 45;
  background: rgba(5, 6, 10, .9); backdrop-filter: blur(6px);
  overflow-y: auto;
}
.view-inner {
  max-width: 480px; margin: 0 auto; padding: 48px 16px 110px;
  position: relative;
}
.view-close {
  position: sticky; top: 10px; margin-left: calc(100% - 44px); z-index: 5;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--card); border: 1px solid var(--line);
  color: var(--muted); font-size: 15px; cursor: pointer;
}
.view-actions {
  display: flex; gap: 14px; justify-content: center;
  position: fixed; bottom: calc(20px + env(safe-area-inset-bottom));
  left: 50%; transform: translateX(-50%);
  width: min(480px, calc(100% - 32px));
  background: rgba(8, 9, 13, .9); backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: 20px;
  padding: 12px;
}
.view-actions .action-btn { flex: 0 0 64px; height: 58px; }
.view-actions .action-btn.like { flex: 1; border-radius: 18px; }
.view-actions .action-btn.like:active { transform: scale(.97); }

.fav-item[data-view] { cursor: pointer; }
.danger-ghost { color: #ff9aa5 !important; border-color: rgba(255, 93, 115, .35) !important; }
.fav-rating {
  margin-left: auto; color: var(--gold); font-weight: 900; font-size: 13px;
  text-shadow: 0 0 10px rgba(245, 185, 66, .45);
}
.fav-hint { font-size: 10px; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; margin-top: 10px; }
.card-name {
  font-size: 24px; font-weight: 900; letter-spacing: .3px;
  text-shadow: 0 0 24px rgba(255, 90, 31, .18);
}
.card-age { color: var(--muted); font-size: 16px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #343b4e; display: inline-block; }
.dot.online {
  background: var(--green);
  box-shadow: 0 0 10px rgba(53, 208, 127, .9);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .55; } }
.dot-label { font-size: 11px; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; }

.badges { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.badge {
  font-size: 12px; font-weight: 800; letter-spacing: .04em;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .03);
  color: #b9c0d4;
  border: 1px solid var(--line);
}
.badge.rank {
  background: var(--neon-soft); color: var(--neon-2);
  border-color: var(--neon-line);
  box-shadow: 0 0 14px rgba(255, 90, 31, .22), inset 0 0 12px rgba(255, 90, 31, .08);
  text-shadow: 0 0 10px rgba(255, 138, 61, .55);
}
.badge.goal {
  background: rgba(53, 208, 127, .08); color: #8fe7b6;
  border-color: rgba(53, 208, 127, .35);
}

.card-about {
  margin-top: 14px; font-size: 14px; line-height: 1.5; color: #c9d0e4;
  white-space: pre-wrap; word-break: break-word;
  border-left: 2px solid var(--neon-line);
  padding-left: 12px;
}
.card-user { margin-top: 12px; font-size: 13px; color: var(--muted); letter-spacing: .02em; }

/* ── Кнопки-действия под карточкой (Tinder-style) ── */
.card-actions { display: flex; gap: 10px; margin-top: 16px; }
.action-btn {
  flex: 0 0 58px; height: 58px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.08); background: rgba(14,16,19,.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform .12s, border-color .25s, box-shadow .25s;
}
.action-btn svg { display: block; }
.action-btn:active { transform: scale(.9); }
.action-btn.danger { color: #ff5d73; border-color: rgba(255, 93, 115, .45); }
.action-btn.danger:active { box-shadow: 0 0 18px rgba(255, 93, 115, .45); border-color: rgba(255, 93, 115, .8); }
.action-btn.like { color: #35d07f; border-color: rgba(53, 208, 127, .45); }
.action-btn.like:active { box-shadow: 0 0 18px rgba(53, 208, 127, .5); border-color: rgba(53, 208, 127, .8); }
.action-write {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 15px; font-weight: 900; letter-spacing: .04em;
  color: #fff;
  background: linear-gradient(135deg, var(--neon) 0%, var(--neon-2) 100%);
  border: 1px solid rgba(255, 138, 61, .6);
  border-radius: 18px;
  box-shadow: 0 0 22px var(--neon-glow), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.action-write:active { transform: scale(.97); }

/* ── Избранное ── */
.fav-item {
  position: relative;
  background: linear-gradient(180deg, var(--card) 0%, var(--card-2) 100%);
  border: 1px solid var(--line); border-radius: 18px;
  padding: 15px 14px; margin-bottom: 11px;
  transition: border-color .2s;
}
.fav-item:hover { border-color: var(--neon-line); }
.fav-head { display: flex; align-items: center; gap: 8px; }
.fav-name { font-weight: 900; font-size: 17px; }
.fav-meta { color: var(--muted); font-size: 13px; margin-top: 5px; }
.fav-btns { display: flex; gap: 8px; margin-top: 11px; }
.fav-btns .btn { flex: 1; padding: 11px; }

/* ── Кнопки ── */
.btn {
  border: none; border-radius: 14px; cursor: pointer;
  font-weight: 800; font-size: 15px; color: var(--text);
  touch-action: manipulation;
}
.btn-primary {
  width: 100%; padding: 15px; margin-top: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--neon) 0%, var(--neon-2) 100%);
  box-shadow: 0 0 24px var(--neon-glow), inset 0 1px 0 rgba(255, 255, 255, .25);
  letter-spacing: .03em;
}
.btn-primary:active { transform: scale(.98); }
.btn-ghost { padding: 10px 18px; background: var(--card-2); border: 1px solid var(--line); }
.btn-ghost:active { border-color: var(--neon-line); }

/* ── Пустые состояния ── */
.empty { text-align: center; padding: 54px 18px; color: var(--muted); }
.empty-emoji { font-size: 44px; margin-bottom: 12px; filter: drop-shadow(0 0 18px rgba(255, 90, 31, .5)); }
.empty-title { font-size: 18px; font-weight: 900; color: var(--text); margin-bottom: 7px; letter-spacing: .02em; }
.empty-sub { font-size: 13px; margin-bottom: 18px; }

/* ── Форма профиля ── */
.form-card {
  background: linear-gradient(180deg, var(--card) 0%, var(--card-2) 100%);
  border: 1px solid var(--line); border-radius: 20px; padding: 18px 16px;
}
.form-hint {
  font-size: 11px; color: var(--muted); margin-bottom: 14px;
  letter-spacing: .06em; text-transform: uppercase;
  display: flex; align-items: center; gap: 8px;
}
.form-hint::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--neon); box-shadow: 0 0 8px var(--neon-glow); flex: 0 0 auto; }
.f-label {
  display: block; font-size: 11px; font-weight: 800; color: var(--muted);
  text-transform: uppercase; letter-spacing: .18em; margin: 16px 0 8px;
}
.f-input, textarea.f-input {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 13px; color: var(--text); font-size: 15px;
  outline: none; font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
}
.f-input:focus {
  border-color: var(--neon-line);
  box-shadow: 0 0 14px rgba(255, 90, 31, .18);
}
textarea.f-input { resize: vertical; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 9px 14px; border-radius: 999px; font-size: 13px; font-weight: 700;
  background: var(--bg-2); border: 1px solid var(--line); color: var(--muted); cursor: pointer;
  transition: all .15s;
}
.chip.on {
  background: var(--neon-soft); color: var(--neon-2);
  border-color: var(--neon-line);
  box-shadow: 0 0 12px rgba(255, 90, 31, .25), inset 0 0 10px rgba(255, 90, 31, .07);
  text-shadow: 0 0 8px rgba(255, 138, 61, .5);
}

.toggle {
  display: flex; align-items: center; gap: 11px; margin-top: 20px; cursor: pointer;
  font-size: 14px; font-weight: 700; background: none; border: none; color: var(--text);
}
.toggle-track {
  width: 46px; height: 27px; border-radius: 999px;
  background: #1c2130; border: 1px solid var(--line);
  position: relative; transition: .2s; flex: 0 0 auto;
}
.toggle-dot {
  position: absolute; top: 2.5px; left: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: #6a7288; transition: .2s;
}
.toggle.on .toggle-track { background: var(--neon-soft); border-color: var(--neon-line); box-shadow: 0 0 14px rgba(255, 90, 31, .25); }
.toggle.on .toggle-dot { left: 21px; background: var(--neon); box-shadow: 0 0 10px var(--neon-glow); }
.form-foot { text-align: center; color: var(--muted); font-size: 11px; margin-top: 14px; letter-spacing: .14em; text-transform: uppercase; }

/* ── Таб-бар ── */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; z-index: 20;
  display: flex; background: rgba(6, 7, 11, .97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255,255,255,.06);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar::before {
  content: ""; position: absolute; top: -1px; left: 20%; right: 20%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 90, 31, .45), transparent);
}
.tab {
  flex: 1; background: none; border: none; cursor: pointer;
  padding: 11px 4px 14px; color: var(--muted); font-size: 20px;
  transition: color .25s, filter .25s, transform .15s;
  touch-action: manipulation;
}
.tab:active { transform: scale(.94); }
.tab span { display: block; font-size: 10px; font-weight: 800; margin-top: 3px; position: relative; letter-spacing: .06em; }
.tab.active { color: var(--neon-2); filter: drop-shadow(0 0 10px rgba(255, 90, 31, .7)); }
.tab.active span { color: var(--neon-2); text-shadow: 0 0 12px rgba(255, 138, 61, .55); }
#favs-badge {
  position: absolute; top: -7px; right: -15px;
  background: var(--neon); color: #fff;
  font-size: 9px; font-weight: 900; border-radius: 999px; padding: 1px 5px;
  box-shadow: 0 0 10px var(--neon-glow);
}

/* ── Toast ── */
.toast {
  position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%);
  background: #14121a; color: var(--text); font-size: 13px; font-weight: 700;
  padding: 11px 18px; border-radius: 13px;
  border: 1px solid var(--neon-line);
  box-shadow: 0 0 18px rgba(255, 90, 31, .2), 0 10px 26px rgba(0, 0, 0, .5);
  z-index: 90; max-width: 90%; text-align: center;
}

/* ── Счётчики и пометки ── */
.count { color: var(--neon-2); text-shadow: 0 0 8px rgba(255, 138, 61, .5); margin-left: 6px; }
.opt { color: var(--muted); text-transform: none; letter-spacing: .04em; font-weight: 600; margin-left: 6px; }
.f-note { font-size: 11px; color: var(--muted); margin-top: 7px; }

/* ── Звёзды Мифика: значок ступени + счётчик ── */
.stars-box {
  display: flex; align-items: center; gap: 12px; margin-top: 10px;
  background: var(--bg-2); border: 1px solid var(--neon-line);
  border-radius: 14px; padding: 10px 12px;
  box-shadow: 0 0 14px rgba(255, 90, 31, .15);
}
.stars-box.hidden { display: none; }
.stars-tier-icon { width: 58px; height: 58px; flex-shrink: 0; filter: drop-shadow(0 0 10px rgba(245, 185, 66, .35)); }
.stars-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.stars-tier { font-size: 15px; font-weight: 900; color: var(--gold); text-shadow: 0 0 14px rgba(245, 185, 66, .35); }
.stars-ctrl { display: flex; align-items: center; gap: 8px; }
.stars-btn {
  width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0;
  background: var(--card); border: 1px solid var(--line);
  color: var(--neon-2); font-size: 22px; font-weight: 900; line-height: 1; cursor: pointer;
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
.stars-btn:active { box-shadow: 0 0 12px rgba(255, 90, 31, .3); transform: scale(.94); }
.stars-input {
  width: 64px; height: 40px; flex-shrink: 0;
  background: var(--card); border: 1px solid var(--neon-line); border-radius: 11px;
  color: #fff; font-size: 19px; font-weight: 900; text-align: center;
  -moz-appearance: textfield; appearance: textfield;
}
.stars-input::-webkit-outer-spin-button, .stars-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stars-input:focus { outline: none; border-color: var(--neon); box-shadow: 0 0 12px rgba(255, 90, 31, .35); }

/* ── Поиск героев ── */
.hero-search { position: relative; }
.hero-suggest {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30;
  background: var(--card); border: 1px solid var(--neon-line);
  border-radius: 14px; padding: 6px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .6), 0 0 16px rgba(255, 90, 31, .15);
  max-height: 240px; overflow-y: auto;
}
.hs-item {
  display: block; width: 100%; text-align: left;
  background: none; border: none; color: var(--text);
  font-size: 14px; font-weight: 600; padding: 10px 12px; border-radius: 10px; cursor: pointer;
}
.hs-item:active { background: var(--neon-soft); }
.hero-chip .hx { color: var(--muted); font-weight: 900; margin-left: 2px; }
.hero-selected { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.hero-selected:empty { display: none; }
.hero-row {
  display: flex; align-items: center; gap: 8px;
  background: var(--neon-soft); border: 1px solid var(--neon-line); border-radius: 14px;
  padding: 6px 4px 6px 12px;
}
.hero-row-name { flex: 1; min-width: 0; font-size: 14px; font-weight: 800; color: var(--neon-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero-row .f-input.hero-stat { width: 66px; height: 36px; padding: 0 8px; margin: 0; text-align: center; font-size: 14px; }
.hero-stat-wrap { position: relative; display: inline-flex; }
.hero-stat-wrap .f-input.hero-stat { width: 62px; padding-right: 18px; }
.hero-stat-unit { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--muted); pointer-events: none; }
.hero-row-x { width: 32px; height: 32px; flex-shrink: 0; border: none; background: none; color: var(--muted);
  font-size: 20px; font-weight: 900; cursor: pointer; }
.hero-all-btn {
  margin-top: 10px; background: none; border: none; cursor: pointer;
  color: var(--neon-2); font-size: 12px; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(255, 138, 61, .4);
}
.hero-catalog {
  margin-top: 10px; max-height: 220px; overflow-y: auto;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px;
  padding: 10px;
}

/* ── Карточка: герои и «ищет» ── */
.card-heroes, .card-wanted { margin-top: 10px; font-size: 13px; color: #aab3cd; }
.card-wanted { color: var(--muted); }
.muted { color: var(--muted); }

/* ── Раздел лайков ── */
.sec-title {
  font-size: 13px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text); margin: 20px 0 10px;
  display: flex; align-items: center; gap: 6px;
}
.sec-title .count { color: var(--neon-2); }
.mutual-tag { margin-left: 4px; }
.mutual-badge {
  margin-top: 10px; font-size: 12px; font-weight: 800;
  color: #8fe7b6; background: rgba(53, 208, 127, .08);
  border: 1px solid rgba(53, 208, 127, .35);
  border-radius: 10px; padding: 8px 12px;
}
.btn.like-back { color: #8fe7b6; border-color: rgba(53, 208, 127, .35); }
.btn.like-back:active { box-shadow: 0 0 12px rgba(53, 208, 127, .4); }

/* ── Лента: вертикальный ролик (TikTok/Reels) ── */
#screen-feed { display: flex; flex-direction: column; height: calc(100dvh - 92px); }
#screen-feed .fill-banner { flex: 0 0 auto; }

/* Контейнер ролика: окно, за которым ездят три слота */
.reel {
  position: relative; flex: 1 1 auto; min-height: 300px;
  overflow: hidden;
  touch-action: none;             /* жест наш, браузер не скроллит */
  overscroll-behavior: contain;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
  cursor: grab;
}
.reel.is-dragging { cursor: grabbing; }

/* Слот: позиция задаётся только transform из JS */
.reel-slot {
  position: absolute; inset: 0;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  contain: layout paint style;    /* правки внутри слота не трогают соседей */
}
.reel-slot.is-idle { visibility: hidden; }
/* will-change держим только на время жеста — иначе три лишних слоя навсегда */
.reel.is-dragging .reel-slot,
.reel.is-busy .reel-slot { will-change: transform; }

.reel .card {
  position: absolute; inset: 0;
  height: 100%; width: 100%;
  transition: none;               /* transform карточки в ленте — только через слот */
}
.reel .card:hover { transform: none; }
.reel .reel-slot .card .card-photo { position: absolute; inset: 0; height: 100%; }
.reel img { pointer-events: none; -webkit-user-drag: none; user-select: none; -webkit-touch-callout: none; }

/* Бегущая неоновая рамка — дорогая (маска + conic-gradient перерисовываются каждый кадр).
   Крутим её только на текущей карточке и только когда ничего не едет. */
.reel .card::before { animation: none; }
.reel:not(.is-dragging):not(.is-busy) .reel-slot.is-current .card::before {
  animation: border-spin 4.5s linear infinite;
}

/* Метка «лайкнуто» */
.reel .card.is-liked .like-badge { display: inline-flex; }
/* Стоит в строке с именем, сразу за регионом: раньше висела в правом верхнем
   углу карточки поверх региона. */
.like-badge {
  display: none;
  flex-shrink: 0; margin-left: auto;
  width: 26px; height: 26px; border-radius: 50%;
  align-items: center; justify-content: center;
  background: rgba(8, 9, 13, .78); border: 1px solid rgba(255, 93, 115, .55);
  color: #ff5d73;
  box-shadow: 0 0 12px rgba(255, 93, 115, .35);
}
.like-badge .ic { width: 14px; height: 14px; fill: currentColor; }
.co-server ~ .like-badge { margin-left: 8px; }

/* Панель по зажатию: держишь — видно, отпустил — ушла */
.peek {
  position: absolute; inset: 0; z-index: 6;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 20px 18px 22px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(6,7,11,.3) 0%, rgba(6,7,11,.85) 40%, rgba(6,7,11,.97) 100%);
  opacity: 0; pointer-events: none;
  transform: translate3d(0, 0, 0);
  transition: opacity .18s ease;
}
.card.is-peek .peek { opacity: 1; }
.card.is-peek .co-body { opacity: 0; transition: opacity .16s ease; }
.card.is-peek .co-top { opacity: 0; transition: opacity .16s ease; }
.peek-inner { width: 100%; max-height: 85%; overflow-y: auto; overflow-x: hidden; }
.peek-title { font-size: 26px; font-weight: 900; color: #fff; margin-bottom: 10px; text-shadow: 0 2px 8px rgba(0,0,0,.8); }
.peek-about {
  font-size: 16px; line-height: 1.55; color: #e8ecf4; margin-bottom: 14px;
  white-space: pre-wrap; word-break: break-word;
}
.peek-row { display: flex; gap: 10px; font-size: 15px; line-height: 1.5; margin-top: 8px; align-items: baseline; }
.peek-row b { color: #ffd38a; font-weight: 800; flex: 0 0 auto; min-width: 70px; }
.peek-row span { color: #dce2f0; }
.peek-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.peek-hint {
  margin-top: 16px; font-size: 12px; letter-spacing: .08em;
  text-transform: uppercase; color: rgba(255,255,255,.4);
  text-align: center;
}

/* Карточка-заглушка в конце круга — такой же слот, на неё можно долистать */
.end-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; text-align: center; padding: 24px;
  background: var(--card-2);
}
.end-card .end-emoji { font-size: 44px; }
.end-card .end-title { font-size: 19px; font-weight: 900; }
.end-card .end-sub { font-size: 13px; color: var(--muted); line-height: 1.5; max-width: 260px; }
.end-card .btn { margin-top: 6px; }

/* Оверлей: характеристики на всю карточку */
.card-overlay {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column;
  padding: 16px 16px;
  pointer-events: none;
  border-radius: 20px;
  background: linear-gradient(180deg,
    rgba(0,0,0,.45) 0%,
    rgba(0,0,0,.1) 25%,
    rgba(0,0,0,.1) 50%,
    rgba(0,0,0,.3) 80%,
    rgba(0,0,0,.5) 100%);
}
.co-head {
  display: flex; align-items: center; gap: 7px;
  flex-wrap: nowrap; overflow: hidden;
  flex: 0 0 auto;
  margin-bottom: auto;
}
.co-name {
  font-size: 28px; font-weight: 900; letter-spacing: .3px;
  text-shadow: 0 2px 8px rgba(0,0,0,1), 0 0 20px rgba(0,0,0,.8);
  color: #fff;
  max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  flex-shrink: 0;
}
.co-age { color: #e0e0e0; font-size: 18px; font-weight: 700; text-shadow: 0 2px 6px rgba(0,0,0,1); flex-shrink: 0; }
.co-gender { font-size: 18px; font-weight: 900; color: #b8d7ff; text-shadow: 0 2px 6px rgba(0,0,0,1); flex-shrink: 0; }
.co-server { font-size: 14px; font-weight: 800; color: #9ff0bd; text-shadow: 0 2px 6px rgba(0,0,0,1); flex-shrink: 0; margin-left: auto; }
.co-body {
  display: flex; flex-direction: column;
  justify-content: space-evenly;
  flex: 1 1 auto;
  pointer-events: auto;
}
.co-section {
  display: flex; flex-direction: column; gap: 4px;
}
.co-section:first-child { margin-top: 0; }
.co-label {
  font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(255,255,255,.5);
  text-shadow: 0 1px 4px rgba(0,0,0,1);
}
.co-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.co-tag {
  font-size: 13px; font-weight: 800; letter-spacing: 0.03em; text-transform: uppercase;
  padding: 7px 14px; border-radius: 10px;
  display: inline-flex; align-items: center; gap: 5px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 2px 10px rgba(0,0,0,.5);
}
.co-tag--accent {
  background: rgba(20,22,30,.95);
  color: var(--neon-2);
  border-color: rgba(255,69,0,.5);
  box-shadow: 0 0 10px rgba(255,69,0,.2);
  text-shadow: 0 0 8px rgba(255,69,0,.4);
}
.co-tag--role-exp, .co-tag--role-gold, .co-tag--role-mid,
.co-tag--role-jungle, .co-tag--role-roam, .co-tag--rank {
  background: rgba(20,22,30,.95);
  color: var(--neon-2);
  border-color: rgba(255,69,0,.5);
  box-shadow: 0 0 10px rgba(255,69,0,.2);
  text-shadow: 0 0 8px rgba(255,69,0,.4);
}
.rank-icon {
  width: 26px; height: 26px;
  vertical-align: middle;
  margin-right: 4px;
  display: inline-block;
  filter: drop-shadow(0 0 4px rgba(255,180,0,.4));
}
.peek-row .rank-icon { width: 32px; height: 32px; }
.co-tag--rank { display: inline-flex; align-items: center; gap: 4px; }
.co-tag--goal, .co-tag--server, .co-tag--heroes, .co-tag--rating {
  background: rgba(20,22,30,.95);
  color: #ccd0dc;
  border-color: rgba(255,255,255,.12);
  text-shadow: none;
}
.co-tag--heroes { font-size: 12px; text-transform: none; gap: 6px; }
.co-tag--heroes b { color: #fff; font-weight: 800; }
.co-tag--heroes .hs { color: var(--neon-2); font-weight: 700; }
.co-tag--rating { cursor: pointer; pointer-events: auto; color: var(--gold); }
.co-row { display: none; }

/* Фото в ленте заливает всю карточку */
.card-photo { position: absolute; inset: 0; height: 100%; }
.card-photo .cp-bg { transform: translateZ(0); }
/* В расширенном виде (просмотр из заявок/шит) фото обычным блоком */
.card:not(.feed-mode) .card-photo,
#view-card .card-photo, .ob-preview .card-photo { position: relative; inset: auto; height: clamp(220px, 38vh, 340px); }

/* ── Вспышка лайка в точке двойного тапа ── */
.like-pop {
  position: fixed; z-index: 60;
  width: 120px; height: 120px; margin: -60px 0 0 -60px;
  pointer-events: none; color: #ff5d73;
  filter: drop-shadow(0 0 30px rgba(255, 93, 115, .8));
  animation: likepop .7s ease-out forwards;
}

/* ── Bottom-sheet фильтров ── */
.sheet-overlay {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(0, 0, 0, .6); backdrop-filter: blur(2px);
}
.sheet {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; z-index: 41;
  background: var(--card); border: 1px solid var(--neon-line); border-bottom: none;
  border-radius: 22px 22px 0 0;
  max-height: 82vh; display: flex; flex-direction: column;
  box-shadow: 0 -14px 40px rgba(0, 0, 0, .6), 0 0 24px rgba(255, 90, 31, .12);
}
/* Фильтры длинные (один список героев на 133 чипа) — им весь экран */
#filters-panel {
  top: 0; max-height: none; border-radius: 0; border-bottom: none;
}
#filters-panel .sheet-head {
  padding-top: calc(16px + env(safe-area-inset-top));
  border-bottom: 1px solid var(--line);
}
#filters-panel .sheet-body { flex: 1; }
.sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 10px; font-size: 16px; font-weight: 900;
}
.sheet-close { background: none; border: none; color: var(--muted); font-size: 18px; cursor: pointer; }
.sheet-body { overflow-y: auto; padding: 4px 18px 12px; }
.sheet-foot { display: flex; gap: 10px; padding: 12px 18px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.sheet-foot .btn {
  flex: 1 1 0; width: auto; margin: 0; padding: 14px;
  display: flex; align-items: center; justify-content: center;
}

/* Ползунок «от — до» */
.rng { position: relative; height: 44px; margin: 2px 13px 8px; touch-action: none; cursor: pointer; -webkit-user-select: none; user-select: none; }
.rng-track { position: absolute; left: 0; right: 0; top: 50%; height: 6px; margin-top: -3px; border-radius: 999px; background: rgba(255, 255, 255, .10); }
.rng-fill { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: linear-gradient(90deg, #ff3d00, var(--neon)); box-shadow: 0 0 10px var(--neon-glow); }
.rng-thumb {
  position: absolute; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%;
  background: var(--neon); border: 3px solid #fff; box-shadow: 0 0 12px var(--neon-glow);
  pointer-events: none; transition: transform .12s;
}
.rng-thumb.active { transform: scale(1.18); }

/* ── Панель отзыва ── */
.stars-row { display: flex; gap: 6px; margin-bottom: 4px; }
.stars-row button {
  background: none; border: none; font-size: 34px; cursor: pointer;
  color: #3a4568; transition: color .15s, text-shadow .15s; padding: 0 2px;
}
.stars-row button.on {
  color: var(--gold);
  text-shadow: 0 0 14px rgba(245, 185, 66, .55);
}
.dual input[type="range"] {
  position: absolute; left: 0; top: 2px; width: 100%; height: 30px;
  -webkit-appearance: none; appearance: none;
  background: transparent; pointer-events: none; margin: 0;
}
.dual input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--neon); border: 2px solid #fff2;
  box-shadow: 0 0 12px var(--neon-glow);
  pointer-events: auto; cursor: pointer;
}
.dual input[type="range"]::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--neon); border: 2px solid #fff2;
  pointer-events: auto; cursor: pointer;
}

/* ── Онбординг ── */
body.onboarding .tabbar { display: none; }
body.onboarding #app { padding-bottom: 20px; }
.ob-progress { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.ob-progress span { font-size: 12px; font-weight: 800; color: var(--muted); }
.ob-bar { flex: 1; height: 4px; background: var(--line); border-radius: 999px; overflow: hidden; }
.ob-bar i { display: block; height: 100%; width: 33%; background: var(--neon); box-shadow: 0 0 10px var(--neon-glow); transition: width .3s; }
.ob-title { font-size: 22px; font-weight: 900; margin-bottom: 14px; }
.ob-rules { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.ob-rule {
  background: var(--card-2); border: 1px solid var(--line); border-radius: 14px;
  padding: 13px 14px; font-size: 14px; line-height: 1.4; color: #c9d0e4;
}
.ob-preview-label {
  margin: 18px 0 8px; font-size: 11px; font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.ob-preview { margin-bottom: 14px; }
.ob-preview .card-body { padding: 14px 16px; }
.ob-preview .card-photo { height: 120px; }
.ob-preview .card-name { font-size: 18px; }
#ob-stars-box { margin-top: 10px; }

/* ── Отзывы ── */
.reviews-list { display: flex; flex-direction: column; gap: 12px; }
.review-item {
  background: var(--card-2); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 14px;
}
.review-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.review-stars { color: var(--gold); font-weight: 900; font-size: 14px; text-shadow: 0 0 8px rgba(245,185,66,.4); }
.review-date { color: var(--muted); font-size: 11px; }
.review-text { color: #c9d0e4; font-size: 13px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.review-from { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* Финальное правило: в ленте фото заливает карточку целиком
   (#card > — только прямые дети ленточной карточки; view/ob-preview не задето) */
#card > .card-photo { position: absolute; inset: 0; height: auto; }

/* ── Иконки (спрайт в index.html) ── */
.ic {
  width: 1.15em; height: 1.15em; flex-shrink: 0;
  stroke: currentColor; fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  vertical-align: -0.2em;
}
.tab .ic { width: 23px; height: 23px; display: block; margin: 0 auto; }
.tab.active .ic { fill: rgba(255, 138, 61, .18); }
.empty-emoji .ic, .end-emoji .ic { width: 44px; height: 44px; stroke-width: 1.6; color: var(--neon-2); }
.ob-rule { display: flex; align-items: flex-start; gap: 11px; }
.ob-rule .ic { width: 20px; height: 20px; margin-top: 1px; color: var(--neon-2); }
.sec-title .ic { color: var(--neon-2); }
.co-server { display: inline-flex; align-items: center; gap: 3px; }
.co-server .ic { width: 14px; height: 14px; stroke-width: 2.4; }
.mutual-tag .ic, .mutual-badge .ic { fill: currentColor; }
.mutual-tag { color: #35d07f; }
.btn .ic { width: 16px; height: 16px; }
.action-btn .ic { width: 22px; height: 22px; }
.sheet-close .ic, .view-close .ic { width: 18px; height: 18px; }
.fill-banner .ic { width: 16px; height: 16px; }

/* ── Максимальный ранг + WinRate ── */
.co-pair { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.co-pair .co-section { min-width: 0; }
.co-tag--winrate {
  background: rgba(20,22,30,.95);
  color: #35d07f;
  border-color: rgba(53,208,127,.45);
  box-shadow: 0 0 10px rgba(53,208,127,.18);
}
.winrate-box { position: relative; }
.winrate-box .f-input { padding-right: 38px; }
.winrate-unit {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  color: var(--neon-2); font-weight: 900; pointer-events: none;
}
.co-tag--matches {
  background: rgba(20,22,30,.95);
  color: #ccd0dc;
  border-color: rgba(255,255,255,.12);
  text-transform: none;
}

/* ── Выбор аватарки ── */
.ava-pick { display: flex; align-items: center; gap: 14px; }
.ava-preview {
  position: relative; width: 76px; height: 76px; flex-shrink: 0;
  border-radius: 50%; overflow: hidden;
  background: var(--bg-2); border: 2px solid var(--neon-line);
  box-shadow: 0 0 14px rgba(255, 90, 31, .2);
  display: flex; align-items: center; justify-content: center;
}
.ava-preview span { font-size: 30px; font-weight: 900; color: var(--neon-2); }
.ava-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.ava-actions { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.ava-upload { position: relative; cursor: pointer; width: auto; padding: 10px 14px; font-size: 14px; }
.ava-reset {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--muted, #9aa0ad); font-size: 13px; text-decoration: underline;
}
.ava-reset.hidden { display: none; }

/* ── Микрофон ON/OFF ── */
.co-tag--mic { background: rgba(20,22,30,.95); color: #ccd0dc; border-color: rgba(255,255,255,.12); }
.co-tag--mic b { font-weight: 900; }
.co-tag--mic.on b { color: #35d07f; text-shadow: 0 0 8px rgba(53,208,127,.5); }
.co-tag--mic.on { border-color: rgba(53,208,127,.45); }
.co-tag--mic.off b { color: #ff4d5e; text-shadow: 0 0 8px rgba(255,77,94,.5); }
.co-tag--mic.off { border-color: rgba(255,77,94,.45); }
#ob-mic .chip:nth-child(1).on, #f-mic .chip:nth-child(1).on { color: #35d07f; border-color: rgba(53,208,127,.6); }
#ob-mic .chip:nth-child(2).on, #f-mic .chip:nth-child(2).on { color: #ff4d5e; border-color: rgba(255,77,94,.6); }

/* ── Предпросмотр своей анкеты ── */
.preview-btn {
  width: 100%; margin-top: 12px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  color: var(--neon-2); border-color: var(--neon-line);
}
.preview-btn .ic { width: 18px; height: 18px; }
.preview-overlay {
  position: fixed; inset: 0; z-index: 70;
  background: var(--bg, #08090d);
  display: flex; flex-direction: column;
  max-width: 480px; margin: 0 auto;
  padding: 10px 12px calc(14px + env(safe-area-inset-bottom));
}
.preview-overlay.hidden { display: none; }
.preview-top { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; padding-bottom: 10px; }
.preview-back {
  background: var(--card); border: 1px solid var(--neon-line); color: var(--neon-2);
  border-radius: 12px; padding: 9px 14px; font-weight: 900; font-size: 15px; cursor: pointer;
}
.preview-title { color: var(--muted, #9aa0ad); font-size: 13px; font-weight: 700; }
.preview-reel { flex: 1 1 auto; min-height: 0; cursor: default; }
body.previewing .tabbar { display: none; }

/* ── Лайки: аватарки в списке и панель действий в просмотре ── */
.fav-ava {
  position: relative; width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 50%; overflow: hidden;
  background: var(--bg-2); border: 1px solid var(--neon-line);
  display: flex; align-items: center; justify-content: center;
}
.fav-ava span { font-weight: 900; color: var(--neon-2); font-size: 18px; }
.fav-ava img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.view-bar { display: flex; gap: 10px; flex: 0 0 auto; padding-top: 10px; }
.view-bar .view-btn {
  flex: 1; margin-top: 0; padding: 14px 10px;
  display: flex; align-items: center; justify-content: center; gap: 7px;
}
.view-bar .view-btn .ic { width: 18px; height: 18px; }

.preview-reel #view-card .card-photo { position: absolute; inset: 0; height: 100%; }
.preview-title { line-height: 1.3; }
.preview-reel .peek-hint { display: none; }
.preview-back { white-space: nowrap; flex-shrink: 0; }
.peek-row .mic-val { font-weight: 900; }
.peek-row .mic-val.on { color: #35d07f; }
.peek-row .mic-val.off { color: #ff4d5e; }

/* ── Обучение управлению лентой ── */
.tut-overlay {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(4, 5, 9, .92); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.tut-overlay.hidden { display: none; }
body.tutorial .tabbar { pointer-events: none; }
.tut-box { width: 100%; max-width: 380px; text-align: center; }
.tut-progress { display: flex; gap: 6px; justify-content: center; margin-bottom: 18px; }
.tut-progress i { width: 34px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.14); }
.tut-progress i.on { background: linear-gradient(90deg, var(--neon), var(--neon-2)); box-shadow: 0 0 10px var(--neon-glow); }

.tut-demo {
  position: relative; width: 190px; height: 290px; margin: 0 auto 22px;
  border-radius: 26px; overflow: hidden;
  border: 2px solid var(--neon-line); background: #0b0c12;
  box-shadow: 0 0 30px rgba(255, 90, 31, .18);
}
.tut-card {
  position: absolute; inset: 8px; border-radius: 18px; padding: 14px 12px;
  background: linear-gradient(160deg, #1b1d29, #11121a);
  border: 1px solid rgba(255,255,255,.08);
  display: flex; flex-direction: column; gap: 8px; align-items: flex-start;
}
.tut-card-b { background: linear-gradient(160deg, #22182a, #121019); transform: translateY(110%); }
.tut-ava { width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(135deg, var(--neon), #8a2be2); opacity: .8; margin-bottom: 6px; }
.tut-card-b .tut-ava { background: linear-gradient(135deg, #3b82f6, #35d07f); }
.tut-card > i { display: block; height: 9px; width: 80%; border-radius: 5px; background: rgba(255,255,255,.14); }
.tut-card > i.short { width: 50%; }
.tut-info {
  position: absolute; inset: 0; border-radius: 18px; padding: 16px 12px;
  background: linear-gradient(180deg, rgba(6,7,11,.4), rgba(6,7,11,.97) 45%);
  display: flex; flex-direction: column; justify-content: flex-end; gap: 7px; align-items: flex-start;
  opacity: 0;
}
.tut-info b { display: block; height: 12px; width: 60%; border-radius: 5px; background: #ffd38a; opacity: .85; }
.tut-info i { display: block; height: 8px; width: 85%; border-radius: 4px; background: rgba(255,255,255,.35); }
.tut-info i.short { width: 55%; }
.tut-heart {
  position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%) scale(0);
  color: #ff4d6d; opacity: 0;
}
.tut-heart .ic { width: 70px; height: 70px; fill: currentColor; stroke: none; filter: drop-shadow(0 0 14px rgba(255,77,109,.7)); }

.tut-finger {
  position: absolute; left: 50%; top: 70%; width: 46px; height: 46px; margin: -23px 0 0 -23px;
  z-index: 5; opacity: 0;
}
.tut-finger span {
  position: absolute; inset: 8px; border-radius: 50%;
  background: rgba(255,255,255,.9);
  box-shadow: 0 0 0 6px rgba(255,255,255,.25), 0 0 22px rgba(255,138,61,.9);
}
.tut-finger::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.8); opacity: 0;
}

.tut-title { font-size: 24px; font-weight: 900; margin-bottom: 8px; color: #fff; }
.tut-text { font-size: 15px; line-height: 1.5; color: #c9cedb; min-height: 68px; }
.tut-next { margin-top: 18px; }
.tut-next:disabled { opacity: .5; filter: grayscale(.4); box-shadow: none; }

/* Свайп вверх */
.tut-up .tut-finger { animation: tutFingerUp 2.4s ease-in-out infinite; }
.tut-up .tut-card-a { animation: tutCardOutUp 2.4s ease-in-out infinite; }
.tut-up .tut-card-b { animation: tutCardInUp 2.4s ease-in-out infinite; }
@keyframes tutFingerUp {
  0%, 10% { top: 78%; opacity: 0; } 18% { top: 78%; opacity: 1; }
  55% { top: 22%; opacity: 1; } 65%, 100% { top: 22%; opacity: 0; }
}
@keyframes tutCardOutUp { 0%, 18% { transform: translateY(0); } 55%, 90% { transform: translateY(-110%); } 100% { transform: translateY(0); } }
@keyframes tutCardInUp { 0%, 18% { transform: translateY(110%); } 55%, 90% { transform: translateY(0); } 100% { transform: translateY(110%); } }

/* Свайп вниз */
.tut-down .tut-card-a { transform: translateY(-110%); animation: tutCardInDown 2.4s ease-in-out infinite; }
.tut-down .tut-card-b { transform: translateY(0); animation: tutCardOutDown 2.4s ease-in-out infinite; }
.tut-down .tut-finger { animation: tutFingerDown 2.4s ease-in-out infinite; }
@keyframes tutFingerDown {
  0%, 10% { top: 22%; opacity: 0; } 18% { top: 22%; opacity: 1; }
  55% { top: 78%; opacity: 1; } 65%, 100% { top: 78%; opacity: 0; }
}
@keyframes tutCardInDown { 0%, 18% { transform: translateY(-110%); } 55%, 90% { transform: translateY(0); } 100% { transform: translateY(-110%); } }
@keyframes tutCardOutDown { 0%, 18% { transform: translateY(0); } 55%, 90% { transform: translateY(110%); } 100% { transform: translateY(0); } }

/* Зажатие */
.tut-hold .tut-finger { top: 50%; animation: tutFingerHold 3s ease-in-out infinite; }
.tut-hold .tut-finger::after { animation: tutRing 3s ease-out infinite; }
.tut-hold .tut-info { animation: tutInfo 3s ease-in-out infinite; }
@keyframes tutFingerHold { 0%, 8% { opacity: 0; transform: scale(1.3); } 16%, 78% { opacity: 1; transform: scale(.9); } 88%, 100% { opacity: 0; transform: scale(1.1); } }
@keyframes tutRing { 0%, 16% { opacity: 0; transform: scale(.6); } 30% { opacity: .9; } 50%, 100% { opacity: 0; transform: scale(1.8); } }
@keyframes tutInfo { 0%, 28% { opacity: 0; } 38%, 78% { opacity: 1; } 88%, 100% { opacity: 0; } }

/* Двойной тап */
.tut-like .tut-finger { top: 45%; animation: tutFingerTap 2.4s ease-in-out infinite; }
.tut-like .tut-finger::after { animation: tutTapRing 2.4s ease-out infinite; }
.tut-like .tut-heart { animation: tutHeart 2.4s ease-out infinite; }
@keyframes tutFingerTap {
  0%, 10% { opacity: 0; transform: scale(1.2); }
  16% { opacity: 1; transform: scale(1); } 22% { transform: scale(.75); } 28% { transform: scale(1); }
  34% { transform: scale(.75); } 40% { transform: scale(1); }
  55%, 100% { opacity: 0; }
}
@keyframes tutTapRing { 0%, 20% { opacity: 0; transform: scale(.6); } 24% { opacity: .9; } 36% { opacity: .9; transform: scale(1.2); } 50%, 100% { opacity: 0; transform: scale(1.9); } }
@keyframes tutHeart {
  0%, 38% { opacity: 0; transform: translate(-50%, -50%) scale(0); }
  48% { opacity: 1; transform: translate(-50%, -50%) scale(1.25); }
  58%, 80% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  95%, 100% { opacity: 0; transform: translate(-50%, -60%) scale(1.3); }
}
.preview-reel .co-tag--rating { pointer-events: none; }
.ob-nav { display: flex; gap: 10px; margin-top: 18px; }
.ob-nav .btn { margin-top: 0; }
.ob-nav .ob-back { flex: 0 0 34%; }
.ob-nav .btn-primary { flex: 1; }

/* ── Лайки: вкладки, шестерёнка, лимит ── */
.likes-head { display: flex; align-items: center; gap: 10px; margin: 20px 0 10px; }
.likes-head .sec-title { margin: 0; flex: 1; }
.likes-left { font-size: 12px; font-weight: 800; color: var(--muted); white-space: nowrap; }
.likes-left.zero { color: var(--neon-2); }
.icon-btn {
  width: 40px; height: 40px; flex: 0 0 auto; border-radius: 12px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line); color: var(--text);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: transform .15s, border-color .2s;
}
.icon-btn:active { transform: scale(.94); border-color: var(--neon-line); }
.icon-btn .ic { width: 20px; height: 20px; }
.seg {
  display: flex; gap: 4px; padding: 4px; margin-bottom: 12px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px;
}
.seg-btn {
  flex: 1; min-width: 0; padding: 10px 4px; border-radius: 10px; cursor: pointer;
  background: none; border: 1px solid transparent; color: var(--muted);
  font-size: 12px; font-weight: 800; line-height: 1.2; transition: all .15s;
}
.seg-btn b { color: var(--neon-2); margin-left: 2px; }
.seg-btn.active {
  color: var(--text); background: var(--neon-soft); border-color: var(--neon-line);
  box-shadow: 0 0 12px rgba(255, 90, 31, .18);
}
.likes-reel-btn { margin: 0 0 12px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.likes-reel-btn.hidden { display: none; }
.likes-reel-btn .ic { width: 18px; height: 18px; }
.view-counter { margin-left: auto; font-size: 13px; font-weight: 900; color: var(--neon-2); white-space: nowrap; }
.settings-body { padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
.settings-body .f-label { display: flex; align-items: center; gap: 6px; }
.settings-body .f-label .ic { width: 14px; height: 14px; }
.settings-body .toggle { margin-top: 14px; text-align: left; }
.settings-note { margin-top: 18px; }

/* ── Обязательная подписка ── */
.sub-gate { z-index: 90; }
.sub-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.sub-item {
  display: block; width: 100%; padding: 13px; border-radius: 14px; cursor: pointer;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .10);
  color: var(--text); font-weight: 800; font-size: 15px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.sub-item:active { transform: scale(.98); border-color: var(--neon-line); }
#view-card .card.view-in-up { animation: view-in-up .26s cubic-bezier(.17,.84,.44,1); }
#view-card .card.view-in-down { animation: view-in-down .26s cubic-bezier(.17,.84,.44,1); }
@keyframes view-in-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes view-in-down { from { transform: translateY(-40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Плашка «дозаполни» ведёт сюда — секунду подсвечиваем нужное поле, чтобы не гадать,
   про какой из двух похожих блоков (например, ранг vs максимальный ранг) речь. */
.field-missing-flash {
  animation: field-missing-pulse 1.8s ease-out;
  border-radius: 12px;
}
@keyframes field-missing-pulse {
  0%, 100% { box-shadow: none; }
  15%, 55% { box-shadow: 0 0 0 3px var(--neon), 0 0 22px var(--neon-glow); }
}


/* ── Ник в игре: копируется в один тап ── */
.co-top { flex: 0 0 auto; margin-bottom: auto; min-width: 0; }
.co-top .co-head { margin-bottom: 0; }
.co-gamenick {
  pointer-events: auto; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px; max-width: 100%;
  margin-top: 6px; padding: 6px 10px 6px 8px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: 10px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  color: #fff; font: inherit; text-align: left;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  transition: transform .12s, border-color .2s, background .2s;
}
.co-gamenick:active { transform: scale(.96); }
.co-gamenick .gn-label {
  flex-shrink: 0; font-size: 9px; font-weight: 900; letter-spacing: .1em;
  color: var(--neon-2); background: var(--neon-soft); border-radius: 5px; padding: 2px 5px;
}
.co-gamenick .gn-nick {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: pre;
  font-size: 15px; font-weight: 800; text-shadow: 0 1px 6px rgba(0,0,0,.9);
  unicode-bidi: isolate;
}
.co-gamenick .ic { width: 15px; height: 15px; flex-shrink: 0; color: rgba(255,255,255,.7); }
.co-gamenick.copied { border-color: rgba(34,197,94,.7); background: rgba(34,197,94,.16); }
.co-gamenick.copied .ic { color: #4ade80; }
.card-body .co-gamenick { margin: 2px 0 8px; }

/* ── Скрины в анкете ── */
.shots-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.shot-tile {
  position: relative; aspect-ratio: 1 / 1; overflow: hidden; cursor: pointer;
  background: var(--bg-2); border: 1px dashed var(--line); border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.shot-tile.has { border-style: solid; border-color: var(--neon-line); }
.shot-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.shot-plus { font-size: 26px; font-weight: 300; color: var(--muted); margin-bottom: 16px; }
.shot-label {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 8px 6px;
  font-size: 10.5px; font-weight: 700; line-height: 1.2; color: #dfe3ee;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.85));
}
.shot-label b { color: var(--neon-2); }
.shot-del {
  position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.2); background: rgba(0,0,0,.65); color: #fff;
  font-size: 16px; font-weight: 900; line-height: 1; cursor: pointer;
}
.shot-tile.loading::after {
  content: 'Загружаю…'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.6); font-size: 12px; font-weight: 800; color: var(--neon-2);
}


/* ── Скрины в панели по зажатию: сеткой 2×2 в свободном месте наверху ── */
.peek.has-shots { justify-content: flex-start; }
.peek.has-shots .peek-inner { margin-top: auto; max-height: none; min-height: 0; flex: 0 1 auto; }
.peek-shots { flex: 0 0 auto; display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.peek-shots-row { display: flex; gap: 8px; align-items: flex-start; }
.peek-shot { margin: 0; min-width: 0; }
.peek-shot figcaption {
  font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: #ffd38a; margin: 0 0 4px 2px; text-shadow: 0 1px 4px rgba(0,0,0,.9);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.peek-shot img {
  display: block; width: 100%; height: auto; object-fit: cover;
  border-radius: 10px; background: rgba(8,10,16,.75);
  border: 1px solid rgba(255,255,255,.12);
  pointer-events: none; -webkit-user-drag: none; user-select: none; -webkit-touch-callout: none;
}
.peek-inner { scrollbar-width: none; }
.peek-inner::-webkit-scrollbar { display: none; }

/* ── Кнопка музыки в нижнем меню: просто значок, без подписи и рамки ── */
.tab-music { display: flex; align-items: center; justify-content: center; }
.tab-music .ic { width: 27px; height: 27px; color: var(--muted); transition: color .25s, filter .25s; }
.tab-music.playing .ic {
  color: var(--neon-2);
  filter: drop-shadow(0 0 12px rgba(255, 90, 31, .8));
  animation: music-pulse 1.9s ease-in-out infinite;
}
@keyframes music-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .7; }
}
@media (prefers-reduced-motion: reduce) { .tab-music.playing .ic { animation: none; } }
