:root {
  --bg-0: #08070b;
  --bg-1: #0c0a10;
  --bg-2: #131019;
  --bg-3: #1b1723;
  --panel: rgba(19, 16, 25, 0.72);
  --panel-solid: #131019;
  --ink: #f4efe8;
  --ink-soft: #cfc7bd;
  --muted: #928a80;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.045);
  --line-strong: rgba(242, 103, 10, 0.32);
  --accent: #f2670a;
  --accent-hot: #ff2d00;
  --accent-2: #ffbe2e;
  --gold-soft: #ffd882;
  --danger: #ff4152;
  --ok: #37d18d;
  --radius: 9px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --shadow-1: 0 1px 0 rgba(255, 255, 255, 0.03), 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-2: 0 18px 55px rgba(0, 0, 0, 0.5);
  --glow: 0 0 24px rgba(242, 103, 10, 0.28);
  --font-display: "Syne", "Avenir Next", "Segoe UI", sans-serif;
  --font-body: "IBM Plex Sans", "Helvetica Neue", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --topbar-h: 60px;
  --space-box: 1rem;
  --space-stack: 1.15rem;
  --space-col: 1.5rem;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background:
    radial-gradient(1100px 520px at 6% -10%, rgba(242, 103, 10, 0.16), transparent 58%),
    radial-gradient(820px 460px at 102% -4%, rgba(255, 45, 0, 0.09), transparent 55%),
    linear-gradient(180deg, #0a0810 0%, var(--bg-0) 42%, #050507 100%);
  background-attachment: fixed;
}

a { color: var(--accent-2); text-decoration: none; transition: color 0.14s ease; }
a:hover { color: var(--gold-soft); }

::selection { background: rgba(242, 103, 10, 0.35); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.09); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(242, 103, 10, 0.4); background-clip: padding-box; }

.wrap {
  width: min(1480px, calc(100% - 2.5rem));
  margin: 0 auto;
}
.main-wrap { padding: 1.5rem 0 3.5rem; }

/* —— Top bar (XF-like) —— */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--topbar-h);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(12, 10, 16, 0.9), rgba(8, 7, 11, 0.82));
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04), 0 8px 30px rgba(0, 0, 0, 0.3);
}
.topbar::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(242, 103, 10, 0.5), rgba(255, 190, 46, 0.35), transparent);
  opacity: 0.7;
}
.topbar-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
}
.brand-with-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}
.brand-text { color: var(--ink); }
.brand-text > span { color: var(--ink); }
.brand-logo-wrap {
  position: relative;
  display: inline-flex;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  isolation: isolate;
  overflow: visible;
}
/* Soft ember bed under the mark — barely moves */
.brand-logo-wrap::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -6%;
  height: 55%;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(
    ellipse at 50% 70%,
    rgba(255, 170, 40, 0.55) 0%,
    rgba(255, 70, 0, 0.28) 45%,
    transparent 72%
  );
  filter: blur(6px);
  animation: brand-ember-bed 3.2s ease-in-out infinite;
}
/* Rising flame tongue — continuous sway, not blink */
.brand-logo-wrap::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 8%;
  height: 85%;
  z-index: 0;
  pointer-events: none;
  border-radius: 40% 40% 45% 45% / 55% 55% 40% 40%;
  background:
    radial-gradient(ellipse 70% 90% at 50% 100%, rgba(255, 220, 90, 0.7) 0%, transparent 55%),
    radial-gradient(ellipse 90% 100% at 40% 95%, rgba(255, 110, 0, 0.5) 0%, transparent 60%),
    radial-gradient(ellipse 80% 100% at 62% 100%, rgba(255, 40, 0, 0.4) 0%, transparent 58%);
  filter: blur(4px);
  transform-origin: 50% 100%;
  animation: brand-flame-rise 2.4s ease-in-out infinite;
}
.brand-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 8px;
  position: relative;
  z-index: 1;
  /* Steady warm rim light — slow breathe, no flash */
  animation: brand-logo-heat 2.8s ease-in-out infinite;
  filter:
    drop-shadow(0 0 1px rgba(255, 210, 120, 0.75))
    drop-shadow(0 -2px 5px rgba(255, 120, 0, 0.55))
    drop-shadow(0 -5px 11px rgba(255, 45, 0, 0.35));
}
@keyframes brand-ember-bed {
  0%, 100% {
    opacity: 0.75;
    transform: scale(1, 1);
  }
  50% {
    opacity: 0.95;
    transform: scale(1.08, 1.05);
  }
}
@keyframes brand-flame-rise {
  0% {
    opacity: 0.8;
    transform: translateY(0) scaleX(1) scaleY(1) skewX(0deg);
  }
  25% {
    opacity: 0.92;
    transform: translateY(-2px) scaleX(0.92) scaleY(1.12) skewX(3deg);
  }
  50% {
    opacity: 0.85;
    transform: translateY(-4px) scaleX(1.06) scaleY(1.22) skewX(-2deg);
  }
  75% {
    opacity: 0.95;
    transform: translateY(-2px) scaleX(0.96) scaleY(1.14) skewX(2deg);
  }
  100% {
    opacity: 0.8;
    transform: translateY(0) scaleX(1) scaleY(1) skewX(0deg);
  }
}
@keyframes brand-logo-heat {
  0%, 100% {
    filter:
      drop-shadow(0 0 1px rgba(255, 200, 100, 0.65))
      drop-shadow(0 -2px 4px rgba(255, 110, 0, 0.5))
      drop-shadow(0 -4px 10px rgba(255, 40, 0, 0.3));
  }
  50% {
    filter:
      drop-shadow(0 0 1.5px rgba(255, 230, 140, 0.85))
      drop-shadow(0 -3px 6px rgba(255, 140, 20, 0.65))
      drop-shadow(0 -6px 13px rgba(255, 50, 0, 0.4));
  }
}
@media (prefers-reduced-motion: reduce) {
  .brand-logo,
  .brand-logo-wrap::before,
  .brand-logo-wrap::after { animation: none; }
}
.topnav {
  display: flex;
  gap: 0.35rem;
  flex: 1;
}
.topnav a {
  color: var(--muted);
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.92rem;
}
.topnav a:hover,
.topnav a.is-active {
  color: var(--ink);
  background: rgba(232, 93, 4, 0.12);
}
.topuser {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-left: auto;
}
.top-link { color: var(--muted); font-size: 0.88rem; }
.uid-chip {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-2);
  padding: 0.3rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 186, 8, 0.06);
}

