:root {
  --bg: #0f0d14;
  --bg-elevated: #15121c;
  --surface: #1a1624;
  --surface-2: #221e2e;
  --border: #322a42;
  --text: #f4f1fa;
  --text-muted: #b8aec8;
  --text-dim: #7d7394;
  --accent: #c9b4ff;
  --accent-hover: #ae92ff;
  --accent-dim: rgba(201, 180, 255, 0.14);
  --accent-ring: rgba(174, 146, 255, 0.35);
  --danger: #ef4444;
  --radius: 10px;
  --radius-sm: 8px;
  --header-h: 56px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ns-dur-1: 0.2s;
  --ns-dur-2: 0.34s;
  --ns-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ns-ease-spring: cubic-bezier(0.34, 1.18, 0.48, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: #080612;
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand:hover {
  text-decoration: none;
  color: var(--accent);
}

.brand img,
.brand svg {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.brand span strong {
  color: var(--accent);
  font-weight: 800;
}

.nav-main {
  display: none;
  align-items: center;
  gap: 4px;
}

@media (min-width: 900px) {
  .nav-main {
    display: flex;
  }
}

.nav-main a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  transition: color var(--ns-dur-1) ease, background var(--ns-dur-1) ease;
}

.nav-main a:hover {
  color: var(--text);
  background: var(--surface);
  text-decoration: none;
}

.nav-main a.has-dot::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: middle;
}

.header-search {
  flex: 1;
  max-width: 420px;
  margin: 0 auto;
  position: relative;
}

.header-search input {
  width: 100%;
  height: 38px;
  padding: 0 14px 0 40px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.875rem;
  transition: border-color var(--ns-dur-1) ease, box-shadow var(--ns-dur-1) ease;
}

.header-search input:focus {
  outline: none;
  border-color: rgba(201, 180, 255, 0.45);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

.header-search input::placeholder {
  color: var(--text-dim);
}

.header-search .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-dim);
  pointer-events: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background var(--ns-dur-1) ease, color var(--ns-dur-1) ease, transform var(--ns-dur-1) var(--ns-ease-out);
}

.icon-btn:hover {
  background: var(--surface);
  color: var(--text);
}

.icon-btn:active {
  transform: scale(0.94);
}

.icon-btn--settings-gear {
  padding: 5px;
  box-sizing: border-box;
}

.icon-btn--settings-gear .icon-settings-gear {
  width: 16px;
  height: 16px;
  transform: translateX(-0.5px);
}

.icon-settings-gear {
  display: block;
  flex-shrink: 0;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  color: var(--text);
  font-size: 0.85rem;
  transition: border-color var(--ns-dur-1) ease, background var(--ns-dur-1) ease, box-shadow var(--ns-dur-1) ease;
}

.user-pill:hover {
  border-color: rgba(201, 180, 255, 0.35);
  box-shadow: 0 0 0 1px rgba(201, 180, 255, 0.08);
}

.user-pill .avatar,
.user-pill .avatar-img {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface-2);
}

.user-pill .avatar:not(img) {
  background: linear-gradient(135deg, #5b21b6, #c4b5fd);
}

.dropdown-wrap {
  position: relative;
}

.dropdown-panel {
  display: block;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  padding: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  z-index: 120;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px);
  transition:
    opacity var(--ns-dur-1) var(--ns-ease-out),
    visibility var(--ns-dur-1) var(--ns-ease-out),
    transform var(--ns-dur-1) var(--ns-ease-out);
}

.dropdown-wrap.is-open .dropdown-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.dropdown-panel a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
}

.dropdown-panel a:hover {
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}

.dropdown-panel__solo {
  display: flex;
  width: 100%;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  font-size: 0.875rem;
  text-align: left;
  cursor: not-allowed;
  opacity: 0.72;
}

/* Демо: пополнение / вывод / ручной лот */
.modal__panel.demo-wallet-panel,
.modal__panel.demo-manual-lot-panel {
  width: min(440px, 100%);
  max-height: min(86vh, 640px);
}

.demo-wallet-hint {
  margin: 0 0 14px;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.demo-wallet-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.demo-wallet-input {
  width: 100%;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
}

.demo-wallet-submit {
  width: 100%;
  margin-top: 2px;
  margin-bottom: 0;
}

.demo-wallet-screen--result {
  padding: 6px 2px 4px;
}

.demo-wallet-result-msg {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text);
}

.demo-wallet-modal--error .demo-wallet-result-msg {
  color: var(--danger);
  font-weight: 600;
}

.demo-wallet-foot--result {
  justify-content: stretch;
}

.demo-wallet-foot--result .btn-primary {
  width: 100%;
}

textarea.demo-wallet-input.demo-manual-lot-ta {
  resize: vertical;
  min-height: 72px;
  margin-bottom: 0;
}

.msl-page {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 16px 48px;
}

.msl-card {
  margin-top: 8px;
}

.msl-card__h1 {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 700;
}

.msl-card__lead {
  margin: 0 0 18px;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.msl-form .demo-wallet-label:first-of-type {
  margin-top: 0;
}

.msl-card__warn {
  margin: -4px 0 16px;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--text-dim);
}

.msl-form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

/* Breadcrumbs */
.breadcrumbs {
  max-width: 1440px;
  margin: 0 auto;
  padding: 12px 16px;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.breadcrumbs a {
  color: var(--text-muted);
}

.breadcrumbs a:hover {
  color: var(--accent);
}

/* Layout grid */
.layout-forum {
  flex: 1;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
  padding: 0 16px 48px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 1024px) {
  .layout-forum {
    grid-template-columns: 1fr;
  }

  .sidebar-forum {
    order: 2;
  }
}

/* Sidebar */
.sidebar-forum {
  position: sticky;
  top: calc(var(--header-h) + 12px);
}

.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 14px;
  transition:
    border-color var(--ns-dur-1) var(--ns-ease-out),
    box-shadow var(--ns-dur-1) var(--ns-ease-out),
    transform var(--ns-dur-1) var(--ns-ease-out);
}

.sidebar-card:hover {
  border-color: rgba(201, 180, 255, 0.18);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
  transform: translateY(-1px);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
  color: #faf7ff;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--ns-dur-1) var(--ns-ease-out), filter var(--ns-dur-1) ease, box-shadow var(--ns-dur-1) ease;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #7c3aed, #9333ea);
  text-decoration: none;
  color: #faf7ff;
  filter: brightness(1.04);
}

.btn-primary:active {
  transform: scale(0.98);
}

.nav-section-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin: 16px 0 8px 8px;
}

.nav-section-title:first-child {
  margin-top: 4px;
}

.side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
}

.side-link:hover {
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
}

.side-link.is-active {
  color: var(--text);
  border: 1px solid rgba(199, 181, 255, 0.5);
  background: rgba(174, 146, 255, 0.1);
}

.side-link__ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.side-link__ico .ns-forum-ico {
  width: 18px;
  height: 18px;
  color: var(--accent);
  opacity: 0.95;
  filter: none;
}

.side-link__ico .ns-forum-ico--asset {
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 3px;
  opacity: 1;
  filter: none;
}

.side-link svg {
  width: 18px;
  height: 18px;
  opacity: 0.75;
  flex-shrink: 0;
}

.side-link.has-dot::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.mini-profile {
  text-align: center;
  padding-top: 8px;
}

.mini-profile .avatar-lg,
.mini-profile .js-sidebar-avatar {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  margin: 0 auto 10px;
  display: block;
  object-fit: cover;
  background: var(--surface-2);
}

.mini-profile .name {
  font-weight: 600;
  font-size: 0.95rem;
}

.mini-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 12px 0;
}

.stat-box {
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  padding: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.stat-box strong {
  display: block;
  color: var(--text);
  font-size: 1.1rem;
}

/* Main column */
.main-column {
  min-width: 0;
}

.announce-strip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 14px;
}

.announce-strip a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
}

.announce-strip__ico {
  flex-shrink: 0;
  display: block;
  color: inherit;
}

.announce-strip__ico--megaphone,
.announce-strip__ico--cart,
.announce-strip__ico--shield {
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35));
}

.announce-strip a:hover {
  text-decoration: underline;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.toolbar select {
  height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.85rem;
}

.feed-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}

.feed-card .meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.feed-author-link {
  color: var(--text);
  text-decoration: none;
}

.feed-author-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.feed-card__avatar-link {
  display: inline-flex;
  flex-shrink: 0;
  text-decoration: none;
  border-radius: var(--radius-sm);
}

.feed-card__avatar-link:hover .avatar-sm-img {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #3730a3, #d8b4fe);
  flex-shrink: 0;
}

.avatar-sm-img {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  object-position: center;
  flex-shrink: 0;
  display: block;
}

.feed-card h2 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 600;
}

.feed-card__title-link {
  color: inherit;
  text-decoration: none;
}

.feed-card__title-link:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.feed-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.feed-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* Profile page */
.layout-profile {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 16px 48px;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
  align-items: start;
}

.profile-main {
  min-width: 0;
  width: 100%;
}

.profile-main-card {
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}

.layout-profile .tabs {
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 960px) {
  .layout-profile {
    grid-template-columns: 1fr;
  }
}

.info-item--nid .info-item__nid-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.profile-nid-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-muted);
  cursor: pointer;
  line-height: 0;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.profile-nid-copy:hover {
  color: var(--accent);
  border-color: rgba(199, 181, 255, 0.45);
  background: var(--surface);
}

.profile-nid-copy.is-copied {
  color: var(--accent);
  border-color: rgba(199, 181, 255, 0.55);
  background: rgba(199, 181, 255, 0.08);
}

.profile-stats {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 6px 10px;
  margin: 0 0 18px;
  padding: 12px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
  width: 100%;
  box-sizing: border-box;
}

.profile-stats__item {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
}

.profile-stats__val {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.profile-stats__label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.profile-toplinks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 22px;
  margin: 0 0 20px;
}

.profile-toplinks__item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.35;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.profile-toplinks__item:hover {
  border-color: rgba(199, 181, 255, 0.5);
  background: var(--accent-dim);
  color: var(--accent);
}

.profile-toplinks__ico {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.profile-toplinks__item:hover .profile-toplinks__ico {
  color: var(--accent);
}

.profile-toplinks__ico svg {
  display: block;
}

.profile-toplinks__text {
  min-width: 0;
}

@media (max-width: 520px) {
  .profile-stats {
    flex-wrap: wrap;
  }

  .profile-stats__item {
    flex: 1 1 calc(33.333% - 8px);
    min-width: 72px;
  }
}

.ns-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(8, 6, 14, 0.72);
  backdrop-filter: blur(4px);
}

.ns-modal {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 22px 22px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}

.ns-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.ns-modal__close:hover {
  color: var(--accent);
  background: var(--surface-2);
}

.ns-modal__title {
  margin: 0 32px 10px 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.ns-modal__text--small {
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.ns-modal__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.5rem;
}

.ns-modal__link-firebase {
  width: 100%;
  margin-top: 0.65rem;
}

.ns-modal__text {
  margin: 0 0 16px;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.ns-modal__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ns-modal__panel {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.ns-modal__label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.ns-modal__input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.95rem;
}

.ns-modal__submit {
  width: 100%;
}

.user-mega__mod-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: 10px;
  border: 1px solid rgba(199, 181, 255, 0.35);
  background: rgba(199, 181, 255, 0.08);
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
}

.user-mega__mod-strip:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.user-mega__mod-strip svg {
  flex-shrink: 0;
}

.header-search-dd {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 6px;
  z-index: 120;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  max-height: 320px;
  overflow: auto;
}

.header-search-dd__row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--border);
}

.header-search-dd__row:last-child {
  border-bottom: none;
}

.header-search-dd__row:hover {
  background: var(--accent-dim);
  color: var(--accent);
}

.header-search-dd__badge {
  flex: 0 0 auto;
  font-size: 0.65rem;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.header-search-dd__empty {
  padding: 12px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.header-search-dd__av {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.header-search-dd__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-forum-trophies {
  margin: -8px 0 16px;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.layout-settings {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px 48px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 900px) {
  .layout-settings {
    grid-template-columns: 1fr;
  }
}

.settings-sidebar {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
  padding: 12px 10px;
}

.settings-nav-group {
  margin-bottom: 18px;
}

.settings-nav-group:last-child {
  margin-bottom: 0;
}

.settings-nav-group__title {
  margin: 0 0 8px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.settings-nav__btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  margin-bottom: 4px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
  cursor: pointer;
}

.settings-nav__btn:hover {
  background: var(--surface);
}

.settings-nav__btn.is-active {
  background: rgba(199, 181, 255, 0.12);
  color: var(--accent);
  font-weight: 600;
}

.settings-content {
  min-width: 0;
}

.settings-panel__h1 {
  margin: 0 0 12px;
  font-size: 1.2rem;
}

.settings-panel__muted {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.5;
  font-size: 0.92rem;
}

.settings-panel__muted a {
  color: var(--accent);
}

.mod-stats-card {
  margin-bottom: 16px;
}

.mod-stats-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.mod-stats-select {
  width: 100%;
  max-width: 360px;
  padding: 10px 12px;
  margin-bottom: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
}

.mod-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px 14px;
  margin-bottom: 14px;
}

.mod-stats-field label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.mod-stats-input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
}

.mod-hint--tight {
  margin: 0 0 10px;
  font-size: 0.82rem;
}

.mod-level-xp-panel {
  margin: 4px 0 16px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: linear-gradient(165deg, rgba(26, 22, 36, 0.55), rgba(15, 13, 20, 0.85));
  box-shadow: inset 0 1px 0 rgba(201, 180, 255, 0.05);
}

.mod-level-xp-panel__row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.mod-level-xp-panel__row .btn-secondary,
.mod-level-xp-panel__row .btn-primary {
  flex: 1 1 140px;
  width: auto !important;
  min-width: 0;
}

.profile-sidebar .profile-avatar-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  background: var(--surface-2);
  flex-shrink: 0;
}

.profile-sidebar .profile-avatar-wrap .avatar-xl-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
}

.btn-secondary {
  width: 100%;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--ns-dur-1) ease, border-color var(--ns-dur-1) ease, color var(--ns-dur-1) ease,
    transform var(--ns-dur-1) var(--ns-ease-out);
}

.btn-secondary:hover {
  background: #2a2a2a;
}

.btn-secondary:active {
  transform: scale(0.99);
}

.profile-level-widget {
  margin-top: 16px;
  padding: 12px 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(165deg, rgba(26, 22, 36, 0.95), rgba(15, 13, 20, 0.98));
  box-shadow: inset 0 1px 0 rgba(201, 180, 255, 0.06);
}

.profile-level-widget__top {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.profile-level-widget__identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}

