/* ==========================================================================
   Ma Shan Qu — public site styles
   Structure: tokens · base · layout · components · sections · modal · motion
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --brand: #9F2323;
  --brand-600: #861C1C;
  --brand-50: #FBF1EF;
  --brand-100: #F4DEDA;
  --cream: #FAF6EF;
  --cream-2: #F3ECE0;
  --paper: #FFFFFF;
  --ink: #26211F;
  --ink-2: #5B544F;
  --line: #E8DFD2;
  --dark: #261F1D;
  --danger: #B42318;
  --ok: #1F7A4D;

  --font-body: "DM Sans", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Fraunces", "Noto Serif SC", Georgia, serif;

  --r-sm: 12px; --r-md: 18px; --r-lg: 26px;
  --shadow-sm: 0 1px 2px rgba(38,33,31,.05), 0 4px 14px rgba(38,33,31,.05);
  --shadow-md: 0 2px 4px rgba(38,33,31,.05), 0 16px 40px rgba(38,33,31,.10);
  --ease: cubic-bezier(.2,.7,.2,1);
  --hh: 76px;           /* header height */
  --gutter: clamp(18px, 4vw, 40px);
  --maxw: 1200px;
  --section: clamp(64px, 9vw, 116px);
}
html[lang="zh"] { --font-display: "Noto Serif SC", "Fraunces", Georgia, serif; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--hh) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 400 1.0625rem/1.65 var(--font-body); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; touch-action: manipulation; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
[hidden] { display: none !important; }
main:focus { outline: none; }

h1, h2 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; letter-spacing: -.012em; text-wrap: balance; }
html[lang="zh"] h1, html[lang="zh"] h2 { letter-spacing: 0; line-height: 1.3; }
h1 { font-size: clamp(2.3rem, 5.2vw, 4.1rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); }
h3 { font-size: 1.2rem; line-height: 1.3; font-weight: 700; }
p { text-wrap: pretty; }
.lead { font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: var(--ink-2); max-width: 62ch; }
.muted { color: var(--ink-2); }
.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--brand); margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; border-radius: 2px; }
html[lang="zh"] .eyebrow { letter-spacing: .08em; }
.eyebrow-sm { display: block; font-size: .75rem; color: var(--ink-2); font-weight: 500; }

:focus-visible { outline: 3px solid rgba(159,35,35,.6); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 2000; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 10px; transition: top .2s; }
.skip-link:focus { top: 12px; }

