@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400..700;1,9..40,400..700&family=Inter:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@600;700;800&family=Orbitron:wght@600;700&family=Rajdhani:wght@600;700&family=Cinzel:wght@600;700&family=Exo+2:wght@600;700&display=swap');

:root {
  --bg: #0f1218;
  --bg2: #141920;
  --surface: #161b24;
  --surface2: #1a202c;
  --surface3: #222a38;
  --surface-elevated: #1e2533;
  --border: #2a3344;
  --border2: #3d4a63;
  --text: #b8c0ce;
  --text-dim: #7a8699;
  --text-bright: #f0f3f8;
  --accent: #2d5a8c;
  --accent2: #4a9eff;
  --accent-dim: #356598;
  --accent-dark: #152028;
  --accent-glow: rgba(74, 158, 255, 0.22);
  --link: #6eb3ff;
  --link-hover: #9dccff;
  --red: #c0392b;
  --red-bright: #ff6b5b;
  --green: #27ae60;
  --green-bright: #3ee08f;
  --orange: #e67e22;
  --yellow: #f4d03f;
  --shadow-soft: 0 20px 50px rgba(0, 0, 0, 0.45);
  --shadow-panel: 0 4px 24px rgba(0, 0, 0, 0.28);
  --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --glow-accent: 0 0 0 1px rgba(74, 158, 255, 0.2);
  --radius: 8px;
  --radius-sm: 6px;
  --radius-lg: 12px;
  --max-w: 100%;
  --font-ui: "Inter", "DM Sans", system-ui, -apple-system, sans-serif;
  --font-messaging: "DM Sans", "Inter", system-ui, sans-serif;
  --font-display: "Plus Jakarta Sans", var(--font-ui);
  --react-mine: linear-gradient(135deg, rgba(200, 80, 255, 0.45), rgba(74, 158, 255, 0.35));
  --focus: #4a9eff;
  --header-gradient: linear-gradient(135deg, #2a4a6f 0%, #1e3a5c 45%, #152a45 100%);
  --mesh-bg: radial-gradient(ellipse 120% 80% at 20% -20%, rgba(74, 158, 255, 0.12), transparent 50%),
    radial-gradient(ellipse 80% 60% at 100% 0%, rgba(139, 47, 214, 0.08), transparent 45%),
    linear-gradient(180deg, #0c0f14 0%, #0f1218 40%, #0f1218 100%);
}

*, *::before, *::after { box-sizing: border-box; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
html {
  font-size: 14px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}
body {
  margin: 0;
  font-family: var(--font-ui);
  color: var(--text);
  background: var(--mesh-bg);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.55;
  font-size: 13px;
}
a { color: var(--link); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--link-hover); }
::selection {
  background: rgba(74, 158, 255, 0.28);
  color: var(--text-bright);
}
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
button:focus:not(:focus-visible) { outline: none; }

/* =============== TOP NAV =============== */
#topnav {
  background: linear-gradient(180deg, rgba(22, 27, 36, 0.98), rgba(15, 18, 24, 0.99));
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-inset), 0 8px 32px rgba(0, 0, 0, 0.35);
  position: relative;
  z-index: 100;
  backdrop-filter: blur(12px);
}
.topnav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 44px;
}
.topnav-left {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
  /* Long nav rows: horizontal scroll if needed */
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.topnav-left::-webkit-scrollbar {
  height: 4px;
}
.topnav-left::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}
#siteBrand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  /* Clear separation from first nav tab (was visually “зажата” against Databases) */
  margin-right: 4px;
  color: var(--text-bright);
  background: linear-gradient(145deg, rgba(74, 158, 255, 0.2), rgba(74, 158, 255, 0.06));
  border: 1px solid rgba(74, 158, 255, 0.25);
  border-radius: var(--radius-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
#siteBrand:hover {
  color: #fff;
  border-color: rgba(74, 158, 255, 0.45);
  box-shadow: 0 0 20px var(--accent-glow);
  transform: translateY(-1px);
}
#navLinks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  height: 100%;
  align-items: center;
  flex-shrink: 0;
}
#navLinks li { height: 100%; display: flex; align-items: center; }
#navLinks li a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-ui);
  color: var(--text-dim);
  text-decoration: none;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
  position: relative;
}
#navLinks li a:hover {
  color: var(--text-bright);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border2);
}
#navLinks li a.active {
  color: #fff;
  background: linear-gradient(180deg, rgba(74, 158, 255, 0.22), rgba(74, 158, 255, 0.08));
  border-color: rgba(74, 158, 255, 0.35);
  box-shadow: inset 0 0 0 1px rgba(74, 158, 255, 0.25);
}
#navLinks li a i { font-size: 12px; opacity: 0.9; }

#topnav-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  min-width: 0;
  position: relative;
  flex-shrink: 0;
}
.welcome-area {
  font-size: 11px;
  color: var(--text-dim);
  margin-right: 10px;
  line-height: 1.35;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: visible;
  flex-shrink: 0;
}
.welcome-avatar-wrap .avatar {
  flex-shrink: 0;
}
#welcomeText {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
#welcomeText strong { color: var(--text-bright); font-weight: 600; }
#welcomeText .welcome-rank {
  margin: 0;
  transform: translateY(-1px);
  flex-shrink: 0;
}
#welcomeText .welcome-name {
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  overflow: visible;
  white-space: nowrap;
}
#welcomeText .welcome-credits {
  color: var(--text-dim);
  white-space: nowrap;
}

.pm-unread-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 800;
  background: var(--red-bright);
  color: #fff;
  vertical-align: middle;
  line-height: 1.3;
}

/* Compact avatars (lists, nav, hero) */
.avatar.avatar--xs {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--border2);
  overflow: hidden;
}
.avatar.avatar--sm {
  width: 32px;
  height: 32px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--border2);
  overflow: hidden;
}
.avatar.avatar--md {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--border2);
  overflow: hidden;
}
.avatar.avatar--xs.avatar-photo,
.avatar.avatar--sm.avatar-photo,
.avatar.avatar--md.avatar-photo {
  display: block;
  object-fit: cover;
  padding: 0;
}

/* =============== HERO =============== */
#hero-band {
  position: relative;
  min-height: 88px;
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(15, 18, 24, 0.4), rgba(15, 18, 24, 0.92)),
    var(--header-gradient);
  overflow: hidden;
}
#hero-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 120% at 10% 50%, rgba(74, 158, 255, 0.15), transparent 55%),
    radial-gradient(ellipse 50% 100% at 90% 20%, rgba(139, 47, 214, 0.1), transparent 50%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 16px 18px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.hero-user-slot { flex-shrink: 0; }
.hero-user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.hero-user-pill .hero-user-avatar { border-radius: 50%; }
.hero-user-meta {
  display: flex;
  flex-direction: column;
  gap: 0;
  line-height: 1.15;
}
.hero-user-hi {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}
.hero-user-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-bright);
}
.hero-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.hero-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #9dccff;
  font-size: 18px;
  box-shadow: var(--shadow-inset);
}
.hero-text { display: flex; flex-direction: column; gap: 2px; }
.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1.15;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.35);
}
.hero-tagline {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* =============== BUTTONS =============== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.35;
  box-shadow: var(--shadow-inset);
}
.btn:active { transform: translateY(1px); }
.btn i { font-size: 12px; opacity: 0.95; }
.btn-primary {
  background: linear-gradient(180deg, #4a8fd4, #2d6aad);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-inset), 0 4px 14px rgba(45, 106, 173, 0.35);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #5a9ee0, #3578c4);
  box-shadow: var(--shadow-inset), 0 6px 20px rgba(45, 106, 173, 0.45);
}
.btn-login {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-bright);
  border-color: var(--border);
  padding-inline: 12px;
}
.btn-login:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--border2); }
.btn-register {
  background: linear-gradient(180deg, #4caf6a, #2e8b4a);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 14px rgba(46, 139, 74, 0.35);
}
.btn-register:hover { filter: brightness(1.06); }
.btn-secondary {
  background: linear-gradient(180deg, #2a3344, #222a38);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { background: #323d52; border-color: var(--border2); }
.btn-danger {
  background: rgba(192, 57, 43, 0.15);
  color: var(--red-bright);
  border-color: rgba(192, 57, 43, 0.35);
}
.btn-danger:hover { background: rgba(192, 57, 43, 0.28); }
.btn-small { padding: 5px 10px; font-size: 11px; }
.btn-notifications {
  position: relative;
  padding-inline: 10px;
}
.notifications-count {
  position: absolute;
  top: -6px;
  right: -5px;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  padding: 0 4px;
  font-size: 9px;
  font-weight: 800;
  color: #fff;
  background: var(--green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 0, 0, 0.25);
}
.notifications-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  width: min(360px, 90vw);
  max-height: 420px;
  border: 1px solid var(--border2);
  background: var(--surface2);
  border-radius: var(--radius);
  box-shadow: var(--shadow-panel);
  z-index: 120;
  overflow: hidden;
}
.notifications-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}
.notifications-header strong {
  color: var(--text-bright);
  font-size: 11px;
  font-weight: 700;
}
.notifications-list {
  max-height: 360px;
  overflow: auto;
}
.notifications-item {
  padding: 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.notifications-item:last-child {
  border-bottom: 0;
}
.notifications-item--unread {
  background: rgba(62, 224, 143, 0.08);
}
.notifications-item-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.notifications-message {
  color: var(--text-bright);
  font-size: 12px;
  font-weight: 600;
}
.notifications-time {
  color: var(--text-dim);
  font-size: 10px;
}
.notifications-empty {
  padding: 16px 12px;
  color: var(--text-dim);
  font-size: 12px;
  text-align: center;
}
.btn-today {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-bright);
  font-size: 11px;
  font-weight: 600;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.btn-today:hover {
  background: rgba(74, 158, 255, 0.12);
  border-color: rgba(74, 158, 255, 0.35);
  color: #fff;
  text-decoration: none;
}

/* =============== BREADCRUMB BAR =============== */
#breadcrumb-bar {
  background: rgba(22, 27, 36, 0.85);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-inset);
}
.breadcrumb-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
#breadcrumb {
  font-size: 12px;
  color: var(--text-dim);
}
#breadcrumb .hash {
  color: var(--accent2);
  font-weight: 800;
  margin-right: 2px;
}
#breadcrumb a { color: var(--text-dim); font-weight: 500; }
#breadcrumb a:hover { color: var(--link); }
.breadcrumb-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* =============== CATEGORY TABS =============== */
#cat-tabs-bar {
  background: rgba(20, 25, 32, 0.9);
  border-bottom: 1px solid var(--border);
}
.cattabs-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 10px 18px;
}
#catTabs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
#catTabs li a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  text-decoration: none;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
#catTabs li a:hover {
  color: var(--text-bright);
  border-color: var(--border2);
  background: rgba(255, 255, 255, 0.06);
}
#catTabs li a.active {
  color: #fff;
  background: linear-gradient(180deg, rgba(74, 158, 255, 0.35), rgba(45, 90, 140, 0.5));
  border-color: rgba(74, 158, 255, 0.45);
  box-shadow: 0 4px 16px rgba(45, 90, 140, 0.25);
}
#catTabs li a i { font-size: 11px; }

