/* Shared thread fallback, used by profile thread lists too */
.thread-card {
  display: flex;
  gap: 0.875rem;
  padding: 1rem;
  color: inherit;
  background: oklch(0.92 0.04 15 / 0.045);
  border: 1px solid oklch(0.92 0.04 15 / 0.09);
  border-radius: 0.5rem;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
a.thread-card { text-decoration: none; }
/* Same red-glow + float hover as the community feed cards — this fallback
   is what profile.html's thread list actually renders with, so without
   this override those cards never got the effect at all. */
.thread-card:hover {
  position: relative;
  z-index: 2;
  transform: translateY(-6px);
  border-color: rgb(255 60 90 / 0.6);
  border-color: oklch(0.66 0.22 24 / 0.6);
  box-shadow:
    0 22px 48px rgb(0 0 0 / 0.45),
    0 0 0 1.5px rgb(255 60 90 / 0.5),
    0 0 32px rgb(255 40 80 / 0.55),
    0 0 60px rgb(255 20 70 / 0.35);
  box-shadow:
    0 22px 48px oklch(0.08 0.05 18 / 0.45),
    0 0 0 1.5px oklch(0.62 0.24 20 / 0.5),
    0 0 32px oklch(0.6 0.24 20 / 0.55),
    0 0 60px oklch(0.55 0.24 15 / 0.35);
}
.vote-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  flex: 0 0 2.25rem;
  color: oklch(0.92 0.04 15 / 0.58);
}
.vote-col .score,
.td-vote-col .score {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: oklch(0.96 0.02 20 / 0.92);
}
.upvote-btn,
.vote-down {
  width: 1.75rem;
  height: 1.75rem;
  display: grid;
  place-items: center;
  border: none;
  background: transparent;
  color: inherit;
  padding: 0;
}
.upvote-btn { cursor: pointer; transition: color 0.15s ease, transform 0.12s ease; }
.upvote-btn:hover,
.upvote-btn.voted { color: oklch(0.68 0.23 24); }
.upvote-btn:hover { transform: translateY(-1px); }
.upvote-btn svg,
.vote-down svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linejoin: round;
}
.vote-down { opacity: 0.55; }
.thread-body,
.thread-main-link {
  min-width: 0;
  flex: 1;
}
.thread-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
  font-size: 0.6875rem;
}
.thread-meta-row .tag,
.td-category {
  display: inline-flex;
  align-items: center;
  min-height: 1.25rem;
  padding: 0.16rem 0.45rem;
  border-radius: 0.35rem;
  background: oklch(0.58 0.19 24 / 0.14);
  color: oklch(0.78 0.16 24);
  border: 1px solid oklch(0.58 0.19 24 / 0.16);
}
.thread-meta-row .hot {
  padding: 0.12rem 0.4rem;
  border-radius: 0.35rem;
  background: oklch(0.68 0.22 38 / 0.14);
  color: oklch(0.78 0.19 38);
}
.thread-card h3 {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0;
}
.thread-preview {
  margin: 0.35rem 0 0.75rem;
  color: oklch(0.92 0.04 15 / 0.62);
  font-size: 0.875rem;
  line-height: 1.45;
}
.thread-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  min-height: 1.5rem;
  color: oklch(0.92 0.04 15 / 0.48);
  font-size: 0.75rem;
}
.thread-foot svg {
  width: 0.875rem;
  height: 0.875rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}
.thread-author { color: oklch(0.96 0.02 20 / 0.78); font-weight: 600; }
.thread-foot .gold-tick {
  font-size: 0.9rem;
}
.thread-time { font-family: var(--font-mono); font-size: 0.6875rem; }
.thread-foot-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  margin-left: auto;
}
.thread-comments {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.thread-share {
  display: inline-flex;
  align-items: center;
  border: none;
  background: transparent;
  color: inherit;
  padding: 0;
  cursor: pointer;
}
.thread-share:hover { color: var(--rose); }
.thread-share svg {
  width: 0.9rem;
  height: 0.9rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}
.thread-time-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.25rem;
  padding: 0.16rem 0.45rem;
  border-radius: 0.35rem;
  background: oklch(0.92 0.04 15 / 0.05);
  color: oklch(0.92 0.04 15 / 0.46);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.02em;
}
.thread-hashtags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.65rem;
}
.thread-hashtags span {
  display: inline-flex;
  align-items: center;
  min-height: 1.55rem;
  padding: 0.14rem 0.55rem;
  border-radius: 999px;
  background: oklch(0.62 0.19 24 / 0.1);
  border: 1px solid oklch(0.62 0.19 24 / 0.16);
  color: oklch(0.78 0.15 24);
  font-size: 0.72rem;
  font-weight: 650;
}

/* Live-project link panel — a real attached URL, opened directly in a new
   tab (no in-site iframe embed). Gradient is purely decorative (no
   screenshot service exists), keyed off the thread id for variety. */
