body.site-community {
  min-height: 100vh;
}

.forum-shell {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: calc(var(--nav-height) + 28px) var(--page-pad) 42px;
}

.forum-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.forum-head h1 {
  margin: 0;
  color: var(--text-strong);
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  line-height: 1.1;
}

.forum-user-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  padding: 0 12px;
  color: var(--muted);
  font-size: 0.86rem;
  white-space: nowrap;
}

.forum-tabs {
  display: flex;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.045);
  padding: 5px;
  margin-bottom: 14px;
  overflow-x: auto;
}

.forum-tab {
  min-height: 36px;
  border-radius: 6px;
  padding: 0 15px;
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.forum-tab:hover,
.forum-tab.is-active {
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  color: var(--text-strong);
}

.forum-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 306px;
  gap: 14px;
  align-items: start;
}

.forum-board,
.forum-side-section {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(16, 24, 30, 0.74);
}

.community-board {
  border: 0;
  background: transparent;
}

.community-board .board-toolbar {
  border-bottom: 0;
  padding: 0 2px 12px;
}

.community-board .forum-filter-row {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(16, 24, 30, 0.36);
  margin-bottom: 4px;
}

.post-detail {
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.post-detail .board-toolbar {
  border-bottom: 0;
  padding: 0 2px 12px;
}

.board-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
}

.board-toolbar h2,
.side-title strong {
  margin: 0;
  color: var(--text-strong);
  font-size: 1rem;
}

.board-toolbar span,
.side-title span {
  color: var(--muted);
  font-size: 0.83rem;
}

.post-title-row {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.post-back-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
}

.post-back-btn:hover {
  border-color: var(--line-strong);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--text-strong);
}

.post-back-btn span::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 12px;
  width: 11px;
  height: 11px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.post-back-btn span::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 18px;
  width: 15px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.forum-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 6px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--text-strong);
  padding: 0 13px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--motion-fast) var(--ease), border-color var(--motion-fast) var(--ease), color var(--motion-fast) var(--ease);
}

.forum-action-btn:hover {
  border-color: color-mix(in srgb, var(--accent) 72%, transparent);
  background: color-mix(in srgb, var(--accent) 22%, transparent);
}

.forum-action-btn.icon-only {
  width: 38px;
  min-width: 38px;
  padding: 0;
}

.forum-action-btn.icon-only svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.forum-action-btn.muted {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
}

.forum-action-btn.full {
  width: 100%;
}

.forum-filter-row {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
}

.category-strip {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  overflow-x: auto;
}

.forum-filter-row .category-strip {
  flex: 1;
  min-width: 0;
  border-bottom: 0;
}

.category-strip button {
  min-height: 31px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  padding: 0 12px;
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
  transition: background var(--motion-fast) var(--ease), border-color var(--motion-fast) var(--ease), color var(--motion-fast) var(--ease);
}

.category-strip button:hover {
  border-color: color-mix(in srgb, var(--accent) 24%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--text-strong);
}

.category-strip button.is-active {
  border-color: color-mix(in srgb, var(--accent) 34%, transparent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--text-strong);
}

.sort-select-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-left: 1px solid var(--line);
  padding: 10px 12px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  white-space: nowrap;
}

.sort-select-wrap select {
  width: auto;
  min-width: 104px;
  min-height: 31px;
  padding: 0 28px 0 9px;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 800;
}

.forum-composer {
  display: grid;
  gap: 9px;
  border-bottom: 1px solid var(--line);
  padding: 12px;
}

.forum-composer input,
.forum-composer textarea,
.forum-composer select {
  min-height: 40px;
  border-radius: 6px;
  padding: 0 11px;
}

.forum-composer textarea {
  min-height: 88px;
  padding-top: 10px;
}

.forum-list {
  display: grid;
}

.community-board .forum-list {
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.new-posts-banner {
  display: flex;
  justify-content: center;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  padding: 10px 0 0;
}

.new-posts-banner .forum-action-btn {
  min-width: 190px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04)),
    rgba(104, 199, 238, 0.16);
  border-color: rgba(104, 199, 238, 0.44);
}

.post-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
  padding: 12px 16px;
  cursor: pointer;
}

.community-board .post-item {
  padding: 14px 10px;
}

.post-item:last-child {
  border-bottom: 0;
}

.post-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.post-item-main {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.post-title,
.post-item strong {
  overflow: hidden;
  color: var(--text-strong);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-item p {
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-item span {
  color: var(--muted-2);
  font-size: 0.82rem;
}

.post-side-meta {
  display: grid;
  justify-items: end;
  gap: 4px;
  min-width: 146px;
  max-width: 220px;
  color: var(--muted-2);
  text-align: right;
}

.post-side-meta .post-author {
  max-width: 100%;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 900;
}

.post-side-meta time {
  color: var(--muted-2);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.post-stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 2px;
}

.post-item .post-stat-row span,
.post-stat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 22px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}

.post-stat strong {
  color: inherit;
  font-size: inherit;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

.stat-icon {
  display: block;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  color: currentColor;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.stat-icon * {
  vector-effect: non-scaling-stroke;
}

.post-item.is-hot .post-title::before {
  content: "HOT";
  display: inline-flex;
  align-items: center;
  height: 18px;
  border-radius: 999px;
  background: rgba(241, 186, 99, 0.15);
  color: #ffd98d;
  padding: 0 6px;
  margin-right: 7px;
  font-size: 0.68rem;
  vertical-align: 1px;
}

.post-item-status {
  grid-template-columns: 1fr;
  cursor: default;
}

.post-item-status:hover {
  background: transparent;
}

.forum-sidebar {
  display: grid;
  gap: 12px;
}

.forum-side-section {
  padding: 13px;
}

.user-snapshot {
  display: flex;
  align-items: center;
  gap: 11px;
}

.user-snapshot strong {
  display: block;
  color: var(--text-strong);
}

.user-snapshot span:not(.app-avatar) {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
}

.side-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.side-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  padding: 0 8px;
  color: var(--text);
  text-align: left;
  text-decoration: none;
  transition: background var(--motion-fast) var(--ease), border-color var(--motion-fast) var(--ease), color var(--motion-fast) var(--ease);
}

.side-link-row:hover {
  border-color: color-mix(in srgb, var(--accent) 22%, transparent);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  color: var(--text-strong);
}

.side-link-row.is-active {
  border-color: rgba(198, 233, 221, 0.18);
  background: rgba(255, 255, 255, 0.055);
  color: var(--text-strong);
}

.side-link-row.is-active em {
  color: var(--accent-strong);
}

.side-link-row:hover em,
.side-link-row.is-active:hover em {
  color: var(--text-strong);
}

.side-link-row.is-active:hover {
  border-color: color-mix(in srgb, var(--accent) 22%, transparent);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
}

.side-link-status {
  cursor: default;
}

.side-link-status:hover {
  border-color: transparent;
  background: transparent;
}

.side-link-status:hover em {
  color: var(--accent-strong);
}

.side-link-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-link-row em {
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 900;
}

.forum-side-section p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.server-address-card {
  display: grid;
  gap: 10px;
}

.server-address-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--text-strong);
  padding: 0 12px;
  text-align: left;
}

.server-address-copy span {
  overflow: hidden;
  font-size: 1rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.server-address-copy em {
  flex: 0 0 auto;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 950;
}

.server-address-copy:hover {
  border-color: color-mix(in srgb, var(--accent) 58%, transparent);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
}

.server-address-copy.is-copied em {
  color: var(--text-strong);
}

.community-hub-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr);
  gap: 14px;
  margin-top: 16px;
}

.community-panel {
  overflow: hidden;
}

.community-panel .board-toolbar {
  min-height: 68px;
}

