/* ============================================================
   符氏教育基金 - 共享设计系统
   前端工程师 - 全局样式 / 组件库
   气质：暖金 + 朱红点缀，米白底，衬线标题，庄重温情
   ============================================================ */

/* ---------- 1. CSS 变量 ---------- */
:root {
  /* 主色板 */
  --c-primary: #8C6D3F;        /* 暖金棕 */
  --c-primary-dark: #6E5530;   /* 深金棕 */
  --c-accent: #B03A2E;         /* 朱红（强调/金额） */
  --c-bg: #F7F4EE;             /* 米白 */
  --c-card: #FFFFFF;
  --c-text: #2B2620;
  --c-text-2: #7A7266;
  --c-line: #E8E2D6;
  --c-gold: #C9A86A;

  /* 圆角 / 阴影 */
  --r: 12px;
  --shadow: 0 2px 12px rgba(60, 45, 20, .08);

  /* 字体栈 */
  --font-serif: "Songti SC", "STSong", "SimSun", serif;
  --font-sans: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* ---------- 2. 基础重置与布局 ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
}

img { max-width: 100%; display: block; }
a { color: var(--c-primary); text-decoration: none; }
ul, ol { list-style: none; }
button { font-family: inherit; border: none; background: none; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; outline: none; }

/* 页面容器：模拟手机居中 */
.page {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: calc(56px + env(safe-area-inset-bottom));
}

@media (min-width: 481px) {
  .page { box-shadow: 0 0 24px rgba(60, 45, 20, .10); background: var(--c-bg); }
}

/* ---------- 3. 组件 ---------- */

/* --- 吸顶头部 --- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 90;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-line);
}
.app-header__title {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--c-text);
}

/* --- 首页横幅 --- */
.hero {
  position: relative;
  margin: 12px;
  padding: 28px 20px 24px;
  border-radius: var(--r);
  background: linear-gradient(135deg, #6E5530, #8C6D3F 60%, #A98A54);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hero::before { /* 顶部朱红细边 */
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--c-accent);
}
.hero__title {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 4px;
  color: #FFF;
  line-height: 1.4;
}
.hero__sub {
  margin-top: 8px;
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--c-gold);
}

/* --- 三格数据看板 --- */
.stats-row {
  display: flex;
  margin: 12px;
  padding: 16px 0;
  background: var(--c-card);
  border-radius: var(--r);
  box-shadow: var(--shadow);
}
.stats-row__item { flex: 1; text-align: center; }
.stats-row__item + .stats-row__item { border-left: 1px solid var(--c-line); }
.stats-row__num {
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--c-accent);
}
.stats-row__label {
  margin-top: 2px;
  font-size: 11px;
  color: var(--c-text-2);
}

/* --- 快捷入口宫格 --- */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 12px;
  padding: 16px 8px;
  background: var(--c-card);
  border-radius: var(--r);
  box-shadow: var(--shadow);
}
.quick-grid__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
}
.quick-grid__icon { font-size: 36px; line-height: 1; }
.quick-grid__text { font-size: 12px; color: var(--c-text); }

/* --- 通用卡片 --- */
.card {
  margin: 12px;
  padding: 16px;
  background: var(--c-card);
  border-radius: var(--r);
  box-shadow: var(--shadow);
}

/* --- 区块标题 --- */
.section-title {
  display: flex;
  align-items: center;
  margin: 16px 12px 8px;
}
.section-title::before {
  content: "";
  width: 3px;
  height: 16px;
  margin-right: 8px;
  border-radius: 2px;
  background: var(--c-accent);
}
.section-title__text {
  flex: 1;
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
}
.section-title__more { font-size: 12px; color: var(--c-text-2); }

