/* Табличка для чужих площадок: показываем как есть, чтобы автор видел,
   что именно он поставит в описание. */
.badge-preview {
  display: block;
  margin: 4px 0 12px;
  border-radius: 14px;
  background: var(--surface-2);
}
.snippet {
  display: block;
  padding: 10px 12px;
  margin-bottom: 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.78rem;
  line-height: 1.5;
  word-break: break-all;
  user-select: all;
}
.badge-actions { display: flex; gap: 10px; }

/* Чеклист нового автора: подсказка, а не приказ. Выполненные пункты гаснут,
   чтобы взгляд цеплялся за оставшиеся. */
.panel--hint { border-color: rgba(124, 92, 255, 0.35); }
.checklist { display: flex; flex-direction: column; gap: 6px; }
.checklist__item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  text-align: left;
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: inherit;
  cursor: pointer;
}
.checklist__item:hover { border-color: var(--border-strong, var(--border)); }
.checklist__item.is-done { opacity: 0.55; }
.checklist__item.is-done .checklist__label { text-decoration: line-through; }
.checklist__mark {
  flex: 0 0 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  border: 1px solid var(--border-strong, var(--border));
  font-size: 0.75rem;
  color: #6ee7a8;
}
.checklist__item.is-done .checklist__mark { background: rgba(110, 231, 168, 0.14); border-color: transparent; }
.checklist__text { display: grid; gap: 2px; }
.checklist__label { font-size: 0.92rem; }
.checklist__hint { font-size: 0.78rem; color: var(--text-muted); }
.panel__sub { margin: 16px 0 8px; font-size: 1rem; color: var(--text-dim); }
.stat-cards--compact .stat-card__value { font-size: 1.35rem; }

/* ============================================================ статистика автора */

/* Столбики по дням: видно и пики, и провалы — то, ради чего автор сюда идёт. */
.day-chart {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 120px;
  margin-top: 16px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.day-chart__col {
  flex: 1 1 0;
  height: 100%;
  display: flex;
  align-items: flex-end;
  min-width: 2px;
}
.day-chart__bar {
  width: 100%;
  min-height: 2px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, #9a7cff, #7c5cff);
}
.day-chart__col:hover .day-chart__bar { background: linear-gradient(180deg, #ff8fa3, #ff3c6e); }

/* Таблица по дням с прокруткой: за год строк много, но листать их удобно. */
.day-table { max-height: 320px; overflow-y: auto; font-size: 0.86rem; }
.day-table__head,
.day-table__row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 8px;
  padding: 7px 4px;
  border-bottom: 1px solid var(--border);
}
.day-table__head {
  position: sticky;
  top: 0;
  background: var(--bg-soft);
  color: var(--text-muted);
  font-size: 0.8rem;
}
.day-table__row span:not(:first-child) { text-align: center; }
.day-table__row:hover { background: var(--surface-2); }

/* ============================================================ конец статистики */

/* ============================================================================
   ВТубе — стили интерфейса
   Тёмная тема, акцент на карточках VTuber'ов и галерее.
   ========================================================================== */

:root {
  --bg: #0b0a11;
  --bg-soft: #100e1a;
  --surface: #16141f;
  --surface-2: #1c1929;
  --surface-3: #232033;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #ece9f7;
  --text-dim: #b3aecb;
  --text-muted: #837e9c;
  --accent: #7c5cff;
  --accent-soft: rgba(124, 92, 255, 0.16);
  --danger: #ff5f6d;
  --success: #34d399;
  --warning: #fbbf24;
  --radius-sm: 9px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.9);
  --shadow-lg: 0 30px 70px -30px rgba(0, 0, 0, 0.95);
  --header-h: 68px;
  --font: "Segoe UI", system-ui, -apple-system, "Inter", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

/*
 * Атрибут hidden должен побеждать любые авторские display-правила:
 * у .lightbox и .modal задан display: grid, и без этого они
 * перекрывали бы страницу постоянно.
 */
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Мягкое цветное свечение на фоне страницы */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(60rem 34rem at 12% -8%, rgba(124, 92, 255, 0.16), transparent 62%),
    radial-gradient(48rem 30rem at 92% 4%, rgba(255, 92, 138, 0.11), transparent 60%);
}

.sprite { display: none; }

a { color: inherit; text-decoration: none; }
a:hover { color: #fff; }

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }

p { margin: 0 0 0.9em; }
p:last-child { margin-bottom: 0; }

img { display: block; max-width: 100%; }

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ------------------------------------------------------------------ каркас */

.header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  background: rgba(11, 10, 17, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header__inner {
  max-width: 1240px;
  height: 100%;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.16rem; letter-spacing: -0.03em; }

.brand__mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, #7c5cff, #ff5c8a);
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  color: #fff;
  box-shadow: 0 6px 18px -6px rgba(124, 92, 255, 0.9);
}

.header__nav { display: flex; align-items: center; gap: 8px; margin-left: 10px; }

.navlink {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.92rem;
  color: var(--text-dim);
  transition: background 0.15s, color 0.15s;
}
.navlink:hover { background: var(--surface-2); color: var(--text); }
.navlink.is-active { background: var(--surface-3); color: var(--text); }

.header__spacer { flex: 1; }
.header__side { display: flex; align-items: center; gap: 10px; }

.main {
  position: relative;
  z-index: 1;
  flex: 1;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 30px 22px 70px;
}

.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.86rem;
}
.footer__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
}
.footer__nav { display: flex; gap: 18px; }
.footer__nav a:hover { color: var(--text); }
.footer__author { color: var(--text); font-weight: 600; }