.thread-project-panel {
  position: relative;
  isolation: isolate;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.2rem;
  padding: 0.75rem;
  border-radius: 0.55rem;
  overflow: hidden;
  color: #fff;
  text-decoration: none;
  border: 1px solid oklch(0.96 0.02 20 / 0.12);
  transition: border-color 0.15s ease;
}
.thread-project-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, transparent 40%, oklch(0 0 0 / 0.55));
}
.thread-project-panel:hover {
  border-color: oklch(0.96 0.02 20 / 0.28);
}
.tpp-frame {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.tpp-frame iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 400%;
  height: 400%;
  border: 0;
  pointer-events: none;
  transform: scale(0.25);
  transform-origin: 0 0;
  background: #fff;
}
.tpp-g0 { background: radial-gradient(circle at 30% 20%, oklch(0.6 0.2 320), transparent 55%), linear-gradient(135deg, oklch(0.34 0.14 300), oklch(0.16 0.07 18)); }
.tpp-g1 { background: radial-gradient(circle at 70% 25%, oklch(0.62 0.2 20), transparent 55%), linear-gradient(135deg, oklch(0.4 0.16 20), oklch(0.16 0.07 18)); }
.tpp-g2 { background: radial-gradient(circle at 30% 70%, oklch(0.6 0.16 195), transparent 55%), linear-gradient(135deg, oklch(0.32 0.12 200), oklch(0.14 0.06 18)); }
.tpp-g3 { background: radial-gradient(circle at 60% 30%, oklch(0.64 0.18 145), transparent 55%), linear-gradient(135deg, oklch(0.32 0.13 150), oklch(0.14 0.06 18)); }
.tpp-g4 { background: radial-gradient(circle at 50% 25%, oklch(0.7 0.19 60), transparent 55%), linear-gradient(135deg, oklch(0.4 0.15 55), oklch(0.16 0.07 18)); }
.tpp-eyebrow,
.tpp-host,
.tpp-open {
  position: relative;
  z-index: 2;
}
.tpp-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: oklch(0.96 0.02 20 / 0.7);
}
.tpp-host {
  overflow: hidden;
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tpp-open {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: oklch(0.96 0.02 20 / 0.75);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.tpp-open svg {
  width: 0.7rem;
  height: 0.7rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
.thread-project-panel:hover .tpp-open {
  color: var(--rose);
}

/* Thread detail page's larger version of the same panel */
.td-project-panel {
  grid-column: 3;
  grid-row: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-self: start;
}
.td-project-eyebrow {
  color: oklch(0.92 0.04 15 / 0.5);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.td-project-visual {
  position: relative;
  min-height: 8rem;
  border-radius: 0.75rem;
  border: 1px solid oklch(0.96 0.02 20 / 0.12);
  overflow: hidden;
}
.td-project-visual iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 400%;
  height: 400%;
  border: 0;
  pointer-events: none;
  transform: scale(0.25);
  transform-origin: 0 0;
  background: #fff;
}
.td-project-host {
  overflow: hidden;
  color: oklch(0.96 0.02 20 / 0.85);
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.td-project-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.35rem;
  border-radius: 0.6rem;
  background: linear-gradient(135deg, oklch(0.6 0.24 24), oklch(0.52 0.22 17));
  color: #fff;
  font-weight: 800;
  font-size: 0.82rem;
}
.td-project-open svg {
  width: 0.9rem;
  height: 0.9rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

/* "..." options dropdown — shared by thread cards, the thread detail
   page, and comments. */
.thread-menu-wrap {
  position: relative;
}
.thread-more {
  width: 1.65rem;
  height: 1.65rem;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 0.35rem;
  background: transparent;
  color: var(--dim, oklch(0.92 0.04 15 / 0.38));
  cursor: pointer;
}
.thread-more:hover {
  background: oklch(0.92 0.04 15 / 0.08);
  color: var(--rose);
}
.thread-more svg { width: 1rem; height: 1rem; }
.thread-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.3rem);
  z-index: 30;
  min-width: 10rem;
  padding: 0.3rem;
  border-radius: 0.5rem;
  background: oklch(0.14 0.06 18);
  border: 1px solid oklch(0.92 0.04 15 / 0.12);
  box-shadow: 0 12px 30px oklch(0 0 0 / 0.45);
}
.thread-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  border: none;
  border-radius: 0.35rem;
  background: transparent;
  color: oklch(0.92 0.04 15 / 0.76);
  cursor: pointer;
  padding: 0.5rem 0.6rem;
  font-size: 0.78rem;
  text-align: left;
  white-space: nowrap;
}
.thread-menu-item:hover { background: oklch(0.92 0.04 15 / 0.08); }
.thread-menu-item svg {
  width: 0.85rem;
  height: 0.85rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}
.thread-menu-delete,
.thread-menu-report,
.tdc-menu-delete,
.tdc-menu-report { color: oklch(0.74 0.18 24); }
.threads-empty {
  padding: 4rem 1rem;
  text-align: center;
  color: oklch(0.92 0.04 15 / 0.48);
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

/* Community board */
.community-board {
  --panel: oklch(0.18 0.07 18 / 0.72);
  --panel-strong: oklch(0.2 0.08 18 / 0.92);
  --line: oklch(0.92 0.04 15 / 0.095);
  --muted: oklch(0.92 0.04 15 / 0.58);
  --dim: oklch(0.92 0.04 15 / 0.38);
  display: grid;
  grid-template-columns: minmax(12rem, 14.5rem) minmax(0, 1fr) minmax(15.5rem, 18rem);
  gap: 1.5rem;
  align-items: start;
}

.community-rail,
.community-aside,
.thread-detail-aside {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.community-rail {
  position: sticky;
  top: 1.5rem;
}

.rail-post-btn,
.aside-join-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 2.75rem;
  padding: 0.7rem 1rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, oklch(0.6 0.24 24), oklch(0.52 0.22 17));
  color: #fff;
  border: 1px solid oklch(0.75 0.2 22 / 0.22);
  box-shadow: 0 18px 40px oklch(0.12 0.07 18 / 0.35);
  font-weight: 800;
  font-size: 0.875rem;
}
.rail-post-btn svg,
.aside-join-btn svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.rail-nav,
.rail-topics,
.rail-live-card,
.aside-card,
.feed-toolbar {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  box-shadow: 0 24px 60px oklch(0.08 0.05 18 / 0.22);
  backdrop-filter: blur(14px);
}

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.65rem;
}
.rail-nav a,
.rail-topics a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  min-height: 2.35rem;
  padding: 0.55rem 0.7rem;
  border-radius: 0.45rem;
  color: oklch(0.92 0.04 15 / 0.74);
  font-size: 0.875rem;
  transition: background 0.15s ease, color 0.15s ease;
}
.rail-nav a:hover,
.rail-topics a:hover,
.rail-nav a.active,
.rail-topics a.active {
  background: oklch(0.56 0.22 22 / 0.18);
  color: oklch(0.96 0.02 20);
}
.rail-nav svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  flex: 0 0 auto;
}
.rail-nav a span { flex: 1; }
.rail-topics {
  padding: 0.7rem;
}
.rail-label {
  margin: 0.2rem 0 0.45rem 0.45rem;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.rail-topics a {
  min-height: 2rem;
  padding-block: 0.4rem;
  font-size: 0.8125rem;
}
.rail-topics b {
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 0.65rem;
}

.rail-live-card {
  padding: 0.7rem;
  overflow: hidden;
}
.community-chat-top {
  padding: 0.85rem;
}
.community-chat-top .chat-card {
  min-height: 10.5rem;
  max-height: 15rem;
}
.community-chat-top .chat-messages {
  min-height: 7.25rem;
}
.rail-live-head {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  margin-bottom: 0.7rem;
}
.rail-live-icon {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 0.5rem;
  background: oklch(0.62 0.19 195 / 0.11);
  border: 1px solid oklch(0.72 0.15 195 / 0.22);
  color: oklch(0.78 0.13 195);
}
.rail-live-icon svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}
.rail-live-head strong {
  display: block;
  color: oklch(0.96 0.02 20);
  font-size: 0.9rem;
}
.rail-live-head span span {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.12rem;
  color: var(--muted);
  font-size: 0.72rem;
}
.rail-live-head i,
.community-ticker i {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: oklch(0.7 0.18 150);
  box-shadow: 0 0 0 3px oklch(0.7 0.18 150 / 0.12);
}