/* =============== STATUSBAR =============== */
.statusbar {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 18px;
  min-height: 0;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.statusbar:not(:empty) {
  padding: 10px 14px;
  margin: 10px auto 0;
  border: 1px solid transparent;
}
.statusbar.statusbar--err:not(:empty) {
  background: rgba(231, 76, 60, 0.12);
  border-color: rgba(231, 76, 60, 0.35);
  color: #ffb4a8;
}
.statusbar.statusbar--ok:not(:empty) {
  background: rgba(46, 224, 143, 0.1);
  border-color: rgba(46, 224, 143, 0.3);
  color: #8fefb8;
}

/* =============== LAYOUT =============== */
#wrapper {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 16px 18px 32px;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 16px;
  align-items: start;
}
#content-area { min-width: 0; }

/* Full chat tab: hide sidebar shoutbox + mini chat (same backend feed). */
body.route-chat #shoutbox,
body.route-chat #sidebarMiniChat {
  display: none !important;
}

/* Messages: use full content row; forum sidebar steals space and pushes composer below the fold */
body.route-messages #wrapper {
  grid-template-columns: 1fr;
  max-width: 100%;
  align-items: stretch;
  padding-bottom: 12px;
}
body.route-messages #sidebar,
body.route-messages aside#sidebar {
  display: none !important;
}
body.route-messages #content-area {
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
body.route-messages #viewRoot {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
body.route-messages .pm-page--split {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
}
body.route-messages .pm-page {
  margin-bottom: 0;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

body.index-view #sidebar > :not(#latestActivity):not(#latestQuickAccess):not(#sidebarMiniChat):not(#sidebarActiveUsers):not(#latestGuidelines) {
  display: none;
}

body.index-view #sidebar {
  gap: 0;
}

/* =============== INPUTS =============== */
.input {
  width: 100%;
  padding: 9px 12px;
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-bright);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input:focus {
  outline: none;
  border-color: rgba(74, 158, 255, 0.5);
  box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.12);
}
textarea.input { resize: vertical; min-height: 100px; }
select.input { cursor: pointer; }
label { display: flex; flex-direction: column; gap: 5px; }
label span { font-size: 11px; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.04em; }

/* =============== CATEGORY SECTION =============== */
.category-section {
  margin-bottom: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-panel);
}
.category-section + .category-section { margin-top: 14px; }

.category-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: #fff;
  cursor: pointer;
  user-select: none;
  background: linear-gradient(180deg, #3d6a9a, #284a72);
  box-shadow: var(--shadow-inset);
}
.category-header .cat-icon { font-size: 13px; }
.category-header .chevron {
  margin-left: auto;
  font-size: 10px;
  color: rgba(255,255,255,.35);
  transition: transform .15s;
}
.category-header.collapsed .chevron { transform: rotate(-90deg); }

.category-body {
  background: rgba(0, 0, 0, 0.12);
}

/* =============== FORUM ROW =============== */
.forum-row {
  display: grid;
  grid-template-columns: 46px 1fr 58px 58px 175px;
  gap: 0;
  align-items: center;
  padding: 13px 14px;
  border-top: 1px solid var(--border);
  transition: background 0.15s ease, border-color 0.15s ease;
  position: relative;
}
.forum-row:hover {
  background: rgba(74, 158, 255, 0.04);
}
.forum-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: transparent;
  transition: background 0.15s ease;
}
.forum-row:hover::before {
  background: linear-gradient(180deg, var(--accent2), #2d6aad);
}

.forum-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--accent2);
  background: rgba(74, 158, 255, 0.08);
  flex-shrink: 0;
  border: 1px solid rgba(74, 158, 255, 0.2);
}

.forum-info { padding-right: 12px; min-width: 0; }
.forum-info h4 { margin: 0; font-size: 13px; font-weight: 700; font-family: var(--font-display); }
.forum-info h4 a { color: var(--text-bright); }
.forum-info h4 a:hover { color: var(--link); text-decoration: none; }
.forum-info p {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.4;
}
.forum-info .subforum-links {
  margin-top: 4px;
  font-size: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 3px 10px;
}
.forum-info .subforum-links a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-dim);
}
.forum-info .subforum-links a:hover { color: var(--link); text-decoration: none; }
.subforum-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.forum-stat {
  text-align: center;
  padding: 0 4px;
}
.forum-stat .stat-num {
  font-size: 13px;
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--text-bright);
  display: block;
  line-height: 1;
}
.forum-stat .stat-lbl {
  font-size: 8px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .05em;
  display: block;
  margin-top: 1px;
}

.forum-lastpost {
  font-size: 10px;
  color: #8a909a;
  line-height: 1.4;
  min-width: 0;
  padding-left: 8px;
  border-left: 1px solid rgba(255,255,255,.06);
}
.forum-lastpost a { font-weight: 600; color: var(--text-bright); }
.forum-lastpost a:hover { color: #fff; text-decoration: none; }
.forum-lastpost .lp-meta { display: block; margin-top: 1px; font-size: 9px; }
.forum-lastpost .lp-meta a { font-weight: 600; color: #d7dde5; }
.forum-lastpost-inner {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}
.forum-lastpost-inner .lp-avatar { margin-top: 1px; }
.forum-lastpost-inner .lp-stack { min-width: 0; }
.lastpost-never { color: var(--text-dim); font-style: italic; font-size: 12px; }

/* =============== THREAD LIST =============== */
.thread-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: linear-gradient(180deg, rgba(45, 90, 140, 0.35), rgba(26, 32, 44, 0.95));
  border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: var(--shadow-inset);
}
.thread-list-header h3 {
  margin: 0;
  font-size: 15px;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-bright);
}

.thread-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-panel);
}
.thread-table th {
  padding: 10px 14px;
  background: var(--surface3);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.thread-table td {
  padding: 11px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  vertical-align: middle;
}
.thread-table tr:hover td { background: rgba(74, 158, 255, 0.04); }
.thread-table tr:last-child td { border-bottom: 0; }
.thread-table .thread-title { font-weight: 600; }
.thread-table .thread-title a { color: var(--text-bright); }
.thread-table .thread-title a:hover { color: var(--accent2); text-decoration: none; }
.thread-table .thread-author { font-size: 10px; color: var(--text-dim); margin-top: 2px; }
.thread-author--row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.thread-author--row .thread-author-avatar { margin-top: 0; }
.thread-author-meta { min-width: 0; }
.thread-table td.num { text-align: center; font-weight: 600; }
.thread-inline-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  vertical-align: middle;
}
.thread-inline-actions .btn {
  padding: 2px 7px;
  font-size: 10px;
}

/* =============== THREAD VIEW / POSTS =============== */
.thread-header {
  padding: 16px 18px;
  background: linear-gradient(180deg, var(--surface2), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: var(--shadow-panel);
}
.thread-header h2 {
  margin: 0;
  font-size: 1.15rem;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-bright);
  line-height: 1.25;
}
.thread-header .meta { font-size: 12px; color: var(--text-dim); }
.thread-header-left {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  flex: 1;
}
.thread-header-text { min-width: 0; }
.thread-starter-avatar { margin-top: 2px; }

