

body {
  background: var(--surface-ground);
  color: #fff;
}

body.modal-open {
  overflow: hidden;
  overscroll-behavior: none;
}

body[data-profile-login] {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body[data-profile-login] footer.footer {
  margin-top: auto;
}

#edit-profile-btn {
  color: #8a8a8a;
  cursor: pointer;
  font-size: 1.1em;
}

#profile-files-grid {
  align-items: start;
  background: transparent;
  box-sizing: border-box;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(min(18.75rem,100%), 1fr));
  justify-content: center;
  justify-items: center;
  margin: 0 auto;
  max-width: 84.375rem;
  min-height: 13.75rem;
  padding: 1.25rem 0;
  width: 100%;
}

#profile-files-outer {
  box-sizing: border-box;
  display: block;
  margin: 4.0625rem auto 0 auto;
  max-width: 75rem;
  overflow-x: hidden;
  padding: 0 0.75rem 4rem 0.75rem;
  position: relative;
  width: 100%;
  z-index: 1;
}

#profile-modal .modal-content {
  align-items: center;
  animation: none;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: var(--modal-border);
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0 auto;
  max-height: 90vh;
  max-width: 34rem;
  min-width: 20rem;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0;
  position: relative;
  width: 92vw;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.admin-btn {
  background: var(--brand);
  border-radius: var(--radius);
  border: 0.0625rem solid rgba(255,255,255,0.06);
  color: #fff;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0;
  padding: 0.5rem 1rem;
  transition: all 0.2s ease;
}

.admin-btn.danger {
  background: var(--danger);
  border-color: rgba(0,0,0,0.2);
  color: #fff;
}


.admin-btn:hover {
  filter: brightness(1.06);
  transform: translateY(-0.0625rem);
}

.admin-name {
  color: var(--brand);
  font-weight: 600;
}



.admin-section {
  font-optical-sizing: auto;
  font-variation-settings: "ELGR" 1, "ELSH" 2;
  width: 100%;
}

.author-telegram-link, .telegram-link {
  color: #7ecbff;
  text-decoration: none;
}

.author-telegram-link:hover, .telegram-link:hover {
  color: #3fa6ff;
  text-decoration: none;
}

.avatar-box {
  align-items: center;
  background: transparent;
  border-radius: 0.875rem;
  display: flex;
  height: 5rem;
  justify-content: center;
  overflow: hidden;
  width: 5rem;
}

.avatar-box img {
  border-radius: 0.875rem;
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}







.badge-hover-popup {
  align-items: center;
  background: var(--surface,#262626);
  border-radius: var(--radius,0.375rem);
  border: 0.0625rem solid #404040;
  display: none;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 2px;
  justify-content: center;
  left: 0;
  max-width: 180px;
  min-width: 32px;
  padding: 4px;
  position: absolute;
  top: calc(100% - 2px);
  z-index: 50;
}

.badge-multi-group {
  align-items: center;
  display: inline-flex;
  gap: 4px;
}

.badge-overflow-btn {
  align-items: center;
  background: #333;
  border-radius: 6px;
  box-sizing: border-box;
  color: #bbb;
  cursor: default;
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 700;
  height: 1.5rem;
  justify-content: center;
  line-height: 1;
  min-width: 1.5rem;
  padding: 0 0.375rem;
  -webkit-user-select: none;
  user-select: none;
  white-space: nowrap;
}

.badge-overflow-group {
  align-items: center;
  display: inline-flex;
  position: relative;
}

.badge-overflow-group.open .badge-hover-popup, .badge-overflow-group:hover .badge-hover-popup {
  display: flex;
}

.badge-overflow-group::after {
  content: '';
  height: 12px;
  left: 0;
  position: absolute;
  right: 0;
  top: 100%;
}

.badge-popup-icon {
  border-radius: var(--radius,0.375rem);
  border: 0.0625rem solid transparent;
  box-sizing: border-box;
  height: 32px;
  object-fit: contain;
  outline: none;
  padding: 2px;
  transition: border-color 0.15s;
  width: 32px;
}

.badge-popup-icon.active {
  border-color: #789d2a;
}

.badge-popup-icon:hover {
  border-color: #404040;
}












.desktop-only {
  align-items: center;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  margin-top: 5rem;
  padding: 0 0.75rem;
  width: 100%;
}

.desktop-only #edit-profile-btn {
  color: #8a8a8a;
  cursor: pointer;
  font-size: 1em;
}

/* NB: .desktop-only .profile-avatar / .profile-card / .profile-info /
   .profile-links / .profile-name определены в консолидированном блоке
   «PROFILE CARD — Claude Design import» в конце файла. */

.desktop-only .profile-stats {
  color: #8f8f8f;
  font-size: 1.125rem;
  font-weight: 600;
}



.edit-link {
  color: #8f8f8f;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
}

.filter-btn {
  align-items: center;
  background: transparent;
  border-radius: 0.5rem;
  border: none;
  color: #8f8f8f;
  cursor: pointer;
  display: flex;
  font-size: 1rem;
  font-weight: 500;
  gap: 0.5rem;
  height: 2.5rem;
  justify-content: center;
  line-height: 1;
  margin: 0;
  padding: 0.5rem 0.75rem;
  transition: all 0.18s ease;
  vertical-align: top;
}

.filter-btn span {
  display: inline-block;
  font-size: 1rem;
  line-height: 1;
  vertical-align: middle;
}

.filter-btn.active {
  background: var(--brand);
  color: #fff;
}

.filter-btn.active:hover {
  background: var(--brand);
  transform: scale(1.05);
}

.filter-btn:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}



.filters-container {
  -webkit-overflow-scrolling: touch;
  align-items: center;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  background: var(--surface);
  border-radius: 0.75rem;
  border: 0.0625rem solid #ffffff33;
  box-sizing: border-box;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  justify-content: center;
  margin: 1.25rem auto;
  max-width: 100%;
  overflow-x: auto;
  padding: 0.625rem 0.75rem;
  width: 100%;
}

.filters-container .filter-btn.active:hover {
  background: var(--brand);
  color: #fff;
  transform: scale(1.05);
}

.hidden-input {
  display: none;
}

.load-more-btn {
  background: rgba(255,255,255,0.04);
  border-radius: 0.5rem;
  border: none;
  color: #fff;
  cursor: pointer;
}

.mobile-only {
  display: none;
}

.modal-close {
  align-items: center;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  color: var(--ink-2);
  cursor: pointer;
  display: flex;
  flex-shrink: 0;
  font-size: 1rem;
  height: 2.125rem;
  justify-content: center;
  line-height: 1;
  padding: 0;
  position: static;
  transition: all 0.2s ease;
  width: 2.125rem;
}

.modal-close:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.2);
  color: #fff;
}

.modal-header {
  align-items: center;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-sizing: border-box;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  position: relative;
  width: 100%;
}

