:root {
  --bg: #0b0c10;
  --panel: #12141c;
  --border: #2a3142;
  --gold: #c9a227;
  --gold-dim: #8a7020;
  --text: #e8e4dc;
  --muted: #8a8790;
  --accent: #4a7dcf;
  --danger: #c44;
  /* Decorative SVGs (gold silhouettes, low contrast) */
  --deco-dragon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 120'%3E%3Cpath fill='%23c9a227' d='M28 88 Q12 58 32 34 Q52 8 96 16 Q128 4 168 26 Q188 44 178 70 Q162 96 124 94 Q88 104 48 96 Q34 94 28 88Z'/%3E%3Cpath fill='%23c9a227' d='M148 22 L172 6 L182 26 Z'/%3E%3Cpath fill='%23c9a227' fill-opacity='0.65' d='M52 52 Q72 38 96 44 Q118 36 138 48 Q128 62 96 58 Q68 62 52 52Z'/%3E%3C/svg%3E");
  --deco-swords: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 88 88'%3E%3Cg fill='none' stroke='%23c9a227' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M14 72 L42 14 L46 14 L72 72'/%3E%3Cpath d='M74 14 L46 72 L42 72 L14 14'/%3E%3Cpath d='M42 14 L42 6 M46 14 L46 6'/%3E%3C/g%3E%3C/svg%3E");
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Georgia", "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.45;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.topbar {
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #141824 0%, #0b0c10 100%);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.55rem 0;
  padding-top: max(0.55rem, env(safe-area-inset-top));
}

.topbar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
  padding-left: max(1rem, env(safe-area-inset-left));
  padding-right: max(1rem, env(safe-area-inset-right));
}

.brand {
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.06em;
  color: var(--gold);
  text-decoration: none;
  line-height: 1.2;
}
.brand:hover {
  text-decoration: none;
  color: #e4c65c;
}

.nav-toggle {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  touch-action: manipulation;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  color: var(--text);
  flex-shrink: 0;
}
.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--muted);
}
.nav-toggle-lines {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 1.25rem;
}
.nav-toggle-lines span {
  display: block;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}
.nav-toggle.is-open .nav-toggle-lines span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.is-open .nav-toggle-lines span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.is-open .nav-toggle-lines span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-shell {
  display: none;
  flex: 0 0 100%;
  order: 3;
  padding-top: 0.65rem;
  margin-top: 0.15rem;
  border-top: 1px solid rgba(42, 49, 66, 0.85);
  animation: navSlide 0.2s ease;
}
.nav-shell.is-open {
  display: block;
}
@keyframes navSlide {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  align-items: stretch;
  font-size: 0.95rem;
}

.nav > a {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.35rem 0.25rem;
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
}
.nav > a:hover {
  text-decoration: none;
  background: rgba(255, 255, 255, 0.05);
  color: var(--gold);
}

.nav .nav-play {
  margin-top: 0.35rem;
  justify-content: center;
  min-height: 2.85rem;
}

@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }

  .nav-shell {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    flex: 1;
    order: 0;
    flex-basis: auto;
    width: auto;
    padding-top: 0;
    margin-top: 0;
    border-top: none;
    gap: 0;
  }

  .nav-shell.is-open {
    display: flex !important;
  }

  .nav {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem 1.1rem;
  }

  .nav > a {
    display: inline;
    min-height: unset;
    padding: 0.35rem 0;
  }

  .nav > a:hover {
    background: transparent;
  }

  .nav .nav-play {
    margin-top: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: unset;
    padding: 0.35rem 0.85rem;
  }
}

.nav-play {
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--gold);
  border-radius: 6px;
  color: var(--bg);
  background: linear-gradient(180deg, #e8c84c, var(--gold));
  font-weight: 700;
  text-decoration: none;
}
.nav-play:hover {
  filter: brightness(1.08);
  text-decoration: none;
}

body.nav-menu-open {
  overflow: hidden;
}

.main {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

.footer {
  position: relative;
  z-index: 1;
  padding: 1rem;
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  max-width: 1100px;
  margin: 0 auto;
  line-height: 1.5;
}

.footer::before {
  content: "";
  display: block;
  width: min(200px, 50%);
  height: 36px;
  margin: 0 auto 0.65rem;
  background: var(--deco-swords) center / contain no-repeat;
  opacity: 0.14;
  filter: grayscale(0.2);
}
.footer a {
  display: inline-block;
  margin: 0.35rem 0.5rem 0;
}
@media (max-width: 480px) {
  .footer span {
    display: block;
  }
}

/* —— Box-cover hero —— */
.hero-box {
  position: relative;
  border: 3px solid var(--gold);
  border-radius: 6px;
  padding: 0;
  margin-bottom: 2rem;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.6),
    0 12px 40px rgba(0, 0, 0, 0.55),
    inset 0 0 80px rgba(200, 160, 40, 0.08);
}

