﻿.board-layout { display: grid; grid-template-columns: 224px minmax(0, 1fr); gap: 24px; }
.board-sidebar { padding: 18px 18px 20px; position: sticky; top: 88px; height: calc(100vh - 104px); }
.board-sidebar .brand { font-size: 22px; font-weight: 700; margin-bottom: 18px; }
.board-nav { display: grid; gap: 8px; }
.board-nav a, .board-compose-btn { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 16px; border-radius: 14px; color: #475569; font-weight: 500; }
.board-nav a.is-active { background: #fef3c7; color: var(--accent); }
.board-nav svg, .board-compose-btn svg { width: 20px; height: 20px; color: #64748b; flex: 0 0 auto; }
.board-compose-btn { width: 100%; border: 0; margin-top: 18px; justify-content: center; background: var(--accent); color: #fff; font-weight: 700; border-radius: 999px; }
.board-main { display: grid; gap: 14px; }
.board-main-wide { align-content: start; }
.board-feed-shell { overflow: hidden; }
.board-top-tabs { display: flex; gap: 16px; padding: 20px 24px 10px; border-bottom: 1px solid var(--border); }
.board-top-tabs button { border: 0; background: transparent; color: #64748b; padding: 0 2px 12px; border-bottom: 2px solid transparent; font-weight: 500; }
.board-top-tabs button.is-active { color: #111827; border-bottom-color: #111827; }
.composer { display: flex; gap: 14px; padding: 16px 24px 14px; border-bottom: 1px solid var(--border); }
.composer-avatar { width: 42px; height: 42px; border-radius: 999px; object-fit: cover; }
.composer-main { flex: 1; }
.composer-input { width: 100%; min-height: 54px; border: 0; border-bottom: 1px solid var(--border); padding: 0 0 12px; resize: none; background: transparent; }
.composer-actions { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 12px; }
.composer-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.composer-tools select { min-width: 122px; height: 36px; border: 1px solid var(--border); border-radius: 12px; padding: 0 34px 0 14px; background: #fff; }
.composer-tools button { border: 0; background: transparent; color: #64748b; display: inline-flex; align-items: center; justify-content: center; width: auto; min-width: 22px; height: 22px; gap: 6px; }
.composer-icon-btn { min-height: 34px; padding: 0 2px; font-size: 14px; font-weight: 500; color: #64748b; }
.composer-icon-btn svg { width: 18px; height: 18px; color: #818cf8; }
.composer-icon-btn.gif svg { color: #64748b; }
.composer-icon-btn span { white-space: nowrap; }
.composer-post-btn { min-width: 78px; height: 40px; border: 0; background: var(--accent); color: #fff; font-weight: 700; }
.board-hot-tabs { display: flex; gap: 12px; padding: 14px 24px 18px; }
.board-hot-tabs button { height: 40px; padding: 0 16px; border: 1px solid var(--border); background: #fff; color: #64748b; border-radius: 12px; }
.board-hot-tabs button.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.board-feed { display: grid; gap: 16px; }
.board-post-card { padding: 20px 22px; }
.board-post-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.board-author { display: flex; gap: 12px; align-items: center; }
.board-author img { width: 46px; height: 46px; border-radius: 999px; object-fit: cover; }
.board-author strong { font-size: 15px; }
.board-author small, .board-category-line, .board-actions-row { color: var(--muted); }
.board-card-link { color: inherit; }
.board-post-hook { margin: 0 0 10px; font-size: 15px; line-height: 1.65; }
.board-media { display: grid; gap: 10px; margin: 14px 0; }
.board-media img { width: 100%; border-radius: 16px; object-fit: cover; }
.board-embed { display: flex; justify-content: space-between; gap: 16px; padding: 16px 18px; border: 1px solid #7dd3c0; background: #ecfdf5; border-radius: 16px; margin-top: 14px; }
.board-embed strong { display: block; margin-bottom: 8px; }
.board-embed .buy-btn { align-self: start; min-width: 76px; height: 40px; border: 0; background: #10b981; color: #fff; border-radius: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.board-actions-row { display: flex; gap: 22px; align-items: center; padding-top: 14px; border-top: 1px solid var(--border); margin-top: 14px; flex-wrap: wrap; }
.board-action-btn { border: 0; background: transparent; color: #64748b; display: inline-flex; align-items: center; gap: 7px; font-weight: 500; }
.board-action-btn svg { width: 19px; height: 19px; }
.board-action-btn strong { font-size: 14px; color: #64748b; }
.board-action-btn.is-liked { color: #ef5b8d; }
.board-action-btn.is-liked strong { color: #ef5b8d; }
.board-action-btn.is-active:not(.is-liked) { color: #111827; }
.board-action-btn.is-active:not(.is-liked) strong { color: #111827; }
.board-inline-thread { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); display: grid; gap: 14px; }
.board-inline-thread.hide { display: none; }
.board-inline-thread-note { color: var(--muted); font-size: 14px; }
.board-inline-comments { display: grid; gap: 14px; }
.board-inline-comment { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: start; }
.board-inline-comment.is-reply { margin-left: 32px; }
.board-inline-comment-avatar { width: 40px; height: 40px; border-radius: 999px; object-fit: cover; }
.board-inline-comment-main { display: grid; gap: 8px; }
.board-inline-comment-bubble { background: #f3f4f6; border-radius: 14px; padding: 12px 14px; }
.board-inline-comment-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.board-inline-comment-head small { color: var(--muted); }
.board-inline-comment-body { line-height: 1.6; }
.board-inline-comment-actions { display: flex; gap: 14px; align-items: center; color: var(--muted); font-size: 14px; flex-wrap: wrap; }
.board-inline-comment-actions button { border: 0; background: transparent; color: inherit; padding: 0; }
.board-inline-compose { display: grid; grid-template-columns: minmax(0, 1fr) 88px; gap: 12px; align-items: center; }
.board-inline-compose input { width: 100%; height: 42px; border: 1px solid var(--border); border-radius: 12px; padding: 0 14px; background: #fff; }
.board-inline-compose button { height: 42px; border: 0; border-radius: 12px; background: var(--accent); color: #fff; font-weight: 700; }
.board-pagination { display: flex; gap: 8px; flex-wrap: wrap; }
.board-pagination a { min-width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border); background: #fff; display: inline-flex; align-items: center; justify-content: center; }
.board-pagination a.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.board-empty-wrap { display: grid; gap: 16px; }
.board-empty-state { display: grid; gap: 10px; }
.board-compose-tools-inline { display: flex; align-items: center; gap: 18px; padding-top: 16px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.board-compose-tools-inline button { border: 0; background: transparent; color: #64748b; display: inline-flex; gap: 8px; align-items: center; }
.board-compose-tools-inline svg { width: 20px; height: 20px; }
.board-tag-panel { padding: 14px; border: 1px solid #10b981; border-radius: 14px; background: #ecfdf5; margin-top: 12px; }
.board-tag-panel input { width: 100%; margin-top: 8px; border: 1px solid #10b981; border-radius: 10px; padding: 10px 12px; }
.me-muted { color: var(--muted); }
.board-detail-layout, .board-write-layout { align-items: start; }
.board-detail-card, .board-write-card { padding: 28px; }
.board-detail-topbar { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 18px; }
.board-detail-meta-row { display: flex; gap: 16px; color: var(--muted); font-size: 13px; flex-wrap: wrap; }
.board-detail-title { margin: 0 0 10px; font-size: 34px; line-height: 1.2; }
.board-detail-body { font-size: 16px; line-height: 1.8; color: #1f2937; }
.board-detail-body p:first-child { margin-top: 0; }
.board-detail-body img { border-radius: 18px; margin: 18px 0; }
.board-detail-section { margin-top: 26px; }
.board-detail-section h2 { margin: 0 0 14px; font-size: 20px; }
.board-detail-poll { display: grid; gap: 12px; padding: 18px; border: 1px solid #dbeafe; background: #f8fbff; border-radius: 18px; }
.board-detail-poll-options { display: grid; gap: 10px; }
.board-detail-poll-option { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: #fff; }
.board-detail-poll-option b { margin-left: auto; }
.board-detail-poll-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.board-detail-poll-option.is-selected { border-color: var(--accent); background: #fff7ed; }
.board-comment-form { display: grid; gap: 12px; }
.board-comment-form textarea { min-height: 120px; border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px; resize: vertical; }
.board-comment-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.board-comments-list { display: grid; gap: 14px; }
.board-comment-card { padding: 18px 20px; border: 1px solid var(--border); border-radius: 18px; background: #fff; }
.board-comment-card.depth-1 { margin-left: 28px; border-color: #fde68a; background: #fffbeb; }
.board-comment-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.board-comment-body { margin-top: 10px; line-height: 1.7; white-space: pre-wrap; }
.board-comment-row { display: flex; gap: 14px; align-items: center; margin-top: 12px; flex-wrap: wrap; color: var(--muted); }
.board-comment-row button { border: 0; background: transparent; color: inherit; padding: 0; }
.board-detail-rail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.board-side-card { padding: 20px; }
.board-side-card h3 { margin: 0 0 10px; font-size: 18px; }
.board-related-list { display: grid; gap: 12px; }
.board-related-item { display: grid; gap: 4px; padding: 14px; border-radius: 14px; background: #fff; border: 1px solid var(--border); }
.board-related-item strong { font-size: 14px; }
.board-side-actions { display: grid; gap: 10px; }
.board-side-actions a { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; border-radius: 12px; border: 1px solid var(--border); background: #fff; }
.board-side-actions a.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.board-loading-note { color: var(--muted); }
.board-write-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 22px; }
.board-write-head h1 { margin: 10px 0 8px; font-size: 30px; }
.board-write-head p { margin: 0; color: var(--muted); line-height: 1.6; }
.board-write-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; min-width: 320px; }
.board-write-stats div { padding: 14px 16px; border-radius: 16px; background: #f8fafc; border: 1px solid var(--border); }
.board-write-stats span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.board-write-stats strong { font-size: 16px; }
.board-write-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; }
.board-title-field input, #boardPostBody { background: #fff; }
#boardPostBody { width: 100%; border: 1px solid var(--border); border-radius: 18px; padding: 16px 18px; resize: vertical; min-height: 360px; }
.board-write-toolbar-row { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin: 8px 0 4px; }
.board-write-tools-inline button { color: #475569; border: 1px solid var(--border); border-radius: 999px; min-height: 38px; padding: 0 14px; background: #fff; }
.board-upload-list { display: grid; gap: 10px; margin-top: 14px; }
.board-upload-chip { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--border); background: #fff; }
.board-upload-chip button { border: 0; background: transparent; color: #ef4444; }
.board-poll-builder { margin-top: 16px; padding: 18px; border-radius: 18px; border: 1px solid #dbeafe; background: #f8fbff; }
.board-poll-head { display: grid; gap: 4px; margin-bottom: 14px; }
.board-poll-head span { color: var(--muted); font-size: 13px; }
.board-poll-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.board-check { display: inline-flex; gap: 10px; align-items: center; color: #475569; margin-top: 6px; }
.board-write-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; }
@media (max-width: 1120px) {
  .board-detail-rail-grid { grid-template-columns: 1fr; }
  .board-write-head, .board-write-grid { grid-template-columns: 1fr; display: grid; }
  .board-write-stats { min-width: 0; }
}
@media (max-width: 980px) {
  .board-layout { grid-template-columns: 1fr; }
  .board-sidebar { position: static; height: auto; }
  .board-write-stats { grid-template-columns: 1fr; }
  .board-detail-card, .board-write-card { padding: 20px; }
  .board-comment-card.depth-1 { margin-left: 0; }
  .board-inline-comment.is-reply { margin-left: 0; }
  .board-inline-compose { grid-template-columns: 1fr; }
}
.board-category-badge { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; background: #f3f4f6; color: #374151; font-size: 12px; font-weight: 700; }
.board-card-title { margin: 0 0 10px; font-size: 20px; }
.board-media img { max-height: 280px; object-fit: cover; }
.board-poll-summary, .board-prediction-hint { margin-top: 14px; padding: 14px 16px; border-radius: 16px; display: grid; gap: 6px; }
.board-poll-summary { border: 1px solid #bfdbfe; background: #eff6ff; }
.board-prediction-hint { border: 1px solid #a7f3d0; background: #ecfdf5; }
.board-empty-state { display: grid; gap: 10px; }
.board-empty-state .ref-btn { width: fit-content; }

.composer-input {
  min-height: 72px;
}
.composer-icon-btn {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
}
.composer-icon-btn span {
  white-space: nowrap;
}
.composer-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.composer-chip {
  border: 1px solid var(--border);
  background: #fff;
  color: #334155;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
}
.composer-chip.is-tagged {
  border-color: #10b981;
  background: #ecfdf5;
}
.board-tag-panel.hidden {
  display: none;
}
.board-tag-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.board-tag-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  text-align: left;
}
.board-tag-item small {
  color: var(--muted);
}
.board-empty-state {
  min-height: 120px;
  align-content: center;
}
.board-empty-state .ref-btn {
  display: none;
}
.board-write-grid-single {
  grid-template-columns: minmax(0, 1fr);
}
.board-write-layout .board-sidebar {
  height: fit-content;
}
@media (max-width: 980px) {
  .composer-actions {
    align-items: flex-start;
    flex-direction: column;
  }
  .composer-post-btn {
    width: 100%;
  }
}

.page-community-shell .ref-page-main {
  min-height: calc(100vh - 88px);
}
.page-community-shell .board-layout,
.page-community-shell .profile-layout {
  min-height: calc(100vh - 168px);
  align-items: start;
}
.page-community-shell .board-main,
.page-community-shell .profile-main {
  min-height: calc(100vh - 168px);
  overflow-y: auto;
  padding-right: 4px;
}
.board-feed-block {
  display: grid;
  gap: 0;
}
.board-hot-tabs {
  padding: 0 0 12px;
}
.board-feed {
  gap: 14px;
}
.board-empty-state {
  min-height: 88px;
  padding: 18px 20px;
}
.compose-modal.hidden {
  display: none;
}
.compose-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
}
.compose-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}
.compose-modal-dialog {
  position: relative;
  width: min(720px, calc(100vw - 32px));
  margin: 48px auto;
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.3);
}
.compose-modal-head,
.compose-modal-foot {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}
.compose-modal-foot {
  border-top: 1px solid var(--border);
  border-bottom: 0;
}
.compose-modal-body {
  display: grid;
  gap: 14px;
  padding: 22px;
}
.compose-modal-close {
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  color: #64748b;
}
.compose-modal-label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}
.compose-modal-body select,
.compose-modal-textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 14px;
  background: #fff;
}
.compose-modal-textarea {
  min-height: 200px;
  resize: none;
}
.compose-modal-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.board-write-layout .board-sidebar {
  position: sticky;
}
@media (max-width: 980px) {
  .page-community-shell .board-main,
  .page-community-shell .profile-main {
    min-height: auto;
    overflow: visible;
  }
  .profile-tabs.me-content-tabs {
    overflow-x: auto;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(132px, 1fr);
  }
}

.board-feed-shell {
  margin-bottom: 0;
}
.board-feed-block {
  gap: 8px;
  margin-top: -6px;
}
.board-feed-header {
  display: flex;
  align-items: center;
  padding: 0 4px 2px;
}
.board-hot-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
}
.board-feed {
  margin-top: 0;
  gap: 12px;
}
#boardFeed {
  margin-top: 0;
}
.board-empty-state {
  min-height: 72px;
  padding: 14px 18px;
}
.composer {
  padding-bottom: 10px;
  border-bottom: 0;
}
.composer-main {
  display: grid;
  gap: 10px;
}
.composer-actions {
  padding-top: 0;
}
.composer-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  line-height: 1;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
}
.composer-icon-btn svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}
.composer-icon-btn span {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  white-space: nowrap;
}
.compose-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
}
.compose-modal-head h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}
.compose-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  color: #64748b;
  transition: background 0.18s ease, color 0.18s ease;
}
.compose-modal-close:hover,
.compose-modal-close:focus-visible {
  background: #f3f4f6;
  color: #111827;
}
.compose-modal-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.compose-modal-foot {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 18px 22px 22px;
}
.compose-modal-foot .composer-post-btn {
  width: min(82%, 420px);
  max-width: 420px;
  min-width: 260px;
  height: 52px;
  margin: 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}
@media (max-width: 980px) {
  .board-feed-block {
    margin-top: 0;
  }
  .board-feed-header {
    padding: 0;
  }
  .board-hot-tabs {
    width: 100%;
    padding: 10px;
    gap: 8px;
  }
  .compose-modal-head {
    padding: 16px 18px;
  }
  .compose-modal-foot .composer-post-btn {
    width: 100%;
    min-width: 0;
  }
}

.board-main {
  gap: 8px;
}

.composer {
  padding-bottom: 0;
}
.composer-main {
  gap: 0;
}
.composer-input {
  min-height: 154px;
  padding: 4px 0 18px;
}
.composer-actions {
  min-height: 56px;
  padding-top: 12px;
}
.board-feed-block {
  gap: 0;
  margin-top: 0;
}
.board-feed-header {
  display: block;
  width: 100%;
  padding: 0;
}
.board-hot-tabs {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  justify-content: flex-start;
}
.board-feed {
  padding-top: 0;
}
#boardFeed {
  padding-top: 0;
}
@media (max-width: 980px) {
  .composer-input {
    min-height: 132px;
  }
}

.board-main {
  gap: 10px;
}
.composer-input {
  min-height: 136px;
  padding: 4px 0 12px;
}
.composer-actions {
  padding-top: 8px;
}
.board-feed-block {
  gap: 10px;
}
@media (max-width: 980px) {
  .composer-input {
    min-height: 120px;
  }
}
