:root {
  --page: #f2f2f0;
  --paper: #ffffff;
  --ink: #303842;
  --muted: #667180;
  --black: #1d2027;
  --black-2: #272b34;
  --red: #d11111;
  --orange: #f06d22;
  --line: #d7d9dd;
  --row: #f7f7f7;
  --row-alt: #eeeeef;
  --soft: #fafafa;
  --blue: #2a4e75;
  --shadow: 0 18px 48px rgba(30, 36, 44, 0.14);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

:root[data-theme="dark"] {
  --page: #191c21;
  --paper: #23272e;
  --ink: #d9e0e8;
  --muted: #a8b2bf;
  --black: #111419;
  --black-2: #171b21;
  --line: #3b414b;
  --row: #262b33;
  --row-alt: #20252c;
  --soft: #1d2128;
  --blue: #b8d4ff;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
}

* { box-sizing: border-box; }

html {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 0%, rgba(0, 0, 0, 0.045), transparent 24%),
    linear-gradient(180deg, #fbfbfa 0, var(--page) 360px, #e9e9e7);
  overflow-x: hidden;
}

:root[data-theme="dark"] body {
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.05), transparent 24%),
    linear-gradient(180deg, #15181d 0, var(--page) 360px, #111419);
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button { cursor: pointer; }

button:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.app-modal {
  width: min(620px, calc(100vw - 28px));
  max-width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.28);
}

.app-modal::backdrop {
  background: rgba(0, 0, 0, 0.56);
  backdrop-filter: blur(2px);
}

.app-modal-box {
  margin: 0;
}

.app-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  background: var(--black);
  color: #fff;
  border-bottom: 1px solid var(--line);
}

.app-modal-head h2 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.2;
}

.app-modal-close {
  width: 34px;
  height: 34px;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1;
}

.app-modal-close:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
}

.app-modal-body {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: var(--paper);
}

.app-modal-copy {
  color: var(--ink);
  line-height: 1.55;
}

.app-modal-copy p {
  margin: 0;
}

.app-modal-field {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 800;
}

.app-modal-field em {
  color: var(--muted);
  font-style: normal;
  font-weight: 700;
}

.app-modal-field input,
.app-modal-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--ink);
  padding: 11px 12px;
  outline: 0;
}

.app-modal-field textarea {
  min-height: 92px;
  resize: vertical;
}

.app-modal-field input:focus,
.app-modal-field textarea:focus {
  border-color: var(--orange);
  box-shadow: inset 3px 0 0 var(--orange);
}

.app-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 18px 18px;
  border-top: 1px solid var(--line);
  background: var(--row);
}

.app-modal-actions .primary-action,
.app-modal-actions .secondary-action,
.app-modal-actions .danger-action {
  min-width: 104px;
  min-height: 40px;
}

.app-modal-actions .danger-action {
  border: 1px solid #a80f0f;
  background: var(--red);
  color: #fff;
  font-weight: 950;
}

.thread-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 12px 0;
  padding: 10px 0;
}

.thread-pagination a,
.thread-pagination span {
  min-width: 34px;
  min-height: 32px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--blue);
  font-weight: 950;
  text-decoration: none;
  padding: 0 10px;
}

.thread-pagination span {
  background: var(--black);
  border-color: var(--black);
  color: #fff;
}

:root[data-theme="dark"] .thread-pagination a {
  background: #20252c;
  border-color: #3b414b;
  color: #dce9ff;
}

:root[data-theme="dark"] .thread-pagination span {
  background: #0f1217;
  border-color: #586171;
}

:root[data-theme="dark"] .app-modal {
  background: #20252c;
  color: #eef5ff;
  border-color: #3b414b;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.68);
}

:root[data-theme="dark"] .app-modal-head {
  background: #111419;
  border-color: #3b414b;
}

:root[data-theme="dark"] .app-modal-body {
  background: #20252c;
}

:root[data-theme="dark"] .app-modal-copy,
:root[data-theme="dark"] .app-modal-field {
  color: #eef5ff;
}

:root[data-theme="dark"] .app-modal-field input,
:root[data-theme="dark"] .app-modal-field textarea {
  background: #161a21;
  color: #eef5ff;
  border-color: #3b414b;
}

:root[data-theme="dark"] .app-modal-actions {
  background: #181d24;
  border-color: #3b414b;
}

.rich-editor {
  position: relative;
  min-width: 0;
  border: 1px solid #c9cdd4;
  background: #fff;
}

.editor-toolbar {
  min-height: 38px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: #eef0f2;
  border-bottom: 1px solid #d7d9de;
}

.editor-toolbar button {
  min-height: 28px;
  border: 1px solid transparent;
  background: transparent;
  color: #303842;
  padding: 0 8px;
  font-weight: 900;
}

.editor-toolbar select,
.editor-toolbar input[type="color"] {
  min-height: 28px;
  border: 1px solid #d7d9de;
  background: #fff;
  color: #303842;
  font-weight: 850;
}

.editor-toolbar input[type="color"] {
  width: 36px;
  padding: 2px;
}

.editor-toolbar button:hover {
  background: #fff;
  border-color: #d7d9de;
}

.rich-editor textarea {
  width: 100%;
  min-height: 120px;
  border: 0;
  background: #fff;
  color: #26313c;
  padding: 14px 18px;
  resize: vertical;
}

.editor-surface {
  width: 100%;
  min-height: 120px;
  border: 0;
  background: #fff;
  color: #26313c;
  padding: 14px 18px;
  outline: 0;
  line-height: 1.65;
  overflow: auto;
}

.editor-surface:empty::before {
  content: attr(data-placeholder);
  color: #8a94a3;
  pointer-events: none;
}

.editor-surface p {
  margin: 0 0 12px;
}

.editor-surface .bbcode-img,
.editor-surface img {
  max-width: 100%;
  height: auto;
}

.editor-surface img.is-selected {
  outline: 1px solid #6f93c4;
}

.editor-resize-box {
  position: absolute;
  pointer-events: none;
  border: 1px solid #6f93c4;
  z-index: 5;
}

.editor-resize-box span {
  position: absolute;
  width: 11px;
  height: 11px;
  background: #fff;
  border: 1px solid #303842;
  pointer-events: auto;
}

.editor-resize-box [data-resize-handle="nw"] {
  left: -6px;
  top: -6px;
  cursor: nwse-resize;
}

.editor-resize-box [data-resize-handle="ne"] {
  right: -6px;
  top: -6px;
  cursor: nesw-resize;
}

.editor-resize-box [data-resize-handle="sw"] {
  left: -6px;
  bottom: -6px;
  cursor: nesw-resize;
}

.editor-resize-box [data-resize-handle="se"] {
  right: -6px;
  bottom: -6px;
  cursor: nwse-resize;
}

.rich-editor textarea::placeholder {
  color: #8a94a3;
}

.editor-preview {
  padding: 14px 18px;
  border-top: 1px solid #d7d9de;
  background: #fff;
  color: #26313c;
}

.attach-button {
  width: max-content;
  display: inline-grid !important;
  margin: 0 !important;
  min-height: 36px;
  place-items: center;
  border: 1px solid #6b7280;
  background: #fff;
  color: #26313c !important;
  padding: 0 12px;
  cursor: pointer;
  font-weight: 900 !important;
}

.editor-note {
  margin: 0 !important;
  color: #657183 !important;
  font-size: 12px !important;
}

.editor-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid #e2e4e8;
}

.editor-submit {
  min-height: 36px;
  width: auto !important;
  padding: 0 14px;
}

.editor-footer .editor-note {
  flex: 1 1 240px;
}

.comment-form .rich-editor textarea {
  min-height: 74px;
}

.reply-box .rich-editor textarea {
  min-height: 96px;
}

.upload-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #657183;
  font-size: 13px;
  font-weight: 700;
}

.upload-inline input[type="file"] {
  max-width: 100%;
  color: inherit;
  font-weight: 800;
}

.upload-inline input[type="file"]::file-selector-button {
  min-height: 30px;
  margin-right: 8px;
  border: 1px solid #c9cdd4;
  background: #fff;
  color: #11161d;
  padding: 0 10px;
  font-weight: 850;
}

[data-name-effect] {
  background-size: 300% 100% !important;
  will-change: background-position, filter, text-shadow;
}

[data-name-effect="hot-pink"] {
  text-shadow: 0 0 4px rgba(255,255,255,0.65), 0 0 10px rgba(255,20,147,0.9), 0 0 18px rgba(255,20,147,0.65);
}

[data-name-effect="prism"] {
  animation: name-prism-shift 12s linear infinite;
}

[data-name-effect="inferno"] {
  animation: name-inferno-burn 1.8s ease-in-out infinite alternate;
  text-shadow: 0 0 4px rgba(255,210,90,0.75), 0 0 12px rgba(255,76,0,0.82), 0 0 22px rgba(180,20,0,0.55);
}

[data-name-effect="aurora"] {
  animation: name-aurora-drift 7.5s ease-in-out infinite;
  text-shadow: 0 0 7px rgba(124,205,255,0.55);
}

[data-name-effect="chromatic"] {
  animation: name-chromatic-rainbow 5s linear infinite, name-chromatic-glow 2.3s ease-in-out infinite alternate;
  text-shadow: 0 0 5px rgba(255,255,255,0.8), 0 0 14px rgba(0,220,255,0.75), 0 0 24px rgba(255,0,180,0.55);
}

[data-name-effect="holographic"],
[data-name-effect="platinum"],
[data-name-effect="rose-gold"],
[data-name-effect="onyx"],
[data-name-effect="ice"],
[data-name-effect="amethyst"],
[data-name-effect="coral"] {
  animation: vip-name-flow 5.4s linear infinite, vip-name-glow 2.8s ease-in-out infinite alternate;
  text-shadow: 0 0 4px rgba(255,255,255,0.7), 0 0 10px var(--vip-glow, rgba(120,210,255,0.85)), 0 0 18px var(--vip-glow, rgba(120,210,255,0.45));
}

[data-name-effect="platinum"] { --vip-glow: rgba(210,230,255,0.95); }
[data-name-effect="rose-gold"] { --vip-glow: rgba(255,135,160,0.95); }
[data-name-effect="onyx"] { --vip-glow: rgba(125,135,155,0.9); }
[data-name-effect="ice"] { --vip-glow: rgba(80,245,255,0.95); }
[data-name-effect="amethyst"] { --vip-glow: rgba(205,105,255,0.95); }
[data-name-effect="coral"] { --vip-glow: rgba(255,110,100,0.95); }

