:root {
  --tbn-purple: #6d28d9;
  --tbn-purple-deep: #4c1d95;
  --tbn-pink: #db2777;
  --tbn-bg: #ffffff;
  --tbn-card: #ffffff;
  --tbn-text: #1f2937;
  --tbn-muted: #6b7280;
  --tbn-border: #e8e2f4;
  --tbn-shadow: 0 12px 40px rgba(76, 29, 149, 0.1);
  /* 主站固定头部高度 + 与内容间距 */
  --tbn-header-offset: 120px;
}

body.tbn-news-page {
  margin: 0;
  background: var(--tbn-bg);
  color: var(--tbn-text);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}

.tbn-news-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: var(--tbn-header-offset) 20px 64px;
}

.tbn-news-hero {
  margin: 12px 0 28px;
}

.tbn-news-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.2;
  color: var(--tbn-purple-deep);
}

.tbn-news-hero p {
  margin: 0;
  color: var(--tbn-muted);
  font-size: 15px;
}

.tbn-news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.tbn-news-card {
  background: var(--tbn-card);
  border: 1px solid var(--tbn-border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--tbn-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  color: inherit;
  text-decoration: none;
}

.tbn-news-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 48px rgba(76, 29, 149, 0.14);
}

.tbn-news-card__cover {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #ede9fe, #fce7f3);
  overflow: hidden;
}

.tbn-news-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tbn-news-card__body {
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.tbn-news-card__meta {
  font-size: 12px;
  color: var(--tbn-muted);
}

.tbn-news-card__title {
  margin: 0;
  font-size: 18px;
  line-height: 1.4;
  color: var(--tbn-purple-deep);
}

.tbn-news-card__summary {
  margin: 0;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.6;
  flex: 1;
}

.tbn-news-card__cta {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--tbn-purple);
}

.tbn-news-empty,
.tbn-news-loading,
.tbn-news-error {
  text-align: center;
  padding: 56px 20px;
  color: var(--tbn-muted);
  background: #fafafa;
  border: 1px dashed var(--tbn-border);
  border-radius: 16px;
}

.tbn-news-pager {
  margin-top: 28px;
  display: flex;
  justify-content: center;
  gap: 12px;
}

.tbn-news-pager button {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  background: linear-gradient(90deg, var(--tbn-purple), var(--tbn-pink));
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.tbn-news-pager button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.tbn-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 36px;
  align-items: start;
}

.tbn-article {
  min-width: 0;
  background: #fff;
  border: 1px solid var(--tbn-border);
  border-radius: 22px;
  box-shadow: var(--tbn-shadow);
  overflow: hidden;
}

.tbn-article__body {
  padding: 36px 40px 48px;
}

.tbn-article__title {
  margin: 0 0 16px;
  font-size: clamp(26px, 3.6vw, 34px);
  line-height: 1.35;
  color: var(--tbn-purple-deep);
  text-align: center;
  font-weight: 700;
}

.tbn-article__meta {
  color: var(--tbn-muted);
  font-size: 13px;
  margin: 0 0 28px;
  text-align: right;
}

.tbn-article-block {
  margin: 0 0 22px;
}

.tbn-article-block--text {
  font-size: 16px;
  line-height: 1.85;
  color: #374151;
  white-space: pre-wrap;
  word-break: break-word;
}

.tbn-text-emphasis {
  font-weight: 700;
  font-size: 1.22em;
  line-height: 1.55;
  color: #1f2937;
}

.tbn-article-block--image img {
  width: 100%;
  border-radius: 14px;
  display: block;
}

.tbn-article-block--image figcaption {
  margin-top: 8px;
  text-align: center;
  color: var(--tbn-muted);
  font-size: 13px;
}

.tbn-related {
  position: sticky;
  /* 必须大于固定头部高度，否则下滑时顶部会被挡 */
  top: calc(var(--tbn-header-offset) - 8px);
  z-index: 5;
  background: #fff;
  border: 1px solid var(--tbn-border);
  border-radius: 18px;
  box-shadow: var(--tbn-shadow);
  padding: 18px 16px 12px;
  max-height: calc(100vh - var(--tbn-header-offset));
  overflow-y: auto;
}

.tbn-related__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  padding: 0 4px;
}

.tbn-related__heading {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--tbn-purple-deep);
}

.tbn-related__refresh {
  border: 0;
  background: transparent;
  color: var(--tbn-purple);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 2px;
}

.tbn-related__refresh:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.tbn-related__refresh-icon {
  font-size: 15px;
  line-height: 1;
}

.tbn-related__list {
  display: flex;
  flex-direction: column;
}

.tbn-related__item {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 4px;
  text-decoration: none;
  color: inherit;
  border-top: 1px solid var(--tbn-border);
}

.tbn-related__item:first-child {
  border-top: 0;
}

.tbn-related__item:hover .tbn-related__title {
  color: var(--tbn-purple);
}

.tbn-related__thumb {
  width: 84px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(135deg, #ede9fe, #fce7f3);
  flex-shrink: 0;
}

.tbn-related__thumb img,
.tbn-related__thumb-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tbn-related__meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tbn-related__title {
  font-size: 14px;
  line-height: 1.45;
  color: #1f2937;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tbn-related__time {
  font-size: 12px;
  color: var(--tbn-muted);
}

.tbn-related__empty {
  padding: 18px 8px;
  color: var(--tbn-muted);
  font-size: 13px;
  text-align: center;
}

.tbn-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  color: var(--tbn-purple);
  font-weight: 600;
  text-decoration: none;
}

.tbn-news-footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 40px;
  color: var(--tbn-muted);
  font-size: 13px;
  text-align: center;
}

@media (max-width: 960px) {
  .tbn-detail-layout {
    grid-template-columns: 1fr;
  }

  .tbn-related {
    position: static;
  }
}

@media (max-width: 640px) {
  .tbn-article__body {
    padding: 24px 16px 32px;
  }
}