/* —— XenForo-ish nodes —— */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent-2); }
.page-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 0.25rem;
  letter-spacing: -0.02em;
}
.board-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.node-block {
  margin: 0 0 var(--space-stack);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--panel);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: var(--shadow-1);
}
.node-cat {
  padding: 0.8rem 1.15rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-soft);
  background: linear-gradient(90deg, rgba(242, 103, 10, 0.28), rgba(255, 45, 0, 0.08) 55%, transparent);
  border-bottom: 1px solid var(--line-strong);
  font-weight: 650;
}
.node-table { display: flex; flex-direction: column; }
.node-head,
.node-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px minmax(160px, 220px);
  gap: 0.75rem;
  align-items: center;
  padding: 0.85rem 1rem;
}
.node-head {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  background: rgba(0,0,0,0.25);
}
.node-row {
  color: inherit;
  border-top: 1px solid rgba(255,255,255,0.04);
  transition: background 0.15s ease;
}
.node-row:hover {
  background: rgba(232, 93, 4, 0.08);
}
.node-main { display: flex; gap: 0.85rem; align-items: flex-start; min-width: 0; }
.node-icon {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  flex-shrink: 0;
  background:
    radial-gradient(circle at 30% 30%, #ffba08, transparent 50%),
    linear-gradient(145deg, #e85d04, #7a1f00);
  box-shadow: 0 0 16px rgba(232, 93, 4, 0.35);
}
.node-title {
  font-family: var(--font-display);
  font-size: 1.02rem;
  color: var(--ink);
}
.node-desc, .last-title {
  color: var(--muted);
  font-size: 0.86rem;
  margin-top: 0.15rem;
}
.col-stats { text-align: center; font-variant-numeric: tabular-nums; }
.col-last { min-width: 0; }
.node-empty { padding: 1.25rem 1rem; }
.meta { color: var(--muted); font-size: 0.82rem; font-family: var(--font-mono); }

/* —— Posts —— */
.post-list { display: flex; flex-direction: column; gap: var(--space-box); margin: var(--space-box) 0; }
.xf-post {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(22, 19, 28, 0.9);
}
.xf-author {
  padding: 1rem;
  background: rgba(0,0,0,0.28);
  border-right: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.xf-body { padding: 1rem 1.1rem; }
.xf-body .body { white-space: pre-wrap; line-height: 1.55; margin-top: 0.45rem; }

/* —— Panels / forms —— */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.35rem;
  margin: var(--space-box) 0;
  box-shadow: var(--shadow-1);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.panel + .panel {
  margin-top: var(--space-stack);
}
.section-label {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 0.75rem;
}
.form-stack { display: grid; gap: 0.85rem; }
.form-stack label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.form-stack input,
.form-stack textarea,
.form-stack select,
.acp-search input,
.inline-assign select {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 0.72rem 0.85rem;
  border-radius: var(--radius-sm);
  font: inherit;
  transition: border-color 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}
.form-stack input::placeholder,
.form-stack textarea::placeholder { color: rgba(146, 138, 128, 0.7); }
.form-stack input:focus,
.form-stack textarea:focus,
.form-stack select:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 0 3px rgba(242, 103, 10, 0.16);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 210, 130, 0.35);
  background: linear-gradient(180deg, #ff8a2a, var(--accent) 60%, #e2560a);
  color: #1a0900;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font-body);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset, 0 6px 18px rgba(242, 103, 10, 0.28);
  transition: transform 0.12s ease, filter 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { filter: brightness(1.07); color: #1a0900; transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset, 0 10px 26px rgba(242, 103, 10, 0.38); }
.btn:active { transform: translateY(0); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--line);
  color: var(--ink);
  box-shadow: none;
}
.btn-ghost:hover { background: rgba(242, 103, 10, 0.1); border-color: var(--line-strong); color: #fff; }
.btn-danger {
  background: linear-gradient(180deg, #ff5a66, var(--danger));
  color: #fff;
}
.btn-tiny { padding: 0.35rem 0.65rem; font-size: 0.78rem; box-shadow: none; }

.messages { list-style: none; padding: 0; margin: 0 0 1rem; }
.messages li {
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  background: var(--bg-2);
  margin-bottom: 0.5rem;
  border-radius: var(--radius);
}
.messages .error { border-color: var(--danger); }
.messages .success { border-color: var(--ok); }

.site-footer {
  margin-top: auto;
  padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
  position: relative;
}
.site-footer::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  top: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(242, 103, 10, 0.45), transparent);
  opacity: 0.55;
  pointer-events: none;
}

/* —— Gate / login —— */
.gate {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1rem;
}
.gate-brand {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 8vw, 4.2rem);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.gate-brand span { color: var(--accent); }
.gate-copy { color: var(--muted); max-width: 26rem; margin: 0 0 1.5rem; }
.gate-card, .auth-card {
  text-align: left;
  width: min(420px, 100%);
  margin: 0;
}
.field-err { color: var(--danger); font-size: 0.8rem; }
.uid-hero {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 0.35rem;
}
.perm-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.perm-chips code, .mono {
  font-family: var(--font-mono);
  font-size: 0.78rem;
}
.perm-chips code {
  padding: 0.25rem 0.45rem;
  background: var(--bg-0);
  border: 1px solid var(--line);
  border-radius: 3px;
}
.invite-list { list-style: none; padding: 0; margin: 0; }
.invite-list li {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  padding: 0.55rem 0;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.invite-list li:first-child { border-top: 0; }
.invite-link { font-family: var(--font-mono); font-size: 0.78rem; word-break: break-all; }

/* —— Staff ACP —— */
.acp-body .main-wrap { padding-top: 1rem; }
.acp {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: var(--space-col);
  align-items: start;
}
.acp-side {
  position: sticky;
  top: calc(var(--topbar-h) + 1rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(14, 12, 18, 0.95);
  padding: 0.85rem 0.65rem 1rem;
}
.acp-side-title {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-2);
  padding: 0.35rem 0.65rem 0.75rem;
}
.acp-nav { display: grid; gap: 0.2rem; }
.acp-nav a {
  color: var(--muted);
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
}
.acp-nav a:hover { color: var(--ink); background: rgba(255,255,255,0.04); }
.acp-nav a.is-active {
  color: var(--ink);
  background: rgba(232, 93, 4, 0.18);
  border: 1px solid var(--line-strong);
}
.acp-back {
  display: block;
  margin-top: 1rem;
  padding: 0.55rem 0.65rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.acp-main { min-width: 0; }
.acp-h1 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  margin: 0 0 1rem;
}
.acp-lead { margin-bottom: 1.25rem; }
.acp-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-box);
  margin-bottom: var(--space-stack);
}
.acp-stat {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem;
  background: rgba(22, 19, 28, 0.9);
}
.acp-stat .n {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--accent-2);
}
.acp-stat .l {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.2rem;
}
.acp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.acp-table th,
.acp-table td {
  text-align: left;
  padding: 0.85rem 0.55rem;
  border-top: 1px solid var(--line);
  vertical-align: middle;
}
.acp-table th {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border-top: 0;
}
.acp-table tr.dim { opacity: 0.45; }
.acp-search {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.acp-search input { flex: 1; }
.acp-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.acp-dl {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 0.45rem 0.75rem;
  margin: 0;
}
.acp-dl dt { color: var(--muted); font-size: 0.82rem; }
.acp-dl dd { margin: 0; }
.acp-actions { margin-top: 1rem; }
.check-row {
  display: flex !important;
  align-items: flex-start;
  gap: 0.55rem;
  grid-template-columns: none !important;
}
.check-row input { width: auto !important; margin-top: 0.2rem; }
.perm-grid {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
  max-height: 280px;
  overflow: auto;
  padding-right: 0.35rem;
}
.role-card { margin-bottom: 1rem; }
.role-head {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  margin-bottom: 0.75rem;
}
.tag {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  border: 1px solid var(--line);
  color: var(--muted);
}
.tag-ok { color: var(--ok); border-color: rgba(62, 207, 142, 0.4); }
.tag-danger { color: var(--danger); border-color: rgba(255, 59, 74, 0.45); }
.tag-status-undetected {
  color: var(--ok);
  border-color: rgba(62, 207, 142, 0.45);
  background: rgba(62, 207, 142, 0.08);
}
.tag-status-updating {
  color: #e6b84d;
  border-color: rgba(230, 184, 77, 0.5);
  background: rgba(230, 184, 77, 0.1);
  animation: status-pulse 1.8s ease-in-out infinite;
}
.tag-status-detected {
  color: var(--danger);
  border-color: rgba(255, 59, 74, 0.5);
  background: rgba(255, 59, 74, 0.1);
}
.tag-status-deactivated {
  color: #4aa3ff;
  border-color: rgba(74, 163, 255, 0.5);
  background: rgba(74, 163, 255, 0.1);
}
@keyframes status-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.62; }
}
.inline-assign {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  margin-top: 0.35rem;
  flex-wrap: wrap;
}
.inline-assign select { width: auto; min-width: 140px; padding: 0.35rem 0.5rem; }
.form-inline-3 {
  grid-template-columns: 100px 1fr 1fr auto;
  align-items: end;
}
.meta-list { color: var(--muted); line-height: 1.7; }

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ========================================================================
   XenForo-style UI — avatars, top bar menus, profile, wall, reactions, editor
   ======================================================================== */

/* —— Avatars —— */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  object-fit: cover;
  vertical-align: middle;
  background: var(--bg-3);
  flex-shrink: 0;
  overflow: hidden;
}
.avatar-initials {
  color: #1a0900;
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* —— Top bar (rebuilt) —— */
.topbar-inner { gap: 1rem; }
.topsearch { flex: 0 1 260px; margin-left: auto; }
.topsearch input {
  width: 100%;
  background: var(--bg-0);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  font: inherit;
  font-size: 0.88rem;
}
.topsearch input:focus { outline: 1px solid var(--accent); border-color: var(--accent); }
.topnav { flex: 0 1 auto; }
.topuser { margin-left: 0; gap: 0.5rem; }

.menu { position: relative; }
.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  cursor: pointer;
}
.icon-btn:hover { background: rgba(232, 93, 4, 0.14); }
.badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent-hot);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(255, 46, 0, 0.6);
}
.avatar-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.55rem 0.25rem 0.3rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  max-width: 100%;
}
.avatar-btn:hover { background: rgba(232, 93, 4, 0.14); }
.avatar-btn .avatar {
  flex: 0 0 auto;
  border-radius: 999px;
  overflow: hidden;
}
.avatar-name { font-size: 0.9rem; max-width: 120px; overflow: visible; text-overflow: ellipsis; white-space: nowrap; }
.caret {
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--muted);
}