.post-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-panel);
  transition: border-color 0.15s ease;
}
.post-card:hover { border-color: rgba(74, 158, 255, 0.2); }
.post-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-dim);
}
.post-inner {
  display: grid;
  grid-template-columns: 170px 1fr;
}
.post-author {
  padding: 14px 12px;
  border-right: 1px solid var(--border);
  text-align: center;
}
.post-author .avatar {
  width: 72px;
  height: 72px;
  border-radius: 4px;
  background: var(--surface3);
  margin: 0 auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--accent2);
  font-weight: 700;
  border: 2px solid var(--border2);
}
.post-author .avatar.avatar-photo {
  display: block;
  object-fit: cover;
  padding: 0;
}
.post-author .username { font-weight: 700; font-size: 13px; margin-bottom: 2px; }
.post-author .username a { color: var(--accent2); }
.post-author .username a.role-admin { color: var(--red-bright); }
.post-author .username a.role-moderator { color: var(--green-bright); }
.post-author .username a.role-god { color: #d2a6ff; }
.post-author .username a.role-mvp { color: #7ed8f0; }
.post-author .username a.role-vip { color: #ffd766; }

/* Global role typography for nicknames (used across forum/chat/profile/online) */
a.role-vip,
.user-link.role-vip,
.role-vip {
  font-family: "Rajdhani", "Inter", sans-serif;
  font-weight: 700;
}
a.role-mvp,
.user-link.role-mvp,
.role-mvp {
  font-family: "Exo 2", "Inter", sans-serif;
  font-weight: 700;
}
a.role-god,
.user-link.role-god,
.role-god {
  font-family: "Orbitron", "Inter", sans-serif;
  font-weight: 700;
  letter-spacing: 0.02em;
}
a.role-admin,
.user-link.role-admin,
.role-admin {
  font-family: "Cinzel", "Inter", serif;
  font-weight: 700;
  letter-spacing: 0.02em;
}
a.role-moderator,
.user-link.role-moderator,
.role-moderator {
  font-family: "Rajdhani", "Inter", sans-serif;
  font-weight: 700;
}
.role-vip { color: #ffd766; }
.role-mvp { color: #7ed8f0; }
.role-god { color: #d2a6ff; }
.role-admin { color: var(--red-bright); }
.role-moderator { color: var(--green-bright); }

.user-title {
  font-size: 9px;
  padding: 3px 10px;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  margin-bottom: 4px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  border: 1px solid transparent;
  position: relative;
  white-space: nowrap;
}
.user-inline-rank {
  margin: 0 0 0 6px;
  padding: 1px 7px;
  font-size: 8px;
  line-height: 1.2;
  vertical-align: middle;
  transform: translateY(-1px);
}
.lp-meta .user-inline-rank,
.thread-author .user-inline-rank,
.activity-meta .user-inline-rank {
  margin-left: 5px;
}

/* Animated rank badges + bracket “prefix/suffix” */
@keyframes rank-vip-flow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@keyframes rank-mvp-flow {
  0%, 100% { background-position: 100% 50%; }
  50% { background-position: 0% 50%; }
}
@keyframes rank-god-flow {
  0%, 100% { background-position: 0% 50%; filter: hue-rotate(0deg); }
  33% { background-position: 50% 50%; filter: hue-rotate(8deg); }
  66% { background-position: 100% 50%; filter: hue-rotate(-6deg); }
}
@keyframes rank-admin-flow {
  0%, 100% { background-position: 0% 50%; box-shadow: 0 0 8px rgba(192, 57, 43, 0.35); }
  50% { background-position: 100% 50%; box-shadow: 0 0 16px rgba(231, 76, 60, 0.55); }
}
@keyframes rank-bracket-pulse {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.12); }
}
@keyframes rank-sparkle {
  0%, 100% { text-shadow: 0 0 4px rgba(255,255,255,0.3); }
  50% { text-shadow: 0 0 10px rgba(255,255,255,0.85); }
}

.user-title.rank-vip {
  background: linear-gradient(105deg, #3d2f0a, #6e5510, #c9a227, #fff6c8, #c9a227, #4a3b12);
  background-size: 260% 100%;
  animation: rank-vip-flow 4.2s ease infinite;
  color: #1a1305;
  border-color: #e0bc4a;
  box-shadow: 0 0 12px rgba(201, 162, 39, 0.4);
  font-family: "Rajdhani", "Plus Jakarta Sans", sans-serif;
}
.user-title.rank-vip::before,
.user-title.rank-vip::after {
  font-weight: 900;
  animation: rank-bracket-pulse 2.1s ease-in-out infinite;
}
.user-title.rank-vip::before { content: "["; margin-right: 2px; }
.user-title.rank-vip::after { content: "]"; margin-left: 2px; animation-delay: 0.12s; }

.user-title.rank-mvp {
  background: linear-gradient(105deg, #052830, #0d5667, #2aa8c7, #d4fbff, #2aa8c7, #083a47);
  background-size: 260% 100%;
  animation: rank-mvp-flow 4.5s ease infinite;
  color: #021820;
  border-color: #4ad0f0;
  box-shadow: 0 0 14px rgba(42, 168, 199, 0.45);
  font-family: "Exo 2", "Plus Jakarta Sans", sans-serif;
}
.user-title.rank-mvp::before,
.user-title.rank-mvp::after {
  font-weight: 900;
  animation: rank-bracket-pulse 2.4s ease-in-out infinite;
}
.user-title.rank-mvp::before { content: "»"; margin-right: 3px; font-size: 11px; }
.user-title.rank-mvp::after { content: "«"; margin-left: 3px; font-size: 11px; animation-delay: 0.15s; }

.user-title.rank-god {
  background: linear-gradient(105deg, #1a0630, #4a1a78, #8b2fd6, #f0d8ff, #8b2fd6, #2d0d4a);
  background-size: 280% 100%;
  animation: rank-god-flow 6s ease infinite;
  color: #faf5ff;
  border-color: #c77dff;
  box-shadow: 0 0 18px rgba(139, 47, 214, 0.5);
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.35);
  font-family: "Orbitron", "Plus Jakarta Sans", sans-serif;
  letter-spacing: 0.1em;
}
.user-title.rank-god::before {
  content: "\2726";
  margin-right: 4px;
  font-size: 10px;
  animation: rank-sparkle 1.8s ease-in-out infinite;
}
.user-title.rank-god::after {
  content: "\2726";
  margin-left: 4px;
  font-size: 10px;
  animation: rank-sparkle 1.8s ease-in-out infinite 0.35s;
}

.user-title.rank-admin {
  background: linear-gradient(105deg, #4a1212, #8b2020, #c0392b, #ffb4a8, #c0392b, #5c1515);
  background-size: 240% 100%;
  animation: rank-admin-flow 3.2s ease infinite;
  color: #fff;
  border-color: #ff7a6e;
  font-family: "Cinzel", "Plus Jakarta Sans", serif;
  letter-spacing: 0.1em;
  text-shadow: 0 0 10px rgba(255, 180, 160, 0.45);
  box-shadow: 0 0 20px rgba(255, 80, 60, 0.22), 0 0 2px rgba(255, 120, 100, 0.9);
}
.user-title.rank-admin::before,
.user-title.rank-admin::after {
  font-weight: 900;
  animation: rank-bracket-pulse 1.6s ease-in-out infinite;
}
.user-title.rank-admin::before {
  content: "\2694";
  margin-right: 3px;
  font-size: 10px;
}
.user-title.rank-admin::after {
  content: "\2694";
  margin-left: 3px;
  font-size: 10px;
  animation-delay: 0.12s;
}
.user-title.rank-moderator {
  background: linear-gradient(105deg, #0f3923, #1f7c47, #2dcf73, #95ffbf, #2dcf73, #145332);
  color: #052313;
  border-color: #64f3a2;
  font-family: "Rajdhani", "Plus Jakarta Sans", sans-serif;
  letter-spacing: 0.08em;
  text-shadow: 0 0 8px rgba(150, 255, 200, 0.35);
  box-shadow: 0 0 18px rgba(62, 224, 143, 0.45), 0 0 1px rgba(100, 243, 162, 0.85);
}

.user-title.rank-member,
.user-title.rank-normal {
  background: var(--surface3);
  color: var(--text-dim);
  border: 1px solid var(--border);
}

.post-author .user-stats {
  font-size: 10px;
  color: var(--text-dim);
  line-height: 1.7;
  text-align: left;
  margin-top: 6px;
}
.post-body {
  padding: 18px 20px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 80px;
  font-size: 13px;
  color: var(--text);
}
.post-body--editing { outline: 1px dashed rgba(74, 158, 255, 0.35); outline-offset: -4px; }
.thread-locked-body {
  color: var(--text-dim);
  background: rgba(0, 0, 0, 0.16);
  font-style: italic;
}

.hidden-content-block {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}
.hidden-content-block label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.hidden-content-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}
.hidden-content-actions .btn-small {
  font-size: 11px;
}

.post-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 10px 20px 14px;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.12);
}
.post-reactions--tz {
  position: relative;
  padding: 8px 14px 10px;
  gap: 8px;
}
.post-react-tz-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.post-react-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  flex: 1;
  min-width: 0;
}
.post-react-chips--empty {
  min-height: 0;
}
.post-react-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(18, 22, 32, 0.65);
  color: var(--text);
  font-size: 12px;
  cursor: default;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: post-react-chip-in 0.42s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.post-react-chip--mine {
  cursor: pointer;
  border: 1px solid transparent;
  background:
    linear-gradient(rgba(14, 18, 26, 0.92), rgba(14, 18, 26, 0.92)) padding-box,
    var(--react-mine) border-box;
  box-shadow:
    0 0 16px rgba(180, 90, 255, 0.18),
    0 0 0 1px rgba(74, 158, 255, 0.25);
}
.post-react-chip--mine:hover {
  transform: scale(1.04);
}
.post-react-chip-emoji {
  font-size: 15px;
  line-height: 1;
}
.post-react-chip-n {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 600;
  min-width: 1ch;
}
.post-react-chip--mine .post-react-chip-n {
  color: var(--text-bright);
}
.post-react-tz-ctrl {
  position: relative;
  flex-shrink: 0;
}
.post-react-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border-radius: 999px;
  border: 1px dashed rgba(74, 158, 255, 0.35);
  background: rgba(0, 0, 0, 0.2);
  color: var(--accent2);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.post-react-add:hover {
  background: rgba(74, 158, 255, 0.12);
  border-style: solid;
  transform: scale(1.05);
}
.post-react-popover {
  display: none;
  position: absolute;
  z-index: 30;
  bottom: calc(100% + 8px);
  right: 0;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 10px;
  max-width: min(320px, 90vw);
  border-radius: 14px;
  background: rgba(18, 22, 32, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(74, 158, 255, 0.25);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.post-react-emoji-pick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  transition: transform 0.15s ease, background 0.15s;
}
.post-react-emoji-pick:hover {
  background: rgba(74, 158, 255, 0.15);
  transform: scale(1.12);
}
@media (hover: hover) and (pointer: fine) {
  .post-reactions--tz:hover .post-react-popover {
    display: flex;
  }
  .post-reactions--tz.post-reactions--open .post-react-popover {
    display: flex;
  }
}
@media (hover: none), (pointer: coarse) {
  .post-reactions--tz.post-reactions--open .post-react-popover {
    display: flex;
  }
}
.post-reactions--burst .post-react-chips {
  animation: post-reaction-burst 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes post-react-chip-in {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes post-reaction-burst {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}
.post-react-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.post-react-btn:hover {
  border-color: var(--accent2);
  background: var(--surface3);
}
.post-react-btn.post-react-btn--active {
  border-color: var(--accent2);
  background: rgba(74, 158, 255, 0.12);
  box-shadow: 0 0 0 1px rgba(74, 158, 255, 0.2);
}
.post-react-emoji {
  font-size: 15px;
  line-height: 1;
}
.post-react-count {
  font-size: 11px;
  color: var(--text-dim);
  min-width: 1ch;
}
.post-react-btn.post-react-btn--active .post-react-count {
  color: var(--text-bright);
}

/* =============== SIDEBAR =============== */
#sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 14px;
}

#sidebar #shoutbox {
  display: none;
}

.sidebar-box {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-panel);
}

.inline-shoutbox {
  margin-top: 10px;
}

.inline-shout-toolbar {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
  padding: 8px 12px;
  font-size: 11px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.02);
}

.inline-shout-toolbar span {
  white-space: nowrap;
}

.inline-shout-link {
  color: var(--accent2);
  font-weight: 600;
}

.inline-shout-messages {
  height: 220px;
}

.inline-shout-input {
  padding: 8px;
}

.inline-shout-input input {
  font-size: 11px;
}
.sidebar-title {
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 800;
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(180deg, #3d6a9a, #284a72);
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-inset);
}
.sidebar-title i { font-size: 12px; opacity: 0.95; }

/* Shoutbox */
.shout-messages {
  height: 120px;
  overflow-y: auto;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.45;
  scrollbar-width: thin;
  scrollbar-color: var(--border2) transparent;
}
.shout-msg {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 6px 10px;
}
.shout-avatar { margin-top: 2px; }
.shout-msg:last-child { border-bottom: 0; }
.shout-msg-main {
  flex: 1;
  min-width: 0;
  line-height: 1.45;
  font-size: 12px;
}
.shout-msg .shout-user,
.shout-msg .shout-user.user-link {
  font-weight: 700;
  color: var(--accent2);
  margin-right: 0;
}
.shout-msg--ranked .shout-user.user-link.role-vip { color: #ffd766; }
.shout-msg--ranked .shout-user.user-link.role-mvp { color: #7ed8f0; }
.shout-msg--ranked .shout-user.user-link.role-god { color: #d2a6ff; }
.shout-msg--ranked .shout-user.user-link.role-admin { color: var(--red-bright); }
.shout-msg--ranked .shout-user.user-link.role-moderator { color: var(--green-bright); }
.shout-colon { color: var(--text-dim); margin: 0 2px 0 0; font-weight: 600; }
.shout-text { color: var(--text); word-break: break-word; }
.shout-time { font-size: 10px; color: var(--text-dim); white-space: nowrap; margin-left: auto; opacity: 0.85; }

/* Compact rank badge in chat / shoutbox: keep colors, drop animated brackets */
.shout-rank.user-title,
.online-rank.user-title {
  padding: 2px 7px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.06em;
  margin-right: 6px;
  vertical-align: middle;
  flex-shrink: 0;
}
.shout-rank.user-title::before,
.shout-rank.user-title::after,
.online-rank.user-title::before,
.online-rank.user-title::after {
  content: none !important;
  animation: none !important;
  margin: 0 !important;
}

.chatroom-messages .shout-rank.user-title {
  font-size: 9px;
  padding: 3px 9px;
}
.chatroom-messages .shout-msg {
  padding: 10px 12px;
  margin-bottom: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.22);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}
.chatroom-messages .shout-msg:nth-child(even) {
  background: rgba(255, 255, 255, 0.04);
}
.chatroom-messages .shout-msg:last-child {
  margin-bottom: 0;
}
.chatroom-messages .shout-msg-main { font-size: 13px; }

/* Online users list */
.online-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
}
.online-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 0;
}
.online-chip .user-link {
  font-family: "Inter", var(--font-ui);
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text-bright);
}
.online-chip--ranked .user-link { font-weight: 700; }
.online-chip--ranked .user-link.role-vip {
  color: #ffd766;
  font-family: "Rajdhani", "Inter", sans-serif;
  font-size: 13px;
}
.online-chip--ranked .user-link.role-mvp {
  color: #7ed8f0;
  font-family: "Exo 2", "Inter", sans-serif;
  font-size: 13px;
}
.online-chip--ranked .user-link.role-god {
  color: #d2a6ff;
  font-family: "Orbitron", "Inter", sans-serif;
  font-size: 13px;
  letter-spacing: 0.03em;
}
.online-chip--ranked .user-link.role-admin {
  color: #ff8b7f;
  font-family: "Cinzel", "Inter", serif;
  font-size: 13px;
  letter-spacing: 0.03em;
}
.online-chip--ranked .user-link.role-moderator {
  color: var(--green-bright);
  font-family: "Rajdhani", "Inter", sans-serif;
  font-size: 13px;
}
.online-rank.user-title {
  margin-right: 0;
  margin-left: 4px;
}
.online-rank.user-title.rank-vip {
  font-family: "Rajdhani", "Plus Jakarta Sans", sans-serif;
  font-size: 9px;
}
.online-rank.user-title.rank-mvp {
  font-family: "Exo 2", "Plus Jakarta Sans", sans-serif;
  font-size: 9px;
}
.online-rank.user-title.rank-god {
  font-family: "Orbitron", "Plus Jakarta Sans", sans-serif;
  font-size: 9px;
  letter-spacing: 0.08em;
}
.online-rank.user-title.rank-admin {
  font-family: "Cinzel", "Plus Jakarta Sans", serif;
  font-size: 9px;
  letter-spacing: 0.08em;
}
.online-rank.user-title.rank-moderator {
  font-family: "Rajdhani", "Plus Jakarta Sans", sans-serif;
  font-size: 9px;
  letter-spacing: 0.08em;
}
.online-hint {
  margin-top: 10px;
  font-size: 10px;
  color: var(--text-dim);
  opacity: 0.9;
}
.online-empty {
  font-size: 11px;
  color: var(--text-dim);
  font-style: italic;
}
.shout-input {
  display: flex;
  gap: 4px;
  padding: 5px 6px;
  border-top: 1px solid var(--border);
  background: var(--bg2);
}
.shout-input input {
  flex: 1;
  padding: 5px 8px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 11px;
}
.shout-input input:focus { outline: none; border-color: var(--accent); }

/* Sidebar mini chat (same feed as shoutbox / chat tab) */
.sidebar-mini-chat .sidebar-mini-chat-messages {
  height: 100px;
  min-height: 72px;
  padding: 6px 8px;
  font-size: 11px;
}
.sidebar-mini-chat .shout-msg {
  padding: 5px 0;
  gap: 4px 8px;
}
.sidebar-mini-chat .shout-msg-main {
  font-size: 11px;
}
.sidebar-mini-chat .shout-time {
  font-size: 9px;
}
.sidebar-mini-chat .sidebar-mini-chat-input-row {
  padding: 4px 5px;
}
.sidebar-mini-chat .sidebar-mini-chat-input-row input {
  font-size: 10px;
  padding: 4px 7px;
}

/* Latest Posts */
.activity-list { max-height: 430px; overflow-y: auto; }
.activity-item {
  padding: 8px 8px;
  border-bottom: 1px solid var(--border);
  font-size: 10px;
  line-height: 1.3;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  transition: background .12s;
}
.activity-item:last-child { border-bottom: 0; }
.activity-item:hover { background: rgba(255,255,255,.02); }
.activity-avatar { flex-shrink: 0; margin-top: 1px; }
.activity-main { min-width: 0; flex: 1; }
.activity-item .activity-title {
  font-weight: 600;
  display: block;
  line-height: 1.25;
}
.activity-item .activity-title a { color: var(--text-bright); }
.activity-item .activity-title a:hover { color: var(--link); text-decoration: none; }
.activity-item .activity-meta {
  font-size: 9px;
  color: #9298a2;
  margin-top: 2px;
}
.activity-item .activity-meta a { color: #d2dae4; font-weight: 600; }
.activity-item .activity-meta .role-admin { color: var(--red-bright); }
.activity-item .activity-meta .role-moderator { color: var(--green-bright); }
.activity-item .activity-meta .role-god { color: #d2a6ff; }
.activity-item .activity-meta .role-mvp { color: #7ed8f0; }
.activity-item .activity-meta .role-vip { color: #ffd766; }

.important-tag {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 2px;
  font-size: 7px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  margin-right: 3px;
  vertical-align: middle;
}
.activity-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 14px;
  height: 14px;
  padding: 0 4px;
  border-radius: 3px;
  background: linear-gradient(180deg, #3f678f, #2c4b6b);
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

#latestQuickAccess {
  margin-top: 10px;
}

.sidebar-quick-links {
  display: grid;
  gap: 8px;
  padding: 10px 12px 0;
}

.sidebar-quick-links a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-bright);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.sidebar-quick-links a:hover {
  background: rgba(74, 158, 255, 0.12);
  border-color: rgba(74, 158, 255, 0.45);
  color: #fff;
}

.sidebar-quick-note {
  padding: 10px 12px 12px;
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.5;
}

.sidebar-feed-list {
  display: grid;
  gap: 7px;
  padding: 10px 12px 12px;
}

.sidebar-feed-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.45;
}

.sidebar-feed-item i {
  color: var(--accent2);
  margin-top: 2px;
  flex-shrink: 0;
}
.tag-red { background: var(--red); color: #fff; }
.tag-orange { background: var(--orange); color: #fff; }
.tag-green { background: var(--green); color: #fff; }

.chatroom-view {
  display: flex;
  flex-direction: column;
  max-width: 880px;
  margin: 0 auto;
  width: 100%;
  min-height: min(72vh, 680px);
  max-height: calc(100vh - 168px);
  border-radius: var(--radius);
  overflow: hidden;
}

.chatroom-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.chatroom-title-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.chatroom-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #a8f5c8;
  opacity: 0.95;
}

.chatroom-live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.65);
  animation: chatroom-live-pulse 2s ease-in-out infinite;
}

@keyframes chatroom-live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.65; transform: scale(0.9); }
}

.chatroom-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.chatroom-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 12px;
  font-size: 11px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.02);
  flex-shrink: 0;
}

