/* BWS 2.0 — Forum detail page */

/* ── Layout ──────────────────────────────────────────────────────────────── */
.forum-shell {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1rem 4rem;
}

/* ── Forum header ────────────────────────────────────────────────────────── */
.forum-header {
  position: relative;
  padding: 2.5rem 0 1.5rem;
  border-bottom: 1px solid rgba(200, 146, 42, 0.18);
  margin-bottom: 1.25rem;
}
.forum-header--cover {
  background-image: var(--forum-cover);
  background-size: cover;
  background-position: center top;
  padding: 3rem 1.25rem 2rem;
  border-radius: 0.75rem;
  overflow: hidden;
}
.forum-header--cover::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10,12,18,0.48) 0%, rgba(8,10,16,0.84) 82%, rgba(180,192,218,0.18) 100%);
  border-radius: inherit;
}
@keyframes silver-border-pulse {
  0%, 100% { box-shadow: 0 0 8px 2px rgba(210,218,235,0.22), 0 0 18px 4px rgba(180,192,218,0.1); }
  50%       { box-shadow: 0 0 14px 4px rgba(220,228,245,0.45), 0 0 32px 8px rgba(190,204,230,0.22); }
}
.forum-header--cover::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent 0%, rgba(195,200,215,.3) 15%, rgba(230,232,240,.8) 50%, rgba(195,200,215,.3) 85%, transparent 100%);
  border-radius: 0 0 0.75rem 0.75rem;
  box-shadow: 0 0 8px 2px rgba(210,218,235,0.22), 0 0 18px 4px rgba(180,192,218,0.1);
  z-index: 2;
  transition: box-shadow 0.4s ease;
}
.forum-header--cover:hover::after {
  animation: silver-border-pulse 2s ease-in-out infinite;
}
.forum-header__inner {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.forum-back-link {
  display: inline-block;
  color: var(--gold, #c8922a);
  font-size: 0.8rem;
  text-decoration: none;
  margin-bottom: 0.4rem;
  opacity: 0.8;
  transition: opacity 0.15s;
}
.forum-back-link:hover { opacity: 1; }
.forum-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #f0d98c;
  margin: 0 0 0.3rem;
  letter-spacing: 0.01em;
}
.forum-description {
  color: rgba(240, 217, 140, 0.7);
  font-size: 0.9rem;
  margin: 0 0 0.6rem;
  max-width: 60ch;
}
.forum-stats {
  display: flex;
  gap: 1.25rem;
  font-size: 0.78rem;
  color: rgba(200, 146, 42, 0.7);
}

/* ── Controls bar ───────────────────────────────────────────────────────── */
.forum-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.forum-sort-tabs {
  display: flex;
  gap: 0.25rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(200,146,42,0.15);
  border-radius: 0.5rem;
  padding: 0.2rem;
}
.forum-sort-tab {
  background: none;
  border: none;
  color: rgba(200,146,42,0.7);
  font-size: 0.82rem;
  padding: 0.3rem 0.75rem;
  border-radius: 0.35rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.forum-sort-tab:hover  { color: #f0d98c; background: rgba(200,146,42,0.08); }
.forum-sort-tab.active { color: #f0d98c; background: rgba(200,146,42,0.16); font-weight: 600; }
.forum-state-filter {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(200,146,42,0.2);
  border-radius: 0.4rem;
  color: rgba(240,217,140,0.8);
  font-size: 0.82rem;
  padding: 0.3rem 0.6rem;
}

/* ── Thread cards ───────────────────────────────────────────────────────── */
.forum-thread-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.forum-card {
  display: flex;
  gap: 0.85rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(200,146,42,0.12);
  border-radius: 0.6rem;
  padding: 1rem;
  transition: border-color 0.15s, background 0.15s;
}
.forum-card:hover { border-color: rgba(200,146,42,0.3); background: rgba(255,255,255,0.045); }
.forum-card--pinned { border-left: 3px solid var(--gold, #c8922a); }
.forum-card--glow   { box-shadow: 0 0 14px rgba(200,146,42,0.18); }

.forum-card-thumb {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 0.4rem;
  overflow: hidden;
  background: rgba(255,255,255,0.05);
}
.forum-card-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ── Image-background hero card ──────────────────────────────────────────── */
.forum-card--image-bg {
  background: var(--thread-bg, rgba(255,255,255,0.03));
  min-height: 210px;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0;
  gap: 0;
  overflow: hidden;
}
.forum-card--image-bg .forum-card-body {
  padding: 1rem;
  background: transparent;
}
.forum-card--image-bg .forum-card-title a { color: #f5e8c0; }
.forum-card--image-bg .forum-card-summary { color: rgba(245,232,192,.72); }
.forum-card--image-bg .forum-card-meta    { color: rgba(200,146,42,.65); }

.forum-card-body { flex: 1; min-width: 0; }

.forum-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.35rem;
}
.forum-badge {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
}
.forum-badge--pin     { background: rgba(200,146,42,0.2);  color: #f0d98c; }
.forum-badge--feature { background: rgba(100,180,100,0.2); color: #a8e6a8; }
.forum-badge--state   { background: rgba(255,255,255,0.07); color: rgba(240,217,140,0.7); }
.forum-badge--review  { background: rgba(255,180,0,0.15);  color: #ffd066; }
.forum-badge--locked  { background: rgba(100,100,200,0.15); color: #b0b0f0; }
.forum-badge--collapsed,.forum-badge--removed { background: rgba(200,60,60,0.15); color: #f09090; }

.forum-card-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.3rem;
  line-height: 1.3;
}
.forum-card-title a {
  color: #f0d98c;
  text-decoration: none;
}
.forum-card-title a:hover { text-decoration: underline; }

.forum-card-summary {
  font-size: 0.82rem;
  color: rgba(240,217,140,0.65);
  margin: 0 0 0.6rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.forum-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: rgba(200,146,42,0.6);
  margin-bottom: 0.55rem;
}
.forum-card-author {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.forum-card-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.forum-card-avatar-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(200,146,42,0.2);
  color: #f0d98c;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
}
.forum-card-stats { display: flex; gap: 0.75rem; }

.forum-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.forum-card-btn {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 0.35rem;
  border: 1px solid rgba(200,146,42,0.25);
  background: rgba(200,146,42,0.07);
  color: rgba(200,146,42,0.85);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.12s, border-color 0.12s;
  display: inline-flex;
  align-items: center;
}
.forum-card-btn:hover { background: rgba(200,146,42,0.18); border-color: rgba(200,146,42,0.5); color: #f0d98c; }
.forum-card-btn--view { border-color: transparent; font-weight: 600; }
.forum-card-btn--mod  { border-color: rgba(100,100,200,0.3); color: rgba(180,180,240,0.8); background: rgba(100,100,200,0.07); }
.forum-card-btn--mod:hover { background: rgba(100,100,200,0.18); color: #c0c0ff; }
.forum-card-btn--danger { border-color: rgba(200,60,60,0.3); color: rgba(240,120,120,0.8); background: rgba(200,60,60,0.07); }
.forum-card-btn--danger:hover { background: rgba(200,60,60,0.18); color: #ff9090; }

/* ── Pagination ──────────────────────────────────────────────────────────── */
.forum-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.5rem 0;
}
.forum-page-btn {
  font-size: 0.82rem;
  padding: 0.35rem 0.9rem;
  border-radius: 0.4rem;
  border: 1px solid rgba(200,146,42,0.25);
  background: rgba(200,146,42,0.07);
  color: rgba(200,146,42,0.85);
  cursor: pointer;
}
.forum-page-btn:hover { background: rgba(200,146,42,0.18); color: #f0d98c; }
.forum-page-info { font-size: 0.8rem; color: rgba(200,146,42,0.5); }

/* ── States ──────────────────────────────────────────────────────────────── */
.forum-loading, .forum-empty, .forum-error {
  text-align: center;
  padding: 3rem 1rem;
  color: rgba(200,146,42,0.5);
  font-size: 0.9rem;
}
.forum-error { color: rgba(240,120,120,0.75); }

/* ── Compose panel (slide-in drawer) ─────────────────────────────────────── */
.forum-compose-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
}
.forum-compose-backdrop--visible { display: block; }

.forum-compose-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(520px, 100vw);
  background: #130f08;
  border-left: 1px solid rgba(200,146,42,0.25);
  z-index: 201;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: flex;
  flex-direction: column;
}
.forum-compose-panel--open { transform: translateX(0); }

.forum-compose-inner { padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; min-height: 100%; }

.forum-compose-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(200,146,42,0.15);
}
.forum-compose-heading { font-size: 1.1rem; font-weight: 700; color: #f0d98c; margin: 0; }
.forum-compose-close {
  background: none;
  border: none;
  color: rgba(200,146,42,0.6);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.2rem;
  line-height: 1;
}
.forum-compose-close:hover { color: #f0d98c; }

.forum-label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: rgba(200,146,42,0.7);
  font-weight: 500;
}
.forum-input, .forum-select, .forum-textarea {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(200,146,42,0.2);
  border-radius: 0.4rem;
  color: #f0d98c;
  font-size: 0.88rem;
  padding: 0.5rem 0.7rem;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.forum-input:focus, .forum-select:focus, .forum-textarea:focus {
  outline: none;
  border-color: rgba(200,146,42,0.55);
}
.forum-textarea { resize: vertical; font-family: inherit; }
.forum-select option { background: #1a1208; }

.forum-compose-row { display: flex; gap: 0.75rem; }
.forum-label--half { flex: 1; }

/* ── Image upload area ───────────────────────────────────────────────────── */
.forum-image-area {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.forum-image-preview {
  position: relative;
  display: inline-block;
  border-radius: 0.4rem;
  overflow: hidden;
  max-width: 200px;
}
.forum-image-preview img { display: block; max-width: 100%; height: auto; border-radius: 0.4rem; }
.forum-image-remove {
  position: absolute;
  top: 0.3rem;
  right: 0.3rem;
  background: rgba(0,0,0,0.7);
  border: none;
  color: #fff;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  cursor: pointer;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.forum-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  padding: 0.4rem 0.85rem;
  border-radius: 0.4rem;
  border: 1px dashed rgba(200,146,42,0.35);
  color: rgba(200,146,42,0.8);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  width: fit-content;
}
.forum-upload-btn:hover { background: rgba(200,146,42,0.1); border-color: rgba(200,146,42,0.55); color: #f0d98c; }
.forum-upload-btn--busy { opacity: 0.5; pointer-events: none; }
.forum-upload-status { font-size: 0.78rem; color: rgba(240,120,120,0.8); }

/* ── Compose footer ──────────────────────────────────────────────────────── */
.forum-compose-footer {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(200,146,42,0.12);
}
.forum-compose-status { font-size: 0.8rem; color: rgba(240,120,120,0.85); min-height: 1.2em; }
.forum-compose-actions { display: flex; gap: 0.6rem; justify-content: flex-end; }

/* ── Group modal ─────────────────────────────────────────────────────────── */
.forum-modal-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 300;
}
.forum-modal-overlay[aria-hidden="true"] { display: none; }
.forum-modal {
  background: #130f08;
  border: 1px solid rgba(200,146,42,0.25);
  border-radius: 0.75rem;
  padding: 1.5rem;
  width: min(420px, 92vw);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.forum-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(200,146,42,0.15);
  padding-bottom: 0.75rem;
}
.forum-modal-heading { font-size: 1rem; font-weight: 700; color: #f0d98c; margin: 0; }
.forum-modal-body { display: flex; flex-direction: column; gap: 1rem; }
.forum-modal-modes { display: flex; flex-direction: column; gap: 0.5rem; }
.forum-modal-mode {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(200,146,42,0.15);
  border-radius: 0.45rem;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.forum-modal-mode:has(input:checked) { background: rgba(200,146,42,0.08); border-color: rgba(200,146,42,0.35); }
.forum-modal-mode input { margin-top: 0.15rem; accent-color: var(--gold, #c8922a); }
.forum-modal-mode strong { display: block; font-size: 0.85rem; color: #f0d98c; }
.forum-modal-mode small  { display: block; font-size: 0.76rem; color: rgba(200,146,42,0.6); margin-top: 0.1rem; }
.forum-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  border-top: 1px solid rgba(200,146,42,0.12);
  padding-top: 0.75rem;
}

/* ── New thread button ───────────────────────────────────────────────────── */
.forum-new-btn { white-space: nowrap; }

/* ── Tier 1: Hero card (most recent thread) ──────────────────────────────── */
.forum-tier-hero { margin-bottom: 0.9rem; }

.forum-hero-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 320px;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid rgba(200,146,42,.2);
  background: rgba(255,255,255,0.03);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.forum-hero-card:hover {
  border-color: rgba(200,146,42,.42);
  box-shadow: 0 0 24px rgba(200,146,42,.1);
}
.forum-hero-card--bg {
  background: var(--thread-bg, rgba(255,255,255,0.03));
  border-color: rgba(200,146,42,.15);
}
.forum-hero-card__body {
  padding: 1.5rem 1.5rem 1.25rem;
}
.forum-hero-card__title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0.25rem 0 0.55rem;
  line-height: 1.25;
}
.forum-hero-card__title a {
  color: #f0d98c;
  text-decoration: none;
}
.forum-hero-card__title a:hover { text-decoration: underline; }
.forum-hero-card--bg .forum-hero-card__title a { color: #f5e8c0; }
.forum-hero-card__summary {
  font-size: 0.9rem;
  color: rgba(240,217,140,.7);
  margin: 0 0 0.75rem;
  max-width: 70ch;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.forum-hero-card--bg .forum-hero-card__summary { color: rgba(245,232,192,.72); }

/* ── Tier 2: 2×2 card grid ───────────────────────────────────────────────── */
.forum-tier-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

/* ── Ad rail between card tier and list tier ─────────────────────────────── */
.forum-ad-rail {
  margin: 0 0 0.9rem;
  padding: 0.65rem 1rem;
  border: 1px dashed rgba(200,146,42,.18);
  border-radius: 0.5rem;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.012);
}
.forum-ad-label {
  font-size: 0.68rem;
  color: rgba(200,146,42,.32);
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

/* ── Tier 3: Accordion list ──────────────────────────────────────────────── */
.forum-tier-list {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(200,146,42,.12);
  border-radius: 0.6rem;
  overflow: hidden;
}
.forum-accordion-item {
  border-bottom: 1px solid rgba(200,146,42,.09);
}
.forum-accordion-item:last-child { border-bottom: none; }
.forum-accordion-item--pinned { border-left: 3px solid var(--gold, #c8922a); }

.forum-accordion-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  background: rgba(255,255,255,.02);
}
.forum-accordion-item--open > .forum-accordion-head {
  background: rgba(200,146,42,.055);
}
.forum-accordion-title {
  flex: 1;
  min-width: 0;
  font-size: 0.87rem;
  font-weight: 500;
  color: rgba(240,217,140,.82);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.forum-accordion-title:hover { color: #f0d98c; text-decoration: underline; }

.forum-accordion-toggle {
  flex-shrink: 0;
  background: none;
  border: 1px solid rgba(200,146,42,.2);
  color: rgba(200,146,42,.65);
  width: 26px;
  height: 26px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.22s ease, background 0.15s, color 0.15s;
  line-height: 1;
}
.forum-accordion-toggle:hover { background: rgba(200,146,42,.12); color: #f0d98c; }
.forum-accordion-item--open .forum-accordion-toggle {
  transform: rotate(180deg);
  background: rgba(200,146,42,.1);
  color: #f0d98c;
  border-color: rgba(200,146,42,.4);
}

.forum-accordion-body {
  padding: 0.7rem 0.85rem 0.85rem;
  border-top: 1px solid rgba(200,146,42,.07);
}
.forum-accordion-summary {
  font-size: 0.82rem;
  color: rgba(240,217,140,.62);
  margin: 0 0 0.55rem;
}

/* ── Body layout: main thread list + activity calendar sidebar ───────────── */
.forum-body-layout {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 1.5rem;
  align-items: start;
}
.forum-sidebar {
  position: sticky;
  top: 1rem;
}

/* ── Adaptive thread list layouts ────────────────────────────────────────── */
.forum-thread-list--grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
.forum-thread-list--rail {
  display: flex;
  flex-direction: row;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(200,146,42,.3) transparent;
}
.forum-thread-list--rail .forum-card {
  min-width: 280px;
  max-width: 300px;
  flex-shrink: 0;
}
.forum-thread-list--rail .forum-card-thumb {
  width: 100%;
  height: 140px;
}

/* ── Thread detail page ──────────────────────────────────────────────────── */
.thread-body-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(207,132,31,.28);
  border-radius: 0.6rem;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.thread-body-author {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  color: rgba(240,217,140,.7);
}
.thread-body-author strong { color: #f0d98c; }
.thread-body-time { margin-left: auto; font-size: 0.78rem; color: rgba(200,146,42,.55); }
.thread-body-content { line-height: 1.7; color: rgba(240,232,200,.88); margin-bottom: 1rem; }
.thread-body-content p  { margin: 0 0 0.75rem; }
.thread-body-content h2,
.thread-body-content h3 { color: #f0d98c; margin: 1rem 0 0.4rem; }
.thread-body-content blockquote {
  border-left: 3px solid rgba(200,146,42,.4);
  margin: 0.75rem 0;
  padding: 0.4rem 0 0.4rem 1rem;
  color: rgba(240,217,140,.6);
}
.thread-body-actions { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid rgba(207,132,31,.15); }

.thread-replies-section { margin-top: 1.5rem; }
.thread-replies-heading {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(200,146,42,.75);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 0.9rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(207,132,31,.2);
}
.thread-post {
  display: flex;
  gap: 0.9rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(207,132,31,.12);
}
.thread-post:last-child { border-bottom: none; }
.thread-post-avatar { flex-shrink: 0; }
.thread-post-body-wrap { flex: 1; min-width: 0; }
.thread-post-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  color: rgba(240,217,140,.7);
}
.thread-post-meta strong { color: #f0d98c; }
.thread-post-meta time   { margin-left: auto; font-size: 0.78rem; color: rgba(200,146,42,.5); }
.thread-post-body { line-height: 1.65; color: rgba(240,232,200,.85); font-size: 0.9rem; }
.thread-post-body p { margin: 0 0 0.5rem; }

.thread-reply-form {
  margin-top: 1.25rem;
  padding: 1.25rem;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(207,132,31,.22);
  border-radius: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.thread-reply-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
}
.thread-reply-footer #thread-reply-status {
  flex: 1;
  font-size: 0.82rem;
  color: rgba(240,120,120,.8);
}
.thread-reply-gate {
  margin-top: 1rem;
  font-size: 0.88rem;
  color: rgba(200,146,42,.6);
  text-align: center;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .forum-body-layout { grid-template-columns: 1fr; }
  .forum-sidebar { position: static; }
  .forum-thread-list--grid { grid-template-columns: 1fr; }
  .forum-tier-cards { grid-template-columns: 1fr; }
  .forum-hero-card { min-height: 240px; }
  .forum-hero-card__title { font-size: 1.2rem; }
}
@media (max-width: 600px) {
  .forum-card { flex-direction: column; }
  .forum-card-thumb { width: 100%; height: 140px; }
  .forum-compose-row { flex-direction: column; }
  .forum-compose-panel { width: 100%; }
}

/* ── Thread page — layout toggle ─────────────────────────────────────────── */
.forum-body-layout[data-layout="split"] {
  grid-template-columns: 1fr 260px;
}
.forum-body-layout[data-layout="full"] {
  grid-template-columns: 1fr;
}
.forum-body-layout[data-layout="full"] #forum-sidebar {
  display: none;
}

.thread-layout-toggle {
  flex-shrink: 0;
  background: rgba(200,146,42,0.07);
  border: 1px solid rgba(200,146,42,0.25);
  color: rgba(200,146,42,0.7);
  border-radius: 0.4rem;
  width: 32px;
  height: 32px;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, color 0.12s;
  align-self: flex-start;
  margin-top: 0.25rem;
}
.thread-layout-toggle:hover { background: rgba(200,146,42,0.18); color: #f0d98c; }

/* ── Sidebar panels ──────────────────────────────────────────────────────── */
.sidebar-panel {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(200,146,42,0.14);
  border-radius: 0.55rem;
  margin-bottom: 0.85rem;
  overflow: hidden;
}
.sidebar-panel__title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(200,146,42,0.65);
  padding: 0.55rem 0.85rem 0.4rem;
  border-bottom: 1px solid rgba(200,146,42,0.1);
  margin: 0;
}
.sidebar-panel__body {
  padding: 0.6rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.sidebar-empty {
  font-size: 0.78rem;
  color: rgba(200,146,42,0.4);
  margin: 0;
  text-align: center;
  padding: 0.25rem 0;
}

/* ── Participant items ────────────────────────────────────────────────────── */
.participant-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.25rem 0;
}
.participant-avatar {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(200,146,42,0.15);
  color: #f0d98c;
  font-size: 0.75rem;
  font-weight: 700;
}
.participant-avatar--gold {
  background: rgba(200,146,42,0.3);
  box-shadow: 0 0 6px rgba(200,146,42,0.3);
}
.participant-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}
.participant-name {
  font-size: 0.8rem;
  color: rgba(240,217,140,0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.participant-count {
  font-size: 0.7rem;
  color: rgba(200,146,42,0.5);
}
.participant-item--featured .participant-name {
  color: #f0d98c;
  font-weight: 600;
}
.sidebar-dm-btn {
  flex-shrink: 0;
  font-size: 0.68rem !important;
  padding: 0.1rem 0.45rem !important;
}

/* ── Top reply link ──────────────────────────────────────────────────────── */
.top-reply-link {
  display: block;
  font-size: 0.82rem;
  color: rgba(200,146,42,0.8);
  text-decoration: none;
  padding: 0.2rem 0;
  transition: color 0.12s;
}
.top-reply-link:hover { color: #f0d98c; text-decoration: underline; }

/* ── Thread replies header ───────────────────────────────────────────────── */
.thread-replies-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.9rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(207,132,31,.2);
}
.thread-replies-heading { border-bottom: none; margin: 0; padding: 0; }

/* ── Post accordion ──────────────────────────────────────────────────────── */
.post-body-content {
  max-height: 8rem;
  overflow: hidden;
  position: relative;
  transition: max-height 0.3s ease;
}
.post-body-content::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2.5rem;
  background: linear-gradient(to bottom, transparent, rgba(10, 12, 18, 0.95));
  pointer-events: none;
  transition: opacity 0.3s;
}
.thread-post--expanded .post-body-content,
.post--expanded .post-body-content {
  max-height: none;
}
.post--expanded .post-body-content::after { display: none; }

.post-expand-btn {
  display: block;
  background: none;
  border: none;
  font-size: 0.73rem;
  color: rgba(200,146,42,0.55);
  cursor: pointer;
  padding: 0.2rem 0 0.4rem;
  transition: color 0.12s;
}
.post-expand-btn:hover { color: rgba(200,146,42,0.9); }

/* ── Post states ─────────────────────────────────────────────────────────── */
.post--top-rated {
  background: rgba(200,146,42,0.05);
  border-left: 3px solid rgba(200,146,42,0.45);
  border-radius: 0 0.4rem 0.4rem 0;
  padding-left: 0.9rem;
}
.post-top-badge {
  background: rgba(200,146,42,0.2);
  color: #f0d98c;
  font-size: 0.66rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.post--blocked {
  padding: 0.6rem 0;
}
.post-blocked-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: rgba(255,255,255,0.03);
  border: 1px dashed rgba(200,146,42,0.15);
  border-radius: 0.4rem;
  font-size: 0.78rem;
  color: rgba(200,146,42,0.35);
}

/* Highlight flash when jumping to top reply */
@keyframes post-highlight-flash {
  0%   { box-shadow: 0 0 0 0 rgba(200,146,42,0); background: rgba(255,255,255,0.03); }
  20%  { box-shadow: 0 0 0 4px rgba(200,146,42,0.35); background: rgba(200,146,42,0.08); }
  100% { box-shadow: 0 0 0 0 rgba(200,146,42,0); background: rgba(255,255,255,0.03); }
}
.post-highlight {
  animation: post-highlight-flash 2.4s ease forwards;
  border-radius: 0.4rem;
}

/* ── Post edit form ──────────────────────────────────────────────────────── */
.post-edit-form {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(200,146,42,0.2);
  border-radius: 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.post-edit-textarea {
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
  font-size: 0.85rem;
}
.post-edit-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.post-edit-status {
  font-size: 0.78rem;
  color: rgba(240,120,120,0.8);
  flex: 1;
}
.post-edited-tag {
  font-size: 0.72rem;
  color: rgba(200,146,42,0.4);
  font-style: normal;
}

/* ── Pagination ──────────────────────────────────────────────────────────── */
.thread-pagination { margin-top: 1rem; }
.thread-page-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  padding: 0.75rem 0;
}
.page-btn--active {
  background: rgba(200,146,42,0.22) !important;
  border-color: rgba(200,146,42,0.5) !important;
  color: #f0d98c !important;
  font-weight: 700;
}
.page-info {
  margin-left: 0.5rem;
  font-size: 0.78rem;
  color: rgba(200,146,42,0.45);
}

/* ── Post avatar sizing (slightly larger) ────────────────────────────────── */
.post-avatar-letter {
  width: 32px !important;
  height: 32px !important;
  font-size: 0.8rem !important;
}