.profile-level-badge {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  background: #2a2635;
  border: 1px solid var(--border);
}

.profile-level-widget__titles {
  min-width: 0;
}

.profile-level-widget__lvl-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}

.profile-level-widget__lvl {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.profile-level-widget__info {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(201, 180, 255, 0.45);
  background: transparent;
  color: var(--accent);
  font-size: 0.65rem;
  font-weight: 700;
  font-style: italic;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.profile-level-widget__info:hover {
  background: var(--accent-dim);
  border-color: var(--accent-hover);
  color: var(--accent-hover);
}

.profile-level-widget__hint.ns-hint {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.profile-avatar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.profile-avatar-actions .btn-secondary {
  flex: 1 1 auto;
  min-width: 0;
}

.profile-avatar-hint.ns-hint {
  flex-shrink: 0;
}

.profile-avatar-hint__btn.ns-hint__btn {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid rgba(201, 180, 255, 0.45);
  background: transparent;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  font-style: italic;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.profile-avatar-hint__btn.ns-hint__btn:hover {
  background: var(--accent-dim);
  border-color: var(--accent-hover);
  color: var(--accent-hover);
}

/* Мини-поповер пояснений (клик по «i», не нативный title) */
.ns-hint {
  position: relative;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}

.ns-hint__popover {
  position: absolute;
  z-index: 1200;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 200px;
  max-width: min(300px, calc(100vw - 32px));
  padding: 10px 12px 11px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(201, 180, 255, 0.08);
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text);
  text-align: left;
}

.ns-hint__popover::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  margin-left: -7px;
  border: 7px solid transparent;
  border-bottom-color: var(--border);
}

.ns-hint__popover::after {
  content: "";
  position: absolute;
  bottom: calc(100% - 1px);
  left: 50%;
  margin-left: -6px;
  border: 6px solid transparent;
  border-bottom-color: var(--surface);
}

.ns-hint__text {
  margin: 0;
}

/* Сообщения HTML5 constraint validation — вместо белого нативного пузыря */
.ns-field-invalid-panel {
  position: fixed;
  z-index: 2600;
  box-sizing: border-box;
  min-width: 200px;
  max-width: min(340px, calc(100vw - 20px));
  padding: 10px 14px 11px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(201, 180, 255, 0.1);
  pointer-events: none;
}

.ns-field-invalid-panel__msg {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.45;
  font-weight: 600;
  color: var(--danger);
}

.profile-level-widget__hint .ns-hint__popover {
  left: 0;
  transform: none;
  max-width: min(280px, calc(100vw - 40px));
}

.profile-level-widget__hint .ns-hint__popover::before,
.profile-level-widget__hint .ns-hint__popover::after {
  left: 11px;
  margin-left: 0;
  transform: none;
}

.profile-xp-line {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.profile-xp-line__cur {
  color: var(--accent);
  font-weight: 700;
}

.profile-xp-line__unit {
  color: var(--accent);
  font-weight: 600;
}

.profile-xp-line__sep {
  margin: 0 2px;
  color: var(--text-dim);
  font-weight: 500;
}

.profile-xp-line__cap {
  color: var(--text-dim);
  font-weight: 500;
}

.profile-level-widget__next {
  flex: 0 0 auto;
  text-align: right;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.22);
  min-width: 0;
}

.profile-level-widget__next-xp {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}

.profile-level-widget__next-sub {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.profile-level-widget__prize-full {
  position: relative;
  width: 100%;
  margin-top: 14px;
  padding-top: 4px;
}

.profile-level-widget__prize-full .profile-level-widget__prize-tag {
  position: absolute;
  left: auto;
  right: 10px;
  top: 0;
  transform: translateY(-55%);
  z-index: 2;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: lowercase;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(201, 180, 255, 0.4);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.profile-level-widget__prize-full.profile-level-widget__prize-full--reward-new .profile-level-widget__prize-tag {
  color: var(--accent-hover);
  border-color: rgba(201, 180, 255, 0.55);
  background: rgba(201, 180, 255, 0.14);
  box-shadow:
    0 2px 10px rgba(0, 0, 0, 0.35),
    0 0 14px rgba(167, 139, 250, 0.28);
}

.profile-level-widget__prize-full .profile-level-widget__prize-body {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  min-height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(201, 180, 255, 0.12);
  background: linear-gradient(
    175deg,
    rgba(42, 34, 58, 0.92) 0%,
    rgba(22, 18, 34, 0.97) 45%,
    rgba(28, 22, 40, 0.99) 100%
  );
  box-shadow:
    inset 0 1px 0 rgba(201, 180, 255, 0.1),
    0 4px 18px rgba(0, 0, 0, 0.28);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  transition: border-color var(--ns-dur-1) var(--ns-ease-out);
}

.profile-level-widget__prize-full .profile-level-widget__prize-body:hover {
  border-color: rgba(201, 180, 255, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(201, 180, 255, 0.14),
    0 6px 22px rgba(0, 0, 0, 0.32);
}

.profile-level-widget__prize-full .profile-level-widget__prize-body:disabled {
  cursor: default;
  opacity: 0.55;
}

@keyframes ns-profile-prize-tag-pulse {
  0%,
  100% {
    transform: translateY(-55%) scale(1);
    box-shadow:
      0 2px 10px rgba(0, 0, 0, 0.35),
      0 0 12px rgba(167, 139, 250, 0.22);
  }
  50% {
    transform: translateY(-55%) scale(1.07);
    box-shadow:
      0 2px 14px rgba(0, 0, 0, 0.38),
      0 0 22px rgba(186, 164, 255, 0.42);
  }
}

@keyframes ns-profile-prize-pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow:
      inset 0 1px 0 rgba(201, 180, 255, 0.12),
      0 0 0 1px rgba(174, 146, 255, 0.38),
      0 2px 16px rgba(0, 0, 0, 0.28),
      0 0 20px rgba(167, 139, 250, 0.22);
    filter: drop-shadow(0 0 8px rgba(167, 139, 250, 0.45));
  }
  50% {
    transform: scale(1.02);
    box-shadow:
      inset 0 1px 0 rgba(201, 180, 255, 0.22),
      0 0 0 1px var(--accent-ring),
      0 4px 26px rgba(0, 0, 0, 0.22),
      0 0 32px rgba(186, 164, 255, 0.45);
    filter: drop-shadow(0 0 18px rgba(201, 180, 255, 0.62));
  }
}

.profile-level-widget__prize-full.profile-level-widget__prize-full--reward-new .profile-level-widget__prize-tag {
  animation: ns-profile-prize-tag-pulse 2.1s ease-in-out infinite;
}

.profile-level-widget__prize-full.profile-level-widget__prize-full--reward-new .profile-level-widget__prize-body {
  transition: border-color var(--ns-dur-1) var(--ns-ease-out);
  animation: ns-profile-prize-pulse 2.2s ease-in-out infinite;
  border-color: rgba(201, 180, 255, 0.5);
}

.profile-level-widget__prize-full.profile-level-widget__prize-full--reward-new .profile-level-widget__prize-body:hover {
  transition: border-color var(--ns-dur-1) var(--ns-ease-out);
  animation: ns-profile-prize-pulse 2.2s ease-in-out infinite;
  border-color: rgba(224, 208, 255, 0.65);
}

.profile-level-widget__prize-full .profile-level-widget__prize-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--accent-dim);
  color: var(--accent);
}

.profile-level-bar {
  height: 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-top: 2px;
}

.profile-level-bar__fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-hover), var(--accent));
  transition: width 0.35s ease;
}

.profile-main h1 {
  margin: 0 0 6px;
  font-size: 1.75rem;
}

.status-line {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 20px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.info-item {
  font-size: 0.85rem;
}

.info-item span:first-child,
.info-item .info-item__label {
  display: block;
  color: var(--text-dim);
  font-size: 0.75rem;
}

.info-item .info-item__value {
  display: block;
  color: var(--text);
  font-size: 0.85rem;
  margin-top: 2px;
  font-weight: 500;
}

.metrics-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.metrics-row div {
  text-align: center;
  min-width: 72px;
}

.metrics-row strong {
  display: block;
  font-size: 1.1rem;
}

.metrics-row span {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.section-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 12px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.tab {
  padding: 12px 14px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 0.875rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color var(--ns-dur-1) var(--ns-ease-out), border-color var(--ns-dur-1) var(--ns-ease-out);
}

.tab:hover {
  color: var(--text);
}

.tab.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.wall-composer {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.wall-avatar-img {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  object-position: center;
  border: 1px solid var(--border);
}

.profile-wall-wrap {
  width: 100%;
  max-width: none;
  margin-top: 4px;
  box-sizing: border-box;
}

.profile-wall-card {
  width: 100%;
  box-sizing: border-box;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.wall-composer--panel {
  margin-bottom: 0;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--ns-dur-2) var(--ns-ease-out), border-color var(--ns-dur-2) ease;
}

.wall-composer--panel.ns-wall-post-sent {
  animation: ns-wall-post-sent 0.55s var(--ns-ease-out);
}

.wall-composer__main {
  flex: 1;
  min-width: 0;
}

.wall-input-shell {
  position: relative;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.wall-input-shell:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-ring);
}

.wall-input-shell__textarea {
  display: block;
  width: 100%;
  min-height: 52px;
  max-height: 200px;
  padding: 12px 100px 44px 12px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  resize: vertical;
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.45;
}

.wall-input-shell__textarea:focus {
  outline: none;
}

.wall-input-shell__icons {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: flex;
  align-items: center;
  gap: 2px;
}

.wall-input-shell__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
}

.wall-input-shell__icon:hover {
  color: var(--accent);
  background: var(--accent-dim);
}

.wall-editor-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
}

.wall-editor-topbar[hidden] {
  display: none !important;
}

.wall-editor-topbar__left,
.wall-editor-topbar__right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
}

.wall-tb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 6px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.wall-tb-btn:hover {
  color: var(--accent);
  background: var(--accent-dim);
}

.wall-tb-btn--text {
  font-size: 0.68rem;
}

.wall-tb-anchor {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.wall-tb-menu {
  position: absolute;
  z-index: 90;
  left: 0;
  bottom: calc(100% + 6px);
  min-width: 200px;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.5);
}

.wall-tb-menu[hidden] {
  display: none !important;
}

.wall-tb-menu:not([hidden]) {
  animation: ns-popover-in var(--ns-dur-1) var(--ns-ease-out) both;
}

.wall-tb-menu--wide {
  min-width: 240px;
}

.wall-tb-menu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 0.86rem;
  text-align: left;
  cursor: pointer;
}

.wall-tb-menu__item:hover {
  background: var(--accent-dim);
  color: var(--accent);
}

.wall-tb-menu__item--danger {
  color: #fca5a5;
}

.wall-tb-menu__item--danger:hover {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.12);
}

.wall-tb-menu__ico {
  flex-shrink: 0;
  width: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

.wall-tb-menu__ico svg {
  display: block;
}

.wall-tb-menu__ico--mono {
  font-size: 0.72rem;
  font-weight: 700;
  font-family: ui-monospace, monospace;
  color: var(--text-dim);
}

.wall-tb-menu__sep {
  height: 1px;
  margin: 6px 4px;
  background: var(--border);
}

.wall-emoji-popover {
  position: absolute;
  right: 6px;
  bottom: 46px;
  z-index: 85;
  width: min(308px, calc(100vw - 40px));
  padding: 10px 10px 8px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.wall-emoji-popover[hidden] {
  display: none !important;
}

.wall-emoji-popover:not([hidden]) {
  animation: ns-popover-in var(--ns-dur-1) var(--ns-ease-out) both;
}

.wall-emoji-popover__caret {
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  transform: rotate(45deg);
  background: var(--surface);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  pointer-events: none;
}

.wall-emoji-popover__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px 4px;
}

.wall-emoji-popover__recent-label {
  margin: 10px 0 4px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.wall-emoji-popover__recent {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px 4px;
  min-height: 38px;
}

.wall-emoji-cell {
  border: none;
  border-radius: 6px;
  background: transparent;
  font-size: 1.28rem;
  line-height: 1;
  padding: 5px 2px;
  cursor: pointer;
  color: inherit;
}

.wall-emoji-cell:hover {
  background: var(--accent-dim);
}

.wall-emoji-slot {
  display: block;
  min-height: 34px;
  border-radius: 6px;
  border: 1px dashed rgba(255, 255, 255, 0.06);
}

.profile-wall-card--fs {
  position: fixed;
  inset: 12px;
  z-index: 200;
  max-height: none;
  overflow: auto;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55);
}

.attach-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.attach-preview[hidden] {
  display: none !important;
}

.attach-preview:not([hidden]) .attach-preview__item {
  animation: ns-thumb-in var(--ns-dur-2) var(--ns-ease-out) both;
}

.attach-preview:not([hidden]) .attach-preview__item:nth-child(1) {
  animation-delay: 0ms;
}

.attach-preview:not([hidden]) .attach-preview__item:nth-child(2) {
  animation-delay: 35ms;
}

.attach-preview:not([hidden]) .attach-preview__item:nth-child(3) {
  animation-delay: 70ms;
}

.attach-preview:not([hidden]) .attach-preview__item:nth-child(n + 4) {
  animation-delay: 100ms;
}

.attach-preview__item {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.attach-preview__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.attach-preview__rm {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 0.75rem;
  line-height: 1;
  cursor: pointer;
}

.thread-attach-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.thread-attach-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.wall-composer__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.wall-publish-btn,
.wall-poll-btn {
  width: auto !important;
  padding: 10px 20px !important;
}

.wall-poll-draft {
  margin-top: 10px;
  margin-bottom: 2px;
}

#wallPollDraft:not([hidden]) {
  animation: ns-panel-rise var(--ns-dur-2) var(--ns-ease-out) both;
}

.wall-poll-tg-draft {
  padding: 14px 16px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(165deg, rgba(36, 30, 52, 0.98) 0%, rgba(18, 16, 28, 0.99) 100%);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.28);
}

.wall-poll-tg-draft__tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
  margin-bottom: 6px;
}

.wall-poll-tg-draft__q,
.wall-poll-tg-draft__sub {
  display: block;
  width: 100%;
  margin: 0 0 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
}

.wall-poll-tg-draft__q::placeholder,
.wall-poll-tg-draft__sub::placeholder {
  color: var(--text-dim);
}

.wall-poll-tg-draft__sub {
  font-size: 0.86rem;
  margin-bottom: 10px;
  color: var(--text-muted);
}

.wall-poll-tg-draft__opts {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wall-poll-tg-draft__opt {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 4px 6px 4px 4px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.18);
}

.wall-poll-tg-draft__cb {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid rgba(201, 180, 255, 0.55);
  background: rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
}