@keyframes vip-name-flow {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

@keyframes vip-name-glow {
  from { filter: saturate(1); }
  to { filter: saturate(1.35) brightness(1.1); }
}

@keyframes name-prism-shift {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

@keyframes name-inferno-burn {
  0% { background-position: 0% 50%; filter: brightness(1) saturate(1.05); }
  45% { background-position: 120% 50%; filter: brightness(1.12) saturate(1.28); }
  100% { background-position: 260% 50%; filter: brightness(1.02) saturate(1.18); }
}

@keyframes name-aurora-drift {
  0%, 100% { background-position: 0% 50%; filter: hue-rotate(0deg); }
  50% { background-position: 220% 50%; filter: hue-rotate(18deg) brightness(1.08); }
}

@keyframes name-chromatic-rainbow {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

@keyframes name-chromatic-glow {
  from { filter: saturate(1.1) brightness(1); }
  to { filter: saturate(1.45) brightness(1.15); }
}

a {
  color: inherit;
}

.site-shell {
  width: min(1180px, calc(100% - 34px));
  margin: 20px auto 40px;
  background: var(--paper);
  box-shadow: var(--shadow);
  overflow-x: clip;
}

.masthead {
  min-height: 144px;
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.72)),
    repeating-radial-gradient(circle at 10% 20%, #d9d5cb 0 1px, transparent 1px 4px),
    #e7e2d8;
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  text-decoration: none;
  font-size: clamp(48px, 6vw, 70px);
  line-height: 0.95;
  letter-spacing: 0;
  font-weight: 950;
}

.wordmark-black { color: #050505; }
.wordmark-red { color: var(--red); }

.mast-actions {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.mast-btn {
  min-width: 106px;
  height: 92px;
  border: 0;
  border-bottom: 3px solid var(--orange);
  background: rgba(255, 255, 255, 0.78);
  color: #333;
  text-transform: uppercase;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
}

.mast-link {
  text-decoration: none;
}

.mast-btn:hover,
.mast-btn:focus-visible {
  background: #fff;
  outline: none;
}

.mast-btn.compact {
  min-width: 92px;
}

.account-card {
  min-width: 150px;
  height: 92px;
  display: grid;
  align-content: center;
  padding: 0 18px;
  border-bottom: 3px solid var(--orange);
  background: rgba(255, 255, 255, 0.78);
}

.account-card strong,
.account-card span {
  display: block;
}

.account-card strong {
  color: #1f252d;
  font-size: 15px;
  font-weight: 950;
}

.account-card a {
  text-decoration: none;
}

.account-card span {
  margin-top: 3px;
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.account-chip,
.top-icon,
.account-link {
  min-height: 52px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-bottom: 3px solid var(--orange);
  background: rgba(255, 255, 255, 0.78);
  color: #20242b;
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.account-chip {
  grid-template-columns: auto auto;
  gap: 8px;
  min-width: 0;
  max-width: 180px;
  padding: 0 12px;
  overflow: hidden;
}

.account-chip span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chip-avatar {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: #242831;
  color: #fff;
  font-size: 13px;
  font-weight: 950;
  border-bottom: 2px solid var(--orange);
  overflow: hidden;
}

.top-icon {
  position: relative;
  width: 48px;
  font-size: 22px;
  line-height: 1;
}

.top-icon b {
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border-radius: 2px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  line-height: 1;
}

.account-link {
  min-width: 74px;
  padding: 0 12px;
  text-transform: uppercase;
  line-height: 1;
}

button.account-link {
  cursor: pointer;
}

.nav-bar {
  width: 100%;
  min-height: 50px;
  display: flex;
  align-items: stretch;
  background: var(--black);
  overflow-x: auto;
  overflow-y: hidden;
}

.nav-bar a {
  display: grid;
  place-items: center;
  min-width: max-content;
  padding: 0 18px;
  color: #fff;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 14px;
  font-weight: 900;
  border-bottom: 3px solid transparent;
}

.nav-bar a:hover,
.nav-bar a.active {
  border-bottom-color: var(--orange);
  background: #16191f;
}

main {
  min-height: 560px;
  padding: 22px 0 30px;
  outline: 0;
}

.utility-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 18px 18px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 750;
}

.utility-row a,
.breadcrumb a,
.forum-copy a,
.thread-copy a,
.last-post a {
  text-decoration: none;
}

.utility-row a:hover,
.breadcrumb a:hover,
.forum-copy a:hover,
.thread-copy a:hover,
.last-post a:hover,
.member-name:hover {
  text-decoration: underline;
}

.member-name {
  color: var(--blue);
  font-weight: 900;
  text-decoration: none;
}

.search {
  margin-left: auto;
  width: min(320px, 45vw);
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid var(--line);
  background: #fff;
  color: #79818c;
}

.search input,
.wide-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 14px;
}

.forum-card,
.thread-list {
  margin: 0 0 28px;
  border-top: 1px solid var(--black);
}

.thread-list-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px 90px 300px;
  align-items: center;
  min-height: 48px;
  padding: 0 18px;
  background: var(--black);
  color: #fff;
}

.forum-table-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 28px 90px 90px 300px;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px;
  background: var(--black);
  color: #fff;
}

.forum-table-head h1 {
  grid-column: 1 / 4;
}

.forum-table-head h1,
.thread-list-head h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1;
}

.forum-table-head span,
.thread-list-head span {
  font-size: 14px;
  font-weight: 800;
}

.forum-row,
.thread-row {
  display: grid;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 10px 18px;
  background: var(--row);
  border-bottom: 1px solid var(--line);
}

.forum-row {
  grid-template-columns: 42px minmax(0, 1fr) 28px 90px 90px 300px;
}

.thread-row {
  grid-template-columns: 42px minmax(0, 1fr) 90px 90px 300px;
}

.forum-row:nth-child(even),
.thread-row:nth-child(even) {
  background: var(--row-alt);
}

.forum-row:hover,
.thread-row:hover {
  background: #fff;
}

.forum-status {
  width: 18px;
  height: 18px;
  background: #34383f;
  margin-left: 5px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.forum-status.locked::after {
  content: "";
  display: block;
  width: 8px;
  height: 5px;
  margin: 6px auto 0;
  border: 2px solid #fff;
  border-top: 0;
}

.forum-copy,
.thread-copy,
.last-post {
  min-width: 0;
}

.forum-copy a,
.thread-copy a,
.last-post a {
  display: block;
  max-width: 100%;
  color: #3b3f47;
  text-align: left;
  font-weight: 900;
  font-size: 16px;
  overflow-wrap: anywhere;
}

.last-post a {
  color: var(--blue);
  font-size: 14px;
}

.last-post .last-post-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  color: var(--blue);
  line-height: 1.25;
}

.last-post .last-post-title > span:last-child {
  min-width: 0;
  overflow-wrap: break-word;
}

.last-post-meta,
.last-post-date {
  margin-top: 2px !important;
}

.last-post-meta .member-name {
  display: inline;
  font-size: inherit;
}

.forum-copy p,
.thread-copy p,
.last-post p,
.online-block p,
.subforum-title p,
.thread-hero p,
.info-panel p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.subforums {
  color: #454d58;
  font-size: 13px;
}

.rss {
  width: 18px;
  height: 18px;
  overflow: hidden;
  border: 0;
  border-radius: 3px;
  background: var(--orange);
  color: transparent;
  position: relative;
}

.rss::before,
.rss::after {
  content: "";
  position: absolute;
  border: 2px solid #fff;
  border-top-color: transparent;
  border-left-color: transparent;
  border-radius: 50%;
}

.rss::before {
  width: 10px;
  height: 10px;
  right: 3px;
  bottom: 3px;
}

.rss::after {
  width: 4px;
  height: 4px;
  left: 3px;
  bottom: 3px;
  background: #fff;
}

.count {
  color: #4e5968;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  border-left: 1px solid #fff;
}

.last-post {
  padding-left: 10px;
  border-left: 1px solid #fff;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 18px 18px;
  color: #526071;
  font-size: 14px;
}

.subforum-title,
.thread-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 0 18px 20px;
}

.subforum-title h1,
.thread-hero h1,
.info-panel h1 {
  margin: 0;
  color: #343b46;
  font-size: clamp(24px, 3.2vw, 36px);
  line-height: 1.1;
  letter-spacing: 0;
}

.primary-action,
.secondary-action,
.dialog-submit {
  min-height: 38px;
  border: 0;
  padding: 0 16px;
  display: inline-grid;
  place-items: center;
  background: var(--black);
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 900;
}

.secondary-action {
  background: #eef0f2;
  color: #303842;
  border: 1px solid #d5d9de;
}

.danger-action {
  min-height: 38px;
  border: 0;
  padding: 0 16px;
  background: var(--red);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.thread-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.thread-move-form {
  display: flex;
  align-items: stretch;
  gap: 6px;
}

.thread-move-form label {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 8px;
  border: 1px solid #d5d9de;
  background: #fff;
  color: #526071;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.thread-move-form select {
  height: 28px;
  border: 1px solid #cbd0d7;
  background: #fff;
  color: #303842;
  font: inherit;
  font-size: 12px;
  text-transform: none;
}

.pin {
  display: inline-block;
  margin-right: 8px;
  padding: 2px 6px;
  background: #eef0f2;
  color: #4c5664;
  border: 1px solid #d4d7dc;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  vertical-align: middle;
}

.thread-prefix {
  display: inline-grid;
  place-items: center;
  min-height: 22px;
  flex: 0 0 auto;
  margin-right: 6px;
  padding: 2px 7px;
  font-size: 12px;
  font-weight: 950;
  vertical-align: middle;
  line-height: 1;
  white-space: nowrap;
}

.thread-hero h1 .thread-prefix {
  min-height: 30px;
  padding: 4px 10px;
  margin-right: 12px;
  font-size: 18px;
  transform: translateY(-2px);
}

.mention-menu {
  position: absolute;
  z-index: 10000;
  width: min(310px, calc(100vw - 20px));
  display: none;
  padding: 6px;
  border: 1px solid #d7d9de;
  background: #fff;
  box-shadow: 0 12px 30px rgba(30, 36, 44, 0.16);
}

.mention-menu.open {
  display: grid;
  gap: 3px;
}

.mention-menu button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 40px;
  border: 0;
  padding: 6px 8px;
  background: transparent;
  color: #26313c;
  text-align: left;
  font-weight: 850;
}

.mention-menu button.active,
.mention-menu button:hover {
  background: #eef0f2;
}

.mention-menu span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xf-thread {
  display: grid;
  gap: 16px;
  padding: 0 18px 18px;
}

.xf-post {
  display: grid;
  grid-template-columns: 184px minmax(0, 1fr);
  border: 1px solid #d6d9de;
  background: #fff;
  box-shadow: 0 10px 28px rgba(30, 36, 44, 0.08);
}