.modal-overlay {
  align-items: center;
  -webkit-backdrop-filter: blur(0px);
  backdrop-filter: blur(0px);
  background: rgba(0,0,0,0.0);
  display: none;
  height: 100%;
  justify-content: center;
  left: 0;
  position: fixed;
  top: 0;
  transition: background 220ms ease, -webkit-backdrop-filter 220ms ease, backdrop-filter 220ms ease;
  width: 100%;
  z-index: 2000;
}

.modal-overlay.show {
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  background: var(--overlay);
  display: flex;
}

.modal-title {
  color: #fff;
  font-size: 1.0625rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}











.profile-avatar {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.profile-avatar img {
  border-radius: 1rem;
  height: 7.5rem;
  object-fit: cover;
  width: 7.5rem;
}

.profile-badge-item {
  align-items: center;
  background: var(--surface-input, #181a1b);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-sizing: border-box;
  cursor: pointer;
  display: flex;
  height: 3.125rem;
  justify-content: center;
  transition: all 0.2s ease;
  width: 3.125rem;
}

.profile-badge-item img {
  height: 1.5rem;
  object-fit: contain;
  width: 1.5rem;
}

.profile-badge-item.active {
  background: rgba(120,157,42,0.14);
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand);
}

.profile-badge-item:hover {
  border-color: rgba(255,255,255,0.3);
}

.profile-badge-label {
  color: var(--ink-2);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.profile-badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.profile-badge-none {
  color: var(--ink-2);
  font-size: 1.1rem;
  line-height: 1;
}

.profile-block.banned .platform-badges img, .profile-card.banned .profile-links a img {
  display: inline-block;
  filter: none;
  opacity: 1;
}

.profile-block.banned .username, .profile-card.banned .profile-name {
  color: #ff4a4a;
  text-decoration-color: #ff4a4a;
  text-decoration: line-through;
}

.profile-card {
  align-items: center;
  border: 0.0625rem solid #ffffff33;
  box-sizing: border-box;
  display: flex;
  gap: 2.5rem;
  justify-content: space-between;
  max-width: 100%;
}

.profile-divider {
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  height: 0.0625rem;
  margin: 1.25rem -1.5rem 1.25rem -1.5rem;
  width: calc(100% + 3rem);
}

.profile-info {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
  min-width: 0;
  overflow: visible;
}

.profile-links {
  align-items: center;
  display: flex;
  gap: 1.5rem;
}

.profile-links a img {
  height: 2.5rem;
  transition: transform .2s;
  width: 2.5rem;
}

.profile-links a img:hover {
  transform: scale(1.1);
}

.profile-main-content {
  align-items: center;
  display: flex;
  gap: 2.5rem;
  justify-content: space-between;
  min-width: 0;
  width: 100%;
}

.profile-name {
  color: #fff;
  font-size: 2.2em;
  font-weight: 700;
  overflow: visible;
  text-align: left;
  word-break: break-word;
}

.profile-stats {
  align-items: center;
  color: #a0a0a0;
  display: flex;
  flex-wrap: wrap;
  font-size: 1.25rem;
  font-weight: 600;
  gap: 0.25rem;
  margin-top: 0.625rem;
  white-space: normal;
}





.telegram-btn {
  align-items: center;
  border-radius: 0.625rem;
  cursor: pointer;
  display: flex;
  font-size: 1rem;
  font-weight: 600;
  gap: 0.625rem;
  height: 3.125rem;
  justify-content: center;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: 0 0.75rem;
  box-sizing: border-box;
  transition: all 0.2s ease;
  -webkit-user-select: none;
  user-select: none;
  width: 100%;
}

.telegram-btn.link {
  background: linear-gradient(90deg,#27a7e7,#1b8dd6);
  color: #fff;
}

.telegram-btn.link:hover {
  background: linear-gradient(90deg,#34b4f4,#1ea1f0);
}

.telegram-btn.unlink {
  background: var(--surface-input, #181a1b);
  border-radius: 0.75rem;
  color: #fff;
  height: auto;
  justify-content: flex-start;
  padding: 0.75rem 0.875rem;
  position: relative;
}

.telegram-btn.unlink:hover {
  background: rgba(255,255,255,0.06);
}

.telegram-btn.unlink:hover .telegram-unlink {
  color: #ff6666;
}

.telegram-icon {
  border-radius: 50%;
  flex-shrink: 0;
  height: 2.5rem;
  width: 2.5rem;
}

.telegram-name {
  color: #fff;
  flex: 1;
  font-size: 1.0625rem;
  font-weight: 700;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.telegram-section {
  align-items: stretch;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
  max-width: 100%;
  width: 100%;
}

/* Виджет Telegram вставляет iframe фиксированной ширины (data-size="large"),
   который шире контента узкой модалки и обрезается её overflow-x: hidden. */
.telegram-section iframe {
  display: block;
  max-width: 100%;
  margin: 0 auto;
}

.telegram-status {
  font-size: 0.625rem;
  margin-left: 0;
  margin-top: 0.25rem;
  text-align: center;
}

.telegram-unlink {
  color: var(--ink-2);
  flex-shrink: 0;
  font-size: 1.125rem;
  line-height: 1;
  margin-left: auto;
  transition: color 0.2s;
}



.toggle-switch {
  background: #555;
  border-radius: 0.625rem;
  cursor: pointer;
  height: 1.25rem;
  position: relative;
  transition: background 0.3s ease;
  width: 2.5rem;
}

.toggle-switch.active {
  background: var(--brand);
}



.profile-modal-body {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.25rem;
  width: 100%;
}

.profile-modal-avatar-row {
  align-items: center;
  display: flex;
  gap: 1.125rem;
}

.profile-modal-avatar-wrap {
  flex-shrink: 0;
  height: 6.5rem;
  position: relative;
  width: 6.5rem;
}

.avatar-delete-btn {
  align-items: center;
  background: var(--surface);
  border-radius: 50%;
  border: 1px solid var(--line);
  box-shadow: 0 0 0 3px var(--surface);
  color: var(--ink-2);
  cursor: pointer;
  display: flex;
  font-size: 0.8125rem;
  height: 1.75rem;
  justify-content: center;
  line-height: 1;
  padding: 0;
  position: absolute;
  right: -0.375rem;
  top: -0.375rem;
  transition: all 0.2s ease;
  width: 1.75rem;
  z-index: 1;
}

.avatar-delete-btn:hover {
  background: var(--danger, #ef4444);
  border-color: var(--danger, #ef4444);
  color: #fff;
}

.profile-modal-identity {
  align-items: center;
  display: flex;
  gap: 0.5rem;
  min-width: 0;
}

.profile-modal-badge {
  align-items: center;
  background: rgba(120,157,42,0.14);
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px var(--brand);
  display: flex;
  flex-shrink: 0;
  height: 1.75rem;
  justify-content: center;
  width: 1.75rem;
}

.profile-modal-badge img {
  height: 1rem;
  object-fit: contain;
  width: 1rem;
}

.profile-modal-username {
  color: var(--ink, #ebebeb);
  font-size: 1.25rem;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-area {
  background: rgba(68,68,68,0.4);
  border-radius: 1rem;
  border: 0.125rem dashed rgba(255,255,255,0.2);
  box-sizing: border-box;
  cursor: pointer;
  height: 100%;
  overflow: hidden;
  position: relative;
  transition: all 0.3s ease;
  width: 100%;
}

.upload-area.dragover {
  background: rgba(51,51,51,0.6);
  border-color: var(--brand);
}

.upload-area:hover {
  background: rgba(51,51,51,0.6);
  border-color: var(--brand);
}

.upload-formats {
  color: var(--ink-2);
  font-size: 0.75rem;
  margin-top: -0.5rem;
}

.upload-icon {
  align-items: center;
  background: transparent;
  display: flex;
  height: 100%;
  justify-content: center;
  width: 100%;
}

.upload-placeholder {
  align-items: center;
  color: var(--ink-2);
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 0.5rem;
}

.upload-placeholder .avatar-preview {
  height: 1.75rem;
  opacity: 0.6;
  width: 1.75rem;
}

.upload-text {
  color: rgba(255,255,255,0.8);
  font-size: 0.9375rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.username {
  color: #ebebeb;
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1;
}

/* ADMIN PROFILE PANEL — админский блок внутри модалки «Редактирование профиля».
   Разметка отдаётся только администраторам (см. profile.html), а показывается
   только на десктопе: ниже 480px профиль переключается на .mobile-only, где
   кнопка «Редактировать» остаётся лишь у владельца. */

.admin-profile-panel {
  border-top: 1px solid var(--line);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
  padding-top: 1.25rem;
  width: 100%;
}

/* На чужом профиле owner-контролов нет — админ-блок остаётся единственным
   содержимым модалки, и разделитель сверху ему не нужен. */
.profile-modal-body > .admin-profile-panel:first-child {
  border-top: none;
  padding-top: 0;
}

.admin-profile-head {
  align-items: baseline;
  display: flex;
  gap: 0.5rem;
  justify-content: space-between;
}

.admin-profile-title {
  color: var(--ink, #ebebeb);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-profile-target {
  color: var(--ink-2);
  font-size: 0.8125rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-profile-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.admin-profile-label {
  color: var(--ink-2);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.admin-profile-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.admin-profile-prefix {
  color: var(--ink-2);
  font-size: 0.9375rem;
}

.admin-profile-input, .admin-profile-select {
  background: var(--surface-input, #181a1b);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-sizing: border-box;
  color: var(--ink, #ebebeb);
  flex: 1 1 9rem;
  font-family: inherit;
  font-size: 0.875rem;
  min-width: 0;
  outline: none;
  padding: 0.5rem 0.625rem;
  transition: border-color 0.2s ease;
}

.admin-profile-input:focus, .admin-profile-select:focus {
  border-color: var(--brand);
}

.admin-profile-btn {
  background: var(--brand);
  border-radius: var(--radius);
  border: 1px solid var(--brand);
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.5rem 0.875rem;
  transition: filter 0.2s ease, opacity 0.2s ease;
  white-space: nowrap;
}

.admin-profile-btn:hover:not(:disabled) {
  filter: brightness(1.12);
}

.admin-profile-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.admin-profile-btn.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink-2);
}

.admin-profile-btn.ghost:hover:not(:disabled) {
  border-color: rgba(255,255,255,0.3);
  color: var(--ink, #ebebeb);
  filter: none;
}

.admin-profile-btn.danger {
  align-self: flex-start;
  background: transparent;
  border-color: var(--danger, #ef4444);
  color: var(--danger, #ef4444);
}

.admin-profile-btn.danger:hover:not(:disabled) {
  background: var(--danger, #ef4444);
  color: #fff;
  filter: none;
}

.admin-profile-hint {
  color: var(--ink-2);
  font-size: 0.75rem;
  line-height: 1.4;
}

.admin-badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.admin-badge-item {
  align-items: center;
  background: var(--surface-input, #181a1b);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-sizing: border-box;
  cursor: pointer;
  display: flex;
  height: 3.125rem;
  justify-content: center;
  position: relative;
  transition: all 0.2s ease;
  width: 3.125rem;
}

.admin-badge-item:hover {
  border-color: rgba(255,255,255,0.3);
}

.admin-badge-item.active {
  background: rgba(120,157,42,0.14);
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand);
}

.admin-badge-item img {
  height: 1.5rem;
  object-fit: contain;
  width: 1.5rem;
}

.admin-badge-none {
  color: var(--ink-2);
  font-size: 1.1rem;
  line-height: 1;
}

.admin-badge-revoke {
  align-items: center;
  background: var(--surface);
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--ink-2);
  cursor: pointer;
  display: flex;
  font-size: 0.625rem;
  height: 1.125rem;
  justify-content: center;
  line-height: 1;
  padding: 0;
  position: absolute;
  right: -0.3125rem;
  top: -0.3125rem;
  transition: all 0.2s ease;
  width: 1.125rem;
}

.admin-badge-revoke:hover {
  background: var(--danger, #ef4444);
  border-color: var(--danger, #ef4444);
  color: #fff;
}

.admin-profile-danger {
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 1.125rem;
}

@media (max-width: 480px) {
  .admin-profile-panel {
    display: none;
  }
}

@media (max-width: 1024px) {
  #profile-files-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(15.625rem,100%), 1fr));
    max-width: 100%;
  }

  .profile-main-content {
    min-height: auto;
  }
}

@media (max-width: 480px) {
  body * {
    box-sizing: border-box;
  }

  #profile-files-grid {
    gap: 1rem;
    grid-template-columns: 1fr;
    max-width: 100%;
    padding: 0.625rem;
  }

  #profile-files-grid, .profile-main-content #profile-files-grid {
    margin: 0 auto;
    max-width: 73rem;
    padding-left: 0;
    padding-right: 0;
  }

  #profile-files-outer {
    padding: 0 0.75rem 4rem 0.75rem;
  }

  .avatar-col {
    align-items: center;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    justify-content: center;
  }

  .badge-desktop-extra {
    display: none !important;
  }

  .badge-overflow-desktop {
    display: none !important;
  }

  .badge-overflow-mobile {
    display: inline-flex;
  }

  .desktop-only {
    display: none;
  }

  .desktop-only .profile-card, .filters-container, .profile-block {
    margin: 0 auto;
    max-width: 73rem;
    width: 100%;
  }

  .filter-btn {
    align-items: center;
    display: inline-flex;
    flex-direction: column;
    flex: 0 0 auto;
    font-size: 0;
    gap: 0.25rem;
    justify-content: center;
    padding: 0.375rem;
  }

  .filter-btn span {
    display: none;
  }

  .filter-btn.active {
    flex-direction: column;
    gap: 0.25rem;
  }

  .filter-btn.active span {
    color: #e0e6ed;
    display: block;
    font-size: 0.625rem;
    line-height: 1;
    white-space: nowrap;
  }

  .filter-btn.active:hover {
    background: var(--brand);
    transform: scale(1.05);
  }

  

  .filters-container {
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 0.5rem 0.375rem;
    width: 100%;
  }

  .filters-container .filter-btn {
    align-items: center;
    display: inline-flex;
    flex-direction: row;
    flex-shrink: 0;
    flex: 0 0 auto;
    gap: 0.375rem;
    height: 4rem;
    justify-content: center;
    padding: 1rem 1.25rem;
  }

  

  .filters-container .filter-btn span {
    display: none;
    font-size: 0.8125rem;
    line-height: 1;
    transition: none;
  }

  .filters-container .filter-btn.label-visible span {
    display: block;
  }

  .filters-container::-webkit-scrollbar {
    height: 0.375rem;
  }

  .filters-container::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.08);
    border-radius: 0.25rem;
  }

  .mobile-only {
    align-items: center;
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .profile-block {
    background: #262626;
    border-radius: 0.875rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 0 auto;
    max-width: 100%;
    padding: 1.25rem;
    width: calc(100% - 1.5rem);
  }

  

  .profile-row {
    align-items: center;
    display: flex;
    flex-direction: row;
    gap: 0.875rem;
    justify-content: flex-start;
  }

  .profile-stats {
    font-size: 0.875rem;
    margin-top: 0.375rem;
  }

  .username {
    font-size: 1.5rem;
    line-height: 1;
    margin-bottom: 0.375rem;
  }

  @media (max-width: 480px) {
    #profile-files-grid, .profile-main-content #profile-files-grid {
      margin: 0 auto;
      max-width: 73rem;
      padding-left: 0;
      padding-right: 0;
    }

    .desktop-only .profile-card, .filters-container, .profile-block {
      margin: 0 auto;
      max-width: 73rem;
      width: 100%;
    }

    .filters-container {
      -webkit-overflow-scrolling: touch;
      display: flex;
      gap: 0.5rem;
      justify-content: flex-start;
      overflow-x: auto;
      padding: 0.5rem 0.375rem;
      width: 100%;
    }

    .filters-container .filter-btn {
      flex: 0 0 auto;
      height: 3rem;
      padding: 0.75rem 0.875rem;
    }

    

    .filters-container .filter-btn span {
      display: inline-block;
      font-size: 0.8125rem;
    }

    .filters-container .filter-btn.label-visible span {
      display: block;
    }

    .filters-container::-webkit-scrollbar {
      height: 0.375rem;
    }

    .filters-container::-webkit-scrollbar-thumb {
      background: rgba(255,255,255,0.08);
      border-radius: 0.25rem;
    }

    .mobile-only {
      align-items: center;
      display: flex;
      justify-content: center;
      width: 100%;
    }

    .profile-block {
      background: #262626;
      border-radius: 0.875rem;
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
      margin: 0 auto;
      max-width: 100%;
      padding: 1.25rem;
      width: calc(100% - 1.5rem);
    }

    

    .profile-row {
      align-items: center;
      display: flex;
      flex-direction: row;
      gap: 0.875rem;
      justify-content: flex-start;
    }

    .profile-stats {
      font-size: 0.875rem;
      margin-top: 0.375rem;
    }

    .username {
      font-size: 1.5rem;
      line-height: 1;
      margin-bottom: 0.375rem;
    }
  }
}

@media (max-width: 768px) {
  .admin-actions {
    flex-direction: column;
  }

  .admin-btn {
    justify-content: center;
    width: 100%;
  }

  .banned-detail-item {
    flex-direction: column;
    gap: 0.25rem;
  }

  .detail-label {
    min-width: auto;
  }

  @media (max-width: 480px) {
    #profile-files-grid, .profile-main-content #profile-files-grid {
      margin: 0 auto !important;
      max-width: 73rem !important;
      padding-left: 0 !important;
      padding-right: 0 !important;
    }

    .desktop-only .profile-card, .filters-container, .profile-block {
      margin: 0 auto;
      max-width: 73rem;
      width: 100%;
    }

    .filters-container {
      -webkit-overflow-scrolling: touch;
      display: flex !important;
      gap: 0.5rem;
      justify-content: flex-start;
      overflow-x: auto;
      padding: 0.5rem 0.375rem;
      width: 100%;
    }

    .filters-container .filter-btn {
      flex: 0 0 auto;
      height: 3rem;
      padding: 0.75rem 0.875rem;
    }

    

    .filters-container .filter-btn span {
      display: inline-block !important;
      font-size: 0.8125rem;
    }

    .filters-container .filter-btn.label-visible span {
      display: block;
    }

    .filters-container::-webkit-scrollbar {
      height: 6px;
    }

    .filters-container::-webkit-scrollbar-thumb {
      background: rgba(255,255,255,0.08);
      border-radius: 4px;
    }

    .mobile-only {
      align-items: center !important;
      display: block !important;
      display: flex !important;
      justify-content: center !important;
      width: 100%;
    }

    .profile-block {
      background: #262626;
      border-radius: 14px;
      display: flex;
      flex-direction: column;
      gap: 12px;
      margin: 0 auto;
      max-width: 100%;
      padding: 16px;
      padding: 20px;
      width: calc(100% - 24px);
    }

    

    .profile-row {
      align-items: center;
      display: flex;
      flex-direction: row;
      gap: 14px;
      justify-content: flex-start;
    }

    .profile-stats {
      font-size: 14px;
      margin-top: 6px;
    }

    .username {
      font-size: 24px;
      line-height: 1;
      margin-bottom: 6px;
    }
  }
}

@media (max-width: 900px) {
  

  @media (max-width: 480px) {
    #profile-files-grid, .profile-main-content #profile-files-grid {
      margin: 0 auto;
      max-width: 73rem;
      padding-left: 0;
      padding-right: 0;
    }

    .desktop-only .profile-card, .filters-container, .profile-block {
      margin: 0 auto;
      max-width: 73rem;
      width: 100%;
    }

    .filters-container {
      -webkit-overflow-scrolling: touch;
      display: flex;
      gap: 0.5rem;
      justify-content: flex-start;
      overflow-x: auto;
      padding: 0.5rem 0.375rem;
      width: 100%;
    }

    .filters-container .filter-btn {
      flex: 0 0 auto;
      height: 3rem;
      padding: 0.75rem 0.875rem;
    }

    

    .filters-container .filter-btn span {
      display: inline-block;
      font-size: 0.8125rem;
    }

    .filters-container .filter-btn.label-visible span {
      display: block;
    }

    .filters-container::-webkit-scrollbar {
      height: 0.375rem;
    }

    .filters-container::-webkit-scrollbar-thumb {
      background: rgba(255,255,255,0.08);
      border-radius: 0.25rem;
    }

    .mobile-only {
      align-items: center;
      display: flex;
      justify-content: center;
      width: 100%;
    }

    .profile-block {
      background: #262626;
      border-radius: 0.875rem;
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
      margin: 0 auto;
      max-width: 100%;
      padding: 1.25rem;
      width: calc(100% - 1.5rem);
    }

    

    .profile-row {
      align-items: center;
      display: flex;
      flex-direction: row;
      gap: 0.875rem;
      justify-content: flex-start;
    }

    .profile-stats {
      font-size: 0.875rem;
      margin-top: 0.375rem;
    }

    .username {
      font-size: 1.5rem;
      line-height: 1;
      margin-bottom: 0.375rem;
    }
  }
}

@media (min-width: 1025px) {
  body[data-profile-login] #profile-files-grid.feed-grid {
    background: transparent;
    color: #fff;
    font-size: clamp(0.875rem,1.2vw + 0.75rem,1.125rem);
    margin: 0 auto;
    max-width: 73rem;
    min-height: 13.75rem;
    opacity: 1;
    scrollbar-color: unset;
    scrollbar-width: none;
    transform: translateY(0);
    transition: opacity 0.35s cubic-bezier(0.4,0,0.2,1), transform 0.35s cubic-bezier(0.4,0,0.2,1);
    width: 100%;
  }

  html body[data-profile-login] div#profile-files-grid.feed-grid {
    align-items: start;
    display: grid;
    gap: 1.5rem;
    grid-auto-flow: row dense;
    grid-template-columns: repeat(auto-fill, minmax(min(18.75rem,100%), 1fr));
    justify-items: stretch;
    margin: 0 auto;
    max-width: 84.375rem;
    width: 100%;
  }

  #profile-files-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fill, minmax(min(18.75rem,100%), 1fr));
    justify-content: center;
    max-width: 84.375rem;
  }

  .filter-btn {
    font-size: 1rem;
  }

  .filter-btn span {
    font-size: 1rem;
  }

  .filter-btn.active {
    flex-direction: row;
  }

  .filter-btn.active span {
    font-size: 1rem;
  }

  .filters-container {
    justify-content: flex-start;
    margin: 1.25rem auto;
    max-width: 84.375rem;
  }

  @media (max-width: 480px) {
    #profile-files-grid, .profile-main-content #profile-files-grid {
      margin: 0 auto;
      max-width: 73rem;
      padding-left: 0;
      padding-right: 0;
    }

    .desktop-only .profile-card, .filters-container, .profile-block {
      margin: 0 auto;
      max-width: 73rem;
      width: 100%;
    }

    .filters-container {
      -webkit-overflow-scrolling: touch;
      display: flex;
      gap: 0.5rem;
      justify-content: flex-start;
      overflow-x: auto;
      padding: 0.5rem 0.375rem;
      width: 100%;
    }

    .filters-container .filter-btn {
      flex: 0 0 auto;
      height: 3rem;
      padding: 0.75rem 0.875rem;
    }

    

    .filters-container .filter-btn span {
      display: inline-block;
      font-size: 0.8125rem;
    }

    .filters-container .filter-btn.label-visible span {
      display: block;
    }

    .filters-container::-webkit-scrollbar {
      height: 0.375rem;
    }

    .filters-container::-webkit-scrollbar-thumb {
      background: rgba(255,255,255,0.08);
      border-radius: 0.25rem;
    }

    .mobile-only {
      align-items: center;
      display: flex;
      justify-content: center;
      width: 100%;
    }

    .profile-block {
      background: #262626;
      border-radius: 0.875rem;
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
      margin: 0 auto;
      max-width: 100%;
      padding: 1.25rem;
      width: calc(100% - 1.5rem);
    }

    

    .profile-row {
      align-items: center;
      display: flex;
      flex-direction: row;
      gap: 0.875rem;
      justify-content: flex-start;
    }

    .profile-stats {
      font-size: 0.875rem;
      margin-top: 0.375rem;
    }

    .username {
      font-size: 1.5rem;
      line-height: 1;
      margin-bottom: 0.375rem;
    }
  }
}

@media (min-width: 1200px) {
  html body[data-profile-login] div#profile-files-grid.feed-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(3,1fr);
    max-width: 100%;
  }

  @media (max-width: 480px) {
    #profile-files-grid, .profile-main-content #profile-files-grid {
      margin: 0 auto;
      max-width: 73rem;
      padding-left: 0;
      padding-right: 0;
    }

    .desktop-only .profile-card, .filters-container, .profile-block {
      margin: 0 auto;
      max-width: 73rem;
      width: 100%;
    }

    .filters-container {
      -webkit-overflow-scrolling: touch;
      display: flex;
      gap: 0.5rem;
      justify-content: flex-start;
      overflow-x: auto;
      padding: 0.5rem 0.375rem;
      width: 100%;
    }

    .filters-container .filter-btn {
      flex: 0 0 auto;
      height: 3rem;
      padding: 0.75rem 0.875rem;
    }

    

    .filters-container .filter-btn span {
      display: inline-block;
      font-size: 0.8125rem;
    }

    .filters-container .filter-btn.label-visible span {
      display: block;
    }

    .filters-container::-webkit-scrollbar {
      height: 0.375rem;
    }

    .filters-container::-webkit-scrollbar-thumb {
      background: rgba(255,255,255,0.08);
      border-radius: 0.25rem;
    }

    .mobile-only {
      align-items: center;
      display: flex;
      justify-content: center;
      width: 100%;
    }

    .profile-block {
      background: #262626;
      border-radius: 0.875rem;
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
      margin: 0 auto;
      max-width: 100%;
      padding: 1.25rem;
      width: calc(100% - 1.5rem);
    }

    

    .profile-row {
      align-items: center;
      display: flex;
      flex-direction: row;
      gap: 0.875rem;
      justify-content: flex-start;
    }

    .profile-stats {
      font-size: 0.875rem;
      margin-top: 0.375rem;
    }

    .username {
      font-size: 1.5rem;
      line-height: 1;
      margin-bottom: 0.375rem;
    }
  }
}

@media (min-width: 481px) {
  .badge-desktop-extra {
    display: inline-block;
  }

  .badge-overflow-desktop {
    display: inline-flex;
  }

  .badge-overflow-mobile {
    display: none !important;
  }

  @media (max-width: 480px) {
    #profile-files-grid, .profile-main-content #profile-files-grid {
      margin: 0 auto;
      max-width: 73rem;
      padding-left: 0;
      padding-right: 0;
    }

    .desktop-only .profile-card, .filters-container, .profile-block {
      margin: 0 auto;
      max-width: 73rem;
      width: 100%;
    }

    .filters-container {
      -webkit-overflow-scrolling: touch;
      display: flex;
      gap: 0.5rem;
      justify-content: flex-start;
      overflow-x: auto;
      padding: 0.5rem 0.375rem;
      width: 100%;
    }

    .filters-container .filter-btn {
      flex: 0 0 auto;
      height: 3rem;
      padding: 0.75rem 0.875rem;
    }

    

    .filters-container .filter-btn span {
      display: inline-block;
      font-size: 0.8125rem;
    }

    .filters-container .filter-btn.label-visible span {
      display: block;
    }

    .filters-container::-webkit-scrollbar {
      height: 0.375rem;
    }

    .filters-container::-webkit-scrollbar-thumb {
      background: rgba(255,255,255,0.08);
      border-radius: 0.25rem;
    }

    .mobile-only {
      align-items: center;
      display: flex;
      justify-content: center;
      width: 100%;
    }

    .profile-block {
      background: #262626;
      border-radius: 0.875rem;
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
      margin: 0 auto;
      max-width: 100%;
      padding: 1.25rem;
      width: calc(100% - 1.5rem);
    }

    

    .profile-row {
      align-items: center;
      display: flex;
      flex-direction: row;
      gap: 0.875rem;
      justify-content: flex-start;
    }

    .profile-stats {
      font-size: 0.875rem;
      margin-top: 0.375rem;
    }

    .username {
      font-size: 1.5rem;
      line-height: 1;
      margin-bottom: 0.375rem;
    }
  }
}

@media (min-width: 481px) and (max-width: 1024px) {
  #profile-files-grid {
    box-sizing: border-box;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%,15.625rem), 1fr));
    max-width: 100%;
    padding: 0;
    width: 100%;
  }

  #profile-files-outer {
    box-sizing: border-box;
    margin: 4.0625rem auto 0 auto;
    max-width: 100%;
    padding: 0 0.75rem 4rem 0.75rem;
    width: 100%;
  }

  .desktop-only {
    display: block;
  }

  .desktop-only .profile-card {
    align-items: flex-start;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 1.5rem;
  }

  .desktop-only .profile-info {
    flex: 1;
  }

  .desktop-only .profile-main-content {
    align-items: center;
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    justify-content: flex-start;
    width: 100%;
  }

  .filters-container {
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    justify-content: flex-start;
    margin: 1.25rem auto;
    max-width: 100%;
    overflow-x: auto;
    padding: 0.75rem 1rem;
    width: 100%;
  }

  .mobile-only {
    display: none;
  }

  .profile-block {
    box-sizing: border-box;
    max-width: 100%;
    padding: 0 0.75rem;
    width: 100%;
  }

  .profile-main-content {
    box-sizing: border-box;
    max-width: 100%;
    min-height: auto;
    padding: 0;
    position: relative;
    width: 100%;
  }

  .profile-main-content .feed-grid {
    align-items: start;
    box-sizing: border-box;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%,15.625rem), 1fr));
    justify-items: center;
    margin: 1.25rem auto 0 auto;
    max-width: 100%;
    padding: 0;
    width: 100%;
  }

  .profile-main-content .profile-block .profile-row {
    align-items: center;
    display: flex;
    flex-direction: row;
    gap: 0.875rem;
  }

  .profile-main-content .profile-block .profile-row .avatar-box {
    margin: 0;
  }

  @media (max-width: 480px) {
    #profile-files-grid, .profile-main-content #profile-files-grid {
      margin: 0 auto;
      max-width: 73rem;
      padding-left: 0;
      padding-right: 0;
    }

    .desktop-only .profile-card, .filters-container, .profile-block {
      margin: 0 auto;
      max-width: 73rem;
      width: 100%;
    }

    .filters-container {
      -webkit-overflow-scrolling: touch;
      display: flex;
      gap: 0.5rem;
      justify-content: flex-start;
      overflow-x: auto;
      padding: 0.5rem 0.375rem;
      width: 100%;
    }

    .filters-container .filter-btn {
      flex: 0 0 auto;
      height: 3rem;
      padding: 0.75rem 0.875rem;
    }

    

    .filters-container .filter-btn span {
      display: inline-block;
      font-size: 0.8125rem;
    }

    .filters-container .filter-btn.label-visible span {
      display: block;
    }

    .filters-container::-webkit-scrollbar {
      height: 0.375rem;
    }

    .filters-container::-webkit-scrollbar-thumb {
      background: rgba(255,255,255,0.08);
      border-radius: 0.25rem;
    }

    .mobile-only {
      align-items: center;
      display: flex;
      justify-content: center;
      width: 100%;
    }

    .profile-block {
      background: #262626;
      border-radius: 0.875rem;
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
      margin: 0 auto;
      max-width: 100%;
      padding: 1.25rem;
      width: calc(100% - 1.5rem);
    }

    

    .profile-row {
      align-items: center;
      display: flex;
      flex-direction: row;
      gap: 0.875rem;
      justify-content: flex-start;
    }

    .profile-stats {
      font-size: 0.875rem;
      margin-top: 0.375rem;
    }

    .username {
      font-size: 1.5rem;
      line-height: 1;
      margin-bottom: 0.375rem;
    }
  }
}

