﻿/* 话题详情页 */
#bdTopicDetail {
  width: 100%;
  min-height: calc(100vh - var(--bd-topbar-h, 56px));
}

html.bd-view-topic-detail .bd-main,
.bd-main:has(> #bdTopicDetail:not([hidden])) {
  padding: 0 16px 24px;
  overflow: auto;
  max-height: calc(100vh - var(--bd-topbar-h, 56px));
  scrollbar-gutter: stable;
}

.tdt-root {
  width: 100%;
  max-width: none;
  font-size: 12px;
  color: #334155;
}

.tdt-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.tdt-layout > .tdt-side {
  position: sticky;
  top: 12px;
  align-self: start;
  width: 280px;
  max-width: 280px;
  max-height: calc(100vh - var(--bd-topbar-h, 56px) - 12px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
  padding-top: 12px;
}

@media (max-width: 960px) {
  .tdt-layout {
    grid-template-columns: 1fr;
  }
  .tdt-layout > .tdt-side {
    position: static;
    max-height: none;
    width: 100%;
    max-width: 100%;
  }
}

.tdt-side {
  background: #fff;
  border: 1px solid #e8ecf3;
  border-radius: 8px;
  padding: 16px 14px;
}

.tdt-profile-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 4px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
}

.tdt-logo-wrap {
  flex-shrink: 0;
}

.tdt-profile-body {
  flex: 1;
  min-width: 0;
  padding-top: 2px;
}

.tdt-logo {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  display: block;
}

.tdt-logo-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
}

.tdt-name {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
  word-break: break-word;
}

.tdt-verify-row {
  margin-bottom: 8px;
}

.tdt-verify-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #64748b;
  line-height: 1.4;
}

.tdt-verify-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid #93c5fd;
  color: #2563eb;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}

.tdt-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tdt-tag {
  padding: 3px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3c66ff;
  font-size: 11px;
  line-height: 1.4;
}

.tdt-summary-title {
  margin: 10px 0;
  padding: 12px 4px;
  border-top: 1px solid #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.tdt-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 6px;
}

.tdt-summary-item {
  background: #f8fafc;
  border-radius: 8px;
  padding: 8px;
  text-align: center;
}

.tdt-summary-val {
  font-size: 15px;
  font-weight: 700;
  color: #3c66ff;
  line-height: 1.25;
  word-break: break-word;
}

.tdt-summary-lbl {
  font-size: 10px;
  color: #94a3b8;
  margin-top: 4px;
  line-height: 1.35;
}

.tdt-main {
  min-width: 0;
  min-height: calc(100vh - var(--bd-topbar-h, 56px) - 24px);
}

.tdt-tabs {
  display: flex;
  gap: 2em;
  margin: 0 0 10px;
  flex-wrap: wrap;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bd-bg, #f4f6fb);
  padding: 12px 0 10px;
  border-bottom: 1px solid #e8ecf3;
  box-shadow: 0 6px 10px -8px rgba(15, 23, 42, 0.18);
}

.tdt-tab {
  height: 36px;
  padding: 0 16px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  color: #475569;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.tdt-tab.is-active {
  border-color: #c7d2fe;
  background: #eef2ff;
  color: #3c66ff;
  font-weight: 600;
}

.tdt-tab.is-locked {
  opacity: 0.55;
  color: #94a3b8;
  background: #f8fafc;
  border-style: dashed;
}

.tdt-tab.is-locked:not(.is-active):hover {
  opacity: 0.75;
}

.tdt-tab-error {
  margin: 0 0 12px;
}

.tdt-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  padding: 10px 4px;
}

.tdt-toolbar-portrait {
  justify-content: space-between;
}

.tdt-toolbar-left,
.tdt-toolbar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.tdt-toolbar-right {
  margin-left: auto;
}

.tdt-chip {
  height: 28px;
  padding: 0 10px;
  border: 1px solid #e8ecf3;
  border-radius: 6px;
  background: #fff;
  color: #475569;
  font-size: 12px;
  cursor: pointer;
}

.tdt-chip.is-active {
  border-color: #c7d2fe;
  background: #eef2ff;
  color: #3c66ff;
  font-weight: 600;
}

.tdt-panel {
  display: none;
  background: #fff;
  border: 1px solid #e8ecf3;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 12px;
  min-height: calc(100vh - var(--bd-topbar-h, 56px) - 120px);
}

.tdt-panel.is-active {
  display: block;
}

.tdt-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

@media (max-width: 768px) {
  .tdt-kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.tdt-kpi {
  padding: 10px;
  border-radius: 6px;
  background: #f8fafc;
}

.tdt-kpi-val {
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
}

.tdt-kpi-lbl {
  font-size: 10px;
  color: #94a3b8;
  margin-top: 2px;
}

.tdt-card {
  padding: 12px 0;
  margin-bottom: 0;
  border-bottom: 1px solid #f1f5f9;
}

.tdt-card:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.tdt-card:first-child {
  padding-top: 0;
}

.tdt-card-title {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 10px;
  padding-left: 8px;
  border-left: 3px solid #3c66ff;
}

.tdt-chart {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.tdt-chart svg {
  width: 100%;
  height: 100%;
}

.tdt-portrait-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 768px) {
  .tdt-portrait-row {
    grid-template-columns: 1fr;
  }
}

.tdt-donut-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}

