/* --- 1. 基礎設定 (Base & Reset) --- */
:root {
    --primary-color: #b45309;   /* Amber 700 */
    --primary-light: #fffbeb;   /* Amber 50 */
    --primary-hover: #92400e;   /* Amber 800 */
    --text-dark: #1c1917;       /* Stone 900 */
    --text-gray: #57534e;       /* Stone 600 */
    --bg-light: #fafaf9;        /* Stone 50 */
    --bg-white: #ffffff;
    --border-color: #e7e5e4;    /* Stone 200 */
    --green-light: #dcfce7;
    --green-dark: #15803d;
    --blue-light: #dbeafe;
    --blue-dark: #1d4ed8;
    --red-bg: #fef2f2;
    --red-btn: #991b1b;
    --font-serif: "Noto Serif TC", serif;
    --font-sans: "Noto Sans TC", sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden; 
}

h1, h2, h3, h4, h5 {
    font-family: var(--font-serif);
    font-weight: 700;
}

img {
    max-width: 100%;
    display: block;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- 2. 工具類別 (Utilities) --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hidden {
    display: none !important;
}

.desktop-only {
    display: none;
}

.mobile-only {
    display: block;
}

@media (min-width: 768px) {
    .desktop-only {
        display: block;
    }
    .mobile-only {
        display: none;
    }
}

/* --- [NEW] Scroll Reveal Animation --- */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px); /* 初始位置在下方 40px */
    transition: opacity 1.0s cubic-bezier(0.165, 0.84, 0.44, 1), 
                transform 1.0s cubic-bezier(0.165, 0.84, 0.44, 1);
    will-change: opacity, transform;
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- 3. 導航列 (Navbar) --- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--text-gray);
    letter-spacing: 0.05em;
    font-family: var(--font-serif);
}

.logo-text .highlight {
    color: var(--primary-color);
}

.desktop-menu {
    display: none;
    gap: 32px;
}

.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-gray);
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--primary-color);
}

.mobile-menu-btn {
    font-size: 1.5rem;
    color: var(--text-gray);
    padding: 8px;
}

.mobile-menu {
    background-color: var(--bg-white);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    position: absolute;
    width: 100%;
}

.mobile-link {
    display: block;
    padding: 16px 20px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-gray);
    border-bottom: 1px solid var(--bg-light);
}

@media (min-width: 768px) {
    .desktop-menu {
        display: flex;
    }
    .mobile-menu-btn {
        display: none;
    }
}

/* --- 4. 主視覺 Banner (Hero) --- */
.hero-section {
    width: 100%;
    background-color: #e7e5e4;
    position: relative;
}

.hero-image {
    width: 100%;
    height: auto;
    max-height: 80vh;
    min-height: 300px;
    object-fit: cover;
}

/* --- 5. 作家介紹 (Intro) --- */
.section {
    padding: 64px 0;
}

.intro-section {
    background-color: var(--bg-white);
}

.quote-area {
    text-align: center;
    margin-bottom: 80px;
}

.quote-content {
    position: relative;
    display: inline-block;
}

.quote-icon {
    position: absolute;
    top: -24px;
    left: -24px;
    color: #fde68a; 
    font-size: 2rem;
    opacity: 0.5;
}

.quote-text {
    font-size: 1.125rem;
    color: var(--text-gray);
    font-family: var(--font-serif);
    line-height: 2;
    text-align: justify;
    letter-spacing: 0.025em;
}

.desktop-break {
    display: none;
}

.quote-footer {
    margin-top: 32px;
}

.quote-highlight {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.125rem;
    letter-spacing: 0.05em;
}

.author-bio-card {
    background-color: rgba(255, 251, 235, 0.5); 
    border: 1px solid rgba(254, 243, 199, 0.5);
    border-radius: 24px;
    padding: 32px;
    max-width: 900px;
    margin: 0 auto;
}

.author-title {
    font-size: 1.5rem;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 32px;
    font-family: var(--font-serif);
}

