/**
 * About Page - 現代和風卷軸 (Modern Shrine Scroll)
 * 底紙 #F9F6F2 + 墨色 #3E2723 + 暖金 #d4a574
 */

/* --- 字體變數定義 --- */
:root {
    --font-main: "Noto Sans TC", -apple-system, BlinkMacSystemFont, sans-serif;
    --font-shrine: "Noto Serif TC", serif;
}

/* 全域預設：內文用黑體 */
body {
    font-family: var(--font-main);
    color: #3E2723;
}

/* --- 統一所有大標題 (H2) --- */
.hero-title-center,
.stage-header h2,
.shrine-font,
.shrine-font-small {
    font-family: var(--font-shrine) !important;
    font-weight: 900;
    letter-spacing: 0.1em;
    color: #3E2723;
}

/* 針對各頁面的微調 */
.hero-title-center {
    font-size: 3rem;
}

.stage-header h2 {
    font-size: 2.5rem;
}

.shrine-font {
    font-size: 3.5rem;
}

.shrine-font-small {
    font-size: 2.5rem;
    color: #fbbf24;
}

/* --- 統一所有內文 (P) --- */
p, 
.hero-desc-center, 
.stage-header p,
.evolution-caption p,
.simple-cta,
.office-intro,
.qbei-bubble p,
.feature-item span {
    font-family: var(--font-main);
    font-weight: 500;
    letter-spacing: 0.05em;
}

/* 行動呼籲文字 */
.stage-header p,
.simple-cta {
    font-weight: 700;
    color: #8B4513;
}

/* --- 確保 HTML/Body 不干擾 Sticky --- */
html, body {
    overflow-x: clip;
    overflow-y: visible !important;
    height: auto !important;
}

/* --- Apple 風格漸顯動畫核心 --- */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* 延遲效果 (Stagger) */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }

/* --- 全局背景：有質感的和紙 --- */
.apple-page-wrapper {
    background-color: #F9F6F2;
    background-image: 
        url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.04'/%3E%3C/svg%3E"),
        linear-gradient(to bottom, #FFFFFF 0%, #F9F6F2 20%, #F5F0EB 100%);
    color: #3E2723;
    font-family: "Noto Sans TC", -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* 關鍵：讓 overflow 全部可見，不要藏（這會殺死 sticky） */
    overflow: visible !important;
    
    /* 移除固定高度，讓內容自然撐開 Body */
    height: auto !important;
    min-height: 100vh;
    
    /* 移除任何 scroll-snap 相關設定 */
    scroll-snap-type: none;
}

.apple-page-wrapper * {
    box-sizing: border-box;
}

/* --- 第一屏 Hero：祭壇式佈局 --- */
.hero-screen-centered {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background-color: #F9F6F2;
    overflow: hidden;
    padding: 90px 20px 40px;
    text-align: center;
}

/* 背景光暈：聚光燈效果 */
.center-glow {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.12) 0%, rgba(255, 255, 255, 0) 70%);
    z-index: 0;
    pointer-events: none;
}

/* --- 文字區 --- */
.hero-text-center {
    position: relative;
    z-index: 2;
    margin-bottom: 30px;
    max-width: 800px;
}

.brand-pill-center {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(62, 39, 35, 0.06);
    color: #5D4037;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 30px;
    margin-bottom: 16px;
}

.hero-title-center {
    font-family: "Noto Sans TC", -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 900;
    font-size: 2.8rem;
    line-height: 1.2;
    color: #2c3e50;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.highlight-underline {
    position: relative;
    color: #3E2723;
    display: inline-block;
}

/* 螢光筆效果 */
.highlight-underline::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: -5px;
    width: calc(100% + 10px);
    height: 14px;
    background: rgba(251, 191, 36, 0.4);
    z-index: -1;
    border-radius: 4px;
}

.hero-desc-center {
    font-size: 1.15rem;
    color: #666;
    line-height: 1.7;
}

