:root {
  color-scheme: light;
  --bg: #ddeeff;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-strong: rgba(221, 238, 255, 0.96);
  --line: rgba(0, 51, 102, 0.28);
  --text: #001633;
  --muted: #4d6079;
  --cyan: #336699;
  --lime: #ccddff;
  --pink: #cc6600;
  --gold: #ff9900;
  --danger: #b00020;
  --blue-dark: #003366;
  --blue-mid: #336699;
  --blue-light: #ddeeff;
  --blue-soft: #ccddff;
  --row: #f9f9f9;
  --row-alt: #eeeeee;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Milestone UI polish: quieter profile, dialogs, admin micro-actions, toplist media. */
.profile-hero,
.profile-main-panel,
.profile-side-panel section,
.profile-content-grid > article,
.profile-stat,
.profile-game,
.profile-game-row,
.game-suggestion,
.games-match-panel {
  border-color: rgba(54, 58, 62, 0.82);
  background: linear-gradient(180deg, rgba(43, 48, 55, 0.78), rgba(20, 23, 27, 0.94));
  box-shadow: inset 0 0 0 1px rgba(244, 240, 210, 0.035);
}

.profile-hero {
  background:
    radial-gradient(circle at 0 0, rgba(252, 209, 63, 0.09), transparent 28rem),
    linear-gradient(180deg, rgba(43, 48, 55, 0.86), rgba(16, 19, 22, 0.96));
}

.profile-hero-copy,
.game-editor,
.social-editor {
  border-color: rgba(54, 58, 62, 0.82);
}

.profile-hero-copy strong,
.profile-side-panel h3,
.profile-content-grid h3,
.profile-stat strong,
.activity-item b {
  color: #f4f0d2;
}

.profile-stat,
.profile-badges span:not(.role-badge) {
  background: rgba(16, 19, 22, 0.38);
}

.profile-game-strip {
  grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
}

.profile-game {
  min-height: 184px;
  align-content: start;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.profile-game:hover,
.profile-game:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(252, 209, 63, 0.42);
  background: linear-gradient(180deg, rgba(50, 55, 63, 0.9), rgba(20, 23, 27, 0.98));
}

.profile-game > div,
.profile-game-thumb,
.game-suggestion > span,
.game-cover {
  background: linear-gradient(135deg, rgba(252, 209, 63, 0.18), rgba(162, 194, 213, 0.12));
  color: #f4f0d2;
}

.profile-game strong,
.profile-game-row strong,
.game-suggestion strong {
  color: #f4f0d2;
}

.profile-game-list {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.profile-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.profile-section-head h3 {
  margin-bottom: 0;
}

.profile-section-head .meta {
  white-space: nowrap;
}

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

.profile-lazy-embedded {
  display: grid;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

[data-profile-section-more] {
  justify-self: end;
  margin-top: 10px;
}

.profile-game-row {
  position: relative;
  grid-template-columns: 86px minmax(0, 1fr);
  min-height: 106px;
  align-items: center;
}

.profile-game-cover-link,
.profile-game-title-link,
.admin-row-title {
  color: inherit;
  text-decoration: none;
}

.profile-game-title-link:hover,
.profile-game-cover-link:hover,
.admin-row-title:hover {
  color: var(--accent);
}

.profile-game-row select,
.profile-game-row .checkline,
.profile-game-row .admin-icon-button,
.profile-game-row .action {
  grid-column: auto;
}

.match-results {
  min-width: 0;
}

.match-user-list {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.match-user {
  min-width: 0;
  border-color: rgba(54, 58, 62, 0.82);
  background: rgba(16, 19, 22, 0.5);
}

.match-user:hover,
.match-user:focus-visible {
  border-color: rgba(162, 194, 213, 0.42);
  background: rgba(31, 34, 39, 0.78);
}

.compose-dialog {
  width: min(760px, calc(100vw - 24px));
  border: 1px solid rgba(252, 209, 63, 0.28);
  border-radius: 10px;
  padding: 0;
  background: rgba(16, 19, 22, 0.98);
  color: var(--text);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.56);
}

.compose-dialog::backdrop {
  background: rgba(0, 0, 0, 0.64);
  backdrop-filter: blur(6px);
}

.compose-panel {
  display: grid;
  gap: 12px;
  padding: 18px;
}

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

.compose-panel header strong {
  display: block;
  color: #f4f0d2;
  font-size: 1.18rem;
}

.compose-panel input,
.compose-panel textarea {
  width: 100%;
}

.thread-title-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: #f4f0d2;
  font: inherit;
  text-align: left;
}

.thread-row:hover .thread-title-link,
.thread-title-link:focus-visible {
  color: var(--accent);
}

.admin-icon-button {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  min-width: 26px;
  border: 1px solid rgba(162, 194, 213, 0.2);
  border-radius: 999px;
  background: rgba(16, 19, 22, 0.34);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1;
}

.admin-icon-button:hover,
.admin-icon-button:focus-visible {
  border-color: rgba(162, 194, 213, 0.56);
  color: #f4f0d2;
  background: rgba(31, 34, 39, 0.92);
}

.admin-icon-button.danger {
  border-color: rgba(191, 0, 0, 0.22);
  color: rgba(255, 180, 180, 0.74);
}

.admin-icon-button.danger:hover,
.admin-icon-button.danger:focus-visible {
  border-color: rgba(191, 0, 0, 0.7);
  color: #fff;
  background: rgba(84, 0, 0, 0.64);
}

.inline-admin-actions {
  justify-content: flex-end;
  opacity: 0.72;
}

.chat-bubble:hover .inline-admin-actions,
.admin-edit-row:hover .inline-admin-actions {
  opacity: 1;
}

.toplist-row {
  grid-template-columns: 48px minmax(110px, 180px) minmax(0, 1fr) auto;
}

.toplist-banner {
  display: grid;
  place-items: center;
  overflow: hidden;
  width: 100%;
  min-height: 48px;
  aspect-ratio: 468 / 60;
  border: 1px solid rgba(54, 58, 62, 0.84);
  border-radius: 6px;
  background: rgba(16, 19, 22, 0.56);
  color: #f4f0d2;
  font-weight: 900;
}

.toplist-banner img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.toplist-admin-row {
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr) auto auto auto;
  align-items: center;
}

.toplist-admin-row small {
  display: block;
  color: var(--muted);
}

.toplist-admin-row.is-marked {
  border-color: rgba(191, 0, 0, 0.5);
}

.toplist-status {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(16, 19, 22, 0.48);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.toplist-status.state-ok {
  color: var(--member);
}

.toplist-status.state-down {
  color: #ffb4b4;
}

.bb-video {
  display: block;
  overflow: hidden;
  width: min(100%, 720px);
  aspect-ratio: 16 / 9;
  margin: 12px 0;
  border: 1px solid rgba(54, 58, 62, 0.84);
  border-radius: 8px;
  background: #101316;
}

.bb-video iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.forum-stats-grid div.status-admin,
.forum-stats-grid div.status-mod,
.forum-stats-grid div.status-vip,
.forum-stats-grid div.status-member,
.forum-stats-grid div.status-user,
.forum-stats-grid div.status-guest {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(54, 58, 62, 0.74);
  border-radius: 8px;
  background: rgba(16, 19, 22, 0.36);
}

[data-profile-section].is-scrollable [data-profile-section-list],
.profile-match-panel .match-user-list {
  max-height: min(520px, 62vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 6px;
  scrollbar-color: rgba(252, 209, 63, 0.42) rgba(16, 19, 22, 0.72);
}

[data-profile-section].is-scrollable [data-profile-section-list] {
  padding-bottom: 2px;
}

.match-user {
  grid-template-columns: 44px minmax(0, 1fr);
  overflow: hidden;
}

.match-user-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  overflow: hidden;
}

.match-user-avatar .avatar {
  width: 44px;
  height: 44px;
}

.match-user-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.match-user-copy strong,
.match-user-copy small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail-message .admin-icon-button {
  justify-self: start;
  width: 24px;
  height: 24px;
  min-height: 24px;
  margin-top: 6px;
  padding: 0;
  opacity: 0.58;
}

.rail-message:hover .admin-icon-button,
.rail-message .admin-icon-button:focus-visible {
  opacity: 1;
}

.legacy-text .bb-color {
  font-weight: 900;
}

.legacy-text .bb-green {
  color: #72d36c;
}

.legacy-text .bb-red {
  color: #ff8d8d;
}

.legacy-text .bb-blue {
  color: #8bbdff;
}

.legacy-text .bb-yellow {
  color: #f7d85f;
}

.legacy-text .bb-orange {
  color: #ffad5c;
}

.legacy-text .bb-purple {
  color: #cf9cff;
}

.legacy-text .bb-gray {
  color: #b7c0c9;
}

.brand {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(160px, 32%);
  gap: clamp(14px, 3vw, 34px);
  align-items: center;
  width: 100%;
  min-height: 142px;
  overflow: hidden;
  padding: clamp(18px, 3.4vw, 34px);
  border: 1px solid rgba(54, 58, 62, 0.9);
  border-radius: 4px;
  background:
    radial-gradient(circle at 16% 24%, rgba(252, 209, 63, 0.18), transparent 19rem),
    linear-gradient(115deg, rgba(244, 240, 210, 0.06), transparent 38%),
    linear-gradient(90deg, rgba(14, 19, 27, 0.98), rgba(31, 34, 39, 0.84) 48%, rgba(9, 15, 24, 0.98));
  box-shadow: inset 0 0 0 1px rgba(244, 240, 210, 0.04), 0 20px 56px rgba(0, 0, 0, 0.24);
  color: #f4f0d2;
}

.brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, rgba(244, 240, 210, 0.045) 0 1px, transparent 1px 44px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 42%);
  opacity: 0.55;
  pointer-events: none;
}

.brand-emblem-wrap,
.brand-copy,
.brand-ornament {
  position: relative;
  z-index: 1;
}

.brand-emblem-wrap {
  display: grid;
  place-items: center;
  width: clamp(88px, 11vw, 132px);
  aspect-ratio: 1;
  border: 1px solid rgba(252, 209, 63, 0.32);
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 28%, rgba(252, 209, 63, 0.22), transparent 64%),
    linear-gradient(180deg, rgba(16, 19, 22, 0.26), rgba(16, 19, 22, 0.78));
  box-shadow: 0 0 0 8px rgba(252, 209, 63, 0.045), 0 24px 52px rgba(0, 0, 0, 0.34);
}

.brand-emblem {
  width: 86%;
  height: 86%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.5));
}

.brand-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.brand-kicker {
  color: rgba(162, 194, 213, 0.82);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand strong {
  color: #f4f0d2;
  font-size: clamp(2.4rem, 7vw, 5.8rem);
  line-height: 0.86;
  text-shadow: 0 14px 28px rgba(0, 0, 0, 0.38), 0 0 22px rgba(252, 209, 63, 0.12);
}

.brand small {
  color: rgba(244, 240, 210, 0.78);
  font-size: clamp(0.86rem, 1.6vw, 1.12rem);
  font-weight: 800;
}

.brand-ornament {
  align-self: stretch;
  min-height: 92px;
  border-left: 1px solid rgba(252, 209, 63, 0.2);
  background:
    linear-gradient(135deg, transparent 0 24%, rgba(252, 209, 63, 0.18) 24% 27%, transparent 27% 46%, rgba(162, 194, 213, 0.13) 46% 49%, transparent 49%),
    radial-gradient(circle at 76% 36%, rgba(252, 209, 63, 0.18), transparent 5rem);
  clip-path: polygon(12% 0, 100% 0, 88% 100%, 0 100%);
}

@media (max-width: 780px) {
  .toplist-row,
  .toplist-admin-row,
  .profile-game-row {
    grid-template-columns: 1fr;
  }

  .profile-game-thumb {
    width: 100%;
  }

  .brand {
    grid-template-columns: auto minmax(0, 1fr);
    min-height: 104px;
    padding: 14px;
  }

  .brand-ornament {
    display: none;
  }

  .brand-emblem-wrap {
    width: 72px;
  }
}

/* Forum prestige pass: fixed author rail, clear post anatomy, scroll reveal. */
.thread-detail-head {
  align-items: stretch;
  padding: 18px;
  border: 1px solid rgba(54, 58, 62, 0.84);
  border-radius: 10px;
  background:
    radial-gradient(circle at 0 0, rgba(252, 209, 63, 0.1), transparent 24rem),
    linear-gradient(180deg, rgba(43, 48, 55, 0.9), rgba(16, 19, 22, 0.96));
}

.thread-detail-head h2 {
  max-width: 980px;
  font-size: clamp(2.2rem, 4.6vw, 5.1rem);
}

.post-conversation {
  display: grid;
  gap: 18px;
  margin-top: 18px;
  counter-reset: forum-post;
}

.post-conversation .forum-post-card,
.post-conversation .forum-post-card.from-right {
  counter-increment: forum-post;
  display: grid;
  grid-template-columns: minmax(168px, 210px) minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(54, 58, 62, 0.84);
  border-radius: 10px;
  overflow: clip;
  background:
    linear-gradient(90deg, rgba(252, 209, 63, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(43, 48, 55, 0.86), rgba(16, 19, 22, 0.96));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(244, 240, 210, 0.035);
  transform-origin: 50% 30%;
}

.post-conversation .forum-post-card.tone-cool {
  background:
    linear-gradient(90deg, rgba(162, 194, 213, 0.09), transparent 34%),
    linear-gradient(180deg, rgba(43, 48, 55, 0.86), rgba(16, 19, 22, 0.96));
}

.post-conversation .forum-post-card:hover {
  border-color: rgba(252, 209, 63, 0.34);
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(244, 240, 210, 0.06);
}

.post-conversation .chat-author,
.post-conversation .forum-post-card.from-right .chat-author {
  order: 0;
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  align-content: start;
  gap: 12px;
  padding: 22px 16px;
  border: 0;
  border-right: 1px solid rgba(54, 58, 62, 0.9);
  background:
    linear-gradient(180deg, rgba(16, 19, 22, 0.72), rgba(16, 19, 22, 0.92)),
    repeating-linear-gradient(135deg, rgba(252, 209, 63, 0.035) 0 1px, transparent 1px 12px);
}

.post-conversation .forum-post-card.tone-cool .chat-author {
  background:
    linear-gradient(180deg, rgba(16, 19, 22, 0.72), rgba(16, 19, 22, 0.92)),
    repeating-linear-gradient(135deg, rgba(162, 194, 213, 0.035) 0 1px, transparent 1px 12px);
}

.post-conversation .chat-author .avatar {
  width: 88px;
  height: 88px;
  border: 2px solid rgba(252, 209, 63, 0.58);
  box-shadow: 0 0 0 6px rgba(252, 209, 63, 0.06), 0 18px 38px rgba(0, 0, 0, 0.34);
}

.post-conversation .forum-post-card.tone-cool .chat-author .avatar {
  border-color: rgba(162, 194, 213, 0.58);
  box-shadow: 0 0 0 6px rgba(162, 194, 213, 0.06), 0 18px 38px rgba(0, 0, 0, 0.34);
}

.forum-author-stack {
  display: grid;
  justify-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  text-align: center;
}

.forum-author-stack .user-link {
  max-width: 100%;
  color: #f4f0d2;
  font-size: 1rem;
}

.forum-author-stack .user-link span,
.forum-author-stack [data-user-static] span {
  overflow-wrap: anywhere;
}

.forum-author-stat {
  width: max-content;
  max-width: 100%;
  padding: 4px 8px;
  border: 1px solid rgba(54, 58, 62, 0.84);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(31, 34, 39, 0.58);
  font-size: 0.74rem;
  font-weight: 900;
}

.post-conversation .chat-bubble,
.post-conversation .forum-post-card.from-right .chat-bubble {
  order: 1;
  position: relative;
  display: grid;
  gap: 0;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.post-conversation .chat-bubble::before,
.post-conversation .from-right .chat-bubble::before {
  display: none;
}

.forum-post-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(54, 58, 62, 0.82);
  background:
    linear-gradient(180deg, rgba(36, 40, 47, 0.72), rgba(31, 34, 39, 0.34));
}

.forum-post-header .eyebrow {
  margin-bottom: 6px;
  color: rgba(252, 209, 63, 0.82);
  font-size: 0.68rem;
}

.forum-post-card.tone-cool .forum-post-header .eyebrow {
  color: rgba(162, 194, 213, 0.86);
}

.forum-post-header h3 {
  margin: 0;
  color: #f4f0d2;
  font-size: clamp(1.1rem, 2vw, 1.55rem);
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.forum-post-header time {
  justify-self: end;
  padding: 6px 9px;
  border: 1px solid rgba(54, 58, 62, 0.84);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(16, 19, 22, 0.5);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.forum-post-body {
  padding: 22px 22px 24px;
  color: #d2d8df;
  font-size: 1rem;
  line-height: 1.72;
}

.forum-post-body p:first-child,
.forum-post-body > :first-child {
  margin-top: 0;
}

.post-conversation .signature {
  margin: 0 22px 22px;
  padding: 14px 16px;
  border: 1px solid rgba(54, 58, 62, 0.76);
  border-radius: 8px;
  background: rgba(16, 19, 22, 0.38);
}

.post-conversation .inline-admin-actions {
  position: absolute;
  right: 12px;
  bottom: 10px;
}

@media (max-width: 820px) {
  .post-conversation .forum-post-card,
  .post-conversation .forum-post-card.from-right {
    grid-template-columns: 1fr;
  }

  .post-conversation .chat-author,
  .post-conversation .forum-post-card.from-right .chat-author {
    grid-template-columns: auto minmax(0, 1fr);
    justify-items: start;
    align-items: center;
    border-right: 0;
    border-bottom: 1px solid rgba(54, 58, 62, 0.9);
  }

  .post-conversation .chat-author .avatar {
    width: 68px;
    height: 68px;
  }

  .forum-author-stack {
    justify-items: start;
    text-align: left;
  }

  .forum-post-header {
    grid-template-columns: 1fr;
  }

  .forum-post-header time {
    justify-self: start;
    white-space: normal;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background:
    linear-gradient(rgba(255,255,255,0.55) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.42) 1px, transparent 1px),
    radial-gradient(circle at 16% 8%, rgba(51, 102, 153, 0.24), transparent 30rem),
    radial-gradient(circle at 84% 4%, rgba(255, 153, 0, 0.18), transparent 28rem),
    linear-gradient(135deg, #ddeeff 0%, #f9f9f9 45%, #eeeeee 100%);
  background-size: 48px 48px, 48px 48px, auto, auto, auto;
  color: var(--text);
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  min-height: 100vh;
  position: relative;
  --cursor-x: 50vw;
  --cursor-y: 30vh;
}

.shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(0,51,102,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,51,102,0.055) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.75), transparent 85%);
}

.shell::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(260px circle at var(--cursor-x) var(--cursor-y), rgba(255,153,0,0.14), rgba(51,102,153,0.08) 30%, transparent 65%);
  transition: background-position 140ms ease;
}

.topbar,
.hero,
.content,
.breadcrumbs {
  position: relative;
  z-index: 1;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 51, 102, 0.94);
  backdrop-filter: blur(18px);
  color: #ffffff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(73, 242, 255, 0.45);
  background: linear-gradient(135deg, #336699, #003366);
  box-shadow: 0 0 24px rgba(255, 153, 0, 0.22);
  clip-path: polygon(12% 0, 100% 0, 88% 100%, 0 100%);
  font-weight: 900;
}

.brand h1 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0;
}

.brand span {
  color: #ddeeff;
  display: block;
  font-size: 0.82rem;
}

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

.nav button,
.action {
  border: 1px solid rgba(255,255,255,0.28);
  background: rgba(221,238,255,0.12);
  color: inherit;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 6px;
}

.nav button[aria-selected="true"],
.action.primary {
  border-color: #ff9900;
  color: #001633;
  background: linear-gradient(135deg, #ff9900, #ccddff);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 28px;
  align-items: end;
  padding: 56px 28px 28px;
  max-width: 1320px;
  margin: 0 auto;
}

.hero-title {
  margin: 0 0 16px;
  font-size: clamp(2.2rem, 6vw, 5.8rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.hero-title strong {
  color: transparent;
  background: linear-gradient(90deg, #003366, #336699, #cc6600);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-copy {
  max-width: 720px;
  color: #263d5a;
  font-size: 1.05rem;
  line-height: 1.7;
}

.hud {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #ddeeff);
  box-shadow: inset 0 0 24px rgba(51,102,153,0.08), 0 20px 80px rgba(0,51,102,0.16);
  border-radius: 8px;
}

.stat {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0,51,102,0.12);
}

.stat:last-child {
  border-bottom: 0;
}

.stat b {
  color: var(--blue-dark);
}

.content {
  max-width: 1320px;
  margin: 0 auto;
  padding: 18px 28px 56px;
}

.view-panel {
  animation: viewIn 360ms ease both;
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.992);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 24px 0 14px;
}

.section-head h2 {
  margin: 0;
  font-size: 1.2rem;
}

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

.card,
.thread,
.post {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0,51,102,0.18);
  background: var(--panel);
  border-radius: 8px;
}

.card {
  min-height: 180px;
  padding: 18px;
}

.card h3,
.thread h3 {
  margin: 0 0 12px;
}

.meta {
  color: var(--muted);
  font-size: 0.86rem;
}

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

.thread {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 16px;
  padding: 16px;
}

.thread-list.upgraded .thread {
  background:
    linear-gradient(90deg, rgba(204,221,255,0.88), transparent 42%),
    var(--panel);
}

.thread-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(0,51,102,0.28);
  color: #ffffff;
  background: #336699;
  border-radius: 6px;
}

