/* ==========================================
   福來運轉 | 核心樣式表 (極簡純淨版)
   風格：新中式極簡 (Modern Zen) + 藍天漸層
   維護：已重構並移除冗餘代碼，分為 13 個模組區塊
   效能：已針對 CSS 動畫進行 GPU 硬體加速優化
   ========================================== */
   
/* ==========================================
   1. 變數系統 (Variables)
   ========================================== */
:root {
    /* 品牌色系 */
    --onene-orange: #FF6900; 
    --onene-green: #00852B;  
    --onene-blue: #0055BF;   
    --onene-navy: #0e1fb4;   
    --onene-purple: #8A12A8; 
    --onene-pink: #FF528D;   
    --onene-yellow: #FFD500; 
    --onene-yellow-dark: #DDAA00;
    --onene-red: #E3000B;    
    
    /* 基礎色彩 */
    --bg-light: #f4f5f8;       
    --card-bg: #ffffff;        
    --text-main: #05131D;      
    --text-muted: #5C6A79;     
    --border-color: rgba(5, 19, 29, 0.08); 
    --border-solid: #E5E9ED;
    
    /* 陰影與特效 */
    --shadow-soft: 0 4px 12px rgba(5, 19, 29, 0.06);   
    --shadow-hover: 0 8px 24px rgba(5, 19, 29, 0.12);
    --glass-bg: rgba(255, 255, 255, 0.95); 
    --hover-bg: rgba(0, 85, 191, 0.06); 
    --answer-glow-base: rgba(0, 85, 191, 0.15);
    --answer-glow-peak: rgba(0, 85, 191, 0.3);

    /* 動態文字色 */
    --dynamic-yellow: var(--text-main);
    --dynamic-purple: var(--text-main);
    --dynamic-blue: var(--text-main);
    --dynamic-pink: var(--text-main);
    --dynamic-green: var(--text-main);

    /* 動畫與過渡 */
    --transition-standard: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); 
}

/* ==========================================
   2. 全域重置與基礎佈局 (Reset & Base Layout)
   ========================================== */
*, *::before, *::after { box-sizing: border-box; }

html, body { overflow-x: hidden; width: 100%; position: relative; }

body { 
    font-family: 'Inter', 'Noto Sans TC', sans-serif; 
    margin: 0; color: var(--text-main); background-color: var(--bg-light); 
    line-height: 1.6; -webkit-font-smoothing: antialiased; 
}

.container { 
    width: 100%; max-width: 860px; margin: 0 auto; 
    padding: 60px 24px 80px 24px; display: flex; flex-direction: column; align-items: center; 
}

.main-header { width: 100%; position: relative; }
.main-content { width: 100%; max-width: 680px; }

#main-content-list { animation: smoothFadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

@media (min-width: 1024px) { 
    .container { padding-top: 80px; } 
    .main-header { max-width: 680px; margin: 0 auto; } 
}

/* ==========================================
   3. 頂部品牌區、早安圖與社群列
   ========================================== */
.good-morning-generator { width: 100%; display: flex; flex-direction: column; align-items: center; margin-bottom: 20px; padding: 0 16px; }

.good-morning-card {
    width: 100%; aspect-ratio: 3 / 4; max-width: 380px; position: relative;
    background-image: var(--random-bless-bg, url('img/bless/m01.jpg'));
    background-size: cover; background-position: center;
    border-radius: 32px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.gmc-top-left { position: absolute; top: 20px; left: 20px; z-index: 10; }
.gmc-logo { height: 35px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3)); }

.gmc-top-right { position: absolute; top: 30px; right: 25px; z-index: 10; }
.vertical-text {
    display: flex; flex-direction: column; align-items: center; gap: 20px; 
    font-family: 'Noto Serif TC', serif; font-size: 4.5rem; font-weight: 700; 
    color: #ffffff; text-shadow: 2px 4px 10px rgba(0,0,0,0.4); line-height: 1; animation: fadeIn 0.8s ease; 
}
.vertical-text.three-words { font-size: 3.8rem; }

.gmc-bottom {
    position: absolute; bottom: 20px; left: 20px; right: 20px;
    background: rgba(255, 255, 255, 0.6); border-radius: 32px; padding: 12px 16px; box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.gmc-date-text { font-size: 1.05rem; font-weight: 700; color: var(--onene-red); letter-spacing: 2px; border-bottom: 1px dashed rgba(0, 0, 0, 0.15); padding-bottom: 8px; margin-bottom: 8px; text-align: center; }

.lunar-yiji-compact { display: flex; flex-direction: column; transition: transform 0.2s ease, opacity 0.2s ease; cursor: pointer; padding-left: 4px; padding-bottom: 2px; gap: 4px; }
.lunar-yiji-compact:hover { transform: scale(1.02); opacity: 0.8; }
.lunar-yiji-compact:active { transform: scale(0.95); }

.yiji-row { display: flex; align-items: center; gap: 10px; }
.yi-label, .ji-label { color: white; border-radius: 50%; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: bold; flex-shrink: 0; margin-top: 0; }
.yi-label { background-color: var(--onene-green); }
.ji-label { background-color: var(--onene-red); }
.yiji-text { font-size: 0.9rem; line-height: 1.4; color: var(--text-main); font-weight: 500; text-align: left; }

.gmc-actions, .gmc-extra-buttons { max-width: 380px; }

/* 社群列 */
.social-links-bar { position: absolute; bottom: -22px; left: 50%; transform: translateX(-50%); display: flex; gap: 12px; z-index: 10; }
.social-link-item {
    width: 44px; height: 44px; border-radius: 50%; background: var(--card-bg); 
    box-shadow: 0 4px 15px rgba(0,0,0,0.06), inset 0 1px 2px rgba(255,255,255,0.8); border: 1px solid rgba(255,255,255,0.6); 
    display: flex; align-items: center; justify-content: center; color: var(--onene-navy); font-weight: 700; font-size: 0.95rem; text-decoration: none; transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); overflow: hidden;
}
.social-link-item img, .social-link-item svg { width: 20px; height: 20px; object-fit: contain; fill: currentColor; pointer-events: none; }
.social-link-item:active { transform: scale(0.92); }
@media (hover: hover) {
    .social-link-item:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(0,0,0,0.1), inset 0 1px 2px rgba(255,255,255,0.9); color: var(--hover-color, var(--onene-red)); }
}

/* 早安圖互動列 */
.post-action-bar { max-width: 380px; padding: 8px 12px; }
.post-action-btn { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 8px; color: var(--text-muted); border-radius: 8px; cursor: pointer; transition: background-color 0.2s, color 0.2s; font-size: 0.95rem; font-weight: 500; flex: 1; white-space: nowrap; }
@media (hover: hover) { .post-action-btn:hover { background-color: rgba(0, 0, 0, 0.05); color: var(--text-main); } }
.post-action-btn:active { transform: scale(0.96); background-color: rgba(0, 0, 0, 0.08); }