.community-feed {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.feed-toolbar {
  min-height: 3.8rem;
  padding: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.feed-tabs {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  overflow-x: auto;
}
.feed-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 2.05rem;
  padding: 0.45rem 0.85rem;
  border-radius: 0.45rem;
  color: var(--muted);
  font-size: 0.86rem;
}
.feed-tabs a:hover,
.feed-tabs a.active {
  background: oklch(0.58 0.22 22 / 0.2);
  color: oklch(0.96 0.02 20);
}
.community-board .thread-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.community-board .thread-card {
  position: relative;
  display: grid;
  grid-template-columns: 3.3rem minmax(0, 1fr) 1.65rem;
  gap: 1rem;
  align-items: center;
  min-height: 9.2rem;
  padding: 1rem;
  border-radius: 0.5rem;
  background:
    linear-gradient(90deg, oklch(0.17 0.08 18 / 0.94), oklch(0.2 0.08 18 / 0.72)),
    oklch(0.18 0.08 18);
  border: 1px solid var(--line);
  box-shadow: 0 20px 58px oklch(0.08 0.05 18 / 0.22);
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.community-board .thread-card.has-project {
  grid-template-columns: 3.3rem minmax(0, 1fr) 7.4rem 1.65rem;
}
.community-board .thread-card > .thread-menu-wrap {
  align-self: start;
  justify-self: end;
}
/* Red-glow + float hover effect. z-index on hover guarantees the glow
   paints over neighboring cards instead of being clipped by whichever
   card happens to sit right below it in the list. */
.community-board .thread-card:hover {
  position: relative;
  z-index: 2;
  transform: translateY(-6px);
  border-color: rgb(255 60 90 / 0.6);
  border-color: oklch(0.66 0.22 24 / 0.6);
  box-shadow:
    0 22px 48px rgb(0 0 0 / 0.45),
    0 0 0 1.5px rgb(255 60 90 / 0.5),
    0 0 32px rgb(255 40 80 / 0.55),
    0 0 60px rgb(255 20 70 / 0.35);
  box-shadow:
    0 22px 48px oklch(0.08 0.05 18 / 0.45),
    0 0 0 1.5px oklch(0.62 0.24 20 / 0.5),
    0 0 32px oklch(0.6 0.24 20 / 0.55),
    0 0 60px oklch(0.55 0.24 15 / 0.35);
}
.community-board .vote-col {
  align-self: stretch;
  justify-content: center;
  border-radius: 0.5rem;
  background: oklch(0.92 0.04 15 / 0.035);
}
.thread-main-link {
  display: block;
  color: inherit;
  text-decoration: none;
}
.community-board .thread-card h3 {
  color: oklch(0.98 0.01 20);
  font-size: 1.08rem;
}
.thread-author-avatar,
.member-avatar,
.tdc-avatar {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  background: linear-gradient(135deg, oklch(0.72 0.17 24), oklch(0.64 0.12 195));
  color: #fff;
  font-family: var(--font-serif);
  font-size: 0.75rem;
  border: 1px solid oklch(0.96 0.02 20 / 0.16);
}
.thread-author-avatar img,
.member-avatar img,
.tdc-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.community-aside {
  position: sticky;
  /* Clears the fixed notify/profile bar floating in the top-right corner
     (see .shell-topright-bar in appshell.css) — sized to clear the bar's
     dropdown menu when open (~160px tall from viewport top), not just the
     closed button, since the dropdown would otherwise sit right over the
     top of this card. */
  top: 11rem;
}
.aside-card {
  padding: 1rem;
}
.aside-card h2,
.aside-heading h2 {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0;
  color: oklch(0.96 0.02 20);
}
.aside-card p {
  margin-top: 0.8rem;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.55;
}
.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 1rem 0;
}
.about-stats span {
  color: var(--muted);
  font-size: 0.76rem;
}
.about-stats strong {
  display: block;
  color: oklch(0.96 0.02 20);
  font-size: 1.12rem;
  line-height: 1.1;
}
.about-stat-box {
  padding: 0.55rem 0.7rem;
  border-radius: 0.55rem;
  background: oklch(0.12 0.05 18 / 0.4);
  border: 1px solid oklch(0.92 0.04 15 / 0.12);
}
.aside-join-btn {
  width: 100%;
  min-height: 2.5rem;
  margin-top: 0.25rem;
}
.aside-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.aside-heading a {
  color: var(--dim);
  font-size: 0.72rem;
}
.member-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.member-row {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
  color: inherit;
}
.member-avatar {
  width: 2rem;
  height: 2rem;
}
.member-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.member-copy strong {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  color: oklch(0.96 0.02 20);
  font-size: 0.78rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.member-copy small {
  color: var(--dim);
  font-size: 0.72rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.member-row b {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}
.trend-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}
.trend-tags a,
.trend-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 1.85rem;
  padding: 0.35rem 0.62rem;
  border-radius: 999px;
  background: oklch(0.92 0.04 15 / 0.045);
  border: 1px solid var(--line);
  color: oklch(0.92 0.04 15 / 0.76);
  font-size: 0.72rem;
}
.aside-empty {
  margin: 0;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.community-ticker {
  display: flex;
  gap: 2rem;
  align-items: center;
  min-height: 3rem;
  margin-top: 1rem;
  padding: 0.75rem 0.25rem;
  overflow: hidden;
  color: oklch(0.92 0.04 15 / 0.58);
  border-top: 1px solid oklch(0.92 0.04 15 / 0.08);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  white-space: nowrap;
}
.community-ticker span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.community-ticker span:not(:first-child)::before {
  content: "";
  width: 0.32rem;
  height: 0.32rem;
  border-radius: 999px;
  background: oklch(0.58 0.22 22);
  margin-right: 1.35rem;
}

/* Live chat */
.chat-card {
  display: flex;
  flex-direction: column;
  min-height: 12.5rem;
  max-height: 17rem;
}
.chat-messages {
  flex: 1;
  min-height: 9rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding-right: 0.15rem;
  scrollbar-width: thin;
  scrollbar-color: oklch(0.92 0.04 15 / 0.16) transparent;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb {
  background: oklch(0.92 0.04 15 / 0.16);
  border-radius: 999px;
}
.chat-msg {
  display: flex;
  align-items: flex-end;
  gap: 0.45rem;
}
.chat-msg-me { flex-direction: row-reverse; }
.chat-av {
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 999px;
  overflow: hidden;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: oklch(0.28 0.1 18);
  color: var(--rose);
  font-size: 0.62rem;
  font-weight: 800;
}
.chat-av img { width: 100%; height: 100%; object-fit: cover; }
.chat-bubble-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
  max-width: 78%;
}
.chat-msg-me .chat-bubble-wrap { align-items: flex-end; }
.chat-handle {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  color: var(--dim);
  font-size: 0.62rem;
  padding-inline: 0.25rem;
}
.chat-msg-me .chat-handle { display: none; }
.chat-bubble {
  max-width: 100%;
  padding: 0.42rem 0.62rem;
  border-radius: 0.8rem 0.8rem 0.8rem 0.25rem;
  background: oklch(0.92 0.04 15 / 0.075);
  color: oklch(0.96 0.02 20 / 0.88);
  font-size: 0.76rem;
  line-height: 1.4;
  word-break: break-word;
}
.chat-msg-me .chat-bubble {
  border-radius: 0.8rem 0.8rem 0.25rem 0.8rem;
  background: oklch(0.56 0.22 22);
  color: #fff;
}
.chat-time {
  color: oklch(0.92 0.04 15 / 0.3);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  padding-inline: 0.25rem;
}
.chat-msg-menu-wrap {
  position: relative;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.chat-msg:hover .chat-msg-menu-wrap { opacity: 1; }
.chat-dots-btn {
  width: 1.35rem;
  height: 1.35rem;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--dim);
  cursor: pointer;
}
.chat-dots-btn:hover {
  background: oklch(0.92 0.04 15 / 0.08);
  color: var(--rose);
}
.chat-dots-btn svg { width: 0.75rem; height: 0.75rem; }
.chat-msg-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.3rem);
  z-index: 30;
  min-width: 7.25rem;
  padding: 0.25rem;
  border-radius: 0.5rem;
  background: oklch(0.14 0.06 18);
  border: 1px solid oklch(0.92 0.04 15 / 0.12);
  box-shadow: 0 12px 30px oklch(0 0 0 / 0.45);
}
.chat-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border: none;
  border-radius: 0.35rem;
  background: transparent;
  color: oklch(0.92 0.04 15 / 0.76);
  cursor: pointer;
  padding: 0.42rem 0.55rem;
  font-size: 0.72rem;
  text-align: left;
}
.chat-menu-item:hover { background: oklch(0.92 0.04 15 / 0.08); }
.chat-menu-item svg {
  width: 0.78rem;
  height: 0.78rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}