/* icon glyphs (pure CSS, no external assets) */
[class^="ic-"], [class*=" ic-"] {
  display: inline-block;
  width: 1.05em;
  height: 1.05em;
  vertical-align: -0.16em;
  background: currentColor;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
  margin-right: 0.55rem;
  opacity: 0.85;
}
.ic-bell { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2a6 6 0 0 0-6 6v3.6L4 15v1h16v-1l-2-3.4V8a6 6 0 0 0-6-6Zm0 20a3 3 0 0 0 3-3H9a3 3 0 0 0 3 3Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2a6 6 0 0 0-6 6v3.6L4 15v1h16v-1l-2-3.4V8a6 6 0 0 0-6-6Zm0 20a3 3 0 0 0 3-3H9a3 3 0 0 0 3 3Z'/%3E%3C/svg%3E"); margin-right: 0; }
.ic-user { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10Zm0 2c-5 0-9 2.5-9 6v2h18v-2c0-3.5-4-6-9-6Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10Zm0 2c-5 0-9 2.5-9 6v2h18v-2c0-3.5-4-6-9-6Z'/%3E%3C/svg%3E"); }
.ic-chat { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 4h16a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H8l-4 4V6a2 2 0 0 1 2-2Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 4h16a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H8l-4 4V6a2 2 0 0 1 2-2Z'/%3E%3C/svg%3E"); }
.ic-gear { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='m19.4 13 1.5-1.2-1.5-2.6-1.9.6a6 6 0 0 0-1.3-.8L15.7 7h-3l-.5 2a6 6 0 0 0-1.3.8L9 9.2 7.5 11.8 9 13a6 6 0 0 0 0 1.5L7.5 15.7 9 18.3l1.9-.6c.4.3.9.6 1.3.8l.5 2h3l.5-2c.5-.2.9-.5 1.3-.8l1.9.6 1.5-2.6L19.4 14a6 6 0 0 0 0-1.5ZM12 15.5a3.5 3.5 0 1 1 0-7 3.5 3.5 0 0 1 0 7Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='m19.4 13 1.5-1.2-1.5-2.6-1.9.6a6 6 0 0 0-1.3-.8L15.7 7h-3l-.5 2a6 6 0 0 0-1.3.8L9 9.2 7.5 11.8 9 13a6 6 0 0 0 0 1.5L7.5 15.7 9 18.3l1.9-.6c.4.3.9.6 1.3.8l.5 2h3l.5-2c.5-.2.9-.5 1.3-.8l1.9.6 1.5-2.6L19.4 14a6 6 0 0 0 0-1.5ZM12 15.5a3.5 3.5 0 1 1 0-7 3.5 3.5 0 0 1 0 7Z'/%3E%3C/svg%3E"); }
.ic-shield { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2 4 5v6c0 5 3.4 9.4 8 11 4.6-1.6 8-6 8-11V5l-8-3Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2 4 5v6c0 5 3.4 9.4 8 11 4.6-1.6 8-6 8-11V5l-8-3Z'/%3E%3C/svg%3E"); }
.ic-exit { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M10 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h5v-2H5V5h5V3Zm7.6 5.2-1.4 1.4L18.2 11H9v2h9.2l-2 2 1.4 1.4L22 12l-4.4-3.8Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M10 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h5v-2H5V5h5V3Zm7.6 5.2-1.4 1.4L18.2 11H9v2h9.2l-2 2 1.4 1.4L22 12l-4.4-3.8Z'/%3E%3C/svg%3E"); }
.ic-check { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2Z'/%3E%3C/svg%3E"); }
.ic-discord { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M19.3 5.3A16.9 16.9 0 0 0 15 4l-.3.4a13 13 0 0 1 3.8 1.9 12 12 0 0 0-13-.1A12.6 12.6 0 0 1 9.4 4.4L9.1 4A16.9 16.9 0 0 0 4.7 5.3 17.6 17.6 0 0 0 2 17a16.9 16.9 0 0 0 5.2 2.6l.6-1a11 11 0 0 1-1.8-.9l.4-.3a12 12 0 0 0 11.2 0l.4.3a11 11 0 0 1-1.8.9l.6 1A16.9 16.9 0 0 0 22 17a17.6 17.6 0 0 0-2.7-11.7ZM9 14.2c-.8 0-1.5-.8-1.5-1.7S8.2 10.8 9 10.8s1.5.8 1.5 1.7-.7 1.7-1.5 1.7Zm6 0c-.8 0-1.5-.8-1.5-1.7S14.2 10.8 15 10.8s1.5.8 1.5 1.7-.7 1.7-1.5 1.7Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M19.3 5.3A16.9 16.9 0 0 0 15 4l-.3.4a13 13 0 0 1 3.8 1.9 12 12 0 0 0-13-.1A12.6 12.6 0 0 1 9.4 4.4L9.1 4A16.9 16.9 0 0 0 4.7 5.3 17.6 17.6 0 0 0 2 17a16.9 16.9 0 0 0 5.2 2.6l.6-1a11 11 0 0 1-1.8-.9l.4-.3a12 12 0 0 0 11.2 0l.4.3a11 11 0 0 1-1.8.9l.6 1A16.9 16.9 0 0 0 22 17a17.6 17.6 0 0 0-2.7-11.7ZM9 14.2c-.8 0-1.5-.8-1.5-1.7S8.2 10.8 9 10.8s1.5.8 1.5 1.7-.7 1.7-1.5 1.7Zm6 0c-.8 0-1.5-.8-1.5-1.7S14.2 10.8 15 10.8s1.5.8 1.5 1.7-.7 1.7-1.5 1.7Z'/%3E%3C/svg%3E"); }

/* —— Dropdowns —— */
.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 280px;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s;
  z-index: 60;
  overflow: hidden;
}
.menu.open .dropdown { opacity: 1; visibility: visible; transform: none; }
.dropdown-id {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  padding: 0.85rem 1rem;
  color: var(--ink);
}
.dropdown-id:hover { background: rgba(232, 93, 4, 0.1); }
.dropdown-id-name { font-family: var(--font-display); font-size: 1rem; }
.dropdown-id-sub { font-family: var(--font-mono); font-size: 0.76rem; color: var(--muted); }
.dropdown-sep { height: 1px; background: var(--line); margin: 0.25rem 0; }
.dropdown-item {
  display: flex;
  align-items: center;
  padding: 0.6rem 1rem;
  color: var(--ink);
  font-size: 0.9rem;
}
.dropdown-item:hover { background: rgba(232, 93, 4, 0.12); color: #fff; }
.dropdown-head {
  padding: 0.7rem 1rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
  border-bottom: 1px solid var(--line);
}
.dropdown-scroll { max-height: 340px; overflow-y: auto; }
.dropdown-empty { padding: 1.5rem 1rem; color: var(--muted); text-align: center; font-size: 0.88rem; }
.dropdown-foot {
  display: block;
  text-align: center;
  padding: 0.65rem;
  border-top: 1px solid var(--line);
  color: var(--accent-2);
  font-size: 0.85rem;
}
.alert-row {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--ink);
}
.alert-row:hover { background: rgba(255, 255, 255, 0.03); }
.alert-row.unread { background: rgba(232, 93, 4, 0.09); }
.alert-text { font-size: 0.86rem; line-height: 1.35; }
.alert-time { display: block; color: var(--muted); font-family: var(--font-mono); font-size: 0.72rem; margin-top: 0.15rem; }
.alerts-page .alert-row { border-radius: var(--radius); border-bottom: 1px solid var(--line); }

/* —— Footer —— */
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.footer-nav { display: flex; gap: 1rem; }
.footer-nav a { color: var(--muted); font-size: 0.82rem; }

/* —— Home layout —— */
.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 320px);
  gap: var(--space-col);
  align-items: start;
}
.home-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-stack);
  min-width: 0;
}
.home-main > .panel,
.home-main > .node-block,
.home-main > .shoutbox {
  margin: 0;
}
.home-side {
  display: flex;
  flex-direction: column;
  gap: var(--space-box);
  min-width: 0;
}
.side-stats .stat-dl { display: grid; grid-template-columns: 1fr auto; gap: 0.55rem 1rem; margin: 0; }
.side-stats dt { color: var(--muted); font-size: 0.85rem; }
.side-stats dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.side-you-card { display: flex; gap: 0.7rem; align-items: center; color: var(--ink); }
.side-you-name { font-family: var(--font-display); }
.col-stats-l { display: block; font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }

/* —— Pills —— */
.pill {
  display: inline-block;
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.12rem 0.4rem;
  border-radius: 3px;
  vertical-align: middle;
  font-weight: 700;
}
.pill-pin { background: rgba(255, 186, 8, 0.18); color: var(--accent-2); }
.pill-ban { background: rgba(255, 59, 74, 0.18); color: var(--danger); }
.pill-unread { background: rgba(74, 163, 255, 0.2); color: #7ec4ff; }
.message-hidden { opacity: 0.55; }
.message-actions .inline-form { display: inline; margin: 0; }
.message-actions .inline-form button.msg-action {
  background: none; border: 0; padding: 0; color: inherit; cursor: pointer; font: inherit;
}
.thread-move-form { display: inline-flex; gap: 0.35rem; align-items: center; }
.thread-row-unread .tr-title { font-weight: 600; }
/* Lock = icon only (no LOCKED text). Placed after title. */
.lock-mark {
  display: inline-block;
  width: 1.2rem;
  height: 1.2rem;
  margin-left: 0.35rem;
  margin-right: 0;
  vertical-align: -0.15em;
  background: var(--danger);
  opacity: 0.92;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M17 8h-1V6a4 4 0 1 0-8 0v2H7a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V10a2 2 0 0 0-2-2Zm-7-2a2 2 0 1 1 4 0v2h-4V6Zm7 14H7V10h10v10Zm-5-3a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M17 8h-1V6a4 4 0 1 0-8 0v2H7a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V10a2 2 0 0 0-2-2Zm-7-2a2 2 0 1 1 4 0v2h-4V6Zm7 14H7V10h10v10Zm-5-3a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.tag-lock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 4px;
  background: rgba(255, 59, 74, 0.16);
  color: transparent;
  vertical-align: middle;
}
.tag-lock::before {
  content: "";
  display: block;
  width: 0.78rem;
  height: 0.78rem;
  background: var(--danger);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M17 8h-1V6a4 4 0 1 0-8 0v2H7a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V10a2 2 0 0 0-2-2Zm-7-2a2 2 0 1 1 4 0v2h-4V6Zm7 14H7V10h10v10Zm-5-3a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M17 8h-1V6a4 4 0 1 0-8 0v2H7a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V10a2 2 0 0 0-2-2Zm-7-2a2 2 0 1 1 4 0v2h-4V6Zm7 14H7V10h10v10Zm-5-3a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* —— Thread list rows —— */
.thread-rows { display: flex; flex-direction: column; }
.thread-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 80px minmax(120px, 150px);
  gap: 0.85rem;
  align-items: center;
  padding: 0.8rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}
.thread-row:first-child { border-top: 0; }
.tr-main { min-width: 0; }
.thread-row-head {
  grid-template-columns: minmax(0, 1fr) 80px minmax(120px, 150px);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.25);
}
.thread-row-head > :first-child { grid-column: 1; }
.tr-avatar { display: block; }
.tr-title { font-family: var(--font-display); font-size: 1.02rem; color: var(--ink); }
.tr-title:hover { color: var(--accent-2); }
.tr-meta { margin-top: 0.15rem; }

/* —— Messages (thread posts) —— */
.thread-head { margin-bottom: 1rem; }
.message-list { display: flex; flex-direction: column; gap: var(--space-box); margin: var(--space-box) 0; }
.message {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(22, 19, 28, 0.9);
  scroll-margin-top: calc(var(--topbar-h) + 12px);
}
.message:target { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent-hot), 0 0 24px rgba(232, 93, 4, 0.25); }
.message-user {
  padding: 1.1rem 1rem;
  background: rgba(0, 0, 0, 0.28);
  border-right: 1px solid var(--line);
  text-align: center;
}
.mu-avatar { display: inline-block; }
.mu-name { margin-top: 0.6rem; font-family: var(--font-display); font-size: 1.02rem; }
.mu-name a { color: var(--ink); }
.mu-name a:hover { color: var(--accent-2); }
.mu-title { font-size: 0.85rem; color: var(--accent-2); letter-spacing: 0.02em; margin-top: 0.35rem; }
.mu-stats { display: none; }
.message-main { display: flex; flex-direction: column; padding: 0; min-width: 0; }
.message-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 1.1rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}
.message-date:hover { color: var(--accent-2); }
.message-body { padding: 1.1rem; line-height: 1.6; }
.message-edited { padding: 0 1.1rem 0.6rem; }
.message-sig {
  margin: 0 1.1rem;
  padding: 0.7rem 0;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}
.message-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 1.1rem 0.9rem;
  margin-top: auto;
  flex-wrap: wrap;
}
.message-actions { display: flex; gap: 0.9rem; align-items: center; }
.msg-action {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font-family: inherit;
  line-height: inherit;
  text-decoration: none;
  appearance: none;
  -webkit-appearance: none;
}
.msg-action:hover { color: var(--accent-2); }
a.msg-action { display: inline; }
.reply-box { scroll-margin-top: calc(var(--topbar-h) + 12px); }
.locked-note { text-align: center; }