.wall-poll-tg-draft__opt-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
  padding: 6px 4px;
  outline: none;
}

.wall-poll-tg-draft__opt-input::placeholder {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.wall-poll-tg-draft__opt-rm {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.wall-poll-tg-draft__opt-rm:hover {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
}

.wall-poll-tg-draft__add {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 8px 4px;
  border: none;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: color 0.15s ease;
}

.wall-poll-tg-draft__add:hover {
  color: var(--accent-hover);
}

.wall-poll-tg-draft__clear {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 8px 0 0;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: none;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  text-align: center;
  transition: color 0.15s ease;
}

.wall-poll-tg-draft__clear:hover {
  color: var(--accent);
}

.wall-poll {
  margin-top: 12px;
  padding: 14px 16px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(165deg, rgba(36, 30, 52, 0.98) 0%, rgba(18, 16, 28, 0.99) 100%);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.28);
}

.wall-poll__desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin-bottom: 8px;
}

.wall-poll__kind {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.wall-poll__q {
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.3;
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}

.wall-poll--vote .wall-poll__q {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.wall-poll__choices {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wall-poll__choices--results {
  gap: 8px;
}

.wall-poll-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text);
  text-align: left;
  font: inherit;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.wall-poll-row--pick:hover {
  border-color: var(--accent-ring);
  background: var(--accent-dim);
}

.wall-poll-row--pick.is-selected {
  border-color: rgba(201, 180, 255, 0.55);
  background: rgba(201, 180, 255, 0.12);
}

.wall-poll-row__box {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
}

.wall-poll-row--pick.is-selected .wall-poll-row__box {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
}

.wall-poll-row--pick.is-selected .wall-poll-row__box::after {
  content: "\2713";
  position: absolute;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  color: #0f0d14;
}

.wall-poll-row__text {
  flex: 1;
  min-width: 0;
  font-size: 0.9rem;
  z-index: 1;
}

.wall-poll-row--result {
  cursor: default;
  padding: 10px 10px 8px;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  min-height: 0;
}

.wall-poll-row--result-tg {
  border-color: rgba(255, 255, 255, 0.08);
}

.wall-poll-row__tg-line {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 22px;
}

.wall-poll-row__tg-check {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid var(--accent-hover);
  background: var(--accent-hover);
  box-sizing: border-box;
  position: relative;
}

.wall-poll-row__tg-check::after {
  content: "\2713";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -52%);
  font-size: 11px;
  font-weight: 800;
  color: #0f0d14;
}

.wall-poll-row__tg-check--empty {
  border-color: transparent;
  background: transparent;
}

.wall-poll-row__tg-check--empty::after {
  content: none;
}

.wall-poll-row__pct {
  flex: 0 0 auto;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 2.5rem;
}

.wall-poll-row--result-tg .wall-poll-row__text {
  font-size: 0.88rem;
}

.wall-poll-row__bar-track {
  position: relative;
  z-index: 1;
  height: 4px;
  margin-top: 8px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.wall-poll-row--result-tg .wall-poll-row__bar {
  position: static;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent-dim), rgba(201, 180, 255, 0.45));
  max-width: 100%;
  transition: width 0.25s ease;
}

.wall-poll-row--mine {
  border-color: rgba(201, 180, 255, 0.35);
}

.wall-poll-row--mine .wall-poll-row__pct {
  color: var(--accent);
}

.wall-poll-vote-btn {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 10px 16px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: color 0.15s ease, opacity 0.15s ease;
}

.wall-poll-vote-btn:hover:not(:disabled) {
  color: var(--accent-hover);
}

.wall-poll-vote-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.wall-poll-reopen {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 8px 0 0;
  border: none;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  text-align: center;
}

.wall-poll-reopen:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.wall-poll__foot {
  margin: 10px 0 0;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.wall-toolbar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.wall-dropdown {
  position: relative;
  min-width: 0;
}

.wall-dropdown__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  text-align: left;
}

.wall-dropdown__toggle:hover {
  border-color: var(--accent);
  color: var(--text);
}

.wall-dropdown.is-open .wall-dropdown__toggle {
  border-color: var(--accent);
  color: var(--text);
}

.wall-dropdown__chev {
  flex-shrink: 0;
  font-size: 0.65rem;
  opacity: 0.85;
  transition: transform var(--ns-dur-1) var(--ns-ease-out);
}

.wall-dropdown.is-open .wall-dropdown__chev {
  transform: rotate(180deg);
}

.wall-dropdown__panel {
  display: block;
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 60;
  min-width: 100%;
  width: max(100%, 240px);
  max-width: min(320px, 92vw);
  padding: 8px 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px);
  transition:
    opacity var(--ns-dur-1) var(--ns-ease-out),
    visibility var(--ns-dur-1) var(--ns-ease-out),
    transform var(--ns-dur-1) var(--ns-ease-out);
}

.wall-dropdown--align-end .wall-dropdown__panel {
  left: auto;
  right: 0;
}

.wall-dropdown.is-open .wall-dropdown__panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.wall-sort-panel {
  width: max(100%, 220px);
  max-width: 260px;
  padding: 4px 0;
}

.wall-sort-item {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: left;
  cursor: pointer;
}

.wall-sort-item:hover {
  background: var(--accent-dim);
  color: var(--text);
}

.wall-sort-item.is-active {
  color: var(--accent);
  font-weight: 600;
}

.wall-sort-item + .wall-sort-item {
  border-top: 1px solid var(--border);
}

.wall-sort-item__x {
  display: inline-block;
  margin-right: 6px;
  font-size: 0.75rem;
  opacity: 0.9;
}

.wall-find-panel {
  width: max(100%, 260px);
  max-width: 300px;
}

.wall-find-panel__section {
  padding: 6px 12px 10px;
}

.wall-find-panel__links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 4px;
}

.wall-find-link {
  display: block;
  width: 100%;
  padding: 8px 4px;
  border: none;
  background: none;
  color: var(--text);
  font-size: 0.85rem;
  text-align: left;
  cursor: pointer;
  border-radius: 6px;
}

.wall-find-link:hover {
  color: var(--accent);
  background: var(--accent-dim);
}

.wall-find-panel__divider {
  height: 1px;
  margin: 4px 0;
  background: var(--border);
}

.wall-find-panel__label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.wall-find-panel__row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.wall-find-input {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 0.82rem;
}

.wall-find-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-ring);
}

.wall-find-btn {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.wall-find-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.wall-feed {
  min-height: 120px;
  padding-top: 16px;
}

.wall-feed__empty {
  margin: 0;
  padding: 36px 16px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.wall-feed__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wall-my-comment-card {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  transition:
    border-color var(--ns-dur-1) var(--ns-ease-out),
    box-shadow var(--ns-dur-1) var(--ns-ease-out);
}

.wall-my-comment-card:hover {
  border-color: rgba(201, 180, 255, 0.2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.wall-my-comment-card__ctx {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.wall-my-comment-card__postlink {
  color: var(--accent);
  text-decoration: none;
}

.wall-my-comment-card__postlink:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.wall-my-comment-card__parent {
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.4;
  padding: 8px 10px;
  margin-bottom: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.wall-my-comment-card__mine {
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text);
}

.wall-my-comment-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.wall-my-comment-card__open {
  width: auto;
  padding: 8px 14px;
}

.wall-my-comment-card__date {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.wall-post-card {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  transition:
    border-color var(--ns-dur-1) var(--ns-ease-out),
    box-shadow var(--ns-dur-1) var(--ns-ease-out),
    transform var(--ns-dur-1) var(--ns-ease-out);
}

.wall-post-card:hover {
  border-color: rgba(201, 180, 255, 0.2);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.wall-post-card__meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.wall-post-card__body {
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text);
}

.wall-post-card__foot {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.wall-post-card__gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.wall-post-img {
  max-width: 100%;
  width: min(200px, 100%);
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  object-fit: cover;
}

.wall-post-card__head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}

.wall-post-card__av {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  object-position: center;
  border: 1px solid var(--border);
}

.wall-post-card__head .wall-post-card__meta {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.wall-post-card__head-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  flex-shrink: 0;
  margin-left: auto;
}

.wall-post-card__act-sep {
  color: var(--text-dim);
  font-size: 0.72rem;
  user-select: none;
}

.wall-post-card__report {
  flex-shrink: 0;
  padding: 4px 8px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-dim);
  font-size: 0.72rem;
  cursor: pointer;
}

.wall-post-card__report:hover {
  color: var(--accent);
  background: var(--accent-dim);
}

.wall-post-card__del {
  flex-shrink: 0;
  padding: 4px 8px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-dim);
  font-size: 0.72rem;
  cursor: pointer;
}

.wall-post-card__del:hover {
  color: var(--accent);
  background: var(--accent-dim);
}

.wall-post-card__votes {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.wall-vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-dim);
  font-size: 0.82rem;
  cursor: pointer;
}

.wall-vote-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}

.wall-vote-btn.is-on {
  border-color: var(--accent);
  color: var(--accent);
}

.wall-vote-btn__i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.wall-vote-btn__i .ns-vote-ico {
  display: block;
}

.feed-footer-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ns-inline-ico {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.ns-inline-ico--comment {
  opacity: 0.92;
}

.ns-vote-ico {
  display: block;
}

.topic-vote-btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.topic-vote-btn__icon .ns-vote-ico {
  display: block;
}

.wall-post-card__thread {
  margin-top: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.15);
}

.wall-post-card__thread summary {
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.wall-comments {
  margin-top: 8px;
}

.wall-comments__empty {
  margin: 4px 0;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.wall-comment {
  display: flex;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.wall-comment:last-child {
  border-bottom: none;
}

.wall-comment__av {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  object-position: center;
  border: 1px solid var(--border);
}

.wall-comment__main {
  flex: 1;
  min-width: 0;
}

.wall-comment__meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.wall-comment__body {
  font-size: 0.86rem;
  line-height: 1.4;
  color: var(--text);
}

.wall-comment__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-top: 6px;
}

.wall-comment__report,
.wall-comment__del {
  padding: 0;
  border: none;
  background: none;
  font-size: 0.72rem;
  color: var(--text-dim);
  cursor: pointer;
}

.wall-comment__report:hover {
  color: var(--accent);
}

.wall-comment__del:hover {
  color: var(--accent);
}

.wall-comment__act-sep {
  color: var(--text-dim);
  font-size: 0.72rem;
  user-select: none;
}

.wall-comment-form {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wall-comment-form__ta {
  width: 100%;
  min-height: 52px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-family: inherit;
  font-size: 0.86rem;
  resize: vertical;
}

.wall-comment-form__btn {
  align-self: flex-start;
  width: auto !important;
  padding: 8px 16px !important;
}

.profile-card-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 16px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}

.profile-card-bar__left {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.profile-card-bar .profile-name-row {
  margin-bottom: 0;
}

.profile-card-bar .profile-h1 {
  margin: 0;
}

.profile-card-bar .status-line {
  margin-top: 0;
  margin-bottom: 16px;
}

.profile-card-bar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
  justify-content: flex-end;
  margin-left: auto;
  flex-shrink: 0;
}

.profile-card-bar__actions .profile-friend-btn,
.profile-card-bar__actions .profile-edit-profile-btn {
  flex: 1 1 0;
  min-width: 0;
  min-height: 42px;
  width: auto !important;
  max-width: none;
  white-space: nowrap;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.2;
}

.profile-friend-btn.is-friend {
  border-color: rgba(201, 180, 255, 0.45);
  color: var(--accent);
}

.profile-edit-profile-btn {
  margin-top: 0;
  margin-left: 0;
  /* размеры в паре с .profile-friend-btn задаёт .profile-card-bar__actions */
  text-decoration: none;
}

.profile-edit-page {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 0 32px;
}

.profile-edit-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.profile-edit-form__label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.profile-edit-form__hint {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.35;
}

.profile-edit-form__row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-edit-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.profile-edit-form__static {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text);
  word-break: break-word;
}

.profile-edit-form__hint a {
  color: var(--accent);
  text-decoration: none;
}

.profile-edit-form__hint a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.search-results-page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 0 40px;
  width: 100%;
  box-sizing: border-box;
}

.search-page-shell {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.search-page-shell__hint {
  margin: 0;
}

.search-results-toolbar--top {
  margin-top: 0;
}

.search-results-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}

.search-results-mode-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.search-mode-tab {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.82rem;
  text-decoration: none;
  transition:
    border-color var(--ns-dur-1) ease,
    color var(--ns-dur-1) ease,
    background 0.15s ease;
}

.search-mode-tab:hover {
  border-color: rgba(201, 180, 255, 0.45);
  color: var(--accent);
  background: var(--accent-dim);
}

.search-mode-tab.is-active {
  border-color: rgba(201, 180, 255, 0.55);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
}

.search-results-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 900px) {
  .search-results-layout {
    grid-template-columns: 1fr;
  }
}

.search-results-sidebar__title {
  margin: 0 0 14px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
}

.search-results-sidebar__empty {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.4;
}

.search-results-sidebar__empty a {
  color: var(--accent);
  text-decoration: none;
}

.search-results-sidebar__empty a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.search-user-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.search-user-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  transition: background 0.15s ease;
}

.search-user-row:hover {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.search-user-row__av {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.search-user-row__name {
  font-weight: 600;
  font-size: 0.92rem;
}

.search-results-main__head {
  margin-bottom: 16px;
}

.search-results-main__h1 {
  margin: 0 0 12px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}

.search-results-main__h1 strong {
  color: var(--accent-hover);
  font-weight: 700;
}

.search-results-main__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.search-results-more-link {
  font-size: 0.88rem;
  color: var(--accent);
  text-decoration: none;
}

.search-results-more-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.search-results-main__empty {
  margin: 12px 0 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.search-results-topics-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.search-topic-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.search-topic-row:last-child {
  border-bottom: none;
}

.search-topic-row__thumb {
  display: block;
  line-height: 0;
}

.search-topic-row__img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.search-topic-row__body {
  min-width: 0;
}

.search-topic-row__tags {
  margin-bottom: 6px;
}

.search-chip {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.search-topic-row__title {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent-hover);
  text-decoration: none;
  margin: 0 0 8px;
  line-height: 1.35;
}

.search-topic-row__title:hover {
  text-decoration: underline;
  color: var(--accent);
}

.search-topic-row__snippet {
  margin: 0 0 8px;
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.45;
}

.search-topic-row__meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.search-topic-row__kind {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  padding-top: 4px;
}

.ns-search-hit {
  background: color-mix(in srgb, #f07178 35%, transparent);
  color: var(--text);
  padding: 0 2px;
  border-radius: 3px;
}

.search-results-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.search-results-pager__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.search-results-pager__btn:hover {
  border-color: var(--accent-dim);
  color: var(--accent-hover);
}

.search-results-pager__btn.is-active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 22%, var(--surface-2));
  color: var(--accent-hover);
}

.search-results-pager__nav {
  font-weight: 700;
}

.search-results-main__pager-foot {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.search-results-input {
  flex: 1 1 220px;
  min-width: 0;
}

.search-results-query {
  margin: 14px 0 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.search-results-h2 {
  margin: 22px 0 10px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.search-results-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-result-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-result-card:hover {
  border-color: var(--accent-dim);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent);
}

.search-result-card__badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent-hover);
}

.search-result-card--lot .search-result-card__badge {
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
}

.search-result-card__title {
  font-weight: 600;
  flex: 1 1 auto;
  min-width: 0;
}

.search-result-card__meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  width: 100%;
  flex-basis: 100%;
  padding-left: 0;
}

@media (min-width: 520px) {
  .search-result-card__meta {
    width: auto;
    flex-basis: auto;
    margin-left: auto;
    padding-left: 8px;
  }
}

.profile-name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 6px;
}