.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icon--lg { width: 34px; height: 34px; }
.icon--flip { transform: scaleX(-1); }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: calc(var(--maxw) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); position: relative; }
.section--compact { padding-block: clamp(40px, 6vw, 72px); }
.section--tint { background: var(--cream-2); }
.section-head { max-width: 680px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head.center .lead { margin-inline: auto; }
.section-head--row { max-width: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.section-head .lead { margin-top: 14px; }
.section-head.light h2, .section-head.light .eyebrow { color: #fff; }
.subhead { font-size: clamp(1.5rem, 2.4vw, 2rem); margin-bottom: 28px; }
.intro-narrow { max-width: 820px; }
.intro-narrow .lead { margin-top: 14px; }
.split { display: grid; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split--top { align-items: start; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } }
.split-copy > * + * { margin-top: 18px; }
.split-copy h2 { margin-bottom: 4px; }
.split-copy .btn { margin-top: 26px; }
.split-media { position: relative; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 5/4; box-shadow: var(--shadow-md); }
.split-media img { width: 100%; height: 100%; object-fit: cover; }
.split-media--photo { aspect-ratio: 4/3; }
.split-media--photo img { object-position: 50% 50%; }
.split-media--photo .float-card { left: 18px; top: 18px; bottom: auto; }
.float-card { position: absolute; left: 20px; bottom: 20px; background: rgba(255,255,255,.95); backdrop-filter: blur(8px); border-radius: 999px; padding: 10px 18px 10px 14px; display: flex; gap: 10px; align-items: center; font-weight: 700; font-size: .95rem; color: var(--brand); box-shadow: var(--shadow-sm); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 48px; padding: 0 1.6rem; border-radius: 999px; font-weight: 700; font-size: 1rem; line-height: 1.2; border: 1.5px solid transparent; transition: background-color .25s, color .25s, border-color .25s, box-shadow .25s, translate .25s var(--ease), scale .15s; white-space: normal; text-align: center; }
.btn .icon:last-child:not(:first-child) { transition: translate .25s var(--ease); }
.btn:hover .icon:last-child:not(:first-child) { translate: 4px 0; }
.btn:active { scale: .97; }
.btn--primary { background: var(--brand); color: #fff; box-shadow: 0 6px 18px rgba(159,35,35,.28); }
.btn--primary:hover { background: var(--brand-600); translate: 0 -2px; box-shadow: 0 10px 24px rgba(159,35,35,.34); }
.btn--ghost { border-color: rgba(38,33,31,.22); color: var(--ink); background: transparent; }
.btn--ghost:hover { background: var(--paper); border-color: var(--ink); translate: 0 -2px; }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--cream); translate: 0 -2px; }
.btn--outline-light { border-color: rgba(255,255,255,.5); color: #fff; }
.btn--outline-light:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.btn--soft { background: var(--brand-50); color: var(--brand); border-color: var(--brand-100); }
.btn--soft:hover { background: var(--brand-100); }
.btn--sm { min-height: 42px; padding: 0 1.15rem; font-size: .95rem; }
.btn--lg { min-height: 56px; padding: 0 2rem; font-size: 1.05rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.link-btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--brand); min-height: 44px; }
.link-btn .icon { transition: translate .25s var(--ease), rotate .3s var(--ease); }
.link-btn:hover .icon { translate: 3px 0; }
.link-btn[aria-expanded="true"] .icon { rotate: 180deg; translate: 0 0; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; display: inline-grid; place-items: center; color: var(--ink-2); transition: background-color .2s, color .2s; }
.icon-btn:hover { background: var(--cream-2); color: var(--ink); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 900; background: rgba(250,246,239,.88); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: box-shadow .3s, border-color .3s, background-color .3s; }
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 24px rgba(38,33,31,.06); background: rgba(250,246,239,.95); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: var(--hh); transition: height .3s var(--ease); }
.site-header.is-scrolled .header-inner { height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; }
.brand-logo { display: block; height: 64px; width: auto; flex: none; transition: height .3s var(--ease), scale .3s var(--ease); }
.site-header.is-scrolled .brand-logo { height: 52px; }
.brand-logo--footer { height: 84px; }
.brand-mark { width: 40px; height: 40px; flex: none; transition: scale .3s var(--ease); }
.brand:hover .brand-mark, .brand:hover .brand-logo { scale: 1.05; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 700; letter-spacing: .2em; font-size: 1.02rem; white-space: nowrap; }
.brand-zh { font-size: .72rem; color: var(--ink-2); letter-spacing: .3em; margin-top: 3px; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.header-donate { display: none; }
.lang-switch { display: inline-flex; background: var(--cream-2); border-radius: 999px; padding: 3px; border: 1px solid var(--line); }
.lang-switch button { min-height: 36px; min-width: 52px; padding: 0 12px; border-radius: 999px; font-size: .88rem; font-weight: 700; color: var(--ink-2); transition: background-color .25s, color .25s; }
.lang-switch button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.nav-toggle { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; }
.nav-toggle-bars { width: 22px; height: 16px; position: relative; display: block; }
.nav-toggle-bars i { position: absolute; left: 0; width: 100%; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .3s var(--ease), opacity .2s, top .3s var(--ease); }
.nav-toggle-bars i:nth-child(1) { top: 0; } .nav-toggle-bars i:nth-child(2) { top: 7px; } .nav-toggle-bars i:nth-child(3) { top: 14px; }
.nav-toggle[aria-expanded="true"] i:nth-child(1) { top: 7px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] i:nth-child(3) { top: 7px; transform: rotate(-45deg); }

@media (max-width: 479px) {
  .brand-logo { height: 54px; } .site-header.is-scrolled .brand-logo { height: 46px; }
  .header-inner { gap: 8px; }
  .brand { gap: 9px; } .brand-mark { width: 36px; height: 36px; }
  .brand-name { font-size: .86rem; letter-spacing: .12em; }
  .brand-zh { letter-spacing: .22em; }
  .header-actions { gap: 4px; }
  .lang-switch button { min-width: 44px; padding: 0 8px; font-size: .82rem; }
}
/* mobile nav panel */
.primary-nav { position: fixed; left: 0; right: 0; top: var(--hh); z-index: 899; background: var(--cream); border-bottom: 1px solid var(--line); padding: 12px var(--gutter) 24px; box-shadow: 0 24px 40px rgba(38,33,31,.12); visibility: hidden; opacity: 0; translate: 0 -12px; transition: opacity .25s, translate .3s var(--ease), visibility 0s .3s; max-height: calc(100dvh - var(--hh)); overflow: auto; }
.site-header.is-scrolled .primary-nav { top: 64px; }
.primary-nav.is-open { visibility: visible; opacity: 1; translate: 0 0; transition-delay: 0s; }
.primary-nav ul { display: flex; flex-direction: column; }
.primary-nav li a { display: flex; align-items: center; min-height: 56px; font-size: 1.15rem; font-weight: 600; border-bottom: 1px solid var(--line); position: relative; }
.primary-nav li a[aria-current="page"] { color: var(--brand); }
.nav-donate-mobile { margin-top: 20px; width: 100%; min-height: 54px; }
.nav-backdrop { position: fixed; inset: 0; z-index: 800; background: rgba(38,33,31,.35); opacity: 0; transition: opacity .3s; }
.nav-backdrop.is-open { opacity: 1; }

@media (min-width: 1120px) {
  .nav-toggle, .nav-donate-mobile, .nav-backdrop { display: none !important; }
  .header-donate { display: inline-flex; }
  .primary-nav { position: static; visibility: visible; opacity: 1; translate: none; transition: none; background: none; border: 0; box-shadow: none; padding: 0; overflow: visible; max-height: none; }
  .primary-nav ul { flex-direction: row; gap: 4px; }
  .primary-nav li a { min-height: 44px; padding: 0 14px; font-size: .96rem; border: 0; border-radius: 999px; font-weight: 500; transition: color .2s, background-color .2s; }
  .primary-nav li a::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 6px; height: 2px; background: var(--brand); border-radius: 2px; scale: 0 1; transform-origin: left; transition: scale .3s var(--ease); }
  .primary-nav li a:hover::after, .primary-nav li a[aria-current="page"]::after { scale: 1 1; }
  .primary-nav li a[aria-current="page"] { font-weight: 700; }
}

/* ---------- Hero (typographic + illustration, no photo) ---------- */
.hero-type { position: relative; isolation: isolate; overflow: hidden; padding-block: clamp(40px, 6vw, 84px) clamp(72px, 9vw, 120px); background:
  radial-gradient(circle at 1px 1px, rgba(38,33,31,.07) 1px, transparent 0) 0 0 / 28px 28px, var(--cream); }
.hero-blob { position: absolute; z-index: -1; right: -8%; top: -18%; width: min(760px, 90vw); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 40% 40%, rgba(159,35,35,.13), rgba(159,35,35,0) 68%); animation: floaty 10s ease-in-out infinite; }
.hero-type-grid { display: grid; gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (min-width: 960px) { .hero-type-grid { grid-template-columns: 1.02fr .98fr; } }
.hero-copy { max-width: 640px; }
.hero-eyebrow { font-size: .85rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--brand); margin-bottom: 22px; display: inline-flex; align-items: center; gap: 12px; }
.hero-eyebrow::before { content: ""; width: 36px; height: 2px; background: currentColor; }
html[lang="zh"] .hero-eyebrow { letter-spacing: .1em; }
.hero-title { font-size: clamp(2.4rem, 4.9vw, 3.9rem); color: var(--ink); }
.t-line { display: block; }
.t-accent { color: var(--brand); position: relative; width: fit-content; }
.t-accent::after { content: ""; position: absolute; left: 0; right: 0; bottom: .02em; height: .09em; border-radius: 4px; background: rgba(159,35,35,.22); transform-origin: left; animation: underline 1s .6s var(--ease) both; }
.hero-sub { font-size: clamp(1.1rem, 1.7vw, 1.3rem); color: var(--ink-2); margin-top: 24px; max-width: 50ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.hero-art { position: relative; justify-self: center; width: min(100%, 600px); }
.hero-art > img { width: 100%; height: auto; }
.hero-card { position: absolute; background: rgba(255,255,255,.96); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-md); animation: floaty 7s ease-in-out infinite; }
.hero-card--years { left: 0; top: 30%; padding: 14px 20px; display: grid; justify-items: center; gap: 0; }
.hc-num { font: 600 2.8rem/1 var(--font-display); color: var(--brand); }
.hero-card--years > span { font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
html[lang="zh"] .hero-card--years > span { letter-spacing: .02em; }
.hero-card--help { right: 0; top: 2%; max-width: 270px; padding: 14px 18px 14px 14px; display: flex; gap: 12px; align-items: flex-start; animation-delay: -3s; }
.hc-icon { flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--brand); color: #fff; display: grid; place-items: center; }
.hero-card--help strong { display: block; font-size: .98rem; line-height: 1.3; }
.hero-card--help span:not(.hc-icon) { display: block; font-size: .84rem; color: var(--ink-2); line-height: 1.45; margin-top: 2px; }
@media (max-width: 639px) {
  .hero-art { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .hero-card { position: static; max-width: none !important; width: 100%; animation: none; box-shadow: var(--shadow-sm); }
  .hero-card--years { display: flex; align-items: center; justify-content: flex-start; gap: 14px; padding: 12px 18px; }
  .hero-card--years > span { text-align: left; font-size: .8rem; }
  .hc-num { font-size: 2.3rem; }
  .hero-card--help { padding: 14px 16px; align-items: center; }
  .hero-card--help strong { font-size: 1rem; }
  .hero-card--help span:not(.hc-icon) { font-size: .86rem; }
}
@keyframes underline { from { scale: 0 1; } to { scale: 1 1; } }

/* ---------- Facts strip ---------- */
.facts { position: relative; z-index: 2; margin-top: -56px; }
.facts-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 900px) { .facts-grid { grid-template-columns: repeat(4, 1fr); gap: 18px; } }
.fact { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: 22px 20px; box-shadow: var(--shadow-md); transition: var(--reveal-tr), transform .3s var(--ease); }
.fact:hover { transform: translateY(-4px); }
.fact-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; margin-bottom: 14px; }
.fact h2 { font: 700 1.05rem/1.3 var(--font-body); letter-spacing: 0; margin-bottom: 4px; }
.fact p { font-size: .94rem; color: var(--ink-2); line-height: 1.5; }