.chat-del,
.chat-report-btn { color: oklch(0.74 0.18 24); }
.chat-input-row {
  display: flex;
  gap: 0.45rem;
  padding-top: 0.65rem;
}
.chat-input-row input {
  flex: 1;
  min-width: 0;
  min-height: 2.15rem;
  border-radius: 0.5rem;
  border: 1px solid var(--line);
  background: oklch(0.92 0.04 15 / 0.055);
  color: oklch(0.96 0.02 20);
  outline: none;
  padding: 0.45rem 0.65rem;
  font: inherit;
  font-size: 0.78rem;
}
.chat-input-row input:focus {
  border-color: oklch(0.66 0.2 24 / 0.5);
}
.chat-input-row input::placeholder { color: oklch(0.92 0.04 15 / 0.34); }
.chat-input-row button {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 0.5rem;
  display: grid;
  place-items: center;
  border: none;
  background: oklch(0.56 0.22 22);
  color: #fff;
  cursor: pointer;
}
.chat-input-row button:disabled { opacity: 0.45; cursor: default; }
.chat-input-row button svg {
  width: 0.95rem;
  height: 0.95rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
.chat-error-msg {
  color: oklch(0.76 0.17 34);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-align: center;
}

/* Thread detail */
.thread-detail-page {
  max-width: 74rem;
  margin: 0 auto;
}
.thread-back {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1rem;
  color: oklch(0.92 0.04 15 / 0.62);
  font-size: 0.84rem;
}
.thread-back:hover { color: var(--rose); }
.thread-back svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}
.thread-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 17rem;
  gap: 1.25rem;
  align-items: start;
}
.thread-detail-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.thread-detail-card {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: 1rem;
  padding: 1.1rem;
  border-radius: 0.5rem;
  background: oklch(0.18 0.07 18 / 0.82);
  border: 1px solid oklch(0.92 0.04 15 / 0.1);
  box-shadow: 0 24px 60px oklch(0.08 0.05 18 / 0.22);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.thread-detail-card.has-project {
  grid-template-columns: 3.5rem minmax(0, 1fr) 12rem;
}
.thread-detail-card:hover {
  position: relative;
  z-index: 2;
  transform: translateY(-4px);
  border-color: rgb(255 60 90 / 0.6);
  border-color: oklch(0.66 0.22 24 / 0.6);
  box-shadow:
    0 22px 48px rgb(0 0 0 / 0.45),
    0 0 0 1.5px rgb(255 60 90 / 0.5),
    0 0 32px rgb(255 40 80 / 0.55),
    0 0 60px rgb(255 20 70 / 0.35);
  box-shadow:
    0 22px 48px oklch(0.08 0.05 18 / 0.45),
    0 0 0 1.5px oklch(0.62 0.24 20 / 0.5),
    0 0 32px oklch(0.6 0.24 20 / 0.55),
    0 0 60px oklch(0.55 0.24 15 / 0.35);
}
.td-vote-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.2rem;
  padding-top: 0.2rem;
  color: oklch(0.92 0.04 15 / 0.58);
}
.td-body { min-width: 0; }
.td-meta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  color: oklch(0.92 0.04 15 / 0.54);
  font-size: 0.78rem;
  margin-bottom: 0.65rem;
}
.td-meta-line .thread-menu-wrap {
  margin-left: auto;
}
.td-author-line {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
}
.td-title {
  font-family: var(--font-sans);
  font-size: clamp(1.35rem, 2vw, 2rem);
  line-height: 1.12;
  letter-spacing: 0;
  font-weight: 850;
  margin: 0;
  color: oklch(0.98 0.01 20);
}
.td-content {
  margin-top: 1rem;
  color: oklch(0.94 0.03 18 / 0.84);
  font-size: 0.98rem;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
}
.td-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.2rem;
  padding-top: 0.8rem;
  border-top: 1px solid oklch(0.92 0.04 15 / 0.08);
}
.td-action-link,
.td-delete-btn,
.td-report-btn,
.thread-side-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2rem;
  border: none;
  border-radius: 0.45rem;
  background: oklch(0.92 0.04 15 / 0.055);
  color: oklch(0.92 0.04 15 / 0.7);
  padding: 0.42rem 0.65rem;
  font-size: 0.78rem;
  cursor: pointer;
}
.td-action-link:hover,
.thread-side-link:hover {
  background: oklch(0.92 0.04 15 / 0.09);
  color: var(--rose);
}
.td-delete-btn,
.td-report-btn {
  background: transparent;
  color: oklch(0.74 0.18 24);
}
.td-delete-btn:hover,
.td-report-btn:hover {
  background: oklch(0.74 0.18 24 / 0.08);
}
.td-action-link svg,
.td-delete-btn svg,
.td-report-btn svg,
.thread-side-link svg {
  width: 0.95rem;
  height: 0.95rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}
.td-comments {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.td-comments-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0 0.2rem;
}
.td-comments-heading {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0;
}
.td-comments-head span {
  color: oklch(0.92 0.04 15 / 0.42);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}
.td-sort-tabs {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.td-sort-btn {
  padding: 0;
  border: 0;
  background: transparent;
  color: oklch(0.92 0.04 15 / 0.42);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.td-sort-btn:hover {
  color: oklch(0.92 0.04 15 / 0.7);
}
.td-sort-btn.active {
  color: var(--rose);
}
.td-author-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.9rem 0 0;
}
.td-comment-form {
  padding: 0.8rem 0.9rem;
  border-radius: 0.9rem;
  background: oklch(0.18 0.07 18 / 0.72);
  border: 1px solid oklch(0.92 0.04 15 / 0.1);
}
.tdc-form-row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}
.tdc-form-avatar {
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  background: linear-gradient(135deg, oklch(0.72 0.17 24), oklch(0.64 0.12 195));
  color: #fff;
  font-family: var(--font-serif);
  font-size: 0.78rem;
  margin-top: 0.15rem;
}
.tdc-form-avatar img { width: 100%; height: 100%; object-fit: cover; }
.td-comment-form textarea {
  width: 100%;
  min-height: 2.1rem;
  max-height: 12rem;
  resize: none;
  display: block;
  border: 0;
  background: transparent;
  color: oklch(0.96 0.02 20);
  outline: none;
  padding: 0.4rem 0;
  font: inherit;
  font-size: 0.92rem;
  line-height: 1.5;
}
.td-comment-form textarea::placeholder { color: oklch(0.92 0.04 15 / 0.34); }
.tdc-form-toolbar {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.5rem;
  padding-top: 0.6rem;
  border-top: 1px solid oklch(0.92 0.04 15 / 0.08);
}
.tdc-fmt-btn {
  width: 1.9rem;
  height: 1.9rem;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 0.4rem;
  background: transparent;
  color: oklch(0.92 0.04 15 / 0.5);
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
}
.tdc-fmt-btn svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}
.tdc-fmt-btn:hover:not(:disabled) {
  background: oklch(0.92 0.04 15 / 0.08);
  color: oklch(0.96 0.02 20 / 0.85);
}
.tdc-fmt-btn:disabled {
  opacity: 0.3;
  cursor: default;
}
.tdc-fmt-bold { font-style: normal; }
.tdc-fmt-italic { font-style: italic; }
.tdc-emoji-wrap {
  position: relative;
}
.tdc-emoji-picker {
  position: absolute;
  bottom: calc(100% + 0.4rem);
  left: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(8, 1.7rem);
  gap: 0.15rem;
  padding: 0.4rem;
  border-radius: 0.5rem;
  background: oklch(0.14 0.06 18);
  border: 1px solid oklch(0.92 0.04 15 / 0.12);
  box-shadow: 0 12px 30px oklch(0 0 0 / 0.45);
}
.tdc-emoji-item {
  width: 1.7rem;
  height: 1.7rem;
  border: none;
  border-radius: 0.3rem;
  background: transparent;
  font-size: 1rem;
  cursor: pointer;
}
.tdc-emoji-item:hover {
  background: oklch(0.92 0.04 15 / 0.1);
}
.tdc-form-send {
  margin-left: auto;
  min-height: 2rem;
  border: none;
  border-radius: 999px;
  background: oklch(0.56 0.22 22);
  color: #fff;
  padding: 0.4rem 1.1rem;
  font-weight: 750;
  cursor: pointer;
}
.tdc-form-send:disabled {
  opacity: 0.45;
  cursor: default;
}
.td-comment-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.td-comment {
  position: relative;
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.7rem;
  padding: 0.8rem;
  border-radius: 0.65rem;
  background: oklch(0.92 0.04 15 / 0.05);
  border: 1px solid oklch(0.92 0.04 15 / 0.14);
}
.tdc-avatar {
  width: 2rem;
  height: 2rem;
  font-size: 0.82rem;
}
.tdc-body { min-width: 0; }
.tdc-meta {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  min-height: 1.6rem;
  color: oklch(0.92 0.04 15 / 0.44);
  font-size: 0.74rem;
}
.tdc-handle {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  color: oklch(0.96 0.02 20 / 0.88);
  font-weight: 800;
}
.tdc-op-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.15rem;
  padding: 0 0.4rem;
  border-radius: 0.3rem;
  background: oklch(0.62 0.19 24 / 0.16);
  color: oklch(0.78 0.16 24);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}
.tdc-time {
  font-family: var(--font-mono);
  font-size: 0.68rem;
}
.tdc-meta .thread-menu-wrap {
  margin-left: auto;
}
.tdc-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}
.tdc-reply,
.tdc-share {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: oklch(0.92 0.04 15 / 0.48);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
}
.tdc-reply svg,
.tdc-share svg {
  width: 0.78rem;
  height: 0.78rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}