.community-panel .forum-composer {
  grid-template-columns: 122px minmax(0, 1fr) auto;
  align-items: start;
}

.community-panel .forum-composer textarea {
  min-height: 72px;
}

.community-panel .app-form-message {
  grid-column: 1 / -1;
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.community-panel .app-form-message.success {
  color: var(--accent-strong);
}

.community-panel .app-form-message.error {
  color: #ffb4b4;
}

.forum-action-btn.as-anchor {
  text-decoration: none;
}

.forum-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 86px 82px;
  gap: 12px;
  align-items: center;
  min-height: 66px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
  padding: 10px 16px;
}

.forum-row:last-child {
  border-bottom: 0;
}

.forum-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.forum-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 25px;
  border: 1px solid rgba(241, 186, 99, 0.38);
  border-radius: 999px;
  background: rgba(241, 186, 99, 0.11);
  color: #ffd98d;
  font-size: 0.78rem;
  font-weight: 900;
}

.forum-badge.normal {
  border-color: rgba(104, 199, 238, 0.36);
  background: rgba(104, 199, 238, 0.10);
  color: var(--accent-blue);
}

.forum-row-main {
  min-width: 0;
}

.forum-row-main strong {
  display: block;
  overflow: hidden;
  color: var(--text-strong);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forum-row-main p {
  overflow: hidden;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forum-meta {
  color: var(--muted);
  font-size: 0.83rem;
}

.notice-status-row {
  cursor: default;
}

.notice-status-row:hover {
  background: transparent;
}

.notice-row,
.inquiry-list .post-item:not(.post-item-status) {
  cursor: pointer;
}

.notice-row:focus-visible,
.inquiry-list .post-item:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 62%, transparent);
  outline-offset: -2px;
}

.inquiry-layout .forum-composer {
  border-bottom: 1px solid var(--line);
}

.inquiry-composer textarea {
  min-height: 132px;
}

.post-detail-body {
  display: grid;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: rgba(16, 24, 30, 0.36);
  padding: 18px;
}

.post-author-line,
.comment-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.post-author-line strong,
.comment-item strong {
  display: block;
  color: var(--text-strong);
}

.post-author.has-unverified-author,
.post-author-line strong.has-unverified-author,
.comment-item strong.has-unverified-author,
.community-chat-row strong.has-unverified-author {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
}

.post-author.has-unverified-author .minecraft-unverified-badge,
.post-author-line strong.has-unverified-author .minecraft-unverified-badge,
.comment-item strong.has-unverified-author .minecraft-unverified-badge,
.community-chat-row strong.has-unverified-author .minecraft-unverified-badge {
  flex: 0 0 auto;
  margin-left: 0;
}

.post-author-line span:not(.app-avatar),
.comment-item span {
  color: var(--muted-2);
  font-size: 0.82rem;
}

.post-body-content,
.post-detail-body p {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.72;
}

.post-body-content p,
.post-body-content div {
  margin: 0 0 10px;
}

.post-detail-body h2,
.post-detail-body h3,
.post-detail-body h4 {
  margin: 10px 0 2px;
  color: var(--text-strong);
}

.post-detail-body blockquote {
  border-left: 3px solid var(--accent-blue);
  margin: 8px 0;
  padding-left: 12px;
  color: var(--muted);
}

.post-detail-body code {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 5px;
}

.post-detail-body mark {
  border-radius: 4px;
  background: rgba(241, 186, 99, 0.22);
  color: var(--text-strong);
  padding: 0 4px;
}

.post-reaction-bar,
.comment-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.post-reaction-bar {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.reaction-btn,
.view-count-pill,
.post-delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  padding: 0 11px;
  font-size: 0.83rem;
  font-weight: 900;
  line-height: 1;
}

.reaction-btn {
  transition: border-color var(--motion-fast) var(--ease), background var(--motion-fast) var(--ease), color var(--motion-fast) var(--ease);
}

.post-delete-btn,
.comment-delete-btn {
  color: var(--muted-2);
}

.post-delete-btn {
  width: 34px;
  min-width: 34px;
  padding: 0;
}

.post-delete-btn:hover,
.comment-delete-btn:hover {
  border-color: rgba(255, 113, 113, 0.42);
  background: rgba(255, 113, 113, 0.10);
  color: var(--danger);
}

.post-delete-btn svg,
.comment-delete-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.reaction-btn strong {
  color: inherit;
  font-size: 0.82rem;
}

.reaction-btn:hover,
.reaction-btn.is-active {
  border-color: color-mix(in srgb, var(--accent) 52%, transparent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--text-strong);
}

.comment-actions {
  margin-top: 7px;
  gap: 10px;
}

.comment-actions .reaction-btn {
  min-height: 26px;
  border-color: transparent;
  background: transparent;
  padding: 0 2px;
  color: var(--muted-2);
  font-size: 0.78rem;
}

.comment-actions .reaction-btn:hover,
.comment-actions .reaction-btn.is-active {
  border-color: transparent;
  background: transparent;
  color: var(--text-strong);
}

.comment-section {
  --comment-avatar-size: 36px;
  --comment-line: #415158;
  --comment-line-strong: #53656c;
  --comment-line-active: #8ff0aa;
  --comment-line-width: 1px;
  --comment-elbow-radius: 18px;
  --comment-node-gap: 7px;
  --comment-thread-indent: 32px;
  --comment-collapsed-elbow-width: 27px;
  --comment-avatar-line-gap: 10px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: rgba(16, 24, 30, 0.25);
  padding: 16px 18px 18px;
}

.comment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--text-strong);
}

.comment-head span {
  color: var(--accent-strong);
  font-weight: 900;
}

.comment-list {
  display: grid;
  gap: 2px;
  margin-top: 14px;
}

.comment-thread {
  position: relative;
  display: grid;
  gap: 0;
  isolation: isolate;
}

.comment-thread.has-replies > .comment-item::after {
  content: none;
}

.comment-item {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--comment-avatar-size) minmax(0, 1fr);
  align-items: flex-start;
  gap: 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 8px 0 12px;
}

.comment-avatar {
  position: relative;
  z-index: 2;
  width: var(--comment-avatar-size);
  height: var(--comment-avatar-size);
  border-radius: 999px;
  box-shadow: none;
  color: var(--text-strong);
  font-size: 0.9rem;
  font-weight: 900;
}

.comment-replies {
  position: relative;
  display: grid;
  gap: 0;
  margin-left: calc(var(--comment-avatar-size) / 2);
  padding-left: var(--comment-thread-indent);
}

.comment-replies::before {
  content: none;
}

.comment-replies > .comment-thread::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: calc(-1 * var(--comment-thread-indent));
  top: var(--comment-connector-top, -42px);
  width: calc(var(--comment-thread-indent) - var(--comment-node-gap));
  height: var(--comment-connector-height, 68px);
  border-left: var(--comment-line-width) solid var(--comment-line);
  border-bottom: var(--comment-line-width) solid var(--comment-line);
  border-bottom-left-radius: var(--comment-elbow-radius);
}

