/* ============================================================
   微光公益 · Weiguang Charity — theme.css
   单文件设计系统 · 原生 CSS · 无预处理依赖
   风格：温润纸面 / 松墨绿 / 丰收琥珀 / 克制的赭红
   ============================================================ */

/* ---------- 1. Design tokens ---------- */
:root {
  /* 色板 */
  --paper: #f9f6ee;          /* 米白纸面 · 页面底色 */
  --surface: #fffdf7;        /* 卡片纸面 */
  --surface-deep: #f1ead9;   /* 深纸面 / 分区底 */
  --ink: #22312a;            /* 正文墨色（偏绿的炭墨） */
  --ink-strong: #14231c;     /* 重标题 */
  --muted: #5a6a60;          /* 次要文字 · 对纸面 ≥ 4.5:1 */
  --line: #e3dbc5;           /* 1px 发丝线 */
  --line-strong: #cfc3a4;    /* 稍重的分隔线 */

  --pine: #1d4a38;           /* 主色 · 松墨绿 */
  --pine-deep: #123226;      /* 深色底（页脚/侧栏/CTA） */
  --pine-tint: #e6eee6;      /* 主色淡底 */
  --amber: #d98a2b;          /* 强调 · 丰收琥珀（装饰） */
  --amber-deep: #9a5f15;     /* 琥珀文字级 · 纸面上 ≥4.5:1 */
  --amber-soft: #f6e7cd;     /* 琥珀淡底 */
  --terra: #b0563c;          /* 克制赭红 */
  --terra-deep: #94412a;     /* 赭红文字级 / 警示 */
  --terra-soft: #f4e0d7;     /* 赭红淡底 */

  /* 字体 */
  --font-ui: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-display: "Noto Serif SC", "Songti SC", Georgia, serif;

  /* 流式字号 */
  --fs-display: clamp(2.05rem, 1.35rem + 3.4vw, 3.4rem);
  --fs-h1: clamp(1.7rem, 1.3rem + 2vw, 2.5rem);
  --fs-h2: clamp(1.45rem, 1.2rem + 1.2vw, 2rem);
  --fs-h3: clamp(1.15rem, 1.05rem + 0.5vw, 1.35rem);
  --fs-base: 1.0625rem;

  /* 圆角 / 阴影 / 间距 */
  --r-sm: 9px;
  --r-md: 14px;
  --r-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(20, 35, 28, 0.05), 0 3px 10px rgba(20, 35, 28, 0.06);
  --shadow-md: 0 2px 4px rgba(20, 35, 28, 0.06), 0 10px 28px rgba(20, 35, 28, 0.1);
  --space: 1.5rem;

  /* 布局 */
  --header-h: 68px;
  --container: 1140px;
  --prose-w: 68ch;

  --ease: cubic-bezier(0.25, 0.6, 0.3, 1);
  color-scheme: light;
}