.tdt-donut {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tdt-legend {
  flex: 1;
  font-size: 12px;
}

.tdt-legend-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.tdt-table-wrap {
  overflow-x: auto;
}

.tdt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.tdt-table th,
.tdt-table td {
  padding: 10px;
  border-bottom: 1px solid #f1f5f9;
  text-align: left;
  vertical-align: middle;
}

.tdt-table th {
  background: #f8fafc;
  color: #64748b;
  font-weight: 500;
  white-space: nowrap;
}

.tdt-note-cell {
  display: flex;
  gap: 10px;
  min-width: 240px;
}

.tdt-note-cover {
  width: 48px;
  height: 64px;
  border-radius: 6px;
  object-fit: cover;
  background: #f1f5f9;
  flex-shrink: 0;
}

.tdt-note-title {
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tdt-note-meta {
  font-size: 11px;
  color: #94a3b8;
}

.tdt-kol-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tdt-kol-avatar,
.tdt-kol-top-avatar {
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  background: #eef2ff;
}

.tdt-kol-avatar {
  width: 32px;
  height: 32px;
}

.tdt-kol-top-avatar {
  width: 44px;
  height: 44px;
  margin: 0 auto 6px;
  display: block;
}

.tdt-kol-avatar-ph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #3c66ff;
  font-size: 12px;
  font-weight: 600;
}

.tdt-kol-top-card .tdt-kol-avatar-ph {
  font-size: 16px;
}

.tdt-num-highlight {
  color: #3c66ff;
  font-weight: 600;
}

.tdt-matrix {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.tdt-matrix-item {
  text-align: center;
  padding: 10px 6px;
  background: #eef2ff;
  border-radius: 8px;
}

.tdt-matrix-val {
  font-size: 16px;
  font-weight: 700;
  color: #3c66ff;
}

.tdt-matrix-lbl {
  font-size: 10px;
  color: #64748b;
  margin-top: 4px;
}

.tdt-status {
  padding: 48px 16px;
  text-align: center;
  color: #64748b;
  background: #fff;
  border: 1px solid #e8ecf3;
  border-radius: 8px;
}

.tdt-status-error {
  color: var(--bd-down, #f53f3f);
}

.tdt-link {
  color: #3c66ff;
  text-decoration: none;
}

.tdt-link:hover {
  text-decoration: underline;
}

.tdt-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 12px;
}

.tdt-page-btn {
  height: 32px;
  padding: 0 12px;
  border: 1px solid #e8ecf3;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.tdt-page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.tdt-hint {
  font-size: 11px;
  color: #94a3b8;
  margin-left: auto;
}

.tdt-portrait-meta {
  margin: 0 0 10px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
}

.tdt-portrait-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.tdt-portrait-summary span {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  color: #475569;
  font-size: 11px;
}

.tdt-portrait-active {
  margin: 0 0 12px;
  font-size: 12px;
  color: #64748b;
}

.tdt-portrait-active strong {
  color: #3c66ff;
  font-size: 16px;
  margin-left: 4px;
}

.tdt-comment-kpi-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

@media (max-width: 960px) {
  .tdt-comment-kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.tdt-comment-kpi {
  padding: 12px 10px;
  border-radius: 8px;
  background: #f8fafc;
  text-align: center;
}

.tdt-comment-kpi-val {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
}

.tdt-comment-kpi-sub {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

.tdt-comment-kpi-lbl {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 4px;
}

.tdt-chart-tall {
  height: 240px;
}

.tdt-comment-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 11px;
  color: #64748b;
}

.tdt-comment-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tdt-comment-legend-item i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.tdt-comment-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 960px) {
  .tdt-comment-split {
    grid-template-columns: 1fr;
  }
}

.tdt-hot-toggle {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-bottom: 8px;
}

.tdt-cmt-list-card .tdt-card-title {
  margin-bottom: 0;
}

.tdt-cmt-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.tdt-cmt-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tdt-cmt-input {
  height: 32px;
  min-width: 180px;
  border: 1px solid #e8ecf3;
  border-radius: 6px;
  padding: 0 10px;
  font-size: 12px;
}

.tdt-cmt-filter {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 12px;
  color: #64748b;
}

.tdt-cmt-sent-tabs,
.tdt-sent-tab {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tdt-sent-tab {
  height: 28px;
  padding: 0 10px;
  border: 1px solid #e8ecf3;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 12px;
  cursor: pointer;
}

.tdt-sent-tab.is-active {
  border-color: #c7d2fe;
  background: #eef2ff;
  color: #3c66ff;
  font-weight: 600;
}

.tdt-cmt-table-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 12px;
  padding: 8px 10px;
  background: #f8fafc;
  border-radius: 6px;
  font-size: 11px;
  color: #64748b;
  margin-bottom: 8px;
}

.tdt-cmt-scroll {
  max-height: 420px;
  overflow-y: auto;
  border: 1px solid #f1f5f9;
  border-radius: 8px;
}

.tdt-cmt-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 12px;
  padding: 12px 10px;
  border-bottom: 1px solid #f1f5f9;
}

.tdt-cmt-row:last-child {
  border-bottom: none;
}

.tdt-cmt-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.tdt-cmt-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.tdt-cmt-avatar-ph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  color: #64748b;
  font-size: 12px;
}