.hero-art {
  min-height: 320px;
  background:
    radial-gradient(ellipse 120% 80% at 50% 100%, rgba(30, 22, 14, 0.95), transparent 55%),
    radial-gradient(ellipse 70% 50% at 70% 30%, rgba(80, 120, 200, 0.15), transparent 50%),
    linear-gradient(165deg, #0d1528 0%, #1a0a18 45%, #0a1810 100%);
  position: relative;
}

.hero-deco {
  position: absolute;
  pointer-events: none;
  z-index: 1;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.hero-deco--dragon-tl {
  top: 0.75rem;
  left: 0.5rem;
  width: min(42%, 200px);
  height: min(28%, 120px);
  background-image: var(--deco-dragon);
  opacity: 0.14;
  transform: rotate(-8deg);
}

.hero-deco--swords-br {
  bottom: 0.5rem;
  right: 0.75rem;
  width: min(38%, 160px);
  height: min(38%, 160px);
  background-image: var(--deco-swords);
  opacity: 0.18;
  transform: rotate(22deg);
}

@media (max-width: 520px) {
  .hero-deco--dragon-tl {
    opacity: 0.1;
    width: min(48%, 160px);
  }
  .hero-deco--swords-br {
    opacity: 0.12;
    width: min(44%, 120px);
    height: min(44%, 120px);
  }
}

.hero-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath fill='rgba(200,180,80,0.04)' d='M50 5 L95 95 L5 95 Z'/%3E%3C/svg%3E")
    center 60% / 180% auto no-repeat;
  opacity: 0.9;
  pointer-events: none;
}

.hero-art::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 45%;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 2.5rem 1.75rem 2rem;
  text-align: center;
}