/* ---------- 2. Reset（轻量） ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

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

body {
  min-height: 100vh;
  font-family: var(--font-ui);
  font-size: var(--fs-base);
  line-height: 1.85;
  letter-spacing: 0.01em;
  color: var(--ink);
  background-color: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; }
img, video { height: auto; }

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink-strong);
  letter-spacing: 0.02em;
  overflow-wrap: break-word;
}

h1, h2, .h-serif {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-wrap: balance;
}

p, ul, ol, figure { overflow-wrap: break-word; }
ul, ol { padding-left: 1.4em; }

a {
  color: var(--pine);
  text-decoration-color: rgba(29, 74, 56, 0.35);
  text-underline-offset: 0.2em;
}
a:hover { color: var(--pine-deep); }

button, input, textarea, select {
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
}

button { cursor: pointer; }

hr { border: 0; }

:focus-visible {
  outline: 2px solid var(--amber-deep);
  outline-offset: 2px;
  border-radius: 2px;
}

::selection { background: #f0dcaf; color: var(--ink-strong); }

[id] { scroll-margin-top: calc(var(--header-h) + 20px); }

/* ---------- 3. 工具类 ---------- */
.muted { color: var(--muted); }
.center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
.is-hidden { display: none !important; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.icon {
  display: inline-block;
  width: 1.25em;
  height: 1.25em;
  vertical-align: -0.22em;
  flex-shrink: 0;
}

/* ---------- 4. 布局骨架 ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.25rem);
}

.section {
  padding-block: clamp(3.25rem, 7.5vw, 6rem);
}

.section-head {
  display: grid;
  gap: 1rem 3rem;
  margin-bottom: clamp(2rem, 4.5vw, 3.25rem);
}
.section-head .eyebrow { margin-bottom: 0.5rem; }
.section-head .section-lead { align-self: end; }

@media (min-width: 901px) {
  .section-head {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: end;
  }
  .section-head > .btn { justify-self: start; }
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  letter-spacing: 0.04em;
}

.section-lead {
  color: var(--muted);
  max-width: 58ch;
  font-size: 1rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--amber-deep);
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--amber);
  flex-shrink: 0;
}

/* 栅格：移动优先，小屏单列 */
.grid { display: grid; gap: var(--space); }
.grid > * { min-width: 0; }

.grid-2 { grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.grid-3 { grid-template-columns: 1fr; }
@media (min-width: 620px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 981px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 981px) { .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.stack > * { min-width: 0; }

.divider {
  height: 1px;
  background: var(--line);
  margin-block: clamp(2rem, 4vw, 3rem);
}

/* 详情页右栏捐赠卡吸附（渐进增强，旧浏览器自然退化为普通布局） */
.grid-2 > *:has(.progress),
.grid-2 > *:has(.amount-chip) {
  align-self: start;
  position: sticky;
  top: calc(var(--header-h) + 1.25rem);
}
@media (max-width: 719px) {
  .grid-2 > *:has(.progress),
  .grid-2 > *:has(.amount-chip) { position: static; }
}

/* ---------- 5. 页头与导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(249, 246, 238, 0.96);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.25s var(--ease), background-color 0.25s var(--ease);
}
.site-header.is-scrolled {
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.site-header-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink-strong);
  flex-shrink: 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--pine);
  color: #f3e7c9;
  overflow: hidden;
  flex-shrink: 0;
}
.brand-mark svg, .brand-mark img { width: 24px; height: 24px; }

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink-strong);
}
.brand-text small {
  font-family: var(--font-ui);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--muted);
}

[data-nav] { min-width: 0; }

.nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.35rem 0.1rem;
  text-decoration: none;
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.nav-link:hover { color: var(--pine-deep); }
.nav-link.is-active {
  color: var(--pine-deep);
  font-weight: 600;
  border-bottom-color: var(--amber);
}

.nav-cta { display: inline-flex; margin-top: 0.5rem; }

/* 移动端收起顶部 CTA，避免 320px 挤压；入口移入折叠菜单 */
.nav-donate-link { display: none; }
@media (max-width: 900px) {
  .nav-donate-link {
    display: inline-flex;
    margin-top: 0.45rem;
    color: var(--pine-deep);
    font-weight: 600;
    border-bottom-color: var(--amber);
  }
}
@media (max-width: 600px) {
  .site-header .nav-cta { display: none; }
  .site-header-inner { gap: 0.75rem; }
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 44px;
  height: 44px;
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  color: var(--ink-strong);
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}
/* 模板若输出空按钮，则用伪元素绘制线条 */
.nav-toggle:empty::before,
.nav-toggle:empty::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* 移动端：导航折叠为页头下方面板 */
@media (max-width: 900px) {
  [data-nav] { display: none; }
  [data-nav].is-open {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    padding: 0.75rem clamp(1.25rem, 4vw, 2.25rem) 1.5rem;
  }
  .site-header { position: sticky; }
}

@media (min-width: 901px) {
  [data-nav] { display: block; margin-left: auto; }
  .nav { flex-direction: row; align-items: center; gap: 1.75rem; }
  .nav-link { min-height: auto; padding: 0.25rem 0; }
  .nav-cta { margin-top: 0; margin-left: 0.25rem; }
  .nav-toggle { display: none; }
}

/* ---------- 6. Hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(3rem, 7vw, 5.5rem);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(1100px 460px at 86% -12%, rgba(217, 138, 43, 0.09), transparent 62%),
    radial-gradient(900px 420px at -8% 110%, rgba(29, 74, 56, 0.05), transparent 60%),
    var(--paper);
  overflow: hidden;
}

.hero-inner {
  display: grid;
  gap: clamp(2.25rem, 5vw, 3.75rem);
  align-items: center;
}
@media (min-width: 901px) {
  .hero-inner { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
}

.hero-copy > * + * { margin-top: 1.1rem; }

.hero-title {
  font-family: var(--font-display);
  font-size: var(--fs-display);
  line-height: 1.22;
  letter-spacing: 0.04em;
  color: var(--ink-strong);
}

.hero-lead {
  color: var(--muted);
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.2rem);
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.75rem;
}

.hero-note {
  margin-top: 1.9rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  color: var(--muted);
}

.hero-art {
  position: relative;
  min-width: 0;
}
.hero-art img,
.hero-art > svg {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 880 / 640;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
}
/* 编辑感的错位细框 */
@media (min-width: 901px) {
  .hero-art { z-index: 0; }
  .hero-art::after {
    content: "";
    position: absolute;
    top: 14px;
    right: -14px;
    bottom: -14px;
    left: 14px;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-lg);
    z-index: -1;
  }
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem 0;
  margin-top: clamp(2rem, 4.5vw, 3rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding-right: clamp(1.25rem, 3.5vw, 2.5rem);
}
.stat + .stat {
  border-left: 1px solid var(--line);
  padding-left: clamp(1.25rem, 3.5vw, 2.5rem);
}

.stat-value {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 1.3rem + 1.4vw, 2.1rem);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  color: var(--ink-strong);
}

.stat-label {
  font-size: 0.8125rem;
  letter-spacing: 0.05em;
  color: var(--muted);
}

/* ---------- 7. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 46px;
  padding: 0.5rem 1.5rem;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease),
    color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--pine);
  color: #f6f2e6;
}
.btn-primary:hover {
  background: var(--pine-deep);
  color: #fdfaf0;
  box-shadow: var(--shadow-sm);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--pine);
}
.btn-ghost:hover {
  border-color: var(--pine);
  background: var(--pine-tint);
  color: var(--pine-deep);
}

.btn-light {
  background: #f6f0df;
  color: var(--pine-deep);
}
.btn-light:hover {
  background: #fdf9ec;
  box-shadow: var(--shadow-sm);
}

.btn-danger {
  background: var(--terra-deep);
  color: #fdf6f2;
}
.btn-danger:hover { background: #7c3522; }

.btn-sm { min-height: 38px; padding: 0.3rem 0.95rem; font-size: 0.875rem; border-radius: 8px; }
.btn-block { display: flex; width: 100%; }

/* ---------- 8. 卡片 ---------- */
.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-deep);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.card-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card-media > .icon {
  width: clamp(44px, 32%, 84px);
  height: auto;
  aspect-ratio: 1;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1.4rem 1.5rem 1.55rem;
  flex-grow: 1;
}

.card-title {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.45;
}
.card-title a { color: inherit; text-decoration: none; }
.card-title a:hover { text-decoration-color: var(--amber); text-decoration-line: underline; text-underline-offset: 0.25em; }

.card-text {
  color: var(--muted);
  font-size: 0.9375rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.9rem;
  font-size: 0.8125rem;
  color: var(--muted);
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--pine);
  text-decoration: none;
}
.card-link::after {
  content: "→";
  transition: transform 0.2s var(--ease);
}
.card-link:hover::after { transform: translateX(3px); }