.profile-name-row .js-profile-h1 {
  margin: 0;
}

.profile-h1--linked {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
  line-height: 1.2;
}

.profile-title-link {
  color: inherit;
  text-decoration: none;
}

.profile-title-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.mini-profile .mini-profile__name-link {
  color: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
}

.mini-profile .mini-profile__name-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.profile-mod-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #c4b5fd;
  border: 1px solid rgba(196, 181, 253, 0.45);
  background: rgba(99, 102, 241, 0.15);
}

.profile-mod-badge svg {
  flex-shrink: 0;
}

.profile-mod-badge--owner {
  color: #f4edff;
  border-color: rgba(201, 180, 255, 0.62);
  background: linear-gradient(135deg, rgba(201, 180, 255, 0.22), rgba(139, 92, 246, 0.18));
}

.notif-item__detail {
  margin-top: 4px;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--text-muted);
  white-space: normal;
}

.topic-reply-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-top: 10px;
}

.topic-reply__act-sep {
  color: var(--text-dim);
  font-size: 0.78rem;
  user-select: none;
}

.topic-reply__btn {
  padding: 4px 0;
  border: none;
  background: none;
  font-size: 0.78rem;
  color: var(--text-dim);
  cursor: pointer;
}

.topic-reply__btn:hover {
  color: var(--accent);
}

.topic-reply__btn--danger {
  color: #f87171;
}

.topic-reply__btn--danger:hover {
  text-decoration: underline;
}

.wall-post-inline-img {
  display: inline-block;
  vertical-align: middle;
  max-width: min(100%, 280px);
  max-height: 220px;
  margin: 4px 0;
  border-radius: 8px;
  border: 1px solid var(--border);
  object-fit: contain;
}

.wall-post-inline-img--gif {
  outline: 1px solid rgba(201, 180, 255, 0.35);
}

.wall-align {
  margin: 6px 0;
}

.wall-align--left {
  text-align: left;
}

.wall-align--center {
  text-align: center;
}

.wall-align--right {
  text-align: right;
}

.wall-list {
  margin: 0.65em 0;
  padding-left: 1.4em;
  color: var(--text);
}

.wall-list li {
  margin: 0.28em 0;
}