/* —— Reactions —— */
.reactions { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.react-control { position: relative; display: inline-flex; }
.react-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 0.45rem 0.9rem;
  min-height: 2.35rem;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1;
  outline: none;
  box-shadow: none;
}
.react-btn:hover,
.react-btn[aria-expanded="true"] {
  border-color: var(--line-strong);
  color: var(--ink);
}
.react-btn:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(232, 93, 4, 0.35);
}
.react-btn.is-reacted {
  color: var(--accent-2);
  border-color: var(--line-strong);
  background: rgba(232, 93, 4, 0.12);
}
.react-face {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  font-size: 1.15rem;
  line-height: 1;
}
.react-face .twemoji {
  width: 22px !important;
  height: 22px !important;
  display: block;
  object-fit: contain;
  pointer-events: none;
}
.react-label { text-transform: lowercase; }
.react-menu {
  position: absolute;
  bottom: calc(100% + 2px);
  left: 0;
  display: none;
  gap: 0.25rem;
  padding: 0.4rem 0.45rem;
  padding-bottom: calc(0.4rem + 10px);
  margin-bottom: -8px;
  background: rgba(12, 10, 16, 0.98);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 30;
  flex-wrap: nowrap;
}
.react-control.is-open .react-menu { display: flex; }
.react-menu[hidden] { display: none !important; }
.react-opt {
  background: transparent;
  border: 0;
  font-size: 1.35rem;
  line-height: 1;
  padding: 0;
  width: 2.25rem;
  height: 2.25rem;
  min-width: 2.25rem;
  min-height: 2.25rem;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  outline: none;
}
.react-opt:hover,
.react-opt:focus-visible { background: rgba(255, 255, 255, 0.1); transform: scale(1.08); }
.react-opt .twemoji {
  width: 24px !important;
  height: 24px !important;
  display: block;
  object-fit: contain;
  pointer-events: none;
}
.react-summary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.82rem;
  min-width: 0;
}
.react-summary[hidden] { display: none !important; }
.react-emojis {
  font-size: 0.95rem;
  letter-spacing: -2px;
  display: inline-flex;
  align-items: center;
}
.react-emojis .twemoji {
  width: 16px !important;
  height: 16px !important;
  display: inline-block;
  vertical-align: -0.15em;
}
.react-names {
  max-width: min(360px, 100%);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.react-name { color: var(--muted); }
a.react-name:hover { color: var(--accent-2); }
.react-count { font-variant-numeric: tabular-nums; color: var(--muted); }
.react-count[hidden] { display: none !important; }

/* —— Editor —— */
.editor { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg-0); }
.editor-toolbar {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  padding: 0.4rem 0.5rem;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  position: relative;
  flex-wrap: wrap;
}
.ed-btn {
  min-width: 30px;
  height: 30px;
  padding: 0 0.5rem;
  background: transparent;
  border: 1px solid transparent;
  color: var(--ink);
  border-radius: 5px;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
}
.ed-btn:hover { background: rgba(255, 255, 255, 0.06); border-color: var(--line); }
.ed-btn.is-active { background: rgba(232, 93, 4, 0.18); border-color: var(--line-strong); color: var(--accent-2); }
.ed-div { width: 1px; height: 20px; background: var(--line); margin: 0 0.3rem; }
.ed-spacer { flex: 1; }
.editor textarea {
  width: 100%;
  border: 0 !important;
  border-radius: 0 !important;
  background: var(--bg-0) !important;
  min-height: 120px;
  resize: vertical;
  display: block;
}
.editor-preview { padding: 1rem; min-height: 120px; }
.editor-hint { padding: 0.45rem 0.7rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.76rem; }
.editor-hint code { font-family: var(--font-mono); background: var(--bg-2); padding: 0.05rem 0.3rem; border-radius: 3px; }
.emoji-pop {
  position: absolute;
  top: calc(100% + 4px);
  right: 0.5rem;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0.2rem;
  padding: 0.45rem;
  background: rgba(10, 8, 14, 0.96);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm, 8px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  z-index: 30;
  max-width: min(320px, 92vw);
  max-height: 220px;
  overflow: auto;
}
.emoji-pop button {
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0.28rem;
  border-radius: 6px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  min-height: 2rem;
}
.emoji-pop button:hover { background: rgba(255, 255, 255, 0.08); }
.emoji-pop .twemoji,
.ed-btn .twemoji {
  width: 22px;
  height: 22px;
  display: block;
  object-fit: contain;
  pointer-events: none;
}

/* —— Rendered BBCode / Markdown content —— */
.bb-content { line-height: 1.6; word-wrap: break-word; overflow-wrap: anywhere; }
.bb-content p { margin: 0 0 0.8rem; }
.bb-content p:last-child { margin-bottom: 0; }
.bb-content h1, .bb-content h2, .bb-content h3, .bb-content h4 { font-family: var(--font-display); margin: 1rem 0 0.5rem; line-height: 1.2; }
.bb-content .bb-h { color: var(--ink); }
.bb-content a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 2px; }
.bb-content img.bb-img { max-width: 100%; height: auto; border-radius: 6px; margin: 0.35rem 0; }
.bb-quote {
  margin: 0.6rem 0;
  padding: 0.6rem 0.9rem;
  border-left: 3px solid var(--accent);
  background: rgba(0, 0, 0, 0.28);
  border-radius: 0 6px 6px 0;
}
.bb-quote-who { font-size: 0.8rem; color: var(--accent-2); margin-bottom: 0.3rem; font-weight: 600; }
.bb-list { margin: 0.5rem 0 0.8rem; padding-left: 1.4rem; }
.bb-list li { margin: 0.2rem 0; }
.bb-code {
  background: #060409;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.8rem 1rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  margin: 0.6rem 0;
}
.bb-inline-code {
  font-family: var(--font-mono);
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 0.05rem 0.35rem;
  border-radius: 4px;
  font-size: 0.88em;
}
.bb-center { text-align: center; }
.bb-spoiler { margin: 0.5rem 0; }
.bb-spoiler-btn {
  background: var(--bg-3);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 0.3rem 0.7rem;
  border-radius: 5px;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
}
.bb-spoiler-btn::before { content: "▶ "; font-size: 0.7em; }
.bb-spoiler-body { display: none; margin-top: 0.5rem; padding: 0.6rem 0.9rem; border: 1px dashed var(--line); border-radius: 6px; }
.bb-spoiler.open .bb-spoiler-body { display: block; }
.bb-spoiler.open .bb-spoiler-btn::before { content: "▼ "; }
.bb-video iframe { max-width: 100%; border-radius: 8px; margin: 0.4rem 0; }
.bb-user { font-weight: 600; }

/* —— Profile header ——
   Banner full-bleed. Avatar overlaps the banner bottom.
   Name + stats + CTA share one row BELOW the banner (never inside it). */
.profile { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--panel); box-shadow: var(--shadow-1); }
.profile-banner {
  height: 148px;
  background-size: cover;
  background-position: center;
  position: relative;
  background-color: var(--bg-3);
}
.profile-banner-fallback { position: absolute; inset: 0; opacity: 0.4; }
.profile-head {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  column-gap: 1.15rem;
  align-items: start;
  padding: 0 1.35rem 0.85rem;
  margin-top: -52px;
  position: relative;
  z-index: 2;
}
.profile-avatar {
  width: 104px;
  height: 104px;
  position: relative;
  z-index: 3;
}
.profile-avatar .avatar-wrap {
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  position: relative;
}
.profile-avatar .avatar {
  box-sizing: border-box;
  width: 104px !important;
  height: 104px !important;
  border-radius: 12px;
  border: 3px solid var(--panel);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
  display: flex !important;
  align-items: center;
  justify-content: center;
  text-align: center;
  object-fit: cover;
  overflow: hidden;
  line-height: 1;
  font-size: 2.75rem !important;
}
.profile-avatar .avatar-initials {
  display: flex !important;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.profile-avatar .online-dot {
  width: 14px;
  height: 14px;
  right: 4px;
  bottom: 4px;
  border-width: 3px;
  border-color: var(--panel);
}
/* Everything except the avatar sits below the banner edge. */
.profile-main {
  min-width: 0;
  padding-top: 60px; /* clears the 52px avatar/banner overlap */
}
.profile-id {
  min-width: 0;
}
.profile-id-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.25rem;
  flex-wrap: wrap;
}
.profile-name {
  font-family: var(--font-display);
  font-size: 1.55rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  line-height: 1.2;
  color: var(--ink);
}
/* Stats sit immediately left of Edit/Follow on the name row. */
.profile-id-actions {
  display: flex;
  align-items: center;
  gap: 1.1rem 1.35rem;
  margin-left: auto;
  flex: 0 0 auto;
}
.profile-cta {
  flex: 0 0 auto;
  margin: 0;
}
.profile-sub {
  margin-top: 0.35rem;
  font-size: 0.88rem;
}
.profile-sub .role-badge { display: inline-block; margin: 0; }
.profile-meta {
  margin: 0.45rem 0 0;
  font-size: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.4rem;
  align-items: center;
  line-height: 1.45;
}
.profile-meta-sep { color: var(--muted); opacity: 0.7; }
.profile-statbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.55rem 1.25rem;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  flex: 0 0 auto;
}
.pstat {
  background: transparent;
  padding: 0;
  text-align: center;
  min-width: 0;
}
.pstat-n {
  display: block;
  font-size: 1.12rem;
  font-weight: 650;
  color: var(--ink);
  line-height: 1.15;
}
.pstat-l {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.15rem;
  line-height: 1.2;
}
.profile-body { padding: 0.85rem 1.35rem 1.35rem; border-top: 1px solid var(--line); }

