﻿/* Shared additions, loaded after each page's existing styles. */
/* 衬线标题数字：强制等高等宽，避免 Georgia 旧式数字高低错落 */
.hero h1,.hero p,.page-title,.news-title,.brand-name,.footer-name,
.culture-detail .detail-heading h2,.project-card h2,.side-title,
.latest-head h2 { font-variant-numeric: lining-nums tabular-nums }
/* 正文富文本图片：图片本身居中显示 + 自适应宽度（只影响图片，不影响文字对齐） */
#article-body img,.article-body img,.report-content img,#contact-content img,[data-content-body] img{display:block;max-width:100%;height:auto;margin:0 auto;border-radius:4px}
/* 正文文字对齐完全由后台编辑器决定：编辑器写入的 text-align 原样生效，
   前端这里不再声明 text-align，也不做任何兜底，避免前端默认样式污染后台排版。
   下面只处理图片段落/图注的缩进与间距（不涉及对齐）。
   类名由 api.js 的 normalizeRichText() 打上，替代 :has()——360 旧内核不支持 :has()。 */
.article-body .rt-img,.detail-copy .rt-img,.report-content .rt-img,
#article-body .rt-img,[data-content-body] .rt-img,
.article-body .rt-img-caption,.detail-copy .rt-img-caption,.report-content .rt-img-caption,
#article-body .rt-img-caption,[data-content-body] .rt-img-caption{
  text-indent:0!important
}
.article-body .rt-img-solo,.detail-copy .rt-img-solo,.report-content .rt-img-solo,
#article-body .rt-img-solo,[data-content-body] .rt-img-solo{margin-bottom:6px!important}
.article-body .rt-img-solo + p,.detail-copy .rt-img-solo + p,.report-content .rt-img-solo + p,
#article-body .rt-img-solo + p,[data-content-body] .rt-img-solo + p{margin-top:0!important}
.overview-photo.xuanyuan-photo{min-height:0;height:auto;align-self:center;aspect-ratio:1.65}
.overview-photo.xuanyuan-photo img{object-position:center}
.academy-page .hero{height:auto;min-height:0;background:#f4ead8}
/* 手机端导航：禁止横向滑动，强制汉堡菜单接管。
   全站最后加载，用通配选择器覆盖所有子页面 CSS（news-detail/culture-detail/heritage 等）
   对 .nav 写的 overflow-x:auto + order:3 + width:100%。
   所有 .nav 在 768px 以下默认隐藏，只有被 mobile-navigation.js 加上 .mobile-nav 类
   并在 header.mobile-menu-open 时才显示（作为汉堡弹出面板）。
   搜索框从 nav 中提取到 header-inner 里可见（移动端 header 右侧工具栏区）。 */
@media(max-width:768px){
  /* 只针对页头里的导航，避免影响页脚 / 子页面 tab */
  .header .nav,.site-header .nav,.header .main-nav,.site-header .main-nav,
  body * .header .nav,body * .header .main-nav,body * .site-header .nav,body * .site-header .main-nav{
    order:auto!important;
    width:auto!important;
    margin-left:0!important;
    justify-content:flex-start!important;
    align-items:stretch!important;
    overflow:visible!important;
    overflow-x:visible!important;
    flex-wrap:nowrap!important;
    white-space:normal!important;
    /* 关键：默认隐藏，只有被改造后的 .mobile-nav 在 .mobile-menu-open 时显示 */
    display:none!important;
  }
  /* 汉堡打开后，页头导航从绝对定位展开 */
  .header.mobile-menu-open .nav,.site-header.mobile-menu-open .main-nav,
  body * .header.mobile-menu-open .nav,body * .site-header.mobile-menu-open .main-nav{
    display:flex!important;
    position:absolute!important; top:100%!important; left:0!important; right:0!important;
    width:100%!important; z-index:210!important;
    flex-direction:column!important; align-items:stretch!important;
    padding:8px 16px 20px!important; background:#fff!important;
    box-shadow:0 15px 25px #301e1e26!important;
  }
}
.academy-han-hero{position:relative;min-height:320px;overflow:hidden;max-width:1600px;margin:auto;background:#f4ead8}
.academy-han-hero>img{position:absolute;right:0;top:0;width:65%;height:100%;object-fit:cover;object-position:center;mask-image:linear-gradient(90deg,transparent,#000 24%)}
.academy-han-copy{position:relative;z-index:1;max-width:1152px;margin:auto;padding:45px 24px;color:#6f5037}
.academy-han-copy h1{font:600 42px/1.5 SimSun,serif;color:#86200f;letter-spacing:8px;margin:12px 0}
.academy-han-copy p{font-size:14px;line-height:1.9;max-width:42%;margin:0}
.academy-han-copy a{display:inline-block;margin-top:20px;padding:10px 19px;background:#981c14;color:white;border-radius:4px;font-size:13px}
.academy-page .han-lead-card .mobile-lead-copy{display:block;position:absolute;bottom:0;left:0;right:0;text-align:left;padding:16px 22px;color:white;font:20px/1.6 SimSun,serif;background:linear-gradient(transparent,#493321ee)}
.academy-page .han-lead-card .mobile-lead-copy small{display:block;font:11px/1.7 "Microsoft YaHei",sans-serif;color:#f2dfbf;margin-top:3px}
@media(max-width:700px){.academy-han-hero{min-height:300px}.academy-han-copy{padding:36px 22px}.academy-han-copy h1{font-size:33px;letter-spacing:4px}.academy-han-copy p{max-width:70%;font-size:12px}.academy-han-hero>img{width:90%;opacity:.52;right:-70px}.academy-page .han-lead-card .mobile-lead-copy{font-size:17px;padding:12px 16px}.overview-photo.xuanyuan-photo{aspect-ratio:1.65;width:100%}}
.banner .slide {
	pointer-events: none
}

.banner .slide.active {
	pointer-events: auto
}

.banner-arrow {
	position: absolute;
	z-index: 2;
	top: 50%;
	transform: translateY(-50%);
	width: 44px;
	height: 58px;
	border: 0;
	border-radius: 5px;
	background: #30180c66;
	color: #fff;
	font: 36px/1 Georgia, serif;
	cursor: pointer
}

.banner-prev {
	left: 24px
}

.banner-next {
	right: 24px
}

.banner-arrow:hover,
.banner-pause:hover {
	background: #30180ca6
}

.banner-controls {
	position: absolute;
	z-index: 2;
	left: 50%;
	bottom: 20px;
	transform: translateX(-50%);
	display: flex;
	align-items: center;
	gap: 2px;
	padding: 2px 8px;
	border-radius: 24px;
	background: #30180c66
}

.banner-dot {
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer
}

.banner-dot:before {
	content: "";
	display: block;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: #ffffff88;
	transition: width .2s
}

.banner-dot.active:before {
	width: 22px;
	border-radius: 8px;
	background: #fff
}

.banner-pause {
	width: 30px;
	height: 30px;
	margin-left: 6px;
	padding: 0;
	border: 0;
	border-left: 1px solid #ffffff55;
	background: transparent;
	color: #fff;
	border-radius: 0 16px 16px 0;
	font-size: 15px;
	cursor: pointer
}

.banner button:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px
}

@media(max-width:768px) {
	.banner-arrow {
		width: 32px;
		height: 44px;
		font-size: 28px
	}

	.banner-prev {
		left: 10px
	}

	.banner-next {
		right: 10px
	}

	.banner-controls {
		bottom: 12px
	}
}

@media(prefers-reduced-motion:reduce) {
	.banner .slide {
		transition: none
	}
}

[id^="year-"],
#history,
#films,
#archives,
#surname,
#lectures,
#courses {
	scroll-margin-top: 100px
}

.site-utility {
	background: #fbf7ef;
	border-bottom: 1px solid #eadfcd;
	color: #79654e;
	font: 12px/1.7 "Microsoft YaHei", sans-serif
}

.site-utility-inner {
	max-width: 1600px;
	margin: auto;
	padding: 9px 24px;
	display: flex;
	align-items: center;
	gap: 18px;
	flex-wrap: wrap
}

.site-calendar-link {
	color: #9d2922;
	text-decoration: none;
	font-weight: 600;
	white-space: nowrap
}

.language-switch {
	display: flex;
	align-items: center;
	gap: 9px;
	margin-left: auto;
	white-space: nowrap
}

.language-switch button {
	border: 0;
	background: transparent;
	color: #79654e;
	padding: 2px 0;
	font: inherit;
	cursor: pointer
}

.language-switch button.active {
	color: #a22720;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 4px
}

.language-switch button:focus-visible,
.site-calendar-link:focus-visible {
	outline: 2px solid #a22720;
	outline-offset: 3px
}

.language-switch a {
	color: inherit;
	font: inherit;
	text-decoration: none
}

.topbar .language-switch button {
	color: inherit
}

.topbar .language-switch button.active {
	color: #fff
}

.topbar .language-switch {
	gap: 8px
}

.topbar .language-switch span {
	margin: 0
}

@media(min-width:769px) {
	.has-top-language .site-utility .language-switch {
		display: none
	}

	.header .nav,
	body.foundation-page .header .nav {
		overflow: visible !important
	}

	.header .nav-dropdown-menu,
	body.foundation-page .header .nav-dropdown-menu {
		display: block !important;
		top: 100%;
		padding-top: 10px;
		min-width: 166px;
	}

	.header .nav-dropdown-menu::before,
	body.foundation-page .header .nav-dropdown-menu::before {
		top: -12px;
		height: 12px
	}

	.header .nav-dropdown:focus-within>.nav-dropdown-menu,
	.header .nav-dropdown:hover>.nav-dropdown-menu,
	body.foundation-page .header .nav-dropdown:focus-within>.nav-dropdown-menu,
	body.foundation-page .header .nav-dropdown:hover>.nav-dropdown-menu {
		opacity: 1;
		visibility: visible;
		transform: translate(-50%, 0);
	}
}

@media(min-width:769px) and (max-width:1000px) {

	.header .header-inner,
	body.foundation-page .header .header-inner {
		flex-wrap: wrap;
		height: auto;
		gap: 10px 18px
	}

	.header .brand,
	body.foundation-page .header .brand {
		flex: 1 1 auto
	}

	.header .nav,
	body.foundation-page .header .nav {
		order: 3;
		flex: 1 0 100%;
		width: 100%;
		justify-content: center;
		gap: 20px;
		padding: 6px 0
	}

	.header .donate,
	body.foundation-page .header .donate {
		order: 2
	}
}

.home-ceremony {
	max-width: 1200px;
	margin: 64px auto;
	padding: 0 24px
}

.home-ceremony .news-head {
	margin-bottom: 26px
}

.home-ceremony-grid {
	display: grid;
	grid-template-columns: 1.35fr 1fr;
	gap: 30px
}

.home-ceremony-lead {
	display: block;
	position: relative;
	min-height: 320px;
	overflow: hidden;
	border-radius: 6px;
	color: #fff;
	text-decoration: none
}

.home-ceremony-lead img {
	width: 100%;
	height: 100%;
	position: absolute;
	inset: 0;
	object-fit: cover
}

.home-ceremony-lead:after {
	content: "";
	position: absolute;
	inset: 25% 0 0;
	background: linear-gradient(transparent, #27120ee8)
}

.home-ceremony-lead>div {
	position: absolute;
	z-index: 1;
	bottom: 28px;
	left: 30px;
	right: 24px
}

.home-ceremony-lead h3 {
	font: 600 28px/1.5 SimSun, serif;
	margin: 8px 0
}

.home-ceremony-lead p {
	font-size: 14px;
	line-height: 1.8
}

.home-ceremony-years {
	display: grid;
	gap: 12px
}

.home-ceremony-years a {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 18px 20px;
	background: #faf5ec;
	border: 1px solid #ecdfca;
	border-radius: 6px;
	text-decoration: none
}

.home-ceremony-years strong {
	color: #9d2922;
	font: 600 22px/1.5 Georgia, SimSun, serif
}

.home-ceremony-years span {
	color: #75614c;
	font-size: 13px;
	flex: 1;
	line-height: 1.8
}

.home-ceremony-years i {
	font-style: normal;
	color: #a22720;
	font-size: 24px
}

.home-ceremony .ceremony-actions {
	display: flex;
	gap: 20px;
	margin-top: 18px;
	font-size: 14px;
	color: #9d2922
}

.ceremony-actions a,
.culture-item h4 a {
	color: inherit;
	text-decoration: none
}

.ceremony-actions a:hover,
.culture-item h4 a:hover {
	text-decoration: underline;
	text-underline-offset: 4px
}

.home-sponsors {
	max-width: 1200px;
	margin: 64px auto;
	padding: 0 24px
}

.home-sponsors .news-head {
	margin-bottom: 24px
}

.sponsor-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 18px
}

.sponsor-card {
	display: grid;
	place-items: center;
	gap: 10px;
	min-height: 140px;
	padding: 22px;
	border: 1px solid #e9dfd2;
	border-radius: 6px;
	background: #faf7f1;
	text-align: center
}

.sponsor-card img {
	width: 100%;
	height: 65px;
	object-fit: contain
}

.sponsor-card strong {
	font-size: 16px;
	color: #78593c
}

.sponsor-card span {
	font-size: 12px;
	color: #99866e
}

.sponsor-card .sponsor-symbol {
	font-size: 30px;
	color: #b78b56
}

.section-note {
	font-size: 13px;
	line-height: 1.8;
	color: #8b7965;
	margin: 14px 0
}

.neijing-entry {
	max-width: 1152px;
	margin: 35px auto;
	padding: 28px 32px;
	border: 1px solid #e5d6bf;
	background: #f8f1e5;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px
}

.neijing-entry h2 {
	font: 600 25px/1.6 SimSun, serif;
	color: #8e2e20;
	margin: 0 0 8px
}

.neijing-entry p {
	color: #806b54;
	font-size: 14px;
	line-height: 1.8
}

.neijing-entry a {
	white-space: nowrap;
	color: #9d2922;
	font-size: 14px
}

.news-main .news-item {
	grid-template-columns: minmax(0, 1fr);
	gap: 8px;
	padding: 20px 0
}

.news-main .news-item>div {
	grid-row: 1
}

.news-main .news-date {
	display: flex;
	align-items: center;
	gap: 8px;
	font: 12px/1.7 "Microsoft YaHei", sans-serif;
	color: #938372;
	letter-spacing: .5px
}

.news-main .news-date:before {
	content: "发布日期";
	padding: 1px 6px;
	border: 1px solid #eadfce;
	border-radius: 3px;
	color: #a77b45;
	font-size: 11px
}

.news-main .news-date strong,
.news-main .news-date span {
	display: inline;
	margin: 0;
	font: inherit;
	color: inherit
}

#news .news-list time {
	display: block;
	color: #9b7860;
	font-size: 12px;
	letter-spacing: 1px;
	margin-top: 8px
}

.roots-page .surname-layout {
	grid-template-columns: 1fr;
	max-width: 1152px;
	padding: 20px 0
}

.roots-page .surname-copy {
	padding: 0
}

.roots-page .surname-visual {
	display: none
}

.roots-page .popular-surnames {
	display: block
}

.roots-page .popular-surnames>strong {
	display: block;
	margin-bottom: 12px
}

.roots-page .popular-surnames>div {
	display: grid;
	grid-template-columns: repeat(10, minmax(0, 1fr));
	gap: 10px
}

.roots-page .popular-surnames button {
	height: 54px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	font-size: 23px
}

.roots-page .popular-surnames button small {
	font: 10px Georgia, serif;
	color: #a78e70
}

.roots-page .popular-surnames button[aria-pressed="true"] {
	border-color: #a22720;
	background: #f3e1cd;
	color: #a22720
}

.roots-page .surname-form {
	max-width: 650px;
	margin: 18px 0
}

.academy-page .lecture-section.page-shell,
.academy-page .courses-section.page-shell {
	max-width: 1152px;
	width: calc(100% - 48px);
	margin-left: auto;
	margin-right: auto
}

.academy-page .courses-section .course-grid img {
	height: 140px
}

.academy-page .lead-list strong {
	font-size: 15px;
	white-space: normal
}

.academy-page .courses-section h2:after {
	content: " · 国学课堂";
	font-size: 15px;
	letter-spacing: 0
}

.donation-showcase {
	margin: 40px 0
}

.donation-showcase-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 24px;
	margin-top: 20px
}

.certificate-preview {
	padding: 28px;
	text-align: center;
	background: #fffaf0;
	border: 8px double #caa26c;
	color: #715136;
	position: relative
}

.certificate-preview .certificate-tag {
	font-size: 12px;
	color: #a22720
}

.certificate-preview h3 {
	font: 600 29px/1.6 SimSun, serif;
	letter-spacing: 6px;
	margin: 16px 0
}

.certificate-preview p {
	font-size: 14px;
	line-height: 2
}

.certificate-preview strong {
	display: block;
	margin: 12px 0;
	font-size: 18px
}

.certificate-preview button,
.certificate-download {
	display: inline-block;
	border: 1px solid #a22720;
	background: #a22720;
	color: #fff;
	padding: 10px 18px;
	border-radius: 4px;
	font-size: 13px;
	cursor: pointer;
	margin-top: 15px;
	text-decoration: none
}

.donor-panel {
	padding: 22px;
	border: 1px solid #e9dfd2;
	background: #fff;
	border-radius: 6px
}

.donor-panel h3 {
	font: 600 21px/1.5 SimSun, serif;
	color: #8e2e20;
	margin: 0
}

.donor-panel-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px
}

.donor-panel-head button {
	font: inherit;
	font-size: 12px;
	color: #8e2e20;
	background: #faf5ec;
	border: 1px solid #eadfce;
	padding: 6px 10px;
	border-radius: 4px;
	cursor: pointer
}

.donor-columns,
.donor-row {
	display: grid;
	grid-template-columns: 1fr 1fr 1.5fr;
	gap: 10px;
	align-items: center
}

.donor-columns {
	margin: 18px 0 8px;
	font-size: 12px;
	color: #99856e
}

.donor-list {
	position: relative
}

.donor-row {
	height: 52px;
	border-bottom: 1px solid #f0e8db;
	font-size: 13px;
	color: #785f48
}

.donor-row b {
	color: #a22720;
	font-weight: 500
}

@keyframes donor-scroll {
	to {
		transform: translateY(-50%)
	}
}

.certificate-dialog {
	width: min(690px, calc(100vw - 30px));
	padding: 28px;
	background: #faf6ee;
	border: 1px solid #d2b282;
	border-radius: 8px;
	max-height: 90vh;
	overflow: auto
}

.certificate-dialog::backdrop {
	background: #2a1a10aa
}

.certificate-close {
	display: block;
	margin-left: auto;
	padding: 5px 12px;
	background: #fff;
	border: 1px solid #e6d6bd;
	cursor: pointer;
	color: #8e2e20
}

.editorial-page {
	max-width: 1152px;
	margin: 40px auto 60px;
	padding: 0 24px
}

.editorial-heading {
	padding: 35px;
	background: #f5ecdc;
	border-left: 4px solid #a22720;
	margin-bottom: 28px
}

.editorial-heading h1 {
	font: 600 36px/1.5 SimSun, serif;
	color: #8e2e20;
	margin: 8px 0
}

.editorial-heading p {
	font-size: 15px;
	color: #806b54;
	line-height: 1.9
}

.editorial-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 22px
}

.editorial-card {
	padding: 28px;
	border: 1px solid #e7dac4;
	background: #fffaf1;
	border-radius: 5px
}

.editorial-card h2 {
	font: 600 24px/1.5 SimSun, serif;
	color: #8e2e20;
	margin: 0 0 14px
}

.editorial-card p,
.editorial-card blockquote {
	font-size: 15px;
	line-height: 2;
	color: #735e49;
	margin: 12px 0
}

.editorial-card blockquote {
	border-left: 3px solid #bc945e;
	padding-left: 16px
}

.editorial-card small {
	font-size: 12px;
	color: #9d8160
}

.calendar-layout {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr);
	gap: 24px
}

.calendar-main,
.calendar-detail {
	padding: 24px;
	border: 1px solid #e5d6bf;
	background: #fffaf1;
	border-radius: 6px
}

.calendar-controls {
	display: flex;
	gap: 10px;
	align-items: center;
	justify-content: center;
	margin-bottom: 20px;
	flex-wrap: wrap
}

.calendar-controls button,
.calendar-controls select {
	border: 1px solid #deceb6;
	border-radius: 4px;
	background: #fff;
	padding: 8px;
	color: #8b3622;
	font: 14px "Microsoft YaHei", sans-serif;
	cursor: pointer
}

.calendar-controls button:disabled {
	opacity: .35;
	cursor: default
}

.calendar-week,
.calendar-days {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 5px
}

.calendar-week span {
	text-align: center;
	font-size: 13px;
	color: #9d8160;
	padding-bottom: 10px
}

.calendar-day {
	padding: 10px 3px;
	min-height: 65px;
	border: 1px solid transparent;
	background: #f9f2e7;
	border-radius: 4px;
	color: #5c4530;
	cursor: pointer
}

.calendar-day b {
	display: block;
	font-size: 19px;
	font-weight: 500
}

.calendar-day small {
	display: block;
	font-size: 10px;
	margin-top: 5px;
	white-space: nowrap
}

.calendar-day.today {
	border-color: #a22720
}

.calendar-day.selected {
	background: #a22720;
	color: white
}

.calendar-day.weekend:not(.selected) {
	color: #a22720
}

.calendar-detail h2 {
	font: 600 22px/1.5 SimSun, serif;
	color: #8e2e20;
	margin: 0 0 18px
}

.calendar-detail .calendar-big-day {
	font: 70px/1.3 Georgia, serif;
	color: #a22720
}

.calendar-detail p {
	font-size: 14px;
	line-height: 2;
	color: #806b54;
	margin: 12px 0
}

@media(prefers-reduced-motion:reduce) {
	.donor-track {
		animation: none
	}

	.donor-window {
		height: auto;
		max-height: 260px;
		overflow: auto
	}

	.donor-track [aria-hidden] {
		display: none
	}
}

@media(max-width:768px) {
	.site-utility-inner {
		padding: 8px 16px;
		gap: 5px 12px;
		font-size: 10px
	}

	#site-clock {
		order: 3;
		width: 100%
	}

	#site-lunar {
		order: 4
	}

	.language-switch {
		font-size: 11px
	}

	.home-ceremony,
	.home-sponsors {
		margin: 35px auto;
		padding: 0 16px
	}

	.home-ceremony .news-head h2,
	.home-sponsors .news-head h2 {
		letter-spacing: 3px;
		font-size: 23px
	}

	.home-ceremony-grid,
	.donation-showcase-grid,
	.editorial-grid,
	.calendar-layout {
		grid-template-columns: 1fr
	}

	.home-ceremony-lead {
		min-height: 255px
	}

	.home-ceremony-lead h3 {
		font-size: 24px
	}

	.home-ceremony-years a {
		padding: 12px
	}

	.home-ceremony-years strong {
		font-size: 19px
	}

	.sponsor-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px
	}

	.neijing-entry {
		margin: 24px 16px;
		padding: 20px;
		display: block
	}

	.neijing-entry a {
		display: inline-block;
		margin-top: 12px
	}

	.roots-page .surname-layout {
		width: 92%;
		margin: auto
	}

	.roots-page .popular-surnames>div {
		grid-template-columns: repeat(5, minmax(0, 1fr));
		gap: 6px
	}

	.roots-page .popular-surnames button {
		font-size: 20px;
		gap: 5px;
		height: 48px
	}

	.academy-page .lecture-section.page-shell,
	.academy-page .courses-section.page-shell {
		width: 92%
	}

	.academy-page .courses-section .course-grid img {
		height: 110px
	}

	.editorial-page {
		padding: 0 16px;
		margin-top: 24px
	}

	.editorial-heading,
	.editorial-card {
		padding: 22px
	}

	.editorial-heading h1 {
		font-size: 29px
	}

	.calendar-main {
		padding: 15px
	}

	.calendar-day {
		min-height: 56px
	}

	.calendar-day b {
		font-size: 17px
	}

	.calendar-day small {
		font-size: 9px
	}

	.certificate-preview {
		padding: 22px 14px
	}

	.certificate-preview h3 {
		font-size: 25px;
		letter-spacing: 3px
	}

	.donor-row {
		font-size: 11px
	}
}