.wall-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.wall-post-link {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.wall-post-link:hover {
  color: var(--accent);
}

.topic-op__body .wall-list,
.topic-reply-card__body .wall-list {
  margin-top: 0.35em;
  margin-bottom: 0.35em;
}

.topic-op__body .wall-gallery,
.topic-reply-card__body .wall-gallery {
  margin-top: 10px;
}

.wall-pre {
  margin: 8px 0;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.4;
}

.wall-pre code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.wall-icode {
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86em;
}

.wall-censor {
  display: inline-block;
  max-width: 100%;
}

.wall-censor__blur {
  filter: blur(7px);
  user-select: none;
  cursor: default;
}

.wall-spoiler-d {
  margin: 8px 0;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  padding: 4px 8px 8px;
}

.wall-spoiler-d summary {
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 4px 0;
}

.wall-spoiler-d > div {
  margin-top: 6px;
  font-size: 0.9rem;
  color: var(--text);
}

.wall-user-mention {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.wall-user-mention:hover {
  text-decoration: underline;
}

.topic-op__images {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.topic-op__img {
  max-width: min(320px, 100%);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.topic-op__empty {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.topic-reply-card__gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.topic-reply-img {
  max-width: min(240px, 100%);
  border-radius: 8px;
  border: 1px solid var(--border);
}

/* Market layout */
.layout-market {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 16px 80px;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 1024px) {
  .layout-market {
    grid-template-columns: 1fr;
  }
}

.market-header-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.market-main {
  min-width: 0;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
}

.btn-back:hover {
  color: var(--text);
  text-decoration: none;
}

.market-side-nav {
  margin-bottom: 12px;
}

.market-side-nav--muted .side-link {
  color: var(--text-muted);
}

.market-recent-card {
  margin-bottom: 12px;
}

.market-recent-root {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.market-recent-empty {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--text-dim);
}

.market-recent-row {
  display: block;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  text-decoration: none;
  color: inherit;
  transition:
    border-color var(--ns-dur-1) ease,
    background var(--ns-dur-1) ease;
}

.market-recent-row:hover {
  border-color: rgba(201, 180, 255, 0.45);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
}

.market-recent-row--gone {
  pointer-events: none;
  opacity: 0.65;
}

.market-recent-row__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.market-recent-row__cat {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-dim);
}

.market-recent-row__price {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
}

.market-recent-row__title {
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.market-recent-row__seller {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 0.72rem;
}

.market-recent-row__seller-name {
  color: var(--accent);
  font-weight: 600;
}

.market-recent-row__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-dim);
  flex-shrink: 0;
}

.market-recent-row__dot.is-on {
  background: var(--accent);
  box-shadow: 0 0 0 2px rgba(201, 180, 255, 0.35);
}

.market-recent-row__sub {
  display: block;
  font-size: 0.7rem;
  color: var(--text-dim);
}

.market-main .msl-card {
  max-width: 640px;
}

.product-detail {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.product-hero__seller {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.product-hero__av-wrap {
  flex-shrink: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.product-hero__av {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: cover;
}

.product-hero__seller-name {
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}

.product-hero__seller-name:hover {
  color: var(--accent-hover);
  text-decoration: none;
}

.product-hero__dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 6px;
  border-radius: 50%;
  vertical-align: middle;
  background: var(--text-dim);
}

.product-hero__dot.is-on {
  background: var(--accent);
  box-shadow: 0 0 0 2px rgba(201, 180, 255, 0.35);
}

.product-hero__meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.product-hero__h1 {
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text);
}

.product-hero__sub {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.product-hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.product-hero__price-row {
  margin-bottom: 14px;
}

.product-hero__price {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text);
}

.product-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.product-hero__actions .btn-primary,
.product-hero__actions .btn-secondary {
  width: auto;
  min-width: 120px;
  padding: 10px 18px;
}

.product-hero__bullets {
  margin: 0;
  padding-left: 18px;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.product-block__h {
  margin: 0 0 10px;
  font-size: 0.95rem;
  font-weight: 700;
}

.product-block__p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.product-kv {
  display: grid;
  grid-template-columns: minmax(100px, 34%) 1fr;
  gap: 8px 14px;
  margin: 0;
  font-size: 0.82rem;
}

.product-kv dt {
  margin: 0;
  color: var(--text-dim);
  font-weight: 600;
}

.product-kv dd {
  margin: 0;
  color: var(--text);
}

.product-reviews__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.product-reviews__count {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}

.product-reviews__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.product-reviews__tabs button {
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition:
    border-color var(--ns-dur-1) ease,
    color var(--ns-dur-1) ease,
    background var(--ns-dur-1) ease;
}

.product-reviews__tabs button.is-active {
  border-color: rgba(201, 180, 255, 0.55);
  color: var(--accent);
  background: var(--accent-dim);
}

.product-reviews__tabs button:hover {
  border-color: rgba(201, 180, 255, 0.35);
  color: var(--text);
}

.product-reviews__num {
  font-weight: 700;
  color: var(--text-muted);
}

.product-reviews__num--pos {
  color: var(--accent);
}

.product-reviews__num--neg {
  color: var(--danger);
}

.product-reviews__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-review {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.product-review.is-neg {
  border-color: rgba(239, 68, 68, 0.25);
}

.product-review__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.product-review__av {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
}

.product-review__who {
  font-weight: 700;
  font-size: 0.88rem;
}

.product-review__when {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.product-review__buy {
  margin: 0 0 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.product-review__text {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--text);
}

.product-reviews__foot {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-muted);
  text-align: center;
}

.product-similar__grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.product-sim {
  display: block;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  text-decoration: none;
  color: inherit;
  transition:
    border-color var(--ns-dur-1) ease,
    background var(--ns-dur-1) ease;
}

.product-sim:hover {
  border-color: rgba(201, 180, 255, 0.45);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
}

.product-sim__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 6px;
}

.product-sim__title {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  flex: 1;
  min-width: 0;
}

.product-sim__price {
  flex-shrink: 0;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(201, 180, 255, 0.35);
}

.product-sim__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.product-sim__tag {
  font-size: 0.68rem;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.product-sim__foot {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.product-sim__seller {
  font-weight: 700;
  color: var(--accent);
}

.product-sim__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-dim);
}

.product-sim__dot.is-on {
  background: var(--accent);
  box-shadow: 0 0 0 2px rgba(201, 180, 255, 0.35);
}

.product-miss__h1 {
  margin: 0 0 10px;
  font-size: 1.2rem;
}

.balance-widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 14px;
}

.balance-widget .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.balance-widget .balance {
  font-weight: 700;
  font-size: 1.1rem;
}

.balance-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.balance-actions button {
  padding: 10px 6px;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(199, 181, 255, 0.45);
  background: var(--accent-dim);
  color: var(--accent);
  cursor: pointer;
}

.tool-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
}

.tool-panel h4 {
  margin: 0 0 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.tool-panel input {
  width: 100%;
  margin-bottom: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 0.85rem;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.filter-field {
  grid-column: span 4;
}

@media (max-width: 1100px) {
  .filter-field {
    grid-column: span 6;
  }
}

@media (max-width: 640px) {
  .filter-field {
    grid-column: span 12;
  }
}

.filter-field label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.filter-field input,
.filter-field select {
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 0.85rem;
}

.range-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.tri-toggle {
  display: flex;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}

.tri-toggle button {
  flex: 1;
  padding: 8px 4px;
  border: none;
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 0.72rem;
  cursor: pointer;
}

.tri-toggle button + button {
  border-left: 1px solid var(--border);
}

.tri-toggle button.is-on {
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 600;
}

.filter-sticky {
  position: sticky;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 12px 16px;
  background: #0c0814;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.filter-sticky .spacer {
  flex: 1;
}

.filter-sticky .count {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.sort-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.sort-tabs button {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
}

.sort-tabs button.is-active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.sort-tabs .dropdown-wrap {
  display: inline-block;
  vertical-align: middle;
}

.sort-dropdown-toggle {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sort-dropdown-toggle:hover {
  color: var(--text);
  border-color: #4c3d66;
}

.sort-dropdown-toggle.is-active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.sort-dropdown-panel {
  left: 0;
  right: auto;
  min-width: 240px;
  padding: 6px;
}

.sort-dropdown-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  margin: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.875rem;
  cursor: pointer;
}

.sort-dropdown-option:hover {
  background: var(--surface);
  color: var(--text);
}

.sort-dropdown.is-open .sort-dropdown-chevron {
  transform: rotate(-180deg);
}

.sort-dropdown-chevron {
  display: inline-block;
  font-size: 0.65rem;
  opacity: 0.85;
  transition: transform var(--ns-dur-1) var(--ns-ease-out);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-muted);
  cursor: default;
}

.pill-tag .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

/* Help / legal */
.layout-help {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 16px 48px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 900px) {
  .layout-help {
    grid-template-columns: 1fr;
  }
}

.help-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  margin-bottom: 4px;
}

.help-nav a:hover {
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}

.help-nav a.is-active {
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 600;
}

.help-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
}

.help-content h1 {
  margin: 0 0 20px;
  font-size: 1.5rem;
}

.help-content h2 {
  margin: 24px 0 12px;
  font-size: 1rem;
  color: var(--text);
}

.help-content p,
.help-content li {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.help-content ol {
  padding-left: 1.2rem;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.faq-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.faq-card .badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  background: var(--accent-dim);
  color: var(--accent);
  margin-bottom: 10px;
}

.faq-card h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
}

.faq-card p {
  margin: 0 0 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.faq-card .btn-outline {
  display: inline-block;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
}

.faq-card .btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

/* FAB */
.fab-chat {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(145deg, #a78bfa, #7c3aed);
  color: #faf7ff;
  cursor: pointer;
  box-shadow: 0 8px 28px var(--accent-ring);
  display: grid;
  place-items: center;
  z-index: 90;
  transition: transform var(--ns-dur-1) var(--ns-ease-spring), box-shadow var(--ns-dur-1) ease, filter var(--ns-dur-1) ease;
}

.fab-chat:hover {
  transform: scale(1.06);
  filter: brightness(1.05);
}

.fab-chat:active {
  transform: scale(0.96);
}

/* Footer mini */
.site-footer {
  margin-top: auto;
  padding: 24px 16px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.site-footer a {
  color: var(--text-muted);
}

.nav-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.nav-more-btn:hover {
  color: var(--text);
  background: var(--surface);
}

@media (max-width: 600px) {
  .hide-mobile {
    display: none;
  }

  .header-search {
    max-width: 160px;
  }
}

/* --- Market: categories, compact filters, modal --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.category-section {
  margin-bottom: 18px;
}

.category-section__title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin: 0 0 10px 4px;
}

.market-cat-intro {
  margin: 0 0 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(26, 22, 36, 0.55), rgba(15, 13, 20, 0.88));
  box-shadow: inset 0 1px 0 rgba(201, 180, 255, 0.07);
  border-left: 3px solid rgba(199, 181, 255, 0.5);
}

.market-cat-intro__inner {
  padding: 14px 16px 16px;
}

.market-cat-intro__title {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.market-cat-intro__body {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
  gap: 8px;
  max-width: 100%;
}

@media (min-width: 700px) {
  .category-grid {
    grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  }
}

.category-tile {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(201, 180, 255, 0.16);
  border-radius: var(--radius-sm);
  background:
    radial-gradient(circle at 28% 22%, rgba(201, 180, 255, 0.2), transparent 42%),
    linear-gradient(145deg, rgba(34, 30, 46, 0.96), rgba(18, 15, 27, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 8px 18px rgba(6, 4, 12, 0.18);
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s, background 0.15s;
}

.category-tile__logo {
  position: relative;
  z-index: 1;
  width: 36px;
  height: 36px;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center center;
  pointer-events: none;
  display: block;
  flex-shrink: 0;
  margin: 0;
  filter: brightness(0) invert(1) drop-shadow(0 3px 8px rgba(0, 0, 0, 0.28));
  opacity: 0.96;
}

.category-tile__logo--native {
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.28));
  opacity: 1;
}

.category-tile__logo--darkbg {
  filter: brightness(0) invert(1) drop-shadow(0 3px 8px rgba(0, 0, 0, 0.28));
  opacity: 0.96;
}

.category-tile[data-cat="ai"] .category-tile__logo {
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.28));
}

.category-tile[data-cat="cs2"] .category-tile__logo {
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.28));
}

.category-tile[data-cat="subscriptions"] .category-tile__logo {
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.28));
}

.category-tile[data-cat="instagram"] .category-tile__logo {
  filter: brightness(0) invert(1) drop-shadow(0 3px 8px rgba(0, 0, 0, 0.28));
}

.category-tile:hover {
  border-color: rgba(201, 180, 255, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 0 3px rgba(201, 180, 255, 0.08),
    0 10px 22px rgba(6, 4, 12, 0.24);
  transform: translateY(-1px);
}

.category-tile.is-selected {
  border-color: rgba(201, 180, 255, 0.58);
  background:
    radial-gradient(circle at 28% 22%, rgba(201, 180, 255, 0.3), transparent 44%),
    linear-gradient(145deg, rgba(45, 37, 64, 0.98), rgba(25, 20, 36, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 0 0 3px rgba(201, 180, 255, 0.12),
    0 12px 26px rgba(6, 4, 12, 0.26);
}

.category-tile--dark .category-tile__abbr {
  color: #1a0a00;
}

.category-tile__abbr {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #f5f0ff;
  text-align: center;
  line-height: 1.1;
  padding: 2px;
  max-width: 100%;
  word-break: break-word;
}

.category-tile__warn {
  display: none;
}

.category-tile__warn--yellow {
  border-color: transparent transparent #eab308 transparent;
}

.category-tile__warn--red {
  border-color: transparent transparent #ef4444 transparent;
}

.filter-compact {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
}

.filter-compact__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.filter-compact__row:last-child {
  margin-bottom: 0;
}

.filter-compact__row--sort {
  margin-bottom: 10px;
}

.filter-compact .sort-tabs {
  margin-top: 0;
  flex: 1;
  min-width: 0;
}

.field-price {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 10px;
  min-width: 0;
  flex: 0 1 120px;
}

.field-price input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--text);
  padding: 10px 0;
  font-size: 0.85rem;
}

.field-price input:focus {
  outline: none;
}

.field-price__cur {
  font-size: 0.8rem;
  color: var(--text-dim);
  flex-shrink: 0;
}

.field-search-grow {
  flex: 1;
  min-width: 160px;
}

.field-search-grow input {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 0.85rem;
}

.field-search-grow input::placeholder {
  color: var(--text-dim);
}

.field-search-grow input:focus {
  outline: none;
  border-color: rgba(199, 181, 255, 0.5);
}

.btn-all-filters {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-all-filters:hover {
  border-color: #4c3d66;
  color: var(--accent);
}

.filter-compact__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.filter-compact__meta label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.filter-compact__meta input[type="checkbox"] {
  accent-color: var(--accent-hover);
}

.btn-reset-mini {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
}

.btn-reset-mini:hover {
  color: var(--text);
  border-color: var(--text-dim);
}

.filter-compact__count {
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.filter-compact__count strong {
  color: var(--text);
  font-weight: 600;
}

.filter-compact__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-ghost-market {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-ghost-market:hover {
  color: var(--text);
  border-color: #4c3d66;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top)) 16px 16px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--ns-dur-2) var(--ns-ease-out), visibility var(--ns-dur-2) var(--ns-ease-out);
}

.modal.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 4, 12, 0.78);
  backdrop-filter: blur(6px);
}

.modal__panel {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  max-height: min(88vh, 900px);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  transform: scale(0.94) translateY(14px);
  transition: transform var(--ns-dur-2) var(--ns-ease-spring);
}

.modal.is-open .modal__panel {
  transform: scale(1) translateY(0);
}

.modal__panel--reward {
  width: min(420px, 100%);
  max-height: none;
  background: linear-gradient(165deg, rgba(30, 26, 42, 0.98), rgba(15, 13, 22, 0.99));
  border-color: rgba(201, 180, 255, 0.18);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(201, 180, 255, 0.08);
}

.modal__lead {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.modal__head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
  border-radius: var(--radius) var(--radius) 0 0;
}

.modal__head h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.modal__close {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.modal__close:hover {
  background: var(--surface-2);
  color: var(--text);
}

.modal__body {
  flex: 1;
  overflow: auto;
  padding: 16px 18px 20px;
}

.modal__foot {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  background: #0c0814;
  border-radius: 0 0 var(--radius) var(--radius);
}

.modal__foot .spacer {
  flex: 1;
}

.adv-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

@media (max-width: 960px) {
  .adv-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .adv-grid {
    grid-template-columns: 1fr;
  }
}

.adv-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.adv-card__title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.adv-card__title .game-tag {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--accent-dim);
  color: var(--accent);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
}

.adv-field {
  margin-bottom: 10px;
}

.adv-field:last-child {
  margin-bottom: 0;
}

.adv-field label {
  display: block;
  font-size: 0.68rem;
  color: var(--text-dim);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.adv-field input,
.adv-field select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.8rem;
}

.adv-field .range-pair {
  gap: 6px;
}

.adv-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  cursor: pointer;
}

.adv-check:last-child {
  margin-bottom: 0;
}

.adv-check input {
  margin-top: 2px;
  accent-color: var(--accent-hover);
}

.adv-inline-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.adv-inline-row input {
  flex: 0 0 56px;
}

.adv-inline-row select {
  flex: 1;
  min-width: 0;
}

body.modal-open {
  overflow: hidden;
}

/* Каталог маркета */
.listings-root {
  margin-top: 4px;
}

.listings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 640px) {
  .listings-grid {
    grid-template-columns: 1fr;
  }
}

.listing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    border-color var(--ns-dur-1) var(--ns-ease-out),
    box-shadow var(--ns-dur-1) var(--ns-ease-out),
    transform var(--ns-dur-1) var(--ns-ease-out);
}

.listing-card:hover {
  border-color: rgba(201, 180, 255, 0.28);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22);
  transform: translateY(-3px);
}

.listing-card__media {
  display: block;
  overflow: hidden;
}

.listing-card__media img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.listing-card__media--category {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  background: linear-gradient(
    165deg,
    rgba(26, 22, 36, 0.96) 0%,
    rgba(15, 12, 22, 0.99) 100%
  );
  border-bottom: 1px solid rgba(201, 180, 255, 0.08);
}

.listing-card__media--category img,
.listing-card__cover--category {
  width: min(46%, 152px);
  max-height: 68%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  object-position: center;
}

.listing-card__body {
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.listing-card__title {
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  line-height: 1.35;
}

.listing-card__title:hover {
  color: var(--accent);
}

.listing-card__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.listing-card__row-left {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.listing-card__cart {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(201, 180, 255, 0.06);
  color: var(--accent);
  cursor: pointer;
  transition:
    border-color var(--ns-dur-1) var(--ns-ease-out),
    background var(--ns-dur-1) var(--ns-ease-out),
    color var(--ns-dur-1) var(--ns-ease-out);
}

.listing-card__cart:hover {
  border-color: var(--accent-dim);
  background: rgba(201, 180, 255, 0.12);
  color: var(--accent-hover);
}

.listing-card__price {
  font-weight: 700;
  color: var(--accent);
  font-size: 1rem;
}

.listing-card__time {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.listing-card__seller-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
}

.listing-card__seller-link:hover span {
  color: var(--accent);
  text-decoration: underline;
}

.listing-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.listing-badge {
  font-size: 0.65rem;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 600;
}

.listing-card__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(201, 180, 255, 0.1);
}

.listing-card__pin {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(201, 180, 255, 0.06);
  color: var(--text-muted);
  cursor: pointer;
  transition:
    border-color var(--ns-dur-1) var(--ns-ease-out),
    background var(--ns-dur-1) var(--ns-ease-out),
    color var(--ns-dur-1) var(--ns-ease-out);
}

.listing-card__pin:hover {
  border-color: var(--accent-dim);
  color: var(--accent);
  background: rgba(201, 180, 255, 0.1);
}

.listing-card__pin svg {
  fill: none;
}

.listing-card__pin.is-pinned {
  color: var(--accent-hover);
  border-color: rgba(201, 180, 255, 0.35);
  background: rgba(201, 180, 255, 0.14);
}

.listing-card__pin.is-pinned svg {
  fill: currentColor;
}

.listing-card__buy {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.listing-card__cart--action {
  flex-shrink: 0;
}

.listings-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.site-error-banner {
  background: #5b1b2a;
  color: #fecdd3;
  padding: 12px 16px;
  text-align: center;
  font-size: 0.875rem;
  border-bottom: 1px solid #9f1239;
}

.ns-app-toast {
  position: fixed;
  z-index: 10050;
  left: 50%;
  bottom: 24px;
  transform: translate3d(-50%, 16px, 0);
  max-width: min(440px, calc(100vw - 24px));
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition:
    opacity 0.28s var(--ns-ease-out),
    transform 0.32s var(--ns-ease-spring);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.55);
}

.ns-app-toast.is-visible {
  opacity: 1;
  transform: translate3d(-50%, 0, 0);
}

.ns-app-toast--success {
  color: var(--text);
  background: linear-gradient(165deg, rgba(36, 30, 52, 0.98), rgba(20, 17, 30, 0.99));
  border: 1px solid rgba(201, 180, 255, 0.38);
  box-shadow:
    0 14px 44px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(201, 180, 255, 0.08),
    0 0 28px rgba(167, 139, 250, 0.18);
}

.ns-app-toast--danger {
  color: #fecdd3;
  background: linear-gradient(165deg, #4a1520, #2a0c12);
  border: 1px solid rgba(239, 68, 68, 0.45);
}

@media (prefers-reduced-motion: reduce) {
  .ns-app-toast {
    transition: opacity 0.12s ease;
    transform: translate3d(-50%, 0, 0);
  }
}

/* Профиль: новая тема */
.new-thread-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
}

.new-thread-card__title {
  margin: 0 0 12px;
  font-size: 0.95rem;
  font-weight: 600;
}

.new-thread-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
}

.new-thread-input:focus {
  outline: none;
  border-color: rgba(199, 181, 255, 0.5);
}

.new-thread-hint {
  margin: 10px 0 0;
  font-size: 0.75rem;
  color: var(--text-dim);
  line-height: 1.4;
}

.profile-threads-limit-note {
  margin: -4px 0 14px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.threads-empty {
  margin: 0;
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.profile-thread-item {
  margin-bottom: 10px;
  padding: 12px 14px;
}

.profile-thread-item__title {
  font-size: 0.9rem;
  display: block;
  line-height: 1.35;
}

.profile-thread-item__meta {
  margin-top: 8px;
}

.profile-thread-item__link {
  color: var(--text);
  text-decoration: none;
}

.profile-thread-item__link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.topic-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px 32px;
}

.topic-page__title {
  font-size: 1.35rem;
  margin: 0 0 8px;
  line-height: 1.3;
}

.topic-page__meta {
  margin: 0 0 18px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.topic-missing {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}

.topic-op__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.topic-op__avatar {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  object-position: center;
  border: 1px solid var(--border);
}

.topic-op__author {
  color: var(--text);
  text-decoration: none;
}

.topic-op__author:hover {
  color: var(--accent);
}

.topic-op__badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 0.72rem;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text-muted);
  vertical-align: middle;
}

.topic-op__body {
  font-size: 0.95rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.topic-op__empty {
  color: var(--text-muted);
  font-style: italic;
}

.topic-op__foot {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.topic-op__date {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.topic-votes__label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.topic-votes__row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.topic-vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.topic-vote-btn:hover {
  border-color: var(--accent);
  background: var(--surface-2);
}

.topic-vote-btn[aria-pressed="true"] {
  border-color: var(--accent);
  background: rgba(139, 92, 246, 0.12);
}

.topic-reply-card {
  padding: 14px 16px;
  margin-bottom: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.topic-reply-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.topic-reply-card__av {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  object-position: center;
  border: 1px solid var(--border);
}

.topic-reply-card__author {
  color: var(--text);
  text-decoration: none;
}

.topic-reply-card__author:hover {
  color: var(--accent);
}

.topic-reply-card__date {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-left: auto;
}

.topic-reply-card__body {
  font-size: 0.92rem;
  line-height: 1.5;
  padding-left: 0;
}

@media (min-width: 520px) {
  .topic-reply-card__body {
    padding-left: 50px;
  }
}

/* Forum topic page — ширина как на референсе, акценты = фиолетово-сиреневые переменные темы */
body.page-topic-forum {
  --forum-surface: var(--surface);
  --forum-border: var(--border);
  background: var(--bg);
}

.page-topic-forum .topic-page {
  max-width: 1120px;
  padding: 0 20px 40px;
}

.page-topic-forum .breadcrumbs--forum {
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
  font-size: 0.82rem;
  color: #9ca3af;
}

.page-topic-forum .breadcrumbs--forum a {
  color: #9ca3af;
  text-decoration: none;
}

.page-topic-forum .breadcrumbs--forum a:hover {
  color: var(--accent);
}

.page-topic-forum .breadcrumb-accent {
  color: var(--accent) !important;
}

.page-topic-forum .breadcrumb-current {
  color: #e5e7eb;
}

.page-topic-forum .topic-page__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

.page-topic-forum .topic-meta__accent {
  color: var(--accent);
  text-decoration: none;
}

.page-topic-forum .topic-meta__accent:hover {
  text-decoration: underline;
  color: var(--accent-hover);
}

.topic-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
  padding: 10px 0;
}

.topic-toolbar__left {
  min-height: 36px;
}

.topic-toolbar__textbtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: #d1d5db;
  font-size: 0.88rem;
  cursor: pointer;
}

.topic-toolbar__textbtn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.topic-toolbar__settings-ico {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transform: translateX(-0.5px);
}

.topic-settings-wrap {
  position: relative;
}

.topic-settings-panel {
  display: block;
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 80;
  min-width: 220px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px);
  transition:
    opacity var(--ns-dur-1) var(--ns-ease-out),
    visibility var(--ns-dur-1) var(--ns-ease-out),
    transform var(--ns-dur-1) var(--ns-ease-out);
}

.topic-settings-wrap.is-open .topic-settings-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.topic-settings-panel__btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #e5e7eb;
  font-size: 0.88rem;
  cursor: pointer;
}

.topic-settings-panel__btn:hover {
  background: var(--accent-dim);
  color: var(--accent-hover);
}

.topic-settings-panel__btn--danger {
  color: #f87171;
}

.topic-settings-panel__btn--danger:hover {
  background: rgba(248, 113, 113, 0.12);
  color: #fca5a5;
}

.topic-toolbar__subscribe {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.topic-toolbar__subscribe:hover {
  border-color: var(--accent);
  background: var(--surface-2);
}

.topic-toolbar__subscribe.is-subscribed {
  background: var(--accent-dim);
  border-color: rgba(201, 180, 255, 0.45);
  color: var(--accent);
}

.topic-closed-hint {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.25);
  color: #fca5a5;
  font-size: 0.9rem;
}

.page-topic-forum .topic-op.sidebar-card,
.page-topic-forum .topic-votes.sidebar-card {
  background: var(--forum-surface);
  border-color: var(--forum-border);
}

.page-topic-forum .topic-op__author:hover,
.page-topic-forum .topic-reply-card__author:hover {
  color: var(--accent);
}

.page-topic-forum .topic-vote-btn--active {
  border-color: var(--accent-ring);
  background: var(--accent-dim);
}

.topic-op__online {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-ring);
  vertical-align: middle;
}

/* Маркет: корзина в шапке */
.icon-btn--cart {
  position: relative;
}

.icon-btn--bookmarks-ns {
  position: relative;
}

.cart-dropdown {
  position: relative;
}

.bookmarks-dropdown {
  position: relative;
}

.cart-dropdown__badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent);
  color: #1a1028;
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
  pointer-events: none;
}

