:root {
  --seo-bg: #101a28;
  --seo-surface: rgba(24, 37, 53, 0.9);
  --seo-surface-strong: #182535;
  --seo-text: #f2efe6;
  --seo-muted: #b8c0c8;
  --seo-faint: #82909e;
  --seo-gold: #c7a96b;
  --seo-gold-light: #ead39c;
  --seo-red: #c75b54;
  --seo-line: rgba(199, 169, 107, 0.2);
}

/* 首页字序：用清晰的宋黑搭配替代旧手写体，强化标题、导语与正文层级。 */
body.portal header h1 {
  font-family: "Songti SC", "STSong", "SimSun", serif !important;
  font-weight: 600 !important;
  letter-spacing: .24em !important;
  text-shadow: 0 10px 30px rgba(0,0,0,.32) !important;
}
body.portal header .subtitle {
  font-family: "Microsoft YaHei UI", "PingFang SC", "Microsoft YaHei", sans-serif !important;
  font-size: .78rem !important;
  font-weight: 400 !important;
  letter-spacing: .1em !important;
  line-height: 1.9 !important;
}
body.portal .hero-tagline {
  font-family: "Songti SC", "STSong", "SimSun", serif !important;
  font-size: clamp(1.55rem, 3.2vw, 2.3rem) !important;
  font-weight: 600 !important;
  letter-spacing: .2em !important;
  line-height: 1.45 !important;
}
body.portal .hero-sub {
  max-width: 650px !important;
  margin-inline: auto !important;
  color: #b9c4ca !important;
  font-family: "Microsoft YaHei UI", "PingFang SC", "Microsoft YaHei", sans-serif !important;
  font-size: .9rem !important;
  font-weight: 400 !important;
  letter-spacing: .035em !important;
  line-height: 2 !important;
}
body.portal .seo-topic-entry__head,
body.portal .tradition-gallery__head { text-align: center; }
body.portal .seo-topic-entry__head p,
body.portal .tradition-gallery__head p { display: flex; align-items: center; justify-content: center; gap: 12px; font-weight: 500; letter-spacing: .22em; }
body.portal .seo-topic-entry__head p::before,
body.portal .seo-topic-entry__head p::after,
body.portal .tradition-gallery__head p::before,
body.portal .tradition-gallery__head p::after { width: 34px; height: 1px; background: linear-gradient(90deg, transparent, rgba(199,169,107,.7)); content: ""; }
body.portal .seo-topic-entry__head p::after,
body.portal .tradition-gallery__head p::after { transform: rotate(180deg); }
body.portal .seo-topic-entry__head h2,
body.portal .tradition-gallery__head h2 {
  color: #f0eadc;
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  font-weight: 600;
  letter-spacing: .08em;
  line-height: 1.55;
}
body.portal .seo-topic-entry__head span,
body.portal .tradition-gallery__head span { display: block; max-width: 720px; margin-inline: auto; font-family: "Microsoft YaHei UI", "PingFang SC", sans-serif; line-height: 1.9; }

