.hero-section--trend {
  margin-bottom: 0;
}

.hero-section--trend .container {
  position: relative;
  z-index: 1;
}

.tdi-hero-metrics,
.tds-summary-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin: -1.5rem 0 1.5rem;
  position: relative;
  z-index: 2;
}

.tdi-hero-metric,
.tds-summary-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1rem 1rem 0.95rem;
  backdrop-filter: blur(12px);
}

.tdi-hero-metric-label,
.tds-summary-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 0.45rem;
}

.tdi-hero-metric-value,
.tds-summary-value {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--color-dark);
}

.tds-summary-text,
.tds-summary-sub {
  margin: 0;
  color: var(--color-text-subtle);
  line-height: 1.65;
}

.tds-summary-text {
  font-size: 0.88rem;
}

.tds-summary-sub {
  font-size: 0.78rem;
  margin-top: 0.35rem;
}

.tds-summary-card--metric {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tdi-dialect-banner,
.tds-entry-card,
.tds-sidebar-widget,
.tds-chart-wrap,
.tds-news-item {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  box-shadow: none;
}

.tdi-dialect-banner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  flex-wrap: wrap;
}

.tdi-dialect-today {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-shrink: 0;
}

.tdi-dialect-emoji {
  font-size: 1.9rem;
  line-height: 1;
}

.tdi-dialect-today-text {
  display: flex;
  flex-direction: column;
}

.tdi-dialect-today-label,
.tds-sidebar-widget-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
}

.tdi-dialect-today-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--color-dark);
}

.tdi-dialect-week {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  flex: 1;
}

.tdi-dialect-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.12rem;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: var(--color-bg-light);
  min-width: 56px;
}

.tdi-dialect-day.is-today {
  border-color: var(--color-primary);
  background: var(--color-bg-blue-white);
}

.tdi-dialect-day-label {
  font-size: 0.64rem;
  font-weight: 700;
  color: var(--color-faint);
}

.tdi-dialect-day-emoji {
  font-size: 1rem;
  line-height: 1;
}

.tdi-dialect-day-name {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--color-text-subtle);
  white-space: nowrap;
}

.tdi-ai-note,
.tds-ai-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  border: 1px solid #fde68a;
  background: #fff8db;
  color: #8a5a00;
  border-radius: 8px;
  line-height: 1.55;
}

.tdi-ai-note {
  margin-top: 1rem;
  padding: 0.7rem 0.9rem;
  font-size: 0.78rem;
}

.tdi-ai-note svg,
.tds-ai-disclaimer i {
  color: var(--color-amber-600);
  flex-shrink: 0;
}

.tdi-ai-note strong {
  color: var(--color-amber-900);
}

.tdi-nav-wrap {
  margin: 1.5rem 0 0.75rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tdi-nav {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  padding-bottom: 0.25rem;
}

.tdi-nav-btn,
.tdi-page-btn,
.tds-back-btn,
.tds-gnews-btn,
.tds-gtrend-btn,
.tds-share-btn,
.tds-lang-toggle {
  border-radius: 8px;
}

.tdi-nav-btn,
.tdi-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.6rem;
  height: 2.6rem;
  padding: 0 0.7rem;
  border: 1px solid var(--color-border);
  background: var(--color-white);
  color: var(--color-text-medium);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.15s;
  white-space: nowrap;
}

.tdi-nav-btn:hover,
.tdi-page-btn:hover,
.td-keyword-card:hover,
.tds-news-item:hover {
  border-color: var(--color-border-medium);
  transform: translateY(-1px);
  text-decoration: none;
}

.tdi-nav-btn.active,
.tdi-page-btn--active {
  background: var(--color-dark);
  border-color: var(--color-dark);
  color: var(--color-white) !important;
}

.tdi-current-row {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border);
}

.tdi-row-label {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--color-dark);
}

.tdi-row-count {
  font-size: 0.8rem;
  color: var(--color-muted);
  font-weight: 600;
}

.tdi-empty {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--color-muted);
}

