/* fund 頁面樣式 — 自 templates/fund.html 逐字抽離（P10）。 */

/* =============================================
   承天中承府 — 建廟基金 v2
   精緻深色系
   ============================================= */
:root {
    --bg-deep: #0c0303;
    --bg-dark: #1a0808;
    --bg-card: rgba(30, 10, 10, 0.7);
    --bg-card-hover: rgba(60, 15, 15, 0.8);
    /* R6-1 金色 brand 接點：本頁主金的單一換皮介面。fund 金 #c49a45 異於 theme 品牌金
       --gold #c48945（theme 無同值色票可指），故以頁面 namespace 錨定字面值。改此一行
       → 全域消費的 --gold 一併換皮（含 layout-chrome 導覽列／style.css 框架）。 */
    --fund-brand: #c49a45;
    /* --gold/--gold-bright/--gold-border：fund :root 覆寫、被全域 layout-chrome 導覽列
       ＋style.css 框架消費（committee R5-5 教訓＝勿改名）。--gold 鏈到 brand 接點（同值）；
       bright/border 值與 brand 不同＝真獨立色，保留字面值、僅維持名稱。 */
    --gold: var(--fund-brand);
    --gold-bright: #e8c66a;
    --fund-gold-pale: var(--c-fcf6ba);
    --fund-gold-dark: #8a6e2f;
    --fund-gold-glow: rgba(196, 154, 69, 0.3);
    --gold-border: rgba(196, 154, 69, 0.25);
    --gold-border-strong: rgba(196, 154, 69, 0.5);
    /* R6-1 重複寫死色收斂（值不變，≥2 處收成具名 token）。 */
    --fund-video-bg: #100606;
    --fund-gold-a16: rgba(196, 154, 69, 0.16);
    --crimson: #8B0000;
    --crimson-deep: #4a0e0e;
    --text-light: #fdfbf7;
    --text-dim: #bbb;
    --text-muted: var(--c-888);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --transition-base: 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

button, input, .btn-action, .qty-btn, .form-control {
    font-family: var(--font-body) !important;
}

.fund-page {
    background: var(--bg-deep);
    color: var(--text-light);
    font-family: var(--font-body);
    line-height: 1.8;
    min-height: 100vh;
    overflow-x: hidden;
}

/* subtle radial ambient */
.fund-page::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at 50% 15%, rgba(90, 20, 20, 0.35) 0%, transparent 55%);
    pointer-events: none;
    z-index: 0;
}
.fund-page > * { position: relative; z-index: 1; }

/* === Section Utility === */
.fund-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 80px 24px;
}

.section-title {
    text-align: center;
    margin-bottom: 45px;
    display: block;
    /* 重置：避免 base.html 殘留的 gradient / text-fill 繼承污染到內層 SVG */
    background: none;
    -webkit-background-clip: initial;
    -webkit-text-fill-color: initial;
    filter: none;
}
/* 中和 base.html 可能殘留的 ::before（原本浮在左側那顆脫鉤元寶）*/
/* 中和 base.html 可能殘留的 ::before 與 ::after（脫鉤元寶）*/
.section-title::before,
.section-title::after {
    content: none !important;
    display: none !important;
}
.section-title .title-main {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: clamp(14px, 2.2vw, 24px);
    font-family: var(--font-brand);
    font-size: clamp(2rem, 4.5vw, 2.8rem);
    font-weight: 900;
    letter-spacing: 3px;
    line-height: 1.3;
}
.section-title .title-text {
    background: linear-gradient(to bottom, var(--fund-gold-pale) 0%, var(--gold) 50%, var(--fund-gold-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 0 var(--c-black-a40));
    white-space: nowrap;
}
.section-title .title-yuanbao {
    width: clamp(30px, 4.5vw, 44px);
    height: auto;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 5px var(--c-black-a50));
}

/* =============================================
   1. HERO — SVG 進度環
   ============================================= */
.fund-hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
    background: var(--bg-deep);
    isolation: isolate;
    overflow: hidden;
}
.fund-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, var(--c-black-a40) 0%, var(--bg-deep) 95%);
    z-index: -1;
}
.fund-hero-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
}
.fund-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* SVG 進度環容器 */
.progress-ring-wrap {
    position: relative;
    width: 280px;
    height: 280px;
    margin-bottom: 40px;
}

.progress-ring-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 10;
}