.seo-topic-entry {
  margin: 0 0 28px;
  padding: 28px;
  border: 1px solid var(--seo-line);
  border-radius: 18px;
  background:
    radial-gradient(circle at 92% 0, rgba(199, 169, 107, 0.12), transparent 34%),
    linear-gradient(145deg, rgba(24, 37, 53, 0.94), rgba(14, 24, 37, 0.9));
}
body:not(.portal) .seo-topic-entry { display: none; }
.seo-topic-entry__head { margin-bottom: 20px; }
.seo-topic-entry__head p {
  margin: 0 0 7px;
  color: var(--seo-gold);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
}
.seo-topic-entry__head h2 {
  margin: 0 0 7px;
  color: var(--seo-text);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
}
.seo-topic-entry__head span { color: var(--seo-muted); font-size: 0.8rem; line-height: 1.7; }
.seo-topic-entry__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.seo-topic-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(199, 169, 107, 0.14);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.025);
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.seo-topic-card__guide {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 2px 10px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
.seo-topic-card__image {
  grid-column: 1 / -1;
  grid-row: 1;
  display: block;
  width: calc(100% + 2px);
  height: auto;
  aspect-ratio: 2 / 1;
  margin: -13px -1px 11px;
  border-radius: 12px 12px 8px 8px;
  object-fit: cover;
  opacity: 0.86;
  filter: saturate(0.84) contrast(1.04);
  transition: opacity 0.2s ease, filter 0.2s ease, transform 0.3s ease;
}
.seo-topic-card:hover, .seo-topic-card:focus-within {
  transform: translateY(-2px);
  border-color: rgba(199, 169, 107, 0.48);
  background: rgba(199, 169, 107, 0.07);
  outline: none;
}
.seo-topic-card__guide:hover .seo-topic-card__image,
.seo-topic-card__guide:focus-visible .seo-topic-card__image {
  opacity: 1;
  filter: saturate(1) contrast(1.06);
}
.seo-topic-card__icon {
  grid-column: 1;
  grid-row: 2 / 5;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(199, 169, 107, 0.2), rgba(199, 91, 84, 0.12));
  color: var(--seo-gold-light);
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 1.05rem;
}
.seo-topic-card strong { grid-column: 2; grid-row: 2; color: var(--seo-text); font-size: 0.86rem; }
.seo-topic-card small { grid-column: 2; grid-row: 3; overflow: hidden; color: var(--seo-faint); font-size: 0.67rem; white-space: nowrap; text-overflow: ellipsis; }
.seo-topic-card em { grid-column: 2; grid-row: 4; color: var(--seo-gold); font-size: 0.67rem; font-style: normal; }
.seo-topic-card__calc {
  display: block;
  margin-top: 13px;
  padding: 8px 12px;
  border: 1px solid rgba(199,169,107,0.42);
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(199,91,84,0.92), rgba(168,63,50,0.92));
  box-shadow: 0 7px 18px rgba(168,63,50,0.16);
  color: #fff7e8;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: center;
  text-decoration: none;
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
}
.seo-topic-card__calc:hover,
.seo-topic-card__calc:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 10px 22px rgba(168,63,50,0.24);
  outline: none;
}