.thread-metrics {
  display: flex;
  gap: 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

.thread-metrics b {
  color: var(--text);
}

body:has(.shout-rail) {
  padding-right: 318px;
}

.forum-board {
  display: grid;
  gap: 18px;
}

.forum-section {
  border: 1px solid rgba(0,51,102,0.22);
  background:
    linear-gradient(135deg, rgba(221,238,255,0.95), rgba(249,249,249,0.95)),
    var(--panel);
  border-radius: 8px;
  overflow: hidden;
}

.forum-section header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(0,51,102,0.14);
  background: linear-gradient(90deg, #336699, #003366);
  color: #ffffff;
}

.forum-section h3 {
  margin: 0;
}

.forum-section p {
  margin: 6px 0 0;
  color: #ddeeff;
}

.forum-section-stats {
  display: grid;
  justify-items: end;
  min-width: 84px;
}

.forum-section-stats b {
  color: var(--lime);
  font-size: 1.5rem;
}

.forum-section-stats span {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.forum-channel-list {
  display: grid;
}

.forum-channel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  width: 100%;
  min-height: 76px;
  padding: 14px 18px;
  border: 0;
  border-bottom: 1px solid rgba(0,51,102,0.12);
  background: transparent;
  color: var(--text);
  text-align: left;
}

.forum-channel:hover {
  background: #ccddff;
}

.forum-channel strong,
.forum-channel small {
  display: block;
}

.forum-channel small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.35;
}

.channel-pulse {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff9900;
  box-shadow: 0 0 18px rgba(255,153,0,0.6);
}

.channel-stats {
  display: grid;
  justify-items: end;
  min-width: 74px;
}

.channel-stats b {
  color: var(--gold);
}

.thread.stacked {
  display: block;
}

.post {
  display: grid;
  grid-template-columns: minmax(110px, 0.22fr) 1fr;
  gap: 18px;
  padding: 18px;
  margin-bottom: 12px;
}

.post aside {
  display: grid;
  align-content: start;
  gap: 9px;
}

.post section {
  min-width: 0;
}

.avatar {
  width: 64px;
  height: 64px;
  border: 1px solid rgba(0,51,102,0.32);
  background: #eeeeee;
  object-fit: cover;
  border-radius: 6px;
}

.legacy-text {
  white-space: pre-wrap;
  line-height: 1.55;
  color: #d8e8f2;
}

.gallery-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.media-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 1px solid rgba(0,51,102,0.28);
  background: #eeeeee;
  border-radius: 6px;
}

.shout-stream {
  display: grid;
  gap: 10px;
}

.shout {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid rgba(0,51,102,0.18);
  background: linear-gradient(90deg, #ddeeff, #f9f9f9);
  border-radius: 8px;
}

.shout strong {
  color: var(--blue-dark);
}

.loader,
.empty,
.error {
  color: var(--muted);
  padding: 22px;
  border: 1px dashed rgba(0,51,102,0.24);
  border-radius: 8px;
}

.error {
  color: var(--danger);
  border-color: rgba(255,101,122,0.45);
}

@media (max-width: 820px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px;
  }

  .nav {
    justify-content: flex-start;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 36px 16px 18px;
  }

  .content {
    padding: 12px 16px 36px;
  }

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

  .forum-section header,
  .forum-channel,
  .thread-list.upgraded .thread {
    grid-template-columns: 1fr;
  }

  .forum-section header {
    align-items: flex-start;
  }

  .forum-section-stats,
  .channel-stats {
    justify-items: start;
  }

  .thread-metrics {
    flex-wrap: wrap;
  }
}

/* Legacy PHD skin based on tmp/screenshot.png. */
:root {
  color-scheme: dark;
  --bg: #101315;
  --panel: #1b1d20;
  --panel-strong: #24272a;
  --line: #303438;
  --text: #c8cdd0;
  --muted: #7f878c;
  --cyan: #2d789d;
  --lime: #e1c337;
  --pink: #9f1f1b;
  --gold: #d8bd2d;
  --danger: #d04d44;
  --blue-dark: #101315;
  --blue-mid: #2b3033;
  --blue-light: #202326;
  --blue-soft: #303438;
  --row: #1b1d20;
  --row-alt: #222529;
}

body {
  background:
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    radial-gradient(circle at 50% 0, rgba(110, 24, 20, 0.28), transparent 34rem),
    #0b0d0e;
  background-size: 5px 5px, 5px 5px, auto, auto;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
}

.shell {
  max-width: 1000px;
  margin: 0 auto;
  min-height: 100vh;
  background: #111315;
  border-left: 1px solid #303438;
  border-right: 1px solid #303438;
  box-shadow: 0 0 28px rgba(0,0,0,0.75);
}