.post-author {
  padding: 18px;
  background: linear-gradient(180deg, #f6f7f8, #edf0f3);
  border-right: 1px solid #d6d9de;
}

.avatar {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  background: #242831;
  color: #fff;
  font-size: 26px;
  font-weight: 950;
  border-bottom: 3px solid var(--orange);
  overflow: hidden;
}

.chip-avatar img,
.avatar img,
.profile-avatar img,
.mini-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.post-author strong,
.post-author span {
  display: block;
}

.post-author strong {
  font-size: 16px;
  color: #1f252d;
}

.post-author span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.admin-avatar {
  background: #11141a;
  color: #fff;
  border-bottom-color: var(--red);
}

.rank-admin {
  color: var(--red) !important;
  font-weight: 950;
  text-transform: uppercase;
}

.staff-badge {
  width: max-content;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px !important;
  padding: 0 8px;
  background: var(--red);
  color: #fff !important;
  font-size: 11px !important;
  font-weight: 950;
  text-transform: uppercase;
  line-height: 1;
  text-align: center;
}

.post-content {
  min-width: 0;
  max-width: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
}

.post-content header,
.post-content footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 0 18px;
  background: #fafafa;
  border-bottom: 1px solid #e2e4e8;
  color: #657183;
  font-size: 13px;
}

.post-content footer {
  justify-content: flex-start;
  border-top: 1px solid #e2e4e8;
  border-bottom: 0;
}

.post-content footer button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 800;
}

.reaction-control {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.reaction-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.reaction-trigger.has-reacted {
  color: var(--red);
}

.reaction-picker {
  position: absolute;
  left: -8px;
  bottom: calc(100% + 8px);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 44px;
  padding: 5px 7px;
  border: 1px solid #cbd0d7;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(30, 36, 44, 0.22);
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity .14s ease, transform .14s ease;
}

.reaction-control:hover .reaction-picker,
.reaction-control:focus-within .reaction-picker {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.reaction-picker button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #1f252d;
  font-size: 23px;
  line-height: 1;
}

.reaction-picker button:hover,
.reaction-picker button:focus-visible {
  background: #eef3ff;
  transform: translateY(-2px) scale(1.08);
}

.reaction-picker button span {
  display: block;
  line-height: 1;
}

.reaction-picker button span {
  white-space: nowrap;
}

img.reaction-icon {
  width: 28px;
  height: 28px;
  display: block;
  object-fit: contain;
}

img.reaction-trigger-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  object-fit: contain;
  vertical-align: -4px;
  margin-right: 4px;
}

img.reaction-line-icon {
  width: 16px;
  height: 16px;
  display: inline-block;
  object-fit: contain;
  vertical-align: -3px;
  margin-right: 3px;
}

img.reaction-based {
  width: 42px;
  height: auto;
  border-radius: 0;
}

img.reaction-trigger-icon.reaction-based,
img.reaction-line-icon.reaction-based {
  width: 34px;
  height: auto;
  vertical-align: -2px;
}

.reaction-picker button[title="Based"] {
  width: auto;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 11px;
  color: #f05b18;
}

.reaction-control.is-disabled .reaction-picker {
  display: none;
}

.post-body {
  padding: 22px 20px;
  color: #27313d;
  font-size: 16px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.post-body p {
  margin: 0 0 14px;
}

.post-body p:last-child {
  margin-bottom: 0;
}

.post-header-tools {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.post-tool-button {
  border: 0;
  background: transparent;
  color: #526071;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 2px;
}

.post-tool-button:hover,
.post-tool-button:focus-visible {
  color: var(--blue);
}

.bbcode-quote {
  margin: 0 0 14px;
  padding: 0 0 0 14px;
  border-left: 3px solid #737985;
  background: #eef0f2;
  color: #3d4652;
}

.bbcode-quote cite {
  display: block;
  padding: 10px 12px 4px;
  color: #657183;
  font-style: normal;
  font-weight: 850;
}

.bbcode-quote div {
  padding: 8px 12px 12px;
}

.bbcode-spoiler {
  margin: 0 0 14px;
  border: 1px solid #cbd0d7;
  background: #f1f2f4;
}

.bbcode-spoiler summary {
  cursor: pointer;
  padding: 9px 12px;
  background: #20242b;
  color: #fff;
  font-weight: 900;
}

.bbcode-spoiler div {
  padding: 12px;
  color: #26313c;
}

.bbcode-code {
  margin: 0 0 14px;
  padding: 12px;
  overflow-x: auto;
  border: 1px solid #2d333c;
  background: #161a20;
  color: #cbd7e2;
}

.bbcode-code code {
  font-family: Consolas, Monaco, monospace;
}

.bbcode-img {
  max-width: 100%;
  height: auto;
  display: inline-block;
  margin: 8px 0;
  border: 1px solid #cbd0d7;
}

:root[data-theme="dark"] .site-shell,
:root[data-theme="dark"] .forum-row,
:root[data-theme="dark"] .thread-row,
:root[data-theme="dark"] .reply-box,
:root[data-theme="dark"] .info-panel,
:root[data-theme="dark"] .admin-panel,
:root[data-theme="dark"] .profile-post,
:root[data-theme="dark"] .profile-side,
:root[data-theme="dark"] .profile-hero,
:root[data-theme="dark"] .account-details,
:root[data-theme="dark"] .settings-card,
:root[data-theme="dark"] .security-card,
:root[data-theme="dark"] .alerts-panel,
:root[data-theme="dark"] .pm-sidebar,
:root[data-theme="dark"] .pm-thread,
:root[data-theme="dark"] .vip-benefits,
:root[data-theme="dark"] .auth-dialog,
:root[data-theme="dark"] .topic-dialog {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--line);
}

:root[data-theme="dark"] .masthead {
  background:
    linear-gradient(rgba(35, 39, 46, 0.86), rgba(35, 39, 46, 0.86)),
    repeating-radial-gradient(circle at 10% 20%, #3a3f48 0 1px, transparent 1px 4px),
    #242830;
}

:root[data-theme="dark"] .forum-row:nth-child(even),
:root[data-theme="dark"] .thread-row:nth-child(even),
:root[data-theme="dark"] .profile-comments,
:root[data-theme="dark"] .editor-toolbar,
:root[data-theme="dark"] .settings-label,
:root[data-theme="dark"] .account-menu,
:root[data-theme="dark"] .pm-message {
  background: var(--row-alt);
}

:root[data-theme="dark"] .forum-row:hover,
:root[data-theme="dark"] .thread-row:hover,
:root[data-theme="dark"] .editor-preview,
:root[data-theme="dark"] .rich-editor,
:root[data-theme="dark"] .rich-editor textarea,
:root[data-theme="dark"] .topic-form input,
:root[data-theme="dark"] .topic-form textarea,
:root[data-theme="dark"] .auth-dialog input,
:root[data-theme="dark"] .auth-dialog textarea,
:root[data-theme="dark"] .account-details input,
:root[data-theme="dark"] .account-details select,
:root[data-theme="dark"] .account-details textarea,
:root[data-theme="dark"] .side-input,
:root[data-theme="dark"] .mention-menu {
  background: var(--soft);
  color: var(--ink);
  border-color: var(--line);
}

:root[data-theme="dark"] .bbcode-quote {
  background: #2b3139;
  color: #d7dee8;
  border-left-color: #788394;
}

:root[data-theme="dark"] .bbcode-quote cite,
:root[data-theme="dark"] .profile-post-body > p,
:root[data-theme="dark"] .last-post-date,
:root[data-theme="dark"] .last-post-meta,
:root[data-theme="dark"] .editor-note {
  color: var(--muted) !important;
}

:root[data-theme="dark"] .bbcode-spoiler {
  background: #252a31;
  border-color: var(--line);
}

:root[data-theme="dark"] .bbcode-spoiler div,
:root[data-theme="dark"] .profile-bbcode,
:root[data-theme="dark"] .post-body {
  color: var(--ink);
}

:root[data-theme="dark"] .reaction-tabs,
:root[data-theme="dark"] .purchased-upgrades h2,
:root[data-theme="dark"] .bookmark-labels span {
  background: var(--row-alt);
  border-color: var(--line);
  color: var(--ink);
}

:root[data-theme="dark"] .bookmark-row,
:root[data-theme="dark"] .received-reaction-row,
:root[data-theme="dark"] .purchased-upgrades {
  background: var(--paper);
  border-color: var(--line);
}

:root[data-theme="dark"] .bookmark-row button {
  background: var(--soft);
  color: var(--ink);
  border-color: var(--line);
}

:root[data-theme="dark"] .purchased-upgrades p,
:root[data-theme="dark"] .bookmark-copy small,
:root[data-theme="dark"] .received-reaction-row small {
  color: var(--muted);
}

:root[data-theme="dark"] .mention-menu button {
  color: var(--ink);
}

:root[data-theme="dark"] .mention-menu button.active,
:root[data-theme="dark"] .mention-menu button:hover {
  background: #303640;
}

.rich-editor .bbcode-img {
  border-color: #4c535e;
}

.profile-bbcode {
  margin-bottom: 10px;
  color: #26313c;
  font-size: 16px;
  line-height: 1.45;
}

.reaction-line {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid #e2e4e8;
  color: var(--blue);
  font-size: 13px;
  font-weight: 850;
}

.reaction-line-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-right: 6px;
}

.reply-box,
.info-panel,
.admin-panel {
  margin: 0 18px;
  padding: 18px;
  border: 1px solid #d7d9de;
  background: #fbfbfb;
}

.rules-doc {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.rules-doc section {
  border: 1px solid #d7d9de;
  background: #fff;
}

.rules-doc h2 {
  margin: 0;
  padding: 12px 14px;
  border-bottom: 1px solid #d7d9de;
  background: #f0f1f2;
  color: #1f252d;
  font-size: 18px;
}

.rules-doc p,
.rules-doc ul,
.rules-doc dl {
  margin: 0;
  padding: 12px 14px;
  color: #36404c;
  line-height: 1.55;
}

.rules-doc ul {
  padding-left: 34px;
}

.rules-doc li + li {
  margin-top: 8px;
}

.rules-doc dt {
  margin-top: 10px;
  color: #1f252d;
  font-weight: 950;
}

.rules-doc dt:first-child {
  margin-top: 0;
}

.rules-doc dd {
  margin: 4px 0 0;
  color: #526071;
}

.rules-doc .rules-note {
  color: #6a7482;
  font-weight: 850;
}

.rules-table {
  width: calc(100% - 28px);
  margin: 12px 14px;
  border-collapse: collapse;
  background: #fff;
  font-size: 14px;
}

.rules-table th,
.rules-table td {
  border: 1px solid #d7d9de;
  padding: 9px 10px;
  text-align: left;
  vertical-align: top;
}

.rules-table th {
  background: #1c2028;
  color: #fff;
  font-weight: 950;
}

.rules-table td:first-child {
  font-weight: 850;
}

.reply-box h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.admin-panel h1,
.admin-panel h2 {
  margin: 0;
}

.admin-panel > p {
  margin: 8px 0 18px;
  color: var(--muted);
}

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

.admin-users-section {
  grid-column: 1 / -1;
}

.admin-grid section {
  min-width: 0;
}

.admin-grid h2 {
  padding: 12px 14px;
  background: var(--black);
  color: #fff;
  font-size: 15px;
}

.admin-table {
  border: 1px solid var(--line);
  border-top: 0;
}

.admin-table article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  background: #fff;
  border-top: 1px solid var(--line);
}

.admin-table article.admin-user-row {
  grid-template-columns: minmax(260px, 1fr);
  align-items: start;
}

.admin-user-main {
  min-width: 0;
}

.admin-table article:nth-child(even) {
  background: #f3f4f5;
}

.admin-table strong {
  color: #25303b;
}

.admin-table p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: break-word;
}