.cart-dropdown-panel {
  display: flex;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 200;
  width: min(360px, calc(100vw - 20px));
  max-height: min(420px, 70vh);
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top right;
  transition:
    opacity var(--ns-dur-1) var(--ns-ease-out),
    visibility var(--ns-dur-1) var(--ns-ease-out),
    transform var(--ns-dur-1) var(--ns-ease-spring);
}

.cart-dropdown.is-open .cart-dropdown-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.cart-dropdown__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: rgba(32, 26, 48, 0.5);
}

.cart-dropdown__count {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.cart-dropdown__clear {
  border: none;
  background: transparent;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 2px;
  font-family: inherit;
}

.cart-dropdown__clear:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.cart-dropdown__body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0 10px;
}

.cart-dropdown__foot {
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: rgba(32, 26, 48, 0.45);
}

.cart-dropdown__checkout {
  width: 100%;
  justify-content: center;
}

.cart-dropdown__empty {
  margin: 20px 16px;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-dim);
}

.cart-line {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.cart-line--gone {
  opacity: 0.85;
}

.cart-line__main {
  flex: 1 1 auto;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cart-line__main:hover .cart-line__title {
  color: var(--accent);
}

.cart-line__title {
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}

.cart-line__price {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
}

.cart-line__sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.cart-line__qty {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.cart-line__qty-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

.cart-line__qty-btn:hover {
  border-color: var(--accent-dim);
  color: var(--accent);
}

.cart-line__qty-val {
  min-width: 22px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

.cart-line__remove {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.cart-line__remove:hover {
  border-color: rgba(248, 113, 113, 0.45);
  color: #fca5a5;
}

/* Маркет: иконка корзины (акцент) */
.icon-btn--cart-ns,
.icon-btn--bookmarks-ns {
  color: var(--accent);
}

.icon-btn--cart-ns:hover,
.icon-btn--bookmarks-ns:hover {
  color: var(--accent-hover);
}

/* Сообщения: выпадающий список */
.msgs-dropdown {
  position: relative;
}

.msgs-dropdown-panel {
  display: flex;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 200;
  width: min(440px, calc(100vw - 20px));
  max-height: min(560px, 78vh);
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top right;
  transition:
    opacity var(--ns-dur-1) var(--ns-ease-out),
    visibility var(--ns-dur-1) var(--ns-ease-out),
    transform var(--ns-dur-1) var(--ns-ease-spring);
}

.msgs-dropdown.is-open .msgs-dropdown-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.msgs-dropdown__icons {
  display: flex;
  gap: 4px;
}

.msgs-ico-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
}

.msgs-ico-btn:hover {
  color: var(--accent);
  background: rgba(174, 146, 255, 0.08);
}

.msgs-dropdown__all {
  display: block;
  padding: 10px 12px 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  background: rgba(32, 26, 48, 0.35);
}

.msgs-dropdown__all:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.msgs-dd-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 10px;
  border-bottom: 1px solid var(--border);
  background: rgba(32, 26, 48, 0.45);
}

.msgs-dd-search {
  flex: 1 1 0;
  min-width: 0;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(10, 8, 18, 0.55);
  color: var(--text);
  font: inherit;
}

.msgs-dd-search::placeholder {
  color: var(--text-dim);
}

.msgs-dd-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  background: rgba(18, 14, 32, 0.4);
}

.msgs-dd-tab {
  border: 1px solid var(--border);
  background: rgba(32, 26, 48, 0.45);
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 7px 4px;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
}

.msgs-dd-tab:hover {
  border-color: rgba(199, 181, 255, 0.45);
  color: var(--text);
}

.msgs-dd-tab.is-active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(174, 146, 255, 0.12);
}

.msgs-dropdown__body {
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  max-height: min(380px, 52vh);
}

.msgs-dropdown__empty {
  margin: 16px;
  font-size: 0.88rem;
  color: var(--text-dim);
}

.msgs-dd-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.msgs-dd-row:hover {
  background: rgba(174, 146, 255, 0.06);
}

.msgs-dd-row__av {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.msgs-dd-row__mid {
  flex: 1;
  min-width: 0;
}

.msgs-dd-row__name {
  font-weight: 600;
  font-size: 0.88rem;
}

.msgs-dd-row__prev {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msgs-dd-row__meta {
  font-size: 0.72rem;
  color: var(--text-dim);
  flex-shrink: 0;
}

.market-lang-strip {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-left: auto;
  user-select: none;
}

.mp-toolbar {
  margin-bottom: 16px;
  padding: 14px;
}

.mp-toolbar__row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.mp-toolbar__row:last-child {
  margin-bottom: 0;
}

.mp-toolbar__actions {
  align-items: center;
}

.mp-inp {
  min-width: 0;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(10, 8, 18, 0.55);
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
}

.mp-inp--grow {
  flex: 1 1 180px;
}

.mp-count {
  margin-left: auto;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.mp-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mp-card {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
}

.mp-card--link {
  text-decoration: none;
  color: inherit;
}

.mp-card--link:hover {
  border-color: rgba(174, 146, 255, 0.35);
}

.mp-card__cb {
  margin-top: 4px;
}

.mp-card__title {
  font-weight: 600;
}

.mp-card__meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.mp-card__data {
  margin: 8px 0 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
  font-size: 0.78rem;
  white-space: pre-wrap;
  max-height: 140px;
  overflow: auto;
}

.market-page-h1 {
  margin: 0 0 12px;
  font-size: 1.35rem;
}

.msgs-layout {
  display: grid;
  grid-template-columns: minmax(248px, 320px) 1fr;
  gap: 16px;
  align-items: stretch;
}

@media (max-width: 900px) {
  .msgs-layout {
    grid-template-columns: 1fr;
  }
}

.msgs-aside {
  padding: 12px;
}

.msgs-aside__tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 10px;
}

.msgs-tab {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 7px 4px;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: inherit;
}

.msgs-tab:hover {
  border-color: rgba(199, 181, 255, 0.45);
  color: var(--text);
}

.msgs-tab.is-active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(174, 146, 255, 0.1);
}

.msgs-aside__search {
  width: 100%;
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(10, 8, 18, 0.55);
  color: var(--text);
  font: inherit;
}

.msgs-aside__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 60vh;
  overflow-y: auto;
}

.msgs-side-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  text-align: left;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.msgs-side-row__av {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  border: 1px solid var(--border);
}

.msgs-side-row__col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}

.msgs-side-row.is-active {
  border-color: var(--accent);
  background: rgba(174, 146, 255, 0.08);
}

.msgs-side-row__name {
  font-weight: 600;
  font-size: 0.85rem;
}

.msgs-side-row__prev {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msgs-main {
  display: flex;
  flex-direction: column;
  min-height: min(72vh, 640px);
  padding: 0;
  overflow: hidden;
}

.msgs-main__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  flex: 0 0 auto;
}

.msgs-main__head-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.msgs-main__head-av {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  border: 1px solid var(--border);
}

.msgs-main__head-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.msgs-main__head-text strong {
  font-size: 0.95rem;
}

.msgs-main__sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.msgs-main__head-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.msgs-head-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0;
}

.msgs-head-ico:hover {
  color: var(--accent);
  border-color: rgba(199, 181, 255, 0.35);
  background: rgba(174, 146, 255, 0.1);
}

.msgs-main__scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.msgs-main__composer {
  padding: 14px 14px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  align-items: center;
  flex: 0 0 auto;
}

.msgs-main__composer.msgs-composer-tg {
  align-items: center;
  gap: 10px;
}

.msgs-composer-tg {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.msgs-composer-clip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(32, 26, 48, 0.55);
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
}

.msgs-composer-clip:hover {
  color: var(--accent);
  border-color: rgba(199, 181, 255, 0.45);
  background: rgba(174, 146, 255, 0.1);
}

.msgs-composer-ico {
  display: block;
}

.msgs-composer-input-shell {
  position: relative;
  display: flex;
  align-items: stretch;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(10, 8, 18, 0.55);
  min-height: 44px;
}

.msgs-composer-ta {
  flex: 1 1 auto;
  width: 100%;
  min-height: 44px;
  max-height: 200px;
  resize: none;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  padding: 10px 118px 10px 12px;
  line-height: 1.45;
  border-radius: 12px;
  box-sizing: border-box;
}

.msgs-composer-ta::placeholder {
  color: var(--text-dim);
}

.msgs-composer-ta:focus {
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(199, 181, 255, 0.35);
}

.msgs-composer-input-actions {
  position: absolute;
  right: 8px;
  top: 7px;
  bottom: auto;
  display: flex;
  align-items: center;
  gap: 2px;
}

.msgs-composer-act {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
}

.msgs-composer-act:hover {
  color: var(--accent);
  background: rgba(174, 146, 255, 0.12);
}

.msgs-composer-act--gif {
  width: auto;
  padding: 0 6px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.msgs-composer-send {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(199, 181, 255, 0.45);
  background: linear-gradient(145deg, rgba(174, 146, 255, 0.35), rgba(138, 110, 220, 0.22));
  color: #f4edff;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.msgs-composer-send:hover {
  border-color: var(--accent-hover);
  color: #fff;
  background: linear-gradient(145deg, rgba(190, 168, 255, 0.45), rgba(154, 126, 232, 0.28));
}

.msgs-composer-tg .msgs-composer__grow {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.msgs-bubble {
  align-self: flex-start;
  max-width: 92%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(32, 26, 48, 0.55);
}

.msgs-bubble--me {
  align-self: flex-end;
  border-color: rgba(174, 146, 255, 0.35);
}

.msgs-bubble__meta {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.msgs-bubble__body {
  font-size: 0.88rem;
  white-space: pre-wrap;
}

.msgs-bubble__product-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
}

.msgs-bubble__product-link:hover {
  color: var(--accent-hover);
}

.msgs-placeholder {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  padding: 40px 20px;
}

.bm-h1 {
  margin: 0 0 8px;
  font-size: 1.35rem;
}

.bm-sub {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.bm-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bm-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  text-decoration: none;
  color: inherit;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.bm-row:hover {
  border-color: rgba(174, 146, 255, 0.35);
}

.bm-row__title {
  font-weight: 600;
}

.bm-row__meta {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.sup-form__label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 10px 0 4px;
}

.user-mega__tile--lang {
  border: 1px dashed var(--border);
}

/* Notification dropdown */
.icon-btn--notify {
  position: relative;
}

.notif-dropdown {
  position: relative;
}

.notif-dropdown__badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent);
  color: #1a1028;
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
  pointer-events: none;
}

.notif-dropdown-panel {
  display: flex;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 200;
  width: min(420px, calc(100vw - 20px));
  max-height: min(440px, 70vh);
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top right;
  transition:
    opacity var(--ns-dur-1) var(--ns-ease-out),
    visibility var(--ns-dur-1) var(--ns-ease-out),
    transform var(--ns-dur-1) var(--ns-ease-spring);
}

.notif-dropdown.is-open .notif-dropdown-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.notif-dropdown__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 10px 6px;
  border-bottom: 1px solid var(--border);
}

.notif-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
  align-items: center;
}

.notif-tab {
  padding: 4px 6px;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: #9ca3af;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  white-space: nowrap;
  line-height: 1.2;
}

.notif-tab:hover {
  color: #e5e7eb;
}

.notif-tab.is-active {
  color: var(--accent);
}

.notif-tab.is-active::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 1px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.notif-dropdown__actions {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
  align-items: center;
}

.notif-icon-btn {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 4px;
  box-sizing: border-box;
  flex-shrink: 0;
  line-height: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  text-decoration: none;
}

.notif-icon-btn:hover,
.notif-icon-btn:focus-visible {
  text-decoration: none;
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent);
}

.notif-icon-btn svg {
  width: 12px;
  height: 12px;
  display: block;
  flex-shrink: 0;
  overflow: visible;
}

/* Лёгкая оптическая подгонка: контур шестерни визуально чуть тяжелее справа */
.notif-icon-btn .icon-settings-gear {
  transform: translateX(-0.5px);
}

@media (max-width: 360px) {
  .notif-dropdown-panel {
    width: min(100vw - 16px, 420px);
  }

  .notif-tab {
    font-size: 0.68rem;
    padding: 3px 4px;
  }

  .notif-icon-btn {
    width: 26px;
    height: 26px;
    padding: 3px;
  }

  .notif-icon-btn svg {
    width: 11px;
    height: 11px;
  }
}

.notif-dropdown__body {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0 10px;
}

.notif-empty {
  margin: 16px;
  text-align: center;
  font-size: 0.88rem;
  color: #6b7280;
}

.notif-item {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--border);
  transition: background var(--ns-dur-1) ease;
}

.notif-item:hover {
  background: var(--accent-dim);
}

.notif-item--unread {
  background: rgba(201, 180, 255, 0.06);
}

.notif-item__av {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-dim);
}