.comment-connector-toggle {
  position: absolute;
  z-index: 3;
  left: calc(-1 * var(--comment-thread-indent) - 8px);
  top: var(--comment-connector-top, -42px);
  width: calc(var(--comment-thread-indent) + 8px);
  height: var(--comment-connector-height, 68px);
  border: 0;
  border-radius: 0 0 0 var(--comment-elbow-radius);
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.comment-thread.is-thread-hover > .comment-replies > .comment-thread::before {
  border-left-color: var(--comment-line-active);
  border-bottom-color: var(--comment-line-active);
}

.comment-replies > .comment-thread.is-connector-hover::before {
  border-left-color: var(--comment-line-active);
  border-bottom-color: var(--comment-line-active);
}

.thread-line-hitbox {
  position: absolute;
  z-index: 3;
  left: calc((var(--comment-avatar-size) / 2) - 13px);
  top: calc(var(--comment-avatar-size) + var(--comment-avatar-line-gap));
  bottom: 8px;
  width: 26px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.comment-thread-toggle {
  position: relative;
  z-index: 1;
  justify-self: start;
  min-height: 28px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--accent-blue);
  margin: -2px 0 6px calc(var(--comment-avatar-size) + 12px);
  padding: 0 4px;
  font-size: 0.8rem;
  font-weight: 900;
}

.comment-thread-toggle::before {
  content: none;
}

.comment-thread.is-collapsed > .comment-thread-toggle::before {
  content: none;
}

.comment-thread-toggle:hover,
.comment-thread-toggle:focus-visible {
  color: var(--text-strong);
}

.comment-content {
  min-width: 0;
  padding-top: 1px;
}

.comment-meta {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 22px;
}

.comment-meta-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.comment-actions .comment-edit-btn,
.comment-actions .comment-delete-btn {
  display: none;
}

.comment-meta strong {
  font-size: 0.94rem;
}

.author-badge {
  display: inline-flex;
  align-items: center;
  min-height: 19px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 11%, transparent);
  color: var(--accent-strong);
  padding: 0 7px;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

.comment-meta span {
  color: var(--muted-2);
  font-size: 0.8rem;
  font-weight: 700;
}

.comment-item p {
  margin: 3px 0 0;
  color: var(--text);
  line-height: 1.62;
  word-break: break-word;
}

.comment-reply-btn {
  min-height: 28px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted-2);
  padding: 0 2px;
  font-size: 0.78rem;
  font-weight: 900;
}

.comment-delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  min-width: 28px;
  min-height: 28px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  padding: 0;
}

.comment-reply-btn:hover {
  border-color: transparent;
  background: transparent;
  color: var(--text-strong);
}

.comment-reply-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  margin-bottom: 6px;
  padding: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.comment-reply-context button {
  flex: 0 0 auto;
  border-radius: 999px;
  background: transparent;
  color: var(--muted-2);
  padding: 0 2px;
  font-size: 0.78rem;
  font-weight: 900;
}

.comment-reply-context button:hover {
  background: rgba(255, 113, 113, 0.14);
  color: var(--text-strong);
}

.comment-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 0;
}

.comment-form textarea {
  height: 36px;
  min-height: 36px;
  max-height: 36px;
  border: 0;
  border-bottom: 1px solid rgba(174, 192, 202, 0.28);
  border-radius: 0;
  background: transparent;
  line-height: 22px;
  overflow: hidden;
  padding: 5px 0 6px;
  resize: none;
}

.comment-form textarea:focus {
  border-bottom-color: var(--accent-blue);
  box-shadow: none;
}

.comment-form .app-form-message {
  grid-column: 1 / -1;
}

.comment-form .app-form-message:empty {
  display: none;
}

.comment-composer-slot {
  margin-bottom: 14px;
}

.comment-composer {
  display: grid;
  grid-template-columns: var(--comment-avatar-size) minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  position: relative;
}

.comment-composer::after {
  content: none;
}

.comment-composer-avatar {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--comment-avatar-size);
  height: var(--comment-avatar-size);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: #061014;
  font-size: 1rem;
  font-weight: 900;
}

.comment-composer-avatar svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.comment-composer-main {
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.comment-composer:not(.is-reply-composer) {
  grid-template-columns: minmax(0, 1fr);
}

.comment-composer:not(.is-reply-composer) .comment-composer-avatar {
  display: none;
}

.comment-composer.is-reply-composer {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.comment-composer.is-reply-composer .comment-composer-avatar {
  display: none;
}

.comment-inline-composer-slot {
  margin: -2px 0 8px calc(var(--comment-avatar-size) / 2);
  padding-left: var(--comment-thread-indent);
  position: relative;
}

.comment-inline-composer-slot::before {
  content: "";
  position: absolute;
  left: 0;
  top: var(--comment-composer-connector-top, -36px);
  width: calc(var(--comment-thread-indent) - var(--comment-node-gap));
  height: var(--comment-composer-connector-height, 54px);
  border-left: var(--comment-line-width) solid var(--comment-line);
  border-bottom: var(--comment-line-width) solid var(--comment-line);
  border-bottom-left-radius: var(--comment-elbow-radius);
}

.comment-composer.is-reply-composer::after {
  content: none;
}

.comment-composer.is-reply-composer .comment-composer-avatar {
  border-color: rgba(104, 199, 238, 0.46);
  background: rgba(104, 199, 238, 0.16);
  color: var(--accent-blue);
}

.comment-composer.is-reply-composer .comment-composer-main {
  border-color: transparent;
  background: transparent;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.post-list-head {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) 118px 172px 92px;
  gap: 12px;
  align-items: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  padding: 9px 14px;
  color: var(--muted-2);
  font-size: 0.76rem;
  font-weight: 900;
}

.community-board .forum-list {
  border-top: 0;
}

.community-board .post-item {
  grid-template-columns: 86px minmax(0, 1fr) 118px 172px 92px;
  gap: 12px;
  min-height: 62px;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.018);
  transition: background var(--motion-fast) var(--ease), border-color var(--motion-fast) var(--ease);
}

.community-board .post-item:hover {
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}

.post-item .post-category-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  max-width: 78px;
  min-height: 26px;
  border: 1px solid rgba(104, 199, 238, 0.28);
  border-radius: 999px;
  background: rgba(104, 199, 238, 0.10);
  color: var(--accent-blue);
  font-size: 0.76rem;
  font-weight: 950;
}

.community-board .post-item-main {
  gap: 2px;
}

.community-board .post-title {
  font-size: 0.96rem;
}

.community-board .post-summary {
  max-width: 720px;
  font-size: 0.8rem;
}

.post-author-cell {
  min-width: 0;
}

.post-author-cell .post-author {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-board .post-stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(44px, 1fr));
  gap: 6px;
  justify-items: end;
  margin-top: 0;
}

.community-board .post-stat {
  justify-content: flex-end;
  min-height: 24px;
  gap: 4px;
}

.post-time {
  color: var(--muted-2);
  font-size: 0.76rem;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

.community-board .post-item-status {
  display: block;
  min-height: 96px;
  padding: 18px;
}

.post-detail-body img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 10px 0;
}

.post-detail-body iframe {
  display: block;
  width: 100%;
  max-width: 760px;
  aspect-ratio: 16 / 9;
  min-height: 220px;
  border: 0;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  margin: 10px 0;
}

.post-detail-body .editor-youtube-card {
  position: relative;
  display: grid;
  grid-template-columns: 164px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  max-width: 760px;
  min-height: 96px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  overflow: hidden;
  text-decoration: none;
}

.post-detail-body .editor-youtube-card img {
  width: 164px;
  height: 96px;
  object-fit: cover;
  border-radius: 0;
  margin: 0;
}

.editor-youtube-play {
  position: absolute;
  left: 66px;
  top: 50%;
  width: 34px;
  height: 24px;
  border-radius: 8px;
  background: rgba(255, 40, 40, 0.86);
  transform: translateY(-50%);
}

.editor-youtube-play::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 6px;
  border-left: 10px solid #fff;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

.editor-youtube-title {
  min-width: 0;
  padding-right: 12px;
  color: var(--text-strong);
  font-size: 0.92rem;
  font-weight: 900;
  line-height: 1.4;
}

html[data-theme="light"] .post-detail {
  background: transparent;
}

html[data-theme="light"] .post-detail-body {
  background: rgba(255, 255, 255, 0.48);
}