.ring-progress {
    fill: none;
    stroke: url(#goldGradient);
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 754; /* 2 * PI * 120 */
    stroke-dashoffset: 754;
    transition: stroke-dashoffset 2s var(--ease-out);
    filter: drop-shadow(0 0 8px var(--gold-border-strong));
}

/* 裝飾外環 */
.ring-deco {
    fill: none;
    stroke: rgba(196, 154, 69, 0.15);
    stroke-width: 1.5;
    stroke-dasharray: 4 8;
}

@keyframes ring-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.ring-deco-rotate {
    animation: ring-rotate 40s linear infinite;
    transform-origin: center;
}

/* 中心文字 */
.ring-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.ring-percent {
    font-family: var(--font-body);
    font-size: 3.2rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--white) 0%, var(--gold-bright) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}
.ring-label {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    margin-top: 4px;
}
.ring-detail {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 8px;
    text-align: center;
    line-height: 1.6;
    opacity: 0.8;
}

.hero-headline {
    text-align: center;
}
.hero-headline h1 {
    font-family: var(--font-brand);
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--white);
    text-shadow: 0 4px 20px rgba(0,0,0,0.8);
    margin: 0 0 12px;
    letter-spacing: 4px;
}
.hero-headline p {
    font-size: 1.2rem;
    color: var(--fund-gold-pale);
    letter-spacing: 3px;
}

/* =============================================
   2. 建廟緣起 — 影片 + 引言
   ============================================= */
.origin-section {
    border-top: 1px solid var(--gold-border);
}

.origin-layout {
    display: flex;
    flex-direction: column;
    gap: 35px;
    max-width: 920px;
    margin: 0 auto;
}

.origin-intro {
    text-align: center;
    padding: 0 10px;
}
.origin-intro .lead {
    font-family: var(--font-brand);
    font-size: 1.2rem;
    line-height: 2.2;
    color: var(--text-dim);
}
.origin-intro .lead em {
    font-style: normal;
    color: var(--gold-bright);
    font-weight: 700;
}
.origin-intro .play-hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-muted);
    letter-spacing: 1px;
}
.origin-intro .play-hint .triangle {
    display: inline-block;
    width: 0; height: 0;
    border-left: 8px solid var(--gold);
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
}

.video-frame {
    position: relative;
    padding-bottom: 56.25%;
    border-radius: var(--radius-12);
    overflow: hidden;
    border: 2px solid var(--gold-border-strong);
    box-shadow: 0 10px 40px var(--c-black-a60);
    background: var(--fund-video-bg);
}
.video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.video-poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    cursor: pointer;
    background: var(--fund-video-bg);
}
.video-poster img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.72);
}
.video-play-icon {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 64px;
    height: 64px;
    transform: translate(-50%, -50%);
    border-radius: var(--radius-full);
    display: grid;
    place-items: center;
    background: rgba(252, 246, 186, 0.94);
    color: var(--crimson-deep);
    font-size: 1.8rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

/* =============================================
   3. 未來願景 — 垂直時間軸
   ============================================= */
.vision-section {
    border-top: 1px solid var(--gold-border);
}

.timeline {
    position: relative;
    max-width: 950px;
    margin: 0 auto;
    padding: 20px 0;
}

/* 中央金線 */
.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, transparent, var(--gold), var(--gold), transparent);
    transform: translateX(-50%);
}

.timeline-node {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    margin-bottom: 60px;
    position: relative;
}
.timeline-node:last-child { margin-bottom: 0; }

/* 奇偶交替 */
.timeline-node:nth-child(odd) {
    flex-direction: row;
}
.timeline-node:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-img {
    flex: 1;
    min-width: 0;
}
.timeline-img img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: var(--radius-12);
    border: 1px solid var(--gold-border);
    transition: transform 0.6s ease, border-color 0.3s;
}
.timeline-node:hover .timeline-img img {
    transform: scale(1.03);
    border-color: var(--gold);
}

.timeline-content {
    flex: 1;
    min-width: 0;
    padding-top: 10px;
}
.timeline-content h3 {
    font-family: var(--font-brand);
    font-size: 1.5rem;
    color: var(--gold-bright);
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--gold-border);
    letter-spacing: 1px;
}
.timeline-content p {
    font-size: 1.05rem;
    line-height: 2;
    color: var(--text-dim);
}

