/* CSModArena core design system. Themes override the variables in theme.css. */
:root {
  --bg: #11121b; --bg2: #161722; --surface: #1d1e2a; --surface2: #262838; --border: #ffffff1a; --border2: #ffffff2e;
  --text: #f3f1fa; --muted: #a3a3b8; --accent: #a74aff; --accent2: #e242d0; --accent-text: #fff;
  --success: #22c55e; --success-text: #04140a; --contact: var(--accent); --contact-text: #fff; --danger: #ef4444; --warn: #f59e0b; --info: #3b82f6;
  --radius: 14px; --radius-sm: 9px; --radius-btn: 10px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Noto Sans", Arial, sans-serif;
  --font-head: var(--font); --head-weight: 800; --head-transform: none; --head-style: normal; --head-spacing: 0;
  --shadow: 0 10px 30px #0006; --glow: 0 0 0 transparent; --header-bg: #0d0e15ee; --panel-bg: var(--surface);
  --art-sky1: #2a1d44; --art-sky2: #6d4a8a; --art-wall1: #b68a5a; --art-wall2: #6e4e32; --art-sun: #ffd8a8; --art-crate: #7a5634;
  --art-silhouette: #0c0b12; --art-helmet: #1d1b26; --art-gun: #09080d;
  --container: 1440px; --gap: 18px;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--font); min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; }
