/* Flat topic page + nested comment threads (dark/gold). */
.forum-thread-page.is-flat .forum-topic,
.forum-thread-page.is-flat .forum-join-wrap,
.forum-thread-page.is-flat .forum-comments {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.forum-thread-page.is-flat .forum-topic-title {
  margin: .45rem 0 .55rem;
  font-size: 1.85rem;
  line-height: 1.25;
  font-weight: 800;
  color: #fff8ea;
}

.forum-thread-page.is-flat .forum-post-content {
  font-size: 1.02rem;
  line-height: 1.7;
  color: #eadfce;
  max-width: 44rem;
}

.forum-topic-pills { margin-top: .9rem; }

.forum-join-fake {
  appearance: none;
  display: block;
  width: 100%;
  max-width: 44rem;
  margin: 1rem 0 .4rem;
  padding: .7rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--forum-line);
  background: rgba(16, 13, 17, .55);
  color: var(--forum-muted);
  font: inherit;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
}

.forum-join-fake:hover { border-color: var(--forum-gold); color: #ead9b7; }

.forum-thread-page.is-flat .forum-compose-form.is-join {
  margin-top: .7rem;
  padding: .8rem;
  border: 1px solid var(--forum-line);
  border-radius: .85rem;
  background: rgba(16, 13, 17, .35);
}

.forum-comments-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .6rem 1rem;
  margin: 1.1rem 0 .7rem;
}

.forum-comments-bar h2 { margin: 0; font-size: 1.05rem; margin-right: auto; }

.forum-sort-label {
  margin-left: auto;
}

.forum-thread-page.is-flat .forum-comments {
  padding-left: 1.05rem;
}

.forum-thread-page.is-flat .forum-comment,
.forum-thread-page.is-flat .forum-comment.is-best {
  position: relative;
  display: block;
  grid-template-columns: none;
  gap: 0;
  margin: 0 0 .7rem;
  padding: .15rem 0 .2rem;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.forum-comment.is-best .forum-best-badge { margin-left: .15rem; }

.forum-thread-page.is-flat .forum-best-badge {
  display: inline-flex;
  padding: .08rem .5rem;
  border-radius: 999px;
  background: rgba(212, 179, 106, .16);
  border: 1px solid rgba(212, 179, 106, .45);
  color: #f0d784;
  font-weight: 700;
  letter-spacing: .03em;
  font-size: .7rem;
  white-space: nowrap;
}

.forum-avatar-md {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--forum-line);
  flex: 0 0 32px;
}

.forum-avatar-md.is-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--forum-gold-soft);
  color: #f3e2b8;
  font-size: .75rem;
  font-weight: 700;
}

.forum-comment-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .3rem .45rem;
  color: var(--forum-muted);
  font-size: .82rem;
}

.forum-op {
  display: inline-flex;
  padding: .05rem .35rem;
  border-radius: .3rem;
  background: rgba(90, 150, 220, .18);
  color: #8cb8ea;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .04em;
}

.forum-comment-body {
  margin: .2rem 0 0 2.2rem;
}

.forum-comment-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .15rem .2rem;
  margin-top: .35rem;
  color: #8d7f72;
}

.forum-comment-action,
.forum-comment-actions summary {
  appearance: none;
  border: 0;
  background: transparent;
  color: #8d7f72;
  font: inherit;
  font-size: .78rem;
  padding: .2rem .4rem;
  border-radius: .35rem;
  cursor: pointer;
  text-decoration: none;
}

.forum-comment-action:hover,
.forum-comment-actions summary:hover,
.forum-comment-action.is-active {
  color: #ead9b7;
  background: rgba(255, 255, 255, .04);
}

.forum-comment-actions .forum-feed-pill.is-quiet {
  background: transparent;
  border-color: transparent;
  padding: 0;
}

.forum-comment-actions .forum-feed-pill.is-quiet:hover {
  background: rgba(255, 255, 255, .04);
}

.forum-thread-toggle {
  position: absolute;
  left: -1.15rem;
  top: 2.05rem;
  appearance: none;
  border: 0;
  background: #120e12;
  color: rgba(212, 179, 106, .7);
  cursor: pointer;
  font-size: .8rem;
  line-height: 1;
  width: 1.05rem;
  height: 1.05rem;
  padding: 0;
  z-index: 2;
  border-radius: 50%;
}

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

