/* Табличка для чужих площадок: показываем как есть, чтобы автор видел,
   что именно он поставит в описание. */
.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: right; }
.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: 0;
  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--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; }

.wiki-article { max-width: 900px; }
.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: rgba(255, 92, 138, 0.07);
  max-width: 620px;
}
.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; }
}