.td-keyword-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.9rem;
  margin-bottom: 1.5rem;
}

.td-keyword-card {
  display: flex;
  flex-direction: column;
  min-height: 132px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.18s, transform 0.18s, background 0.18s;
}

.td-kw-header {
  flex: 1;
  display: flex;
  align-items: flex-start;
  margin-bottom: 0.7rem;
}

.td-kw-title {
  font-size: 0.98rem;
  font-weight: 750;
  color: var(--color-dark);
  line-height: 1.45;
  word-break: break-word;
  min-height: calc(1.45em * 2);
}

.td-kw-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  font-size: 0.75rem;
  color: var(--color-muted);
}

.tdi-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 1.5rem 0 2.5rem;
}

.tdi-page-btn--disabled {
  color: var(--color-border-medium);
  cursor: default;
  pointer-events: none;
}

.tdi-page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2.4rem;
  color: var(--color-faint);
  font-size: 0.88rem;
}

.tds-breadcrumb {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.58);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.tds-breadcrumb a {
  color: rgba(255, 255, 255, 0.58);
  text-decoration: none;
}

.tds-breadcrumb a:hover {
  color: var(--color-white);
  text-decoration: underline;
}

.tds-hero-title {
  font-size: 2.15rem;
  font-weight: 800;
  color: var(--color-white);
  margin-bottom: 0.75rem;
  line-height: 1.15;
}

.tds-hero-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.tds-badge-traffic,
.tds-badge-rank,
.tds-badge-date {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.24rem 0.7rem;
  border-radius: 999px;
}

.tds-badge-traffic {
  background: rgba(245, 158, 11, 0.2);
  color: #fde68a;
}

.tds-badge-rank {
  background: rgba(59, 130, 246, 0.2);
  color: #bfdbfe;
}

.tds-badge-date {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.76);
}

.tds-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 1.5rem;
  padding: 1.25rem 0 3rem;
}

.tds-entry-card {
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.tds-entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1.1rem;
  background: var(--color-bg-light);
  border-bottom: 1px solid var(--color-border);
  color: var(--color-dark);
}

.tds-entry-label,
.tds-entry-header-right,
.tds-dialect-badge,
.tds-groq-badge,
.tds-cl-item,
.tds-back-btn,
.tds-share-btn,
.tds-gtrend-btn,
.tds-gnews-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.tds-entry-label {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--color-dark);
}

.tds-entry-header-right {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tds-entry-updated {
  font-size: 0.72rem;
  color: var(--color-muted);
}

.tds-dialect-badge,
.tds-groq-badge {
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--color-white);
  color: var(--color-text-medium);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 0.22rem 0.6rem;
}

.tds-entry-keyword {
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--color-dark);
  padding: 1rem 1.1rem 0.35rem;
  line-height: 1.2;
  word-break: break-word;
}

.tds-ai-disclaimer {
  margin: 0 1.1rem 1rem;
  padding: 0.65rem 0.85rem;
  font-size: 0.76rem;
}

.tds-dl {
  padding: 0;
  margin: 0;
}

.tds-dl--hidden {
  display: none;
}

.tds-lang-toggle-wrap {
  display: flex;
  justify-content: flex-end;
  padding: 0 1.1rem 0.85rem;
}

.tds-lang-toggle {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-text-medium);
  background: var(--color-bg-light);
  border: 1px solid var(--color-border);
  padding: 0.38rem 0.82rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}

.tds-lang-toggle:hover {
  background: var(--color-white);
  border-color: var(--color-border-medium);
}

.tds-lang-toggle.is-original {
  color: var(--color-dark);
  background: #fff7ed;
  border-color: #fed7aa;
}

.tds-dl-row {
  padding: 1rem 1.1rem;
  border-top: 1px solid var(--color-border);
}

.tds-dl-row dt {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--color-muted);
  margin-bottom: 0.45rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tds-dl-row dd,
.tds-plain-text {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.82;
  color: var(--color-dark-2);
}

.tds-plain-text {
  padding: 0 1.1rem 1.2rem;
}

