/* ============================================================
   ForUnity 主页 — 主样式（CSS 变量架构 · 天蓝主题）
   v2 · 依据: design-guidelines.md (task-09) + 协调者 CSS 变量主题架构
   Design: HTML5 UP | License: CC BY 3.0 (html5up.net/license)

   ★ 主题架构：所有颜色/字体/圆角/间距/阴影统一走 :root 变量（--theme-*）
   - 后台「主题配置」只需写入 theme.json，由 theme.js 动态覆盖 :root 即可
   - 规则区（:root 之外）禁止硬编码颜色，一律 var(--theme-*)
   ============================================================ */

/* ── 主题变量（默认值 = theme.json 快照，唯一允许定义具体值的位置） ── */
:root {
	/* 品牌主色（天蓝） */
	--theme-primary: #2196F3;
	--theme-primary-dark: #1976D2;
	--theme-primary-darker: #0D47A1;
	--theme-primary-light: #42A5F5;
	--theme-primary-soft: #E3F2FD;
	--theme-secondary: #17A2B8;

	/* 背景 / 表面 / 文字 */
	--theme-bg: #F5FAFF;
	--theme-surface: #FFFFFF;
	--theme-text: #263238;
	--theme-text-muted: #607D8B;
	--theme-heading: #0D47A1;

	/* 边框 / 分隔线 */
	--theme-border: #BBDEFB;
	--theme-divider: #E3F2FD;

	/* 状态色 */
	--theme-success: #2E7D32;
	--theme-warning: #F59E0B;
	--theme-danger: #D32F2F;

	/* 字体 */
	--theme-font: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei",
	              "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
	--theme-font-mono: "SF Mono", "JetBrains Mono", "Fira Code", Consolas,
	              "Courier New", monospace;

	/* 间距 */
	--theme-space-1: 4px;
	--theme-space-2: 8px;
	--theme-space-3: 16px;
	--theme-space-4: 24px;
	--theme-space-5: 32px;
	--theme-space-6: 48px;
	--theme-space-7: 64px;

	/* 圆角 */
	--theme-radius: 10px;
	--theme-radius-lg: 16px;

	/* 阴影 */
	--theme-shadow: 0 4px 16px rgba(33, 150, 243, 0.10);
	--theme-shadow-sm: 0 2px 8px rgba(33, 150, 243, 0.06);
	--theme-shadow-hover: 0 2px 4px rgba(15, 23, 42, 0.08), 0 8px 24px rgba(15, 23, 42, 0.08);
	--theme-shadow-nav: 0 1px 3px rgba(15, 23, 42, 0.04), 0 8px 16px rgba(15, 23, 42, 0.06);
	--theme-shadow-logo: 0 8px 24px rgba(0, 0, 0, 0.18);
	--theme-focus-ring: 0 0 0 3px rgba(33, 150, 243, 0.18);

	/* Banner 背景 / 文字（可被 theme.json 覆盖为 url(...) 图片） */
	--theme-banner-bg: linear-gradient(135deg, #0D47A1 0%, #2196F3 55%, #42A5F5 100%);
	--theme-banner-text: #FFFFFF;
	--theme-banner-text-muted: rgba(255, 255, 255, 0.92);
	--theme-banner-text-shadow: 0 2px 12px rgba(13, 71, 161, 0.35);

	/* 主色上的前景文字 */
	--theme-on-primary: #FFFFFF;

	/* 覆盖层（按钮 hover、公告关闭按钮等） */
	--theme-overlay-light: rgba(255, 255, 255, 0.18);
	--theme-overlay-mid: rgba(255, 255, 255, 0.2);
	--theme-overlay-hover: rgba(255, 255, 255, 0.35);

	/* 导航栏 */
	--theme-nav-bg: rgba(255, 255, 255, 0.92);
	--theme-nav-border: #E3F2FD;
	--theme-nav-text: #607D8B;
	--theme-nav-active: #2196F3;
	--theme-nav-toggle: #0D47A1;

	/* 模块图标底色 */
	--theme-icon-bg: #E3F2FD;

	/* ── spec 兼容别名（T12：--theme-bg-dark / --theme-accent / --theme-font-family） ── */
	--theme-bg-dark: var(--theme-primary-darker);
	--theme-accent: var(--theme-primary);
	--theme-font-family: var(--theme-font);

	/* ── 帖子详情弹窗（T21） ── */
	--theme-modal-backdrop: rgba(15, 23, 42, 0.55);
	--theme-modal-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
	--theme-modal-radius: var(--theme-radius-lg);
	--theme-modal-max-w: 760px;
	--theme-modal-code-bg: #F1F5F9;
	--theme-modal-code-text: #334155;
}

/* ── Reset / Base ──────────────────────────────────────── */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--theme-font);
	font-size: 16px;
	line-height: 1.6;
	color: var(--theme-text);
	background: var(--theme-bg);
	overflow-x: hidden;
}
img { max-width: 100%; display: block; }
ul { list-style: none; padding: 0; margin: 0; }
h1, h2, h3, h4, p { margin: 0; }