.career-report-entry {
  position: relative;
  display: grid;
  grid-template-columns: 58px 1fr auto;
  align-items: center;
  gap: 16px;
  overflow: hidden;
  margin-top: 18px;
  padding: 17px 20px;
  border: 1px solid rgba(234, 211, 156, 0.28);
  border-radius: 14px;
  background:
    linear-gradient(90deg, rgba(11, 24, 34, 0.98) 0%, rgba(19, 35, 44, 0.9) 66%, rgba(73, 57, 31, 0.76) 100%),
    url("images/reports/bazi-report.webp") right 42% / 44% auto no-repeat;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.career-report-entry::after {
  position: absolute;
  right: 23%;
  top: -46px;
  width: 130px;
  height: 130px;
  border: 1px solid rgba(234, 211, 156, 0.1);
  border-radius: 50%;
  box-shadow: 0 0 0 28px rgba(234, 211, 156, 0.018);
  content: "";
}
.career-report-entry:hover,
.career-report-entry:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(234, 211, 156, 0.56);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
  outline: none;
}
.career-report-entry__mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(234, 211, 156, 0.38);
  border-radius: 17px 17px 17px 5px;
  background: rgba(199, 169, 107, 0.09);
  color: var(--seo-gold-light);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 1.25rem;
}
.career-report-entry__copy { display: flex; min-width: 0; flex-direction: column; }
.career-report-entry__copy small { color: var(--seo-gold); font-size: 0.64rem; letter-spacing: 0.12em; }
.career-report-entry__copy strong { margin: 2px 0; color: var(--seo-text); font-family: "STKaiti", "KaiTi", serif; font-size: 1.08rem; letter-spacing: 0.04em; }
.career-report-entry__copy em { overflow: hidden; color: var(--seo-muted); font-size: 0.69rem; font-style: normal; white-space: nowrap; text-overflow: ellipsis; }
.career-report-entry__meta { position: relative; z-index: 1; display: flex; align-items: flex-end; flex-direction: column; gap: 3px; }
.career-report-entry__meta b { color: var(--seo-gold-light); font-size: 0.76rem; }
.career-report-entry__meta i { color: #d7dde0; font-size: 0.67rem; font-style: normal; }

.tradition-gallery {
  margin: 0 0 30px;
  padding: 30px 28px 28px;
  border: 1px solid var(--seo-line);
  border-radius: 18px;
  background:
    radial-gradient(circle at 8% 0, rgba(234, 211, 156, 0.1), transparent 30%),
    linear-gradient(145deg, rgba(18, 29, 42, 0.96), rgba(11, 20, 31, 0.94));
}
body:not(.portal) .tradition-gallery { display: none; }
.tradition-gallery__head { max-width: 720px; margin: 0 auto 22px; text-align: center; }
.tradition-gallery__head p { margin: 0 0 7px; color: var(--seo-gold); font-size: 0.72rem; letter-spacing: 0.18em; }
.tradition-gallery__head h2 { margin: 0 0 8px; color: var(--seo-text); font-family: "Noto Serif SC", "Songti SC", serif; font-size: clamp(1.2rem, 2.2vw, 1.55rem); }
.tradition-gallery__head span { color: var(--seo-muted); font-size: 0.79rem; line-height: 1.75; }
.tradition-gallery__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tradition-card {
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(199, 169, 107, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.16);
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.tradition-card:hover { transform: translateY(-3px); border-color: rgba(199, 169, 107, 0.45); }
.tradition-card img {
  display: block;
  width: 100%;
  height: clamp(170px, 17vw, 220px);
  object-fit: cover;
  filter: saturate(0.9) contrast(1.02);
  transition: filter 0.25s ease, transform 0.5s ease;
}
.tradition-card:hover img { filter: saturate(1) contrast(1.04); transform: scale(1.018); }
.tradition-card figcaption { padding: 16px 17px 18px; }
.tradition-card strong { display: block; margin-bottom: 5px; color: var(--seo-gold-light); font-family: "Noto Serif SC", "Songti SC", serif; font-size: 0.93rem; }
.tradition-card span { display: block; color: var(--seo-muted); font-size: 0.72rem; line-height: 1.65; }

.topic-page {
  margin: 0;
  background:
    radial-gradient(circle at 50% -10%, rgba(199, 169, 107, 0.13), transparent 34rem),
    var(--seo-bg);
  color: var(--seo-text);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  line-height: 1.8;
}
.topic-page *, .topic-page *::before, .topic-page *::after { box-sizing: border-box; }
.topic-page a { color: inherit; }
.topic-shell { width: min(100% - 36px, 940px); margin: 0 auto; }
.topic-site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  border-bottom: 1px solid var(--seo-line);
}
.topic-brand { color: var(--seo-gold-light); font-family: "Songti SC", serif; font-weight: 700; text-decoration: none; }
.topic-nav-links { display: flex; gap: 16px; color: var(--seo-muted); font-size: 0.78rem; }
.topic-nav-links a { text-decoration: none; }
.topic-nav-links a:hover, .topic-nav-links a:focus-visible { color: var(--seo-gold-light); }
.topic-breadcrumb { margin: 24px 0 0; color: var(--seo-faint); font-size: 0.74rem; }
.topic-breadcrumb a { color: var(--seo-muted); text-decoration: none; }
.topic-hero { padding: 58px 0 46px; text-align: center; }
.topic-kicker { margin: 0 0 10px; color: var(--seo-gold); font-size: 0.76rem; letter-spacing: 0.22em; }
.topic-hero h1 { margin: 0; font-family: "Noto Serif SC", "Songti SC", serif; font-size: clamp(2rem, 6vw, 3.3rem); line-height: 1.25; }
.topic-lead { max-width: 720px; margin: 18px auto 0; color: var(--seo-muted); font-size: clamp(0.9rem, 2vw, 1.02rem); }
.topic-hero-visual {
  position: relative;
  overflow: hidden;
  width: min(100%, 900px);
  margin: 34px auto 0;
  border: 1px solid rgba(199, 169, 107, 0.3);
  border-radius: 20px;
  background: #0b1420;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}
.topic-hero-visual::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 58%, rgba(8, 16, 26, 0.45));
  content: "";
  pointer-events: none;
}
.topic-hero-visual img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.03);
}
.topic-cta {
  display: inline-block;
  margin-top: 26px;
  padding: 11px 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--seo-red), #a83f32);
  box-shadow: 0 10px 30px rgba(168, 63, 50, 0.22);
  color: #fff !important;
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
}
.topic-cta:hover, .topic-cta:focus-visible { filter: brightness(1.08); transform: translateY(-1px); }
.topic-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0 0 32px;
  padding: 15px;
  border: 1px solid var(--seo-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}