.tds-related-kw-link,
.tds-related-kw-text {
  display: inline-block;
  border-radius: 999px;
  padding: 0.24rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 700;
  margin: 0.15rem 0.24rem 0.15rem 0;
}

.tds-related-kw-link {
  background: var(--color-bg-light);
  color: var(--color-text-medium);
  text-decoration: none;
  border: 1px solid transparent;
}

.tds-related-kw-link:hover {
  border-color: var(--color-border-medium);
  text-decoration: none;
}

.tds-related-kw-text {
  background: #f8fafc;
  color: var(--color-muted);
  border: 1px solid var(--color-border);
}

.tds-generating {
  padding: 2.5rem 1.25rem;
  text-align: center;
  color: var(--color-muted);
}

.tds-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: trend-spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes trend-spin {
  to {
    transform: rotate(360deg);
  }
}

.tds-section {
  margin-bottom: 1.5rem;
}

.tds-section-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--color-dark);
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.tds-chart-note {
  font-size: 0.8rem;
  color: var(--color-muted);
  margin: -0.3rem 0 0.75rem;
}

.tds-chart-wrap {
  padding: 0.75rem 0.5rem 0.25rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tds-chart-wrap svg {
  min-width: 320px;
}

.tds-chart-legend {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 0.25rem 0;
  flex-wrap: wrap;
}

.tds-cl-item {
  font-size: 0.75rem;
  color: var(--color-muted);
  font-weight: 700;
}

.tds-cl-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--color-white);
  box-shadow: 0 0 0 1.5px currentColor;
}

.tds-cl-top3 {
  color: #dc2626;
}

.tds-cl-top10 {
  color: var(--color-primary);
}

.tds-cl-other {
  color: var(--color-blue-500);
}

.tds-news-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tds-news-item {
  gap: 0.95rem;
  padding: 0.85rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.18s, transform 0.18s;
}

.tds-news-thumb,
.tds-news-thumb--blank {
  width: 112px;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  flex-shrink: 0;
}

.tds-news-thumb {
  object-fit: cover;
}

.tds-news-thumb--blank {
  background: var(--color-border);
}

.tds-news-body {
  flex: 1;
  min-width: 0;
}

.tds-news-title {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.58;
  color: var(--color-dark);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tds-news-meta {
  font-size: 0.72rem;
  color: var(--color-muted);
  margin-top: 0.28rem;
}

.tds-sidebar-widget {
  padding: 1rem;
  margin-bottom: 1rem;
}

.tds-sidebar-widget-title {
  margin-bottom: 0.75rem;
}

.tds-share-btn,
.tds-gtrend-btn,
.tds-gnews-btn,
.tds-back-btn {
  width: 100%;
  justify-content: center;
  padding: 0.68rem 0.9rem;
  border: 1px solid var(--color-border);
  background: var(--color-white);
  color: var(--color-text-medium);
  font-size: 0.83rem;
  font-weight: 700;
  text-decoration: none;
  margin-bottom: 0.55rem;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.tds-share-btn--x {
  background: #111827;
  color: var(--color-white);
  border-color: #111827;
}

.tds-share-btn--line {
  background: #06c755;
  color: var(--color-white);
  border-color: #06c755;
}

.tds-gtrend-btn {
  background: var(--color-blue-500);
  color: var(--color-white);
  border-color: var(--color-blue-500);
}

.tds-share-btn:hover,
.tds-gtrend-btn:hover,
.tds-gnews-btn:hover,
.tds-back-btn:hover {
  border-color: var(--color-border-medium);
  transform: translateY(-1px);
  text-decoration: none;
  color: inherit;
}

.tds-share-btn--x:hover,
.tds-share-btn--line:hover,
.tds-gtrend-btn:hover {
  color: var(--color-white);
}

.tds-history-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.8rem;
}

.tds-history-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.42rem 0;
  border-bottom: 1px solid var(--color-border);
}

.tds-history-list li:last-child {
  border-bottom: none;
}

.tds-hist-date {
  flex: 1;
  color: var(--color-text-subtle);
}