.chatroom-messages {
  flex: 1 1 auto;
  min-height: 200px;
  max-height: min(56vh, 580px);
  height: auto !important;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 12px 14px;
  scroll-behavior: smooth;
  background: linear-gradient(180deg, rgba(12, 16, 22, 0.35) 0%, rgba(8, 10, 14, 0.5) 100%);
}

.chatroom-messages:focus-visible {
  outline: 2px solid rgba(74, 158, 255, 0.45);
  outline-offset: -2px;
}

.chatroom-input {
  padding: 10px 12px;
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
}

.chatroom-input input {
  font-size: 13px;
  padding: 8px 11px;
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.stat-item {
  padding: 7px 10px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  font-size: 11px;
}
.stat-item:nth-child(even) { border-right: 0; }
.stat-item .stat-val { font-size: 14px; font-weight: 700; color: var(--accent2); }
.stat-item .stat-label { font-size: 9px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .04em; }

/* Online users */
.online-users { padding: 7px 10px; font-size: 11px; color: var(--text-dim); line-height: 1.5; }
#sidebarActiveUsers .online-list {
  max-height: 220px;
  overflow-y: auto;
  scrollbar-width: thin;
}

/* =============== FOOTER =============== */
#footer {
  background: linear-gradient(180deg, rgba(12, 15, 20, 0.98), #0a0c10);
  border-top: 1px solid var(--border);
  margin-top: 24px;
  box-shadow: 0 -20px 40px rgba(0, 0, 0, 0.35);
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 28px 18px 22px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 28px;
}
.footer-inner h4 {
  margin: 0 0 10px;
  font-size: 12px;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-bright);
}
.footer-inner p { font-size: 12px; color: var(--text-dim); line-height: 1.65; margin: 0; max-width: 36ch; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; }
.footer-nav li { margin-bottom: 6px; }
.footer-nav a { font-size: 12px; color: var(--text-dim); font-weight: 500; }
.footer-nav a:hover { color: var(--link); }
.footer-bottom {
  text-align: center;
  padding: 12px 14px;
  font-size: 11px;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
  opacity: 0.9;
}