/* 中心圓點 */
.timeline-dot {
    position: absolute;
    left: 50%;
    top: 20px;
    width: 16px;
    height: 16px;
    background: var(--gold);
    border: 3px solid var(--bg-deep);
    border-radius: var(--radius-full);
    transform: translateX(-50%);
    z-index: 2;
    box-shadow: 0 0 12px var(--fund-gold-glow);
    transition: transform 0.3s ease, box-shadow 0.3s;
}
.timeline-node:hover .timeline-dot {
    transform: translateX(-50%) scale(1.3);
    box-shadow: 0 0 20px var(--fund-gold-glow);
}

/* =============================================
   4. 芳名錄
   ============================================= */
.honor-section {
    border-top: 1px solid var(--gold-border);
}

.honor-scroll-box {
    max-width: 880px;
    margin: 0 auto 40px;
    background: var(--crimson);
    border: 4px solid var(--gold);
    border-radius: var(--radius-6);
    padding: 24px;
    box-shadow: 0 10px 35px var(--c-black-a60);
    position: relative;
}

/* 捲軸左右軸 */
.honor-scroll-box::before,
.honor-scroll-box::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 106%;
    background: linear-gradient(90deg, var(--c-5e0000), var(--fund-gold-dark), var(--c-5e0000));
    top: -3%;
    border-radius: var(--radius-4);
    z-index: 2;
}
.honor-scroll-box::before { left: -12px; }
.honor-scroll-box::after { right: -12px; }

.honor-heading {
    text-align: center;
    font-family: var(--font-brand);
    font-size: 1.7rem;
    color: var(--fund-gold-pale);
    margin-bottom: 18px;
    letter-spacing: 3px;
}

.marquee-viewport {
    height: 280px;
    overflow: hidden;
    position: relative;
    mask-image: linear-gradient(to bottom, transparent, black 12%, black 88%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 12%, black 88%, transparent);
}

.marquee-track {
    will-change: transform;
}

/* hover 暫停 */
.marquee-viewport:hover .marquee-track {
    animation-play-state: paused !important;
}

.donor-row {
    display: flex;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px dotted rgba(255, 215, 0, 0.12);
    color: #ffebcd;
    font-size: 0.98rem;
}
.donor-name {
    font-weight: 700;
    color: var(--fund-gold-pale);
    min-width: 90px;
}
.donor-items {
    text-align: right;
    color: var(--c-ddd);
    flex: 1;
}

.honor-btn-row {
    text-align: center;
    margin-top: 18px;
}

/* =============================================
   5. 捐款區
   ============================================= */
.donate-section {
    border-top: 1px solid var(--gold-border);
}

/* 流程步驟 */
.process-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 900px;
    margin: 0 auto 55px;
    position: relative;
    list-style: none;
    padding: 0;
}

.process-bar::before {
    content: '';
    position: absolute;
    top: 36px;
    left: 12%;
    right: 12%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold-border-strong), var(--gold-border-strong), transparent);
}

.process-step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
}

.step-circle {
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    border-radius: var(--radius-full);
    border: 2px solid var(--gold);
    background: radial-gradient(circle at 35% 35%, var(--crimson-deep), var(--bg-deep));
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.6rem;
    transition: var(--transition-base);
}
.process-step:hover .step-circle {
    background: var(--gold);
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--fund-gold-glow);
}

.step-label {
    display: block;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--gold-bright);
    margin-bottom: 4px;
}
.step-desc {
    display: block;
    font-family: var(--font-body);
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* 捐款卡片 */
.donate-cards {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.donate-card {
    background: var(--bg-card);
    backdrop-filter: blur(8px);
    border: 1.5px solid var(--gold-border);
    border-radius: var(--radius-md);
    padding: 30px 22px 26px;
    width: 280px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}
.donate-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 60%, rgba(196,154,69,0.06) 100%);
    pointer-events: none;
}
.donate-card:hover,
.donate-card.selected {
    background: var(--bg-card-hover);
    border-color: var(--gold);
    transform: translateY(-6px);
    box-shadow: 0 12px 30px var(--c-black-a50), 0 0 15px var(--fund-gold-glow);
}

/* SVG 圖示 */
.card-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
}

.donate-card h3 {
    font-family: var(--font-brand);
    font-size: 1.4rem;
    color: var(--text-light);
    margin: 0 0 8px;
    letter-spacing: 2px;
}
.donate-card .card-price {
    font-family: var(--font-body);
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--gold-bright);
    margin-bottom: 18px;
}

.qty-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
}
.qty-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    border: 1.5px solid var(--fund-gold-dark);
    background: transparent;
    color: var(--gold-bright);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.qty-btn:hover {
    background: var(--gold);
    color: var(--bg-deep);
    border-color: var(--gold);
}
.qty-num {
    font-family: var(--font-body);
    font-size: 1.4rem;
    font-weight: 900;
    min-width: 28px;
    text-align: center;
}