@media (min-width: 901px) {
  body[data-profile-login] #profile-files-grid.feed-grid {
    align-items: start;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fill, minmax(min(18.75rem,100%), 1fr));
    justify-items: stretch;
  }

  

  

  

  .desktop-only {
    position: relative;
  }

  .filters-container {
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
    display: flex;
    flex-wrap: nowrap;
    margin: 1.25rem auto;
    max-width: 100%;
    overflow-x: auto;
    padding: 0.3125rem;
    width: 100%;
  }

  .filters-container .filter-btn {
    flex: 0 0 auto;
    font-size: 1.0625rem;
    height: 3.25rem;
    padding: 0.75rem 1.125rem;
  }

  @media (max-width: 480px) {
    #profile-files-grid, .profile-main-content #profile-files-grid {
      margin: 0 auto;
      max-width: 73rem;
      padding-left: 0;
      padding-right: 0;
    }

    .desktop-only .profile-card, .filters-container, .profile-block {
      margin: 0 auto;
      max-width: 73rem;
      width: 100%;
    }

    .filters-container {
      -webkit-overflow-scrolling: touch;
      display: flex;
      gap: 0.5rem;
      justify-content: flex-start;
      overflow-x: auto;
      padding: 0.5rem 0.375rem;
      width: 100%;
    }

    .filters-container .filter-btn {
      flex: 0 0 auto;
      height: 3rem;
      padding: 0.75rem 0.875rem;
    }

    

    .filters-container .filter-btn span {
      display: inline-block;
      font-size: 0.8125rem;
    }

    .filters-container .filter-btn.label-visible span {
      display: block;
    }

    .filters-container::-webkit-scrollbar {
      height: 0.375rem;
    }

    .filters-container::-webkit-scrollbar-thumb {
      background: rgba(255,255,255,0.08);
      border-radius: 0.25rem;
    }

    .mobile-only {
      align-items: center;
      display: flex;
      justify-content: center;
      width: 100%;
    }

    .profile-block {
      background: #262626;
      border-radius: 0.875rem;
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
      margin: 0 auto;
      max-width: 100%;
      padding: 1.25rem;
      width: calc(100% - 1.5rem);
    }

    

    .profile-row {
      align-items: center;
      display: flex;
      flex-direction: row;
      gap: 0.875rem;
      justify-content: flex-start;
    }

    .profile-stats {
      font-size: 0.875rem;
      margin-top: 0.375rem;
    }

    .username {
      font-size: 1.5rem;
      line-height: 1;
      margin-bottom: 0.375rem;
    }
  }
}

