:root {
  color-scheme: dark;
  --bg: #121315;
  --surface: #1b1d20;
  --surface-high: #25282c;
  --surface-glass: rgba(24, 26, 30, .72);
  --text: #e7e2da;
  --muted: #c9c0b1;
  --primary: #f0c866;
  --primary-ink: #332100;
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .15);
  --blue: #75a7ff;
  --violet: #b89af2;
  --cyan: #73cdb9;
  --radius-sm: 12px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --display: "Geologica", "Segoe UI", sans-serif;
  --body: "Golos Text", "Segoe UI", sans-serif;
  --max: 1260px;
}
[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f5f1;
  --surface: #ffffff;
  --surface-high: #ece9e2;
  --surface-glass: rgba(255,255,255,.78);
  --text: #1d1c1a;
  --muted: #625c52;
  --primary: #936b10;
  --primary-ink: #fff8ec;
  --line: rgba(29,28,26,.10);
  --line-strong: rgba(29,28,26,.17);
  --blue: #315fa8;
  --violet: #67459c;
  --cyan: #277561;
}

@font-face { font-family: "Golos Text"; src: url("/assets/fonts/golos-400.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Geologica"; src: url("/assets/fonts/geologica-var.woff2") format("woff2"); font-display: swap; }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100dvh; }
html { background: var(--bg); }
body {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button:disabled { cursor: wait; opacity: .62; }
:focus { outline: none; }
:focus-visible { outline: none; }
a:focus-visible,
button:focus-visible,
.board-icon:focus-visible {
  background: rgba(233, 200, 124, 0.16);
}
.go:focus-visible {
  outline: none;
  filter: brightness(1.08);
}

/* Match site header CTA — board does not load store.css. */
.site-header .header-login {
  background: var(--primary) !important;
  color: var(--primary-ink) !important;
}
.site-header .header-login:hover,
.site-header .header-login:focus-visible {
  color: var(--primary-ink) !important;
}
.site-header .header-account {
  min-height: 48px;
  max-width: min(240px, 42vw);
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 12px 0 8px !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, 0.05) !important;
  color: var(--text) !important;
  font-family: var(--display) !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  letter-spacing: 0.01em !important;
  text-transform: none !important;
}
.site-header .header-account:hover,
.site-header .header-account:focus-visible {
  background: rgba(255, 255, 255, 0.09) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: var(--text) !important;
  filter: none !important;
}
.site-header .header-account-avatar {
  width: 32px;
  height: 32px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--primary);
  color: var(--primary-ink);
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
  text-transform: uppercase;
}
.site-header .header-account-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 max(24px, calc((100vw - var(--max)) / 2));
  border-bottom: 1px solid var(--line);
  background: var(--surface-glass);
  box-shadow: 0 12px 40px rgba(0,0,0,.22), inset 0 1px rgba(255,255,255,.06);
  -webkit-backdrop-filter: blur(24px) saturate(1.18);
  backdrop-filter: blur(24px) saturate(1.18);
}
.logo { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); }
.logo img { width: 24px; height: 20px; object-fit: contain; }
.logo img.logo-word { width: 72px; height: 18px; }
.logo b { font-size: 19px; letter-spacing: -.035em; }
.logo span { border-radius: 6px; background: var(--primary); color: var(--primary-ink); padding: 4px 7px; font-size: 9px; font-weight: 900; letter-spacing: .08em; }
.bar-nav { align-self: stretch; display: flex; align-items: stretch; gap: 4px; }
.bar-nav a { min-height: 44px; display: flex; align-items: center; padding: 0 15px; border-bottom: 2px solid transparent; color: var(--muted); font-size: 13px; font-weight: 750; }
.bar-nav a:hover, .bar-nav a[aria-current="page"] { border-bottom-color: var(--primary); color: var(--text); background: rgba(255,255,255,.035); }
.find { width: min(320px, 28vw); margin-left: auto; }
.board-actions { display: flex; align-items: center; gap: 7px; }
.board-icon { width: 42px; height: 42px; display: grid; place-items: center; flex: none; border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(255,255,255,.035); color: var(--muted); cursor: pointer; }
.board-icon:hover { background: rgba(255,255,255,.08); color: var(--text); }
.board-icon svg { width: 19px; height: 19px; }
.find input, .compose input, .compose textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.045);
  padding: 0 14px;
}
.find input:focus,
.find input:focus-visible,
.compose input:focus,
.compose input:focus-visible,
.compose textarea:focus,
.compose textarea:focus-visible {
  outline: none;
  border-color: var(--line);
  background: rgba(233, 200, 124, 0.16);
  box-shadow: none;
}
.compose textarea { min-height: 140px; padding: 13px 14px; resize: vertical; }