/* Состояние настроек в админ-панели */
.state-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin: 16px 0 4px;
}
.state-chip {
  display: flex; flex-direction: column; gap: 3px;
  padding: 9px 12px; border-radius: 10px;
  min-width: 0;
  border: 1px solid var(--border); background: rgba(255, 255, 255, 0.02);
}
.state-chip__name { font-size: 0.82rem; font-weight: 600; color: var(--text); }
.state-chip__note {
  font-size: 0.76rem; color: var(--text-muted);
  /* Длинный адрес переносится внутри плитки, а не растягивает её
     и не сдвигает соседние: иначе ряд выглядит рваным. */
  overflow-wrap: anywhere;
}
/* Значение, которое сверяют целиком: ему нужна вся ширина. */
.state-chip--wide { grid-column: 1 / -1; }
.state-chip--wide .state-chip__note { color: var(--text-dim); }
.state-chip--ok { border-color: rgba(110, 231, 183, 0.35); }
.state-chip--warn { border-color: rgba(255, 196, 120, 0.45); }
.state-chip--warn .state-chip__note { color: #ffc478; }
.state-chip--info { border-color: var(--border); }

/* Вход через Twitch */
.btn--twitch { background: #9146ff; color: #fff; }
.btn--twitch:hover { background: #7d2ee6; }
.btn--subscribed { border-color: var(--accent); color: var(--accent); }

/* Лента подписок */
.feed-page { display: grid; gap: 18px; }
.feed-item { display: grid; gap: 10px; }
.feed-item__author { display: flex; align-items: center; gap: 10px; }
.feed-item__avatar,
.sub-row__avatar {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text-dim);
  font-weight: 600; font-size: 0.8rem;
}
.feed-item__name { font-weight: 600; }
.sub-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}
.sub-row:first-of-type { border-top: 0; }
.sub-row__text { flex: 1; display: grid; gap: 2px; min-width: 0; }
.sub-row__name { font-weight: 600; }

/* Статистика */
.stats-cards {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-bottom: 18px;
}
.stat-card {
  display: grid; gap: 4px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.stat-card__value { font-size: 1.7rem; font-weight: 700; line-height: 1.1; }
.stat-card__title { font-size: 0.85rem; color: var(--text-dim); }
.stat-card__note { font-size: 0.75rem; color: var(--text-muted); }

.chart { display: grid; gap: 8px; margin: 14px 0 6px; }
.chart__scale {
  display: flex; justify-content: space-between;
  font-size: 0.75rem; color: var(--text-muted);
}
.chart__bars {
  display: flex; align-items: flex-end; gap: 2px;
  height: 140px;
  padding: 0 2px;
  border-bottom: 1px solid var(--border);
}
.chart__slot { flex: 1; min-width: 2px; height: 100%; display: flex; align-items: flex-end; }
.chart__bar {
  width: 100%;
  background: var(--accent);
  border-radius: 3px 3px 0 0;
  opacity: 0.85;
}
.chart__bar--empty { background: var(--border-strong); opacity: 0.5; }
.chart__slot:hover .chart__bar { opacity: 1; }
.chart__axis {
  display: flex; justify-content: space-between;
  font-size: 0.72rem; color: var(--text-muted);
}
.chart__controls {
  display: flex; flex-wrap: wrap; gap: 16px;
  margin: 10px 0 4px;
}
.chart__group { display: grid; gap: 6px; }
.chart__group-label { font-size: 0.72rem; color: var(--text-muted); }
.chart__buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 5px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-dim);
  font: inherit; font-size: 0.8rem;
  cursor: pointer;
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip.chip--active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.stats-totals,
.stats-grid { display: grid; gap: 8px; margin-top: 16px; }
.stats-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.auth-or {
  display: flex; align-items: center; gap: 12px;
  color: var(--text-muted); font-size: 0.85rem;
}
.auth-or::before,
.auth-or::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ------------------------------------------------------------------ кнопки */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 17px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s, background 0.15s, border-color 0.15s, opacity 0.15s;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-3); border-color: var(--border-strong); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.btn--primary {
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #ff5c8a));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 12px 28px -14px var(--accent);
}
.btn--primary:hover { filter: brightness(1.08); background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #ff5c8a)); }

.btn--ghost { background: transparent; }
.btn--ghost:hover { background: var(--surface-2); }

.btn--danger { color: #ffc9ce; border-color: rgba(255, 95, 109, 0.4); background: rgba(255, 95, 109, 0.12); }
.btn--danger:hover { background: rgba(255, 95, 109, 0.2); }

.btn--sm { padding: 6px 12px; font-size: 0.84rem; border-radius: 9px; }
.btn--block { width: 100%; }

.btn--liked { color: #ff8fa3; border-color: rgba(255, 92, 138, 0.45); }

/* ---------------------------------------------------------------- элементы */

.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
/* Подпись бывает и тегом label (когда поле внутри неё), и отдельным span. */
.field > label,
.field > .field__label { font-size: 0.85rem; font-weight: 600; color: var(--text-dim); }
.field__hint { font-size: 0.78rem; color: var(--text-muted); }
.field__error { font-size: 0.8rem; color: #ff9aa3; }

.input, .textarea, .select {
  width: 100%;
  padding: 11px 13px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  font: inherit;
  font-size: 0.94rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.textarea { min-height: 140px; resize: vertical; line-height: 1.6; }
.select { cursor: pointer; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%), linear-gradient(135deg, var(--text-muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 34px; }

.card-panel {
  background: linear-gradient(180deg, var(--surface), var(--bg-soft));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
/* Строка тегов в каталоге: ей нужен отступ снизу, иначе карточки
   прилипают к тегам. Профиль задаёт свой отступ сам. */
.catalog-tags { margin-bottom: 20px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-dim);
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.chip:hover { background: var(--surface-3); color: var(--text); }
.chip.is-active { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 55%, transparent); color: #ddd4ff; }
.chip--static { cursor: default; }
.chip--static:hover { background: var(--surface-2); color: var(--text-dim); }
.chip--small { padding: 3px 9px; font-size: 0.75rem; }

/* ------------------------------------------------------------------- вики */

.wiki__head { align-items: flex-start; gap: 20px; margin-bottom: 22px; }
.wiki__head h1 { margin-bottom: 8px; }
.wiki__head p { max-width: 62ch; margin: 0; }

.wiki__filters { display: flex; flex-direction: column; gap: 14px; margin-bottom: 24px; }
.wiki__search { display: flex; gap: 10px; }
.wiki__search .input { flex: 1; }

.wiki__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.wiki-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: inherit;
  transition: border-color 0.15s, transform 0.15s, background 0.15s;
}
.wiki-card:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: var(--surface-2);
  transform: translateY(-2px);
}
.wiki-card__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wiki-card__title { margin: 0; font-size: 1.08rem; line-height: 1.35; }
.wiki-card__summary { margin: 0; color: var(--text-dim); font-size: 0.9rem; line-height: 1.5; }
.wiki-card__meta { margin-top: auto; color: var(--text-muted); font-size: 0.78rem; }

/* Ширина статьи как у шапки: 900 точек оставляли пустоту справа. */
.wiki-article { max-width: 1240px; }
.wiki-article__head { margin-bottom: 18px; }
.wiki-article__head h1 { margin: 10px 0 8px; }
.wiki-article__summary { margin: 0 0 10px; max-width: 70ch; }
.wiki-article__meta { color: var(--text-muted); font-size: 0.82rem; }
.wiki-article__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.wiki-article__body { padding: 26px 30px; }

/* Оформление статей: разметка собирается в обычные элементы */
.md { color: var(--text-dim); line-height: 1.75; font-size: 0.96rem; }
.md > *:first-child { margin-top: 0; }
.md > *:last-child { margin-bottom: 0; }
.md .md-heading { color: var(--text); line-height: 1.3; margin: 28px 0 12px; }
.md h2.md-heading { font-size: 1.35rem; }
.md h3.md-heading { font-size: 1.15rem; }
.md h4.md-heading, .md h5.md-heading { font-size: 1rem; }
.md .md-paragraph { margin: 0 0 14px; }
.md .md-list { margin: 0 0 14px; padding-left: 22px; }
.md .md-list li { margin-bottom: 6px; }
.md .md-quote {
  margin: 0 0 16px;
  padding: 12px 18px;
  border-left: 3px solid color-mix(in srgb, var(--accent) 60%, transparent);
  background: var(--surface-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text);
}
.md .md-rule { margin: 24px 0; border: 0; border-top: 1px solid var(--border); }
.md a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.md strong { color: var(--text); }
.md .md-code {
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  overflow-x: auto;
}
.md .md-code code { font-size: 0.86rem; color: var(--text); }
.md .md-code-inline {
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--surface-3);
  color: var(--text);
  font-size: 0.88em;
}

/* Редактор статьи */
.wiki-editor { max-width: 900px; }
.wiki-editor h1 { margin-bottom: 8px; }
.wiki-editor > p { max-width: 70ch; margin-bottom: 20px; }
.wiki-editor__row { display: grid; grid-template-columns: 200px 1fr; gap: 16px; }
.wiki-editor__body { min-height: 380px; font-family: var(--mono, ui-monospace, monospace); font-size: 0.9rem; line-height: 1.6; }
.wiki-editor__actions { margin-top: 20px; }

.wiki-help { margin: 4px 0 18px; font-size: 0.85rem; }
.wiki-help summary { cursor: pointer; color: var(--text-dim); }
.wiki-help__body { padding: 12px 0 0 4px; color: var(--text-dim); }
.wiki-help__body p { margin: 0 0 6px; }
.wiki-help code {
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--surface-3);
  color: var(--text);
  font-size: 0.85em;
}

/* История правок */
.revisions { display: flex; flex-direction: column; }
.revision { padding: 14px 0; border-bottom: 1px solid var(--border); }
.revision:last-child { border-bottom: 0; }
.revision--current { background: linear-gradient(90deg, var(--accent-soft), transparent 60%); }
.revision__head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.revision__version {
  font-weight: 700;
  color: var(--text);
  min-width: 34px;
}
.revision__author { font-weight: 600; color: var(--text-dim); }
.revision__action { margin-left: auto; }
.revision__comment { margin: 6px 0 0; color: var(--text); font-size: 0.88rem; }
.revision__title { margin: 4px 0 0; color: var(--text-muted); font-size: 0.82rem; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 7px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.badge--draft { background: rgba(251, 191, 36, 0.14); color: #ffd977; }
.badge--published { background: rgba(52, 211, 153, 0.14); color: #6ee7b7; }
.badge--hidden { background: rgba(255, 95, 109, 0.14); color: #ff9aa3; }
.badge--admin { background: var(--accent-soft); color: #cbbcff; }

/* --------------------------------------------------------------- заголовки */

.page-head { margin-bottom: 26px; }
.page-head h1 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.page-head p { color: var(--text-dim); margin-top: 10px; max-width: 68ch; }

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 34px 0 16px;
  font-size: 1.12rem;
}
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ------------------------------------------------------------------- герой */

/* Отступ снизу: у общего контейнера нет промежутка между блоками,
   и без этого панель поиска прилипает к шапке каталога. */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid var(--border);
  background:
    radial-gradient(40rem 20rem at 18% 0%, rgba(124, 92, 255, 0.36), transparent 60%),
    radial-gradient(34rem 18rem at 88% 22%, rgba(255, 92, 138, 0.26), transparent 62%),
    linear-gradient(160deg, #1a1630, #0e0c17 65%);
  padding: 52px 44px 46px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-lg);
}
.hero h1 { font-size: clamp(2rem, 5vw, 3.3rem); max-width: 20ch; }
.hero p { color: var(--text-dim); font-size: 1.04rem; max-width: 56ch; margin-top: 16px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero__stats { display: flex; flex-wrap: wrap; gap: 30px; margin-top: 34px; }
.hero__stat strong { display: block; font-size: 1.6rem; letter-spacing: -0.03em; }
.hero__stat span { font-size: 0.82rem; color: var(--text-muted); }

/* ----------------------------------------------------------------- панель */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}
.search {
  position: relative;
  flex: 1;
  min-width: 240px;
  max-width: 460px;
}
.search .icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.search .input { padding-left: 40px; border-radius: 999px; }

.segmented { display: inline-flex; padding: 4px; gap: 3px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; }
.segmented button {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 7px 15px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.segmented button:hover { color: var(--text); }
.segmented button.is-active { background: var(--surface-3); color: var(--text); }

/* ------------------------------------------------------------------- сетка */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 20px;
}

.vcard {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s, box-shadow 0.18s;
  isolation: isolate;
}
.vcard:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow: 0 26px 50px -28px var(--accent), var(--shadow);
}

.vcard__top { position: relative; }

.vcard__cover {
  position: relative;
  aspect-ratio: 16 / 7;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 55%, #12101c), #12101c);
  overflow: hidden;
}
.vcard__cover img { width: 100%; height: 100%; object-fit: cover; opacity: 0.92; }
.vcard__cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(10, 9, 16, 0.92));
}

.vcard__avatar {
  position: absolute;
  left: 18px;
  bottom: -26px;
  width: 62px;
  height: 62px;
  border-radius: 18px;
  border: 3px solid var(--surface);
  background: var(--surface-2);
  object-fit: cover;
  z-index: 2;
}

.vcard__body { padding: 36px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.vcard__name { font-size: 1.08rem; }
.vcard__slug { font-size: 0.8rem; color: var(--text-muted); }
.vcard__tagline { font-size: 0.88rem; color: var(--text-dim); flex: 1; }

.vcard__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 0.74rem;
  padding: 3px 9px;
  border-radius: 7px;
  background: var(--surface-3);
  color: var(--text-dim);
  border: 1px solid transparent;
}
.tag--accent { background: color-mix(in srgb, var(--accent) 18%, transparent); color: color-mix(in srgb, var(--accent) 65%, #ffffff); }

.vcard__stats {
  display: flex;
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-muted);
}
.vcard__stats span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------------------------------------------------------------- страница */

.profile-hero {
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 26px;
  background: var(--surface);
}
.profile-hero__banner { height: 260px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 55%, #14111f), #14111f); }
.profile-hero__banner img { width: 100%; height: 100%; object-fit: cover; }
.profile-hero__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 9, 16, 0.15) 30%, rgba(10, 9, 16, 0.95)); }
.profile-hero__content {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  align-items: flex-end;
  padding: 0 30px 26px;
  margin-top: -84px;
}
.profile-hero__avatar {
  width: 132px;
  height: 132px;
  border-radius: 28px;
  border: 4px solid var(--surface);
  object-fit: cover;
  background: var(--surface-2);
  box-shadow: var(--shadow-lg);
}
.profile-hero__meta { flex: 1; min-width: 240px; }
.profile-hero__name { font-size: clamp(1.6rem, 3.6vw, 2.3rem); }
.profile-hero__tagline { color: var(--text-dim); margin-top: 8px; font-size: 1rem; }
.profile-hero__tags { margin-top: 14px; }
.profile-hero__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.profile-hero__stats { display: flex; gap: 20px; margin-top: 14px; font-size: 0.85rem; color: var(--text-muted); }
.profile-hero__stats span { display: inline-flex; align-items: center; gap: 6px; }

.layout-2 { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 26px; align-items: start; }
@media (max-width: 900px) { .layout-2 { grid-template-columns: 1fr; } }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
}
.panel + .panel { margin-top: 20px; }
.panel h2 { font-size: 1.05rem; margin-bottom: 14px; }

.bio { color: var(--text-dim); white-space: pre-wrap; }

.links-list { display: flex; flex-direction: column; gap: 9px; }
.link-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  transition: background 0.15s, border-color 0.15s, transform 0.12s;
}
.link-row:hover { background: var(--surface-3); border-color: var(--border-strong); transform: translateX(2px); }
.link-row .icon { color: var(--accent); }
.link-row__label { font-weight: 600; font-size: 0.92rem; }
.link-row__host { margin-left: auto; font-size: 0.78rem; color: var(--text-muted); }

