/* ================================================================
   styles-profile.css — Страница профиля (полная перезапись)
   Подключается ПОСЛЕ styles.css
   ================================================================ */

/* ── Обёртка страницы ─────────────────────────────────────────── */
#page-profile {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.profile-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0 0 calc(var(--safe-bottom) + 80px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ── АВАТАР-ГЕРОЙ (верх страницы) ─────────────────────────────── */
.profile-hero {
  position: relative;
  width: 100%;
  /* В свёрнутом: высота под круглую аватарку + отступы */
  height: calc(min(50vw, 200px) + 40px);
  overflow: hidden;
  background: var(--bg2);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  flex-shrink: 0;
  /* плавное изменение высоты */
  transition: height 0.35s cubic-bezier(.4,0,.2,1);
}

/* Обёртка: центрирует круг, убирается при раскрытии */
.profile-hero-avatar-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  transition: padding 0.35s cubic-bezier(.4,0,.2,1);
}

/* Круг — фиксированный квадрат, скруглённый 50% */
.profile-hero-avatar-inner {
  width: min(50vw, 200px);
  height: min(50vw, 200px);
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
  border: 2.5px solid rgba(255,255,255,0.14);
  box-shadow: 0 8px 36px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.04);
  transition:
    width 0.35s cubic-bezier(.4,0,.2,1),
    height 0.35s cubic-bezier(.4,0,.2,1),
    border-radius 0.35s cubic-bezier(.4,0,.2,1),
    border-color 0.35s ease,
    box-shadow 0.35s ease;
}

.profile-hero-avatar-inner img,
.profile-hero-avatar-inner .profile-hero-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-hero-fallback {
  display: grid;
  place-items: center;
  font-size: clamp(32px, 14vw, 84px);
  font-weight: 900;
  color: rgba(255,255,255,0.9);
}

/* Ник поверх фото (только в развёрнутом состоянии) */
.profile-hero-nick-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 52px 20px 18px;
  background: linear-gradient(to top, rgba(0,0,0,0.80) 0%, rgba(0,0,0,0.20) 60%, transparent 100%);
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  letter-spacing: .2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transition: opacity 0.26s ease 0.08s;
  pointer-events: none;
}

/* ── HERO — развёрнутое состояние (как в TG) ────────────────────── */
.profile-hero.expanded {
  height: 75vw;
}

/* убираем padding — фото на весь блок */
.profile-hero.expanded .profile-hero-avatar-wrap {
  padding: 0;
}

/* растягиваем до 100%, убираем круг */
.profile-hero.expanded .profile-hero-avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 0;
  border-color: transparent;
  box-shadow: none;
}

/* показываем оверлей-ник снизу */
.profile-hero.expanded .profile-hero-nick-overlay {
  opacity: 1;
}

/* ── НИК под аватаркой — скрывается при expanded ─────────────────── */
.profile-nick-row {
  text-align: center;
  padding: 16px 20px 4px;
  /* плавное появление/скрытие */
  overflow: hidden;
  max-height: 60px;
  opacity: 1;
  transition:
    max-height 0.32s cubic-bezier(.4,0,.2,1),
    opacity 0.22s ease,
    padding 0.32s cubic-bezier(.4,0,.2,1),
    margin 0.32s cubic-bezier(.4,0,.2,1);
}

/* когда hero развёрнут — прячем ник снизу */
.profile-hero.expanded ~ .profile-nick-row {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.profile-nick-text {
  font-size: 28px;
  font-weight: 900;
  color: var(--text, #e0e0e0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  max-width: 100%;
  /* font-size уменьшается через JS если не влезает, минимум 14px */
}

/* ── ПЛАШКИ ───────────────────────────────────────────────────── */
.profile-cards-new {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 14px 0;
}

.pcard {
  background:
    radial-gradient(520px 260px at 20% 0%, rgba(var(--accent-rgb), .10), transparent 65%),
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(0,0,0,0)),
    var(--bg2);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}

/* ── Плашка: username + id ────────────────────────────────────── */
.pcard-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pcard-identity-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(var(--accent-rgb), .12);
  border: 1px solid rgba(var(--accent-rgb), .20);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--accent);
}

.pcard-identity-icon svg {
  width: 20px;
  height: 20px;
}

.pcard-identity-info {
  min-width: 0;
  flex: 1;
}

.pcard-identity-username {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pcard-identity-id {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Плашка: группа + корпус ──────────────────────────────────── */
.pcard-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pcard-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pcard-row-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(var(--accent-rgb), .10);
  border: 1px solid rgba(var(--accent-rgb), .16);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--accent);
}