.card-grid {
  display: grid;
  gap: var(--space);
  grid-template-columns: 1fr;
}
@media (min-width: 620px) { .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 981px) { .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* 项目卡 */
.project-card {
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.project-card:hover,
.project-card:focus-within {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.project-card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-deep);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.project-card-media > .tone-amber,
.project-card-media > .tone-teal,
.project-card-media > .tone-rose,
.project-card-media > .tone-indigo,
.project-card-media > .tone-green,
.project-card-media > .tone-sky {
  width: 100%;
  height: 100%;
}
.project-card-media img { display: block; width: 100%; height: 100%; object-fit: cover; }

.project-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1.4rem 1.5rem 1.55rem;
  flex-grow: 1;
}

/* ---------- 9. 筹款进度 ---------- */
.progress {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #ebe3cc;
  border: 1px solid var(--line);
  overflow: hidden;
}
.progress-bar {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: 999px;
  background: var(--pine);
  transition: width 0.6s var(--ease);
}

.progress-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.25rem 1rem;
  margin-top: 0.55rem;
  font-size: 0.8125rem;
  color: var(--muted);
}

.progress-num {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink-strong);
}
.progress-num strong, .progress-num b { color: var(--amber-deep); }

/* ---------- 10. 表单 ---------- */
.form { display: block; }

.form-grid {
  display: grid;
  gap: 1.15rem 1.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) {
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field-full { grid-column: 1 / -1; }
}

.field { display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; }

.label {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--ink-strong);
}
.label .muted, .label small { font-weight: 400; color: var(--muted); }

.input,
.textarea,
.select {
  width: 100%;
  min-height: 48px;
  padding: 0.6rem 0.95rem;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font-size: 1rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  appearance: none;
}
.textarea { min-height: 140px; resize: vertical; line-height: 1.8; }

.input:hover, .textarea:hover, .select:hover { border-color: #b7ab89; }

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--pine);
  box-shadow: 0 0 0 3px rgba(29, 74, 56, 0.14);
}

.input[aria-invalid="true"],
.input.is-invalid,
.textarea[aria-invalid="true"] {
  border-color: var(--terra-deep);
  box-shadow: 0 0 0 3px rgba(180, 86, 60, 0.12);
}