img, svg { max-width: 100%; }
img { height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
.prose a, .link, p a { color: var(--accent); }
h1, h2, h3 { font-family: var(--font-head); font-weight: var(--head-weight); text-transform: var(--head-transform); font-style: var(--head-style); letter-spacing: var(--head-spacing); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.45rem, 1.1rem + 1.4vw, 2.1rem); }
h2 { font-size: 1.08rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .8em; }
code, kbd, pre { font-family: Consolas, "Cascadia Mono", monospace; font-size: .88em; }
code { background: #0005; padding: .1em .35em; border-radius: 5px; word-break: break-all; }
pre { white-space: pre-wrap; word-break: break-word; background: #0005; padding: 10px; border-radius: 8px; max-height: 320px; overflow: auto; }
small, .small { font-size: .84rem; }
.muted { color: var(--muted); }
.good { color: var(--success); }
.bad { color: var(--danger); }
.accent { color: var(--accent); }
.center { text-align: center; }
.pad { padding: 14px 16px; }
.pad-x { padding: 0 16px; }
.push { margin-left: auto; }
.break { word-break: break-all; }
.inline { display: inline; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 999; background: var(--accent); color: var(--accent-text); padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

.i { width: 1.15em; height: 1.15em; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }
.i.verified { width: .95em; height: .95em; color: var(--success); margin-left: 3px; stroke-width: 3; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 clamp(12px, 2.2vw, 24px); }
.container.narrow { max-width: 860px; }
.site-main { flex: 1; padding: 18px 0 40px; }

/* ---------- buttons ---------- */
.btn { --b: var(--surface2); display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 16px; border-radius: var(--radius-btn); border: 1px solid transparent; background: var(--b); color: var(--text); font: 600 .92rem/1.2 var(--font); cursor: pointer; white-space: nowrap; transition: filter .15s, transform .15s, background .15s; text-align: center; }
.btn:hover { filter: brightness(1.12); color: inherit; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn span small { display: block; font-weight: 400; font-size: .75rem; opacity: .8; }
.btn span { display: inline-flex; flex-direction: column; align-items: center; }
.btn-primary { background: var(--accent); color: var(--accent-text); box-shadow: var(--glow); }
.btn-primary:hover { color: var(--accent-text); }
.btn-download { background: var(--success); color: var(--success-text); }
.btn-download:hover { color: var(--success-text); }
.btn-contact { background: var(--contact); color: var(--contact-text); }
.btn-contact:hover { color: var(--contact-text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--border2); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost.on { color: var(--danger); border-color: var(--danger); }
.btn-sm { min-height: 34px; padding: 6px 12px; font-size: .86rem; }
.btn-xs { min-height: 28px; padding: 4px 9px; font-size: .78rem; gap: 5px; border-radius: 7px; }
.btn-lg { min-height: 52px; padding: 12px 22px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.btn-row.wrap { flex-wrap: wrap; }
.btn-row.center { justify-content: center; }
.btn-col { display: flex; flex-direction: column; gap: 8px; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; flex: none; }
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.icon-btn .dot { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.link-btn { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; font: inherit; }
.fav-btn.on { color: var(--danger); border-color: var(--danger); }
.fav-btn.on .i { fill: currentColor; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); transition: transform .25s ease; }
@media (max-width: 1023px) {
  .hm-static .site-header { position: relative; }
  .hm-smart .site-header.is-hidden { transform: translateY(-100%); box-shadow: none; }
}
.header-main { display: flex; align-items: center; gap: 14px; min-height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark { width: 36px; height: 36px; color: var(--accent); filter: drop-shadow(0 0 8px color-mix(in srgb, var(--accent) 50%, transparent)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font: 900 1.32rem/1 var(--font-head); letter-spacing: -.01em; text-transform: var(--brand-transform, none); font-style: var(--brand-style, normal); }
.brand-name b { color: var(--accent); }
.brand-name small { font-size: .55em; color: var(--muted); font-weight: 700; }
.brand-tag { font-size: .7rem; color: var(--muted); margin-top: 3px; white-space: nowrap; }
.brand-sm .brand-mark { width: 30px; height: 30px; }
.brand-sm .brand-name { font-size: 1.1rem; }
.main-nav { display: flex; gap: 4px; align-items: center; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; min-width: 0; flex: 0 1 auto; }
.main-nav::-webkit-scrollbar { display: none; }
.nav-link { display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px; border-radius: var(--radius-sm); color: var(--text); font-weight: 600; font-size: .9rem; white-space: nowrap; }
.nav-link:hover { background: var(--surface2); color: var(--text); }
.nav-link.active { background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent); }
.search { position: relative; display: flex; align-items: center; gap: 8px; flex: 1 0 200px; max-width: 340px; margin-left: auto; padding: 0 10px; height: 40px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); }
.search:focus-within { border-color: var(--accent); }
.search input { flex: 1; min-width: 0; background: transparent; border: 0; color: var(--text); font: inherit; outline: 0; }
.search kbd { font-size: .7rem; color: var(--muted); border: 1px solid var(--border2); border-radius: 5px; padding: 1px 5px; }
.suggest { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--border2); border-radius: var(--radius-sm); box-shadow: var(--shadow); overflow: hidden; z-index: 60; }
.suggest a { display: flex; flex-direction: column; padding: 9px 12px; border-bottom: 1px solid var(--border); }
.suggest a:hover, .suggest a.hl { background: var(--surface2); }
.suggest small { color: var(--muted); }
.header-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.lang-switch { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.lang-switch a { padding: 6px 9px; font-size: .76rem; font-weight: 700; color: var(--muted); }
.lang-switch a.active { background: var(--accent); color: var(--accent-text); }
.cur-switch select { height: 32px; padding: 0 8px; font-size: .8rem; }
.user-btn { display: inline-flex; align-items: center; gap: 9px; background: transparent; border: 0; color: var(--text); cursor: pointer; padding: 2px; font: inherit; }
.user-meta { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.user-meta b { font-size: .88rem; }
.user-meta small { color: var(--accent); font-size: .72rem; }
.dropdown { position: relative; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; background: var(--surface); border: 1px solid var(--border2); border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 6px; display: none; z-index: 70; }
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a, .dropdown-menu button { display: flex; width: 100%; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 7px; background: none; border: 0; color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--surface2); color: var(--text); }
.dropdown-head { display: flex; justify-content: space-between; padding: 6px 10px; font-weight: 700; font-size: .85rem; }
.dropdown-head a { display: inline; width: auto; padding: 0; color: var(--accent); font-weight: 500; }
.notif-menu { width: 320px; }
.notif { display: flex; flex-direction: column; gap: 2px; padding: 9px 10px; border-radius: 7px; }
.notif.unread { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.notif small { color: var(--muted); }
.notif-list .notif { flex-direction: row; align-items: center; gap: 10px; border-bottom: 1px solid var(--border); border-radius: 0; padding: 12px 16px; }
.notif-list .notif span { flex: 1; }
.burger { display: none; }
.header-banner { flex: 1; height: 66px; position: relative; overflow: hidden; border-radius: var(--radius-sm); mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); }
.header-banner .hero-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.header-nav { border-top: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 70%, transparent); }
.header-nav-inner { display: flex; align-items: center; gap: 12px; min-height: 50px; }

/* ---------- drawer ---------- */
.drawer { position: fixed; inset: 0; z-index: 100; background: #000a; }
.drawer .drawer-panel { position: absolute; top: 0; bottom: 0; left: 0; width: min(340px, 88vw); background: var(--bg2); border-right: 1px solid var(--border2); padding: 14px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; animation: slideIn .2s ease-out; }
@keyframes slideIn { from { transform: translateX(-100%); } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.drawer-nav { display: flex; flex-direction: column; gap: 2px; }
.drawer-link { display: flex; align-items: center; gap: 10px; padding: 11px 10px; border-radius: 8px; font-weight: 600; }
.drawer-link.active, .drawer-link:hover { background: var(--surface2); color: var(--accent); }
.drawer-games { display: flex; flex-wrap: wrap; gap: 6px; }
.drawer-foot { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: auto; }
.search-drawer { max-width: none; margin: 0; flex: none; }

/* ---------- panels & layout ---------- */
.panel { background: var(--panel-bg); border: 1px solid var(--border); border-radius: var(--radius); min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 10px; }
.panel-head h2 { display: flex; align-items: center; gap: 9px; margin: 0; }
.panel-head h2 .i { color: var(--accent); }
.panel-head h2 small { display: block; font: 400 .8rem var(--font); color: var(--muted); text-transform: none; font-style: normal; letter-spacing: 0; }
.panel-head h2 span { display: flex; flex-direction: column; }
.panel-head > a:not(.btn) { color: var(--accent); font-size: .82rem; font-weight: 600; white-space: nowrap; }
.widget { margin-bottom: var(--gap); }
.layout-3 { display: grid; grid-template-columns: 250px minmax(0, 1fr) 320px; gap: var(--gap); align-items: start; }
.layout-2 { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: var(--gap); align-items: start; }
.layout-side { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: var(--gap); align-items: start; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); margin-bottom: var(--gap); }
.grid-wide-left { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.col-left, .col-right { display: flex; flex-direction: column; min-width: 0; }
.col-left > .panel, .col-right > .panel { margin-bottom: var(--gap); }
.col-main { min-width: 0; display: flex; flex-direction: column; gap: var(--gap); }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { margin: 0 0 4px; display: flex; align-items: center; gap: 10px; }
.page-head p { margin: 0; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: .82rem; color: var(--muted); margin-bottom: 12px; }
.breadcrumbs a:hover { color: var(--accent); }

/* ---------- side nav ---------- */
.side-nav { padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.side-nav .panel-head { padding: 4px 6px 8px; }
.side-link { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius-sm); font-weight: 600; font-size: .9rem; color: var(--text); }
.side-link span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-link em { font-style: normal; font-size: .75rem; color: var(--muted); }
.side-link em.hot { background: var(--danger); color: #fff; padding: 1px 7px; border-radius: 10px; font-weight: 700; }
.side-link:hover { background: var(--surface2); color: var(--text); }
.side-link.active { background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--accent); }
.side-link.sub { font-weight: 500; font-size: .86rem; padding: 7px 10px; }
.side-link .i { color: var(--accent); }
.side-group { display: flex; flex-direction: column; gap: 1px; margin: 8px 0; padding-top: 8px; border-top: 1px solid var(--border); }
.side-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 2px 10px 6px; font-weight: 700; }
.side-nav .btn { margin-top: 8px; }

/* ---------- hero ---------- */
.hero-row { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--gap); margin-bottom: var(--gap); }
.hero { position: relative; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--border); min-height: 300px; display: flex; align-items: center; background: var(--surface); }
.hero-art { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: hidden; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 70% center; }
.hero-fade { position: absolute; inset: 0; background: linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 80%, transparent) 32%, color-mix(in srgb, var(--bg) 15%, transparent) 62%, transparent 85%), linear-gradient(0deg, color-mix(in srgb, var(--bg) 55%, transparent), transparent 40%); }
.hero-art-strip .hero-fade { background: linear-gradient(90deg, color-mix(in srgb, var(--bg) 92%, transparent), color-mix(in srgb, var(--bg) 40%, transparent) 70%, transparent); }
.hero-art-promo .hero-fade, .hero-art-packs .hero-fade { background: linear-gradient(0deg, var(--bg) 8%, color-mix(in srgb, var(--bg) 55%, transparent) 60%, transparent); }
.hero-art-profile .hero-fade { background: linear-gradient(0deg, var(--surface) 5%, transparent 70%); }
.header-banner .hero-art img { object-position: 60% 35%; }
.mcard-label { position: absolute; left: 10px; top: 8px; font: italic 900 clamp(1rem, .7rem + 1vw, 1.5rem)/1 "Impact", "Arial Black", sans-serif; text-transform: uppercase; color: #fff; text-shadow: 0 2px 0 #0008, 0 0 18px color-mix(in srgb, var(--accent) 80%, transparent); letter-spacing: .02em; pointer-events: none; z-index: 1; }
.mcard-tile .mcard-label { top: auto; bottom: 8px; }
.mcard-thumb { overflow: hidden; }
.mcard-thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, #0005, transparent 40%, transparent 60%, #0007); pointer-events: none; }
.mcard-thumb img { transition: transform .35s; }
.mcard:hover .mcard-thumb img { transform: scale(1.05); }
.mcard-type, .mcard-badges, .mcard-rate { z-index: 1; }
.hero-content { position: relative; z-index: 1; padding: clamp(18px, 3vw, 36px); max-width: 640px; }
.hero h1 { font-size: clamp(1.6rem, 1.1rem + 2.2vw, 2.7rem); margin-bottom: 12px; }
.hero h1 .accent { color: var(--accent); }
.hero-text { color: color-mix(in srgb, var(--text) 82%, transparent); font-size: 1rem; max-width: 560px; }
.hero-features { display: flex; flex-wrap: wrap; gap: 14px 24px; margin-top: 16px; }
.hero-features a { display: flex; gap: 10px; align-items: center; }
.hero-features .i { width: 30px; height: 30px; color: var(--accent); }
.hero-features span { display: flex; flex-direction: column; line-height: 1.25; }
.hero-features small { color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* ---------- profile card ---------- */
.profile-card { padding: 16px; display: flex; flex-direction: column; gap: 12px; margin: 0; }
.profile-top { display: flex; gap: 12px; align-items: center; }
.profile-top > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.profile-top b { font-size: 1.05rem; }
.kv { list-style: none; margin: 0; padding: 0 16px 10px; display: flex; flex-direction: column; }
.profile-card .kv { padding: 0; }
.kv li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--border); font-size: .88rem; }
.kv li:last-child { border-bottom: 0; }
.kv li span { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.online-dot::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--success); margin-right: 5px; }
.author-card .btn-row, .profile-card .btn-row { padding: 0 16px 16px; }
.profile-card .btn-row { padding: 0; }
.profile-card .btn-row .btn { flex: 1; }
.author-card .profile-top { padding: 0 16px 10px; }

/* ---------- avatar ---------- */
.avatar { --h: 260; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; flex: none; background: linear-gradient(135deg, hsl(var(--h) 70% 55%), hsl(calc(var(--h) + 40) 70% 35%)); color: #fff; font-weight: 800; overflow: hidden; border: 2px solid var(--border2); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.xs { width: 24px; height: 24px; font-size: .7rem; border-width: 1px; }
.avatar.sm { width: 32px; height: 32px; font-size: .82rem; }
.avatar.lg { width: 56px; height: 56px; font-size: 1.3rem; }
.avatar.xl { width: 76px; height: 76px; font-size: 1.8rem; }
.avatar.xxl { width: 112px; height: 112px; font-size: 2.6rem; border-width: 3px; border-color: var(--accent); }
.avatar.more { background: var(--surface2); color: var(--muted); }
.avatar-stack { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 14px; }

/* ---------- tags/badges ---------- */
.tag { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 6px; font-size: .74rem; font-weight: 600; background: var(--surface2); color: var(--muted); border: 1px solid var(--border); white-space: nowrap; }
.tag-game { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.tag-mode { color: var(--text); }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 6px; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; vertical-align: middle; }
.badge-free { background: color-mix(in srgb, var(--success) 20%, transparent); color: var(--success); }
.badge-paid { background: color-mix(in srgb, var(--contact) 22%, transparent); color: var(--contact); }
.badge-type { background: var(--surface2); color: var(--text); }
.badge-locale { background: color-mix(in srgb, var(--info) 20%, transparent); color: #93c5fd; text-transform: none; }
.price { font-weight: 800; color: var(--contact); white-space: nowrap; }
.price.free { color: var(--success); }
.stars { color: #4b4b5a; letter-spacing: 1px; white-space: nowrap; }
.stars i { font-style: normal; }
.stars i.on, .stars i.half { color: #fbbf24; }
.role { display: inline-block; padding: 1px 8px; border-radius: 5px; font-size: .7rem; font-weight: 700; background: var(--surface2); color: var(--muted); }
.role-owner, .role-admin { background: #ef444433; color: #fca5a5; }
.role-chief_moderator, .role-moderator, .role-forum_moderator, .role-chat_moderator, .role-catalog_moderator { background: #3b82f633; color: #93c5fd; }
.role-author { background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent); }
.status { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: .74rem; font-weight: 700; background: var(--surface2); white-space: nowrap; }
.status-published, .status-approved { background: #22c55e26; color: #86efac; }
.status-pending_review, .status-pending { background: #f59e0b26; color: #fcd34d; }
.status-rejected { background: #ef444426; color: #fca5a5; }
.status-hidden, .status-archived, .status-draft { background: #94a3b826; color: #cbd5e1; }
.kind { font-size: .72rem; padding: 1px 6px; border-radius: 5px; background: var(--surface2); }
.kind-question { color: #93c5fd; } .kind-proposal { color: #fcd34d; } .kind-news { color: var(--accent); }

/* ---------- chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 999px; background: var(--surface2); border: 1px solid var(--border); font-size: .82rem; font-weight: 600; cursor: pointer; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.active { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.chip-add { border-style: dashed; color: var(--accent); }
.chips-check .chip input { position: absolute; opacity: 0; pointer-events: none; }
.chips-check .chip:has(input:checked) { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.chips-check .chip { position: relative; }

/* ---------- material cards ---------- */
.card-list { display: flex; flex-direction: column; gap: 10px; padding: 0 0 6px; }
.library .card-list, .panel > .card-list { padding: 0 14px 14px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.panel > .card-grid { padding: 0 14px 14px; }
.mcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: border-color .15s, transform .15s; min-width: 0; }
.mcard:hover { border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.mcard-thumb { position: relative; display: block; background: #000; }
.mcard-thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.mcard-type { position: absolute; left: 8px; bottom: 8px; display: inline-flex; gap: 5px; align-items: center; font-size: .7rem; font-weight: 700; padding: 3px 7px; border-radius: 6px; background: #000b; color: #fff; }
.mcard-title { font-size: 1rem; margin: 0 0 6px; text-transform: none; font-style: normal; letter-spacing: 0; }
.mcard-title a:hover { color: var(--accent); }
.mcard-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
.mcard-excerpt { color: var(--muted); font-size: .86rem; margin: 0 0 8px; }
.mcard-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: .8rem; color: var(--muted); }
.mcard-meta span, .meta-author { display: inline-flex; align-items: center; gap: 5px; }
.meta-rating b { color: var(--text); }
.mcard-row { display: grid; grid-template-columns: 210px minmax(0, 1fr) 170px; gap: 14px; padding: 10px; align-items: center; background: var(--surface2); }
.mcard-row .mcard-thumb { border-radius: var(--radius-sm); overflow: hidden; }
.mcard-row .mcard-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.mcard-row .mcard-actions .btn span { flex-direction: row; }
.mcard-price { text-align: center; font-size: 1.1rem; }
.mcard-tile { display: flex; flex-direction: column; }
.mcard-tile .mcard-body { padding: 12px 12px 6px; flex: 1; }
.mcard-tile .mcard-title { font-size: .95rem; }
.mcard-badges { position: absolute; left: 8px; top: 8px; display: flex; gap: 4px; }
.mcard-badges .tag { background: #000c; }
.mcard-rate { position: absolute; right: 8px; top: 8px; background: #000c; color: #fbbf24; font-size: .75rem; font-weight: 700; padding: 2px 7px; border-radius: 6px; }
.mcard-foot { display: flex; gap: 8px; padding: 0 12px 12px; align-items: center; }
.mcard-foot .btn { flex: 1; min-width: 0; }
.mcard-foot .btn span { overflow: hidden; text-overflow: ellipsis; display: block; }
.mcard-foot .icon-btn { width: 34px; height: 34px; }

/* ---------- shop list / topics / authors ---------- */
.shop-list { display: flex; flex-direction: column; padding: 0 10px 10px; gap: 6px; }
.shop-item { display: grid; grid-template-columns: 86px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px; border-radius: var(--radius-sm); background: var(--surface2); }
.shop-thumb img { width: 86px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; }
.shop-body { display: flex; flex-direction: column; min-width: 0; }
.shop-title { font-weight: 700; font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-body small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-rate { color: #fbbf24; }
.shop-side { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.shop-side .btn span { flex-direction: row; }
.topic-list { display: flex; flex-direction: column; padding: 0 8px 8px; }
.topic-item { display: flex; gap: 10px; align-items: center; padding: 9px 8px; border-radius: var(--radius-sm); }
.topic-item:hover { background: var(--surface2); color: var(--text); }
.topic-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent); flex: none; }
.topic-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.topic-body b { font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topic-body small { color: var(--muted); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topic-count { display: inline-flex; gap: 4px; align-items: center; font-size: .78rem; color: var(--muted); }
.author-list { display: flex; flex-direction: column; padding: 0 8px 8px; }
.author-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--radius-sm); }
.author-item:hover { background: var(--surface2); color: var(--text); }
.author-body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.author-body small { color: var(--muted); font-size: .76rem; }
.author-score { display: inline-flex; gap: 4px; align-items: center; font-size: .76rem; font-weight: 700; color: var(--success); background: color-mix(in srgb, var(--success) 14%, transparent); padding: 3px 8px; border-radius: 6px; }
.author-rank { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--surface2); font-size: .75rem; font-weight: 800; flex: none; }
.rank-1 { background: linear-gradient(135deg, #fde68a, #d97706); color: #1a1205; }
.rank-2 { background: linear-gradient(135deg, #e5e7eb, #9ca3af); color: #111; }
.rank-3 { background: linear-gradient(135deg, #fdba74, #b45309); color: #1a0d05; }
.review { padding: 0 16px 12px; }
.review-head { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; }
.review-head > div { display: flex; flex-direction: column; flex: 1; }
.review p { font-size: .86rem; margin-bottom: 4px; }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 0 12px 12px; }
.stat { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px; border-radius: var(--radius-sm); background: var(--surface2); text-align: center; }
.stat .i { color: var(--accent); width: 24px; height: 24px; }
.stat b { font-size: 1.15rem; }
.stat small { color: var(--muted); font-size: .74rem; }
.chat-mini-list { display: flex; flex-direction: column; gap: 8px; padding: 0 14px 10px; }
.chat-mini-msg { display: flex; gap: 8px; }
.chat-mini-msg p { margin: 0; font-size: .84rem; }
.chat-mini .btn { margin: 0 14px 14px; width: calc(100% - 28px); }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 0 var(--success); animation: pulse 1.6s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ---------- home blocks ---------- */
.mode-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mode-tile { position: relative; display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); overflow: hidden; min-height: 86px; }
.mode-tile::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 90% 50%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 60%); pointer-events: none; }
.has-bg { position: relative; overflow: hidden; isolation: isolate; }
.has-bg::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, color-mix(in srgb, var(--surface) 96%, transparent) 15%, color-mix(in srgb, var(--surface) 70%, transparent) 55%, color-mix(in srgb, var(--surface) 25%, transparent)), var(--bg-img) center / cover no-repeat; transition: transform .35s; }
.has-bg:hover::before { transform: scale(1.04); }
.mode-tile.has-bg, .cat-tile.has-bg, .banner-strip.has-bg { background: var(--surface); }
.mode-tile.has-bg { min-height: 110px; }
.mode-tile:hover { border-color: var(--accent); color: var(--text); }
.mode-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--accent); flex: none; }
.mode-icon .i { width: 26px; height: 26px; }
.mode-tile b { display: block; font-size: 1.05rem; font-family: var(--font-head); text-transform: var(--head-transform); font-style: var(--head-style); }
.mode-tile small { color: var(--muted); font-size: .8rem; }
.mode-arrow { margin-left: auto; color: var(--muted); }
.library-search { display: grid; grid-template-columns: minmax(0, 1fr) 150px auto; gap: 8px; padding: 0 14px; }
.library .chips { padding: 0 14px; }
.input-icon { position: relative; display: flex; align-items: center; }
.input-icon .i { position: absolute; left: 11px; color: var(--muted); pointer-events: none; }
.input-icon input { padding-left: 36px; width: 100%; }
.banner-strip { display: flex; align-items: center; gap: 16px; padding: 16px 20px; margin-top: var(--gap); border-radius: var(--radius); border: 1px solid var(--border); background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 35%, var(--surface)), var(--surface) 60%); flex-wrap: wrap; }
.banner-strip > div:not(.btn-row) { display: flex; flex-direction: column; flex: 1; min-width: 220px; }
.banner-strip b { font: var(--head-weight) 1.1rem var(--font-head); text-transform: var(--head-transform); font-style: var(--head-style); }
.banner-icon .i { width: 40px; height: 40px; color: var(--accent); }
.stats-bar { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1px; background: var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: var(--gap); border: 1px solid var(--border); }
.stats-bar div { display: flex; gap: 10px; align-items: center; padding: 14px 16px; background: var(--surface); }
.stats-bar .i { width: 28px; height: 28px; color: var(--accent); }
.stats-bar b { display: block; font-size: 1.15rem; }
.stats-bar small { color: var(--muted); font-size: .75rem; }
.cat-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: var(--gap); }
.cat-tile { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.cat-tile:hover { border-color: var(--accent); color: var(--text); }
.cat-tile b { display: block; }
.cat-tile small { color: var(--muted); font-size: .78rem; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 12px; }

/* ---------- forms ---------- */
input, select, textarea { width: 100%; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border2); background: color-mix(in srgb, var(--bg) 70%, #000); color: var(--text); font: inherit; min-height: 40px; }
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; accent-color: var(--accent); }
input[type=file] { padding: 8px; }
select option { background: var(--surface); }
textarea { resize: vertical; min-height: 80px; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 12px; }
label > input, label > select, label > textarea { margin-top: 6px; font-weight: 400; }
label small { display: block; font-weight: 400; margin-top: 4px; }
fieldset { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
legend { font-weight: 700; font-size: .88rem; margin-bottom: 8px; padding: 0; }
.form-section { padding: 18px; margin-bottom: var(--gap); }
.form-section h2 { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.form-section h2 .i { color: var(--accent); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 14px; }
.form-grid .span-2 { grid-column: span 2; }
.form-stack { display: flex; flex-direction: column; }
.form-inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.form-inline input { width: auto; flex: 1 1 180px; }
.radio, .check { display: flex; align-items: center; gap: 8px; font-weight: 500; margin-bottom: 6px; cursor: pointer; }
.switch { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; cursor: pointer; margin: 8px 0; }
.switch input { margin-top: 3px; width: 18px; height: 18px; }
.switch span { display: flex; flex-direction: column; gap: 2px; }
.switch span small { color: var(--muted); }
.seg { display: flex; border: 1px solid var(--border2); border-radius: var(--radius-sm); overflow: hidden; }
.seg label { flex: 1; margin: 0; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; text-align: center; padding: 8px 6px; cursor: pointer; font-size: .84rem; }
.seg input:checked + span { background: var(--accent); color: var(--accent-text); }
.seg-wide { margin-bottom: 14px; }
.sub-box { border: 1px dashed var(--border2); border-radius: var(--radius-sm); padding: 14px; margin: 8px 0 12px; }
.sub-box summary { cursor: pointer; font-weight: 700; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.check-card { position: relative; margin: 0; }
.check-card input { position: absolute; opacity: 0; }
.check-card span { display: flex; flex-direction: column; padding: 10px 12px; border: 1px solid var(--border2); border-radius: var(--radius-sm); cursor: pointer; background: var(--surface2); }
.check-card small { color: var(--muted); font-weight: 400; font-size: .74rem; }
.check-card input:checked + span { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, transparent); box-shadow: inset 0 0 0 1px var(--accent); }
.check-card input:focus-visible + span { outline: 2px solid var(--accent); }
.dist-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.dist-card { margin: 0; position: relative; }
.dist-card input { position: absolute; opacity: 0; }
.dist-card span { display: flex; flex-direction: column; gap: 4px; padding: 16px; border: 2px solid var(--border2); border-radius: var(--radius); cursor: pointer; height: 100%; }
.dist-card .i { width: 26px; height: 26px; color: var(--accent); }
.dist-card b { font-size: 1.05rem; }
.dist-card small { color: var(--muted); font-weight: 400; }
.dist-card input:checked + span { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.file-drop { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 18px; border: 2px dashed var(--border2); border-radius: var(--radius); cursor: pointer; }
.file-drop:hover { border-color: var(--accent); }
.file-drop > .i { width: 32px; height: 32px; color: var(--accent); }
.file-drop span { display: flex; flex-direction: column; flex: 1; min-width: 200px; }
.file-drop span small { color: var(--muted); font-weight: 400; }
.file-drop input { flex-basis: 100%; }
.shots-preview, .shots-existing { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.shots-preview img, .shots-existing img { width: 120px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; border: 1px solid var(--border2); }
.shots-existing figure { position: relative; margin: 0; }
.shots-existing .icon-btn { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; }
.steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 14px; counter-reset: s; overflow-x: auto; }
.steps li { counter-increment: s; flex: 1; min-width: 110px; }
.steps a { display: block; padding: 9px 12px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); font-size: .82rem; font-weight: 600; white-space: nowrap; }
.steps a::before { content: counter(s) ". "; color: var(--accent); }
.step-n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-text); font-size: .85rem; flex: none; }
.submit-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--gap); align-items: start; }
.submit-aside .sticky { position: sticky; top: 140px; padding: 16px; }
.submit-aside h2 { display: flex; gap: 8px; align-items: center; }
.preview-card { border: 1px solid var(--accent); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 6px; }
.preview-thumb { aspect-ratio: 16 / 9; border-radius: 8px; display: grid; place-items: center; background: linear-gradient(135deg, var(--surface2), color-mix(in srgb, var(--accent) 40%, var(--surface))); font: italic 900 1.6rem var(--font-head); color: #fff; text-transform: uppercase; overflow: hidden; }
.hint { display: flex; gap: 8px; align-items: flex-start; }

/* ---------- notices / flash ---------- */
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); margin: 0 0 14px; border: 1px solid; font-size: .9rem; }
.notice ul { margin: 0; padding-left: 18px; }
.notice .i { margin-top: 2px; }
.notice-info { background: #3b82f61a; border-color: #3b82f655; }
.notice-warn { background: #f59e0b1a; border-color: #f59e0b55; }
.notice-error { background: #ef44441a; border-color: #ef444466; }
.notice-success { background: #22c55e1a; border-color: #22c55e55; }
.notice.small { font-size: .8rem; padding: 9px 12px; }
.flashes { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.flash { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border2); border-left: 4px solid var(--info); margin-bottom: 10px; }
.flash span { flex: 1; }
.flash-success { border-left-color: var(--success); }
.flash-error { border-left-color: var(--danger); }
.flash-close { background: none; border: 0; color: var(--muted); font-size: 1.3rem; cursor: pointer; }

/* ---------- catalog ---------- */
.filter-form { padding: 14px; position: sticky; top: 140px; }
.filter-form fieldset { max-height: 260px; overflow: auto; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar-sort { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-left: auto; }
.toolbar-sort select, .toolbar-sort input { width: auto; min-width: 150px; }
.toolbar-sort .check { margin: 0; }
.view-toggle { display: inline-flex; border: 1px solid var(--border2); border-radius: var(--radius-sm); overflow: hidden; }
.view-toggle a { padding: 8px 10px; }
.view-toggle a.active { background: var(--accent); color: var(--accent-text); }
.pagination { display: flex; gap: 6px; justify-content: center; margin: 18px 0; flex-wrap: wrap; }
.pagination a { min-width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); font-weight: 700; }
.pagination a.active { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 40px 20px; gap: 8px; }
.empty > .i { width: 48px; height: 48px; color: var(--accent); }
.error-code { font: 900 5rem/1 var(--font-head); color: var(--accent); }
.admin-filter { padding: 10px; }
.admin-filter input, .admin-filter select { width: auto; flex: 1 1 160px; }
.admin-filter .input-icon { flex: 2 1 220px; }

/* ---------- material page ---------- */
.material-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 260px; gap: 18px; padding: 16px; margin-bottom: var(--gap); }
.gallery-main img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-sm); background: #000; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.gallery-thumbs button { padding: 0; border: 2px solid transparent; border-radius: 7px; overflow: hidden; cursor: pointer; background: #000; }
.gallery-thumbs button.active { border-color: var(--accent); }
.gallery-thumbs img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.material-info h1 { font-size: clamp(1.3rem, 1rem + 1vw, 1.8rem); margin: 8px 0; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.lead { color: var(--muted); }
.material-stats { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .86rem; margin-bottom: 10px; }
.material-stats span { display: inline-flex; gap: 5px; align-items: center; }
.spec { display: grid; gap: 0; margin: 0; font-size: .86rem; }
.spec > div { display: grid; grid-template-columns: 110px 1fr; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--border); }
.spec dt { color: var(--muted); }
.spec dd { margin: 0; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.spec-wide > div { grid-template-columns: 200px 1fr; }
.action-box { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--radius); background: var(--surface2); border: 1px solid var(--border); align-self: start; scroll-margin-top: 140px; }
.action-box .btn-lg span { align-items: flex-start; }
.price-big { font: 900 2rem/1 var(--font-head); color: var(--contact); }
.file-meta, .file-hash { display: flex; gap: 6px; align-items: center; font-size: .78rem; color: var(--muted); margin: 0; }
.contacts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: .86rem; }
.contacts li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 10px; border-radius: 8px; background: var(--surface); }
.panel .contacts { padding: 0 14px 14px; }
.contacts span { color: var(--muted); }
.contacts a { color: var(--accent); word-break: break-all; text-align: right; }
.contact-title { display: flex; align-items: center; gap: 8px; font-size: 1rem; margin: 4px 0 0; }
.contact-title .i { color: var(--contact); }
.contact-ways { display: flex; flex-direction: column; gap: 7px; }
.contact-ways form { margin: 0; }
.contact-ways-title { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.contact-btn { --c: var(--contact); display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: var(--radius-sm); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); background: color-mix(in srgb, var(--c) 14%, var(--surface)); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: background .15s, transform .15s; }
.contact-btn:hover { background: color-mix(in srgb, var(--c) 30%, var(--surface)); color: var(--text); transform: translateY(-1px); }
.contact-btn > .i:first-child { width: 22px; height: 22px; color: var(--c); }
.contact-btn > span { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.25; }
.contact-btn small { color: var(--muted); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-btn > .i:last-child { color: var(--muted); width: 16px; height: 16px; }
.contact-btn.locked { opacity: .8; }
.contact-telegram { --c: #2aabee; } .contact-vk { --c: #0077ff; } .contact-whatsapp { --c: #25d366; } .contact-viber { --c: #7360f2; }
.contact-discord { --c: #5865f2; } .contact-steam { --c: #66c0f4; } .contact-email { --c: #f59e0b; } .contact-site { --c: #94a3b8; }
.contact-other { --c: #e879f9; } .contact-dm { --c: var(--accent); }
.contact-field > span { display: inline-flex; align-items: center; gap: 6px; }
.contact-field > span .i { color: var(--c, var(--accent)); }
.contact-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.pad-bottom { padding-bottom: 14px; }
.action-row { display: flex; flex-wrap: wrap; gap: 6px; }
.action-row form { display: contents; }
.action-row .btn { flex: 1 1 auto; }
.tabs-panel { padding: 0 0 16px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; padding: 0 10px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button, .tabs a { flex: none; background: none; border: 0; border-bottom: 3px solid transparent; color: var(--muted); padding: 13px 14px; font: 600 .9rem var(--font); cursor: pointer; white-space: nowrap; }
.tabs button.active, .tabs a.active { color: var(--accent); border-bottom-color: var(--accent); }
.tabs-links { margin-bottom: 14px; background: var(--surface); border-radius: var(--radius) var(--radius) 0 0; }
.tab-pane { padding: 16px 18px 0; }
.prose { line-height: 1.7; }
.prose ul { padding-left: 20px; }
.prose blockquote { border-left: 3px solid var(--accent); margin: 8px 0; padding: 6px 12px; background: #0003; border-radius: 0 8px 8px 0; color: var(--muted); }
.prose p:last-child { margin-bottom: 0; }
.mention { color: var(--accent); font-weight: 600; }
.rate-form { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.star-input { display: inline-flex; flex-direction: row-reverse; }
.star-input input { position: absolute; opacity: 0; }
.star-input label { font-size: 1.6rem; color: #4b4b5a; cursor: pointer; margin: 0; padding: 0 2px; }
.star-input label:hover, .star-input label:hover ~ label, .star-input input:checked ~ label { color: #fbbf24; }
.comment-form { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; margin-bottom: 16px; }
.comments { display: flex; flex-direction: column; gap: 12px; }
.comment { display: flex; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.comment-body { flex: 1; min-width: 0; }
.comment-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 4px; }
.comment-body p { margin: 0 0 4px; }
.table-wrap { overflow-x: auto; margin-bottom: var(--gap); }
.table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; white-space: nowrap; }
.table tr:hover td { background: #ffffff05; }
.table.compact th, .table.compact td { padding: 7px 10px; }
.table td.indent { padding-left: 34px; }
.cat-root td { background: #ffffff06; }
.user-cell { display: inline-flex; gap: 8px; align-items: center; }

/* ---------- forum ---------- */
.forum-table { overflow: hidden; }
.forum-row { display: grid; grid-template-columns: minmax(0, 1fr) 90px 90px 260px; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.forum-row-head { font-size: .74rem; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 10px 16px; }
.forum-cat { display: flex; gap: 12px; align-items: center; min-width: 0; }
.forum-cat span:last-child { display: flex; flex-direction: column; min-width: 0; }
.forum-cat small { color: var(--muted); font-size: .8rem; }
.forum-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); flex: none; }
.forum-row .num { text-align: center; font-weight: 700; display: inline-flex; gap: 4px; align-items: center; justify-content: center; }
.forum-last { display: flex; gap: 8px; align-items: center; min-width: 0; font-size: .82rem; }
.forum-last span { display: flex; flex-direction: column; min-width: 0; }
.forum-last a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.forum-last small { color: var(--muted); }
.topic-table { overflow: hidden; }
.topic-row { display: grid; grid-template-columns: auto minmax(0, 1fr) 70px 80px 110px; gap: 12px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.topic-row.pinned { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.topic-main { display: flex; flex-direction: column; min-width: 0; }
.topic-row .num { font-size: .82rem; color: var(--muted); display: inline-flex; gap: 4px; align-items: center; }
.topic-last { color: var(--muted); font-size: .76rem; }
.posts { display: flex; flex-direction: column; gap: 12px; }
.post { display: grid; grid-template-columns: 160px minmax(0, 1fr); overflow: hidden; scroll-margin-top: 140px; }
.post-hidden { opacity: .55; border-style: dashed; }
.post-author { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 16px 10px; background: var(--surface2); border-right: 1px solid var(--border); }
.post-body { padding: 14px 18px; display: flex; flex-direction: column; min-width: 0; }
.post-head { display: flex; justify-content: space-between; margin-bottom: 8px; }
.post-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 12px; }
.like-btn.on { color: var(--accent); border-color: var(--accent); }
.reply-form { padding: 16px; margin-top: 16px; }
.mod-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 14px; margin-bottom: 12px; border-color: #3b82f655; }
.mod-bar select, .mod-bar input { width: auto; min-height: 30px; padding: 4px 8px; font-size: .8rem; }
.linked-material { display: flex; gap: 12px; align-items: center; padding: 10px; margin-bottom: 12px; }
.linked-material img { width: 96px; border-radius: 6px; }
.linked-material span { display: flex; flex-direction: column; flex: 1; }

/* ---------- chat ---------- */
.chat-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr) 220px; gap: var(--gap); height: calc(100vh - 190px); min-height: 520px; }
.chat-rooms, .chat-online { overflow-y: auto; }
.room { display: flex; gap: 8px; align-items: center; padding: 9px 14px; font-weight: 600; font-size: .9rem; }
.room:hover { background: var(--surface2); color: var(--text); }
.room.active { background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--accent); }
.room span:nth-child(2) { flex: 1; }
.room em { font-style: normal; font-size: .72rem; color: var(--muted); }
.room-hash { color: var(--accent); font-weight: 900; }
.chat-main { display: flex; flex-direction: column; min-height: 0; position: relative; }
.chat-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.chat-head h1 { font-size: 1.15rem; margin: 0; }
.chat-search input { min-height: 34px; padding-top: 5px; padding-bottom: 5px; }
.chat-messages { flex: 1; overflow-y: auto; padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; overscroll-behavior: contain; }
.chat-msg { position: relative; display: flex; gap: 10px; padding: 6px 8px; border-radius: 8px; }
.chat-msg:hover { background: var(--surface2); }
.chat-msg.mention { background: color-mix(in srgb, var(--warn) 14%, transparent); box-shadow: inset 3px 0 0 var(--warn); }
.chat-msg.deleted { opacity: .55; }
.chat-msg-body { flex: 1; min-width: 0; }
.chat-msg-head { display: flex; gap: 8px; align-items: baseline; }
.chat-msg-head small { color: var(--muted); font-size: .72rem; }
.chat-text { word-wrap: break-word; overflow-wrap: anywhere; }
.chat-reply { font-size: .78rem; color: var(--muted); border-left: 2px solid var(--accent); padding-left: 6px; margin: 2px 0; }
.chat-actions { position: absolute; right: 8px; top: -12px; display: none; gap: 2px; background: var(--surface); border: 1px solid var(--border2); border-radius: 8px; padding: 2px; z-index: 2; }
.chat-msg:hover .chat-actions, .chat-msg:focus-within .chat-actions { display: flex; }
.chat-actions button { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 4px 6px; border-radius: 5px; font-weight: 700; }
.chat-actions button:hover { color: var(--accent); background: var(--surface2); }
.chat-form { position: relative; display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); flex-wrap: wrap; align-items: center; }
.chat-form input[name=body] { flex: 1; min-width: 0; }
.chat-replying { flex-basis: 100%; display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); }
.emoji-pop { position: absolute; bottom: 100%; left: 12px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 2px; background: var(--surface); border: 1px solid var(--border2); border-radius: 10px; padding: 6px; box-shadow: var(--shadow); }
.emoji-pop button { background: none; border: 0; font-size: 1.3rem; cursor: pointer; padding: 4px; border-radius: 6px; }
.emoji-pop button:hover { background: var(--surface2); }
.chat-error { color: var(--danger); padding: 0 14px 10px; margin: 0; }
.chat-login { padding: 12px; border-top: 1px solid var(--border); margin: 0; display: flex; gap: 10px; align-items: center; }
.new-msgs { position: absolute; bottom: 74px; left: 50%; transform: translateX(-50%); background: var(--accent); color: var(--accent-text); border: 0; border-radius: 999px; padding: 6px 14px; font-weight: 700; cursor: pointer; box-shadow: var(--shadow); }
.online-user { display: flex; gap: 8px; align-items: center; padding: 6px 14px; font-size: .86rem; }
.role-c-owner, .role-c-admin { color: #fca5a5; }
.role-c-chief_moderator, .role-c-moderator, .role-c-chat_moderator { color: #93c5fd; }

/* ---------- messages ---------- */
.dm-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: var(--gap); height: calc(100vh - 190px); min-height: 500px; }
.dm-threads { overflow-y: auto; }
.dm-thread { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.dm-thread span { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.dm-thread small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-thread.active, .dm-thread:hover { background: var(--surface2); color: var(--text); }
.dm-thread em.hot { font-style: normal; background: var(--danger); color: #fff; font-size: .72rem; padding: 1px 7px; border-radius: 10px; }
.dm-conv { display: flex; flex-direction: column; min-height: 0; }
.dm-head { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.dm-head > div { display: flex; flex-direction: column; }
.dm-material { display: flex; gap: 10px; align-items: center; margin: 10px 14px 0; padding: 8px; border-radius: var(--radius-sm); background: var(--surface2); }
.dm-material img { width: 80px; border-radius: 6px; }
.dm-material > div { display: flex; flex-direction: column; flex: 1; }
.dm-conv > .notice { margin: 10px 14px 0; }
.dm-messages { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.dm-msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 78%; }
.dm-msg.mine { align-self: flex-end; align-items: flex-end; }
.bubble { padding: 9px 13px; border-radius: 14px 14px 14px 4px; background: var(--surface2); overflow-wrap: anywhere; }
.dm-msg.mine .bubble { background: var(--accent); color: var(--accent-text); border-radius: 14px 14px 4px 14px; }
.dm-msg.mine .bubble a { color: inherit; text-decoration: underline; }
.dm-msg small { color: var(--muted); font-size: .7rem; margin-top: 2px; }
.dm-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); }
.dm-form textarea { min-height: 42px; max-height: 160px; }

/* ---------- account / profile / authors ---------- */
.account-nav .profile-top { padding: 6px 6px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: var(--gap); }
.stat-card { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; }
.stat-card .i { color: var(--accent); width: 22px; height: 22px; margin-bottom: 4px; }
.stat-card b { font-size: 1.5rem; }
.stat-card small { color: var(--muted); }
a.stat-card:hover { border-color: var(--accent); color: var(--text); }
.stat-card.warn { border-color: #f59e0b88; }
.stat-card.bad { border-color: #ef444499; }
.avatar-edit { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.profile-hero { position: relative; overflow: hidden; margin-bottom: var(--gap); }
.profile-hero .hero-art { position: absolute; inset: 0; height: 160px; opacity: .8; }
.profile-hero-body { position: relative; display: flex; gap: 18px; align-items: flex-end; padding: 90px 20px 14px; flex-wrap: wrap; }
.profile-id h1 { margin: 0; display: flex; align-items: center; gap: 6px; }
.profile-id p { margin: 0; }
.profile-stats { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); border-top: 1px solid var(--border); }
.profile-stats div { display: flex; flex-direction: column; align-items: center; padding: 12px 6px; border-right: 1px solid var(--border); text-align: center; }
.profile-stats b { font-size: 1.15rem; }
.profile-stats small { color: var(--muted); font-size: .74rem; }
.authors-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.author-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 20px 14px 14px; text-align: center; }
.author-tile:hover { border-color: var(--accent); color: var(--text); }
.author-tile .author-rank { position: absolute; top: 10px; left: 10px; }
.author-tile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; width: 100%; margin-top: 8px; }
.author-tile-stats span { display: flex; flex-direction: column; padding: 6px 2px; border-radius: 8px; background: var(--surface2); }
.author-tile-stats small { color: var(--muted); font-size: .68rem; }
.auth-wrap { display: grid; place-items: center; min-height: 60vh; }
.auth-card { width: min(440px, 100%); padding: 26px; display: flex; flex-direction: column; gap: 6px; }
.auth-card .brand { align-self: center; margin-bottom: 10px; }
.auth-card h1 { text-align: center; }
.secret { font-size: 1rem; padding: 4px 8px; letter-spacing: .05em; }

/* ---------- modal ---------- */
.modal { border: 1px solid var(--border2); border-radius: var(--radius); background: var(--surface); color: var(--text); padding: 0; width: min(480px, 92vw); box-shadow: var(--shadow); }
.modal::backdrop { background: #000a; }
.modal-body { padding: 20px; margin: 0; }
.modal-body h2 { display: flex; align-items: center; gap: 8px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

/* ---------- theme picker ---------- */
.preview-bar { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 120; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--accent); box-shadow: var(--shadow); font-size: .85rem; max-width: calc(100vw - 20px); }
.preview-bar .i { color: var(--accent); }
.preview-bar form { display: flex; gap: 6px; }
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--gap); }
.theme-card { overflow: hidden; display: flex; flex-direction: column; }
.theme-card.is-active { border-color: var(--success); box-shadow: 0 0 0 1px var(--success); }
.theme-shot { position: relative; aspect-ratio: 16 / 8; background: var(--cb); overflow: hidden; }
.theme-shot img { width: 100%; height: 100%; object-fit: cover; object-position: 70% center; }
.theme-shot::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, color-mix(in srgb, var(--cb) 85%, transparent), transparent 70%); }
.theme-shot-bar { position: absolute; left: 12px; right: 12px; top: 10px; z-index: 1; display: flex; gap: 6px; }
.theme-shot-bar i { height: 8px; border-radius: 4px; background: var(--c1); flex: 1; opacity: .9; }
.theme-shot-bar i:nth-child(2) { background: var(--c2); flex: .6; }
.theme-shot-bar i:nth-child(3) { background: #fff3; flex: 2; }
.theme-badge { position: absolute; right: 10px; bottom: 10px; z-index: 1; }
.theme-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.theme-body h3 { margin: 0; text-transform: none; font-style: normal; }
.theme-body form { margin-top: auto; }
.theme-swatches { display: flex; gap: 6px; }
.theme-swatches span { width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--border2); }

/* ---------- partners ---------- */
.partners { padding: 8px 0 4px; }
.partners-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; color: var(--muted); font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.partners-head span { display: inline-flex; align-items: center; gap: 6px; }
.partners-head .i { color: var(--accent); width: 14px; height: 14px; }
.partners-head::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.partners-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.partner { display: flex; align-items: center; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); transition: border-color .15s, transform .15s; min-height: 64px; overflow: hidden; }
.partner:hover { border-color: var(--accent); color: var(--text); transform: translateY(-1px); }
.partner-card { gap: 12px; padding: 10px 14px; }
.partner-logo { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; flex: none; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.partner-logo .i { width: 22px; height: 22px; }
.partner-body { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.3; }
.partner-body small { color: var(--muted); font-size: .8rem; }
.partner-go { flex: none; white-space: nowrap; }
.partner-go .i { width: 14px; height: 14px; }
.partner-host { display: inline-flex; align-items: center; gap: 4px; font-style: normal; font-size: .74rem; color: var(--accent); margin-top: 3px; }
.partner-host .i { width: 12px; height: 12px; }
.partner-card.has-cover { position: relative; isolation: isolate; min-height: 120px; padding: 16px 18px; border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.partner-card.has-cover::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, color-mix(in srgb, var(--bg) 94%, transparent) 25%, color-mix(in srgb, var(--bg) 55%, transparent) 62%, color-mix(in srgb, var(--bg) 15%, transparent)), var(--cover) 70% center / cover no-repeat; transition: transform .4s; }
.partner-card.has-cover:hover::before { transform: scale(1.05); }
.partner-card.has-cover .partner-body b { font-size: 1.12rem; }
.partner-card.has-cover .partner-body small { color: color-mix(in srgb, var(--text) 82%, transparent); max-width: 340px; }
.partner-card.has-cover .partner-logo { width: 48px; height: 48px; background: color-mix(in srgb, var(--accent) 28%, #0008); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 50%, transparent); backdrop-filter: blur(4px); }
.cover-pick { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.cover-opt { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 0; cursor: pointer; font-weight: 500; }
.cover-opt input { position: absolute; opacity: 0; }
.cover-opt img, .cover-none { width: 120px; height: 56px; object-fit: cover; border-radius: 8px; border: 2px solid var(--border2); display: grid; place-items: center; color: var(--muted); }
.cover-opt input:checked ~ img, .cover-opt input:checked ~ .cover-none { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent); }
.cover-opt input:focus-visible ~ img { outline: 2px solid var(--accent); }
.partner-banner { justify-content: center; padding: 10px; background: #0003; }
.partner-banner img { max-width: 100%; height: auto; max-height: 90px; object-fit: contain; }
.partner-banner.has-cover { position: relative; isolation: isolate; min-height: 120px; padding: 16px; border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.partner-banner.has-cover::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, color-mix(in srgb, var(--bg) 55%, transparent), color-mix(in srgb, var(--bg) 35%, transparent)), var(--cover) center / cover no-repeat; transition: transform .4s; }
.partner-banner.has-cover:hover::before { transform: scale(1.05); }
.partner-banner.has-cover img { box-shadow: 0 0 10px rgba(0, 0, 0, .5); border: 2px groove lightgray; transition: transform .2s; }
.partner-banner.has-cover:hover img { transform: scale(1.02); }
.partner-thumb { max-width: 180px; max-height: 50px; border-radius: 6px; border: 1px solid var(--border); }
@media (max-width: 600px) { .partner-go { display: none; } .partners-grid { grid-template-columns: minmax(0, 1fr); } .partner-card.has-cover { min-height: 100px; } }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg2); padding: 30px 0 16px; margin-top: 20px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 24px; }
.footer-grid h3 { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.footer-grid > div > a { display: block; padding: 4px 0; font-size: .88rem; }
.footer-brand p { margin-top: 12px; font-size: .86rem; }
.footer-note { display: flex; gap: 8px; font-size: .8rem; color: var(--warn); }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; border-top: 1px solid var(--border); margin-top: 22px; padding-top: 14px; }
.legal-links { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .82rem; }
.footer-prefs { display: flex; gap: 10px; align-items: center; }
.footer-bottom p { margin: 0; flex-basis: 100%; }

/* ---------- admin ---------- */
.is-admin .admin-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.admin-side { background: var(--bg2); border-right: 1px solid var(--border); }
.admin-side .drawer-panel { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 14px 10px; display: flex; flex-direction: column; gap: 4px; }
.admin-brand { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 12px; }
.admin-group { display: flex; flex-direction: column; gap: 1px; margin-bottom: 8px; }
.admin-main { min-width: 0; display: flex; flex-direction: column; }
.admin-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 12px 22px; border-bottom: 1px solid var(--border); background: var(--header-bg); backdrop-filter: blur(10px); }
.admin-top h1 { margin: 0; font-size: 1.25rem; flex: 1; }
.admin-content { padding: 20px 22px 40px; }
.row-item { display: flex; gap: 10px; align-items: center; padding: 9px 16px; border-bottom: 1px solid var(--border); }
.row-item > div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.row-item img { border-radius: 5px; width: 72px; }
.row-item:last-child { border-bottom: 0; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 140px; padding: 10px 16px 0; }
.bar-col { flex: 1; display: flex; align-items: flex-end; gap: 2px; height: 100%; position: relative; padding-bottom: 18px; }
.bar { flex: 1; min-height: 2px; border-radius: 3px 3px 0 0; }
.bar.b1, .legend.b1 { background: var(--success); }
.bar.b2, .legend.b2 { background: var(--accent); }
.bar-col small { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); font-size: .6rem; color: var(--muted); white-space: nowrap; }
.legend { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin: 0 4px 0 12px; }
.bars + p { padding: 0 16px 12px; }
.quick-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 0 16px 16px; }
.bulk-bar { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.bulk-bar select { width: auto; min-height: 32px; padding: 4px 8px; }
.actions-cell { min-width: 220px; }
details.more { position: relative; }
details.more summary { list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
.more-menu { position: absolute; right: 0; top: 100%; z-index: 10; background: var(--surface); border: 1px solid var(--border2); border-radius: 8px; padding: 4px; min-width: 170px; box-shadow: var(--shadow); }
.more-menu button { display: block; width: 100%; text-align: left; background: none; border: 0; color: var(--text); padding: 7px 10px; border-radius: 6px; cursor: pointer; font: inherit; font-size: .84rem; }
.more-menu button:hover { background: var(--surface2); }
.perm-table td, .perm-table th { text-align: center; }
.perm-table td:first-child, .perm-table th:first-child { text-align: left; }
.i18n-table textarea { min-height: 34px; padding: 6px 8px; font-size: .82rem; }
.i18n-table textarea.overridden { border-color: var(--warn); }
.i18n-table textarea.missing { border-color: var(--danger); }
.i18n-table td:first-child { width: 200px; }
.admin-user-head { display: flex; gap: 16px; align-items: center; padding: 16px; margin-bottom: var(--gap); flex-wrap: wrap; }
.admin-user-head h2 { margin: 0; }
.report-list { display: flex; flex-direction: column; gap: 10px; }
.report { padding: 14px 16px; }
.report-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.req-table td:last-child { text-align: right; }
.sticky-save { position: sticky; bottom: 10px; display: flex; justify-content: flex-end; }
.log { font-size: .74rem; }
.is-install { background: radial-gradient(ellipse at top, color-mix(in srgb, var(--accent) 20%, var(--bg)), var(--bg) 60%); }
.install { padding: 30px 16px 60px; max-width: 980px; }
.install-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; gap: 12px; flex-wrap: wrap; }
.install-grid { display: flex; flex-direction: column; }
.install-grid h3 { display: flex; gap: 8px; align-items: center; margin-top: 14px; }

/* ---------- responsive ---------- */
.show-md { display: none !important; }
@media (max-width: 1440px) {
  .header-single .main-nav .nav-link:not(.active) span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .header-single .main-nav .nav-link:not(.active) { padding: 9px; }
}
@media (max-width: 1280px) {
  .header-single .main-nav .nav-link:nth-child(n+6) { display: none; }
}
@media (max-width: 1360px) {
  .layout-3 { grid-template-columns: 230px minmax(0, 1fr) 300px; }
  .material-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .material-hero .action-box { grid-column: 1 / -1; }
  .mcard-row { grid-template-columns: 180px minmax(0, 1fr) 160px; }
  .user-meta { display: none; }
}
@media (max-width: 1180px) {
  .layout-3 { grid-template-columns: minmax(0, 1fr) 300px; }
  .layout-3 > .col-left { display: none; }
  .main-nav .nav-link span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .header-single .main-nav .nav-link { padding: 9px; }
  .chat-layout { grid-template-columns: 210px minmax(0, 1fr); }
  .hide-md { display: none !important; }
  .cat-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1023px) {
  .burger { display: inline-grid; }
  .header-single .main-nav, .header-nav, .header-banner { display: none; }
  .show-md { display: inline-flex !important; }
  .layout-3, .layout-2, .layout-side, .hero-row, .submit-layout, .grid-2, .grid-wide-left { grid-template-columns: minmax(0, 1fr); }
  .col-right { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
  .col-right > .panel { margin: 0; }
  .hero-row .profile-card { display: none; }
  .drawer-md { position: fixed; inset: 0; z-index: 100; background: #000a; display: none; }
  .drawer-md.open { display: block; }
  .drawer-md > .drawer-panel, .drawer-md > form.drawer-panel { position: absolute; top: 0; bottom: 0; left: 0; width: min(340px, 90vw); border-radius: 0; overflow-y: auto; margin: 0; animation: slideIn .2s ease-out; }
  .filter-form { position: absolute; top: 0; }
  .is-admin .admin-shell { grid-template-columns: 1fr; }
  .admin-side { border: 0; }
  .admin-side .drawer-panel { height: 100%; background: var(--bg2); }
  .submit-aside .sticky { position: static; }
  .chat-layout { grid-template-columns: minmax(0, 1fr); height: auto; }
  .chat-rooms { display: flex; overflow-x: auto; overflow-y: hidden; padding: 6px; gap: 4px; }
  .chat-rooms .panel-head, .chat-rooms > p { display: none; }
  .room { flex: none; border-radius: 999px; padding: 7px 12px; }
  .chat-main { height: calc(100dvh - 210px); min-height: 420px; }
  .dm-layout { grid-template-columns: minmax(0, 1fr); height: auto; }
  .dm-layout.has-thread .dm-threads { display: none; }
  .dm-layout:not(.has-thread) .dm-conv { display: none; }
  .dm-conv { height: calc(100dvh - 160px); min-height: 420px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
  .search { max-width: none; }
  .profile-stats { grid-template-columns: repeat(3, 1fr); }
  .forum-row { grid-template-columns: minmax(0, 1fr) 70px 70px; }
  .forum-last, .forum-row-head span:last-child { display: none; }
}
@media (max-width: 768px) {
  body { font-size: 14.5px; }
  .site-main { padding-top: 12px; }
  .header-main { gap: 8px; min-height: 58px; flex-wrap: wrap; }
  .header-main .search { order: 10; flex-basis: 100%; margin: 0 0 10px; }
  .header-main .search kbd { display: none; }
  .header-actions .lang-switch { display: none; }
  .brand-tag { display: none; }
  .header-actions { margin-left: auto; }
  .hero { min-height: 240px; }
  .mode-tiles { grid-template-columns: minmax(0, 1fr); }
  .mcard-row { grid-template-columns: 130px minmax(0, 1fr); }
  .mcard-row .mcard-actions { grid-column: 1 / -1; flex-direction: row; }
  .mcard-row .mcard-actions .btn { flex: 1; }
  .mcard-row .mcard-price { display: none; }
  .mcard-row .mcard-excerpt { display: none; }
  .col-right { grid-template-columns: minmax(0, 1fr); }
  .material-hero { grid-template-columns: minmax(0, 1fr); padding: 12px; }
  .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: 10px 14px; }
  .post-author .avatar.lg { width: 40px; height: 40px; }
  .topic-row { grid-template-columns: auto minmax(0, 1fr) 60px; }
  .hide-sm { display: none !important; }
  .library-search { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .library-search .input-icon { grid-column: 1 / -1; }
  .dist-switch { grid-template-columns: minmax(0, 1fr); }
  .form-grid .span-2 { grid-column: auto; }
  .cat-tiles, .stats-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spec-wide > div { grid-template-columns: 130px 1fr; }
  .admin-content { padding: 14px 12px 30px; }
  .admin-top { padding: 10px 12px; }
  .admin-top .user-meta { display: none; }
  .actions-cell { min-width: 160px; }
  .toolbar-sort { margin-left: 0; width: 100%; }
  .toolbar-sort select { flex: 1; }
}
@media (max-width: 600px) {
  .page-head { align-items: stretch; }
  .page-head .btn-row { width: 100%; }
  .page-head .btn-row .btn { flex: 1; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .mcard-tile .mcard-excerpt, .mcard-tile .mcard-tags { display: none; }
  .mcard-foot { flex-wrap: wrap; }
  .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
  .profile-hero-body { padding-top: 70px; }
  .avatar.xxl { width: 84px; height: 84px; font-size: 2rem; }
  .shop-item { grid-template-columns: 70px minmax(0, 1fr); }
  .shop-thumb img { width: 70px; }
  .shop-side { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
  .quick-grid { grid-template-columns: minmax(0, 1fr); }
  .stat-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .banner-strip .btn-row { width: 100%; }
  .banner-strip .btn-row .btn { flex: 1; }
  .dm-msg { max-width: 90%; }
}
@media (max-width: 430px) {
  .container { padding: 0 10px; }
  .header-actions .btn-ghost.hide-xs, .hide-xs { display: none !important; }
  .mcard-row { grid-template-columns: minmax(0, 1fr); }
  .mcard-row .mcard-thumb img { aspect-ratio: 2 / 1; }
  .card-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-features { flex-direction: column; gap: 10px; }
  .steps { display: none; }
  .profile-stats { grid-template-columns: repeat(2, 1fr); }
  .spec > div { grid-template-columns: 95px 1fr; }
  .forum-row { grid-template-columns: minmax(0, 1fr) 56px; }
  .forum-row > .num:nth-of-type(2), .forum-row-head span:nth-child(3) { display: none; }
  .gallery-thumbs { grid-template-columns: repeat(3, 1fr); }
  .stats-bar div { padding: 10px; }
  .auth-card { padding: 18px; }
  .btn-lg { min-height: 50px; padding: 10px 16px; }
}
@media (max-width: 360px) {
  body { font-size: 14px; }
  .brand-name { font-size: 1.1rem; }
  .brand-mark { width: 30px; height: 30px; }
  .icon-btn { width: 36px; height: 36px; }
  .header-actions { gap: 5px; }
  .header-actions .btn-sm { padding: 6px 9px; }
  .cat-tiles, .stats-bar, .stat-cards { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .chat-form .icon-btn[data-emoji] { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