.tdc-reply:hover,
.tdc-share:hover {
  color: var(--rose);
}
.tdc-more-replies {
  grid-column: 2;
  justify-self: start;
  margin-top: 0.5rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: oklch(0.92 0.04 15 / 0.5);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
}
.tdc-more-replies:hover {
  color: var(--rose);
}
/* Replies render inside the original comment's own box (grid-column: 2
   aligns them under the text, not under the avatar, which is what
   reads as "indented" rather than just stacked underneath). */
.tdc-replies {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.7rem;
}
.tdc-replies:empty {
  margin-top: 0;
}
.tdc-reply-item {
  display: grid;
  grid-template-columns: 1.6rem minmax(0, 1fr);
  gap: 0.55rem;
  padding: 0.65rem;
  border-radius: 0.55rem;
  background: linear-gradient(135deg, oklch(0.42 0.19 20 / 0.9), oklch(0.28 0.13 15 / 0.85));
  border: 1px solid oklch(0.66 0.22 20 / 0.4);
}
.tdc-reply-item .tdc-handle,
.tdc-reply-item .tdc-text {
  color: #fff;
}
.tdc-reply-item .tdc-time,
.tdc-reply-item .tdc-reply,
.tdc-reply-item .tdc-share {
  color: oklch(0.98 0.01 20 / 0.65);
}
.tdc-reply-item .tdc-avatar {
  width: 1.6rem;
  height: 1.6rem;
  font-size: 0.7rem;
}
.tdc-reply-indicator {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
  color: oklch(0.92 0.04 15 / 0.6);
  font-size: 0.78rem;
}
.tdc-reply-indicator strong {
  color: var(--rose);
  font-weight: 800;
}
.tdc-reply-indicator button {
  margin-left: auto;
  width: 1.4rem;
  height: 1.4rem;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 0.35rem;
  background: transparent;
  color: oklch(0.92 0.04 15 / 0.5);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}
.tdc-reply-indicator button:hover {
  background: oklch(0.74 0.18 24 / 0.12);
  color: oklch(0.74 0.18 24);
}
.tdc-text {
  margin: 0.25rem 0 0;
  color: oklch(0.94 0.03 18 / 0.82);
  font-size: 0.92rem;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}
.tdc-empty {
  margin: 0;
  padding: 2rem 1rem;
  color: oklch(0.92 0.04 15 / 0.45);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}
.thread-detail-aside {
  position: sticky;
  top: 1.5rem;
}
.thread-side-link {
  width: 100%;
  justify-content: flex-start;
  margin-top: 0.7rem;
}
.thread-rules-card p {
  margin-top: 0.7rem;
}

@media (max-width: 1280px) {
  .community-board {
    grid-template-columns: minmax(11rem, 13rem) minmax(0, 1fr);
  }
  .community-aside { display: none; }
}

@media (max-width: 980px) {
  .community-board,
  .thread-detail-layout {
    grid-template-columns: 1fr;
  }
  .community-rail,
  .community-aside,
  .thread-detail-aside {
    position: static;
  }
  .community-rail {
    display: grid;
    grid-template-columns: 1fr;
  }
  .rail-nav {
    flex-direction: row;
    overflow-x: auto;
  }
  .rail-nav a {
    flex: 0 0 auto;
    min-width: max-content;
  }
  .rail-topics {
    display: none;
  }
  .community-aside {
    display: flex;
  }
  .thread-detail-aside {
    display: none;
  }
}

@media (max-width: 720px) {
  .feed-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .community-board .thread-card,
  .community-board .thread-card.has-project {
    grid-template-columns: 2.65rem minmax(0, 1fr) 1.3rem;
    gap: 0.75rem;
    min-height: auto;
  }
  .community-board .thread-card h3 {
    font-size: 1rem;
  }
  .thread-preview {
    font-size: 0.82rem;
  }
  .thread-comments {
    margin-left: 0;
  }
  .thread-detail-card,
  .thread-detail-card.has-project {
    grid-template-columns: 2.75rem minmax(0, 1fr);
    padding: 0.9rem;
  }
  .td-project-panel {
    grid-column: 1 / -1;
  }
  .td-comments-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.25rem;
  }
}

@media (max-width: 520px) {
  .community-board {
    gap: 1rem;
  }
  .rail-post-btn {
    width: 100%;
  }
  .community-board .thread-card,
  .community-board .thread-card.has-project {
    padding: 0.8rem;
    grid-template-columns: minmax(0, 1fr);
  }
  .community-board .vote-col {
    grid-row: 2;
    flex-direction: row;
    justify-content: flex-start;
    align-self: auto;
    width: max-content;
    padding: 0.2rem 0.4rem;
  }
  .community-board .thread-card > .thread-menu-wrap {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
  }
  .thread-foot {
    padding-right: 1.9rem;
  }
  .thread-detail-card,
  .thread-detail-card.has-project {
    grid-template-columns: 1fr;
  }
  .td-project-panel {
    grid-column: 1;
  }
  .td-vote-col {
    flex-direction: row;
    justify-content: flex-start;
  }
  .td-comment {
    grid-template-columns: 1.8rem minmax(0, 1fr);
    padding: 0.7rem;
  }
}

/* Screenshot-inspired community feed */
.community-board-split {
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 22.5rem);
  gap: 1.75rem;
  max-width: 108rem;
  margin: 0 auto;
  padding: 0 0.25rem 2rem;
}

.community-hero {
  min-height: 9rem;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.25rem;
  padding-bottom: 1.7rem;
  border-bottom: 1px solid oklch(0.92 0.04 15 / 0.08);
}