.donate-total {
    text-align: center;
    font-family: var(--font-body);
    font-size: 1.7rem;
    font-weight: 900;
    color: var(--gold-bright);
    margin-bottom: 28px;
    letter-spacing: 1px;
}

/* 按鈕 */
.btn-gold {
    display: inline-block;
    padding: 15px 40px;
    font-family: var(--font-body);
    font-size: 1.15rem;
    font-weight: 900;
    border-radius: var(--radius-50);
    border: none;
    background: linear-gradient(to bottom, var(--fund-gold-pale), var(--gold), var(--fund-gold-dark));
    color: #2b0808;
    cursor: pointer;
    transition: var(--transition-base);
    box-shadow: 0 5px 18px var(--c-black-a40);
    position: relative;
    overflow: hidden;
    letter-spacing: 1px;
}
.btn-gold:hover:not(:disabled) {
    transform: scale(1.03);
    filter: brightness(1.1);
}
.btn-gold:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.btn-gold::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
    transform: translateX(-220%) skewX(-20deg);
    animation: btn-sheen 4.5s infinite;
}
@keyframes btn-sheen {
    0% { transform: translateX(-220%) skewX(-20deg); }
    15% { transform: translateX(420%) skewX(-20deg); }
    100% { transform: translateX(420%) skewX(-20deg); }
}

.btn-gold-outline {
    background: transparent;
    border: 1.5px solid var(--gold);
    color: var(--gold-bright);
    box-shadow: none;
    padding: 10px 28px;
    font-size: 1rem;
}
.btn-gold-outline::after { display: none; }
.btn-gold-outline:hover:not(:disabled) {
    background: var(--gold);
    color: var(--bg-deep);
}

.btn-secondary {
    background: rgba(255,255,255,0.15);
    color: var(--text-dim);
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: none;
}
.btn-secondary::after { display: none; }
.btn-secondary:hover { background: rgba(255,255,255,0.25); }

.btn-center { text-align: center; }

/* =============================================
   6. 委員會 Banner
   ============================================= */
.committee-cta {
    max-width: 900px;
    margin: 0 auto;
    background: linear-gradient(135deg, rgba(139,0,0,0.7), rgba(60,0,0,0.85));
    border: 2px solid var(--gold);
    border-radius: var(--radius-md);
    padding: 50px 35px;
    text-align: center;
    box-shadow: 0 10px 30px var(--c-black-a50);
    position: relative;
    overflow: hidden;
}
.committee-cta::before {
    content: '';
    position: absolute;
    inset: -50%;
    background: radial-gradient(circle at 30% 30%, rgba(196,154,69,0.08) 0%, transparent 60%);
    pointer-events: none;
}
.committee-cta h3 {
    font-family: var(--font-brand);
    font-size: 1.9rem;
    color: var(--fund-gold-pale);
    margin: 0 0 14px;
    letter-spacing: 2px;
}
.committee-cta p {
    font-size: 1.08rem;
    color: var(--text-dim);
    line-height: 2;
    margin-bottom: 28px;
}
.committee-cta .hl { color: var(--gold-bright); font-weight: 700; }

/* =============================================
   7. Modals
   ============================================= */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(6px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.modal-box {
    background: var(--text-light);
    color: var(--c-333);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    border: 3px solid var(--gold);
    border-radius: var(--radius-14);
    padding: 30px;
    box-shadow: 0 0 40px var(--c-black-a50);
}
.modal-heading {
    font-family: var(--font-brand);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--crimson);
    border-bottom: 1px solid var(--c-ddd);
    padding-bottom: 14px;
    margin-bottom: 18px;
}

.form-group { margin-bottom: 14px; text-align: left; }
.form-group label {
    display: block;
    font-family: var(--font-body);
    font-weight: 700;
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: #444;
}
.form-control {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--c-ccc);
    border-radius: var(--radius-6);
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.form-control:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 2px rgba(196,154,69,0.2);
}

.emotional-hint {
    background: #fff8ee;
    padding: 14px 16px;
    border-radius: var(--radius-8);
    font-size: 0.92rem;
    border-left: 4px solid var(--crimson);
    margin-bottom: 18px;
    color: var(--c-555);
    line-height: 1.7;
}

.modal-btn-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 18px;
}