.shell::before {
  background:
    linear-gradient(90deg, rgba(255,255,255,0.028) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 4px 4px;
}

.shell::after {
  background: radial-gradient(230px circle at var(--cursor-x) var(--cursor-y), rgba(255,255,255,0.055), rgba(148,34,28,0.045) 35%, transparent 68%);
}

.site-frame,
.page-grid,
.content {
  position: relative;
  z-index: 1;
}

.site-frame {
  border-top: 1px solid #54595d;
  background: #151719;
}

.legacy-banner {
  height: 137px;
  overflow: hidden;
  border: 1px solid #000;
  border-bottom: 0;
  background: #050607;
}

.legacy-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.legacy-topnav {
  display: flex;
  justify-content: flex-end;
  min-height: 24px;
  padding-right: 1px;
  border-top: 1px solid #5d656a;
  border-bottom: 1px solid #111;
  background: linear-gradient(#d0473e, #8e1714 48%, #45100e);
}

.legacy-topnav button {
  min-width: 90px;
  min-height: 24px;
  border: 0;
  border-left: 1px solid rgba(255,255,255,0.25);
  border-right: 1px solid rgba(0,0,0,0.55);
  color: #f4f4f4;
  background: transparent;
  font-weight: 700;
  text-shadow: 0 1px 0 #000;
}

.legacy-topnav button:hover,
.legacy-topnav button[aria-selected="true"] {
  background: linear-gradient(#f07a64, #b4211c 48%, #5b120f);
}

.login-strip {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 23px;
  padding: 2px 8px;
  background:
    linear-gradient(#24282b, #111315),
    repeating-linear-gradient(90deg, transparent, transparent 3px, rgba(255,255,255,0.03) 3px, rgba(255,255,255,0.03) 4px);
  border-top: 1px solid #394044;
  border-bottom: 1px solid #050607;
}

.login-strip input {
  width: 120px;
  height: 16px;
  border: 1px solid #050607;
  background: #101214;
  color: #9ca3a7;
  padding: 0 5px;
  font-size: 11px;
}

.login-strip button {
  height: 17px;
  border: 1px solid #7b1f1a;
  color: #fff;
  background: linear-gradient(#df5a4c, #8b1915);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.login-strip span {
  margin-left: auto;
  color: #d7d7d7;
  font-family: "Courier New", monospace;
  font-size: 16px;
}

.page-grid {
  display: grid;
  grid-template-columns: 164px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 8px 28px;
}

.legacy-sidebar {
  display: grid;
  align-content: start;
  gap: 12px;
}

.sidebox {
  overflow: hidden;
  border: 1px solid #25292c;
  border-radius: 7px;
  background: linear-gradient(#1c1f22, #121416);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.sidebox h2 {
  margin: 0;
  min-height: 25px;
  padding: 6px 10px 4px 36px;
  color: #d6d6d6;
  background:
    linear-gradient(135deg, transparent 0 26px, #b52a24 27px 55px, transparent 56px),
    linear-gradient(#313539, #1b1e21);
  border-bottom: 1px solid #070808;
  font-size: 12px;
  text-align: right;
}

.sidebox ul {
  list-style: none;
  margin: 0;
  padding: 10px 8px 12px;
}

.sidebox li {
  margin: 3px 0;
}

.sidebox a {
  color: #e0ca2e;
  text-decoration: none;
  font-weight: 700;
}

.sidebox a::before {
  content: "::";
  color: #b42a24;
  margin-right: 1px;
}

.sidebox a:hover {
  color: #fff;
  text-decoration: underline;
}

.sidebox p {
  margin: 0;
  padding: 9px;
  color: #9aa1a5;
  line-height: 1.35;
}

.content {
  max-width: none;
  margin: 0;
  padding: 0;
}

.legacy-tabs {
  display: flex;
  justify-content: center;
  gap: 7px;
  min-height: 28px;
  padding: 6px;
  border: 1px solid #25292c;
  background: linear-gradient(#25282b, #17191b);
}

.legacy-tabs button {
  min-width: 64px;
  height: 14px;
  border: 1px solid #4d5357;
  border-radius: 3px;
  color: #e9e9e9;
  background: linear-gradient(#6b7073, #272a2d 52%, #0e0f10);
  font-size: 9px;
  line-height: 1;
  text-transform: uppercase;
}

.view-panel {
  animation: viewIn 260ms ease both;
}

.section-head {
  margin: 10px 0 0;
  padding: 7px 8px;
  border: 1px solid #25292c;
  border-bottom: 0;
  background: linear-gradient(#25282b, #17191b);
}

.section-head h2 {
  color: #cfd3d5;
  font-size: 12px;
}

.meta {
  color: #7d878d;
}

.grid,
.gallery-grid {
  gap: 8px;
  padding: 8px;
  border: 1px solid #25292c;
  background: #151719;
}

.card,
.thread,
.post,
.forum-section,
.shout,
.loader,
.empty,
.error {
  border-radius: 0;
  border-color: #2b3033;
  background: #1b1d20;
  box-shadow: none;
}

.card::before,
.thread::before,
.post::before {
  background: linear-gradient(110deg, transparent, rgba(255,255,255,0.035), transparent);
  animation-duration: 8s;
}

.card {
  min-height: auto;
  padding: 10px;
}

.card h3,
.thread h3 {
  color: #d4d7d9;
  font-size: 12px;
  text-decoration: underline;
}

.card p,
.legacy-text {
  color: #9aa1a5;
}

.action,
.nav button {
  min-height: 20px;
  border: 1px solid #4c1210;
  border-radius: 0;
  color: #fff;
  background: linear-gradient(#cf4a3f, #7d1714);
  font-size: 11px;
}

.action.primary {
  border-color: #4c1210;
  color: #fff;
  background: linear-gradient(#cf4a3f, #7d1714);
}

.forum-board {
  gap: 0;
  border: 1px solid #25292c;
  background: #151719;
}

.forum-section {
  border: 0;
  border-bottom: 1px solid #2b3033;
  background: #1b1d20;
}

.forum-section header {
  min-height: 32px;
  padding: 6px 8px;
  border-top: 1px solid #3a3f43;
  border-bottom: 1px solid #070808;
  background: linear-gradient(#2b2f32, #1b1e20);
  color: #d4d7d9;
}

.forum-section h3 {
  color: #e0ca2e;
  font-size: 16px;
  line-height: 1;
}

.forum-section h3::before {
  content: "⊞ ";
  color: #e0ca2e;
}

.forum-section p {
  color: #8a9296;
  font-size: 11px;
}

.forum-section-stats {
  display: none;
}

.forum-channel-list {
  display: table;
  width: 100%;
  border-collapse: collapse;
}

.forum-channel {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 110px;
  min-height: 49px;
  padding: 7px 8px;
  border-bottom: 1px solid #2b3033;
  background: #1a1c1f;
}

.forum-channel:nth-child(even) {
  background: #202326;
}

.forum-channel:hover {
  background: #262b2f;
}

.forum-channel strong {
  color: #cfd3d5;
  font-size: 13px;
  text-decoration: underline;
}

.forum-channel small {
  color: #7d878d;
  font-size: 11px;
}

.channel-pulse {
  width: 11px;
  height: 8px;
  border-radius: 1px;
  background: #1b7fa7;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), 0 0 6px rgba(29,127,167,0.45);
}

.channel-stats {
  min-width: 0;
  color: #7d878d;
}

.channel-stats b {
  color: #9aa1a5;
  font-weight: 400;
}

.thread-list {
  gap: 0;
  border: 1px solid #25292c;
  background: #151719;
}

.thread {
  grid-template-columns: 22px minmax(0, 1fr) auto 62px;
  padding: 8px;
  border: 0;
  border-bottom: 1px solid #2b3033;
  background: #1b1d20;
}

.thread:nth-child(even) {
  background: #222529;
}

.thread-list.upgraded .thread {
  background: #1b1d20;
}

.thread-list.upgraded .thread:nth-child(even) {
  background: #222529;
}

.thread-icon {
  width: 12px;
  height: 9px;
  border: 0;
  border-radius: 1px;
  color: transparent;
  background: #1b7fa7;
}

.thread-metrics {
  color: #7d878d;
}

.post {
  grid-template-columns: 120px 1fr;
  margin-bottom: 0;
  border-bottom: 1px solid #2b3033;
  background: #1b1d20;
}

.post aside {
  border-right: 1px solid #2b3033;
}

.post aside strong {
  color: #e0ca2e;
}

.avatar {
  border-radius: 0;
  border-color: #303438;
  background: #101214;
}

.media-card img {
  border-radius: 0;
  border-color: #303438;
  background: #101214;
}

.shout {
  background: #1b1d20;
}

.shout strong {
  color: #e0ca2e;
}

@media (max-width: 820px) {
  .shell {
    max-width: none;
    border: 0;
  }

  .legacy-banner {
    height: 95px;
  }

  .legacy-topnav {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .legacy-topnav button {
    min-width: 82px;
  }

  .login-strip {
    flex-wrap: wrap;
  }

  .login-strip span {
    width: 100%;
    margin-left: 0;
  }

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

  .legacy-sidebar {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .forum-channel,
  .thread,
  .post,
  .forum-stats-grid,
  .profile-card,
  .profile-editor {
    grid-template-columns: 1fr;
  }

  .channel-pulse,
  .thread-icon {
    display: none;
  }

  .post aside {
    border-right: 0;
    border-bottom: 1px solid #2b3033;
    padding-bottom: 10px;
  }
}

/* Modern PHD theme: keep the old live-site palette, not the old layout. */
:root {
  color-scheme: dark;
  --bg: #1c1f24;
  --panel: rgba(31, 34, 39, 0.86);
  --panel-strong: rgba(36, 40, 47, 0.94);
  --panel-hover: rgba(43, 48, 55, 0.98);
  --line: #363a3e;
  --line-dark: #101316;
  --text: #9da5b0;
  --muted: #8d99a5;
  --accent: #fcd13f;
  --accent-hot: #ff7f00;
  --accent-cool: #a2c2d5;
  --member: #00ffcc;
  --admin: #00ff00;
  --danger: #bf0000;
  --shadow: rgba(0, 0, 0, 0.38);
}

body {
  background:
    radial-gradient(circle at 18% 10%, rgba(252, 209, 63, 0.11), transparent 31rem),
    radial-gradient(circle at 82% 0%, rgba(255, 127, 0, 0.1), transparent 34rem),
    radial-gradient(circle at 50% 100%, rgba(162, 194, 213, 0.08), transparent 36rem),
    linear-gradient(180deg, #24282f 0%, #1c1f24 44%, #101316 100%);
  color: var(--text);
}

button {
  color: inherit;
}

.shell {
  max-width: none;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  --cursor-x: 50vw;
  --cursor-y: 30vh;
}

.shell::before {
  background:
    linear-gradient(rgba(252, 209, 63, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(162, 194, 213, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), transparent 78%);
}

.shell::after {
  background:
    radial-gradient(320px circle at var(--cursor-x) var(--cursor-y), rgba(252, 209, 63, 0.09), rgba(255, 127, 0, 0.055) 30%, transparent 68%);
}

.topbar,
.hero,
.quick-nav,
.content {
  position: relative;
  z-index: 1;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  gap: 0;
  width: min(1180px, calc(100% - 24px));
  margin: 0 auto;
  padding: 0;
  border: 1px solid rgba(54, 58, 62, 0.9);
  border-top: 0;
  background: rgba(16, 19, 22, 0.78);
  backdrop-filter: blur(20px);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
}

.header-banner {
  position: relative;
  display: block;
  min-height: 0;
  padding: 4px;
  background:
    linear-gradient(90deg, rgba(16, 19, 22, 0.04), rgba(16, 19, 22, 0.28)),
    linear-gradient(180deg, rgba(43, 48, 55, 0.92), rgba(16, 19, 22, 0.95));
}

.header-status {
  position: absolute;
  right: 18px;
  bottom: 14px;
  display: grid;
  justify-items: end;
  align-content: center;
  gap: 4px;
  padding: 8px 12px;
  border: 1px solid rgba(252, 209, 63, 0.24);
  border-radius: 6px;
  background: rgba(16, 19, 22, 0.68);
  color: var(--muted);
  text-align: right;
  backdrop-filter: blur(10px);
}

.header-status strong {
  color: var(--accent);
}

.header-navline {
  display: grid;
  grid-template-columns: 1fr minmax(150px, 240px) auto;
  gap: 16px;
  align-items: center;
  padding: 7px 10px;
  border-top: 1px solid rgba(252, 209, 63, 0.12);
  background:
    linear-gradient(180deg, rgba(104, 23, 17, 0.34), rgba(16, 19, 22, 0.16)),
    linear-gradient(180deg, rgba(36, 40, 47, 0.94), rgba(16, 19, 22, 0.96));
}

.global-search {
  display: grid;
  gap: 2px;
}

.global-search span {
  color: var(--muted);
  font-size: 0.66rem;
  text-transform: uppercase;
}

.global-search input {
  min-height: 36px;
  border: 1px solid rgba(54, 58, 62, 0.9);
  border-radius: 7px;
  padding: 0 10px;
  background: rgba(16, 19, 22, 0.7);
  color: #f4f0d2;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.brand img {
  width: 100%;
  height: auto;
  min-height: 118px;
  object-fit: cover;
  object-position: left center;
  border: 1px solid rgba(54, 58, 62, 0.9);
  border-radius: 2px;
  filter: saturate(1.08) contrast(1.06);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 42px;
  padding-right: 4px;
  border: 1px solid rgba(252, 209, 63, 0.46);
  color: #101316;
  background: linear-gradient(135deg, #fcd13f, #ff7f00);
  box-shadow: 0 0 28px rgba(252, 209, 63, 0.22);
  clip-path: polygon(0 0, 100% 0, 88% 100%, 0 100%);
  font-weight: 900;
}

.brand strong {
  display: block;
  color: #f4f0d2;
  font-size: 0.98rem;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.nav {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
}

.nav button,
.action,
.login-chip,
.quick-link {
  min-height: 40px;
  border: 1px solid rgba(54, 58, 62, 0.9);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(43, 48, 55, 0.88), rgba(31, 34, 39, 0.9));
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
  transition: transform 180ms ease, border-color 180ms ease, color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.nav button {
  padding: 0 14px;
  font-size: 0.86rem;
}

.nav button:hover,
.action:hover,
.login-chip:hover,
.quick-link:hover {
  transform: translateY(-2px);
  border-color: rgba(252, 209, 63, 0.62);
  color: #f4f0d2;
  background: linear-gradient(180deg, rgba(50, 55, 63, 0.95), rgba(36, 40, 47, 0.98));
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.26), 0 0 22px rgba(252, 209, 63, 0.08);
}

.nav button[aria-selected="true"],
.action.primary {
  border-color: rgba(255, 127, 0, 0.88);
  color: #101316;
  background: linear-gradient(135deg, #fcd13f, #ff7f00);
}

.login-chip,
.action {
  padding: 0 16px;
  font-size: 0.86rem;
}

.login-chip.slim,
.action.tiny {
  min-height: 32px;
  padding: 0 10px;
  font-size: 0.78rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
  max-width: 1480px;
  min-height: min(560px, calc(100vh - 150px));
  margin: 0 auto;
  padding: clamp(42px, 8vw, 106px) clamp(16px, 4vw, 54px) clamp(28px, 6vw, 72px);
}

.hero-copy {
  max-width: 760px;
  color: var(--text);
}

.kicker,
.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-title {
  margin: 0 0 18px;
  color: #f4f0d2;
  font-size: clamp(3rem, 7vw, 7rem);
  line-height: 0.9;
}

.hero-copy p {
  max-width: 680px;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-visual {
  position: relative;
  min-height: 390px;
  border: 1px solid rgba(54, 58, 62, 0.92);
  border-radius: 8px;
  overflow: hidden;
  background: #101316;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(135deg, rgba(16, 19, 22, 0.1), rgba(16, 19, 22, 0.82)),
    repeating-linear-gradient(90deg, transparent 0 14px, rgba(252, 209, 63, 0.045) 14px 15px);
}

.hero-visual img {
  width: 100%;
  height: 100%;
  min-height: 390px;
  object-fit: cover;
  filter: saturate(1.1) contrast(1.08);
  transform: scale(1.05);
}

.signal-card {
  position: absolute;
  right: 20px;
  bottom: 20px;
  z-index: 2;
  display: grid;
  gap: 4px;
  min-width: 190px;
  padding: 16px;
  border: 1px solid rgba(252, 209, 63, 0.45);
  border-radius: 8px;
  background: rgba(16, 19, 22, 0.78);
  backdrop-filter: blur(16px);
}

.signal-card span {
  color: var(--muted);
  font-size: 0.78rem;
}

.signal-card strong {
  color: var(--accent);
}

.quick-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 54px) clamp(26px, 5vw, 56px);
}

.quick-link {
  display: grid;
  gap: 6px;
  align-content: center;
  min-height: 128px;
  padding: 18px;
  text-align: left;
}

.quick-link span {
  color: #f4f0d2;
  font-size: 1.22rem;
  font-weight: 800;
}

.quick-link i {
  width: max-content;
  padding: 4px 8px;
  border: 1px solid rgba(252, 209, 63, 0.24);
  border-radius: 999px;
  color: var(--accent);
  font-style: normal;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.quick-link small {
  color: var(--muted);
  line-height: 1.35;
}

.content {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 12px 72px;
}

.shout-rail {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 20;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 10px;
  width: 318px;
  height: 100vh;
  padding: 12px;
  border-left: 1px solid rgba(252, 209, 63, 0.18);
  background:
    linear-gradient(180deg, rgba(132, 31, 22, 0.2), transparent 220px),
    rgba(16, 19, 22, 0.92);
  box-shadow: -26px 0 70px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(18px);
}

.shout-rail header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 8px;
  border: 1px solid rgba(54, 58, 62, 0.82);
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(132, 31, 22, 0.86), rgba(16, 19, 22, 0.92));
}

.shout-rail header strong {
  color: #f4f0d2;
}

.shout-rail header button,
.rail-form button {
  min-height: 34px;
  border: 1px solid rgba(54, 58, 62, 0.9);
  border-radius: 6px;
  padding: 0 10px;
  background: rgba(31, 34, 39, 0.88);
  color: var(--accent);
}

.rail-form {
  display: grid;
  gap: 8px;
}

.rail-form input,
.rail-form textarea {
  width: 100%;
  border: 1px solid rgba(54, 58, 62, 0.9);
  border-radius: 6px;
  padding: 9px 10px;
  background: rgba(16, 19, 22, 0.76);
  color: #f4f0d2;
  resize: vertical;
}

.rail-messages {
  display: grid;
  align-content: start;
  gap: 9px;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.rail-message {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 8px;
  padding: 9px;
  border: 1px solid rgba(54, 58, 62, 0.72);
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(43, 48, 55, 0.72), rgba(31, 34, 39, 0.92));
}

.rail-message .avatar {
  width: 38px;
  height: 38px;
}

.rail-message strong {
  display: block;
  overflow: hidden;
  color: var(--member);
  font-size: 0.82rem;
  text-overflow: ellipsis;
}

.rail-message span {
  color: var(--muted);
  font-size: 0.68rem;
}

.rail-message p {
  margin: 3px 0 0;
  color: #f4f0d2;
  font-size: 0.8rem;
  line-height: 1.35;
}

.rail-message .action.tiny {
  justify-self: start;
  min-height: 28px;
  margin-top: 6px;
  padding: 4px 8px;
  font-size: 0.72rem;
}

.view-panel {
  display: grid;
  gap: 18px;
  padding: 14px;
  border: 1px solid rgba(54, 58, 62, 0.82);
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(43, 48, 55, 0.38), rgba(16, 19, 22, 0.72)),
    rgba(16, 19, 22, 0.52);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

.composer,
.profile-editor,
.profile-card,
.thread-poll,
.forum-stats-grid section {
  border: 1px solid rgba(54, 58, 62, 0.82);
  border-radius: 6px;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(43, 48, 55, 0.76), rgba(16, 19, 22, 0.9));
}

.composer {
  display: grid;
  gap: 10px;
}

.composer h3,
.profile-editor h3,
.thread-poll h3,
.forum-stats-grid h3 {
  margin: 0;
  color: #f4f0d2;
  font-size: 1.16rem;
}

.form-error {
  padding: 10px 12px;
  border: 1px solid rgba(191, 0, 0, 0.52);
  border-radius: 6px;
  color: #f4b0a8;
  background: rgba(191, 0, 0, 0.12);
}

.composer input,
.composer textarea,
.profile-editor input,
.profile-editor textarea,
.bb-editor textarea,
.poll-composer input,
.captcha-line input,
.rating-box select,
.bb-toolbar select {
  width: 100%;
  border: 1px solid rgba(54, 58, 62, 0.9);
  border-radius: 6px;
  padding: 10px;
  background: rgba(16, 19, 22, 0.78);
  color: #f4f0d2;
}

.bb-editor {
  display: grid;
  gap: 8px;
}

.bb-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.bb-toolbar button,
.smiley-strip button,
.poll-choice,
.forum-stats-grid button,
.user-card {
  border: 1px solid rgba(54, 58, 62, 0.9);
  border-radius: 6px;
  background: rgba(16, 19, 22, 0.62);
  color: var(--text);
}

.bb-toolbar button {
  min-height: 30px;
  padding: 0 10px;
  color: var(--accent);
  font-weight: 800;
}

.smiley-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.smiley-strip button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
}

.smiley,
.smiley-strip img {
  max-width: 22px;
  max-height: 22px;
  vertical-align: middle;
}

.bb-klapp {
  margin: 8px 0;
  border: 1px solid rgba(252, 209, 63, 0.22);
  border-radius: 6px;
  padding: 8px 10px;
  background: rgba(16, 19, 22, 0.42);
}

.bb-klapp summary {
  color: var(--accent);
  cursor: pointer;
  font-weight: 800;
}

.checkline,
.captcha-line,
.rating-box {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.captcha-line input {
  max-width: 140px;
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

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

.forum-underbar {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}

.forum-stats-grid section {
  display: grid;
  gap: 8px;
}

.forum-stats-grid button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  padding: 6px 8px;
  text-align: left;
}

.forum-stats-grid .avatar {
  width: 32px;
  height: 32px;
}

.thread-poll {
  display: grid;
  gap: 8px;
}

.poll-choice {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  overflow: hidden;
  min-height: 42px;
  padding: 0 12px;
  text-align: left;
}

.poll-choice span {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, rgba(252, 209, 63, 0.28), rgba(255, 127, 0, 0.18));
}

.poll-choice b,
.poll-choice em {
  position: relative;
  z-index: 1;
  align-self: center;
}

.inline-editor {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(54, 58, 62, 0.82);
}

.profile-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 18px;
}

.profile-card .avatar {
  width: 88px;
  height: 88px;
}

.profile-card dl {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 6px 12px;
}

.profile-card dt {
  color: var(--accent);
  font-weight: 800;
}

.profile-card dd {
  margin: 0;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.social-links a {
  display: grid;
  gap: 2px;
  min-width: 120px;
  padding: 9px 11px;
  border-radius: 7px;
  background: rgba(16, 19, 22, 0.5);
  color: var(--text);
  text-decoration: none;
}

.social-links span,
.social-editor label span {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.social-links strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.profile-editor label {
  display: grid;
  gap: 5px;
}

.profile-editor label:nth-last-child(-n + 3) {
  grid-column: 1 / -1;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 28px 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.breadcrumbs button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--cyan);
  font-weight: 800;
}

.breadcrumbs span {
  color: var(--text);
  font-weight: 800;
}

.breadcrumbs i {
  color: rgba(0, 51, 102, 0.36);
  font-style: normal;
}

.profile-screen {
  display: grid;
  gap: 18px;
  min-height: calc(100vh - 150px);
}

.profile-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 18px;
  align-items: stretch;
  padding: 22px;
  border: 1px solid rgba(0, 51, 102, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.94), rgba(221,238,255,0.88)),
    var(--panel);
}

.profile-identity {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
}

.profile-identity .avatar {
  width: 112px;
  height: 112px;
  border: 3px solid currentColor;
  box-shadow: 0 18px 42px rgba(0, 51, 102, 0.16);
}

.profile-identity h2 {
  margin: 3px 0 10px;
  font-size: clamp(2rem, 5vw, 4.4rem);
  line-height: 0.95;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.profile-badges span:not(.role-badge) {
  padding: 4px 8px;
  border: 1px solid rgba(0, 51, 102, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.profile-hero-copy {
  display: grid;
  align-content: space-between;
  gap: 14px;
  padding: 16px;
  border-left: 1px solid rgba(0, 51, 102, 0.16);
}

.profile-hero-copy strong {
  color: var(--blue-dark);
  font-size: 1.04rem;
}

.profile-hero-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.profile-stat-grid,
.signal-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

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

.profile-stat {
  min-height: 94px;
  padding: 14px;
  border: 1px solid rgba(0, 51, 102, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.profile-stat strong {
  display: block;
  color: var(--blue-dark);
  font-size: 1.65rem;
  line-height: 1;
}

.profile-stat span {
  display: block;
  margin-top: 8px;
  color: var(--text);
  font-weight: 900;
}

.profile-stat small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.profile-main-panel,
.profile-side-panel section,
.profile-content-grid > article {
  border: 1px solid rgba(0, 51, 102, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.profile-main-panel,
.profile-content-grid > article {
  padding: 16px;
}

.profile-side-panel {
  display: grid;
  gap: 14px;
}

.profile-side-panel section {
  padding: 16px;
}

.profile-side-panel h3,
.profile-content-grid h3 {
  margin: 0 0 12px;
  color: var(--blue-dark);
  font-size: 1.08rem;
}

.profile-side-panel dl {
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr);
  gap: 7px 12px;
  margin: 0;
}

.profile-side-panel dt {
  color: var(--muted);
  font-weight: 800;
}

.profile-side-panel dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.activity-timeline {
  display: grid;
  gap: 10px;
}

.activity-item,
.profile-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  width: 100%;
  min-height: 66px;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid rgba(0, 51, 102, 0.1);
  background: transparent;
  color: var(--text);
  text-align: left;
}

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

.profile-row span,
.profile-row small {
  grid-column: 1 / -1;
}

.activity-item:last-child,
.profile-row:last-child {
  border-bottom: 0;
}

.activity-item > span {
  width: max-content;
  max-width: 120px;
  padding: 4px 8px;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 900;
}

.activity-item strong,
.profile-row strong {
  overflow-wrap: anywhere;
}

.activity-item p,
.profile-row span {
  margin: 3px 0;
  color: var(--muted);
  line-height: 1.4;
}

.activity-item small,
.profile-row small,
.profile-shot small {
  color: var(--muted);
  font-size: 0.78rem;
}

.activity-item b {
  color: var(--blue-dark);
}

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

.profile-content-grid h4 {
  margin: 16px 0 8px;
  color: var(--muted);
  font-size: 0.86rem;
  text-transform: uppercase;
}

.profile-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.profile-section-head h3 {
  margin-bottom: 0;
}

.profile-section-head .meta {
  white-space: nowrap;
}

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

.profile-lazy-embedded {
  display: grid;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

[data-profile-section-more] {
  justify-self: end;
  margin-top: 10px;
}

.muted-row {
  opacity: 0.76;
}

.profile-gallery-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 10px;
}

.profile-game-strip,
.profile-game-list,
.game-suggestions {
  display: grid;
  gap: 10px;
}

.profile-game-strip {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.profile-game,
.profile-game-row,
.game-suggestion {
  display: grid;
  gap: 7px;
  min-width: 0;
  border: 1px solid rgba(0, 51, 102, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
}

.profile-game {
  padding: 10px;
  color: inherit;
  text-align: left;
}

.profile-game.favorite {
  border-color: rgba(255, 127, 0, 0.46);
}

.profile-game > div,
.profile-game-thumb,
.game-suggestion > span {
  display: grid;
  place-items: center;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 7px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-weight: 900;
}

.profile-game img,
.profile-game-thumb img,
.game-suggestion img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-game strong,
.profile-game-row strong,
.game-suggestion strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-game small,
.profile-game-row span,
.game-suggestion small {
  color: var(--muted);
}

.profile-game-row,
.game-suggestion {
  grid-template-columns: 90px minmax(0, 1fr) auto;
  align-items: center;
  padding: 9px;
  text-align: left;
}

.admin-game-row {
  grid-template-columns: 90px minmax(150px, 1.1fr) minmax(120px, 0.7fr) minmax(180px, 1fr) auto auto;
}

.profile-game-thumb,
.game-suggestion > span {
  width: 90px;
}

.game-editor,
.social-editor {
  display: grid;
  gap: 10px;
  grid-column: 1 / -1;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 51, 102, 0.12);
}

.games-match-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  padding: 16px;
  border: 0;
  border-radius: 8px;
  background: rgba(16, 19, 22, 0.58);
  box-shadow: inset 0 0 0 1px rgba(244, 240, 210, 0.08);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  align-items: stretch;
}

.game-card,
.game-detail,
.match-results {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.game-card {
  min-height: 235px;
  padding: 12px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(43, 48, 55, 0.86), rgba(20, 23, 27, 0.96));
  box-shadow: inset 0 0 0 1px rgba(244, 240, 210, 0.08);
}

.game-card-main {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 9px;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.game-cover {
  display: grid;
  place-items: center;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 7px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-weight: 900;
}

.game-card-main strong,
.game-card-main small {
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-card-main strong {
  min-height: 2.6em;
  line-height: 1.3;
}

.game-card-main small {
  color: var(--muted);
}

.confirm-inline {
  display: flex;
  grid-column: 1 / -1;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  color: var(--danger);
}

.confirm-inline[hidden] {
  display: none;
}

.game-cover.big {
  width: min(420px, 100%);
}

.game-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-hero {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid rgba(54, 58, 62, 0.84);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(43, 48, 55, 0.72), rgba(31, 34, 39, 0.94));
}

.game-hero h2 {
  margin: 0;
  color: #f4f0d2;
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 0.96;
}

.match-user-list {
  display: grid;
  gap: 8px;
}

.match-user {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(54, 58, 62, 0.72);
  border-radius: 8px;
  background: rgba(16, 19, 22, 0.44);
  color: inherit;
  text-align: left;
}

.match-user strong,
.match-user small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.match-user small {
  color: var(--muted);
}

.inline-search {
  max-width: 360px;
}

.game-picker,
.game-create,
.admin-game-create {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.game-create,
.admin-game-create {
  grid-template-columns: minmax(160px, 1fr) minmax(130px, 0.6fr) minmax(180px, 1fr) auto;
}

.profile-shot {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.profile-shot div {
  display: grid;
  place-items: center;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 7px;
  background: var(--blue-soft);
}

.profile-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-shot strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-social {
  margin-top: 0;
}

.social-editor label {
  grid-template-columns: 100px minmax(140px, 0.6fr) minmax(180px, 1fr);
  gap: 8px;
  align-items: center;
}

.mail-admin {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 16px;
}

.mail-controls {
  display: grid;
  gap: 10px;
}

.mail-body {
  grid-template-columns: 1fr;
}

.mail-preview {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(0, 51, 102, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.download-card .action {
  display: inline-grid;
  place-items: center;
  width: max-content;
  text-decoration: none;
}

.home-layout {
  display: grid;
  grid-template-columns: 184px minmax(0, 1fr) 206px;
  gap: 14px;
  align-items: start;
}

.home-sidebar,
.home-main {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.home-box,
.welcome-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(54, 58, 62, 0.88);
  border-radius: 5px;
  background:
    linear-gradient(180deg, rgba(43, 48, 55, 0.86), rgba(16, 19, 22, 0.95));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035), 0 14px 34px rgba(0, 0, 0, 0.22);
}

.home-box::after,
.welcome-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent, rgba(252, 209, 63, 0.045), transparent),
    repeating-linear-gradient(0deg, transparent 0 5px, rgba(255, 255, 255, 0.018) 5px 6px);
  pointer-events: none;
  opacity: 0.65;
}

.home-box > *,
.welcome-panel > * {
  position: relative;
  z-index: 1;
}

.home-box h3 {
  margin: 0;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(252, 209, 63, 0.18);
  color: #f4f0d2;
  font-size: 1rem;
  line-height: 1;
  background:
    linear-gradient(90deg, rgba(132, 31, 22, 0.96), rgba(59, 16, 14, 0.95) 52%, rgba(16, 19, 22, 0.98));
  text-shadow: 0 1px 0 #000;
}

.home-box ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 9px;
  list-style: none;
}

.home-box li {
  min-width: 0;
}

.home-box button {
  display: grid;
  gap: 2px;
  width: 100%;
  min-height: 34px;
  padding: 7px 8px;
  border: 1px solid rgba(54, 58, 62, 0.66);
  border-radius: 4px;
  background: rgba(16, 19, 22, 0.48);
  color: var(--accent);
  text-align: left;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.home-box button:hover {
  transform: translateX(3px);
  border-color: rgba(252, 209, 63, 0.48);
  background: rgba(43, 48, 55, 0.9);
  color: #f4f0d2;
}

.home-box button span {
  overflow: hidden;
  color: inherit;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-box button small,
.home-box p {
  margin: 0;
  color: var(--muted);
  font-size: 0.73rem;
}

.stat-card {
  padding-bottom: 12px;
  text-align: center;
}

.stat-card strong {
  display: block;
  padding-top: 12px;
  color: #f4f0d2;
  font-size: 2.8rem;
  line-height: 1;
}

.stat-card p {
  padding: 0 10px;
}

.stats-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.9fr);
  gap: 16px;
}

.stats-chart {
  min-height: 260px;
}

.timeline-chart {
  display: grid;
  grid-template-columns: repeat(30, minmax(6px, 1fr));
  align-items: end;
  gap: 5px;
  min-height: 170px;
  padding-top: 18px;
}

.timeline-chart span {
  display: grid;
  align-items: end;
  gap: 6px;
  min-width: 0;
}

.timeline-chart i {
  display: block;
  height: var(--bar);
  min-height: 8px;
  border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, rgba(252, 209, 63, 0.95), rgba(255, 127, 0, 0.72));
}

.timeline-chart small {
  color: var(--muted);
  font-size: 0.68rem;
  text-align: center;
}

.top-bars {
  display: grid;
  gap: 10px;
}

.top-bar {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 42px;
  gap: 10px;
  align-items: center;
  position: relative;
  overflow: hidden;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 7px;
  background: rgba(16, 19, 22, 0.46);
}

.top-bar::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--bar);
  background: rgba(252, 209, 63, 0.14);
}

.top-bar span,
.top-bar strong,
.top-bar b {
  position: relative;
  z-index: 1;
}

.top-bar span,
.activity-row span {
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
}

.top-bar strong,
.activity-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-card {
  margin-top: 16px;
}

.activity-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 38px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.activity-row small {
  color: var(--muted);
}

.welcome-panel {
  min-height: 238px;
  padding: clamp(24px, 4vw, 42px);
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 127, 0, 0.22), transparent 18rem),
    linear-gradient(135deg, rgba(43, 48, 55, 0.92), rgba(16, 19, 22, 0.96));
}

.welcome-panel h1 {
  max-width: 760px;
  margin: 0 0 14px;
  color: #f4f0d2;
  font-size: clamp(2.7rem, 5.8vw, 5.6rem);
  line-height: 0.92;
  overflow-wrap: anywhere;
  text-shadow: 0 2px 0 #000, 0 0 34px rgba(252, 209, 63, 0.14);
}

.welcome-panel p {
  max-width: 740px;
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.7;
}

.welcome-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.forum-news .home-box button,
.forum-news button {
  min-height: 48px;
}

.mini-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
  padding: 10px;
}

.mini-calendar span,
.mini-calendar b {
  display: grid;
  place-items: center;
  min-height: 22px;
  border: 1px solid rgba(54, 58, 62, 0.7);
  border-radius: 3px;
  color: var(--muted);
  background: rgba(16, 19, 22, 0.38);
  font-size: 0.66rem;
}

.mini-calendar span {
  color: var(--accent);
  font-weight: 800;
}

.mini-calendar b:nth-child(7n),
.mini-calendar b:nth-child(7n + 1) {
  color: #f4f0d2;
  background: rgba(132, 31, 22, 0.32);
}

.home-portal {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: start;
}

.portal-main {
  display: grid;
  gap: 20px;
}

.portal-side {
  display: grid;
  gap: 14px;
  position: sticky;
  top: 160px;
}

.portal-box {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(54, 58, 62, 0.84);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(43, 48, 55, 0.82), rgba(16, 19, 22, 0.94));
}

.portal-box h3 {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 1.25rem;
}

.portal-box button {
  min-height: 38px;
  border: 1px solid rgba(54, 58, 62, 0.9);
  border-radius: 6px;
  background: rgba(31, 34, 39, 0.88);
  color: #f4f0d2;
  text-align: left;
  padding: 0 12px;
}

.portal-box button:hover {
  border-color: rgba(252, 209, 63, 0.52);
  background: rgba(43, 48, 55, 0.98);
}

.status-box strong {
  color: #f4f0d2;
  font-size: 3.4rem;
  line-height: 1;
}

.status-box p,
.status-box span {
  margin: 0;
  color: var(--muted);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 0 0 12px;
  border-bottom: 1px solid rgba(54, 58, 62, 0.72);
  background: transparent;
}

.section-head h2 {
  margin: 0;
  color: #f4f0d2;
  font-size: clamp(2.3rem, 4.8vw, 4.7rem);
  line-height: 0.95;
}

.area-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 14px;
}

.area-panel {
  position: relative;
  display: grid;
  align-content: end;
  gap: 14px;
  min-height: 270px;
  padding: 24px;
  border: 1px solid rgba(54, 58, 62, 0.84);
  border-radius: 8px;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 0%, rgba(252, 209, 63, 0.16), transparent 18rem),
    linear-gradient(145deg, rgba(43, 48, 55, 0.92), rgba(16, 19, 22, 0.96));
}

.area-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent, rgba(162, 194, 213, 0.05), transparent),
    repeating-linear-gradient(90deg, transparent 0 18px, rgba(252, 209, 63, 0.035) 18px 19px);
  pointer-events: none;
}

.area-panel > * {
  position: relative;
}

.area-panel h2 {
  margin: 0;
  color: #f4f0d2;
  font-size: clamp(1.8rem, 3vw, 3.4rem);
  line-height: 1;
}

.area-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.primary-area {
  min-height: 320px;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 127, 0, 0.18), transparent 20rem),
    linear-gradient(145deg, rgba(43, 48, 55, 0.98), rgba(16, 19, 22, 0.96));
}

.latest-forum {
  display: grid;
  gap: 14px;
}

.news-block {
  display: grid;
  gap: 14px;
}

.compact-head h2 {
  font-size: clamp(1.9rem, 3.4vw, 3.5rem);
}

.news-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

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

.latest-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 86px;
  padding: 16px;
  border: 1px solid rgba(54, 58, 62, 0.84);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(43, 48, 55, 0.72), rgba(31, 34, 39, 0.92));
  text-align: left;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.latest-item:hover {
  transform: translateY(-2px);
  border-color: rgba(252, 209, 63, 0.5);
  background: linear-gradient(180deg, rgba(50, 55, 63, 0.95), rgba(36, 40, 47, 0.98));
}

.latest-item strong {
  display: block;
  color: #f4f0d2;
  font-size: 1rem;
}

.latest-item small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}

.latest-item b {
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  border: 1px solid rgba(252, 209, 63, 0.28);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(16, 19, 22, 0.44);
}

.forum-tools {
  display: grid;
  padding: 16px;
  border: 1px solid rgba(54, 58, 62, 0.74);
  border-radius: 8px;
  background: rgba(31, 34, 39, 0.52);
}

.forum-tools label {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.forum-tools input {
  min-height: 44px;
  border: 1px solid rgba(54, 58, 62, 0.9);
  border-radius: 8px;
  padding: 0 14px;
  background: #101316;
  color: #f4f0d2;
}

.grid,
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.card,
.forum-section,
.thread,
.post,
.shout {
  border: 1px solid rgba(54, 58, 62, 0.84);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(43, 48, 55, 0.82), rgba(31, 34, 39, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  overflow: hidden;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease, background 220ms ease;
}

.card:hover,
.forum-section:hover,
.thread:hover,
.post:hover,
.shout:hover {
  transform: translateY(-3px);
  border-color: rgba(252, 209, 63, 0.48);
  background:
    linear-gradient(180deg, rgba(50, 55, 63, 0.92), rgba(36, 40, 47, 0.98));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28), 0 0 30px rgba(252, 209, 63, 0.06);
}

.card {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.card h3,
.thread h3,
.post h3 {
  margin: 0;
  color: #f4f0d2;
  font-size: 1.02rem;
  text-decoration: none;
}

.card p,
.legacy-text {
  color: var(--text);
  line-height: 1.62;
}

.meta {
  color: var(--muted);
  font-size: 0.82rem;
}

.forum-board,
.thread-list,
.shout-stream {
  display: grid;
  gap: 14px;
  border: 0;
  background: transparent;
}

.forum-section header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  min-height: auto;
  padding: 18px;
  border: 0;
  border-bottom: 1px solid rgba(54, 58, 62, 0.78);
  background: linear-gradient(90deg, rgba(252, 209, 63, 0.1), transparent);
}

.forum-section h3 {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 1.18rem;
}

.forum-section h3::before {
  content: "";
}

.forum-section p {
  margin: 0;
  color: var(--muted);
}

.forum-section-stats {
  display: grid;
  justify-items: end;
  gap: 2px;
  color: var(--muted);
}

.forum-section-stats b,
.channel-stats b,
.thread-metrics b {
  color: var(--accent);
}

.forum-channel-list {
  display: grid;
  width: 100%;
  border-collapse: initial;
}

.forum-channel {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 76px;
  padding: 14px 18px;
  border: 0;
  border-bottom: 1px solid rgba(54, 58, 62, 0.58);
  background: rgba(31, 34, 39, 0.56);
  text-align: left;
}

.forum-channel:last-child {
  border-bottom: 0;
}

.forum-channel:hover {
  background: rgba(43, 48, 55, 0.92);
}

.forum-channel strong {
  color: #f4f0d2;
  font-size: 1rem;
  text-decoration: none;
}

.forum-channel small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.channel-pulse {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--accent-cool);
  box-shadow: 0 0 18px rgba(162, 194, 213, 0.52), inset 0 0 0 4px rgba(16, 19, 22, 0.72);
}

.channel-stats {
  display: grid;
  justify-items: end;
  min-width: 92px;
}

.thread {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-bottom: 0;
}

.thread-row {
  width: 100%;
  min-height: 92px;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.thread-row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.thread-open {
  display: grid;
  place-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(255, 127, 0, 0.72);
  border-radius: 6px;
  color: #101316;
  background: linear-gradient(135deg, #fcd13f, #ff7f00);
  font-size: 0.86rem;
  font-weight: 800;
}

.thread-actions,
.inline-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.thread-actions {
  justify-content: flex-end;
}

.thread-actions select {
  min-height: 38px;
  max-width: min(280px, 52vw);
  border: 1px solid rgba(0, 51, 102, 0.22);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
}

.action.danger {
  border-color: rgba(176, 0, 32, 0.36);
  color: #fff;
  background: linear-gradient(135deg, #b00020, #cc6600);
}

.status-card {
  border-top-width: 4px;
  border-top-color: currentColor;
}

.thread.stacked {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.thread-icon {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--accent-cool);
  color: #101316;
  font-size: 0;
}

.thread-metrics {
  display: flex;
  gap: 14px;
  color: var(--muted);
  white-space: nowrap;
}

.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  padding: 12px;
  color: var(--muted);
}

.pager .action:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  transform: none;
}

.post {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 0;
}

.post aside {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px;
  border-right: 1px solid rgba(54, 58, 62, 0.74);
  background: rgba(16, 19, 22, 0.35);
}

.post aside strong,
.shout strong {
  color: var(--member);
}

.user-link {
  position: relative;
  display: inline-grid;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #336699;
  font: inherit;
  font-weight: 900;
  text-align: inherit;
  text-decoration: none;
  vertical-align: baseline;
}

.user-link span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-link:not([data-user-static]):hover span,
.user-link:not([data-user-static]):focus-visible span {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.user-link em {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 20;
  min-width: 180px;
  max-width: 260px;
  padding: 9px 11px;
  border: 1px solid rgba(0, 51, 102, 0.22);
  border-radius: 7px;
  background: rgba(249, 249, 249, 0.98);
  color: var(--text);
  box-shadow: 0 12px 30px rgba(0, 22, 51, 0.22);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  transform: translate(-50%, 4px);
  transition: opacity 150ms ease, transform 150ms ease;
}

.user-link:hover em,
.user-link:focus-visible em {
  opacity: 1;
  transform: translate(-50%, 0);
}

.status-admin,
.status-admin span {
  color: #b00020;
}

.status-mod,
.status-mod span {
  color: #7b3ff2;
}

.status-vip,
.status-vip span {
  color: #cc6600;
}

.status-member,
.status-member span {
  color: #006b5c;
}

.status-user,
.status-user span {
  color: #336699;
}

.status-guest,
.status-guest span {
  color: #64748b;
}

.role-badge {
  width: max-content;
  padding: 4px 8px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.72rem;
  opacity: 0.92;
}

.post section {
  padding: 18px;
}

.conversation {
  display: grid;
  gap: 18px;
}

.chat-entry {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.chat-entry:hover {
  transform: none;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.chat-entry.post-highlight {
  border-color: var(--accent);
  background: rgba(245, 179, 53, 0.06);
}

.chat-entry.from-right {
  grid-template-columns: minmax(0, 1fr) 112px;
}

.chat-entry.from-right .chat-author {
  grid-column: 2;
}

.chat-entry.from-right .chat-bubble {
  grid-column: 1;
  grid-row: 1;
}

.chat-author {
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 12px 8px;
  border: 1px solid rgba(54, 58, 62, 0.78);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(132, 31, 22, 0.18), transparent),
    rgba(16, 19, 22, 0.62);
  text-align: center;
}

.chat-author strong {
  max-width: 100%;
  overflow: hidden;
  color: var(--member);
  font-size: 0.9rem;
  text-overflow: ellipsis;
}

.chat-bubble {
  position: relative;
  min-height: 112px;
  padding: 18px;
  border: 1px solid rgba(54, 58, 62, 0.88);
  border-radius: 8px;
  background:
    radial-gradient(circle at 0% 0%, rgba(252, 209, 63, 0.1), transparent 18rem),
    linear-gradient(180deg, rgba(43, 48, 55, 0.9), rgba(31, 34, 39, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 18px 44px rgba(0, 0, 0, 0.22);
}

.chat-bubble::before {
  content: "";
  position: absolute;
  top: 26px;
  left: -10px;
  width: 18px;
  height: 18px;
  border-left: 1px solid rgba(54, 58, 62, 0.88);
  border-bottom: 1px solid rgba(54, 58, 62, 0.88);
  background: rgba(43, 48, 55, 0.94);
  transform: rotate(45deg);
}

.from-right .chat-bubble::before {
  right: -10px;
  left: auto;
  border: 0;
  border-top: 1px solid rgba(54, 58, 62, 0.88);
  border-right: 1px solid rgba(54, 58, 62, 0.88);
}

.guestbook-entry .chat-bubble,
.shout .chat-bubble {
  min-height: 86px;
}

.signature {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid rgba(54, 58, 62, 0.7);
  color: var(--muted);
  font-size: 0.86rem;
}

.avatar {
  width: 72px;
  height: 72px;
  border: 1px solid rgba(252, 209, 63, 0.22);
  border-radius: 8px;
  background: #101316;
  object-fit: cover;
}

.avatar-placeholder {
  display: grid;
  place-items: center;
  border: 1px solid rgba(252, 209, 63, 0.36);
  color: #101316;
  background: linear-gradient(135deg, #fcd13f, #ff7f00);
  font-weight: 900;
}

.legacy-text a {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.legacy-text a:hover {
  color: #f4f0d2;
}

.legacy-text blockquote {
  margin: 12px 0;
  padding: 12px 14px;
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  background: rgba(16, 19, 22, 0.52);
  color: var(--muted);
}

.legacy-text blockquote cite {
  display: block;
  margin-bottom: 6px;
  color: var(--accent);
  font-style: normal;
  font-weight: 800;
}

.legacy-text .align-center,
.legacy-text .align-left,
.legacy-text .align-right,
.legacy-text .align-justify {
  display: block;
}

.legacy-text .align-center {
  text-align: center;
}

.legacy-text .align-right {
  text-align: right;
}

.legacy-text .align-justify {
  text-align: justify;
}

.legacy-text .bb-hr {
  height: 1px;
  margin: 14px 0;
  border: 0;
  background: linear-gradient(90deg, transparent, rgba(224, 190, 111, 0.62), transparent);
}

.legacy-text .bb-list {
  margin: 10px 0 10px 22px;
  padding: 0;
}

.legacy-text .bb-list li {
  margin: 4px 0;
}

.legacy-text .bb-big {
  font-size: 1.18em;
}

.legacy-text pre {
  max-width: 100%;
  overflow: auto;
  margin: 12px 0;
  padding: 14px;
  border: 1px solid rgba(54, 58, 62, 0.84);
  border-radius: 6px;
  background: #101316;
  color: #f4f0d2;
}

.legacy-inline-image {
  display: block;
  max-width: min(100%, 680px);
  max-height: 520px;
  margin: 12px 0;
  border: 1px solid rgba(54, 58, 62, 0.84);
  border-radius: 6px;
  object-fit: contain;
}

.admin-grid,
.admin-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: 16px;
}

.admin-dashboard {
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
}

.admin-wide {
  grid-column: 1 / -1;
}

.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  grid-column: 1 / -1;
}

.admin-kpi {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(54, 58, 62, 0.72);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(43, 48, 55, 0.78), rgba(31, 34, 39, 0.94));
}

.admin-kpi span,
.admin-kpi small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-kpi strong {
  color: #f4f0d2;
  font-size: clamp(1.8rem, 4vw, 3.1rem);
  line-height: 1;
}

.admin-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(54, 58, 62, 0.84);
  border-radius: 8px;
  background:
    radial-gradient(circle at 0 0, rgba(252, 209, 63, 0.1), transparent 18rem),
    linear-gradient(180deg, rgba(43, 48, 55, 0.82), rgba(31, 34, 39, 0.94));
}

.admin-panel h3 {
  margin: 0;
  color: #f4f0d2;
  font-size: 1.35rem;
}

.audit-list,
.admin-module-list {
  display: grid;
  gap: 8px;
}

.audit-row,
.admin-module-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid rgba(54, 58, 62, 0.72);
  border-radius: 6px;
  background: rgba(16, 19, 22, 0.42);
}

.audit-row.as-button {
  width: 100%;
  color: inherit;
  text-align: left;
}

.admin-tabs {
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(54, 58, 62, 0.72);
}

.audit-row strong,
.admin-module-list strong {
  overflow: hidden;
  color: var(--accent);
  text-overflow: ellipsis;
}

.audit-row span,
.admin-module-list span {
  color: var(--muted);
  font-size: 0.84rem;
}

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

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-editor {
  display: grid;
  gap: 12px;
}

.admin-editor h4 {
  margin: 0;
  color: var(--accent);
  font-size: 1rem;
}

.admin-edit-list {
  display: grid;
  gap: 10px;
  max-height: 720px;
  overflow: auto;
  padding-right: 4px;
}

.admin-edit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(54, 58, 62, 0.72);
  border-radius: 8px;
  background: rgba(16, 19, 22, 0.42);
}

.admin-edit-row input,
.admin-edit-row textarea,
.admin-edit-row select,
.profile-game-row select {
  grid-column: 1 / -1;
  width: 100%;
  border: 1px solid rgba(54, 58, 62, 0.84);
  border-radius: 6px;
  padding: 9px 10px;
  background: rgba(16, 19, 22, 0.72);
  color: #f4f0d2;
}

.admin-edit-row.saved {
  border-color: rgba(0, 255, 204, 0.64);
  box-shadow: 0 0 24px rgba(0, 255, 204, 0.12);
}

.admin-edit-row.warning {
  border-color: rgba(255, 127, 0, 0.66);
  box-shadow: 0 0 24px rgba(255, 127, 0, 0.1);
}

.article-card {
  width: 100%;
  text-align: left;
}

.article-detail {
  padding: clamp(18px, 3vw, 34px);
  border: 1px solid rgba(54, 58, 62, 0.84);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(43, 48, 55, 0.72), rgba(31, 34, 39, 0.94));
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.archive-tile,
.war-card,
.toplist-row {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 18px;
  border: 1px solid rgba(54, 58, 62, 0.84);
  border-radius: 8px;
  background:
    radial-gradient(circle at 0 0, rgba(252, 209, 63, 0.1), transparent 14rem),
    linear-gradient(180deg, rgba(43, 48, 55, 0.82), rgba(31, 34, 39, 0.94));
  color: var(--text);
  text-align: left;
  text-decoration: none;
}

.archive-tile strong,
.war-card strong,
.toplist-row strong {
  color: #f4f0d2;
  font-size: 1.16rem;
}

.archive-tile span,
.war-card span,
.war-card small,
.toplist-row small,
.toplist-row em {
  color: var(--muted);
  font-style: normal;
}

.archive-tile:hover,
.war-card:hover,
.toplist-row:hover {
  transform: translateY(-2px);
  border-color: rgba(252, 209, 63, 0.5);
}

.war-timeline,
.toplist,
.faq-list {
  display: grid;
  gap: 12px;
}

.toplist-row {
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
}

.toplist-row > b {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  color: #101316;
  background: linear-gradient(135deg, #fcd13f, #ff7f00);
}

.poll-bar {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  overflow: hidden;
  padding: 9px 10px;
  border: 1px solid rgba(54, 58, 62, 0.72);
  border-radius: 6px;
  background: rgba(16, 19, 22, 0.48);
}

.poll-bar span {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 0;
  min-width: 2px;
  background: linear-gradient(90deg, rgba(252, 209, 63, 0.36), rgba(255, 127, 0, 0.18));
}

.poll-bar b,
.poll-bar em {
  position: relative;
  z-index: 1;
  color: #f4f0d2;
  font-style: normal;
}

.login-dialog {
  width: min(440px, calc(100vw - 24px));
  border: 1px solid rgba(252, 209, 63, 0.32);
  border-radius: 10px;
  padding: 0;
  background: rgba(16, 19, 22, 0.96);
  color: var(--text);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.54);
}

.login-dialog::backdrop {
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(6px);
}

.login-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.login-panel header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.login-panel header strong {
  color: #f4f0d2;
  font-size: 1.25rem;
}

.login-panel header button {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(54, 58, 62, 0.9);
  border-radius: 6px;
  background: rgba(31, 34, 39, 0.88);
  color: var(--accent);
}

.login-panel label {
  display: grid;
  gap: 6px;
}

.login-panel label span,
.login-panel p {
  color: var(--muted);
  font-size: 0.84rem;
}

.login-panel input {
  min-height: 42px;
  border: 1px solid rgba(54, 58, 62, 0.9);
  border-radius: 7px;
  padding: 0 12px;
  background: rgba(16, 19, 22, 0.78);
  color: #f4f0d2;
}

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

.password-control button {
  min-height: 42px;
  border: 1px solid rgba(54, 58, 62, 0.9);
  border-radius: 7px;
  padding: 0 10px;
  background: rgba(31, 34, 39, 0.88);
  color: var(--accent);
}

.login-error {
  padding: 10px;
  border: 1px solid rgba(191, 0, 0, 0.5);
  border-radius: 7px;
  color: #f4b0a8;
  background: rgba(191, 0, 0, 0.12);
}

.media-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 1px solid rgba(54, 58, 62, 0.78);
  border-radius: 8px;
  background: #101316;
}

.shout {
  display: grid;
  grid-template-columns: 150px 170px minmax(0, 1fr);
  gap: 14px;
  align-items: baseline;
  padding: 14px 16px;
}

.loader,
.empty,
.error {
  padding: 22px;
  border: 1px solid rgba(54, 58, 62, 0.78);
  border-radius: 8px;
  background: rgba(31, 34, 39, 0.75);
  color: var(--muted);
}

.error {
  border-color: rgba(191, 0, 0, 0.7);
  color: #f4b0a8;
}

.empty.compact {
  padding: 12px;
}

.reveal {
  opacity: 0.58;
  transform: translateY(18px) scale(0.992);
  transition: opacity 700ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .nav button,
  .action,
  .login-chip,
  .quick-link,
  .card,
  .forum-section,
  .thread,
  .post,
  .shout {
    transition: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 1100px) {
  body:has(.shout-rail) {
    padding-right: 0;
    padding-bottom: 248px;
  }

  .shout-rail {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 248px;
    border-left: 0;
    border-top: 1px solid rgba(252, 209, 63, 0.18);
  }

  .rail-form {
    grid-template-columns: 130px minmax(0, 1fr) auto;
  }

  .rail-form textarea {
    min-height: 38px;
    max-height: 62px;
  }

  .rail-messages {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    overflow-x: auto;
  }

  .header-banner {
    display: block;
  }

  .header-status {
    right: 12px;
    bottom: 10px;
  }

  .header-navline {
    grid-template-columns: 1fr;
  }

  .nav {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .quick-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .area-grid,
  .latest-list,
  .home-portal,
  .admin-grid,
  .admin-dashboard,
  .home-layout,
  .profile-hero,
  .profile-layout,
  .profile-content-grid,
  .mail-admin,
  .game-hero {
    grid-template-columns: 1fr;
  }

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

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

  .profile-hero-copy {
    border-left: 0;
    border-top: 1px solid rgba(0, 51, 102, 0.16);
  }

  .home-sidebar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .home-main {
    order: -2;
  }

  .home-left {
    order: -1;
  }

  .portal-side {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  body:has(.shout-rail) {
    padding-bottom: 286px;
  }

  .shout-rail {
    height: 286px;
    padding: 8px;
  }

  .rail-form {
    grid-template-columns: 1fr auto;
  }

  .rail-form input {
    grid-column: 1 / -1;
  }

  .topbar {
    position: relative;
    width: 100%;
    border-left: 0;
    border-right: 0;
  }

  .brand small,
  .header-status {
    display: none;
  }

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

  .header-navline .global-search {
    grid-column: 1 / -1;
    order: 3;
  }

  .login-chip {
    min-width: 72px;
    min-height: 36px;
    padding: 0 12px;
    justify-self: end;
    white-space: nowrap;
  }

  .brand img {
    min-height: 82px;
  }

  .hero {
    padding: 34px 14px 24px;
  }

  .hero-visual {
    min-height: 230px;
  }

  .hero-visual img {
    min-height: 230px;
  }

  .breadcrumbs {
    padding: 10px 14px 0;
  }

  .profile-identity {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .profile-identity .avatar {
    width: 76px;
    height: 76px;
  }

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

  .activity-item,
  .profile-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .activity-item > span {
    max-width: 100%;
  }

  .profile-side-panel dl {
    grid-template-columns: 1fr;
  }

  .profile-game-row,
  .admin-game-row,
  .game-suggestion,
  .game-picker,
  .game-create,
  .admin-game-create,
  .admin-kpi-grid {
    grid-template-columns: 1fr;
  }

  .profile-game-thumb,
  .game-suggestion > span {
    width: 100%;
  }

  .quick-nav {
    grid-template-columns: 1fr;
    padding: 0 14px 24px;
  }

  .content {
    padding: 12px 10px 48px;
  }

  .view-panel {
    padding: 14px;
    overflow-x: hidden;
  }

  .section-head,
  .forum-section header,
  .forum-channel,
  .thread,
  .post,
  .shout,
  .chat-entry,
  .chat-entry.from-right {
    grid-template-columns: 1fr;
  }

  .chat-entry.from-right .chat-author,
  .chat-entry.from-right .chat-bubble {
    grid-column: auto;
    grid-row: auto;
  }

  .chat-entry.from-right .chat-author {
    justify-self: end;
  }

  .chat-author {
    grid-template-columns: 52px minmax(0, auto);
    justify-content: start;
    justify-items: start;
    width: min(100%, 250px);
    text-align: left;
  }

  .chat-author .avatar {
    grid-row: span 3;
    width: 52px;
    height: 52px;
  }

  .chat-bubble::before,
  .from-right .chat-bubble::before {
    top: -9px;
    left: 30px;
    right: auto;
    border: 0;
    border-top: 1px solid rgba(54, 58, 62, 0.88);
    border-left: 1px solid rgba(54, 58, 62, 0.88);
  }

  .from-right .chat-bubble::before {
    left: auto;
    right: 30px;
  }

  .section-head {
    flex-direction: column;
    align-items: stretch;
  }

  .section-head .action {
    width: max-content;
    max-width: 100%;
  }

  .admin-actions .action,
  .admin-tabs .action,
  .admin-editor button,
  [data-cleanup-testdata] {
    scroll-margin-top: 160px;
    scroll-margin-bottom: 330px;
  }

  .forum-section-stats,
  .channel-stats {
    justify-items: start;
  }

  .post aside {
    border-right: 0;
    border-bottom: 1px solid rgba(54, 58, 62, 0.74);
  }

  .thread-metrics {
    flex-wrap: wrap;
    white-space: normal;
  }

  .thread-open {
    width: max-content;
  }

  .audit-row {
    grid-template-columns: 1fr;
  }

  .toplist-row {
    grid-template-columns: 1fr;
  }

  .portal-side {
    grid-template-columns: 1fr;
  }

  .home-sidebar {
    grid-template-columns: 1fr;
  }

  .welcome-panel {
    min-height: 0;
    padding: 22px 16px;
  }

  .welcome-panel h1 {
    max-width: calc(100vw - 72px);
    font-size: clamp(2rem, 9.4vw, 2.65rem);
  }

  .section-head h2 {
    max-width: calc(100vw - 72px);
    font-size: clamp(2rem, 9.4vw, 2.65rem);
    overflow-wrap: anywhere;
  }
}

/* Final UI overrides: loaded last so profile and admin polish wins over legacy sections. */
.profile-hero,
.profile-main-panel,
.profile-side-panel section,
.profile-content-grid > article,
.profile-stat,
.profile-game,
.profile-game-row,
.game-suggestion,
.games-match-panel {
  border-color: rgba(54, 58, 62, 0.82);
  background: linear-gradient(180deg, rgba(43, 48, 55, 0.78), rgba(20, 23, 27, 0.94));
  box-shadow: inset 0 0 0 1px rgba(244, 240, 210, 0.035);
}

.profile-hero {
  background:
    radial-gradient(circle at 0 0, rgba(252, 209, 63, 0.09), transparent 28rem),
    linear-gradient(180deg, rgba(43, 48, 55, 0.86), rgba(16, 19, 22, 0.96));
}

.profile-hero-copy,
.game-editor,
.social-editor {
  border-color: rgba(54, 58, 62, 0.82);
}

.profile-hero-copy strong,
.profile-side-panel h3,
.profile-content-grid h3,
.profile-stat strong,
.activity-item b,
.profile-game strong,
.profile-game-row strong,
.game-suggestion strong {
  color: #f4f0d2;
}

.profile-stat,
.profile-badges span:not(.role-badge) {
  background: rgba(16, 19, 22, 0.38);
}

.profile-game-strip {
  grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
}

.profile-game {
  min-height: 184px;
  align-content: start;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.profile-game:hover,
.profile-game:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(252, 209, 63, 0.42);
  background: linear-gradient(180deg, rgba(50, 55, 63, 0.9), rgba(20, 23, 27, 0.98));
}

.profile-game > div,
.profile-game-thumb,
.game-suggestion > span,
.game-cover {
  background: linear-gradient(135deg, rgba(252, 209, 63, 0.18), rgba(162, 194, 213, 0.12));
  color: #f4f0d2;
}

.profile-game-list {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.profile-game-row {
  position: relative;
  grid-template-columns: 86px minmax(0, 1fr);
  min-height: 106px;
  align-items: center;
}

.profile-game-row select,
.profile-game-row .checkline,
.profile-game-row .admin-icon-button,
.profile-game-row .action {
  grid-column: auto;
}

.match-results {
  min-width: 0;
}

.match-user-list {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.match-user {
  min-width: 0;
  border-color: rgba(54, 58, 62, 0.82);
  background: rgba(16, 19, 22, 0.5);
}

.match-user:hover,
.match-user:focus-visible {
  border-color: rgba(162, 194, 213, 0.42);
  background: rgba(31, 34, 39, 0.78);
}

.compose-dialog {
  width: min(760px, calc(100vw - 24px));
  border: 1px solid rgba(252, 209, 63, 0.28);
  border-radius: 10px;
  padding: 0;
  background: rgba(16, 19, 22, 0.98);
  color: var(--text);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.56);
}

.compose-dialog::backdrop {
  background: rgba(0, 0, 0, 0.64);
  backdrop-filter: blur(6px);
}

.compose-panel {
  display: grid;
  gap: 12px;
  padding: 18px;
}

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

.compose-panel header strong {
  display: block;
  color: #f4f0d2;
  font-size: 1.18rem;
}

.compose-panel input,
.compose-panel textarea {
  width: 100%;
}

.thread-title-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: #f4f0d2;
  font: inherit;
  text-align: left;
}

.thread-row:hover .thread-title-link,
.thread-title-link:focus-visible {
  color: var(--accent);
}

.admin-icon-button {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  min-width: 26px;
  border: 1px solid rgba(162, 194, 213, 0.2);
  border-radius: 999px;
  background: rgba(16, 19, 22, 0.34);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1;
}

.admin-icon-button:hover,
.admin-icon-button:focus-visible {
  border-color: rgba(162, 194, 213, 0.56);
  color: #f4f0d2;
  background: rgba(31, 34, 39, 0.92);
}

.admin-icon-button.danger {
  border-color: rgba(191, 0, 0, 0.22);
  color: rgba(255, 180, 180, 0.74);
}

.admin-icon-button.danger:hover,
.admin-icon-button.danger:focus-visible {
  border-color: rgba(191, 0, 0, 0.7);
  color: #fff;
  background: rgba(84, 0, 0, 0.64);
}

.inline-admin-actions {
  justify-content: flex-end;
  opacity: 0.72;
}

.chat-bubble:hover .inline-admin-actions,
.admin-edit-row:hover .inline-admin-actions {
  opacity: 1;
}

.toplist-row {
  grid-template-columns: 48px minmax(110px, 180px) minmax(0, 1fr) auto;
}

.toplist-banner {
  display: grid;
  place-items: center;
  overflow: hidden;
  width: 100%;
  min-height: 48px;
  aspect-ratio: 468 / 60;
  border: 1px solid rgba(54, 58, 62, 0.84);
  border-radius: 6px;
  background: rgba(16, 19, 22, 0.56);
  color: #f4f0d2;
  font-weight: 900;
}

.toplist-banner img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.toplist-admin-row {
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr) auto auto auto;
  align-items: center;
}

.toplist-admin-row small {
  display: block;
  color: var(--muted);
}

.toplist-admin-row.is-marked {
  border-color: rgba(191, 0, 0, 0.5);
}

.toplist-status {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(16, 19, 22, 0.48);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.toplist-status.state-ok {
  color: var(--member);
}

.toplist-status.state-down {
  color: #ffb4b4;
}

.bb-video {
  display: block;
  overflow: hidden;
  width: min(100%, 720px);
  aspect-ratio: 16 / 9;
  margin: 12px 0;
  border: 1px solid rgba(54, 58, 62, 0.84);
  border-radius: 8px;
  background: #101316;
}

.bb-video iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.forum-stats-grid div.status-admin,
.forum-stats-grid div.status-mod,
.forum-stats-grid div.status-vip,
.forum-stats-grid div.status-member,
.forum-stats-grid div.status-user,
.forum-stats-grid div.status-guest {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(54, 58, 62, 0.74);
  border-radius: 8px;
  background: rgba(16, 19, 22, 0.36);
}

@media (max-width: 780px) {
  .toplist-row,
  .toplist-admin-row,
  .profile-game-row {
    grid-template-columns: 1fr;
  }

  .profile-game-thumb {
    width: 100%;
  }
}

/* Header identity and BBCode color overrides: keep these last. */
.legacy-text .bb-color {
  font-weight: 900;
}

.legacy-text .bb-green { color: #72d36c; }
.legacy-text .bb-red { color: #ff8d8d; }
.legacy-text .bb-blue { color: #8bbdff; }
.legacy-text .bb-yellow { color: #f7d85f; }
.legacy-text .bb-orange { color: #ffad5c; }
.legacy-text .bb-purple { color: #cf9cff; }
.legacy-text .bb-gray { color: #b7c0c9; }

.brand {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(160px, 32%);
  gap: clamp(14px, 3vw, 34px);
  align-items: center;
  width: 100%;
  min-height: 142px;
  overflow: hidden;
  padding: clamp(18px, 3.4vw, 34px);
  border: 1px solid rgba(54, 58, 62, 0.9);
  border-radius: 4px;
  background:
    radial-gradient(circle at 16% 24%, rgba(252, 209, 63, 0.18), transparent 19rem),
    linear-gradient(115deg, rgba(244, 240, 210, 0.06), transparent 38%),
    linear-gradient(90deg, rgba(14, 19, 27, 0.98), rgba(31, 34, 39, 0.84) 48%, rgba(9, 15, 24, 0.98));
  box-shadow: inset 0 0 0 1px rgba(244, 240, 210, 0.04), 0 20px 56px rgba(0, 0, 0, 0.24);
  color: #f4f0d2;
}

.brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, rgba(244, 240, 210, 0.045) 0 1px, transparent 1px 44px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 42%);
  opacity: 0.55;
  pointer-events: none;
}

.brand-emblem-wrap,
.brand-copy,
.brand-ornament {
  position: relative;
  z-index: 1;
}

.brand-emblem-wrap {
  display: grid;
  place-items: center;
  width: clamp(88px, 11vw, 132px);
  aspect-ratio: 1;
  border: 1px solid rgba(252, 209, 63, 0.32);
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 28%, rgba(252, 209, 63, 0.22), transparent 64%),
    linear-gradient(180deg, rgba(16, 19, 22, 0.26), rgba(16, 19, 22, 0.78));
  box-shadow: 0 0 0 8px rgba(252, 209, 63, 0.045), 0 24px 52px rgba(0, 0, 0, 0.34);
}

.brand .brand-emblem {
  width: 86%;
  height: 86%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.5));
}

.brand-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.brand-kicker {
  color: rgba(162, 194, 213, 0.82);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand strong {
  color: #f4f0d2;
  font-size: clamp(2.4rem, 7vw, 5.8rem);
  line-height: 0.86;
  text-shadow: 0 14px 28px rgba(0, 0, 0, 0.38), 0 0 22px rgba(252, 209, 63, 0.12);
}

.brand small {
  color: rgba(244, 240, 210, 0.78);
  font-size: clamp(0.86rem, 1.6vw, 1.12rem);
  font-weight: 800;
}

.brand-ornament {
  align-self: stretch;
  min-height: 92px;
  border-left: 1px solid rgba(252, 209, 63, 0.2);
  background:
    linear-gradient(135deg, transparent 0 24%, rgba(252, 209, 63, 0.18) 24% 27%, transparent 27% 46%, rgba(162, 194, 213, 0.13) 46% 49%, transparent 49%),
    radial-gradient(circle at 76% 36%, rgba(252, 209, 63, 0.18), transparent 5rem);
  clip-path: polygon(12% 0, 100% 0, 88% 100%, 0 100%);
}

@media (max-width: 780px) {
  .brand {
    grid-template-columns: auto minmax(0, 1fr);
    min-height: 104px;
    padding: 14px;
  }

  .brand-ornament {
    display: none;
  }

  .brand-emblem-wrap {
    width: 72px;
  }
}

/* Modern clan/member UI pass: calm dark dashboard language. */
:root {
  --bg: #0b0f14;
  --bg-elevated: #0f141c;
  --surface: #121821;
  --surface-soft: #171f2a;
  --surface-hover: #1b2532;
  --border: #253041;
  --border-soft: rgba(143, 154, 170, 0.16);
  --text: #e6eaf0;
  --text-muted: #8f9aaa;
  --text-soft: #687586;
  --accent: #f59e0b;
  --accent-strong: #fbbf24;
  --accent-soft: rgba(245, 158, 11, 0.15);
  --card-radius: 14px;
  --control-radius: 10px;
  --shadow-soft: 0 18px 48px rgba(0, 0, 0, 0.22);
}

html,
body {
  background:
    radial-gradient(circle at 18% 0%, rgba(245, 158, 11, 0.08), transparent 32rem),
    linear-gradient(180deg, #0b0f14 0%, #0d1219 45%, #090d12 100%);
  color: var(--text);
}

body:has(.shout-rail) {
  padding-right: 304px;
}

.shell {
  background: transparent;
}

.shell::before,
.shell::after {
  opacity: 0.45;
}

.topbar {
  width: min(1180px, calc(100% - 24px));
  border: 1px solid var(--border-soft);
  border-top: 0;
  border-radius: 0 0 16px 16px;
  background: rgba(15, 20, 28, 0.9);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(20px);
}

.header-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 10px;
  background: transparent;
}

.header-status {
  position: static;
  display: grid;
  justify-items: end;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: var(--text-soft);
  backdrop-filter: none;
}

.header-status strong {
  color: var(--text-muted);
  font-size: 0.84rem;
}

.header-status span {
  color: var(--text-soft);
  font-size: 0.72rem;
}

.brand {
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  min-height: 76px;
  padding: 12px 14px;
  border: 1px solid var(--border-soft);
  border-radius: var(--card-radius);
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.09), transparent 42%),
    rgba(18, 24, 33, 0.86);
  box-shadow: none;
}

.brand::before {
  opacity: 0.18;
}

.brand-emblem-wrap {
  width: 58px;
  border-radius: 12px;
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(11, 15, 20, 0.62);
  box-shadow: none;
}

.brand .brand-emblem {
  width: 84%;
  height: 84%;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.35));
}

.brand-copy {
  gap: 2px;
}

.brand-kicker {
  color: var(--text-soft);
  font-size: 0.68rem;
}

.brand strong {
  font-size: clamp(1.45rem, 3.1vw, 2.2rem);
  line-height: 1;
  text-shadow: none;
}

.brand small {
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.brand-ornament {
  display: none;
}

.header-navline {
  grid-template-columns: minmax(0, 1fr) minmax(170px, 230px) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-top: 1px solid var(--border-soft);
  background: rgba(11, 15, 20, 0.46);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.nav button,
.login-chip,
.action {
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: var(--control-radius);
  padding: 0 12px;
  background: rgba(23, 31, 42, 0.72);
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 750;
  box-shadow: none;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.nav button:hover,
.login-chip:hover,
.action:hover {
  border-color: rgba(245, 158, 11, 0.28);
  background: var(--surface-hover);
  color: var(--text);
  transform: translateY(-1px);
}

.nav button[aria-selected="true"],
.action.primary,
.rail-form .action.primary {
  border-color: rgba(245, 158, 11, 0.38);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.login-chip.slim,
.action.tiny {
  min-height: 32px;
  padding-inline: 10px;
  font-size: 0.78rem;
}

.global-search {
  gap: 4px;
}

.global-search span {
  color: var(--text-soft);
  font-size: 0.64rem;
}

.global-search input,
.rail-form input,
.rail-form textarea {
  border: 1px solid var(--border-soft);
  border-radius: var(--control-radius);
  background: rgba(11, 15, 20, 0.58);
  color: var(--text);
  outline: none;
}

.global-search input:focus,
.rail-form input:focus,
.rail-form textarea:focus {
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}

.breadcrumbs,
.content {
  width: min(1180px, calc(100% - 24px));
}

.content {
  padding-top: 16px;
}

.view-panel {
  gap: 18px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.section-head,
.profile-main-panel,
.profile-side-panel section,
.profile-content-grid > article,
.profile-stat,
.games-match-panel,
.profile-game,
.profile-game-row,
.activity-item,
.social-links a,
.signature {
  border: 1px solid var(--border-soft);
  border-radius: var(--card-radius);
  background: rgba(18, 24, 33, 0.78);
  box-shadow: none;
}

.profile-screen {
  gap: 16px;
}

.profile-hero {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
  gap: 18px;
  align-items: center;
  padding: clamp(18px, 2.8vw, 28px);
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  background:
    radial-gradient(circle at 12% 20%, rgba(245, 158, 11, 0.14), transparent 22rem),
    linear-gradient(135deg, rgba(23, 31, 42, 0.94), rgba(13, 18, 25, 0.96));
  box-shadow: var(--shadow-soft);
}

.profile-identity {
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 16px;
}

.profile-identity .avatar {
  width: 88px;
  height: 88px;
  border: 2px solid rgba(245, 158, 11, 0.45);
  box-shadow: none;
}

.profile-identity .eyebrow,
.section-head .eyebrow,
.compact-head .eyebrow {
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 850;
}

.profile-identity h2 {
  margin: 2px 0 10px;
  color: var(--text);
  font-size: clamp(2rem, 4.2vw, 3.25rem);
  line-height: 1;
  letter-spacing: 0;
}

.profile-badges {
  gap: 7px;
}

.role-badge,
.profile-badges span:not(.role-badge) {
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 999px;
  padding: 4px 9px;
  background: rgba(245, 158, 11, 0.1);
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 800;
}

.profile-badges span:not(.role-badge) {
  border-color: var(--border-soft);
  background: rgba(143, 154, 170, 0.08);
  color: var(--text-muted);
}

.profile-hero-copy {
  align-content: center;
  gap: 10px;
  padding: 0 0 0 18px;
  border-left: 1px solid var(--border-soft);
  color: var(--text-muted);
}

.profile-hero-copy strong {
  color: var(--text);
  font-size: 0.98rem;
}

.profile-hero-copy p {
  color: var(--text-muted);
}

.profile-stat-grid,
.signal-grid {
  gap: 12px;
}

.profile-stat {
  display: grid;
  align-content: start;
  min-height: 112px;
  padding: 16px;
}

.profile-stat strong {
  color: var(--text);
  font-size: clamp(1.55rem, 2.3vw, 2.15rem);
  line-height: 1;
}

.profile-stat span {
  margin-top: 10px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 800;
}

.profile-stat small {
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 0.75rem;
}

.profile-layout {
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.78fr);
  gap: 16px;
}

.profile-main-panel,
.profile-content-grid > article,
.profile-side-panel section {
  padding: 18px;
}

.profile-side-panel,
.profile-content-grid {
  gap: 16px;
}

.profile-side-panel h3,
.profile-content-grid h3,
.section-head h2,
.section-head h3 {
  color: var(--text);
}

.profile-side-panel h3,
.profile-content-grid h3 {
  margin-bottom: 12px;
  font-size: 1rem;
}

.profile-side-panel dl {
  grid-template-columns: minmax(86px, 0.42fr) minmax(0, 1fr);
  gap: 8px 12px;
}

.profile-side-panel dt {
  color: var(--text-soft);
  font-size: 0.72rem;
}

.profile-side-panel dd {
  color: var(--text-muted);
}

.activity-item {
  background: rgba(15, 20, 28, 0.72);
}

.activity-item b,
.profile-game strong,
.profile-game-row strong {
  color: var(--text);
}

.activity-item small,
.activity-item p,
.profile-game small,
.profile-game-row small,
.profile-section-head .meta {
  color: var(--text-soft);
}

.shout-rail {
  width: 304px;
  padding: 12px;
  border-left: 1px solid var(--border-soft);
  background: rgba(13, 18, 25, 0.94);
  box-shadow: -18px 0 42px rgba(0, 0, 0, 0.2);
}

.shout-rail header {
  padding: 8px 4px 10px;
  border: 0;
  border-bottom: 1px solid var(--border-soft);
  border-radius: 0;
  background: transparent;
}

.shout-rail header strong {
  color: var(--text);
  font-size: 0.95rem;
}

.shout-rail header button {
  min-height: 30px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: rgba(23, 31, 42, 0.62);
  color: var(--text-muted);
}

.rail-form {
  gap: 8px;
  padding-bottom: 6px;
}

.rail-form button {
  border-radius: var(--control-radius);
}

.rail-messages {
  gap: 8px;
  max-height: 100%;
  padding-right: 2px;
}

.rail-message {
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: rgba(18, 24, 33, 0.68);
}

.rail-message .avatar {
  width: 32px;
  height: 32px;
}

.rail-message strong {
  color: var(--text);
  font-size: 0.78rem;
}

.rail-message span {
  color: var(--text-soft);
  font-size: 0.66rem;
}

.rail-message p {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.bb-video,
.legacy-text blockquote,
.legacy-text pre {
  border-color: var(--border-soft);
  border-radius: var(--card-radius);
  background: rgba(11, 15, 20, 0.54);
}

@media (max-width: 1180px) {
  body:has(.shout-rail) {
    padding-right: 0;
  }

  .shout-rail {
    position: static;
    width: min(1180px, calc(100% - 24px));
    height: 420px;
    margin: 0 auto 18px;
    border: 1px solid var(--border-soft);
    border-radius: var(--card-radius);
    box-shadow: none;
  }
}

@media (max-width: 860px) {
  .header-banner,
  .header-navline,
  .profile-hero,
  .profile-layout,
  .profile-content-grid {
    grid-template-columns: 1fr;
  }

  .header-status {
    display: none;
  }

  .global-search {
    max-width: none;
  }

  .profile-hero-copy {
    padding: 16px 0 0;
    border-left: 0;
    border-top: 1px solid var(--border-soft);
  }

  .profile-stat-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

@media (max-width: 620px) {
  body:has(.shout-rail) {
    padding-bottom: 0;
  }

  .topbar,
  .breadcrumbs,
  .content,
  .shout-rail {
    width: calc(100% - 16px);
  }

  .brand {
    min-height: 68px;
    padding: 10px;
  }

  .brand-emblem-wrap {
    width: 48px;
  }

  .brand strong {
    font-size: 1.45rem;
  }

  .brand small,
  .brand-kicker {
    display: block;
  }

  .nav button,
  .login-chip,
  .action {
    min-height: 34px;
    padding-inline: 10px;
  }

  .profile-identity {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .profile-identity .avatar {
    width: 68px;
    height: 68px;
  }

  .profile-identity h2 {
    font-size: 1.8rem;
  }

  .profile-side-panel dl {
    grid-template-columns: 1fr;
  }

  .shout-rail {
    height: 380px;
  }
}

/* Design iteration 2: tighter forum/dashboard composition. */
:root {
  --surface-2: #151c26;
  --surface-3: #1a2431;
  --muted: #8f9aaa;
  --muted-2: #647184;
  --danger: #ef4444;
  --toolbar-h: 38px;
}

body:has(.shout-rail) {
  padding-right: 288px;
}

.topbar {
  border-radius: 0 0 14px 14px;
}

.header-banner {
  min-height: 0;
  padding: 8px 10px 6px;
}

.brand {
  min-height: 64px;
  padding: 9px 12px;
  border-radius: 13px;
  background:
    linear-gradient(115deg, rgba(245, 158, 11, 0.08), transparent 38%),
    rgba(18, 24, 33, 0.78);
}

.brand-emblem-wrap {
  width: 48px;
  border-radius: 11px;
}

.brand strong {
  font-size: clamp(1.28rem, 2.2vw, 1.72rem);
}

.brand small {
  font-size: 0.78rem;
}

.brand-kicker {
  font-size: 0.62rem;
}

.header-status {
  min-width: 220px;
  padding-right: 4px;
}

.header-status strong {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-navline {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px 10px;
}

.nav {
  flex: 1 1 560px;
  align-items: center;
}

.global-search {
  flex: 0 1 220px;
}

.login-chip {
  flex: 0 0 auto;
}

.nav button,
.login-chip,
.action,
.global-search input {
  min-height: var(--toolbar-h);
  border-radius: 11px;
}

.nav button {
  padding-inline: 11px;
}

.nav button[aria-selected="true"] {
  background: rgba(245, 158, 11, 0.12);
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.18);
}

.login-chip.slim {
  min-width: 0;
  color: var(--muted-2);
  background: rgba(20, 28, 38, 0.48);
}

.thread-detail-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  gap: 18px;
  align-items: start;
  padding: 18px;
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  background:
    radial-gradient(circle at 0 0, rgba(245, 158, 11, 0.1), transparent 22rem),
    rgba(18, 24, 33, 0.78);
  box-shadow: none;
}

.thread-detail-head > div:first-child {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  max-width: 780px;
}

.thread-detail-head .eyebrow {
  width: max-content;
  max-width: 100%;
  padding: 4px 8px;
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.09);
  color: var(--accent-strong);
}

.thread-detail-head h2 {
  max-width: 760px;
  margin: 0;
  color: var(--text);
  font-size: clamp(2rem, 4.2vw, 3rem);
  line-height: 1.04;
  overflow-wrap: anywhere;
}

.thread-detail-head .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  color: var(--muted-2);
  font-size: 0.82rem;
}

.thread-actions {
  justify-self: stretch;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  background: rgba(11, 15, 20, 0.42);
}

.thread-actions:empty {
  display: none;
}

.thread-actions select {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: rgba(15, 20, 28, 0.82);
  color: var(--text);
}

.thread-actions .checkline {
  min-height: 34px;
  margin: 0;
  padding: 0 10px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: rgba(23, 31, 42, 0.46);
  color: var(--muted);
  font-size: 0.78rem;
}

.thread-actions .action {
  width: 100%;
  min-height: 36px;
  justify-content: center;
}

.thread-actions .admin-icon-button {
  justify-self: end;
}

.thread-actions [data-open-reply-dialog],
.thread-actions [data-back] {
  grid-column: auto;
}

.thread-actions .confirm-inline {
  grid-column: 1 / -1;
}

.post-conversation {
  gap: 14px;
}

.post-conversation .forum-post-card,
.post-conversation .forum-post-card.from-right {
  grid-template-columns: 148px minmax(0, 1fr);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  background: rgba(18, 24, 33, 0.72);
  box-shadow: none;
}

.post-conversation .forum-post-card:hover {
  border-color: rgba(245, 158, 11, 0.22);
  box-shadow: none;
}

.post-conversation .chat-author,
.post-conversation .forum-post-card.from-right .chat-author {
  gap: 10px;
  padding: 18px 12px;
  border-right: 1px solid var(--border-soft);
  background: rgba(11, 15, 20, 0.32);
}

.post-conversation .chat-author .avatar {
  width: 68px;
  height: 68px;
  border: 1px solid rgba(245, 158, 11, 0.32);
  box-shadow: none;
}

.forum-author-stack {
  gap: 7px;
}

.forum-author-stack .user-link {
  font-size: 0.88rem;
}

.forum-author-stat {
  padding: 3px 7px;
  border-color: var(--border-soft);
  background: rgba(23, 31, 42, 0.5);
  color: var(--muted-2);
  font-size: 0.68rem;
}

.forum-post-header {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(15, 20, 28, 0.42);
}

.forum-post-header .eyebrow {
  color: var(--accent);
  font-size: 0.62rem;
}

.forum-post-header h3 {
  font-size: clamp(1.02rem, 1.5vw, 1.24rem);
  line-height: 1.25;
}

.forum-post-header time {
  padding: 5px 8px;
  border-color: var(--border-soft);
  background: rgba(11, 15, 20, 0.42);
  color: var(--muted-2);
  font-size: 0.7rem;
}

.forum-post-body {
  padding: 18px 20px 22px;
  color: #d9dee6;
  font-size: 0.98rem;
  line-height: 1.72;
}

.post-conversation .signature {
  margin: 0 20px 20px;
}

.shout-rail {
  width: 288px;
  padding: 10px;
  background: rgba(13, 18, 25, 0.9);
  box-shadow: -10px 0 28px rgba(0, 0, 0, 0.16);
}

.shout-rail header {
  padding: 6px 2px 8px;
}

.shout-rail header strong {
  font-size: 0.88rem;
}

.shout-rail header button {
  min-height: 26px;
  padding: 0 9px;
  background: transparent;
  font-size: 0.72rem;
}

.rail-form {
  gap: 6px;
}

.rail-form input,
.rail-form textarea {
  padding: 8px 9px;
  font-size: 0.78rem;
}

.rail-form textarea {
  min-height: 54px;
  max-height: 82px;
}

.rail-form .action.primary {
  min-height: 34px;
  background: rgba(245, 158, 11, 0.11);
}

.rail-message {
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  padding: 8px;
  border-radius: 11px;
}

.rail-message .avatar {
  width: 28px;
  height: 28px;
}

.rail-message strong {
  font-size: 0.74rem;
}

.rail-message span {
  font-size: 0.62rem;
}

.rail-message p {
  font-size: 0.74rem;
  line-height: 1.32;
}

.rail-messages {
  scrollbar-color: rgba(143, 154, 170, 0.24) transparent;
}

.section-head,
.profile-main-panel,
.profile-side-panel section,
.profile-content-grid > article,
.profile-stat,
.games-match-panel,
.profile-game,
.profile-game-row,
.activity-item,
.social-links a,
.signature {
  background: rgba(18, 24, 33, 0.64);
}

.action.danger,
.admin-icon-button.danger {
  border-color: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}

.action.danger:hover,
.admin-icon-button.danger:hover,
.admin-icon-button.danger:focus-visible {
  border-color: rgba(239, 68, 68, 0.48);
  background: rgba(239, 68, 68, 0.12);
  color: #fecaca;
}

@media (max-width: 1100px) {
  body:has(.shout-rail) {
    padding-right: 0;
  }

  .shout-rail {
    position: static;
    width: min(1180px, calc(100% - 24px));
    height: 360px;
    margin: 0 auto 18px;
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    box-shadow: none;
  }
}

@media (max-width: 800px) {
  .header-banner,
  .header-navline,
  .thread-detail-head,
  .post-conversation .forum-post-card,
  .post-conversation .forum-post-card.from-right {
    grid-template-columns: 1fr;
  }

  .header-navline {
    align-items: stretch;
  }

  .nav,
  .global-search {
    flex-basis: 100%;
  }

  .thread-detail-head h2 {
    font-size: clamp(1.7rem, 8vw, 2rem);
    max-width: 100%;
  }

  .thread-actions {
    grid-template-columns: 1fr;
  }

  .post-conversation .chat-author,
  .post-conversation .forum-post-card.from-right .chat-author {
    grid-template-columns: 48px minmax(0, 1fr);
    justify-items: start;
    align-items: center;
    padding: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--border-soft);
  }

  .post-conversation .chat-author .avatar {
    width: 48px;
    height: 48px;
  }

  .forum-author-stack {
    justify-items: start;
    text-align: left;
  }

  .forum-post-header {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .forum-post-header time {
    justify-self: start;
  }
}

/* Iteration 3: premium dark polish, restrained motion and final forum proportions. */
:root {
  --bg: #070a0f;
  --surface: #0d1118;
  --surface-2: #121821;
  --surface-3: #18202b;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #d8dee8;
  --text-strong: #f0f3f7;
  --muted: #8b95a5;
  --muted-2: #5f6876;
  --accent: #f5b335;
  --accent-strong: #f8c65b;
  --accent-soft: rgba(245, 179, 53, 0.14);
  --danger: #ef4444;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --transition-fast: 160ms var(--ease-out);
  --transition-normal: 240ms var(--ease-out);
}

html,
body {
  background:
    radial-gradient(circle at 14% -6%, rgba(245, 179, 53, 0.075), transparent 34rem),
    radial-gradient(circle at 90% 8%, rgba(88, 116, 156, 0.055), transparent 30rem),
    linear-gradient(180deg, var(--bg), #090d13 58%, #06080d);
  color: var(--text);
}

.topbar {
  animation: topbarEnter 350ms var(--ease-out) both;
  border-color: var(--border);
  background: rgba(13, 17, 24, 0.88);
}

@keyframes topbarEnter {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.header-banner {
  grid-template-columns: 1fr;
  padding: 6px 8px 4px;
}

.header-status {
  display: none;
}

.brand {
  min-height: 54px;
  gap: 10px;
  padding: 7px 10px;
  border-color: var(--border);
  border-radius: var(--radius-md);
  background:
    linear-gradient(110deg, rgba(245, 179, 53, 0.065), transparent 34%),
    rgba(18, 24, 33, 0.58);
}

.brand::before {
  opacity: 0.1;
}

.brand-emblem-wrap {
  width: 40px;
  border-color: rgba(245, 179, 53, 0.18);
  border-radius: 10px;
  background: rgba(7, 10, 15, 0.52);
}

.brand .brand-emblem {
  width: 82%;
  height: 82%;
}

.brand-kicker {
  font-size: 0.58rem;
  color: var(--muted-2);
}

.brand strong {
  color: var(--text-strong);
  font-size: clamp(1.1rem, 1.9vw, 1.42rem);
}

.brand small {
  color: var(--muted);
  font-size: 0.72rem;
}

.header-navline {
  gap: 8px;
  padding: 7px 8px 8px;
  border-top-color: var(--border);
  background: rgba(7, 10, 15, 0.34);
}

.nav {
  gap: 5px;
}

.nav button,
.login-chip,
.action,
.global-search input {
  min-height: 34px;
  border-color: transparent;
  border-radius: var(--radius-sm);
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

.nav button,
.login-chip,
.action {
  background: rgba(18, 24, 33, 0.58);
  color: var(--muted);
}

.nav button:hover,
.login-chip:hover,
.action:hover {
  border-color: rgba(245, 179, 53, 0.2);
  background: rgba(24, 32, 43, 0.88);
  color: var(--text-strong);
  transform: translateY(-1px);
}

.nav button:active,
.login-chip:active,
.action:active,
.rail-form .action.primary:active {
  transform: translateY(0);
}

.nav button:focus-visible,
.login-chip:focus-visible,
.action:focus-visible,
.global-search input:focus-visible,
.thread-actions select:focus-visible,
.rail-form input:focus-visible,
.rail-form textarea:focus-visible {
  outline: 0;
  border-color: rgba(245, 179, 53, 0.48);
  box-shadow: 0 0 0 3px rgba(245, 179, 53, 0.12);
}

.nav button[aria-selected="true"] {
  border-color: rgba(245, 179, 53, 0.24);
  background: rgba(245, 179, 53, 0.11);
  color: var(--accent-strong);
  box-shadow: inset 0 0 18px rgba(245, 179, 53, 0.045);
}

.global-search {
  margin-left: auto;
}

.global-search input {
  background: rgba(7, 10, 15, 0.52);
}

.login-chip {
  max-width: 160px;
}

.login-chip.slim {
  max-width: max-content;
  padding-inline: 9px;
  color: var(--muted-2);
}

.section-head,
.profile-main-panel,
.profile-side-panel section,
.profile-content-grid > article,
.profile-stat,
.games-match-panel,
.profile-game,
.profile-game-row,
.activity-item,
.social-links a,
.signature,
.thread-detail-head,
.post-conversation .forum-post-card,
.rail-message {
  transition:
    background var(--transition-normal),
    border-color var(--transition-normal),
    box-shadow var(--transition-normal),
    transform var(--transition-normal);
}

.thread-detail-head {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 15px;
  animation: panelEnter 400ms var(--ease-out) 80ms both;
  border-color: var(--border);
  background:
    radial-gradient(circle at 2% 12%, rgba(245, 179, 53, 0.085), transparent 20rem),
    rgba(13, 17, 24, 0.78);
}

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

.thread-detail-head > div:first-child {
  max-width: 820px;
  gap: 7px;
}

.thread-detail-head .eyebrow {
  padding: 3px 8px;
  border-color: rgba(245, 179, 53, 0.18);
  background: rgba(245, 179, 53, 0.075);
  font-size: 0.62rem;
}

.thread-detail-head h2 {
  max-width: 760px;
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  line-height: 1.1;
  text-wrap: balance;
}

.thread-detail-head .meta {
  color: var(--muted-2);
  font-size: 0.78rem;
}

.thread-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  align-self: start;
  width: min(100%, 520px);
  gap: 7px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.thread-actions select {
  flex: 1 1 210px;
  grid-column: auto;
  width: auto;
  min-height: 32px;
  border-color: var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
}

.thread-actions .checkline {
  min-height: 32px;
  padding-inline: 9px;
  border-color: var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.74rem;
}

.thread-actions .action {
  width: auto;
  min-height: 32px;
  padding-inline: 10px;
  font-size: 0.76rem;
}

.thread-actions .admin-icon-button {
  width: 28px;
  height: 28px;
  min-height: 28px;
}

.thread-actions [data-back] {
  background: rgba(18, 24, 33, 0.44);
  color: var(--muted-2);
}

.post-conversation {
  gap: 12px;
}

.post-conversation .forum-post-card,
.post-conversation .forum-post-card.from-right {
  grid-template-columns: 132px minmax(0, 1fr);
  animation: postEnter 360ms var(--ease-out) both;
  border-color: var(--border);
  background: rgba(13, 17, 24, 0.7);
}

.post-conversation .forum-post-card:nth-child(1) { animation-delay: 90ms; }
.post-conversation .forum-post-card:nth-child(2) { animation-delay: 125ms; }
.post-conversation .forum-post-card:nth-child(3) { animation-delay: 160ms; }
.post-conversation .forum-post-card:nth-child(4) { animation-delay: 195ms; }
.post-conversation .forum-post-card:nth-child(n+5) { animation-delay: 230ms; }

@keyframes postEnter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.post-conversation .forum-post-card:hover {
  border-color: var(--border-strong);
  background: rgba(18, 24, 33, 0.82);
  transform: translateY(-1px);
}

.post-conversation .chat-author,
.post-conversation .forum-post-card.from-right .chat-author {
  padding: 15px 10px;
  border-right-color: var(--border);
  background: rgba(7, 10, 15, 0.24);
}

.post-conversation .chat-author .avatar {
  width: 58px;
  height: 58px;
}

.forum-author-stack .user-link {
  font-size: 0.8rem;
}

.forum-author-stack .role-badge {
  padding: 3px 7px;
  font-size: 0.66rem;
}

.forum-author-stat {
  font-size: 0.64rem;
}

.forum-post-header {
  padding: 14px 16px 10px;
  border-bottom-color: rgba(255, 255, 255, 0.055);
  background: rgba(7, 10, 15, 0.25);
}

.forum-post-header .eyebrow {
  color: var(--muted-2);
  font-size: 0.6rem;
}

.forum-post-header .eyebrow {
  text-transform: none;
}

.forum-post-header h3 {
  margin-top: 2px;
  color: var(--text-strong);
  font-size: clamp(0.98rem, 1.35vw, 1.14rem);
}

.forum-post-header time {
  border-color: var(--border);
  background: rgba(13, 17, 24, 0.72);
  color: var(--muted-2);
}

.forum-post-body {
  padding: 17px 18px 20px;
  color: var(--text);
  font-size: 0.96rem;
  line-height: 1.65;
}

.post-conversation .signature {
  margin: 0 18px 18px;
}

.legacy-text a,
.profile-side-panel a,
.social-links a {
  transition: color var(--transition-fast), background-size var(--transition-fast);
}

.legacy-text a:hover,
.profile-side-panel a:hover,
.social-links a:hover {
  color: var(--accent);
}

.shout-rail {
  width: 276px;
  padding: 9px;
  background: rgba(9, 13, 19, 0.88);
}

.shout-rail header {
  padding: 4px 2px 7px;
}

.shout-rail header button {
  border-color: transparent;
  color: var(--muted-2);
}

.rail-form {
  gap: 5px;
  padding-bottom: 4px;
}

.rail-form input,
.rail-form textarea {
  padding: 7px 8px;
  font-size: 0.76rem;
}

.rail-form textarea {
  min-height: 46px;
  max-height: 74px;
}

.rail-form .action.primary {
  min-height: 32px;
  border-color: rgba(245, 179, 53, 0.2);
  background: rgba(245, 179, 53, 0.095);
}

.rail-form .action.primary:hover {
  box-shadow: 0 0 0 3px rgba(245, 179, 53, 0.075);
}

.rail-message {
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 7px;
  padding: 7px 6px;
  animation: chatEnter 240ms var(--ease-out) both;
  border-color: transparent;
  background: transparent;
}

.rail-message:nth-child(1) { animation-delay: 25ms; }
.rail-message:nth-child(2) { animation-delay: 45ms; }
.rail-message:nth-child(3) { animation-delay: 65ms; }
.rail-message:nth-child(n+4) { animation-delay: 85ms; }

@keyframes chatEnter {
  from {
    opacity: 0;
    transform: translateX(6px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.rail-message:hover {
  background: rgba(18, 24, 33, 0.55);
}

.rail-message .avatar {
  width: 26px;
  height: 26px;
}

.rail-message strong {
  color: var(--text);
  font-size: 0.72rem;
}

.rail-message span {
  color: var(--muted-2);
  font-size: 0.6rem;
}

.rail-message p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
}

.rail-messages {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

.rail-messages::-webkit-scrollbar {
  width: 6px;
}

.rail-messages::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

body:has(.shout-rail) {
  padding-right: 276px;
}

@media (max-width: 1200px) {
  body:has(.shout-rail) {
    padding-right: 0;
  }

  .shout-rail {
    position: static;
    width: min(1180px, calc(100% - 24px));
    height: 340px;
    margin: 0 auto 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: none;
  }
}

@media (max-width: 900px) {
  .header-banner {
    padding: 6px;
  }

  .header-navline {
    align-items: stretch;
  }

  .nav {
    flex-basis: 100%;
  }

  .global-search {
    flex: 1 1 100%;
    margin-left: 0;
  }
}

@media (max-width: 700px) {
  .thread-detail-head,
  .post-conversation .forum-post-card,
  .post-conversation .forum-post-card.from-right {
    grid-template-columns: 1fr;
  }

  .thread-detail-head h2 {
    font-size: clamp(1.45rem, 8vw, 1.9rem);
  }

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

  .thread-actions select,
  .thread-actions .action {
    flex: 1 1 100%;
  }

  .post-conversation .chat-author,
  .post-conversation .forum-post-card.from-right .chat-author {
    grid-template-columns: 44px minmax(0, 1fr);
    padding: 11px;
  }

  .post-conversation .chat-author .avatar {
    width: 44px;
    height: 44px;
  }

  .forum-post-body {
    padding: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

/* Iteration 4: density pass for app-like header, compact thread tools and tighter content rhythm. */
body:has(.shout-rail) {
  padding-right: 320px;
}

.topbar {
  width: min(1240px, calc(100% - 20px));
  border-radius: 0 0 12px 12px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

.header-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 58px;
  padding: 6px 8px;
  background:
    linear-gradient(105deg, rgba(245, 179, 53, 0.055), transparent 38%),
    rgba(13, 17, 24, 0.88);
}

.brand {
  justify-self: start;
  width: auto;
  min-height: 46px;
  max-width: min(100%, 470px);
  padding: 5px 8px;
  border: 0;
  background: transparent;
}

.brand::before,
.brand-ornament {
  display: none;
}

.brand-emblem-wrap {
  width: 36px;
  min-width: 36px;
  height: 36px;
  border-radius: 9px;
}

.brand-copy {
  gap: 1px;
}

.brand-kicker {
  font-size: 0.54rem;
}

.brand strong {
  font-size: clamp(1rem, 1.45vw, 1.22rem);
  line-height: 1.05;
}

.brand small {
  font-size: 0.68rem;
  line-height: 1.15;
}

.header-status {
  position: static;
  display: grid;
  justify-items: end;
  gap: 1px;
  min-width: 0;
  padding: 0 6px 0 14px;
  border: 0;
  background: transparent;
  color: var(--muted-2);
  text-align: right;
  white-space: nowrap;
}

.header-status span {
  color: var(--muted-2);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header-status strong {
  color: var(--accent);
  font-size: 0.84rem;
}

.header-navline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 48px;
  padding: 6px 8px;
  background: rgba(7, 10, 15, 0.46);
}

.nav {
  flex: 1 1 620px;
  gap: 4px;
}

.nav button,
.login-chip,
.action,
.global-search input {
  min-height: 32px;
  border-radius: 9px;
}

.nav button {
  padding-inline: 9px;
  font-size: 0.73rem;
}

.global-search {
  flex: 0 1 190px;
  margin-left: auto;
  gap: 1px;
}

.global-search span {
  font-size: 0.54rem;
}

.global-search input {
  padding-inline: 9px;
  font-size: 0.76rem;
}

.login-chip {
  min-width: 0;
  max-width: 132px;
  padding-inline: 10px;
  font-size: 0.74rem;
}

.login-chip.slim {
  padding-inline: 8px;
}

.breadcrumbs {
  width: min(1240px, calc(100% - 20px));
  min-height: 28px;
  gap: 6px;
  padding: 7px 4px 0;
  font-size: 0.74rem;
}

.breadcrumbs button {
  color: var(--muted);
  font-weight: 700;
}

.breadcrumbs span {
  color: var(--text);
  font-weight: 700;
}

.breadcrumbs i {
  color: var(--muted-2);
}

.content {
  width: min(1240px, calc(100% - 20px));
  padding-top: 8px;
}

.view-panel {
  gap: 12px;
}

.thread-detail-head {
  grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.1fr);
  align-items: start;
  gap: 12px;
  min-height: 0;
  padding: 12px 14px;
  border-radius: var(--radius-md);
}

.thread-detail-head > div:first-child {
  max-width: 100%;
  gap: 5px;
}

.thread-detail-head .eyebrow {
  width: max-content;
  padding: 2px 7px;
  font-size: 0.58rem;
}

.thread-detail-head h2 {
  max-width: 620px;
  font-size: clamp(1.55rem, 2.4vw, 2.18rem);
  line-height: 1.08;
}

.thread-detail-head .meta {
  font-size: 0.74rem;
}

.thread-actions {
  justify-content: flex-end;
  align-content: start;
  width: 100%;
  max-width: none;
  gap: 6px;
}

.thread-actions select {
  flex: 1 1 190px;
  max-width: 270px;
  min-height: 30px;
  padding: 0 28px 0 9px;
  font-size: 0.72rem;
}

.thread-actions .checkline {
  min-height: 30px;
  gap: 5px;
  padding-inline: 8px;
  background: rgba(18, 24, 33, 0.5);
  font-size: 0.7rem;
}

.thread-actions .checkline input {
  width: 13px;
  height: 13px;
}

.thread-actions .action {
  min-height: 30px;
  padding-inline: 9px;
  font-size: 0.72rem;
}

.thread-actions .admin-icon-button {
  width: 30px;
  height: 30px;
  min-height: 30px;
  border-radius: 9px;
}

.thread-actions .confirm-inline {
  flex: 1 1 100%;
  margin-top: 2px;
  padding: 6px;
  border-radius: 9px;
}

.thread-poll {
  margin-top: 0;
}

.post-conversation {
  gap: 10px;
}

.post-conversation .forum-post-card,
.post-conversation .forum-post-card.from-right {
  grid-template-columns: 116px minmax(0, 1fr);
  border-radius: var(--radius-md);
}

.post-conversation .chat-author,
.post-conversation .forum-post-card.from-right .chat-author {
  gap: 8px;
  padding: 13px 8px;
}

.post-conversation .chat-author .avatar {
  width: 54px;
  height: 54px;
}

.forum-author-stack {
  gap: 5px;
}

.forum-author-stack .user-link {
  font-size: 0.76rem;
}

.forum-author-stack .role-badge {
  padding: 2px 6px;
  font-size: 0.62rem;
}

.forum-author-stat {
  padding: 2px 6px;
  font-size: 0.61rem;
}

.forum-post-header {
  gap: 10px;
  padding: 11px 14px 8px;
}

.forum-post-header .eyebrow {
  font-size: 0.58rem;
}

.forum-post-header h3 {
  margin-top: 1px;
  font-size: clamp(0.93rem, 1.15vw, 1.04rem);
}

.forum-post-header time {
  padding: 4px 7px;
  font-size: 0.64rem;
}

.forum-post-body {
  padding: 14px 16px 16px;
  line-height: 1.62;
}

.post-conversation .signature {
  margin: 0 16px 14px;
  padding: 10px 12px;
  font-size: 0.82rem;
}

.shout-rail {
  width: 320px;
  padding: 10px 12px;
  border-left-color: rgba(255, 255, 255, 0.06);
  background: rgba(8, 12, 18, 0.9);
  box-shadow: -8px 0 22px rgba(0, 0, 0, 0.12);
}

.shout-rail header {
  padding: 3px 0 7px;
}

.rail-form {
  gap: 5px;
  padding-bottom: 6px;
}

.rail-form input,
.rail-form textarea {
  padding: 7px 8px;
}

.rail-message {
  gap: 7px;
  padding: 6px 5px;
}

.rail-message p {
  font-size: 0.71rem;
  line-height: 1.36;
}

@media (max-width: 1200px) {
  body:has(.shout-rail) {
    padding-right: 0;
  }

  .topbar,
  .breadcrumbs,
  .content {
    width: min(calc(100% - 20px), 1120px);
  }

  .shout-rail {
    width: min(1120px, calc(100% - 20px));
    height: 320px;
    margin-bottom: 14px;
  }

  .thread-detail-head {
    grid-template-columns: minmax(0, 1fr);
  }

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

@media (max-width: 900px) {
  .header-banner {
    min-height: 52px;
  }

  .header-status {
    display: none;
  }

  .header-navline {
    min-height: 0;
  }

  .nav {
    flex-basis: 100%;
  }

  .global-search {
    flex: 1 1 220px;
    margin-left: 0;
  }
}

@media (max-width: 700px) {
  .header-banner {
    grid-template-columns: 1fr;
  }

  .brand {
    max-width: 100%;
  }

  .global-search {
    flex-basis: 100%;
  }

  .thread-detail-head {
    padding: 11px;
  }

  .thread-detail-head h2 {
    font-size: clamp(1.35rem, 7vw, 1.85rem);
  }

  .thread-actions select,
  .thread-actions .action {
    flex: 1 1 auto;
  }

  .post-conversation .forum-post-card,
  .post-conversation .forum-post-card.from-right {
    grid-template-columns: 1fr;
  }

  .post-conversation .chat-author,
  .post-conversation .forum-post-card.from-right .chat-author {
    grid-template-columns: 44px minmax(0, 1fr);
    justify-items: start;
    padding: 10px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .post-conversation .chat-author .avatar {
    width: 44px;
    height: 44px;
  }

  .forum-post-header {
    align-items: start;
    padding: 10px 12px 8px;
  }

  .forum-post-body {
    padding: 13px 13px 15px;
  }
}

/* Top-notch portal pass: shared components for home, guestbook and member profiles. */
:root {
  --bg: #07090d;
  --surface: #0d1118;
  --surface-2: #121821;
  --surface-3: #18202b;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #d8dee8;
  --text-strong: #f2f4f8;
  --muted: #8b95a5;
  --muted-2: #5f6876;
  --accent: #f5b335;
  --accent-soft: rgba(245, 179, 53, 0.14);
  --danger: #ef4444;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
}

.app-shell {
  width: 100%;
}

.app-header {
  max-height: none;
  overflow: visible;
}

.app-toolbar {
  isolation: isolate;
}

.content-grid {
  display: block;
}

.card,
.home-box,
.welcome-panel,
.latest-forum,
.news-block,
.profile-hero,
.profile-main-panel,
.profile-side-panel section,
.profile-content-grid > article,
.guestbook-entry,
.stat-card,
.profile-stat,
.rail-form {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(13, 17, 24, 0.76);
  box-shadow: none;
}

.card-header,
.section-head,
.compact-head {
  min-height: 0;
  padding: var(--space-3);
}

.section-title,
.section-head h2,
.section-head h3,
.home-box h3,
.profile-side-panel h3,
.profile-content-grid h3 {
  color: var(--text-strong);
  font-size: clamp(1rem, 1.2vw, 1.18rem);
  line-height: 1.2;
}

.btn,
.btn-primary,
.btn-secondary,
.btn-ghost,
.action,
.login-chip,
.nav button {
  min-height: 32px;
  border-radius: var(--radius-sm);
}

.btn-primary,
.action.primary {
  border-color: rgba(245, 179, 53, 0.28);
  background: rgba(245, 179, 53, 0.13);
  color: var(--accent);
}

.btn-secondary,
.action:not(.primary):not(.danger) {
  background: rgba(18, 24, 33, 0.58);
}

.btn-ghost,
.action.ghost {
  background: transparent;
}

.pill,
.role-badge,
.meta {
  max-width: 100%;
}

.meta {
  color: var(--muted-2);
}

.app-header .header-banner {
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 50px;
  padding: var(--space-2);
}

.app-header .brand {
  min-height: 40px;
  padding: 0;
}

.app-header .brand-emblem-wrap {
  width: 34px;
  min-width: 34px;
  height: 34px;
}

.app-header .brand .brand-emblem,
.app-header .brand img {
  width: 30px;
  height: 30px;
  min-height: 0;
  object-fit: contain;
  border: 0;
  border-radius: 0;
}

.app-header .brand strong {
  font-size: clamp(0.98rem, 1.25vw, 1.16rem);
}

.app-header .brand small {
  font-size: 0.66rem;
}

.app-header .brand-kicker {
  font-size: 0.52rem;
}

.app-header .header-status {
  font-size: 0.72rem;
}

.app-toolbar {
  min-height: 44px;
  padding: 5px var(--space-2);
}

.app-toolbar .nav {
  flex: 1 1 660px;
  row-gap: 4px;
}

.app-toolbar .nav button {
  min-height: 30px;
  padding: 0 8px;
  font-size: 0.71rem;
}

.app-toolbar .global-search {
  flex: 0 1 180px;
}

.app-toolbar .global-search input,
.app-toolbar .login-chip {
  min-height: 30px;
}

.shout-rail,
.chat-sidebar {
  width: 312px;
  padding: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.055);
  background: rgba(8, 12, 18, 0.86);
}

body:has(.shout-rail) {
  padding-right: 312px;
}

.shout-rail .rail-form,
.chat-sidebar .rail-form {
  position: sticky;
  top: var(--space-2);
  z-index: 1;
  margin-bottom: var(--space-2);
  padding: var(--space-2);
  background: rgba(13, 17, 24, 0.92);
}

.rail-message,
.chat-message {
  grid-template-columns: 30px minmax(0, 1fr);
  padding: 6px 4px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.rail-message .avatar {
  width: 30px;
  height: 30px;
}

.rail-message strong,
.rail-message span {
  display: inline;
  vertical-align: baseline;
}

.rail-message strong {
  margin-right: var(--space-1);
  font-size: 0.73rem;
}

.rail-message span {
  font-size: 0.61rem;
}

.rail-message p {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: 0.71rem;
}

.rail-message .admin-icon-button {
  opacity: 0;
  transition: opacity var(--transition-fast), background var(--transition-fast);
}

.rail-message:hover .admin-icon-button,
.rail-message .admin-icon-button:focus-visible {
  opacity: 0.72;
}

.home-layout.content-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 240px;
  gap: var(--space-4);
  align-items: start;
}

.home-sidebar {
  gap: var(--space-3);
}

.nav-card,
.portal-menu {
  padding: var(--space-3);
}

.portal-menu h3 {
  margin-bottom: var(--space-2);
}

.portal-menu .nav-section {
  display: grid;
  gap: 6px;
  padding-block: var(--space-2);
  border-top: 1px solid var(--border);
}

.portal-menu .nav-section:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.portal-menu .nav-section > strong {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portal-menu ul,
.home-box ul {
  gap: 4px;
}

.nav-row,
.home-box button {
  min-height: 34px;
  padding: 0 var(--space-2);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
}

.nav-row:hover,
.home-box button:hover {
  border-color: var(--border);
  background: rgba(18, 24, 33, 0.74);
}

.nav-row span,
.home-box button span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.nav-row small,
.home-box button small {
  justify-self: end;
  color: var(--muted-2);
}

.home-box.stat-card {
  padding: var(--space-3);
}

.home-box.stat-card strong {
  font-size: 1.85rem;
}

.home-main {
  gap: var(--space-4);
}

.welcome-panel {
  min-height: 0;
  padding: var(--space-5);
}

.welcome-panel h1 {
  max-width: 680px;
  font-size: clamp(2rem, 4.2vw, 3.35rem);
  line-height: 1.02;
}

.welcome-panel p {
  max-width: 720px;
}

.latest-forum,
.news-block {
  padding: 0;
  overflow: hidden;
}

.latest-forum .section-head,
.news-block .section-head {
  border-bottom: 1px solid var(--border);
}

.latest-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
  padding: var(--space-3);
}

.latest-item {
  min-height: 56px;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(18, 24, 33, 0.48);
}

.latest-item strong,
.latest-item small {
  overflow-wrap: anywhere;
}

.latest-item b,
.home-box button small {
  margin-left: var(--space-2);
}

.home-right .home-box {
  padding: var(--space-3);
}

.home-right .home-box h3 {
  margin-bottom: var(--space-2);
  font-size: 0.92rem;
}

.forum-news .home-box button,
.home-right .home-box button {
  min-height: 34px;
}

.profile-screen {
  gap: var(--space-4);
}

.profile-hero {
  grid-template-columns: minmax(0, 0.95fr) minmax(280px, 1.05fr);
  align-items: center;
  min-height: 0;
  padding: var(--space-5);
}

.profile-identity {
  gap: var(--space-4);
}

.profile-identity .avatar {
  width: 84px;
  height: 84px;
}

.profile-identity h2 {
  font-size: clamp(2rem, 3.4vw, 3.1rem);
}

.profile-hero-copy {
  padding-left: var(--space-4);
  border-left: 1px solid var(--border);
}

.profile-hero-copy strong,
.profile-hero-copy p {
  overflow-wrap: anywhere;
}

.profile-stat-grid {
  gap: var(--space-3);
}

.profile-stat,
.stat-card {
  min-height: 96px;
  padding: var(--space-3);
}

.profile-stat strong,
.stat-card strong {
  font-size: clamp(1.5rem, 2.2vw, 2.05rem);
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: var(--space-4);
  align-items: start;
}

.profile-main-panel,
.profile-side-panel section {
  padding: var(--space-4);
}

.profile-main-panel.activity-timeline {
  min-width: 0;
}

.profile-side-panel {
  display: grid;
  gap: var(--space-3);
}

.profile-side-panel dl {
  gap: var(--space-2);
}

.profile-side-panel dd,
.profile-side-panel a,
.profile-social strong,
.signature {
  overflow-wrap: anywhere;
}

.profile-side-panel .signature img,
.signature img {
  max-width: 100%;
  height: auto;
}

.profile-content-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.profile-content-grid > article {
  min-width: 0;
  padding: var(--space-4);
}

.activity-item,
.profile-lazy-embedded .activity-item {
  min-height: 52px;
  padding: var(--space-3);
}

.guestbook-stream {
  display: grid;
  gap: var(--space-3);
}

.guestbook-entry.feed-item,
.guestbook-entry.feed-item.from-right,
.guestbook-entry.feed-item.from-left {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
}

.guestbook-author {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: var(--space-2);
  align-items: center;
  padding: var(--space-3) var(--space-4) var(--space-2);
  border-bottom: 1px solid var(--border);
  background: rgba(7, 10, 15, 0.24);
}

.guestbook-author .avatar {
  width: 40px;
  height: 40px;
}

.guestbook-author-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-width: 0;
}

.guestbook-author-line .user-link {
  color: var(--text-strong);
  font-weight: 800;
}

.guestbook-author-line .pill {
  padding: 3px 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(18, 24, 33, 0.58);
  font-size: 0.66rem;
}

.guestbook-content.chat-bubble {
  padding: var(--space-4);
  border: 0;
  border-radius: 0;
  background: transparent;
}

.guestbook-content h3 {
  margin-bottom: var(--space-2);
  color: var(--text-strong);
  font-size: clamp(1rem, 1.4vw, 1.22rem);
}

.guestbook-content .legacy-text {
  overflow-wrap: anywhere;
  line-height: 1.62;
}

.guestbook-content .inline-admin-actions {
  position: static;
  justify-content: flex-end;
  margin-top: var(--space-3);
  opacity: 0.72;
}

.guestbook-stream .chat-bubble::before,
.guestbook-stream .chat-entry::before {
  display: none;
}

@media (max-width: 1200px) {
  body:has(.shout-rail) {
    padding-right: 0;
  }

  .shout-rail,
  .chat-sidebar {
    width: min(1120px, calc(100% - 20px));
  }

  .home-layout.content-layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .home-right {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 900px) {
  .home-layout.content-layout {
    grid-template-columns: 1fr;
  }

  .home-left,
  .home-right {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portal-menu {
    grid-column: 1 / -1;
  }

  .profile-hero {
    grid-template-columns: 1fr;
  }

  .profile-hero-copy {
    padding-left: 0;
    border-left: 0;
  }

  .profile-content-grid,
  .latest-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {
  .app-toolbar .nav,
  .app-toolbar .global-search {
    flex-basis: 100%;
  }

  .home-left,
  .home-right {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 620px) {
  .app-header .header-status {
    display: none;
  }

  .welcome-panel {
    padding: var(--space-4);
  }

  .welcome-panel h1 {
    font-size: clamp(1.85rem, 10vw, 2.45rem);
  }

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

  .profile-identity .avatar {
    width: 72px;
    height: 72px;
  }

  .profile-stat-grid {
    grid-template-columns: 1fr;
  }

  .guestbook-author {
    grid-template-columns: 34px minmax(0, 1fr);
    padding-inline: var(--space-3);
  }

  .guestbook-author .avatar {
    width: 34px;
    height: 34px;
  }
}

/* Codex-5.3-Spark final pass: compact, consistent, low-motion, no ambient motion. */
:root {
  --bg: #07090d;
  --surface: #0d1118;
  --surface-2: #121821;
  --surface-3: #18202b;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #d8dee8;
  --text-strong: #f2f4f8;
  --muted: #8b95a5;
  --muted-2: #5f6876;
  --accent: #f5b335;
  --accent-soft: rgba(245, 179, 53, 0.14);
  --danger: #ef4444;
  --success: #22c55e;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 160ms var(--ease-out);
  --transition-normal: 240ms var(--ease-out);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  color-scheme: dark;
  background: var(--bg);
  color: var(--text);
}

.shell::before,
.shell::after {
  display: none !important;
  background: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

body,
main,
article,
section,
aside,
button,
input,
textarea {
  max-width: 100%;
}

body {
  font-size: 15px;
  line-height: 1.6;
}

.app-shell,
main.shell {
  width: min(calc(100vw - 16px), 1400px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  grid-template-areas:
    "top top"
    "crumb crumb"
    "content sidebar";
  gap: var(--space-4);
  align-items: start;
}

.topbar {
  grid-area: top;
  width: 100%;
  min-height: 68px;
  margin: 0;
  padding: 0;
  border-radius: var(--radius-md);
}

.breadcrumbs {
  grid-area: crumb;
  width: 100%;
  min-height: 28px;
  margin: 0;
  gap: 8px;
  padding: 0;
}

.content,
.content-grid {
  grid-area: content;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
}

.shout-rail,
.chat-sidebar {
  grid-area: sidebar;
  position: static;
  width: 100%;
  min-width: 0;
  margin: 0;
  border-left: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(13, 18, 25, 0.96);
  box-shadow: none;
}

body:has(.shout-rail),
body:has(.chat-sidebar) {
  padding-right: 0;
}

.app-header {
  max-height: none;
  overflow: visible;
}

.app-header .header-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 52px;
  padding: 8px 8px 4px;
  gap: 10px;
}

.app-header .brand {
  min-height: 38px;
  gap: 8px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(13, 18, 25, 0.74);
}

.app-header .brand-emblem-wrap {
  width: 36px;
  min-width: 36px;
  height: 36px;
  border: 0;
  border-radius: 7px;
}

.app-header .brand-emblem,
.app-header .brand img {
  width: 30px;
  height: 30px;
}

.app-header .brand strong {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
}

.app-header .brand small {
  font-size: 0.7rem;
}

.app-header .brand-kicker {
  font-size: 0.56rem;
}

.app-header .header-status {
  display: grid;
  justify-items: end;
  gap: 1px;
  white-space: nowrap;
}

.app-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 6px;
  border-top: 1px solid var(--border);
}

.app-toolbar .nav {
  flex: 1 1 620px;
  row-gap: 6px;
}

.app-toolbar .global-search {
  flex: 0 1 220px;
  margin-left: auto;
  min-width: 220px;
}

.nav,
.nav-tabs,
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.nav-tabs {
  gap: 6px;
}

.nav button,
.login-chip,
.action,
.btn,
.btn-primary,
.btn-secondary,
.btn-ghost {
  min-height: 34px;
  border-radius: 10px;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

.nav button:hover,
.login-chip:hover,
.action:hover,
.btn:hover,
.btn-primary:hover,
.btn-secondary:hover,
.btn-ghost:hover {
  transform: translateY(-1px);
}

.nav button:active,
.login-chip:active,
.action:active {
  transform: translateY(0);
}

.nav button,
.action,
.btn,
.btn-secondary,
.btn-ghost {
  background: rgba(13, 18, 25, 0.74);
  border-color: rgba(255, 255, 255, 0.12);
}

.nav button[aria-selected="true"] {
  border-color: rgba(245, 179, 53, 0.36);
  background: rgba(245, 179, 53, 0.12);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(245, 179, 53, 0.2);
}

.btn-primary,
.action.primary {
  border-color: rgba(245, 179, 53, 0.28);
  background: rgba(245, 179, 53, 0.14);
  color: var(--accent);
}

.btn-secondary {
  color: var(--text);
}

.btn-ghost {
  background: transparent;
}

.page-header,
.section-header,
.section-head,
.compact-head,
.card-header {
  min-height: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(13, 18, 25, 0.76);
}

.section-title,
.page-title,
.section-head h2,
.section-head h3,
.card-header h3,
.profile-side-panel h3,
.profile-content-grid h3 {
  margin: 0;
  color: var(--text-strong);
  line-height: 1.2;
  font-size: clamp(1rem, 1.2vw, 1.18rem);
}

.meta,
.pill,
.role-badge,
.inline-admin-actions {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.3;
  max-width: 100%;
}

.meta {
  color: var(--muted-2);
}

.pill,
.role-badge {
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 8px;
  line-height: 1.2;
  white-space: nowrap;
}

.card,
.thread-detail-head,
.post-conversation .forum-post-card,
.home-box,
.welcome-panel,
.latest-forum,
.news-block,
.forum-news,
.profile-hero,
.guestbook-entry,
.war-card,
.top-bar,
.admin-panel,
.section-layout,
.home-left,
.home-right,
.home-main,
.stat-card,
.profile-stat,
.profile-layout,
.profile-content-grid > article {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(13, 18, 25, 0.78);
  box-shadow: none;
}

.shout-rail .rail-form,
.chat-sidebar .rail-form {
  position: static;
  top: 0;
  margin-bottom: 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.rail-message,
.chat-message {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 7px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.rail-message .avatar,
.chat-message .avatar {
  width: 30px;
  height: 30px;
}

.rail-message p,
.chat-message p {
  font-size: 0.74rem;
  line-height: 1.44;
  margin: 2px 0 0;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.home-layout.content-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 240px;
  gap: var(--space-4);
}

.home-sidebar {
  display: grid;
  gap: var(--space-3);
}

.home-main {
  display: grid;
  gap: var(--space-4);
}

.home-left,
.home-right {
  display: grid;
  gap: var(--space-3);
}

.portal-menu,
.home-box,
.news-block,
.latest-forum {
  padding: var(--space-3);
}

.latest-list {
  display: grid;
  gap: 6px;
}

.latest-item,
.news-grid .card,
.archive-tile {
  min-height: 52px;
  padding: 10px var(--space-2);
}

.latest-list .latest-item,
.home-box .latest-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(18, 24, 33, 0.48);
}

.profile-hero,
.guestbook-stream,
.profile-layout,
.profile-content-grid {
  display: grid;
  gap: var(--space-4);
}

.profile-screen {
  gap: var(--space-4);
}

.profile-hero {
  grid-template-columns: minmax(0, 0.95fr) minmax(280px, 1fr);
  align-items: center;
  padding: var(--space-4);
}

.profile-identity {
  gap: var(--space-3);
}

.profile-identity .avatar {
  width: 84px;
  height: 84px;
}

.profile-content-grid {
  grid-template-columns: minmax(0, 1fr) 320px;
}

.profile-main-panel,
.profile-side-panel section {
  padding: var(--space-4);
}

.profile-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}

.profile-stat {
  min-height: 88px;
  padding: var(--space-3);
}

.profile-stat strong,
.stat-card strong {
  font-size: clamp(1.4rem, 2vw, 1.85rem);
}

.profile-stat,
.stat-card,
.activity-item {
  min-height: 56px;
}

.guestbook-entry.feed-item,
.guestbook-entry {
  display: grid;
  gap: 0;
  width: 100%;
  overflow: hidden;
}

.guestbook-author {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: var(--space-3) var(--space-3) var(--space-2);
}

.thread-detail-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 12px;
  align-items: start;
  padding: 14px;
}

.thread-detail-head > div:first-child {
  max-width: 820px;
  gap: 5px;
}

.thread-detail-head h2 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(1.55rem, 2.8vw, 2.05rem);
  line-height: 1.08;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.thread-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
  padding: 0;
}

.thread-actions select,
.thread-actions .checkline,
.thread-actions .action,
.thread-actions .confirm-inline,
.thread-actions .admin-icon-button {
  min-height: 30px;
}

.thread-actions select {
  flex: 1 1 180px;
  max-width: 240px;
  border-radius: var(--radius-sm);
}

.thread-actions .checkline {
  flex: 0 1 auto;
  border-radius: var(--radius-sm);
}

.thread-actions .action,
.thread-actions .admin-icon-button {
  border-radius: var(--radius-sm);
}

.thread-actions .admin-icon-button {
  width: 30px;
  min-width: 30px;
}

.post-conversation {
  display: grid;
  gap: 10px;
}

.post-conversation .forum-post-card,
.post-conversation .forum-post-card.from-right {
  grid-template-columns: minmax(108px, 132px) minmax(0, 1fr);
  gap: 0;
}

.forum-post-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  align-items: start;
  padding: 12px 14px;
}

.forum-post-header h3 {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  margin: 0;
  line-height: 1.2;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.forum-post-header time {
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.66rem;
}

.forum-post-body {
  line-height: 1.62;
  padding: 14px;
}

.forum-post-card {
  min-height: 0;
}

.war-timeline {
  display: grid;
  gap: 8px;
}

.war-card {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 10px 12px;
  align-items: center;
  padding: 11px 12px;
  min-height: 0;
}

.war-card span,
.war-card small {
  overflow-wrap: anywhere;
}

.grid.users,
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.user-card,
.member-card {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 0;
  padding: 10px;
  text-align: left;
}

.user-card h3 {
  margin: 0;
  font-size: 0.98rem;
}

.games-match-panel,
.games-grid,
.match-results {
  display: grid;
  gap: 10px;
}

.forum-board {
  display: grid;
  gap: 10px;
}

.forum-channel-list {
  display: grid;
  gap: 6px;
}

.forum-channel {
  display: grid;
  gap: 8px;
  justify-content: start;
  align-items: center;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(13, 18, 25, 0.74);
}

.thread-list {
  display: grid;
  gap: 8px;
}

.thread,
.thread-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 10px;
  padding: 12px;
}

.forum-channel-list .thread-metrics,
.thread-metrics {
  font-size: 0.72rem;
}

.forum-channel-list .meta,
.thread-metrics,
.thread-detail-head .meta {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.thread-open,
.thread-metrics .thread-open {
  display: none;
}

.topbar,
.app-toolbar,
.view-panel,
.thread-detail-head,
.post-conversation .forum-post-card,
.rail-message,
.admin-icon-button,
.btn,
.btn-primary,
.btn-secondary,
.btn-ghost,
.action {
  animation: none !important;
  transform: none !important;
}

.card::before,
.thread::before,
.post::before,
.thread-channel::before,
.thread-row::before,
.forum-section::before {
  animation: none !important;
}

.thread-list .thread-title-link,
.thread-detail-head .meta,
.post-conversation .forum-post-body,
.guestbook-content .legacy-text,
.legacy-text {
  overflow-wrap: anywhere;
  word-break: break-word;
}

hr {
  border-color: var(--border);
}

::selection {
  background: rgba(245, 179, 53, 0.2);
  color: var(--text-strong);
}

.app-shell,
.shout-rail,
.content-grid,
.main-content {
  --_scrollbar: thin;
}

.shout-rail .rail-messages,
.chat-messages {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.shout-rail .rail-messages::-webkit-scrollbar,
.chat-messages::-webkit-scrollbar {
  width: 6px;
}

.shout-rail .rail-messages::-webkit-scrollbar-thumb,
.chat-messages::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.home-box button,
.nav-row {
  min-height: 34px;
}

.login-chip.slim {
  min-width: 0;
  max-width: 132px;
  padding-inline: 9px;
}

.global-search input {
  min-height: 30px;
  border-radius: 10px;
  width: 100%;
}

@media (max-width: 1200px) {
  .app-shell,
  main.shell.app-shell {
    width: min(100vw - 16px, 1120px);
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "top"
      "crumb"
      "content"
      "sidebar";
    gap: var(--space-3);
  }

  .shout-rail,
  .chat-sidebar {
    grid-row: 4;
    width: 100%;
    min-height: 320px;
    border-left: 0;
    border-top: 1px solid var(--border);
    border-radius: 0;
  }

  .home-layout.content-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .home-layout.content-layout .home-right {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .thread-detail-head {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .home-layout.content-layout {
    grid-template-columns: 1fr;
  }

  .home-left,
  .home-right {
    grid-template-columns: 1fr;
  }

  .app-header .header-banner {
    grid-template-columns: 1fr;
    min-height: 46px;
  }

  .app-toolbar {
    min-height: 0;
  }

  .app-toolbar .nav {
    flex-basis: 100%;
  }

  .app-toolbar .global-search {
    flex: 1 1 100%;
    margin-left: 0;
    min-width: 100%;
  }

  .thread-detail-head h2 {
    font-size: clamp(1.35rem, 7vw, 1.8rem);
  }
}

@media (max-width: 700px) {
  .app-shell,
  main.shell.app-shell {
    width: min(100vw - 12px, 100%);
    gap: 10px;
  }

  .thread-detail-head,
  .post-conversation .forum-post-card,
  .post-conversation .forum-post-card.from-right {
    grid-template-columns: 1fr;
  }

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

  .thread-actions select,
  .thread-actions .checkline,
  .thread-actions .action,
  .thread-actions .admin-icon-button,
  .thread-actions .confirm-inline {
    width: 100%;
    min-width: 100%;
  }

  .post-conversation .chat-author,
  .post-conversation .forum-post-card.from-right .chat-author {
    grid-template-columns: 40px minmax(0, 1fr);
    justify-items: start;
    gap: 6px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .post-conversation .chat-author .avatar,
  .post-conversation .chat-author .avatar {
    width: 40px;
    height: 40px;
  }

  .profile-hero,
  .profile-content-grid,
  .latest-list,
  .profile-stat-grid {
    grid-template-columns: 1fr;
  }

  .profile-content-grid .profile-main-panel {
    padding: var(--space-3);
  }

  .guestbook-author {
    grid-template-columns: 34px minmax(0, 1fr);
    padding-inline: var(--space-3);
  }

  .guestbook-author .avatar {
    width: 34px;
    height: 34px;
  }

  .thread-detail-head .meta,
  .section-head .meta,
  .forum-post-header time {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }

  .nav button:hover,
  .action:hover,
  .btn:hover,
  .btn-primary:hover,
  .btn-secondary:hover,
  .btn-ghost:hover,
  .post-conversation .forum-post-card:hover {
    transform: none !important;
  }
}

.shoutbox-composer {
  display: grid;
  gap: 12px;
  position: relative;
}

.shoutbox-composer .composer-field,
.shoutbox-composer textarea,
.shoutbox-composer .bb-editor textarea {
  font-size: 0.96rem;
  line-height: 1.5;
}

.shoutbox-composer h3 {
  margin: 0;
  font-size: 1.08rem;
}

.conversation.shout-stream {
  display: grid;
  gap: 12px;
  min-height: 260px;
}

.shout-stream .chat-entry {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  isolation: isolate;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

.shout-stream .chat-entry:hover {
  transform: translateY(-1px);
  background: rgba(245, 179, 53, 0.02);
}

.shout-stream .chat-entry .chat-author {
  display: grid;
  gap: 5px;
  align-content: start;
  min-width: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.shout-stream .chat-entry .chat-author .avatar {
  width: 34px;
  height: 34px;
}

.shout-stream .chat-entry .chat-author .user-link {
  line-height: 1.15;
  font-size: 0.9rem;
}

.shout-stream .chat-entry .chat-author .meta,
.shout-stream .chat-entry .chat-author .role-badge {
  font-size: 0.74rem;
  opacity: 0.92;
}

.shout-stream .chat-entry .chat-author .role-badge {
  border-radius: 999px;
  width: max-content;
  padding-inline: 0.34rem;
}

.shout-stream .chat-entry .chat-bubble {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 16px 18px 18px 16px;
  background: rgba(19, 25, 34, 0.98);
  box-shadow: none;
  min-height: 0;
  width: min(100%, 72ch);
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.46;
}

.shout-stream .chat-entry .chat-bubble .legacy-text,
.shout-stream .chat-entry .chat-bubble .legacy-text p,
.shout-stream .chat-entry .chat-bubble .legacy-text li {
  font-size: 1rem;
  line-height: 1.48;
}

.shout-stream .chat-entry .chat-bubble .forum-post-body {
  font-size: 1rem;
  line-height: 1.48;
}

.shout-stream .chat-entry .chat-bubble .legacy-text p + p {
  margin-top: 0.42rem;
}

.shout-stream .chat-entry .chat-bubble::before {
  content: none;
}

.shout-stream .chat-entry.from-right {
  grid-template-columns: minmax(0, 1fr) 40px;
}

.shout-stream .chat-entry.from-right .chat-author {
  grid-column: 2;
  justify-self: end;
  text-align: right;
}

.shout-stream .chat-entry.from-right .chat-bubble {
  grid-column: 1;
  grid-row: 1;
  border-top-left-radius: 18px;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  border-top-right-radius: 4px;
  justify-self: end;
}

.shout-rail .rail-form {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: var(--radius-md);
}

.shout-rail .rail-form textarea,
.chat-sidebar .rail-form textarea {
  min-height: 60px;
  line-height: 1.4;
  font-size: 0.9rem;
}

.shout-rail .rail-form input,
.chat-sidebar .rail-form input,
.shout-rail .rail-form .action,
.chat-sidebar .rail-form .action {
  min-height: 34px;
}

.shout-rail .rail-message,
.chat-sidebar .rail-message,
.shout-rail .chat-message {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: rgba(14, 20, 28, 0.75);
}

.shout-rail .rail-message:hover,
.chat-sidebar .rail-message:hover,
.shout-rail .chat-message:hover {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.028);
}

.shout-rail .rail-message .avatar,
.chat-sidebar .rail-message .avatar,
.shout-rail .chat-message .avatar {
  width: 30px;
  height: 30px;
}

.shout-rail .rail-message strong,
.chat-sidebar .rail-message strong,
.shout-rail .chat-message strong,
.chat-sidebar .chat-message strong {
  margin-right: 6px;
  font-size: 0.92rem;
  line-height: 1.2;
}

.shout-rail .rail-message span,
.chat-sidebar .rail-message span,
.shout-rail .chat-message span {
  font-size: 0.72rem;
  opacity: 0.88;
}

.shout-rail .rail-message p,
.chat-sidebar .rail-message p,
.shout-rail .chat-message p {
  margin: 2px 0 0;
  font-size: 0.94rem;
  line-height: 1.42;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.shout-rail .admin-icon-button,
.chat-sidebar .admin-icon-button {
  opacity: 0.35;
  transition:
    opacity var(--transition-fast),
    background var(--transition-fast);
}

.shout-rail .admin-icon-button:hover,
.shout-rail .admin-icon-button:focus-visible,
.chat-sidebar .admin-icon-button:hover,
.chat-sidebar .admin-icon-button:focus-visible {
  opacity: 0.88;
}

.download-title {
  display: block;
  color: inherit;
  text-decoration: none;
}

.download-title:hover {
  color: inherit;
}