/* —— Online presence (single green dot on avatars only) —— */
.avatar-wrap {
  position: relative;
  display: inline-grid;
  place-items: center;
  vertical-align: middle;
  flex-shrink: 0;
}
.online-dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #2fdb6e;
  border: 2px solid var(--bg-1, #121018);
  box-shadow: 0 0 0 1px rgba(47, 219, 110, 0.25);
  pointer-events: none;
  z-index: 2;
}
.avatar-btn .avatar-wrap { flex: 0 0 auto; }
.avatar-btn .online-dot {
  width: 10px;
  height: 10px;
  right: 0;
  bottom: 0;
  border-color: var(--bg-2, #1a1620);
}

/* —— Tabs —— */
.tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--line); margin-bottom: 1.35rem; }
.tab {
  padding: 0.75rem 1.05rem;
  color: var(--muted);
  font-weight: 600;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--accent-2); border-bottom-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; animation: rise 0.2s ease; }
.about-dl { display: grid; grid-template-columns: 120px 1fr; gap: 0.4rem 1rem; margin-top: 1rem; }
.about-dl dt { color: var(--muted); font-size: 0.85rem; }
.about-dl dd { margin: 0; }
.activity-row { display: block; padding: 0.7rem 0; border-top: 1px solid var(--line); color: var(--ink); }
.activity-row:first-of-type { border-top: 0; }
.activity-title { font-family: var(--font-display); }
.activity-row:hover .activity-title { color: var(--accent-2); }

/* —— Wall (profile posts) —— */
.wall-composer {
  margin-bottom: 1.15rem;
  padding: 0.85rem 0 1rem;
  border-bottom: 1px solid var(--line-2);
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}
.wall { display: flex; flex-direction: column; gap: var(--space-box); }
.wall-post {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 0.9rem;
  padding: 1.15rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(14, 12, 18, 0.55);
  scroll-margin-top: calc(var(--topbar-h) + 12px);
}
.wall-head { margin-bottom: 0.35rem; }
.wall-author { font-family: var(--font-display); color: var(--ink); }
.wall-author:hover { color: var(--accent-2); }
.wall-body { margin-bottom: 0.6rem; }
.wall-foot { margin-bottom: 0.5rem; }
.wall-comments { border-top: 1px solid var(--line); padding-top: 0.7rem; margin-top: 0.5rem; display: flex; flex-direction: column; gap: 0.6rem; }
.wall-comment { display: grid; grid-template-columns: 28px 1fr; gap: 0.55rem; align-items: start; }
.wc-author { font-weight: 600; color: var(--ink); margin-right: 0.4rem; }
.wc-author:hover { color: var(--accent-2); }
.wc-body { display: inline; }
.wc-body p { display: inline; margin: 0; }
.wc-time { margin-left: 0.4rem; }
.wall-comment-form { display: flex; gap: 0.5rem; margin-top: 0.3rem; }
.pp-comment-input, .wall-comment-form input {
  flex: 1;
  background: var(--bg-0);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 0.5rem 0.7rem;
  border-radius: 999px;
  font: inherit;
  font-size: 0.86rem;
}

/* —— Settings —— */
.settings-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--space-col); align-items: start; }
.settings-grid > .panel { margin: 0; }
.avatar-edit { display: flex; gap: 1rem; align-items: center; }
.avatar-edit .avatar { width: 88px; height: 88px; border-radius: 12px; }
.avatar-edit-fields { flex: 1; display: grid; gap: 0.5rem; }

/* —— Members —— */
.member-filter { display: flex; gap: 0.5rem; align-items: center; }
.member-filter input, .member-filter select {
  background: var(--bg-0);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius);
  font: inherit;
}
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--space-box); }
.member-card {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(22, 19, 28, 0.85);
  color: var(--ink);
}
.member-card:hover { border-color: var(--line-strong); background: rgba(232, 93, 4, 0.08); }
.member-name { font-family: var(--font-display); font-size: 1.02rem; }
.member-title { margin-top: 0.1rem; }
.member-stats { margin-top: 0.3rem; }

/* —— Search —— */
.search-page-form, .member-filter { flex-wrap: wrap; }
.search-page-form { display: flex; gap: 0.6rem; margin-bottom: 1.25rem; }
.search-page-form input {
  flex: 1;
  background: var(--bg-0);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius);
  font: inherit;
}

