/* Shared additions, loaded after each page's existing styles. */
.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}
.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 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-window {
	height: 208px;
	overflow: hidden;
	position: relative
}

.donor-track {
	animation: donor-scroll 20s linear infinite
}

.donor-window:hover .donor-track,
.donor-window:focus-within .donor-track,
.donor-track.paused {
	animation-play-state: paused
}

.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; }