/* =============== MODALS =============== */
.modal {
  padding: 0;
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  max-width: 480px;
  width: 92vw;
  box-shadow: var(--shadow-soft), 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.modal--composer {
  max-width: min(920px, 96vw);
  width: min(920px, 96vw);
}
.modal--composer .modal-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.input--composer {
  min-height: 220px;
  resize: vertical;
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.55;
}
/* Forum-style post editor (thread page + modals) */
.forum-post-editor {
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.12));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 4px 18px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}
.forum-post-editor--modal {
  margin-top: 4px;
}
.forum-post-editor__label {
  display: block;
  padding: 8px 12px 0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}
.forum-post-editor__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(45, 90, 140, 0.25), rgba(15, 18, 24, 0.85));
  font-size: 11px;
  color: var(--text-dim);
}
.forum-post-editor__toolbar-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  color: var(--text-bright);
  font-family: var(--font-display);
}
.forum-post-editor__toolbar-title i {
  opacity: 0.9;
  font-size: 12px;
}
.forum-post-editor__toolbar-note {
  font-size: 10px;
  opacity: 0.85;
}
.forum-post-editor__field {
  padding: 0;
  background: rgba(0, 0, 0, 0.28);
}
.forum-post-editor__field textarea.input--forum-editor,
textarea.input--forum-editor {
  min-height: 300px;
  width: 100%;
  margin: 0;
  border: none;
  border-radius: 0;
  border-left: 3px solid rgba(74, 158, 255, 0.45);
  padding: 14px 16px 16px 18px;
  background: rgba(8, 10, 14, 0.92);
  font-size: 13px;
  line-height: 1.6;
  resize: vertical;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}
.forum-post-editor__field textarea.input--forum-editor:focus {
  outline: none;
  border-left-color: rgba(74, 158, 255, 0.85);
  box-shadow: inset 0 0 0 1px rgba(74, 158, 255, 0.15);
}
.forum-post-editor--inline .forum-post-editor__field textarea.input--forum-editor {
  min-height: 360px;
}
.forum-post-editor__bottom {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px 14px;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.15);
}
.forum-post-editor__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.btn-forum-post {
  padding: 10px 18px;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-display);
}
.forum-post-editor-outer {
  margin-top: 24px;
}
.forum-post-editor-layout {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 16px 16px 18px;
  background: rgba(0, 0, 0, 0.12);
  border-top: 1px solid var(--border);
}
.forum-post-editor-aside {
  padding-top: 42px;
  display: flex;
  justify-content: center;
}
.forum-post-editor-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  font-size: 22px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border: 2px solid var(--border2);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
  overflow: hidden;
}
.forum-post-editor-avatar.avatar-photo {
  display: block;
  object-fit: cover;
  padding: 0;
  border-radius: 50%;
}
.forum-post-editor--inline {
  min-width: 0;
}
.forum-post-editor--inline .forum-post-editor__bottom {
  flex-direction: column;
}
.forum-post-editor--inline .forum-post-editor__actions {
  width: 100%;
}
@media (max-width: 640px) {
  .forum-post-editor-layout {
    grid-template-columns: 1fr;
    padding: 12px;
  }
  .forum-post-editor-aside {
    padding-top: 0;
    justify-content: flex-start;
  }
}
.composer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
  color: var(--text-dim);
}
.composer-count { font-weight: 600; color: var(--text-bright); }
.composer-hint { opacity: 0.85; }
.thread-access-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(180px, 0.7fr);
  gap: 12px;
}
.thread-access-hint {
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.45;
}

.thread-access-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  vertical-align: middle;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.thread-access-badge--credits {
  background: rgba(234, 179, 8, 0.14);
  color: #facc15;
  border-color: rgba(234, 179, 8, 0.35);
}
.thread-access-badge--reaction {
  background: rgba(74, 158, 255, 0.12);
  color: #9dccff;
  border-color: rgba(74, 158, 255, 0.35);
}
.thread-access-badge--reply {
  background: rgba(167, 139, 250, 0.14);
  color: #d8b4fe;
  border-color: rgba(167, 139, 250, 0.4);
}

.thread-unlock-panel {
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(74, 158, 255, 0.25);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(45, 90, 140, 0.18), rgba(10, 14, 20, 0.65));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.thread-unlock-panel-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.thread-unlock-note {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.45;
}
.thread-unlock-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.thread-quick-reply {
  margin-top: 24px;
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-panel), 0 0 0 1px rgba(255, 255, 255, 0.03);
  overflow: hidden;
}
.thread-quick-reply-head {
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 800;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
  background: linear-gradient(180deg, #3d6a9a, #284a72);
  border-bottom: 1px solid var(--border);
}
.thread-quick-reply-body { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.thread-quick-reply-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.post-edited {
  font-size: 10px;
  color: var(--text-dim);
  font-style: italic;
  margin-left: 6px;
}
.post-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.btn-post-edit {
  font-size: 10px;
  padding: 4px 8px;
}
.thread-title-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  vertical-align: middle;
}
.thread-title-actions .btn { font-size: 10px; padding: 4px 8px; }
.modal::backdrop {
  background: rgba(4, 6, 10, 0.72);
  backdrop-filter: blur(6px);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: linear-gradient(180deg, #356598, #284a72);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.02em;
}
.modal-close {
  background: rgba(0, 0, 0, 0.2);
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  padding: 2px 8px;
  line-height: 1;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease;
}
.modal-close:hover { background: rgba(0, 0, 0, 0.35); }
.modal-body { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.turnstile-mount { min-height: 0; }
.turnstile-mount:not(.hidden) { margin-top: 4px; }
.modal-footer {
  padding: 12px 18px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.15);
}
.modal-footer--forum {
  padding: 14px 18px 16px;
  justify-content: space-between;
  flex-wrap: wrap;
}
.modal-footer--forum .btn-forum-post {
  margin-left: auto;
}

/* =============== PROFILE (BF-style) =============== */
.profile-page {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 2px 24px;
}
.profile-hero {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-panel);
}
.profile-hero--minimal {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border2);
  box-shadow: var(--shadow-panel), 0 0 0 1px rgba(255, 255, 255, 0.03);
  background: linear-gradient(165deg, rgba(22, 27, 36, 0.98), rgba(12, 15, 20, 0.99));
}
.profile-hero-minimal-inner {
  padding: 22px 22px 18px;
  border-top: 3px solid rgba(74, 158, 255, 0.55);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.profile-hero-minimal-main {
  min-width: 0;
}
.profile-hero--minimal .profile-hero-badges {
  margin-top: 10px;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.profile-hero--minimal .profile-rank-note {
  max-width: 100%;
  margin-top: 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  font-size: 11px;
}
.profile-hero--minimal .profile-hero-actions {
  margin-top: 14px;
}
.profile-hero--minimal .profile-achievement-strip {
  margin-top: 12px;
}
.profile-hero--minimal .profile-hero-mini {
  margin-top: 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.profile-editor-box--text-only .profile-editor-lead {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.45;
}
.profile-editor-box--text-only h5 {
  margin-bottom: 6px;
}
.profile-hero-bg {
  position: relative;
  height: 132px;
  background: linear-gradient(135deg, var(--cover1, #202633), #151922);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.profile-banner-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}
.profile-hero-inner {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 16px 18px 18px;
  margin-top: 0;
  position: relative;
  z-index: 2;
  background: var(--surface);
}
.profile-hero-avatar {
  width: 88px;
  height: 88px;
  border-radius: 8px;
  font-size: 34px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  color: rgba(255,255,255,.92);
  border: 3px solid var(--surface);
  box-shadow: 0 4px 14px rgba(0,0,0,.35);
  flex-shrink: 0;
}
.profile-hero-avatar-img {
  display: block;
  object-fit: cover;
  padding: 0;
  background: var(--surface3);
}
.profile-hero-text {
  padding-bottom: 2px;
  min-width: 0;
  flex: 1;
}
.profile-hero-name {
  margin: 0;
  font-size: 29px;
  font-weight: 800;
  color: var(--text-bright);
  letter-spacing: -0.015em;
  line-height: 1.05;
}
.profile-hero-name.role-admin,
.profile-hero-name.role-moderator,
.profile-hero-name.role-god,
.profile-hero-name.role-mvp,
.profile-hero-name.role-vip {
  letter-spacing: 0.01em;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.35);
}
.profile-hero-badges {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}
.profile-hero-badges .user-title {
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.profile-hero-actions {
  margin-top: 11px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
}
.profile-hero-actions .btn {
  font-size: 11px;
  padding: 6px 10px;
}
.profile-rank-note {
  font-size: 11px;
  color: color-mix(in srgb, var(--text) 78%, var(--text-dim) 22%);
  max-width: min(760px, 100%);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

/* Profile achievement badges */
.profile-achievement-strip {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.profile-badge-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px 3px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-bright);
  cursor: default;
  max-width: 100%;
}
.profile-badge-chip i {
  font-size: 11px;
  opacity: 0.95;
}
.profile-badge-chip--staff {
  border-color: rgba(239, 68, 68, 0.45);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(0, 0, 0, 0.2));
  color: #fecaca;
}
.profile-badge-chip--premium {
  border-color: rgba(234, 179, 8, 0.5);
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.18), rgba(99, 102, 241, 0.12));
  color: #fde68a;
}
.profile-badge-chip--reputation {
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(56, 189, 248, 0.12);
  color: #bae6fd;
}
.profile-badge-chip--activity {
  border-color: rgba(167, 139, 250, 0.45);
  background: rgba(167, 139, 250, 0.12);
  color: #ddd6fe;
}
.profile-badge-chip--economy {
  border-color: rgba(52, 211, 153, 0.45);
  background: rgba(52, 211, 153, 0.12);
  color: #a7f3d0;
}
.profile-badge-chip--supporter {
  border-color: rgba(244, 114, 182, 0.45);
  background: rgba(244, 114, 182, 0.12);
  color: #fbcfe8;
}
.profile-badge-chip--tenure {
  border-color: rgba(148, 163, 184, 0.4);
  background: rgba(148, 163, 184, 0.1);
  color: #e2e8f0;
}

.profile-achievements-body { padding-top: 10px; }
.profile-badge-stats-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 0 0 12px;
  font-size: 11px;
  color: var(--text-dim);
}
.profile-badge-stats-line span {
  white-space: nowrap;
}
.profile-badge-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.profile-badge-tile {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}
.profile-badge-tile-icon {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 16px;
}
.profile-badge-tile-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.4;
}
.profile-badge-tile-body strong {
  color: var(--text-bright);
  font-size: 13px;
}
.profile-badge-tile--staff .profile-badge-tile-icon {
  background: rgba(239, 68, 68, 0.2);
  color: #fecaca;
}
.profile-badge-tile--premium .profile-badge-tile-icon {
  background: rgba(234, 179, 8, 0.2);
  color: #fde68a;
}
.profile-badge-tile--reputation .profile-badge-tile-icon {
  background: rgba(56, 189, 248, 0.18);
  color: #7dd3fc;
}
.profile-badge-tile--activity .profile-badge-tile-icon {
  background: rgba(167, 139, 250, 0.18);
  color: #c4b5fd;
}
.profile-badge-tile--economy .profile-badge-tile-icon {
  background: rgba(52, 211, 153, 0.18);
  color: #6ee7b7;
}
.profile-badge-tile--supporter .profile-badge-tile-icon {
  background: rgba(244, 114, 182, 0.18);
  color: #f9a8d4;
}
.profile-badge-tile--tenure .profile-badge-tile-icon {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
}
.profile-badge-hint {
  margin: 0;
  line-height: 1.45;
}
.profile-badge-footnote {
  margin: 12px 0 0;
  font-size: 10px;
  color: var(--text-dim);
  line-height: 1.35;
  opacity: 0.85;
}

.profile-hero-mini {
  margin-top: 11px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
  color: var(--text-dim);
}
.profile-hero-mini span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--border) 82%, #a6bce0 18%);
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.01));
  white-space: nowrap;
}
.profile-hero-mini i { margin-right: 0; opacity: .75; font-size: 10px; }