/* --- 标签 --- */
.tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  line-height: 16px;
  color: #FFF;
  background: var(--c-text-2);
}
.tag--fund    { background: var(--c-primary); }  /* 基金动态 */
.tag--award   { background: var(--c-accent); }   /* 奖学表彰 */
.tag--student { background: #5B7A4F; }           /* 学子风采 */
.tag--notice  { background: #4A6B8A; }           /* 公告通知 */

/* --- 新闻列表行 --- */
.news-item {
  display: block;
  padding: 14px 12px;
  background: var(--c-card);
  border-bottom: 1px solid var(--c-line);
}
.news-item:last-child { border-bottom: none; }
.news-item__title {
  font-size: 15px;
  line-height: 1.5;
  color: var(--c-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-item__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 11px;
  color: var(--c-text-2);
}
.news-item__date { margin-left: auto; }

/* --- 底部导航 --- */
.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 100;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  height: 56px;
  padding-bottom: env(safe-area-inset-bottom);
  height: calc(56px + env(safe-area-inset-bottom));
  background: var(--c-card);
  border-top: 1px solid var(--c-line);
}
.tabbar__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: 56px;
  color: var(--c-text-2);
}
.tabbar__icon { font-size: 22px; line-height: 1; }
.tabbar__text { font-size: 11px; }
.tabbar__item.is-active { color: var(--c-primary); font-weight: 600; }

/* --- 按钮 --- */
.btn {
  display: inline-block;
  padding: 9px 22px;
  border-radius: 24px;
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
  color: var(--c-primary);
  background: transparent;
  border: 1px solid transparent;
  transition: transform .1s ease, opacity .1s ease;
}
.btn:active { transform: scale(.97); opacity: .9; }
.btn--primary { background: var(--c-primary); color: #FFF; }
.btn--accent  { background: var(--c-accent);  color: #FFF; }
.btn--ghost   { border-color: var(--c-primary); color: var(--c-primary); background: transparent; }
.btn--block   { display: block; width: 100%; }
.btn--lg      { padding: 13px 28px; font-size: 16px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* --- 表单行 --- */
.form-item {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--c-line);
}
.form-item:last-child { border-bottom: none; }
.form-item__label {
  flex: 0 0 84px;
  font-size: 14px;
  color: var(--c-text);
}
.form-item input,
.form-item select,
.form-item textarea {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  border-bottom: 1px solid transparent;
}
.form-item textarea { resize: none; min-height: 72px; line-height: 1.6; }
.form-item input:focus,
.form-item select:focus,
.form-item textarea:focus { border-bottom-color: var(--c-primary); }
.form-item ::placeholder { color: var(--c-text-2); }

/* --- 金额档位 --- */
.amount-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.amount-grid__item {
  padding: 12px 0;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--c-text);
  background: var(--c-card);
  border: 1px solid var(--c-line);
  border-radius: var(--r);
}
.amount-grid__item.is-active {
  border-color: var(--c-primary);
  background: #F3EBDC; /* 浅金底 */
  color: var(--c-primary-dark);
}

/* --- 光荣榜 --- */
.donor-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--c-line);
}
.donor-item:last-child { border-bottom: none; }
.avatar {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 16px;
  color: #FFF;
  background: var(--c-primary);
}
.donor-item__body { flex: 1; min-width: 0; }
.donor-item__name { font-size: 14px; font-weight: 600; }
.donor-item__msg {
  font-size: 12px;
  color: var(--c-text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.donor-item__amount {
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--c-accent);
}

/* --- 进度步骤条 --- */
.steps { display: flex; align-items: flex-start; padding: 8px 4px; }
.steps__item { flex: 1; text-align: center; position: relative; }
.steps__dot {
  position: relative;
  z-index: 1;
  width: 14px;
  height: 14px;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--c-line);
  border: 2px solid var(--c-line);
}
.steps__item::before { /* 连线 */
  content: "";
  position: absolute;
  top: 7px;
  left: -50%;
  width: 100%;
  height: 2px;
  background: var(--c-line);
}
.steps__item:first-child::before { display: none; }
.steps__label { margin-top: 6px; font-size: 11px; color: var(--c-text-2); }
.steps__item.is-done .steps__dot { background: var(--c-primary); border-color: var(--c-primary); }
.steps__item.is-done::before { background: var(--c-primary); }
.steps__item.is-done .steps__label { color: var(--c-primary); }
.steps__item.is-current .steps__dot {
  background: var(--c-accent);
  border-color: var(--c-accent);
  animation: pulse 1.4s ease-out infinite;
}
.steps__item.is-current .steps__label { color: var(--c-accent); font-weight: 600; }

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(176, 58, 46, .45); }
  70%  { box-shadow: 0 0 0 8px rgba(176, 58, 46, 0); }
  100% { box-shadow: 0 0 0 0 rgba(176, 58, 46, 0); }
}

/* --- 空状态 --- */
.empty { padding: 48px 0; text-align: center; }
.empty__icon { font-size: 44px; line-height: 1; }
.empty__text { margin-top: 10px; font-size: 13px; color: var(--c-text-2); }