.tdt-cmt-user {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}

.tdt-cmt-time {
  font-size: 10px;
  color: #94a3b8;
}

.tdt-cmt-body {
  font-size: 12px;
  line-height: 1.55;
  color: #475569;
}

.tdt-cmt-note {
  display: flex;
  align-items: flex-start;
  font-size: 12px;
}

.tdt-cmt-note-link {
  border: none;
  background: none;
  padding: 0;
  color: #3c66ff;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  font: inherit;
}

.tdt-cmt-note-link:hover {
  text-decoration: underline;
}

.tdt-cmt-note-empty {
  color: #94a3b8;
}

.tdt-cmt-scroll-foot {
  padding: 10px;
  text-align: center;
  font-size: 11px;
  color: #94a3b8;
}

.tdt-kpi-delta {
  font-size: 10px;
  margin-top: 2px;
}

.tdt-kpi-delta.is-up { color: #3c66ff; }
.tdt-kpi-delta.is-down { color: #16a34a; }
.tdt-kpi-delta.is-flat { color: #94a3b8; }

.tdt-note-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x mandatory;
}

.tdt-note-strip-card {
  flex: 0 0 168px;
  scroll-snap-align: start;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
}

.tdt-note-strip-card:hover { border-color: #93c5fd; }

.tdt-note-strip-cover {
  width: 100%;
  height: 96px;
  object-fit: cover;
  background: #f1f5f9;
  display: block;
}

.tdt-note-strip-body { padding: 8px; }

.tdt-note-strip-title {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 30px;
}

.tdt-note-strip-meta {
  margin-top: 4px;
  font-size: 10px;
  color: #64748b;
}

.tdt-split-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 900px) {
  .tdt-split-row { grid-template-columns: 1fr; }
}

.tdt-funnel {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 420px;
}

.tdt-funnel-step {
  margin: 0 auto;
  padding: 10px 16px;
  border-radius: 6px;
  color: #fff;
  text-align: center;
}

.tdt-funnel-step:nth-child(1) { background: #3c66ff; width: 100%; }
.tdt-funnel-step:nth-child(2) { background: #3c66ff; width: 88%; }
.tdt-funnel-step:nth-child(3) { background: #0891b2; width: 76%; }

.tdt-funnel-lbl { font-size: 11px; opacity: 0.9; }
.tdt-funnel-val { font-size: 15px; font-weight: 700; }

.tdt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tdt-action-btn {
  flex: 1;
  min-width: 72px;
  padding: 6px 8px;
  font-size: 11px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  color: #94a3b8;
  cursor: not-allowed;
}

.tdt-action-btn:not(:disabled) {
  color: #b45309;
  border-color: #fbbf24;
  background: #fffbeb;
  cursor: pointer;
}

.tdt-action-btn:not(:disabled):hover {
  background: #fef3c7;
  border-color: #f59e0b;
}

.tdt-action-btn.is-compared:not(:disabled) {
  color: #3c66ff;
  border-color: #c7d2fe;
  background: #eef2ff;
}

.tdt-action-btn.is-compared:not(:disabled):hover {
  background: #ede9fe;
  border-color: #3c66ff;
}

.tdt-sparkline {
  margin-top: 8px;
  height: 48px;
}

.tdt-sparkline svg {
  width: 100%;
  height: 100%;
}

.tdt-head-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.tdt-head-actions .tdt-action-btn {
  flex: none;
  cursor: not-allowed;
}

.tdt-search-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.tdt-search-row input {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 12px;
}

.tdt-brand-card-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tdt-brand-card {
  flex: 0 0 140px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.tdt-brand-card-name {
  font-weight: 600;
  font-size: 12px;
  margin-bottom: 6px;
}

.tdt-brand-card-meta {
  font-size: 10px;
  color: #64748b;
  line-height: 1.5;
}

.tdt-kol-top-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.tdt-kol-top-card {
  flex: 0 0 120px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  text-align: center;
}

.tdt-kol-top-name {
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tdt-kol-top-fans {
  font-size: 10px;
  color: #64748b;
  margin-top: 4px;
}

.tdt-hint {
  margin-left: auto;
  font-size: 11px;
  color: #94a3b8;
}