.community-eyebrow {
  margin: 0 0 0.6rem;
  color: oklch(0.67 0.25 13);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.community-hero h1 {
  max-width: 48rem;
  color: oklch(0.97 0.025 30);
  font-size: clamp(2.25rem, 4.2vw, 4.3rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.community-hero p:not(.community-eyebrow) {
  margin-top: 0.8rem;
  color: oklch(0.9 0.035 25 / 0.62);
  font-size: 1rem;
  font-weight: 650;
}

.new-thread-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-width: 12rem;
  min-height: 2.8rem;
  padding: 0 1.3rem;
  border-radius: 999px;
  background: oklch(0.92 0.055 20);
  color: oklch(0.18 0.075 18);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  box-shadow: 0 18px 48px oklch(0 0 0 / 0.2);
}

.new-thread-btn svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
}

.community-board-split .feed-toolbar {
  margin-top: 2.9rem;
  min-height: 4.75rem;
  padding: 1rem 1.2rem;
  border-radius: 1.55rem;
  background: oklch(0.18 0.085 18 / 0.62);
}

.community-board-split .feed-tabs a {
  min-width: 3.65rem;
  justify-content: center;
  min-height: 2.55rem;
  border-radius: 0.55rem;
  font-weight: 800;
}

.community-board-split .thread-list {
  margin-top: 1rem;
}

.community-board-split .thread-card {
  grid-template-columns: 4.1rem minmax(0, 1fr) 1.4rem;
  min-height: auto;
  padding: 1.25rem;
  border-radius: 1.35rem;
  background:
    radial-gradient(circle at 48% 40%, oklch(0.35 0.105 19 / 0.42), transparent 42%),
    linear-gradient(90deg, oklch(0.18 0.085 18 / 0.92), oklch(0.24 0.09 18 / 0.72));
}
.community-board-split .thread-card.has-project {
  grid-template-columns: 4.1rem minmax(0, 1fr) 10.5rem 1.4rem;
}

.community-board-split .vote-col {
  border-radius: 0.65rem;
  background: oklch(0.13 0.065 18 / 0.32);
}

.community-board-split .thread-card h3 {
  font-size: 1.18rem;
}

.category-card {
  min-height: 7.6rem;
}

.category-card h2,
.leaderboard-card h2 {
  color: oklch(0.82 0.04 25 / 0.62);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.05rem;
}

.category-pills a {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0 1rem;
  border-radius: 999px;
  border: 1px solid oklch(0.62 0.22 18 / 0.18);
  background: oklch(0.92 0.04 15 / 0.045);
  color: oklch(0.93 0.03 22 / 0.7);
  font-weight: 800;
}

.category-pills a.active {
  border-color: oklch(0.62 0.25 12);
  background: oklch(0.48 0.22 13 / 0.58);
  color: #fff;
}

.leaderboard-card {
  border-color: oklch(0.62 0.24 20 / 0.44);
  background:
    radial-gradient(circle at 80% -10%, oklch(0.7 0.21 30 / 0.28), transparent 45%),
    linear-gradient(135deg, oklch(0.42 0.16 20), oklch(0.3 0.13 18));
}

.leaderboard-list {
  display: grid;
  gap: 0.7rem;
  margin-top: 1.2rem;
}

.leader-row {
  display: flex;
  align-items: center;
  gap: 0.32rem;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 900;
}

.leader-row span {
  font-family: var(--font-mono);
}

.ww-chat-toggle {
  position: fixed;
  right: 1.65rem;
  bottom: 1.55rem;
  z-index: 80;
  width: 4.35rem;
  height: 4.35rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 2px solid oklch(0.98 0 0);
  background: oklch(0.96 0.035 20);
  color: oklch(0.13 0.06 18);
  box-shadow: 0 18px 54px oklch(0 0 0 / 0.35);
  cursor: pointer;
}

.ww-chat-toggle svg {
  width: 1.35rem;
  height: 1.35rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
}

.ww-chat-toggle[aria-expanded="true"] {
  opacity: 0;
  pointer-events: none;
}

.ww-chat-dot {
  position: absolute;
  top: 0.3rem;
  right: 0.22rem;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 999px;
  background: oklch(0.84 0.24 120);
  box-shadow: 0 0 0 2px oklch(0.18 0.08 18);
}

.ww-chat-dock {
  position: fixed;
  right: 1.75rem;
  bottom: 1.55rem;
  z-index: 90;
  width: min(25rem, calc(100vw - 2rem));
  padding: 1rem;
  border-radius: 1.35rem;
  border: 1px solid oklch(0.92 0.04 15 / 0.1);
  background: oklch(0.17 0.075 18 / 0.9);
  box-shadow: 0 28px 80px oklch(0 0 0 / 0.42);
  backdrop-filter: blur(16px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.75rem) scale(0.97);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.ww-chat-dock.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.ww-chat-dock .chat-card {
  min-height: 17rem;
  max-height: 20rem;
}

.ww-chat-close {
  margin-left: auto;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: oklch(0.92 0.04 15 / 0.45);
  cursor: pointer;
}

.ww-chat-close:hover {
  background: oklch(0.92 0.04 15 / 0.08);
  color: #fff;
}

.ww-chat-close svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

/* Thread detail reference layout */
.thread-detail-page {
  max-width: 94rem;
}

.thread-detail-layout {
  grid-template-columns: minmax(16rem, 20.75rem) minmax(0, 1fr) minmax(18rem, 23rem);
  gap: 1.85rem;
}

.thread-detail-left,
.thread-detail-aside {
  position: sticky;
  top: 1.5rem;
}

.thread-community-card {
  overflow: hidden;
  border-radius: 1.45rem;
  border: 1px solid oklch(0.62 0.24 15 / 0.52);
  background: oklch(0.2 0.085 18 / 0.84);
  box-shadow: 0 28px 70px oklch(0 0 0 / 0.28);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.thread-rules-card {
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.thread-community-card:hover,
.thread-rules-card:hover {
  position: relative;
  z-index: 2;
  transform: translateY(-4px);
  border-color: rgb(255 60 90 / 0.6);
  border-color: oklch(0.66 0.22 24 / 0.6);
  box-shadow:
    0 22px 48px rgb(0 0 0 / 0.45),
    0 0 0 1.5px rgb(255 60 90 / 0.5),
    0 0 32px rgb(255 40 80 / 0.55),
    0 0 60px rgb(255 20 70 / 0.35);
  box-shadow:
    0 22px 48px oklch(0.08 0.05 18 / 0.45),
    0 0 0 1.5px oklch(0.62 0.24 20 / 0.5),
    0 0 32px oklch(0.6 0.24 20 / 0.55),
    0 0 60px oklch(0.55 0.24 15 / 0.35);
}

.thread-community-visual {
  position: relative;
  min-height: 12.5rem;
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 1.25rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 54% 40%, oklch(0.72 0.13 315 / 0.75), transparent 18%),
    linear-gradient(135deg, oklch(0.2 0.12 286), oklch(0.12 0.07 18));
}

.thread-community-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, oklch(0.12 0.06 18 / 0.74));
}

.thread-community-badges,
.thread-community-visual h2 {
  position: relative;
  z-index: 1;
}

.thread-community-badges {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: flex;
  gap: 0.45rem;
}

.thread-community-badges span {
  display: inline-flex;
  align-items: center;
  min-height: 1.55rem;
  padding: 0 0.75rem;
  border-radius: 999px;
  background: oklch(0.63 0.26 12);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.thread-community-badges span + span {
  background: oklch(0.14 0.055 18 / 0.72);
}

.thread-community-visual h2 {
  color: oklch(0.97 0.025 30);
  font-size: 2rem;
}

.thread-community-card > p,
.thread-community-card .aside-join-btn,
.thread-community-card .about-stats {
  margin-inline: 1.25rem;
}

.thread-community-card > p {
  margin-top: 1.4rem;
  color: oklch(0.91 0.035 25 / 0.72);
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1.55;
}

.thread-community-card .aside-join-btn {
  width: calc(100% - 2.5rem);
  margin-top: 1rem;
  margin-bottom: 1.25rem;
  border-radius: 999px;
  background: oklch(0.66 0.26 12);
  font-family: var(--font-mono);
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.thread-detail-card {
  min-height: 22rem;
  padding: 1.75rem;
  border-radius: 1.45rem;
  background:
    radial-gradient(circle at 50% 20%, oklch(0.37 0.105 18 / 0.36), transparent 50%),
    oklch(0.18 0.075 18 / 0.78);
}

.td-title {
  font-family: var(--font-sans);
  font-size: clamp(2rem, 4vw, 3.15rem);
}

.thread-guidelines-link {
  display: inline-flex;
  margin-top: 0.7rem;
  color: oklch(0.67 0.25 13);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

@media (max-width: 1280px) {
  .community-board-split {
    grid-template-columns: minmax(0, 1fr);
  }

  .community-board-split .community-aside {
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: static;
  }

  .thread-detail-layout {
    grid-template-columns: minmax(15rem, 20rem) minmax(0, 1fr);
  }

  .thread-detail-aside {
    display: none;
  }
}

@media (max-width: 900px) {
  .community-hero {
    align-items: start;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .community-board-split .thread-card,
  .community-board-split .thread-card.has-project {
    grid-template-columns: 3.2rem minmax(0, 1fr);
  }

  .thread-project-panel {
    display: none;
  }

  .community-board-split .community-aside,
  .thread-detail-layout {
    grid-template-columns: 1fr;
  }

  .thread-detail-left {
    position: static;
  }
}

@media (max-width: 560px) {
  .community-hero h1 {
    font-size: 2.35rem;
  }

  .new-thread-btn {
    width: 100%;
  }

  .ww-chat-toggle {
    right: 1rem;
    bottom: 1rem;
    width: 3.7rem;
    height: 3.7rem;
  }

  .ww-chat-dock {
    right: 0.75rem;
    bottom: 0.75rem;
    width: calc(100vw - 1.5rem);
  }
}

/* Share-to-Yap modal — same component/markup as vibes.html's share modal
   (duplicated here per this codebase's per-page convention; colors are
   plain rgb/hex, not vibes-specific tokens, so this is a verbatim copy). */
.vibe-share-modal[hidden] { display: none; }

.vibe-share-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 16px;
}

.vibe-share-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgb(0 0 0 / 0.72);
  backdrop-filter: blur(12px);
  cursor: pointer;
}

.vibe-share-panel {
  position: relative;
  width: min(94vw, 470px);
  max-height: min(86vh, 720px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.12);
  background: #111820;
  color: #fff;
}

.vibe-share-head,
.vibe-share-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
}

.vibe-share-head p {
  margin: 0 0 3px;
  color: rgb(255 255 255 / 0.58);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.vibe-share-head h2 {
  margin: 0;
  color: #fff;
  font-size: 22px;
}

.vibe-share-close {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.08);
  color: #fff;
}

.vibe-share-close svg,
.vibe-share-search svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.vibe-share-preview {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 14px;
  margin: 0 16px 14px;
  padding: 12px;
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.1);
  background: rgb(255 255 255 / 0.055);
}

.vibe-share-thumb {
  min-height: 92px;
  border-radius: 8px;
  background: #202733;
  background-size: cover;
  background-position: center;
}

.vibe-share-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.vibe-share-copy span,
.vibe-share-copy small {
  color: rgb(255 255 255 / 0.6);
  font-size: 13px;
}

.vibe-share-copy strong {
  color: #fff;
  font-size: 16px;
  line-height: 1.25;
}

.vibe-share-search {
  min-height: 42px;
  margin: 0 16px 12px;
  padding: 0 14px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.12);
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgb(0 0 0 / 0.26);
  color: rgb(255 255 255 / 0.68);
}