/* 页脚右侧统一布局：二维码在上、社交图标横排在下（全站一致，与首页样式相同） */
.footer-right { display: flex; flex-direction: column; align-items: center; gap: 16px; margin-left: auto; }
.footer-social-icons { display: flex; flex-direction: row; gap: 14px; }
.footer-social-icons a { width: 36px; height: 36px; border: 1px solid rgba(184,51,42,.4); border-radius: 50%; display: flex; align-items: center; justify-content: center; box-sizing: border-box; transition: background .2s, border-color .2s; }
.footer-social-icons a svg { width: 18px; height: 18px; fill: #b8332a; transition: fill .2s; }
.footer-social-icons a:hover { background: #b8332a; border-color: #b8332a; }
.footer-social-icons a:hover svg { fill: #fff; }

/* ===== 关于我们 · 加入我们 弹框 ===== */
/* hero 里的 CTA 按钮组 */
.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 18px
}
.hero-cta {
  border: 1px solid #b9000b;
  background: #b9000b;
  color: #fff;
  padding: 10px 22px;
  border-radius: 4px;
  font: 500 14px/1 "Microsoft YaHei", sans-serif;
  letter-spacing: 2px;
  cursor: pointer;
  transition: background .2s, border-color .2s
}
.hero-cta:hover { background: #8a0009; border-color: #8a0009 }
.hero-cta:focus-visible { outline: 2px solid #8a0009; outline-offset: 3px }
.hero-link {
  color: #79654e;
  font: 13px/1.7 "Microsoft YaHei", sans-serif;
  text-decoration: none;
  letter-spacing: 1px
}
.hero-link:hover { color: #b9000b }
.hero-link span { margin-left: 4px; transition: transform .2s; display: inline-block }
.hero-link:hover span { transform: translateX(3px) }

/* 弹框遮罩 */
.join-scrim {
  position: fixed;
  inset: 0;
  background: rgba(30, 10, 8, 0.55);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 4vh 18px;
  z-index: 500;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: join-scrim-in .2s ease
}
.join-scrim[hidden] { display: none }
@keyframes join-scrim-in { from { opacity: 0 } to { opacity: 1 } }

/* 弹框主体 */
.join-dialog {
  position: relative;
  width: min(760px, 100%);
  max-height: calc(100vh - 8vh);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 32px 32px 28px;
  background: #fdf9f1;
  border: 1px solid #e7d5b5;
  border-radius: 8px;
  box-shadow: 0 25px 50px rgba(30, 10, 8, .25);
  animation: join-dialog-in .28s cubic-bezier(.2,.8,.2,1)
}
@keyframes join-dialog-in { from { transform: translateY(16px) scale(.98); opacity: 0 } to { transform: translateY(0) scale(1); opacity: 1 } }

.join-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #e0d0b0;
  color: #79654e;
  font: 22px/1 sans-serif;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .2s, color .2s
}
.join-close:hover { background: #b9000b; color: #fff; border-color: #b9000b }
.join-close:focus-visible { outline: 2px solid #b9000b; outline-offset: 2px }

.join-eyebrow {
  color: #b9000b;
  font: 12px/1 "Microsoft YaHei", sans-serif;
  letter-spacing: 3px;
  display: flex;
  align-items: center;
  gap: 8px
}
.join-eyebrow .cloud-line {
  color: #c8a866;
  font-size: 11px
}
.join-dialog h2 {
  margin: 8px 0 6px;
  font: 700 30px/1.2 "STKaiti","KaiTi","SimSun",serif;
  color: #b9000b;
  letter-spacing: 4px
}
.join-subtitle {
  margin: 0 0 22px;
  font: 14px/1.8 "STSong","SimSun",serif;
  color: #6a5440;
  letter-spacing: 1px
}

/* 加入方式网格 */
.join-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px
}
.join-way {
  padding: 18px 14px;
  background: #fff;
  border: 1px solid #eadfce;
  border-radius: 6px;
  text-align: center;
  transition: border-color .2s, background .2s, transform .2s
}
.join-way:hover { border-color: #b9000b; background: #fff5f2; transform: translateY(-2px) }
.join-way svg {
  width: 36px;
  height: 36px;
  display: block;
  margin: 0 auto 10px;
  fill: none;
  stroke: #b9000b;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round
}
.join-way h3 {
  margin: 0 0 4px;
  font: 15px/1.3 "STSong","SimSun",serif;
  color: #b9000b;
  letter-spacing: 2px
}
.join-way p {
  margin: 0;
  font: 11px/1.6 "Microsoft YaHei", sans-serif;
  color: #7b6752;
  letter-spacing: .5px
}

/* 联系方式 */
.join-contact {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 18px 20px;
  margin-bottom: 22px;
  background: #fff;
  border: 1px solid #eadfce;
  border-radius: 6px;
  align-items: start
}
.join-contact h3 {
  grid-column: 1 / -1;
  margin: 0 0 2px;
  font: 16px/1.4 "STSong","SimSun",serif;
  color: #b9000b;
  letter-spacing: 2px
}
.join-contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 24px
}
.join-contact-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 8px;
  align-items: start;
  font: 13px/1.8 "Microsoft YaHei", sans-serif;
  color: #4e4030
}
.join-contact-label {
  color: #a78e70;
  letter-spacing: 1px;
  white-space: nowrap
}
.join-contact-value {
  color: #4e4030;
  word-break: break-all;
  display: block
}
.join-contact-link { text-decoration: none }
.join-contact-link:hover { color: #b9000b; text-decoration: underline; text-underline-offset: 3px }

.join-qr {
  margin: 0;
  text-align: center
}
.join-qr img {
  width: 110px;
  height: 110px;
  object-fit: contain;
  border-radius: 4px;
  border: 1px solid #eadfce;
  background: #fff
}
.join-qr figcaption {
  margin-top: 6px;
  font: 11px/1.5 "Microsoft YaHei", sans-serif;
  color: #a78e70;
  letter-spacing: 1px
}

/* 表单 */
.join-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
  padding: 18px 20px 16px;
  background: #fff;
  border: 1px solid #eadfce;
  border-radius: 6px
}
.join-form-row { display: grid; gap: 5px }
.join-form-row--full { grid-column: 1 / -1 }
.join-form-row label {
  font: 13px/1.5 "Microsoft YaHei", sans-serif;
  color: #4e4030
}
.join-required { color: #b9000b }
.join-form input,
.join-form select,
.join-form textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d7c7ac;
  border-radius: 4px;
  padding: 8px 10px;
  background: #fdfaf3;
  font: 13px/1.6 "Microsoft YaHei", sans-serif;
  color: #3a2e20;
  transition: border-color .2s, background .2s
}
.join-form input:focus,
.join-form select:focus,
.join-form textarea:focus {
  outline: none;
  border-color: #b9000b;
  background: #fff
}
.join-form textarea { resize: vertical; min-height: 64px }
.join-form-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap
}
.join-submit {
  border: 1px solid #b9000b;
  background: #b9000b;
  color: #fff;
  padding: 9px 28px;
  border-radius: 4px;
  font: 500 14px/1 "Microsoft YaHei", sans-serif;
  letter-spacing: 2px;
  cursor: pointer;
  transition: background .2s, border-color .2s
}
.join-submit:hover { background: #8a0009; border-color: #8a0009 }
.join-submit:disabled { background: #d4c4a8; border-color: #d4c4a8; cursor: default }
.join-form-tip {
  font: 12px/1.7 "Microsoft YaHei", sans-serif;
  color: #8c7860
}
.join-error {
  margin: 8px 0 0;
  font: 13px/1.7 "Microsoft YaHei", sans-serif;
  color: #b9000b
}

.join-submitted {
  padding: 22px 24px;
  background: #fdf4f2;
  border: 1px solid #e4bcb8;
  border-radius: 6px;
  font: 14px/1.9 "Microsoft YaHei", sans-serif;
  color: #6a2010;
  margin: 0
}
.join-submitted a {
  color: #b9000b;
  text-decoration: none;
  font-weight: 600
}
.join-submitted a:hover { text-decoration: underline; text-underline-offset: 3px }

/* 移动端 */
@media(max-width: 700px) {
  .hero-actions { gap: 10px; margin-bottom: 14px }
  .hero-cta { padding: 8px 16px; font-size: 13px; letter-spacing: 1px }
  .hero-link { font-size: 12px }
  .join-scrim { padding: 0 }
  .join-dialog {
    border-radius: 0;
    border: 0;
    max-height: none;
    width: 100%;
    min-height: 100vh;
    padding: 24px 20px 28px;
    animation: none
  }
  .join-close { top: 8px; right: 10px }
  .join-dialog h2 { font-size: 26px; letter-spacing: 3px }
  .join-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px }
  .join-way { padding: 14px 10px }
  .join-way svg { width: 30px; height: 30px; margin-bottom: 6px }
  .join-way h3 { font-size: 14px; letter-spacing: 1px }
  .join-way p { font-size: 10px }
  .join-contact {
    gap: 10px;
    padding: 16px
  }
  .join-contact-list { grid-template-columns: 1fr; gap: 8px 0 }
  .join-form { grid-template-columns: 1fr; padding: 16px }
  .join-form-actions { flex-direction: column; align-items: stretch; gap: 10px }
  .join-submit { width: 100%; padding: 10px }
  .join-form-tip { text-align: center }
}

/* ================================================================
   新闻 / 文创 分类栏：active 态更强视觉 + 面包屑返回时滚动定位
   ================================================================ */

/* 新闻分类 active 态兜底 — 比 news.css 原规则更鲜明 */
.categories a.active {
  color: #fff !important;
  background: var(--red, #b9000b) !important;
  border-color: var(--red, #b9000b) !important;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(185, 0, 11, .25);
}

/* 文创分类 button.selected（本来用 selected，保持一致） */
.categories button.selected {
  background: var(--red, #b9000b) !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(185, 0, 11, .25);
}

/* 面包屑返回时，被选中的分类有一个入场脉冲提示 */
.categories a.flash,
.categories button.flash {
  animation: gtq-flash .9s ease-out;
}
@keyframes gtq-flash {
  0%   { transform: scale(1); box-shadow: 0 0 0 0 rgba(185,0,11,.5); }
  40%  { transform: scale(1.04); box-shadow: 0 0 0 14px rgba(185,0,11,0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(185,0,11,0); }
}

/* ================================================================
   关于我们 · 基金会介绍：隐藏左侧固定图片 + 隐藏价值观卡片 + 富文本单列居中
   HTML 里 <div class="overview-photo"><img src="images/about/xuanyuan-hall.jpg">
   是硬编码的静态图片（不是后台动态内容），直接 display:none 即可；
   .value-grid 价值观卡片同样去掉，只保留标题 + 后台富文本段落
   ================================================================ */
.tab-panel#panel-intro .overview {
  grid-template-columns: 1fr !important;
  max-width: 780px;
  margin: 0 auto;
  padding: 32px 28px;
  text-align: center;
  background: #fdfbf9;
  border: 1px solid #ece5dd;
  border-radius: 8px;
  box-shadow: 0 2px 14px rgba(113, 91, 70, .04);
}
.tab-panel#panel-intro .overview-photo { display: none !important; }
.tab-panel#panel-intro .overview .value-grid { display: none !important; }
.tab-panel#panel-intro .overview-copy { padding-top: 0 !important; }
.tab-panel#panel-intro .overview .eyebrow { justify-content: center; }
.tab-panel#panel-intro .overview .title-rule { margin-left: auto; margin-right: auto; }
.tab-panel#panel-intro .overview-copy > p,
.tab-panel#panel-intro .overview-copy [data-content-body] {
  text-align: center;
  text-indent: 0;
}

/* ================================================================
   文化正文页（黄帝内经等）：富文本底板
   整个 .editorial-grid 容器就是一张米黄褐色大纸，从头铺到尾，
   跟上方 .editorial-heading 的 #f5ecdc 底色一致
   ================================================================ */
.editorial-grid {
  background: #f5ecdc !important;
  border: 1px solid #eadcc5;
  border-radius: 8px;
  padding: 32px 36px;
  box-shadow: 0 2px 12px rgba(137, 96, 48, .06);
  /* 取消两列栅格，富文本长文就是整行通栏 */
  grid-template-columns: 1fr !important;
}
.editorial-grid p {
  text-align: justify;
  text-indent: 2em;
  margin: 0 0 16px;
  line-height: 1.95;
  color: #4a3a2c;
  font-family: "STSong", "SimSun", serif;
  font-size: 15.5px;
}
.editorial-grid h2,
.editorial-grid h3 {
  text-align: center;
  color: #8e2e20;
  font-family: "STSong", "SimSun", serif;
  margin: 20px 0 14px;
  letter-spacing: 2px;
}
.editorial-grid img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 16px auto;
  display: block;
}

/* ================================================================
   发展历程 Timeline：自适应列数 + 每行都有横线 + 多排也好看
   原 CSS 硬编码 repeat(5,1fr) + right: calc(20% - 8px) 导致超过 5 条
   换行后新行 dot 下方没横线。
   方案：JS 算好列数加 .tl-vN / .tl-vertical 类，CSS 用 subgrid 思路
   让每一排自动铺满 + 每行一条独立横线。
   ================================================================ */
.history .timeline {
  --tl-cols: 5;
  grid-template-columns: repeat(var(--tl-cols), minmax(0, 1fr)) !important;
  gap: 0 12px;
}
/* 默认横线（第一行）：铺满整行而不是 20% */
.history .timeline::before {
  right: 0 !important;
  background: linear-gradient(90deg, var(--red, #b9000b), #e9b7b4) !important;
}
/* JS 注入的列数类 */
.history .timeline.tl-v1 { --tl-cols: 1; }
.history .timeline.tl-v2 { --tl-cols: 2; }
.history .timeline.tl-v3 { --tl-cols: 3; }
.history .timeline.tl-v4 { --tl-cols: 4; }
.history .timeline.tl-v5 { --tl-cols: 5; }

/* 超过 10 条自动切"纵向双列交替"（desktop & mobile 都清爽） */
.history .timeline.tl-vertical {
  display: block !important;
  grid-template-columns: none !important;
  padding-left: 0;
  padding-right: 0;
}
.history .timeline.tl-vertical::before { display: none !important; }  /* 去掉老横线 */
.history .timeline.tl-vertical {
  position: relative;
  padding-top: 8px;
}
/* 中间竖线 */
.history .timeline.tl-vertical::after {
  content: "";
  position: absolute;
  top: 16px;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  background: linear-gradient(180deg, var(--red, #b9000b), #e9b7b4 70%, #e9b7b400);
}
.history .timeline.tl-vertical li {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 20px 1fr;  /* 左内容 | 点 | 右内容 */
  gap: 0;
  margin-bottom: 24px;
}
.history .timeline.tl-vertical li .timeline-dot {
  grid-column: 2;
  justify-self: center;
  margin-top: 6px;
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
}
/* 奇数：内容在左；偶数：内容在右 */
.history .timeline.tl-vertical li > time,
.history .timeline.tl-vertical li > strong,
.history .timeline.tl-vertical li > p {
  grid-column: 1;
  text-align: right;
  padding-right: 16px;
}
.history .timeline.tl-vertical li:nth-child(even) > time,
.history .timeline.tl-vertical li:nth-child(even) > strong,
.history .timeline.tl-vertical li:nth-child(even) > p {
  grid-column: 3;
  text-align: left;
  padding-right: 0;
  padding-left: 16px;
}
.history .timeline.tl-vertical li .timeline-dot + strong {
  grid-column: inherit;
}

/* 移动端 < 768px：纵向模式始终生效（保持 about.css 原有行为，但加竖线和点） */
@media (max-width: 768px) {
  .history .timeline.tl-v1, .history .timeline.tl-v2,
  .history .timeline.tl-v3, .history .timeline.tl-v4,
  .history .timeline.tl-v5,
  .history .timeline.tl-vertical {
    display: block !important;
    grid-template-columns: none !important;
    padding: 0 0 0 28px;
  }
  .history .timeline.tl-v1::before,
  .history .timeline.tl-v2::before,
  .history .timeline.tl-v3::before,
  .history .timeline.tl-v4::before,
  .history .timeline.tl-v5::before { display: none !important; }
  .history .timeline.tl-v1::after,
  .history .timeline.tl-v2::after,
  .history .timeline.tl-v3::after,
  .history .timeline.tl-v4::after,
  .history .timeline.tl-v5::after {
    content: "";
    position: absolute;
    top: 8px;
    bottom: 0;
    left: 10px;
    width: 2px;
    background: linear-gradient(180deg, var(--red, #b9000b), #e9b7b4 80%, transparent);
  }
  .history .timeline.tl-v1 li,
  .history .timeline.tl-v2 li,
  .history .timeline.tl-v3 li,
  .history .timeline.tl-v4 li,
  .history .timeline.tl-v5 li {
    padding-bottom: 22px;
  }
  .history .timeline.tl-v1 li > time,
  .history .timeline.tl-v2 li > time,
  .history .timeline.tl-v3 li > time,
  .history .timeline.tl-v4 li > time,
  .history .timeline.tl-v5 li > time { text-align: left; padding-right: 0; }
  .history .timeline.tl-v1 li > strong,
  .history .timeline.tl-v2 li > strong,
  .history .timeline.tl-v3 li > strong,
  .history .timeline.tl-v4 li > strong,
  .history .timeline.tl-v5 li > strong { text-align: left; padding-right: 0; }
  .history .timeline.tl-v1 li > p,
  .history .timeline.tl-v2 li > p,
  .history .timeline.tl-v3 li > p,
  .history .timeline.tl-v4 li > p,
  .history .timeline.tl-v5 li > p { text-align: left; padding-right: 0; }
  .history .timeline.tl-vertical::after { left: 10px; }
  .history .timeline.tl-vertical li {
    grid-template-columns: none;
    margin-bottom: 20px;
  }
  .history .timeline.tl-vertical li > time,
  .history .timeline.tl-vertical li > strong,
  .history .timeline.tl-vertical li > p,
  .history .timeline.tl-vertical li:nth-child(even) > time,
  .history .timeline.tl-vertical li:nth-child(even) > strong,
  .history .timeline.tl-vertical li:nth-child(even) > p {
    grid-column: auto;
    text-align: left;
    padding: 0;
  }
  .history .timeline.tl-vertical li .timeline-dot {
    position: absolute;
    left: -25px;
    top: 2px;
    transform: none;
  }
}

/* ================================================================
   拜祖大典 · 活动流程（culture-ceremony.html）
   时间线样式：每排一条通长横线，空心圆点串在线上（点底色与页面一致，
   线视觉上在点的边缘断开）；序号在点上方，标题/描述在点下方；
   条数多时分排，flex 让每排均分整行宽度。
   ================================================================ */
.flow-list {
  display: flex !important;
  flex-wrap: wrap;
  column-gap: 0 !important;
  row-gap: 36px !important;
}
/* 每个 li 等宽（--flow-cols 由 JS 按条数设置），最后一排自动拉伸铺满 */
.flow-list li {
  flex: 1 1 calc(100% / var(--flow-cols, 7) - 1px);
  padding: 0 11px;
}
.flow-list::before { display: none !important; }
.flow-list li:not(:last-child):after { display: none !important; }

/* 每个 li 一条通宽横线；相邻 li 的线首尾相接 → 整排一条连续线 */
.flow-list li::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 30px;
  height: 1px;
  background: #c79a61;
}

/* 序号：圆点上方 */
.flow-list .flow-no {
  display: block;
  font: 15px/20px Georgia, serif;
  color: #c48439;
  margin-bottom: 6px;
}
/* 空心圆点：压在横线上，遮住穿过的线 */
.flow-list span.flow-dot {
  display: block;
  width: 9px;
  height: 9px;
  margin: 0 auto 12px;
  background: #faf8f5;
  border: 2px solid #d9ad76;
  border-radius: 50%;
  font-size: 0;
  position: relative;
  z-index: 1;
}