.author-name {
    font-size: 2.5rem;
    color: #78350f;
    display: block;
    margin-top: 8px;
}

.bio-text {
    text-align: justify;
    color: var(--text-gray);
    line-height: 2;
    font-size: 1.125rem;
}

.read-more-btn {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 16px;
    transition: color 0.3s;
}

.read-more-btn:hover {
    color: var(--primary-hover);
}

@media (min-width: 768px) {
    .section {
        padding: 96px 0;
    }
    .quote-text {
        font-size: 1.5rem;
        text-align: center;
    }
    .desktop-break {
        display: inline;
    }
    .author-bio-card {
        padding: 64px;
    }
    .author-title {
        font-size: 1.875rem;
    }
    .author-name {
        font-size: 3rem;
    }
}

/* --- 6. 大事記 (Timeline) --- */
.timeline-section {
    background-color: var(--bg-light);
    border-top: 1px solid var(--border-color);
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
    padding: 0 16px;
}

.section-title {
    font-size: 1.875rem;
    color: #78350f;
    margin-bottom: 12px;
    letter-spacing: 0.05em;
}

.section-subtitle {
    color: var(--text-gray);
    font-size: 1.125rem;
}

.title-underline {
    width: 80px;
    height: 6px;
    background-color: var(--primary-color);
    margin: 20px auto 0;
    border-radius: 999px;
    opacity: 0.8;
}

.timeline-container {
    position: relative;
    padding-left: 8px;
}

.timeline-item {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
    position: relative;
}

/* 整合後的年份樣式 */
.timeline-year {
    font-family: var(--font-serif);
    font-weight: bold;
    color: var(--primary-hover);
    display: inline-block;
    padding: 4px 12px;
    background-color: var(--primary-light);
    border-radius: 999px;
    font-size: 1.125rem;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.timeline-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.timeline-dot {
    width: 16px;
    height: 16px;
    background-color: white;
    border: 4px solid var(--primary-color);
    border-radius: 50%;
    margin-top: 12px;
    z-index: 10;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.timeline-line {
    width: 1px;
    background-color: #fde68a;
    flex-grow: 1;
    margin: 4px 0;
    min-height: 120px;
}

.timeline-item:last-child .timeline-line.last-line {
    display: none; 
}

.timeline-content {
    flex: 1;
    padding-bottom: 32px;
    padding-top: 4px;
}

.content-card {
    background-color: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column-reverse;
    gap: 24px;
    transition: box-shadow 0.3s;
}

.content-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.content-card .text-content {
    flex: 1;
}

.text-content h3 {
    font-size: 1.25rem;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.text-content p {
    color: var(--text-gray);
    font-size: 1rem;
    line-height: 1.6;
    text-align: justify;
}

.image-content {
    width: 100%;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
}

.image-content img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.timeline-action {
    position: relative;
    padding-left: 0px;
    margin-top: 0;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
}

/* 新增視覺引導線 (垂直圓點虛線) */
.timeline-gap-line {
    width: 2px;
    height: 40px; 
    
    /* 圓點樣式 */
    background-image: radial-gradient(circle, #fde68a 1px, transparent 2px);
    background-size: 2px 6px; 
    background-repeat: repeat-y;
    background-color: transparent;
    margin-left: 7px; 
    
    flex-shrink: 0;
    transition: opacity 0.3s ease; 
}

/* 隱藏線條的 class */
.timeline-gap-line.hidden-line {
    opacity: 0;
    visibility: hidden;
}

/* 展開收合按鈕文字樣式 */
.timeline-btn {
    display: flex;
    flex-direction: row; 
    align-items: center;
    gap: 8px;
    font-family: var(--font-serif);
    font-weight: bold;
    color: var(--text-gray); 
    font-size: 1.125rem;
    border-radius: 0;
    margin: 0;
    cursor: pointer;
    transition: all 0.3s;
    position: absolute;
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    justify-content: flex-start;
}

.timeline-btn:hover {
    color: var(--primary-color);
    transform: translateY(-50%) translateY(-2px);
}

#timeline-btn-icon {
    font-size: 0.9rem;
    color: var(--primary-color); 
}

/* 文字下底線效果 */
#timeline-btn-text {
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}

.timeline-btn:hover #timeline-btn-text {
    border-bottom-color: var(--primary-color);
}

.animate-bounce {
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(-25%); }
    50% { transform: translateY(0); }
}