/* --- 弹窗 --- */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(30, 24, 16, .5);
  animation: fadeIn .18s ease;
}
.modal {
  width: 82%;
  max-width: 340px;
  background: var(--c-card);
  border-radius: 16px;
  overflow: hidden;
  animation: fadeIn .22s ease;
}
.modal__title {
  padding: 18px 16px 4px;
  text-align: center;
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 1px;
}
.modal__body {
  padding: 12px 20px 20px;
  font-size: 14px;
  color: var(--c-text-2);
  text-align: center;
  line-height: 1.7;
}
.modal__btns { display: flex; border-top: 1px solid var(--c-line); }
.modal__btn {
  flex: 1;
  padding: 12px 0;
  font-size: 15px;
  color: var(--c-text-2);
  text-align: center;
}
.modal__btn + .modal__btn { border-left: 1px solid var(--c-line); }
.modal__btn--ok { color: var(--c-accent); font-weight: 600; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- Toast --- */
.toast {
  position: fixed;
  top: 64px;
  left: 50%;
  z-index: 300;
  transform: translateX(-50%);
  max-width: 80%;
  padding: 9px 18px;
  border-radius: 20px;
  font-size: 13px;
  color: #FFF;
  background: rgba(30, 24, 16, .82);
  animation: toastIn .25s ease, toastOut .3s ease 1.7s forwards;
}
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, -8px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
@keyframes toastOut {
  from { opacity: 1; }
  to   { opacity: 0; transform: translate(-50%, -8px); }
}

/* --- 分割线 / 工具类 --- */
.divider { height: 1px; margin: 12px 0; background: var(--c-line); border: none; }

.muted  { color: var(--c-text-2); }
.accent { color: var(--c-accent); }
.center { text-align: center; }
.mt-4  { margin-top: 4px; }  .mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; }
.mb-4  { margin-bottom: 4px; }  .mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }

/* ============================================================
   v2 优化（参照虎符教育基金会界面）新增样式
   ============================================================ */

/* --- 项目状态角标 --- */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  line-height: 16px;
  color: #FFF;
}

/* ============================================================
   v3 现代东方响应式设计系统
   ============================================================ */
:root {
  --c-primary: #173c3a;
  --c-primary-dark: #0e2b2a;
  --c-accent: #a63f32;
  --c-gold: #b99052;
  --c-bg: #f7f4ed;
  --c-card: #fffdf8;
  --c-text: #202624;
  --c-text-2: #68716c;
  --c-line: #dedbd1;
  --r: 14px;
  --shadow: 0 12px 36px rgba(17, 43, 41, .08);
}

body { background: var(--c-bg); }
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .2;
  background-image: radial-gradient(rgba(23,60,58,.13) .45px, transparent .45px);
  background-size: 7px 7px;
}
.page { position: relative; z-index: 1; }