.hero-title {
  margin: 0 0 0.35rem;
  font-size: clamp(2rem, 6vw, 3.2rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f2e6c8;
  text-shadow:
    0 2px 0 #1a1510,
    0 0 24px rgba(201, 162, 39, 0.35);
}

.hero-sub {
  margin: 0 0 1.25rem;
  font-size: 1.05rem;
  color: var(--muted);
  font-style: italic;
}

.hero-lead {
  max-width: 38rem;
  margin: 0 auto 1.5rem;
  font-size: 1.05rem;
  color: #c8c4bc;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.btn {
  display: inline-block;
  padding: 0.55rem 1.2rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  font: inherit;
}
.btn-primary {
  border-color: var(--gold-dim);
  background: linear-gradient(180deg, #a88a28, var(--gold-dim));
  color: #0a0a08;
  font-weight: 700;
}
.btn:hover {
  filter: brightness(1.06);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem 1.15rem;
  margin-bottom: 1rem;
}

.panel h2,
.panel h3 {
  margin-top: 0;
  color: var(--gold);
  font-size: 1.15rem;
}

.table-wrap {
  overflow-x: auto;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
table.data th,
table.data td {
  border: 1px solid var(--border);
  padding: 0.4rem 0.5rem;
  text-align: left;
}
table.data th {
  background: rgba(201, 162, 39, 0.08);
  color: var(--gold);
}
tr.boss td {
  background: rgba(180, 60, 40, 0.12);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}
.tabs a,
.tabs button {
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: 4px;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
}
.tabs a.active,
.tabs button.active {
  border-color: var(--gold);
  color: var(--gold);
}

.thread-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.thread-list li {
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 0;
}
.thread-meta {
  font-size: 0.8rem;
  color: var(--muted);
}

.post {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.75rem;
  margin-bottom: 0.65rem;
  background: rgba(0, 0, 0, 0.2);
}
.post-head {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.post-body {
  white-space: pre-wrap;
  word-break: break-word;
}

input[type="text"],
input[type="password"],
textarea {
  width: 100%;
  max-width: 420px;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #0a0b10;
  color: var(--text);
  font: inherit;
}

.search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
}

.armory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}
.paper-doll {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  max-width: 420px;
}
.slot {
  border: 1px dashed var(--border);
  border-radius: 4px;
  padding: 0.5rem;
  min-height: 3.2rem;
  font-size: 0.9rem;
}
.slot strong {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.armory-layout {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
  margin: 1.25rem 0;
  align-items: start;
}

@media (min-width: 880px) {
  .armory-layout {
    grid-template-columns: minmax(300px, 420px) 1fr;
  }
}

.armory-preview-section h2 {
  margin-top: 0;
}

.armory-preview-hint {
  margin: 0 0 0.75rem;
  font-size: 0.86rem;
}

.armory-view-root {
  position: relative;
  width: 100%;
  min-height: min(52vh, 420px);
  max-height: 520px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background:
    radial-gradient(ellipse 90% 70% at 50% 85%, rgba(55, 75, 120, 0.22), transparent 55%),
    linear-gradient(180deg, #12151e 0%, #080a10 100%);
}

.armory-view-root canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.armory-preview-fallback {
  padding: 1.5rem 1rem;
  text-align: center;
  font-size: 0.88rem;
}

.armory-preview-fallback code {
  font-size: 0.82rem;
  word-break: break-word;
}

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

.hint {
  color: var(--muted);
  font-size: 0.88rem;
}

.error {
  color: #f88;
}

/* —— Wiki layout & sidebar —— */
.wiki-layout {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (min-width: 960px) {
  .wiki-layout {
    display: grid;
    grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
  }
}

.wiki-sidebar {
  order: -1;
}

@media (min-width: 960px) {
  .wiki-sidebar {
    order: 0;
    position: sticky;
    top: 64px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
  }
}

.wiki-sidebar-inner {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.25);
}

.wiki-sidebar-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.wiki-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.9rem;
}

.wiki-nav-list > li {
  margin-bottom: 0.45rem;
}

.wiki-nav-list ul {
  list-style: none;
  padding: 0.25rem 0 0.35rem 0.75rem;
  margin: 0;
  border-left: 1px solid var(--border);
}

.wiki-nav-sub {
  margin-top: 0.35rem;
}

.wiki-content {
  min-width: 0;
}

.wiki-section {
  scroll-margin-top: 72px;
}

.wiki-subh {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold-dim);
  margin: 1rem 0 0.35rem;
}

.stat-bullets {
  margin: 0.35rem 0 0.75rem;
  padding-left: 1.2rem;
}

.stat-bullets li {
  margin-bottom: 0.25rem;
}

.stat-bullets--inline {
  display: inline-block;
  margin: 0.25rem 0 0.5rem;
}

.drop-bullets {
  margin: 0.35rem 0 0;
  padding-left: 1.2rem;
}

.drop-bullets li {
  margin-bottom: 0.3rem;
}

.wiki-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.85rem 1rem;
  background: rgba(0, 0, 0, 0.2);
}

.wiki-card-title {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: var(--gold);
}

.wiki-card-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 700px) {
  .wiki-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {
  .wiki-card-grid--dense {
    grid-template-columns: repeat(3, 1fr);
  }
}

.tag-boss {
  display: inline-block;
  font-size: 0.7rem;
  vertical-align: middle;
  padding: 0.12rem 0.4rem;
  border-radius: 3px;
  background: rgba(180, 60, 40, 0.35);
  border: 1px solid rgba(255, 120, 80, 0.4);
  color: #fcc;
}

.role-pill {
  display: inline-block;
  font-size: 0.78rem;
  padding: 0.15rem 0.45rem;
  margin: 0 0.25rem 0.25rem 0;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(74, 125, 207, 0.12);
  color: #b8c8e8;
}

.class-roles {
  margin: 0.35rem 0 0.75rem;
}

.ability-block {
  border-left: 2px solid var(--gold-dim);
  padding-left: 0.75rem;
  margin-bottom: 1rem;
}

.ability-block h5 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.ability-ref-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
}

@media (min-width: 800px) {
  .ability-ref-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.item-desc {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0.5rem 0 0;
}

/* —— Nav auth —— */
.nav-auth {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.15rem 0;
  width: 100%;
}
@media (min-width: 768px) {
  .nav-auth {
    min-height: 2rem;
    width: auto;
    padding: 0;
  }
}

.nav-auth-user {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.2rem 0.5rem 0.2rem 0.2rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
}

.nav-auth-avatar {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: linear-gradient(145deg, #3a5a9a, #2a4080);
  color: #e8ecf8;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: system-ui, sans-serif;
}

.nav-auth-name {
  font-size: 0.88rem;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-sm {
  padding: 0.28rem 0.55rem;
  font-size: 0.82rem;
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--muted);
}
.btn-ghost:hover {
  color: var(--text);
  border-color: var(--muted);
}

/* —— Auth modal —— */
.auth-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(5, 6, 10, 0.82);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.auth-modal-overlay[hidden] {
  display: none !important;
}

.auth-modal {
  width: 100%;
  max-width: 420px;
  background: linear-gradient(180deg, #161a24 0%, #0e1018 100%);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65);
  overflow: hidden;
}

.auth-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--border);
  background: rgba(201, 162, 39, 0.06);
}

.auth-modal-header h2 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--gold);
}

.auth-modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}
.auth-modal-close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.auth-tab {
  flex: 1;
  padding: 0.65rem;
  background: transparent;
  border: none;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.auth-tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
  background: rgba(201, 162, 39, 0.05);
}