.hero-desc-center strong {
    color: #3E2723;
}

/* --- 卡片區：舞台中心 --- */
.card-stage {
    position: relative;
    z-index: 2;
    perspective: 1000px;
}

.dark-pass-card-center {
    width: 360px;
    max-width: 90vw;
    background: #2d1f1a;
    border-radius: 24px;
    padding: 6px;
    box-shadow: 
        0 30px 60px -12px rgba(45, 31, 26, 0.3),
        0 0 0 1px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dark-pass-card-center:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 40px 80px -12px rgba(45, 31, 26, 0.4),
        0 0 0 1px rgba(0, 0, 0, 0.1);
}

.card-inner {
    background: #2d1f1a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 20px 28px 28px;
    text-align: center;
}

/* 頭像凸出卡片頂部 */
.avatar-group-center {
    position: relative;
    width: 90px;
    height: 90px;
    margin: -55px auto 16px;
}

.qbei-avatar-large {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid #2d1f1a;
    background: #fff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.status-badge-center {
    position: absolute;
    bottom: 0;
    right: -5px;
    background: #10b981;
    color: #fff;
    font-size: 0.65rem;
    padding: 3px 8px;
    border-radius: 12px;
    border: 3px solid #2d1f1a;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pass-title {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 12px;
    letter-spacing: 1px;
    font-weight: 600;
}

.qbei-say-center {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    margin-bottom: 24px;
    font-style: italic;
}

/* 按鈕組 */
.card-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-gold-solid {
    display: block;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #fbbf24, #d97706);
    color: #fff;
    font-weight: 700;
    border-radius: 12px;
    text-decoration: none;
    box-shadow: 0 4px 0 #92400e;
    transition: all 0.15s ease;
}

.btn-gold-solid:hover {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #92400e;
}

.btn-outline-light {
    display: block;
    width: 100%;
    padding: 12px;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.btn-outline-light:hover {
    border-color: #fff;
    color: #fff;
}

/* App Store 推廣區塊 (卡片內) */
.card-app-promo {
    margin-top: 20px;
    text-align: center;
}
.card-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.card-divider::before,
.card-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}
.card-divider span {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
}
.card-app-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    margin-bottom: 12px;
}
.app-store-badge-card {
    display: inline-block;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.app-store-badge-card:hover {
    transform: scale(1.05);
    opacity: 0.9;
}
.app-store-badge-card img {
    height: 36px;
    width: auto;
}

/* --- 沉浸式繪馬進化區 (電梯井) --- */
.immersive-evolution-section {
    position: relative;
    height: 500vh;
    background-color: #F9F6F2;
    z-index: 10;
    
    /* 關鍵：強制使用 block，防止 flex 導致 sticky 失效 */
    display: block !important;
    
    /* 確保沒有 overflow 屬性干擾 */
    overflow: visible;
}

/* --- 黏性舞台 (電梯車廂) --- */
.sticky-stage {
    /* Sticky 的核心 */
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    
    width: 100%;
    height: 100vh;
    
    /* 讓內容在舞台內部置中 */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    
    overflow: hidden;
    will-change: transform;
}

.stage-header {
    text-align: center;
    position: absolute;
    top: 12%;
    width: 100%;
    z-index: 10;
}

.stage-header h2 {
    font-family: "Noto Sans TC", -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 2.2rem;
    font-weight: 900;
    color: #3E2723;
    margin-bottom: 10px;
}

.stage-header p {
    color: #888;
    font-size: 0.9rem;
    letter-spacing: 2px;
}

/* 繪馬疊加容器 */
.ema-morph-container {
    position: relative;
    width: 280px;
    height: 280px;
    margin: 30px 0;
    flex-shrink: 0;
}

.ema-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    /* 預設全部隱藏 */
    opacity: 0;
    transform: scale(1);
    
    /* 讓切換更順暢 */
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    will-change: opacity, transform;
}

.ema-layer img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.15));
}

