/* Oink: плоская тёмная тема в духе классических форумов. Грузится последним и перекрывает style.css / home.css. */
:root {
  color-scheme: dark;
  --bg: #151515; --surface: #1b1b1b; --card: #272726; --card2: #303030; --row-alt: #2b2b2a; --count-bg: #2f2f2e;
  --line: #343433; --line2: #4f4f4d;
  --text: #d4d4d4; --muted: #8a8a88; --bright: #fff;
  --link: #7db8ee; --link-hover: #b3dcff;
  --accent: #d99a00; --accent2: #ffc107; --accent-bright: #ffd24d;
  --mod: #ffcc00; --danger: #ff4545; --red: #ff4545; --green: #7bd88f;
  --font: Verdana, Tahoma, 'DejaVu Sans', Arial, sans-serif;
  --mono: Consolas, Monaco, 'DejaVu Sans Mono', 'Courier New', monospace;
}
* { box-sizing: border-box; }
html, body { background: var(--bg) !important; }
body { margin: 0; color: var(--text); font: 11px/1.5 var(--font); letter-spacing: 0; }
body::before, body::after { display: none !important; }
a { color: var(--link); text-decoration: none; }
a:hover, a:focus-visible { color: var(--link-hover); text-decoration: underline; }
img { max-width: 100%; }
.muted { color: var(--muted); font-size: inherit; }
.small { font-size: 10px; }
.rainbow-bar { height: 2px; background: linear-gradient(90deg, #3bb2e0 0%, #db5fd6 50%, #e0e94a 100%); }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 12px; }
main.content { display: flex; flex-direction: column; gap: 10px; padding: 0; }
h1 { font: bold 14px/1.3 var(--font); color: var(--bright); margin: 8px 0; }
h2, h3 { font-size: 11px; }
.sec-title { font-size: 12px; margin: 10px 0 0; }

/* шапка */
.site-header { margin-bottom: 10px; background: var(--card); border: 1px solid var(--line); border-top: 0; }
.brand-row { padding: 10px 12px 8px; background: var(--surface); }
.brand { font: 20px/1 Verdana, sans-serif; letter-spacing: -.5px; }
.brand:hover { text-decoration: none; }
.brand-light { color: var(--bright); } .brand-accent { color: var(--accent-bright); }
.main-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 14px; padding: 7px 12px; background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.main-nav a, .nav-button { color: var(--text); font: inherit; }
.main-nav a:hover, .nav-button:hover { color: var(--bright); text-decoration: none; }
.main-nav .nav-admin { color: var(--mod); font-weight: bold; }
.main-nav .nav-mod { color: var(--accent-bright); }
.nav-form { display: inline; margin: 0; }
.nav-button { padding: 0; border: 0; background: none; cursor: pointer; }
.nav-button:hover { background: none; border: 0; }
.status-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 12px 8px; }
.qsearch input { width: 220px; }

/* блоки */
.block, .card, .pcard, .feed, .pfilter.card-like { background: var(--card); border: 1px solid var(--line); border-radius: 0; box-shadow: none; margin: 0; overflow: visible; backdrop-filter: none; }
.block-title, .card-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0; padding: 6px 8px; background: var(--card2); border: 0; border-bottom: 1px solid var(--line); color: var(--bright); font-size: 11px; font-weight: bold; text-transform: none; letter-spacing: 0; }
.card-h::before { display: none; }
.block-title h2 { margin: 0; color: var(--bright); font-size: 11px; font-weight: bold; }
.block-body { padding: 8px; }
.pad { padding: 8px; }
.card { margin: 10px 0 0; }
.card:first-child, .layout .card:first-child { margin-top: 0; }
.empty { padding: 12px; color: var(--muted); text-align: center; }
.empty::before { display: none; }
.mini { padding: 6px 8px; border-bottom: 1px solid var(--line); }
.mini:last-child { border-bottom: 0; }
.stats { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.pins-body > div { padding: 2px 0; }
.crumbs { margin: 8px 0 0; color: var(--muted); font-size: 11px; }
.crumbs a { color: var(--link); }
.crumbs b { color: var(--text); font-weight: normal; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.row { display: flex; gap: 6px; flex-wrap: wrap; }
.narrow { max-width: 520px; width: 100%; margin: 24px auto; }

/* таблицы форумов */
.forum-table { width: 100%; border-collapse: collapse; }
.forum-table th { padding: 4px 8px; color: var(--muted); font-weight: normal; text-align: left; border-bottom: 2px solid var(--accent); }
.forum-table td { padding: 6px 8px; vertical-align: middle; border-bottom: 1px solid var(--line); }
.forum-table tbody tr:nth-child(even) { background: var(--row-alt); }
.forum-table tbody tr:last-child td { border-bottom: 0; }
.forum-table .col-main { width: 55%; }
.forum-table .col-count { width: 9%; text-align: center; }
.forum-table td.col-count { background: var(--count-bg); }
.forum-table .col-last { width: 27%; }
.forum-table .item { display: flex; align-items: center; gap: 10px; }
.item-icon { flex: none; width: 8px; height: 8px; background: var(--line2); }
.item-icon.is-news { background: var(--accent); }
.item-title, .node-title { color: var(--bright); font-size: 12px; font-weight: bold; }
a.item-title:hover, a.node-title:hover { color: var(--link-hover); }
.item-description { color: var(--muted); }
.user-link { font-weight: bold; }
.user-link.role-user { color: var(--text); }
.pager { display: flex; gap: 6px; margin: 0; align-items: center; }
.pager a { padding: 1px 6px; border: 1px solid var(--line2); border-radius: 0; background: var(--card2); color: var(--text); }
.pager a.cur { background: var(--accent2); border-color: var(--accent2); color: #1a1300; box-shadow: none; }

/* ленты, строки (раздел, профиль, админка) */
.node, .trow { display: flex; align-items: center; gap: 12px; padding: 6px 8px; border-bottom: 1px solid var(--line); background: none; transition: none; }
.node:nth-child(even), .trow:nth-child(even) { background: var(--row-alt); }
.node:hover, .trow:hover { background: var(--row-alt); padding-left: 8px; }
.node:last-child, .trow:last-child { border-bottom: 0; }
.node-main, .trow-main { flex: 1; min-width: 0; }
.node-stats { width: 100px; color: var(--muted); font-size: 11px; text-align: right; }
.node-stats b { color: var(--text); font-size: 11px; }
.node-last { width: 200px; font-size: 11px; }
.ficon, .h-icon img { display: none; }
.h-icon { display: block; }
.pfilter, .pfilter.card-like { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 6px 8px; margin: 0; border: 0; border-bottom: 1px solid var(--line); background: none; box-shadow: none; }
.pfilter.card-like { border: 1px solid var(--line); }
.chip { --c: var(--link); padding: 0; border: 0; border-radius: 0; background: none; color: var(--link); font-size: 11px; font-weight: normal; transition: none; }
.chip:hover { color: var(--link-hover); background: none; text-decoration: underline; transform: none; border: 0; }
.chip.on { background: none; color: var(--bright); font-weight: bold; box-shadow: none; text-decoration: none; }
.chip small { opacity: .7; }
.prefix, .yg-label { display: inline-block; margin-right: 6px; padding: 0 7px; border-radius: 2px; font: 11px/18px Helvetica, Raleway, "Helvetica Neue", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", sans-serif; text-transform: uppercase; letter-spacing: normal; color: aliceblue; vertical-align: baseline; box-shadow: none; }
.tabs { display: flex; flex-wrap: wrap; gap: 12px; padding: 0; border: 0; background: none; }
.tabs a { padding: 0; border: 0; color: var(--link); font-size: 11px; font-weight: normal; }
.tabs a.on { color: var(--bright); font-weight: bold; }
.tabs a.on::after { display: none; }
.frow { display: none; }

/* кнопки и поля */
button, .btn { display: inline-block; padding: 3px 9px; font: inherit; color: var(--text); background: var(--card2); border: 1px solid var(--line2); border-radius: 0; box-shadow: none; cursor: pointer; transition: none; text-shadow: none; }
button:hover, .btn:hover { color: var(--bright); background: #3a3a39; text-decoration: none; transform: none; box-shadow: none; }
.btn::after, .btn:hover::after { display: none; animation: none; }
.btn.small { padding: 1px 7px; font-size: 11px; }
.btn.ghost { background: var(--card2); }
.btn.danger, button.danger { color: var(--danger); background: var(--card2); }
.btn:active { transform: none; }
.linkbtn, .link-button { padding: 0; color: var(--link); background: none; border: 0; }
.linkbtn:hover, .link-button:hover { color: var(--link-hover); background: none; text-decoration: underline; }
.linkbtn.on { color: var(--accent-bright); }
.danger-t { color: var(--danger); }
input, textarea, select { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line2); border-radius: 0; padding: 3px 6px; box-shadow: none; }
input:focus, textarea:focus, select:focus { outline: 1px solid var(--accent); outline-offset: -1px; border-color: var(--line2); box-shadow: none; background: var(--surface); }
textarea { width: 100%; resize: vertical; font-family: var(--mono); line-height: 1.5; }
label { display: block; margin-bottom: 8px; color: var(--text); font-weight: normal; }
label input:not([type=checkbox]):not([type=file]), label select, label textarea { display: block; width: 100%; margin-top: 3px; }
label.inline { display: inline-flex; gap: 5px; align-items: center; margin: 0; }
input[type=checkbox] { accent-color: var(--accent); }
input[type=file] { border: 0; padding: 2px 0; background: none; }
.bbbar { display: flex; gap: 3px; margin-bottom: 4px; flex-wrap: wrap; }
.bbbar button { padding: 1px 7px; background: var(--card2); border-radius: 0; }
.flash { margin: 0; padding: 8px 10px; background: var(--card); border: 1px solid var(--accent); border-radius: 0; color: var(--text); }
.err { margin: 0 0 8px; padding: 6px 10px; color: #fff; background: #5a1d1d; border: 1px solid #8a2a2a; border-radius: 0; }
.status-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0; padding: 8px 10px; border-radius: 0; border: 1px solid; }
.status-banner.pend { background: var(--card); border-color: var(--mod); color: var(--text); }
.status-banner.rej { background: #3a1f1f; border-color: #8a2a2a; color: var(--text); }
.sb-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-left: auto; }
.cnt, .badge { display: inline; position: static; padding: 0; background: none; color: var(--accent-bright); box-shadow: none; font-size: inherit; font-weight: bold; }

/* сообщения */
.post { display: flex; margin: 0 0 10px; background: var(--card); border: 1px solid var(--line); border-radius: 0; box-shadow: none; overflow: visible; }

.post:hover { border-color: var(--line); }
.author { width: 170px; flex-shrink: 0; padding: 8px; text-align: left; background: none; border: 0; border-right: 1px solid var(--line); overflow-wrap: anywhere; }
.avatar { display: block; width: 96px; height: 96px; margin: 0 0 6px; border-radius: 0; background: var(--surface); border: 1px solid var(--line2); box-shadow: none; color: var(--muted); font-size: 32px; font-weight: bold; align-items: center; justify-content: center; }
.avatar:not(img) { display: flex; }
.author .avatar { width: 96px; height: 96px; font-size: 32px; }
.trow .avatar { width: 28px; height: 28px; font-size: 12px; margin: 0; }
.uname { font-size: 12px; font-weight: bold; }
.utitle { color: var(--muted); font-size: 11px; margin-bottom: 4px; }
.role-creator { color: #ff7a45 !important; text-shadow: none; }
.role-admin { color: var(--accent-bright) !important; }
.role-mod { color: #7bd88f !important; }
.post-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.post-meta { display: flex; justify-content: space-between; padding: 4px 8px; background: var(--row-alt); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.content { padding: 8px 10px; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.content pre { background: #1f1f1e; border: 1px solid var(--line); border-radius: 0; padding: 8px; overflow-x: auto; font-family: var(--mono); }
.content blockquote { margin: 6px 0; padding: 6px 10px; background: var(--surface); border-left: 3px solid var(--accent); border-radius: 0; color: var(--muted); }
.content a { text-decoration: none; }
.content a:hover { text-decoration: underline; }
.qwho { color: var(--accent-bright); font-size: 11px; font-weight: bold; }
.bbimg { max-width: 100%; border-radius: 0; }
.post-actions { margin-top: auto; display: flex; align-items: center; gap: 12px; padding: 4px 10px; background: none; border-top: 1px solid var(--line); font-size: 11px; }
.post-actions form, .modbar form { margin: 0; }
.modbar { display: flex; gap: 4px; }

/* профиль */
.pcard { margin: 0; }
.pcover { display: none; }
.phead { display: flex; align-items: flex-start; gap: 14px; padding: 10px; margin: 0; flex-wrap: wrap; }
.avatar.xl { width: 120px; height: 120px; margin: 0; border: 1px solid var(--line2); box-shadow: none; font-size: 44px; }
.pinfo { flex: 1; min-width: 200px; padding: 0; }
.pinfo h1 { margin: 0 0 4px; font-size: 16px; }
.pline { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; color: var(--muted); }
.handle { color: var(--muted); font-weight: normal; }
.rolebadge { padding: 0 5px; border-radius: 2px; background: var(--card2); border: 1px solid var(--line2); font-size: 10px; font-weight: bold; color: var(--text); text-shadow: none; }
.rolebadge.role-creator { background: #4a2a1a; border-color: #ff7a45; color: #ff9d73 !important; }
.rolebadge.role-admin { background: #0f2a4a; border-color: var(--accent); color: var(--accent-bright) !important; }
.rolebadge.role-mod { background: #12331f; border-color: #2f8a54; color: #7bd88f !important; }
.onl::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 5px; background: var(--line2); }
.onl.on::before { background: var(--accent-bright); box-shadow: none; }
.pactions { display: flex; gap: 6px; padding: 0; }
.ptiles { display: flex; flex-wrap: wrap; gap: 4px 24px; padding: 6px 10px; margin: 0; background: var(--row-alt); border-top: 1px solid var(--line); }
.tile { padding: 0; background: none; border: 0; border-radius: 0; text-align: left; transition: none; }
.tile:hover { transform: none; background: none; border: 0; }
.tile b { display: inline; font-size: 11px; color: var(--bright); background: none; -webkit-text-fill-color: currentColor; }
.tile span { color: var(--muted); font-size: 11px; margin-left: 4px; }
.pgrid { display: grid; grid-template-columns: 1fr 320px; gap: 10px; align-items: start; margin-top: 10px; }
.pgrid .card, .pgrid .pmain > .card:first-child, .pgrid .pside > .card:first-child { margin: 10px 0 0; }
.pgrid .card:first-child, .pmain > .card:first-child, .pside > .card:first-child { margin-top: 0 !important; }
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 4px 8px; border-bottom: 1px solid var(--line); }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--muted); }
.avedit { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 8px; }
.avedit canvas { width: 96px; height: 96px; border-radius: 0; background: var(--surface); border: 1px solid var(--line2); }
.avedit > div { min-width: 0; flex: 1; }
.avedit input[type=file] { width: 100%; max-width: 100%; font-size: 11px; color: var(--muted); }
.avedit input[type=file]::file-selector-button { margin-right: 8px; padding: 3px 9px; border: 1px solid var(--line2); border-radius: 0; background: var(--card2); color: var(--text); font: inherit; cursor: pointer; }

/* проверка тем */
.qcard { margin: 10px 0 0; }
.qhead { padding: 6px 8px; border-bottom: 1px solid var(--line); }
.qbody { max-height: 260px; overflow: auto; }
.qactions { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 8px; border-top: 1px solid var(--line); align-items: center; }
.qactions form, .sb-actions form { margin: 0; display: flex; gap: 4px; }
.rejform input { min-width: 220px; }

.foot { padding: 14px 12px 20px; text-align: center; color: var(--muted); font-size: 11px; }
.foot::before { display: none; }
.dd, .dd-menu { display: none; }

@media (max-width: 900px) { .pgrid { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
  .post { flex-direction: column; }
  .author { width: auto; border-right: 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }
  .author .avatar { width: 48px; height: 48px; font-size: 18px; margin: 0; }
  .node-stats, .node-last, .forum-table .col-count { display: none; }
  .forum-table .col-main { width: auto; }
  .qsearch input { width: 140px; }
}


/* ---------- объявление и админка ---------- */
.banner { padding: 8px 12px; text-align: center; font-weight: bold; color: #fff; background: #3d3008; border: 1px solid var(--accent); }
.with-sidebar { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 10px; align-items: start; }
.adm-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.side-menu .block-body { display: flex; flex-direction: column; gap: 3px; }
.side-menu a { font-weight: bold; }
.side-menu a.is-active { color: var(--bright); }
.tiles-a { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.atile { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; background: var(--card); border: 1px solid var(--line); color: var(--text); }
a.atile:hover { border-color: var(--accent); text-decoration: none; }
.atile b { font-size: 22px; line-height: 1.2; color: var(--bright); }
.atile span { color: var(--text); }
.atile small { color: var(--muted); font-size: 10px; }
.atile.warn { border-color: var(--mod); }
.atile.warn b { color: var(--mod); }
.charts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.chart-h { display: flex; justify-content: space-between; margin-bottom: 6px; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 70px; padding-bottom: 1px; border-bottom: 1px solid var(--line2); }
.bars i { flex: 1; background: var(--accent); min-height: 2px; display: block; }
.bars i.z { background: var(--line2); }
.bars i:hover { background: var(--accent-bright); }
.adm-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }
.adm-cols > label { margin: 0; }
.adm-cols .block { min-width: 0; }
.block-title a { font-weight: normal; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.filters input { width: 240px; }
.filters select { width: auto; }
.st { display: inline-block; margin-left: 6px; padding: 0 5px; border-radius: 2px; font-size: 10px; line-height: 16px; color: #fff; text-transform: uppercase; }
.st-pend { background: #a26c0a; }
.st-rej { background: #bb565a; }
.col-chk { width: 28px; text-align: center; }
.bulkbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; border-top: 1px solid var(--line); background: var(--row-alt); }
.bulkbar select, .bulkbar input[name=reason] { width: auto; }
.bulkbar input[name=reason] { flex: 1 1 180px; }
.uhead { display: flex; gap: 14px; align-items: flex-start; }
.profile { display: grid; grid-template-columns: 140px 1fr; gap: 3px 12px; margin: 0; }
.profile dt { color: var(--muted); }
.profile dd { margin: 0; }
.narrow-input { width: 72px; display: inline-block; }
.color { width: 38px; height: 24px; padding: 0; border: 1px solid var(--line2); background: none; cursor: pointer; }
.fieldset { margin: 0 0 10px; padding: 8px 10px 10px; border: 1px solid var(--line2); }
.fieldset legend { padding: 0 4px; color: var(--link); }
.fieldset > * + * { margin-top: 6px; }
.checkbox { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--text); }
.inline-num { display: flex; align-items: center; gap: 8px; margin: 0 0 0 22px; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.checks .checkbox { white-space: nowrap; }
.prow { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 6px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.prow:nth-child(even) { background: var(--row-alt); }
.prow:last-child { border-bottom: 0; }
.prow-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; flex: 1; min-width: 0; }
.prow-form > input[name=name] { width: 200px; }
.prow form { margin: 0; }
.prow-prev { min-width: 150px; }
.prow-forums { flex-basis: 100%; }
.prow-forums summary { cursor: pointer; color: var(--link); }
.prow-forums .checks { padding: 6px 0 2px; }
details.frm { border-top: 1px solid var(--line); }
details.frm summary { padding: 7px 8px; cursor: pointer; }
details.frm summary:hover { background: var(--row-alt); }
.frm-body { padding: 4px 8px 8px; }
.frm-del { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 8px 10px; }
@media (max-width: 900px) {
  .with-sidebar { grid-template-columns: 1fr; }
  .side-menu .block-body { flex-direction: row; flex-wrap: wrap; gap: 4px 14px; }
  .tiles-a { grid-template-columns: repeat(2, 1fr); }
  .charts, .adm-cols { grid-template-columns: 1fr; }
  .uhead { flex-direction: column; }
}
label.inline { white-space: nowrap; }
label.inline input:not([type=checkbox]):not([type=radio]), label.inline select, .inline-num input { display: inline-block; width: auto; margin: 0; }
label.inline .narrow-input, .inline-num .narrow-input { width: 72px; }
label.inline input.color { width: 38px; }

.rules-row { background: rgba(255, 193, 7, .08) !important; border-left: 3px solid var(--accent); }

/* ======================================================================
   v3: собственная раскладка и палитра (шапка в одну строку, главная в две колонки)
   ====================================================================== */
:root {
  --bg: #100e09; --surface: #16130c; --card: #1c1810; --card2: #262015; --row-alt: #211c12; --count-bg: #262015;
  --line: #342d1b; --line2: #4d432a; --text: #e6dfcc; --muted: #9b9179; --bright: #ffffff;
  --link: #ffcf4d; --link-hover: #ffe699; --accent: #d99a00; --accent2: #ffc107; --accent-bright: #ffd24d;
  --font: 'Segoe UI', 'Helvetica Neue', Roboto, Arial, sans-serif;
  --r: 8px;
}
html, body { background: var(--bg) !important; }
body { font: 14px/1.55 var(--font); }
.muted { font-size: 13px; }
h1 { font: 600 20px/1.3 var(--font); margin: 14px 0 8px; }

/* шапка */
.topline, .rainbow-bar { display: none; }
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); border-top: 3px solid var(--accent2); position: sticky; top: 0; z-index: 30; }
.topbar-in { display: flex; align-items: center; gap: 22px; min-height: 54px; }
.topbar .brand { font: 700 21px/1 var(--font); letter-spacing: -.3px; flex: none; }
.topbar .main-nav { display: flex; flex-wrap: wrap; gap: 4px; padding: 0; background: none; border: 0; margin-right: auto; }
.topbar .main-nav a { padding: 6px 12px; border-radius: 6px; color: var(--text); font-size: 14px; }
.topbar .main-nav a:hover { background: var(--card2); color: var(--bright); text-decoration: none; }
.topbar .qsearch input { width: 190px; border-radius: 18px; padding: 6px 14px; background: var(--card); }
.userbox { display: flex; align-items: center; gap: 14px; flex: none; }
.userbox form { margin: 0; }
.ub-name { padding: 4px 12px; border-radius: 16px; background: var(--card2); font-weight: 600; }
.ub-name:hover { text-decoration: none; background: var(--line2); }
.nav-button { color: var(--muted); }
.ub-login { color: var(--text); }
.cnt { color: var(--accent-bright); font-weight: 700; }
.site-header, .brand-row, .status-bar { display: none; }
main.content { padding-top: 14px; gap: 14px; }

/* блоки и карточки: скругления, воздух */
.block, .card, .pcard, .panel { border-radius: var(--r); border: 1px solid var(--line); background: var(--card); box-shadow: 0 2px 10px rgba(0, 0, 0, .25); overflow: hidden; }
.block-title, .card-h, .panel-h { padding: 11px 16px; background: var(--card2); font: 600 14px/1.3 var(--font); letter-spacing: .1px; border-bottom: 1px solid var(--line); margin: 0; color: var(--bright); }
.block-body, .pad, .panel-b { padding: 14px 16px; }
.btn, button { border-radius: 6px; padding: 5px 14px; }
.btn { background: var(--accent2); border-color: var(--accent2); color: #1a1300; font-weight: 600; }
.btn:hover { background: var(--accent-bright); border-color: var(--accent-bright); color: #1a1300; }
.btn.ghost, .btn.small.ghost { background: var(--card2); border-color: var(--line2); }
.btn.danger { background: #3a1f24; border-color: #7d2f3b; color: #ff9aa6; }
input, textarea, select { border-radius: 6px; padding: 6px 10px; }
.forum-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .4px; border-bottom: 2px solid var(--accent); }
.forum-table td { padding: 10px 14px; }
.item-title, .node-title { font-size: 15px; }
.prefix, .yg-label { border-radius: 4px; font-size: 11px; line-height: 19px; }

/* главная: две колонки */
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: start; }
.home-main, .home-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.forum-list { display: flex; flex-direction: column; }
.forum-item { display: grid; grid-template-columns: minmax(0, 1fr) 96px 210px; gap: 14px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); border-left: 3px solid transparent; transition: background .2s; }
.forum-item:last-child { border-bottom: 0; }
.forum-item:hover { background: var(--row-alt); }
.forum-item.has-threads { border-left-color: var(--accent2); }
.forum-name { font-size: 16px; font-weight: 600; color: var(--bright); }
.forum-name:hover { color: var(--link-hover); }
.forum-desc { color: var(--muted); font-size: 13px; margin-top: 2px; }
.forum-counts { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--muted); }
.forum-counts b { color: var(--text); }
.forum-last { font-size: 13px; min-width: 0; }
.forum-last a { overflow-wrap: anywhere; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 14px 4px; }
.pill { padding: 3px 11px; border-radius: 14px; background: var(--card2); color: var(--text); font-size: 13px; }
.pill:hover { background: var(--line2); text-decoration: none; }
.pill.on { background: var(--accent2); color: #1a1300; font-weight: 600; }
.feed-list { padding: 4px 0 6px; }
.feed-item { padding: 9px 16px; border-bottom: 1px solid var(--line); }
.feed-item:last-child { border-bottom: 0; }
.feed-title { font-weight: 600; color: var(--bright); overflow-wrap: anywhere; }
.feed-title:hover { color: var(--link-hover); }
.feed-item .muted { font-size: 12px; margin-top: 1px; }
.feed-list .empty { padding: 16px; }
.chipcloud { display: flex; flex-wrap: wrap; gap: 6px; }
.chipcloud .yg-label { margin: 0; }
.chipcloud .yg-label:hover { filter: brightness(1.2); text-decoration: none; }
.statlist > div { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.statlist > div:last-child { border-bottom: 0; }
.pins-body > div { padding: 3px 0; }
a.yg-label.prefix { color: aliceblue; }
a.yg-label.prefix:hover { filter: brightness(1.2); text-decoration: none; }

/* страница раздела и темы */
.trow { padding: 12px 16px; }
.node-stats { font-size: 13px; }
.post { flex-direction: column; border-radius: var(--r); overflow: hidden; box-shadow: 0 2px 10px rgba(0, 0, 0, .25); }
.author { width: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 14px; padding: 10px 16px; border-right: 0; border-bottom: 1px solid var(--line); background: var(--card2); }
.author .avatar { width: 46px; height: 46px; margin: 0 4px 0 0; font-size: 18px; border-radius: 50%; }
.author .uname { font-size: 15px; }
.author .muted, .author .utitle { font-size: 12px; margin: 0; }
.post-meta { background: none; }
.content { padding: 14px 16px; font-size: 14.5px; }
.pfilter { padding: 10px 16px; }
.chip { font-size: 13px; }
.crumbs { font-size: 13px; }
.foot { font-size: 13px; padding: 24px 12px 30px; }

@media (max-width: 960px) {
  .home-grid { grid-template-columns: 1fr; }
  .topbar-in { flex-wrap: wrap; gap: 8px 14px; padding-top: 8px; padding-bottom: 8px; }
  .topbar .main-nav { order: 3; flex-basis: 100%; margin: 0; }
  .topbar .qsearch { margin-left: auto; }
}
@media (max-width: 640px) {
  .forum-item { grid-template-columns: 1fr; gap: 6px; }
  .forum-counts { flex-direction: row; gap: 14px; }
  .topbar .qsearch input { width: 120px; }
}

/* ---------- чат ---------- */
.chat-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 16px; align-items: start; }
.chat-main { display: flex; flex-direction: column; }
.chat-main .panel-h { display: flex; justify-content: space-between; align-items: center; }
.chat-clear { margin: 0; }
.chat-log { height: min(62vh, 620px); min-height: 320px; overflow-y: auto; padding: 8px 6px; scroll-behavior: smooth; background: var(--surface); }
.chat-msg { display: flex; gap: 10px; padding: 6px 12px; border-radius: 8px; }
.chat-msg:hover { background: var(--row-alt); }
.chat-msg.mine { background: rgba(255, 193, 7, .06); }
.chat-msg.men { background: rgba(255, 193, 7, .16); box-shadow: inset 3px 0 0 var(--accent2); }
.chat-ava { flex: none; width: 34px; height: 34px; border-radius: 50%; overflow: hidden; background: var(--card2); border: 1px solid var(--line2); display: flex; align-items: center; justify-content: center; color: var(--muted); font-weight: 700; }
.chat-ava:hover { text-decoration: none; }
.chat-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chat-body { min-width: 0; flex: 1; }
.chat-head { display: flex; align-items: baseline; gap: 8px; }
.chat-time { color: var(--muted); font-size: 12px; }
.chat-del { margin-left: auto; padding: 0 6px; background: none; border: 0; color: var(--muted); font-size: 18px; line-height: 1; opacity: 0; cursor: pointer; }
.chat-msg:hover .chat-del { opacity: 1; }
.chat-del:hover { color: var(--danger); background: none; }
.chat-text { overflow-wrap: anywhere; line-height: 1.45; }
.mention { color: var(--accent-bright); }
.chat-empty { padding: 40px 12px; text-align: center; color: var(--muted); }
.chat-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--card); }
.chat-form input { flex: 1; min-width: 0; }
.chat-err { min-height: 0; padding: 0 14px; color: var(--danger); font-size: 13px; }
.chat-err:not(:empty) { padding: 0 14px 10px; }
.chat-side .panel-b div { padding: 2px 0; }
@media (max-width: 760px) { .chat-wrap { grid-template-columns: 1fr; } .chat-log { height: 55vh; } }

/* подписи «Тема» / «Ответы» */
.section-label { display: flex; align-items: center; gap: 10px; margin: 18px 0 8px; font: 600 12px/1 var(--font); text-transform: uppercase; letter-spacing: .8px; color: var(--muted); }
.section-label::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.section-label .count { padding: 2px 8px; border-radius: 10px; background: var(--card2); color: var(--accent-bright); letter-spacing: 0; }
.section-label + .post { margin-top: 0; }

/* технические работы в админке */
.fieldset.maint { border-color: var(--mod); }
.fieldset.maint legend { color: var(--mod); }

/* чат: доводка */
.chat-logbox { position: relative; }
.chat-more { display: block; margin: 4px auto 10px; padding: 4px 14px; font-size: 13px; }
.chat-new { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); padding: 5px 16px; border-radius: 16px; background: var(--accent2); border-color: var(--accent2); color: #1a1300; font-weight: 600; box-shadow: 0 6px 18px rgba(0, 0, 0, .5); z-index: 2; }
.chat-new:hover { background: var(--accent-bright); color: #1a1300; }
.chat-at { padding: 0 6px; background: none; border: 0; color: var(--muted); font-size: 13px; opacity: 0; cursor: pointer; }
.chat-msg:hover .chat-at { opacity: 1; }
.chat-at:hover { color: var(--accent-bright); background: none; }
.chat-del { margin-left: 0; }
.chat-head .chat-at, .chat-head .chat-time + .chat-del { margin-left: auto; }
.chat-form { align-items: center; position: relative; }
.chat-count { font-size: 12px; min-width: 52px; text-align: right; }
.chat-emoji-wrap { position: relative; }
.chat-emoji-btn { padding: 4px 10px; font-weight: 700; }
.chat-emoji { position: absolute; bottom: calc(100% + 8px); left: 0; z-index: 5; display: grid; grid-template-columns: repeat(6, 36px); gap: 2px; padding: 8px; background: var(--card); border: 1px solid var(--line2); border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .55); }
.chat-emoji[hidden] { display: none; }
.chat-emoji button { width: 36px; height: 34px; padding: 0; font-size: 20px; line-height: 1; background: none; border: 0; border-radius: 6px; }
.chat-emoji button:hover { background: var(--card2); transform: scale(1.15); }
.chat-rules { font-size: 12px; border-top: 1px solid var(--line); }
@media (max-width: 760px) { .chat-count { display: none; } }

[hidden] { display: none !important; }

label input[type=radio], label input[type=checkbox], label.checkbox input { display: inline-block; width: auto; margin: 0; flex: none; }

label.checkbox input[type=radio], label.checkbox input[type=checkbox] { display: inline-block !important; width: auto !important; margin: 0 !important; padding: 0 !important; flex: none; }

label .narrow-input { width: 72px !important; display: inline-block !important; }