.profile-layout {
  display: grid;
  grid-template-columns: minmax(200px, 252px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.profile-sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 12px;
}
.profile-main-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
/* Avoid double vertical rhythm: flex gap + global .category-section sibling margin */
.profile-main-col > .category-section + .category-section {
  margin-top: 0;
}
.profile-section-card {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-panel), 0 0 0 1px rgba(255, 255, 255, 0.03);
}
.profile-page .category-header {
  padding: 12px 16px;
  font-size: 12px;
  letter-spacing: 0.03em;
}

.profile-stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-panel);
}
.profile-stat-tile {
  padding: 12px 8px;
  text-align: center;
  border-right: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.04), transparent);
}
.profile-stat-tile:last-child { border-right: 0; }
.profile-stat-val {
  display: block;
  font-size: 16px;
  font-weight: 800;
  color: var(--text-bright);
  line-height: 1.1;
}
.profile-stat-lbl {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-dim);
  margin-top: 4px;
  display: block;
}

.profile-side-card {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.profile-side-card .category-header { cursor: default; }
.profile-side-body {
  padding: 14px 14px 16px;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
  background: rgba(0, 0, 0, 0.1);
}
.profile-bio-text { margin: 0; }
.profile-bio-text em { color: var(--text-dim); font-style: italic; }

.profile-main-col .category-section { margin: 0; }
.profile-panel-body {
  padding: 14px 16px 16px;
  font-size: 12px;
  background: rgba(0, 0, 0, 0.08);
}
.profile-panel-body--overview {
  padding-top: 0;
  padding-left: 0;
  padding-right: 0;
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.profile-overview-fields--stacked {
  min-width: 0;
}
.profile-overview-fields--stacked .profile-field-row {
  display: grid;
  grid-template-columns: minmax(108px, 132px) minmax(0, 1fr);
  align-items: start;
  gap: 10px 16px;
  margin: 0;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
}
.profile-overview-fields--stacked .profile-field-row:last-child {
  border-bottom: 0;
}
.profile-field-v {
  color: var(--text-bright);
  font-weight: 500;
  line-height: 1.4;
  word-break: break-word;
}
.profile-signature-block--standalone {
  margin: 0;
  padding: 14px 16px 16px;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.06);
}
.profile-signature-block--standalone .profile-field-k {
  display: block;
  margin-bottom: 8px;
}
.profile-field-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.profile-field-row:last-of-type { border-bottom: 0; }
.profile-field-k {
  flex: 0 0 120px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}
.profile-overview-fields--stacked .profile-field-k {
  flex: unset;
  padding-top: 2px;
}
.profile-field-meta {
  display: block;
  width: 100%;
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 2px;
}
.profile-signature-block {
  padding-top: 10px;
  margin-top: 4px;
  border-top: 1px dashed var(--border2);
}
.profile-signature-block .profile-field-k { display: block; margin-bottom: 6px; }
.profile-signature {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.45;
  padding: 8px 10px;
  background: rgba(0,0,0,.2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.profile-empty-inline { color: var(--text-dim); font-style: italic; }
.profile-empty { padding: 8px 0; color: var(--text-dim); font-size: 12px; font-style: italic; }
.profile-purchases .profile-field-row { flex-direction: column; align-items: flex-start; }
.profile-activity-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.profile-activity-row:last-child { border-bottom: 0; }
.profile-activity-row a { font-weight: 600; color: var(--accent2); text-decoration: none; flex: 1; min-width: 0; }
.profile-activity-row .profile-field-meta {
  flex-shrink: 0;
  margin-top: 0;
  width: auto;
}
.profile-activity-row a:hover { text-decoration: underline; }

.profile-editor-card .profile-editor {
  padding: 0;
  background: transparent;
  border: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.profile-editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.profile-editor-box {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.profile-editor-box h5 {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--text-bright);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.profile-editor-box--full {
  grid-column: 1 / -1;
}
.profile-editor .admin-form-grid { grid-template-columns: 1fr 1fr; }
.profile-upload-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
}
.profile-upload-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.profile-file-label {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.profile-upload-hint {
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 8px;
}
.profile-editor-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 2px;
}

/* Rank shop */
.shop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(45, 90, 140, 0.25), rgba(26, 32, 44, 0.95));
  box-shadow: var(--shadow-panel);
}
.shop-header h2 {
  margin: 0;
  color: var(--text-bright);
  font-size: 1.35rem;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.shop-subtitle {
  margin-top: 3px;
  color: var(--text-dim);
  font-size: 11px;
}
.shop-balance {
  color: var(--yellow);
  font-weight: 700;
  font-size: 13px;
}
.rank-shop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.rank-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), rgba(22, 27, 36, 0.9));
  box-shadow: var(--shadow-panel);
  padding: 18px;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.rank-card:hover {
  border-color: rgba(74, 158, 255, 0.25);
  box-shadow: var(--shadow-panel), 0 0 0 1px rgba(74, 158, 255, 0.08);
  transform: translateY(-2px);
}
.rank-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-top: 6px;
}
.rank-card-title strong {
  display: block;
  color: var(--text-bright);
  font-size: 15px;
  margin-top: 8px;
}
.rank-card-price {
  color: var(--yellow);
  font-weight: 700;
  font-size: 12px;
  white-space: nowrap;
}
.rank-card-desc {
  margin: 10px 0;
  color: var(--text-dim);
  font-size: 11px;
  line-height: 1.5;
}
.rank-card-perks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.rank-card-perks span {
  padding: 4px 8px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  font-size: 10px;
  color: var(--text);
}
.rank-daily-credits {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: var(--yellow);
  background: rgba(201,162,39,.1);
  border: 1px solid rgba(201,162,39,.25);
  border-radius: 2px;
  padding: 3px 8px;
  margin: 6px 0 8px;
}
.rank-daily-credits i { font-size: 9px; }
.rank-extra-perms {
  margin: 0 0 10px;
  font-size: 10px;
  color: var(--text-dim);
  line-height: 1.6;
  border-left: 2px solid var(--border2);
  padding-left: 8px;
}
.rank-purchase-btn[disabled] {
  opacity: .7;
  cursor: not-allowed;
}
.rank-buy-btn,
.rank-payment-link,
.rank-action-static {
  width: 100%;
  justify-content: center;
  margin-top: 4px;
}

/* Reputation colors */
.rep-positive { color: var(--green-bright); }
.rep-negative { color: var(--red-bright); }
.rep-neutral { color: var(--text-dim); }

/* =============== ADMIN PANEL =============== */
.btn-profile {
  background: linear-gradient(180deg, #4a7eb8, #2d5a8c);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-inset), 0 4px 12px rgba(45, 90, 140, 0.35);
}
.btn-profile:hover { filter: brightness(1.08); }
.btn-profile.active {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.2), 0 0 0 2px rgba(74, 158, 255, 0.35);
}

.btn-admin {
  background: linear-gradient(180deg, #d6453a, #a82e25);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 14px rgba(168, 46, 37, 0.4);
}
.btn-admin:hover { filter: brightness(1.08); }
.btn-admin.active {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.2), 0 0 0 2px rgba(255, 120, 100, 0.45);
}

.btn-mod {
  background: linear-gradient(180deg, #2d8a5e, #1a5c3d);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 14px rgba(26, 92, 61, 0.45);
}
.btn-mod:hover { filter: brightness(1.08); }
.btn-mod.active {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.2), 0 0 0 2px rgba(80, 200, 140, 0.45);
}

