/* =========================================================
   FunCube Forum — основная тема
   Тёмная «ночная шахта»: графит, тёплый оранжевый факела,
   пиксельные иконки в ячейках инвентаря.
   ========================================================= */

:root {
  --bg: #0e0e10;
  --bg-2: #121215;
  --panel: #17171a;
  --panel-2: #1c1c20;
  --panel-3: #232328;
  --line: #29292f;
  --line-2: #34343c;
  --text: #ecebe7;
  --text-2: #b3b1ab;
  --muted: #7f7d77;

  --accent: #ff9a1f;
  --accent-2: #ffb24f;
  --accent-soft: rgba(255, 154, 31, .12);
  --accent-ink: #1d1203;

  --ok: #4ccf86;
  --no: #ff625a;
  --warn: #f3c443;
  --info: #5ec4ff;

  --cube-top: #ffb454;
  --cube-left: #e0701a;
  --cube-right: #a84a0c;
  --cube-face: #1b1410;

  --r: 6px;
  --r-sm: 4px;
  --wrap: 1240px;

  --font: 'Golos Text', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --display: 'Unbounded', 'Golos Text', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body::before {
  /* едва заметная пиксельная сетка сверху страницы */
  content: '';
  position: fixed;
  inset: 0 0 auto 0;
  height: 520px;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.028) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.028) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 100%);
}
img { max-width: 100%; }
a { color: var(--text); text-decoration: none; }
a:hover { color: var(--accent-2); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-inline: 20px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); }
.strong { font-weight: 600; }
.tnum { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.grow { flex: 1; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; z-index: 100; border-radius: var(--r-sm); }
.skip:focus { left: 8px; }

/* ---------- иконки ---------- */
.px-icon { display: block; flex: none; }
.ui-icon { display: block; flex: none; }

.slot {
  --ic: var(--accent);
  width: 46px; height: 46px;
  display: grid; place-items: center;
  flex: none;
  color: var(--ic);
  background: #141417;
  border-radius: 3px;
  box-shadow: inset 2px 2px 0 #09090a, inset -2px -2px 0 #2b2b31;
}
.slot-sm { width: 30px; height: 30px; box-shadow: inset 1.5px 1.5px 0 #09090a, inset -1.5px -1.5px 0 #2b2b31; }
.slot-news, .slot-star { --ic: #ffb24f; }
.slot-bug, .slot-sword, .slot-play { --ic: #ff7a66; }
.slot-book { --ic: #7fb4ff; }
.slot-shield { --ic: #4ccf86; }
.slot-link { --ic: #5ec4ff; }
.slot-gavel { --ic: #c39bff; }
.slot-scroll, .slot-coin { --ic: #f3c443; }
.slot-chat { --ic: #d6d3cc; }
.slot-palette { --ic: #ff8fc7; }
.slot-lock, .slot-pin { --ic: #9a9890; }
.slot-users { --ic: #5ec4ff; }

/* ---------- аватары ---------- */
.av {
  --s: 40px;
  position: relative;
  width: var(--s); height: var(--s);
  flex: none;
  display: inline-grid; place-items: center;
  border-radius: 4px;
  background: hsl(var(--h) 32% 26%);
  color: hsl(var(--h) 60% 82%);
  font: 600 calc(var(--s) * .42)/1 var(--display);
  image-rendering: pixelated;
}
.av b { font-weight: 600; }
.av img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; image-rendering: pixelated; }
.av-online {
  position: absolute; right: -3px; bottom: -3px;
  width: max(9px, calc(var(--s) * .2)); height: max(9px, calc(var(--s) * .2));
  background: var(--ok); border: 2px solid var(--panel); border-radius: 2px;
}

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px;
  border: 1px solid var(--line-2); border-radius: var(--r);
  background: var(--panel-2); color: var(--text);
  font-weight: 500; font-size: 14px; white-space: nowrap;
  cursor: pointer; transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { background: var(--panel-3); border-color: #45454e; color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn-accent {
  background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.18);
}
.btn-accent:hover { background: var(--accent-2); border-color: var(--accent-2); color: var(--accent-ink); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--panel-2); border-color: var(--line); }
.btn-ok { color: var(--ok); border-color: rgba(76,207,134,.35); background: rgba(76,207,134,.08); }
.btn-ok:hover { background: rgba(76,207,134,.16); border-color: rgba(76,207,134,.6); color: var(--ok); }
.btn-no { color: var(--no); border-color: rgba(255,98,90,.35); background: rgba(255,98,90,.07); }
.btn-no:hover { background: rgba(255,98,90,.15); border-color: rgba(255,98,90,.6); color: var(--no); }
.btn-sm { height: 30px; padding: 0 11px; font-size: 13px; gap: 6px; }
.btn-xs { height: 26px; padding: 0 9px; font-size: 12.5px; gap: 5px; border-radius: var(--r-sm); }
.btn-lg { height: 44px; padding: 0 20px; font-size: 15px; }
.btn-block { width: 100%; }
.icon-btn {
  width: 26px; height: 26px; display: grid; place-items: center;
  background: transparent; border: 1px solid var(--line); border-radius: var(--r-sm);
  color: var(--text-2); cursor: pointer;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-2); background: var(--panel-2); }

/* ---------- верхняя строка ---------- */
.topline { background: #0a0a0b; border-bottom: 1px solid #1d1d21; font-size: 13px; }
.topline-inner { display: flex; align-items: center; gap: 16px; height: 36px; }
.ip-pill {
  display: inline-flex; align-items: center; gap: 8px;
  height: 24px; padding: 0 10px 0 8px;
  background: #151518; border: 1px solid var(--line); border-radius: 4px;
  font: 500 12.5px/1 var(--mono); color: var(--text); cursor: pointer;
}
.ip-pill:hover { border-color: var(--accent); }
.ip-pill .ui-icon { color: var(--muted); }
.ip-online { color: var(--muted); font-family: var(--font); font-size: 12px; }
.srv-dot { width: 7px; height: 7px; border-radius: 1px; background: var(--muted); }
.srv-dot.is-on { background: var(--ok); box-shadow: 0 0 0 3px rgba(76,207,134,.18); }
.srv-dot.is-off { background: var(--no); }
.topline-ver { color: var(--muted); }
.topline-grow { flex: 1; }
.topline-links { display: flex; gap: 18px; }
.topline-links a { color: var(--text-2); }
.topline-links a:hover { color: var(--accent-2); }

/* ---------- шапка ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(14,14,16,.88);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand-logo {
  display: block; flex: none;
  width: var(--logo, 32px); height: var(--logo, 32px);
  border-radius: 26%;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .09), 0 2px 10px rgba(0, 0, 0, .4);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-name { font: 700 19px/1 var(--display); letter-spacing: -.01em; }
.main-nav { display: flex; align-items: stretch; gap: 4px; height: 100%; }
.main-nav a {
  position: relative; display: flex; align-items: center;
  padding: 0 12px; color: var(--text-2); font-weight: 500;
}
.main-nav a:hover { color: var(--text); }
.main-nav a.is-active { color: var(--text); }
.main-nav a.is-active::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--accent);
}
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.hsearch {
  display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px;
  width: 200px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  color: var(--muted); transition: width .2s, border-color .15s;
}
.hsearch:focus-within { width: 260px; border-color: var(--line-2); }
.hsearch input { border: 0; background: none; outline: none; width: 100%; font-size: 14px; color: var(--text); }
.hsearch input::-webkit-search-cancel-button { display: none; }
.hbtn { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: var(--r); font-weight: 500; font-size: 14px; }
.hbtn-ghost { color: var(--text-2); }
.hbtn-ghost:hover { color: var(--text); background: var(--panel); }
.hbtn-accent { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.hbtn-accent:hover { background: var(--accent-2); color: var(--accent-ink); }
.hbtn-icon { position: relative; width: 38px; justify-content: center; padding: 0; color: var(--text-2); border: 1px solid transparent; }
.hbtn-icon:hover { color: var(--text); background: var(--panel); border-color: var(--line); }
.badge {
  position: absolute; top: 3px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px;
  background: var(--accent); color: var(--accent-ink); border-radius: 3px;
  font: 700 10.5px/17px var(--font); text-align: center;
}
.user-chip {
  display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 8px 0 4px;
  background: transparent; border: 1px solid transparent; border-radius: var(--r); cursor: pointer;
}
.user-chip:hover, .dropdown.is-open .user-chip { background: var(--panel); border-color: var(--line); }
.user-chip-name { font-weight: 500; font-size: 14px; }
.user-chip .ui-icon { color: var(--muted); }
.nav-toggle { display: none; background: none; border: 0; color: var(--text); cursor: pointer; padding: 6px; margin-left: -6px; }

/* ---------- выпадающие меню ---------- */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 50;
  min-width: 230px; padding: 6px;
  background: var(--panel-2); border: 1px solid var(--line-2); border-radius: var(--r);
  box-shadow: 0 16px 40px rgba(0,0,0,.5);
  display: none;
}
.dropdown.is-open .dropdown-menu { display: block; }
.dropdown-menu a, .dropdown-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 10px; border: 0; background: none; border-radius: var(--r-sm);
  color: var(--text-2); font-size: 14px; text-align: left; cursor: pointer;
}
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--panel-3); color: var(--text); }
.dropdown-menu form { margin: 0; }
.dropdown-menu .danger { color: var(--no); }
.dd-head { display: flex; gap: 10px; align-items: center; padding: 8px 10px 12px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.dd-head b { display: block; margin-bottom: 3px; }
.dd-count { margin-left: auto; background: var(--no); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 3px; }
.dd-label { padding: 6px 10px 4px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.dd-sep { height: 1px; background: var(--line); margin: 6px 0; }
.dd-inline { display: flex; gap: 6px; padding: 4px 6px; }
.dd-inline select { flex: 1; min-width: 0; height: 30px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 0 6px; font-size: 13px; }
.dropdown-menu .dd-inline button { width: auto; padding: 0 10px; background: var(--panel-3); height: 30px; }
.mod-menu { min-width: 280px; }

/* ---------- объявление ---------- */
.announce { border-bottom: 1px solid var(--line); font-size: 14px; }
.announce .wrap { padding-block: 10px; display: flex; gap: 10px; align-items: center; }
.announce .wrap::before { content: ''; width: 8px; height: 8px; flex: none; background: currentColor; }
.announce-info { background: #10161c; color: #bfe3ff; }
.announce-event { background: #1b140a; color: #ffd8a3; }
.announce-warn { background: #1d1010; color: #ffc2bd; }
.announce a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- основной каркас ---------- */
.page { flex: 1; padding-block: 24px 64px; }
.with-aside { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.aside-col { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 84px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 18px; font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--text-2); }
.crumbs a:hover { color: var(--accent-2); }
.crumb-sep { color: #4a4a52; }

.flash {
  display: flex; align-items: center; gap: 10px; margin-bottom: 16px;
  padding: 11px 14px; border-radius: var(--r); border: 1px solid; font-size: 14px;
}
.flash::before { content: ''; width: 8px; height: 8px; flex: none; background: currentColor; }
.flash-success { background: rgba(76,207,134,.08); border-color: rgba(76,207,134,.3); color: #9be8bb; }
.flash-error { background: rgba(255,98,90,.08); border-color: rgba(255,98,90,.3); color: #ffb0ab; }
.flash-info { background: rgba(94,196,255,.07); border-color: rgba(94,196,255,.28); color: #b5e2ff; }
.flash-x { margin-left: auto; background: none; border: 0; color: inherit; opacity: .6; cursor: pointer; padding: 2px; }
.flash-x:hover { opacity: 1; }

.notice {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 11px 14px; margin-bottom: 16px;
  background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--info);
  border-radius: var(--r-sm); color: var(--text-2); font-size: 14px;
}
.notice .px-icon { color: var(--info); margin-top: 3px; }
.notice-warn { border-left-color: var(--warn); }
.notice-danger { border-left-color: var(--no); color: #ffc2bd; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.card-pad { padding: 16px; }
.card-title { font: 600 15px/1.3 var(--display); letter-spacing: -.01em; }
.card-title-pad { padding: 16px 18px 6px; }

/* ---------- категории и разделы ---------- */
.cat { margin-bottom: 22px; }
.cat-head {
  display: flex; align-items: baseline; gap: 12px;
  padding: 0 2px 10px;
}
.cat-head h2 {
  font: 600 13px/1 var(--display); text-transform: uppercase; letter-spacing: .06em; color: var(--text);
  display: flex; align-items: center; gap: 10px;
}
.cat-head h2::before { content: ''; width: 10px; height: 10px; background: var(--accent); box-shadow: 3px 3px 0 #7a4209; }
.cat-head span { color: var(--muted); font-size: 12.5px; }

.forum-list { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.forum-list-sub { margin-bottom: 20px; }
.forum-row {
  display: grid; grid-template-columns: 46px minmax(0, 1fr) 150px 250px; gap: 18px; align-items: center;
  padding: 16px 18px;
  border-top: 1px solid var(--line);
  transition: background .12s;
}
.forum-row:first-child { border-top: 0; }
.forum-row:hover { background: #1a1a1e; }
.forum-title { font-weight: 600; font-size: 15.5px; display: inline-flex; align-items: center; gap: 6px; }
.forum-title .ui-icon { color: var(--muted); }
.forum-desc { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.subforums { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; }
.subforums a { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); }
.subforums a:hover { color: var(--accent-2); }
.subforums .px-icon { color: var(--muted); }
.forum-flag { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; font-size: 12px; color: var(--warn); }
.forum-stats { display: flex; gap: 18px; }
.forum-stats div { display: flex; flex-direction: column; }
.forum-stats b { font: 600 15px/1.2 var(--display); font-variant-numeric: tabular-nums; }
.forum-stats span { font-size: 12px; color: var(--muted); }
.forum-last { display: flex; align-items: center; gap: 10px; min-width: 0; }
.forum-last-body { min-width: 0; display: flex; flex-direction: column; font-size: 13px; }
.forum-last-title { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.forum-last-body > span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- виджеты ---------- */
.widget { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.widget-title {
  display: flex; align-items: center; justify-content: space-between;
  font: 600 12px/1 var(--display); text-transform: uppercase; letter-spacing: .06em; color: var(--text-2);
  margin-bottom: 12px;
}
.widget-title span { font-family: var(--mono); color: var(--muted); letter-spacing: 0; }
.widget-empty, .widget-note { color: var(--muted); font-size: 13px; }
.widget-note { margin-top: 10px; }
.widget-note a { color: var(--text-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }

.widget-server { padding: 0; overflow: hidden; background: transparent; border: 0; display: flex; flex-direction: column; gap: 10px; }
.srv-card {
  position: relative; padding: 16px;
  background:
    linear-gradient(135deg, rgba(255,154,31,.14), transparent 55%),
    var(--panel);
  border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden;
}
.srv-card::after {
  content: ''; position: absolute; right: -18px; top: -18px; width: 90px; height: 90px;
  background:
    linear-gradient(var(--cube-top), var(--cube-top)) 0 0 / 30px 30px no-repeat,
    linear-gradient(var(--cube-left), var(--cube-left)) 30px 30px / 30px 30px no-repeat,
    linear-gradient(var(--cube-right), var(--cube-right)) 60px 0 / 30px 30px no-repeat;
  opacity: .12;
}
.srv-card-top { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.srv-label { color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: 11px; }
.srv-state { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.srv-state::before { content: ''; width: 7px; height: 7px; background: currentColor; }
.srv-state.is-on { color: var(--ok); }
.srv-state.is-off { color: var(--no); }
.srv-ip {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  margin: 10px 0 14px; padding: 0; background: none; border: 0; cursor: pointer;
  font: 600 19px/1.2 var(--mono); color: var(--text); text-align: left; word-break: break-all;
}
.srv-ip span { color: var(--muted); padding-left: 8px; }
.srv-ip:hover span { color: var(--accent); }
.srv-meter { height: 6px; background: #0b0b0d; border-radius: 1px; overflow: hidden; box-shadow: inset 0 0 0 1px #222227; }
.srv-meter i {
  display: block; height: 100%; width: 0; transition: width .6s;
  background: repeating-linear-gradient(90deg, var(--ok) 0 6px, #3aa76b 6px 8px);
}
.srv-foot { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.srv-foot b { color: var(--text); font-family: var(--mono); font-weight: 600; }

.staff-online { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.staff-online li { display: flex; align-items: center; gap: 10px; }
.staff-online li > div { display: flex; flex-direction: column; line-height: 1.25; font-size: 14px; }
.staff-online small { color: var(--muted); font-size: 12px; }
.user-link { font-weight: 500; }
.user-link:hover { filter: brightness(1.2); }
.online-names { font-size: 13.5px; line-height: 1.7; }
.latest { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.latest li { padding: 9px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.latest li:first-child { border-top: 0; padding-top: 0; }
.latest-title { font-size: 14px; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.latest-meta { font-size: 12.5px; color: var(--muted); }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.stats-grid div { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px; }
.stats-grid dt { font-size: 11.5px; color: var(--muted); }
.stats-grid dd { margin: 2px 0 0; font: 600 17px/1.1 var(--display); }

/* ---------- заголовок страницы ---------- */
.page-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.page-head-icon.slot { width: 56px; height: 56px; }
.page-head-text { flex: 1; min-width: 0; }
.page-head h1 { font: 600 26px/1.15 var(--display); letter-spacing: -.02em; }
.page-head p { color: var(--muted); margin-top: 4px; }
.page-head-actions { display: flex; gap: 8px; }
.page-head-compact h1 { font-size: 24px; }

/* ---------- список тем ---------- */
.list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.list-count { color: var(--muted); font-size: 13.5px; }
.sort { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.sort select, .field select, .toolbar select {
  height: 32px; padding: 0 28px 0 10px;
  background: var(--panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='m1 1 4 4 4-4' fill='none' stroke='%237f7d77' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 10px center;
  border: 1px solid var(--line); border-radius: var(--r-sm); appearance: none; font-size: 13.5px; color: var(--text);
}
.seg { display: flex; flex-wrap: wrap; gap: 2px; padding: 3px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.seg a {
  display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px;
  border-radius: var(--r-sm); color: var(--text-2); font-size: 13.5px; font-weight: 500;
}
.seg a:hover { color: var(--text); background: var(--panel-2); }
.seg a.is-active { background: var(--panel-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.seg em { font-style: normal; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.dot { width: 7px; height: 7px; display: inline-block; background: var(--c, var(--muted)); }

.topic-list { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.topic-row {
  display: grid; grid-template-columns: 36px minmax(0, 1fr) 150px 180px; gap: 16px; align-items: center;
  padding: 13px 18px; border-top: 1px solid var(--line);
}
.topic-row:first-child { border-top: 0; }
.topic-row:hover { background: #1a1a1e; }
.topic-row.is-pinned { background: linear-gradient(90deg, rgba(255,154,31,.06), transparent 40%); }
.topic-row.is-pinned:hover { background: linear-gradient(90deg, rgba(255,154,31,.09), #1a1a1e 40%); }
.topic-line { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.topic-title { font-weight: 600; font-size: 15px; }
.tflag { color: var(--accent); display: inline-flex; }
.topic-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 4px; font-size: 13px; color: var(--muted); }
.topic-meta .status { margin-right: 4px; }
.topic-pages { display: inline-flex; gap: 3px; margin-left: 6px; }
.topic-pages a { font-family: var(--mono); font-size: 11px; padding: 0 5px; border: 1px solid var(--line); border-radius: 3px; color: var(--text-2); }
.topic-nums { display: flex; gap: 16px; }
.topic-nums div { display: flex; flex-direction: column; min-width: 58px; }
.topic-nums b { font: 600 14px/1.2 var(--display); font-variant-numeric: tabular-nums; }
.topic-nums span { font-size: 11.5px; color: var(--muted); }
.topic-last { display: flex; align-items: center; gap: 9px; min-width: 0; font-size: 13px; }
.topic-last > div { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.topic-last .muted { font-size: 12.5px; }

/* ---------- метки ---------- */
.prefix {
  display: inline-flex; align-items: center; height: 20px; padding: 0 7px;
  background: color-mix(in srgb, var(--c) 16%, transparent);
  color: color-mix(in srgb, var(--c) 85%, white);
  border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
  border-radius: 3px; font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.gbadge {
  display: inline-flex; align-items: center; height: 20px; padding: 0 7px;
  background: color-mix(in srgb, var(--c) 14%, transparent);
  color: var(--c); border-radius: 3px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .01em; white-space: nowrap;
}
.status {
  display: inline-flex; align-items: center; gap: 6px; height: 20px; padding: 0 8px 0 7px;
  border-radius: 3px; font-size: 11.5px; font-weight: 600; white-space: nowrap;
  background: color-mix(in srgb, var(--sc) 13%, transparent); color: var(--sc);
}
.status i { width: 6px; height: 6px; background: currentColor; }
.st-review { --sc: var(--warn); --c: var(--warn); }
.st-approved { --sc: var(--ok); --c: var(--ok); }
.st-denied { --sc: var(--no); --c: var(--no); }
.st-closed { --sc: #9a9890; --c: #9a9890; }
.tag-plain { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }

/* ---------- тема ---------- */
.topic-head { display: flex; gap: 20px; align-items: flex-end; margin-bottom: 18px; }
.topic-head-main { flex: 1; min-width: 0; }
.topic-head-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.topic-head-tags:empty { display: none; }
.topic-head h1 { font: 600 26px/1.2 var(--display); letter-spacing: -.02em; overflow-wrap: anywhere; }
.topic-head-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; color: var(--muted); font-size: 13.5px; }
.topic-head-actions { display: flex; gap: 8px; align-items: center; }

.status-control {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  padding: 10px 12px; margin-bottom: 16px;
  background: var(--panel); border: 1px dashed var(--line-2); border-radius: var(--r);
  font-size: 13px; color: var(--muted);
}
.status-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px;
  background: transparent; border: 1px solid var(--line); border-radius: var(--r-sm);
  color: var(--text-2); cursor: pointer; font-size: 13px;
}
.status-btn i { width: 7px; height: 7px; background: var(--sc); }
.status-btn:hover { border-color: var(--sc); color: var(--text); }
.status-btn.is-active { background: color-mix(in srgb, var(--sc) 14%, transparent); border-color: color-mix(in srgb, var(--sc) 50%, transparent); color: var(--sc); }
.status-lock { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; cursor: pointer; }
.status-lock input { accent-color: var(--accent); }

.posts { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.post {
  display: grid; grid-template-columns: 188px minmax(0, 1fr);
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  scroll-margin-top: 90px;
}
.post:target { border-color: color-mix(in srgb, var(--accent) 60%, transparent); box-shadow: 0 0 0 3px var(--accent-soft); }
.post.is-staff .post-author { background: linear-gradient(180deg, rgba(255,154,31,.05), transparent 60%), var(--bg-2); }
.post-author {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 20px 14px; background: var(--bg-2); border-right: 1px solid var(--line);
  border-radius: var(--r) 0 0 var(--r); text-align: center;
}
.post-av .av { box-shadow: 0 0 0 1px var(--line-2); }
.post-author-info { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.post-author-info .user-link { font-weight: 600; font-size: 15px; }
.post-utitle { font-size: 12px; color: var(--muted); }
.post-author-stats { width: 100%; margin: 4px 0 0; padding-top: 10px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.post-author-stats div { display: flex; justify-content: space-between; font-size: 12px; }
.post-author-stats dt { color: var(--muted); }
.post-author-stats dd { margin: 0; color: var(--text-2); font-variant-numeric: tabular-nums; }
.post-body { display: flex; flex-direction: column; min-width: 0; padding: 14px 20px 12px; }
.post-head { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.post-edited { font-style: italic; }
.post-num { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.post-content { flex: 1; }
.post-sig { margin-top: 18px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--muted); max-height: 120px; overflow: hidden; }
.post-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.reacts { min-height: 26px; display: flex; align-items: center; }
.react-summary { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; color: var(--text-2); cursor: default; }
.react-summary b { margin-left: 6px; font-weight: 600; }
.rs { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 3px; border: 2px solid var(--panel); margin-left: -6px; }
.rs:first-child { margin-left: 0; }
.rs-like { background: #ff625a; color: #fff; }
.rs-thanks { background: #4ccf86; color: #0b2618; }
.rs-lol { background: #f3c443; color: #2a1f00; }
.post-actions { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.post-actions form { margin: 0; }
.react-picker { display: flex; gap: 2px; margin-right: 6px; padding-right: 8px; border-right: 1px solid var(--line); }
.act {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 9px;
  background: none; border: 0; border-radius: var(--r-sm); color: var(--muted); font-size: 13px; cursor: pointer;
}
.act:hover { background: var(--panel-2); color: var(--text); }
.act-danger:hover { color: var(--no); }
.react-btn span { display: none; }
.react-btn[data-react="like"].is-on { color: #ff625a; background: rgba(255,98,90,.1); }
.react-btn[data-react="thanks"].is-on { color: #4ccf86; background: rgba(76,207,134,.1); }
.react-btn[data-react="lol"].is-on { color: #f3c443; background: rgba(243,196,67,.1); }

.form-card-view { margin-bottom: 16px; border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; }
.fcv-head { display: flex; align-items: center; gap: 8px; padding: 9px 14px; background: var(--panel-2); border-bottom: 1px solid var(--line); color: var(--warn); font: 600 12px/1 var(--display); text-transform: uppercase; letter-spacing: .06em; }
.fcv-label { color: var(--text-2); flex: 1; }
.fcv-head .status { font-family: var(--font); text-transform: none; letter-spacing: 0; }
.form-card-view dl { margin: 0; }
.form-card-view dl > div { display: grid; grid-template-columns: 260px 1fr; gap: 16px; padding: 10px 14px; border-top: 1px solid var(--line); }
.form-card-view dl > div:first-child { border-top: 0; }
.form-card-view dt { color: var(--muted); font-size: 13.5px; }
.form-card-view dd { margin: 0; overflow-wrap: anywhere; }

.reply-box { display: flex; gap: 16px; padding: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); margin-top: 12px; }
.reply-form { flex: 1; min-width: 0; }
.reply-locked { display: flex; align-items: center; gap: 10px; padding: 16px 18px; background: var(--panel); border: 1px dashed var(--line-2); border-radius: var(--r); color: var(--text-2); margin-top: 12px; }
.reply-locked .px-icon { color: var(--muted); }
.reply-locked .btn { margin-left: auto; }

/* ---------- контент BB-кодов ---------- */
.bb { overflow-wrap: anywhere; line-height: 1.65; }
.bb a { color: var(--accent-2); text-decoration: underline; text-decoration-color: rgba(255,178,79,.35); text-underline-offset: 3px; }
.bb a:hover { text-decoration-color: currentColor; }
.bb-img { display: block; max-height: 520px; margin: 8px 0; border-radius: var(--r-sm); border: 1px solid var(--line); }
.bb-quote {
  margin: 10px 0; padding: 10px 14px;
  background: var(--bg-2); border-left: 3px solid var(--line-2); border-radius: 0 var(--r-sm) var(--r-sm) 0;
  color: var(--text-2);
}
.bb-quote cite { display: block; margin-bottom: 4px; font-style: normal; font-weight: 600; font-size: 13px; color: var(--text); }
.bb-spoiler { margin: 10px 0; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg-2); }
.bb-spoiler summary { padding: 8px 12px; cursor: pointer; font-weight: 500; font-size: 14px; color: var(--text-2); list-style: none; display: flex; align-items: center; gap: 8px; }
.bb-spoiler summary::-webkit-details-marker { display: none; }
.bb-spoiler summary::before { content: '+'; font-family: var(--mono); color: var(--accent); width: 12px; }
.bb-spoiler[open] summary::before { content: '−'; }
.bb-spoiler > div { padding: 4px 12px 12px; }
.bb-code { margin: 10px 0; padding: 12px 14px; background: #0a0a0c; border: 1px solid var(--line); border-radius: var(--r-sm); overflow-x: auto; font: 13px/1.55 var(--mono); color: #e6d9c5; white-space: pre; }
.bb-list { margin: 8px 0; padding-left: 20px; }
.bb-list li { margin: 3px 0; }
.bb-list li::marker { color: var(--accent); content: '■  '; font-size: 9px; }
.bb-center { text-align: center; }
.bb-video { position: relative; aspect-ratio: 16 / 9; max-width: 640px; margin: 10px 0; }
.bb-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: var(--r-sm); }

/* ---------- формы ---------- */
.form-card { padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field > span, .field-label { font-size: 13px; font-weight: 500; color: var(--text-2); }
.field small { color: var(--muted); font-size: 12.5px; }
.field input:not([type=checkbox]):not([type=radio]):not([type=color]), .field textarea, .field select,
.search-big input, .toolbar input[type=search] {
  width: 100%; min-height: 40px; padding: 9px 12px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r);
  color: var(--text); outline: none; transition: border-color .15s, box-shadow .15s;
}
.field select {
  height: 40px; padding: 0 30px 0 12px; appearance: none;
  background: var(--bg-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='m1 1 4 4 4-4' fill='none' stroke='%237f7d77' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 12px center;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: #5a4a34; box-shadow: 0 0 0 3px var(--accent-soft); }
.field input:disabled { opacity: .6; }
.field textarea { resize: vertical; line-height: 1.55; }
.field input[type=color] { width: 56px; height: 40px; padding: 3px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; }
.field-row { display: flex; gap: 12px; flex-wrap: wrap; }
.field-row > .field { flex: 1 1 160px; }
.field-row > .field-grow { flex: 3 1 260px; }
.field-row > .field-prefix { flex: 0 1 180px; }
.form-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 4px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text-2); cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.check small { display: block; color: var(--muted); font-size: 12.5px; }
.check a { color: var(--accent-2); }

.form-template { border: 1px solid var(--line-2); border-radius: var(--r); padding: 14px 16px 16px; background: var(--bg-2); margin: 0; }
.form-template legend { display: flex; align-items: center; gap: 8px; padding: 0 8px; margin-left: -8px; font: 600 12px/1 var(--display); text-transform: uppercase; letter-spacing: .06em; color: var(--warn); }
.form-template legend small { font-family: var(--font); text-transform: none; letter-spacing: 0; color: var(--muted); font-weight: 400; font-size: 12px; }
.template-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.template-grid .field input { background: var(--panel); }

.editor { border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-2); overflow: hidden; }
.editor:focus-within { border-color: #5a4a34; box-shadow: 0 0 0 3px var(--accent-soft); }
.ed-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 5px; border-bottom: 1px solid var(--line); background: var(--panel); }
.ed-btn { height: 28px; min-width: 28px; padding: 0 8px; background: none; border: 0; border-radius: var(--r-sm); color: var(--text-2); font-size: 12.5px; cursor: pointer; }
.ed-btn:hover { background: var(--panel-3); color: var(--text); }
.ed-btn.is-on { background: var(--panel-3); color: var(--accent-2); }
.ed-sep { width: 1px; height: 16px; background: var(--line-2); margin: 0 4px; }
.ed-grow { flex: 1; }
.editor textarea { display: block; width: 100%; border: 0 !important; box-shadow: none !important; border-radius: 0 !important; background: transparent !important; padding: 12px 14px; min-height: 120px; resize: vertical; outline: none; line-height: 1.6; }
.ed-preview-box { padding: 12px 14px; min-height: 120px; }

/* ---------- модальное окно ---------- */
.modal { padding: 0; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--panel); color: var(--text); width: min(460px, calc(100vw - 32px)); box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.modal::backdrop { background: rgba(0,0,0,.6); backdrop-filter: blur(2px); }
.modal-body { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.modal-body h3 { font: 600 17px/1.2 var(--display); }

/* ---------- пагинация ---------- */
.pagination { display: flex; flex-wrap: wrap; gap: 4px; margin: 14px 0; }
.pg, .pg-gap { min-width: 32px; height: 32px; display: grid; place-items: center; padding: 0 8px; border-radius: var(--r-sm); font: 500 13px/1 var(--mono); }
.pg { background: var(--panel); border: 1px solid var(--line); color: var(--text-2); }
.pg:hover { border-color: var(--line-2); color: var(--text); }
.pg.is-current { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.pg-gap { color: var(--muted); }

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 48px 20px; color: var(--muted); }
.empty .px-icon { color: #3b3b43; margin-bottom: 6px; }
.empty h3 { color: var(--text-2); font: 600 16px/1.2 var(--display); }
.empty p { font-size: 14px; }

/* ---------- лента: активность, профиль, поиск ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.tabs a { position: relative; padding: 10px 14px; color: var(--text-2); font-weight: 500; font-size: 14px; }
.tabs a:hover { color: var(--text); }
.tabs a.is-active { color: var(--text); }
.tabs a.is-active::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 2px; background: var(--accent); }
.feed { list-style: none; margin: 0; padding: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.feed-item { padding: 14px 18px; border-top: 1px solid var(--line); }
.feed-item:first-child { border-top: 0; }
.feed-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.feed-title { font-weight: 600; }
.feed-excerpt { color: var(--text-2); font-size: 14px; margin-top: 4px; }
.feed-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; color: var(--muted); font-size: 12.5px; margin-top: 5px; }
.feed-meta a { color: var(--text-2); }
.feed-meta .px-icon { color: var(--muted); }
.feed-user { display: flex; align-items: center; gap: 12px; }
.feed-user .feed-meta { margin-top: 3px; }
.results-count { margin-bottom: 8px; }

.activity { list-style: none; margin: 0; padding: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.act-item { display: flex; gap: 14px; padding: 16px 18px; border-top: 1px solid var(--line); }
.act-item:first-child { border-top: 0; }
.act-body { min-width: 0; flex: 1; }
.act-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; }
.act-title { font-weight: 600; }

.search-big { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; margin-bottom: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); color: var(--muted); }
.search-big input { border: 0 !important; background: none !important; box-shadow: none !important; padding: 0 !important; font-size: 16px; }
.search-big:focus-within { border-color: #5a4a34; }

/* ---------- профиль ---------- */
.profile-banner {
  position: relative; display: flex; align-items: flex-end; gap: 22px;
  padding: 28px 28px 22px; margin-bottom: 18px; min-height: 180px;
  background:
    radial-gradient(600px 200px at 0% 0%, color-mix(in srgb, var(--gc) 18%, transparent), transparent),
    linear-gradient(to right, rgba(255,255,255,.03) 1px, transparent 1px) 0 0 / 20px 20px,
    linear-gradient(to bottom, rgba(255,255,255,.03) 1px, transparent 1px) 0 0 / 20px 20px,
    var(--panel);
  border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
}
.profile-skin { position: relative; width: 96px; flex: none; display: flex; justify-content: center; align-self: stretch; align-items: flex-end; }
.profile-skin img { height: 170px; width: auto; image-rendering: pixelated; filter: drop-shadow(0 10px 18px rgba(0,0,0,.5)); position: relative; z-index: 1; margin-bottom: -22px; }
.profile-skin .av { display: none; }
.profile-skin.no-skin .av, .profile-skin:not(:has(img)) .av { display: inline-grid; }
.profile-id { flex: 1; min-width: 0; }
.profile-name-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.profile-name-row h1 { font: 700 30px/1.1 var(--display); letter-spacing: -.02em; }
.online-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ok); }
.online-tag i { width: 7px; height: 7px; background: var(--ok); }
.profile-badges { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.profile-seen { color: var(--muted); font-size: 13.5px; margin-top: 10px; }
.profile-actions { display: flex; gap: 8px; }
.profile-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
.profile-side { display: flex; flex-direction: column; gap: 12px; }
.profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.profile-stats div { padding: 14px; border-left: 1px solid var(--line); }
.profile-stats div:first-child { border-left: 0; }
.profile-stats dt { font-size: 12px; color: var(--muted); }
.profile-stats dd { margin: 4px 0 0; font: 600 20px/1 var(--display); }
.react-breakdown { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.react-breakdown li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-2); }
.react-breakdown .rs { margin: 0; border: 0; }
.react-breakdown b { margin-left: auto; font-family: var(--mono); color: var(--text); }

.settings-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.account-id { display: flex; align-items: center; gap: 14px; padding: 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); }
.account-id b { display: block; margin-bottom: 4px; }
.account-id small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 6px; }

/* ---------- уведомления ---------- */
.notif-list { list-style: none; margin: 0; padding: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.notif { display: flex; gap: 12px; align-items: center; padding: 13px 18px; border-top: 1px solid var(--line); }
.notif:first-child { border-top: 0; }
.notif.is-unread { background: linear-gradient(90deg, var(--accent-soft), transparent 50%); box-shadow: inset 3px 0 0 var(--accent); }
.notif-body { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.notif-body p a:not(.user-link) { font-weight: 600; }

/* ---------- команда и онлайн ---------- */
.staff-group { margin-bottom: 26px; }
.staff-group-title { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font: 600 14px/1 var(--display); text-transform: uppercase; letter-spacing: .05em; }
.staff-group-title i { width: 10px; height: 10px; background: var(--c); }
.staff-group-title span { font-family: var(--mono); color: var(--muted); font-size: 12px; letter-spacing: 0; }
.staff-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.staff-card {
  display: flex; align-items: center; gap: 14px; padding: 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: inset 3px 0 0 var(--c); transition: border-color .15s, transform .15s;
}
.staff-card:hover { border-color: color-mix(in srgb, var(--c) 45%, var(--line)); color: var(--text); transform: translateY(-1px); }
.staff-card-body { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.staff-card-body b { font-size: 15px; }
.staff-card-body span { font-size: 13px; color: var(--text-2); }
.staff-card-body small { font-size: 12px; color: var(--muted); margin-top: 2px; }
.staff-card-body em.on { font-style: normal; color: var(--ok); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.member-list { list-style: none; margin: 0; padding: 6px 0; }
.member-list li { display: flex; align-items: center; gap: 12px; padding: 9px 18px; }
.member-list li > div { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.member-list small { font-size: 12px; color: var(--muted); }

/* ---------- авторизация ---------- */
.auth { display: grid; grid-template-columns: 1fr 1fr; max-width: 940px; margin: 20px auto 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.auth-side {
  position: relative; padding: 40px;
  background:
    linear-gradient(to right, rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(to bottom, rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 22px 22px,
    radial-gradient(400px 300px at 20% 10%, rgba(255,154,31,.16), transparent 70%),
    #111113;
  border-right: 1px solid var(--line);
}
.auth-side-inner { position: relative; display: flex; flex-direction: column; gap: 14px; }
.auth-side h2 { font: 700 26px/1.15 var(--display); letter-spacing: -.02em; margin-top: 10px; }
.auth-side p { color: var(--text-2); }
.auth-points { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 12px; }
.auth-points li { display: flex; align-items: center; gap: 12px; color: var(--text-2); font-size: 14px; }
.auth-points .px-icon { color: var(--accent); }
.auth-form { padding: 40px; display: flex; flex-direction: column; gap: 14px; }
.auth-form h1 { font: 600 24px/1.2 var(--display); margin-bottom: 6px; }
.auth-form .flash { margin: 0; }
.auth-switch { text-align: center; color: var(--muted); font-size: 14px; }

/* ---------- проверка на робота ---------- */
.captcha-row { display: flex; align-items: center; gap: 8px; }
.captcha-img {
  display: block; width: 210px; max-width: 100%; height: auto; aspect-ratio: 3 / 1;
  border-radius: 8px; box-shadow: 0 0 0 1px var(--line-2);
  image-rendering: pixelated; background: #141417;
}
.captcha-refresh { width: 38px; height: 38px; }
.captcha-refresh.is-spinning .ui-icon { animation: captcha-spin .5s linear; }
@keyframes captcha-spin { to { transform: rotate(-360deg); } }
.field .captcha-input { text-transform: uppercase; letter-spacing: .3em; font-family: var(--mono); font-weight: 600; }
.field .captcha-input::placeholder { text-transform: none; letter-spacing: 0; font-family: var(--font); font-weight: 400; }
/* Поле-ловушка: человек его не видит, бот заполняет */
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.auth-switch a { color: var(--accent-2); }

/* ---------- ошибка ---------- */
.error-page { max-width: 520px; margin: 60px auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.error-code { display: flex; align-items: center; gap: 16px; color: var(--accent); }
.error-code span { font: 700 64px/1 var(--display); color: var(--text); letter-spacing: -.04em; }
.error-page h1 { font: 600 22px/1.2 var(--display); }
.error-page p { color: var(--text-2); }
.error-actions { display: flex; gap: 8px; margin-top: 10px; }

/* ---------- подвал ---------- */
.site-footer { border-top: 1px solid var(--line); background: #0b0b0c; }
.footer-inner { display: grid; grid-template-columns: auto 1fr; gap: 14px 30px; align-items: center; padding-block: 26px; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand b { display: block; font-family: var(--display); font-size: 14px; }
.footer-brand span { font-size: 12.5px; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 20px; font-size: 13.5px; }
.footer-links a { color: var(--text-2); }
.footer-note { grid-column: 1 / -1; color: var(--muted); font-size: 12.5px; padding-top: 14px; border-top: 1px solid #1b1b1f; }

/* ---------- тост ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100;
  padding: 10px 16px; background: var(--text); color: var(--bg); border-radius: var(--r);
  font-weight: 500; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.4);
  animation: toast-in .2s ease-out;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ---------- адаптив ---------- */
@media (max-width: 1100px) {
  .forum-row { grid-template-columns: 46px minmax(0, 1fr) 210px; }
  .forum-row .forum-stats { display: none; }
  .topic-row { grid-template-columns: 36px minmax(0, 1fr) 170px; }
  .topic-row .topic-nums { display: none; }
  .hsearch { width: 160px; }
  .hsearch:focus-within { width: 200px; }
}
@media (max-width: 960px) {
  .with-aside { grid-template-columns: 1fr; }
  .aside-col { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .main-nav {
    display: none; position: absolute; top: 64px; left: 0; right: 0; height: auto;
    flex-direction: column; padding: 8px; background: var(--panel); border-bottom: 1px solid var(--line);
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 12px; }
  .main-nav a.is-active::after { left: 0; right: auto; top: 10px; bottom: 10px; width: 2px; height: auto; }
  .nav-toggle { display: block; }
  .profile-grid, .settings-grid, .two-col { grid-template-columns: 1fr; }
  .topline-ver { display: none; }
}
@media (max-width: 720px) {
  .wrap { padding-inline: 16px; }
  .header-inner { gap: 12px; }
  .hsearch { display: none; }
  .user-chip-name { display: none; }
  .topline-links { display: none; }
  .forum-row { grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 14px; }
  .forum-row .slot { width: 40px; height: 40px; }
  .forum-row .forum-last { grid-column: 2; }
  .forum-row.is-link .forum-last { display: none; }
  .topic-row { grid-template-columns: minmax(0, 1fr); padding: 12px 14px; }
  .topic-av, .topic-last { display: none; }
  .page-head { flex-wrap: wrap; }
  .page-head h1, .topic-head h1 { font-size: 21px; }
  .topic-head { flex-direction: column; align-items: stretch; }
  .post { grid-template-columns: 1fr; }
  .post-author {
    flex-direction: row; align-items: center; text-align: left; padding: 12px 14px;
    border-right: 0; border-bottom: 1px solid var(--line); border-radius: var(--r) var(--r) 0 0;
  }
  .post-av .av { --s: 44px !important; }
  .post-author-info { align-items: flex-start; gap: 4px; }
  .post-author-stats { display: none; }
  .post-body { padding: 12px 14px; }
  .react-picker { border-right: 0; padding-right: 0; margin-right: 0; }
  .form-card-view dl > div { grid-template-columns: 1fr; gap: 2px; }
  .template-grid { grid-template-columns: 1fr; }
  .reply-av { display: none; }
  .reply-box { padding: 12px; }
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-form { padding: 24px 20px; }
  .profile-banner { flex-direction: column; align-items: flex-start; padding: 20px; }
  .profile-skin { align-self: flex-start; width: auto; }
  .profile-skin img { height: 120px; margin-bottom: 0; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
  .list-toolbar .seg { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
}