/* ---------- Stats ---------- */
.stats { display: grid; gap: 20px; }
.stats--inline { grid-template-columns: repeat(3, 1fr); margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
.stats--band { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); text-align: center; gap: 28px 20px; }
.stat-num { display: block; font: 600 clamp(2rem, 4vw, 3rem)/1 var(--font-display); color: var(--brand); font-variant-numeric: tabular-nums; }
.stat-label { display: block; font-size: .9rem; color: var(--ink-2); margin-top: 8px; line-height: 1.35; }
.impact { background: var(--dark); color: #fff; }
.impact .stat-num { color: #fff; }
.impact .stat-label { color: rgba(255,255,255,.72); }
.impact .note { text-align: center; color: rgba(255,255,255,.55); font-size: .85rem; margin-top: 40px; }
.impact--slim { padding-block: clamp(44px, 6vw, 72px); }

/* ---------- Areas ---------- */
.areas-grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .areas-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .areas-grid { grid-template-columns: repeat(3, 1fr); gap: 22px; } }
.area-card { position: relative; overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: 30px 28px 34px; transition: var(--reveal-tr), transform .35s var(--ease), box-shadow .35s, border-color .35s; }
.area-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--brand-100); }
.area-num { position: absolute; right: 22px; top: 14px; font: 600 3.4rem/1 var(--font-display); color: var(--cream-2); transition: color .35s; }
.area-card:hover .area-num { color: var(--brand-100); }
.area-icon { width: 54px; height: 54px; border-radius: 16px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; margin-bottom: 22px; transition: background-color .35s, color .35s, rotate .4s var(--ease); position: relative; }
.area-icon .icon { width: 26px; height: 26px; }
.area-card:hover .area-icon { background: var(--brand); color: #fff; rotate: -6deg; }
.area-card h3 { margin-bottom: 8px; position: relative; }
.area-card p { color: var(--ink-2); font-size: .98rem; position: relative; }
.area-line { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--brand); scale: 0 1; transform-origin: left; transition: scale .45s var(--ease); }
.area-card:hover .area-line { scale: 1 1; }

/* ---------- Cards ---------- */
.card-grid { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .card-grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .card-grid--3 { grid-template-columns: repeat(3, 1fr); gap: 26px; } }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); transition: var(--reveal-tr), transform .35s var(--ease), box-shadow .35s; }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.card-media { position: relative; aspect-ratio: 3/2; overflow: hidden; background: var(--cream-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.card:hover .card-media img { transform: scale(1.06); }
.tag { position: absolute; left: 14px; top: 14px; background: rgba(255,255,255,.94); color: var(--ink); font-size: .78rem; font-weight: 700; padding: 5px 12px; border-radius: 999px; }
.card-body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; gap: 10px; }
.card-body h3 { font-size: 1.22rem; }
.card-body > p { color: var(--ink-2); font-size: .98rem; }
.card-body .btn { margin-top: auto; }
.meta { display: flex; align-items: center; gap: 8px; font-size: .84rem; color: var(--ink-2); font-weight: 500; }
.meta .icon { width: 16px; height: 16px; }
.more-text { padding: 12px 14px; background: var(--cream); border-radius: var(--r-sm); font-size: .94rem; color: var(--ink-2); animation: fadeDown .35s var(--ease); }
.program-card .link-btn { margin-top: auto; align-self: flex-start; }
.program-card.is-filtered-in { animation: pop .45s var(--ease); }
.program-card.is-hidden { display: none; }
.case-card .card-body { gap: 14px; }
.case-card .card-body > p { flex: 1; }
.open-fund { display: flex; align-items: center; gap: 8px; font-size: .9rem; font-weight: 700; color: var(--brand); background: var(--brand-50); padding: 10px 14px; border-radius: var(--r-sm); }
.progress { height: 8px; border-radius: 999px; background: var(--cream-2); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: inherit; background: var(--brand); }
.progress-labels { display: flex; justify-content: space-between; gap: 10px; font-size: .86rem; color: var(--ink-2); margin-top: 8px; flex-wrap: wrap; }
.progress-labels strong { color: var(--ink); }
.js .case-card .progress i { width: 0; transition: width 1.4s var(--ease) .3s; }
.js .case-card.is-in .progress i { width: var(--w); }
html:not(.js) .case-card .progress i { width: var(--w); }

.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 36px; }
.filter { min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--paper); font-weight: 600; font-size: .95rem; transition: all .25s var(--ease); }
.filter:hover { border-color: var(--ink); }
.filter.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- Page hero ---------- */
.page-hero { position: relative; overflow: hidden; background: var(--cream-2); padding-block: clamp(56px, 9vw, 110px) clamp(48px, 7vw, 84px); border-bottom: 1px solid var(--line); }
.page-hero-inner { position: relative; z-index: 1; max-width: 880px; margin-inline: auto; text-align: center; }
.page-hero-inner .lead { margin: 18px auto 0; }