a { color: var(--theme-primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--theme-primary-dark); }

.container { max-width: 1080px; margin: 0 auto; padding: 0 1.2rem; }

/* ── 导航栏 ────────────────────────────────────────────── */
.navbar {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--theme-nav-bg);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--theme-nav-border);
	box-shadow: var(--theme-shadow-sm);
}
.navbar-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.navbar-brand { display: flex; align-items: center; gap: var(--theme-space-2); color: var(--theme-text); }
.navbar-brand img { border-radius: 6px; }
.brand-name { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }

.navbar-nav ul { display: flex; gap: var(--theme-space-2); }
.navbar-nav a {
	display: block;
	padding: 8px 14px;
	border-radius: var(--theme-radius);
	color: var(--theme-nav-text);
	font-size: 14px;
	font-weight: 500;
	transition: color 0.15s ease, background 0.15s ease;
}
.navbar-nav a:hover { color: var(--theme-nav-active); background: var(--theme-primary-soft); }
.navbar-nav a.active { color: var(--theme-nav-active); background: var(--theme-primary-soft); }

.navbar-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 44px;
	height: 44px;
	padding: 10px;
	background: none;
	border: none;
	cursor: pointer;
	border-radius: var(--theme-radius);
}
.navbar-toggle span { display: block; height: 2px; background: var(--theme-nav-toggle); border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease; }
.navbar-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.navbar-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Hero / Banner ─────────────────────────────────────── */
.hero {
	position: relative;
	min-height: 480px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding-top: 60px;
	overflow: hidden;
	background: var(--theme-banner-bg);
}
.hero-bg {
	position: absolute;
	inset: 0;
	background-image: url("../banner/banner-1920x480.png");
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}
.hero-content { position: relative; z-index: 1; text-align: center; padding: 48px 1.2rem; }
.hero-logo { width: 80px; height: 80px; margin: 0 auto 24px; border-radius: 20px; box-shadow: var(--theme-shadow-logo); }
.hero-content h1 { font-size: 44px; font-weight: 700; letter-spacing: -0.02em; color: var(--theme-banner-text); text-shadow: var(--theme-banner-text-shadow); margin-bottom: 16px; }
.hero-content p { font-size: 18px; color: var(--theme-banner-text-muted); text-shadow: var(--theme-banner-text-shadow); margin-bottom: 24px; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--theme-space-3); }

/* ── 公告条 ────────────────────────────────────────────── */
.announcement {
	position: relative;
	z-index: 2;
	background: var(--theme-primary);
	color: var(--theme-on-primary);
}
.announcement-inner {
	display: flex;
	align-items: center;
	gap: var(--theme-space-2);
	padding-top: var(--theme-space-3);
	padding-bottom: var(--theme-space-3);
	font-size: 14px;
}
.announcement-icon { flex-shrink: 0; }
.announcement-close {
	margin-left: auto;
	flex-shrink: 0;
	width: 28px;
	height: 28px;
	border: none;
	background: var(--theme-overlay-mid);
	color: var(--theme-on-primary);
	font-size: 16px;
	line-height: 1;
	border-radius: 6px;
	cursor: pointer;
	transition: background 0.15s ease;
}
.announcement-close:hover { background: var(--theme-overlay-hover); }

/* ── 按钮 ──────────────────────────────────────────────── */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 36px;
	padding: 0 20px;
	border-radius: var(--theme-radius);
	border: 1px solid transparent;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
	text-decoration: none;
	white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--theme-primary); color: var(--theme-on-primary); }