.pcard-row-icon svg {
  width: 18px;
  height: 18px;
}

.pcard-row-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.pcard-row-value {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}

.pcard-divider {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 0 -2px;
}

/* ── Плашка: подписка ─────────────────────────────────────────── */
.pcard-sub-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.pcard-sub-title-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(var(--accent-rgb), .12);
  border: 1px solid rgba(var(--accent-rgb), .20);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--accent);
}

.pcard-sub-title-icon svg {
  width: 20px;
  height: 20px;
}

.pcard-sub-title-text {
  font-size: 15px;
  font-weight: 900;
  color: var(--text);
}

.pcard-sub-title-text small {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 1px;
}

.pcard-sub-rows {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: rgba(0,0,0,0.18);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.05);
  overflow: hidden;
}

.pcard-sub-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
}

.pcard-sub-row + .pcard-sub-row {
  border-top: 1px solid rgba(255,255,255,0.05);
}

.pcard-sub-row-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.pcard-sub-row-val {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  text-align: right;
}

.pcard-sub-row-val.accent {
  color: var(--accent);
}

.pcard-sub-row-val.muted {
  color: var(--text-muted);
}

/* статус подписки */
.pcard-sub-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .2px;
  border: 1px solid rgba(var(--accent-rgb), .30);
  background: rgba(var(--accent-rgb), .12);
  color: rgba(255,255,255,.90);
  margin-left: auto;
  margin-top: 10px;
  width: fit-content;
}

.pcard-sub-badge.expired {
  border-color: rgba(255,80,80,.30);
  background: rgba(255,80,80,.14);
}

.pcard-sub-badge.infinite {
  border-color: rgba(100,210,140,.30);
  background: rgba(100,210,140,.12);
  color: #7ef0a6;
}

/* ── Кнопка «Участники группы» ────────────────────────────────── */
.profile-members-btn {
  margin: 14px 14px 0;
  width: calc(100% - 28px);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background:
    radial-gradient(520px 260px at 20% 0%, rgba(var(--accent-rgb), .08), transparent 65%),
    rgba(255,255,255,.03);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: transform .10s ease, background .12s ease;
  color: var(--text);
  text-align: left;
}

.profile-members-btn:active {
  transform: scale(.98);
  background: rgba(255,255,255,.05);
}

.profile-members-btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(var(--accent-rgb), .12);
  border: 1px solid rgba(var(--accent-rgb), .20);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--accent);
}

.profile-members-btn-icon svg {
  width: 20px;
  height: 20px;
}

.profile-members-btn-content {
  min-width: 0;
  flex: 1;
}

.profile-members-btn-title {
  font-size: 15px;
  font-weight: 900;
  color: var(--text);
  display: block;
}

.profile-members-btn-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.30);
  display: block;
  margin-top: 2px;
}

.profile-members-btn-arrow {
  color: rgba(255,255,255,0.25);
  flex-shrink: 0;
}

/* ================================================================
   GROUP MEMBERS MODAL — BOTTOM SHEET REDESIGN
   ================================================================ */

/* #groupMembersModal — перенесён в .gm-overlay (редизайн) */
#groupAdminModal {
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;

  background: rgba(0,0,0,0.50);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

#groupAdminModal.is-open {
  opacity: 1;
  pointer-events: auto;
}

#groupAdminModal.hidden {
  display: none !important;
}

/* ── Карточка-шторка снизу (admin) ──────────────────────────── */
#groupAdminModal .fs-modal-sheet {
  position: relative !important;
  inset: auto !important;

  width: 100%;
  max-width: 600px;
  height: calc(82vh - var(--safe-top));
  max-height: calc(82vh - var(--safe-top));
  min-height: 320px;

  border-radius: 22px 22px 0 0;
  border: 1px solid rgba(255,255,255,0.08);
  border-bottom: none;

  background:
    radial-gradient(520px 320px at 50% 0%, rgba(var(--accent-rgb), .12), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(0,0,0,0)),
    rgba(18,18,18, 0.93);

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  box-shadow:
    0 0 0 1px rgba(var(--accent-rgb), .06),
    0 -8px 40px rgba(0,0,0,.55);

  /* свечение красное сверху */
  border-top: 1px solid rgba(var(--accent-rgb), .20);

  display: flex;
  flex-direction: column;
  overflow: hidden;

  /* анимация выезжания снизу */
  transform: translateY(100%);
  transition: transform 280ms cubic-bezier(.32,0,.24,1);
  will-change: transform;
}

