:root {
  --bg: #17141f;
  --bg-deep: #120f19;
  --card: #211d2d;
  --card-soft: #272235;
  --card-raised: #2d273d;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f0edf7;
  --muted: #aaa4bc;
  --muted-2: #7e7792;
  --accent: #b4bcff;
  --accent-strong: #8f7cf4;
  --accent-bg: rgba(143, 124, 244, 0.14);
  --accent-line: rgba(168, 157, 255, 0.34);
  --success: #66d7aa;
  --danger: #ff7887;
  --warning: #f1c36d;
  --radius: 16px;
  --radius-sm: 10px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --shadow: 0 14px 38px rgba(0, 0, 0, 0.24);
  --header-h: 76px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(800px 480px at 20% -10%, rgba(120, 102, 220, 0.16), transparent 60%),
    radial-gradient(720px 440px at 100% 8%, rgba(75, 116, 190, 0.10), transparent 62%),
    var(--bg);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(180, 188, 255, 0.28); color: #fff; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 2000; top: -70px; left: 16px; padding: 10px 14px; border-radius: 9px; background: var(--accent); color: #17121f; font-weight: 700; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.icon { display: inline-block; flex: none; vertical-align: -0.15em; }
.container { width: min(1200px, calc(100% - 40px)); margin: 0 auto; }
.card {
  background: linear-gradient(180deg, rgba(42, 37, 55, 0.94), rgba(31, 27, 42, 0.96));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.muted-text { color: var(--muted); font-size: 13px; line-height: 1.55; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px; color: var(--accent);
  font-size: 11px; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase;
}
.dot-sep { color: var(--muted-2); }
.text-link { display: inline-flex; align-items: center; gap: 5px; color: var(--accent); font-size: 13px; font-weight: 650; }
.text-link:hover { color: #e0e3ff; text-decoration: underline; }
.avatar {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  border-radius: 50%; color: #17121f; font-weight: 800; letter-spacing: -0.02em;
  background: linear-gradient(135deg, #d6c9ff, #8e9cff);
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.avatar-xs { width: 30px; height: 30px; font-size: 10px; }
.avatar-xxs { width: 23px; height: 23px; font-size: 8px; border-radius: 7px; }
.avatar-sm { width: 38px; height: 38px; font-size: 12px; }
.avatar-md { width: 50px; height: 50px; font-size: 15px; }
.avatar-lg { width: 78px; height: 78px; font-size: 23px; }
.avatar-xl { width: 104px; height: 104px; font-size: 32px; }
.role-badge { display: inline-flex; width: fit-content; padding: 3px 8px; border-radius: 6px; color: var(--muted); background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); font-size: 10px; font-weight: 650; }
.role-admin { color: #f5d48e; border-color: rgba(241, 195, 109, 0.24); background: rgba(241, 195, 109, 0.08); }
.role-moderator { color: #b3c7ff; border-color: rgba(143, 170, 255, 0.25); background: rgba(143, 170, 255, 0.08); }
.badge { display: inline-flex; padding: 2px 6px; border-radius: 5px; font-size: 9px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; vertical-align: 2px; }
.badge-pin { color: #f5d48e; background: rgba(241, 195, 109, 0.09); border: 1px solid rgba(241, 195, 109, 0.2); }
.badge-closed { color: var(--muted); background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 99px; color: var(--success); background: rgba(102, 215, 170, 0.06); border: 1px solid rgba(102, 215, 170, 0.18); font-size: 10px; font-weight: 700; white-space: nowrap; }
.status-pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.notice { display: flex; align-items: flex-start; gap: 9px; margin-top: 14px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); background: rgba(255, 255, 255, 0.025); font-size: 13px; line-height: 1.55; }
.notice-soft { background: rgba(255, 255, 255, 0.025); }
.notice-accent { border-color: rgba(143, 124, 244, 0.25); background: rgba(143, 124, 244, 0.08); color: #edeaff; }
.notice strong { color: var(--text); }
.notice .icon { color: var(--accent); }

/* ---------- buttons ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 42px; padding: 0 17px; border: 1px solid transparent; border-radius: 9px;
  background: transparent; cursor: pointer; color: var(--text); font-size: 13px; font-weight: 650;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.button-primary { color: #171223; background: linear-gradient(135deg, #b8c0ff, #8b7cf4); border-color: #c0c7ff; }
.button-primary:hover { background: linear-gradient(135deg, #cbd0ff, #9b8ff7); }
.button-quiet { color: var(--text); background: rgba(255, 255, 255, 0.035); border-color: var(--line-strong); }
.button-quiet:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.26); }
.button-small { min-height: 35px; padding: 0 12px; font-size: 12px; }
.button-wide { width: 100%; }
.button:disabled { opacity: 0.5; cursor: not-allowed; }
.text-link .icon { transition: transform 0.15s ease; }
.text-link:hover .icon { transform: translateX(2px); }
.icon-button { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.icon-button:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); border-color: var(--line); }
.logout-form { display: flex; }

/* ---------- header ---------- */
.site-header {
  position: fixed; z-index: 100; top: 0; left: 0; right: 0; min-height: var(--header-h);
  background: rgba(21, 18, 29, 0.92); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.header-content { width: min(1200px, calc(100% - 40px)); min-height: var(--header-h); margin: 0 auto; display: flex; align-items: center; gap: 25px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand-mark { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; color: #171223; background: linear-gradient(135deg, #c7bcff, #8995ff); box-shadow: 0 5px 16px rgba(143, 124, 244, 0.22); font-size: 19px; font-weight: 850; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.05; }
.brand-copy strong { font-size: 17px; letter-spacing: -0.04em; }
.brand-copy small { color: var(--muted-2); font-size: 9px; text-transform: uppercase; letter-spacing: 0.18em; margin-top: 4px; }
.desktop-nav { display: flex; align-items: center; gap: 4px; margin-left: 12px; }
.nav-link {
  display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 0 13px;
  border: 1px solid transparent; border-radius: 20px; color: var(--muted); background: transparent;
  font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.nav-link:hover, .nav-link.is-active { color: var(--text); background: rgba(255, 255, 255, 0.06); border-color: var(--line); }
.nav-link.is-active { color: var(--accent); }
.nav-dropdown { position: relative; }
.nav-dropdown-toggle { appearance: none; }
.nav-dropdown-menu {
  position: absolute; z-index: 20; top: calc(100% + 7px); left: 0; min-width: 190px; padding: 6px;
  border: 1px solid var(--line); border-radius: 11px; background: #282333;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35); opacity: 0; visibility: hidden;
  transform: translateY(-4px); transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
}
.nav-dropdown.open .nav-dropdown-menu, .nav-dropdown:focus-within .nav-dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-dropdown-menu a { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 7px; color: var(--muted); font-size: 12px; }
.nav-dropdown-menu a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.header-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.header-user { display: flex; align-items: center; gap: 8px; padding: 3px 8px 3px 3px; border-radius: 22px; color: var(--muted); }
.header-user:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.header-user-name { font-size: 12px; font-weight: 600; }
.menu-toggle { display: none; width: 38px; height: 38px; padding: 9px 7px; border: 1px solid var(--line); border-radius: 9px; background: transparent; cursor: pointer; }
.menu-toggle span { display: block; height: 1.5px; margin: 4px 0; border-radius: 2px; background: var(--muted); }
.mobile-overlay { display: none; position: fixed; z-index: 110; inset: 0; background: rgba(6, 5, 10, 0.7); opacity: 0; visibility: hidden; transition: opacity 0.2s ease, visibility 0.2s ease; }
.mobile-drawer {
  display: none; position: fixed; z-index: 120; top: 0; bottom: 0; left: 0; width: 300px; max-width: 88vw;
  padding: 20px; overflow-y: auto; background: #211d2d; border-right: 1px solid var(--line);
  transform: translateX(-102%); transition: transform 0.22s ease;
}
.mobile-drawer.open { transform: translateX(0); }
.drawer-head { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.drawer-profile { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.drawer-profile span:not(.avatar) { min-width: 0; }
.drawer-profile strong { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-profile small { display: block; margin-top: 2px; color: var(--muted-2); font-size: 10px; }
.drawer-guest { color: var(--muted); font-size: 14px; }
.drawer-head .button { width: 100%; }
.drawer-close { position: absolute; top: -3px; right: -3px; width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; font-size: 24px; line-height: 1; }
.drawer-close:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.drawer-nav { display: flex; flex-direction: column; gap: 19px; margin-top: 21px; }
.drawer-group { display: flex; flex-direction: column; gap: 2px; }
.drawer-group h3 { margin: 0 0 5px 11px; color: var(--muted-2); font-size: 10px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.drawer-group a, .drawer-group button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 7px 11px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); text-align: left; font-size: 13px; cursor: pointer; }
.drawer-group a:hover, .drawer-group button:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.drawer-group .icon { color: var(--accent); }
.drawer-logout { margin: 4px 0 0; }
.drawer-logout button { color: var(--danger); }
.drawer-foot { display: flex; flex-direction: column; gap: 5px; margin-top: 35px; padding: 14px 11px 0; border-top: 1px solid var(--line); color: var(--muted-2); font-size: 10px; }
.drawer-foot a { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); }
body.menu-open { overflow: hidden; }

/* ---------- shell / footer ---------- */
.main-content { position: relative; padding-top: calc(var(--header-h) + 22px); padding-bottom: 0; }
.flash-stack { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.flash { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--card); color: var(--text); font-size: 13px; }
.flash-success { border-color: rgba(102, 215, 170, 0.25); background: rgba(102, 215, 170, 0.07); }
.flash-error { border-color: rgba(255, 120, 135, 0.28); background: rgba(255, 120, 135, 0.07); }
.flash-close { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 20px; line-height: 1; }
.site-footer { margin-top: 55px; border-top: 1px solid var(--line); background: rgba(17, 14, 24, 0.52); }
.footer-content { width: min(1200px, calc(100% - 40px)); margin: 0 auto; display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 45px; padding: 35px 0 27px; }
.footer-brand p { max-width: 360px; margin-top: 14px; color: var(--muted-2); font-size: 12px; line-height: 1.6; }
.footer-links { display: flex; flex-direction: column; gap: 7px; align-items: flex-start; }
.footer-links h4 { margin-bottom: 3px; color: var(--text); font-size: 12px; font-weight: 700; }
.footer-links a { color: var(--muted); font-size: 12px; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { width: min(1200px, calc(100% - 40px)); margin: 0 auto; display: flex; justify-content: space-between; padding: 13px 0 20px; border-top: 1px solid var(--line); color: var(--muted-2); font-size: 10px; }

/* ---------- page headings ---------- */
.page-heading { margin: 6px 0 21px; }
.page-heading-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.page-heading h1 { margin: 7px 0 5px; color: var(--text); font-size: 34px; line-height: 1.08; letter-spacing: -0.045em; }
.page-heading p { color: var(--muted); font-size: 13px; }
.narrow-page { max-width: 720px; margin: 0 auto; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin: 29px 0 12px; }
.section-heading h2 { margin-top: 5px; font-size: 22px; letter-spacing: -0.035em; }

/* ---------- breadcrumbs ---------- */
.breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin: 0 0 14px; padding: 10px 14px; border-radius: 10px; color: var(--muted-2); font-size: 11px; }
.breadcrumbs a { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.breadcrumbs a:hover { color: var(--accent); }
.crumb-sep { color: var(--muted-2); }
.crumb-current { color: var(--text); }

/* ---------- forum index ---------- */
.board-head { display: flex; align-items: center; justify-content: space-between; gap: 25px; padding: 25px 27px; }
.board-head-main { display: flex; align-items: flex-start; gap: 16px; min-width: 0; }
.board-icon { width: 63px; height: 63px; display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: 17px; color: var(--accent); background: var(--accent-bg); border: 1px solid var(--accent-line); }
.board-head h1 { margin: 5px 0 4px; font-size: 31px; line-height: 1.1; letter-spacing: -0.045em; }
.board-head p { max-width: 650px; color: var(--muted); font-size: 13px; }
.board-meta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 11px; color: var(--muted-2); font-size: 10px; }
.board-meta span { display: inline-flex; align-items: center; gap: 5px; }
.board-meta .icon { color: var(--accent); }
.board-actions { display: flex; flex: none; gap: 7px; }
.latest-strip { margin-top: 13px; padding: 16px 20px; }
.strip-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.strip-head h2 { font-size: 16px; letter-spacing: -0.02em; }
.strip-head span { color: var(--muted-2); font-size: 10px; }
.latest-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 18px; }
.latest-row { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 7px 3px; border-radius: 7px; color: var(--muted); }
.latest-row:hover { color: var(--text); background: rgba(255, 255, 255, 0.03); }
.latest-row-copy { min-width: 0; flex: 1; }
.latest-row strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 600; }
.latest-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; color: var(--muted-2); font-size: 9px; }
.latest-row > .icon { color: var(--muted-2); }

.forum-sections { display: flex; flex-direction: column; gap: 13px; margin-top: 13px; }
.forum-section { overflow: hidden; }
.forum-section-head { display: flex; align-items: center; gap: 12px; padding: 17px 20px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.025); }
.group-icon { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: 12px; color: var(--accent); background: var(--accent-bg); border: 1px solid var(--accent-line); }
.forum-section-copy { min-width: 0; flex: 1; }
.forum-section-copy h2 { font-size: 17px; letter-spacing: -0.025em; }
.forum-section-copy p { margin-top: 2px; color: var(--muted-2); font-size: 11px; }
.group-count { color: var(--muted-2); font-size: 10px; white-space: nowrap; }
.category-list { display: flex; flex-direction: column; }
.category-row { --accent-color: var(--accent); position: relative; display: flex; align-items: center; gap: 14px; min-width: 0; padding: 15px 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.055); transition: background 0.15s ease; }
.category-row:last-child { border-bottom: 0; }
.category-row:hover { background: rgba(255, 255, 255, 0.035); }
.category-hit { position: absolute; z-index: 1; inset: 0; border-radius: 1px; }
.category-row > *:not(.category-hit) { position: relative; z-index: 2; pointer-events: none; }
.category-row .category-last a { position: relative; z-index: 3; pointer-events: auto; }
.category-row .category-icon, .category-row .category-arrow { pointer-events: none; }
.category-icon { width: 43px; height: 43px; display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: 11px; color: var(--accent-color); background: rgba(255, 255, 255, 0.055); border: 1px solid rgba(255, 255, 255, 0.09); }
.category-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.category-top { display: flex; align-items: center; gap: 11px; min-width: 0; }
.category-top strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-size: 14px; font-weight: 650; }
.category-stats { display: flex; gap: 12px; margin-left: auto; color: var(--muted-2); font-size: 10px; white-space: nowrap; }
.category-description { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; color: var(--muted); font-size: 11px; }
.category-last { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-top: 5px; color: var(--muted-2); font-size: 9px; }
.category-last .icon { color: var(--muted-2); }
.category-last a { color: var(--muted); }
.category-last a:hover { color: var(--accent); }
.category-arrow { color: var(--muted-2); flex: none; }
.category-row:hover .category-arrow { color: var(--accent); }
.accent-violet { --accent-color: #b1a5ff; }
.accent-blue { --accent-color: #8cb8ff; }
.accent-amber { --accent-color: #edc87c; }
.accent-red { --accent-color: #ff9a9f; }
.accent-orange { --accent-color: #f2b47d; }
.accent-pink { --accent-color: #f2a4d0; }
.accent-green { --accent-color: #8bdfac; }
.accent-cyan { --accent-color: #89dce6; }
.accent-teal { --accent-color: #78dbc7; }

.forum-stats { margin-top: 13px; padding: 20px; }
.stats-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.stats-head h2 { font-size: 17px; letter-spacing: -0.025em; }
.stats-head span { color: var(--muted-2); font-size: 10px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.stat-card { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, 0.025); }
.stat-icon { display: inline-flex; margin-bottom: 5px; color: var(--accent); }
.stat-card strong { font-size: 22px; line-height: 1; letter-spacing: -0.045em; }
.stat-card > span:last-child { color: var(--muted-2); font-size: 10px; }
.forum-note { display: flex; align-items: flex-start; gap: 9px; margin-top: 13px; padding: 11px 13px; border-radius: 8px; background: rgba(143, 124, 244, 0.06); color: var(--muted); font-size: 11px; }
.forum-note .icon { color: var(--accent); margin-top: 1px; }

/* ---------- category / topics ---------- */
.category-head { display: flex; align-items: center; gap: 16px; padding: 21px 24px; border-color: rgba(255, 255, 255, 0.12); }
.category-head-icon { width: 67px; height: 67px; display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: 17px; color: var(--accent-color); background: rgba(255, 255, 255, 0.055); border: 1px solid rgba(255, 255, 255, 0.1); }
.category-head-copy { min-width: 0; flex: 1; }
.category-head h1 { margin: 4px 0 3px; font-size: 29px; letter-spacing: -0.045em; line-height: 1.1; }
.category-head p { color: var(--muted); font-size: 12px; }
.category-head-meta { display: block; margin-top: 7px; color: var(--muted-2); font-size: 10px; }
.category-head-actions { flex: none; }
.topics-panel { margin-top: 13px; overflow: hidden; }
.topics-table-head { display: grid; grid-template-columns: minmax(0, 1fr) 75px 85px 155px; gap: 14px; padding: 12px 20px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.035); color: var(--muted-2); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.topics-list { display: flex; flex-direction: column; }
.topic-row { display: grid; grid-template-columns: minmax(0, 1fr) 75px 85px 155px; gap: 14px; align-items: center; padding: 14px 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.055); }
.topic-row:last-child { border-bottom: 0; }
.topic-row:hover { background: rgba(255, 255, 255, 0.03); }
.topic-main { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.topic-status { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: 8px; color: var(--accent); background: var(--accent-bg); }
.topic-status.is-pinned { color: var(--warning); background: rgba(241, 195, 109, 0.08); }
.topic-status.is-locked { color: var(--muted); background: rgba(255, 255, 255, 0.05); }
.topic-copy { min-width: 0; }
.topic-copy > strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-size: 13px; font-weight: 650; }
.topic-copy > strong:hover { color: var(--accent); }
.topic-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-top: 4px; color: var(--muted-2); font-size: 9px; }
.topic-number { display: flex; flex-direction: column; gap: 1px; color: var(--muted); font-size: 10px; }
.topic-number strong { color: var(--text); font-size: 14px; font-weight: 650; }
.topic-number small { color: var(--muted-2); font-size: 9px; }
.topic-last { display: flex; flex-direction: column; gap: 2px; color: var(--muted); font-size: 10px; }
.topic-last strong { font-size: 10px; font-weight: 600; }
.topic-last small { color: var(--muted-2); font-size: 9px; }

.empty-state { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 35px; color: var(--muted); }
.empty-state.small-empty { padding: 24px 10px; }
.empty-icon { width: 57px; height: 57px; display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: 14px; color: var(--accent); background: var(--accent-bg); border: 1px solid var(--accent-line); }
.empty-state h3 { color: var(--text); font-size: 16px; }
.empty-state p { margin-top: 3px; color: var(--muted); font-size: 12px; }
.empty-state .button { margin-left: auto; }

/* ---------- topic posts ---------- */
.topic-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 23px 25px; }
.topic-head-copy { min-width: 0; }
.topic-head h1 { margin: 6px 0 9px; font-size: 30px; line-height: 1.16; letter-spacing: -0.045em; overflow-wrap: anywhere; }
.topic-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: var(--muted-2); font-size: 10px; }
.post-list { display: flex; flex-direction: column; gap: 9px; margin-top: 13px; }
.post-card { display: grid; grid-template-columns: 172px minmax(0, 1fr); overflow: hidden; }
.post-first { border-color: rgba(143, 124, 244, 0.28); }
.post-side { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 20px; border-right: 1px solid var(--line); background: rgba(255, 255, 255, 0.025); }
.post-side a { display: flex; flex-direction: column; gap: 7px; color: var(--text); }
.post-side a:hover strong { color: var(--accent); }
.post-side strong { font-size: 12px; }
.post-id { color: var(--muted-2); font-size: 9px; }
.post-main { min-width: 0; padding: 18px 22px 21px; }
.post-topline { display: flex; justify-content: space-between; gap: 10px; color: var(--muted-2); font-size: 10px; }
.post-topline a:hover { color: var(--accent); }
.post-body { margin-top: 13px; color: #ddd7ea; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.68; }
.post-signature { margin-top: 20px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted-2); white-space: pre-wrap; font-size: 10px; }
.reply-panel { margin-top: 13px; padding: 19px; }
.reply-head { display: flex; align-items: center; gap: 9px; margin-bottom: 13px; }
.reply-head strong { display: block; font-size: 13px; }
.reply-head span:not(.avatar) { display: block; color: var(--muted-2); font-size: 10px; }
.reply-guest { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 13px; padding: 19px; }
.reply-guest strong { font-size: 14px; }
.reply-guest p { margin-top: 3px; color: var(--muted); font-size: 12px; }

/* ---------- forms / compose ---------- */
.compose-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 13px; align-items: start; }
.compose-card { padding: 25px; }
.compose-head { margin-bottom: 22px; }
.compose-head h1 { margin: 6px 0 4px; font-size: 29px; letter-spacing: -0.045em; }
.compose-head p { color: var(--muted); font-size: 12px; }
.compose-head a { color: var(--accent); }
.compose-aside { display: flex; flex-direction: column; gap: 12px; }
.side-card { padding: 19px; }
.side-icon { width: 31px; height: 31px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; color: var(--accent); background: var(--accent-bg); border: 1px solid var(--accent-line); }
.side-card h3 { margin: 9px 0 7px; font-size: 14px; }
.tips-list li { position: relative; margin-top: 6px; padding-left: 13px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.tips-list li::before { content: ""; position: absolute; top: 7px; left: 0; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.author-card { display: flex; align-items: center; gap: 9px; padding: 13px 16px; }
.author-card strong { display: block; font-size: 12px; }
.author-card span:not(.avatar) { display: block; margin-top: 1px; color: var(--muted-2); font-size: 9px; }
.form-stack { display: flex; flex-direction: column; gap: 15px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label-row label { color: #d5cfe3; font-size: 12px; font-weight: 650; }
.label-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.field-hint { color: var(--muted-2); font-size: 10px; line-height: 1.4; }
input[type="text"], input[type="password"], input[type="email"], input[type="date"], textarea, select {
  width: 100%; min-height: 42px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 8px;
  outline: none; background: rgba(13, 11, 19, 0.55); color: var(--text); font-size: 13px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
textarea { min-height: 90px; resize: vertical; line-height: 1.6; }
input::placeholder, textarea::placeholder { color: #69627a; }
input:focus, textarea:focus, select:focus { border-color: var(--accent-line); background: rgba(13, 11, 19, 0.8); box-shadow: 0 0 0 3px rgba(143, 124, 244, 0.08); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 18px, calc(100% - 11px) 18px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 3px; }
.form-actions-end { justify-content: flex-end; }
.field-control { position: relative; display: flex; align-items: center; }
.field-control input { padding-left: 39px; padding-right: 70px; }
.field-icon { position: absolute; left: 13px; display: inline-flex; color: var(--muted-2); pointer-events: none; }
.reveal-button { position: absolute; right: 7px; padding: 5px; border: 0; background: transparent; color: var(--muted); font-size: 10px; cursor: pointer; }
.password-card { padding: 22px; }
.security-hint { display: flex; align-items: center; gap: 6px; margin-top: 11px; color: var(--muted-2); font-size: 10px; }

/* ---------- profile ---------- */
.profile-head { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 25px; }
.profile-identity { min-width: 0; flex: 1; }
.profile-name-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.profile-name-row h1 { font-size: 30px; line-height: 1.1; letter-spacing: -0.05em; }
.profile-handle { margin-top: 3px; color: var(--muted); font-size: 11px; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 9px; color: var(--muted-2); font-size: 10px; }
.profile-meta span { display: inline-flex; align-items: center; gap: 4px; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.profile-stats { display: flex; gap: 28px; width: 100%; margin-top: 3px; padding-top: 15px; border-top: 1px solid var(--line); }
.profile-stats div { display: flex; flex-direction: column; gap: 1px; }
.profile-stats strong { font-size: 19px; letter-spacing: -0.04em; }
.profile-stats span { color: var(--muted-2); font-size: 10px; }
.services-block { margin-top: 3px; }
.service-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.service-card { display: flex; flex-direction: column; min-height: 180px; padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(180deg, rgba(44, 38, 58, 0.8), rgba(31, 27, 42, 0.9)); }
.service-card:hover { border-color: var(--accent-line); background: rgba(49, 43, 65, 0.9); }
.service-icon { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px; border-radius: 10px; color: var(--accent); background: var(--accent-bg); border: 1px solid var(--accent-line); }
.service-chat .service-icon { color: #9dbdff; background: rgba(118, 158, 255, 0.09); border-color: rgba(118, 158, 255, 0.18); }
.service-diary .service-icon { color: #d0a9ff; background: rgba(177, 132, 255, 0.09); border-color: rgba(177, 132, 255, 0.18); }
.service-mail .service-icon { color: #f0c982; background: rgba(240, 201, 130, 0.09); border-color: rgba(240, 201, 130, 0.18); }
.service-kicker { color: var(--muted-2); font-size: 9px; font-weight: 750; letter-spacing: 0.1em; text-transform: uppercase; }
.service-card strong { margin-top: 3px; font-size: 15px; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.service-card > span:not(.service-icon):not(.service-kicker) { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.service-card em { display: inline-flex; align-items: center; gap: 4px; margin-top: auto; padding-top: 12px; color: var(--accent); font-size: 11px; font-style: normal; font-weight: 600; }
.profile-content-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 10px; margin-top: 12px; }
.content-card { padding: 19px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.card-head h2 { font-size: 15px; letter-spacing: -0.02em; }
.card-head-sub { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.bio-text { color: #d4cee1; white-space: pre-wrap; font-size: 12px; line-height: 1.65; }
.signature-preview { margin-top: 15px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted-2); white-space: pre-wrap; font-size: 10px; }
.activity-list { display: flex; flex-direction: column; }
.activity-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.055); }
.activity-row:last-child { border-bottom: 0; padding-bottom: 0; }
.activity-row > span:nth-child(2) { min-width: 0; flex: 1; }
.activity-row strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 600; }
.activity-row small { display: block; margin-top: 2px; color: var(--muted-2); font-size: 9px; }
.activity-row > .icon { color: var(--muted-2); }
.activity-dot { width: 5px; height: 5px; flex: none; border-radius: 50%; background: var(--accent); }

/* ---------- settings ---------- */
.settings-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 11px; align-items: start; }
.settings-aside { display: flex; flex-direction: column; gap: 10px; }
.account-summary { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.account-summary strong { display: block; font-size: 13px; }
.account-summary span:not(.avatar) { display: block; color: var(--muted-2); font-size: 10px; }
.account-facts { display: flex; flex-direction: column; gap: 6px; padding-top: 11px; border-top: 1px solid var(--line); }
.account-facts div { display: flex; justify-content: space-between; gap: 10px; font-size: 10px; }
.account-facts span { color: var(--muted-2); }
.account-facts strong { max-width: 190px; overflow-wrap: anywhere; text-align: right; font-size: 10px; }
.account-note { margin-top: 9px; font-size: 10px; }
.mail-card { display: flex; gap: 9px; align-items: flex-start; }
.mail-card strong { display: block; font-size: 12px; }
.mail-card p { margin: 2px 0 7px; color: var(--muted-2); font-size: 10px; }

/* ---------- diary ---------- */
.diary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.diary-card { display: flex; gap: 13px; padding: 16px; }
.diary-date { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 51px; height: 56px; flex: none; border-radius: 10px; color: var(--accent); background: var(--accent-bg); border: 1px solid var(--accent-line); }
.diary-date strong { font-size: 19px; line-height: 1; }
.diary-date span { margin-top: 3px; color: var(--muted); font-size: 8px; }
.diary-copy { min-width: 0; }
.diary-topline { display: flex; justify-content: space-between; gap: 8px; color: var(--muted-2); font-size: 9px; }
.diary-topline span:first-child { color: var(--accent); }
.diary-copy h2 { margin: 4px 0; font-size: 14px; }
.diary-copy p { color: var(--muted); font-size: 11px; line-height: 1.5; }
.privacy-strip { display: flex; align-items: center; gap: 7px; margin-top: 18px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted-2); background: rgba(255, 255, 255, 0.025); font-size: 10px; }
.privacy-strip .icon { color: var(--accent); }

/* ---------- messenger ---------- */
.messenger-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 10px; align-items: start; }
.conversations-card, .people-card { padding: 18px; }
.conversation-list { display: flex; flex-direction: column; gap: 2px; }
.conversation-row { display: flex; align-items: center; gap: 9px; padding: 9px 6px; border-radius: 8px; }
.conversation-row:hover { background: rgba(255, 255, 255, 0.04); }
.conversation-copy { min-width: 0; flex: 1; }
.conversation-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.conversation-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; color: var(--muted-2); font-size: 10px; }
.conversation-time { color: var(--muted-2); font-size: 9px; white-space: nowrap; }
.conversation-row > .icon { color: var(--muted-2); }
.people-list { display: flex; flex-direction: column; gap: 1px; max-height: 360px; overflow-y: auto; }
.person-row { display: flex; align-items: center; gap: 8px; padding: 7px 4px; border-radius: 7px; }
.person-row:hover { background: rgba(255, 255, 255, 0.04); }
.person-copy { min-width: 0; flex: 1; }
.person-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.person-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; color: var(--muted-2); font-size: 9px; }
.mini-action { width: 27px; height: 27px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: rgba(255, 255, 255, 0.03); }
.mini-action:hover { color: var(--accent); border-color: var(--accent-line); }
.chat-card { overflow: hidden; }
.chat-head { display: flex; align-items: center; gap: 10px; min-height: 66px; padding: 12px 17px; border-bottom: 1px solid var(--line); }
.chat-back { display: inline-flex; padding: 4px; color: var(--muted); }
.chat-back:hover { color: var(--accent); }
.chat-person { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; }
.chat-person strong { display: block; font-size: 13px; }
.chat-person small { display: block; margin-top: 2px; color: var(--muted-2); font-size: 9px; }
.chat-status { display: inline-flex; align-items: center; gap: 4px; color: var(--muted-2); font-size: 9px; white-space: nowrap; }
.chat-status .icon { color: var(--accent); }
.chat-messages { display: flex; flex-direction: column; gap: 12px; min-height: 330px; max-height: calc(100vh - 390px); overflow-y: auto; padding: 23px 20px; }
.message-row { display: flex; align-items: flex-end; gap: 6px; }
.message-own { justify-content: flex-end; }
.message-bubble { max-width: min(600px, 80%); padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px 12px 12px 3px; background: rgba(255, 255, 255, 0.055); }
.message-bubble > div { color: #ddd7ea; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.55; }
.message-bubble > span { display: block; margin-top: 4px; color: var(--muted-2); font-size: 8px; text-align: right; }
.message-own .message-bubble { border-color: rgba(143, 124, 244, 0.25); background: rgba(143, 124, 244, 0.12); border-radius: 12px 12px 3px 12px; }
.message-own .message-bubble > span { color: rgba(213, 205, 255, 0.6); }
.chat-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; margin: auto; text-align: center; }
.chat-empty h3 { margin-top: 4px; font-size: 14px; }
.chat-empty p { color: var(--muted-2); font-size: 11px; }
.chat-compose { display: flex; align-items: flex-end; gap: 8px; padding: 12px 15px; border-top: 1px solid var(--line); background: rgba(12, 10, 18, 0.3); }
.chat-compose textarea { min-height: 42px; max-height: 120px; }
.chat-compose .button { flex: none; min-height: 42px; }

/* ---------- mail / error / misc ---------- */
.mail-head { display: flex; align-items: center; gap: 15px; padding: 22px; }
.mail-icon { width: 63px; height: 63px; display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: 16px; color: #f0c982; background: rgba(240, 201, 130, 0.08); border: 1px solid rgba(240, 201, 130, 0.18); }
.mail-head > div { min-width: 0; flex: 1; }
.mail-head h2 { margin: 4px 0 2px; overflow-wrap: anywhere; font-size: 22px; letter-spacing: -0.04em; }
.mail-head p { color: var(--muted-2); font-size: 10px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 10px; }
.feature-card { padding: 18px; }
.feature-card h3 { margin: 9px 0 5px; font-size: 14px; }
.feature-card p { color: var(--muted); font-size: 11px; line-height: 1.55; }
.error-page { max-width: 700px; margin: 50px auto; padding: 45px 25px; text-align: center; }
.error-code { color: rgba(180, 188, 255, 0.16); font-size: 120px; font-weight: 900; line-height: 0.9; letter-spacing: -0.08em; }
.error-page h1 { margin: 15px 0 7px; font-size: 28px; letter-spacing: -0.04em; }
.error-page p { color: var(--muted); font-size: 13px; }
.hero-actions { display: flex; justify-content: center; gap: 8px; margin-top: 20px; }
.hero-actions .button { margin: 0; }

/* ---------- auth ---------- */
.auth-page { min-height: 100vh; background: radial-gradient(700px 450px at 20% 0%, rgba(143, 124, 244, 0.18), transparent 60%), radial-gradient(600px 400px at 90% 100%, rgba(79, 112, 190, 0.12), transparent 65%), var(--bg); }
.auth-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; padding: 40px 20px; }
.auth-brand { margin-bottom: 18px; }
.auth-card { width: min(100%, 450px); padding: 28px; border: 1px solid var(--line); border-radius: 17px; background: linear-gradient(180deg, rgba(43, 37, 56, 0.95), rgba(29, 25, 39, 0.97)); box-shadow: var(--shadow); }
.auth-back { display: inline-flex; align-items: center; gap: 5px; margin-bottom: 20px; color: var(--muted); font-size: 11px; }
.auth-back:hover { color: var(--accent); }
.auth-panel .eyebrow { margin-bottom: 3px; }
.auth-panel h1 { margin: 6px 0 5px; font-size: 27px; line-height: 1.12; letter-spacing: -0.045em; }
.auth-lead { margin-bottom: 19px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.auth-panel .form-stack { margin-top: 15px; }
.auth-divider { display: flex; align-items: center; gap: 10px; margin: 21px 0 14px; color: var(--muted-2); font-size: 10px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-register-box { display: flex; gap: 9px; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255, 255, 255, 0.025); }
.register-box-icon { display: inline-flex; flex: none; color: var(--accent); }
.auth-register-box strong { display: block; font-size: 11px; }
.auth-register-box p { margin: 3px 0 5px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.auth-legal { margin-top: 18px; color: var(--muted-2); font-size: 9px; line-height: 1.55; }
.auth-note { margin-top: 8px; color: var(--muted-2); font-size: 10px; text-align: center; }
.auth-secondary { margin-top: 8px; }
.auth-steps { display: flex; flex-direction: column; gap: 0; margin: 19px 0; border-top: 1px solid var(--line); }
.auth-steps > div { display: flex; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.auth-steps > div > span { color: var(--accent); font-size: 10px; font-weight: 800; padding-top: 1px; }
.auth-steps p { color: var(--muted); font-size: 11px; line-height: 1.5; }
.auth-steps strong { color: var(--text); }
.auth-foot { margin-top: 17px; color: var(--muted-2); font-size: 9px; }
.auth-foot a { color: var(--muted); }
.auth-card .notice { margin-bottom: 13px; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .container { width: min(100% - 30px, 900px); }
  .header-content { width: min(100% - 28px, 900px); gap: 15px; }
  .desktop-nav { gap: 2px; }
  .nav-link { padding: 0 10px; }
  .header-user-name { display: none; }
  .latest-list { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .service-card { min-height: 160px; }
  .settings-grid { grid-template-columns: minmax(0, 1fr) 290px; }
}
@media (max-width: 820px) {
  :root { --header-h: 64px; }
  .header-content { width: calc(100% - 24px); min-height: var(--header-h); gap: 10px; }
  .desktop-nav { display: none; }
  .menu-toggle { display: block; }
  .mobile-drawer, .mobile-overlay { display: block; }
  .brand-mark { width: 37px; height: 37px; border-radius: 10px; font-size: 16px; }
  .brand-copy strong { font-size: 15px; }
  .brand-copy small { font-size: 8px; margin-top: 2px; }
  .header-actions { gap: 2px; }
  .header-user { padding: 2px; }
  .header-actions .button { min-height: 34px; padding: 0 11px; font-size: 11px; }
  .main-content { padding-top: calc(var(--header-h) + 16px); }
  body.menu-open .mobile-overlay { opacity: 1; visibility: visible; }
  body.menu-open .mobile-drawer { transform: translateX(0); }
  .board-head { align-items: flex-start; flex-direction: column; gap: 15px; padding: 19px; }
  .board-icon { width: 51px; height: 51px; border-radius: 13px; }
  .board-head h1 { font-size: 27px; }
  .board-actions { width: 100%; }
  .board-actions .button { flex: 1; }
  .latest-strip { padding: 14px; }
  .strip-head { margin-bottom: 6px; }
  .forum-section-head { padding: 14px; }
  .category-row { padding: 13px 14px; gap: 10px; }
  .category-stats { display: none; }
  .category-description { white-space: normal; line-height: 1.35; }
  .category-last { gap: 4px; line-height: 1.4; }
  .category-arrow { display: none; }
  .forum-stats { padding: 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .category-head { align-items: flex-start; flex-wrap: wrap; padding: 17px; gap: 11px; }
  .category-head-icon { width: 53px; height: 53px; border-radius: 13px; }
  .category-head h1 { font-size: 25px; }
  .category-head-actions { width: 100%; }
  .category-head-actions .button { width: 100%; }
  .topics-table-head { display: none; }
  .topic-row { display: block; padding: 14px; }
  .topic-main { gap: 8px; }
  .topic-number, .topic-last { display: inline-flex; margin-top: 8px; margin-right: 18px; vertical-align: top; }
  .topic-number strong { font-size: 12px; }
  .topic-number small { display: inline; margin-left: 3px; }
  .topic-last { display: flex; margin-right: 0; }
  .topic-copy > strong { white-space: normal; line-height: 1.35; }
  .post-card { display: block; }
  .post-side { flex-direction: row; align-items: center; padding: 11px 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .post-side a { flex-direction: row; align-items: center; gap: 7px; }
  .post-side .avatar { width: 29px; height: 29px; font-size: 9px; }
  .post-side .role-badge { display: none; }
  .post-id { margin-left: auto; }
  .post-main { padding: 14px; }
  .topic-head { padding: 18px; flex-wrap: wrap; }
  .topic-head h1 { font-size: 25px; }
  .topic-head > .button { margin-top: 3px; }
  .profile-head { padding: 18px; }
  .profile-avatar { width: 73px; height: 73px; font-size: 23px; }
  .profile-identity { flex: 1 1 calc(100% - 92px); }
  .profile-actions { width: 100%; }
  .profile-actions .button { flex: 1; }
  .profile-stats { gap: 24px; }
  .service-grid { grid-template-columns: 1fr 1fr; }
  .profile-content-grid, .settings-grid, .diary-grid, .feature-grid, .messenger-layout { grid-template-columns: 1fr; }
  .settings-aside { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
  .settings-aside > .content-card:first-child { grid-row: span 2; }
  .compose-layout { grid-template-columns: 1fr; }
  .compose-aside { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
  .diary-grid { grid-template-columns: 1fr; }
  .chat-messages { max-height: none; min-height: 290px; }
  .footer-content { grid-template-columns: 1fr 1fr; gap: 22px; padding-top: 25px; }
  .footer-brand { grid-column: span 2; }
  .footer-bottom { padding-top: 11px; }
  .latest-list { grid-template-columns: 1fr; }
  .empty-state .button { margin-left: 0; }
  .error-page { margin: 17px auto; padding: 30px 15px; }
  .error-code { font-size: 90px; }
}
@media (max-width: 560px) {
  .container { width: calc(100% - 20px); }
  .main-content { padding-top: calc(var(--header-h) + 12px); }
  .header-actions .logout-form { display: none; }
  .board-head { padding: 16px; }
  .board-head-main { gap: 11px; }
  .board-icon { width: 43px; height: 43px; border-radius: 11px; }
  .board-icon .icon { width: 23px; height: 23px; }
  .board-head h1 { font-size: 24px; }
  .board-head p { font-size: 12px; }
  .board-meta { gap: 9px; font-size: 9px; }
  .latest-row { padding: 6px 1px; }
  .latest-row strong { font-size: 11px; }
  .latest-row small { font-size: 8px; }
  .forum-section-head { gap: 9px; padding: 12px; }
  .group-icon { width: 35px; height: 35px; border-radius: 9px; }
  .forum-section-copy h2 { font-size: 14px; }
  .forum-section-copy p { font-size: 10px; }
  .group-count { display: none; }
  .category-row { padding: 12px; }
  .category-icon { width: 35px; height: 35px; border-radius: 9px; }
  .category-top strong { font-size: 13px; }
  .category-description { font-size: 10px; }
  .category-last { font-size: 8px; }
  .stats-grid { gap: 6px; }
  .stat-card { padding: 10px; }
  .stat-card strong { font-size: 19px; }
  .category-head { padding: 14px; }
  .category-head h1 { font-size: 22px; }
  .topics-panel { margin-top: 9px; }
  .topic-row { padding: 12px; }
  .topic-status { width: 28px; height: 28px; border-radius: 7px; }
  .topic-copy > strong { font-size: 12px; }
  .topic-meta { font-size: 8px; }
  .post-main { padding: 12px; }
  .post-body { font-size: 13px; }
  .page-heading { margin: 2px 0 16px; }
  .page-heading h1 { font-size: 28px; }
  .page-heading-row { align-items: flex-start; flex-direction: column; gap: 10px; }
  .page-heading-row .button { width: 100%; }
  .profile-head { padding: 15px; gap: 11px; }
  .profile-avatar { width: 61px; height: 61px; font-size: 19px; }
  .profile-identity { flex-basis: calc(100% - 74px); }
  .profile-name-row h1 { font-size: 24px; }
  .profile-meta { gap: 7px; font-size: 9px; }
  .profile-stats { gap: 19px; }
  .profile-stats strong { font-size: 17px; }
  .service-grid { grid-template-columns: 1fr; }
  .service-card { min-height: 150px; }
  .settings-aside { display: flex; }
  .compose-aside { display: block; }
  .side-card { margin-bottom: 9px; }
  .form-row { grid-template-columns: 1fr; }
  .form-actions { align-items: stretch; flex-direction: column-reverse; }
  .form-actions .button { width: 100%; }
  .mail-head { align-items: flex-start; flex-wrap: wrap; padding: 16px; }
  .mail-head > div { flex-basis: calc(100% - 75px); }
  .mail-head .button { width: 100%; }
  .mail-icon { width: 52px; height: 52px; border-radius: 13px; }
  .feature-card { padding: 15px; }
  .chat-head { padding: 11px 12px; }
  .chat-status { display: none; }
  .chat-messages { padding: 15px 12px; }
  .message-bubble { max-width: 87%; }
  .chat-compose { padding: 10px; }
  .chat-compose .button span { display: none; }
  .chat-compose .button { width: 42px; padding: 0; }
  .footer-content { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }
  .footer-bottom { width: calc(100% - 20px); }
  .auth-wrap { padding: 25px 12px; }
  .auth-card { padding: 21px; }
  .auth-panel h1 { font-size: 24px; }
  .auth-brand { margin-bottom: 13px; }
  .auth-foot { margin-top: 13px; }
  .error-page h1 { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