.admin-grid section:not(.admin-users-section) .admin-table article {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 6px;
}

.admin-user-row .admin-actions {
  display: grid;
  grid-template-columns: 76px 62px 90px 110px 78px 78px minmax(260px, 1fr);
  align-items: end;
  gap: 8px;
  width: 100%;
}

.admin-actions button {
  min-height: 30px;
  border: 1px solid #cdd1d6;
  background: #fff;
  color: #26313c;
  font-size: 12px;
  font-weight: 850;
}

.admin-user-row .admin-actions button {
  width: 100%;
}

.admin-actions label {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.admin-actions select {
  min-height: 30px;
  border: 1px solid #cdd1d6;
  background: #fff;
  color: #26313c;
  font-size: 12px;
  font-weight: 800;
}

.admin-user-row .admin-actions select {
  width: 100%;
}

.admin-actions input {
  width: 76px;
  min-height: 30px;
  border: 1px solid #cdd1d6;
  padding: 0 8px;
}

.admin-user-row .admin-actions input {
  width: 100%;
}

.admin-identity-form {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) 112px;
  gap: 8px;
  align-items: end;
}

.admin-danger-zone {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.admin-danger-zone .danger-action {
  max-width: 160px;
}

.badge-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(110px, 1fr));
  gap: 8px 12px;
  font-size: 11px;
}

.badge-picker label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 30px;
  white-space: nowrap;
}

.badge-picker input {
  width: 22px;
  height: 22px;
  min-height: 22px;
  padding: 0;
}

.quick-user-tool {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) 140px 100px 100px auto;
  gap: 8px;
  margin: 0 0 18px;
}

.admin-search-tool {
  grid-template-columns: minmax(220px, 1fr) auto;
}

.quick-user-tool input,
.quick-user-tool select {
  min-height: 38px;
  border: 1px solid #cdd1d6;
  padding: 0 10px;
}

.members-layout,
.profile-layout,
.account-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 18px;
  padding: 0 18px;
}

.members-main,
.profile-main,
.profile-side,
.account-menu,
.account-details {
  min-width: 0;
}

.members-main h1,
.profile-side h2,
.account-details h1 {
  margin: 0 0 14px;
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
}

.member-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  background: #fff;
  text-decoration: none;
}

.member-card strong,
.member-card span {
  display: block;
}

.member-card span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.profile-side {
  align-self: start;
  padding: 14px;
  border: 1px solid #d7d9de;
  background: #fbfbfb;
}

.profile-side h2 {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
}

.side-input {
  width: 100%;
  height: 38px;
  margin-bottom: 16px;
  border: 1px solid #c9cdd4;
  padding: 0 10px;
}

.color-rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 900;
}

.profile-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  min-height: 170px;
  padding: 18px;
  border: 1px solid #d7d9de;
  background:
    linear-gradient(90deg, rgba(29,32,39,0.88), rgba(29,32,39,0.54)),
    repeating-radial-gradient(circle at 20% 10%, rgba(255,255,255,0.18) 0 1px, transparent 1px 5px),
    #3b414b;
  color: #fff;
}

.profile-avatar,
.mini-avatar {
  display: grid;
  place-items: center;
  background: #242831;
  color: #fff;
  font-weight: 950;
  border-bottom: 3px solid var(--orange);
  overflow: hidden;
}

.profile-avatar {
  width: 58px;
  height: 58px;
  font-size: 26px;
}

.profile-avatar.large {
  width: 126px;
  height: 126px;
  font-size: 54px;
}

.mini-avatar {
  width: 42px;
  height: 42px;
  font-size: 18px;
}

.mini-avatar.tiny {
  width: 28px;
  height: 28px;
  font-size: 12px;
  border-bottom-width: 2px;
}

.profile-comment-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.profile-name-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

.profile-identity h1 {
  margin: 0 0 6px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1;
}

.profile-name-line > span {
  color: rgba(255,255,255,0.72);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.profile-identity p {
  margin: 5px 0;
  color: rgba(255,255,255,0.9);
}

.mention-link {
  color: #1e5c9a;
  font-weight: 900;
  text-decoration: none;
  border-bottom: 1px solid rgba(30,92,154,0.35);
}

.mention-link:hover {
  color: var(--red);
  border-bottom-color: var(--red);
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 8px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.24);
  color: #fff;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  line-height: 1;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.role-badge.admin {
  background: var(--red);
  border-color: var(--red);
}

.badge-row.small {
  margin-top: 8px;
}

.badge-row.small .role-badge {
  background: #eef0f2;
  border-color: #d4d7dc;
  color: #303842;
}

.role-badge.badge-reputable,
.badge-row.small .role-badge.badge-reputable {
  background: #f0c400;
  border-color: #d8af00;
  color: #fff;
}

.role-badge.badge-established,
.badge-row.small .role-badge.badge-established {
  background: #2f80ff;
  border-color: #246ee2;
  color: #fff;
}

.role-badge.badge-vip,
.badge-row.small .role-badge.badge-vip {
  background: #66bfff;
  border-color: #44a8ef;
  color: #fff;
}

.profile-actions {
  display: flex;
  gap: 8px;
  align-self: start;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid #d7d9de;
  border-top: 0;
  background: #fff;
}

.profile-stats div {
  padding: 14px;
  border-left: 1px solid var(--line);
}

.profile-stats div:first-child {
  border-left: 0;
}

.profile-stats span,
.profile-stats strong {
  display: block;
}

.profile-stats span {
  color: var(--muted);
  font-size: 12px;
}

.profile-stats strong {
  margin-top: 4px;
  font-size: 20px;
}

.profile-tabs {
  display: flex;
  gap: 18px;
  padding: 0 14px;
  border: 1px solid #d7d9de;
  border-top: 0;
  background: #f4f5f6;
}

.profile-tabs a {
  padding: 13px 0 10px;
  color: #526071;
  text-decoration: none;
  border-bottom: 3px solid transparent;
}

.profile-tabs a.active {
  color: #1f252d;
  border-bottom-color: var(--orange);
  font-weight: 900;
}

.profile-feed {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.profile-status,
.profile-post {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid #d7d9de;
  background: #fff;
}

.profile-status input,
.comment-form input,
.account-details input {
  width: 100%;
  min-height: 38px;
  border: 1px solid #c9cdd4;
  padding: 0 10px;
}

.profile-status {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
}

.profile-status .rich-editor,
.comment-form .rich-editor {
  width: 100%;
}

.comment-form:has(.rich-editor) {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.profile-status:has(.rich-editor) {
  grid-template-columns: auto minmax(0, 1fr);
}

.profile-status:has(.rich-editor) .primary-action {
  grid-column: 2;
  width: max-content;
}

.profile-status .rich-editor textarea,
.comment-form .rich-editor textarea {
  min-height: 90px;
}

.profile-post-body > p {
  margin: 0 0 8px;
  color: var(--muted);
}

.profile-post-body > strong,
.profile-bbcode {
  display: block;
  margin-bottom: 10px;
  color: #26313c;
  font-size: 16px;
  line-height: 1.45;
}

.post-tools {
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
}

.post-tools button,
.comment-form button,
.account-menu button {
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 850;
}

.profile-comments {
  display: grid;
  gap: 8px;
  margin: 10px 0;
  padding: 10px;
  background: #f3f4f5;
  border: 1px solid #e0e2e5;
}

.profile-comments p {
  margin: 0 0 3px;
  color: var(--muted);
}

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

.account-layout {
  grid-template-columns: 240px minmax(0, 1fr);
}

.account-menu {
  display: grid;
  align-content: start;
  border: 1px solid #d7d9de;
  background: #f5f6f7;
}

.account-menu a,
.account-menu button {
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid #d7d9de;
  background: transparent;
  color: #26313c;
  text-align: left;
  text-decoration: none;
  font-weight: 850;
}

.account-menu .active {
  background: #fff;
  border-left: 3px solid var(--orange);
}

.account-details {
  padding: 18px;
  border: 1px solid #d7d9de;
  background: #fbfbfb;
}

.account-details label,
.account-details fieldset {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
  color: #526071;
  font-weight: 850;
}

.account-details fieldset {
  border: 0;
  padding: 0;
}

.account-details fieldset label {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  margin: 0;
}

.account-menu strong {
  padding: 12px 14px;
  background: var(--black);
  color: #fff;
  font-size: 13px;
}

.account-note {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.45;
}

.following-list {
  display: grid;
  gap: 10px;
}

.following-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d7d9de;
  background: #fff;
  text-decoration: none;
}

.following-card span,
.following-card strong,
.following-card small {
  min-width: 0;
  display: block;
}

.following-card strong,
.following-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.following-card small {
  margin-top: 3px;
  color: var(--muted);
}

.settings-panel {
  padding: 0;
  overflow: hidden;
}

.settings-panel h1 {
  padding: 18px 18px 0;
}

.settings-card {
  border-top: 1px solid #d7d9de;
  background: #fff;
}

.settings-card h2 {
  margin: 0;
  padding: 16px 18px;
  border-bottom: 1px solid #d7d9de;
  color: #647083;
  font-size: 16px;
}

.settings-row {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  border-bottom: 1px solid #d7d9de;
}

.settings-label {
  color: #526071;
  font-size: 16px;
  font-weight: 850;
  text-align: right;
}

.settings-stack {
  display: grid;
  gap: 12px;
}

.settings-stack select,
.select-setting select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #c9cdd4;
  background: #fff;
  color: #26313c;
  padding: 0 12px;
  font: inherit;
}

.check-setting,
.notification-setting,
.select-setting {
  margin: 0;
  color: #26313c;
}

.account-details .check-setting,
.account-details .notification-setting,
.account-details .select-setting {
  margin: 0;
}

.check-setting {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  font-weight: 500;
}

.check-setting.indent {
  margin-left: 28px;
  color: #6a7482;
}

.check-setting input,
.notification-setting input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
}

