/* Базаrunet — стили.
   Цвета взяты из логотипа: чёрный фон, красный круг, белый маскот.
   Шрифты: Russo One (логотип, заголовки, счёт голосов) и Manrope (текст). */

@font-face {
  font-family: "Russo One";
  src: url("../fonts/russo-one-cyrillic-400-normal.78bde15ead87.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
  font-display: swap;
}
@font-face {
  font-family: "Russo One";
  src: url("../fonts/russo-one-latin-400-normal.07eb45e69b3a.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-cyrillic-wght-normal.e58febde317b.woff2") format("woff2-variations");
  font-weight: 200 800;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin-wght-normal.938c6e8019b6.woff2") format("woff2-variations");
  font-weight: 200 800;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
  font-display: swap;
}

/* Темы. По умолчанию — серая; светлая включается data-theme="light"
   на <html> или автоматически при data-theme="system" и светлой системе. */
:root {
  color-scheme: dark;
  --bg: #1c1d20;          /* фон страницы */
  --panel: #26282c;       /* карточки */
  --panel-2: #303237;     /* кнопки, наведение */
  --field: #1f2023;       /* поля ввода и вставки */
  --seam: #383a40;        /* линии */
  --seam-2: #494c53;
  --text: #f2f2f3;
  --text-strong: #ffffff;
  --text-2: #dcdde0;      /* текст постов и комментариев */
  --ash: #b7b9be;
  --ash-2: #8f9298;
  --flag: #f10d0e;        /* красный круг логотипа */
  --flag-deep: #c40a0b;
  --flag-wash: rgba(241, 13, 14, .14);
  --flag-text: #ff8585;   /* красный текст на панели */
  --link: #ff7a7a;
  --danger-text: #ff9a9a;
  --danger-bg: #3a1a1b;
  --danger-border: #6a2426;
  --ok: #2fbf4a;
  --ok-text: #8ee39b;
  --ok-bg: #1c3322;
  --ok-border: #2c5a36;
  --warn: #fab219;
  --serious: #ec835a;
  --info: #7aa7ff;
  --viz-1: #3987e5;
  --viz-1-hover: #6aa6ef;
  --me-bg: #3a2224; --me-border: #5a2a2d;
  --note-bg: #352d17; --note-border: #7a6224;
  --ai-bg: #1d2638; --ai-border: #2f4266; --ai-text: #a9c6ff;
  --media-bg: #111214;
  --topbar: rgba(28, 29, 32, .92);
  --shadow: 0 18px 40px rgba(0, 0, 0, .45);
  --hover-wash: rgba(255, 255, 255, .04);
  --yandex-border: #ffffff;

  --font-ui: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-poster: "Russo One", "Manrope", system-ui, sans-serif;

  --r-sm: 6px;
  --r-md: 10px;
  --r-pill: 999px;
  --header-h: 60px;
  --gap: 20px;
}

/* Светлая (белая) тема */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f2f3f5;
  --panel: #ffffff;
  --panel-2: #eceef1;
  --field: #ffffff;
  --seam: #e1e3e7;
  --seam-2: #c9ccd2;
  --text: #16171a;
  --text-strong: #000000;
  --text-2: #2f3136;
  --ash: #52555c;
  --ash-2: #6b6e76;
  --flag: #e30b0c;
  --flag-deep: #b8090a;
  --flag-wash: rgba(227, 11, 12, .08);
  --flag-text: #c40a0b;
  --link: #c40a0b;
  --danger-text: #b3080a;
  --danger-bg: #fdecec;
  --danger-border: #f2b8b8;
  --ok: #1b9e36;
  --ok-text: #1b7d32;
  --ok-bg: #e8f6ea;
  --ok-border: #a9d9b2;
  --info: #2563c9;
  --viz-1: #2a78d6;
  --viz-1-hover: #1c5cab;
  --me-bg: #fdeeee; --me-border: #f3c4c4;
  --note-bg: #fff6dd; --note-border: #e6c56a;
  --ai-bg: #edf3ff; --ai-border: #bcd0f5; --ai-text: #1c4fa6;
  --media-bg: #e9eaee;
  --topbar: rgba(255, 255, 255, .92);
  --shadow: 0 14px 34px rgba(20, 22, 28, .14);
  --hover-wash: rgba(0, 0, 0, .04);
  --yandex-border: #c9ccd2;
}
@media (prefers-color-scheme: light) {
  :root[data-theme="system"] {
    color-scheme: light;
    --bg: #f2f3f5;
    --panel: #ffffff;
    --panel-2: #eceef1;
    --field: #ffffff;
    --seam: #e1e3e7;
    --seam-2: #c9ccd2;
    --text: #16171a;
    --text-strong: #000000;
    --text-2: #2f3136;
    --ash: #52555c;
    --ash-2: #6b6e76;
    --flag: #e30b0c;
    --flag-deep: #b8090a;
    --flag-wash: rgba(227, 11, 12, .08);
    --flag-text: #c40a0b;
    --link: #c40a0b;
    --danger-text: #b3080a;
    --danger-bg: #fdecec;
    --danger-border: #f2b8b8;
    --ok: #1b9e36;
    --ok-text: #1b7d32;
    --ok-bg: #e8f6ea;
    --ok-border: #a9d9b2;
    --info: #2563c9;
    --viz-1: #2a78d6;
    --viz-1-hover: #1c5cab;
    --me-bg: #fdeeee; --me-border: #f3c4c4;
    --note-bg: #fff6dd; --note-border: #e6c56a;
    --ai-bg: #edf3ff; --ai-border: #bcd0f5; --ai-text: #1c4fa6;
    --media-bg: #e9eaee;
    --topbar: rgba(255, 255, 255, .92);
    --shadow: 0 14px 34px rgba(20, 22, 28, .14);
    --hover-wash: rgba(0, 0, 0, .04);
    --yandex-border: #c9ccd2;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  transition: background-color .2s ease;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--font-ui);
  font-feature-settings: "ss01", "cv11";
}
img, video { max-width: 100%; display: block; }
svg[aria-hidden="true"] { width: 1.15em; height: 1.15em; vertical-align: -0.2em; flex-shrink: 0; }
input[type=file] { font-size: .84rem; color: var(--ash); }
input[type=file]::file-selector-button {
  margin-right: 10px; padding: 6px 12px; border-radius: var(--r-pill); border: 1px solid var(--seam-2);
  background: var(--panel-2); color: var(--text); font: 600 .84rem var(--font-ui); cursor: pointer;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--text-strong); }
.prose a, a.link { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--flag); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
h1, h2, h3 { font-family: var(--font-poster); font-weight: 400; line-height: 1.2; margin: 0 0 .5em; letter-spacing: .005em; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .9em; }
.muted { color: var(--ash); }
.faint { color: var(--ash-2); }
.small { font-size: .86rem; }
.tiny { font-size: .78rem; }
.num { font-variant-numeric: tabular-nums; }
.poster { font-family: var(--font-poster); }
hr { border: 0; border-top: 1px solid var(--seam); margin: 20px 0; }

/* --- шапка ------------------------------------------------------------- */

.topbar {
  position: sticky; top: 0; z-index: 40;
  height: var(--header-h);
  display: flex; align-items: center; gap: 16px;
  padding: 0 20px;
  background: var(--topbar);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--seam);
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand img { width: 38px; height: 38px; }
.wordmark { font-family: var(--font-poster); font-size: 1.45rem; line-height: 1; letter-spacing: -.01em; }
.wordmark .ru { color: var(--flag); }
.search { flex: 1; max-width: 560px; margin: 0 auto; position: relative; }
.search input {
  width: 100%; height: 40px; padding: 0 16px 0 40px;
  background: var(--panel-2); border: 1px solid var(--seam-2); border-radius: var(--r-pill);
}
.search input::placeholder { color: var(--ash-2); }
.search input:focus { outline: none; border-color: var(--flag); }
.search svg { position: absolute; left: 14px; top: 11px; width: 18px; height: 18px; color: var(--ash-2); }
.top-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.icon-btn {
  position: relative; display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: var(--r-pill);
  background: transparent; border: 0; cursor: pointer; color: var(--text);
}
.icon-btn:hover { background: var(--panel-2); }
.icon-btn svg { width: 22px; height: 22px; }
.dot-count {
  position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: var(--r-pill); background: var(--flag); color: #fff;
  font: 700 11px/18px var(--font-ui); text-align: center;
}
.menu-toggle { display: none; }