.admin-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-panel);
}
.admin-header {
  padding: 16px 20px;
  background: linear-gradient(90deg, #8b2920, #c0392b);
  color: #fff;
}
.admin-header h2 { margin: 0; font-size: 16px; font-weight: 800; font-family: var(--font-display); }
.admin-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}
.admin-tab {
  padding: 9px 18px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  text-decoration: none;
  border-right: 1px solid var(--border);
  transition: all .1s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.admin-tab:hover { color: var(--text-bright); background: var(--surface3); text-decoration: none; }
.admin-tab.active { color: #fff; background: var(--accent-dim); }
.admin-content { padding: 16px; }

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.admin-stat-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
}
.admin-stat-card i {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
  color: var(--border2);
}
.admin-stat-num { font-size: 22px; font-weight: 700; color: var(--text-bright); }
.admin-stat-label { font-size: 10px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .04em; margin-top: 2px; }

.admin-section {
  margin-top: 16px;
}
.admin-section h4 {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--text-bright);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}
.admin-hint {
  margin: -2px 0 10px;
  color: var(--text-dim);
  font-size: 11px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.admin-table th {
  padding: 6px 10px;
  background: var(--surface3);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-dim);
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.admin-table td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.admin-table tr:hover td { background: rgba(58,123,213,.04); }

.admin-pagination {
  display: flex;
  gap: 4px;
  padding: 10px 0 0;
}

/* ---------- Moderation panel (distinct from admin red header) ---------- */
.mod-panel .mod-panel-header {
  background: linear-gradient(110deg, #1a4d6d 0%, #2d6a4f 48%, #1b4332 100%);
}
.mod-panel .mod-panel-header h2 {
  margin: 0 0 4px;
}
.mod-panel-tagline {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  opacity: 0.88;
  line-height: 1.35;
  max-width: 42rem;
}
.mod-tabs .mod-tab.active {
  background: linear-gradient(180deg, rgba(45, 106, 79, 0.95), rgba(27, 67, 50, 0.92));
  color: #fff;
}
.mod-panel-body {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), transparent 120px);
}
.mod-section {
  margin-top: 0;
  margin-bottom: 20px;
}
.mod-section-hint {
  margin: -4px 0 12px;
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.4;
}
.mod-section-hint--danger {
  color: #e07a5f;
}
.mod-table-wrap {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.15);
}
.mod-table-wrap--wide .mod-table-users {
  min-width: 920px;
}
.mod-table {
  margin: 0;
}
.mod-table th,
.mod-table td {
  vertical-align: top;
}
.mod-cell-muted {
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
}
.mod-cell-actions {
  white-space: nowrap;
}
.mod-user-actions-cell {
  min-width: 280px;
}
.mod-user-inputs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}
.mod-user-inputs .mod-reason {
  width: 100%;
  max-width: 420px;
  font-size: 12px;
  padding: 6px 10px;
}
.mod-duration-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}
.mod-mini-label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.mod-mini-label .input {
  width: 100px;
  font-size: 12px;
  padding: 5px 8px;
}
.mod-action-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.mod-stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.mod-stat-card {
  border-color: rgba(45, 106, 79, 0.35);
  background: linear-gradient(145deg, rgba(45, 106, 79, 0.08), var(--surface2));
}
.mod-content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
@media (min-width: 1100px) {
  .mod-content-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
  }
}
.mod-thread-link {
  font-weight: 600;
  color: var(--accent2, #5da9e9);
  text-decoration: none;
}
.mod-thread-link:hover {
  text-decoration: underline;
}
.mod-notify-toolbar {
  margin-bottom: 12px;
}
.mod-notify-row--unread td {
  background: rgba(58, 123, 213, 0.06);
}
.mod-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.mod-pill--muted {
  background: var(--surface3);
  color: var(--text-dim);
}
.mod-pill--accent {
  background: rgba(45, 106, 79, 0.35);
  color: #b7e4c7;
}
.mod-code {
  font-size: 11px;
  background: var(--surface3);
  padding: 2px 6px;
  border-radius: 4px;
}
.mod-pagination {
  flex-wrap: wrap;
}
.mod-panel-error {
  padding: 24px;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: rgba(224, 122, 95, 0.06);
}
.mod-panel-error-title {
  margin: 0 0 8px;
  font-weight: 700;
  color: var(--text-bright);
}
.mod-panel-error-detail {
  margin: 0 0 16px;
  font-size: 12px;
  color: var(--text-dim);
  word-break: break-word;
}
.breadcrumb-staff {
  color: var(--text-dim);
  font-weight: 600;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.admin-form-grid-board {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.admin-full-row {
  grid-column: 1 / -1;
}

.admin-forums-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-forum-card,
.admin-board-card {
  border: 1px solid var(--border);
  background: rgba(255,255,255,.02);
  border-radius: 6px;
  padding: 12px;
}
.admin-board-card--draggable {
  cursor: grab;
}
.admin-board-card--draggable.dragging {
  opacity: 0.45;
  border-color: var(--accent2);
}
.admin-board-drag-handle {
  cursor: grab;
}

.admin-board-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.admin-forum-card-head,
.admin-board-card-head,
.admin-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.admin-forum-card-head,
.admin-board-card-head {
  margin-bottom: 10px;
}

.admin-forum-card-head strong,
.admin-board-card-head span {
  color: var(--text-bright);
  font-size: 13px;
  font-weight: 700;
}
.admin-card-subtitle {
  margin-top: 3px;
  font-size: 10px;
  color: var(--text-dim);
}
.admin-quick-board-row {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1.2fr 1.6fr auto;
  gap: 8px;
}

/* =============== MISC =============== */
.empty {
  padding: 28px 20px;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
  font-style: italic;
  background: rgba(0, 0, 0, 0.12);
  border-radius: var(--radius-sm);
}
.hidden { display: none !important; }

/* =============== RESPONSIVE =============== */
@media (max-width: 1280px) {
  .topnav-inner {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: auto;
    row-gap: 8px;
    padding-top: 8px;
    padding-bottom: 8px;
  }
  .topnav-left {
    width: 100%;
    overflow-x: auto;
  }
  #topnav-right {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
  }
  #welcomeArea {
    order: -1;
    margin-right: auto;
  }
}

@media (max-width: 980px) {
  #wrapper { grid-template-columns: 1fr; }
  #sidebar { order: -1; }
  body.index-view #sidebar { order: 1; }
  .forum-row { grid-template-columns: 32px 1fr 52px 52px; }
  .forum-lastpost { display: none; }
  .footer-inner { grid-template-columns: 1fr; }
  .profile-layout { grid-template-columns: 1fr; }
  .profile-sidebar { position: static; }
  .profile-stat-strip { grid-template-columns: repeat(3, 1fr); }
  .profile-editor-grid { grid-template-columns: 1fr; }
  .thread-access-grid { grid-template-columns: 1fr; }
  .admin-stats-grid { grid-template-columns: 1fr 1fr; }
  .admin-form-grid,
  .admin-form-grid-board { grid-template-columns: 1fr 1fr; }
  .admin-quick-board-row { grid-template-columns: 1fr 1fr; }
  .rank-shop-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .profile-overview-fields--stacked .profile-field-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .profile-overview-fields--stacked .profile-field-k {
    padding-top: 0;
  }
}

@media (max-width: 640px) {
  .topnav-inner { flex-wrap: wrap; min-height: auto; padding: 10px 12px; }
  .topnav-left { width: 100%; }
  #navLinks { flex-wrap: wrap; }
  #navLinks li a { padding: 5px 10px; font-size: 11px; }
  #topnav-right { width: 100%; justify-content: flex-end; }
  #welcomeArea { order: -1; flex-shrink: 1; white-space: normal; flex-wrap: wrap; }
  #welcomeText .welcome-credits { display: none; }
  .hero-user-pill { padding: 4px 10px 4px 4px; }
  .hero-user-name { font-size: 12px; }
  #hero-band { min-height: 72px; }
  .hero-inner { padding: 12px; }
  .hero-mark { width: 38px; height: 38px; font-size: 15px; }
  .hero-title { font-size: 1.1rem; }
  .hero-tagline { font-size: 11px; }
  .forum-row { grid-template-columns: 28px 1fr; }
  .forum-stat, .forum-lastpost { display: none; }
  .post-inner { grid-template-columns: 1fr; }
  .post-author { border-right: 0; border-bottom: 1px solid var(--border); padding: 8px; display: flex; align-items: center; gap: 8px; text-align: left; }
  .post-author .avatar { width: 40px; height: 40px; font-size: 16px; margin: 0; }
  .admin-stats-grid,
  .admin-form-grid,
  .admin-form-grid-board { grid-template-columns: 1fr; }
  .admin-quick-board-row { grid-template-columns: 1fr; }
  .admin-forum-card-head,
  .admin-board-card-head,
  .admin-actions-row { align-items: flex-start; flex-direction: column; }
}

.guest-banner,
.pending-banner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 10px 16px;
  font-size: 12px;
  line-height: 1.45;
  border-bottom: 1px solid var(--border);
}
.guest-banner {
  background: rgba(45, 90, 140, 0.2);
  color: var(--text-bright);
}
.pending-banner {
  background: rgba(230, 126, 34, 0.18);
  color: var(--yellow);
}
.guest-banner.hidden,
.pending-banner.hidden { display: none; }

.guest-restricted-note {
  margin: 12px 0;
  padding: 14px 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-dim);
  font-size: 12px;
}
.guest-restricted-note strong { color: var(--text-bright); }

/* Private messages */
.pm-page { margin-bottom: 24px; }
.pm-page--split { max-width: 1200px; margin-left: auto; margin-right: auto; }

.pm-shell {
  display: grid;
  grid-template-columns: 1fr;
  min-height: min(44vh, 380px);
  max-height: calc(100vh - 210px);
  max-height: calc(100dvh - 210px);
  max-height: calc(100svh - 210px);
  border: 1px solid rgba(74, 158, 255, 0.18);
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(165deg, rgba(22, 28, 38, 0.98) 0%, rgba(14, 18, 26, 0.99) 100%);
  box-shadow:
    var(--shadow-panel),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 24px 48px rgba(0, 0, 0, 0.35);
}
body.route-messages .pm-shell {
  flex: 1 1 auto;
  min-height: min(48vh, 400px);
  max-height: none;
  /* Stay in viewport; clamp keeps composer on screen on short laptops */
  height: clamp(420px, calc(100svh - 248px), 1400px);
  height: clamp(420px, calc(100dvh - 248px), 1400px);
  height: clamp(420px, calc(100vh - 248px), 1400px);
}
.pm-shell > .pm-sidebar,
.pm-shell > .pm-main {
  min-height: 0;
}
@media (min-width: 960px) {
  .pm-shell {
    grid-template-columns: minmax(300px, min(30vw, 420px)) minmax(0, 1fr);
    min-height: min(48vh, 420px);
    max-height: calc(100vh - 200px);
    max-height: calc(100dvh - 200px);
    max-height: calc(100svh - 200px);
  }
  body.route-messages .pm-shell {
    height: clamp(440px, calc(100svh - 236px), 1400px);
    height: clamp(440px, calc(100dvh - 236px), 1400px);
    height: clamp(440px, calc(100vh - 236px), 1400px);
  }
  .pm-shell .pm-sidebar {
    border-right: 1px solid rgba(255, 255, 255, 0.08);
  }
}
.pm-shell--has-thread .pm-sidebar-hint {
  display: none;
}