/* ----------------------------------------------------------------- галерея */

/* Направления: заметные метки, но не спорящие с именем. */
.vcard__directions { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.tag--direction {
  color: #cbbcff;
  background: rgba(124, 92, 255, 0.14);
  border: 1px solid rgba(124, 92, 255, 0.42);
}
.profile-hero__directions { margin-top: 8px; }

/* «В эфире»: единственное, что должно цеплять взгляд раньше остального,
   потому что эфир — это здесь и сейчас. */
.live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 10px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #ffd9e1;
  background: rgba(255, 60, 110, 0.16);
  border: 1px solid rgba(255, 60, 110, 0.55);
}
.live__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #ff3c6e;
  box-shadow: 0 0 0 0 rgba(255, 60, 110, 0.7);
  animation: live-pulse 1.8s ease-out infinite;
}
@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 60, 110, 0.65); }
  70% { box-shadow: 0 0 0 8px rgba(255, 60, 110, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 60, 110, 0); }
}
/* Уважаем тех, кому движение мешает: точка остаётся, пульсация уходит. */
@media (prefers-reduced-motion: reduce) {
  .live__dot { animation: none; }
}
.vcard__live { margin: 8px 0 2px; }

/* Ряды меток в каталоге: направления сверху, теги под ними. Без отступа
   они слипались в одну кашу из восьми меток подряд. */
.catalog-directions { margin-bottom: 10px; }

/* ============================================================ конец эфира */

/* Колокольчик уведомлений в шапке. */
.bell__wrap { position: relative; display: inline-flex; }
.bell { position: relative; }
.bell__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ff3c6e;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}
.bell__panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(360px, calc(100vw - 32px));
  max-height: 60vh;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-soft);
  box-shadow: 0 24px 48px -18px rgba(0, 0, 0, 0.85);
  z-index: 40;
}
.bell__item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
}
.bell__item:hover { background: var(--surface-3); }
/* Непрочитанное отличается не только точкой: цветом и жирностью тоже,
   иначе в списке из десяти строк его не найти. */
.bell__item--new { background: rgba(124, 92, 255, 0.1); }
.bell__item--new .bell__body b { color: #d6c9ff; }
.bell__kind { line-height: 1.4; }
.bell__body { display: grid; gap: 2px; font-size: 0.86rem; }
.bell__body b { font-weight: 600; }
.bell__time { color: var(--text-muted); font-size: 0.76rem; }
.bell__empty { margin: 0; padding: 16px 14px; color: var(--text-dim); font-size: 0.86rem; }

/* Приглашение в объединение: не просто строка, а вопрос, на который ждут
   ответа, — поэтому кнопки. */
.bell__item--invite { cursor: default; }
.bell__actions { display: flex; gap: 8px; margin-top: 8px; }

/* ============================================================ объединения */

/* Значок объединения у аватара: маленький, со ссылкой на объединение. */
.squad-badge {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid rgba(124, 92, 255, 0.5);
  background: rgba(124, 92, 255, 0.16);
  text-decoration: none;
  vertical-align: middle;
}
.squad-badge img { width: 100%; height: 100%; object-fit: cover; display: block; }
.squad-badge__letter { color: #cbbcff; font-size: 0.78rem; font-weight: 700; }
.squad-badge:hover { border-color: var(--accent); }
/* В каталоге значок ложится на аватар, снизу справа. */
.vcard__squad { position: absolute; right: 14px; bottom: 6px; }
.profile-hero__squad { width: 30px; height: 30px; }

.squad-hero__top { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.squad-hero__icon {
  width: 84px; height: 84px; border-radius: 24px; object-fit: cover;
  border: 1px solid var(--border-strong);
}
.squad-hero__icon--letter {
  display: grid; place-items: center;
  font-size: 2rem; font-weight: 700; color: #fff;
  background: linear-gradient(150deg, #9a7cff, #7c5cff 55%, #ff5c8a);
}
.squad-members { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.squad-member {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
}
.squad-member__who {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--text);
}
.squad-member__who:hover { color: var(--accent); }


/* Направления: заметные метки, но не спорящие с именем. */

/* ============================================================ конец направлений */

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }

/* Обёртка картинки галереи: кнопки владельца стоят рядом с картинкой,
   а не внутри неё — иначе нажатие на кнопку открывало бы просмотр. */
.shot-wrap { position: relative; }
.shot-wrap .shot { display: block; width: 100%; }

/* Кнопки видны всегда, а не по наведению: спрятанную кнопку человек
   не находит и говорит, что удалить нельзя. Так уже было. */
.shot-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 6px;
  z-index: 1;
}

/* Плитка «добавить работу»: та же сетка, что у снимков, но пустая —
   чтобы галерея не выглядела сломанной, когда в ней одна кнопка. */
.shot--add {
  display: grid;
  place-items: center;
  cursor: pointer;
  border-style: dashed;
  background: transparent;
  color: var(--text-muted);
}
.shot--add:hover {
  transform: none;
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
.shot__add { display: grid; justify-items: center; gap: 8px; font-size: 0.88rem; }
.shot__add .icon { width: 22px; height: 22px; }

.shot {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
  aspect-ratio: 4 / 3;
  cursor: zoom-in;
  padding: 0;
  transition: transform 0.18s, border-color 0.18s;
}
.shot:hover { transform: scale(1.02); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.shot img { width: 100%; height: 100%; object-fit: cover; }
.shot__caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 26px 12px 10px;
  background: linear-gradient(180deg, transparent, rgba(8, 7, 13, 0.94));
  font-size: 0.82rem;
  text-align: left;
  color: var(--text);
}
.shot__credit { display: block; font-size: 0.74rem; color: var(--text-muted); margin-top: 2px; }

.shot--manage { cursor: default; }
.shot__tools {
  position: absolute;
  top: 9px;
  right: 9px;
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.15s;
}
.shot--manage:hover .shot__tools { opacity: 1; }
.iconbtn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: rgba(12, 11, 19, 0.86);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.iconbtn:hover { background: var(--surface-3); }
.iconbtn--danger:hover { background: rgba(255, 95, 109, 0.24); color: #ffc9ce; }
.iconbtn[disabled] { opacity: 0.35; cursor: not-allowed; }

.dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 30px;
  text-align: center;
  color: var(--text-dim);
  background: var(--bg-soft);
  transition: border-color 0.15s, background 0.15s;
  cursor: pointer;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone .icon { width: 26px; height: 26px; color: var(--accent); margin-bottom: 10px; }

/* ------------------------------------------------------------------- формы */

.auth-wrap { max-width: 440px; margin: 40px auto; }
.auth-wrap h1 { font-size: 1.8rem; margin-bottom: 8px; }
.auth-wrap .sub { color: var(--text-dim); margin-bottom: 26px; }
.auth-switch { margin-top: 20px; text-align: center; color: var(--text-muted); font-size: 0.9rem; }
.auth-switch a { color: var(--accent); font-weight: 600; }
.auth-switch a:hover { text-decoration: underline; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 24px; overflow-x: auto; }
.tab {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.93rem;
  font-weight: 600;
  padding: 11px 16px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--text); border-bottom-color: var(--accent); }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 18px; }

.link-editor { display: flex; flex-direction: column; gap: 12px; }
.link-editor__row {
  display: grid;
  grid-template-columns: 130px 1fr 130px auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
}
@media (max-width: 760px) { .link-editor__row { grid-template-columns: 1fr; } }

.color-row { display: flex; align-items: center; gap: 12px; }
.color-row input[type="color"] {
  width: 48px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-soft);
  cursor: pointer;
}

.preview-swatch {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 30%, transparent), transparent);
  border: 1px solid var(--border);
  font-size: 0.86rem;
}