/* —— Pagination —— */
.pager { display: flex; gap: 0.3rem; align-items: center; justify-content: center; margin: 1.25rem 0; flex-wrap: wrap; }
.pager-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 0.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: rgba(22, 19, 28, 0.85);
  font-size: 0.88rem;
}
.pager-btn:hover { border-color: var(--line-strong); background: rgba(232, 93, 4, 0.12); }
.pager-btn.is-current { background: linear-gradient(180deg, #ff7a1a, var(--accent)); color: #1a0900; font-weight: 700; border-color: transparent; }
.pager-gap { color: var(--muted); padding: 0 0.25rem; }
.edit-actions { display: flex; gap: 0.6rem; }

@media (max-width: 980px) {
  .home-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .profile-statbar { grid-template-columns: repeat(4, 1fr); }
  body { background-attachment: scroll; }
}

@media (max-width: 900px) {
  .node-head, .node-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .col-stats, .node-head .col-stats, .node-head .col-last { display: none; }
  .acp { grid-template-columns: 1fr; }
  .acp-side { position: static; }
  .acp-stats { grid-template-columns: repeat(2, 1fr); }
  .acp-grid, .form-inline-3 { grid-template-columns: 1fr; }
  .acp-main { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .acp-table { min-width: 520px; }
  .message { grid-template-columns: 1fr; }
  .message-user {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 0.75rem;
    row-gap: 0.15rem;
    text-align: left;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 0.7rem 1rem;
  }
  .mu-avatar { grid-row: 1 / span 2; }
  .mu-avatar .avatar { width: 44px !important; height: 44px !important; }
  .mu-name { margin-top: 0; grid-column: 2; min-width: 0; overflow-wrap: anywhere; }
  .mu-title { grid-column: 2; }
  .mu-stats { margin-top: 0; margin-left: 0; grid-column: 3; grid-row: 1 / span 2; align-self: center; }
  .topbar {
    height: auto;
    min-height: var(--topbar-h);
    padding-top: env(safe-area-inset-top, 0);
    padding-left: env(safe-area-inset-left, 0);
    padding-right: env(safe-area-inset-right, 0);
  }
  .topbar-inner {
    height: auto;
    min-height: var(--topbar-h);
    flex-wrap: wrap;
    padding: 0.45rem 0 0.55rem;
    gap: 0.55rem 0.75rem;
    align-items: center;
  }
  .topnav {
    display: flex;
    order: 3;
    flex: 1 1 100%;
    width: 100%;
    gap: 0.35rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.1rem;
  }
  .topnav::-webkit-scrollbar { display: none; }
  .topnav a {
    flex: 0 0 auto;
    white-space: nowrap;
    min-height: 40px;
    padding: 0.45rem 0.85rem;
  }
  .topsearch { display: none; }
  .avatar-name { display: none; }
  .thread-row { grid-template-columns: 36px minmax(0, 1fr); }
  .thread-row .col-stats, .thread-row .col-last { display: none; }
  .thread-row-head { display: none; }
  .profile-head {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    margin-top: -48px;
  }
  .profile-main {
    padding-top: 0.55rem;
    width: 100%;
  }
  .profile-id-top {
    flex-direction: column;
    align-items: center;
  }
  .profile-id-actions {
    margin-left: 0;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
  }
  .profile-meta { justify-content: center; }
  .profile-statbar { justify-content: center; }
  .profile-avatar,
  .profile-avatar .avatar-wrap {
    width: 96px;
    height: 96px;
  }
  .profile-avatar .avatar {
    width: 96px !important;
    height: 96px !important;
    font-size: 2.4rem !important;
  }
  .dropdown { position: fixed; top: calc(var(--topbar-h) + env(safe-area-inset-top, 0px)); right: 8px; left: 8px; width: auto; max-height: calc(100dvh - var(--topbar-h) - 1rem); overflow-y: auto; }
  .board-toolbar { align-items: stretch; }
  .board-toolbar .member-filter { width: 100%; }
  .member-filter { width: 100%; }
  .member-filter input, .member-filter select { flex: 1 1 140px; min-width: 0; }
  .discord-nag-inner { flex-wrap: wrap; }
  .discord-nag-text { flex: 1 1 12rem; min-width: 0; }
  .discord-nag-btn { margin-left: 0; }
  .site-footer {
    padding-bottom: max(0.85rem, env(safe-area-inset-bottom, 0px));
    padding-left: env(safe-area-inset-left, 0);
    padding-right: env(safe-area-inset-right, 0);
  }
  .edit-actions { flex-wrap: wrap; }
  .role-row { flex-wrap: wrap; }
  .shoutbox-compose input,
  .wall-comment-form input { min-width: 0; }
}

/* ========================================================================
   Shoutbox / members chat
   ======================================================================== */
.shoutbox {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.shoutbox-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(242, 103, 10, 0.16), transparent);
}
.shoutbox-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}
.shoutbox-dot {
  width: 8px; height: 8px; border-radius: 999px;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(55, 209, 141, 0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(55, 209, 141, 0.5); }
  70% { box-shadow: 0 0 0 7px rgba(55, 209, 141, 0); }
  100% { box-shadow: 0 0 0 0 rgba(55, 209, 141, 0); }
}
.shoutbox-status {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.shoutbox-stream {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem 0.65rem;
  overflow-y: auto;
  height: 340px;
  scroll-behavior: smooth;
}
.shoutbox-side .shoutbox-stream { height: 300px; }
.shoutbox-full .shoutbox-stream { height: min(60vh, 560px); }
.shoutbox-loading, .shoutbox-empty { padding: 1.2rem; text-align: center; }
.shout {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 0.55rem;
  padding: 0.35rem 0.55rem;
  border-radius: var(--radius-sm);
  transition: background 0.12s ease;
}
.shout:hover { background: rgba(255, 255, 255, 0.03); }
.shout-av { align-self: start; margin-top: 2px; }
.shout-av .avatar { width: 30px; height: 30px; border-radius: 8px; }
.shout-main { min-width: 0; }
.shout-line { display: flex; align-items: baseline; gap: 0.4rem; min-width: 0; }
.shout-line-grow { flex: 1 1 auto; min-width: 0.5rem; }
.shout-author {
  font-weight: 650;
  color: var(--ink);
  font-size: 0.86rem;
  flex: 0 1 auto;
  min-width: 0;
  max-width: min(42%, 12rem);
  overflow: visible;
  white-space: nowrap;
}
.shout-author:hover { color: var(--accent-2); }
.shout-time {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  flex: 0 0 auto;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.shout-del {
  margin-left: 0;
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0 0.25rem;
  border-radius: 4px;
  opacity: 0;
  flex: 0 0 auto;
  transition: opacity 0.12s ease, color 0.12s ease;
}
.shout:hover .shout-del { opacity: 1; }
.shout-del:hover { color: var(--danger); background: rgba(255, 65, 82, 0.12); }
.shout-body { font-size: 0.9rem; line-height: 1.45; word-wrap: break-word; overflow-wrap: anywhere; color: var(--ink-soft); }
.shout-body a { color: var(--accent-2); }
.shoutbox-compose {
  display: flex;
  gap: 0.65rem;
  padding: 0.85rem 0.9rem;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
}
.shoutbox-compose input {
  flex: 1;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 0.6rem 0.8rem;
  border-radius: 999px;
  font: inherit;
  font-size: 0.88rem;
}
.shoutbox-compose input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(242, 103, 10, 0.16);
}
.shoutbox-send { border-radius: 999px; padding: 0.5rem 1.1rem; }
.shoutbox-readonly { padding: 0.7rem 1rem; border-top: 1px solid var(--line); text-align: center; }
.shoutbox-page { max-width: 860px; }

@media (max-width: 980px) {
  .shoutbox-side .shoutbox-stream { height: 260px; }
}

/* ========================================================================
   Discord: mandatory-link nag + link page
   ======================================================================== */
.discord-nag {
  border-bottom: 1px solid var(--line-strong);
  background: linear-gradient(90deg, rgba(88, 101, 242, 0.22), rgba(242, 103, 10, 0.12));
}
.discord-nag.locked {
  background: linear-gradient(90deg, rgba(255, 65, 82, 0.25), rgba(242, 103, 10, 0.15));
}
.discord-nag-inner {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0;
}
.discord-nag .ic-discord { color: #cdd2ff; width: 1.3em; height: 1.3em; opacity: 1; }
.discord-nag-text { font-size: 0.92rem; font-weight: 550; }
.discord-nag-btn { margin-left: auto; white-space: nowrap; padding: 0.45rem 0.9rem; }

.discord-link-wrap { max-width: 560px; margin: 2.5rem auto; }
.discord-link-card { text-align: center; padding: 2.2rem 2rem; }
.discord-link-icon {
  width: 68px; height: 68px; margin: 0 auto 1rem;
  display: grid; place-items: center;
  border-radius: 18px;
  background: linear-gradient(150deg, #5865f2, #404eed);
  box-shadow: 0 12px 30px rgba(88, 101, 242, 0.4);
}
.discord-link-icon .ic-discord { color: #fff; width: 38px; height: 38px; opacity: 1; margin: 0; }
.discord-link-card h1 { font-family: var(--font-display); margin: 0 0 0.4rem; }
.discord-deadline {
  margin: 1rem 0;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 65, 82, 0.12);
  border: 1px solid rgba(255, 65, 82, 0.3);
  font-size: 0.9rem;
}
.discord-steps { text-align: left; margin: 1.2rem auto; max-width: 400px; line-height: 1.8; color: var(--ink-soft); }
.discord-steps code { background: rgba(0,0,0,0.4); padding: 0.1rem 0.4rem; border-radius: 5px; font-family: var(--font-mono); color: var(--gold-soft); }
.link-code-box {
  display: flex; align-items: center; justify-content: center; gap: 0.6rem;
  margin: 0.5rem auto 0.3rem;
}
.link-code {
  font-family: var(--font-mono);
  font-size: 2rem;
  letter-spacing: 0.4em;
  padding: 0.6rem 0.4rem 0.6rem 1rem;
  background: rgba(0,0,0,0.45);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  color: #fff;
  font-weight: 700;
}
.discord-link-actions { display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; margin-top: 1.4rem; }
.discord-linked { display: flex; align-items: center; gap: 0.4rem; }
.discord-linked .ic-check { color: var(--ok); opacity: 1; }
.btn-danger { color: var(--danger); border-color: rgba(255,65,82,0.4); }
.btn-danger:hover { background: rgba(255,65,82,0.14); border-color: var(--danger); color: #fff; }

/* ========================================================================
   Custom role username / rank styling (values come from validated inline
   CSS custom properties only — never raw CSS).
   ======================================================================== */
.role-style {
  font-weight: 650;
  display: inline;
  /* Avoid filter+overflow clipping (looks like a glowing rectangle). */
  filter: none;
}
.role-solid { color: var(--rc1, inherit); }
.role-gradient,
.role-rainbow {
  background-image: var(--rgrad);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.role-gradient { animation: role-gradient var(--rspeed, 6s) linear infinite; }
.role-rainbow { animation: role-rainbow var(--rspeed, 6s) linear infinite; }
@keyframes role-gradient { to { background-position: 200% center; } }
@keyframes role-rainbow { to { background-position: 200% center; } }

/* Glow via text-shadow; intensity from --rglow (0–100). Soft default ~30. */
.role-glow {
  --_gi: calc(var(--rglow, 30) * 1%);
  --_g1: color-mix(in srgb, var(--rc1, #fff) calc(var(--rglow, 30) * 0.55%), transparent);
  --_g2: color-mix(in srgb, var(--rc1, #fff) calc(var(--rglow, 30) * 0.35%), transparent);
  --_g3: color-mix(in srgb, var(--rc1, #fff) calc(var(--rglow, 30) * 0.22%), transparent);
  --_g4: color-mix(in srgb, var(--rc1, #fff) calc(var(--rglow, 30) * 0.12%), transparent);
  text-shadow:
    0 0 calc(2px + var(--rglow, 30) * 0.04px) var(--_g1),
    0 0 calc(6px + var(--rglow, 30) * 0.08px) var(--_g2);
}
.role-glow-layers-1 {
  text-shadow: 0 0 calc(2px + var(--rglow, 30) * 0.05px) var(--_g1);
}
.role-glow-layers-2 {
  text-shadow:
    0 0 calc(2px + var(--rglow, 30) * 0.04px) var(--_g1),
    0 0 calc(6px + var(--rglow, 30) * 0.08px) var(--_g2);
}
.role-glow-layers-3 {
  text-shadow:
    0 0 calc(2px + var(--rglow, 30) * 0.04px) var(--_g1),
    0 0 calc(6px + var(--rglow, 30) * 0.08px) var(--_g2),
    0 0 calc(12px + var(--rglow, 30) * 0.12px) var(--_g3);
}
.role-glow-layers-4,
.role-fx-neon {
  text-shadow:
    0 0 calc(1px + var(--rglow, 40) * 0.03px) color-mix(in srgb, #fff calc(var(--rglow, 40) * 0.4%), transparent),
    0 0 calc(3px + var(--rglow, 40) * 0.05px) var(--_g1),
    0 0 calc(8px + var(--rglow, 40) * 0.1px) var(--_g2),
    0 0 calc(16px + var(--rglow, 40) * 0.16px) var(--_g3),
    0 0 calc(28px + var(--rglow, 40) * 0.22px) var(--_g4);
}
.role-solid.role-glow {
  color: var(--rc1, inherit);
  -webkit-text-fill-color: var(--rc1, inherit);
}
.role-gradient.role-glow,
.role-rainbow.role-glow {
  filter: none;
}

.role-fx-sparkle,
.role-fx-snow {
  position: relative;
}
.role-fx-sparkle::after,
.role-fx-snow::after {
  content: "";
  position: absolute;
  inset: -0.15em -0.2em;
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.95), transparent),
    radial-gradient(1px 1px at 70% 30%, rgba(255,255,255,0.85), transparent),
    radial-gradient(1.2px 1.2px at 40% 70%, rgba(255,255,255,0.9), transparent),
    radial-gradient(1px 1px at 85% 60%, rgba(255,255,255,0.75), transparent),
    radial-gradient(1px 1px at 25% 50%, rgba(255,255,255,0.8), transparent),
    radial-gradient(1.1px 1.1px at 55% 15%, rgba(255,255,255,0.7), transparent);
  background-size: 100% 100%;
  animation: role-speckle var(--rspeed, 6s) linear infinite;
  opacity: 0.85;
  mix-blend-mode: screen;
}
.role-fx-snow::after {
  background-image:
    radial-gradient(1.4px 1.4px at 12% 10%, rgba(255,255,255,0.95), transparent),
    radial-gradient(1.2px 1.2px at 48% 0%, rgba(220,240,255,0.9), transparent),
    radial-gradient(1px 1px at 78% 25%, rgba(255,255,255,0.85), transparent),
    radial-gradient(1.3px 1.3px at 30% 55%, rgba(230,245,255,0.8), transparent),
    radial-gradient(1px 1px at 90% 70%, rgba(255,255,255,0.75), transparent),
    radial-gradient(1.2px 1.2px at 60% 40%, rgba(255,255,255,0.7), transparent);
  animation-name: role-snow;
}
@keyframes role-speckle {
  0%, 100% { opacity: 0.55; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-1px); }
}
@keyframes role-snow {
  0% { opacity: 0.7; transform: translateY(-2px); }
  100% { opacity: 0.95; transform: translateY(2px); }
}

.role-fx-sparkle {
  animation: role-sparkle var(--rspeed, 6s) ease-in-out infinite;
}
@keyframes role-sparkle {
  0%, 100% {
    filter: brightness(1);
  }
  40% {
    filter: brightness(1.15);
  }
}
.role-glow.role-fx-sparkle {
  animation: none;
}

.role-fx-neon {
  --rglow: max(var(--rglow, 55), 45);
}

.role-fx-shimmer.role-gradient,
.role-fx-shimmer.role-rainbow {
  background-size: 300% auto;
  animation-name: role-shimmer;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-duration: var(--rspeed, 6s);
}
.role-fx-shimmer.role-solid {
  background-image: linear-gradient(
    110deg,
    var(--rc1) 0%,
    color-mix(in srgb, var(--rc1) 55%, #fff) 45%,
    var(--rc1) 90%
  );
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: role-shimmer var(--rspeed, 6s) linear infinite;
}
@keyframes role-shimmer {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.role-fx-pulse {
  animation: role-pulse var(--rspeed, 6s) ease-in-out infinite;
}
@keyframes role-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.78; }
}

@media (prefers-reduced-motion: reduce) {
  .role-rainbow,
  .role-gradient,
  .role-fx-sparkle,
  .role-fx-snow,
  .role-fx-shimmer.role-gradient,
  .role-fx-shimmer.role-rainbow,
  .role-fx-shimmer.role-solid,
  .role-fx-pulse,
  .role-fx-sparkle::after,
  .role-fx-snow::after {
    animation: none;
  }
}

/* Rank badge chip (not a pill) */
.role-badge {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 650;
  line-height: 1.2;
  padding: 0.35rem 0.85rem;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  vertical-align: middle;
  text-transform: none;
  letter-spacing: 0.01em;
}
.role-badge.role-solid { border-color: color-mix(in srgb, var(--rc1) 45%, transparent); }

/* Role style preview + swatch in the control panel */
.role-swatch { display: inline-block; width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--line); vertical-align: -2px; }
.role-preview { margin-top: 0.6rem; padding: 0.5rem 0.75rem; border: 1px dashed var(--line); border-radius: var(--radius-sm); background: rgba(0,0,0,0.25); }

/* Role admin list + form */
.acp-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.15rem; flex-wrap: wrap; }
.role-list { display: flex; flex-direction: column; gap: var(--space-box); }
.acp-main > .panel { margin-top: 0; padding: 1.2rem 1.3rem 1.25rem; }
.acp-main > .panel + .panel { margin-top: 1.35rem; }
.role-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0; }
.role-row-name { display: flex; align-items: center; gap: 0.5rem; font-size: 1.05rem; }
.role-row-meta { margin-top: 0.25rem; display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.role-row-preview { margin-top: 0.25rem; }
.role-row-actions { display: flex; gap: 0.4rem; align-items: center; white-space: nowrap; }
.role-row-actions form { margin: 0; }
.acp-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.perm-module { margin-bottom: 0.85rem; }
.perm-module-name { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gold-soft); margin-bottom: 0.35rem; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0.35rem 1rem; }
.role-form-actions { display: flex; gap: 0.6rem; margin-top: 1rem; }
.acp-inline-form { display: flex; gap: 0.65rem; flex-wrap: wrap; align-items: center; margin-top: 1.15rem; }
.acp-inline-form input[type="text"] { flex: 1; min-width: 160px; background: rgba(0,0,0,0.35); border: 1px solid var(--line); color: var(--ink); padding: 0.55rem 0.7rem; border-radius: var(--radius-sm); }
.acp-inline-form input[type="number"] { background: rgba(0,0,0,0.35); border: 1px solid var(--line); color: var(--ink); padding: 0.55rem 0.7rem; border-radius: var(--radius-sm); }
.acp-row-actions { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.acp-row-actions form { margin: 0; display: inline; }

/* Category drag-and-drop reorder */
.cat-sortable { display: flex; flex-direction: column; gap: 0; }
.cat-panel { position: relative; transition: opacity 0.15s ease, box-shadow 0.15s ease; touch-action: none; }
.cat-panel.is-dragging { opacity: 0.55; }
.cat-panel.is-drag-over { box-shadow: inset 0 2px 0 0 var(--accent); }
.cat-drag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  margin-right: 0.45rem;
  padding: 0;
  border-radius: 4px;
  color: var(--muted);
  cursor: grab;
  user-select: none;
  letter-spacing: -0.12em;
  font-size: 0.9rem;
  line-height: 1;
  vertical-align: -0.2em;
  border: 1px solid transparent;
  background: transparent;
  font-family: inherit;
}
.cat-drag:hover { color: var(--ink); border-color: var(--line); background: rgba(255,255,255,0.04); }
.cat-panel.is-dragging .cat-drag { cursor: grabbing; }
.cat-order-btns { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
.cat-order-btns form { margin: 0; display: inline; }
.cat-move-form { display: inline; }

.thread-headbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.thread-headbar form { margin: 0; }
.thread-head-actions { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; }
.thread-head-actions form { margin: 0; }
.gate-alt { margin-top: 0.9rem; text-align: center; font-size: 0.85rem; }

/* Home sidebar widgets */
.side-cta {
  display: flex;
  gap: 0.65rem;
  margin: 0;
}
.side-cta .btn {
  flex: 1 1 0;
  min-width: 0;
  justify-content: center;
}
.home-side .side-widget {
  margin: 0;
  padding: 1.1rem 1.2rem;
}
.side-feed { display: flex; flex-direction: column; gap: 0.25rem; }
.feed-row { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 0.55rem; align-items: center; padding: 0.45rem 0.4rem; border-radius: var(--radius-sm); color: var(--ink); }
.feed-row:hover { background: rgba(255, 255, 255, 0.03); }
.feed-main { min-width: 0; }
.feed-title { font-size: 0.86rem; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-sub { font-size: 0.72rem; }
.online-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem 0.15rem;
  align-items: baseline;
  line-height: 1.55;
}
.online-name {
  display: inline;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 0.9rem;
  color: var(--ink-soft);
  text-decoration: none;
}
.online-name:hover { color: var(--accent-2); }
.online-name.is-staff {
  color: var(--gold-soft);
  font-weight: 700;
}
.online-name.is-staff:hover { color: var(--accent-2); }
.online-sep { color: var(--muted); font-size: 0.85rem; user-select: none; }
.count-pill { font-size: 0.7rem; padding: 0.05rem 0.45rem; border-radius: 999px; background: rgba(242,103,10,0.2); color: var(--gold-soft); margin-left: 0.35rem; }

/* New-posts / thread rows */
.thread-row { display: grid; grid-template-columns: 36px minmax(0,1fr) 90px minmax(120px,180px); gap: 0.75rem; align-items: center; padding: 0.75rem 1rem; border-bottom: 1px solid var(--line-2); color: var(--ink); }
.thread-row:hover { background: rgba(255,255,255,0.02); }
.thread-row:last-child { border-bottom: 0; }
.tr-title { font-weight: 600; display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.tr-sub { margin-top: 0.2rem; }

/* ========================================================================
   Mobile polish — phones / notched Android / iOS (desktop ≥901px unchanged)
   ======================================================================== */
@media (max-width: 480px) {
  html { overflow-x: clip; }
  .wrap {
    width: min(1160px, calc(100% - 1.25rem));
    padding-left: max(0px, env(safe-area-inset-left, 0px));
    padding-right: max(0px, env(safe-area-inset-right, 0px));
  }
  .main-wrap { padding: 1rem 0 2.5rem; }
  .panel { padding: 1rem 1.05rem; }
  .home-side .side-widget { padding: 0.95rem 1rem; }
  .side-cta { flex-direction: column; }
  .side-cta .btn { width: 100%; min-height: 44px; }
  .node-cat { padding: 0.7rem 0.9rem; }
  .node-row { padding: 0.8rem 0.85rem; }
  .node-row .col-last { display: none; }
  .shoutbox-full .shoutbox-stream { height: min(50dvh, 420px); }
  .shoutbox-compose {
    flex-wrap: wrap;
    padding: 0.7rem 0.75rem;
    padding-bottom: max(0.7rem, env(safe-area-inset-bottom, 0px));
  }
  .shoutbox-compose input { flex: 1 1 10rem; min-width: 0; min-height: 44px; }
  .shoutbox-send { min-height: 44px; flex: 0 0 auto; }
  .wall-comment-form { flex-wrap: wrap; }
  .wall-comment-form input { flex: 1 1 10rem; min-width: 0; min-height: 44px; }
  .wall-comment-form .btn { min-height: 44px; }
  .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    scrollbar-width: none;
    margin-bottom: 1rem;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: 0 0 auto; padding: 0.65rem 0.8rem; min-height: 44px; }
  .profile-body { padding: 0.85rem 1rem 1rem; }
  .profile-head { padding-left: 1rem; padding-right: 1rem; }
  .about-dl,
  .acp-dl { grid-template-columns: 1fr; }
  .about-dl dd,
  .acp-dl dd { margin-bottom: 0.55rem; }
  .member-grid { grid-template-columns: 1fr; }
  .search-page-form { flex-direction: column; align-items: stretch; }
  .search-page-form .btn { width: 100%; min-height: 44px; }
  .message-head,
  .message-body { padding-left: 0.85rem; padding-right: 0.85rem; }
  .discord-nag-btn { width: 100%; min-height: 44px; justify-content: center; }
  .discord-link-card { padding: 1.25rem 1rem; }
  .link-code-box { flex-wrap: wrap; }
  .link-code {
    font-size: 1.25rem;
    letter-spacing: 0.2em;
    word-break: break-all;
    padding: 0.5rem 0.65rem;
  }
  .acp-cols,
  .perm-grid { grid-template-columns: 1fr; }
  .acp-inline-form input[type="text"] { min-width: 0; width: 100%; }
  .acp-stats { grid-template-columns: 1fr 1fr; gap: 0.65rem; }
  .role-row {
    flex-direction: column;
    align-items: stretch;
  }
  .role-row-actions {
    white-space: normal;
    flex-wrap: wrap;
  }
  .avatar-edit { flex-wrap: wrap; }
  .gate { padding: 0 0.15rem; }
  .btn { min-height: 44px; }
  .btn-tiny { min-height: 44px; padding: 0.5rem 0.85rem; }
  .pager-btn { min-width: 44px; min-height: 44px; }
  .icon-btn { width: 44px; height: 44px; }
  .ed-btn { min-width: 44px; min-height: 44px; }
  .react-btn { min-height: 44px; padding: 0.45rem 0.75rem; }
  .msg-action { min-height: 44px; display: inline-flex; align-items: center; padding: 0.35rem 0.25rem; }
  .emoji-pop button { min-width: 44px; min-height: 44px; }
  .form-stack input,
  .form-stack textarea,
  .form-stack select {
    font-size: 16px; /* prevents iOS zoom on focus */
  }
  .topsearch input,
  .shoutbox-compose input,
  .wall-comment-form input,
  .member-filter input,
  .member-filter select,
  .search-page-form input {
    font-size: 16px;
  }
}

@media (max-width: 360px) {
  .acp-stats { grid-template-columns: 1fr; }
  .profile-statbar { grid-template-columns: 1fr 1fr; }
  .brand { font-size: 1rem; letter-spacing: 0.04em; }
}

/* Touch devices: click-toggle menus; keep large hit targets */
@media (hover: none), (pointer: coarse) {
  .react-menu {
    position: absolute;
    bottom: calc(100% + 4px);
    border-radius: 10px;
  }
  .react-control.is-open .react-menu { display: flex; }
  .react-opt {
    min-width: 44px;
    min-height: 44px;
    width: 44px;
    height: 44px;
  }
  .shout-del {
    opacity: 0.75;
    min-width: 44px;
    min-height: 44px;
  }
  .shout:hover .shout-del { opacity: 1; }
}

@supports (padding: max(0px)) {
  .discord-nag-inner {
    padding-left: max(0px, env(safe-area-inset-left, 0px));
    padding-right: max(0px, env(safe-area-inset-right, 0px));
  }
}

/* —— Loader generate progress —— */
.loader-build-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background:
    radial-gradient(700px 360px at 50% 20%, rgba(242, 103, 10, 0.18), transparent 60%),
    rgba(5, 5, 7, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.loader-build-overlay[hidden] { display: none !important; }
.loader-build-card {
  width: min(420px, 100%);
  padding: 1.35rem 1.4rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(27, 23, 35, 0.96), rgba(12, 10, 16, 0.96));
  box-shadow: var(--shadow-2);
  animation: rise 0.35s ease both;
}
.loader-build-brand {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.loader-build-brand span { color: var(--accent); }
.loader-build-title {
  margin: 0.55rem 0 0.25rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
}
.loader-build-sub {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.92rem;
  min-height: 1.4em;
}
.loader-build-track {
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  border: 1px solid var(--line-2);
}
.loader-build-fill {
  height: 100%;
  width: 4%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.25s ease;
}
.loader-build-fill.is-indeterminate {
  width: 36%;
  transition: none;
  animation: loader-build-slide 1.05s ease-in-out infinite;
}
@keyframes loader-build-slide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(280%); }
}
.loader-build-steps {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}
.loader-build-steps li {
  font-size: 0.84rem;
  color: var(--muted);
  padding-left: 1.15rem;
  position: relative;
}
.loader-build-steps li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}
.loader-build-steps li.is-active {
  color: var(--ink);
}
.loader-build-steps li.is-active::before {
  background: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(255, 190, 46, 0.18);
}
.loader-build-steps li.is-done {
  color: var(--ok);
}
.loader-build-steps li.is-done::before {
  background: var(--ok);
}

/* —— Site announcement banner —— */
.site-announce {
  --announce-accent: #4aa3ff;
  border-bottom: 1px solid color-mix(in srgb, var(--announce-accent) 35%, transparent);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--announce-accent) 18%, transparent), transparent 55%),
    linear-gradient(180deg, rgba(18, 16, 24, 0.96), rgba(10, 9, 14, 0.9));
  animation: announce-in 0.45s ease-out both;
}
.site-announce-preview {
  margin-top: 0.75rem;
  border: 1px solid color-mix(in srgb, var(--announce-accent) 35%, transparent);
  border-radius: var(--radius-sm);
  animation: none;
}
.site-announce-inner {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.7rem 0;
}
.site-announce-icon {
  flex: 0 0 auto;
  width: 1.35rem;
  height: 1.35rem;
  margin-top: 0.05rem;
  border-radius: 50%;
  border: 1.5px solid var(--announce-accent);
  color: var(--announce-accent);
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}
.site-announce-icon-info::before { content: "i"; }
.site-announce-icon-warn::before { content: "!"; }
.site-announce-icon-success::before { content: "✓"; }
.site-announce-icon-alert::before { content: "×"; font-size: 0.95rem; }
.site-announce-copy {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45rem 0.7rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.45;
}
.site-announce-title { color: var(--ink); font-weight: 650; }
.site-announce-sep {
  width: 1px;
  height: 0.9em;
  background: color-mix(in srgb, var(--announce-accent) 55%, transparent);
  align-self: center;
}
.site-announce-body { color: var(--ink-soft); }
@keyframes announce-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* —— Client page —— */
.client-status-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.client-status-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
}
.client-status-k {
  min-width: 6.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.client-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.15rem;
}
.client-actions form { margin: 0; }
.client-status-panel {
  animation: client-panel-in 0.35s ease-out both;
}
@keyframes client-panel-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* —— Home sidebar polish —— */
.side-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.65rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
}
.side-status-k {
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.side-cta .btn {
  transition: transform 0.14s ease, filter 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}
.side-cta .btn:hover {
  transform: translateY(-1px);
}
.home-side .side-widget {
  transition: border-color 0.18s ease, background 0.18s ease;
}
.home-side .side-widget:hover {
  border-color: rgba(242, 103, 10, 0.28);
}


/* —— Shoutbox notice / emoji / reactions —— */
.shoutbox-title { display: flex; align-items: center; gap: 0.55rem; flex-wrap: wrap; }
.shoutbox-notice {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--danger);
  border: 1px solid rgba(255, 59, 74, 0.35);
  padding: 0.12rem 0.4rem;
  border-radius: 3px;
  font-weight: 650;
}
.shoutbox-compose { position: relative; flex-direction: column; align-items: stretch; gap: 0.35rem; }
.shoutbox-compose-row { display: flex; gap: 0.45rem; align-items: center; }
.shoutbox-compose-row input { flex: 1; }
.shout-emoji-btn {
  flex: 0 0 auto;
  width: 2.2rem; height: 2.2rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
}
.shout-emoji-btn[aria-expanded="true"] {
  border-color: rgba(242, 103, 10, 0.45);
  background: rgba(242, 103, 10, 0.12);
}
.shout-emoji-panel {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0.2rem;
  padding: 0.45rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(10, 8, 14, 0.96);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  max-height: 210px;
  overflow: auto;
}
.shout-emoji-panel[hidden] { display: none !important; }
.shout-emoji-panel button {
  border: 0;
  background: transparent;
  cursor: pointer;
  line-height: 1;
  padding: 0.28rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.shout-emoji-panel button:hover { background: rgba(255,255,255,0.08); }

.twemoji {
  width: 1.15em;
  height: 1.15em;
  vertical-align: -0.2em;
  display: inline-block;
  object-fit: contain;
  pointer-events: none;
}
.twemoji-sm { width: 1em; height: 1em; }

.shout-reacts {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex: 0 0 auto;
  margin-top: 0;
}
.shout-react-summary {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1;
}
.shout-react-summary .twemoji { margin-right: 0.05rem; }
.shout-react-count { font-variant-numeric: tabular-nums; margin-left: 0.1rem; }
.shout-react-toggle {
  width: 2rem;
  height: 2rem;
  min-width: 2rem;
  min-height: 2rem;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  opacity: 0.55;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  outline: none;
  transition: opacity 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}
.shout-react-face {
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
}
.shout-react-face .twemoji,
.shout-react-toggle .twemoji {
  width: 18px !important;
  height: 18px !important;
  display: block;
  object-fit: contain;
  pointer-events: none;
}
.shout:hover .shout-react-toggle,
.shout-react-toggle[aria-expanded="true"] { opacity: 1; }
.shout-react-toggle:hover,
.shout-react-toggle[aria-expanded="true"] {
  background: rgba(255,255,255,0.07);
  border-color: var(--line);
}
.shout-react-toggle:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(232, 93, 4, 0.35);
}
.shout-react-drop {
  position: absolute;
  bottom: calc(100% + 4px);
  right: 0;
  top: auto;
  z-index: 25;
  display: flex;
  gap: 0.2rem;
  padding: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(12, 10, 16, 0.97);
  box-shadow: 0 10px 24px rgba(0,0,0,0.45);
}
.shout-react-drop[hidden] { display: none !important; }
.shout-react-opt {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 8px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.shout-react-opt .twemoji {
  width: 22px !important;
  height: 22px !important;
  display: block;
}
.shout-react-opt:hover,
.shout-react-opt.is-mine { background: rgba(255,255,255,0.1); }
.shout-time { font-variant-numeric: tabular-nums; white-space: nowrap; }

.mention-suggest {
  position: absolute; left: 0; right: 0; bottom: calc(100% + 4px);
  z-index: 20;
  display: flex; flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(12, 10, 16, 0.96);
  box-shadow: 0 10px 28px rgba(0,0,0,0.4);
  max-height: 180px; overflow: auto;
}
.form-stack .mention-suggest, label .mention-suggest { position: relative; bottom: auto; margin-top: 0.25rem; }
.mention-opt {
  text-align: left; border: 0; background: transparent; color: var(--ink);
  padding: 0.45rem 0.7rem; cursor: pointer;
}
.mention-opt:hover, .mention-opt.is-active { background: rgba(242, 103, 10, 0.18); }

/* —— Tickets —— */
.ticket-row {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin-bottom: 0.65rem; color: inherit; transition: border-color 0.14s ease;
}
.ticket-row:hover { border-color: rgba(242, 103, 10, 0.35); }
.ticket-filters { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.ticket-filters .btn.is-active { border-color: var(--accent); color: var(--accent-2); }
.ticket-staff-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; }
.ticket-msg-head { display: flex; align-items: center; gap: 0.55rem; margin-bottom: 0.55rem; }
.ticket-msg.is-staff-note { border-color: rgba(74, 163, 255, 0.35); }
.tag-ticket-open { color: var(--ok); border-color: rgba(62, 207, 142, 0.45); }
.tag-ticket-pending { color: #e6b84d; border-color: rgba(230, 184, 77, 0.5); }
.tag-ticket-closed { color: var(--muted); border-color: var(--line); }
/* stats-pos-1785583597 */