.check-setting strong {
  display: block;
  font-size: 16px;
}

.check-setting small {
  display: block;
  margin-top: 4px;
  color: #526071;
  font-size: 13px;
  line-height: 1.4;
}

.settings-copy {
  margin: 0;
  color: #3f4b59;
  line-height: 1.55;
}

.settings-grid {
  display: grid;
  gap: 14px;
}

.select-setting {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 290px);
  align-items: center;
  gap: 16px;
}

.select-setting span,
.notification-setting > span {
  color: #526071;
  font-size: 16px;
  font-weight: 850;
}

.notification-setting {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 18px;
  padding: 14px 18px;
  border-bottom: 1px solid #d7d9de;
  align-items: center;
}

.notification-setting > span {
  text-align: right;
}

.notification-setting strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
}

.settings-save {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: #eef0f2;
  border-top: 1px solid #d7d9de;
}

.settings-save .primary-action {
  min-width: 150px;
}

.upgrades-panel {
  padding: 0;
  overflow: hidden;
}

.upgrades-panel h1 {
  padding: 18px 18px 12px;
  border-bottom: 1px solid #d7d9de;
}

.upgrade-list {
  display: grid;
}

.upgrade-row {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  border-bottom: 1px solid #d7d9de;
  background: #fff;
}

.upgrade-summary {
  text-align: right;
}

.upgrade-summary h2 {
  margin: 0 0 4px;
  color: #1f252d;
  font-size: 18px;
}

.upgrade-summary p {
  margin: 0;
  color: #657183;
}

.upgrade-body {
  display: grid;
  gap: 10px;
  justify-items: start;
}

.purchase-button {
  min-height: 36px;
  border: 0;
  background: #000;
  color: #fff;
  padding: 0 14px;
  font-weight: 950;
}

.purchase-button:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.upgrade-body .purchase-button[disabled] {
  display: none;
}

.purchase-button span {
  margin-right: 6px;
}

.payment-result {
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #d7d9de;
  background: #f7f8f9;
  color: #26313c;
  line-height: 1.45;
}

.payment-result code {
  overflow-wrap: anywhere;
}

.vip-benefits {
  width: 100%;
  border: 1px solid #d7d9de;
  background: #fff;
}

.vip-benefits h3 {
  margin: 0;
  padding: 12px 14px;
  border-bottom: 1px solid #d7d9de;
  font-size: 20px;
}

.vip-benefits ul {
  margin: 0;
  padding: 12px 20px 14px 34px;
  font-weight: 850;
  line-height: 1.45;
}

.manual-payment-box {
  margin-bottom: 18px;
  border: 1px solid #d7d9de;
  background: #fff;
}

.manual-payment-box h2 {
  margin: 0;
  padding: 12px 14px;
  border-bottom: 1px solid #d7d9de;
  font-size: 18px;
}

.manual-payment-box p {
  margin: 0;
  padding: 12px 14px;
  color: var(--muted);
  line-height: 1.45;
}

.wallet-address {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px 14px;
}

.wallet-address code {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 10px;
  background: #f4f5f6;
  border: 1px solid #d7d9de;
  color: #20242b;
}

.wallet-address button {
  min-height: 38px;
  border: 0;
  background: #111;
  color: #fff;
  padding: 0 14px;
  font-weight: 900;
}

.upgrade-note {
  margin: 0;
  padding: 14px 18px;
  background: #eef0f2;
}

.purchased-upgrades {
  margin: 18px;
  border: 1px solid #d7d9de;
  background: #fff;
}

.purchased-upgrades h2 {
  margin: 0;
  padding: 12px 14px;
  border-bottom: 1px solid #d7d9de;
  background: #f0f1f2;
  font-size: 18px;
}

.purchased-upgrades p {
  margin: 0;
  padding: 14px;
  color: #526071;
}

.bookmark-list,
.received-reaction-list {
  display: grid;
}

.bookmark-row,
.received-reaction-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 16px;
  border-top: 1px solid #d7d9de;
}

.received-reaction-row {
  grid-template-columns: 58px minmax(0, 1fr);
}

.bookmark-row:first-child,
.received-reaction-row:first-child {
  border-top: 0;
}

.bookmark-copy a,
.received-reaction-row a {
  color: var(--blue);
  font-weight: 900;
}

.bookmark-copy p,
.received-reaction-row p {
  margin: 0 0 6px;
  line-height: 1.5;
}

.bookmark-copy small,
.received-reaction-row small {
  color: #657183;
}

.bookmark-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.bookmark-labels span {
  border: 1px solid #d7d9de;
  background: #eef0f2;
  padding: 2px 7px;
  font-size: 12px;
  font-weight: 900;
}

.bookmark-row button {
  min-height: 32px;
  border: 1px solid #d7d9de;
  background: #fff;
  color: #303842;
  font-weight: 900;
}

.reaction-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 12px 16px;
  border-bottom: 1px solid #d7d9de;
  background: #f0f1f2;
  color: #526071;
  line-height: 1.4;
}

.reaction-tabs span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.security-panel {
  display: grid;
  gap: 16px;
}

.security-card {
  border: 1px solid #d7d9de;
  background: #fff;
}

.security-card header {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  background: #f0f1f2;
  border-bottom: 1px solid #d7d9de;
}

.security-card > p,
.passkey-list {
  margin: 0;
  padding: 12px 14px;
  color: var(--muted);
}

.security-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  background: var(--row);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 11px;
}

.two-step-card form {
  display: grid;
  gap: 10px;
  padding: 12px 14px 14px;
}

.two-step-card label {
  display: grid;
  gap: 5px;
  font-weight: 850;
}

.two-step-card input {
  min-height: 38px;
  border: 1px solid #c9cdd4;
  padding: 0 10px;
}

.two-step-card input[readonly] {
  font-family: Consolas, monospace;
  letter-spacing: 1px;
}

.passkey-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.passkey-list button,
.password-row button {
  min-height: 34px;
  border: 1px solid #cdd1d6;
  background: #f7f8f9;
  color: #26313c;
  font-weight: 850;
}

.password-card {
  padding: 0;
}

.setting-row,
.password-row {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  margin: 0;
  border-bottom: 1px solid var(--line);
}

.password-row span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.password-row input {
  min-height: 38px;
  border: 1px solid #c9cdd4;
  padding: 0 10px;
}

.password-card .primary-action {
  margin: 12px 14px;
}

.success-message {
  color: #1f8a3b !important;
}

.message-compose {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) auto;
  gap: 8px;
  margin-bottom: 16px;
}

.message-compose textarea {
  grid-column: 1 / -2;
  min-height: 90px;
  resize: vertical;
}

.message-compose input,
.message-compose textarea {
  border: 1px solid #c9cdd4;
  padding: 10px;
}

.pm-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  margin: 0 18px;
}

.pm-sidebar,
.pm-conversation {
  border: 1px solid #d7d9de;
  background: #fbfbfb;
}

.pm-sidebar h2,
.pm-conversation header {
  margin: 0;
  padding: 12px 14px;
  background: var(--black);
  color: #fff;
}

.pm-conversation header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pm-conversation h1 {
  margin: 0;
  font-size: 18px;
}

.pm-thread {
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  color: #26313c;
  text-decoration: none;
  background: #fff;
}

.pm-thread.active {
  border-left: 4px solid var(--orange);
  background: #fff7f4;
}

.pm-thread span,
.pm-post span {
  color: var(--muted);
  font-size: 12px;
}

.pm-posts {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.pm-post {
  display: grid;
  gap: 4px;
  max-width: 78%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: #fff;
}

.pm-post.mine {
  justify-self: end;
  background: #f3f7ff;
}

.pm-post p {
  margin: 0;
  line-height: 1.45;
}

.conversation-compose {
  grid-template-columns: minmax(0, 1fr) auto;
  margin: 0;
  padding: 14px;
  border-top: 1px solid var(--line);
  background: #f2f3f5;
}

.conversation-compose textarea {
  grid-column: auto;
}

.locked-choice {
  opacity: 0.45;
}

.alerts-panel {
  margin: 0 18px;
  padding: 18px;
  border: 1px solid #d7d9de;
  background: #fbfbfb;
}

.alerts-panel h1 {
  margin: 0 0 14px;
}

.alert-row {
  position: relative;
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  color: #26313c;
  text-decoration: none;
  background: #fff;
}

.alert-row.is-unread {
  padding-left: 32px;
  background: #fff7f4;
}

.alert-row.is-unread::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 18px;
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
}

.alert-row.is-read {
  opacity: 0.72;
}

.alert-row span {
  color: var(--muted);
  font-size: 13px;
}

.reply-box textarea,
.topic-form textarea,
.topic-form input,
.topic-form select,
.auth-dialog input,
.auth-dialog textarea,
.wide-search {
  width: 100%;
  border: 1px solid #c9cdd4;
  background: #fff;
  color: var(--ink);
}

.reply-box textarea,
.topic-form textarea,
.auth-dialog textarea {
  resize: vertical;
  padding: 12px;
  margin-bottom: 12px;
}

.wide-search {
  display: grid;
  gap: 8px;
  padding: 12px;
  margin-top: 14px;
  color: #526071;
  font-weight: 800;
}

.foot-links {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 34px 0 18px;
  color: var(--blue);
  font-size: 14px;
}

.foot-links a + a::before {
  content: "|";
  color: #777;
  margin-right: 14px;
}

.login-strip,
.online-block {
  padding: 0 18px 16px;
  margin: 0 0 16px;
  border-top: 1px solid #c8c8c8;
}

.login-strip h2,
.online-block h2 {
  margin: 0;
  padding: 8px 0 7px;
  color: #313943;
  text-transform: uppercase;
  font-size: 14px;
}

.login-strip form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: #4b5563;
  font-size: 14px;
}

.login-strip input {
  height: 26px;
  border: 1px solid #bfc3c9;
  background: #f5f5f5;
}

.remember {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.login-strip button {
  height: 26px;
  border: 1px solid #333;
  background: #fff;
  font-weight: 800;
}

.member-list {
  max-width: 1050px;
}

.mobile-statline {
  display: none;
}

dialog {
  border: 0;
  padding: 0;
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
}

.auth-dialog,
.topic-dialog {
  width: min(560px, calc(100% - 28px));
  background: #fff;
  color: var(--ink);
}

.close-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border: 1px solid #cfd3d8;
  background: #fff;
  font-weight: 900;
}

#authContent,
.topic-form {
  padding: 24px;
}

#authContent h2,
.topic-form h2 {
  margin: 0 0 16px;
}

#authContent label,
.topic-form label {
  display: grid;
  gap: 6px;
  margin: 0 0 12px;
  font-weight: 800;
}

#authContent input,
.topic-form input {
  height: 38px;
  padding: 0 10px;
}