.user-menu { position: relative; }
.user-menu summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; border-radius: var(--r-pill); }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover { background: var(--panel-2); }
.user-menu .dropdown {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px;
  background: var(--panel); border: 1px solid var(--seam-2); border-radius: var(--r-md);
  padding: 6px; box-shadow: var(--shadow);
}
.dropdown a, .dropdown button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 12px; border: 0; background: none; border-radius: var(--r-sm); text-align: left; cursor: pointer;
}
.dropdown a:hover, .dropdown button:hover { background: var(--panel-2); }
.dropdown .sep { height: 1px; background: var(--seam); margin: 6px 4px; }

/* --- каркас ---------------------------------------------------------- */

.shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr) 300px;
  gap: var(--gap);
  max-width: 1320px; margin: 0 auto; padding: 20px;
  align-items: start;
}
.shell.wide { grid-template-columns: 232px minmax(0, 1fr); }
.shell.focus { grid-template-columns: minmax(0, 560px); justify-content: center; }
.side-nav { position: sticky; top: calc(var(--header-h) + 20px); max-height: calc(100vh - var(--header-h) - 40px); overflow-y: auto; scrollbar-width: thin; }
.side-nav nav { display: grid; gap: 2px; }
.side-nav a {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px;
  border-radius: var(--r-sm); color: var(--ash);
}
.side-nav a:hover { background: var(--panel); color: var(--text); }
.side-nav a[aria-current="page"] { background: var(--panel-2); color: var(--text); }
.side-nav a svg, .side-nav .nav-btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.side-nav .nav-btn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 12px; border: 0; background: none;
  border-radius: var(--r-sm); color: var(--ash); cursor: pointer; text-align: left; font: inherit; }
.side-nav .nav-btn:hover { background: var(--panel); color: var(--text); }
.side-nav .nav-btn > span { align-items: center; gap: 12px; }
.show-sm { display: none !important; }
.side-nav h4 { margin: 18px 12px 6px; font: 600 .78rem/1 var(--font-ui); color: var(--ash-2); }
.side-nav .count { margin-left: auto; font-size: .78rem; color: var(--flag); font-weight: 700; }
.main { min-width: 0; }
.aside { display: grid; gap: 16px; position: sticky; top: calc(var(--header-h) + 20px); }

.panel { background: var(--panel); border: 1px solid var(--seam); border-radius: var(--r-md); }
.panel-pad { padding: 18px; }
.panel h3 { margin-bottom: 10px; }

/* --- кнопки ------------------------------------------------------------ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: var(--r-pill);
  border: 1px solid var(--seam-2); background: var(--panel-2); color: var(--text);
  font-weight: 650; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--ash-2); color: var(--text-strong); }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--flag); border-color: var(--flag); color: #fff; }
.btn-primary:hover { background: var(--flag-deep); border-color: var(--flag-deep); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ash); }
.btn-ghost:hover { background: var(--panel-2); color: var(--text); border-color: transparent; }
.btn-danger { background: transparent; border-color: var(--danger-border); color: var(--danger-text); }
.btn-danger:hover { background: var(--danger-bg); border-color: var(--flag); color: var(--danger-text); }
.btn-ok { background: transparent; border-color: var(--ok-border); color: var(--ok-text); }
.btn-ok:hover { background: var(--ok-bg); border-color: var(--ok); color: var(--ok-text); }
.btn-sm { height: 30px; padding: 0 12px; font-size: .86rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-vk { background: #0077ff; border-color: #0077ff; color: #fff; }
.btn-vk:hover { background: #0062d1; border-color: #0062d1; }
.btn-yandex { background: #fff; border-color: var(--yandex-border); color: #000; }
.btn-yandex:hover { background: #e9e9e9; color: #000; }

/* --- формы ------------------------------------------------------------- */

.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field > label, .field-label { font-weight: 650; font-size: .92rem; }
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=url],
.field input[type=search], .field input[type=number], .field select, .field textarea,
.input {
  width: 100%; padding: 10px 14px; background: var(--field); border: 1px solid var(--seam-2);
  border-radius: var(--r-sm); color: var(--text);
}
.field textarea { resize: vertical; min-height: 44px; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { outline: none; border-color: var(--flag); }
.field .help { color: var(--ash-2); font-size: .82rem; }
.field .errors, .form-errors { color: var(--danger-text); font-size: .86rem; margin: 0; padding: 0; list-style: none; }
.form-errors { background: var(--danger-bg); border: 1px solid var(--danger-border); border-radius: var(--r-sm); padding: 10px 14px; margin-bottom: 16px; }
.check { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; cursor: pointer; }
.check input { margin-top: 4px; accent-color: var(--flag); width: 16px; height: 16px; flex-shrink: 0; }
.radio-list { display: grid; gap: 6px; }
.radio-list label { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border: 1px solid var(--seam); border-radius: var(--r-sm); cursor: pointer; }
.radio-list label:has(input:checked) { border-color: var(--flag); background: var(--flag-wash); }
.radio-list input { accent-color: var(--flag); }

/* быстрая блокировка в профиле: сроки кнопками */
.mod-box { display: grid; gap: 12px; }
.mod-box h3 { margin: 0; }
.mod-box > .btn { margin: 0 !important; }
.mod-box-more { text-decoration: underline; text-underline-offset: 2px; }
.ban-state { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--danger-border); border-radius: var(--r-sm); background: var(--danger-bg); }
.ban-state form { margin-top: 6px; }
.quick-ban { display: grid; gap: 10px; }
.quick-ban fieldset { border: 0; padding: 0; margin: 0; }
.quick-ban legend { padding: 0; margin-bottom: 6px; }
.term-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.term-chips label { position: relative; cursor: pointer; }
.term-chips input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.term-chips span { display: block; padding: 7px 4px; text-align: center; font-size: .8rem; font-weight: 600; border: 1px solid var(--seam); border-radius: var(--r-sm); color: var(--ash); background: var(--panel); }
.term-chips label:hover span { color: var(--text); border-color: var(--ash-2); }
.term-chips input:checked + span { border-color: var(--flag); background: var(--flag-wash); color: var(--text); }
.term-chips input:focus-visible + span { outline: 2px solid var(--flag); outline-offset: 2px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }

.dropzone {
  border: 1.5px dashed var(--seam-2); border-radius: var(--r-md); padding: 22px;
  text-align: center; color: var(--ash); cursor: pointer; position: relative;
}
.dropzone:hover, .dropzone.drag { border-color: var(--flag); color: var(--text); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.file-chip { display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; border-radius: var(--r-pill); background: var(--panel-2); font-size: .82rem; }

/* --- лента и пост ------------------------------------------------------- */

.feed-head { display: flex; align-items: center; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tab {
  padding: 7px 14px; border-radius: var(--r-pill); color: var(--ash); font-weight: 650; font-size: .92rem;
}
.tab:hover { background: var(--panel); color: var(--text); }
.tab[aria-current="page"] { background: var(--text); color: var(--bg); }
.feed-head .grow { flex: 1; }
.period select { background: var(--panel); border: 1px solid var(--seam-2); border-radius: var(--r-pill); padding: 6px 12px; }

.feed { display: grid; gap: 10px; }
.post {
  display: grid; grid-template-columns: 52px minmax(0, 1fr);
  background: var(--panel); border: 1px solid var(--seam); border-radius: var(--r-md);
}
.post:hover { border-color: var(--seam-2); }
.post-rail { display: flex; justify-content: center; padding: 12px 0; border-right: 1px solid var(--seam); }
.post-body { padding: 12px 16px 10px; min-width: 0; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: .84rem; color: var(--ash-2); margin-bottom: 6px; }
.meta .community { color: var(--text); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.meta .community:hover { color: var(--flag); }
.meta a:hover { text-decoration: underline; }
.post-title { font: 700 1.12rem/1.35 var(--font-ui); margin: 0 0 8px; overflow-wrap: anywhere; }
.post-title a:hover { color: var(--text-strong); text-decoration: underline; text-decoration-color: var(--flag); text-underline-offset: 3px; }
.post-detail .post-title { font-size: 1.45rem; }
.post-text { color: var(--text-2); overflow-wrap: anywhere; }
.post .post-text.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.post-link { display: inline-flex; align-items: center; gap: 6px; color: var(--link); font-size: .9rem; margin-bottom: 8px; overflow-wrap: anywhere; }
.post-actions { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 8px; margin-left: -10px; }
.post-actions .btn-ghost { height: 32px; padding: 0 10px; font-size: .86rem; font-weight: 600; }
.post-actions form { display: contents; }
.flair {
  display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: var(--r-pill);
  font: 700 .72rem/1 var(--font-ui); border: 1px solid currentColor;
}
.flair-nsfw { color: var(--flag-text); }
.flair-spoiler { color: var(--ash); }
.flair-pin { color: var(--ok); }
.flair-lock { color: var(--warn); }
.status-note {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; margin-bottom: 12px;
  border-radius: var(--r-sm); background: var(--panel-2); border-left: 3px solid var(--warn); font-size: .9rem;
}
.status-note.removed { border-left-color: var(--flag); }

/* голосование: красная звезда с ушанки — «за» */
.vote { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.vote.row { flex-direction: row; gap: 4px; }
.vote button {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r-sm);
  border: 0; background: transparent; color: var(--ash-2); cursor: pointer;
}
.vote button:hover { background: var(--panel-2); color: var(--text); }
.vote .up svg { width: 22px; height: 22px; }
.vote .down svg { width: 18px; height: 18px; }
.vote .up[aria-pressed="true"] { color: var(--flag); }
.vote.just-voted .up[aria-pressed="true"] svg { animation: star-pop .28s ease-out; }
.vote .down[aria-pressed="true"] { color: var(--info); }
.vote .score { font-family: var(--font-poster); font-size: 1rem; min-width: 2ch; text-align: center; }
.vote .score.pos { color: var(--text); }
.vote .score.neg { color: var(--info); }
.vote.voted-up .score { color: var(--flag); }
@keyframes star-pop { 0% { transform: scale(.7) rotate(-20deg); } 70% { transform: scale(1.18) rotate(6deg); } 100% { transform: none; } }


/* медиа */
.gallery { display: grid; gap: 4px; margin: 8px 0 4px; border-radius: var(--r-sm); overflow: hidden; }
.gallery.n2 { grid-template-columns: 1fr 1fr; }
.gallery.n3, .gallery.many { grid-template-columns: repeat(3, 1fr); }
.media { position: relative; background: var(--media-bg); min-height: 60px; }
.media img, .media video { width: 100%; max-height: 560px; object-fit: contain; margin: 0 auto; }
.gallery.n2 .media img, .gallery.n3 .media img, .gallery.many .media img { height: 220px; object-fit: cover; }
.media audio { width: 100%; }
.media.audio { background: var(--panel-2); padding: 12px; border-radius: var(--r-sm); display: flex; gap: 12px; align-items: center; }
.media.audio svg { width: 28px; height: 28px; color: var(--flag); flex-shrink: 0; }
.media .processing { display: grid; place-items: center; height: 180px; color: var(--ash); font-size: .9rem; }
.media.pending { display: grid; place-items: center; height: 120px; background: var(--panel-2); color: var(--ash); font-size: .9rem; text-align: center; padding: 12px; }
.veil { position: relative; }
.veil.covered > :not(.veil-btn) { filter: blur(28px) brightness(.6); pointer-events: none; }
.veil-btn {
  position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; width: 100%;
  background: transparent; border: 0; cursor: pointer; color: #fff; font-weight: 700;
}
.veil-btn span { padding: 8px 14px; border-radius: var(--r-pill); background: rgba(0,0,0,.72); border: 1px solid var(--seam-2); }
.veil:not(.covered) .veil-btn { display: none; }

/* комментарии */
.comment-box { margin: 16px 0; }
.comments { margin-top: 10px; }
.comment { position: relative; padding-left: 0; }
.c-head { display: flex; align-items: center; gap: 8px; font-size: .84rem; color: var(--ash-2); padding-top: 10px; }
.c-head .author { color: var(--text); font-weight: 700; }
.c-head .op { color: var(--flag); font-weight: 800; font-size: .74rem; }
.c-toggle { cursor: pointer; border: 0; background: none; color: var(--ash-2); padding: 0 4px; font-size: .8rem; }
.c-body { padding: 4px 0 0 34px; }
.c-text { overflow-wrap: anywhere; color: var(--text-2); }
.c-actions { display: flex; align-items: center; gap: 2px; margin-left: -6px; }
.c-actions .btn-ghost { height: 28px; padding: 0 8px; font-size: .82rem; }
.c-children { margin-left: 13px; padding-left: 21px; border-left: 1.5px solid var(--seam); }
.c-children:hover { border-left-color: var(--seam-2); }
.comment.collapsed > .c-body, .comment.collapsed > .c-children { display: none; }
.comment.collapsed > .c-head { opacity: .7; }
.comment.fresh > .c-body { animation: fresh 1.6s ease-out; }
@keyframes fresh { from { background: var(--flag-wash); } to { background: transparent; } }
.c-removed { color: var(--ash-2); font-style: italic; }
.reply-slot:empty { display: none; }
.reply-slot { margin: 8px 0; }

/* сообщества */
.community-banner { height: 110px; border-radius: var(--r-md) var(--r-md) 0 0; background:
  radial-gradient(circle at 85% 40%, var(--flag) 0 58px, transparent 59px), var(--panel-2); }
.community-head { display: flex; align-items: flex-end; gap: 16px; padding: 0 20px 16px; margin-top: -34px; flex-wrap: wrap; }
.community-head h1 { margin: 0; }
.c-icon {
  display: inline-grid; place-items: center; flex-shrink: 0; border-radius: 50%; overflow: hidden;
  background: var(--flag); color: #fff; font-family: var(--font-poster);
}
.c-icon img { width: 100%; height: 100%; object-fit: cover; }
.community-head .c-icon { width: 76px; height: 76px; font-size: 2rem; border: 4px solid var(--panel); }
.community-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--seam); }
.community-row:last-child { border-bottom: 0; }
.community-row .info { flex: 1; min-width: 0; }
.rules { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: var(--text-2); }
.rules li::marker { color: var(--flag); font-family: var(--font-poster); }

/* аватары */
.avatar { display: inline-grid; place-items: center; border-radius: 50%; overflow: hidden; flex-shrink: 0; font-family: var(--font-poster); box-shadow: inset 0 0 0 1px var(--hover-wash); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* профиль */
.profile-head { display: flex; gap: 20px; align-items: center; padding: 22px; }
.profile-head .avatar { width: 96px; height: 96px; font-size: 2.4rem; }
.stats-inline { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 6px; }
.stats-inline b { font-family: var(--font-poster); font-weight: 400; font-size: 1.1rem; display: block; }
.badge-role { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: var(--r-pill); background: var(--flag-wash); color: var(--flag-text); font-size: .78rem; font-weight: 700; }

/* вход */
.auth { max-width: 440px; margin: 40px auto; }
.auth-card { padding: 30px; }
.auth-card h1 { text-align: center; }
.auth-sub { text-align: center; color: var(--ash); margin-bottom: 22px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--ash-2); font-size: .84rem; margin: 18px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--seam); }
.providers { display: grid; gap: 10px; }
.providers form { margin: 0; }
.providers .btn { height: 44px; }
.law-note { font-size: .78rem; color: var(--ash-2); text-align: center; margin-top: 16px; }

