/* ── Community Layout ───────────────────────────────────── */
.community-layout {
  display: grid;
  grid-template-columns: 240px 1fr 280px;
  gap: 24px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
  align-items: start;
}

/* ── Sidebar ────────────────────────────────────────────── */
.community-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 72px;
}

/* ── Search ─────────────────────────────────────────────── */
.community-search {
  display: flex;
  gap: 8px;
}

.community-search__input {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13px;
  outline: none;
}

.community-search__input:focus {
  border-color: var(--primary);
}

.community-search__input::placeholder {
  color: var(--text-muted);
}

.community-search__btn {
  padding: 8px 14px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  white-space: nowrap;
}

.community-search__btn:hover {
  opacity: 0.85;
}

/* ── Widget ─────────────────────────────────────────────── */
.widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.widget__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

.widget__title .fa-fire { color: #e84040; }
.widget__title .fa-bookmark { color: #f5a623; }
.pd-bookmark-btn .fa-bookmark { color: #f5a623; }

.widget__empty {
  font-size: 13px;
  color: var(--text-muted);
}

/* ── Hot list ───────────────────────────────────────────── */
.hot-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hot-list__item {
  font-size: 13px;
}

.hot-list__item--top .hot-list__link {
  color: var(--up);
  font-weight: 600;
}

.hot-list__link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  text-decoration: none;
}

.hot-list__link:hover {
  color: var(--primary);
  text-decoration: none;
}

.hot-list__rank {
  min-width: 18px;
  color: var(--text-muted);
  font-weight: 700;
}

.hot-list__title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hot-list__likes {
  color: var(--text-muted);
  font-size: 12px;
  white-space: nowrap;
}

/* ── Bookmark list ──────────────────────────────────────── */
.bookmark-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bookmark-list__link {
  font-size: 13px;
  color: var(--text);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bookmark-list__link:hover {
  color: var(--primary);
  text-decoration: none;
}

/* ── Community main ─────────────────────────────────────── */
.community-main__header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.community-main__title {
  font-size: 18px;
  font-weight: 700;
}

.sort-tabs {
  display: flex;
  gap: 4px;
  flex: 1;
}

.sort-tab {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}

.sort-tab:hover {
  color: var(--text);
  text-decoration: none;
}

.sort-tab--active {
  background: var(--surface2);
  color: var(--text);
  font-weight: 600;
}

.community-main__search-info {
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ── Post list ──────────────────────────────────────────── */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

/* ── Post card ──────────────────────────────────────────── */
.post-card {
  background: var(--surface);
  padding: 16px 20px;
  transition: background 0.15s;
}

.post-card:hover {
  background: var(--surface2);
}

.post-card__meta {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.post-card__title {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-card__title:hover {
  color: var(--primary);
  text-decoration: none;
}

.post-card__excerpt {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card__stats {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Empty state ────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 60px 0;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.empty-state__msg {
  font-size: 15px;
  color: var(--text-muted);
}

/* ── Pagination ─────────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  margin-top: 24px;
}

.pagination__btn,
.pagination__page {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--border);
}

.pagination__btn:hover,
.pagination__page:hover {
  color: var(--text);
  text-decoration: none;
}

.pagination__page--active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ── Chat placeholder ───────────────────────────────────── */
.community-chat {
  position: sticky;
  top: 72px;
}

/* ═══════════════════════════════════════════════════════════
   Post Form  (pf-*)
   ═══════════════════════════════════════════════════════════ */

.pf-page {
  max-width: 720px;
  margin: 36px auto;
  padding: 0 20px 60px;
}

.pf-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Header */
.pf-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.pf-back {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  text-decoration: none;
  flex-shrink: 0;
}
.pf-back:hover { color: var(--text); text-decoration: none; }

.pf-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

/* Field group */
.pf-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pf-group__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pf-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.pf-counter {
  font-size: 11px;
  color: var(--text-muted);
}
.pf-counter--warn { color: var(--danger); }

.pf-field-error {
  font-size: 11px;
  color: var(--danger);
}

.pf-error-box {
  background: rgba(240, 68, 82, 0.08);
  border: 1px solid rgba(240, 68, 82, 0.25);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--danger);
}

.pf-warn {
  font-size: 11px;
  color: var(--danger);
  margin-top: 4px;
}

/* Title input override */
#id_title {
  border-radius: 10px;
  border: 1.5px solid var(--border);
  font-size: 15px;
  font-weight: 600;
  padding: 12px 14px;
  transition: border-color 0.15s;
}
#id_title:focus { border-color: var(--primary); }

/* Toolbar + Content textarea */
.pf-toolbar {
  display: flex;
  gap: 2px;
  padding: 6px 10px;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-bottom: none;
  border-radius: 10px 10px 0 0;
}

.pf-toolbar__btn {
  width: 30px;
  height: 28px;
  border-radius: 5px;
  font-size: 13px;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.pf-toolbar__btn:hover { background: var(--border); color: var(--text); }

#id_content {
  border-radius: 0 0 10px 10px;
  border: 1.5px solid var(--border);
  border-top: none;
  font-size: 14px;
  line-height: 1.7;
  min-height: 240px;
  padding: 14px;
  resize: vertical;
  transition: border-color 0.15s;
}
#id_content:focus { border-color: var(--primary); outline: none; }

/* Options strip */
.pf-options {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 13px 16px;
  background: var(--surface2);
  border-radius: 10px;
  font-size: 12px;
}

.pf-opt-check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text);
  font-weight: 500;
  user-select: none;
}
.pf-opt-check input[type="checkbox"] {
  accent-color: var(--primary);
  width: 15px;
  height: 15px;
}

/* Action buttons */
.pf-actions {
  display: flex;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.pf-btn {
  padding: 11px 22px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: opacity 0.12s, background 0.12s;
  border: 1px solid transparent;
}
.pf-btn--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-muted);
}
.pf-btn--ghost:hover { color: var(--text); text-decoration: none; }
.pf-btn--primary {
  background: var(--primary);
  color: #fff;
  margin-left: auto;
}
.pf-btn--primary:hover { opacity: 0.88; }

/* ═══════════════════════════════════════════════════════════
   Trade Attachment  (ta-*)
   ═══════════════════════════════════════════════════════════ */

.ta-section {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.15s;
}
.ta-section--on { border-color: var(--primary); }

/* Toggle header */
.ta-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  cursor: pointer;
  user-select: none;
  background: var(--surface2);
  transition: background 0.15s;
}
.ta-section--on .ta-toggle { background: rgba(27, 100, 218, 0.12); }

.ta-toggle__cb { display: none; }

.ta-toggle__body {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}
.ta-toggle__body::before {
  content: '';
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 2px solid var(--text-muted);
  flex-shrink: 0;
  transition: background 0.12s, border-color 0.12s;
  background-size: 10px;
  background-position: center;
  background-repeat: no-repeat;
}
.ta-section--on .ta-toggle__body::before {
  background-color: var(--primary);
  border-color: var(--primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 8'%3E%3Cpath d='M1 4l3 3 5-6' stroke='white' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.ta-toggle__icon { font-size: 16px; }

.ta-toggle__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  transition: color 0.15s;
}
.ta-section--on .ta-toggle__title { color: var(--primary); }

.ta-toggle__desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Expandable body */
.ta-body {
  padding: 16px 18px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.ta-list-header {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}
.ta-list-label { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.ta-list-count  { margin-left: auto; font-size: 11px; color: var(--text-muted); }

/* Trade rows */
.ta-list {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  max-height: 280px;
  overflow-y: auto;
}

.ta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--surface2);
  transition: background 0.1s;
}
.ta-row:last-child { border-bottom: none; }
.ta-row:hover { background: var(--surface2); }
.ta-row--selected { background: rgba(27, 100, 218, 0.1); }

/* Custom radio dot */
.ta-radio {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
  flex-shrink: 0;
  transition: border-color 0.12s, border-width 0.12s;
}
.ta-radio--on {
  border: 5px solid var(--primary);
}

/* Checkbox-style multi-select indicator */
.ta-check {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 2px solid var(--text-muted);
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.ta-check--on {
  background: var(--primary);
  border-color: var(--primary);
}
.ta-check--on::after {
  content: '\2713';
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

/* Coin icon */
.ta-coin-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--surface2);
}
.ta-coin-icon--buy  { background: var(--up); }
.ta-coin-icon--sell { background: var(--primary); }

.ta-coin-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
.ta-coin-fallback {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

/* Row info */
.ta-info { flex: 1; min-width: 0; }
.ta-info__top {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}
.ta-coin-name { font-size: 13px; font-weight: 700; color: var(--text); }
.ta-info__sub { font-size: 11px; color: var(--text-muted); }

/* Badge */
.ta-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
}
.ta-badge--buy  { background: rgba(240, 68, 82, 0.15); color: var(--up); }
.ta-badge--sell { background: rgba(27, 100, 218, 0.15); color: #5B9BD5; }

/* Row price */
.ta-price { text-align: right; min-width: 110px; }
.ta-price__main  { font-size: 13px; font-weight: 700; color: var(--text); }
.ta-price__label { font-size: 10px; color: var(--text-muted); }
.ta-price__sub   { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

/* Hint + empty */
.ta-hint {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  padding: 10px 0 2px;
}
.ta-empty {
  font-size: 13px;
  color: var(--danger);
  padding: 4px 0;
}

/* Preview card */
.ta-preview { margin-top: 14px; }
.ta-preview__label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.ta-preview__card {
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface2);
}

.ta-prev-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.ta-prev-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--surface2);
}
.ta-prev-icon--buy  { background: var(--up); }
.ta-prev-icon--sell { background: var(--primary); }

.ta-prev-meta { flex: 1; }
.ta-prev-meta__top {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}
.ta-prev-name { font-size: 14px; font-weight: 700; color: var(--text); }
.ta-prev-meta__date { font-size: 11px; color: var(--text-muted); }

.ta-prev-divider {
  height: 1px;
  background: var(--border);
  margin-bottom: 10px;
}

/* Stats grid */
.ta-grid {
  display: grid;
  gap: 10px;
}
.ta-grid--3 { grid-template-columns: repeat(3, 1fr); }
.ta-grid--4 { grid-template-columns: repeat(4, 1fr); }

.ta-grid__label {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 3px;
}
.ta-grid__val { font-size: 12px; font-weight: 700; color: var(--text); }
.ta-grid__val--buy { color: var(--up); }

/* ═══════════════════════════════════════════════════════════
   Delete confirm  (dc-*)
   ═══════════════════════════════════════════════════════════ */

.dc-page {
  max-width: 480px;
  margin: 60px auto;
  padding: 0 20px;
}

.dc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dc-title { font-size: 18px; font-weight: 700; color: var(--text); }

.dc-box {
  background: rgba(240, 68, 82, 0.06);
  border: 1px solid rgba(240, 68, 82, 0.22);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
}
.dc-box__msg    { font-size: 14px; color: var(--text-muted); margin-bottom: 8px; }
.dc-box__target { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.dc-box__warn   { font-size: 12px; color: var(--danger); }

.dc-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* ═══════════════════════════════════════════════════════════
   Post Detail  (pd-*)
   ═══════════════════════════════════════════════════════════ */

.pd-page {
  max-width: 800px;
  margin: 32px auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.pd-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
}

.pd-header { margin-bottom: 20px; }

.pd-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 16px;
}
.pd-back:hover { color: var(--text); }

.pd-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 12px;
}

.pd-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.pd-meta__author { font-weight: 600; color: var(--text); }

/* 우측 상단 버튼 영역 (북마크 + 수정/삭제) */
.pd-meta__right {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

/* 북마크 버튼 */
.pd-bookmark-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}

.pd-bookmark-btn:hover {
  border-color: var(--primary);
  background: var(--primary-light, #EBF1FD);
}

.pd-bookmark-btn--active {
  border-color: var(--primary);
  background: var(--primary-light, #EBF1FD);
}

.pd-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.pd-divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

.pd-content {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.pd-trade {
  margin-top: 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.pd-trade__label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 10px 16px 8px;
  border-bottom: 1px solid var(--border);
}

.pd-stats {
  display: flex;
  gap: 16px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
}

/* ── Comments ── */
.pd-comments { display: flex; flex-direction: column; gap: 12px; }

.pd-comments__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.pd-comment {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}

.pd-comment__meta {
  display: flex;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.pd-comment__author { font-weight: 600; color: var(--text); }

.pd-comment__body {
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
}

.pd-reply {
  margin-top: 8px;
  padding-left: 16px;
  border-left: 2px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ═══════════════════════════════════════════════════════════
   Post Detail Extended  (pd-*)
   ═══════════════════════════════════════════════════════════ */

.pd-meta__avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary-light, #EBF1FD);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

/* Reaction bar */
.pd-reaction {
  display: flex;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-top: 20px;
  align-items: center;
}

.pd-reaction__form { display: inline-flex; }

.pd-reaction__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 600;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}

.pd-reaction__btn--like.pd-reaction__btn--active {
  background: rgba(240, 68, 82, 0.08);
  border-color: var(--danger);
  color: var(--danger);
}

.pd-reaction__btn--static { cursor: default; }

.pd-reaction__btn--bookmark-active {
  background: var(--primary-light, #EBF1FD);
  border-color: var(--primary);
  color: var(--primary);
}

/* Comments card */
.pd-comments-card { padding: 28px 32px; }

.pd-comments-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.pd-comments__count {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
}

.pd-sort-tabs {
  display: flex;
  gap: 2px;
  background: var(--surface2);
  border-radius: 8px;
  padding: 3px;
  margin-left: auto;
}

.pd-sort-tab {
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  color: var(--text-muted);
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
}

.pd-sort-tab--active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

/* Comment input area */
.pd-comment-input-area {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.pd-comment-input-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.pd-comment-input-body { flex: 1; }

.pd-comment-textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  font-size: 13px;
  font-family: inherit;
  line-height: 1.5;
  color: var(--text);
  background: var(--surface);
  outline: none;
  resize: vertical;
  transition: border-color 0.15s;
}

.pd-comment-textarea:focus { border-color: var(--primary); }

.pd-comment-input-footer {
  display: flex;
  align-items: center;
  margin-top: 8px;
}

.pd-opt-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.pd-opt-check input[type="checkbox"] { accent-color: var(--primary); }

.pd-comment-submit,
.pd-reply-submit {
  margin-left: auto;
  padding: 8px 18px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: opacity 0.12s;
}

.pd-comment-submit:hover,
.pd-reply-submit:hover { opacity: 0.88; }

/* Comment item */
.pd-comments-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pd-comment {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}

.pd-comment--reply {
  background: var(--surface2);
  border: none;
  border-radius: 8px;
  padding: 10px 12px;
}

.pd-comment__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.pd-comment__avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface2);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.pd-comment__author { font-weight: 600; color: var(--text); }

.pd-comment__body {
  font-size: 14px;
  color: var(--text);
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 10px;
}

.pd-comment__actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.pd-comment__like-form { display: inline-flex; }

.pd-comment__like-btn,
.pd-comment__like-static {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.12s;
}

.pd-comment__like-btn:hover { color: var(--danger); border-color: var(--danger); }

.pd-comment__like-btn--active { color: var(--danger); border-color: var(--danger); }

.pd-comment__reply-btn {
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.12s;
}

.pd-comment__reply-btn:hover { color: var(--primary); border-color: var(--primary); }

.pd-comment__delete-form { margin-left: auto; }

.pd-comment__delete-btn {
  font-size: 11px;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.pd-comment__delete-btn:hover { color: var(--danger); }

/* Reply form */
.pd-reply-form {
  margin-top: 10px;
}

.pd-reply-form__footer {
  display: flex;
  align-items: center;
  margin-top: 6px;
}

/* Misc */
.pd-no-comments,
.pd-login-prompt,
.pd-comments-disabled {
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
  padding: 24px 0;
}

.pd-login-prompt a { color: var(--primary); }

/* Trade attachment section */
.pd-trade-section {
  margin-top: 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.pd-trade-section__label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 10px 16px 8px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}

.pd-trade-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Trade table  (tc-*) */
.tc-table {
  width: 100%;
}

.tc-table__head {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 12px;
  padding: 8px 14px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}

.tc-th {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: right;
}

.tc-th--coin { text-align: left; }
.tc-th--pct  { min-width: 68px; }

/* Trade row */
.tc-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}

.tc-row:last-child { border-bottom: none; }
.tc-row:hover { background: var(--surface2); }

.tc-row__coin {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tc-row__coin-info { min-width: 0; }

.tc-row__sub {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}

.tc-row__stat {
  text-align: right;
  min-width: 72px;
}

.tc-row__stat-label {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.tc-row__stat-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.tc-row__stat--pct { min-width: 68px; }

/* Profit/loss badge */
.tc-pct {
  font-size: 13px;
  font-weight: 700;
}

.tc-pct--up   { color: var(--up); }
.tc-pct--down { color: var(--danger); }

/* Coin icon */
.tc-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--surface2);
}

.tc-icon--buy  { background: var(--up); }
.tc-icon--sell { background: var(--primary); }

.tc-name { font-size: 13px; font-weight: 700; color: var(--text); }

.tc-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 3px;
}

.tc-badge--buy  { background: rgba(240, 68, 82, 0.15); color: var(--up); }
.tc-badge--sell { background: rgba(27, 100, 218, 0.15); color: #5B9BD5; }

.tc-date        { font-size: 10px; color: var(--text-muted); }
.tc-coin-symbol { font-size: 10px; color: var(--text-muted); font-weight: 500; }