.forum-comment-children {
  position: relative;
  margin: .45rem 0 0 .35rem;
  padding: .1rem 0 0 1.05rem;
  border-left: 1.5px solid rgba(212, 179, 106, .28);
}

.forum-comment-children > .forum-comment { margin-bottom: .65rem; }

.forum-comment-children > .forum-comment::before {
  content: "";
  position: absolute;
  left: -1.05rem;
  top: 16px;
  width: 14px;
  height: 12px;
  border-left: 1.5px solid rgba(212, 179, 106, .28);
  border-bottom: 1.5px solid rgba(212, 179, 106, .28);
  border-bottom-left-radius: 10px;
}

.forum-comment.is-collapsed > .forum-comment-body > .forum-post-content,
.forum-comment.is-collapsed > .forum-comment-body > .forum-comment-actions,
.forum-comment.is-collapsed > .forum-comment-body > .forum-inline-slot,
.forum-comment.is-collapsed > .forum-comment-body > .forum-comment-children,
.forum-comment.is-collapsed > .forum-comment-body > .forum-comment-more {
  display: none;
}

.forum-comment.is-collapsed .forum-thread-toggle { transform: rotate(-90deg); }


.forum-comment-more {
  margin: .35rem 0 0 .2rem;
  color: var(--forum-gold);
  font-size: .85rem;
}

.forum-comment-more summary { cursor: pointer; }

.forum-inline-reply {
  margin: .5rem 0 .2rem;
  display: flex;
  flex-direction: column;
  gap: .45rem;
  max-width: 36rem;
}

.forum-inline-reply textarea {
  width: 100%;
  border-radius: .6rem;
  border: 1px solid var(--forum-line);
  background: rgba(16, 13, 17, .6);
  color: #f4ead8;
  padding: .55rem .7rem;
  font: inherit;
  resize: vertical;
}

.forum-more-menu {
  position: absolute;
  right: 0;
  z-index: 5;
  min-width: 12rem;
  background: #1c171b;
  border: 1px solid var(--forum-line);
  border-radius: .5rem;
  padding: .4rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .4);
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.forum-feed-more.is-inline {
  position: relative;
  top: auto;
  right: auto;
  flex: 0 0 auto;
  margin-left: 0;
  align-self: center;
}

.forum-feed-more.is-inline > summary {
  list-style: none;
  width: 1.55rem;
  height: 1.55rem;
  padding: 0;
  font-size: 1.05rem;
  letter-spacing: 0;
}

.forum-thread-page.is-flat .role-badge {
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--forum-muted);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: none;
}

@media (max-width: 960px) {
  .forum-thread-page.is-flat .forum-topic-title { font-size: 1.4rem; }
  .forum-thread-page.is-flat .forum-comments { padding-left: .9rem; }
  .forum-comment-body { margin-left: 1.7rem; }
  .forum-thread-toggle { left: -0.95rem; }
}

.forum-thread-page.is-flat .forum-rail-card.forum-related h2 {
  margin: 0 0 .25rem;
  font-size: .95rem;
  font-weight: 700;
}
.forum-thread-page.is-flat .forum-rail-card.forum-related h3 {
  margin: .85rem 0 .35rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .03em;
  color: var(--forum-gold);
}
.forum-thread-page.is-flat .forum-rail-card.forum-related h3:first-of-type {
  margin-top: .55rem;
}
.forum-related-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.forum-related-row {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: 9px 6px;
  border-bottom: 1px solid var(--forum-line);
  color: #ead9b7;
  text-decoration: none;
  border-radius: .3rem;
}
.forum-related-list li:last-child .forum-related-row {
  border-bottom: 0;
}
.forum-related-row:hover {
  background: rgba(255, 255, 255, .045);
  color: #fff1cc;
}
.forum-related-thumb {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: .4rem;
  object-fit: cover;
  background: rgba(16, 13, 17, .7);
  border: 1px solid var(--forum-line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.forum-related-thumb.is-icon {
  color: var(--forum-gold);
}
.forum-related-initial {
  font-size: .85rem;
  font-weight: 700;
  color: #f3e2b8;
}
.forum-related-title {
  min-width: 0;
  flex: 1 1 auto;
  font-size: .875rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

@media (max-width: 960px) {
  .forum-related-row { padding: 10px 4px; }
  .forum-thread-page.is-flat .forum-rail-card.forum-related h3 { margin-top: 1rem; }
  .forum-thread-page.is-flat .forum-rail-card.forum-related h3:first-of-type { margin-top: .6rem; }
}