html[data-theme="light"] .comment-section {
  background: rgba(255, 255, 255, 0.36);
}

html[data-theme="light"] .forum-tabs,
html[data-theme="light"] .forum-user-pill {
  background: rgba(255, 255, 255, 0.62);
}

@media (max-width: 940px) {
  .forum-layout {
    grid-template-columns: 1fr;
  }

  .community-hub-grid {
    grid-template-columns: 1fr;
  }

  .forum-row {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .forum-meta {
    display: none;
  }
}

@media (max-width: 700px) {
  .forum-shell {
    padding-top: 144px;
  }

  .forum-head,
  .board-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .forum-filter-row {
    flex-direction: column;
    gap: 0;
  }

  .sort-select-wrap {
    justify-content: space-between;
    border-top: 1px solid var(--line);
    border-left: 0;
    padding: 10px 12px;
  }

  .sort-select-wrap select {
    flex: 0 0 132px;
  }

  .forum-action-btn {
    width: 100%;
  }

  .forum-action-btn.icon-only {
    width: 38px;
  }

  .community-panel .forum-composer {
    grid-template-columns: 1fr;
  }

  .post-list-head {
    display: none;
  }

  .post-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .community-board .post-item {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .post-item .post-category-badge {
    justify-content: flex-start;
    width: max-content;
  }

  .post-author-cell .post-author,
  .post-time {
    text-align: left;
  }

  .community-board .post-stat-row {
    grid-template-columns: repeat(3, auto);
    justify-content: start;
    justify-items: start;
  }

  .post-side-meta {
    grid-template-columns: auto auto;
    justify-content: space-between;
    justify-items: start;
    min-width: 0;
    max-width: none;
    text-align: left;
  }

  .comment-replies {
    --comment-thread-indent: 20px;
    --comment-collapsed-elbow-width: 25px;
    margin-left: calc(var(--comment-avatar-size) / 2);
    padding-left: var(--comment-thread-indent);
  }

  .comment-inline-composer-slot {
    padding-left: 20px;
  }

  .comment-replies > .comment-thread::before {
    left: calc(-1 * var(--comment-thread-indent));
    width: calc(var(--comment-thread-indent) - var(--comment-node-gap));
  }

  .comment-connector-toggle {
    left: calc(-1 * var(--comment-thread-indent) - 8px);
    width: calc(var(--comment-thread-indent) + 8px);
  }

  .comment-inline-composer-slot::before {
    width: calc(var(--comment-thread-indent) - var(--comment-node-gap));
  }

}

.post-title-row {
  width: 100%;
}

.post-title-copy {
  min-width: 0;
}

.post-detail-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.post-tool-btn,
.comment-edit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  padding: 0;
  transition: border-color var(--motion-fast) var(--ease), background var(--motion-fast) var(--ease), color var(--motion-fast) var(--ease);
}

.comment-edit-btn {
  width: 28px;
  min-width: 28px;
  min-height: 28px;
  border-color: transparent;
  background: transparent;
  color: var(--muted-2);
}

.post-tool-btn:hover,
.comment-edit-btn:hover {
  border-color: rgba(104, 199, 238, 0.42);
  background: rgba(104, 199, 238, 0.11);
  color: var(--text-strong);
}

.post-tool-btn.danger:hover {
  border-color: rgba(255, 113, 113, 0.42);
  background: rgba(255, 113, 113, 0.10);
  color: var(--danger);
}

.post-tool-btn svg,
.comment-edit-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.comment-edit-form {
  display: grid;
  gap: 9px;
}

.comment-edit-form.hidden {
  display: none;
}

.comment-edit-form textarea {
  width: 100%;
  border-radius: 6px;
  padding: 10px 11px;
}

.comment-edit-form {
  margin-top: 8px;
}

.comment-edit-form textarea {
  min-height: 76px;
  resize: vertical;
}

.comment-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.post-dislike-btn {
  min-width: 38px;
  padding: 0 10px;
}

.post-dislike-btn:hover,
.post-dislike-btn.is-active {
  border-color: rgba(255, 113, 113, 0.42);
  background: rgba(255, 113, 113, 0.10);
  color: var(--text-strong);
}

.post-list-head {
  display: none;
}

.community-board .forum-list {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-sm);
  background: rgba(16, 24, 30, 0.30);
}

.community-board .post-feed-item {
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: flex-start;
  gap: 12px;
  min-height: 0;
  padding: 14px 16px;
  background: transparent;
}

.community-board .post-feed-item:hover {
  background: rgba(255, 255, 255, 0.045);
}

.post-vote-column {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding-top: 2px;
}

.post-list-reaction-btn,
.post-list-like-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted-2);
  padding: 0;
  transition: background var(--motion-fast) var(--ease), border-color var(--motion-fast) var(--ease), color var(--motion-fast) var(--ease);
}

.post-list-like-btn:hover,
.post-list-like-btn.is-active {
  border-color: color-mix(in srgb, var(--accent) 32%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--text-strong);
}

.post-list-dislike-btn:hover,
.post-list-dislike-btn.is-active {
  border-color: rgba(255, 113, 113, 0.36);
  background: rgba(255, 113, 113, 0.10);
  color: var(--text-strong);
}

.post-list-like-count {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 950;
  line-height: 1;
}

.post-feed-main {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.post-feed-link {
  color: inherit;
  text-decoration: none;
}

.post-feed-link:focus-visible {
  outline: 2px solid rgba(104, 199, 238, 0.7);
  outline-offset: 4px;
}

.post-feed-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
  color: var(--muted-2);
  font-size: 0.78rem;
  font-weight: 800;
}

.post-feed-dot {
  color: rgba(174, 192, 202, 0.58);
}

.post-feed-item .post-category-badge {
  justify-content: flex-start;
  min-width: 0;
  max-width: none;
  min-height: 22px;
  border-color: rgba(104, 199, 238, 0.24);
  border-radius: 999px;
  background: rgba(104, 199, 238, 0.08);
  padding: 0 8px;
  color: var(--accent-blue);
}