.shell { width: min(calc(100% - 40px), var(--max)); margin: 0 auto; padding: 30px 0 84px; flex: 1; }
.crumb { min-height: 40px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(255,255,255,.025); padding: 0 14px; color: var(--muted); font-size: 12px; }
.crumb a:hover { color: var(--primary); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 18px; align-items: start; }
.profile-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 18px; align-items: start; }
.feed, .rail { min-width: 0; display: grid; gap: 16px; }
.rail { position: sticky; top: 88px; }
.page-head { margin: 4px 0 18px; }
.page-head h1, .post h1 { margin: 0 0 8px; font: 800 clamp(34px, 4.5vw, 58px)/1 var(--display); letter-spacing: -.045em; text-transform: uppercase; }
.page-head h2 { margin: 28px 0 12px; font: 750 24px/1.1 var(--display); }
.page-head p { max-width: 50em; margin: 0; color: var(--muted); }

.forum-sections { display: grid; gap: 16px; }
.forum-section, .rail-card, .tile.post, .compose.tile {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 16px 42px rgba(0,0,0,.17), inset 0 1px rgba(255,255,255,.045);
}
.forum-board-head {
  min-height: 54px;
  display: flex;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(240,200,102,.28);
  background: rgba(233, 200, 124, 0.16);
}
.forum-section-head {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(240,200,102,.28);
  background: rgba(233, 200, 124, 0.16);
}
.forum-board-head > span, .forum-row-copy, .forum-row-latest { min-width: 0; display: grid; gap: 3px; }
.forum-board-head b { font: 760 17px/1.15 var(--display); text-transform: uppercase; }
.forum-board-head small { color: var(--muted); font-size: 11px; }
.forum-list { display: grid; }
.forum-row {
  min-height: 82px;
  display: grid;
  grid-template-columns: 42px minmax(170px,1fr) 116px minmax(190px,31%);
  align-items: center;
  gap: 13px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  transition: background 180ms ease;
}
.forum-row:last-child { border-bottom: 0; }
.forum-row:hover { background: rgba(255,255,255,.045); }
.forum-row-copy b, .forum-row-latest b { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.forum-row-copy small, .forum-row-latest small, .forum-row-metrics small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.forum-row-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.forum-row-metrics > span { display: grid; gap: 2px; }
.forum-row-metrics b { font-size: 12px; }
.forum-section-head > span:first-child { display: grid; gap: 2px; }
.forum-section-head b { font: 750 19px/1.15 var(--display); text-transform: uppercase; }
.forum-section-head small, .section-count { color: var(--muted); font-size: 12px; }
.section-count { flex: none; }
.forum-topic-list { display: grid; }
.topic-row {
  min-height: 76px;
  display: grid;
  grid-template-columns: 42px minmax(0,1fr) minmax(210px, 34%);
  align-items: center;
  gap: 13px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  transition: background 180ms ease, border-color 180ms ease;
}
.topic-row:last-child { border-bottom: 0; }
.topic-row:hover { background: rgba(255,255,255,.045); }
.forum-icon, .avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: none;
  border: 0;
  border-radius: 12px;
  background: var(--primary);
  color: var(--primary-ink);
  font: 800 14px/1 var(--display);
}
.forum-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
}
.topic-copy, .topic-copy small, .recent-row > span:last-child { min-width: 0; display: grid; gap: 3px; }
.topic-copy b, .recent-row b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.topic-copy small, .recent-row small, .topic-metrics small, .post-head small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.topic-metrics { min-width: 0; display: grid; grid-template-columns: 62px minmax(0,1fr); align-items: center; gap: 10px; }
.topic-metrics > span { min-width: 0; display: grid; gap: 2px; }
.topic-metrics b { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }

.rail-card { padding: 8px; }
.rail-title { padding: 10px 11px 12px; color: var(--text); font: 750 13px/1.2 var(--display); text-transform: uppercase; }
.recent-list { display: grid; }
.recent-row { min-width: 0; display: grid; grid-template-columns: 36px minmax(0,1fr); align-items: center; gap: 10px; padding: 11px; border-top: 1px solid var(--line); }
.recent-row:hover { border-radius: 10px; background: rgba(255,255,255,.04); }
.recent-row .forum-icon { width: 32px; height: 32px; border-radius: 10px; font-size: 12px; }
.links { display: grid; }
.links a { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding: 0 11px; color: var(--muted); font-size: 13px; }
.links a:hover { color: var(--text); background: rgba(255,255,255,.04); }
.links a > span {
  flex: none;
  display: inline-grid;
  place-items: center;
  color: var(--primary);
  line-height: 0;
}
.links a > span svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
}
.rail-support { display: grid; gap: 8px; padding: 18px; }
.rail-support p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

.tile { min-width: 0; }
#topics > .topic-row { border: 1px solid var(--line); border-bottom: 0; background: var(--surface); }
#topics > .topic-row:first-child { border-radius: var(--radius-md) var(--radius-md) 0 0; }
#topics > .topic-row:last-child { border-bottom: 1px solid var(--line); border-radius: 0 0 var(--radius-md) var(--radius-md); }
.post { display: grid; grid-template-columns: 190px minmax(0,1fr); gap: 0 24px; padding: 24px; }
.post-head { grid-column: 1; grid-row: 1 / span 4; display: flex; align-items: flex-start; gap: 11px; padding-right: 20px; border-right: 1px solid var(--line); }
.post-head > div { min-width: 0; display: grid; gap: 3px; }
.post-head b { overflow: hidden; text-overflow: ellipsis; }
.avatar.is-team { border-color: rgba(240,200,102,.25); background: rgba(240,200,102,.14); color: var(--primary); }
.post h1, .post-body, .chips { grid-column: 2; }
.post h1 { font-size: clamp(27px, 3.4vw, 44px); }
.post-body { margin: 10px 0; color: var(--text); font-size: 15px; line-height: 1.72; white-space: pre-wrap; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.04); padding: 5px 9px; color: var(--muted); font-size: 11px; }
.compose { display: grid; gap: 10px; padding: 18px; }
.go { min-height: 46px; width: fit-content; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 14px; background: var(--primary); color: var(--primary-ink); padding: 0 18px; font-weight: 800; cursor: pointer; }
.go:hover { filter: brightness(1.08); transform: translateY(-1px); }
.go.ghost { border: 1px solid var(--line-strong); background: transparent; color: var(--text); }
.profile { display: grid; justify-items: start; gap: 6px; padding: 18px; }
.profile b { font-family: var(--display); }
.profile small { color: var(--muted); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stats span { display: grid; gap: 2px; }
.stats i { color: var(--muted); font-size: 11px; font-style: normal; }
.faq-card { border-bottom: 1px solid var(--line); padding: 17px 2px; }
.faq-card summary { cursor: pointer; font: 700 18px/1.3 var(--display); list-style: none; }
.faq-card p { color: var(--muted); }
.faq-foot { color: var(--primary); font-size: 12px; }
.board-state { margin: 0; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); padding: 22px; color: var(--muted); }
.board-state.error, .form-state { color: #e5a9a1; }
.form-state { margin: 4px 0 0; font-size: 13px; }
.inline-link, .profile-link, .crumb-link { color: var(--primary); }
.report-button, .small-button { width: fit-content; min-height: 36px; border: 1px solid var(--line-strong); border-radius: 10px; background: transparent; padding: 0 11px; color: var(--muted); cursor: pointer; }
.report-button { grid-column: 2; margin-top: 8px; font-size: 11px; }
.profile-layout { display: block; }
.profile-layout > .rail { display: none; }
/* ── Unified profile ─────────────────────────────────────────── */
.profile-view { display: grid; gap: 18px; }
.profile-side-card,
.profile-edit-panel,
.profile-tabs-wrap,
.profile-stats-card,
.wall-card,
.wall-compose {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
}
.profile-side-card { padding: 14px; display: grid; gap: 10px; }

/* Cover hero */
.profile-cover {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}
.profile-cover-banner {
  height: 132px;
  background:
    radial-gradient(120% 170% at 12% -30%, rgba(240,200,102,.22), transparent 60%),
    linear-gradient(120deg, rgba(240,200,102,.13), rgba(117,167,255,.08) 55%, transparent);
  border-bottom: 1px solid var(--line);
}
.profile-cover.role-admin .profile-cover-banner {
  background:
    radial-gradient(120% 170% at 12% -30%, rgba(240,200,102,.42), transparent 62%),
    linear-gradient(120deg, rgba(240,200,102,.26), rgba(240,200,102,.05) 62%, transparent);
}
.profile-cover-body {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: end;
  gap: 20px;
  padding: 0 22px 20px;
}
.profile-cover-avatar {
  position: relative;
  width: 128px; height: 128px;
  margin-top: -64px;
  border: 3px solid var(--surface);
  border-radius: 20px;
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
}
.profile-cover-avatar .avatar.xl { width: 100%; height: 100%; font-size: 46px; border-radius: 0; }
.profile-cover-avatar.is-owner { cursor: pointer; }
.profile-cover-avatar.is-owner:hover,
.profile-cover-avatar.is-owner:focus-visible {
  border-color: rgba(240,200,102,.6);
  box-shadow: 0 0 0 2px rgba(240,200,102,.28), 0 12px 30px rgba(0,0,0,.35);
}
.avatar-cam {
  position: absolute; inset: auto 0 0 0;
  display: grid; place-items: center; height: 36px;
  background: linear-gradient(transparent, rgba(0,0,0,.62));
  color: #fff; opacity: 0; transition: opacity .15s ease;
}
.avatar-cam svg { width: 20px; height: 20px; }
.profile-cover-avatar.is-owner:hover .avatar-cam,
.profile-cover-avatar.is-owner:focus-visible .avatar-cam { opacity: 1; }
.profile-cover-id { min-width: 0; display: grid; gap: 8px; padding-bottom: 4px; }
.profile-name-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.profile-name-row h1 { margin: 0; font: 800 clamp(24px, 3.4vw, 34px)/1.05 var(--display); letter-spacing: -.03em; overflow-wrap: anywhere; }
.profile-status { margin: 0; color: var(--text); font-size: 14px; overflow-wrap: anywhere; }
.profile-status.placeholder { color: var(--muted); font-style: italic; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.meta-chip {
  display: inline-flex; align-items: center;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255,255,255,.04);
  padding: 5px 11px; color: var(--muted); font-size: 12px;
}
.meta-chip.handle { color: var(--text); }
.profile-cover-body > .profile-actions { align-self: end; justify-content: flex-end; }
.profile-cover-body > .profile-actions .go { min-height: 40px; padding: 0 15px; }

/* Role badges */
.role-badge {
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 4px 11px;
  font: 800 11px/1 var(--display); text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); background: rgba(255,255,255,.04); white-space: nowrap;
}
.role-badge-mark { display: inline-flex; }
.role-badge-mark svg { width: 12px; height: 12px; }
.role-badge.role-admin { color: var(--primary-ink); background: var(--primary); border-color: transparent; }
.role-badge.role-mod { color: #14101f; background: rgba(184,154,242,.92); border-color: transparent; }
.role-badge.role-vip { color: var(--primary); border-color: rgba(240,200,102,.6); background: rgba(240,200,102,.10); }
.role-badge.role-tester { color: var(--cyan); border-color: rgba(115,205,185,.5); background: rgba(115,205,185,.10); }
.role-badge.role-member { color: var(--muted); }

/* Stats strip */
.profile-stats-card { padding: 4px; }
.profile-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; }
.profile-stat {
  display: grid; gap: 6px; justify-items: center; text-align: center;
  padding: 15px 8px; border-right: 1px solid var(--line);
}
.profile-stat:last-child { border-right: 0; }
.stat-value { display: inline-flex; align-items: center; gap: 8px; }
.profile-stat .stat-icon { display: inline-flex; color: var(--primary); }
.profile-stat .stat-icon svg { width: 22px; height: 22px; display: block; filter: drop-shadow(0 0 6px rgba(226,183,90,.30)); }
.profile-stat b { font: 800 24px/1 var(--display); color: var(--text); }
.profile-stat span { color: var(--muted); font-size: 12px; }