.site-header {
  display: none; position: sticky; top: 0; z-index: 120; height: 76px;
  border-bottom: 1px solid rgba(185,144,82,.25); background: rgba(23,60,58,.97);
  backdrop-filter: blur(16px);
}
.site-header__inner { width: min(1200px, calc(100% - 48px)); height: 100%; margin: auto; display: flex; align-items: center; gap: 30px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: #fff; flex: 0 0 auto; }
.brand__mark { width: 42px; height: 42px; border: 1px solid var(--c-gold); border-radius: 50%; display: grid; place-items: center; font: 700 22px var(--font-serif); color: #f5dfb7; box-shadow: inset 0 0 0 4px rgba(185,144,82,.12); }
.brand b { display: block; font: 700 20px var(--font-serif); letter-spacing: 2px; }
.brand small { display: block; margin-top: -2px; color: rgba(255,255,255,.6); font-size: 10px; letter-spacing: 2px; }
.site-nav { margin-left: auto; display: flex; align-items: stretch; height: 100%; }
.site-nav a { position: relative; display: flex; align-items: center; padding: 0 13px; color: rgba(255,255,255,.78); font-size: 13px; }
.site-nav a:hover, .site-nav a.is-active { color: #fff; }
.site-nav a.is-active::after { content: ""; position: absolute; left: 13px; right: 13px; bottom: 0; height: 2px; background: var(--c-gold); }
.site-actions { display: flex; gap: 9px; }
.site-actions .btn { padding: 8px 15px; font-size: 13px; }
.site-actions .btn--ghost { border-color: rgba(255,255,255,.45); color: #fff; }

.btn--gold { background: var(--c-gold); color: #fff; border-color: var(--c-gold); box-shadow: 0 8px 20px rgba(185,144,82,.22); }
.btn--light { color: #fff; border: 1px solid rgba(255,255,255,.55); background: rgba(255,255,255,.08); backdrop-filter: blur(8px); }
.eyebrow { display: inline-block; color: #d8bd8c; font-size: 11px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; }
.eyebrow--dark { color: #9a713b; }
.text-link { color: var(--c-primary); font-size: 13px; font-weight: 600; }
.load-error { width: 100%; padding: 20px; color: var(--c-text-2); text-align: center; }

.page--home { max-width: none; padding-bottom: 0; }
.home-hero { position: relative; min-height: 590px; overflow: hidden; background: linear-gradient(110deg, #0d2d2c 0%, #173f3c 58%, #234f49 100%); color: #fff; }
.home-hero::before { content: ""; position: absolute; inset: 0; opacity: .18; background: radial-gradient(circle at 75% 35%, rgba(213,184,128,.8), transparent 27%), linear-gradient(90deg, transparent 50%, rgba(255,255,255,.08)); }
.home-hero__pattern { position: absolute; right: -90px; top: -180px; width: 620px; height: 620px; border: 1px solid rgba(185,144,82,.18); border-radius: 50%; box-shadow: 0 0 0 70px rgba(185,144,82,.035), 0 0 0 140px rgba(185,144,82,.025); }
.home-hero__pattern::after { content: "符"; position: absolute; inset: 0; display: grid; place-items: center; color: rgba(185,144,82,.07); font: 700 310px var(--font-serif); }
.home-hero__content { position: relative; z-index: 2; width: min(1200px, calc(100% - 48px)); margin: 0 auto; padding-top: 105px; }
.home-hero h1 { margin-top: 18px; max-width: 620px; color: #fff; font: 700 clamp(52px, 5.5vw, 78px)/1.12 var(--font-serif); letter-spacing: 7px; }
.home-hero__content > p { max-width: 540px; margin-top: 22px; color: rgba(255,255,255,.72); font-size: 16px; line-height: 2; letter-spacing: .5px; }
.home-hero__actions { display: flex; gap: 12px; margin-top: 31px; }
.home-hero__visual { position: absolute; z-index: 1; right: max(5%, calc((100% - 1200px)/2)); top: 95px; width: 390px; height: 340px; display: flex; align-items: center; justify-content: center; }
.scholar-seal { width: 230px; height: 230px; display: grid; place-items: center; border: 1px solid rgba(216,189,140,.42); border-radius: 50%; box-shadow: inset 0 0 0 16px rgba(185,144,82,.05), 0 24px 60px rgba(0,0,0,.16); }
.scholar-seal::before, .scholar-seal::after { content: ""; position: absolute; width: 310px; height: 1px; background: linear-gradient(90deg, transparent, rgba(216,189,140,.5), transparent); transform: rotate(45deg); }
.scholar-seal::after { transform: rotate(-45deg); }
.scholar-seal span { font: 700 118px var(--font-serif); color: rgba(244,220,177,.9); }
.scholar-seal small { position: absolute; margin-top: 280px; color: rgba(255,255,255,.5); letter-spacing: 5px; }
.visual-caption { position: absolute; right: 0; bottom: 0; padding: 12px 16px; border-left: 2px solid var(--c-gold); color: rgba(255,255,255,.6); font-family: var(--font-serif); line-height: 1.8; }
.visual-caption b { color: #fff; font-size: 18px; letter-spacing: 2px; }
.trust-strip { position: absolute; z-index: 3; left: 50%; bottom: 0; transform: translateX(-50%); width: min(1200px, calc(100% - 48px)); min-height: 100px; display: grid; grid-template-columns: repeat(4,1fr); background: rgba(10,38,36,.88); border: 1px solid rgba(185,144,82,.22); border-bottom: 0; backdrop-filter: blur(12px); }
.trust-strip > div { display: flex; flex-direction: column; justify-content: center; padding: 20px 30px; border-right: 1px solid rgba(255,255,255,.12); }
.trust-strip > div:last-child { border-right: 0; }
.trust-strip b { color: #f0d29d; font: 700 25px var(--font-serif); font-variant-numeric: tabular-nums; }
.trust-strip span { margin-top: 4px; color: rgba(255,255,255,.55); font-size: 11px; letter-spacing: 1px; }

.home-shortcuts { width: min(1200px, calc(100% - 48px)); margin: 38px auto 10px; display: grid; grid-template-columns: repeat(4,1fr); border: 1px solid var(--c-line); background: rgba(255,253,248,.76); }
.home-shortcuts a { display: grid; grid-template-columns: 46px 1fr; column-gap: 14px; padding: 22px; color: var(--c-text); border-right: 1px solid var(--c-line); }
.home-shortcuts a:last-child { border: 0; }
.shortcut-icon { grid-row: 1/3; width: 46px; height: 46px; border: 1px solid rgba(185,144,82,.55); border-radius: 50%; display: grid; place-items: center; color: var(--c-primary); font: 700 18px var(--font-serif); }
.home-shortcuts b { font: 700 15px var(--font-serif); letter-spacing: 1px; }
.home-shortcuts small { color: var(--c-text-2); font-size: 11px; }
.home-section { width: min(1200px, calc(100% - 48px)); margin: 76px auto; }
.home-section__heading { margin-bottom: 25px; display: flex; align-items: end; justify-content: space-between; }
.home-section__heading h2, .story-panel h2, .home-cta h2 { margin-top: 5px; font: 700 30px var(--font-serif); letter-spacing: 3px; }
.home-section__heading > a { color: var(--c-text-2); font-size: 13px; }
.project-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.project-card { display: block; color: var(--c-text); background: var(--c-card); border: 1px solid var(--c-line); box-shadow: 0 10px 30px rgba(23,60,58,.05); transition: transform .2s, box-shadow .2s; }
.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.project-card__image { position: relative; height: 180px; display: grid; place-items: center; overflow: hidden; background: linear-gradient(135deg, #163d3a, #315e57); }
.project-card--gold .project-card__image { background: linear-gradient(135deg,#785f37,#b28b50); }
.project-card--ink .project-card__image { background: linear-gradient(135deg,#283735,#546560); }
.project-card__image::before { content: ""; position: absolute; width: 220px; height: 220px; border: 1px solid rgba(255,255,255,.15); border-radius: 50%; box-shadow: 0 0 0 28px rgba(255,255,255,.035); }
.project-card__glyph { position: relative; color: rgba(255,255,255,.85); font: 700 75px var(--font-serif); }
.project-card__image .badge { position: absolute; left: 16px; top: 16px; }
.project-card__body { padding: 20px; }
.project-card h3 { min-height: 44px; font: 700 18px/1.45 var(--font-serif); }
.project-card p { height: 42px; margin-top: 8px; overflow: hidden; color: var(--c-text-2); font-size: 12px; line-height: 1.75; }
.project-card__meta { display: flex; justify-content: space-between; margin-top: 18px; color: var(--c-text-2); font-size: 11px; }
.project-card__meta b { color: var(--c-accent); font-size: 15px; }

.story-finance-grid { width: min(1200px, calc(100% - 48px)); margin: 76px auto; display: grid; grid-template-columns: 1fr 1.25fr; background: #efeadf; border: 1px solid var(--c-line); }
.story-panel, .finance-panel { padding: 44px; }
.story-panel { position: relative; overflow: hidden; color: #fff; background: var(--c-primary); }
.story-panel::after { content: "文"; position: absolute; right: -15px; bottom: -70px; color: rgba(255,255,255,.04); font: 700 220px var(--font-serif); }
.story-panel h2 { color: #fff; }
.story-panel blockquote { position: relative; z-index: 1; margin-top: 30px; font: 19px/2 var(--font-serif); color: #f4e8d2; }
.story-panel p { margin: 15px 0; color: rgba(255,255,255,.6); font-size: 12px; }
.story-panel .text-link { color: #e7c990; }
.finance-panel .home-section__heading { margin-bottom: 18px; }
.finance-summary { display: grid; grid-template-columns: repeat(3,1fr); border-top: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line); }
.finance-summary > div { padding: 24px 15px; border-right: 1px solid var(--c-line); }
.finance-summary > div:last-child { border: 0; }
.finance-summary span { display: block; color: var(--c-text-2); font-size: 11px; }
.finance-summary b { display: inline-block; margin-top: 8px; color: var(--c-primary); font: 700 21px var(--font-serif); }
.finance-summary small { margin-left: 3px; color: var(--c-text-2); }
.finance-note { margin-top: 18px; color: var(--c-text-2); font-size: 12px; }

.news-editorial { display: grid; grid-template-columns: 1.4fr 1fr; gap: 0 34px; border-top: 1px solid var(--c-line); }
.editorial-item { display: block; padding: 22px 0; color: var(--c-text); border-bottom: 1px solid var(--c-line); }
.editorial-item--lead { grid-row: span 3; padding-right: 34px; border-right: 1px solid var(--c-line); }
.editorial-item__date { color: #9a713b; font-size: 11px; letter-spacing: 1px; }
.editorial-item h3 { margin-top: 6px; font: 700 17px/1.55 var(--font-serif); }
.editorial-item--lead h3 { margin-top: 15px; font-size: 26px; }
.editorial-item p { margin: 8px 0; color: var(--c-text-2); font-size: 12px; line-height: 1.8; }
.home-cta { width: min(1200px, calc(100% - 48px)); margin: 80px auto; padding: 42px 52px; display: flex; align-items: center; justify-content: space-between; color: #fff; background: var(--c-primary); box-shadow: var(--shadow); }
.home-cta h2 { color: #fff; }
.home-cta p { margin-top: 8px; color: rgba(255,255,255,.58); }
.site-footer { padding: 45px max(24px, calc((100% - 1200px)/2)); display: grid; grid-template-columns: 1fr auto; gap: 25px; align-items: center; color: rgba(255,255,255,.55); background: #0d2c2a; }
.brand--footer b { font-size: 18px; }.site-footer__links { display: flex; gap: 25px; }.site-footer__links a { color: rgba(255,255,255,.68); }.site-footer p { grid-column: 1/-1; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1); font-size: 11px; }

.tabbar__icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

@media (min-width: 1024px) {
  .site-header { display: block; }
  .page:not(.page--home) { max-width: 1120px; padding: 26px 20px 70px; }
  .page:not(.page--home) > .app-header { margin: -26px -20px 24px; }
  .tabbar { display: none; }
  .action-bar { max-width: 1120px; left: 50%; right: auto; transform: translateX(-50%); }
}

@media (max-width: 1023px) {
  .home-hero { min-height: 660px; }
  .home-hero__visual { opacity: .35; right: -80px; }
  .home-hero__content { padding-top: 75px; }
  .trust-strip { grid-template-columns: repeat(2,1fr); }
  .trust-strip > div { padding: 13px 20px; border-bottom: 1px solid rgba(255,255,255,.1); }
  .home-shortcuts { grid-template-columns: repeat(2,1fr); }
  .home-shortcuts a:nth-child(2) { border-right: 0; }.home-shortcuts a:nth-child(-n+2) { border-bottom: 1px solid var(--c-line); }
  .project-grid { grid-template-columns: repeat(2,1fr); }.project-card:last-child { display: none; }
  .story-finance-grid { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  body { font-size: 14px; }
  .page { max-width: none; }
  .home-page .page { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .home-hero { min-height: 600px; }
  .home-hero__content { width: auto; padding: 54px 22px 0; }
  .home-hero h1 { margin-top: 13px; font-size: 42px; line-height: 1.18; letter-spacing: 4px; }
  .home-hero__content > p { margin-top: 16px; font-size: 13px; line-height: 1.8; }
  .home-hero__actions { margin-top: 24px; }.home-hero__actions .btn { flex: 1; padding: 12px 10px; }
  .home-hero__visual { top: 40px; right: -145px; transform: scale(.7); }
  .trust-strip { width: calc(100% - 24px); min-height: 174px; }
  .trust-strip > div { padding: 12px 15px; }.trust-strip b { font-size: 20px; }.trust-strip span { font-size: 10px; }
  .home-shortcuts { width: calc(100% - 24px); margin-top: 16px; grid-template-columns: repeat(4,1fr); border: 0; background: var(--c-card); box-shadow: 0 7px 24px rgba(23,60,58,.07); }
  .home-shortcuts a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 15px 5px; border: 0 !important; text-align: center; }.home-shortcuts small { display: none; }.home-shortcuts b { font: 600 11px var(--font-sans); }.shortcut-icon { width: 40px; height: 40px; font-size: 15px; }
  .home-section, .story-finance-grid, .home-cta { width: calc(100% - 24px); margin: 42px auto; }
  .home-section__heading { margin-bottom: 16px; }.home-section__heading h2, .story-panel h2, .home-cta h2 { font-size: 23px; }.home-section__heading > a { font-size: 11px; }
  .project-grid { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }.project-card, .project-card:last-child { display: block; flex: 0 0 84%; scroll-snap-align: start; }.project-card__image { height: 145px; }
  .story-finance-grid { display: block; }.story-panel, .finance-panel { padding: 27px 22px; }.story-panel blockquote { margin-top: 18px; font-size: 16px; }
  .finance-summary > div { padding: 17px 7px; }.finance-summary b { font-size: 16px; }
  .news-editorial { display: block; }.editorial-item--lead { padding-right: 0; border-right: 0; }.editorial-item--lead h3 { font-size: 20px; }
  .home-cta { display: block; padding: 28px 22px; }.home-cta .btn { display: block; margin-top: 22px; }
  .site-footer { display: block; padding: 34px 22px; }.site-footer__links { margin-top: 25px; display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }.site-footer p { margin-top: 24px; }
  .tabbar { height: calc(62px + env(safe-area-inset-bottom)); max-width: none; }.tabbar__item { height: 62px; gap: 3px; }.tabbar__text { font-size: 10px; }
  .app-header { background: rgba(247,244,237,.94); backdrop-filter: blur(14px); }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
.badge--ongoing  { background: #3D8B5F; } /* 进行中 */
.badge--finished { background: #8A8578; } /* 已完成 */

/* --- 项目卡（列表页/首页共用） --- */
.proj-card {
  display: flex;
  gap: 12px;
  margin: 12px;
  padding: 14px;
  background: var(--c-card);
  border-radius: var(--r);
  box-shadow: var(--shadow);
}
.proj-card__cover {
  position: relative;
  flex: 0 0 84px;
  width: 84px;
  height: 84px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  background: linear-gradient(135deg, #6E5530, #A98A54);
  overflow: hidden;
}
.proj-card__cover .badge { position: absolute; top: 4px; left: 4px; }
.proj-card__body { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.proj-card__title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.proj-card__stats { margin-top: 8px; font-size: 12px; color: var(--c-text-2); }
.proj-card__stats .num {
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--c-accent);
}

/* --- 进度条 --- */
.progress {
  height: 6px;
  margin-top: 10px;
  border-radius: 3px;
  background: var(--c-line);
  overflow: hidden;
}
.progress__bar {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--c-accent), #D0665C);
  transition: width .4s ease;
}
.progress__meta {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 10px;
  color: var(--c-text-2);
}

/* --- 列表末尾 --- */
.list-end { padding: 22px 0 8px; text-align: center; font-size: 12px; color: var(--c-text-2); }

/* --- 搜索栏 --- */
.searchbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px;
  padding: 9px 12px;
  background: var(--c-card);
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.searchbar__icon { font-size: 14px; color: var(--c-text-2); }
.searchbar input { flex: 1; border: none; background: transparent; font-size: 13px; }

/* --- 筛选 chips --- */
.chips { display: flex; gap: 8px; margin: 0 12px 4px; }
.chip {
  flex: 0 0 auto;
  padding: 5px 14px;
  border-radius: 16px;
  font-size: 12px;
  color: var(--c-text-2);
  background: var(--c-card);
  border: 1px solid var(--c-line);
}
.chip.is-active {
  color: var(--c-primary-dark);
  font-weight: 600;
  background: #F3EBDC;
  border-color: var(--c-primary);
}

/* --- 项目详情页 --- */
.proj-hero {
  position: relative;
  height: 168px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 72px;
  background: linear-gradient(135deg, #5C4626, #6E5530 55%, #8C6D3F);
  overflow: hidden;
}
.proj-hero::after { /* 底部暗化渐变，衔接卡片 */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 44px;
  background: linear-gradient(transparent, rgba(30, 24, 16, .35));
}
.proj-hero .badge { position: absolute; top: 12px; left: 12px; font-size: 11px; padding: 3px 10px; }
.proj-raise-card {
  margin: -28px 12px 12px;
  padding: 16px;
  background: var(--c-card);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  position: relative;
  z-index: 1;
}
.proj-raise-card__row { display: flex; align-items: flex-end; justify-content: space-between; }
.proj-raise-card__amount {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--c-accent);
  line-height: 1.1;
}
.proj-raise-card__label { font-size: 11px; color: var(--c-text-2); margin-top: 4px; }
.proj-raise-card__count { text-align: right; font-size: 12px; color: var(--c-text-2); }
.proj-raise-card__count .num { display: block; font-size: 18px; font-weight: 700; color: var(--c-text); }

/* --- 详情三 Tab --- */
.ptabs {
  display: flex;
  margin: 12px;
  padding: 4px;
  background: var(--c-card);
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.ptabs__item {
  flex: 1;
  padding: 8px 0;
  text-align: center;
  font-size: 13px;
  color: var(--c-text-2);
  border-radius: 8px;
}
.ptabs__item.is-active {
  color: var(--c-primary-dark);
  font-weight: 600;
  background: #F3EBDC;
}

/* --- 文章正文段落 --- */
.article-content p { margin-bottom: 12px; font-size: 14px; line-height: 1.9; color: var(--c-text); }

/* --- 底部固定操作条（详情页捐赠按钮） --- */
.action-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 100;
  max-width: 480px;
  margin: 0 auto;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: var(--c-card);
  border-top: 1px solid var(--c-line);
}

/* --- 个人中心（仿参考图：渐变头部 + 宫格） --- */
.my-hero {
  margin: 0 0 12px;
  padding: 36px 20px 56px;
  background: linear-gradient(160deg, #6E5530, #8C6D3F 45%, #A8573B 85%, #B03A2E);
  color: #FFF;
}
.my-hero__top { display: flex; align-items: center; gap: 14px; }
.my-hero__avatar {
  flex: 0 0 62px;
  width: 62px; height: 62px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif); font-size: 26px;
  color: var(--c-primary-dark);
  background: #F3EBDC;
  border: 2px solid rgba(255, 255, 255, .5);
}
.my-hero__name { font-size: 17px; font-weight: 700; letter-spacing: 1px; }
.my-hero__edit {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 11px;
  color: rgba(255, 255, 255, .92);
  border: 1px solid rgba(255, 255, 255, .45);
}
.my-hero__amount { margin-top: 22px; text-align: center; }
.my-hero__amount .num {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.my-hero__amount .label { margin-top: 4px; font-size: 12px; color: rgba(255, 255, 255, .85); letter-spacing: 2px; }

/* --- 宫格菜单 --- */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: -34px 12px 12px;
  padding: 16px 8px 8px;
  background: var(--c-card);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  position: relative;
  z-index: 1;
}
.menu-grid__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 0;
}
.menu-grid__icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  background: #F3EBDC;
}
.menu-grid__text { font-size: 12px; color: var(--c-text); }
.menu-grid--plain { margin-top: 12px; }

/* --- 首页 hero 悬浮数据卡 --- */
.hero--v2 { margin-bottom: 0; }
.hero-stats {
  display: flex;
  margin: -26px 24px 12px;
  padding: 14px 0;
  background: var(--c-card);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  position: relative;
  z-index: 1;
}

/* --- 页脚 --- */
.page-footer { padding: 28px 0 16px; text-align: center; font-size: 11px; color: var(--c-text-2); line-height: 1.9; }

/* --- 骨架屏 --- */
.skeleton {
  border-radius: 6px;
  background: linear-gradient(90deg, #EDE8DD 25%, #F6F2E9 50%, #EDE8DD 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
}
.skeleton--row { height: 16px; margin: 12px; }
@keyframes shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* v3 内页桌面增强（放在文件末尾以覆盖早期移动端组件值） */
.proj-card__glyph { position: relative; z-index: 1; color: rgba(255,255,255,.88); font: 700 42px var(--font-serif); }
.searchbar { border: 1px solid var(--c-line); box-shadow: none; }
.card, .proj-card, .searchbar, .ptabs, .proj-raise-card { background-color: var(--c-card); }
.app-header__title { color: var(--c-primary-dark); }
.avatar { background: var(--c-primary); }
.amount-grid__item.is-active, .chip.is-active, .ptabs__item.is-active { background: #e9e1d1; color: var(--c-primary); border-color: var(--c-gold); }

@media (min-width: 1024px) {
  .action-bar { max-width: 1120px; left: 50%; right: auto; transform: translateX(-50%); }
  .page > #list { display: grid; grid-template-columns: repeat(2,1fr); gap: 18px; }
  .page > #list .proj-card { margin: 0; min-height: 150px; }
  .page > #list .empty { grid-column: 1/-1; }
  .proj-card__cover { flex-basis: 130px; width: 130px; height: 120px; }
  #yearList { display: grid; grid-template-columns: repeat(3,1fr); }
  #yearList .card { margin: 10px; }
  #honorList { display: grid; grid-template-columns: repeat(2,1fr); gap: 0 18px; }
  #honorList .section-title { grid-column: 1/-1; }
  .menu-grid { grid-template-columns: repeat(3,1fr); }
}