.btn-primary:hover { background: var(--theme-primary-dark); color: var(--theme-on-primary); }
.btn-outline { background: transparent; border-color: var(--theme-primary); color: var(--theme-primary); }
.btn-outline:hover { background: var(--theme-primary-soft); }
.btn-light { background: var(--theme-surface); color: var(--theme-primary-dark); }
.btn-light:hover { background: var(--theme-primary-soft); color: var(--theme-primary-dark); }
.btn-outline-light { background: transparent; border-color: var(--theme-banner-text-muted); color: var(--theme-banner-text); }
.btn-outline-light:hover { background: var(--theme-overlay-light); color: var(--theme-banner-text); }

/* ── 统计数字 ──────────────────────────────────────────── */
.stats-section { padding: var(--theme-space-6) 0; margin-top: -1px; }
/* T23: 列数由 JS 动态设置 --stat-cols（等宽一行）；缺省 4 列；<640px 由媒体查询覆盖为 2 列 */
.stats-grid { display: grid; grid-template-columns: repeat(var(--stat-cols, 4), 1fr); gap: var(--theme-space-4); }
/* T23: 全部方块为空时整个区域隐藏 */
.stats-section[hidden] { display: none; }
.stat-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	background: var(--theme-surface);
	border: 1px solid var(--theme-border);
	border-radius: var(--theme-radius-lg);
	box-shadow: var(--theme-shadow);
	padding: var(--theme-space-5) var(--theme-space-4);
	text-align: center;
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--theme-shadow-hover); }
a.stat-card { color: inherit; }
a.stat-card:hover { border-color: var(--theme-primary); color: inherit; }
.stat-icon {
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 24px;
	background: var(--theme-primary-soft);
	border-radius: 12px;
	margin-bottom: var(--theme-space-2);
}
.stat-value { font-size: 36px; font-weight: 700; letter-spacing: -0.02em; color: var(--theme-primary); font-family: var(--theme-font-mono); }
.stat-label { font-size: 13px; color: var(--theme-text-muted); margin-top: var(--theme-space-2); }
.stat-desc { font-size: 12px; color: var(--theme-text-muted); margin-top: var(--theme-space-1); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-arrow { margin-top: var(--theme-space-2); font-size: 14px; color: var(--theme-primary); opacity: 0; transform: translateX(-4px); transition: opacity 0.15s ease, transform 0.15s ease; }
a.stat-card:hover .stat-arrow { opacity: 1; transform: translateX(0); }

/* ── 技术模块 ──────────────────────────────────────────── */
.section { padding: var(--theme-space-7) 0; }
.section-alt { background: var(--theme-surface); }
.section-title { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; color: var(--theme-text); margin-bottom: var(--theme-space-2); }
.section-subtitle { font-size: 15px; color: var(--theme-text-muted); margin-bottom: var(--theme-space-5); }

/* 桌面：2 列大卡片（T16：4列→2列，卡宽≈548px，min-height 300px） */
.modules-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--theme-space-5); }
.module-card {
	background: var(--theme-surface);
	border: 1px solid var(--theme-border);
	border-radius: var(--theme-radius-lg);
	box-shadow: var(--theme-shadow);
	padding: var(--theme-space-5);
	min-height: 300px;
	display: flex;
	flex-direction: column;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.module-card:hover { transform: translateY(-2px); box-shadow: var(--theme-shadow-hover); }
.module-head { display: flex; align-items: center; gap: var(--theme-space-3); margin-bottom: var(--theme-space-4); }
.module-icon {
	width: 52px;
	height: 52px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 26px;
	background: var(--theme-icon-bg);
	border-radius: 12px;
	flex-shrink: 0;
}
.module-name { font-size: 20px; font-weight: 600; }
.module-count {
	display: inline-block;
	background: var(--theme-primary-soft);
	color: var(--theme-primary);
	font-size: 12px;
	padding: 3px 10px;
	border-radius: 6px;
	margin-left: auto;
	white-space: nowrap;
	flex-shrink: 0;
}
.module-desc { font-size: 14px; color: var(--theme-text-muted); margin-bottom: var(--theme-space-4); line-height: 1.7; }
.module-posts { margin-bottom: var(--theme-space-3); flex-grow: 1; }
.module-post {
	display: flex;
	align-items: center;
	gap: var(--theme-space-2);
	min-height: 44px;
	padding: 10px 0;
	border-top: 1px solid var(--theme-divider);
	font-size: 14px;
	color: var(--theme-text);
}
.module-post:first-child { border-top: none; }
.module-post:hover .module-post-title { color: var(--theme-primary); }
.module-post-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; max-width: 75%; transition: color 0.15s ease; }
.module-post-date { font-size: 12px; color: var(--theme-text-muted); flex-shrink: 0; }
.external-link { color: var(--theme-primary-light); font-size: 12px; flex-shrink: 0; }
.module-more {
	display: inline-flex;
	align-items: center;
	gap: var(--theme-space-1);
	font-size: 14px;
	font-weight: 500;
	color: var(--theme-primary);
	align-self: flex-end;
	margin-top: var(--theme-space-3);
	padding: 10px 20px;
	min-height: 44px;
	border-radius: var(--theme-radius);
	transition: background 0.15s ease, color 0.15s ease;
}
.module-more:hover { background: var(--theme-primary-soft); color: var(--theme-primary-dark); }