@media (max-width: 380px) {
    .post-action-btn { font-size: 0.85rem; gap: 4px; padding: 8px 2px; }
    .post-action-btn .material-symbols-rounded { font-size: 18px !important; }
}

/* ==========================================
   4. 快捷工具列 (Quick Tools Dock)
   ========================================== */
.quick-tools-container { 
    display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 16px; 
    width: calc(100% + 24px); margin-right: -24px; padding: 30px 24px 40px 0; 
    scroll-snap-type: x mandatory; -ms-overflow-style: none; scrollbar-width: none; justify-content: flex-start; 
}
@media (min-width: 600px) { .quick-tools-container { justify-content: center; width: 100%; margin-right: 0; padding: 20px 0; } }

.tool-btn { 
    flex: 0 0 auto; scroll-snap-align: start; width: 72px; height: 76px; 
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; 
    background: transparent; border: none; cursor: pointer; text-decoration: none; 
}
.tool-btn .tool-icon, .tool-btn svg, .tool-btn img { background-color: var(--text-muted); width: 40px; height: 40px; object-fit: contain; flex-shrink: 0; display: block; margin: 0 auto; transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.tool-label { font-size: 0.85rem; font-weight: 500; color: var(--text-muted); letter-spacing: 1px; transition: color 0.3s; }

@media (min-width: 769px) {
    .tool-btn.stats .tool-icon { background-color: var(--onene-blue); }
    .tool-btn.tarot .tool-icon { background-color: var(--onene-purple); }
    .tool-btn.praise .tool-icon { background-color: var(--onene-pink); }
    .tool-btn.drift .tool-icon { background-color: var(--onene-yellow-dark, #DDAA00); }
    .tool-btn.settings .tool-icon { background-color: var(--text-muted); } 
}
@media (hover: hover) { 
    .tool-btn:hover { transform: translateY(-4px); } 
    .tool-btn:hover .tool-icon, .tool-btn:hover svg, .tool-btn:hover img { transform: scale(1.15); background-color: var(--text-main) !important; }
    .tool-btn:hover .tool-label { color: var(--text-main); }
}

/* ==========================================
   5. 動態卡片網格系統 (Bento Grid Base)
   ========================================== */
.grid-container { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 50px; width: 100%; }

.card { 
    border-radius: 32px; padding: 24px 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; 
    background: rgba(255, 255, 255, 0.9); border: 1px solid var(--border-color); 
    box-shadow: var(--shadow-soft); cursor: pointer; text-decoration: none; 
    position: relative; overflow: hidden; min-height: 120px; transition: var(--transition-standard); 
}
.card-icon { width: 36px; height: 36px; font-size: 36px; z-index: 2; position: relative; color: var(--onene-red); transition: color 0.4s; }
.card-text-group { display: flex; flex-direction: column; flex: 1; z-index: 2; position: relative; align-items: center; margin-top: 12px; }

@media (hover: hover) { .card:not(.fullscreen-mode):hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); border-color: var(--border-solid); background: var(--card-bg); } }
.card:not(.fullscreen-mode):active { transform: scale(0.98); }

/* 單欄(滿版)卡片樣式 */
.card.layout-full { grid-column: span 2; width: 100%; }
@media (min-width: 480px) {
    #practice-cards-wrapper .card.layout-full { flex-direction: row; align-items: center; text-align: left; }
    #practice-cards-wrapper .card.layout-full .card-icon { margin: 0 16px 0 0; width: 44px; height: 44px; font-size: 22px; }
    #practice-cards-wrapper .card.layout-full .card-text-group { align-items: flex-start; }
}

.card.span-2 { 
    grid-column: span 2; min-height: auto; padding: 36px 48px; border-radius: 32px;
    background: linear-gradient(rgba(255, 255, 255, 0.90), rgba(255, 255, 255, 0.70)), url('img/Lunar.svg') repeat;
    background-size: cover, 60px; background-position: center;
}

.practice-cards-wrapper .card { background: #ffffff; border: 1px solid var(--border-color); color: var(--text-main); align-items: flex-start; text-align: left; box-shadow: 0 4px 15px rgba(0,0,0,0.02); padding: 28px 24px; }
.practice-cards-wrapper .card-icon { width: 32px; height: 32px; font-size: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 0 12px 0; transition: all 0.3s ease; background-color: #ffffff; border: 1px solid rgba(5, 19, 29, 0.08); color: var(--text-main); }

@media (hover: hover) { .practice-cards-wrapper .card:hover .card-icon { transform: scale(1.1); border-color: rgba(5, 19, 29, 0.12); box-shadow: 0 4px 12px rgba(0,0,0,0.03); } }

.practice-cards-wrapper .card-icon[data-color="red"] { color: var(--onene-red); }
.practice-cards-wrapper .card-icon[data-color="orange"] { color: #E65A00; }
.practice-cards-wrapper .card-icon[data-color="yellow"] { color: var(--onene-yellow-dark, #DDAA00); }
.practice-cards-wrapper .card-icon[data-color="green"] { color: var(--onene-green); }
.practice-cards-wrapper .card-icon[data-color="pink"] { color: var(--onene-pink); }
.practice-cards-wrapper .card-icon[data-color="purple"] { color: var(--onene-purple); }
.practice-cards-wrapper .card-icon[data-color="blue"] { color: var(--onene-blue); }
.practice-cards-wrapper .card-icon[data-color="navy"] { color: var(--onene-navy); }

.practice-cards-wrapper .card .card-text-group { align-items: flex-start; margin-top: 0; padding-right: 0; width: 100%; }
.practice-cards-wrapper .card .card-text-group .opacity-80 { color: var(--text-muted); margin-top: 6px; font-size: 0.85rem; }

@media (hover: hover) { .practice-cards-wrapper .card:hover { border-color: rgba(5, 19, 29, 0.12); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06); transform: translateY(-4px); } }

/* ===== 針對「祈福接好運」(答案之書、塔羅占卜) 圖示改為圓形填色、白色 icon ===== */
#blessing-cards-wrapper .card-icon {
    color: #ffffff !important;
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* 增加微陰影讓實心圖示更有質感 */
}

/* 根據 data-color 屬性自動套用對應的實心背景色 */
#blessing-cards-wrapper .card-icon[data-color="red"] { background-color: var(--onene-red); }
#blessing-cards-wrapper .card-icon[data-color="orange"] { background-color: #E65A00; }
#blessing-cards-wrapper .card-icon[data-color="yellow"] { background-color: var(--onene-yellow-dark, #DDAA00); }
#blessing-cards-wrapper .card-icon[data-color="green"] { background-color: var(--onene-green); }
#blessing-cards-wrapper .card-icon[data-color="pink"] { background-color: var(--onene-pink); }
#blessing-cards-wrapper .card-icon[data-color="purple"] { background-color: var(--onene-purple); }
#blessing-cards-wrapper .card-icon[data-color="blue"] { background-color: var(--onene-blue); }
#blessing-cards-wrapper .card-icon[data-color="navy"] { background-color: var(--onene-navy); }

/* ==========================================
   6. 音樂播放器 (Audio Player)
   ========================================== */
.bgm-player-card.modern-player {
    width: 100%; max-width: 680px; margin: 0 auto 20px auto; padding: 24px; 
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
    background: rgba(255, 255, 255, 0.6); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-radius: 28px; border: 1px solid var(--border-color); box-shadow: var(--shadow-soft); 
}

.player-top-info { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    width: 100%; 
    padding: 0 10px;
}

.track-info-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.player-top-info .track-title { 
    font-size: 1rem; 
    font-weight: bold; 
    color: var(--text-main); 
    letter-spacing: 1px; 
    margin-bottom: 4px;
}

.player-top-info .track-artist { 
    font-size: 0.85rem; 
    font-weight: 500; 
}

.music-wave { 
    display: flex; align-items: flex-end; gap: 3px; height: 18px; 
    opacity: 0; transform: translateX(-10px); transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); 
}
.music-wave.is-playing, .music-wave.is-loading { opacity: 1; transform: translateX(0); }
.music-wave.is-loading { align-items: center; }
.music-wave span { 
    width: 3px; background-color: var(--onene-blue); border-radius: 2px; 
    height: 100%; transform-origin: bottom; transform: scaleY(0.2); will-change: transform; 
}
.music-wave.is-playing span { animation: wave-grow 1s ease-in-out infinite; }
.music-wave span:nth-child(2) { animation-delay: 0.2s; }
.music-wave span:nth-child(3) { animation-delay: 0.4s; }
@keyframes wave-grow { 0%, 100% { transform: scaleY(0.2); } 50% { transform: scaleY(1); } }

.player-controls-row { display: flex; align-items: center; justify-content: center; gap: 20px; width: 100%; }

.icon-btn-medium { 
    border: none; background: transparent; color: var(--text-muted); cursor: pointer; 
    display: flex; align-items: center; justify-content: center; transition: all 0.2s ease;
    width: 40px; height: 40px; border-radius: 50%;
}
.icon-btn-medium .material-symbols-rounded { font-size: 26px; }
.icon-btn-medium:hover { color: var(--text-main); background: rgba(0,0,0,0.05); }
.icon-btn-medium:active { transform: scale(0.9); }
.icon-btn-medium.is-active { color: var(--onene-blue); background: rgba(0, 85, 191, 0.1); transform: scale(1.05); }

.player-control-btn-large {
    width: 56px; height: 56px; border-radius: 50%; border: none; 
    background: #ffffff; color: var(--text-main); 
    display: flex; align-items: center; justify-content: center; cursor: pointer; 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.player-control-btn-large .material-symbols-rounded { font-size: 36px; }

.player-control-btn-large:hover { transform: scale(1.05); color: var(--onene-blue); }
.player-control-btn-large:active { transform: scale(0.95); }

.player-control-btn-large.is-playing { 
    background: var(--onene-blue); 
    color: #ffffff; 
    box-shadow: 0 6px 20px rgba(0, 85, 191, 0.25); 
}

/* ==========================================
   7. 特定功能模組介面 (Features UI)
   ========================================== */

/* 7.1 每日易經開運 */
.iching-card {
    width: 100%; max-width: 680px; margin: 0 auto 20px auto; padding: 32px 32px 12px 32px; 
    text-align: left; position: relative; z-index: 5; border-radius: 32px; border: none; box-shadow: none; 
    background: rgba(0, 0, 0, 0.04); color: var(--text-main); 
    --active-iching-color: var(--onene-blue); 
}
.iching-card .tc-muted { color: var(--text-muted); }
.answer-category-tabs { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.category-tab { padding: 8px 20px; border-radius: 20px; background: #ffffff; color: var(--text-muted); border: none; display: flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; transition: all 0.3s ease; flex-shrink: 0; box-shadow: none !important; }
.category-tab[data-target="wealth"] .material-symbols-rounded { color: var(--onene-yellow-dark); }
.category-tab[data-target="career"] .material-symbols-rounded { color: var(--onene-blue); }
.category-tab[data-target="love"] .material-symbols-rounded { color: var(--onene-pink); }
.category-tab[data-target="health"] .material-symbols-rounded { color: var(--onene-green); }
.category-tab[data-target="study"] .material-symbols-rounded { color: var(--onene-purple); }
.category-tab.active .material-symbols-rounded { transform: scale(1.15); transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.category-tab.active { background: #ffffff; color: var(--text-main); transform: scale(1.05); box-shadow: none !important; font-weight: bold; }
#answer-tabs-container.has-selection .category-tab:not(.active):not(#reset-answer-btn), #answer-tabs-container.has-selection .category-plus-btn { display: none; }
#reset-answer-btn.category-close-btn { width: 40px !important; height: 40px !important; flex: 0 0 40px !important; padding: 0 !important; border-radius: 50% !important; border: 1px solid var(--border-color); background: #ffffff; color: var(--text-muted); display: flex; align-items: center; justify-content: center; }
@media (hover: hover) { #reset-answer-btn.category-close-btn:hover { background: var(--bg-light); border-color: rgba(5, 19, 29, 0.15); transform: scale(1.05); } }

.answer-response-box { background: #ffffff; border-radius: 16px; padding: 16px 20px; min-height: 80px; display: flex; align-items: center; justify-content: center; text-align: left; border: none; opacity: 0.95; transition: all 0.4s ease; box-shadow: none; }
.answer-response-box.has-content { opacity: 1; }
.iching-card .answer-response-box .tc-main { color: var(--text-main); }
.iching-card .answer-response-box .tc-muted { color: var(--text-muted); }

.dynamic-input-wrapper { position: relative; display: flex; flex-direction: column; margin-bottom: 20px; }
.iching-card .iching-dynamic-input { background: #ffffff; color: var(--text-main); resize: none; font-family: inherit; line-height: 1.6; padding: 16px 20px; border-radius: 12px; border: none; height: 58px; min-height: 58px; box-shadow: none; transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1), padding 0.4s, box-shadow 0.3s; overflow: hidden; }
.iching-card .iching-dynamic-input::placeholder { color: var(--text-muted); opacity: 0.6; }
.dynamic-input-wrapper:focus-within .iching-dynamic-input, .dynamic-input-wrapper.has-content .iching-dynamic-input { height: 110px; padding-bottom: 50px; box-shadow: none; outline: 2px solid var(--active-iching-color); }
.iching-card .inner-submit-btn { position: absolute; right: 12px; bottom: 12px; background: var(--onene-yellow); color: var(--text-main); border: none; padding: 8px 18px; border-radius: 8px; cursor: pointer; z-index: 10; opacity: 0; transform: translateY(5px); transition: all 0.3s ease; pointer-events: none; }
.dynamic-input-wrapper:focus-within .inner-submit-btn, .dynamic-input-wrapper.has-content .inner-submit-btn { opacity: 1; transform: translateY(0); pointer-events: auto; }

/* 7.2 塔羅牌區塊 */
.tarot-stat-box { background: rgba(0,0,0,0.03); border-radius: 12px; padding: 10px; text-align: center; border: 1px solid rgba(0,0,0,0.02); }
.tarot-card { width: 200px; border-radius: 16px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15); }
#tarot-desc { font-weight: 600; line-height: 1.8; color: var(--text-main); margin-top: 16px; margin-bottom: 24px; }
#tarot-practice { font-size: 1.05rem; line-height: 1.5; color: var(--text-muted); }
.drift-tarot-card { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 16px; padding: 40px 30px; width: 100%; min-height: 400px; box-shadow: var(--shadow-soft); }

/* 7.3 個人紀錄/統計網格 */
.stats-bento-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 30px; }
.glass-bento-box { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px; padding: 20px; box-shadow: var(--shadow-soft); display: flex; flex-direction: column; justify-content: center; }
.glass-bento-box.span-2 { grid-column: span 2; flex-direction: row; align-items: center; justify-content: space-between; }
.stats-bar-container { width: 100%; height: 8px; background: rgba(0,0,0,0.05); border-radius: 4px; overflow: hidden; }
.stats-bar { 
    height: 100%; 
    background: var(--onene-blue); 
    width: 100%; /* 填滿容器 */
    transform: scaleX(0); /* 初始縮放為 0 */
    transform-origin: left; /* 從左側開始延展 */
    transition: transform 1s ease-out; 
    border-radius: 4px; 
} 

/* 7.4 其他模組 (農民曆, 短影音, 合作夥伴, 商品) */
.lunar-pattern-bg { background: var(--onene-yellow) url('img/Lunar.svg') repeat; background-size: 60px; color: #fff; padding: 20px; border-radius: 32px; margin-bottom: 15px; text-align: center; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); }
.circled-char-group { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin-right: 6px; vertical-align: middle; }
.zen-circle-overlay { position: absolute; width: 28px; height: 28px; background-color: #c02c38; -webkit-mask-image: url('img/circle.svg'); mask-image: url('img/circle.svg'); z-index: 1; opacity: 0.9; }
.char-overlay { position: relative; z-index: 2; font-weight: bold; font-size: 1.2rem; color: var(--text-main); margin: 0; padding: 0; line-height: 1; }
.lunar-yiji-wrapper { display: flex; flex-direction: column; gap: 16px; width: 100%; margin-top: 5px; margin-bottom: 25px; }
@media (min-width: 480px) { .lunar-yiji-wrapper { flex-direction: row; gap: 20px; } }

.partner-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 12px; width: 100%; justify-items: center; }
.partner-item { width: 100%; max-width: 60px; aspect-ratio: 1 / 1; border-radius: 50%; overflow: hidden; background: rgba(255, 255, 255, 0.5); border: 1px solid var(--border-color); display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-soft); transition: var(--transition-standard); cursor: pointer; }
.partner-img { width: 100%; height: 100%; object-fit: cover; background: #ffffff; }
@media (hover: hover) { .partner-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--onene-yellow); background: #ffffff; } }

.featured-video-scroll { display: flex; gap: 16px; overflow-x: auto; padding: 4px 4px 12px 4px; scroll-snap-type: x mandatory; width: 100%; box-sizing: border-box; scrollbar-width: none; }
.featured-video-scroll::-webkit-scrollbar { display: none; } 
.video-card { flex: 0 0 calc((100% - 32px) / 3); min-width: 140px; border-radius: 32px; overflow: hidden; box-shadow: var(--shadow-soft); border: 1px solid var(--border-color); scroll-snap-align: start; background: #000; aspect-ratio: 9 / 16; position: relative; cursor: pointer; transition: var(--transition-standard); }
.video-card-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 10; }
.video-card iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; border: none; }
@media (hover: hover) { .video-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); border-color: var(--border-solid); } }
.video-card:active { transform: scale(0.96); }

.lucky-products-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; width: 100%; }
.product-card { padding: 0; display: flex; flex-direction: column; text-decoration: none; overflow: hidden; min-height: auto; color: var(--text-main); }
.product-img-wrapper { width: 100%; aspect-ratio: 1/1; background: rgba(0,0,0,0.03); overflow: hidden; position: relative; display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 0.8rem; }
.product-img-wrapper img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-info { padding: 16px 12px; display: flex; flex-direction: column; flex: 1; justify-content: space-between; align-items: center; text-align: center; }
.product-title { color: var(--text-main); display: -webkit-box; line-clamp: 2; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; font-size: 1.05rem; letter-spacing: 2px; }
.product-price { color: var(--onene-red); margin-top: 8px; font-size: 0.95rem; letter-spacing: 1px; font-weight: bold; }
#blessing-cards-container, #tools-cards-container, #featured-video-container, #lucky-products-container, #partners-container, #purchase-history-section { margin-top: 30px; }

/* ==========================================
   8. 互動練習專屬 UI (Interactive Practice UI)
   ========================================== */
.orb-wrapper { width: 150px; height: 150px; margin: 0 auto; display: flex; align-items: center; justify-content: center; border-radius: 50%; position: relative; }
.orb-element { width: 50px; height: 50px; background: radial-gradient(circle, #fcd34d 0%, var(--onene-yellow) 100%); border-radius: 50%; box-shadow: 0 4px 20px rgba(194, 148, 58, 0.6), inset 0 2px 4px rgba(255, 255, 255, 0.6); cursor: pointer; transition: transform 0.1s ease-out; position: relative; z-index: 2; user-select: none; border: 1px solid rgba(255, 255, 255, 0.5); }

.breath-dots { display: flex; gap: 10px; z-index: 2; position: relative; justify-content: center; width: 100%; }
.breath-dots .dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(0,0,0,0.08); transition: all 0.4s ease; }
.breath-dots .dot.active { background: var(--onene-yellow); transform: scale(1.3); box-shadow: 0 0 10px rgba(194, 148, 58, 0.4); }
.breath-circle { width: 120px; height: 120px; border-radius: 50%; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(1); transition: transform 4s linear; opacity: 0.2; pointer-events: none; }
.is-expanding .breath-circle { transform: translate(-50%, -50%) scale(2.5); opacity: 0.6; }

/* 🌟 [GPU 優化] 呼吸光暈 */
.shared-breathe-wrapper { position: relative; width: 140px; height: 140px; margin: 10px auto 0; display: flex; align-items: center; justify-content: center; }
.shared-breathe-halo { 
    position: absolute; top: 50%; left: 50%; margin-top: -70px; margin-left: -70px; 
    width: 140px; height: 140px; border-radius: 50%; 
    background: radial-gradient(circle, rgba(194, 148, 58, 0.8) 0%, transparent 70%); 
    filter: blur(15px); /* 🟢 靜態濾鏡 */
    will-change: transform, opacity;
    animation: sharedHaloBreathe 8s ease-in-out infinite; pointer-events: none; z-index: 1; 
}
.shared-breathe-icon { position: relative; z-index: 2; animation: sharedIconBreathe 8s ease-in-out infinite; color: var(--onene-purple); will-change: transform; }

.bubble-grid { 
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; padding: 20px; width: 100%; max-width: 360px; margin: 0 auto; 
    background: linear-gradient(135deg, #f5f0e6 0%, #e8dfce 100%); border-radius: 24px; border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: inset 2px 2px 10px rgba(0, 0, 0, 0.04), inset -3px -3px 12px rgba(255, 255, 255, 0.7), 0 10px 30px rgba(0, 0, 0, 0.05);
}
.bubble { 
    width: 100%; aspect-ratio: 1 / 1; height: auto; border-radius: 50%; cursor: pointer; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; 
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.05) 100%); border: 1px solid rgba(255, 255, 255, 0.8); 
    box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.06), inset -4px -4px 10px rgba(0, 0, 0, 0.05), inset 4px 4px 12px rgba(255, 255, 255, 0.9); transition: all 0.2s cubic-bezier(0.25, 1.5, 0.5, 1); 
}
.bubble:not(.is-popped):hover { transform: scale(1.08); filter: brightness(1.05); box-shadow: 2px 6px 12px rgba(0, 0, 0, 0.1), inset -4px -4px 10px rgba(0, 0, 0, 0.05), inset 4px 4px 12px rgba(255, 255, 255, 0.95); }
.bubble.is-popped { transform: scale(0.92); background: rgba(0, 0, 0, 0.02); border: 1px solid rgba(0, 0, 0, 0.06); box-shadow: inset 2px 2px 6px rgba(0, 0, 0, 0.08), inset -2px -2px 6px rgba(255, 255, 255, 0.6); pointer-events: none; opacity: 0.6; }
.bubble.is-popped::after { content: ''; position: absolute; top: 50%; left: 50%; width: 70%; height: 70%; transform: translate(-50%, -50%); background: linear-gradient(45deg, transparent 46%, rgba(0,0,0,0.06) 49%, rgba(0,0,0,0.06) 51%, transparent 54%), linear-gradient(-45deg, transparent 46%, rgba(0,0,0,0.06) 49%, rgba(0,0,0,0.06) 51%, transparent 54%); border-radius: 50%; }

.sand-safe-area { flex: 1; display: flex; flex-direction: column; width: 100%; height: 100%; min-height: 400px; }
#sand-canvas-wrapper { flex: 1; width: 100%; position: relative; background: rgba(0,0,0,0.03); border-radius: 12px; overflow: hidden; border: 1px solid var(--border-color); }

.mood-btn { border: 1px solid rgba(0, 85, 191, 0.4); color: var(--onene-blue); background: #ffffff; transition: all 0.3s ease; }
.mood-btn.is-active, .mood-btn:hover { background: rgba(0, 85, 191, 0.05); border-color: var(--onene-blue); }
.mood-btn-container { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

.guide-item { border: 1px solid rgba(0, 85, 191, 0.4); background: rgba(0, 0, 0, 0.02); padding: 16px 20px; border-radius: 12px; cursor: pointer; text-align: left; font-size: 0.95rem; transition: background 0.3s; display: flex; align-items: center; gap: 12px; color: var(--text-main); }
.guide-item:active { background: rgba(0, 0, 0, 0.05); }
.guide-item.checked { background: transparent; text-decoration: line-through; opacity: 0.5; border-color: transparent; }
.guide-item input { pointer-events: none; accent-color: var(--onene-yellow); width: 18px; height: 18px; }

.mind-clean-icon-wrapper { position: relative; width: 60px; height: 60px; }
/* 🌟 [GPU 優化] 垃圾箱光暈 */
.mind-clean-halo { 
    position: absolute; top: 50%; left: 50%; width: 80%; height: 80%; border-radius: 50%; 
    opacity: 0; z-index: 1; 
    filter: blur(15px); /* 🟢 靜態濾鏡 */
    will-change: transform, opacity;
    animation: mind-clean-halo-breathe 8s infinite ease-in-out; 
}
.mind-clean-icon { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 2; }
.mind-clean-halo-blue { background-color: var(--onene-blue); }
.mind-clean-halo-yellow { background-color: var(--onene-yellow); }

.receive-star-visual { width: 120px; height: 120px; margin: 20px auto 30px; position: relative; cursor: pointer; transition: transform 0.3s ease; }
.receive-star-visual:hover { transform: scale(1.05); }

/* ==========================================
   9. 彈窗與抽屜系統 (Modals & Drawers)
   ========================================== */
body:has(.app-modal.is-active), body:has(.card.fullscreen-mode) { overflow: hidden; }

body::after {
    content: ""; position: fixed; top: -50px; left: -50px; right: -50px; bottom: -50px; 
    background: rgba(0, 0, 0, 0.6); z-index: 9998; opacity: 0; pointer-events: none; transition: opacity 0.4s ease;
}
body:has(.app-modal.is-active)::after, body:has(.card.fullscreen-mode)::after { opacity: 1; pointer-events: auto; cursor: pointer; }

.app-modal, div.card.fullscreen-mode {
    position: fixed; top: 8vh; left: 0; right: 0; bottom: 0; 
    width: 100%; max-width: 680px; margin: 0 auto; padding: 0;
    background: var(--card-bg); border: 1px solid var(--border-color); border-bottom: none;
    border-radius: 28px 28px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,0.2);
    z-index: 10000; display: flex; flex-direction: column; overflow: hidden; overscroll-behavior: none;
}

.app-modal { transform: translateY(100%); transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s; opacity: 0; }
.app-modal.is-active { transform: translateY(0); opacity: 1; }
div.card.fullscreen-mode { transition: none; animation: slideUpDrawer 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }

.app-modal .modal-header {
    position: relative; padding: 28px 20px 16px; border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex; align-items: center; justify-content: center; background: var(--card-bg); z-index: 10; flex-shrink: 0;
}
.app-modal .modal-header::before {
    content: ""; position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
    width: 40px; height: 5px; background-color: #d1d1d1; border-radius: 10px;
}

.modal-close-btn {
    position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%; border: none; background: transparent;
    display: flex; align-items: center; justify-content: center; margin: 0; padding: 0;
    color: var(--text-muted); cursor: pointer; transition: background 0.2s, color 0.2s; z-index: 10010; 
}
.modal-close-btn:hover { background: rgba(0, 0, 0, 0.05); color: var(--text-main); }
.app-modal .modal-header h2, .app-modal .modal-header .txt-h2, .app-modal .modal-header .modal-title { margin: 0; font-size: 1.15rem; font-weight: bold; letter-spacing: 1px; text-align: center; color: var(--text-main); }

.app-modal .modal-body { flex: 1; padding: 30px 24px 60px; max-width: 600px; margin: 0 auto; width: 100%; overflow-y: auto; overscroll-behavior: contain; }
#dynamic-modal-body, #drift-modal-body, #praise-modal-body { padding: 30px 20px 40px; }

.modal-body::-webkit-scrollbar, .card-body::-webkit-scrollbar { display: none; }
.modal-body, .card-body { -ms-overflow-style: none; scrollbar-width: none; }

.card-content-center { flex: 1; display: flex; flex-direction: column; justify-content: flex-start; align-items: center; width: 100%; }

.card-action-bottom {
    width: 100%; margin-top: auto; padding-top: 15px; padding-bottom: 20px; flex-shrink: 0; 
    position: sticky; bottom: -40px; z-index: 50;
    background: color-mix(in srgb, var(--card-bg, #ffffff) 85%, transparent);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}

.card-body, .card-body-result, .drift-tarot-card { 
    padding: 20px 20px 40px; text-align: center; width: 100%; z-index: 2; 
    display: flex; flex-direction: column; align-items: center; justify-content: flex-start; flex: 1; 
    animation: fadeIn 0.5s ease; 
}
div.card.fullscreen-mode .card-body { overflow-y: auto; overscroll-behavior: contain; }

div.card.fullscreen-mode .action-fullscreen {
    position: absolute; top: -5px; right: 16px; left: auto;
    width: 36px; height: 36px; background: var(--hover-bg); border-radius: 50%; border: none;
    display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-muted);
    z-index: 10010; transition: background 0.2s; 
}
div.card.fullscreen-mode .action-fullscreen:hover { background: rgba(0,0,0,0.1); }

div.app-modal.modal-overlay-dark { background: transparent; border: none; box-shadow: none; }
div.app-modal.modal-centered { top: 0; height: 100vh; justify-content: center; border-radius: 0; }
.app-modal .mini-confirm-modal-body, .app-modal .birthday-modal-body { margin: 0; width: 100%; max-width: 100%; padding: 30px 24px 60px; text-align: center; }

#video-modal { background: transparent; border: none; box-shadow: none; }
.video-modal-body { padding: 60px 20px; display: flex; align-items: center; justify-content: center; height: 100%; overflow: hidden; }
.video-modal-content { 
    width: 100%; max-width: 420px; max-height: 75vh; aspect-ratio: 9/16; background: #000; border-radius: 16px; overflow: hidden; position: relative; box-shadow: 0 20px 50px rgba(0,0,0,0.5); 
    -webkit-mask-image: radial-gradient(white, black); mask-image: radial-gradient(white, black); transform: translate3d(0, 0, 0);
}
.video-modal-content iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; border-radius: inherit; }

@media screen and (min-width: 768px) {
    .card.fullscreen-mode, .app-modal {
        width: 420px; max-width: 100%; height: 80vh; max-height: 750px;
        top: auto; bottom: 50%; margin-bottom: -40vh; 
        border-radius: 24px; border-bottom: 1px solid var(--border-color); 
        box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.08);
        transform: translateY(150%);
    }
    @supports (height: 80dvh) { .card.fullscreen-mode, .app-modal { height: 80dvh; bottom: 10dvh; margin-bottom: 0; } }
    .card.fullscreen-mode.pop-active, .app-modal.is-active { transform: translateY(0); }
    .modal-close-btn, .app-modal .close-btn { top: 20px; right: 20px; left: auto; }
}

/* 影片彈窗 (滿版螢幕，必須固定在螢幕右上方) */
#video-modal .modal-close-btn {
    background: rgba(0, 0, 0, 0.4) !important; color: #ffffff !important; border: 1px solid rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: none !important; -webkit-backdrop-filter: none !important; box-shadow: none !important;
    width: 40px !important; height: 40px !important; border-radius: 50% !important; z-index: 10020 !important;
    display: flex; align-items: center; justify-content: center; transition: background 0.2s, transform 0.2s;
    position: fixed !important; top: 30px !important; right: 20px !important; left: auto !important;
}
@media (hover: hover) { #video-modal .modal-close-btn:hover { background: rgba(0, 0, 0, 0.6) !important; transform: scale(1.05); } }
@media (max-width: 768px) { #video-modal .modal-close-btn { top: 20px !important; right: 16px !important; } }

/* ==========================================
   10. UI 元件 (Buttons, Inputs, Toggles)
   ========================================== */
.glass-btn-primary, .glass-btn-card, .btn-outline {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px 20px; font-size: 1rem; font-weight: 500; cursor: pointer; 
    border-radius: 12px; transition: var(--transition-standard);
}

.glass-input { 
    width: 100%; padding: 14px 18px; border-radius: 8px; font-size: 0.95rem; font-family: inherit; outline: none; 
    background: rgba(0, 0, 0, 0.02); border: 1px solid rgba(0, 0, 0, 0.1); color: var(--text-main); transition: all 0.3s ease; 
}
.glass-input:focus { background: #fff; border-color: var(--onene-blue); box-shadow: 0 0 0 4px rgba(0, 85, 191, 0.15); }
.glass-input::placeholder { color: var(--text-muted); opacity: 0.7; }

.glass-btn-primary, .glass-btn-card { 
    background: var(--onene-blue); 
    color: #ffffff; 
    border: 1px solid transparent; 
    width: 100%;
    box-shadow: 0 6px 20px rgba(0, 85, 191, 0.25); 
}

/* 確保清單文字在切換時不會有縮放動畫 */
.glass-btn-primary .txt-body,
.btn-outline .txt-body {
    transform: none !important;
    transition: none !important;
}
.glass-btn-card { width: auto; margin: 0 auto; } .glass-btn-card.w-100 { width: 100%; margin: 0; }
.glass-btn-primary:hover, .glass-btn-card:hover { background: #004499; box-shadow: 0 8px 25px rgba(0, 85, 191, 0.4); transform: translateY(-2px); }
.glass-btn-primary:active, .glass-btn-card:active { transform: scale(0.97); box-shadow: 0 2px 10px rgba(0, 85, 191, 0.2); }

.btn-outline { background: #ffffff; color: var(--text-main); border: 1px solid rgba(5, 19, 29, 0.2); box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03); }
.btn-outline:hover { background: rgba(5, 19, 29, 0.03); border-color: var(--text-main); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(5, 19, 29, 0.08); }
.btn-outline:active { transform: scale(0.97); }

.btn-outline.is-active { 
    background: rgba(0, 85, 191, 0.04); 
    border-color: var(--onene-blue); 
    box-shadow: 0 0 0 1px var(--onene-blue); 
    color: var(--text-main); 
}

.btn-text-muted { 
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; margin: 0 auto; padding: 14px; 
    background: rgba(0,0,0,0.03); color: var(--text-muted); border: none; border-radius: 8px; 
    font-size: 1rem; font-weight: 500; cursor: pointer; transition: background 0.2s, transform 0.2s; 
}

/* 登入註冊按鈕 */
.start-btn { display: inline-block; padding: 10px 26px; border-radius: 30px; cursor: pointer; font-weight: 500; font-size: 0.95rem; letter-spacing: 1px; transition: all 0.3s; }
button.start-btn.auth-btn-active { background: var(--onene-blue); color: #fff; border: 1px solid var(--onene-blue); box-shadow: 0 4px 15px rgba(0, 85, 191, 0.2); }
button.start-btn.auth-btn-inactive { background: var(--card-bg); color: var(--onene-blue); border: 1px solid rgba(0, 85, 191, 0.3); }
#guest-action-block button.start-btn.auth-btn-inactive { border: 1px solid #ffffff; }

.auth-error-box { background: rgba(158, 54, 54, 0.08); color: var(--onene-red); padding: 12px; border-radius: 8px; text-align: center; display: none; border: 1px solid rgba(158, 54, 54, 0.15); }

.settings-list { background: var(--card-bg); border-radius: 12px; overflow: hidden; border: 1px solid var(--border-color); box-shadow: 0 4px 15px rgba(0,0,0,0.03); }
.setting-item { display: flex; align-items: center; justify-content: space-between; padding: 20px; border-bottom: 1px solid var(--border-color); cursor: pointer; transition: background 0.2s; }
.setting-item:last-child { border-bottom: none; }
.setting-label { display: flex; align-items: center; gap: 12px; }

.toggle-switch { position: relative; display: inline-block; width: 50px; height: 28px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(0,0,0,0.1); transition: .4s; border-radius: 30px; border: 1px solid var(--border-color); }
.slider:before { position: absolute; content: ""; height: 22px; width: 22px; left: 2px; bottom: 2px; background-color: white; transition: .4s; border-radius: 50%; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
input:checked + .slider { background-color: var(--onene-green); border-color: var(--onene-green); }
input:checked + .slider:before { transform: translateX(22px); }

#system-toast { 
    position: fixed; bottom: 40px; left: 50%; transform: translateX(-50%) translateY(20px); 
    opacity: 0; background: rgba(54, 41, 33, 0.95); color: #fff; padding: 12px 24px; 
    border-radius: 30px; box-shadow: 0 10px 30px rgba(0,0,0,0.15); display: flex; 
    align-items: center; gap: 10px; z-index: 999999; font-size: 0.9rem; font-weight: 500; 
    pointer-events: none; width: max-content; max-width: 90vw; 
}
#system-toast.show { animation: toastGentleFloat 3s forwards; }

/* ==========================================
   11. 輔助排版與通用樣式 (Utility Classes) 
   ========================================== */
.mt-5 { margin-top: 5px; } .mt-10 { margin-top: 10px; } .mt-15 { margin-top: 15px; } .mt-20 { margin-top: 20px; } .mt-25 { margin-top: 25px; } .mt-35 { margin-top: 35px; } 
.mb-5 { margin-bottom: 5px; } .mb-10 { margin-bottom: 10px; } .mb-15 { margin-bottom: 15px; } .mb-20 { margin-bottom: 20px; } .mb-25 { margin-bottom: 25px; } .mb-30 { margin-bottom: 30px; }

.flex-1 { flex: 1; } .d-flex { display: flex; } .flex-col { flex-direction: column; } .d-block { display: block; }
.align-center { align-items: center; } .justify-center { justify-content: center; } .justify-between { justify-content: space-between; } 
.gap-8 { gap: 8px; } .gap-10 { gap: 10px; } .gap-12 { gap: 12px; } .gap-15 { gap: 15px; } 

.w-100 { width: 100%; } .text-center { text-align: center; } .text-left { text-align: left; } .font-bold { font-weight: 500; } .font-normal { font-weight: 400; }

.text-xs { font-size: 0.75rem; } .text-sm { font-size: 0.875rem; } .text-md { font-size: 1rem; }
.text-lg { font-size: 1.25rem; font-weight: 500; } .text-xl { font-size: 1.5rem; font-weight: 500; } .text-2xl { font-size: 2rem; }
.txt-body { font-size: 0.95rem; } .txt-body-lg { font-size: 1.05rem; } .txt-caption { font-size: 0.85rem; } 
.txt-h2 { font-size: 1.4rem; font-weight: 500; letter-spacing: 1px; } .txt-h3 { font-size: 1.8rem; font-weight: 500; letter-spacing: 1px; } 

.line-height-lg { line-height: 1.8; } .tracking-wide { letter-spacing: 1px; } .tracking-wider { letter-spacing: 2px; } 
.opacity-80 { opacity: 0.8; } .opacity-90 { opacity: 0.9; } .cursor-pointer { cursor: pointer; } .pointer-none { pointer-events: none; }

.tc-main { color: var(--text-main); } .tc-muted { color: var(--text-muted); } .tc-yellow { color: var(--onene-yellow); } .tc-red { color: var(--onene-red); } .tc-blue { color: var(--onene-blue); } .tc-purple { color: var(--onene-purple); } .tc-pink { color: var(--onene-pink); } .tc-green { color: var(--onene-green); }

.material-symbols-rounded { font-family: 'Material Symbols Rounded'; display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; line-height: 1; flex-shrink: 0; }
.icon-btn-xs { width: 32px; height: 32px; padding: 0; background: transparent; box-shadow: none; display: flex; align-items: center; justify-content: center; border-radius: 50%; border: none; cursor: pointer; }
.icon-btn-xs:hover { background: rgba(0,0,0,0.05); }

.title-icon-mask { display: inline-block; width: 14px; height: 14px; background-color: var(--onene-blue); -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; flex-shrink: 0; }
footer { text-align: center; padding: 10px 20px 40px; font-size: 0.75rem; color: var(--text-muted); letter-spacing: 1px; width: 100%; opacity: 0.7; transition: color 0.4s; }

.btn-disabled { background: #f5f5f5 !important; border: 1px solid #e0e0e0 !important; color: var(--text-muted) !important; opacity: 0.8 !important; pointer-events: none !important; box-shadow: none !important; }
.btn-warning { background: #fff8f8 !important; border: 1px solid #ffcdd2 !important; color: var(--onene-red) !important; box-shadow: none !important; }
.icon-xl { font-size: 64px; color: var(--onene-green); }

/* ==========================================
   12. 全局手機版排版集中管理 (Global Mobile Optimizations)
   ========================================== */
@media (max-width: 768px) {
    .container { padding: 30px 24px 120px 24px; }
    .good-morning-generator { margin-bottom: 12px; }
    .iching-card { margin: 0 auto 12px auto; }
    .grid-container { gap: 12px; margin-bottom: 20px; }
    #blessing-cards-container, #tools-cards-container, #featured-video-container, #lucky-products-container, #partners-container, #purchase-history-section { margin-top: 20px; }
    #practice-cards-wrapper .card { padding: 20px; }
    .card { padding: 16px; }
    .card.span-2 { padding: 20px; }
    .product-card { padding: 0; }
    
    .quick-tools-container {
        position: fixed; bottom: 0; left: 0; width: 100%; margin: 0;
        padding: 12px 10px calc(15px + env(safe-area-inset-bottom, 0px)); 
        background: var(--glass-bg); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
        border-top: 1px solid var(--border-color); border-radius: 24px 24px 0 0;
        box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.08); z-index: 9900; justify-content: space-around; overflow: visible; gap: 0;
    }
    .quick-tools-container .tool-btn { width: auto; flex: 1; height: auto; padding: 5px 0; }
    .quick-tools-container .tool-btn .tool-icon, .quick-tools-container .tool-btn svg, .quick-tools-container .tool-btn img { width: 28px; height: 28px; margin-bottom: 4px; }
    .quick-tools-container .tool-label { font-size: 0.7rem; }
    
    .txt-h1.mb-20 { margin-bottom: 12px; } 
    .partner-grid { gap: 6px; } 
}

@media (max-width: 480px) { 
    .iching-card { padding: 24px 20px 4px 20px; }
    .answer-category-tabs { gap: 8px; justify-content: flex-start; }
    .category-tab { flex: 0 0 calc((100% - 16px) / 3); padding: 8px 2px; font-size: 0.9rem; }
    .category-tab .material-symbols-rounded { font-size: 16px !important; }
}

/* ==========================================
   13. 動畫系統 (Keyframes & Animations)
   ========================================== */
@keyframes smoothFadeInUp { 0% { opacity: 0; transform: translateY(20px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUpDrawer { 0% { transform: translateY(100%); opacity: 0; } 100% { transform: translateY(0); opacity: 1; } }

/* 🌟 [GPU 優化] 呼吸動畫 */
@keyframes sharedHaloBreathe { 0%, 100% { transform: scale(0.9); opacity: 0.3; } 50% { transform: scale(1.8); opacity: 0.8; } }
@keyframes sharedIconBreathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes modalIconBreathe { 0%, 100% { transform: translateY(0) scale(1); opacity: 0.9; } 50% { transform: translateY(-6px) scale(1.03); opacity: 1; } }
@keyframes mind-clean-halo-breathe { 0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0; } 50% { transform: translate(-50%, -50%) scale(1.6); opacity: 1; } }

@keyframes toastGentleFloat { 0% { opacity: 0; transform: translateX(-50%) translateY(30px); } 15% { opacity: 1; transform: translateX(-50%) translateY(0px); } 80% { opacity: 1; transform: translateX(-50%) translateY(-10px); } 100% { opacity: 0; transform: translateX(-50%) translateY(-30px); } }
@keyframes blurReveal { 0% { filter: blur(12px); opacity: 0; transform: scale(0.9); } 100% { filter: blur(0px); opacity: 1; transform: scale(1); } }
@keyframes floatingIdle { 0%, 100% { transform: translateY(0px); } 50% { transform: translateY(-8px); } }

/* 🌟 [GPU 優化] 答案之書發光 */
@keyframes answerOpacityBreathe { 0%, 100% { opacity: 0.7; transform: scale(1); } 50% { opacity: 1; transform: scale(1.02); } }

/* 🌟 [GPU 優化] 星星動畫 */
@keyframes gentleStarBreath { 0%, 100% { transform: scale(1); opacity: 0.8; } 50% { transform: scale(1.05); opacity: 1; } }

@keyframes megaphonePlay { 0%, 100% { transform: scale(1) rotate(0deg); } 25%, 75% { transform: scale(1.1) rotate(-8deg); } 50% { transform: scale(1.1) rotate(8deg); } }
@keyframes spin { 100% { transform: rotate(360deg); } }

/* 通用動畫呼叫 class */
.modal-breathe-icon { display: inline-block; will-change: transform; animation: modalIconBreathe 6s ease-in-out infinite; }
.drift-gentle-star-svg { 
    width: 100%; height: 100%; transform-origin: center; 
    filter: drop-shadow(0 0 15px color-mix(in srgb, var(--onene-yellow) 60%, transparent)); /* 🟢 靜態陰影 */
    will-change: transform, opacity;
    animation: gentleStarBreath 3.5s ease-in-out infinite; 
}

.answer-floating-container { animation: floatingIdle 6s ease-in-out infinite; will-change: transform; }
.answer-breathing-text { 
    text-shadow: 0 0 10px var(--answer-glow-peak); /* 🟢 靜態發光 */
    animation: blurReveal 2.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards, answerOpacityBreathe 6s ease-in-out infinite; 
    opacity: 0; 
    will-change: opacity, transform; 
}
.megaphone-playing { animation: megaphonePlay 1.2s infinite ease-in-out; will-change: transform; }

/* 真・動態環形載入特效 (SVG) */
.circular-loader {
    width: 24px;
    height: 24px;
    animation: loader-rotate 2s linear infinite;
}

.circular-loader circle {
    fill: none;
    stroke: currentColor; 
    stroke-width: 4;
    stroke-linecap: round; 
    animation: loader-dash 1.5s ease-in-out infinite;
}

@keyframes loader-rotate {
    100% { transform: rotate(360deg); }
}

@keyframes loader-dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}