/* 聖旨捲軸 modal */
.scroll-wrap {
    position: relative;
    width: 100%;
    max-width: 620px;
}
.scroll-rod-top, .scroll-rod-bottom {
    height: 32px;
    background: linear-gradient(to bottom, var(--fund-gold-pale), var(--gold), var(--fund-gold-dark));
    border-radius: var(--radius-14);
    position: relative;
    z-index: 3;
    box-shadow: 0 4px 12px var(--c-black-a50);
}
.scroll-parchment {
    background: var(--crimson);
    padding: 0 24px;
    max-height: 0;
    opacity: 0;
    overflow-y: auto;
    border-inline: 4px solid var(--gold);
    transition: max-height 1s ease, opacity 0.5s;
}
.scroll-wrap.unrolled .scroll-parchment {
    max-height: 60vh;
    opacity: 1;
    padding: 28px 24px;
}
.scroll-close-btn {
    position: absolute;
    top: -18px;
    right: -18px;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-full);
    background: var(--crimson-deep);
    border: 2px solid var(--gold);
    color: var(--white);
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.scroll-close-btn:hover { background: var(--gold); color: var(--bg-deep); }

/* =============================================
   8. Animations
   ============================================= */
@keyframes seamlessScroll {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

/* =============================================
   9. RWD
   ============================================= */
@media (min-width: 768px) {
    .form-row { display: flex; gap: 14px; }
    .form-row .form-group { flex: 1; }
}

@media (max-width: 768px) {
    .fund-hero { min-height: 70vh; }
    .progress-ring-wrap { width: 220px; height: 220px; }
    .ring-percent { font-size: 2.5rem; }

    /* 標題縮小：防止 5 字標題（捐贈芳名錄）被擠到換行 */
    .section-title .title-main {
        font-size: 1.5rem;
        letter-spacing: 2px;
        gap: 10px;
    }
    .section-title .title-yuanbao {
        width: 24px;
    }

    /* timeline 改單欄
       ⚠ 必須同時針對 odd 與 even，否則 .timeline-node 的 specificity 鬥不過 :nth-child(odd)
       ⚠ 必須 align-items: stretch，否則 column 模式下交叉軸 flex-start 會讓圖片容器寬度塌陷為 0 */
    .timeline::before { left: 20px; }
    .timeline-node:nth-child(odd),
    .timeline-node:nth-child(even) {
        flex-direction: column;
        align-items: stretch;
        padding-left: 50px;
        gap: 20px;
    }
    .timeline-dot {
        left: 20px;
        top: 10px;
    }
    .timeline-img img { height: 200px; }

    .process-bar {
        flex-direction: column;
        gap: 28px;
        align-items: center;
    }
    .process-bar::before { display: none; }

    .donate-card { width: 100%; max-width: 320px; }

    .honor-scroll-box::before,
    .honor-scroll-box::after { display: none; }

    .committee-cta { padding: 35px 22px; }
    .committee-cta h3 { font-size: 1.5rem; }
}
/* === Refined page polish === */
.fund-section {
    padding-top: 96px;
    padding-bottom: 96px;
}

.section-title .title-main,
.hero-headline h1 {
    letter-spacing: 0.14em;
}

.ring-deco-rotate {
    animation-duration: 80s;
    opacity: 0.82;
}

.origin-section,
.vision-section,
.honor-section,
.donate-section {
    border-color: var(--fund-gold-a16);
}

.vision-card,
.donate-card,
.modal-content,
.scroll-content {
    border-color: rgba(196, 154, 69, 0.22);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
}

.donate-card {
    border-radius: var(--radius-12);
}

.donate-card:hover,
.donate-card.selected {
    box-shadow: 0 18px 42px rgba(0,0,0,0.38), 0 0 18px var(--fund-gold-a16);
}

.btn-gold::after {
    animation: none;
    transition: transform 0.65s ease;
}

.btn-gold:hover::after {
    transform: translateX(420%) skewX(-20deg);
}

@media (prefers-reduced-motion: reduce) {
    .ring-deco-rotate,
    .marquee-track,
    .btn-gold::after {
        animation: none !important;
    }
}

/* =============================================
   owner 2026-07-17 文案落地：建廟邀請敘事流
   長文可讀性優先（窄欄寬 / 寬行高 / 段落間距）；金鈕統一 .btn-action 家族。
   全 token（零硬編色、零 px 字級——ratchet 守門）。
   ============================================= */

/* 緣起影片（選染） */
.fund-video-section {
    max-width: 920px;
}
.fund-video-section .video-frame {
    max-width: 720px;
    margin: 0 auto;
}
.video-caption {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 18px 0 0;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-muted);
    letter-spacing: 1px;
}
.video-caption .triangle {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 8px solid var(--gold);
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
}