/* сообщения и тосты */
.flash { display: grid; gap: 8px; margin-bottom: 16px; }
.flash .msg { padding: 10px 14px; border-radius: var(--r-sm); background: var(--panel-2); border-left: 3px solid var(--info); }
.flash .msg.success { border-left-color: var(--ok); }
.flash .msg.error { border-left-color: var(--flag); }
.flash .msg.warning { border-left-color: var(--warn); }
#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; width: min(92vw, 420px); }
.toast {
  padding: 12px 16px; border-radius: var(--r-md); background: var(--text); color: var(--bg);
  font-weight: 650; box-shadow: 0 12px 30px rgba(0,0,0,.5); animation: toast-in .2s ease-out;
}
.toast.error { background: var(--flag); color: #fff; }
.toast.success { background: #1c7a2f; color: #fff; }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } }

/* модальное окно */
dialog.modal {
  border: 1px solid var(--seam-2); border-radius: var(--r-md); background: var(--panel); color: var(--text);
  padding: 0; width: min(92vw, 460px);
}
dialog.modal::backdrop { background: rgba(0, 0, 0, .7); }
.modal-body { padding: 22px; }
.modal-close { position: absolute; top: 10px; right: 10px; }

/* поддержка: плавающая кнопка */
.help-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 50;
  width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--flag); color: #fff; box-shadow: 0 10px 28px rgba(241, 13, 14, .35);
  display: grid; place-items: center;
}
.help-fab:hover { background: var(--flag-deep); }
.help-fab svg { width: 26px; height: 26px; }
.help-pop {
  position: fixed; right: 20px; bottom: 84px; z-index: 50; width: min(92vw, 360px);
  background: var(--panel); border: 1px solid var(--seam-2); border-radius: var(--r-md);
  box-shadow: var(--shadow); overflow: hidden;
}
.help-pop header { padding: 16px 18px; border-bottom: 1px solid var(--seam); display: flex; gap: 12px; align-items: center; }
.help-pop header img { width: 40px; height: 40px; }
.help-pop .body { padding: 10px; display: grid; gap: 4px; max-height: 60vh; overflow: auto; }
.help-pop .faq-link { display: block; padding: 9px 10px; border-radius: var(--r-sm); font-size: .92rem; }
.help-pop .faq-link:hover { background: var(--panel-2); }
.help-pop footer { padding: 12px; border-top: 1px solid var(--seam); display: grid; gap: 8px; }
.channel-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn-tg { background: #229ed9; border-color: #229ed9; color: #fff; }
.btn-tg:hover { background: #1a86b9; border-color: #1a86b9; }
/* Telegram-канал сайта: пункт меню и карточка на главной */
.side-nav a.nav-tg svg { color: #229ed9; }
.news-channel-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.news-channel-head h3 { margin: 0; }
.news-channel-icon { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; background: #229ed9; color: #fff; }
.news-channel-icon svg { width: 22px; height: 22px; margin-left: -2px; }
.news-channel .btn { margin-top: 2px; }
.btn-max { background: linear-gradient(135deg, #5b2eff, #b23bff); border-color: transparent; color: #fff; }
.btn-max:hover { filter: brightness(.92); color: #fff; }

/* поддержка: центр помощи и переписка */
.faq details { border-bottom: 1px solid var(--seam); }
.faq details:last-child { border-bottom: 0; }
.faq summary { cursor: pointer; padding: 14px 18px; font-weight: 650; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--flag); font-family: var(--font-poster); }
.faq details[open] summary::after { content: "−"; }
.faq .answer { padding: 0 18px 16px; color: var(--text-2); white-space: pre-line; }
.thread { display: grid; gap: 12px; padding: 18px; }
.bubble { max-width: 82%; padding: 10px 14px; border-radius: 14px; background: var(--panel-2); justify-self: start; }
.bubble.me { justify-self: end; background: var(--me-bg); border: 1px solid var(--me-border); }
.bubble.system { justify-self: center; background: transparent; color: var(--ash-2); font-size: .84rem; text-align: center; max-width: 92%; padding: 2px 10px; }
.bubble.internal { background: var(--note-bg); border: 1px dashed var(--note-border); }
.bubble .who { font-size: .78rem; color: var(--ash-2); margin-bottom: 4px; display: flex; gap: 8px; }
.bubble .text { white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble img { margin-top: 8px; border-radius: var(--r-sm); max-height: 260px; }
.ticket-status { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; padding: 3px 10px; border-radius: var(--r-pill); background: var(--panel-2); }
.ticket-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ash); }
.ticket-status.new::before { background: var(--flag); }
.ticket-status.open::before { background: var(--warn); }
.ticket-status.waiting::before { background: var(--info); }
.ticket-status.resolved::before, .ticket-status.closed::before { background: var(--ok); }

/* --- панель модератора --------------------------------------------------- */

.mod-nav { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 18px; border-bottom: 1px solid var(--seam); padding-bottom: 12px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 18px; }
.tile { padding: 14px 16px; }
.tile .label { color: var(--ash); font-size: .84rem; }
.tile .value { font-family: var(--font-poster); font-size: 1.7rem; line-height: 1.2; margin-top: 2px; }
.tile .value.alert { color: var(--flag); }
.tile .hint { color: var(--ash-2); font-size: .78rem; }
a.tile:hover { border-color: var(--seam-2); }
.table-wrap { overflow-x: auto; }
.login-table { width: 100%; }
.login-table td.muted { overflow-wrap: anywhere; }
@media (max-width: 480px) { .login-table td { padding: 8px 6px; } }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data th { text-align: left; font-weight: 650; color: var(--ash); padding: 10px 12px; border-bottom: 1px solid var(--seam-2); white-space: nowrap; }
table.data td { padding: 10px 12px; border-bottom: 1px solid var(--seam); vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
.q-item { padding: 16px 18px; border-bottom: 1px solid var(--seam); display: grid; gap: 10px; }
.q-item:last-child { border-bottom: 0; }
.q-item.hidden-content { border-left: 3px solid var(--flag); }
.q-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .84rem; color: var(--ash); }
.src { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: var(--r-pill); background: var(--panel-2); color: var(--text); font-weight: 700; font-size: .76rem; }
.src::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ash); }
.src.report::before { background: var(--serious); }
.src.ai::before, .src.media_ai::before { background: var(--info); }
.src.profanity::before { background: var(--warn); }
.src.premod::before, .src.new_account::before { background: var(--ok); }
.q-content { background: var(--field); border: 1px solid var(--seam); border-radius: var(--r-sm); padding: 12px 14px; overflow-wrap: anywhere; }
.q-content .media img, .q-content .media video { max-height: 280px; }
.ai-box { font-size: .86rem; padding: 8px 12px; border-radius: var(--r-sm); background: var(--ai-bg); border: 1px solid var(--ai-border); }
.ai-box b { color: var(--ai-text); }
.q-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.q-actions .input { width: auto; flex: 1; min-width: 160px; height: 34px; padding: 4px 12px; }
.q-actions select.input { flex: 0 1 auto; }
.resolved-note { padding: 14px 18px; color: var(--ash); font-size: .9rem; border-bottom: 1px solid var(--seam); }
.empty { text-align: center; padding: 44px 20px; color: var(--ash); }
.empty > img { width: 84px; margin: 0 auto 12px; opacity: .9; }

/* графики */
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin-bottom: 18px; }
.chart-card { padding: 14px 16px 10px; }
.chart-card .chart-title { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.chart-card .chart-title h3 { margin: 0; font-family: var(--font-ui); font-weight: 700; font-size: .95rem; }
.chart-card .total { font-family: var(--font-poster); font-size: 1.2rem; }
.colchart { display: grid; grid-template-columns: 28px minmax(0, 1fr); grid-template-rows: 130px auto; column-gap: 6px; margin-top: 4px; }
.cc-y { position: relative; }
.cc-y span { position: absolute; right: 0; transform: translateY(50%); font-size: 11px; color: var(--ash-2); font-variant-numeric: tabular-nums; line-height: 1; }
.cc-plot { position: relative; display: flex; align-items: stretch; gap: 2px; border-bottom: 1px solid var(--seam-2); }
.cc-grid { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid var(--seam); pointer-events: none; }
.cc-col { position: relative; flex: 1 1 0; display: flex; align-items: flex-end; justify-content: center; min-width: 2px; outline-offset: 0; }
.cc-bar { display: block; width: 100%; max-width: 24px; min-height: 2px; background: var(--viz-1); border-radius: 4px 4px 0 0; }
.cc-col:hover .cc-bar, .cc-col:focus-visible .cc-bar { background: var(--viz-1-hover); }
.cc-col:hover { background: var(--hover-wash); }
.cc-x { grid-column: 2; display: flex; gap: 2px; margin-top: 4px; }
.cc-x span { flex: 1 1 0; min-width: 0; font-size: 11px; color: var(--ash-2); white-space: nowrap; overflow: visible; text-align: left; }
.chart-tip {
  position: fixed; z-index: 120; pointer-events: none; padding: 8px 10px; border-radius: var(--r-sm);
  background: var(--text); color: var(--bg); font-size: .82rem; box-shadow: 0 8px 20px rgba(0,0,0,.5);
}
.chart-tip b { display: block; font-size: 1rem; }
.chart-table summary { cursor: pointer; color: var(--ash-2); font-size: .8rem; margin-top: 6px; }
.chart-table table { font-size: .8rem; margin-top: 6px; }
.hbars { display: grid; gap: 8px; }
.hbar { display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr) 44px; gap: 10px; align-items: center; font-size: .86rem; }
.hbar .track { height: 10px; }
.hbar .fill { height: 10px; border-radius: 0 4px 4px 0; background: var(--viz-1); min-width: 2px; }
.hbar .n { text-align: right; font-variant-numeric: tabular-nums; }
.hbar .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; margin-bottom: 18px; }
a.mention { color: var(--link, var(--flag-text)); font-weight: 600; }
a.mention:hover { text-decoration: underline; }

/* настройки: уведомления в Telegram */
.tg-head { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.tg-icon { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; background: #229ed9; color: #fff; }
.tg-icon svg { width: 22px; height: 22px; margin-left: -2px; }
.tg-linked { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--seam); border-radius: var(--r-sm); margin-bottom: 12px; }
.tg-warn { padding: 10px 12px; border: 1px solid var(--danger-border); background: var(--danger-bg); color: var(--danger-text); border-radius: var(--r-sm); margin-bottom: 12px; }
.tg-prefs fieldset { border: 0; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.tg-prefs legend { padding: 0; margin-bottom: 6px; }
.tg-prefs label { display: flex; gap: 10px; align-items: center; font-size: .92rem; cursor: pointer; }
.tg-prefs input { accent-color: var(--flag); width: 16px; height: 16px; }
.tg-connect { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* панель: Telegram-канал */
.channel-head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.channel-candidate { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 12px; padding: 10px 12px; border: 1px solid var(--seam); border-radius: var(--r-sm); }
.channel-recent { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 4px; }

/* журнал аудита и права команды */
.log-head { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.log-head p { margin: -4px 0 0; max-width: 640px; }
.role-chip { display: inline-block; margin-top: 3px; padding: 1px 7px; border-radius: var(--r-pill); font-size: .7rem; font-weight: 700; line-height: 1.5; background: var(--panel-2); color: var(--ash); white-space: nowrap; }
.role-chip.role-founder, .role-chip.role-admin { background: var(--flag-wash); color: var(--flag-text); }
.role-chip.role-support { background: var(--ok-bg, var(--panel-2)); color: var(--ok-text, var(--ash)); }
.data.audit .audit-reason { min-width: 220px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.data.rights td:first-child { min-width: 260px; }
.data.rights th:not(:first-child), .rights-cell { text-align: center; white-space: nowrap; }
.rights-group th { text-align: left; font-size: .75rem; letter-spacing: .03em; text-transform: uppercase; color: var(--ash-2); background: var(--panel-2); }
.rights-cell.yes { color: var(--ok-text, var(--text)); font-weight: 800; }
.rights-cell.no { color: var(--ash-2); }
.rights-cell.part { font-size: .8rem; color: var(--text); }
.rights-notes { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters .input { width: auto; height: 36px; padding: 4px 12px; }

/* --- подвал -------------------------------------------------------------- */

.site-foot { font-size: .8rem; color: var(--ash-2); padding: 8px 12px; display: grid; gap: 6px; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.side-nav .site-foot a { display: inline; padding: 0; color: var(--ash-2); background: none; }
.site-foot a:hover { color: var(--text); }

.pager { display: flex; justify-content: center; padding: 16px; }
.htmx-request .spinner, .htmx-request.spinner { display: inline-block; }
.spinner { display: none; width: 16px; height: 16px; border: 2px solid var(--seam-2); border-top-color: var(--flag); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- адаптив ------------------------------------------------------------- */

.search-toggle { display: none !important; }

@media (max-width: 1120px) {
  .shell { grid-template-columns: 220px minmax(0, 1fr); }
  .shell > .aside { display: none; }
}
@media (max-width: 820px) {
  :root { --gap: 12px; }
  .shell, .shell.wide { grid-template-columns: minmax(0, 1fr); padding: 12px; }
  .side-nav {
    position: fixed; inset: var(--header-h) auto 0 0; width: 280px; max-height: none; z-index: 45;
    background: var(--bg); border-right: 1px solid var(--seam); padding: 12px;
    transform: translateX(-100%); transition: transform .2s ease;
  }
  body.nav-open .side-nav { transform: none; }
  .menu-toggle { display: inline-grid; }
  .wordmark { font-size: 1.2rem; }
  .brand img { width: 32px; height: 32px; }
  .topbar { padding: 0 10px; gap: 8px; }
  .search { display: none; }
  .search.open { display: block; position: absolute; left: 10px; right: 10px; top: 10px; }
  .search-toggle { display: inline-grid !important; }
  .post { grid-template-columns: 44px minmax(0, 1fr); }
  .post-body { padding: 10px 12px 8px; }
  .c-body { padding-left: 0; }
  .c-children { margin-left: 4px; padding-left: 12px; }
  .hide-sm { display: none !important; }
  .show-sm { display: flex !important; }
  .topbar .btn { height: 34px; padding: 0 12px; font-size: .88rem; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { white-space: nowrap; }
  h1 { font-size: 1.45rem; }
  .profile-head { flex-direction: column; text-align: center; }
  /* на телефоне всё под аватаркой — по центру, как и сам текст */
  .profile-head h1, .profile-head .profile-badges, .profile-head .profile-links, .profile-head .stats-inline { justify-content: center; }
  .profile-head .verified-line { display: flex; justify-content: center; }
  .help-fab { right: 14px; bottom: 14px; }
}

/* --- Premium ---------------------------------------------------------------- */

.author-link { display: inline-flex; align-items: center; gap: 4px; }
.pbadge { display: inline-grid; place-items: center; flex-shrink: 0; }
.pbadge img { display: block; }
.badge-premium { background: var(--flag); color: #fff; }
.badge-premium:hover { color: #fff; background: var(--flag-deep); }
.profile-banner { aspect-ratio: 3 / 1; background: var(--panel-2); overflow: hidden; }
.profile-banner video, .profile-banner img { width: 100%; height: 100%; object-fit: cover; }
.profile-head.with-banner { align-items: flex-start; }
.profile-head.with-banner > .avatar, .profile-head.with-banner > .avatar-wrap { margin-top: -64px; }
.profile-head.with-banner > .avatar, .profile-head.with-banner > .avatar-wrap > .avatar { border: 4px solid var(--panel); box-sizing: content-box; }
.premium-preview { position: relative; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--seam); }
.small-banner { aspect-ratio: 3 / 1; }
.empty-banner { display: grid; place-items: center; color: var(--ash-2); font-size: .9rem; }
.preview-ava { position: absolute; left: 16px; bottom: 12px; width: 72px; height: 72px; border-radius: 50%; overflow: hidden; border: 3px solid var(--panel); background: var(--panel); }
.preview-ava img, .preview-ava .avatar { width: 100%; height: 100%; object-fit: cover; }
.premium-hero { display: flex; gap: 24px; align-items: center; padding: 28px; margin-bottom: 16px; flex-wrap: wrap;
  background: radial-gradient(circle at 0% 50%, rgba(241, 13, 14, .22), transparent 55%), var(--panel); }
.premium-hero h1 { font-size: 2rem; margin-bottom: .3em; }
.premium-hero > div { flex: 1; min-width: 240px; }
.premium-status { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; font-weight: 650; }
.benefits { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 10px; margin-bottom: 16px; }
.benefit h3 { margin-bottom: 4px; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 12px; }
.plan { padding: 22px; display: flex; flex-direction: column; }
.plan-best { border-color: var(--flag); box-shadow: 0 0 0 1px var(--flag) inset; }
.plan-title { font-weight: 700; color: var(--ash); }
.plan-price { font-family: var(--font-poster); font-size: 2.2rem; line-height: 1.15; margin-top: 6px; }
.plan-note { margin-top: 8px; color: var(--flag-text); font-weight: 700; font-size: .86rem; }
.plan-info { flex: 1; margin-bottom: 16px; }

/* --- реклама в ленте --------------------------------------------------------- */

.ad-card { border-style: dashed; }
.ad-rail { align-items: flex-start; }
.ad-mark { writing-mode: vertical-rl; transform: rotate(180deg); font-size: .72rem; font-weight: 700; color: var(--ash-2); letter-spacing: .02em; }

/* баннер сбоку: правая колонка тянется на всю высоту, баннер «прилипает» при прокрутке */
.aside:has(> .side-ad-wrap) { position: static; align-self: stretch; align-content: start; }
.side-ad-wrap { position: sticky; top: calc(var(--header-h) + 20px); display: grid; }
.side-ad { display: grid; gap: 6px; }
.side-ad-meta { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: .75rem; color: var(--ash-2); padding: 0 2px; }
.side-ad-meta .ad-label { font-weight: 700; color: var(--ash); }
.side-ad-img { display: block; width: fit-content; max-width: 100%; border: 1px solid var(--seam); border-radius: var(--r-md); overflow: hidden; background: var(--panel); }
/* высокий баннер на невысоком экране уменьшается пропорционально — целиком помещается вместе с пометкой */
.side-ad-img img { display: block; max-width: 100%; width: auto; height: auto; max-height: calc(100vh - var(--header-h) - 110px); }
.side-ad-off { font-size: .75rem; color: var(--ash-2); text-decoration: underline; text-underline-offset: 2px; padding: 0 2px; justify-self: start; }
.side-ad-off:hover { color: var(--text); }
.side-ad-house { border-style: dashed; }
.side-ad-house .btn { margin-top: 4px; }
/* РСЯ не любит скрытые и крошечные контейнеры (CONTAINER_IS_HIDDEN, минимум 160×50) — место держим заранее */
.rtb { min-height: 50px; }
.side-ad-net .rtb { min-height: 250px; }
.ad-net { padding: 12px; }

/* страница «Реклама на Базаrunet» */
.ad-formats { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; margin-bottom: 10px; }
.ad-format h3 { margin: 14px 0 4px; }
.ad-spec { margin: 10px 0 0; padding-left: 18px; color: var(--ash); display: grid; gap: 3px; }
.ad-steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.ad-scheme {
  display: grid; grid-template-columns: 1fr 3fr 1.4fr; gap: 6px; height: 112px; padding: 8px;
  background: var(--bg); border: 1px solid var(--seam); border-radius: var(--r-sm);
}
.ad-scheme > span { display: grid; gap: 6px; align-content: start; }
.ad-scheme .s-nav { background: var(--panel-2); border-radius: 4px; }
.ad-scheme i { display: block; height: 28px; background: var(--panel-2); border-radius: 4px; }
.ad-scheme .s-side i { height: 72px; }
.ad-scheme i.s-hit { background: none; outline: 2px dashed var(--flag); outline-offset: -2px; }
.ad-contact { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: center; justify-content: space-between; }
.ad-contact-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* --- переключатель темы ------------------------------------------------------ */

.theme-toggle .when-dark { display: inline-flex; }
.theme-toggle .when-light { display: none; }
:root[data-theme="light"] .theme-toggle .when-dark { display: none; }
:root[data-theme="light"] .theme-toggle .when-light { display: inline-flex; }
@media (prefers-color-scheme: light) {
  :root[data-theme="system"] .theme-toggle .when-dark { display: none; }
  :root[data-theme="system"] .theme-toggle .when-light { display: inline-flex; }
}
.theme-choice { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.theme-choice label { cursor: pointer; border: 1px solid var(--seam); border-radius: var(--r-md); padding: 10px; display: grid; gap: 8px; font-weight: 650; font-size: .9rem; }
.theme-choice label:has(input:checked) { border-color: var(--flag); box-shadow: 0 0 0 1px var(--flag) inset; }
.theme-choice input { position: absolute; opacity: 0; pointer-events: none; }
.theme-choice label:has(input:focus-visible) { outline: 2px solid var(--flag); outline-offset: 2px; }
.swatch { height: 64px; border-radius: var(--r-sm); border: 1px solid var(--seam); display: grid; grid-template-rows: 14px 1fr; overflow: hidden; }
.swatch i { display: block; }
.swatch .sw-top { border-bottom: 1px solid rgba(128, 128, 128, .25); }
.swatch .sw-body { display: flex; gap: 6px; padding: 8px; }
.swatch .sw-card { flex: 1; border-radius: 4px; }
.swatch .sw-dot { width: 14px; height: 14px; border-radius: 50%; background: #f10d0e; }
.swatch.gray { background: #1c1d20; } .swatch.gray .sw-top { background: #26282c; } .swatch.gray .sw-card { background: #26282c; }
.swatch.light { background: #f2f3f5; } .swatch.light .sw-top { background: #ffffff; } .swatch.light .sw-card { background: #ffffff; }
.swatch.system { background: linear-gradient(90deg, #1c1d20 50%, #f2f3f5 50%); }
.swatch.system .sw-top { background: linear-gradient(90deg, #26282c 50%, #ffffff 50%); }
.swatch.system .sw-card { background: linear-gradient(90deg, #26282c 50%, #ffffff 50%); }

/* --- подсказки ников ------------------------------------------------------ */

.picker-wrap { position: relative; }
.filters .picker-wrap .input { width: 100%; }
.picker-list {
  position: absolute; z-index: 40; top: calc(100% + 4px); left: 0;
  min-width: 100%; width: max-content; max-width: min(380px, calc(100vw - 32px));
  margin: 0; padding: 4px; list-style: none; max-height: 340px; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--seam-2); border-radius: var(--r-md); box-shadow: var(--shadow);
}
.picker-list[hidden] { display: none; }
.picker-item { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: var(--r-sm); cursor: pointer; }
.picker-item:hover, .picker-item[aria-selected="true"] { background: var(--panel-2); }
.picker-name { font-weight: 650; white-space: nowrap; }
.picker-name mark { background: none; color: var(--flag-text); }
.picker-meta { margin-left: auto; padding-left: 12px; display: flex; gap: 8px; align-items: center; font-size: .78rem; color: var(--ash-2); white-space: nowrap; }
.picker-tag { padding: 1px 6px; border-radius: var(--r-pill); border: 1px solid var(--seam-2); color: var(--ash); }
.picker-tag.ban { color: var(--danger-text); border-color: var(--danger-border); background: var(--danger-bg); }
.picker-empty { padding: 8px 10px; color: var(--ash-2); font-size: .86rem; }
.nick-hint { margin: 0 0 10px; padding: 8px 12px; border: 1px solid var(--note-border); background: var(--note-bg); border-radius: var(--r-sm); }
.nick-hint a { font-weight: 700; }
.tags-form { display: grid; gap: 6px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--seam); }
.staff-mark { display: inline-flex; align-items: center; padding: 0 6px; border-radius: var(--r-pill); background: var(--ok-bg); border: 1px solid var(--ok-border); color: var(--ok-text); font-size: .7rem; font-weight: 800; line-height: 1.5; }


/* --- переходы между страницами и микроанимации -------------------------------
   Переходы — View Transitions браузера (Яндекс Браузер, Chrome, Edge, Safari 18.2+).
   Где их нет, страница просто открывается как раньше. Кто отключил анимации
   в системе (prefers-reduced-motion), не увидит ни переходов, ни анимаций. */

.nav-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 2000; pointer-events: none;
  background: var(--flag); box-shadow: 0 0 10px var(--flag); transform: scaleX(0); transform-origin: 0 50%; opacity: 0;
}
.nav-progress.run { opacity: 1; transform: scaleX(.85); transition: transform 3s cubic-bezier(.08, .7, .2, 1), opacity .1s; }
.nav-progress.done { opacity: 0; transform: scaleX(1); transition: transform .18s ease-out, opacity .25s ease .12s; }

@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }

  /* Шапка и левое меню стоят на месте, меняется только содержимое */
  .topbar { view-transition-name: topbar; }
  .side-nav { view-transition-name: side-nav; }

  ::view-transition-group(*) { animation-duration: .3s; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }
  ::view-transition-old(root) { animation: vt-out .14s ease-in both; }
  ::view-transition-new(root) { animation: vt-in .24s cubic-bezier(.2, .8, .2, 1) both; }
  @keyframes vt-out { to { opacity: 0; } }
  @keyframes vt-in { from { opacity: 0; transform: translateY(8px); } }

  /* Пост: заголовок и звёзды перелетают из ленты на страницу поста (имена карточке даёт app.js) */
  .post-detail .post-title { view-transition-name: post-title; }
  .post-detail > .post-rail { view-transition-name: post-vote; }
  /* Значок сообщества перелетает в шапку сообщества */
  .community-head > .c-icon { view-transition-name: community-icon; }
  /* Пришли не из ленты — такие элементы просто проявляются вместе со страницей */
  ::view-transition-new(post-title):only-child, ::view-transition-new(post-vote):only-child,
  ::view-transition-new(community-icon):only-child { animation: vt-in .24s cubic-bezier(.2, .8, .2, 1) both; }
  ::view-transition-old(post-title), ::view-transition-new(post-title) { height: 100%; object-fit: none; object-position: left top; }

  /* Выбранная вкладка переезжает к новой. Имя у каждой панели вкладок своё: на одной странице их бывает две */
  .tab[aria-current="page"] { view-transition-class: tab-pill; }
  .mod-nav .tab[aria-current="page"] { view-transition-name: pill-mod; }
  .tabs-feed .tab[aria-current="page"] { view-transition-name: pill-feed; }
  .tabs-csort .tab[aria-current="page"] { view-transition-name: pill-csort; }
  .tabs-filter .tab[aria-current="page"] { view-transition-name: pill-filter; }
  .tabs-period .tab[aria-current="page"] { view-transition-name: pill-period; }
  .tabs-profile .tab[aria-current="page"] { view-transition-name: pill-profile; }
  /* Не растягивать надпись: старая и новая вкладка плавно сменяют друг друга, пока плашка едет */
  ::view-transition-old(*.tab-pill), ::view-transition-new(*.tab-pill) { height: 100%; object-fit: none; }
  ::view-transition-new(*.tab-pill):only-child { animation: vt-in .24s cubic-bezier(.2, .8, .2, 1) both; }

  /* Голос: звезда подпрыгивает, число прокручивается вверх или вниз */
  .vote.just-voted .score { animation: score-up .26s cubic-bezier(.2, .8, .2, 1); }
  .vote.just-voted.roll-down .score { animation-name: score-down; }
  .vote.just-voted .down[aria-pressed="true"] svg { animation: down-nudge .3s ease-out; }
  @keyframes score-up { from { transform: translateY(70%); opacity: 0; } }
  @keyframes score-down { from { transform: translateY(-70%); opacity: 0; } }
  @keyframes down-nudge { 0% { transform: translateY(-4px); } 60% { transform: translateY(2px); } 100% { transform: none; } }

  /* Бесконечная лента: новые посты мягко проявляются */
  .feed > * { transition: opacity .3s ease, transform .3s cubic-bezier(.2, .8, .2, 1), border-color .15s; }
  .feed > .htmx-added { opacity: 0; transform: translateY(10px); }

  /* Меню, подсказки, поддержка и окна появляются плавно */
  .user-menu[open] .dropdown, .picker-list:not([hidden]), .help-pop:not([hidden]), dialog.modal[open] {
    animation: pop-in .15s ease-out;
  }
  @keyframes pop-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } }

  .btn:active:not(:disabled) { transform: translateY(1px); }
}

/* --- галочка и знак основателя ---------------------------------------------------- */

/* Галочка справа от ника — подтверждённые авторы, СМИ и известные люди */
.vbadge { display: inline-flex; align-items: center; vertical-align: -0.15em; margin-left: 3px; flex-shrink: 0; }
.vbadge svg { display: block; vertical-align: baseline; }
.vbadge .vb-bg { fill: var(--viz-1); stroke: var(--viz-1); stroke-width: 1.2; stroke-linejoin: round; }
.vbadge .vb-check { fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

/* Основатели: красное кольцо вокруг аватарки */
.avatar-wrap { position: relative; display: inline-grid; flex-shrink: 0; border-radius: 50%; vertical-align: middle; }
.avatar-wrap.founder > .avatar { outline: 2px solid var(--flag); outline-offset: 2px; }
.avatar-wrap.founder.sm > .avatar { outline-width: 1.5px; outline-offset: 1.5px; }
/* Галочка на аватарке — справа снизу */
.avatar-wrap .avatar-check {
  position: absolute; right: -8%; bottom: -8%; width: clamp(12px, 36%, 30px); height: clamp(12px, 36%, 30px);
  filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .35)); pointer-events: none;
}
.avatar-wrap .avatar-check .vb-bg { fill: var(--viz-1); stroke: #fff; stroke-width: 2.2; stroke-linejoin: round; paint-order: stroke fill; }
.avatar-wrap .avatar-check .vb-check { fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

/* страница галочки */
.vf-hero { display: flex; gap: 22px; align-items: center; padding: 26px; margin-bottom: 16px; flex-wrap: wrap; }
.vf-hero h1 { font-size: 1.9rem; margin-bottom: .3em; }
.vf-hero > div { flex: 1; min-width: 240px; }
.vf-hero-badge { margin: 0; }
.vf-mine { display: flex; align-items: center; gap: 6px; margin: 12px 0 0; }
.vf-split { margin-bottom: 8px; }
.vf-h { font-size: 1.2rem; margin: 22px 0 10px; }
.vf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.vf-grid h3 { margin-bottom: 8px; }
.vf-list { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.vf-thresholds { width: 100%; border-collapse: collapse; font-size: .9rem; }
.vf-thresholds td { padding: 4px 0; border-bottom: 1px solid var(--seam); }
.vf-thresholds .num { text-align: right; font-weight: 700; white-space: nowrap; }
.vf-step { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 8px;
  background: var(--viz-1); color: #fff; font-family: var(--font-poster); font-size: .9rem; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; }
.checklist .mark { width: 22px; height: 22px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; color: var(--ash-2); }
.checklist .mark svg { width: 14px; height: 14px; }
.checklist li.ok .mark { background: var(--ok-bg); color: var(--ok-text); border: 1px solid var(--ok-border); }
.checklist li.no .mark { background: var(--danger-bg); color: var(--danger-text); border: 1px solid var(--danger-border); }
.vf-warn { margin-top: 16px; border-color: var(--note-border); background: var(--note-bg); font-size: .92rem; }
.vf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 560px) { .vf-row { grid-template-columns: 1fr; } }
.code-box { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: var(--r-md);
  background: var(--field); border: 1px dashed var(--seam-2); }
.code-box .code { font-size: 1.35rem; font-weight: 800; letter-spacing: .06em; color: var(--text-strong); }
.verified-line { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; color: var(--ash); margin: 2px 0 6px; }
.verified-line a { color: var(--link); }
.profile-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
@media (max-width: 560px) { .profile-actions { flex-direction: row; flex-wrap: wrap; width: 100%; } }
.ok-text { color: var(--ok-text); }
.danger-text { color: var(--danger-text); }
.vf-req { margin-bottom: 10px; }
.vf-req-head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.vf-dl { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 6px 12px; margin: 0 0 10px; }
.vf-dl dt { color: var(--ash-2); font-size: .86rem; }
.vf-dl dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) { .vf-dl { grid-template-columns: 1fr; } .vf-dl dd { margin-bottom: 6px; } }
.vf-code { font-size: 1.05rem; font-weight: 800; letter-spacing: .05em; }
.vf-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-start; }
.vf-approve { display: flex; gap: 8px; flex-wrap: wrap; }
.vf-approve .input, .vf-reject .input { height: 32px; padding: 4px 12px; }
.vf-approve .input { width: 220px; }
.vf-reject summary { list-style: none; }
.vf-reject summary::-webkit-details-marker { display: none; }
.vf-reject[open] form { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.vf-reject .input { min-width: 260px; }

/* Галочка на аватарке — справа снизу. Если человек ещё и основатель, звезда уходит вправо вверх,
   чтобы значки не налезали друг на друга. */
.avatar-wrap .avatar-check {
  position: absolute; right: -12%; bottom: -10%; width: clamp(12px, 38%, 32px); height: clamp(12px, 38%, 32px);
  pointer-events: none; filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, .35));
}
.avatar-check .vb-bg { fill: var(--viz-1); stroke: var(--panel); stroke-width: 2.4; stroke-linejoin: round; paint-order: stroke fill; }
.avatar-check .vb-check { fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
/* Где ник без аватарки (лента, шапка поста), галочка остаётся у ника — с отступом от ушанки Premium */
.author-link .vbadge { margin-left: 2px; }
.author-link .vbadge + .pbadge { margin-left: 3px; }

/* Бот уведомлений: пункт меню и приглашение на странице уведомлений */
.side-nav .nav-form { display: contents; }
.side-nav .nav-btn.nav-tg svg { color: #229ed9; }
.tg-promo { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 14px; flex-wrap: wrap;
  border-color: rgba(34, 158, 217, .45); }
.tg-promo-text { flex: 1; min-width: 200px; display: grid; gap: 2px; }
.tg-note { display: flex; align-items: center; gap: 6px; margin: 0 0 12px; }
.tg-note svg { color: #229ed9; }
.news-bot.with-sep { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--seam); }

/* --- Привилегии галочки: кнопки площадок, официальное сообщество, двойники ----------------- */
.profile-links { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 8px; }
.social-chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px 0 10px;
  border-radius: var(--r-pill); border: 1px solid var(--seam-2); background: var(--panel-2); color: var(--text);
  font-size: .84rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.social-chip:hover { border-color: var(--ash-2); background: var(--hover-wash); }
.social-chip:focus-visible { outline: 2px solid var(--viz-1); outline-offset: 2px; }
.social-chip svg { width: 16px; height: 16px; flex-shrink: 0; }
.official-chip { border-color: color-mix(in srgb, var(--viz-1) 55%, var(--seam-2)); }
.chip-note { color: var(--ash-2); font-weight: 500; font-size: .78rem; }
.official-line { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-size: .86rem; font-weight: 600; color: var(--text-2); text-decoration: none; }
.official-line .vbadge { margin-left: 0; }
.official-line:hover { color: var(--text-strong); text-decoration: underline; }
.official-mark .vbadge { margin-left: 0; }
.settings-sub { font-size: 1rem; margin: 18px 0 6px; }
.links-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
@media (max-width: 560px) { .links-grid { grid-template-columns: 1fr; } }
.link-field { display: grid; gap: 4px; }
.link-field-name { font-size: .82rem; font-weight: 600; color: var(--ash); }
.link-field input { width: 100%; height: 38px; padding: 0 12px; border-radius: var(--r-md); border: 1px solid var(--seam-2);
  background: var(--field); color: var(--text); font: inherit; font-size: .9rem; }
.link-field input:focus { outline: 2px solid var(--viz-1); outline-offset: 1px; }
.lookalikes { margin: 4px 0 10px; padding: 10px 12px; border-radius: var(--r-md); background: var(--note-bg); border: 1px solid var(--note-border); }
.lookalikes ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 3px; }
/* Подарок Premium в панели: число + часы/дни/месяцы */
.premium-term { display: inline-flex; gap: 6px; }
.premium-term .input { height: 32px; padding-top: 0; padding-bottom: 0; }
.premium-term input { width: 84px; }
.premium-term select { width: auto; }

/* --- Маскот в ушанке: позы и анимации ------------------------------------------------------
   {% mascot "поза" высота %} → .mfig.mfig-<поза>. Анимации — только если человек не просил «меньше движения». */
.mfig { display: inline-block; position: relative; isolation: isolate; line-height: 0; flex-shrink: 0; }
.mfig > img { display: block; height: var(--mh); width: auto; max-width: none; user-select: none; -webkit-user-drag: none;
  transform-origin: 50% 100%; }
/* мягкая тень «на полу» — маскот не висит в воздухе */
.mfig::after { content: ""; position: absolute; left: 16%; right: 16%; bottom: -4px; height: 9px; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .38), transparent); }
.mfig-peek::after, .nav-runner .mfig::after { display: none; }
.empty .mfig { display: block; width: max-content; margin: 0 auto 14px; }
.empty .mfig + p { margin-top: 0; }
.auth-card .mfig-auth { display: block; width: max-content; margin: -6px auto 10px; }
.comments-empty { display: flex; align-items: flex-end; gap: 12px; margin-top: 14px; }
.comments-empty p { margin: 0 0 12px; }
.mfig-peeker { overflow: hidden; padding-right: 4px; }

/* Бегун на полосе загрузки: появляется, только если страница грузится дольше полсекунды */
.nav-runner { position: fixed; top: 4px; left: 0; z-index: 2001; pointer-events: none; opacity: 0; transform: translateX(-50%) scaleX(-1);
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .45)); }
.nav-progress.run + .nav-runner { opacity: 1; left: 85%; transition: left 3s cubic-bezier(.08, .7, .2, 1), opacity .2s ease .5s; }
.nav-progress.done + .nav-runner { left: 100%; opacity: 0; transition: left .18s ease-out, opacity .15s ease; }

@media (prefers-reduced-motion: no-preference) {
  .mfig > img { animation: mfig-bob 3.6s ease-in-out infinite; }
  .mfig::after { animation: mfig-shadow 3.6s ease-in-out infinite; }
  .mfig-sit > img, .mfig-back > img { animation: mfig-sway 4.6s ease-in-out infinite; }
  .mfig-laugh > img { animation: mfig-giggle 1.8s ease-in-out infinite; }
  .mfig-sit::after, .mfig-back::after, .mfig-laugh::after { animation: none; }
  .mfig-pop > img { animation: mfig-pop .7s cubic-bezier(.34, 1.56, .64, 1) both, mfig-bob 3.6s ease-in-out .7s infinite; }
  .mfig-peeker > img { animation: mfig-peek-in .9s cubic-bezier(.2, .8, .2, 1) .25s both; }
  .mfig-run > img, .nav-runner .mfig > img { animation: mfig-run .34s ease-in-out infinite alternate; }
  .mfig:hover > img { animation: mfig-wiggle .55s ease-in-out; }
}
@media (prefers-reduced-motion: reduce) { .nav-runner { display: none; } }
@keyframes mfig-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes mfig-shadow { 0%, 100% { transform: scaleX(1); opacity: 1; } 50% { transform: scaleX(.84); opacity: .65; } }
@keyframes mfig-sway { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }
@keyframes mfig-giggle {
  0%, 100% { transform: rotate(0) translateY(0); } 15% { transform: rotate(-3deg) translateY(-3px); }
  30% { transform: rotate(3deg) translateY(0); } 45% { transform: rotate(-2deg) translateY(-2px); } 60% { transform: rotate(1deg) translateY(0); }
}
@keyframes mfig-pop { 0% { transform: translateY(16px) scale(.6); opacity: 0; } 70% { transform: translateY(-4px) scale(1.04); opacity: 1; } 100% { transform: none; } }
@keyframes mfig-peek-in { from { transform: translateX(-104%); } to { transform: none; } }
@keyframes mfig-run { from { transform: translateY(0) rotate(-5deg); } to { transform: translateY(-4px) rotate(4deg); } }
@keyframes mfig-wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-7deg); } 50% { transform: rotate(6deg); } 75% { transform: rotate(-3deg); } }

/* Страница «Реквизиты»: подпись слева, значение справа; на телефоне — друг под другом */
.requisites { display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; margin: 14px 0 22px; }
.requisites dt { color: var(--ash-2); }
.requisites dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 520px) { .requisites { grid-template-columns: 1fr; gap: 2px; } .requisites dd { margin-bottom: 10px; } }

/* Подпись под комментариями — как на форумах: отделена чертой, картинка не выше 120px */
.signature { margin: 8px 0 2px; padding-top: 8px; border-top: 1px dashed var(--seam); max-width: 480px; }
.signature img { display: block; max-width: 100%; height: auto; max-height: 120px; border-radius: 6px; }
.signature-text { font-size: .8rem; color: var(--ash-2); margin-top: 4px; overflow-wrap: anywhere; }
.profile-head .signature { border-top: 0; padding-top: 0; }
.signature-preview { margin-bottom: 14px; }

/* Стена профиля */
.wall-list { display: grid; gap: 4px; margin-top: 12px; }
.wall-item { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--seam); }
.wall-item:first-child { border-top: 0; }
.wall-item .wall-main { flex: 1; min-width: 0; }
.wall-item .c-head { padding-top: 0; flex-wrap: wrap; }
.wall-item.fresh { animation: fresh 1.6s ease-out; }
.wall-removed { display: block; font-size: .86rem; }
.wall-item ~ .wall-empty { display: none; }
.tab-count { font-size: .76rem; color: var(--ash-2); font-weight: 600; margin-left: 2px; }

/* Регистрация: плашка «Premium новичкам» */
.welcome-gift { display: flex; align-items: center; gap: 8px; margin: -4px 0 16px; padding: 10px 12px; border-radius: var(--r-md);
  background: var(--flag-wash); border: 1px solid var(--flag); color: var(--text); font-size: .86rem; font-weight: 600; }
.welcome-gift img { flex-shrink: 0; }