.select {
  padding-right: 2.6rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23223129' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  cursor: pointer;
}

.checkbox { accent-color: var(--pine); width: 1.15em; height: 1.15em; flex-shrink: 0; }

.checkline {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  min-height: 44px;
  padding-block: 0.25rem;
  font-size: 0.9375rem;
  cursor: pointer;
}
.checkline input { margin-top: 0.35rem; }

.help {
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.7;
}

.field-error {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--terra-deep);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

/* 金额档位 */
.amount-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  min-width: 4.6rem;
  padding: 0.35rem 1.05rem;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.amount-chip:hover { border-color: var(--pine); color: var(--pine-deep); }
.amount-chip.is-active,
.amount-chip[aria-pressed="true"] {
  background: var(--pine);
  border-color: var(--pine);
  color: #f6f2e6;
}

/* 提示条 */
.alert {
  display: flex;
  gap: 0.75rem;
  padding: 0.9rem 1.15rem;
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-radius: 12px;
  font-size: 0.9375rem;
  line-height: 1.7;
  background: var(--surface);
}
.alert-success { background: var(--pine-tint); border-left-color: var(--pine); }
.alert-error { background: var(--terra-soft); border-left-color: var(--terra-deep); color: #6e2e1c; }
.alert-error a { color: #6e2e1c; }
.alert-info { background: var(--amber-soft); border-left-color: var(--amber); }

/* Flash 横条（含关闭按钮） */
.flash {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1.1rem;
  margin-bottom: 1.25rem;
  background: var(--pine-tint);
  border: 1px solid rgba(29, 74, 56, 0.25);
  border-left: 3px solid var(--pine);
  border-radius: 12px;
  font-size: 0.9375rem;
}
.flash-success { background: var(--pine-tint); border-left-color: var(--pine); }
.flash-error, .flash-danger { background: var(--terra-soft); border-left-color: var(--terra-deep); }
.flash-info { background: var(--amber-soft); border-left-color: var(--amber); }
.flash-close {
  margin-left: auto;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: inherit;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.flash-close:hover { background: rgba(20, 35, 28, 0.08); }

/* ---------- 11. 徽章 / 标签 / 胶囊 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.65rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.badge-urgent { background: var(--terra-soft); color: var(--terra-deep); }
.badge-done { background: var(--pine-tint); color: var(--pine); }
.badge-soft { background: var(--surface-deep); color: var(--muted); }

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.25rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.pill:hover { border-color: var(--pine); color: var(--pine-deep); }
.pill.is-active {
  background: var(--pine);
  border-color: var(--pine);
  color: #f6f2e6;
}
.pill.is-active:hover { color: #fdfaf0; }

.empty {
  padding: clamp(2.5rem, 6vw, 4rem) 1.5rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
  text-align: center;
  color: var(--muted);
  background: rgba(255, 253, 247, 0.6);
}
.empty .icon { width: 2.2em; height: 2.2em; opacity: 0.5; }

/* ---------- 12. 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  padding-block: 1.1rem;
  font-size: 0.8125rem;
  color: var(--muted);
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--pine); text-decoration: underline; }
.breadcrumb [aria-current] { color: var(--ink-strong); font-weight: 500; }
.breadcrumb > * + *::before {
  content: "/";
  margin-right: 0.45rem;
  color: var(--line-strong);
}

/* ---------- 13. 表格与分页 ---------- */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.table caption { text-align: left; padding: 1rem; color: var(--muted); font-size: 0.875rem; }

.table th, .table td {
  padding: 0.875rem 1.1rem;
  text-align: left;
  vertical-align: middle;
}
.table thead th {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: var(--surface-deep);
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}
.table tbody td { border-bottom: 1px solid var(--line); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: rgba(29, 74, 56, 0.035); }
.table td.num, .table th.num { font-variant-numeric: tabular-nums; text-align: right; }

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  padding-top: 2.25rem;
}
.pagination-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  padding: 0 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  text-decoration: none;
}
.pagination-link:hover { border-color: var(--pine); color: var(--pine-deep); }
.pagination-link.is-current {
  background: var(--pine);
  border-color: var(--pine);
  color: #f6f2e6;
  font-weight: 600;
}
.pagination-link:disabled, .pagination-link[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
}

/* 管理后台表格：窄屏横向滚动 */
@media (max-width: 900px) {
  .admin-content .table { min-width: 640px; }
}

/* ---------- 14. 页脚 ---------- */
.site-footer {
  margin-top: 0;
  padding: clamp(2.75rem, 6vw, 4.5rem) 0 2rem;
  background: var(--pine-deep);
  color: #cdd9cd;
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  gap: 2.25rem 2.5rem;
  grid-template-columns: 1fr;
  padding-bottom: 2.5rem;
}
@media (min-width: 620px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 901px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; } }