/* 敘事章節 */
.fund-story {
    border-top: 1px solid var(--fund-gold-a16);
}
.story-chapter {
    max-width: 44rem;
    margin: 0 auto;
}
.story-chapter + .story-chapter {
    margin-top: 56px;
    padding-top: 56px;
    border-top: 1px solid var(--fund-gold-a16);
}
.story-chapter__title {
    font-family: var(--font-brand);
    font-size: clamp(1.5rem, 4.6vw, 2.1rem);
    font-weight: 900;
    text-align: center;
    letter-spacing: 0.08em;
    line-height: 1.5;
    max-width: 20ch;
    margin: 0 auto 30px;
    background: linear-gradient(to bottom, var(--fund-gold-pale) 0%, var(--gold) 55%, var(--fund-gold-dark) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 0 var(--c-black-a40));
}
.story-chapter p {
    font-size: clamp(1rem, 2.6vw, 1.1rem);
    line-height: 2.1;
    color: var(--text-dim);
    margin: 0 0 1.25em;
    text-wrap: pretty;
}
.story-chapter p:last-child {
    margin-bottom: 0;
}
.story-chapter p.story-beat {
    text-align: center;
    font-family: var(--font-brand);
    font-weight: 700;
    color: var(--gold-bright);
    letter-spacing: 0.12em;
}
.story-chapter p.story-closing {
    text-align: center;
    font-family: var(--font-brand);
    font-size: clamp(1.2rem, 3.4vw, 1.6rem);
    font-weight: 900;
    line-height: 1.9;
    letter-spacing: 0.06em;
    color: var(--fund-gold-pale);
    margin-top: 8px;
}

/* 「不只有錢這一條路」的三種護持方式 */
.giving-ways {
    list-style: none;
    margin: 0 0 1.25em;
    padding: 0;
    display: grid;
    gap: 16px;
}
.giving-ways li {
    position: relative;
    padding-left: 1.8em;
    font-size: clamp(1rem, 2.6vw, 1.1rem);
    line-height: 2;
    color: var(--text-dim);
}
.giving-ways li::before {
    content: '';
    position: absolute;
    left: 0.2em;
    top: 0.85em;
    width: 9px;
    height: 9px;
    border-radius: var(--radius-full);
    background: var(--gold);
    box-shadow: 0 0 10px var(--fund-gold-glow);
}

/* 芳名錄補充說明 + CTA 列 */
.honor-note {
    text-align: center;
    font-size: clamp(1rem, 2.6vw, 1.1rem);
    color: var(--text-dim);
    margin: 30px auto 26px;
}
.cta-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}
.cta-row--center {
    margin-top: 36px;
}

/* 金鈕：.btn-action 家族（本頁 token 重述深色版金 pill；與 services／index 同一顆家族） */
.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 14px 42px;
    font-family: var(--font-body);
    font-size: 1.15rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    color: var(--bg-deep);
    background: linear-gradient(to bottom, var(--fund-gold-pale), var(--gold), var(--fund-gold-dark));
    border: none;
    border-radius: var(--radius-999);
    box-shadow: 0 5px 18px var(--c-black-a40);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-base);
}
.btn-action:hover:not(:disabled),
.btn-action:focus-visible {
    transform: translateY(-2px);
    filter: brightness(1.08);
    box-shadow: 0 12px 30px var(--fund-gold-glow);
}
.btn-action:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.btn-action--ghost {
    color: var(--gold-bright);
    background: transparent;
    border: 1.5px solid var(--gold);
    box-shadow: none;
}
.btn-action--ghost:hover:not(:disabled),
.btn-action--ghost:focus-visible {
    color: var(--bg-deep);
    background: var(--gold);
    filter: none;
}
.committee-cta__btn {
    margin-top: 4px;
}

/* 頁底免責 */
.fund-disclaimer {
    max-width: 52rem;
    margin: 0 auto;
    padding: 8px 24px 88px;
    text-align: center;
    font-size: 0.85rem;
    line-height: 1.9;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .story-chapter + .story-chapter {
        margin-top: 44px;
        padding-top: 44px;
    }
    .btn-action {
        padding: 13px 32px;
        font-size: 1.05rem;
    }
    .cta-row {
        gap: 12px;
    }
}