/* ==========================================================================
   PROFILE CARD — Claude Design import ("Плашка профиля")
   Desktop + Mobile. Авторитетный блок: определяет плашку по макету и
   перекрывает легаси-правила из брейкпоинтов выше.
   Значки-награды (badge) стоят перед ником; tv/tg инлайн в строке ника.
   ========================================================================== */

/* ---------- DESKTOP ---------- */
.desktop-only .profile-card {
  align-items: center;
  background: var(--surface, #262626);
  border: 0;
  border-radius: 1rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0 auto;
  max-width: 73rem;
  padding: 1.5rem;
  width: 100%;
}

.desktop-only .profile-main-content {
  align-items: center;
  display: flex;
  flex-direction: row;
  gap: 1.5rem;
  justify-content: flex-start;
  min-width: 0;
  width: 100%;
}

.desktop-only .profile-avatar {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 0;
}

.desktop-only .profile-avatar img {
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  height: 6rem;
  object-fit: cover;
  width: 6rem;
}

.desktop-only .profile-info {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.desktop-only .profile-name-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  min-width: 0;
}

/* Раздельные отступы: бейджи↔ник = 0.25rem, ник↔соцсети = 0.5rem */
.desktop-only .profile-name {
  color: #fff;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
  margin: 0 0 0 0.25rem;
  word-break: break-word;
}

/* нет бейджей → ник первый в строке, убираем паразитный левый отступ */
.desktop-only .profile-name-row .profile-name:first-child {
  margin-left: 0;
}

.profile-badge-icon {
  flex-shrink: 0;
  margin: 0 0.5rem 0 0.25rem;
}

/* tv/tg соц-иконки — инлайн в строке ника, квадратные 1:1 (~18px) */
.desktop-only .profile-name-row .profile-links {
  align-items: center;
  display: inline-flex;
  flex-shrink: 0;
  gap: 0.5rem;
  margin: 0 0 0 0.5rem;
}

.desktop-only .profile-name-row .profile-links a {
  align-items: center;
  display: inline-flex;
  height: 1.5rem;
  justify-content: center;
  width: 1.5rem;
}

.desktop-only .profile-name-row .profile-links a img {
  display: block;
  height: var(--icon-lg);
  object-fit: contain;
  transition: transform 0.18s cubic-bezier(0.2, 0.7, 0.2, 1);
  width: var(--icon-lg);
}

.desktop-only .profile-name-row .profile-links a img:hover {
  transform: scale(1.1);
}

.desktop-only .profile-stats {
  align-items: center;
  color: #828282;
  display: flex;
  flex-wrap: wrap;
  font-size: 1.125rem;
  font-weight: 500;
  gap: 0.25rem;
  margin: 0;
  white-space: normal;
}

/* Кнопка «Редактировать» — ghost, справа */
.profile-edit-btn {
  align-items: center;
  align-self: flex-start;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0.5rem;
  color: #aaa;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  justify-content: center;
  line-height: 1;
  padding: 0.5rem 1rem;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
  white-space: nowrap;
}

.profile-edit-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}