.footer-col h3, .footer-col h4 {
  color: #f3eedd;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  margin-bottom: 0.9rem;
}
.footer-col p { margin-top: 0; }
.footer-col + .footer-col p { white-space: pre-line; }

.footer-brand { display: flex; flex-direction: column; gap: 0.9rem; }
.footer-brand .brand { color: #f3eedd; }
.footer-brand .brand-text { color: #f3eedd; }
.footer-brand .brand-mark { background: rgba(243, 238, 221, 0.12); }

.site-footer a { color: #cdd9cd; text-underline-offset: 0.25em; }
.site-footer a:hover { color: #fdf9ec; }

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0;
  list-style: none;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(243, 238, 221, 0.16);
  font-size: 0.8125rem;
  color: #9fb1a3;
}

/* 页脚深底上的输入/文本保持可读 */
.site-footer .flash { background: rgba(243, 238, 221, 0.08); color: #e6e2d2; }

/* ---------- 15. 内容组件 ---------- */
.prose {
  max-width: var(--prose-w);
  font-size: 1.0375rem;
  line-height: 2;
  letter-spacing: 0.01em;
}
.prose > * + * { margin-top: 1.35em; }
.prose h2 {
  font-size: var(--fs-h3);
  margin-top: 2em;
}
.prose h3 { font-size: 1.0625rem; margin-top: 1.8em; }
.prose blockquote {
  margin-inline: 0;
  padding-left: 1.25rem;
  border-left: 2px solid var(--amber);
  color: var(--ink-strong);
  font-family: var(--font-display);
}
.prose img { border-radius: var(--r-md); border: 1px solid var(--line); }

.quote {
  position: relative;
  padding: 0.25rem 0 0.25rem 1.5rem;
  border-left: 2px solid var(--amber);
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1rem + 0.6vw, 1.3rem);
  line-height: 1.9;
  letter-spacing: 0.03em;
  color: var(--ink-strong);
}

/* 时间线 / 项目进展 */
.timeline {
  border-left: 1px solid var(--line-strong);
  padding-left: 0;
  list-style: none;
}

.timeline-item {
  position: relative;
  padding: 0 0 2rem 1.6rem;
}
.timeline-item:last-child { padding-bottom: 0.25rem; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 0.5rem;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 4px var(--line-strong);
}

.timeline-item > time,
.timeline-item .card-meta,
.timeline-item .muted:first-child {
  font-size: 0.8125rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.timeline-item h3, .timeline-item h4, .timeline-item strong {
  display: block;
  margin-top: 0.2rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-strong);
}
.timeline-item p { color: var(--muted); font-size: 0.9375rem; margin-top: 0.3rem; }

/* 动态列表 */
.update-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}
.update-item:last-child { border-bottom: 0; }
.update-item time { font-size: 0.8125rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.update-item h3, .update-item h4 { font-size: 1rem; }
.update-item p { color: var(--muted); font-size: 0.9375rem; }

/* FAQ */
.faq { display: flex; flex-direction: column; }

.faq-item {
  border-top: 1px solid var(--line);
  padding: 1.15rem 0;
}
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-item h3, .faq-item h4, .faq-item summary {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-strong);
}
.faq-item p { margin-top: 0.35rem; color: var(--muted); font-size: 0.9375rem; }

/* 兼容 details/summary 写法 */
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 44px;
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-weight: 400;
  color: var(--muted);
  transition: transform 0.2s var(--ease);
}
.faq-item[open] summary::after { content: "−"; transform: rotate(180deg); color: var(--amber-deep); }
.faq-item[open] summary { color: var(--pine-deep); }

/* 志愿者岗位 */
.role-grid {
  display: grid;
  gap: var(--space);
  grid-template-columns: 1fr;
}
@media (min-width: 620px) { .role-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 981px) { .role-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.role-card {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--pine);
  border-radius: var(--r-lg);
  padding: 1.5rem;
}
.role-card h3, .role-card .card-title { margin-top: 0; }
.role-card p { color: var(--muted); font-size: 0.9375rem; }
.role-card .card-meta { margin-top: auto; padding-top: 0.35rem; }

/* 数字带 / CTA 带 */
.stat-band {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem 1.5rem;
  padding: clamp(2.25rem, 5vw, 3.5rem) 0;
  border-block: 1px solid var(--line-strong);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Ccircle cx='2' cy='2' r='1' fill='%23123225' fill-opacity='0.05'/%3E%3C/svg%3E"),
    var(--surface-deep);
}
@media (min-width: 901px) { .stat-band { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat-band .stat { align-items: center; text-align: center; padding: 0; border: 0; }
.stat-band .stat-value { font-size: clamp(1.7rem, 1.4rem + 1.6vw, 2.4rem); color: var(--pine-deep); }

.cta-band {
  text-align: center;
  padding: clamp(3rem, 7vw, 4.75rem) 0;
  background:
    radial-gradient(720px 300px at 50% -40%, rgba(217, 138, 43, 0.16), transparent 70%),
    var(--pine-deep);
  color: #e8e4d2;
}
.cta-band .eyebrow { color: #e2b169; }
.cta-band .eyebrow::before { background: var(--amber); }
.cta-band h2, .cta-band .section-title {
  color: #f7f2e2;
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  max-width: 26em;
  margin: 0.6rem auto 0.35rem;
}
.cta-band p { color: #c3d2c6; max-width: 46em; margin-inline: auto; }
.cta-band .btn { margin-top: 1.5rem; }
.cta-band a { color: #e2b169; }

/* ---------- 16. 封面色场（cover_tone） ---------- */
.tone-amber, .tone-teal, .tone-rose, .tone-indigo, .tone-green, .tone-sky {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 170px;
}
/* 纹理层 */
.tone-amber::before, .tone-teal::before, .tone-rose::before,
.tone-indigo::before, .tone-green::before, .tone-sky::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Ccircle cx='3' cy='3' r='1' fill='%2314231c' fill-opacity='0.10'/%3E%3Ccircle cx='14' cy='14' r='1' fill='%23fffdf7' fill-opacity='0.25'/%3E%3C/svg%3E");
  pointer-events: none;
}
/* 内容浮于纹理之上 */
.tone-amber > *, .tone-teal > *, .tone-rose > *,
.tone-indigo > *, .tone-green > *, .tone-sky > * {
  position: relative;
  z-index: 1;
}

.tone-amber {
  background: linear-gradient(155deg, #f4e3c0 0%, #e7bd76 62%, #d9a04c 100%);
  color: #7c4c0d;
}
.tone-teal {
  background: linear-gradient(155deg, #ddeee7 0%, #9cc4ba 58%, #6fa394 100%);
  color: #23574a;
}
.tone-rose {
  background: linear-gradient(155deg, #f7e0da 0%, #e0a3a4 58%, #cd8189 100%);
  color: #8f3541;
}
.tone-indigo {
  background: linear-gradient(155deg, #e3e4f1 0%, #a9aed4 58%, #8289bd 100%);
  color: #3a3f73;
}
.tone-green {
  background: linear-gradient(155deg, #e0edda 0%, #a3c79f 58%, #7ba87e 100%);
  color: #2c5b31;
}
.tone-sky {
  background: linear-gradient(155deg, #dfecee 0%, #a3c4cf 58%, #7ea9ba 100%);
  color: #2d5566;
}

/* 色场内的大图标与文字 */
.tone-amber .icon, .tone-amber svg { color: #7c4c0d; }
.tone-teal .icon, .tone-teal svg { color: #23574a; }
.tone-rose .icon, .tone-rose svg { color: #8f3541; }
.tone-indigo .icon, .tone-indigo svg { color: #3a3f73; }
.tone-green .icon, .tone-green svg { color: #2c5b31; }
.tone-sky .icon, .tone-sky svg { color: #2d5566; }

.tone-amber .icon, .tone-teal .icon, .tone-rose .icon,
.tone-indigo .icon, .tone-green .icon, .tone-sky .icon {
  width: clamp(48px, 26%, 92px);
  height: auto;
  aspect-ratio: 1;
}

/* 色场内的类别小标签：深色胶囊，任何底色上都可读 */
.tone-amber .tone-label, .tone-teal .tone-label, .tone-rose .tone-label,
.tone-indigo .tone-label, .tone-green .tone-label, .tone-sky .tone-label,
[class*="tone-"] .tone-label {
  position: absolute;
  top: 0.85rem;
  left: 0.95rem;
  z-index: 2;
  padding: 0.18rem 0.7rem;
  border-radius: 999px;
  background: rgba(20, 35, 28, 0.62);
  color: #f7f2e2;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

/* 项目详情页单独使用色场作通栏封面 */
@media (min-width: 721px) {
  .card.tone-amber, .card.tone-teal, .card.tone-rose,
  .card.tone-indigo, .card.tone-green, .card.tone-sky {
    border-radius: var(--r-lg);
  }
}

/* ---------- 17. 管理后台 ---------- */
.admin-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--paper);
}
@media (min-width: 901px) {
  .admin-shell {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    min-height: 100vh;
  }
}

.admin-side {
  background: var(--pine-deep);
  color: #cdd9cd;
  border-bottom: 1px solid rgba(243, 238, 221, 0.14);
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 1rem 1.25rem;
  color: #f3eedd;
  text-decoration: none;
  border-bottom: 1px solid rgba(243, 238, 221, 0.12);
}
.admin-brand .brand-mark { background: rgba(243, 238, 221, 0.14); }

.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  padding: 0.85rem 0.75rem;
}
.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  padding: 0.45rem 0.85rem;
  border-radius: 10px;
  color: #cdd9cd;
  font-size: 0.9rem;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.admin-nav-link:hover { background: rgba(243, 238, 221, 0.08); color: #f3eedd; }
.admin-nav-link.is-active {
  background: rgba(243, 238, 221, 0.12);
  border-left-color: var(--amber);
  color: #f7f2e2;
  font-weight: 600;
}

.admin-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 60px;
  padding: 0.6rem clamp(1.25rem, 3.5vw, 2rem);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.admin-content {
  flex: 1;
  width: 100%;
  max-width: 1160px;
  padding: clamp(1.25rem, 3.5vw, 2.25rem) clamp(1.25rem, 3.5vw, 2rem) 3rem;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
@media (min-width: 901px) { .kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.kpi {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.15rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.kpi-value {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.3rem + 1vw, 1.9rem);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
  color: var(--ink-strong);
}
.kpi-label {
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* 后台移动端：侧栏折叠为顶条版式 */
@media (max-width: 900px) {
  .admin-side [data-nav] { display: none; }
  .admin-side [data-nav].is-open { display: block; }
  .admin-side .admin-nav { flex-direction: row; flex-wrap: wrap; }
  .admin-side .admin-nav-link { border-left: 0; border: 1px solid rgba(243, 238, 221, 0.18); }
  .admin-side .admin-nav-link.is-active {
    background: rgba(243, 238, 221, 0.16);
    border-color: var(--amber);
  }
  .admin-topbar .nav-toggle { display: inline-flex; }
}

/* ---------- 18. 登录页 ---------- */
.login-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 2rem 1.25rem;
  background:
    radial-gradient(820px 380px at 78% -10%, rgba(217, 138, 43, 0.14), transparent 65%),
    var(--pine-deep);
}
.login-card {
  width: min(420px, 100%);
  padding: 2.25rem 2rem 2.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
}
.login-card > * + * { margin-top: 1.15rem; }
.login-card .brand { justify-content: center; margin-bottom: 0.35rem; }
.login-card h1 { font-size: 1.3rem; text-align: center; }

/* ---------- 19. 列表页筛选条 ---------- */
.section .pill, .form-grid .pill { flex-shrink: 0; }

/* ---------- 19b. 模板补遗（按真实模板补齐） ---------- */
.flash-container {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding-top: 1.1rem;
}
.admin-content .flash-container { padding-top: 0; }

.amount-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}
.amount-chips .amount-chip { flex: 0 0 auto; }

/* 首页领域卡（整卡为链接，内部用 span） */
.category-card {
  height: 100%;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.category-card:hover,
.category-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
  color: inherit;
}
.category-card .card-media { min-height: 148px; }
.category-card .card-body { gap: 0.35rem; padding: 1.1rem 1.25rem 1.25rem; }
.category-card .card-title { font-size: 1.05rem; }
.category-card .card-link { padding-top: 0.55rem; font-size: 0.8375rem; }

/* 项目详情页通栏封面 */
.project-cover {
  aspect-ratio: 16 / 9;
  min-height: 0;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
}
.project-cover > .icon {
  width: clamp(72px, 18%, 128px);
  height: auto;
  aspect-ratio: 1;
}

/* 最近捐赠列表 */
.donation-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.donation-list .donation-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 0.15rem 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}
.donation-list .donation-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}
.donation-name {
  font-weight: 600;
  color: var(--ink-strong);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.donation-row .muted { grid-column: 1; font-size: 0.8125rem; }
.donation-row strong {
  grid-column: 2;
  grid-row: 1 / span 2;
  justify-self: end;
  font-variant-numeric: tabular-nums;
  color: var(--pine-deep);
}

/* 捐赠账户信息 */
.donation-account {
  margin: 0;
  padding: 0.95rem 1.1rem;
  background: var(--surface-deep);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-family: var(--font-ui);
  font-size: 0.875rem;
  line-height: 1.9;
  white-space: pre-line;
  color: var(--ink);
}

/* 列表页筛选面板 */
.filter-bar {
  display: block;
  margin-block: 1.35rem 2rem;
  padding: 1.15rem 1.25rem 1.3rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.filter-bar .form-grid { gap: 0.9rem 1rem; }
.filter-bar .field { margin: 0; }
.filter-bar .form-actions { margin-top: 0; align-self: end; }
.filter-bar .btn { width: 100%; }
@media (min-width: 700px) {
  .filter-bar .btn { width: auto; }
}

/* 页脚栏目标题（模板使用 h2.footer-heading） */
.footer-heading,
.footer-col h3,
.footer-col h4 {
  color: #f3eedd;
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  margin: 0 0 0.9rem;
  line-height: 1.5;
}

/* 后台：页头标题、侧栏脚注、KPI 图标、行内表单 */
.admin-page-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.3rem;
  line-height: 1.25;
  letter-spacing: 0.04em;
}
.admin-topbar .eyebrow { margin-bottom: 0.1rem; }

.admin-side { display: flex; flex-direction: column; }
.admin-side-foot {
  margin-top: auto;
  padding: 0.9rem 0.75rem 1.1rem;
  border-top: 1px solid rgba(243, 238, 221, 0.12);
}
.admin-side-foot .muted {
  margin: 0.5rem 0.85rem 0;
  font-size: 0.8125rem;
  color: #9fb1a3;
}
@media (max-width: 900px) {
  .admin-side-foot { display: none; }
}

.kpi-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-bottom: 0.4rem;
  border-radius: 10px;
  background: var(--surface-deep);
  border: 1px solid var(--line);
  color: var(--pine);
}
.kpi-icon .icon { width: 20px; height: 20px; }

.inline-form {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
}
.inline-form .select {
  min-height: 38px;
  padding: 0.25rem 2.2rem 0.25rem 0.7rem;
  font-size: 0.875rem;
  background-position: right 0.65rem center;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.card.is-unread {
  border-left: 3px solid var(--amber);
  background: linear-gradient(0deg, rgba(217, 138, 43, 0.05), rgba(217, 138, 43, 0.05)), var(--surface);
}

@media (max-width: 600px) {
  .project-cover { aspect-ratio: 4 / 3; }
  .filter-bar { padding: 1rem 1rem 1.15rem; }
}

/* ---------- 19c. 后台独立滚动与领域管理 ---------- */
/* 桌面端：侧栏固定，内容区单独滚动，避免整页一起滚动 */
@media (min-width: 901px) {
  .admin-shell {
    height: 100vh;
    height: 100svh;
    min-height: 0;
    overflow: hidden;
  }
  .admin-nav {
    flex-direction: column;
    flex-wrap: nowrap;
  }
  .admin-nav-link { width: 100%; }
  .admin-side {
    height: 100vh;
    height: 100svh;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .admin-main {
    height: 100vh;
    height: 100svh;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.42;
  cursor: not-allowed;
  box-shadow: none;
}
.btn:disabled:hover {
  transform: none;
}

.admin-tone {
  min-height: 0;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  margin-right: 0.55rem;
  border-radius: 10px;
  vertical-align: middle;
}
.admin-tone .icon { width: 19px; height: 19px; }

.admin-tone-preview {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding-top: 0.35rem;
}

.table code {
  padding: 0.1rem 0.4rem;
  border-radius: 5px;
  background: var(--surface-deep);
  color: var(--muted);
  font-size: 0.82rem;
}

@media (max-width: 600px) {
  .admin-topbar .eyebrow { display: none; }
}

@media print {
  .admin-shell { height: auto; overflow: visible; }
  .admin-side, .admin-main { height: auto; overflow: visible; }
}

/* ---------- 20. 打印 ---------- */
@media print {
  :root { --shadow-sm: none; --shadow-md: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .site-header, .site-footer, .admin-side, .admin-topbar,
  .nav-cta, .nav-toggle, .btn, .flash, .pagination,
  .amount-chip, .form-actions, .hero-actions {
    display: none !important;
  }
  [data-nav], section, .hero { background: #fff !important; }
  .hero-note, .stat-band, .cta-band { border-color: #999; }
  .card, .kpi, .table-wrap, .login-card {
    box-shadow: none !important;
    border-color: #999 !important;
    break-inside: avoid;
  }
  .tone-amber, .tone-teal, .tone-rose, .tone-indigo, .tone-green, .tone-sky {
    background: #fff !important;
    color: #000;
  }
  .tone-amber::before, .tone-teal::before, .tone-rose::before,
  .tone-indigo::before, .tone-green::before, .tone-sky::before { display: none; }
  a { color: #000; text-decoration: underline; }
  .prose { max-width: 100%; font-size: 10.5pt; }
}

/* ---------- 21. 动效收敛 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
}