/* ---------- About ---------- */
.years-card { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(36px, 5vw, 56px); text-align: center; box-shadow: var(--shadow-md); overflow: hidden; }
.sun-deco { position: absolute; pointer-events: none; user-select: none; max-width: none; height: auto; }
.page-hero-sun { --w: clamp(380px, 38vw, 580px); width: var(--w); right: calc(var(--w) * -0.4); top: 50%; translate: 0 -50%; opacity: .26; }
.post-head { position: relative; overflow: hidden; }
.years-sun { --w: 190px; width: var(--w); right: calc(var(--w) * -0.3); top: calc(var(--w) * -0.3); opacity: .26; }
@media (max-width: 1099px) { .page-hero-sun { --w: 360px; opacity: .2; } }
@media (max-width: 640px) { .page-hero-sun { --w: 300px; opacity: .17; } .years-sun { --w: 140px; opacity: .24; } }
.years-num { position: relative; display: block; font: 600 clamp(6rem, 14vw, 9.5rem)/.9 var(--font-display); color: var(--brand); }
.years-label { position: relative; display: block; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; font-size: .95rem; margin-top: 10px; }
html[lang="zh"] .years-label { letter-spacing: .1em; }
.years-card p { position: relative; color: var(--ink-2); margin-top: 14px; }

.timeline { position: relative; display: grid; gap: 28px; padding-left: 8px; }
.timeline::before { content: ""; position: absolute; left: 30px; top: 22px; bottom: 22px; width: 2px; background: var(--brand-100); transform-origin: top; scale: 1 0; transition: scale 1.6s var(--ease); }
.timeline.is-in::before { scale: 1 1; }
.tl-item { position: relative; padding-left: 74px; }
.tl-dot { position: absolute; left: 0; top: -2px; width: 44px; height: 44px; border-radius: 50%; background: var(--paper); border: 2px solid var(--brand); color: var(--brand); display: grid; place-items: center; font-weight: 700; z-index: 1; margin-left: 8px; transition: background-color .3s, color .3s, scale .3s var(--ease); }
.tl-item:hover .tl-dot { background: var(--brand); color: #fff; scale: 1.1; }
.tl-label { display: block; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--brand); margin-bottom: 4px; }
.tl-item h3 { margin-bottom: 6px; }
.tl-item p { color: var(--ink-2); font-size: .98rem; }
@media (min-width: 1000px) {
  .timeline { grid-template-columns: repeat(5, 1fr); gap: 24px; padding: 0; }
  .timeline::before { left: 5%; right: 5%; top: 22px; bottom: auto; width: auto; height: 2px; transform-origin: left; scale: 0 1; }
  .timeline.is-in::before { scale: 1 1; }
  .tl-item { padding: 66px 4px 0; text-align: center; }
  .tl-dot { left: 50%; top: 0; margin: 0; translate: -50% 0; }
  .tl-item:hover .tl-dot { scale: 1.12; }
}