.vibe-share-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font: inherit;
}

.vibe-share-search input::placeholder {
  color: rgb(255 255 255 / 0.42);
}

.vibe-share-list {
  overflow-y: auto;
  padding: 0 8px;
  scrollbar-width: thin;
}

.vibe-share-row {
  width: 100%;
  min-height: 58px;
  padding: 8px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  color: inherit;
  text-align: left;
}

.vibe-share-row:hover,
.vibe-share-row.is-sending,
.vibe-share-row.is-sent {
  background: rgb(255 255 255 / 0.08);
}

.vibe-share-avatar {
  position: relative;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 999px;
  background: #202733;
  color: #fff;
  font-weight: 900;
}

.vibe-share-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vibe-share-person {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vibe-share-person strong {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  font-size: 15px;
}

.vibe-share-person small {
  color: rgb(255 255 255 / 0.56);
}

.vibe-share-send,
.vibe-share-copy-link {
  min-height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #0b0f14;
  font-size: 13px;
  font-weight: 900;
}

.vibe-share-copy-link {
  font: inherit;
}

.vibe-share-empty,
.vibe-share-status {
  padding: 14px 16px;
  color: rgb(255 255 255 / 0.62);
  font-size: 14px;
}

.vibe-share-status {
  min-height: 40px;
  margin: 0;
}

.vibe-share-status[data-kind="ok"] { color: #8ef5cc; }
.vibe-share-status[data-kind="error"] { color: #ff8ea0; }

/* --------------------------------------------------------------------------
   Community: responsive board, thread detail, and live chat
   -------------------------------------------------------------------------- */
@media (max-width: 1023px) {
  .community-board-split,
  .thread-detail-page {
    width: 100%;
    max-width: none;
    padding-inline: 0;
  }

  .community-hero {
    min-height: 0;
    padding: 1.25rem 0 1.5rem;
  }
  .community-hero h1 { font-size: clamp(2.4rem, 8vw, 4rem); }
  .new-thread-btn { min-height: 3rem; }

  .community-board-split .feed-toolbar {
    margin-top: 1.25rem;
    min-height: 0;
    padding: 0.65rem;
    overflow: hidden;
  }
  .feed-tabs,
  .rail-nav,
  .category-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }
  .feed-tabs::-webkit-scrollbar,
  .rail-nav::-webkit-scrollbar,
  .category-pills::-webkit-scrollbar { display: none; }
  .community-board-split .feed-tabs a { min-height: 2.75rem; flex: 0 0 auto; }

  .community-board-split .thread-card,
  .community-board-split .thread-card.has-project {
    min-height: 0;
    border-radius: 1.15rem;
  }
  .thread-foot { row-gap: 0.6rem; }

  .thread-detail-layout { gap: 1rem; }
  .thread-detail-left { order: 2; }
  .thread-detail-main { order: 1; }
  .thread-community-card { border-radius: 1.15rem; }
}

@media (max-width: 640px) {
  .community-hero {
    align-items: stretch;
    gap: 1rem;
    padding-top: 0.8rem;
  }
  .community-eyebrow { font-size: 0.62rem; letter-spacing: 0.2em; }
  .community-hero h1 { max-width: 11ch; font-size: clamp(2.2rem, 11vw, 3.1rem); }
  .community-hero p:not(.community-eyebrow) { font-size: 0.92rem; line-height: 1.5; }
  .new-thread-btn { width: 100%; min-height: 3.25rem; }

  .community-board-split .feed-toolbar {
    margin-inline: -0.1rem;
    border-radius: 1rem;
  }
  .community-board-split .thread-list { margin-top: 0.7rem; }
  .community-board-split .thread-card,
  .community-board-split .thread-card.has-project {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.8rem;
    padding: 1rem;
  }
  .community-board-split .vote-col {
    grid-row: auto;
    flex-direction: row;
    justify-content: flex-start;
    width: max-content;
    min-height: 2.5rem;
  }
  .community-board-split .thread-card > .thread-menu-wrap {
    position: absolute;
    top: 0.85rem;
    right: 0.75rem;
  }
  .community-board-split .thread-card h3 { padding-right: 1.8rem; font-size: 1.05rem; line-height: 1.28; }
  .thread-preview { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
  .thread-foot { padding-right: 0; font-size: 0.72rem; }

  .community-board-split .community-aside {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .community-board-split .community-aside::-webkit-scrollbar { display: none; }
  .community-board-split .community-aside > * { min-width: min(88vw, 22rem); scroll-snap-align: start; }

  .thread-back { min-height: 2.75rem; }
  .thread-detail-card,
  .thread-detail-card.has-project { padding: 1rem; border-radius: 1.1rem; }
  .td-title { font-size: clamp(1.7rem, 8vw, 2.35rem); line-height: 1.08; }
  .td-comment { grid-template-columns: 2rem minmax(0, 1fr); }

  .ww-chat-toggle {
    right: 0.85rem;
    bottom: max(0.85rem, env(safe-area-inset-bottom));
    width: 3.6rem;
    height: 3.6rem;
  }
  .ww-chat-dock {
    inset: auto 0 0;
    width: 100%;
    max-height: 86dvh;
    padding: 0.8rem;
    border-radius: 1.35rem 1.35rem 0 0;
    padding-bottom: max(0.8rem, env(safe-area-inset-bottom));
    transform: translateY(100%);
  }
  .ww-chat-dock.is-open { transform: translateY(0); }
  .ww-chat-dock .chat-card { min-height: 24rem; max-height: calc(86dvh - 1.6rem); }

  .vibe-share-modal { align-items: end; padding: 0; }
  .vibe-share-panel { width: 100%; max-height: 88dvh; border-radius: 1.4rem 1.4rem 0 0; }
}

@media (max-width: 390px) {
  .community-board-split .thread-card,
  .community-board-split .thread-card.has-project { padding: 0.85rem; }
  .community-hero h1 { font-size: 2.15rem; }
}

@media (max-width: 640px) {
  .ww-chat-toggle {
    bottom: calc(5.55rem + env(safe-area-inset-bottom));
  }
}

.vibe-share-verified.gold-tick svg {
  width: 15px;
  height: 15px;
}

/* Final phone alignment pass: thread cards use one predictable grid after
   all legacy community/profile fallback rules have loaded. */
@media (max-width: 640px) {
  .shell-page-community .shell-layout {
    width: 100%;
    padding-inline: 0.7rem;
  }
  .shell-page-community .shell-main {
    width: 100%;
    padding: 0.75rem 0 calc(7rem + env(safe-area-inset-bottom)) !important;
  }
  .community-board-split,
  .community-feed,
  .thread-list { width: 100%; min-width: 0; }
  .community-hero { padding-inline: 0.15rem; }
  .community-board-split .feed-toolbar {
    width: 100%;
    padding: 0.45rem;
    border-radius: 0.95rem;
  }
  .community-board-split .thread-card,
  .community-board-split .thread-card.has-project {
    position: relative;
    width: 100%;
    min-width: 0;
    display: grid !important;
    grid-template-columns: 2.6rem minmax(0, 1fr) !important;
    grid-template-rows: auto;
    align-items: start;
    gap: 0.75rem;
    padding: 0.95rem !important;
    border-radius: 1rem;
    transform: none !important;
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.025);
  }
  .community-board-split .vote-col {
    grid-column: 1;
    grid-row: 1 / span 3;
    width: 2.6rem;
    min-height: 5.5rem;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 0.35rem 0.2rem;
  }
  .community-board-split .thread-body,
  .community-board-split .thread-main-link {
    grid-column: 2;
    width: 100%;
    min-width: 0;
  }
  .community-board-split .thread-card h3 {
    width: 100%;
    padding-right: 1.7rem;
    overflow-wrap: anywhere;
  }
  .community-board-split .thread-preview { margin-bottom: 0.65rem; }
  .community-board-split .thread-foot {
    width: 100%;
    align-items: center;
    gap: 0.4rem 0.6rem;
  }
  .community-board-split .thread-foot-actions {
    width: 100%;
    margin-left: 0;
    padding-top: 0.35rem;
    justify-content: flex-start;
  }
  .community-board-split .thread-project-panel { display: none; }
  .community-board-split .thread-card > .thread-menu-wrap { top: 0.8rem; right: 0.65rem; }

  .thread-detail-card,
  .thread-detail-card.has-project {
    width: 100%;
    grid-template-columns: 1fr !important;
    padding: 0.9rem;
  }
  .thread-detail-card .td-vote-col { flex-direction: row; width: max-content; }
}

/* Mobile Community v2: social feed cards instead of the desktop Reddit grid. */
@media (max-width: 640px) {
  .community-hero {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 0.8rem;
    padding: 0.75rem 0.2rem 1rem;
    border-bottom: 0;
  }
  .community-eyebrow { margin-bottom: 0.35rem; }
  .community-hero h1 {
    max-width: 14ch;
    font-size: clamp(1.8rem, 8.5vw, 2.35rem);
    line-height: 1;
  }
  .community-hero p:not(.community-eyebrow) {
    max-width: 30ch;
    margin-top: 0.55rem;
    font-size: 0.82rem;
  }
  .new-thread-btn {
    width: 3.2rem;
    min-width: 3.2rem;
    min-height: 3.2rem;
    padding: 0;
    overflow: hidden;
    gap: 0;
    color: transparent;
    border-radius: 1rem;
    font-size: 0;
  }
  .new-thread-btn svg { width: 1.25rem; height: 1.25rem; color: #26000c; }

  .community-board-split .feed-toolbar {
    margin: 0 0 0.75rem;
    min-height: 3.15rem;
    border: 1px solid rgb(255 119 151 / 0.12);
    background: rgb(34 0 12 / 0.72);
  }
  .community-board-split .feed-tabs { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 0.35rem; }
  .community-board-split .feed-tabs a {
    width: 100%;
    min-width: 0;
    min-height: 2.35rem;
    padding: 0.4rem;
    border-radius: 0.7rem;
    font-size: 0.75rem;
    text-align: center;
  }
  .community-board-split .feed-tabs a.active {
    background: rgb(255 45 104 / 0.2);
    color: #fff;
  }

  .community-board-split .thread-list { display: grid; gap: 0.7rem; }
  .community-board-split .thread-card,
  .community-board-split .thread-card.has-project {
    display: block !important;
    padding: 1rem 1rem 0.9rem !important;
    overflow: visible;
    border: 1px solid rgb(255 125 154 / 0.13);
    border-radius: 1.15rem;
    background:
      radial-gradient(circle at 100% 0, rgb(255 45 104 / 0.1), transparent 12rem),
      linear-gradient(145deg, rgb(56 2 20 / 0.86), rgb(29 0 10 / 0.92));
  }
  .community-board-split .thread-main-link {
    display: block;
    width: 100%;
    padding: 0;
  }
  .community-board-split .thread-meta-row { padding-right: 2rem; margin-bottom: 0.65rem; }
  .community-board-split .thread-card h3 {
    padding: 0;
    font-size: 1.08rem;
    line-height: 1.25;
  }
  .community-board-split .thread-preview {
    margin: 0.45rem 0 0.65rem;
    color: rgb(255 230 236 / 0.66);
    font-size: 0.86rem;
    line-height: 1.45;
  }
  .community-board-split .thread-hashtags { margin-bottom: 0.7rem; }
  .community-board-split .thread-foot {
    min-height: 2.5rem;
    padding: 0.65rem 5rem 0 0;
    border-top: 1px solid rgb(255 255 255 / 0.07);
  }
  .community-board-split .thread-foot-actions {
    position: absolute;
    right: 0.9rem;
    bottom: 0.95rem;
    width: auto;
    padding: 0;
    gap: 0.65rem;
  }
  .community-board-split .vote-col {
    position: absolute;
    right: 0.8rem;
    top: 0.75rem;
    z-index: 2;
    width: auto;
    min-height: 2.15rem;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 0.15rem;
    padding: 0.15rem 0.45rem;
    border: 1px solid rgb(255 106 141 / 0.18);
    border-radius: 999px;
    background: rgb(18 0 6 / 0.52);
  }
  .community-board-split .vote-col .vote-down { display: none; }
  .community-board-split .vote-col .upvote-btn { width: 1.65rem; height: 1.65rem; }
  .community-board-split .thread-card > .thread-menu-wrap {
    top: auto;
    right: auto;
    left: 0.75rem;
    bottom: -0.05rem;
    opacity: 0;
    pointer-events: none;
  }
  .community-board-split .community-aside { display: none; }
}

@media (max-width: 1023px) {
  /* Keep Community's compact bottom navigation on phones. */
  .shell-page-community .shell-sidebar,
  .shell-page-community .shell-drawer,
  .shell-page-community .shell-topbar .topbar-menu-btn { display: none !important; }
  .shell-page-community > .mobile-bottom-nav {
    display: grid !important;
    visibility: visible;
    opacity: 1;
  }
  .shell-page-community .shell-layout,
  .shell-page-community .shell-main { width: 100%; max-width: none; }
}

/* Final mobile vote geometry: arrow and score share one optical center. */
@media (max-width: 640px) {
  .community-board-split .vote-col {
    box-sizing: border-box;
    width: auto;
    height: 2.25rem;
    min-height: 2.25rem;
    padding: 0 0.55rem 0 0.32rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.18rem;
    line-height: 1;
  }
  .community-board-split .vote-col .upvote-btn,
  .thread-detail-card .td-vote-col .upvote-btn {
    width: 1.7rem;
    height: 1.7rem;
    min-width: 1.7rem;
    min-height: 1.7rem;
    margin: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
  }
  .community-board-split .vote-col .upvote-btn svg,
  .thread-detail-card .td-vote-col .upvote-btn svg {
    display: block;
    width: 1.05rem;
    height: 1.05rem;
    margin: 0;
    transform: none;
  }
  .community-board-split .vote-col .score,
  .thread-detail-card .td-vote-col .score {
    min-width: 1ch;
    height: 1.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-variant-numeric: tabular-nums;
  }
  .thread-detail-card .td-vote-col {
    min-height: 2.25rem;
    padding: 0.2rem 0.45rem;
    align-items: center;
    gap: 0.18rem;
  }
}