.notif-item__title {
  font-size: 0.88rem;
  line-height: 1.4;
  color: #e5e7eb;
}

.notif-item__time {
  margin-top: 4px;
  font-size: 0.75rem;
  color: #6b7280;
}

.notif-settings-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.notif-settings-page__card {
  padding: 24px;
}

.notif-settings-list {
  margin: 12px 0 0;
  padding-left: 1.2rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Модерация */
.mod-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 16px 48px;
}

.mod-page-head {
  margin-bottom: 18px;
}

.mod-page-head h1 {
  margin: 0 0 6px;
  font-size: 1.5rem;
}

.mod-sub {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.mod-h2 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.mod-hint {
  margin: 0 0 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.mod-grant-card {
  margin-bottom: 18px;
}

.mod-grant-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mod-grant-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  cursor: pointer;
}

.mod-grant-user {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}

.mod-grant-user:hover {
  color: var(--accent);
  text-decoration: underline;
}

.mod-tickets {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mod-ticket {
  padding: 18px;
}

.mod-ticket__head {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.mod-ticket__status {
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text);
}

.mod-ticket__kind {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mod-ticket__title {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

.mod-ticket__detail {
  margin: 0 0 12px;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #d1d5db;
  white-space: pre-wrap;
  word-break: break-word;
}

.mod-ticket__link {
  margin: 0 0 14px;
  font-size: 0.88rem;
}

.mod-ticket__replies {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
}

.mod-reply {
  margin-bottom: 10px;
  font-size: 0.85rem;
}

.mod-reply:last-child {
  margin-bottom: 0;
}

.mod-reply__body {
  margin-top: 4px;
  color: #e5e7eb;
}

.mod-ticket__ta {
  width: 100%;
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  resize: vertical;
}

.mod-ticket__btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mod-empty {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.mod-denied {
  padding: 24px;
}

.mod-cat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.mod-cat-tab {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.mod-cat-tab:hover {
  color: var(--text);
  border-color: rgba(199, 181, 255, 0.45);
}

.mod-cat-tab.is-active {
  color: var(--accent);
  border-color: rgba(199, 181, 255, 0.55);
  background: rgba(199, 181, 255, 0.1);
}

.mod-tab-body {
  min-height: 200px;
  width: 100%;
  box-sizing: border-box;
}

.mod-panel {
  width: 100%;
  box-sizing: border-box;
}

.mod-search-label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0 0 6px;
}

.mod-search-input {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  padding: 10px 12px;
  margin: 0 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.95rem;
}

.mod-support-toolbar .mod-search-input {
  flex: 1 1 auto;
  min-width: 0;
  margin-bottom: 12px;
}

.mod-ticket__no {
  font-weight: 700;
  color: var(--accent);
  margin-right: 10px;
}

.mod-support-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.mod-support-toolbar__hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.mod-sup-pub-hint {
  margin: 0 0 10px;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.mod-sup-chat {
  padding: 14px 16px 16px;
  box-sizing: border-box;
}

.mod-sup-chat__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.mod-support-shell {
  display: grid;
  grid-template-columns: minmax(220px, 300px) 1fr;
  gap: 16px;
  align-items: start;
  min-height: 360px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

@media (max-width: 900px) {
  .mod-support-shell {
    grid-template-columns: 1fr;
  }
}

.mod-support-sidebar {
  border-right: 1px solid var(--border);
  background: var(--bg);
  max-height: min(70vh, 560px);
  overflow-y: auto;
}

@media (max-width: 900px) {
  .mod-support-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border);
    max-height: 220px;
  }
}

.mod-support-list {
  display: flex;
  flex-direction: column;
  padding: 8px;
  gap: 4px;
}

.mod-sup-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 10px;
  text-align: left;
  width: 100%;
  padding: 10px 10px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.mod-sup-row:hover {
  background: var(--surface-2);
}

.mod-sup-row.is-active {
  background: rgba(199, 181, 255, 0.12);
  outline: 1px solid rgba(199, 181, 255, 0.35);
}

.mod-sup-row__name {
  font-weight: 600;
  font-size: 0.88rem;
  grid-column: 1 / -1;
}

.mod-sup-row__sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  grid-column: 1 / 2;
}

.mod-sup-row__st {
  font-size: 0.72rem;
  color: var(--text-muted);
  grid-column: 2 / 3;
  white-space: nowrap;
}

.mod-support-main {
  padding: 16px;
  min-height: 280px;
}

.mod-support-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 48px 16px;
  font-size: 0.95rem;
}

.mod-sup-chat__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.mod-sup-chat__badge {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.mod-sup-chat__msgs {
  max-height: min(50vh, 400px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.mod-sup-msg {
  border-radius: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.mod-sup-msg--staff {
  border-color: rgba(199, 181, 255, 0.35);
  background: rgba(199, 181, 255, 0.08);
}

.mod-sup-msg__meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.mod-sup-msg__body {
  font-size: 0.9rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.mod-sup-chat__composer textarea,
.mod-sup-new textarea {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  padding: 10px;
  font: inherit;
}

.mod-prod-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.mod-prod-actions .btn-secondary {
  flex: 1 1 160px;
  min-width: 0;
}

.mod-sup-chat__btns,
.mod-sup-new {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mod-sup-new {
  flex-direction: column;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.mod-prof-search {
  margin-bottom: 16px;
}

.mod-prof-sugg-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.mod-prof-sugg {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.mod-prof-sugg img {
  border-radius: 50%;
}

.mod-prof-card {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}

.mod-prof-card__av {
  border-radius: 12px;
  border: 1px solid var(--border);
}

.mod-prof-card__name {
  font-weight: 700;
  font-size: 1.05rem;
}

.mod-prof-card__nid {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.mod-prof-card__link {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--accent);
}

.mod-prof-ban {
  display: block;
  margin: 12px 0;
  font-size: 0.9rem;
}

.mod-prof-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.mod-prof-sanctions {
  margin-top: 14px;
  padding: 14px;
}

.mod-prof-sanctions__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin: 12px 0;
}

.mod-prof-ban-toolbar {
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.mod-prof-ban-toolbar .mod-stats-field {
  margin-bottom: 0;
}

.wall-ban-log-card {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  margin-bottom: 10px;
}

.wall-ban-log-card__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}

.wall-ban-log-card__kind {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
}

.wall-ban-log-card__date {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.wall-ban-log-card__actor {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.wall-ban-log-card__body {
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text);
}

.mod-btn-danger {
  border-color: rgba(248, 113, 113, 0.45) !important;
  color: #fecaca !important;
}

.mod-prod-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  text-align: left;
  padding: 10px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.mod-prod-row:hover {
  background: var(--surface-2);
}

.mod-prod-row.is-active {
  background: rgba(199, 181, 255, 0.1);
}

.mod-prod-row__t {
  font-weight: 600;
}

.mod-prod-row__c {
  font-size: 0.72rem;
  color: var(--accent);
  font-family: ui-monospace, monospace;
}

.mod-prod-secret {
  font-size: 0.78rem;
  color: var(--accent);
  font-family: ui-monospace, monospace;
  margin-left: 8px;
}

.support-user-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px 48px;
}

.support-solo {
  max-width: 560px;
  margin: 0 auto;
  padding-top: 8px;
}

.support-solo__h1 {
  margin: 0 0 8px;
  font-size: 1.5rem;
  font-weight: 700;
}

.support-solo__sub {
  margin: 0 0 20px;
}

.support-solo__h2 {
  margin: 0 0 14px;
  font-size: 1.05rem;
}

.support-solo__card {
  padding: 20px 22px;
}

.sup-form__field {
  display: block;
}

.sup-form__ta {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 12px;
  min-height: 140px;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.45;
  resize: vertical;
}

.sup-form__submit {
  width: auto;
  min-width: 160px;
  margin-top: 4px;
}

.mod-support-toolbar--user {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.mod-support-toolbar__title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.mod-support-toolbar__new {
  width: auto;
  padding: 8px 16px;
}

.mod-support-list-label {
  padding: 8px 10px 6px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.mod-sup-compose__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.mod-sup-compose__cancel {
  width: auto;
  padding: 8px 14px;
}

.mod-sup-compose__hint {
  margin: 0 0 14px;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.mod-sup-compose .sup-form__submit {
  margin-top: 8px;
}

/* ——— User mega dropdown (header) ——— */
.dropdown-panel.user-mega {
  min-width: 320px;
  max-width: min(380px, calc(100vw - 24px));
  max-height: min(86vh, 640px);
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 14px;
  border-radius: 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

.dropdown-panel.user-mega::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.user-mega__head {
  text-align: center;
  margin-bottom: 12px;
}

.user-mega__av {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto 8px;
}

.user-mega__name {
  font-weight: 700;
  font-size: 1rem;
}

a.user-mega__name.user-mega__profile-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

a.user-mega__name.user-mega__profile-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.user-mega__balance {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.user-mega__balance-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.user-mega__balance-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-mega__bal-eye {
  border: none;
  background: none;
  padding: 4px;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 8px;
}

.user-mega__bal-eye:hover {
  color: var(--text);
  background: var(--accent-dim);
}

.user-mega__bal-val {
  flex: 1;
  font-weight: 700;
  font-size: 1.15rem;
}

.user-mega__eye-ic {
  display: block;
  color: var(--text-muted);
}

.user-mega__fx-toggle {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
}

.user-mega__fx-toggle:hover {
  color: var(--text);
  border-color: var(--accent);
}

.user-mega__fx-chev {
  display: inline-block;
  font-size: 0.7rem;
  transition: transform 0.15s ease;
}

.user-mega__balance.is-fx-open .user-mega__fx-chev {
  transform: rotate(180deg);
}

.user-mega__fx-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 60;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.55);
  max-height: min(340px, 55vh);
  overflow-y: auto;
}

.user-mega__fx-opt {
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  color: var(--text);
  margin-bottom: 2px;
  font: inherit;
}

.user-mega__fx-opt:hover {
  background: var(--accent-dim);
}

.user-mega__fx-opt.is-picked {
  background: rgba(34, 197, 94, 0.1);
}

.user-mega__fx-opt-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.user-mega__fx-opt-main {
  font-weight: 600;
  font-size: 0.86rem;
}

.user-mega__fx-check {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #22c55e;
  color: #052e16;
  font-size: 0.7rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.user-mega__fx-opt-hint {
  display: block;
  margin-top: 2px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.user-mega__fx-foot {
  margin-top: 4px;
  padding: 8px 6px 2px;
  border-top: 1px solid var(--border);
  font-size: 0.68rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.user-mega__bal-sep {
  opacity: 0.45;
}

.user-mega__bal-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.user-mega__bal-btn {
  flex: 1;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 6px;
  font-size: 0.72rem;
  cursor: pointer;
}

.user-mega__bal-btn--plus {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.45);
  color: #86efac;
}

.user-mega__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.user-mega__tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 10px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 500;
  transition: border-color 0.15s ease, background 0.15s ease;
}

button.user-mega__tile {
  cursor: pointer;
  font: inherit;
  text-align: left;
  width: 100%;
}

.user-mega__tile:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.user-mega__tile svg {
  color: var(--text-muted);
}

.user-mega__accounts {
  border-top: 1px solid var(--border);
  padding-top: 10px;
  margin-bottom: 10px;
}

.user-mega__second {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
  margin-bottom: 8px;
}

.user-mega__second:hover {
  border-color: var(--accent);
}

.user-mega__second-avwrap {
  position: relative;
  flex: 0 0 40px;
}

.user-mega__second-avwrap img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.user-mega__msg-badge {
  position: absolute;
  right: -4px;
  top: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #22c55e;
  color: #052e16;
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}

.user-mega__second-main {
  flex: 1;
  min-width: 0;
}

.user-mega__second-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.user-mega__second-bal {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.user-mega__second-go {
  font-size: 1.25rem;
  color: var(--text-muted);
}

.user-mega__grid + .user-mega__support-block {
  margin-top: 10px;
}

a.user-mega__support-block {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--accent);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
}

a.user-mega__support-block svg {
  flex-shrink: 0;
  opacity: 0.95;
}

a.user-mega__support-block:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent-hover);
}

.user-mega__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
  padding-top: 4px;
}

.user-mega__settings {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
}

.user-mega__settings:hover {
  border-color: var(--accent);
}

.user-mega__set-i {
  font-size: 1rem;
}

.user-mega__logout {
  flex: 0 0 48px;
  border-radius: 10px;
  border: 1px solid rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.12);
  color: #fecaca;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-mega__logout:hover {
  background: rgba(239, 68, 68, 0.22);
}

.user-mega--guest {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 200px;
  padding: 12px;
}

.user-mega__guest-login,
.user-mega__guest-reg {
  text-align: center;
  text-decoration: none;
  justify-content: center;
}

/* ——— Auth pages (login / register / verify) ——— */
.auth-body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(1200px 600px at 50% -10%, rgba(201, 180, 255, 0.12), transparent),
    var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
}

.auth-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.auth-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
}

.auth-back,
.auth-toplink {
  font-size: 0.88rem;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}

.auth-back:hover,
.auth-toplink:hover {
  text-decoration: underline;
}

.brand--auth {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 28px 26px 26px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.auth-card__title {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 700;
}

.auth-card__sub {
  margin: 0 0 20px;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.auth-tab {
  flex: 1;
  border: none;
  background: var(--bg);
  color: var(--text-muted);
  padding: 10px 12px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.auth-tab.is-active {
  background: var(--accent-dim);
  color: var(--text);
}

.auth-panel[hidden] {
  display: none !important;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.auth-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

.auth-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-ring);
}

.auth-row--between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.8rem;
}

.auth-check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  cursor: pointer;
}

.auth-muted {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.auth-send {
  width: 100%;
  margin-bottom: 4px;
}

.auth-submit {
  width: 100%;
  margin-top: 6px;
  padding: 12px 16px !important;
  font-weight: 700 !important;
}

.auth-switch {
  margin: 18px 0 0;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.auth-switch a {
  color: var(--accent);
  font-weight: 600;
}

.auth-footer-plate {
  border-top: 1px solid var(--border);
  background: #121212;
  color: #d4d4d4;
  padding: 28px 16px 16px;
  font-size: 0.82rem;
}

.auth-footer-plate__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px 24px;
}

@media (max-width: 900px) {
  .auth-footer-plate__inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .auth-footer-plate__inner {
    grid-template-columns: 1fr;
  }
}

.auth-footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.auth-footer-brand strong {
  color: var(--accent);
  font-weight: 800;
}

.auth-footer-tag {
  margin: 0 0 8px;
  line-height: 1.45;
  color: #a3a3a3;
}

.auth-footer-mail {
  margin: 0 0 8px;
  color: #737373;
}

.auth-footer-legal {
  margin: 0;
  font-size: 0.72rem;
  color: #525252;
  line-height: 1.4;
}

.auth-footer-h {
  margin: 0 0 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fafafa;
}

.auth-footer-col a {
  display: block;
  color: #a3a3a3;
  text-decoration: none;
  margin-bottom: 6px;
}

.auth-footer-col a:hover {
  color: #fff;
}

.auth-footer-icons {
  margin: 0;
  color: #737373;
}

.auth-footer-col--cta {
  display: flex;
  align-items: flex-start;
}

.auth-footer-support {
  width: 100%;
  text-align: center;
  padding: 12px 16px !important;
  border-radius: 10px !important;
}

.auth-footer-links {
  max-width: 1100px;
  margin: 20px auto 0;
  padding-top: 14px;
  border-top: 1px solid #262626;
  text-align: center;
  font-size: 0.8rem;
  color: #737373;
}

.auth-footer-links a {
  color: #a3a3a3;
  text-decoration: none;
  margin: 0 6px;
}

.auth-footer-links a:hover {
  color: #fff;
}

/* ——— Site-wide motion (dropdowns, modals, wall) ——— */
@keyframes ns-popover-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ns-thumb-in {
  from {
    opacity: 0;
    transform: scale(0.88);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes ns-panel-rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ns-wall-post-sent {
  0% {
    box-shadow: inset 0 0 0 0 rgba(201, 180, 255, 0);
  }
  35% {
    box-shadow: inset 0 0 0 2px rgba(201, 180, 255, 0.45), 0 0 28px rgba(174, 146, 255, 0.2);
  }
  100% {
    box-shadow: inset 0 0 0 0 rgba(201, 180, 255, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --ns-dur-1: 0.01ms;
    --ns-dur-2: 0.01ms;
  }

  html {
    scroll-behavior: auto;
  }

  .profile-level-widget__prize-full.profile-level-widget__prize-full--reward-new .profile-level-widget__prize-tag {
    animation: none;
    transform: translateY(-55%);
  }

  .profile-level-widget__prize-full.profile-level-widget__prize-full--reward-new .profile-level-widget__prize-body {
    animation: none;
    filter: drop-shadow(0 0 12px rgba(167, 139, 250, 0.48));
    box-shadow:
      inset 0 1px 0 rgba(201, 180, 255, 0.16),
      0 0 0 1px var(--accent-ring),
      0 4px 22px rgba(174, 146, 255, 0.32);
  }
}

/* Night Store: header panel highlight, lilac top-up, chat composers, forum section picker */
.icon-btn.is-header-panel-open {
  background: rgba(174, 146, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(199, 181, 255, 0.35);
  border-radius: 10px;
}

.balance-actions button[data-demo-wallet="topup"] {
  background: rgba(174, 146, 255, 0.22);
  border-color: rgba(199, 181, 255, 0.55);
  color: #efe6ff;
}

.balance-actions button[data-demo-wallet="topup"]:hover {
  background: rgba(199, 181, 255, 0.32);
  border-color: rgba(218, 200, 255, 0.65);
  color: #fff;
}

.user-mega__bal-btn--plus {
  background: rgba(174, 146, 255, 0.22);
  border-color: rgba(199, 181, 255, 0.55);
  color: #efe6ff;
}

.user-mega__bal-btn--plus:hover {
  background: rgba(199, 181, 255, 0.32);
  border-color: rgba(218, 200, 255, 0.65);
  color: #fff;
}


.msgs-composer__grow {
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.msgs-main__composer > .btn-primary {
  flex: 0 0 auto;
  align-self: flex-end;
  white-space: nowrap;
}

.msgs-composer__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.msgs-tb {
  border: 1px solid var(--border);
  background: rgba(32, 26, 48, 0.55);
  color: var(--text);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: border-color var(--ns-dur-1) ease, background var(--ns-dur-1) ease, color var(--ns-dur-1) ease, transform var(--ns-dur-1) var(--ns-ease-out);
}

.msgs-tb:hover {
  border-color: rgba(199, 181, 255, 0.45);
  background: rgba(174, 146, 255, 0.12);
  color: var(--accent);
  transform: translateY(-1px);
}

.msgs-tb--icon {
  width: 30px;
  height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.msgs-tb--gif {
  width: 42px;
}

.msgs-tb__ico {
  width: 18px;
  height: 18px;
  display: block;
  color: currentColor;
}

.msgs-tb__ico--gif {
  width: 30px;
  height: 22px;
}

.msgs-main__composer textarea:not(.msgs-composer-ta) {
  resize: none;
  flex: 1;
  min-height: 48px;
}

.msgs-pending {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.msgs-pending__item {
  position: relative;
  display: inline-flex;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.msgs-pending__item img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  display: block;
}

.msgs-pending__rm {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.msgs-bubble__media {
  max-width: min(100%, 360px);
  max-height: 240px;
  border-radius: 8px;
  margin-top: 8px;
  display: block;
  border: 1px solid var(--border);
}

.mod-sup-chat__composer--rich {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.mod-sup-chat__composer--rich textarea {
  resize: none;
  width: 100%;
  min-height: 72px;
  box-sizing: border-box;
}

.sup-chat-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mod-sup-msg__media {
  max-width: min(100%, 360px);
  max-height: 220px;
  border-radius: 8px;
  margin-top: 8px;
  border: 1px solid var(--border);
}

.ns-forum-pick-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  background: rgba(5, 4, 10, 0.72);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 12px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(174, 146, 255, 0.4) rgba(18, 14, 28, 0.65);
}

.ns-forum-pick-modal::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.ns-forum-pick-modal::-webkit-scrollbar-track {
  background: rgba(18, 14, 28, 0.5);
  border-radius: 999px;
}

.ns-forum-pick-modal::-webkit-scrollbar-thumb {
  background: rgba(174, 146, 255, 0.35);
  border-radius: 999px;
  border: 2px solid rgba(5, 4, 10, 0.3);
}

.ns-forum-pick-modal::-webkit-scrollbar-thumb:hover {
  background: rgba(199, 181, 255, 0.5);
}

.ns-forum-pick-modal.is-open {
  display: flex;
}

.ns-forum-pick-modal__panel {
  max-width: 720px;
  width: 100%;
  margin-top: 4vh;
  padding: 18px 20px 16px;
}

.ns-forum-pick-modal__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.ns-forum-pick-modal__h {
  margin: 0 0 4px;
  font-size: 1.25rem;
}

.ns-forum-pick-close {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}

.ns-forum-pick-search {
  width: 100%;
  margin-bottom: 12px;
}

.ns-forum-pick-scroll {
  max-height: min(60vh, 520px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(174, 146, 255, 0.45) rgba(32, 26, 48, 0.75);
}

.ns-forum-pick-scroll::-webkit-scrollbar {
  width: 6px;
}

.ns-forum-pick-scroll::-webkit-scrollbar-track {
  background: rgba(20, 16, 32, 0.55);
  border-radius: 999px;
}

.ns-forum-pick-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(190, 168, 255, 0.45), rgba(154, 126, 220, 0.3));
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.2);
}

.ns-forum-pick-scroll::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(206, 188, 255, 0.6), rgba(174, 146, 255, 0.45));
}

.ns-forum-pick-group__title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 600;
}

.ns-forum-pick-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

@media (min-width: 520px) {
  .ns-forum-pick-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.ns-forum-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  font: inherit;
}

.ns-forum-tile:hover {
  border-color: rgba(199, 181, 255, 0.45);
}

.ns-forum-tile.is-picked {
  border-color: rgba(199, 181, 255, 0.75);
  box-shadow: 0 0 0 1px rgba(174, 146, 255, 0.35);
  background: rgba(174, 146, 255, 0.1);
}

.ns-forum-tile__logo {
  font-size: 1.35rem;
  width: 36px;
  text-align: center;
  flex-shrink: 0;
}

.ns-forum-tile__logo--svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
}

.ns-forum-tile__logo--svg .ns-forum-ico {
  width: 22px;
  height: 22px;
  color: var(--accent);
  flex-shrink: 0;
  filter: drop-shadow(0 0 4px rgba(201, 180, 255, 0.48)) drop-shadow(0 0 12px rgba(167, 139, 250, 0.24));
}

.ns-forum-tile__logo--letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
}

.ns-forum-tile__letter {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.92rem;
  font-weight: 800;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -0.03em;
  color: var(--accent);
  line-height: 1;
}

.ns-forum-tile__logo--asset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ns-forum-tile__logo--asset .ns-forum-ico--asset {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 4px;
  display: block;
  filter: drop-shadow(0 0 4px rgba(201, 180, 255, 0.48)) drop-shadow(0 0 12px rgba(167, 139, 250, 0.24));
}

.ns-forum-tile__text {
  flex: 1;
  font-weight: 600;
  font-size: 0.88rem;
}

.ns-forum-tile__chev {
  color: var(--text-muted);
  flex-shrink: 0;
}

.ns-forum-pick-user {
  padding: 8px 0;
}

.ns-forum-pick-user__btn {
  width: 100%;
}

.ns-forum-pick-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* ——— Тикеты (список как в референсе) ——— */
.tickets-page {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 0 28px;
}

.tickets-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.tickets-hero__h1 {
  margin: 0 0 6px;
  font-size: 1.45rem;
}

.tickets-hero__sub {
  margin: 0;
  max-width: 520px;
}

.tickets-hero__cta {
  flex-shrink: 0;
}

.tickets-compose-card {
  margin-bottom: 16px;
  padding: 18px 20px 20px;
}

.tickets-compose-card--solo {
  margin-top: 0;
}

.tickets-compose-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.tickets-compose-hint {
  margin: 0 0 14px;
}

.tickets-list {
  padding: 0;
  overflow: hidden;
}

.tickets-row-wrap {
  border-bottom: 1px solid var(--border);
}

.tickets-row-wrap:last-child {
  border-bottom: none;
}

.tickets-row {
  display: flex;
  width: 100%;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
}

.tickets-row:hover {
  background: rgba(174, 146, 255, 0.06);
}

.tickets-row.is-active {
  background: rgba(174, 146, 255, 0.1);
}

.tickets-row__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}

.tickets-row__title {
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.35;
  word-break: break-word;
}

.tickets-row__meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.tickets-row__side {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  max-width: 42%;
}

.tickets-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--border);
  white-space: nowrap;
}

.tickets-badge--open {
  background: rgba(174, 146, 255, 0.15);
  border-color: rgba(199, 181, 255, 0.45);
  color: #efe6ff;
}

.tickets-badge--resolved {
  background: rgba(120, 140, 200, 0.2);
  border-color: rgba(150, 170, 220, 0.4);
  color: #e4e9ff;
}

.tickets-badge--closed {
  background: rgba(110, 60, 95, 0.35);
  border-color: rgba(180, 120, 160, 0.45);
  color: #f5e0ec;
}

.tickets-row__replies {
  text-align: right;
  font-size: 0.8rem;
  line-height: 1.35;
}

.tickets-row__replies-lab {
  display: block;
  color: var(--text-muted);
}

.tickets-row__last {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
}

.tickets-last--staff {
  color: #c9a6ff;
  font-weight: 600;
}

.tickets-last--user {
  color: #f0a878;
  font-weight: 600;
}

.tickets-last--mute {
  color: var(--text-muted);
}

.tickets-row__detail {
  padding: 12px 18px 18px;
  border-top: 1px solid var(--border);
  background: rgba(10, 8, 18, 0.35);
}

.tickets-row__detail-inner .mod-sup-chat {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 10px);
  margin-top: 12px;
  overflow: hidden;
  background: var(--surface, rgba(20, 16, 32, 0.6));
}

.tickets-extra-fields {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tickets-field-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px 16px;
  font-size: 0.88rem;
}

.tickets-field-row__lab {
  flex: 0 0 220px;
  max-width: 100%;
  color: var(--text-muted);
}

.tickets-field-row__val {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tickets-field-row__val code {
  flex: 1;
  min-width: 0;
  word-break: break-all;
  font-size: 0.85rem;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(10, 8, 18, 0.45);
}

.tickets-field-copy {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(32, 26, 48, 0.55);
  color: var(--text);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.tickets-field-copy:hover {
  border-color: rgba(199, 181, 255, 0.45);
  background: rgba(174, 146, 255, 0.12);
}

.tickets-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.tickets-foot__stat {
  flex: 1;
  min-width: 0;
}

.tickets-foot__link {
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tickets-foot__link:hover {
  color: var(--accent-hover, #d8c8ff);
}

@media (max-width: 640px) {
  .tickets-row {
    flex-direction: column;
    align-items: stretch;
  }

  .tickets-row__side {
    max-width: none;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
  }
}

.fnt-card {
  padding: 20px 22px 22px;
}

.fnt-card__h1 {
  margin: 0 0 18px;
  font-size: 1.15rem;
}

.fnt-label {
  display: block;
  font-weight: 600;
  margin: 12px 0 4px;
  font-size: 0.88rem;
}

.fnt-hint {
  margin: 0 0 6px;
}

.fnt-field {
  width: 100%;
  box-sizing: border-box;
}

.fnt-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.fnt-toolbar--rte {
  gap: 4px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(32, 26, 48, 0.45);
}

.fnt-rte-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  min-width: 36px;
  height: 32px;
  padding: 0;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(26, 22, 36, 0.65);
  color: var(--text);
  cursor: pointer;
  line-height: 0;
}

.fnt-rte-btn:hover {
  border-color: rgba(199, 181, 255, 0.45);
  background: rgba(174, 146, 255, 0.12);
  color: var(--text);
}

.fnt-rte-ico {
  width: 18px;
  height: 18px;
  display: block;
}

.fnt-rte-letter {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
  font-family: Georgia, "Times New Roman", serif;
}

.fnt-rte-letter--i {
  font-style: italic;
  font-weight: 600;
}

.fnt-rte-letter--s {
  text-decoration: line-through;
  font-weight: 600;
}

.fnt-rte-pill {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
}

.fnt-body {
  width: 100%;
  box-sizing: border-box;
  margin-top: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  padding: 10px;
  font: inherit;
  resize: vertical;
  min-height: 140px;
}

.fnt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.fnt-preview-wrap {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.fnt-preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.fnt-preview-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.fnt-preview-close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.fnt-preview-close:hover {
  border-color: var(--accent-dim);
  color: var(--text);
  background: rgba(139, 92, 246, 0.08);
}

.fnt-preview-inner .fnt-preview-thread-title {
  margin-top: 0;
}

.fnt-preview-inner .fnt-preview-meta-line {
  margin-bottom: 14px;
}

.fnt-preview-op-card {
  margin-bottom: 0;
}