/* ── 相关活动 ──────────────────────────────────────────── */
.activities-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--theme-space-4); }
.activity-card {
	background: var(--theme-surface);
	border: 1px solid var(--theme-border);
	border-radius: var(--theme-radius-lg);
	box-shadow: var(--theme-shadow);
	padding: var(--theme-space-4);
	display: flex;
	gap: var(--theme-space-4);
	align-items: flex-start;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.activity-card:hover { transform: translateY(-2px); box-shadow: var(--theme-shadow-hover); }
.activity-date {
	width: 68px;
	height: 68px;
	flex-shrink: 0;
	background: linear-gradient(180deg, var(--theme-primary), var(--theme-primary-dark));
	color: var(--theme-on-primary);
	border-radius: 10px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}
.activity-date-month { font-size: 12px; opacity: 0.85; }
.activity-date-day { font-size: 24px; font-weight: 700; line-height: 1.2; }
.activity-body { flex: 1; }
.activity-name { font-size: 17px; font-weight: 600; margin-bottom: var(--theme-space-2); }
.activity-location { font-size: 13px; color: var(--theme-text-muted); margin-bottom: var(--theme-space-3); }
.activity-link { font-size: 13px; font-weight: 500; }

/* ── 关于本站 ──────────────────────────────────────────── */
.about-card {
	background: var(--theme-surface);
	border: 1px solid var(--theme-border);
	border-radius: var(--theme-radius-lg);
	box-shadow: var(--theme-shadow);
	padding: var(--theme-space-6);
	display: flex;
	gap: var(--theme-space-6);
	align-items: center;
	max-width: 760px;
	margin: 0 auto;
}
.about-logo { width: 96px; height: 96px; flex-shrink: 0; border-radius: 24px; box-shadow: var(--theme-shadow-logo); }
.about-text h3 { font-size: 20px; font-weight: 600; margin-bottom: var(--theme-space-3); }
.about-text p { color: var(--theme-text-muted); margin-bottom: var(--theme-space-4); }
.contact-list li { display: flex; align-items: center; gap: var(--theme-space-2); font-size: 14px; color: var(--theme-text); padding: 4px 0; }
.contact-icon { flex-shrink: 0; }

/* ── 留言区 ────────────────────────────────────────────── */
.guestbook-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--theme-space-4); align-items: start; }
.card { background: var(--theme-surface); border: 1px solid var(--theme-border); border-radius: var(--theme-radius-lg); box-shadow: var(--theme-shadow); padding: var(--theme-space-5); }
.card-title { font-size: 17px; font-weight: 600; margin-bottom: var(--theme-space-4); }