#groupAdminModal.is-open .fs-modal-sheet {
  transform: translateY(0);
}

#groupAdminModal.is-closing .fs-modal-sheet {
  transform: translateY(100%);
}

/* ── Ручка + хедер шторки ───────────────────────────────────── */
.fs-modal-handle {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  margin: 10px auto 0;
  flex-shrink: 0;
}

#groupAdminModal .fs-modal-header {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;

  padding: 10px 14px 12px;
  border-bottom: 1px solid rgba(255,255,255,.06);

  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

#groupAdminModal .fs-modal-title {
  grid-column: 2 / 3;
  text-align: center;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: .2px;
  color: rgba(255,255,255,.95);
}

#groupAdminModal .fs-modal-close,
#groupAdminClose {
  grid-column: 3 / 4;
  justify-self: end;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.80);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 14px;
  transition: transform .08s ease, background .12s ease;
}

#groupAdminModal .fs-modal-close:active,
#groupAdminClose:active {
  transform: scale(.95);
  background: rgba(255,255,255,.10);
}

/* заглушка-псевдоэлемент слева (балансирует grid) */
#groupAdminModal .fs-modal-header::before {
  content: "";
  grid-column: 1 / 2;
  width: 36px;
  height: 36px;
  opacity: 0;
}

/* ── Список участников (admin) ──────────────────────────────── */
#groupAdminModal .fs-modal-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 14px 20px;
  padding-bottom: calc(20px + var(--safe-bottom));
}

/* ── Карточка участника (admin) ──────────────────────────────── */
#groupAdminModal .member-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 8px;

  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 16px;
}

.member-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.member-full-name {
  font-weight: 800;
  font-size: 14px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-at {
  font-size: 12px;
  color: rgba(255,255,255,.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Заголовок секции ──────────────────────────────────────────── */
.members-section-title {
  margin: 14px 4px 6px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .5px;
  color: rgba(255,255,255,.50);
  text-transform: uppercase;
}

/* ── Admin modal safe-top ─────────────────────────────────────── */
#groupAdminModal .fs-modal-sheet {
  padding-top: 0;
}


/* ================================================================
   REDESIGN: МОДАЛКА УЧАСТНИКОВ ГРУППЫ
   ================================================================ */

/* ── Оверлей ─────────────────────────────────────────────────────── */
.gm-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;

  background: rgba(0, 0, 0, 0);
  transition: background 0.32s cubic-bezier(0.32, 0.72, 0.34, 1);
  pointer-events: auto;
  display: block;
  padding: 0 !important;
  margin: 0 !important;
}

.gm-overlay.is-open {
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.gm-overlay.hidden {
  display: none !important;
}

/* ── Шторка снизу ───────────────────────────────────────────────── */
.gm-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  /* Занимает весь экран снизу, как модалка просмотра заметки */
  top: calc(var(--safe-top, 0px) + 18px);

  border-radius: 24px 24px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: none;

  background:
    radial-gradient(600px 280px at 50% 0%, rgba(var(--accent-rgb), 0.10), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,.035) 0%, rgba(0,0,0,0) 60%),
    rgba(20, 20, 20, 0.92);

  backdrop-filter: blur(28px) saturate(1.4);
  -webkit-backdrop-filter: blur(28px) saturate(1.4);

  box-shadow:
    0 -24px 60px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);

  display: flex;
  flex-direction: column;
  overflow: hidden;

  transform: translateY(100%);
  transition: transform 0.36s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}

.gm-overlay.is-open .gm-sheet {
  transform: translateY(0);
}

.gm-overlay.is-closing .gm-sheet {
  transform: translateY(100%);
}

/* ── Акцентная полоска сверху ────────────────────────────────────── */
.gm-accent-strip {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
  box-shadow: 0 0 22px rgba(var(--accent-rgb), 0.80), 0 0 6px rgba(var(--accent-rgb), 0.60);
  border-radius: 3px 3px 0 0;
  z-index: 2;
  pointer-events: none;
}

/* ── Шапка: заголовок + крестик ─────────────────────────────────── */
.gm-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  padding: 20px 16px 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0) 100%);
}

.gm-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.2;
  flex: 1 1 auto;
  min-width: 0;
}

/* Крестик в кружке — как у модалки заметок */
.gm-close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.70);

  display: inline-flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, transform 0.10s ease;
  -webkit-tap-highlight-color: transparent;
}

.gm-close:hover {
  background: rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.95);
}

.gm-close:active {
  transform: scale(0.92);
}