/* 桌機版設定 */
@media (min-width: 768px) {
    .timeline-container {
        padding-left: 0;
    }
    .timeline-item {
        gap: 32px;
    }
    
    .timeline-action {
        padding-left: 0;
        margin-left: 0; 
        position: relative; 
        min-height: 40px;   
    }

    .timeline-year {
        position: absolute;
        left: 0;
        top: 0;
        width: 112px;
        text-align: right;
        padding-top: 4px;
        font-size: 1.5rem;
        background-color: transparent;
        padding: 4px 0 0 0;
        margin-bottom: 0;
        box-shadow: none;
        border-radius: 0;
    }

    .timeline-marker {
        margin-left: 144px;
    }

    .timeline-gap-line {
        margin-left: 151px; 
    }

    .timeline-btn {
        left: 0;
        margin-left: 192px;
    }
    
    .timeline-btn:hover {
        transform: translateY(-50%) translateY(-2px);
    }

    .timeline-content {
        padding-bottom: 64px;
    }
    .content-card {
        flex-direction: row;
    }
    .image-content {
        width: 160px;
        height: 160px;
    }
    .timeline-line {
        min-height: 150px;
    }
}

/* --- 7. 有聲書專題共用 (Books General) --- */
.books-section {
    background-color: var(--bg-white);
    padding-top: 80px;
}

.book-feature {
    padding: 64px 0;
}

.book-layout {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

/* --- [A] 花甲男孩 (Huajia Boy) --- */
.feature-huajia {
    background: linear-gradient(to bottom, #ffffff, #fff7ed); 
}

.book-header {
    display: flex;
    flex-direction: column;
    gap: 48px;
    margin-bottom: 80px;
}

.book-cover-wrapper {
    width: 100%;
    position: relative;
}

.cover-bg {
    position: absolute;
    inset: 0;
    background-color: rgba(253, 230, 138, 0.5);
    border-radius: 12px;
    transform: translate(16px, 16px);
}

.cover-image-placeholder {
    width: 100%;
    height: 400px;
    background-color: #ffedd5;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
    font-weight: bold;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.cover-tag {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 20;
    background-color: var(--primary-color);
    color: white;
    padding: 4px 16px;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: bold;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.book-info {
    width: 100%;
}

.book-title-group h3 {
    font-size: 2.25rem;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-family: var(--font-serif);
}

.tagline {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.25rem;
}

.book-preface {
    background-color: white;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
    margin-top: 32px;
}

.preface-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.preface-header i {
    color: #fbbf24;
    font-size: 1.25rem;
}

.preface-header h4 {
    font-size: 1.25rem;
    color: var(--text-dark);
}

.preface-text {
    color: var(--text-gray);
    line-height: 2;
    text-align: justify;
}

.text-content .author-sign {
    color: var(--text-gray);
    font-size: 0.875rem;
    margin-top: 16px;
    text-align: right !important; /* 加強強制靠右 */
    opacity: 0.8;
    display: block;
    width: 100%;
}

.section-sub-title {
    font-size: 1.25rem;
    color: var(--text-dark);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.center-text {
    justify-content: center;
    margin-top: 64px;
    border-top: 1px solid var(--border-color);
    padding-top: 48px;
}

.sub-note {
    font-size: 0.875rem;
    color: var(--text-gray);
    font-weight: normal;
}

.section-sub-title i {
    color: var(--primary-color);
}

/* Youtube Placeholder */
.youtube-placeholder {
    margin-top: 32px;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #000;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    overflow: hidden;
}

.video-embed-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    opacity: 0.7;
}

/* Chapter List Container */
.chapter-list-container {
    background-color: white;
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
}

.chapter-header {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 24px;
}

.chapter-header h4 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-family: var(--font-serif);
}

.chapter-header p {
    color: #78716c;
}

.listen-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-weight: bold;
    transition: color 0.3s;
}

.listen-link:hover {
    color: var(--primary-hover);
}

/* 9-Grid Visual Chapter Styles */
.chapter-grid-visual {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.visual-chapter-item {
    text-align: center;
    position: relative;
}

.chapter-image-container {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.chapter-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chapter-image-container:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px rgba(0,0,0,0.15);
}

.visual-play-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 48px;
    height: 48px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.25rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: all 0.3s;
}

.visual-play-btn:hover {
    background-color: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.chapter-title {
    margin-top: 12px;
    font-weight: bold;
    color: var(--text-dark);
    font-size: 1rem;
}

/* Voice Actors */
.actor-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.actor-card {
    text-align: center;
    cursor: pointer;
    padding: 16px;
    border-radius: 16px;
    transition: background-color 0.3s;
}

.actor-card:hover {
    background-color: rgba(255, 251, 235, 0.5);
}

.actor-avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto 12px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--border-color);
    background-color: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: border-color 0.3s;
}

.actor-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.audio-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.actor-card:hover .audio-overlay {
    opacity: 1;
}

.actor-card.playing .actor-avatar {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.3);
}