.post-feed-item .post-author {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.community-board .post-feed-item .post-title {
  overflow: visible;
  color: var(--text-strong);
  font-size: 1.02rem;
  line-height: 1.35;
  text-overflow: clip;
  white-space: normal;
}

.community-board .post-feed-item .post-summary {
  display: -webkit-box;
  overflow: hidden;
  max-width: 760px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.community-board .post-feed-item .post-stat-row {
  display: flex;
  justify-content: flex-start;
  justify-items: start;
  gap: 14px;
  margin-top: 2px;
}

.post-feed-item .post-time {
  color: var(--muted-2);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: left;
}

.community-board .post-feed-item .post-stat {
  justify-content: flex-start;
}

@media (max-width: 700px) {
  .post-title-row {
    align-items: flex-start;
  }

  .post-detail-actions {
    width: 100%;
    justify-content: flex-start;
    margin-left: 49px;
  }

  .community-board .post-feed-item {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 10px;
    padding: 13px 11px;
  }

  .post-list-reaction-btn,
  .post-list-like-btn {
    width: 32px;
    height: 32px;
  }

  .comment-edit-actions {
    justify-content: stretch;
  }
}

.community-board,
.community-board .board-toolbar,
.community-board .forum-filter-row,
.community-board .forum-list {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.community-board .forum-filter-row {
  padding-right: 0;
  padding-left: 0;
}

.community-board .forum-list {
  overflow: visible;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
}

.community-board .post-item,
.community-board .post-feed-item {
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.community-board .post-item:last-child,
.community-board .post-feed-item:last-child {
  border-bottom: 0;
}

.community-board .post-item:hover,
.community-board .post-feed-item:hover {
  background: rgba(255, 255, 255, 0.035);
  box-shadow: none;
  transform: none;
}

.community-board .post-item-status {
  background: transparent;
}

html[data-theme="light"] .community-board,
html[data-theme="light"] .community-board .board-toolbar,
html[data-theme="light"] .community-board .forum-filter-row,
html[data-theme="light"] .community-board .forum-list,
html[data-theme="light"] .community-board .post-item,
html[data-theme="light"] .community-board .post-feed-item {
  background: transparent;
  box-shadow: none;
}

html[data-theme="light"] .community-board .forum-list {
  border-top-color: rgba(35, 67, 49, 0.14);
}

html[data-theme="light"] .community-board .post-item,
html[data-theme="light"] .community-board .post-feed-item {
  border-bottom-color: rgba(35, 67, 49, 0.14);
}

html[data-theme="light"] .community-board .post-item:hover,
html[data-theme="light"] .community-board .post-feed-item:hover {
  background: rgba(22, 131, 74, 0.055);
}

.post-detail .post-detail-body,
.post-detail .comment-section {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.post-detail .post-detail-body {
  padding: 16px 0 20px;
}

.post-detail .comment-section {
  padding: 20px 0 18px;
}

html[data-theme="light"] .post-detail .post-detail-body,
html[data-theme="light"] .post-detail .comment-section {
  background: transparent;
  box-shadow: none;
}

.author-hover-target {
  cursor: help;
  text-decoration-color: transparent;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color var(--motion-fast) var(--ease), text-decoration-color var(--motion-fast) var(--ease);
}

.author-hover-target:hover,
.author-hover-target:focus-visible {
  color: var(--accent-strong);
  text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent);
}

.author-popover {
  position: fixed;
  z-index: 1200;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  min-width: 218px;
  max-width: min(320px, calc(100vw - 24px));
  border: 1px solid rgba(198, 233, 221, 0.22);
  border-radius: 8px;
  background: rgba(12, 19, 16, 0.96);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
  padding: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(5px);
  transition: opacity var(--motion-fast) var(--ease), transform var(--motion-fast) var(--ease);
}

.author-popover.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.author-popover-avatar {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  font-size: 0.9rem;
}

.author-popover-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.author-popover-main strong {
  overflow: hidden;
  color: var(--text-strong);
  font-size: 0.95rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.author-popover-main span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.author-popover-main em {
  color: var(--accent-strong);
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 900;
}

.author-popover-details {
  display: grid;
  gap: 4px;
  margin: 4px 0 0;
}

.author-popover-details div {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 24px;
  border: 1px solid rgba(198, 233, 221, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
  padding: 3px 6px;
}

.author-popover-details div[hidden] {
  display: none;
}

.author-popover-details dt,
.author-popover-details dd {
  min-width: 0;
  margin: 0;
}

.author-popover-details dt {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
}

.author-popover-details dd {
  overflow: hidden;
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-theme="light"] .author-popover {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 44px rgba(18, 35, 28, 0.14);
}

.comment-thread.is-collapsed > .thread-line-hitbox {
  left: calc(var(--comment-avatar-size) / 2);
  top: var(--comment-collapsed-line-top, calc(var(--comment-avatar-size) + var(--comment-avatar-line-gap)));
  bottom: auto;
  width: calc(var(--comment-avatar-size) + 44px);
  height: var(--comment-collapsed-line-height, 38px);
  border-radius: 0 0 0 var(--comment-elbow-radius);
}

.comment-thread.is-collapsed > .thread-line-hitbox::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: var(--comment-collapsed-elbow-width);
  height: 100%;
  border-left: var(--comment-line-width) solid var(--comment-line);
  border-bottom: var(--comment-line-width) solid var(--comment-line);
  border-bottom-left-radius: var(--comment-elbow-radius);
  pointer-events: none;
  transition: border-color var(--motion-fast) var(--ease);
}

.comment-thread.is-collapsed.is-thread-hover > .thread-line-hitbox::before,
.comment-thread.is-collapsed > .thread-line-hitbox:hover::before,
.comment-thread.is-collapsed > .thread-line-hitbox:focus-visible::before {
  border-left-color: var(--comment-line-active);
  border-bottom-color: var(--comment-line-active);
}

.comment-thread.is-collapsed > .comment-thread-toggle {
  z-index: 4;
}

/* Community rich post rendering */
.post-detail-body ul,
.post-detail-body ol {
  margin: 8px 0 12px;
  padding-left: 24px;
}

.post-detail-body a {
  color: var(--accent-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-detail-body pre {
  white-space: pre-wrap;
  tab-size: 2;
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  padding: 12px 14px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.92rem;
  line-height: 1.58;
  overflow-x: auto;
}

.post-detail-body pre code {
  border: 0;
  background: transparent;
  padding: 0;
}

.post-detail-body hr {
  height: 1px;
  margin: 22px 0;
  border: 0;
  background: var(--line);
}

.post-detail-body sub,
.post-detail-body sup {
  font-size: 0.72em;
  line-height: 0;
}

/* Community hub layout refresh */
.community-shell {
  width: min(100%, 1240px);
}

.community-head {
  align-items: center;
  margin-bottom: 18px;
}

.community-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.community-page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.community-main-column {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.community-right-rail {
  position: -webkit-sticky;
  position: sticky;
  top: calc(var(--nav-height) + 18px);
}

.community-notice-strip,
.community-support-card,
.community-board-stats {
  overflow: hidden;
}

.community-notice-strip .board-toolbar,
.community-support-card .side-title {
  margin-bottom: 0;
}

.community-notice-strip .forum-list {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.community-notice-strip .forum-row {
  grid-template-columns: 58px minmax(0, 1fr) 82px 76px;
  min-height: 58px;
  padding: 9px 14px;
}

.community-notice-strip .forum-row-main p {
  display: none;
}

.community-board .board-toolbar {
  padding-top: 0;
}

.community-board .board-toolbar span {
  display: block;
  margin-top: 4px;
}

.community-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 36px;
  border-top: 1px solid rgba(255, 255, 255, 0.075);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.community-stat-row:first-of-type {
  border-top: 0;
}

.community-stat-row strong {
  color: var(--text-strong);
  font-size: 1rem;
  font-weight: 950;
}

.server-address-copy.compact {
  width: auto;
  min-width: 190px;
  min-height: 36px;
  border-radius: 999px;
}

.community-support-card .forum-composer {
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
  padding: 0 0 12px;
}

.community-support-card .forum-composer select,
.community-support-card .forum-composer textarea {
  width: 100%;
}

.community-support-card .forum-composer textarea {
  min-height: 94px;
}

.community-support-card .forum-action-btn {
  width: 100%;
}

.community-support-card .app-form-message {
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.community-support-card .app-form-message.success {
  color: var(--accent-strong);
}

.community-support-card .app-form-message.error {
  color: #ffb4b4;
}

.inquiry-list.compact {
  margin-top: 10px;
}

.inquiry-list.compact .post-item {
  grid-template-columns: 1fr;
  gap: 4px;
  min-height: 0;
  border-radius: 0;
  padding: 10px 0;
}

.inquiry-list.compact .post-item:first-child {
  padding-top: 0;
}

.inquiry-list.compact .post-item:last-child {
  padding-bottom: 0;
}

.inquiry-list.compact .post-item:hover {
  background: transparent;
}

.inquiry-list.compact .post-item strong,
.inquiry-list.compact .post-item p,
.inquiry-list.compact .post-item span {
  white-space: normal;
}

.inquiry-list.compact .post-item p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

@media (max-width: 1020px) {
  .community-page-layout {
    grid-template-columns: 1fr;
  }

  .community-right-rail {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .community-head {
    align-items: flex-start;
  }

  .community-head-actions {
    width: 100%;
    justify-content: stretch;
  }

  .server-address-copy.compact,
  .community-head-actions .forum-action-btn {
    width: 100%;
  }

  .community-right-rail {
    grid-template-columns: 1fr;
  }

  .community-notice-strip .forum-row {
    grid-template-columns: 52px minmax(0, 1fr);
  }
}

/* ============================================================
   Chat hub: friend DMs + community channels
   ============================================================ */
.chat-hub {
  display: grid;
  grid-template-columns: minmax(240px, 300px) 1fr;
  height: min(72vh, 720px);
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-solid);
  overflow: hidden;
}

.chat-rail {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--line);
  background: var(--bg);
}

.chat-rail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.chat-rail-head strong {
  font-size: 1.05rem;
  color: var(--text-strong);
}

.chat-conn {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.chat-conn[data-state="online"] {
  color: var(--success, #15a35a);
  border-color: color-mix(in srgb, var(--success, #15a35a) 40%, transparent);
  background: color-mix(in srgb, var(--success, #15a35a) 12%, transparent);
}

.chat-conn[data-state="offline"],
.chat-conn[data-state="connecting"] {
  color: var(--warning, #c98a00);
  border-color: color-mix(in srgb, var(--warning, #c98a00) 40%, transparent);
}

.chat-conn[data-state="syncing"] {
  color: var(--accent-blue);
  border-color: color-mix(in srgb, var(--accent-blue) 40%, transparent);
  background: color-mix(in srgb, var(--accent-blue) 12%, transparent);
}

.chat-rail-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 8px 16px;
}

.chat-rail-section + .chat-rail-section {
  margin-top: 6px;
}

.chat-rail-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 10px 8px 6px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.chat-rail-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-blue);
}

.chat-rail-dot.is-community {
  background: var(--accent-strong);
}

.chat-rail-dot.is-group {
  background: #d78a2f;
}

.chat-rail-empty {
  margin: 6px 10px;
  font-size: 0.82rem;
  color: var(--muted);
}

.chat-thread {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: inherit;
}

.chat-thread:hover {
  background: color-mix(in srgb, var(--text-strong) 6%, transparent);
}

.chat-thread.is-active {
  background: color-mix(in srgb, var(--accent-blue) 14%, transparent);
}

.chat-thread-avatar {
  position: relative;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #fff;
  background: var(--accent-blue);
}

.chat-thread-avatar.is-community {
  border-radius: 10px;
  background: var(--accent-strong);
}

.chat-thread-avatar.is-group {
  border-radius: 10px;
  background: #d78a2f;
}

.chat-presence-dot {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid var(--bg);
  background: var(--muted-2);
}

.chat-presence-dot.is-online {
  background: var(--success, #15a35a);
}

.chat-thread-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chat-thread-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.chat-thread-top strong {
  font-size: 0.9rem;
  color: var(--text-strong);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-thread-top time {
  flex: 0 0 auto;
  font-size: 0.68rem;
  color: var(--muted-2);
}

.chat-thread-preview {
  font-size: 0.8rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-unread {
  flex: 0 0 auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--danger, #e0245e);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

/* message pane */
.chat-pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}

.chat-pane-empty {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.chat-pane-active {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}

.chat-pane-active.hidden {
  display: none;
}

.chat-pane-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.chat-pane-kind {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
  background: var(--accent-blue);
}

.chat-pane-kind.is-community {
  background: var(--accent-strong);
}

.chat-pane-kind.is-group {
  background: #d78a2f;
}

.chat-pane-head-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.chat-pane-head-text strong {
  color: var(--text-strong);
}

.chat-pane-head-text span {
  font-size: 0.76rem;
  color: var(--muted);
}

.chat-back-btn {
  display: none;
  border: 0;
  background: transparent;
  font-size: 1.3rem;
  line-height: 1;
  padding: 4px 8px;
  cursor: pointer;
  color: var(--text);
}

.chat-message-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
}

.chat-msg-empty {
  margin: auto;
  color: var(--muted);
  font-size: 0.86rem;
}

.chat-msg {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 76%;
}

.chat-msg.is-mine {
  align-self: flex-end;
  align-items: flex-end;
}

.chat-msg-author {
  font-size: 0.72rem;
  color: var(--muted-2);
  margin: 0 0 2px 8px;
}

.chat-bubble {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 8px 12px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--text-strong) 8%, transparent);
  border-bottom-left-radius: 4px;
}

.chat-msg.is-mine .chat-bubble {
  align-items: flex-end;
  background: var(--accent-blue);
  color: #fff;
  border-radius: 14px;
  border-bottom-right-radius: 4px;
}

.chat-msg-body {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.9rem;
}

.chat-msg-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-end;
}

.chat-source-tag {
  display: inline-flex;
  align-items: center;
  min-height: 17px;
  border-radius: 999px;
  padding: 0 6px;
  background: rgba(215, 138, 47, 0.18);
  color: #ffd49a;
  font-size: 0.62rem;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.chat-msg.is-mine .chat-source-tag {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.chat-msg-time {
  flex: 0 0 auto;
  font-size: 0.64rem;
  opacity: 0.65;
}

.chat-msg.is-sending {
  opacity: 0.6;
}

.chat-msg.is-failed .chat-bubble {
  background: color-mix(in srgb, var(--danger, #e0245e) 25%, transparent);
}

.chat-composer {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}

.chat-composer input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.9rem;
}

.chat-composer input:focus {
  outline: none;
  border-color: var(--accent-blue);
}

@media (max-width: 720px) {
  .chat-hub {
    grid-template-columns: 1fr;
    height: min(78vh, 640px);
  }
  .chat-hub .chat-pane {
    display: none;
  }
  .chat-hub.is-thread-open .chat-rail {
    display: none;
  }
  .chat-hub.is-thread-open .chat-pane {
    display: flex;
  }
  .chat-back-btn {
    display: inline-flex;
  }
  .chat-msg {
    max-width: 86%;
  }
}

/* Chat hub motion (unified tokens) */
.chat-thread {
  transition:
    background var(--motion-fast) var(--ease),
    transform var(--motion-fast) var(--ease);
}

.chat-thread:active {
  transform: scale(0.99);
}

.chat-conn {
  transition:
    color var(--motion-fast) var(--ease),
    border-color var(--motion-fast) var(--ease),
    background var(--motion-fast) var(--ease);
}

.chat-composer input {
  transition:
    border-color var(--motion-fast) var(--ease),
    box-shadow var(--motion-fast) var(--ease),
    background var(--motion-fast) var(--ease);
}

.chat-msg.is-new {
  animation: chat-msg-in var(--motion) var(--ease);
}

@keyframes chat-msg-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-pane-active:not(.hidden) {
  animation: chat-pane-fade var(--motion-fast) var(--ease);
}

@keyframes chat-pane-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* === Top-bar always-on post search (Reddit-style pill, 2026-06-21) ======== */
body.site-community-hub .nav-search-bar {
  position: absolute;
  left: var(--community-integrated-rail-width, 334px);
  right: var(--community-right-rail-width, 280px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  width: auto;
  max-width: 560px;
  min-width: 0;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-solid, #121714) 82%, transparent);
  padding: 0 16px;
  transition: border-color var(--motion-fast) var(--ease),
    box-shadow var(--motion-fast) var(--ease),
    background var(--motion-fast) var(--ease);
}
body.site-community-hub .nav-search-bar:hover {
  border-color: var(--line-strong, var(--line));
}
body.site-community-hub .nav-search-bar:focus-within {
  border-color: var(--accent);
  background: var(--surface-solid, #121714);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
body.site-community-hub .nav-search-bar-icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
body.site-community-hub .nav-search-bar:focus-within .nav-search-bar-icon {
  stroke: var(--accent);
}
body.site-community-hub .nav-search-bar input {
  flex: 1 1 auto;
  min-width: 0;
  height: 40px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.96rem;
  outline: none;
}
body.site-community-hub .nav-search-bar input::placeholder {
  color: var(--muted-2, var(--muted));
}
body.site-community-hub .nav-search-bar input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}
body.site-community-hub .nav-search-count {
  flex: 0 0 auto;
  color: var(--muted-2, var(--muted));
  font-size: 0.8rem;
  font-weight: 800;
}
/* On phones the bottom tab bar handles nav; the search returns to the navbar flow. */
@media (max-width: 760px) {
  body.site-community-hub .nav-search-bar {
    position: static;
    left: auto;
    right: auto;
    flex: 1 1 auto;
    width: auto;
    max-width: none;
  }
}
body.site-community-hub .post-item.is-search-hidden {
  display: none !important;
}
body.site-community-hub .post-search-empty {
  padding: 28px 8px;
  color: var(--muted-2);
  text-align: center;
}

/* Write button disabled in aggregate feeds (인기 / 내 목록) — no target community. */
.nav-compose-btn.is-disabled {
  opacity: 0.42;
  pointer-events: none;
  cursor: not-allowed;
}

/* Sort dropdown alone in the filter row (scope tabs moved to the sidebar). */
.forum-filter-row-sort-only {
  justify-content: flex-end;
}

/* Right-rail real-time friend status card (sits above the server map). */
.community-friends-card .friend-card-list { display: grid; gap: 7px; margin-top: 10px; }
.community-friends-card .friend-card-count { color: var(--muted-2); font-size: 0.78rem; font-weight: 800; }
.friend-card-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 9px; }
.friend-card-avatar {
  width: 28px; height: 28px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 900;
  background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent);
}
.friend-card-main { min-width: 0; display: grid; gap: 1px; }
.friend-card-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-size: 0.86rem; font-weight: 800; }
.friend-card-main span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted-2); font-size: 0.74rem; }
.friend-card-dot { width: 8px; height: 8px; border-radius: 50%; background: #43d17a; box-shadow: 0 0 0 3px color-mix(in srgb, #43d17a 22%, transparent); }
.friend-card-empty { margin: 10px 0 2px; color: var(--muted-2); font-size: 0.8rem; }

/* ===== Instagram-style friends tab (친구 / 팔로잉 / 팔로워) ===== */
.friends-ig { width: 100%; max-width: 600px; margin-inline: auto; display: grid; gap: 14px; }

.friends-ig-search { position: relative; display: flex; align-items: center; }
.friends-ig-search-icon { position: absolute; left: 14px; width: 18px; height: 18px; fill: none; stroke: var(--muted-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.friends-ig-search input { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, 0.04); padding: 0 16px 0 42px; color: var(--text); font-size: 0.95rem; }
.friends-ig-search input:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }

.friends-ig-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); }
.friends-ig-tab { flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 0.92rem; font-weight: 800; cursor: pointer; transition: color var(--motion-fast) var(--ease), border-color var(--motion-fast) var(--ease); }
.friends-ig-tab em { font-style: normal; font-size: 0.76rem; font-weight: 800; color: var(--muted-2); }
.friends-ig-tab:hover { color: var(--text); }
.friends-ig-tab.is-active { color: var(--text-strong); border-bottom-color: var(--accent); }
.friends-ig-tab.is-active em { color: var(--accent); }

.friends-ig-panel { display: none; }
.friends-ig-panel.is-active { display: grid; gap: 12px; }

.friends-ig-add { display: flex; gap: 8px; align-items: center; }
.friends-ig-add select { flex: 0 0 auto; min-height: 40px; }
.friends-ig-add input { flex: 1 1 auto; min-width: 0; min-height: 40px; }
.friends-ig-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.friends-ig-filters button { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; border: 1px solid var(--line); border-radius: 999px; background: transparent; padding: 0 12px; color: var(--muted); font-size: 0.82rem; font-weight: 800; cursor: pointer; }
.friends-ig-filters button em { font-style: normal; font-size: 0.74rem; color: var(--muted-2); }
.friends-ig-filters button.is-active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--text-strong); }

.friends-ig-list { display: grid; gap: 2px; }
.friends-ig-list .friend-status-row { padding: 16px 4px; color: var(--muted-2); }

.friends-ig .friend-row,
.friends-ig .follow-item.friend-follow-item { display: flex; align-items: center; gap: 12px; border: 0; border-radius: 12px; background: transparent; padding: 8px; }
.friends-ig .friend-row:hover,
.friends-ig .follow-item.friend-follow-item:hover { background: rgba(255, 255, 255, 0.045); }
.friends-ig .follow-item.is-empty { padding: 16px 4px; color: var(--muted-2); background: transparent; border: 0; }

.friends-ig .friend-avatar,
.friends-ig .follow-person .user-avatar-mini { position: relative; flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 1.02rem; font-weight: 900; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.friends-ig .friend-row.is-online .friend-avatar::after { content: ""; position: absolute; right: 0; bottom: 0; width: 12px; height: 12px; border-radius: 50%; background: #43d17a; border: 2.5px solid var(--surface-solid, #0d1210); }

.friends-ig .follow-person { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1 1 auto; }
.friends-ig .friend-main,
.friends-ig .follow-person > div { flex: 1 1 auto; min-width: 0; display: grid; gap: 1px; }
.friends-ig .friend-main strong,
.friends-ig .follow-person strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-size: 0.94rem; font-weight: 800; }
.friends-ig .friend-main span,
.friends-ig .follow-person span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted-2); font-size: 0.8rem; }

.friends-ig .friend-presence { flex: 0 0 auto; font-style: normal; font-size: 0.72rem; font-weight: 800; color: var(--muted-2); }
.friends-ig .friend-row.is-online .friend-presence { color: #43d17a; }

.friends-ig .friend-close-btn,
.friends-ig .friend-remove-btn,
.friends-ig .follow-actions .auth-sub-btn { flex: 0 0 auto; min-height: 32px; border: 1px solid var(--line); border-radius: 999px; background: transparent; padding: 0 12px; color: var(--text); font-size: 0.8rem; font-weight: 800; cursor: pointer; }
.friends-ig .friend-close-btn.is-active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.friends-ig .friend-remove-btn,
.friends-ig .follow-actions .auth-sub-btn.danger { color: #ff7a7a; border-color: color-mix(in srgb, #ff7a7a 35%, var(--line)); }
.friends-ig .follow-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; }
.friends-ig .follow-notify-toggle { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 0.76rem; font-weight: 700; }

/* Post row: title and the author/time meta share one row (no empty left gap). */
.post-feed-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.post-feed-head .post-title { flex: 1 1 auto; min-width: 0; }
.post-feed-head .post-feed-meta { flex: 0 0 auto; flex-wrap: nowrap; white-space: nowrap; }
@media (max-width: 640px) {
  .post-feed-head { flex-direction: column; gap: 2px; }
  .post-feed-head .post-feed-meta { flex-wrap: wrap; white-space: normal; }
}

/* ===== 공지 / 문의 리디자인 (Discord/X 카드 스타일, 중앙 정렬) ===== */
body.site-community-hub #channel-notices,
body.site-community-hub #app-view-inquiry { width: 100%; max-width: 620px; margin-inline: auto; }

.notice-write-entry { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, 0.03); padding: 13px 16px; margin-bottom: 12px; }
.notice-write-entry-copy strong { color: var(--text-strong); font-weight: 800; }

.notice-board-list { display: grid; gap: 10px; }
.notice-board-list .forum-row { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, 0.025); padding: 14px 16px; cursor: pointer; transition: background var(--motion-fast) var(--ease), border-color var(--motion-fast) var(--ease); }
.notice-board-list .forum-row:hover { background: rgba(255, 255, 255, 0.05); border-color: var(--line-strong, var(--line)); }
.notice-board-list .forum-badge { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font-size: 0.72rem; font-weight: 800; color: var(--muted); }
.notice-board-list .forum-row-main { flex: 1 1 auto; min-width: 0; display: grid; gap: 3px; }
.notice-board-list .forum-row-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-strong); font-size: 0.98rem; font-weight: 800; }
.notice-board-list .forum-row-main p { overflow: hidden; margin: 0; color: var(--muted); font-size: 0.86rem; text-overflow: ellipsis; white-space: nowrap; }
.notice-board-list .forum-meta { flex: 0 0 auto; color: var(--muted-2); font-size: 0.76rem; font-weight: 700; white-space: nowrap; }

.hub-inquiry-board { display: grid; gap: 14px; }
.inquiry-composer { display: grid; gap: 10px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, 0.03); padding: 16px; }
.inquiry-composer input, .inquiry-composer select, .inquiry-composer textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; background: rgba(0, 0, 0, 0.18); padding: 10px 12px; color: var(--text); font: inherit; }
.inquiry-composer input:focus-visible, .inquiry-composer select:focus-visible, .inquiry-composer textarea:focus-visible { outline: none; border-color: var(--accent); }
.inquiry-composer textarea { min-height: 110px; resize: vertical; }
.inquiry-composer .forum-action-btn { justify-self: end; }

.inquiry-list { display: grid; gap: 10px; }
.inquiry-list .inquiry-row { display: grid; gap: 6px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, 0.025); padding: 14px 16px; cursor: pointer; transition: background var(--motion-fast) var(--ease); }
.inquiry-list .inquiry-row:hover { background: rgba(255, 255, 255, 0.05); }
.inquiry-list .inquiry-row > p { overflow: hidden; margin: 0; color: var(--muted); font-size: 0.88rem; text-overflow: ellipsis; white-space: nowrap; }
.inquiry-row-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.inquiry-row-head strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-strong); font-size: 0.96rem; font-weight: 800; }
.inquiry-visibility { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; color: var(--muted-2); font-size: 0.72rem; font-weight: 800; }
.inquiry-row-meta { color: var(--muted-2); font-size: 0.78rem; font-weight: 700; }

/* Chat: time sits beside the bubble (KakaoTalk-style) + centered date divider. */
.chat-msg-line { display: flex; align-items: flex-end; gap: 6px; max-width: 100%; }
.chat-msg.is-mine .chat-msg-line { flex-direction: row-reverse; }
.chat-msg-line .chat-msg-meta { align-self: flex-end; padding-bottom: 1px; color: var(--muted-2); }
.chat-msg-line .chat-msg-time { opacity: 0.8; }

.chat-date-divider { display: flex; align-items: center; gap: 12px; align-self: stretch; width: 100%; margin: 14px 0 6px; }
.chat-date-divider::before, .chat-date-divider::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--line); }
.chat-date-divider span { flex: 0 0 auto; color: var(--muted-2); font-size: 0.72rem; font-weight: 800; }

/* --- Code box copy button -------------------------------------------------
   One unified "코드" feature: a code box (<pre><code>) that, when rendered on a
   post, gets a working "복사" (copy) button. The button is injected at render
   time by enhanceCodeBlocks() so it never has to pass the HTML sanitizer. */
.post-detail-body pre,
.post-body-content pre,
body.site-community-write .rich-editor pre {
  position: relative;
}
.code-copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  border: 1px solid var(--line-strong, rgba(255, 255, 255, 0.18));
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.45);
  color: var(--text, #fff);
  padding: 3px 10px;
  font-family: var(--font, inherit);
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.4;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.post-detail-body pre:hover .code-copy-btn,
.post-body-content pre:hover .code-copy-btn { opacity: 1; }
.code-copy-btn:hover { background: rgba(0, 0, 0, 0.72); opacity: 1; }
.code-copy-btn.is-copied {
  color: var(--accent, #68c7ee);
  border-color: color-mix(in srgb, var(--accent, #68c7ee) 60%, transparent);
}
html[data-theme="light"] .code-copy-btn {
  background: rgba(255, 255, 255, 0.82);
  color: var(--text, #14201a);
  border-color: rgba(35, 67, 49, 0.18);
}

/* --- Text decorations: border + effects (editor canvas + rendered post) ----
   Applied to spans the editor wraps around the selection. Kept theme-aware so
   they read on both the dark canvas and the light theme. */
.rich-editor .editor-text-border,
.post-detail-body .editor-text-border,
.post-body-content .editor-text-border {
  border: 1.5px solid var(--bd-color, currentColor);
  border-radius: 6px;
  padding: 0 0.28em;
}
.rich-editor .editor-fx-shadow,
.post-detail-body .editor-fx-shadow,
.post-body-content .editor-fx-shadow {
  text-shadow: 1px 2px 3px rgba(0, 0, 0, 0.45);
}
.rich-editor .editor-fx-glow,
.post-detail-body .editor-fx-glow,
.post-body-content .editor-fx-glow {
  text-shadow: 0 0 7px currentColor, 0 0 15px currentColor;
}
.rich-editor .editor-fx-outline,
.post-detail-body .editor-fx-outline,
.post-body-content .editor-fx-outline {
  --fx-outline: rgba(255, 255, 255, 0.92);
  text-shadow:
    -1px -1px 0 var(--fx-outline), 1px -1px 0 var(--fx-outline),
    -1px 1px 0 var(--fx-outline), 1px 1px 0 var(--fx-outline);
}
html[data-theme="light"] .rich-editor .editor-fx-outline,
html[data-theme="light"] .post-detail-body .editor-fx-outline,
html[data-theme="light"] .post-body-content .editor-fx-outline {
  --fx-outline: rgba(0, 0, 0, 0.9);
}

/* --- Shapes (editor canvas + rendered post) -------------------------------
   Inline-block colored boxes inserted by the 도형 toolbar group. Fill, border
   (--bd-color) and effects reuse the text-decoration classes, restyled here so
   they read on a solid box instead of text. */
.editor-shape {
  display: inline-block;
  vertical-align: middle;
  margin: 2px 4px;
  box-sizing: border-box;
  max-width: 100%;
  background-color: rgba(104, 199, 238, 0.55);
}
.editor-shape-rect { border-radius: 4px; }
.editor-shape-rounded { border-radius: 16px; }
.editor-shape-circle { border-radius: 50%; }
.editor-shape-pill { border-radius: 999px; }
.editor-shape-line { border-radius: 999px; }
.editor-shape.editor-text-border {
  border: 2px solid var(--bd-color, currentColor) !important;
  padding: 0 !important;
}
.editor-shape.editor-fx-shadow { box-shadow: 4px 6px 14px rgba(0, 0, 0, 0.4); text-shadow: none; }
.editor-shape.editor-fx-glow {
  box-shadow: 0 0 16px rgba(104, 199, 238, 0.75), 0 0 6px rgba(104, 199, 238, 0.6);
  text-shadow: none;
}
.editor-shape.editor-fx-outline {
  outline: 2px solid var(--bd-color, rgba(255, 255, 255, 0.9));
  outline-offset: 2px;
  text-shadow: none;
}
body.site-community-write .rich-editor .editor-shape { cursor: pointer; }
body.site-community-write .rich-editor .editor-shape.is-selected {
  outline: 2px solid var(--accent, #68c7ee);
  outline-offset: 2px;
}