.form-field { margin-bottom: var(--theme-space-3); }
.form-field label { display: block; font-size: 13px; color: var(--theme-text-muted); margin-bottom: var(--theme-space-2); }
.required { color: var(--theme-danger); }
.form-field input,
.form-field textarea {
	width: 100%;
	height: 40px;
	padding: 0 12px;
	border: 1px solid var(--theme-border);
	border-radius: var(--theme-radius);
	font-size: 14px;
	font-family: var(--theme-font);
	color: var(--theme-text);
	background: var(--theme-surface);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-field textarea { height: auto; padding: 10px 12px; resize: vertical; }
.form-field input:focus,
.form-field textarea:focus { outline: none; border-color: var(--theme-primary); box-shadow: var(--theme-focus-ring); }
.field-hint { font-size: 12px; color: var(--theme-text-muted); text-align: right; margin-top: 4px; }
.form-error { font-size: 13px; color: var(--theme-danger); margin-bottom: var(--theme-space-3); }

.guestbook-list { display: flex; flex-direction: column; gap: var(--theme-space-4); }
.guestbook-empty { color: var(--theme-text-muted); font-size: 14px; text-align: center; padding: var(--theme-space-5) 0; }
.gb-item { border-bottom: 1px solid var(--theme-divider); padding-bottom: var(--theme-space-3); }
.gb-item:last-child { border-bottom: none; padding-bottom: 0; }
.gb-meta { display: flex; align-items: center; gap: var(--theme-space-2); font-size: 13px; color: var(--theme-text-muted); margin-bottom: var(--theme-space-2); }
.gb-nickname { font-weight: 600; color: var(--theme-text); }
.gb-content { font-size: 14px; color: var(--theme-text); word-break: break-word; }

/* ── Footer ────────────────────────────────────────────── */
.footer { background: var(--theme-primary-darker); color: var(--theme-banner-text-muted); padding: var(--theme-space-6) 0 var(--theme-space-5); }
.footer-inner { text-align: center; }
.footer-brand { display: inline-flex; align-items: center; gap: var(--theme-space-2); font-size: 16px; font-weight: 600; color: var(--theme-banner-text); margin-bottom: var(--theme-space-3); }
.footer-brand img { border-radius: 5px; }
.footer p { font-size: 13px; margin: 6px 0; }
.footer-icp { opacity: 0.7; }
.footer-contact { margin-top: var(--theme-space-3); font-size: 13px; }
.footer-contact a { color: var(--theme-banner-text-muted); }
.footer-contact a:hover { color: var(--theme-banner-text); }
.footer-contact .sep { opacity: 0.5; margin: 0 var(--theme-space-2); }
.footer-credit { font-size: 12px; opacity: 0.75; }
.footer-credit a { color: var(--theme-banner-text-muted); }
.footer-credit a:hover { color: var(--theme-banner-text); }

/* ── 帖子详情独立页面（T31） ──────────────────────────── */
.post-page {
	max-width: var(--theme-modal-max-w);
	margin: 0 auto;
	padding: var(--theme-space-6) var(--theme-space-4) var(--theme-space-7);
	min-height: 100vh;
	box-sizing: border-box;
}
.post-back {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	color: var(--theme-primary);
	text-decoration: none;
	margin-bottom: var(--theme-space-4);
	transition: color 0.15s ease;
}
.post-back:hover { color: var(--theme-primary-dark); }
.post-article {
	background: var(--theme-surface);
	border: 1px solid var(--theme-border);
	border-radius: var(--theme-modal-radius);
	box-shadow: var(--theme-modal-shadow);
	padding: var(--theme-space-5) var(--theme-space-6);
}
.post-title { font-size: 24px; color: var(--theme-heading); line-height: 1.4; margin-bottom: var(--theme-space-3); }
.post-meta { font-size: 13px; color: var(--theme-text-muted); margin-bottom: var(--theme-space-4); }
.post-summary {
	font-size: 14px;
	color: var(--theme-text-muted);
	background: var(--theme-primary-soft);
	border-left: 3px solid var(--theme-primary);
	border-radius: var(--theme-radius);
	padding: var(--theme-space-3) var(--theme-space-4);
	margin-bottom: var(--theme-space-4);
	line-height: 1.7;
}
.post-content { font-size: 15px; line-height: 1.8; color: var(--theme-text); word-break: break-word; }
.post-content h1, .post-content h2, .post-content h3,
.post-content h4 { color: var(--theme-heading); margin: var(--theme-space-4) 0 var(--theme-space-2); line-height: 1.4; }
.post-content h1 { font-size: 22px; }
.post-content h2 { font-size: 19px; }
.post-content h3 { font-size: 16px; }
.post-content p { margin: var(--theme-space-3) 0; }
.post-content ul { list-style: disc; padding-left: 1.6em; margin: var(--theme-space-3) 0; }
.post-content li { margin: var(--theme-space-1) 0; }
.post-content pre {
	background: var(--theme-modal-code-bg);
	color: var(--theme-modal-code-text);
	border-radius: var(--theme-radius);
	padding: var(--theme-space-3) var(--theme-space-4);
	overflow-x: auto;
	font-size: 13px;
	line-height: 1.6;
}
.post-content code {
	font-family: var(--theme-font-mono);
	background: var(--theme-modal-code-bg);
	color: var(--theme-modal-code-text);
	border-radius: 4px;
	padding: 2px 6px;
	font-size: 0.92em;
}
.post-content pre code { background: none; padding: 0; border-radius: 0; }
.post-content a { color: var(--theme-primary); text-decoration: underline; }
.post-content a:hover { color: var(--theme-primary-dark); }
.post-content hr { border: none; border-top: 1px solid var(--theme-divider); margin: var(--theme-space-4) 0; }
.post-loading { color: var(--theme-text-muted); text-align: center; padding: var(--theme-space-5) 0; }
.post-error { color: var(--theme-danger); text-align: center; padding: var(--theme-space-5) 0; }
.post-error a { color: var(--theme-primary); text-decoration: underline; }
.post-empty { color: var(--theme-text-muted); text-align: center; padding: var(--theme-space-5) 0; }

/* ── 响应式 ────────────────────────────────────────────── */
/* 平板 640–1024px：导航折叠为汉堡 + 下拉、技术模块 2 列、统计 2×2、Hero 400px */
@media screen and (max-width: 1024px) {
	.navbar-toggle { display: flex; }
	.navbar-nav {
		position: absolute;
		top: 60px;
		left: 0;
		right: 0;
		background: var(--theme-surface);
		border-bottom: 1px solid var(--theme-border);
		box-shadow: var(--theme-shadow-nav);
		display: none;
		padding: var(--theme-space-2) var(--theme-space-4) var(--theme-space-4);
	}
	.navbar-nav.open { display: block; }
	.navbar-nav ul { flex-direction: column; gap: var(--theme-space-1); }
	.navbar-nav a { padding: 14px 12px; font-size: 15px; border-radius: var(--theme-radius); }

	.hero { min-height: 400px; }
	.modules-grid { grid-template-columns: repeat(2, 1fr); }
	.module-card { min-height: 280px; }
	/* T23: 平板统计方块保持一行等宽（--stat-cols 由 JS 动态设置），不再强制 2 列 */
}

/* 手机 <640px：单列堆叠、Hero 320px、统计 2×2、模块 1 列 */
@media screen and (max-width: 640px) {
	body { font-size: 14px; }
	.hero { min-height: 320px; }
	.hero-content h1 { font-size: 24px; }
	.hero-content p { font-size: 15px; }
	.hero-logo { width: 48px; height: 48px; margin-bottom: var(--theme-space-3); }
	.hero-actions .btn { flex: 1; max-width: 220px; }

	.stats-grid { grid-template-columns: repeat(2, 1fr); gap: var(--theme-space-3); }
	.stat-card { padding: var(--theme-space-3); }
	.stat-value { font-size: 28px; }
	.stat-label { font-size: 12px; }
	.stat-desc { font-size: 11px; }
	.stat-icon { width: 40px; height: 40px; font-size: 20px; }
	.modules-grid { grid-template-columns: 1fr; gap: var(--theme-space-4); }
	.module-card { min-height: 0; padding: var(--theme-space-4); }
	.module-icon { width: 48px; height: 48px; font-size: 24px; }
	.module-name { font-size: 18px; }
	.module-more { width: 100%; justify-content: center; text-align: center; }
	.activities-grid { grid-template-columns: 1fr; }
	.about-card { flex-direction: column; text-align: center; padding: var(--theme-space-5) var(--theme-space-4); }
	.guestbook-grid { grid-template-columns: 1fr; }
	.guestbook-form input, .guestbook-form textarea { min-height: 44px; }
	.guestbook-form .btn { width: 100%; }
	.section { padding: var(--theme-space-6) 0; }
	.section-title { font-size: 21px; }
	.container { padding-left: 16px; padding-right: 16px; }
	.footer-contact .sep { display: none; }
	.footer-contact a { display: inline-block; margin: 2px 0; }

	/* 帖子详情独立页面：手机适配 */
	.post-page { padding: var(--theme-space-4) 16px var(--theme-space-6); }
	.post-article { padding: var(--theme-space-4); border-radius: var(--theme-radius-lg); }
	.post-title { font-size: 19px; }
}

/* ── 动效偏好 ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
	* { animation: none !important; transition: none !important; }
	html { scroll-behavior: auto; }
}