.actor-card h5 {
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 4px;
    font-size: 1.125rem;
}

.actor-card p {
    font-size: 0.875rem;
    color: var(--text-gray);
}

/* Huajia Media Queries */
@media (min-width: 768px) {
    .book-header {
        flex-direction: row;
        align-items: flex-start;
    }
    .book-cover-wrapper {
        width: 41.666667%; 
    }
    .sticky-cover {
        position: sticky;
        top: 96px;
    }
    .cover-image-placeholder {
        height: 500px;
    }
    .book-info {
        width: 58.333333%; 
    }
    .book-title-group h3 {
        font-size: 3rem;
    }
    .actor-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .chapter-header {
        flex-direction: row;
        align-items: flex-end;
    }
    .chapter-grid-visual {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* --- 新增 Popup Modal 樣式 --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    /* 預設隱藏 */
    display: none; 
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* 顯示時的狀態 */
.modal-overlay.active {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

/* 確保覆蓋掉可能的 hidden 樣式 */
.modal-overlay.hidden {
    display: none !important;
}

.modal-content {
    background-color: white;
    width: 90%;
    max-width: 600px;
    border-radius: 24px;
    padding: 32px;
    position: relative;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes modalPop {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background-color: #f3f4f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
    transition: background 0.2s;
    font-size: 1rem;
    z-index: 10;
}

.modal-close:hover {
    background-color: #e5e7eb;
    color: var(--text-dark);
}

.modal-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: left;
    gap: 20px;
}

@media (min-width: 640px) {
    .modal-body {
        flex-direction: row;
        align-items: flex-start;
    }
    .modal-image {
        flex-shrink: 0;
    }
}

.modal-image {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--primary-light);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* 播放動畫指示器 */
.playing-indicator {
    position: absolute;
    bottom: 0;
    right: 0;
    background-color: var(--primary-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: 3px solid white;
}

.playing-indicator .bar {
    width: 3px;
    background-color: white;
    border-radius: 2px;
    animation: soundWave 0.8s infinite ease-in-out;
}

.playing-indicator .bar:nth-child(1) { height: 10px; animation-delay: 0s; }
.playing-indicator .bar:nth-child(2) { height: 20px; animation-delay: 0.1s; }
.playing-indicator .bar:nth-child(3) { height: 15px; animation-delay: 0.2s; }

@keyframes soundWave {
    0%, 100% { transform: scaleY(0.5); }
    50% { transform: scaleY(1); }
}

.modal-info {
    flex: 1;
}

.modal-info h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 8px;
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 8px;
    display: inline-block;
}

.modal-role-title {
    font-size: 1rem;
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 12px;
}

/* 角色段落樣式 */
.modal-roles-section {
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: var(--text-gray);
    line-height: 1.5;
}

.modal-roles-section .label,
.modal-bio-section .label {
    font-weight: bold;
    color: var(--text-dark);
    display: block;
    margin-bottom: 4px;
}

/* 簡歷段落樣式 */
.modal-bio-section {
    margin-bottom: 24px;
    font-size: 0.95rem;
    color: var(--text-gray);
    line-height: 1.6;
}

.modal-bio {
    text-align: justify;
}

.modal-audio-control {
    width: 100%;
    background-color: var(--bg-light);
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.audio-status {
    font-size: 0.875rem;
    color: var(--primary-color);
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.audio-status::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: var(--primary-color);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 0.5; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
    100% { opacity: 0.5; transform: scale(0.8); }
}

/* --- [B] & [C] 故事書與母語系列 (Story & Mother) --- */
.feature-story, .feature-mother {
    background-color: var(--bg-light);
}
.feature-mother {
    background-color: var(--bg-white); 
}

.story-header {
    text-align: center;
    margin-bottom: 48px;
}

.story-header h3 {
    font-size: 2.25rem;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.series-tag {
    color: var(--primary-color);
    font-weight: bold;
    letter-spacing: 0.1em;
    font-size: 1.25rem;
    text-transform: uppercase;
}

.quote-italic {
    font-size: 1.25rem;
    color: #44403c;
    font-style: italic;
    border-left: 4px solid #fbbf24;
    padding: 8px 0 8px 16px;
    margin-top: 16px;
    background-color: var(--bg-light);
}

.story-video {
    margin-bottom: 64px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.story-content-split {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.story-covers {
    position: relative;
    width: 100%;
}

.story-info {
    width: 100%;
}

/* Staggered Books Container - Updated Scope */
.story-covers .square-books-container {
    position: relative;
    width: 100%;
    min-height: 400px; 
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 30px;
}

/* Decor background */
.story-covers .square-books-container::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: #dcfce7; /* Light green */
    border-radius: 50%;
    opacity: 0.5;
    z-index: 0;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    filter: blur(60px);
}

.feature-mother .square-books-container::before {
    background-color: #ffedd5;
}

/* Base style for staggered book placeholder - scoped to prevent conflict */
.story-covers .square-book-placeholder {
    width: 250px;
    height: 250px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
    font-weight: bold;
    border: 4px solid white;
    overflow: hidden; 
    position: relative; 
    z-index: 1;
    background-color: white;
}

.story-covers .square-book-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Mobile Rotation */
.story-covers .square-book-placeholder.green {
    transform: rotate(-3deg);
}

.story-covers .square-book-placeholder.blue {
    transform: rotate(3deg);
}

.highlight-box {
    background-color: var(--primary-light);
    padding: 16px;
    border-radius: 8px;
    display: inline-block;
    color: var(--green-dark);
    font-weight: bold;
    margin-top: 12px;
    text-align: left;
}

/* Preface styles */
.book-preface.green-border {
    border-left: 4px solid #22c55e;
}
.book-preface.gray-bg {
    background-color: var(--bg-light);
    border: none;
    box-shadow: none;
}

.book-preface h4 {
    font-size: 1.25rem;
    color: var(--text-dark);
    margin-bottom: 12px;
}
.book-preface h4 small {
    font-size: 1.25rem;
    color: var(--text-gray);
    display: block;
    margin-top: 4px;
    font-weight: normal;
}

.read-more-wrapper .text-content {
    color: var(--text-gray);
    line-height: 1.6;
    text-align: justify;
}
.read-more-toggle {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
}

/* 2-Col Audio Cards */
.chapter-grid-visual.two-col {
    grid-template-columns: repeat(2, 1fr);
    margin-top: 24px;
}

/* Responsive for Story/Mother */
@media (max-width: 640px) {
    .chapter-grid-visual.two-col {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 768px) {
    .story-content-split {
        flex-direction: row;
        align-items: flex-start;
    }
    .story-covers {
        width: 50%;
        height: 600px; 
    }
    .story-info {
        width: 50%;
        padding-left: 20px; 
    }
    
    /* Desktop Staggered Layout */
    .story-covers .square-books-container {
        display: block; 
        height: 100%;
        width: 100%;
        min-height: auto;
    }
    
    .story-covers .square-book-placeholder {
        position: absolute;
        width: 350px; 
        height: 350px;
        margin: 0;
        box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    }
    
    /* Top Left Book */
    .story-covers .square-book-placeholder.green {
        top: 0;
        left: 20px;
        transform: rotate(-6deg);
        z-index: 1;
    }
    
    /* Bottom Right Book */
    .story-covers .square-book-placeholder.blue {
        top: 220px; 
        left: 180px; 
        transform: rotate(4deg);
        z-index: 2; 
        margin-top: 0;
    }
}

/* --- [D] 合境平安 (Peace) --- */
.feature-peace {
    background-color: rgba(255, 251, 235, 0.3); 
}

.book-layout {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

/* Override book layout for centering in Peace section */
.feature-peace .book-layout {
    flex-direction: column;
}

.feature-peace .book-image-area {
    width: 100%; 
    display: flex; 
    justify-content: center; 
    padding-bottom: 32px;
}

.single-book-placeholder.red-placeholder {
    width: 320px; 
    height: 320px; 
    background-color: var(--red-bg);
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    display: flex; 
    align-items: center; 
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.5);
    overflow: hidden;
}

.badge-tag {
    display: inline-block;
    background-color: var(--primary-light);
    color: var(--primary-hover);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: bold;
    margin-bottom: 16px;
}

.book-preface-simple {
    position: relative;
    margin-bottom: 32px;
}

.book-preface-simple h4 {
    font-size: 1.25rem;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.icon-bg {
    position: absolute;
    top: -16px;
    left: -16px;
    color: #fde68a;
    font-size: 2.5rem;
    opacity: 0.5;
}

.preface-content {
    padding-left: 24px;
}

.italic-text {
    font-style: italic;
    color: var(--text-gray);
}

/* Audio Player Bar */
.audio-player-bar {
    margin-top: 32px; 
    background: white; 
    border-radius: 50px; 
    padding: 12px 24px; 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.05); 
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.audio-player-bar:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.play-btn-circle {
    width: 48px; 
    height: 48px; 
    background: #991b1b; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: white;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

.play-btn-circle:hover {
    background-color: #7f1d1d; 
    transform: scale(1.1);
}

@media (min-width: 768px) {
    .feature-peace .book-layout {
        flex-direction: row; 
        align-items: flex-start;
    }
    
    .feature-peace .book-image-area {
        width: 40%;
        justify-content: flex-end; 
        padding-right: 40px;
    }

    .feature-peace .book-info-area {
        width: 60%;
        padding-left: 20px;
    }
    
    .center-text-block {
        text-align: center;
        margin-bottom: 48px;
    }
}

/* --- [E] Interactive Picture Books (New) --- */
.feature-picture-books {
    background-color: var(--bg-white);
    border-top: 1px solid var(--border-color);
    padding: 80px 0;
}

.book-grid {
    display: flex;
    gap: 40px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 48px;
}

.book-item {
    max-width: 300px;
    text-align: center;
}

.book-cover-link {
    display: block;
    position: relative;
    transition: transform 0.3s;
}

.book-cover-link:hover {
    transform: translateY(-5px);
}

.book-cover-link:hover .hover-overlay {
    opacity: 1;
}

.hover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

/* --- 8. Footer --- */
.footer {
    background-color: var(--text-dark);
    color: #d6d3d1;
    padding: 96px 0;
    border-top: 1px solid #292524;
    text-align: center; 
}

.footer-title {
    font-size: 1.5rem;
    color: white;
    margin-bottom: 48px;
    letter-spacing: 0.05em;
}

.platform-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-bottom: 80px;
}

.platform-btn {
    background-color: #ebeaea;
    color: #292524;
    padding: 16px 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #44403c;
    transition: all 0.3s;
}

.platform-btn i {
    color: var(--primary-color);
    transition: transform 0.3s;
}

.platform-btn:hover {
    background-color: #44403c;
    border-color: rgba(245, 158, 11, 0.5);
    color: #fbbf24;
}

.platform-btn:hover i {
    transform: scale(1.1);
}

.podcast-section {
    border-top: 1px solid #292524;
    padding-top: 64px;
}

.podcast-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.icon-circle {
    background-color: var(--primary-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: white;
}

.podcast-desc {
    color: #a8a29e;
    margin-bottom: 32px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    font-size: 0.875rem;
}

.podcast-buttons {
    display: flex;
    flex-direction: column;
    gap: 24px;
    justify-content: center;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.podcast-btn {
    padding: 12px 24px;
    border-radius: 999px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
    text-align: left;
    width: 100%;
}

.podcast-cover {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

/* 新增：文字區塊樣式 */
.podcast-text {
    flex-grow: 1;
    font-size: 1rem;
    line-height: 1.5;
    white-space: normal; 
    overflow: hidden;
}

.podcast-btn:hover {
    transform: translateY(-4px);
}

.podcast-btn.spotify {
    background-color: #1DB954;
    color: black;
}

.podcast-btn.spotify:hover {
    background-color: #1ed760;
}

.podcast-btn.apple {
    background-color: #8c46f5;
    color: white;
}

.podcast-btn.apple:hover {
    background-color: #9d5bf7;
}

.podcast-btn.ilisten {
    background-color: #72af2d;
    color: black;
}

.podcast-btn.ilisten:hover {
    background-color: #90be20;
}

.footer-copyright {
    margin-top: 96px;
    color: #78716c;
    font-size: 0.875rem;
    border-top: 1px solid rgba(41, 37, 36, 0.5);
    padding-top: 32px;
}

/* 桌機版排版：三欄並排，且圖片在上、文字在下 */
@media (min-width: 768px) {
    .podcast-buttons {
        flex-direction: row;
        align-items: stretch;
        max-width: 1100px;
        gap: 32px;
    }

    .podcast-btn {
        flex-direction: column;
        text-align: center;
        justify-content: flex-start;
        padding: 40px 32px;
        border-radius: 24px;
        width: calc(100% / 3);
        flex: 1;
    }

    .podcast-cover {
        width: 200px;
        height: 200px;
        border-radius: 12px;
        margin-bottom: 12px;
        box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    }

    .podcast-text {
        font-size: 1.1rem;
        margin-bottom: 24px;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* 將箭頭推到最底部 */
    .podcast-btn i {
        margin-top: auto; 
        font-size: 1.25rem;
        opacity: 0.7;
    }
    
    .podcast-btn:hover .podcast-cover {
        transform: scale(1.05); /* 滑鼠移過去時圖片稍微放大 */
    }
}

/* --- New: Floating Action Button (FAB) --- */
.float-listen-btn {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px); 
    background-color: var(--primary-color);
    color: white;
    padding: 14px 28px;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: bold;
    font-size: 1rem;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    border: 2px solid white;
}

.float-listen-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.float-listen-btn:hover {
    background-color: var(--primary-hover);
    transform: translateX(-50%) translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.float-listen-btn i {
    font-size: 1.2rem;
}

/* Mobile optimization */
@media (max-width: 768px) {
    .float-listen-btn {
        width: auto;
        padding: 12px 24px;
        bottom: 24px;
        font-size: 0.95rem;
        box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    }
}