/* ---------- MOBILE ---------- */
.mobile-only .profile-block {
  background: var(--surface, #262626);
  border: 0;
  border-radius: 1rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0 auto;
  max-width: 100%;
  padding: 1rem;
  width: calc(100% - 1.5rem);
}

.mobile-only .profile-row {
  align-items: center;
  display: flex;
  flex-direction: row;
  gap: 1rem;
  justify-content: flex-start;
  min-width: 0;
}

.mobile-only .avatar-box {
  align-items: center;
  background: transparent;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  display: flex;
  flex: 0 0 auto;
  height: 4rem;
  justify-content: center;
  overflow: hidden;
  width: 4rem;
}

.mobile-only .avatar-box img {
  border-radius: 8px;
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.mobile-only .profile-info {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.mobile-only .profile-name-row {
  align-items: center;
  display: flex;
  min-width: 0;
}

/* Раздельные отступы: бейджи↔ник = 0.25rem, ник↔соцсети = 0.5rem */
.mobile-only .username {
  color: #fff;
  flex: 0 1 auto;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  margin: 0 0 0 0.25rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* нет бейджей → ник первый в строке, убираем паразитный левый отступ */
.mobile-only .profile-name-row .username:first-child {
  margin-left: 0;
}

.mobile-only .profile-name-row .platform-badges {
  align-items: center;
  display: inline-flex;
  flex-shrink: 0;
  gap: 0.5rem;
  margin: 0 0 0 0.5rem;
}

.mobile-only .profile-name-row .platform-badges a {
  align-items: center;
  display: inline-flex;
  height: var(--icon-sm);
  justify-content: center;
  width: var(--icon-sm);
}

.mobile-only .profile-name-row .platform-badges img {
  display: block;
  height: var(--icon-sm);
  object-fit: contain;
  width: var(--icon-sm);
}

.mobile-only .profile-stats {
  color: #828282;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.4;
  margin: 0;
}

.mobile-only .profile-stats span,
.mobile-only .profile-name-row {
  min-width: 0;
}

/* Кнопка «Редактировать» — на всю ширину под строкой (mobile) */
.profile-edit-btn-block {
  align-self: stretch;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: #ebebeb;
  padding: 0.625rem 1rem;
  width: 100%;
}

/* ==========================================================================
   BAN CARD — Claude Design import ("Ban Card Final")
   Отдельный блок под плашкой профиля, а не секция внутри неё: блокировка —
   это состояние аккаунта, а не строка карточки. Виден только администратору.
   Ширина и радиус повторяют .profile-card, поэтому карточки читаются парой.
   ========================================================================== */
.ban-card {
  background: rgba(237, 43, 59, 0.08);
  border: 1px solid rgba(237, 43, 59, 0.22);
  border-radius: 1rem;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1rem auto 0;
  max-width: 73rem;
  padding: 1.25rem;
  width: 100%;
}

.ban-card-head {
  align-items: flex-start;
  display: flex;
  gap: 0.75rem;
}

/* Квадратная точка вместо эмодзи: эмодзи рендерится шрифтом системы и
   ломает вертикальный ритм строки на разных ОС. */
.ban-card-marker {
  background: var(--danger-strong);
  border-radius: 2px;
  flex: none;
  height: 7px;
  margin-top: 0.5rem;
  width: 7px;
}

.ban-card-heading {
  flex: 1;
  min-width: 0;
}

.ban-card-title {
  color: var(--danger-strong);
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1.2;
}

.ban-card-date {
  color: var(--ink-3);
  font-size: 0.9375rem;
  font-weight: 600;
  margin-top: 0.25rem;
}

.ban-card-unban {
  background: var(--brand);
  border: 0;
  border-radius: 0.5rem;
  color: #fff;
  cursor: pointer;
  flex: none;
  font-size: 0.875rem;
  font-weight: 600;
  height: 34px;
  padding: 0 0.875rem;
  transition: filter 0.15s ease;
}

.ban-card-unban:hover {
  filter: brightness(1.08);
}

.ban-card-details {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding-left: calc(7px + 0.75rem);
}

.ban-card-row {
  align-items: baseline;
  display: flex;
  gap: 0.875rem;
}

.ban-card-label {
  color: var(--ink-3);
  flex: none;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.68px;
  text-transform: uppercase;
  width: 5.625rem;
}

.ban-card-value {
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  min-width: 0;
  overflow-wrap: anywhere;
}

.ban-card-admin {
  color: var(--danger);
}

/* Узкий экран: подпись над значением, кнопка на всю ширину — иначе колонка
   в 5.625rem съедает половину строки. */
@media (max-width: 40rem) {
  .ban-card-head {
    flex-wrap: wrap;
  }

  .ban-card-unban {
    flex: 1 0 100%;
  }

  .ban-card-details {
    padding-left: 0;
  }

  .ban-card-row {
    flex-direction: column;
    gap: 0.125rem;
  }

  .ban-card-label {
    width: auto;
  }
}

/* Сетка публикаций доступна администратору и на заблокированном профиле —
   пометка объясняет, что этот контент не видит никто больше. */
.profile-admin-only-note {
  color: var(--danger-strong);
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
}

.profile-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.profile-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.profile-tab {
  align-items: center;
  background: #262626;
  border-radius: 0.75rem;
  border: 1px solid #3a3a3a;
  color: #e0e6ed;
  cursor: pointer;
  display: flex;
  font-size: 0.9375rem;
  font-weight: 500;
  gap: 0.5rem;
  justify-content: space-between;
  min-width: 6.25rem;
  padding: 0.625rem 1rem;
  transition: all 0.2s ease;
}

.profile-tab:hover {
  background: #2e2e2e;
  border-color: #789d2a;
}

.profile-tab.active {
  background: #789d2a;
  border-color: #789d2a;
  color: #fff;
}

/* ==========================================================================
   PROFILE PAGE — консолидированный блок (финальный, перекрывает легаси)
   Разметка: <div class="profile-page"><div class="profile-shell">…
   ========================================================================== */

body[data-profile-login] .profile-page {
  display: flex;
  flex: 1 0 auto;
  width: 100%;
}

body[data-profile-login] .profile-shell {
  box-sizing: border-box;
  margin: 1.25rem auto 0;
  max-width: 73rem;
  padding: 0 0.75rem 4rem;
  width: 100%;
}

/* ── Плашка профиля ─────────────────────────────────── */
body[data-profile-login] .profile-card {
  align-items: center;
  background: var(--surface, #262626);
  border: 0;
  border-radius: 1rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  box-sizing: border-box;
  display: flex;
  gap: 1.5rem;
  justify-content: flex-start;
  margin: 0 auto;
  max-width: 73rem;
  padding: 1.5rem;
  width: 100%;
}

body[data-profile-login] .profile-card-avatar {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  justify-content: center;
}

body[data-profile-login] .profile-card-avatar img {
  border-radius: 0.75rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  display: block;
  height: 6rem;
  object-fit: cover;
  width: 6rem;
}

body[data-profile-login] .profile-card-info {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0.625rem;
  min-width: 0;
}

body[data-profile-login] .profile-name-row {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  min-width: 0;
}

body[data-profile-login] .profile-name {
  color: var(--ink, #fff);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.1;
  margin: 0;
  word-break: break-word;
}

body[data-profile-login] .profile-handle {
  color: var(--brand, #789d2a);
  font-size: 1.0625rem;
  font-weight: 600;
}

body[data-profile-login] .profile-stats {
  align-items: center;
  color: var(--ink-3, #828282);
  display: flex;
  flex-wrap: wrap;
  font-size: 1.0625rem;
  font-weight: 500;
  gap: 1.5rem;
  margin: 0;
}

body[data-profile-login] .profile-stat {
  align-items: baseline;
  display: inline-flex;
  gap: 0.375rem;
}

body[data-profile-login] .profile-stat b {
  color: var(--ink, #fff);
  font-size: 1.375rem;
  font-weight: 800;
  line-height: 1;
}

/* ── Вкладки ────────────────────────────────────────── */
body[data-profile-login] .profile-tabs {
  margin: 1.5rem 0;
}

/* ── Сетка постов ───────────────────────────────────── */
body[data-profile-login] #profile-files-grid.feed-grid {
  box-sizing: border-box;
  margin: 0 auto;
  max-width: 100%;
  padding: 0;
}

/* ── Адаптив ────────────────────────────────────────── */
@media (max-width: 600px) {
  body[data-profile-login] .profile-card {
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
  }

  body[data-profile-login] .profile-card-avatar img {
    height: 4.5rem;
    width: 4.5rem;
  }

  body[data-profile-login] .profile-name {
    font-size: 1.375rem;
  }

  body[data-profile-login] .profile-name-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  body[data-profile-login] .profile-stats {
    gap: 1rem;
    font-size: 0.9375rem;
  }

  body[data-profile-login] .profile-stat b {
    font-size: 1.1875rem;
  }

  body[data-profile-login] .profile-tabs {
    gap: 0.5rem;
    margin: 1.25rem 0;
  }

  body[data-profile-login] .profile-tab {
    flex: 1 1 0;
    justify-content: center;
    min-width: 0;
  }
}

/* ── Кнопка «Редактировать» и модалка аватара ───────── */
body[data-profile-login] .profile-card .profile-edit-btn {
  align-self: center;
  flex: 0 0 auto;
  margin-left: auto;
}

@media (max-width: 600px) {
  body[data-profile-login] .profile-card {
    flex-wrap: wrap;
  }

  body[data-profile-login] .profile-card .profile-edit-btn {
    margin-left: auto;
    margin-top: 0.25rem;
  }
}