/* Two columns */
.profile-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.profile-main { min-width: 0; display: grid; gap: 18px; }
.profile-aside { min-width: 0; display: grid; gap: 14px; }

/* Shared bits */
.avatar {
  display: grid; place-items: center; overflow: hidden;
  background: rgba(240, 200, 102, 0.16); color: var(--primary);
  font: 800 24px/1 var(--display);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.xl { width: 100%; height: 100%; font-size: clamp(42px, 10vw, 72px); border-radius: 0; }
.avatar.sm { width: 36px; height: 36px; flex: none; border-radius: 10px; font-size: 14px; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.profile-actions.stack { display: flex; }
.profile-actions .go.ghost, .go.ghost { border: 1px solid var(--line-strong); background: transparent; color: var(--text); }
.follow-list { display: grid; gap: 8px; max-height: 280px; overflow: auto; }
.follow-row { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--text); }
.follow-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.profile-bio { margin: 0; color: var(--text); font-size: 15px; line-height: 1.55; white-space: pre-wrap; }
#messages-content > h1 { margin: 0; font: 800 clamp(30px, 5vw, 50px)/1 var(--display); letter-spacing: -.04em; }
.wall-name-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.profile-edit-panel { display: grid; gap: 16px; padding: 20px 22px; }
.profile-edit-panel h2 { margin: 0; font: 750 22px/1.2 var(--display); }
.field-label { display: block; margin: 0 0 6px; color: var(--muted); font-size: 12px; }
.profile-form { display: grid; gap: 16px; }
.profile-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.profile-field { min-width: 0; display: block; }
.profile-fields > .profile-field:nth-child(3),
.profile-fields > .profile-field:nth-child(4) { grid-column: 1 / -1; }
.profile-field .muted { margin: 6px 0 0; font-size: 12px; overflow-wrap: anywhere; }
.profile-form input, .profile-form textarea, .wall-compose textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.045);
  padding: 11px 13px;
  color: var(--text);
  resize: vertical;
}
.profile-form input:focus-visible,
.profile-form textarea:focus-visible,
.wall-compose textarea:focus-visible { border-color: rgba(240,200,102,.55); background: rgba(255,255,255,.06); }
.profile-form textarea, .wall-compose textarea { min-height: 96px; }
.profile-edit-extra { display: grid; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.profile-edit-extra .rail-title { padding: 0; }
.profile-edit-links { display: flex; flex-wrap: wrap; gap: 8px; }
.small-button.danger { color: #e5a9a1; border-color: rgba(229,169,161,.4); }
.small-button.danger:hover { background: rgba(229,169,161,.12); }

/* ── Settings page (/settings) ───────────────────────────────── */
.settings-shell { display: grid; grid-template-columns: 258px minmax(0, 1fr); gap: 18px; align-items: start; }
.settings-nav {
  position: sticky; top: 84px;
  display: grid; gap: 3px;
  border: 1px solid var(--line); border-radius: var(--radius-md);
  background: var(--surface); padding: 10px;
}
.settings-nav-group { padding: 12px 10px 5px; color: var(--muted); font: 750 11px/1 var(--display); text-transform: uppercase; letter-spacing: .06em; }
.settings-nav-group:first-child { padding-top: 6px; }
.settings-nav-item {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px;
  border: 0; border-radius: 10px; background: transparent; color: var(--muted);
  padding: 0 12px; font: 600 14px/1.25 var(--body); text-align: left; cursor: pointer;
}
.settings-nav-item:hover { background: rgba(255,255,255,.05); color: var(--text); }
.settings-nav-item.active { background: rgba(240,200,102,.12); color: var(--text); box-shadow: inset 2px 0 0 var(--primary); }
.settings-panels { min-width: 0; display: grid; gap: 16px; }
.settings-panel {
  border: 1px solid var(--line); border-radius: var(--radius-md);
  background: var(--surface); padding: 22px 24px; display: grid; gap: 18px;
}
.settings-panel h1 { margin: 0; font: 800 clamp(21px, 3vw, 27px)/1.15 var(--display); letter-spacing: -.02em; }
.settings-note { margin: 6px 0 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.settings-readonly {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  min-height: 46px; border: 1px solid var(--line); border-radius: 12px;
  background: rgba(255,255,255,.02); padding: 9px 13px;
}
.settings-readonly .muted { margin: 0; font-size: 12px; }
.settings-avatar-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.settings-avatar-box {
  width: 140px; height: 140px; flex: none;
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--surface);
}
.settings-avatar-box .avatar.xl { width: 100%; height: 100%; font-size: 52px; border-radius: 0; }
.settings-avatar-side { min-width: 0; display: grid; gap: 8px; }
.settings-avatar-side .settings-note { margin: 0; max-width: 320px; }
.profile-tabs-wrap { display: grid; gap: 0; }
.profile-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.03);
}
.profile-tab {
  min-height: 44px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  padding: 0 16px;
  cursor: pointer;
  font: 700 13px/1 var(--display);
}
.profile-tab.active { background: rgba(240, 200, 102, 0.12); color: var(--text); }
.profile-tab-panel { display: grid; gap: 12px; padding: 16px; }
.wall-compose { display: grid; gap: 10px; padding: 14px; background: rgba(255,255,255,.03); }
.wall-compose.gate { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.wall-feed { display: grid; gap: 12px; }
.wall-card { display: grid; gap: 10px; padding: 14px 16px; background: rgba(255,255,255,.03); }
.wall-card-head { display: flex; align-items: center; gap: 10px; }
.wall-card-meta { min-width: 0; display: grid; gap: 2px; flex: 1; }
.wall-card-meta small { color: var(--muted); }
.wall-delete { margin-left: auto; }
.wall-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.wall-card-foot { display: flex; align-items: center; gap: 10px; }
.post-actions { grid-column: 2; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.post-actions .report-button { grid-column: auto; margin-top: 0; margin-left: auto; }
.like-btn {
  position: relative; display: inline-flex; align-items: center; gap: 8px; overflow: visible;
  padding: 9px 16px; border: 1px solid var(--line-strong); border-radius: 999px;
  background: rgba(255,255,255,.03); color: var(--muted);
  font: 800 14px/1 var(--display); cursor: pointer;
  transition: color .18s ease, border-color .18s ease, background .18s ease, transform .1s ease, box-shadow .18s ease;
}
.like-btn svg { width: 19px; height: 19px; display: block; transition: transform .18s ease, fill .18s ease; }
.like-btn:hover:not(:disabled) { color: var(--text); border-color: var(--primary); transform: translateY(-1px); }
.like-btn:active:not(:disabled) { transform: translateY(0) scale(.97); }
.like-btn:disabled { opacity: .7; cursor: default; }
.like-btn.on {
  color: #1a1400; border-color: var(--primary);
  background: linear-gradient(180deg, var(--primary), #d19a2f);
  box-shadow: 0 6px 18px rgba(226,183,90,.35);
}
.like-btn.on svg { fill: currentColor; }
.like-btn.pulse svg { animation: like-pulse .45s ease; }
@keyframes like-pulse {
  0% { transform: scale(1); }
  35% { transform: scale(1.45); }
  60% { transform: scale(.9); }
  100% { transform: scale(1); }
}
.like-burst {
  position: absolute; left: 15px; top: 50%; margin-top: -10px;
  pointer-events: none; color: var(--primary);
  animation: like-burst .72s ease-out forwards;
}
.like-burst svg { width: 20px; height: 20px; fill: currentColor; stroke: none; }
@keyframes like-burst {
  0% { opacity: .95; transform: translateY(0) scale(.7); }
  100% { opacity: 0; transform: translateY(-28px) scale(1.55); }
}
.like-btn.static { cursor: default; background: transparent; border-color: transparent; padding-inline: 4px; color: var(--muted); box-shadow: none; }
.like-btn.static.has { color: var(--primary); }
.like-btn.static.has svg { fill: currentColor; }
.like-count { font-variant-numeric: tabular-nums; }
.friends-card, .activity-card, .profile-card { display: grid; gap: 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); padding: 22px; }
.friends-card h2, .activity-card h2 { margin: 0 0 4px; font: 750 22px/1.2 var(--display); }
.activity-list { display: grid; gap: 8px; }
.activity-row { display: grid; gap: 4px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.03); padding: 12px 14px; }
.activity-row:hover { background: rgba(255,255,255,.06); }
.activity-row small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.muted { margin: 0; color: var(--muted); }
.friend-row, .conversation-row { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-top: 1px solid var(--line); padding: 10px 0; }
.friend-person { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.friend-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.conversation-row { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 13px 15px; }
.conversation-row > span { min-width: 0; display: grid; gap: 4px; }
.conversation-row small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.unread { min-width: 20px; color: var(--primary); text-align: center; }
.message-list { display: grid; gap: 9px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); padding: 16px; }
.message-bubble { width: min(78%, 620px); border-radius: 15px 15px 15px 4px; background: var(--surface-high); padding: 11px 13px; }
.message-bubble.mine { justify-self: end; border-radius: 15px 15px 4px; background: rgba(240,200,102,.14); }
.message-bubble p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.message-bubble small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }

.chat-promo {
  min-height: 84px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin: 0 0 14px;
  border: 1px solid rgba(240, 200, 102, 0.22);
  border-radius: var(--radius-md);
  background: linear-gradient(120deg, rgba(240, 200, 102, 0.12), transparent 55%), var(--surface);
  padding: 16px 18px;
}
.chat-promo:hover { border-color: rgba(240, 200, 102, 0.4); background: linear-gradient(120deg, rgba(240, 200, 102, 0.16), transparent 55%), var(--surface-high); }
.chat-promo-copy { min-width: 0; display: grid; gap: 4px; }
.chat-promo-copy b { font: 800 18px/1.1 var(--display); text-transform: uppercase; }
.chat-promo-copy small { color: var(--muted); font-size: 13px; }
.chat-promo-go {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border-radius: 12px;
  background: var(--primary);
  color: var(--primary-ink);
  padding: 0 14px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.chat-shell { display: grid; gap: 12px; }
.chat-list {
  min-height: 420px;
  max-height: min(62vh, 640px);
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 16px;
}
.chat-row {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  padding: 12px 14px;
}
.chat-row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.chat-row-head small { color: var(--muted); font-size: 11px; white-space: nowrap; }
.chat-row p { margin: 0; color: var(--text); font-size: 15px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-compose-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.chat-compose-row .form-state { margin: 0; flex: 1; }

@media (max-width: 920px) {
  .bar { padding-inline: 16px; gap: 12px; }
  .find { display: none; }
  .shell { width: min(calc(100% - 28px), var(--max)); padding-top: 20px; }
  .split, .profile-layout, .profile-grid { grid-template-columns: 1fr; }
  .profile-cover-body { grid-template-columns: auto minmax(0, 1fr); }
  .profile-cover-body > .profile-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .profile-fields { grid-template-columns: 1fr; }
  .settings-shell { grid-template-columns: 1fr; }
  .settings-nav { position: static; }
  .profile-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .profile-stats-card .profile-stat { border-right: 1px solid var(--line); }
  .profile-stats-card .profile-stat:nth-child(3n) { border-right: 0; }
  .rail { position: static; grid-template-columns: repeat(2, minmax(0,1fr)); }
  .rail-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .bar { min-height: 62px; overflow-x: auto; }
  .logo span { display: none; }
  .bar-nav { margin-left: auto; }
  .bar-nav a:last-child { display: none; }
  .bar-nav a { padding-inline: 10px; font-size: 12px; }
  .shell { width: min(calc(100% - 20px), var(--max)); padding-bottom: 44px; }
  .crumb { margin-bottom: 14px; }
  .page-head h1, .post h1 { font-size: clamp(28px, 9vw, 38px); }
  .page-head p { font-size: 13px; }
  .forum-section { border-radius: var(--radius-md); }
  .forum-section-head { min-height: 58px; padding: 10px 13px; }
  .forum-board-head { min-height: 58px; padding: 10px 13px; }
  .forum-row { min-height: 72px; grid-template-columns: 36px minmax(0,1fr) auto; gap: 9px; padding: 9px 11px; }
  .forum-row-metrics { display: block; }
  .forum-row-metrics > span { justify-items: end; }
  .forum-row-metrics > span:last-child, .forum-row-latest { display: none; }
  .topic-row { min-height: 68px; grid-template-columns: 36px minmax(0,1fr) auto; gap: 9px; padding: 9px 11px; }
  .forum-icon { width: 34px; height: 34px; }
  .topic-metrics { display: block; }
  .topic-metrics > span:first-child { display: grid; justify-items: end; }
  .topic-metrics .topic-last { display: none; }
  .topic-copy b { font-size: 13px; }
  .topic-copy small { font-size: 10px; }
  .rail { grid-template-columns: 1fr; }
  .rail-card:last-child:nth-child(odd) { grid-column: auto; }
  .post { grid-template-columns: 1fr; padding: 17px; }
  .post-head { grid-column: 1; grid-row: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 13px; }
  .post h1, .post-body, .chips { grid-column: 1; }
  .report-button { grid-column: 1; }
  .post-actions { grid-column: 1; }
  .post h1 { margin-top: 17px; }
  .friend-row { align-items: flex-start; flex-direction: column; }
  .friend-actions { justify-content: flex-start; }
  .message-bubble { width: 92%; }
  .profile-cover-body { grid-template-columns: 1fr; justify-items: start; gap: 12px; }
  .profile-cover-avatar { width: 104px; height: 104px; margin-top: -52px; }
  .profile-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-stats-card .profile-stat { border-right: 1px solid var(--line); }
  .profile-stats-card .profile-stat:nth-child(3n) { border-right: 1px solid var(--line); }
  .profile-stats-card .profile-stat:nth-child(2n) { border-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .bar { -webkit-backdrop-filter: none; backdrop-filter: none; background: #1b1d20; }
}