.topic-toc strong { margin-right: 4px; color: var(--seo-gold-light); font-size: 0.78rem; }
.topic-toc a { padding: 2px 10px; border-radius: 999px; background: rgba(199, 169, 107, 0.08); color: var(--seo-muted); font-size: 0.72rem; text-decoration: none; }
.topic-article { padding-bottom: 48px; }
.topic-section { margin: 0 0 24px; padding: 26px 28px; border: 1px solid rgba(199, 169, 107, 0.13); border-radius: 16px; background: var(--seo-surface); }
.topic-section h2 { margin: 0 0 12px; color: var(--seo-gold-light); font-family: "Noto Serif SC", "Songti SC", serif; font-size: 1.28rem; line-height: 1.45; }
.topic-section h3 { margin: 20px 0 8px; color: var(--seo-text); font-size: 0.96rem; }
.topic-section p { margin: 0 0 12px; color: var(--seo-muted); font-size: 0.88rem; }
.topic-section p:last-child { margin-bottom: 0; }
.topic-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.topic-note { padding: 13px 15px; border-left: 3px solid var(--seo-gold); background: rgba(199, 169, 107, 0.06); color: var(--seo-muted); font-size: 0.8rem; }
.topic-steps { margin: 0; padding-left: 1.3rem; color: var(--seo-muted); font-size: 0.86rem; }
.topic-steps li + li { margin-top: 8px; }
.topic-faq details { border-top: 1px solid rgba(199, 169, 107, 0.13); }
.topic-faq details:first-of-type { border-top: 0; }
.topic-faq summary { padding: 14px 0; color: var(--seo-text); cursor: pointer; font-size: 0.88rem; font-weight: 700; }
.topic-faq details p { padding: 0 0 14px; }
.topic-related { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.topic-related a { padding: 14px; border: 1px solid var(--seo-line); border-radius: 12px; color: var(--seo-gold-light); font-size: 0.82rem; text-align: center; text-decoration: none; }
.topic-related a:hover, .topic-related a:focus-visible { background: rgba(199, 169, 107, 0.07); }
.topic-footer { padding: 26px 0 34px; border-top: 1px solid var(--seo-line); color: var(--seo-faint); font-size: 0.72rem; text-align: center; }

@media (max-width: 820px) {
  .seo-topic-entry__grid { grid-template-columns: repeat(2, 1fr); }
  .tradition-gallery__grid { grid-template-columns: 1fr; }
  .tradition-card img { height: auto; aspect-ratio: 2 / 1; }
}
@media (max-width: 600px) {
  .seo-topic-entry, .tradition-gallery { padding: 20px 16px; }
  .seo-topic-entry__grid, .topic-grid { grid-template-columns: 1fr; }
  .topic-site-nav { align-items: flex-start; flex-direction: column; justify-content: center; gap: 4px; padding: 12px 0; }
  .topic-nav-links { gap: 12px; overflow-x: auto; width: 100%; white-space: nowrap; }
  .topic-hero { padding: 40px 0 34px; }
  .topic-hero-visual { margin-top: 26px; border-radius: 14px; }
  .topic-section { padding: 21px 18px; }
  .topic-related { grid-template-columns: 1fr; }
  .career-report-entry { grid-template-columns: 48px 1fr; padding: 15px; }
  .career-report-entry__mark { width: 44px; height: 44px; border-radius: 14px 14px 14px 4px; }
  .career-report-entry__meta { grid-column: 2; align-items: flex-start; flex-direction: row; gap: 10px; }
  .career-report-entry__copy em { white-space: normal; }
}
