/* Шрифт Onest (локально) */
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/onest-400-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/onest-400-latin.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-face { font-family: 'Onest'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/onest-500-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/onest-500-latin.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-face { font-family: 'Onest'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/onest-600-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/onest-600-latin.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-face { font-family: 'Onest'; font-style: normal; font-weight: 700 800; font-display: swap; src: url('/fonts/onest-700-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 700 800; font-display: swap; src: url('/fonts/onest-700-latin.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; }

:root {
  --bg: #0c0c0e;
  --surface: #131316;
  --surface-2: #19191d;
  --surface-3: #202026;
  --border: #25252c;
  --border-2: #31313a;
  --text: #ededf2;
  --text-2: #b9b9c4;
  --muted: #7e7e8b;
  --accent: #ffb21e;
  --accent-2: #ff8a1e;
  --accent-ink: #1b1300;
  --ok: #4ade80;
  --bad: #f87171;
  --warn: #fbbf24;
  --info: #60a5fa;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 40px rgba(0, 0, 0, .45);

  --c-red: #f87171;
  --c-orange: #fb923c;
  --c-amber: #fbbf24;
  --c-green: #4ade80;
  --c-teal: #2dd4bf;
  --c-blue: #60a5fa;
  --c-violet: #a78bfa;
  --c-pink: #f472b6;

  --r-admin: #ff4545;
  --r-developer: #a78bfa;
  --r-moderator: #60a5fa;
  --r-helper: #4ade80;
  --r-user: #b9b9c4;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body::before {
  content: '';
  position: fixed;
  inset: 0 0 auto 0;
  height: 520px;
  background:
    radial-gradient(600px 300px at 15% -10%, rgba(255, 178, 30, .10), transparent 70%),
    radial-gradient(500px 260px at 90% -20%, rgba(255, 69, 69, .08), transparent 70%);
  pointer-events: none;
  z-index: -1;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
svg.i-sm { width: 14px; height: 14px; vertical-align: -2px; }

/* ───────── Шапка ───────── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(12, 12, 14, .82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar-in { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: -.01em; flex: none; white-space: nowrap; }
.brand:hover { color: var(--text); }
.brand img { object-fit: contain; }
.mainnav { display: flex; gap: 4px; }
.mainnav a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 10px; color: var(--text-2); font-weight: 500;
}
.mainnav a:hover { background: var(--surface-2); color: var(--text); }
.mainnav a.active { color: var(--text); background: var(--surface-2); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px; border-radius: 10px; border: 1px solid var(--border-2);
  background: var(--surface-2); color: var(--text); font-weight: 600; cursor: pointer;
  transition: background .15s, border-color .15s, transform .05s;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-3); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: linear-gradient(180deg, var(--accent), var(--accent-2)); color: var(--accent-ink); border-color: transparent; }
.btn-primary:hover { background: linear-gradient(180deg, #ffc04a, #ff9a3a); color: var(--accent-ink); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-ok { background: rgba(74, 222, 128, .12); border-color: rgba(74, 222, 128, .35); color: var(--ok); }
.btn-ok:hover { background: rgba(74, 222, 128, .2); color: var(--ok); }
.btn-bad { background: rgba(248, 113, 113, .12); border-color: rgba(248, 113, 113, .35); color: var(--bad); }
.btn-bad:hover { background: rgba(248, 113, 113, .2); color: var(--bad); }
.btn-sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn-icon { padding: 8px; }

.userchip {
  display: inline-flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px;
  border-radius: 12px; border: 1px solid var(--border); background: var(--surface); cursor: pointer;
}
.userchip:hover { border-color: var(--border-2); }
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px;
  background: var(--surface-2); border: 1px solid var(--border-2); border-radius: 12px;
  padding: 6px; box-shadow: var(--shadow); display: none; z-index: 60;
}
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a, .dropdown-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 8px;
  background: none; border: 0; text-align: left; color: var(--text-2); cursor: pointer;
}
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--surface-3); color: var(--text); }
.dropdown-sep { height: 1px; background: var(--border); margin: 6px 4px; }

/* ───────── Аватар / роли / уровни ───────── */
.ava {
  --s: 36px;
  width: var(--s); height: var(--s); border-radius: calc(var(--s) * .26); flex: none;
  display: inline-grid; place-items: center; overflow: hidden; position: relative;
  font-weight: 800; font-size: calc(var(--s) * .42); color: #fff;
  image-rendering: pixelated;
}
.ava img { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.uname { font-weight: 700; }
.uname.r-admin { color: var(--r-admin); }
.uname.r-developer { color: var(--r-developer); }
.uname.r-moderator { color: var(--r-moderator); }
.uname.r-helper { color: var(--r-helper); }
.uname.banned { text-decoration: line-through; opacity: .6; }

.role {
  --c: var(--r-user);
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 30%, transparent);
  white-space: nowrap;
}
.role-admin { --c: var(--r-admin); }
.role-developer { --c: var(--r-developer); }
.role-moderator { --c: var(--r-moderator); }
.role-helper { --c: var(--r-helper); }
.role-banned { --c: #9ca3af; }

/* Уровни: цвет меняется каждые 10 уровней, 100 — красный (админы) */
.lvl {
  --c: #9ca3af;
  display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px 1px 6px; border-radius: 999px;
  font-size: 11px; font-weight: 800; line-height: 18px; white-space: nowrap;
  color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
  font-variant-numeric: tabular-nums;
}
.lvl::before { content: 'LVL'; font-size: 9px; letter-spacing: .06em; opacity: .75; }
.lvl-t0 { --c: #9ca3af; }
.lvl-t1 { --c: #4ade80; }
.lvl-t2 { --c: #2dd4bf; }
.lvl-t3 { --c: #60a5fa; }
.lvl-t4 { --c: #a78bfa; }
.lvl-t5 { --c: #f472b6; }
.lvl-t6 { --c: #facc15; }
.lvl-t7 { --c: #fb923c; }
.lvl-t8 { --c: #22d3ee; box-shadow: 0 0 10px color-mix(in srgb, var(--c) 35%, transparent); }
.lvl-t9 {
  --c: #ffd54a;
  color: #2a1b00; border-color: #ffe08a;
  background: linear-gradient(90deg, #ffcf3a, #fff1a8, #ffb21e, #ffcf3a);
  background-size: 300% 100%; animation: shine 4s linear infinite;
  box-shadow: 0 0 12px rgba(255, 207, 58, .35);
}
.lvl-t10 {
  --c: #ff3b3b;
  color: #fff; border-color: #ff7a7a;
  background: linear-gradient(90deg, #b30000, #ff2d2d, #ff6a3d, #ff2d2d, #b30000);
  background-size: 300% 100%;
  animation: shine 3s linear infinite, glow 2s ease-in-out infinite;
  text-shadow: 0 0 6px rgba(255, 255, 255, .5);
}
.lvl-t10::before { content: '♛'; font-size: 11px; opacity: 1; }
.lvl-lg { font-size: 15px; line-height: 26px; padding: 2px 12px 2px 10px; }
.lvl-lg::before { font-size: 11px; }
.lvl-lg.lvl-t10::before { font-size: 15px; }
@keyframes shine { to { background-position: 300% 0; } }
@keyframes glow {
  0%, 100% { box-shadow: 0 0 8px rgba(255, 45, 45, .45); }
  50% { box-shadow: 0 0 18px rgba(255, 45, 45, .85); }
}

/* ───────── Иконки разделов ───────── */
.ficon {
  --c: var(--c-amber);
  width: 42px; height: 42px; border-radius: 12px; flex: none; display: grid; place-items: center;
  color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 28%, transparent);
  font-size: 20px;
}
.ficon svg.i { width: 20px; height: 20px; }
.ficon-lg { width: 56px; height: 56px; border-radius: 16px; font-size: 26px; }
.ficon-lg svg.i { width: 26px; height: 26px; }
.col-red { --c: var(--c-red); } .col-orange { --c: var(--c-orange); } .col-amber { --c: var(--c-amber); }
.col-green { --c: var(--c-green); } .col-teal { --c: var(--c-teal); } .col-blue { --c: var(--c-blue); }
.col-violet { --c: var(--c-violet); } .col-pink { --c: var(--c-pink); }

/* ───────── Главная ───────── */
.hero { padding: 26px 0 22px; }
/* Баннер-карточка: рендер стоит на нижнем крае карточки, поэтому обрез картинки не виден */
.hero-card {
  position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 470px); gap: 20px;
  padding: 40px 44px 0; border-radius: 22px; border: 1px solid var(--border);
  background:
    radial-gradient(520px 320px at 82% 100%, rgba(255, 178, 30, .22), transparent 70%),
    radial-gradient(600px 300px at 0% 0%, rgba(255, 69, 69, .10), transparent 70%),
    linear-gradient(160deg, #18181c, #111114 70%);
}
.hero-card::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05); pointer-events: none; }
.hero-text { padding-bottom: 40px; align-self: center; }
.hero-art { align-self: end; display: flex; align-items: flex-end; justify-content: flex-end; }
.hero-art img { display: block; width: 100%; height: auto; filter: drop-shadow(0 -10px 40px rgba(0, 0, 0, .45)); }
.online-txt { color: var(--ok); font-weight: 600; font-size: 12px; }
.offline-txt { color: var(--muted); font-weight: 600; font-size: 12px; }

.ip-pill {
  display: inline-flex; align-items: center; gap: 12px; padding: 6px 6px 6px 14px; border-radius: 12px;
  background: rgba(12, 12, 14, .6); border: 1px solid var(--border-2); margin-bottom: 18px; max-width: 100%;
}
.ip-pill .ip { font-weight: 700; letter-spacing: .01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ip-pill .srv { font-size: 12px; color: var(--muted); white-space: nowrap; padding-left: 12px; border-left: 1px solid var(--border-2); }

.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 0 0 26px; }
.qcard {
  --c: var(--accent);
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 150px; padding: 18px; border-radius: var(--radius); border: 1px solid var(--border);
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 16%, var(--surface)), var(--surface) 65%);
  transition: transform .2s, border-color .2s;
}
.qcard:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c) 45%, transparent); color: var(--text); }
.qcard img {
  position: absolute; right: 0; bottom: 0; height: 100%; width: 46%; object-fit: contain; object-position: right bottom;
  transform-origin: right bottom; transition: transform .3s; pointer-events: none;
}
.qcard:hover img { transform: scale(1.04); }
.qcard b { position: relative; font-size: 17px; max-width: 54%; line-height: 1.25; }
.qcard span { position: relative; color: var(--text-2); font-size: 13px; margin-top: 4px; max-width: 54%; }
.qcard .go { position: relative; margin-top: 12px; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--c); }
.hero-date { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; font-weight: 700; color: var(--muted); }
.hero h1 { font-size: clamp(28px, 4.4vw, 46px); line-height: 1.1; margin: 10px 0 12px; letter-spacing: -.02em; font-weight: 800; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--accent), #ff5a3d); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--text-2); font-size: 16px; margin: 0 0 22px; max-width: 620px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.stats-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 26px 0 0; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.stat b { display: block; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 13px; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; padding-bottom: 40px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 8px 0 14px; }
.section-head h2 { font-size: 20px; margin: 0; letter-spacing: -.01em; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.cat { margin-bottom: 16px; overflow: hidden; }
.cat-head {
  display: grid; grid-template-columns: minmax(0, 1fr) 80px 170px; gap: 12px; align-items: center;
  padding: 12px 18px; border-bottom: 1px solid var(--border); background: var(--surface-2);
}
.cat-head h3 { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cat-head h3 small { font-weight: 500; color: var(--muted); font-size: 12px; }
.cat-head .colh { font-size: 11px; color: var(--muted); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.forum-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 80px 170px; gap: 12px; align-items: center;
  padding: 14px 18px; border-bottom: 1px solid var(--border); transition: background .15s;
}
.forum-row:last-child { border-bottom: 0; }
.forum-row:hover { background: var(--surface-2); }
.forum-main { display: flex; gap: 14px; align-items: center; min-width: 0; }
.forum-title { font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.forum-title .i { color: var(--muted); }
.forum-desc { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.forum-count { font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; }
.forum-last { font-size: 13px; color: var(--muted); min-width: 0; }
.forum-last a { color: var(--text-2); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); margin-right: 6px; vertical-align: 1px; }
.pending-pill {
  font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px;
  background: rgba(251, 191, 36, .14); color: var(--warn); border: 1px solid rgba(251, 191, 36, .3);
}

.side .card { padding: 16px; margin-bottom: 16px; }
.side h4 { margin: 0 0 12px; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.side h4 .i { color: var(--accent); }
.staff-list { display: flex; flex-direction: column; gap: 10px; }
.staff-item { display: flex; align-items: center; gap: 10px; min-width: 0; }
.staff-item > div { min-width: 0; }
.staff-item .meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 2px; }
.online-list { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 14px; }
.recent-item { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); }
.recent-item:first-of-type { border-top: 0; padding-top: 0; }
.recent-item .t { font-weight: 600; font-size: 14px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-item > div { min-width: 0; }
.kv { display: flex; justify-content: space-between; padding: 5px 0; font-size: 14px; color: var(--text-2); }
.kv b { color: var(--text); }

/* ───────── Хлебные крошки / заголовки страниц ───────── */
.crumbs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--muted); padding: 22px 0 14px; }
.crumbs a:hover { color: var(--accent); }
.crumbs .sep { opacity: .5; }
.page-head { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 26px; letter-spacing: -.01em; line-height: 1.2; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.page-head .grow { flex: 1; min-width: 220px; }
.private-note { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }

.notes { padding: 16px 18px; margin-bottom: 16px; border-left: 3px solid var(--accent); }
.notes summary { cursor: pointer; font-weight: 700; display: flex; align-items: center; gap: 8px; list-style: none; }
.notes summary::-webkit-details-marker { display: none; }
.notes summary .i { color: var(--accent); }
.notes .content { margin-top: 12px; }

.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 4px; }
.tabs button, .tabs a {
  background: none; border: 0; padding: 7px 12px; border-radius: 8px; color: var(--text-2); cursor: pointer; font-weight: 600; font-size: 13px;
}
.tabs .active { background: var(--surface-3); color: var(--text); }

.threads { overflow: hidden; }
.thread-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 90px 170px; gap: 12px; align-items: center;
  padding: 13px 18px; border-bottom: 1px solid var(--border);
}
.thread-row:last-child { border-bottom: 0; }
.thread-row:hover { background: var(--surface-2); }
.thread-main { display: flex; gap: 12px; align-items: center; min-width: 0; }
.thread-main > div { min-width: 0; }
.thread-title { font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.thread-title .i { color: var(--accent); }
.thread-meta { font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.thread-stats { font-size: 13px; color: var(--muted); text-align: right; }
.thread-stats b { color: var(--text); }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty .i { width: 34px; height: 34px; margin-bottom: 8px; opacity: .6; }

.status {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 700; white-space: nowrap;
}
.status-pending { color: var(--warn); background: rgba(251, 191, 36, .12); border: 1px solid rgba(251, 191, 36, .3); }
.status-approved { color: var(--ok); background: rgba(74, 222, 128, .12); border: 1px solid rgba(74, 222, 128, .3); }
.status-rejected { color: var(--bad); background: rgba(248, 113, 113, .12); border: 1px solid rgba(248, 113, 113, .3); }

.pager { display: flex; gap: 6px; justify-content: center; margin: 16px 0; flex-wrap: wrap; }
.pager a { min-width: 36px; text-align: center; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); }
.pager a.active { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 700; }

/* ───────── Тема ───────── */
.post { display: grid; grid-template-columns: 190px minmax(0, 1fr); margin-bottom: 14px; overflow: hidden; }
.post-author {
  padding: 20px 16px; background: var(--surface-2); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;
}
.post-author .ava { --s: 84px; }
.post-author .utitle { font-size: 12px; color: var(--muted); }
.post-body { padding: 18px 22px; min-width: 0; display: flex; flex-direction: column; }
.post-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.post-content { overflow-wrap: anywhere; color: var(--text); }
.post-actions { margin-top: auto; padding-top: 12px; display: flex; gap: 6px; justify-content: flex-end; }

.formview { display: grid; gap: 2px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); margin-bottom: 14px; }
.formview .row { display: grid; grid-template-columns: minmax(180px, 38%) minmax(0, 1fr); background: var(--surface-2); }
.formview .row > div { padding: 11px 14px; }
.formview .q { color: var(--muted); font-size: 13px; font-weight: 600; border-right: 1px solid var(--border); }
.formview .a { overflow-wrap: anywhere; white-space: pre-wrap; }

.verdict { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; margin-bottom: 14px; border-radius: var(--radius); border: 1px solid; }
.verdict .i { width: 24px; height: 24px; margin-top: 2px; }
.verdict h3 { margin: 0 0 4px; font-size: 16px; }
.verdict p { margin: 4px 0 0; white-space: pre-wrap; }
.verdict-approved { background: rgba(74, 222, 128, .07); border-color: rgba(74, 222, 128, .3); color: var(--ok); }
.verdict-rejected { background: rgba(248, 113, 113, .07); border-color: rgba(248, 113, 113, .3); color: var(--bad); }
.verdict-pending { background: rgba(251, 191, 36, .06); border-color: rgba(251, 191, 36, .25); color: var(--warn); }
.verdict .who { color: var(--text-2); font-size: 13px; }
.verdict p { color: var(--text); }

.review-box { padding: 18px; margin-bottom: 14px; border-color: rgba(255, 178, 30, .35); }
.review-box h3 { margin: 0 0 10px; font-size: 15px; display: flex; gap: 8px; align-items: center; }
.review-box h3 .i { color: var(--accent); }
.review-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

.syspost { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; margin-bottom: 14px; border-radius: 12px; background: var(--surface); border: 1px dashed var(--border-2); font-size: 14px; color: var(--text-2); }
.syspost .body { white-space: pre-wrap; }
.syspost .i { color: var(--accent); margin-top: 2px; }

.reply-box { padding: 18px; margin-top: 8px; }
.locked-note { display: flex; align-items: center; gap: 8px; padding: 14px 18px; color: var(--muted); }

/* Текст постов */
.md p { margin: 0 0 10px; }
.md blockquote { margin: 8px 0; padding: 8px 14px; border-left: 3px solid var(--border-2); background: var(--surface-2); border-radius: 0 8px 8px 0; color: var(--text-2); }
.md a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.md h3 { font-size: 18px; margin: 22px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border); color: var(--accent); }
.md h3:first-child { margin-top: 0; }
.md h4 { font-size: 15px; margin: 18px 0 6px; }
.md .rn { font-weight: 800; color: var(--accent); }
.md .penalty { display: inline-block; margin: 2px 0 6px; padding: 2px 10px; border-radius: 8px; font-size: 13px; font-weight: 600; color: #fca5a5; background: rgba(248, 113, 113, .1); border: 1px solid rgba(248, 113, 113, .25); }
.md .spoiler { background: var(--surface-3); color: transparent; border-radius: 4px; padding: 0 4px; cursor: pointer; transition: color .2s; }
.md .spoiler.open { color: inherit; }
.md .post-img { display: block; margin: 8px 0; }
.md .post-img img { display: block; max-width: min(100%, 640px); max-height: 480px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); }

/* Панель «прикрепить картинку» над полями ввода */
.rich-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.rich-bar .hint { font-size: 12px; color: var(--muted); }
.rich-bar input[type=file] { display: none; }
.rich-thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.rich-thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border-2); }
textarea.input.drag { border-color: var(--accent); background: rgba(255, 178, 30, .04); }

/* ───────── Формы ───────── */
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.field > span .req { color: var(--bad); margin-left: 3px; }
.field small { display: block; color: var(--muted); margin-top: 4px; font-size: 12px; }
.input, textarea.input, select.input {
  width: 100%; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--border-2);
  background: var(--bg); color: var(--text); outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea.input { min-height: 110px; resize: vertical; line-height: 1.5; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 178, 30, .15); }
.input-sm { padding: 6px 9px; font-size: 13px; border-radius: 8px; }
.form-card { padding: 24px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); cursor: pointer; font-size: 14px; }
.check input { accent-color: var(--accent); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 16px; }
.error-msg { color: var(--bad); font-size: 14px; margin: 0 0 12px; }

.auth { max-width: 420px; margin: 50px auto; }
.auth h1 { margin: 0 0 6px; font-size: 24px; }
.auth .sub { margin: 0 0 20px; color: var(--muted); }
.auth .switch { text-align: center; margin-top: 16px; color: var(--muted); font-size: 14px; }
.auth .switch a { color: var(--accent); }

.banbar { display: flex; gap: 12px; align-items: center; padding: 12px 16px; margin: 16px 0 0; border-radius: 12px; background: rgba(248, 113, 113, .08); border: 1px solid rgba(248, 113, 113, .3); color: #fecaca; }

/* ───────── Профиль ───────── */
.profile-card { margin-bottom: 16px; overflow: hidden; }
.profile-banner {
  position: relative; height: 220px; background-size: cover; background-position: center;
  background-color: var(--surface-2);
}
.profile-banner.default {
  background-image:
    radial-gradient(500px 220px at 85% 120%, color-mix(in srgb, var(--rc, var(--accent)) 35%, transparent), transparent 70%),
    radial-gradient(400px 200px at 10% -20%, rgba(255, 178, 30, .18), transparent 70%),
    linear-gradient(160deg, #1b1b20, #121215);
}
.profile-banner .banner-btn { position: absolute; right: 14px; top: 14px; background: rgba(12, 12, 14, .7); backdrop-filter: blur(6px); }
.profile-head { padding: 0 26px 24px; display: flex; gap: 22px; align-items: flex-end; flex-wrap: wrap; position: relative; }
.profile-head .ava-wrap, .profile-head > .ava { margin-top: -56px; }
.profile-head .ava { --s: 112px; box-shadow: 0 0 0 5px var(--surface); }
.profile-head h1 { margin: 0; font-size: 28px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; position: relative; }
.profile-head .tags { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; position: relative; }
.profile-head .grow { flex: 1; min-width: 220px; position: relative; padding-top: 14px; }
.xpbar { height: 8px; background: var(--surface-3); border-radius: 999px; overflow: hidden; margin-top: 14px; max-width: 420px; }
.xpbar > div { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 999px; }
.profile-stats { display: flex; gap: 22px; position: relative; flex-wrap: wrap; }
.profile-stats div { text-align: center; }
.profile-stats b { display: block; font-size: 22px; }
.profile-stats span { color: var(--muted); font-size: 12px; }

.levels-legend { display: flex; flex-wrap: wrap; gap: 6px; }

/* ───────── Участники ───────── */
.members { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.member { display: flex; gap: 12px; align-items: center; padding: 14px; }
.member .ava { --s: 46px; }
.member > div { min-width: 0; }
.member .meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }

/* ───────── Админка ───────── */
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }
.cell-user { display: flex; gap: 10px; align-items: center; }
.actions-cell { display: flex; gap: 6px; flex-wrap: wrap; }
.struct-cat { margin-bottom: 14px; overflow: hidden; }
.struct-cat-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.struct-cat-head b { flex: 1; }
.struct-forum { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.struct-forum:last-child { border-bottom: 0; }
.struct-forum .grow { flex: 1; min-width: 200px; }
.tag { font-size: 11px; padding: 1px 7px; border-radius: 6px; background: var(--surface-3); color: var(--text-2); font-weight: 600; }

.fields-editor .frow { display: grid; grid-template-columns: minmax(0, 1fr) 150px auto auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.icon-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.icon-pick button { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border-2); background: var(--surface-2); color: var(--text-2); cursor: pointer; display: grid; place-items: center; }
.icon-pick button.active { border-color: var(--accent); color: var(--accent); background: rgba(255, 178, 30, .1); }
.color-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.color-pick button { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; background: var(--c); }
.color-pick button.active { border-color: #fff; }

/* ───────── Модалки / уведомления ───────── */
.modal-back { position: fixed; inset: 0; background: rgba(0, 0, 0, .65); backdrop-filter: blur(4px); z-index: 100; display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.modal { width: 100%; max-width: 560px; background: var(--surface); border: 1px solid var(--border-2); border-radius: 18px; box-shadow: var(--shadow); padding: 22px; max-height: calc(100vh - 32px); overflow-y: auto; }
.modal-wide { max-width: 820px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-head h2 { margin: 0; font-size: 19px; }
#toasts { position: fixed; right: 16px; bottom: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--surface-3); border: 1px solid var(--border-2); padding: 11px 16px; border-radius: 12px; box-shadow: var(--shadow); max-width: 340px; animation: tin .2s ease-out; }
.toast.err { border-color: rgba(248, 113, 113, .5); }
.toast.ok { border-color: rgba(74, 222, 128, .5); }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } }
.loading { padding: 80px 0; text-align: center; color: var(--muted); }

/* ───────── Подвал ───────── */
.footer { margin-top: auto; border-top: 1px solid var(--border); background: #0a0a0c; padding: 0 0 30px; }
.play {
  position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; align-items: center;
  margin: -1px 0 34px; padding: 28px 30px; border-radius: 0 0 22px 22px; border: 1px solid var(--border); border-top: 0;
  background: radial-gradient(500px 220px at 85% 100%, rgba(255, 178, 30, .16), transparent 70%), linear-gradient(180deg, var(--surface), #0f0f12);
}
.play h3 { margin: 0 0 6px; font-size: 24px; letter-spacing: -.01em; }
.play p { margin: 0 0 16px; color: var(--text-2); }
.play-steps { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.play-step { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; color: var(--text-2); }
.play-step b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--accent); color: var(--accent-ink); font-size: 12px; }
.play-art { position: relative; height: 100%; min-height: 180px; }
.play-art .mc { position: absolute; left: -10px; top: 50%; transform: translateY(-50%); width: 52%; image-rendering: pixelated; opacity: .9; border-radius: 6px; }
.play-art .hero3 { position: absolute; right: -70px; bottom: -28px; width: 74%; filter: drop-shadow(0 10px 30px rgba(0, 0, 0, .6)); }
.ip-big { display: inline-flex; align-items: stretch; border-radius: 12px; overflow: hidden; border: 1px solid var(--border-2); max-width: 100%; }
.ip-big code { font: 700 17px/1 'Onest', monospace; padding: 13px 16px; background: var(--bg); letter-spacing: .02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ip-big button { border: 0; border-radius: 0; }

.footer-in { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 24px 36px; }
.footer p { max-width: 360px; font-size: 14px; }
.footer-links { display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--text-2); }
.footer-links a { display: inline-flex; align-items: center; gap: 9px; }
.footer-links a img { width: 20px; height: 20px; border-radius: 5px; }
.footer-links .off { color: var(--muted); opacity: .6; display: inline-flex; align-items: center; gap: 9px; }
.footer-links .off img { width: 20px; height: 20px; border-radius: 5px; filter: grayscale(1); }
.footer-h { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; margin-bottom: 4px; }
.socials { display: flex; gap: 8px; margin-top: 14px; }
.socials a { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); transition: transform .15s, border-color .15s; }
.socials a:hover { transform: translateY(-2px); border-color: var(--border-2); }
.socials img { width: 22px; height: 22px; border-radius: 5px; }
.footer-copy { grid-column: 1 / -1; font-size: 12px; border-top: 1px solid var(--border); padding-top: 16px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* ───────── Аватар: загрузка ───────── */
.ava-edit { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.ava-edit .ava { --s: 120px; }
.drop {
  flex: 1; min-width: 220px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 22px; border: 2px dashed var(--border-2); border-radius: 14px; text-align: center; cursor: pointer; color: var(--text-2);
  transition: border-color .15s, background .15s;
}
.drop:hover, .drop.over { border-color: var(--accent); background: rgba(255, 178, 30, .05); }
.drop input { display: none; }
.ava-wrap { position: relative; display: inline-block; }
.ava-change {
  position: absolute; right: -6px; bottom: -6px; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); border: 3px solid var(--surface); cursor: pointer;
}
.ava-change svg.i { width: 16px; height: 16px; }

/* ───────── Вход / регистрация ───────── */
.auth-split { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 30px; align-items: center; max-width: 980px; margin: 40px auto; }
.auth-split .auth { margin: 0; max-width: none; }
.auth-art {
  align-self: stretch; display: flex; align-items: flex-end; overflow: hidden; border-radius: 22px; border: 1px solid var(--border);
  padding: 30px 30px 0; min-height: 380px;
  background: radial-gradient(420px 300px at 60% 100%, rgba(255, 178, 30, .22), transparent 70%), linear-gradient(160deg, #18181c, #111114);
}
.auth-art img { display: block; width: 100%; height: auto; }

.bottomnav { display: none; }

/* ───────── Адаптив ───────── */
@media (max-width: 1000px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .hero-card { grid-template-columns: minmax(0, 1fr) minmax(0, 320px); padding: 30px 28px 0; }
  .hero-text { padding-bottom: 30px; }
  .footer-in { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-in > :first-child { grid-column: 1 / -1; }
  .auth-split { grid-template-columns: minmax(0, 1fr); max-width: 440px; }
  .auth-art { display: none; }
}
@media (max-width: 900px) {
  .mainnav a { padding: 8px 10px; }
  .ip-pill .srv { display: none; }
}
@media (max-width: 860px) {
  .quick { grid-template-columns: minmax(0, 1fr); }
  .qcard { min-height: 120px; }
  .play { grid-template-columns: minmax(0, 1fr); padding: 22px 18px; }
  .play-art { display: none; }
}
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .mainnav { display: none; }
  .topbar-in { gap: 12px; }
  .userchip .uname-wrap { display: none; }
  .cat-head, .forum-row { grid-template-columns: minmax(0, 1fr) 50px; }
  .cat-head .colh-last, .forum-last { display: none; }
  .thread-row { grid-template-columns: minmax(0, 1fr); }
  .thread-stats { display: none; }
  .post { grid-template-columns: minmax(0, 1fr); }
  .post-author { flex-direction: row; text-align: left; border-right: 0; border-bottom: 1px solid var(--border); padding: 12px 14px; flex-wrap: wrap; align-items: center; }
  .post-author .ava { --s: 42px; }
  .post-body { padding: 14px 16px; }
  .formview .row { grid-template-columns: minmax(0, 1fr); }
  .formview .q { border-right: 0; padding-bottom: 0; }
  .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); }
  .fields-editor .frow { grid-template-columns: minmax(0, 1fr) auto; }
  .footer-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hero-card { grid-template-columns: minmax(0, 1fr); padding: 24px 18px 0; }
  .hero-text { padding-bottom: 0; }
  .hero-art { max-width: 300px; margin: 0 auto; }
  .ip-pill .srv { display: none; }
  body { padding-bottom: 68px; }
  .bottomnav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; height: 62px;
    background: rgba(12, 12, 14, .95); backdrop-filter: blur(12px); border-top: 1px solid var(--border);
  }
  .bottomnav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; color: var(--muted); font-weight: 600; border-top: 2px solid transparent; }
  .bottomnav a.active { color: var(--accent); border-top-color: var(--accent); }
  .bottomnav svg.i { width: 20px; height: 20px; }
  #toasts { bottom: 76px; }
}