.mv-grid { display: grid; gap: 22px; margin-bottom: clamp(48px, 7vw, 84px); }
@media (min-width: 800px) { .mv-grid { grid-template-columns: 1fr 1fr; } }
.mv-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(28px, 4vw, 44px); transition: var(--reveal-tr), box-shadow .3s; }
.mv-card:hover { box-shadow: var(--shadow-md); }
.mv-icon, .value-icon { width: 52px; height: 52px; border-radius: 16px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; margin-bottom: 18px; }
.mv-card h2 { font-size: 1.7rem; margin-bottom: 10px; }
.mv-card p { color: var(--ink-2); font-size: 1.1rem; }
.values-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 1000px) { .values-grid { grid-template-columns: repeat(4, 1fr); gap: 22px; } }
@media (max-width: 359px) { .values-grid { grid-template-columns: 1fr; } }
.value { text-align: center; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: 26px 16px 24px; transition: var(--reveal-tr), translate .3s var(--ease), box-shadow .3s; }
.value:hover { box-shadow: var(--shadow-md); }
.value .value-icon { margin: 0 auto 14px; }
.value h3 { font-size: 1.1rem; }
.value p { color: var(--ink-2); font-size: .95rem; margin-top: 6px; line-height: 1.5; }
.subhead--center { text-align: center; }
.do-list { display: grid; gap: 10px; }
.do-list li { display: flex; align-items: center; gap: 16px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 20px; font-weight: 700; transition: translate .3s var(--ease), border-color .3s; }
.do-list li:hover { translate: 6px 0; border-color: var(--brand-100); }
.do-num { font: 600 1.15rem var(--font-display); color: var(--brand); min-width: 28px; }
.do-icon { color: var(--ink-2); display: inline-flex; }
.cta-split, .help-band { display: flex; flex-direction: column; gap: 28px; align-items: flex-start; justify-content: space-between; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(28px, 5vw, 56px); box-shadow: var(--shadow-sm); }
.cta-split p, .help-band p { color: var(--ink-2); margin-top: 10px; max-width: 60ch; }
.help-band { background: var(--brand-50); border-color: var(--brand-100); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (min-width: 900px) { .cta-split, .help-band { flex-direction: row; align-items: center; } .cta-split .btn, .help-band .btn { flex: none; } }

/* ---------- Volunteer CTA ---------- */
.vol-card { display: grid; background: var(--brand-50); border: 1px solid var(--brand-100); border-radius: 32px; overflow: hidden; }
@media (min-width: 900px) { .vol-card { grid-template-columns: .9fr 1.1fr; } }
.vol-media { position: relative; min-height: 280px; overflow: hidden; border-radius: 0; }
.vol-media img { position: absolute; inset: -6% 0; width: 100%; height: 112%; object-fit: cover; }
.vol-content { padding: clamp(30px, 5vw, 64px); display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.vol-strong { font: 600 1.35rem/1.35 var(--font-display); }
.vol-soft { color: var(--ink-2); }
.check-list { display: grid; gap: 8px; margin-block: 4px 12px; }
.check-list li { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.check-list .icon { width: 22px; height: 22px; padding: 4px; background: var(--brand); color: #fff; border-radius: 50%; stroke-width: 3; }

/* ---------- Support band ---------- */
.support-band { padding-top: 0; }
.band { position: relative; overflow: hidden; background: var(--dark); color: #fff; border-radius: 32px; padding: clamp(32px, 6vw, 72px); display: flex; flex-direction: column; gap: 28px; }
.band::before { content: ""; position: absolute; right: -80px; top: -120px; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle, rgba(159,35,35,.55), transparent 70%); }
.band > * { position: relative; }
.band h2 { color: #fff; max-width: 18ch; }
.band p { color: rgba(255,255,255,.75); margin-top: 14px; max-width: 54ch; }
.band-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (min-width: 1000px) { .band { flex-direction: row; align-items: center; justify-content: space-between; } .band-actions { flex-direction: column; } }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; gap: 12px; }
@media (min-width: 800px) { .gallery { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 190px; gap: 16px; } }
.gallery-item { border-radius: var(--r-md); overflow: hidden; background: var(--cream-2); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.gallery-item:hover img { transform: scale(1.07); }
.gallery-item--1 { grid-column: span 2; grid-row: span 2; }
.gallery-item--4 { grid-column: span 2; }
@media (max-width: 799px) { .gallery-item--4 { grid-column: span 2; } .gallery-item--1 { grid-row: span 2; } }

/* ---------- Donation page extras ---------- */
.trust-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.trust-row li { display: inline-flex; align-items: center; gap: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 10px 18px 10px 14px; font-weight: 600; font-size: .94rem; }
.trust-row .icon { color: var(--brand); }
.steps-row { display: grid; gap: 18px; grid-template-columns: 1fr; counter-reset: s; }
@media (min-width: 600px) { .steps-row { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .steps-row { grid-template-columns: repeat(4, 1fr); } }
.steps-row li { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: 26px 24px; }
.steps-row p { color: var(--ink-2); font-size: .96rem; margin-top: 6px; }
.step-no { position: absolute; right: 20px; top: 14px; font: 600 2.4rem/1 var(--font-display); color: var(--cream-2); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 64px; font-weight: 700; cursor: pointer; padding-block: 8px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { transition: rotate .3s var(--ease); color: var(--brand); }
.faq details[open] summary .icon { rotate: 180deg; }
.faq details p { color: var(--ink-2); padding-bottom: 22px; max-width: 64ch; animation: fadeDown .35s var(--ease); }

/* ---------- Forms ---------- */
.form-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(24px, 4vw, 40px); box-shadow: var(--shadow-md); }
.form-title { font-size: 1.7rem; margin-bottom: 6px; }
.form { display: grid; gap: 18px; margin-top: 8px; }
.field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field label, .field legend { font-weight: 700; font-size: .94rem; padding: 0; margin-bottom: 4px; }
.req { color: var(--brand); }
.field-row { display: grid; gap: 18px; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }
input[type="text"], input[type="tel"], input[type="email"], input[type="number"], select, textarea { width: 100%; min-height: 50px; padding: 12px 16px; background: var(--paper); border: 1.5px solid #D9CFC0; border-radius: var(--r-sm); font-size: 1rem; transition: border-color .2s, box-shadow .2s; }
textarea { resize: vertical; min-height: 110px; }
input:hover, select:hover, textarea:hover { border-color: #B9AC9A; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(159,35,35,.14); }
.field.has-error input, .field.has-error textarea, .field.has-error select, .field.has-error .input-prefix { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: .88rem; font-weight: 500; display: flex; gap: 6px; align-items: flex-start; }
.field-error::before { content: "!"; flex: none; width: 17px; height: 17px; margin-top: 2px; border-radius: 50%; background: var(--danger); color: #fff; font-size: .72rem; font-weight: 700; display: grid; place-items: center; }
.help { font-size: .86rem; color: var(--ink-2); }
.help--warn { color: #8A5A00; }
.form-error-summary { background: #FDECEA; color: var(--danger); border-radius: var(--r-sm); padding: 12px 16px; font-weight: 600; font-size: .94rem; }
.form-success { text-align: center; padding: 28px 8px; display: grid; gap: 12px; justify-items: center; animation: fadeDown .5s var(--ease); }
.form-success p { color: var(--ink-2); max-width: 38ch; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border: 1.5px solid #D9CFC0; border-radius: 999px; font-weight: 600; font-size: .94rem; background: var(--paper); transition: all .2s var(--ease); }
.chip:hover span { border-color: var(--ink); }
.chip input:checked + span { background: var(--brand-50); border-color: var(--brand); color: var(--brand); }
.chip input:focus-visible + span { outline: 3px solid rgba(159,35,35,.6); outline-offset: 2px; }
.input-prefix { display: flex; align-items: center; background: var(--paper); border: 1.5px solid #D9CFC0; border-radius: var(--r-sm); transition: border-color .2s, box-shadow .2s; }
.input-prefix:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(159,35,35,.14); }
.input-prefix .prefix { padding-left: 16px; font-weight: 700; color: var(--ink-2); }
.input-prefix input { border: 0; box-shadow: none !important; background: transparent; padding-left: 10px; }
.amount-field .chip-row { margin-bottom: 12px; }

/* ---------- Contact ---------- */
.contact-cards { display: grid; gap: 20px; }
@media (min-width: 900px) { .contact-cards { grid-template-columns: 1.3fr 1fr 1fr; } }
.contact-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: 30px 28px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; transition: var(--reveal-tr), box-shadow .3s, transform .3s var(--ease); }
.contact-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.contact-card .btn, .contact-card .link-btn { margin-top: auto; }
.contact-card p { color: var(--ink-2); }
.org-name { font-weight: 700; color: var(--ink) !important; font-size: .95rem; }
.big-phone { font: 600 1.7rem var(--font-display); color: var(--ink) !important; font-variant-numeric: tabular-nums; margin-bottom: 14px; }
.big-phone a:hover { color: var(--brand); }
.map-frame { margin-top: 26px; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4/3; background: var(--cream-2); box-shadow: var(--shadow-sm); }
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: rgba(255,255,255,.78); padding-top: clamp(52px, 7vw, 88px); font-size: .97rem; }
.footer-grid { display: grid; gap: 40px; grid-template-columns: 1fr; padding-bottom: 52px; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: 1.3fr 1fr; } }
@media (min-width: 1050px) { .footer-grid { grid-template-columns: 1.4fr .8fr 1.4fr 1fr; gap: 48px; } }
.brand--light .brand-name { color: #fff; } .brand--light .brand-zh { color: rgba(255,255,255,.6); }
.footer-col p { margin-top: 18px; max-width: 38ch; }
.icon--fill { fill: currentColor; stroke: none; }
.social-link { display: inline-flex; align-items: center; gap: 10px; margin-top: 20px; min-height: 46px; padding: 0 18px 0 14px; border: 1px solid rgba(255,255,255,.28); border-radius: 999px; color: #fff; font-weight: 600; font-size: .94rem; transition: background-color .25s, border-color .25s, translate .25s var(--ease); }
.social-link:hover { background: #1877F2; border-color: #1877F2; translate: 0 -2px; }
.footer-title { font: 700 .8rem var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: #fff; margin-bottom: 18px; }
html[lang="zh"] .footer-title { letter-spacing: .08em; }
.footer-links { display: grid; gap: 2px; }
.footer-links a { display: inline-flex; min-height: 40px; align-items: center; transition: color .2s, translate .25s var(--ease); }
.footer-links a:hover { color: #fff; translate: 4px 0; }
.footer-contact { display: grid; gap: 18px; }
.footer-contact li { display: flex; gap: 14px; align-items: flex-start; line-height: 1.5; }
.footer-contact .icon { margin-top: 3px; color: #E6B0A8; }
.footer-contact strong { color: #fff; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; }
.footer-contact a:hover { color: #fff; text-decoration: underline; }
.org-badge { display: flex; align-items: center; gap: 16px; }
.org-logo { border-radius: 18px; background: var(--cream); padding: 4px; flex: none; width: 88px; height: 88px; }
.org-badge strong { display: block; color: #fff; line-height: 1.3; }
.org-badge span { display: block; font-size: .88rem; opacity: .75; }
.org-legal { font-size: .78rem; opacity: .55; letter-spacing: .04em; margin-top: 14px !important; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-block: 24px; font-size: .88rem; color: rgba(255,255,255,.6); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 24px; }
.footer-bottom p { margin: 0; }
.credit a { color: #fff; text-decoration: underline; text-underline-offset: 3px; transition: color .2s; }
.credit a:hover { color: #F0B8B0; }
.credit-heart { display: inline-block; animation: beat 1.8s ease-in-out infinite; }
@keyframes beat { 0%, 60%, 100% { scale: 1; } 15% { scale: 1.2; } 30% { scale: 1; } 45% { scale: 1.15; } }

/* ---------- Modal (donation flow) ---------- */
.modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(30,22,20,.58); backdrop-filter: blur(4px); opacity: 0; transition: opacity .3s; }
.modal-dialog { position: relative; width: min(100%, 540px); max-height: min(92dvh, 780px); background: var(--paper); border-radius: 26px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.35); opacity: 0; translate: 0 28px; scale: .97; transition: opacity .3s, translate .4s var(--ease), scale .4s var(--ease); outline: none; }
.modal.is-open .modal-backdrop { opacity: 1; }
.modal.is-open .modal-dialog { opacity: 1; translate: 0 0; scale: 1; }
.modal-head { display: flex; align-items: center; gap: 8px; padding: 14px 14px 10px 18px; }
.modal-back { margin-left: -8px; }
.modal-progress { flex: 1; min-width: 0; }
.modal-step-label { display: block; font-size: .78rem; font-weight: 700; color: var(--ink-2); letter-spacing: .04em; margin-bottom: 6px; }
.modal-progress .progress { height: 6px; }
.modal-progress .progress i { transition: width .45s var(--ease); width: 0; }
.modal-case { margin: 0 18px 4px; display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; background: var(--cream); border-radius: var(--r-sm); }
.modal-case img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.modal-case strong { display: block; line-height: 1.3; font-size: .96rem; }
.modal-body { overflow-y: auto; overscroll-behavior: contain; padding: 14px 22px calc(26px + env(safe-area-inset-bottom)); -webkit-overflow-scrolling: touch; }
.step { animation: stepIn .4s var(--ease) both; display: grid; gap: 16px; }
.modal[data-dir="back"] .step { animation-name: stepInBack; }
.step-title { font-size: clamp(1.45rem, 4.5vw, 1.8rem); outline: none; }
.step-sub { color: var(--ink-2); margin-top: -6px; font-size: .98rem; }
.step--center { text-align: center; justify-items: center; padding-block: 18px; }
.choice-grid { display: grid; gap: 12px; margin-top: 4px; }
.choice { display: flex; align-items: center; gap: 16px; text-align: left; width: 100%; padding: 18px; border: 1.5px solid var(--line); border-radius: var(--r-md); background: var(--paper); transition: border-color .2s, background-color .2s, translate .25s var(--ease), box-shadow .25s; min-height: 84px; }
.choice:hover { border-color: var(--brand); background: var(--brand-50); translate: 0 -2px; box-shadow: var(--shadow-sm); }
.choice:active { scale: .985; }
.choice-icon { width: 48px; height: 48px; border-radius: 14px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; flex: none; transition: background-color .2s, color .2s; }
.choice:hover .choice-icon { background: var(--brand); color: #fff; }
.choice-text { flex: 1; display: grid; gap: 2px; }
.choice-text small { color: var(--ink-2); font-size: .88rem; line-height: 1.4; }
.choice-arrow { color: var(--ink-2); transition: translate .25s var(--ease), color .2s; }
.choice:hover .choice-arrow { translate: 4px 0; color: var(--brand); }
.pay-amount { display: flex; justify-content: space-between; align-items: center; background: var(--brand-50); border: 1px solid var(--brand-100); border-radius: var(--r-sm); padding: 14px 18px; font-weight: 600; }
.pay-amount strong { font: 600 1.6rem var(--font-display); color: var(--brand); font-variant-numeric: tabular-nums; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--cream-2); padding: 4px; border-radius: 16px; gap: 4px; }
.tabs button { min-height: 50px; border-radius: 12px; font-weight: 700; font-size: .93rem; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--ink-2); transition: background-color .25s, color .25s, box-shadow .25s; padding: 0 8px; text-align: center; line-height: 1.2; }
.tabs button[aria-selected="true"] { background: var(--paper); color: var(--brand); box-shadow: var(--shadow-sm); }
.tab-panel { display: grid; gap: 14px; animation: fadeDown .35s var(--ease); }
.bank-details { display: grid; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.bank-details > div { padding: 12px 16px; display: grid; gap: 2px; }
.bank-details > div + div { border-top: 1px solid var(--line); }
.bank-details dt { font-size: .76rem; color: var(--ink-2); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.bank-details dd { font-weight: 700; overflow-wrap: anywhere; }
.acc-no { font: 700 1.55rem/1.2 var(--font-body); letter-spacing: .06em; font-variant-numeric: tabular-nums; color: var(--brand); }
.qr-card { text-align: center; display: grid; justify-items: center; gap: 10px; padding: 20px 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: linear-gradient(var(--paper), var(--cream)); }
.qr-card img { width: min(250px, 68vw); height: auto; padding: 10px; background: #fff; border-radius: 16px; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.qr-card p { color: var(--ink-2); font-size: .94rem; max-width: 32ch; }
.dropzone { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 30px 18px; border: 2px dashed #CDBFAA; border-radius: var(--r-md); background: var(--cream); cursor: pointer; min-height: 150px; align-content: center; transition: border-color .2s, background-color .2s; }
.dropzone .icon { color: var(--brand); }
.dropzone small { color: var(--ink-2); }
.dropzone:hover, .dropzone.is-drag, input:focus-visible + .dropzone { border-color: var(--brand); background: var(--brand-50); }
input:focus-visible + .dropzone { outline: 3px solid rgba(159,35,35,.45); outline-offset: 2px; }
.field.has-error .dropzone { border-color: var(--danger); }
.file-chip { display: flex; align-items: center; gap: 12px; padding: 10px 6px 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--cream); animation: fadeDown .3s var(--ease); }
.file-chip img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; }
.file-icon { width: 44px; height: 44px; border-radius: 8px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; flex: none; }
.file-meta { flex: 1; min-width: 0; display: grid; }
.file-meta strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .94rem; }
.file-meta small { color: var(--ink-2); }
.thanks-note { display: flex; align-items: center; gap: 10px; background: var(--cream); padding: 12px 16px; border-radius: var(--r-sm); font-size: .94rem; text-align: left; color: var(--ink-2); }
.thanks-note .icon { color: var(--brand); }
.check-anim { width: 84px; height: 84px; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.check-anim circle { stroke: var(--brand-100); stroke-width: 3; fill: var(--brand-50); }
.check-anim path { stroke: var(--brand); stroke-width: 4.5; stroke-dasharray: 52; stroke-dashoffset: 52; animation: draw .6s .25s var(--ease) forwards; }
.spinner { width: 52px; height: 52px; border-radius: 50%; border: 4px solid var(--brand-100); border-top-color: var(--brand); animation: spin .9s linear infinite; }
.discard { position: absolute; inset: 0; z-index: 5; background: rgba(255,255,255,.92); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 24px; animation: fadeIn .2s; }
.discard-box { text-align: center; display: grid; gap: 10px; max-width: 340px; }
.discard-box p { color: var(--ink-2); }
.discard-actions { display: flex; gap: 10px; justify-content: center; margin-top: 10px; flex-wrap: wrap; }
body.modal-open { overflow: hidden; }

@media (max-width: 640px) {
  .modal { place-items: end stretch; padding: 0; }
  .modal-dialog { width: 100%; max-height: 94dvh; border-radius: 26px 26px 0 0; translate: 0 100%; scale: 1; }
  .modal-dialog::before { content: ""; width: 42px; height: 4px; border-radius: 4px; background: #D9CFC0; margin: 10px auto 0; flex: none; }
  .modal-body { padding-inline: 18px; }
}
@media (max-width: 360px) { .acc-no { font-size: 1.3rem; } .tabs button { font-size: .85rem; } .tabs button .icon { display: none; } }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); translate: -50% 20px; z-index: 1200; background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: .94rem; opacity: 0; transition: opacity .25s, translate .35s var(--ease); box-shadow: var(--shadow-md); max-width: calc(100vw - 32px); }
.toast.is-on { opacity: 1; translate: -50% 0; }

/* ---------- Motion ---------- */
.js { --reveal-tr: opacity .8s var(--ease) var(--d, 0s), translate .8s var(--ease) var(--d, 0s), scale .8s var(--ease) var(--d, 0s); }
html:not(.js) { --reveal-tr: none; }
.js [data-reveal] { opacity: 0; translate: 0 30px; transition: var(--reveal-tr); }
.js [data-reveal="left"] { translate: -36px 0; }
.js [data-reveal="right"] { translate: 36px 0; }
@media (max-width: 899px) { .js [data-reveal="left"], .js [data-reveal="right"] { translate: 0 30px; } }
.js [data-reveal="scale"] { translate: 0 0; scale: .94; }
.js [data-reveal].is-in { opacity: 1; translate: 0 0; scale: 1; }
.js .img-reveal img { clip-path: inset(0 0 100% 0); scale: 1.18; transition: clip-path 1.1s var(--ease) var(--d, 0s), scale 1.5s var(--ease) var(--d, 0s), transform .7s var(--ease); }
.js .img-reveal.is-in img { clip-path: inset(0 0 0 0); scale: 1; }
[data-parallax] { translate: 0 var(--py, 0px); will-change: translate; }
.lang-pending-zh body { opacity: 0; animation: showBody .01s 1.5s forwards; }

@keyframes kenburns { from { scale: 1.04; } to { scale: 1.14; } }
@keyframes floaty { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
@keyframes cue { 0% { opacity: 0; translate: -50% 0; } 40% { opacity: 1; } 100% { opacity: 0; translate: -50% 14px; } }
@keyframes spin { to { rotate: 360deg; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes stepIn { from { opacity: 0; translate: 28px 0; } to { opacity: 1; translate: 0 0; } }
@keyframes stepInBack { from { opacity: 0; translate: -28px 0; } to { opacity: 1; translate: 0 0; } }
@keyframes fadeDown { from { opacity: 0; translate: 0 -8px; } to { opacity: 1; translate: 0 0; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; scale: .94; } to { opacity: 1; scale: 1; } }
@keyframes showBody { to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .js [data-reveal], .js .img-reveal img { opacity: 1 !important; translate: none !important; scale: 1 !important; clip-path: none !important; }
  [data-parallax] { translate: none !important; }
  .hero-media img { animation: none; }
}

/* ---------- Activity detail (blog-style) ---------- */
.card-link { color: inherit; background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat; transition: background-size .35s var(--ease), color .2s; }
.card-link:hover { color: var(--brand); background-size: 100% 2px; }
.card-media { display: block; }
.post-head { background: var(--cream-2); border-bottom: 1px solid var(--line); padding-block: clamp(28px, 5vw, 56px) clamp(36px, 6vw, 64px); }
.post-head-inner { max-width: 880px; margin-inline: auto; display: grid; justify-items: center; text-align: center; gap: 18px; }
.post-head-inner .lead { margin-inline: auto; }
.crumbs ol { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; font-size: .88rem; color: var(--ink-2); }
.crumbs li + li::before { content: "/"; margin-right: 6px; opacity: .5; }
.crumbs a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: transparent; transition: text-decoration-color .2s, color .2s; }
.crumbs a:hover { color: var(--brand); text-decoration-color: currentColor; }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; }
.tag--inline { position: static; display: inline-block; background: var(--brand-50); color: var(--brand); border: 1px solid var(--brand-100); }
.post-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; color: var(--ink-2); font-weight: 500; font-size: .95rem; }
.post-meta li { display: inline-flex; align-items: center; gap: 8px; }
.post-meta .icon { color: var(--brand); width: 18px; height: 18px; }
.post-wrap { padding-bottom: clamp(48px, 7vw, 88px); }
.post-cover { margin: clamp(-40px, -4vw, -24px) 0 0; position: relative; z-index: 1; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 16/8; box-shadow: var(--shadow-md); background: var(--cream-2); }
.lb-open, .post-cover .lb-open { display: block; width: 100%; height: 100%; cursor: zoom-in; }
.post-cover img { width: 100%; height: 100%; object-fit: cover; }
.post-body { max-width: 720px; margin: clamp(32px, 5vw, 56px) auto 0; font-size: 1.12rem; line-height: 1.8; }
.post-body > * + * { margin-top: 1.3em; }
.post-lead { font: 500 clamp(1.3rem, 2.2vw, 1.6rem)/1.5 var(--font-display); color: var(--ink); }
html[lang="zh"] .post-lead { line-height: 1.7; }
.post-body p:not(.post-lead):not(.post-note) { color: #433C38; }
.post-note { font-size: .88rem; color: var(--ink-2); padding: 12px 16px; border-left: 3px solid var(--brand-100); background: var(--cream-2); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.post-gallery { margin-top: clamp(48px, 7vw, 88px); }
.gallery--post { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
@media (min-width: 800px) { .gallery--post { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 210px; } }
.gallery--post .gallery-item { cursor: zoom-in; display: block; padding: 0; }
.gallery-item--p1 { grid-column: span 2; grid-row: span 2; }
.gallery--post .gallery-item--p4 { grid-column: auto; }
.post-nav { display: grid; gap: 14px; margin-top: clamp(40px, 6vw, 72px); }
@media (min-width: 700px) { .post-nav { grid-template-columns: 1fr 1fr; } }
.post-nav-link { display: grid; gap: 6px; padding: 20px 24px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); transition: border-color .25s, translate .3s var(--ease), box-shadow .3s; }
.post-nav-link:hover { border-color: var(--brand); translate: 0 -3px; box-shadow: var(--shadow-sm); }
.post-nav-link small { display: inline-flex; align-items: center; gap: 8px; color: var(--brand); font-weight: 700; font-size: .84rem; letter-spacing: .04em; }
.post-nav-link--next { text-align: right; }
.post-nav-link--next small { justify-content: flex-end; }
.post-nav-link strong { font-size: 1.05rem; line-height: 1.35; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 1500; background: rgba(20,14,12,.94); display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding: 16px; opacity: 0; transition: opacity .25s; }
.lightbox.is-open { opacity: 1; }
.lb-stage { display: grid; justify-items: center; gap: 12px; min-width: 0; margin: 0; }
.lb-stage img { max-width: 100%; max-height: calc(100dvh - 120px); width: auto; height: auto; border-radius: var(--r-sm); animation: pop .35s var(--ease); background: var(--cream-2); aspect-ratio: 3/2; object-fit: contain; }
.lb-stage figcaption { color: rgba(255,255,255,.8); font-size: .9rem; }
.lb-btn { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(255,255,255,.12); transition: background-color .2s, scale .2s; }
.lb-btn:hover { background: rgba(255,255,255,.24); scale: 1.06; }
.lb-close { position: absolute; top: 14px; right: 14px; z-index: 2; }
@media (max-width: 640px) {
  .lightbox { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .lb-prev, .lb-next { position: absolute; bottom: 20px; }
  .lb-prev { left: 20px; } .lb-next { right: 20px; }
  .lb-stage img { max-height: calc(100dvh - 160px); }
}

/* Home facts strip – small phones (kept after base rules) */
@media (max-width: 520px) {
  .facts { margin-top: -28px; }
  .facts-grid { grid-template-columns: 1fr; gap: 10px; }
  .fact { display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; align-items: start; padding: 16px 18px; }
  .fact-icon { grid-row: 1 / span 2; margin: 0; }
  .fact h2 { margin: 0; }
}

/* ---------- Gallery: "see more" tile, full gallery, video badge ---------- */
.gallery-item { position: relative; padding: 0; border: 0; cursor: zoom-in; display: block; }
.gallery-item.is-more { cursor: pointer; }
@media (min-width: 800px) { .gallery:not(.gallery--post) .gallery-item--5, .gallery:not(.gallery--post) .gallery-item--6 { grid-column: span 2; } }
.more-overlay { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; background: linear-gradient(rgba(38,31,29,.52), rgba(38,31,29,.72)); backdrop-filter: blur(2px); color: #fff; text-align: center; transition: background-color .3s; }
.gallery-item.is-more:hover .more-overlay { background: linear-gradient(rgba(159,35,35,.55), rgba(38,31,29,.78)); }
.more-count { font: 600 clamp(2rem, 4.4vw, 3rem)/1 var(--font-display); }
.more-label { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: .95rem; }
.more-label .icon { transition: translate .25s var(--ease); }
.gallery-item.is-more:hover .more-label .icon { translate: 4px 0; }
.play-badge { position: absolute; left: 12px; bottom: 12px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.94); color: var(--brand); box-shadow: var(--shadow-sm); }
.play-badge .icon { width: 20px; height: 20px; fill: currentColor; stroke: none; margin-left: 2px; }

.gallery-modal { position: fixed; inset: 0; z-index: 1400; background: rgba(250,246,239,.98); overflow-y: auto; overscroll-behavior: contain; opacity: 0; translate: 0 24px; transition: opacity .3s, translate .4s var(--ease); }
.gallery-modal.is-open { opacity: 1; translate: 0 0; }
.gm-panel { max-width: calc(var(--maxw) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter) 48px; }
.gm-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0 16px; background: rgba(250,246,239,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.gm-head h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
.gm-count { color: var(--ink-2); font-size: .92rem; margin-top: 2px; }
.gm-close { width: 48px; height: 48px; background: var(--paper); border: 1px solid var(--line); }
.gm-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .gm-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (min-width: 1100px) { .gm-grid { grid-template-columns: repeat(4, 1fr); } }
.gm-item { position: relative; display: block; padding: 0; border: 0; border-radius: var(--r-md); overflow: hidden; aspect-ratio: 4/3; background: var(--cream-2); cursor: zoom-in; animation: pop .45s var(--ease) both; animation-delay: var(--d, 0s); }
.gm-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.gm-item:hover img { transform: scale(1.06); }
body.lb-open-body { overflow: hidden; }
.lb-stage video { max-width: 100%; max-height: calc(100dvh - 120px); border-radius: var(--r-sm); background: #000; }
@media (max-width: 640px) { .lb-stage video { max-height: calc(100dvh - 160px); } }
.lightbox { z-index: 1600; }

/* YouTube viewer */
.lb-frame { width: min(1100px, calc(100vw - 32px)); aspect-ratio: 16/9; max-height: calc(100dvh - 140px); border-radius: var(--r-sm); overflow: hidden; background: #000; }
.lb-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 640px) { .lb-frame { width: calc(100vw - 24px); } }

.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.btn.is-loading { pointer-events: none; opacity: .75; }