.gm-close svg {
  width: 16px;
  height: 16px;
  display: block;
}

/* ── Бейдж: сколько участников ──────────────────────────────────── */
.gm-count-badge {
  flex: 0 0 auto;
  margin: 12px 16px 0;
  padding: 9px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);

  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.60);
  letter-spacing: 0.1px;

  display: flex;
  align-items: center;
  gap: 8px;
}

/* Иконка-точка слева */
.gm-count-badge::before {
  content: "";
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 7px rgba(var(--accent-rgb), 0.75);
  flex: 0 0 auto;
}

/* Скрываем если пусто */
/* .gm-count-badge:empty — не скрываем, внутри всегда есть текст */
.gm-count-badge.really-empty {
  display: none;
}

/* ── Кнопка управления (для старосты) ───────────────────────────── */
.gm-actions-wrap {
  flex: 0 0 auto;
  padding: 10px 16px 0;
}

.gm-actions-wrap:empty {
  padding: 0;
}

.gm-actions-wrap .mini-btn {
  width: 100%;
  height: 42px;
  border-radius: 14px;
  background: rgba(var(--accent-rgb), .10);
  border-color: rgba(var(--accent-rgb), .22);
}

/* ── Тело (скроллится) ──────────────────────────────────────────── */
.gm-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 10px 14px calc(20px + var(--safe-bottom, 0px));
}

.gm-list {
  display: flex;
  flex-direction: column;
}

/* ── Секция "Участники с доступом" ──────────────────────────────── */
.gm-list .members-section-title {
  margin: 14px 2px 8px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.38);
}

/* ── Блок "Старосты" — выделенная плашка ─────────────────────────── */
.gm-list .member-item.is-starosta {
  background:
    linear-gradient(135deg,
      rgba(var(--accent-rgb), 0.14) 0%,
      rgba(var(--accent-rgb), 0.05) 100%);
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  border-radius: 18px;
  padding: 13px 14px;
  margin-bottom: 4px;

  box-shadow:
    0 0 0 1px rgba(var(--accent-rgb), 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Аватар у старосты — чуть больше */
.gm-list .member-item.is-starosta .member-avatar {
  width: 50px;
  height: 50px;
}

.gm-list .member-item.is-starosta .member-avatar-letter {
  font-size: 19px;
}

.gm-list .member-item.is-starosta .member-username {
  font-size: 15px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.97);
}

.gm-list .member-item.is-starosta .member-badge {
  background: rgba(var(--accent-rgb), 0.20);
  border-color: rgba(var(--accent-rgb), 0.45);
  color: var(--accent);
}

/* ── Обычные участники — увеличены и с коралловым свечением ─────── */
.gm-list .member-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 7px;

  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;

  transition: box-shadow 0.20s ease, border-color 0.20s ease, background 0.15s ease;
  box-shadow:
    0 2px 12px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(var(--accent-rgb), 0.05);
}

.gm-list .member-item:not(.is-starosta):hover {
  border-color: rgba(var(--accent-rgb), 0.20);
  background: rgba(var(--accent-rgb), 0.04);
  box-shadow:
    0 4px 18px rgba(0, 0, 0, 0.30),
    0 0 14px rgba(var(--accent-rgb), 0.12),
    0 0 0 1px rgba(var(--accent-rgb), 0.10);
}

/* Аватар увеличен */
.gm-list .member-item:not(.is-starosta) .member-avatar {
  width: 48px;
  height: 48px;
}

.gm-list .member-item:not(.is-starosta) .member-avatar-letter {
  font-size: 18px;
}

.gm-list .member-item:not(.is-starosta) .member-username {
  font-size: 15px;
  font-weight: 800;
}

/* Ник (username) — серо-акцентный */
.gm-list .member-item .member-nick {
  font-size: 12.5px;
  color: rgba(var(--accent-rgb), 0.65);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

/* Sub-строка (ID) */
.gm-list .member-item .member-sub {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.32);
}

/* ── Stagger-анимация появления участников ───────────────────────── */
@keyframes gm-item-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.gm-list.stagger-anim > * {
  animation: gm-item-in 0.38s cubic-bezier(0.34, 1.2, 0.64, 1) both;
  animation-delay: calc(var(--stg-i, 0) * 42ms);
  will-change: opacity, transform;
}

/* Анимация появления бейджа и кнопки управления */
.gm-count-badge.gm-fade-in,
.gm-actions-wrap.gm-fade-in {
  animation: gm-item-in 0.32s cubic-bezier(0.34, 1.2, 0.64, 1) both;
  animation-delay: 30ms;
}