.tds-hist-rank {
  font-weight: 800;
  color: #dc2626;
  font-size: 0.75rem;
}

.tds-hist-traffic {
  color: var(--color-muted);
  font-size: 0.72rem;
}

html.dark-mode .tdi-hero-metric,
html.dark-mode .tds-summary-card,
html.dark-mode .tdi-dialect-banner,
html.dark-mode .tds-entry-card,
html.dark-mode .tds-sidebar-widget,
html.dark-mode .tds-chart-wrap,
html.dark-mode .tds-news-item {
  background: #1e293b;
  border-color: #334155;
}

html.dark-mode .tdi-hero-metric-value,
html.dark-mode .tds-summary-value,
html.dark-mode .tdi-dialect-today-name,
html.dark-mode .tdi-row-label,
html.dark-mode .td-kw-title,
html.dark-mode .tds-entry-keyword,
html.dark-mode .tds-section-title,
html.dark-mode .tds-news-title,
html.dark-mode .tds-dl-row dd,
html.dark-mode .tds-plain-text {
  color: #e2e8f0;
}

html.dark-mode .tdi-hero-metric-label,
html.dark-mode .tds-summary-label,
html.dark-mode .tdi-dialect-today-label,
html.dark-mode .tds-sidebar-widget-title,
html.dark-mode .tdi-row-count,
html.dark-mode .td-kw-meta,
html.dark-mode .tds-chart-note,
html.dark-mode .tds-news-meta,
html.dark-mode .tds-entry-updated,
html.dark-mode .tds-hist-traffic,
html.dark-mode .tds-hist-date,
html.dark-mode .tds-dl-row dt {
  color: #94a3b8;
}

html.dark-mode .tdi-ai-note,
html.dark-mode .tds-ai-disclaimer {
  background: #33260f;
  border-color: #7c5b1f;
  color: #fcd34d;
}

html.dark-mode .tdi-nav-btn,
html.dark-mode .tdi-page-btn,
html.dark-mode .tds-lang-toggle,
html.dark-mode .tds-gnews-btn,
html.dark-mode .tds-back-btn {
  background: #0f172a;
  border-color: #334155;
  color: #cbd5e1;
}

html.dark-mode .tdi-nav-btn.active,
html.dark-mode .tdi-page-btn--active {
  background: #e2e8f0;
  border-color: #e2e8f0;
  color: #0f172a !important;
}

html.dark-mode .tds-entry-header,
html.dark-mode .tdi-dialect-day,
html.dark-mode .tds-dialect-badge,
html.dark-mode .tds-groq-badge,
html.dark-mode .tds-related-kw-link,
html.dark-mode .tds-share-btn,
html.dark-mode .tds-gnews-btn,
html.dark-mode .tds-back-btn {
  background: #0f172a;
  border-color: #334155;
  color: #cbd5e1;
}

html.dark-mode .tds-related-kw-text,
html.dark-mode .tds-news-thumb--blank {
  background: #0f172a;
  border-color: #334155;
  color: #94a3b8;
}

html.dark-mode .tds-dl-row,
html.dark-mode .tds-history-list li,
html.dark-mode .tdi-current-row {
  border-color: #334155;
}

@media (max-width: 991.98px) {
  .tdi-hero-metrics,
  .tds-summary-band {
    grid-template-columns: 1fr 1fr;
  }

  .tds-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

@media (max-width: 767.98px) {
  .tdi-hero-metrics,
  .tds-summary-band,
  .tds-layout,
  .td-keyword-grid {
    grid-template-columns: 1fr;
  }

  .tdi-hero-metrics,
  .tds-summary-band {
    margin-top: -1rem;
  }

  .tds-hero-title {
    font-size: 1.8rem;
  }

  .tds-entry-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .tds-entry-header-right {
    justify-content: flex-start;
  }

  .tds-news-item {
    align-items: flex-start;
  }

  .tds-news-thumb,
  .tds-news-thumb--blank {
    width: 96px;
  }
}