.auth-panel {
  padding: 1.15rem;
  display: none;
}

.auth-panel.active {
  display: block;
}

.auth-field {
  margin-bottom: 0.85rem;
}

.auth-field label {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.auth-field input {
  width: 100%;
  max-width: none;
  padding: 0.55rem 0.65rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #080a10;
  color: var(--text);
  font: inherit;
}

.auth-field input:focus {
  outline: none;
  border-color: var(--gold-dim);
  box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.15);
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.auth-actions .btn {
  flex: 1;
  min-width: 120px;
  justify-content: center;
}

.btn.is-loading {
  opacity: 0.65;
  pointer-events: none;
}

.auth-msg {
  min-height: 1.25rem;
  font-size: 0.88rem;
  margin-top: 0.5rem;
}

.auth-msg--ok {
  color: #6c8;
}

.auth-msg--err {
  color: #e88;
}

.auth-hint {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 1rem;
  line-height: 1.4;
}

/* —— Forums —— */
.forum-hero {
  padding: 1.5rem 1.25rem;
  margin-bottom: 1.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background:
    radial-gradient(ellipse 80% 120% at 100% 0%, rgba(74, 125, 207, 0.12), transparent 50%),
    linear-gradient(165deg, #141824, #0a0c12);
}

.forum-hero h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  color: var(--gold);
}

.forum-hero-lead {
  margin: 0;
  color: var(--muted);
  max-width: 42rem;
}

.forum-hero-actions {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.forum-cat-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 560px) {
  .forum-cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .forum-cat-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.forum-cat-card {
  display: block;
  padding: 1.1rem 1.15rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  text-decoration: none;
  color: inherit;
  transition:
    border-color 0.15s,
    transform 0.15s,
    box-shadow 0.15s;
}

.forum-cat-card:hover {
  text-decoration: none;
  border-color: rgba(201, 162, 39, 0.45);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  transform: translateY(-2px);
}

.forum-cat-icon {
  font-size: 1.75rem;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.forum-cat-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  color: #e8e4dc;
}

.forum-cat-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.35;
}

.breadcrumb {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: var(--accent);
}

.breadcrumb-sep {
  margin: 0 0.35rem;
  opacity: 0.6;
}

.forum-thread-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.forum-thread-table th {
  text-align: left;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border);
  color: var(--gold-dim);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.forum-thread-table td {
  padding: 0.75rem;
  border-bottom: 1px solid rgba(42, 49, 66, 0.65);
  vertical-align: middle;
}

.forum-thread-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.forum-thread-title a {
  font-weight: 600;
  color: #dce4f0;
  font-size: 1rem;
}

.forum-thread-title a:hover {
  color: var(--gold);
}

.forum-thread-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

.forum-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.15);
}

.forum-composer {
  margin-top: 1.75rem;
  padding: 1.15rem 1.25rem;
  border-radius: 10px;
  border: 1px solid rgba(201, 162, 39, 0.25);
  background: rgba(201, 162, 39, 0.04);
}

.forum-composer h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  color: var(--gold);
}

.forum-composer label {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.forum-composer input[type="text"],
.forum-composer textarea {
  width: 100%;
  max-width: none;
  margin-bottom: 0.75rem;
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  background: #080a10;
  color: var(--text);
  font: inherit;
}

.forum-composer textarea {
  min-height: 120px;
  resize: vertical;
}

.forum-composer-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
}

.forum-char-count {
  font-size: 0.78rem;
  color: var(--muted);
}

.forum-guest-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.15rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(74, 125, 207, 0.08);
  margin-top: 1.5rem;
}

.forum-guest-banner p {
  margin: 0;
  flex: 1;
  min-width: 200px;
  font-size: 0.92rem;
}

.thread-post {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 1rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--border);
}

.thread-post:first-of-type {
  padding-top: 0.25rem;
}

.thread-avatar {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: linear-gradient(145deg, #3a4a6a, #252d42);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: #c8d4ec;
  font-family: system-ui, sans-serif;
}

.thread-post-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.45rem;
}

.thread-author {
  font-weight: 700;
  color: #b8c8e8;
}

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

.thread-body {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.55;
  color: #e0dcd4;
}

.thread-title-row h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.35rem, 3.5vw, 1.75rem);
  line-height: 1.2;
}

.thread-reply-box {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.thread-reply-box h3 {
  margin: 0 0 0.65rem;
  font-size: 1rem;
  color: var(--gold);
}

.thread-reply-box textarea {
  width: 100%;
  min-height: 110px;
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  background: #080a10;
  color: var(--text);
  font: inherit;
  margin-bottom: 0.65rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