.reply-box .rich-editor textarea,
.topic-form .rich-editor textarea,
.message-compose .rich-editor textarea,
.conversation-compose .rich-editor textarea,
.profile-status .rich-editor textarea,
.comment-form .rich-editor textarea {
  border: 0;
  background: #fff;
  color: #26313c;
  padding: 14px 18px;
}

.dialog-submit {
  width: 100%;
}

.form-error {
  min-height: 18px;
  margin: 0 0 12px;
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
}

.turnstile-wrap {
  margin: 12px 0 8px;
  min-height: 65px;
  display: flex;
  align-items: center;
}

.turnstile-wrap .cf-turnstile {
  max-width: 100%;
}

.empty {
  padding: 22px;
  background: var(--row);
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

@media (max-width: 880px) {
  .site-shell {
    width: 100%;
    margin: 0;
  }

  .masthead {
    min-height: 116px;
    padding: 20px;
  }

  .mast-actions {
    gap: 8px;
  }

  .nav-bar {
    overflow-x: auto;
    white-space: nowrap;
    justify-content: flex-start;
  }

  .pm-layout {
    grid-template-columns: 1fr;
  }

  .pm-sidebar {
    order: 2;
  }

  .pm-conversation {
    order: 1;
  }

  .mast-btn {
    min-width: 84px;
    height: 70px;
  }

  .account-card {
    height: 70px;
  }

  .forum-table-head,
  .thread-list-head {
    display: none;
  }

  .forum-row {
    grid-template-columns: 34px minmax(0, 1fr) 24px;
    align-items: start;
  }

  .thread-row {
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: start;
  }

  .count,
  .last-post {
    grid-column: 2 / -1;
    border-left: 0;
    padding-left: 0;
    text-align: left;
  }

  .count {
    display: inline-block;
    margin-right: 10px;
  }

  .last-post {
    margin-top: 4px;
  }

  .utility-row {
    flex-wrap: wrap;
  }

  .search {
    order: 3;
    width: 100%;
    margin-left: 0;
  }

  .xf-post {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: calc(100vw - 36px);
    overflow: hidden;
  }

  .post-author,
  .post-content,
  .post-content header,
  .post-content footer {
    width: calc(100vw - 36px);
    max-width: calc(100vw - 36px);
  }

  .post-body {
    width: calc(100vw - 86px);
    max-width: calc(100vw - 86px);
  }

  .post-author {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    column-gap: 10px;
    row-gap: 4px;
    align-items: start;
    padding: 14px;
    border-right: 0;
    border-bottom: 1px solid #d6d9de;
  }

  .avatar {
    grid-row: 1 / 4;
    justify-self: start;
    margin: 0;
  }

  .post-author strong,
  .post-author > span:not(.staff-badge) {
    grid-column: 2;
    align-self: center;
    margin-top: 0;
  }

  .post-author .staff-badge {
    grid-column: 2;
    margin-top: 2px !important;
  }

  .post-author .badge-row.small {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 6px;
    margin: 8px 0 0;
  }

  .post-author .badge-row.small .role-badge {
    min-height: 26px;
    align-items: center;
    line-height: 1;
  }

  .members-layout,
  .profile-layout,
  .account-layout {
    grid-template-columns: 1fr;
  }

  .profile-hero {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .profile-actions {
    grid-column: 1 / -1;
  }

  .setting-row,
  .password-row,
  .message-compose {
    grid-template-columns: 1fr;
  }

  .message-compose textarea {
    grid-column: auto;
  }

  .admin-search-tool {
    grid-template-columns: 1fr;
  }

  .admin-user-row .admin-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .badge-picker {
    grid-column: 1 / -1;
  }

  .admin-identity-form {
    grid-template-columns: 1fr;
  }

  .admin-danger-zone .danger-action {
    max-width: none;
  }
}

@media (max-width: 560px) {
  body,
  .site-shell,
  main {
    width: 100%;
    max-width: 100vw;
  }

  .site-shell {
    overflow-x: hidden;
  }

  .masthead {
    align-items: flex-start;
    flex-direction: column;
  }

  .wordmark {
    font-size: clamp(38px, 14vw, 48px);
  }

  .mast-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .mast-btn {
    flex: 1;
    height: 56px;
  }

  .nav-bar a {
    padding: 0 14px;
    font-size: 13px;
    flex: 0 0 auto;
    min-width: 0;
  }

  .nav-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .breadcrumb,
  .thread-hero,
  .subforum-title,
  .xf-thread,
  .reply-box,
  .info-panel,
  .admin-panel {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .thread-actions,
  .thread-move-form {
    width: 100%;
    justify-content: flex-start;
  }

  .thread-move-form label {
    flex: 1 1 auto;
    min-width: 0;
  }

  .thread-move-form select {
    width: 100%;
    min-width: 0;
  }

  .bookmark-row,
  .received-reaction-row {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 10px;
    padding: 14px;
  }

  .bookmark-row button {
    grid-column: 2;
    justify-self: start;
  }

  .reaction-tabs {
    gap: 8px 12px;
    padding: 10px 14px;
  }

  .post-body {
    padding: 18px 14px;
    font-size: 15px;
    line-height: 1.58;
  }

  .subforum-title,
  .thread-hero {
    display: grid;
    align-items: start;
  }

  .primary-action,
  .secondary-action {
    width: 100%;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-panel {
    margin: 0 10px;
    padding: 12px;
  }

  .profile-status,
  .profile-post {
    grid-template-columns: 1fr;
  }

  .profile-status {
    align-items: stretch;
  }

  .profile-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-tabs {
    flex-wrap: wrap;
  }

  .profile-avatar.large {
    width: 84px;
    height: 84px;
    font-size: 36px;
  }

  .admin-table article {
    grid-template-columns: 1fr;
  }

  .admin-actions {
    justify-content: flex-start;
  }

  .admin-user-row .admin-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .badge-picker {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
  }

  .pm-layout,
  .alerts-panel {
    margin: 0 10px;
  }

  .pm-post {
    max-width: 100%;
  }

  .conversation-compose {
    grid-template-columns: 1fr;
  }

  .pm-conversation header {
    align-items: flex-start;
    flex-direction: column;
  }

  .login-strip form {
    display: grid;
  }
}

@media (max-width: 560px) {
  body {
    background: #f4f4f4;
    font-size: 14px;
  }

  .site-shell {
    box-shadow: none;
  }

  .masthead {
    min-height: 70px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: 10px 12px;
    gap: 10px;
  }

  .wordmark {
    font-size: clamp(34px, 11vw, 44px);
    line-height: 1;
    white-space: nowrap;
  }

  .mast-actions {
    width: auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    overflow: visible;
  }

  .account-chip,
  .top-icon,
  .account-link,
  .mast-btn {
    min-height: 38px;
    height: 38px;
    min-width: 38px;
    width: 38px;
    display: grid;
    place-items: center;
    padding: 0;
    background: rgba(255, 255, 255, 0.86);
    border-bottom-width: 2px;
    font-size: 0;
    line-height: 1;
  }

  .mast-btn {
    width: auto;
    min-width: 74px;
    padding: 0 10px;
    font-size: 12px;
  }

  .account-chip {
    grid-template-columns: 1fr;
  }

  .account-chip > span:last-child {
    display: none;
  }

  .chip-avatar {
    width: 26px;
    height: 26px;
    font-size: 12px;
  }

  .top-icon {
    font-size: 18px;
    text-align: center;
  }

  .account-link[href="#/account"] {
    width: 38px;
    min-width: 38px;
    padding: 0;
    font-size: 0;
  }

  .account-link[href="#/account"]::before {
    content: "\2699";
    font-size: 18px;
    line-height: 1;
    display: block;
  }

  button.account-link[data-logout] {
    display: none;
  }

  .nav-bar {
    min-height: 42px;
    padding: 0;
    scrollbar-width: none;
  }

  .nav-bar::-webkit-scrollbar {
    display: none;
  }

  .nav-bar a {
    min-height: 42px;
    padding: 0 13px;
    font-size: 12px;
  }

  .utility-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 14px 12px;
  }

  .utility-row a {
    font-size: 14px;
  }

  .search {
    grid-column: 1 / -1;
    height: 40px;
  }

  .forum-card,
  .thread-list {
    margin-bottom: 14px;
  }

  .forum-table-head,
  .thread-list-head {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 42px;
    padding: 0 12px;
  }

  .forum-table-head span,
  .thread-list-head span {
    display: none;
  }

  .forum-table-head h1,
  .thread-list-head h2 {
    grid-column: auto;
    font-size: 14px;
  }

  .forum-row,
  .thread-row {
    grid-template-columns: 22px minmax(0, 1fr) 20px;
    column-gap: 8px;
    row-gap: 6px;
    min-height: 0;
    padding: 11px 12px;
    align-items: start;
  }

  .forum-status {
    width: 14px;
    height: 14px;
    margin: 5px auto 0;
  }

  .forum-copy a,
  .thread-copy a {
    font-size: 15px;
    line-height: 1.2;
  }

  .forum-copy p,
  .thread-copy p,
  .last-post p {
    font-size: 12px;
    line-height: 1.35;
  }

  .mobile-statline {
    display: block;
    margin-top: 7px;
    font-size: 12px;
    font-weight: 850;
    color: #2f3945;
  }

  .subforums {
    display: none;
  }

  .rss {
    width: 16px;
    height: 16px;
    justify-self: end;
    margin-top: 4px;
  }

  .count {
    display: none;
  }

  .last-post {
    grid-column: 2 / -1;
    margin-top: 5px;
    padding: 8px 0 0;
    border-left: 0;
    border-top: 1px solid #dfe2e6;
  }

  .last-post .last-post-title {
    font-size: 12px;
    gap: 5px;
  }

  .thread-prefix {
    min-height: 18px;
    padding: 2px 6px;
    font-size: 11px;
  }

  .thread-hero h1 .thread-prefix {
    min-height: 24px;
    padding: 3px 8px;
    margin-right: 8px;
    font-size: 14px;
  }

  .foot-links {
    margin: 18px 0 10px;
    font-size: 13px;
  }

  .login-strip,
  .online-block {
    padding: 0 12px 12px;
  }

  .login-strip p,
  .online-block p {
    font-size: 13px;
  }

  .settings-panel h1 {
    padding: 14px 12px 0;
    font-size: 20px;
  }

  .settings-row,
  .notification-setting {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 13px 12px;
  }

  .settings-label,
  .notification-setting > span {
    text-align: left;
    font-size: 14px;
  }

  .check-setting strong,
  .select-setting span,
  .notification-setting strong {
    font-size: 14px;
  }

  .check-setting small,
  .settings-copy {
    font-size: 12px;
  }

  .select-setting {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .settings-stack select,
  .select-setting select {
    min-height: 40px;
    font-size: 14px;
  }

  .check-setting.indent {
    margin-left: 20px;
  }

  .settings-card h2 {
    padding: 13px 12px;
    font-size: 14px;
  }

  .settings-save {
    padding: 12px;
  }

  .settings-save .primary-action {
    min-width: 120px;
  }

  .reply-box .rich-editor.has-editor-submit .editor-footer {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .reply-box .rich-editor.has-editor-submit .attach-button {
    width: max-content;
  }

  .reply-box .rich-editor.has-editor-submit .editor-submit {
    width: 100% !important;
  }

  .reaction-picker {
    left: 0;
    max-width: calc(100vw - 44px);
    overflow-x: auto;
    border-radius: 18px;
  }

  .upgrades-panel h1 {
    padding: 14px 12px 10px;
    font-size: 20px;
  }

  .upgrade-row {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 13px 12px;
  }

  .upgrade-summary {
    text-align: left;
  }

  .upgrade-summary h2 {
    font-size: 16px;
  }

  .purchase-button {
    min-height: 34px;
    font-size: 13px;
  }

  .vip-benefits h3 {
    padding: 10px 12px;
    font-size: 17px;
  }

  .vip-benefits ul {
    padding: 10px 16px 12px 28px;
    font-size: 13px;
  }

  .upgrade-note {
    padding: 12px;
    font-size: 12px;
  }
}

:root[data-theme="dark"] .rich-editor {
  background: #20252c;
  border-color: #4a5260;
}

:root[data-theme="dark"] .editor-toolbar {
  background: #2b3038;
  border-color: #434a55;
}

:root[data-theme="dark"] .editor-toolbar button,
:root[data-theme="dark"] .editor-toolbar select,
:root[data-theme="dark"] .editor-toolbar input[type="color"] {
  color: #dbe4ef;
  background: #20252c;
  border-color: #434a55;
}

:root[data-theme="dark"] .editor-toolbar button:hover {
  background: #343a44;
}

:root[data-theme="dark"] .rich-editor textarea,
:root[data-theme="dark"] .editor-surface {
  background: #20252c;
  color: #dce5ef;
}

:root[data-theme="dark"] .editor-surface:empty::before,
:root[data-theme="dark"] .rich-editor textarea::placeholder {
  color: #8995a5;
}

:root[data-theme="dark"] .editor-resize-box {
  border-color: #9dbdff;
}

:root[data-theme="dark"] .thread-move-form label,
:root[data-theme="dark"] .thread-move-form select {
  background: #20252c;
  border-color: #4a5260;
  color: #dbe4ef;
}

@media (max-width: 400px) {
  .wordmark {
    font-size: clamp(31px, 10vw, 38px);
  }

  .account-link[href="#/account"] {
    width: 38px;
    min-width: 38px;
    padding: 0;
    font-size: 0;
  }

  .account-link[href="#/account"]::before {
    content: "\2699";
    font-size: 18px;
  }
}

/* Final theme and mobile alignment overrides. Kept at the end so they win over legacy light-theme rules. */
:root[data-theme="dark"] .wordmark-black {
  color: #f3f6fa;
}

:root[data-theme="dark"] .account-chip,
:root[data-theme="dark"] .top-icon,
:root[data-theme="dark"] .account-link,
:root[data-theme="dark"] .mast-btn {
  background: #eef1f5;
  color: #12161c;
}

:root[data-theme="dark"] .nav-bar,
:root[data-theme="dark"] .forum-table-head,
:root[data-theme="dark"] .thread-list-head {
  background: #10141a;
}

:root[data-theme="dark"] .nav-bar a:hover,
:root[data-theme="dark"] .nav-bar a.active {
  background: #252b34;
}

:root[data-theme="dark"] .forum-copy a,
:root[data-theme="dark"] .thread-copy a,
:root[data-theme="dark"] .last-post-title,
:root[data-theme="dark"] .thread-hero h1,
:root[data-theme="dark"] .subforum-title h1,
:root[data-theme="dark"] .info-panel h1,
:root[data-theme="dark"] .profile-post-body > strong,
:root[data-theme="dark"] .profile-bbcode,
:root[data-theme="dark"] .profile-identity h1 {
  color: #eef5ff !important;
}

:root[data-theme="dark"] .forum-copy p,
:root[data-theme="dark"] .thread-copy p,
:root[data-theme="dark"] .subforums,
:root[data-theme="dark"] .profile-identity p,
:root[data-theme="dark"] .profile-stats span,
:root[data-theme="dark"] .profile-tabs a,
:root[data-theme="dark"] .breadcrumb,
:root[data-theme="dark"] .breadcrumb a {
  color: #b9c7d6 !important;
}

:root[data-theme="dark"] .profile-stats,
:root[data-theme="dark"] .profile-tabs,
:root[data-theme="dark"] .profile-feed,
:root[data-theme="dark"] .profile-status,
:root[data-theme="dark"] .profile-comments,
:root[data-theme="dark"] .comment-form,
:root[data-theme="dark"] .manual-payment-box,
:root[data-theme="dark"] .post-content header,
:root[data-theme="dark"] .post-content footer,
:root[data-theme="dark"] .login-strip,
:root[data-theme="dark"] .online-block,
:root[data-theme="dark"] .vip-benefits h3 {
  background: #20262f;
  border-color: #3a424d;
}

:root[data-theme="dark"] .profile-stats strong,
:root[data-theme="dark"] .profile-tabs a.active {
  color: #ffffff !important;
}

:root[data-theme="dark"] .rich-editor,
:root[data-theme="dark"] .rich-editor textarea,
:root[data-theme="dark"] .editor-preview {
  background: #161b22;
  color: #e9eff6;
  border-color: #46505c;
}

:root[data-theme="dark"] .editor-toolbar,
:root[data-theme="dark"] .editor-footer {
  background: #11161d;
  border-color: #46505c;
}

:root[data-theme="dark"] .editor-toolbar button {
  color: #dce8f5;
}

:root[data-theme="dark"] .editor-toolbar button:hover {
  background: #252c36;
  border-color: #46505c;
}

:root[data-theme="dark"] .attach-button {
  background: #f4f6f8;
  color: #11161d !important;
}

:root[data-theme="dark"] .wallet-address code {
  background: #161b22;
  color: #e9eff6;
  border-color: #46505c;
}

:root[data-theme="dark"] .account-layout {
  background: #1a2028;
}

:root[data-theme="dark"] .account-menu {
  background: #151a21;
  border-color: #3a424d;
}

:root[data-theme="dark"] .account-menu a,
:root[data-theme="dark"] .account-menu button,
:root[data-theme="dark"] .account-menu strong {
  color: #dce8f5 !important;
  border-color: #3a424d;
}

:root[data-theme="dark"] .account-menu a:hover,
:root[data-theme="dark"] .account-menu a.active {
  background: #eef1f5;
  color: #11161d !important;
}

:root[data-theme="dark"] .account-details {
  background: #20262f;
  border-color: #566170;
  color: #eef5ff;
}

:root[data-theme="dark"] .account-details h1,
:root[data-theme="dark"] .account-details h2,
:root[data-theme="dark"] .account-details h3,
:root[data-theme="dark"] .upgrade-summary h2,
:root[data-theme="dark"] .manual-payment-box h2 {
  color: #f8fbff !important;
}

:root[data-theme="dark"] .account-details p,
:root[data-theme="dark"] .upgrade-summary p,
:root[data-theme="dark"] .manual-payment-box p,
:root[data-theme="dark"] .upgrade-note {
  color: #c6d4e3 !important;
}

:root[data-theme="dark"] .upgrade-row,
:root[data-theme="dark"] .upgrade-body {
  background: #1a2028;
  border-color: #3a424d;
}

:root[data-theme="dark"] .upgrade-summary {
  background: #20262f;
  color: #eef5ff;
}

:root[data-theme="dark"] .vip-benefits {
  background: #151a21;
  border-color: #3a424d;
  color: #eef5ff;
}

:root[data-theme="dark"] .vip-benefits h3 {
  background: #20262f;
  color: #f8fbff !important;
  border-color: #3a424d;
}

:root[data-theme="dark"] .vip-benefits ul {
  background: #151a21;
  color: #eef5ff;
}

:root[data-theme="dark"] .purchase-button {
  background: #2b333d;
  color: #eef5ff;
  border: 1px solid #596575;
}

:root[data-theme="dark"] .purchase-button:disabled {
  opacity: 0.9;
}

:root[data-theme="dark"] .manual-payment-box {
  background: #151a21;
  border-color: #3a424d;
}

:root[data-theme="dark"] .manual-payment-box h2 {
  background: #20262f;
  border-color: #3a424d;
}

:root[data-theme="dark"] .wallet-address button {
  background: #eef1f5;
  color: #11161d;
}

:root[data-theme="dark"] .payment-result {
  background: #151a21;
  border-color: #3a424d;
  color: #eef5ff;
}

:root[data-theme="dark"] .following-card {
  background: #151a21;
  border-color: #3a424d;
  color: #eef5ff;
}

:root[data-theme="dark"] .upload-inline {
  color: #c6d4e3;
}

:root[data-theme="dark"] .upload-inline input[type="file"]::file-selector-button {
  background: #eef1f5;
  color: #11161d;
  border-color: #596575;
}

:root[data-theme="dark"] .xf-post {
  background: #1a2028;
  border-color: #3a424d;
  box-shadow: none;
}

:root[data-theme="dark"] .post-author {
  background: linear-gradient(180deg, #202832, #1a2028);
  border-right-color: #3a424d;
}

:root[data-theme="dark"] .post-author strong {
  color: #eef5ff;
}

:root[data-theme="dark"] .post-content {
  background: #1a2028;
  color: #eef5ff;
}

:root[data-theme="dark"] .post-content header,
:root[data-theme="dark"] .post-content footer {
  background: #20262f;
  border-color: #3a424d;
  color: #aebccd;
}

:root[data-theme="dark"] .post-body {
  background: #151a21;
  color: #eef5ff;
}

:root[data-theme="dark"] .post-body p,
:root[data-theme="dark"] .post-body a {
  color: #eef5ff;
}

:root[data-theme="dark"] .bbcode-img {
  border-color: #3a424d;
}

@media (max-width: 560px) {
  .mast-actions {
    align-items: center;
  }

  .account-chip,
  .top-icon,
  .account-link,
  .mast-btn {
    display: inline-grid !important;
    place-items: center !important;
    text-align: center;
  }

  .account-chip {
    justify-items: center;
  }

  .top-icon > span,
  .account-link[href="#/account"]::before {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
  }
}

/* Final author badge, dark masthead, and VIP animation polish. */
.post-author {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.post-author .avatar {
  margin-left: auto;
  margin-right: auto;
}

.post-author .staff-badge,
.post-author .badge-row.small {
  align-self: center;
}

.post-author .badge-row.small {
  justify-content: center;
}

.role-badge,
.staff-badge {
  min-height: 27px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  line-height: 1 !important;
  text-align: center;
}

:root[data-theme="dark"] .account-chip,
:root[data-theme="dark"] .top-icon,
:root[data-theme="dark"] .account-link,
:root[data-theme="dark"] .mast-btn {
  background: #171d24;
  color: #eef5ff;
  border: 1px solid #3a424d;
  border-bottom: 3px solid var(--orange);
}

:root[data-theme="dark"] .account-chip:hover,
:root[data-theme="dark"] .top-icon:hover,
:root[data-theme="dark"] .account-link:hover,
:root[data-theme="dark"] .mast-btn:hover {
  background: #222a34;
}

@media (max-width: 880px) {
  .post-author {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    text-align: left;
  }

  .post-author .avatar {
    justify-self: center;
    margin: 0;
  }

  .post-author strong,
  .post-author > span:not(.staff-badge) {
    justify-self: start;
    text-align: left;
  }

  .post-author .staff-badge,
  .post-author .badge-row.small {
    grid-column: 2;
    justify-self: start;
    align-self: start;
  }

  .post-author .badge-row.small {
    justify-content: flex-start;
    margin-top: 6px;
  }
}

/* Boxy forum readability polish: spacing only, no palette/layout identity changes. */
.xf-thread {
  gap: 20px;
  padding-bottom: 22px;
}

.xf-post {
  margin-bottom: 2px;
}

.post-author {
  gap: 8px;
  padding: 22px 18px;
}

.post-author .avatar {
  margin-bottom: 8px;
}

.post-author strong {
  line-height: 1.25;
}

.post-author span {
  line-height: 1.35;
}

.post-author .staff-badge {
  margin-top: 7px !important;
}

.post-author .badge-row.small,
.badge-row {
  gap: 8px;
  row-gap: 7px;
}

.post-content header,
.post-content footer {
  min-height: 50px;
  padding: 10px 22px;
  line-height: 1.35;
}

.post-content footer {
  flex-wrap: wrap;
  gap: 18px;
  row-gap: 8px;
}

.post-content footer button,
.post-tools button {
  padding: 4px 2px;
  line-height: 1.25;
}

.post-body {
  padding: 28px 24px;
  line-height: 1.72;
}

.post-body p {
  margin-bottom: 18px;
}

.bbcode-quote {
  margin: 18px 0;
  padding-left: 16px;
}

.bbcode-quote cite {
  padding: 14px 16px 6px;
  line-height: 1.35;
}

.bbcode-quote div {
  padding: 10px 16px 16px;
  line-height: 1.65;
}

.bbcode-img {
  margin: 14px 0;
}

.reaction-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 10px;
  margin: 18px 0 2px;
  padding: 11px 0 0;
  line-height: 1.35;
}

.reaction-line-item {
  gap: 5px;
  margin-right: 0;
}

img.reaction-line-icon {
  margin-right: 2px;
}

.profile-status,
.profile-post {
  gap: 14px;
  padding: 16px;
}

.profile-post-body > p {
  margin-bottom: 11px;
  line-height: 1.4;
}

.profile-bbcode,
.profile-post-body > strong {
  margin-bottom: 14px;
  line-height: 1.65;
}

.post-tools {
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  row-gap: 8px;
  margin: 12px 0;
}

.profile-comments {
  gap: 10px;
  margin: 14px 0;
  padding: 14px;
}

.profile-comments p {
  margin-bottom: 5px;
  line-height: 1.4;
}

.comment-form,
.profile-status:has(.rich-editor),
.reply-box .rich-editor.has-editor-submit .editor-footer {
  gap: 10px;
}

.rich-editor textarea {
  line-height: 1.55;
}

.editor-footer {
  padding: 12px 14px;
}

.alerts-panel {
  padding: 22px;
}

.alert-row {
  gap: 7px;
  padding: 16px 18px;
  line-height: 1.5;
}

.alert-row.is-unread {
  padding-left: 38px;
}

.alert-row.is-unread::before {
  left: 18px;
  top: 22px;
}

.alert-row span {
  display: block;
  margin-top: 3px;
  line-height: 1.35;
}

.pm-post,
.pm-thread {
  line-height: 1.5;
}

@media (max-width: 880px) {
  .xf-thread {
    gap: 18px;
    padding: 0 12px 18px;
  }

  .xf-post,
  .post-author,
  .post-content,
  .post-content header,
  .post-content footer,
  .post-body {
    width: 100%;
    max-width: 100%;
  }

  .post-author {
    grid-template-columns: 78px minmax(0, 1fr);
    column-gap: 13px;
    row-gap: 6px;
    padding: 16px;
  }

  .post-author .avatar {
    width: 64px;
    height: 64px;
  }

  .post-author .badge-row.small {
    gap: 7px;
    row-gap: 7px;
    margin-top: 8px;
  }

  .post-content header,
  .post-content footer {
    min-height: 48px;
    padding: 10px 16px;
  }

  .post-body {
    padding: 22px 18px;
    font-size: 15px;
    line-height: 1.68;
  }

  .bbcode-quote {
    margin: 16px 0;
    padding-left: 12px;
  }

  .bbcode-quote cite {
    padding: 12px 13px 5px;
  }

  .bbcode-quote div {
    padding: 9px 13px 13px;
  }

  .profile-status,
  .profile-post {
    padding: 14px;
  }

  .alerts-panel {
    margin: 0 12px;
    padding: 14px;
  }

  .alert-row {
    padding: 15px 14px;
  }

  .alert-row.is-unread {
    padding-left: 34px;
  }

  .alert-row.is-unread::before {
    left: 15px;
    top: 21px;
  }
}

@media (max-width: 560px) {
  .post-author {
    grid-template-columns: 66px minmax(0, 1fr);
    padding: 14px;
  }

  .post-author .avatar {
    width: 56px;
    height: 56px;
  }

  .post-author strong {
    font-size: 15px;
  }

  .post-content header,
  .post-content footer {
    padding: 10px 14px;
  }

  .post-content footer {
    gap: 15px;
  }

  .post-body {
    padding: 20px 16px;
    font-size: 15px;
  }

  .reaction-line {
    margin-top: 16px;
  }

  .profile-post {
    gap: 12px;
  }
}

/* Final targeted fixes: mobile top controls, badge centering, and dark PM readability. */
.role-badge,
.staff-badge,
.badge-row.small .role-badge,
.post-author .badge-row.small .role-badge {
  min-height: 28px;
  display: inline-grid !important;
  grid-auto-flow: column;
  gap: 6px;
  place-items: center !important;
  padding: 0 12px !important;
  line-height: 1 !important;
  text-align: center !important;
  border: 1px solid rgba(0,0,0,0.46) !important;
  box-shadow: inset 0 1px rgba(255,255,255,0.24), inset 0 -1px rgba(0,0,0,0.18), 0 1px 0 rgba(255,255,255,0.12);
  text-shadow: 0 1px 0 rgba(0,0,0,0.28);
  letter-spacing: 0;
}

.staff-badge {
  height: 28px;
}

.post-author .staff-badge,
.post-author .badge-row.small .role-badge {
  margin-top: 4px;
}

.post-author .badge-row.small {
  gap: 9px;
}

.role-badge::before,
.staff-badge::before {
  display: inline-block;
  font-size: 12px;
  line-height: 1;
  opacity: .95;
}

.staff-badge,
.role-badge.admin,
.role-badge.badge-founder {
  background: linear-gradient(#ed1d1d,#c90000) !important;
  color: #fff !important;
}

.staff-badge::before,
.role-badge.admin::before,
.role-badge.badge-founder::before,
.role-badge.badge-site-staff::before,
.role-badge.badge-reputable::before,
.role-badge.badge-established::before {
  content: none !important;
}

.role-badge.badge-site-staff {
  background: linear-gradient(#f9fbfd,#e6ebf0) !important;
  color: #23303d !important;
  text-shadow: 0 1px rgba(255,255,255,0.85);
}

.role-badge.badge-contributor {
  background: linear-gradient(#3f9430,#2e781f) !important;
  color: #fff !important;
}

.role-badge.badge-contributor::before { content: "+"; font-weight: 950; }

.role-badge.badge-reputable,
.badge-row.small .role-badge.badge-reputable {
  background: linear-gradient(#d69800,#b67300) !important;
  border-color: #7e4d00 !important;
  color: #fff !important;
}

.role-badge.badge-established,
.badge-row.small .role-badge.badge-established {
  background: linear-gradient(#244c7c,#19395f) !important;
  border-color: #102743 !important;
  color: #fff !important;
}

.role-badge.badge-vip,
.badge-row.small .role-badge.badge-vip,
.role-badge.vip {
  background: linear-gradient(#7fcbff,#4ba7ea) !important;
  border-color: #2d7db9 !important;
  color: #fff !important;
}

.role-badge.badge-vip::before,
.role-badge.vip::before { content: "★"; font-weight: 950; }

:root[data-theme="dark"] .pm-conversation,
:root[data-theme="dark"] .pm-sidebar {
  background: #20262f;
  border-color: #3a424d;
  color: #eef5ff;
}

:root[data-theme="dark"] .pm-thread {
  background: #151a21;
  border-color: #3a424d;
  color: #eef5ff;
}

:root[data-theme="dark"] .pm-thread.active {
  background: #262d37;
}

:root[data-theme="dark"] .pm-post {
  background: #151a21;
  border-color: #3a424d;
  color: #eef5ff;
}

:root[data-theme="dark"] .pm-post.mine {
  background: #1f2a3a;
}

:root[data-theme="dark"] .pm-thread span,
:root[data-theme="dark"] .pm-post span {
  color: #c6d4e3;
}

:root[data-theme="dark"] .conversation-compose {
  background: #151a21;
  border-color: #3a424d;
}

@media (max-width: 560px) {
  .mast-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
  }

  .account-chip,
  .top-icon,
  .account-link,
  .mast-btn {
    display: inline-grid !important;
    place-items: center !important;
    align-items: center !important;
    justify-items: center !important;
    text-align: center !important;
    line-height: 1 !important;
  }

  .account-chip .chip-avatar,
  .top-icon > span,
  .account-link[href="#/account"]::before {
    margin: 0 !important;
    display: grid !important;
    place-items: center !important;
    line-height: 1 !important;
  }

  .account-link[href="#/account"]::before {
    transform: translateY(6px);
  }

  .top-icon[href="#/chat"] > span {
    transform: translateY(-1px);
  }

  .top-icon[href="#/alerts"] > span {
    transform: translateY(1px);
  }

  button.account-link[data-logout] {
    display: none !important;
  }
}