/* 只有被加上 active 的層才會顯示 */
.ema-layer.active {
    opacity: 1;
    transform: scale(1.1);
    z-index: 10;
}

/* 黑金特效 */
.layer-gold.active img {
    filter: drop-shadow(0 0 30px rgba(251, 191, 36, 0.6));
}

/* 文字區 */
.evolution-caption {
    text-align: center;
    max-width: 500px;
    height: 100px;
    padding: 0 20px;
}

.evolution-caption h3 {
    font-size: 1.6rem;
    color: #3E2723;
    margin-bottom: 10px;
    font-weight: 900;
    transition: opacity 0.3s;
}

.evolution-caption p {
    font-size: 1rem;
    color: #5D4037;
    line-height: 1.6;
    transition: opacity 0.3s;
}

/* 進度條 */
.evolution-progress {
    width: 180px;
    height: 4px;
    background: #e0dcd8;
    border-radius: 2px;
    margin-top: 24px;
    overflow: hidden;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #d97706, #fbbf24);
    transition: width 0.1s;
}

/* 滾動提示 */
.scroll-hint {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.scroll-hint p {
    font-size: 0.8rem;
    color: #888;
    margin-top: 8px;
    letter-spacing: 2px;
}

.mouse-icon {
    display: block;
    width: 24px;
    height: 36px;
    border: 2px solid #888;
    border-radius: 12px;
    margin: 0 auto;
    position: relative;
}

.wheel {
    display: block;
    width: 4px;
    height: 4px;
    background: #888;
    border-radius: 50%;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: wheel-drop 1.5s infinite;
}

@keyframes wheel-drop {
    0% { top: 6px; opacity: 1; }
    100% { top: 18px; opacity: 0; }
}

/* --- 繪馬殿・雲深不知處 --- */
.shrine-vision-section {
    position: relative;
    min-height: 110vh;
    background-color: transparent;
    
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

/* 1. 文字區域 */
.vision-content {
    position: relative;
    z-index: 5;
    margin-bottom: -40px;
}

.shrine-font {
    font-size: 4rem;
    font-weight: 900;
    color: #3E2723;
    margin-bottom: 24px;
    letter-spacing: 10px;
    font-family: "Noto Serif TC", serif;
}

.shrine-desc {
    font-size: 1.1rem;
    line-height: 2;
    color: #5D4037;
    font-weight: 500;
    letter-spacing: 2px;
}

/* 2. 雲霧鳥居容器 */
.misty-gate-wrapper {
    position: relative;
    width: 100%;
    max-width: 1000px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.misty-gate-img {
    width: 90%;
    height: auto;
    display: block;
    
    /* 輕微羽化：從 85% 開始漸變 */
    -webkit-mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 85%, transparent 100%);
}

/* 3. 前景雲霧層 (已停用) */
.cloud-layer {
    display: none;
}

/* --- 第四頁：社務所 (木製櫃檯風) --- */
.shrine-office-section {
    position: relative;
    min-height: 100vh;
    background-color: #F9F6F2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    overflow: hidden;
}

/* 巨大的木板容器 */
.office-board-wrapper {
    position: relative;
    width: 100%;
    max-width: 1000px;
    background: #3E2723;
    border-radius: 40px;
    padding: 60px;
    
    display: flex;
    align-items: center;
    gap: 60px;
    
    box-shadow: 
        0 30px 60px -10px rgba(62, 39, 35, 0.4),
        inset 0 0 0 2px rgba(255, 255, 255, 0.1);
}

/* --- 左側：Q北區域 --- */
.qbei-character-area {
    position: relative;
    flex: 1;
    display: flex;
    justify-content: center;
}

/* 破格的關鍵：負邊距與放大 */
.qbei-img {
    width: 140%;
    max-width: 450px;
    height: auto;
    
    margin-left: -40px;
    margin-bottom: -80px;
    
    filter: drop-shadow(10px 10px 20px rgba(0,0,0,0.3));
    transform: rotate(-5deg);
    transition: transform 0.3s ease;
}

.qbei-img:hover {
    transform: rotate(0deg) scale(1.05);
}

/* 對話氣泡 */
.qbei-bubble {
    position: absolute;
    top: -40px;
    right: -20px;
    background: #fff;
    color: #3E2723;
    padding: 15px 25px;
    border-radius: 20px;
    border-bottom-left-radius: 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    font-weight: 700;
    z-index: 5;
    animation: floatBubble 3s infinite ease-in-out;
}

.qbei-bubble p {
    font-size: 1rem;
    line-height: 1.5;
}

@keyframes floatBubble {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* --- 右側：資訊區域 --- */
.office-info-area {
    flex: 1.2;
    color: #F9F6F2;
    text-align: left;
}

.shrine-font-small {
    font-size: 2.5rem;
    font-family: "Noto Serif TC", serif;
    font-weight: 900;
    color: #fbbf24;
    margin-bottom: 24px;
}

.office-intro {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 40px;
    color: rgba(255, 255, 255, 0.9);
}

.office-intro strong {
    color: #fbbf24;
    font-size: 1.3rem;
}

/* 功能圖標網格 */
.feature-icons-grid {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    justify-content: center;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.icon-circle {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.2s;
    overflow: hidden;
}

.icon-circle img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.feature-item:hover .icon-circle {
    background: #fbbf24;
    color: #3E2723;
    transform: scale(1.1);
}

.feature-item span {
    font-size: 0.9rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
}

.divider-line {
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.15);
    margin-bottom: 30px;
}

.qbei-intro {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
}

.qbei-intro strong {
    color: #fff;
    font-size: 1.1rem;
}

/* --- 道具展示區塊 --- */
.shrine-item-showcase-section {
    position: relative;
    padding: 100px 20px;
    background-color: #F9F6F2;
    text-align: center;
    overflow: hidden;
}

.item-showcase-container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.showcase-header {
    margin-bottom: 50px;
}

.showcase-desc {
    font-size: 1.1rem;
    color: #5D4037;
    line-height: 1.8;
}

.showcase-desc strong {
    color: #d97706;
    font-size: 1.2rem;
}

/* UI 畫框包裝 */
.ui-frame-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 800px;
    
    background: #fff;
    padding: 12px;
    border-radius: 24px;
    
    box-shadow: 
        0 20px 60px -10px rgba(62, 39, 35, 0.25),
        0 0 0 1px rgba(62, 39, 35, 0.05);
        
    transform: perspective(1000px) rotateX(2deg);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.ui-frame-wrapper:hover {
    transform: perspective(1000px) rotateX(0deg) translateY(-10px) scale(1.02);
    box-shadow: 0 30px 70px -10px rgba(62, 39, 35, 0.3);
}

.ui-screenshot {
    width: 100%;
    height: auto;
    border-radius: 16px;
    display: block;
}

.glow-backdrop {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.2) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

/* 底部標籤 */
.feature-tags {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.tag-pill {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(62, 39, 35, 0.1);
    color: #3E2723;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 700;
    backdrop-filter: blur(5px);
}

/* --- 第五頁：朵朵的神社 (置中版) --- */
.shrine-duoduo-section {
    position: relative;
    min-height: 100vh;
    background-color: #F9F6F2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 20px;
    overflow: hidden;
    text-align: center;
}

.duoduo-container-centered {
    max-width: 1000px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 50px;
}

/* 1. 頭部文案 */
.duoduo-header {
    max-width: 600px;
    margin: 0 auto;
}

.duoduo-desc-center {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #5D4037;
    margin-top: 20px;
}

.duoduo-desc-center strong {
    color: #d97706;
    font-size: 1.25rem;
}

/* 2. 中央大圖區 */
.duoduo-scene-center {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 10px 0;
}

.photo-frame-large {
    background: #fff;
    padding: 16px;
    padding-bottom: 70px;
    box-shadow: 
        0 30px 60px -15px rgba(62, 39, 35, 0.25),
        0 0 0 1px rgba(62, 39, 35, 0.05);
    border-radius: 4px;
    transform: rotate(-1deg);
    transition: transform 0.3s ease;
}

.duoduo-scene-center:hover .photo-frame-large {
    transform: rotate(0deg) scale(1.02);
}

.scene-img {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid #eee;
}

/* 對話氣泡 (置中版) */
.duoduo-bubble-center {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    color: #3E2723;
    padding: 12px 30px;
    border-radius: 40px;
    border-bottom-left-radius: 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    font-weight: 700;
    z-index: 5;
    width: max-content;
    max-width: 90%;
    animation: floatBubble 4s infinite ease-in-out;
}

.duoduo-bubble-center p {
    font-size: 1rem;
    margin: 0;
}

/* 膠帶裝飾 */
.tape-deco-center {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%) rotate(2deg);
    width: 140px;
    height: 35px;
    background-color: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 10;
}

/* 3. 底部功能網格 */
.custom-features-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    width: 100%;
    max-width: 900px;
    margin-top: 20px;
}

.feature-card-center {
    background: #fff;
    padding: 30px 20px;
    border-radius: 20px;
    border: 1px solid rgba(62, 39, 35, 0.08);
    box-shadow: 0 4px 6px rgba(62, 39, 35, 0.02);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.feature-card-center:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(62, 39, 35, 0.1);
    border-color: #d97706;
}

.feature-icon-large {
    font-size: 2.5rem;
    margin-bottom: 16px;
    background: #FFF8E1;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.feature-card-center h4 {
    font-family: var(--font-shrine);
    font-size: 1.2rem;
    color: #3E2723;
    margin-bottom: 10px;
}

.feature-card-center p {
    font-size: 0.95rem;
    color: #5D4037;
    line-height: 1.6;
    margin: 0;
}

/* 手機版適配 */
@media (max-width: 768px) {
    .custom-features-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .feature-card-center {
        flex-direction: row;
        text-align: left;
        align-items: center;
        gap: 20px;
        padding: 20px;
    }
    
    .feature-icon-large {
        width: 50px;
        height: 50px;
        font-size: 1.8rem;
        margin-bottom: 0;
        flex-shrink: 0;
    }
    
    .duoduo-bubble-center {
        font-size: 0.9rem;
        padding: 10px 20px;
    }
    
    .photo-frame-large {
        padding-bottom: 50px;
    }
}

.login-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #5D4037;
    border-bottom: 2px solid #d4a574;
    padding-bottom: 12px;
    display: inline-block;
}

.login-card > p {
    font-size: 0.95rem;
    color: #4A6985;
    margin-bottom: 28px;
    line-height: 1.5;
    font-style: italic;
}

.card-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 主按鈕：深褐木頭底 + 暖金文字 */
.btn-apple-primary {
    display: block;
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(180deg, #5D4037 0%, #4a3228 100%);
    color: #d4a574;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: 12px;
    text-decoration: none;
    border: 1px solid #3E2723;
    box-shadow: 0 4px 0 #2d1f1a;
    transition: all 0.15s ease;
}

.btn-apple-primary:hover {
    background: linear-gradient(180deg, #4a3228 0%, #3E2723 100%);
    transform: translateY(2px);
    box-shadow: 0 2px 0 #2d1f1a;
}

/* 次按鈕：白底 + 灰藍色 */
.btn-apple-secondary {
    display: block;
    width: 100%;
    padding: 16px 24px;
    background: #FFFFFF;
    color: #4A6985;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    border: 2px solid #4A6985;
    transition: all 0.2s ease;
}

.btn-apple-secondary:hover {
    background: #4A6985;
    color: #fff;
    transform: translateY(-2px);
}

.guest-link {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0d6cc;
}

.guest-link a {
    color: #8B4513;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s;
}

.guest-link a:hover {
    color: #5D4037;
}

/* --- 全螢幕區塊（磁吸滾動版） --- */
.sticky-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    padding: 60px 40px;
    background: linear-gradient(135deg, #F5F0EB 0%, #ebe6e0 100%);
    
    /* 磁吸對齊 */
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.sticky-section:nth-child(odd) {
    background: #F9F6F2;
}

.sticky-visual {
    flex: 1;
    max-width: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sticky-visual img {
    width: 100%;
    max-width: 450px;
    border-radius: 12px;
    box-shadow: 
        0 25px 50px -12px rgba(62, 39, 35, 0.2),
        0 0 0 3px #5D4037;
    transition: transform 0.3s ease;
}

.sticky-visual:hover img {
    transform: scale(1.02);
}

.scroll-content {
    flex: 1;
    max-width: 500px;
}

.text-block {
    padding: 20px 0;
}

.text-block + .text-block {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid rgba(212, 165, 116, 0.3);
}

.text-block h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: #3E2723;
    letter-spacing: -0.01em;
    border-left: 6px solid #d4a574;
    padding-left: 20px;
}

.text-block p {
    font-size: 1.25rem;
    line-height: 1.8;
    color: #5D4037;
    font-weight: 500;
}

.text-block p strong {
    color: #3E2723;
    font-weight: 700;
}

/* --- 特色亮點區 --- */
.features-grid {
    min-height: 100vh;
    padding: 80px 20px;
    background: linear-gradient(180deg, #F9F6F2 0%, #F5F0EB 100%);
    display: flex;
    align-items: center;
    
    /* 磁吸對齊 */
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.features-grid-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.features-grid h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 60px;
    color: #3E2723;
}

.features-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    padding: 32px;
    background: #fff;
    border: 2px solid #e0d6cc;
    border-radius: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(62, 39, 35, 0.1);
    border-color: #d4a574;
}

.feature-card .icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #3E2723;
}

.feature-card p {
    font-size: 1rem;
    line-height: 1.6;
    color: #5D4037;
}

/* --- Final CTA --- */
.final-cta {
    min-height: 100vh;
    padding: 80px 20px;
    text-align: center;
    background: linear-gradient(180deg, #F5F0EB 0%, #ebe6e0 50%, #F9F6F2 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    
    /* 磁吸對齊 */
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.final-cta h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: #3E2723;
}

.final-cta p {
    font-size: 1.15rem;
    color: #5D4037;
    margin-bottom: 40px;
}

.final-cta .btn-apple-primary.big {
    display: inline-block;
    width: auto;
    padding: 20px 48px;
    font-size: 1.15rem;
}

/* --- 版本資訊 --- */
.version-info {
    padding: 50px 20px;
    text-align: center;
    background: #F9F6F2;
    border-top: 1px solid #e0d6cc;
}

.version-info p {
    font-size: 0.9rem;
    color: #8B4513;
    line-height: 1.8;
}

/* --- 手機版響應式 --- */
@media (max-width: 900px) {
    /* 手機上關閉磁吸滾動（內容長度不固定） */
    .apple-page-wrapper {
        height: auto;
        overflow-y: visible;
        scroll-snap-type: none;
    }
    
    .hero-screen-centered,
    .sticky-section,
    .apple-showcase-section,
    .features-grid,
    .final-cta {
        scroll-snap-align: none;
        scroll-snap-stop: normal;
        min-height: auto;
    }

    .immersive-evolution-section {
        height: 250vh;
    }

    .stage-header {
        top: 8%;
    }

    .stage-header h2 {
        font-size: 1.8rem;
    }

    .ema-morph-container {
        width: 200px;
        height: 200px;
    }

    .evolution-caption h3 {
        font-size: 1.4rem;
    }

    .evolution-caption p {
        font-size: 0.9rem;
    }

    /* 繪馬殿雲霧版手機版 */
    .shrine-font {
        font-size: 2.8rem;
        letter-spacing: 5px;
    }
    .misty-gate-img {
        width: 110%;
        margin-left: -5%;
    }
    .vision-content {
        margin-bottom: 0;
    }

    /* 社務所手機版 */
    .office-board-wrapper {
        flex-direction: column;
        padding: 40px 30px;
        text-align: center;
        gap: 30px;
        margin-top: 50px;
    }
    .qbei-character-area {
        order: -1;
        margin-bottom: 20px;
    }
    .qbei-img {
        width: 200px;
        margin: 0;
        margin-top: -100px;
        transform: none;
    }
    .qbei-bubble {
        top: -110px;
        right: auto;
        left: 50%;
        transform: translateX(-50%);
        width: 200px;
    }
    .office-info-area {
        text-align: center;
    }
    .feature-icons-grid {
        justify-content: center;
        gap: 20px;
    }

    .hero-screen-centered {
        padding: 100px 20px 60px;
    }

    .hero-title-center {
        font-size: 2rem;
    }

    .hero-desc-center {
        font-size: 1rem;
    }

    .center-glow {
        width: 100%;
        height: 500px;
    }

    .hero-text-center {
        margin-bottom: 60px;
    }

    .dark-pass-card-center {
        width: 100%;
        max-width: 340px;
    }

    .avatar-group-center {
        margin-top: -50px;
    }

    .sticky-section {
        flex-direction: column;
        padding: 60px 20px;
        gap: 40px;
    }

    .sticky-visual {
        max-width: 100%;
    }
    
    .sticky-visual img {
        width: 100%;
        max-width: 350px;
    }

    .scroll-content {
        max-width: 100%;
    }

    .text-block {
        padding: 0;
        text-align: center;
    }
    
    .text-block + .text-block {
        margin-top: 30px;
        padding-top: 30px;
    }

    .text-block h2 {
        font-size: 1.75rem;
        border-left: none;
        padding-left: 0;
        border-bottom: 4px solid #d4a574;
        padding-bottom: 12px;
        display: inline-block;
    }
    
    .text-block p { 
        font-size: 1.05rem; 
    }

    .features-grid {
        padding: 60px 20px;
    }

    .features-list {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .final-cta {
        padding: 60px 20px;
    }

    .final-cta h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-screen {
        padding: 80px 16px 40px;
    }

    .hero-text-group h1 {
        font-size: 2rem;
    }

    .login-card {
        padding: 32px 20px;
        box-shadow: 
            6px 6px 0px rgba(93, 64, 55, 0.1),
            0 0 0 1px #d4a574 inset;
    }

    .text-block {
        padding: 32px 16px;
    }
}

/* --- 頁尾：結願之章 (輕量化版) --- */
.shrine-footer-section {
    position: relative;
    background-color: #F9F6F2;
    padding: 120px 20px 60px;
    text-align: center;
    overflow: hidden;
    border-top: 1px solid rgba(62, 39, 35, 0.08);
}

.footer-content-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

/* --- 核心證書框 --- */
.certificate-frame {
    position: relative;
    padding: 60px 40px;
    margin-bottom: 80px;
    background: transparent;
    border: 4px double rgba(62, 39, 35, 0.2);
    border-radius: 12px;
}

/* 四個角的裝飾 */
.certificate-frame::before,
.certificate-frame::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid #3E2723;
    opacity: 0.5;
    transition: all 0.3s;
}

.certificate-frame::before {
    top: -2px;
    left: -2px;
    border-right: none;
    border-bottom: none;
}

.certificate-frame::after {
    bottom: -2px;
    right: -2px;
    border-left: none;
    border-top: none;
}

/* --- 背景大印章 (Goshuin) --- */
.bg-stamp {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    width: 300px;
    height: 300px;
    border: 8px solid rgba(211, 47, 47, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 0;
    pointer-events: none;
}

.stamp-text {
    font-family: "Noto Serif TC", serif;
    font-size: 6rem;
    font-weight: 900;
    color: rgba(211, 47, 47, 0.08);
    line-height: 1.2;
    letter-spacing: 10px;
    writing-mode: vertical-rl;
    text-orientation: upright;
}

/* --- 文字區 --- */
.certificate-text {
    position: relative;
    z-index: 1;
}

.certificate-text h2 {
    font-family: var(--font-shrine);
    font-size: 2.8rem;
    color: #3E2723;
    margin-bottom: 24px;
    line-height: 1.4;
}

.invite-desc {
    font-size: 1.2rem;
    line-height: 1.9;
    color: #5D4037;
    margin-bottom: 50px;
}

.highlight-text {
    color: #d97706;
    font-weight: 700;
    display: block;
    margin-top: 10px;
}

/* --- 按鈕區 --- */
.action-area {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

/* --- 優化後的：深色木頭大按鈕 --- */
.btn-wood-plaque-large {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 260px;
    padding: 16px 0;
    background: linear-gradient(to bottom, #4e3830 0%, #3E2723 100%);
    color: #fbbf24;
    border-radius: 10px;
    text-decoration: none;
    border: 1px solid #2d1f1a;
    box-shadow: 
        0 6px 0 #251612,
        0 15px 25px rgba(0,0,0,0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.15s ease-out;
    position: relative;
    overflow: hidden;
}

.btn-wood-plaque-large::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right, 
        rgba(255,255,255,0) 0%, 
        rgba(255,255,255,0.05) 50%, 
        rgba(255,255,255,0) 100%
    );
    transform: rotate(45deg) translateY(-100%);
    transition: transform 0.5s;
}

.btn-wood-plaque-large:hover::after {
    transform: rotate(45deg) translateY(0%);
}

.btn-wood-plaque-large:hover {
    transform: translateY(2px);
    background: linear-gradient(to bottom, #5a4138 0%, #462c28 100%);
    box-shadow: 
        0 4px 0 #251612,
        0 10px 15px rgba(0,0,0,0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-wood-plaque-large:active {
    transform: translateY(6px);
    box-shadow: 
        0 0 0 #251612,
        inset 0 2px 5px rgba(0,0,0,0.2);
    background: #3E2723;
}

.btn-main {
    font-family: var(--font-shrine);
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: 3px;
    text-shadow: 0 2px 3px rgba(0,0,0,0.3);
}

.btn-wood-plaque-large .btn-sub {
    font-size: 0.8rem;
    opacity: 0.85;
    margin-top: 4px;
    font-family: var(--font-main);
    font-weight: 500;
    color: rgba(251, 191, 36, 0.9);
}

.link-guest-simple {
    color: #8B4513;
    font-size: 1rem;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.link-guest-simple:hover {
    border-bottom-color: #8B4513;
}

/* App Store 推廣區塊 (底部證書區) */
.footer-app-promo {
    margin-top: 24px;
    text-align: center;
}
.footer-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.footer-divider::before,
.footer-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(139, 69, 19, 0.3);
}
.footer-divider span {
    color: rgba(139, 69, 19, 0.5);
    font-size: 0.85rem;
}
.footer-app-text {
    color: #5D4037;
    font-size: 0.95rem;
    margin-bottom: 6px;
}
.footer-app-sub {
    font-size: 0.82rem;
    color: #8B7355;
    margin-bottom: 12px;
}
.app-store-badge-footer {
    display: inline-block;
    margin-bottom: 10px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.footer-app-promo .link-guest-simple {
    display: block;
}
.app-store-badge-footer:hover {
    transform: scale(1.05);
    opacity: 0.9;
}
.app-store-badge-footer img {
    height: 40px;
    width: auto;
}

/* 手機版 */
@media (max-width: 600px) {
    .certificate-frame {
        padding: 40px 20px;
        border-width: 2px;
    }
    .bg-stamp {
        width: 200px;
        height: 200px;
    }
    .stamp-text {
        font-size: 3.5rem;
    }
    .certificate-text h2 {
        font-size: 2rem;
    }
    .btn-wood-plaque-large {
        max-width: 100%;
    }
}