.pm-sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: linear-gradient(195deg, rgba(10, 12, 18, 0.98) 0%, rgba(4, 6, 10, 0.98) 100%);
  border-right: 1px solid rgba(0, 0, 0, 0.5);
  box-shadow: inset -1px 0 0 rgba(74, 158, 255, 0.06);
}
.pm-sidebar-head {
  padding: 12px 14px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}
.pm-sidebar-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
}
.pm-sidebar-title h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pm-sidebar-title h3 i { color: var(--accent); opacity: 0.95; }
.pm-sidebar-unread-chip {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(74, 158, 255, 0.2);
  color: var(--accent);
  border: 1px solid rgba(74, 158, 255, 0.35);
}
.pm-sidebar-hint {
  margin: 8px 0 0;
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.4;
}
.pm-sidebar-tools {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  align-items: stretch;
}
.pm-search {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  padding: 8px 10px;
}
.pm-sidebar-tools .btn { flex-shrink: 0; }

.pm-inbox-list--scroll {
  flex: 1;
  min-height: 180px;
  max-height: 42vh;
  overflow-y: auto;
  scrollbar-width: thin;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
@media (min-width: 960px) {
  .pm-inbox-list--scroll {
    max-height: none;
  }
}
@media (max-width: 959px) {
  .pm-shell--inbox-only .pm-inbox-list--scroll {
    max-height: none;
    flex: 1;
  }
}

.pm-sidebar-foot {
  padding: 10px 14px 14px;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}
.pm-start-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.pm-start-chat {
  display: flex;
  gap: 8px;
  align-items: center;
}
.pm-start-chat .input {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  padding: 8px 10px;
}
.pm-start-chat--wide {
  flex-direction: column;
  align-items: stretch;
  margin-top: 8px;
}
.pm-start-chat--wide .btn { width: 100%; }

.pm-inbox-list {
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-panel);
}
.pm-inbox-empty {
  padding: 20px 16px;
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  border: 0;
  background: transparent;
}
.pm-inbox-row {
  display: flex;
  width: 100%;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 14px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.18s ease, box-shadow 0.18s ease;
}
.pm-inbox-row:last-child { border-bottom: 0; }
.pm-inbox-row:hover { background: rgba(74, 158, 255, 0.08); }
.pm-inbox-row--active {
  background: linear-gradient(90deg, rgba(74, 158, 255, 0.14) 0%, rgba(74, 158, 255, 0.04) 100%);
  box-shadow: inset 4px 0 0 var(--accent);
}
.pm-inbox-avatar { margin-top: 2px; flex-shrink: 0; }
.pm-inbox-main { min-width: 0; flex: 1; }
.pm-inbox-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px 12px;
  font-size: 12px;
}
.pm-inbox-who {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.pm-inbox-who .user-title {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pm-inbox-meta-end {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  text-align: right;
}
.pm-inbox-name { font-weight: 700; }
.pm-inbox-time {
  font-size: 10px;
  color: var(--text-dim);
  white-space: nowrap;
}
.pm-inbox-preview {
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.4;
}
.pm-inbox-preview-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.pm-prefix { color: var(--text-dim); font-weight: 600; }
.pm-inbox-unread {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  background: linear-gradient(180deg, #5cb0ff, var(--accent2));
  color: #0a0e14;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.pm-main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: linear-gradient(180deg, rgba(18, 22, 30, 0.6) 0%, rgba(10, 12, 18, 0.85) 100%);
}
@media (max-width: 959px) {
  .pm-shell--has-thread .pm-sidebar {
    display: none;
  }
  .pm-shell--inbox-only .pm-main {
    display: none;
  }
}
.pm-main-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(74, 158, 255, 0.08), transparent 55%),
    var(--surface);
}
.pm-main-empty-inner {
  text-align: center;
  max-width: 320px;
}
.pm-main-empty-icon {
  font-size: 40px;
  color: var(--accent);
  opacity: 0.5;
  margin-bottom: 12px;
}
.pm-main-empty-inner h4 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.pm-main-empty-inner p {
  margin: 0;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
}

.pm-crumb-user { color: var(--text-bright); font-weight: 600; }

.pm-conv-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: linear-gradient(180deg, rgba(32, 42, 58, 0.55) 0%, rgba(14, 18, 26, 0.9) 100%);
  border-bottom: 1px solid rgba(74, 158, 255, 0.12);
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.pm-back-mobile { flex-shrink: 0; }
@media (min-width: 960px) {
  .pm-back-mobile { display: none; }
}
.pm-conv-user {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.pm-conv-user-text { min-width: 0; }
.pm-conv-title { font-size: 10px; margin-top: 2px; }
.pm-conv-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.pm-thread-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: var(--surface);
  overflow: hidden;
  box-shadow: none;
}
.pm-messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 18px 16px 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
  font-family: var(--font-messaging);
  scrollbar-width: thin;
  scrollbar-color: rgba(74, 158, 255, 0.35) transparent;
  position: relative;
  background:
    radial-gradient(ellipse 90% 70% at 50% 0%, rgba(74, 158, 255, 0.07), transparent 55%),
    radial-gradient(ellipse 80% 50% at 50% 100%, rgba(74, 158, 255, 0.05), transparent 50%),
    linear-gradient(180deg, #0c1018 0%, #0a0d12 100%);
}
.pm-messages::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  bottom: 0;
  width: min(720px, calc(100% - 8px));
  max-width: 100%;
  background: rgba(0, 0, 0, 0.18);
  border-left: 1px solid rgba(255, 255, 255, 0.05);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  pointer-events: none;
  z-index: 0;
}
.pm-messages > * {
  position: relative;
  z-index: 1;
}
/* Readable column: conversation stays centered on ultrawide */
.pm-messages > .pm-day-divider,
.pm-messages > .pm-bubble-row,
.pm-messages > .empty {
  max-width: min(720px, 96%);
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}
.pm-messages > .pm-bubble-row.pm-bubble-row--me {
  justify-content: flex-end;
}
.pm-day-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 12px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}
.pm-day-divider:first-child { margin-top: 4px; }
.pm-day-divider::before,
.pm-day-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}
.pm-day-divider span {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
}

.pm-bubble-row {
  display: flex;
  justify-content: flex-start;
  align-items: flex-end;
  gap: 8px;
}
.pm-bubble-row--me {
  justify-content: flex-end;
}
.pm-bubble-avatar-wrap {
  flex-shrink: 0;
  margin-bottom: 2px;
}
.pm-bubble-avatar.avatar {
  width: 28px;
  height: 28px;
  font-size: 11px;
}
.pm-bubble-avatar.avatar-photo {
  width: 28px;
  height: 28px;
  object-fit: cover;
}
.pm-bubble {
  max-width: min(94%, 520px);
  padding: 12px 16px 11px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.52;
  font-family: var(--font-messaging);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.pm-bubble--them {
  background: linear-gradient(165deg, rgba(38, 48, 64, 0.72) 0%, rgba(22, 28, 40, 0.75) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom-left-radius: 4px;
}
.pm-bubble--me {
  background: linear-gradient(165deg, rgba(50, 110, 180, 0.6) 0%, rgba(36, 78, 130, 0.62) 100%);
  border: 1px solid rgba(120, 190, 255, 0.4);
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 24px rgba(45, 100, 180, 0.25);
}
.pm-bubble-body { white-space: pre-wrap; word-break: break-word; }
.pm-bubble-body .pm-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-all;
}
.pm-bubble .post-reactions.pm-reactions {
  padding: 6px 6px 8px;
  margin: 8px -4px 0;
  border-top: none;
  border-radius: 0 0 10px 10px;
  background: rgba(0, 0, 0, 0.12);
}
.pm-bubble--me .post-reactions.pm-reactions {
  background: rgba(0, 0, 0, 0.1);
}
.pm-bubble .post-reactions--tz {
  background: transparent;
  border-top: none;
  padding: 4px 0 0;
  margin: 0;
}
.pm-bubble-meta {
  margin-top: 6px;
  font-size: 10px;
  color: var(--text-dim);
  opacity: 0.95;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.pm-bubble-row--me .pm-bubble-meta {
  justify-content: flex-end;
}
.pm-bubble-time { opacity: 0.85; }
.pm-dlv-status {
  opacity: 0.55;
  font-size: 9px;
}
.pm-dlv-status--read {
  color: var(--accent);
  opacity: 0.9;
}

.pm-thread-empty { margin: 0; border: 0; background: transparent; }
.pm-compose {
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(74, 158, 255, 0.15);
  background: rgba(6, 8, 12, 0.75);
  flex-shrink: 0;
}
.pm-compose-card {
  padding: 14px 16px 16px;
  background: linear-gradient(180deg, rgba(20, 26, 36, 0.95) 0%, rgba(10, 12, 18, 0.98) 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 -12px 32px rgba(0, 0, 0, 0.35);
}
.pm-compose-card::before {
  content: "";
  display: block;
  height: 1px;
  margin: -14px -16px 12px;
  background: linear-gradient(90deg, transparent, rgba(74, 158, 255, 0.35), transparent);
}
.pm-compose-input {
  width: 100%;
  min-height: 64px;
  max-height: 200px;
  resize: vertical;
  font-size: 14px;
  line-height: 1.45;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.35);
}
.pm-compose-input:focus {
  border-color: rgba(74, 158, 255, 0.45);
  box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.12);
}
.pm-compose-footer {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.pm-char-count {
  font-size: 11px;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}
.pm-char-count--warn { color: #e8b060; }
.pm-char-count--max { color: #e07070; font-weight: 700; }
.pm-compose-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}

/* Auth: forgot password + email */
.auth-forgot-row {
  margin: 0 0 4px;
  text-align: right;
}
.btn.btn-link {
  background: none;
  border: none;
  color: var(--link);
  padding: 0;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.btn.btn-link:hover {
  color: var(--link-hover);
}
.auth-dialog-hint {
  font-size: 13px;
  color: var(--text-dim);
  margin: 0 0 12px;
  line-height: 1.45;
}