/* ------------------------------------------------------------------ таблицы */

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); font-weight: 700; background: var(--bg-soft); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface-2); }
td .actions { display: flex; gap: 7px; }

/* -------------------------------------------------------------- уведомления */

.toasts {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(360px, calc(100vw - 40px));
}
.toast {
  padding: 13px 16px;
  border-radius: 13px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  animation: toast-in 0.22s ease;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.toast--ok { border-color: rgba(52, 211, 153, 0.45); }
.toast--ok .icon { color: var(--success); }
.toast--err { border-color: rgba(255, 95, 109, 0.45); }
.toast--err .icon { color: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ----------------------------------------------------------------- лайтбокс */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 64px 1fr 64px;
  align-items: center;
  background: rgba(6, 5, 11, 0.94);
  backdrop-filter: blur(10px);
  animation: fade-in 0.18s ease;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.lightbox__stage { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; max-height: 100vh; padding: 24px 0; }
.lightbox__stage img { max-width: min(1200px, 92vw); max-height: 78vh; border-radius: var(--radius); box-shadow: var(--shadow-lg); object-fit: contain; }
.lightbox__stage figcaption { text-align: center; color: var(--text-dim); font-size: 0.9rem; }
.lightbox__stage figcaption strong { color: var(--text); display: block; font-size: 1rem; }
.lightbox__nav, .lightbox__close {
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  justify-self: center;
  transition: background 0.15s;
}
.lightbox__nav:hover, .lightbox__close:hover { background: var(--surface-3); }
.lightbox__nav .icon, .lightbox__close .icon { width: 20px; height: 20px; }
.lightbox__close { position: absolute; top: 20px; right: 20px; }

/* -------------------------------------------------------------------- модал */

.modal { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 20px; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(6, 5, 11, 0.7); backdrop-filter: blur(6px); }
.modal__panel {
  position: relative;
  width: min(460px, 100%);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.2s ease;
}
.modal__title { font-size: 1.15rem; margin-bottom: 12px; }
.modal__body { color: var(--text-dim); font-size: 0.93rem; }
.modal__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

/* ------------------------------------------------------------ стена и посты */

.wall { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }

/* Поддержка автора: раздел внизу страницы и кнопка в шапке.
   Ссылки ведут на сервисы, а не рисуются их кодом: чужой скрипт на нашей
   странице дотянулся бы до аккаунтов зрителей. */
.support { margin-top: 18px; }
.support__note {
  margin: 0 0 14px;
  color: var(--text-dim);
  font-size: 0.93rem;
  line-height: 1.5;
  white-space: pre-wrap;
}
.support-list {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.support-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 12px;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 10px);
  background: var(--surface-2);
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}
.support-card:hover { border-color: var(--accent); background: var(--surface-3); }
.support-card__label { grid-column: 1; color: var(--text); font-weight: 600; font-size: 0.95rem; }
.support-card__note { grid-column: 1; color: var(--text-muted); font-size: 0.83rem; }
/* Колонку задаём явно: без неё значок вставал первым и уводил название вправо. */
.support-card__go { grid-column: 2; grid-row: 1 / span 2; color: var(--text-muted); display: inline-flex; }
.support-card:hover .support-card__go { color: var(--accent); }
.support-link { margin-top: 10px; }

/* Поддержка в шапке страницы: заголовок, описание и ссылки на сервисы.
   Раньше тут была кнопка-якорь, которая прокручивала страницу к тому же
   тексту внизу, — человек справедливо спрашивал, что она делает. */
.hero-support {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 92, 138, 0.3);
  border-radius: var(--radius);
  /* Плотный фон, а не прозрачная заливка: блок лежит на обложке канала,
     и сквозь него просвечивал рисунок — текст читался плохо. */
  background: color-mix(in srgb, var(--bg) 88%, #ff5c8a 12%);
  backdrop-filter: blur(10px);
  max-width: 520px;
}
.hero-support__head {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.92rem;
  color: #ffc9d6;
}
.hero-support__head .icon { color: #ff8fa3; }
.hero-support__note {
  margin: 8px 0 10px;
  color: var(--text-dim);
  font-size: 0.88rem;
  line-height: 1.45;
  white-space: pre-wrap;
}
.hero-support__links { display: flex; flex-wrap: wrap; gap: 8px; }
.chip--support {
  text-decoration: none;
  color: #ffd9e1;
  background: rgba(255, 60, 110, 0.14);
  border-color: rgba(255, 60, 110, 0.45);
}
.chip--support:hover { border-color: #ff3c6e; color: #fff; }

/* ============================================================ конец поддержки */

.post {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
  /* Отступы переехали внутрь: картинке нужно дотягиваться до краёв карточки,
     а всему остальному — стоять с полями. Без overflow: hidden углы картинки
     вылезали бы за скругление. */
  padding: 0;
  overflow: hidden;
  transition: border-color 0.15s;
}
.post:hover { border-color: var(--border-strong); }
.post--hidden { opacity: 0.62; }
.post__inner { padding: 14px 16px; }

.post__head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.post__date { display: inline-flex; align-items: center; gap: 6px; }
.post__date .icon { color: #38bdf8; }
.post__author { padding: 2px 8px; border-radius: 6px; background: var(--surface-3); }
.post__edited { font-style: italic; }
.post__origin { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; }
.post__origin:hover { color: var(--text); }

.post__text { white-space: pre-wrap; color: var(--text); font-size: 0.93rem; }

/* Картинка поста: сверху и во всю ширину, как в Telegram. */
.post__media {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface-3);
  cursor: zoom-in;
  overflow: hidden;
}
.post__media img {
  width: 100%;
  display: block;
  /* Высокие картинки не должны растягивать карточку на весь экран. */
  max-height: 560px;
  object-fit: cover;
  transition: transform 0.2s;
}
.post__media:hover img { transform: scale(1.02); }
.post--with-media .post__head { margin-top: 2px; }

.post__attachment {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text-dim);
  font-size: 0.88rem;
}
.post__badge {
  margin-top: 10px;
  display: inline-block;
  padding: 3px 9px;
  border-radius: 7px;
  background: rgba(251, 191, 36, 0.14);
  color: #ffd977;
  font-size: 0.74rem;
  font-weight: 700;
}
.post__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* Лайк и комментарии под постом */
.post__social {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.post-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.post-action:hover { background: var(--surface-2); color: var(--text); }
.post-action .icon { width: 1em; height: 1em; }
.post-action--liked { color: #ff8fa3; border-color: rgba(255, 92, 138, 0.4); background: rgba(255, 92, 138, 0.1); }
.post-action--liked .icon { fill: currentColor; }
.post-action--active { background: var(--surface-3); color: var(--text); }

.post__comments {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.comments { display: flex; flex-direction: column; gap: 12px; }

.comment { display: flex; gap: 10px; }
.comment__avatar {
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  font-size: 0.8rem;
}
.comment__body { flex: 1; min-width: 0; }
.comment__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.82rem; }
.comment__author { font-weight: 600; color: var(--text); }
.comment__author:hover { color: var(--accent); }
.comment__date { color: var(--text-muted); }
.comment__delete {
  margin-left: auto;
  border: 0;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 6px;
  display: inline-flex;
}
.comment__delete:hover { color: #ff9aa3; background: rgba(255, 95, 109, 0.12); }
.comment__delete .icon { width: 15px; height: 15px; }
.comment__text { margin-top: 3px; font-size: 0.9rem; color: var(--text-dim); white-space: pre-wrap; }

.comment__form { margin-top: 14px; }
.comment__input { min-height: 72px; font-size: 0.9rem; }

/* Модель и авторы */
.model { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.model__name { font-weight: 600; color: var(--text); text-decoration: none; }
a.model__name:hover { color: var(--accent); }
.credits { display: flex; flex-direction: column; gap: 8px; }
.credit { display: flex; flex-direction: column; }
.credit__role { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.credit__name { color: var(--text); text-decoration: none; }
a.credit__name:hover { color: var(--accent); }

/* Выбор типа учётной записи при регистрации */
.choice { display: flex; flex-direction: column; gap: 10px; }
.choice__item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px;
  cursor: pointer;
}
.choice__item:has(input:checked) { border-color: var(--accent); background: rgba(124, 92, 255, 0.07); }
.choice__body { display: flex; flex-direction: column; gap: 3px; }
.choice__body .field__hint { margin: 0; }

/* Догрузка каталога */
.load-more { display: flex; justify-content: center; margin-top: 26px; }
.load-more__done { color: var(--text-muted); font-size: 0.85rem; }

/* --------------------------------------------------------------- жалобы */

.report-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: none;
  padding: 4px 6px;
  border-radius: 6px;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.report-link:hover { color: #ffb3a7; background: rgba(255, 140, 110, 0.12); }
.report-link .icon { width: 14px; height: 14px; }
.report-link--quiet { margin-left: auto; }

/* ------------------------------------------------ юридические документы */

.legal { max-width: 860px; }
.legal h1 { margin-bottom: 18px; }
.legal__body { padding: 26px 30px; }
.legal__footer { margin-top: 16px; }

.notice {
  margin-bottom: 20px;
  padding: 16px 20px;
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: var(--radius);
  background: rgba(251, 191, 36, 0.08);
}
.notice__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: #ffd977;
  font-weight: 600;
}
.notice p { margin: 0 0 10px; color: var(--text-dim); font-size: 0.9rem; }
.notice__list { margin: 0; padding-left: 20px; color: var(--text-dim); font-size: 0.88rem; }
.notice__list li { margin-bottom: 4px; word-break: break-word; }
.notice code {
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--surface-3);
  color: var(--text);
  font-size: 0.85em;
}

/* Редактор поста в кабинете */
.composer { display: flex; flex-direction: column; gap: 12px; }
.composer__row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
.composer__preview {
  position: relative;
  max-width: 220px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.composer__preview img { display: block; width: 100%; }
.composer__preview button { position: absolute; top: 6px; right: 6px; }

.checkbox-row { display: flex; align-items: center; gap: 9px; margin-top: 14px; cursor: pointer; font-size: 0.9rem; }
.checkbox-row input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

/* ---------------------------------------------------------------- служебное */

.boot { display: grid; place-items: center; gap: 16px; padding: 90px 0; color: var(--text-muted); }
.boot__spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid var(--surface-3);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-soft);
}
.empty h1, .empty h3 { color: var(--text); margin-bottom: 8px; font-size: 1.35rem; }

.user-chip { display: flex; align-items: center; gap: 9px; padding: 5px 12px 5px 5px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); font-size: 0.88rem; font-weight: 600; }
.user-chip img, .user-chip .avatar-fallback { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.avatar-fallback { display: grid; place-items: center; background: linear-gradient(135deg, var(--accent), #ff5c8a); color: #fff; font-size: 0.8rem; font-weight: 700; }

.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--radius); }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Заглушка-аватар с инициалом вместо картинки */
.vcard__avatar--letter {
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 40%, #ff5c8a));
}

/* Подсветка полей с ошибками валидации */
.input.is-invalid, .textarea.is-invalid, .select.is-invalid {
  border-color: rgba(255, 95, 109, 0.65);
  box-shadow: 0 0 0 3px rgba(255, 95, 109, 0.12);
}

/* Пустое состояние списка ссылок */
.link-editor .link-editor__row .select { width: 100%; }

.dim ul li { margin-bottom: 6px; }

.row-between { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.muted { color: var(--text-muted); }
.dim { color: var(--text-dim); }
.small { font-size: 0.85rem; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.inline { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.step { padding: 20px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); }
.step__num { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: #cbbcff; font-weight: 700; margin-bottom: 12px; }
.step h3 { font-size: 1rem; margin-bottom: 7px; }
.step p { color: var(--text-dim); font-size: 0.9rem; }

@media (max-width: 720px) {
  .header__nav { display: none; }
  /* Шапка на телефоне: подписи кнопок не помещаются вместе и распирали
     страницу до 646 точек при экране 390 — из-за этого вбок уезжало всё,
     включая текст в шапке и карточки. Оставляем значки и короткие слова. */
  .header__inner { padding: 0 12px; gap: 8px; }
  .header__side { gap: 6px; min-width: 0; }
  .header__side .navlink { padding: 8px 9px; }
  .header__side .btn { padding: 8px 10px; font-size: 0.82rem; white-space: nowrap; }
  .hide-sm { display: none; }
  .brand { font-size: 1.05rem; }
  .brand__mark { width: 28px; height: 28px; }
  .user-chip { padding: 4px; gap: 4px; }
  .user-chip__name { display: none; }
  /* Подвал: ссылки идут в строку и на телефоне не помещаются — утаскивали
     за собой всю страницу. Пусть переносятся. */
  .footer__inner { padding: 18px 16px; gap: 14px; }
  .footer__nav { flex-wrap: wrap; gap: 10px 14px; }
  /* Вкладок в кабинете семь: в строку не влезают. Пусть прокручиваются
     вбок — это привычнее, чем переносить их в три этажа. */
  .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: 0 0 auto; }
  .hero { padding: 36px 24px; }
  .profile-hero__content { padding: 0 18px 22px; }
  .main { padding: 22px 16px 60px; }
  .lightbox { grid-template-columns: 1fr; }
  .lightbox__nav { position: absolute; bottom: 22px; }
  .lightbox__nav--prev { left: 20px; }
  .lightbox__nav--next { right: 20px; }
}

/* Полоса вкладок кабинета: восемь штук не помещались в строку, включалась
   прокрутка и появлялся ползунок. Теперь вкладки плотнее, а если всё равно
   не хватит места — перейдут на вторую строку, а не спрячутся за ползунок. */
.tabs { flex-wrap: wrap; overflow: visible; }
.tabs .tab { padding: 10px 12px; font-size: 0.87rem; }

/* Поддержка в шапке: уже и по левому краю с тегами. Широкая плашка
   растягивалась вправо и не читалась как часть колонки с тегами. */
.hero-support {
  max-width: 520px;
  margin-left: 0;
}
/* Теги и поддержка в одной строке: теги слева, блок справа.
   support-into-tags */
.profile-hero__tags {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
}
.profile-hero__tags .hero-support {
  margin: 0 0 0 auto;
  max-width: 400px;
  flex: 0 0 auto;
}
@media (max-width: 900px) {
  /* На узком экране строка не помещается — отпускаем перенос. */
  .profile-hero__tags { flex-wrap: wrap; }
}
/* Поддержка — третья колонка шапки: аватар, информация, поддержка справа.
   support-into-row */
.profile-hero__content > .hero-support {
  margin: 0 0 0 auto;
  max-width: 380px;
  flex: 0 0 auto;
  align-self: flex-end;
}
/* Старое правило для строки тегов больше не нужно. */
.profile-hero__tags .hero-support {
  margin: 0 0 0 auto;
  max-width: 380px;
  flex: 0 0 auto;
}

/* Шапка канала в одну строку: аватар, информация, поддержка справа.
   Строка переносилась, и поддержка падала вниз отдельным блоком —
   отсюда «разные уровни». */
.profile-hero__content { flex-wrap: nowrap; }
.profile-hero__meta { min-width: 0; }
@media (max-width: 900px) {
  /* На узком экране перенос возвращаем: три колонки не помещаются. */
  .profile-hero__content { flex-wrap: wrap; }
  .profile-hero__content > .hero-support { margin-left: 0; max-width: 100%; }
}

/* Поддержка — отдельной строкой во всю ширину под шапкой.
   Три колонки в одну строку разъезжались: текст и поддержка боролись
   за место. Отдельная строка снимает этот спор совсем. */
.profile-hero__content { flex-wrap: wrap; }
.profile-hero__content > .hero-support {
  flex: 0 0 100%;
  max-width: none;
  margin: 16px 0 0;
  align-self: stretch;
}

/* Кнопки — отдельной строкой под информацией. В одной строке со счётчиками
   им не хватало места, и текст сжимался. */
.profile-hero__actions {
  flex: 1 1 100%;
  margin-top: 12px;
}
.profile-hero__stats { margin-bottom: 4px; }

/* Панель форматирования «О себе»: кнопки в один ряд под полем. */
.bio-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: -6px 0 14px;
}

/* Модельки на странице канала: компактной колонкой, а не большой карточкой.
   Фото в полную ширину распирало блок — теперь это строка с маленьким
   превью, как пункт списка. */
.models-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 560px;
}
.model-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
}
.model-card__photo {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  flex: 0 0 auto;
}
.model-card__body { min-width: 0; }
.model-card__body h3 { margin: 0 0 4px; font-size: 0.95rem; }
.model-card .muted.small { margin: 0 0 4px; }
.model-credits { margin: 0; padding-left: 16px; font-size: 0.82rem; }
/* Свёрнутый пост: восемь строк и мягкое затухание вместо резкого обреза.
   Полный текст рядом, в кнопке «Показать полностью». */
.post__text--collapsed {
  max-height: 8.4em;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 70%, transparent);
  mask-image: linear-gradient(#000 70%, transparent);
}
.post__more { margin-top: 8px; }
/* Панель моделек не во всю ширину: иначе блок растягивается на весь экран
   и смотрится как пустая рама. */
.models-panel { max-width: 620px; }
/* Колонки страницы канала: слева содержимое, справа сведения.
   Раньше промежутка не было, и блоки смыкались. На узком экране —
   одна колонка, иначе правая панель выдавит содержимое. */
.profile-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}
.profile-main > * + *,
.profile-side > * + * { margin-top: 16px; }
@media (max-width: 900px) {
  .profile-columns { grid-template-columns: minmax(0, 1fr); }
}
/* Низ стены: счётчик показанных и кнопка «показать ещё». */
.wall-more {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
/* Предпросмотр «О себе»: как текст будет выглядеть на странице. */
.bio-editor { display: block; }
.bio-preview {
  margin: 0 0 12px;
  padding: 14px 16px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  max-height: 340px;
  overflow: auto;
}
.bio-preview h2 { font-size: 1.1rem; margin: 12px 0 6px; }
.bio-preview h3 { font-size: 1rem; margin: 10px 0 6px; }
.bio-preview p { margin: 8px 0; }
.bio-preview blockquote {
  margin: 10px 0;
  padding-left: 12px;
  border-left: 3px solid var(--border-strong);
  color: var(--text-dim);
}
.bio-preview ul, .bio-preview ol { margin: 8px 0; padding-left: 22px; }
/* Вложенный список: отступ и другой маркер, чтобы уровни различались. */
.md-list .md-list { margin: 4px 0 4px 4px; }
.md-list .md-list > li::marker { color: var(--text-muted); }
/* Редактор с форматированием: поле ведёт себя как текстовый документ. */
.rich-editor {
  min-height: 220px;
  max-height: 520px;
  overflow: auto;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  font-size: 0.95rem;
  line-height: 1.6;
}
.rich-editor:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.rich-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--text-muted);
}
.rich-editor h2 { font-size: 1.25rem; margin: 14px 0 8px; }
.rich-editor h3 { font-size: 1.1rem; margin: 12px 0 6px; }
.rich-editor p { margin: 8px 0; }
.rich-editor blockquote {
  margin: 10px 0;
  padding-left: 12px;
  border-left: 3px solid var(--border-strong);
  color: var(--text-dim);
}
.rich-editor ul, .rich-editor ol { margin: 8px 0; padding-left: 24px; }
.rich-editor a { color: var(--accent); }
.rich-editor hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }
.wiki-editor__body-wrap { display: block; }
/* Статья, сохранённая редактором: HTML без обёртки из разметки. */
.wiki-article__html h2 { font-size: 1.3rem; margin: 18px 0 10px; }
.wiki-article__html h3 { font-size: 1.12rem; margin: 14px 0 8px; }
.wiki-article__html p { margin: 10px 0; line-height: 1.65; }
.wiki-article__html ul, .wiki-article__html ol { margin: 10px 0; padding-left: 24px; }
.wiki-article__html li { margin: 4px 0; }
.wiki-article__html blockquote {
  margin: 12px 0;
  padding-left: 14px;
  border-left: 3px solid var(--border-strong);
  color: var(--text-dim);
}
.wiki-article__html a { color: var(--accent); }
.wiki-article__html hr { border: 0; border-top: 1px solid var(--border); margin: 18px 0; }
/* Модератор: заметно, но не так ярко, как админ. */
.badge--moderator {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}
/* Супер-админ: высший уровень, заметнее остальных бейджей. */
.badge--super {
  background: color-mix(in srgb, #d4af37 20%, transparent);
  color: #d4af37;
  border: 1px solid color-mix(in srgb, #d4af37 45%, transparent);
}
/* Альбом из Telegram: несколько фото в одном посте сеткой. */
.post__media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  width: 100%;
}
.post__media-grid--two { grid-template-columns: repeat(2, 1fr); }
.post__media-cell {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}
.post__media-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Вложения в окне правки: видно, что уже приложено к посту. */
.post__edit-media {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.post__edit-media img {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
/* ------------------------------------------------------------------ */
/* Хеллоуин: тыквенный акцент поверх фиолетовой основы.                 */
/* Включается классом на body в праздничные дни, поэтому выключается    */
/* одним удалением класса, без отката правок.                           */
/* ------------------------------------------------------------------ */
body.theme-halloween {
  --accent: #ff8a3d;
  --accent-soft: rgba(255, 138, 61, 0.18);
  --warning: #ffb347;
}

body.theme-halloween::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  /* Тыквы и летучие мыши — встроенной картинкой, без внешних файлов. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cg fill='%23ff8a3d' fill-opacity='0.05'%3E%3Ccircle cx='34' cy='46' r='13'/%3E%3Crect x='31' y='29' width='6' height='7' rx='2'/%3E%3Ccircle cx='118' cy='112' r='10'/%3E%3Crect x='116' y='98' width='5' height='6' rx='2'/%3E%3Cpath d='M74 18c-3 0-5 2-5 5 0 1 0 2 1 3-4-2-9-3-14-1 3 2 4 5 5 8 1-1 3-2 5-2-1 2-2 4-1 6 2-2 5-3 8-3s6 1 8 3c1-2 0-4-1-6 2 0 4 1 5 2 1-3 2-6 5-8-5-2-10-1-14 1 1-1 1-2 1-3 0-3-2-5-5-5z'/%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.9;
}

body.theme-halloween .header {
  border-bottom-color: rgba(255, 138, 61, 0.35);
  box-shadow: 0 8px 30px -18px rgba(255, 138, 61, 0.6);
}

body.theme-halloween .panel,
body.theme-halloween .post,
body.theme-halloween .profile-hero {
  border-color: rgba(255, 138, 61, 0.18);
}

body.theme-halloween .profile-hero {
  box-shadow: 0 20px 60px -40px rgba(255, 138, 61, 0.5);
}

/* Логотип теплеет: он и так акцентный. */
body.theme-halloween .logo__mark { filter: hue-rotate(-15deg) saturate(1.15); }

@media (prefers-reduced-motion: no-preference) {
  body.theme-halloween .profile-hero__avatar img {
    transition: filter 0.4s ease;
  }
  body.theme-halloween .profile-hero__avatar img:hover {
    filter: drop-shadow(0 0 14px rgba(255, 138, 61, 0.55));
  }
}
/* Миниатюра модельки — кнопка: нажатие открывает полное изображение. */
.model-card__photo-btn {
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  line-height: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.model-card__photo-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
/* Личные сообщения: диалоги слева, переписка справа. */
.dm-layout {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
@media (max-width: 860px) {
  .dm-layout { grid-template-columns: minmax(0, 1fr); }
}
.dm-list { display: flex; flex-direction: column; gap: 6px; }
.dm-row {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 10px;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
}
.dm-row:hover { border-color: var(--border-strong); }
.dm-row.is-active { border-color: var(--accent); background: var(--accent-soft); }
.dm-row__avatar {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--surface-3);
  font-size: 0.8rem;
}
.dm-row__avatar img { width: 100%; height: 100%; object-fit: cover; }
.dm-row__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dm-row__name { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.dm-row__badge {
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--accent);
  color: #0b0a11;
  font-size: 0.72rem;
  font-weight: 700;
}
.dm-row__last {
  color: var(--text-muted);
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dm-thread { min-width: 0; }
.dm-messages {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
}
.dm-bubble {
  max-width: 76%;
  padding: 8px 12px;
  border-radius: var(--radius);
  background: var(--surface-2);
}
.dm-bubble--mine { align-self: flex-end; background: var(--accent-soft); }
.dm-bubble__text { white-space: pre-wrap; overflow-wrap: anywhere; }
.dm-bubble__time { margin-top: 4px; color: var(--text-muted); font-size: 0.72rem; }
/* Значок непрочитанных на ссылке в шапке. */
.navlink--badge { position: relative; }
.nav-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  min-width: 17px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #0b0a11;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
}

/* Таблица «По дням»: числа по центру — так столбцы читаются ровнее. */
.day-table__head,
.day-table__row { text-align: center; }

/* Плашка о куки: внизу, поверх содержимого, но не перекрывает кнопки. */
.cookie-bar {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
  box-shadow: var(--shadow-lg);
}
.cookie-bar__text { margin: 0; color: var(--text-dim); font-size: 0.9rem; }
.cookie-bar__link { color: var(--accent); text-decoration: underline; }
@media (max-width: 640px) {
  .cookie-bar { flex-direction: column; align-items: stretch; }
}
/* Кнопка-значок: без текста, но с подсказкой и доступным именем. */
.btn--icon {
  display: inline-grid;
  place-items: center;
  padding: 6px 8px;
  line-height: 1;
}
.btn--icon .icon { width: 16px; height: 16px; }
/* ------------------------------------------------------------------ */
/* Оформление по макету: глубокий фиолетовый фон с сиянием,            */
/* полупрозрачные поверхности, крупные скругления.                     */
/* Слой отдельный: включается классом на body, поэтому откатывается    */
/* одной строкой, если что-то пойдёт не так.                           */
/* ------------------------------------------------------------------ */
body.theme-aurora {
  --bg: #140a24;
  --bg-soft: #1b1030;
  --surface: rgba(48, 27, 78, 0.55);
  --surface-2: rgba(62, 36, 100, 0.6);
  --surface-3: rgba(82, 48, 130, 0.65);
  --border: rgba(190, 140, 255, 0.18);
  --border-strong: rgba(200, 150, 255, 0.35);
  --accent: #b06bff;
  --accent-soft: rgba(176, 107, 255, 0.22);
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 26px;
}

body.theme-aurora::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 500px at 15% 0%, rgba(150, 70, 255, 0.35), transparent 70%),
    radial-gradient(800px 500px at 85% 10%, rgba(255, 120, 220, 0.22), transparent 70%),
    radial-gradient(700px 600px at 50% 100%, rgba(90, 40, 160, 0.35), transparent 70%),
    linear-gradient(180deg, #1a0e2e 0%, #120a20 60%, #0d0718 100%);
}

/* Шапка — «стеклянная плашка» с сиянием, как на макете. */
body.theme-aurora .header {
  background: rgba(38, 20, 64, 0.72);
  border-bottom: 1px solid rgba(190, 140, 255, 0.22);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 40px -24px rgba(176, 107, 255, 0.8);
}

body.theme-aurora .header__nav .navlink.is-active {
  background: linear-gradient(135deg, #9b4dff, #c86bff);
  color: #fff;
  border-radius: 999px;
}

/* Панели и карточки: полупрозрачные, с мягким свечением. */
body.theme-aurora .panel,
body.theme-aurora .post,
body.theme-aurora .profile-hero,
body.theme-aurora .merch-card {
  background: linear-gradient(160deg, rgba(70, 40, 110, 0.55), rgba(40, 22, 66, 0.65));
  border: 1px solid rgba(190, 140, 255, 0.2);
  box-shadow: 0 20px 60px -40px rgba(176, 107, 255, 0.9);
  backdrop-filter: blur(10px);
}

/* Кнопки-«пилюли». */
body.theme-aurora .btn--primary {
  background: linear-gradient(135deg, #9b4dff, #d16bff);
  border: 0;
  box-shadow: 0 10px 30px -14px rgba(176, 107, 255, 0.9);
}
body.theme-aurora .btn--ghost,
body.theme-aurora .chip,
body.theme-aurora .tag {
  background: rgba(84, 48, 132, 0.45);
  border: 1px solid rgba(190, 140, 255, 0.25);
  border-radius: 999px;
}

body.theme-aurora .catalog-card,
body.theme-aurora .post {
  border-radius: var(--radius-lg);
}
/* Светлее по макету: на снимке поверхности заметно светлее фона,
   с ярким сиянием по краю, а не едва различимые. */
body.theme-aurora {
  --surface: rgba(84, 46, 138, 0.55);
  --surface-2: rgba(104, 60, 168, 0.6);
  --surface-3: rgba(124, 74, 196, 0.65);
  --border: rgba(200, 150, 255, 0.3);
  --border-strong: rgba(214, 170, 255, 0.5);
}

body.theme-aurora::before {
  background:
    radial-gradient(1000px 600px at 10% -10%, rgba(168, 84, 255, 0.55), transparent 65%),
    radial-gradient(900px 600px at 95% 0%, rgba(255, 110, 220, 0.35), transparent 65%),
    radial-gradient(800px 700px at 50% 110%, rgba(120, 60, 200, 0.5), transparent 70%),
    linear-gradient(180deg, #2a1548 0%, #1c0f33 55%, #150a26 100%);
}

body.theme-aurora .panel,
body.theme-aurora .post,
body.theme-aurora .profile-hero,
body.theme-aurora .catalog-card,
body.theme-aurora .merch-card {
  background: linear-gradient(160deg, rgba(118, 66, 190, 0.55), rgba(64, 34, 110, 0.7));
  border: 1px solid rgba(206, 158, 255, 0.35);
  box-shadow: 0 24px 70px -40px rgba(190, 120, 255, 1), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body.theme-aurora .header {
  background: rgba(58, 30, 96, 0.8);
  border-bottom: 1px solid rgba(206, 158, 255, 0.32);
}

body.theme-aurora h1,
body.theme-aurora h2 {
  text-shadow: 0 2px 24px rgba(190, 120, 255, 0.45);
}

/* Персонаж в герое каталога: висит справа, текст уступает ему место. */
body.theme-aurora .hero { position: relative; overflow: visible; }
body.theme-aurora .hero__art {
  position: absolute;
  /* Крупнее и «из-за края»: низ уходит за границу блока, поэтому кажется,
     что персонаж выглядывает из-за панели, а не наклеен поверх. */
  right: 6px;
  bottom: -14%;
  width: min(44%, 500px);
  max-height: 116%;
  object-fit: contain;
  z-index: 2;
  pointer-events: none;
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.55));
}

@media (max-width: 900px) {
  body.theme-aurora .hero__art { display: none; }
  body.theme-aurora .hero h1,
  body.theme-aurora .hero > p,
  body.theme-aurora .hero__actions,
  body.theme-aurora .hero__stats { max-width: 100%; }
}
/* Кнопка «Убрать» наезжала на имя: имя не сжималось и не обрезалось. */
.squad-member__who { flex: 1 1 auto; min-width: 0; }
.squad-member__who > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.squad-member .btn { flex: 0 0 auto; }
/* Шапка-капсула: меню собрано в одну скруглённую плашку с разделителями,
   как на макете. Раньше ссылки висели отдельными островками. */
body.theme-aurora .header__nav {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border: 1px solid rgba(200, 150, 255, 0.22);
  border-radius: 999px;
  background: rgba(52, 26, 90, 0.55);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
body.theme-aurora .header__nav .navlink {
  padding: 7px 16px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
body.theme-aurora .header__nav .navlink:hover {
  background: rgba(176, 107, 255, 0.18);
}
body.theme-aurora .header__nav .navlink.is-active {
  background: linear-gradient(135deg, #9b4dff, #c86bff);
  color: #fff;
}
@media (max-width: 900px) {
  body.theme-aurora .header__nav {
    overflow-x: auto;
    max-width: 100%;
    scrollbar-width: none;
  }
  body.theme-aurora .header__nav::-webkit-scrollbar { display: none; }
}
/* Ширина капсулы не должна прыгала по ширине от страницы к странице:
   меню то уже, то шире, потому что ширина шла от содержимого.
   Задаём общий минимум — по самому широкому варианту. */
body.theme-aurora .header__nav {
  min-width: 560px;
  justify-content: center;
}
@media (max-width: 900px) {
  body.theme-aurora .header__nav { min-width: 0; justify-content: flex-start; }
}
/* Кнопки-значки в шапке: без подписей, крупнее обычных. */
body.theme-aurora .navlink--icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(52, 26, 90, 0.55);
  border: 1px solid rgba(200, 150, 255, 0.22);
  padding: 0;
}
body.theme-aurora .navlink--icon .icon {
  width: 22px;
  height: 22px;
}
body.theme-aurora .navlink--icon:hover {
  background: rgba(176, 107, 255, 0.25);
}
body.theme-aurora .navlink--icon.is-active {
  background: linear-gradient(135deg, #9b4dff, #c86bff);
  border-color: transparent;
}
/* Колокольчик в одном стиле со значками шапки: раньше он был голым
   и выделялся на фоне кнопок-кружков. */
body.theme-aurora .bell__wrap > button {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(200, 150, 255, 0.22);
  background: rgba(52, 26, 90, 0.55);
  color: var(--text);
}
body.theme-aurora .bell__wrap > button .icon {
  width: 22px;
  height: 22px;
}
body.theme-aurora .bell__wrap > button:hover {
  background: rgba(176, 107, 255, 0.25);
}
/* Текст в шапке читался плохо: затемнение начиналось слишком низко
   и было слишком слабым для светлых баннеров. */
.profile-hero__shade {
  background: linear-gradient(180deg,
    rgba(10, 9, 16, 0.35) 0%,
    rgba(10, 9, 16, 0.75) 45%,
    rgba(10, 9, 16, 0.96) 100%);
}
/* Чёрно-серая палитра по макету: четыре оттенка от чёрного до почти белого.
   Фиолетовый уходит совсем — акцент теперь светлый, а не цветной. */
body.theme-aurora {
  --bg: #07070a;
  --bg-soft: #0d0d11;
  --surface: rgba(38, 38, 45, 0.62);
  --surface-2: rgba(52, 52, 60, 0.66);
  --surface-3: rgba(70, 70, 80, 0.7);
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.26);
  --text: #f4f1f7;
  --text-dim: #c9c4d2;
  --text-muted: #8e8a99;
  --accent: #e6e1ee;
  --accent-soft: rgba(230, 225, 238, 0.16);
}

body.theme-aurora::before {
  background:
    radial-gradient(900px 520px at 20% -10%, rgba(120, 120, 140, 0.28), transparent 65%),
    radial-gradient(760px 520px at 90% 0%, rgba(90, 90, 105, 0.22), transparent 65%),
    linear-gradient(180deg, #101014 0%, #08080b 60%, #050507 100%);
}

body.theme-aurora .header {
  background: rgba(18, 18, 22, 0.82);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 40px -26px rgba(0, 0, 0, 0.9);
}

body.theme-aurora .header__nav {
  background: rgba(24, 24, 29, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

body.theme-aurora .header__nav .navlink.is-active {
  background: #f4f1f7;
  color: #0b0b0e;
}

body.theme-aurora .panel,
body.theme-aurora .post,
body.theme-aurora .profile-hero,
body.theme-aurora .catalog-card,
body.theme-aurora .merch-card {
  background: linear-gradient(160deg, rgba(52, 52, 60, 0.6), rgba(24, 24, 29, 0.75));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 70px -46px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.theme-aurora .btn--primary {
  background: #f4f1f7;
  color: #0b0b0e;
  border: 0;
  box-shadow: 0 10px 30px -18px rgba(255, 255, 255, 0.5);
}

body.theme-aurora .btn--ghost,
body.theme-aurora .chip,
body.theme-aurora .tag {
  background: rgba(60, 60, 70, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text);
}

body.theme-aurora .navlink--icon,
body.theme-aurora .bell__wrap > button {
  background: rgba(24, 24, 29, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

body.theme-aurora .navlink--icon.is-active {
  background: #f4f1f7;
}

body.theme-aurora h1,
body.theme-aurora h2 {
  text-shadow: 0 2px 24px rgba(255, 255, 255, 0.18);
}

body.theme-aurora .profile-hero__shade {
  background: linear-gradient(180deg, rgba(6, 6, 9, 0.4) 0%, rgba(6, 6, 9, 0.8) 45%, rgba(6, 6, 9, 0.97) 100%);
}
/* Аватар в шапке — такой же кружок, как остальные значки: одна высота
   у всего ряда, без выбивающейся плашки с именем. */
body.theme-aurora .user-chip--icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(24, 24, 29, 0.75);
}
body.theme-aurora .user-chip--icon:hover {
  background: rgba(70, 70, 80, 0.8);
}

/* Один ряд — одна высота: и капсула меню, и все кнопки. */
body.theme-aurora .header__nav,
body.theme-aurora .header__side { min-height: 44px; }
body.theme-aurora .header__side .btn { height: 44px; }
/* Высота шапки фиксированная: раньше она считалась от содержимого,
   и на разных страницах получалась разной — капсула одна, а шапка гуляет. */
body.theme-aurora .header {
  height: var(--header-h);
  min-height: var(--header-h);
  max-height: var(--header-h);
  display: flex;
  align-items: center;
  overflow: visible;
}
body.theme-aurora .header__inner,
body.theme-aurora .header > .header__inner {
  display: flex;
  align-items: center;
  height: 100%;
  min-height: 0;
}
body.theme-aurora .header__nav,
body.theme-aurora .header__side,
body.theme-aurora .brand {
  height: 44px;
  min-height: 0;
  margin: auto 0;
}

/* Шапка каталога: комната-фон и персонаж из макета.
   Фон сдвигается за мышкой через переменные, которые ставит скрипт. */
body.theme-aurora .hero { position: relative; overflow: visible; }

body.theme-aurora .hero__scene {
  position: absolute;
  inset: -18px;
  background-image: url('/img/hero/scene.webp');
  background-size: cover;
  background-position: center;
  transform: translate3d(var(--mx, 0), var(--my, 0), 0) scale(1.04);
  transition: transform 0.35s ease-out;
  opacity: 0.55;
  z-index: 0;
  pointer-events: none;
}

body.theme-aurora .hero > *:not(.hero__bg):not(.hero__scene):not(.hero__art) {
  position: relative;
  z-index: 1;
}

body.theme-aurora .hero__art {
  position: absolute;
  right: 18px;
  bottom: -6px;
  width: min(38%, 420px);
  max-height: 92%;
  object-fit: contain;
  z-index: 1;
  pointer-events: none;
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.55));
}

@media (max-width: 900px) {
  body.theme-aurora .hero__art { width: 46%; right: -6px; opacity: 0.85; }
  body.theme-aurora .hero__scene { opacity: 0.4; }
}

/* Фон живёт в своём слое с обрезкой по скруглению: так персонаж может
   выходить за границы блока, а комната за них не выползает. */
body.theme-aurora .hero__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  z-index: 0;
  pointer-events: none;
}
body.theme-aurora .hero__art {
  right: -150px;
  bottom: 16%;
  width: min(44%, 500px);
  max-height: 118%;
  /* Ниже стекла: персонаж читается «с той стороны», под слоем. */
  z-index: 1;
}

/* Стекло поверх шапки: персонаж оказывается за ним, текст — перед ним.
   Так он кажется стоящим за стеклянной панелью, а не наклеенным поверх. */
body.theme-aurora .hero::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: 2;
  pointer-events: none;
  /* Только граница: заливка и размытие убраны по просьбе — блок должен
     быть прозрачным, видно лишь то, где он кончается. */
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 30px 90px -50px rgba(0, 0, 0, 0.95);
}

/* Текст — над стеклом. */
body.theme-aurora .hero > *:not(.hero__bg):not(.hero__scene):not(.hero__art) {
  z-index: 3;
}
/* Логотип в шапке — персонаж вместо буквы «В». */
body.theme-aurora .brand__mark--art,
body.theme-aurora .brand .brand__mark--art {
  object-fit: contain;
  width: 34px;
  height: 34px;
  border-radius: 0;
  /* Плашку под буквой «В» убираем совсем: остаётся только персонаж. */
  background: none !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  filter: none;
}

/* Активная кнопка-значок: плашка белая, значит иконка должна быть тёмной,
   иначе её не видно. */
body.theme-aurora .navlink--icon.is-active .icon {
  color: #0b0b0e;
  stroke: #0b0b0e;
}

/* Карточки объединений — как карточки авторов: сетка, иконка фиксированного
   размера, описание в две строки. Раньше картинка растягивалась на всю
   ширину и выдавливала текст вбок. */
.squad-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
}

.squad-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(52, 52, 60, 0.55), rgba(24, 24, 29, 0.75));
  min-width: 0;
}

.squad-card__art {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 700;
  font-size: 1.3rem;
}

.squad-card__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.squad-card__body { flex: 1 1 auto; min-width: 0; }
.squad-card__name { font-weight: 700; display: block; }

.squad-card__meta {
  margin: 2px 0 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.squad-card__desc {
  margin: 4px 0 0;
  color: var(--text-dim);
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.squad-card > .btn { flex: 0 0 auto; }

@media (max-width: 720px) {
  .squad-grid { grid-template-columns: 1fr; }
}

/* Редактор на стене объединения: для поста хватает пары строк, а в вики
   нужна полноценная высота. Раньше стена наследовала 220 точек пустоты. */
.squad-compose .rich-editor {
  min-height: 110px;
  max-height: 320px;
}

.squad-compose .bio-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}

/* Отступ под заголовком объединений: карточки прилипали к заголовку. */
.squad-grid { margin-top: 12px; }

/* На стене объединения: посты не должны наезжать на панель редактора. */
.squad-compose {
  margin-top: 14px;
  position: relative;
  z-index: 1;
}

.squad-wall-post {
  position: relative;
  overflow: hidden;
}

.squad-wall-post + .squad-wall-post { margin-top: 10px; }

/* Капсула меню не сжималась на средних экранах: фиксированный минимум
   выдавливал пункты за край и ломал шапку. */
@media (max-width: 1200px) {
  body.theme-aurora .header__nav {
    min-width: 0;
    flex: 1 1 auto;
  }
  body.theme-aurora .header__nav .navlink {
    padding: 7px 10px;
  }
}
/* Статья и правая колонка: редактор и галерея сбоку. */
.wiki-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  align-items: start;
  margin-top: 16px;
}

.wiki-rail { display: flex; flex-direction: column; gap: 12px; }
.wiki-rail h2 { margin: 0 0 10px; font-size: 1rem; }

.wiki-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
}

.wiki-gallery__item {
  display: block;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.wiki-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 980px) {
  .wiki-layout { grid-template-columns: 1fr; }
}
/* Аватар и ссылка в карточке редактора. */
.avatar--sm { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.strong-link { font-weight: 700; color: var(--text); }
.strong-link:hover { text-decoration: underline; }

/* Знак с названием внутри: по высоте шапки, ширина по пропорции. */
body.theme-aurora .brand__logo {
  display: block;
  height: 42px;
  width: auto;
  max-width: 190px;
  object-fit: contain;
}

@media (max-width: 900px) {
  body.theme-aurora .brand__logo { height: 34px; max-width: 150px; }
}
