/* ==========================================================================
   Design System - Somatic Zen Editorial (Light / Dark Obsidian)
   ========================================================================== */

:root {
    /* Typography */
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Lora', Georgia, serif;
    --font-ui: 'Outfit', sans-serif;

    /* Light Theme Palette (Warm Organic Sand) */
    --bg-primary: #f5f2eb;
    --bg-secondary: #ece7de;
    --card-bg: #faf8f5;
    --text-primary: #242220;
    --text-secondary: #635c54;
    --border-color: #dfd9ce;
    --shadow-color: rgba(36, 34, 32, 0.04);
    
    /* Brand Accent Colors */
    --accent-sage: #495a4f;       /* Xanh rêu ẩm Củ Chi */
    --accent-sage-hover: #37443c;
    --accent-terracotta: #ad6b51;  /* Đất nung đất sét ấm Nam Bộ */
    --accent-soft-sage: #eaece8;
    --accent-soft-terracotta: #f6eee8;

    /* Layout & Utilities */
    --max-content-width: 680px;
    --nav-height: 70px;
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-slow: all 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

[data-theme="dark"] {
    /* Dark Theme Palette (Cedar Obsidian) */
    --bg-primary: #121110;
    --bg-secondary: #1b1918;
    --card-bg: #181615;
    --text-primary: #e2ded8;
    --text-secondary: #a49e95;
    --border-color: #2a2725;
    --shadow-color: rgba(0, 0, 0, 0.3);
    
    /* Brand Dark Accent Colors */
    --accent-sage: #8fa596;
    --accent-sage-hover: #b4c5ba;
    --accent-terracotta: #c68972;
    --accent-soft-sage: #1f2321;
    --accent-soft-terracotta: #27211f;
}

/* ==========================================================================
   Base Elements & Global Reset
   ========================================================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.9;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.6s ease, color 0.6s ease;
    padding-top: var(--nav-height);
    position: relative;
    overflow-x: hidden;
}

/* Scrollbar Style */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ==========================================================================
   Navigation Bar (Minimal & Glassmorphic)
   ========================================================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background-color: rgba(245, 242, 235, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: background-color 0.6s ease, border-color 0.6s ease, transform 0.4s ease;
}

[data-theme="dark"] .navbar {
    background-color: rgba(18, 17, 16, 0.85);
}

.nav-container {
    max-width: 900px;
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.series-title {
    font-family: var(--font-ui);
    font-weight: 500;
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent-sage);
    transition: color 0.4s ease;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-controls button {
    background: none;
    border: 1px solid transparent;
    cursor: pointer;
    color: var(--text-primary);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.nav-controls button:hover {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--accent-sage);
}

.nav-controls svg {
    width: 18px;
    height: 18px;
}

.moon-icon {
    display: none;
}
[data-theme="dark"] .sun-icon {
    display: none;
}
[data-theme="dark"] .moon-icon {
    display: block;
}

/* Reading Progress Bar */
#progress-container {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    width: 100%;
    height: 2px;
    background-color: transparent;
    z-index: 1001;
}

#progress-bar {
    height: 100%;
    width: 0%;
    background-color: var(--accent-sage);
    transition: width 0.1s ease-out;
}

/* ==========================================================================
   Layout Structures & Article Styles
   ========================================================================== */

.content-wrapper {
    max-width: 780px;
    margin: 0 auto;
    padding: 80px 24px 120px;
    transition: var(--transition-smooth);
}

.article-header {
    margin-bottom: 70px;
    text-align: center;
}

.article-meta {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--accent-terracotta);
    margin-bottom: 16px;
    font-weight: 500;
}

.article-title {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: 3.2rem;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 20px;
    letter-spacing: -0.01em;
}

.article-subtitle {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 1.35rem;
    font-weight: 300;
    color: var(--text-secondary);
    opacity: 0.9;
}

@media (max-width: 600px) {
    .article-title {
        font-size: 2.2rem;
    }
    .article-subtitle {
        font-size: 1.15rem;
    }
    .content-wrapper {
        padding: 40px 16px 80px;
    }
}

.article-body p {
    margin-bottom: 28px;
    font-size: 1.125rem;
    color: var(--text-primary);
    text-align: justify;
    text-justify: inter-word;
}

.article-body em {
    font-style: italic;
}

.article-body strong {
    font-weight: 600;
    color: var(--accent-sage);
}

.section-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 60px 0;
    position: relative;
}

.section-divider::after {
    content: "✦";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--bg-primary);
    padding: 0 16px;
    color: var(--accent-terracotta);
    font-size: 0.8rem;
    transition: background-color 0.6s ease;
}

h2 {
    font-family: var(--font-display);
    font-size: 2.1rem;
    font-weight: 400;
    color: var(--text-primary);
    margin: 50px 0 28px;
    line-height: 1.3;
}

h3 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 400;
    color: var(--text-primary);
    margin: 36px 0 20px;
    line-height: 1.4;
}

/* ==========================================================================
   Special Zen Content Components
   ========================================================================== */

/* Pain Points (PAS Hook) */
.pain-points {
    margin: 32px 0 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pain-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background-color: var(--card-bg);
    padding: 20px 24px;
    border-radius: var(--radius-md);
    border-left: 2px solid var(--accent-terracotta);
    box-shadow: 0 2px 8px var(--shadow-color);
    transition: var(--transition-smooth);
}

.pain-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 16px var(--shadow-color);
}

.pain-bullet {
    color: var(--accent-terracotta);
    font-size: 0.9rem;
    margin-top: 5px;
}

.pain-text {
    font-size: 1.05rem;
    line-height: 1.7;
}

/* Insight Box */
.insight-box {
    background-color: var(--accent-soft-sage);
    border: 1px solid var(--border-color);
    padding: 32px;
    border-radius: var(--radius-lg);
    margin: 40px 0;
    position: relative;
}

.insight-box p:last-child {
    margin-bottom: 0;
}

.mind-note {
    font-size: 0.95rem;
    color: var(--text-secondary);
    text-align: center;
    margin: -20px 0 40px;
    font-style: italic;
}

/* ==========================================================================
   Three Reactions (Tham - Sân - Si) Cards
   ========================================================================== */

.reactions-container {
    display: flex;
    flex-direction: column;
    gap: 28px;
    margin: 40px 0;
}

.reaction-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 12px var(--shadow-color);
    transition: var(--transition-smooth);
}

.reaction-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-sage);
    box-shadow: 0 12px 28px var(--shadow-color);
}

.reaction-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.reaction-header h3 {
    margin: 0;
    font-size: 1.6rem;
    color: var(--accent-terracotta);
}

.reaction-badge {
    font-family: var(--font-ui);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background-color: var(--accent-soft-terracotta);
    color: var(--accent-terracotta);
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 500;
}

.aliases {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin-bottom: 20px;
    opacity: 0.8;
}

.reaction-details p {
    font-size: 1.05rem;
    line-height: 1.75;
    margin-bottom: 16px;
    text-align: justify;
}

.reaction-details p:last-child {
    margin-bottom: 0;
}

.physical-manifestation {
    background-color: var(--bg-secondary);
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    border-left: 2px solid var(--accent-sage);
    font-size: 0.98rem !important;
}

.loop-formula {
    font-family: var(--font-ui);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--accent-terracotta);
    text-align: center;
    padding: 12px;
    margin: 16px 0;
    background: var(--accent-soft-terracotta);
    border-radius: var(--radius-sm);
    letter-spacing: 0.1em;
}

/* Zen Lists */
.zen-list {
    margin: 28px 0 36px 12px;
    list-style: none;
}

.zen-list li {
    position: relative;
    margin-bottom: 20px;
    padding-left: 28px;
    font-size: 1.05rem;
    line-height: 1.75;
}

.zen-list li::before {
    content: "❖";
    position: absolute;
    left: 0;
    color: var(--accent-sage);
    font-size: 0.8rem;
    top: 3px;
}

/* ==========================================================================
   Interactive Cognitive Flow Diagram (Gốm Zen style)
   ========================================================================== */

.interactive-diagram-container {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 36px 28px;
    border-radius: var(--radius-lg);
    margin: 50px 0;
    text-align: center;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.01);
}

.diagram-title {
    font-family: var(--font-ui);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent-sage);
    margin-bottom: 8px;
    font-weight: 600;
}

.diagram-instruction {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 36px;
}

.diagram-nodes {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 36px;
}

.diagram-node {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px 14px;
    flex: 1;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 10px var(--shadow-color);
    min-height: 130px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.diagram-node:hover {
    transform: translateY(-4px);
    border-color: var(--accent-sage);
    box-shadow: 0 8px 20px var(--shadow-color);
}

.diagram-node.active {
    border-color: var(--accent-sage);
    background-color: var(--accent-soft-sage);
    box-shadow: 0 0 0 2px var(--accent-sage);
}

.node-num {
    background-color: var(--accent-sage);
    color: var(--bg-primary);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 0.75rem;
    margin-bottom: 10px;
    transition: background-color 0.4s ease;
}

.diagram-node.active .node-num {
    background-color: var(--accent-terracotta);
}

.node-title {
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.3;
}

.node-desc {
    font-size: 0.72rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.diagram-arrow {
    font-size: 1rem;
    color: var(--border-color);
    user-select: none;
}

@media (max-width: 650px) {
    .diagram-nodes {
        flex-direction: column;
        gap: 12px;
    }
    .diagram-node {
        width: 100%;
        min-height: auto;
        padding: 16px;
    }
    .diagram-arrow {
        transform: rotate(90deg);
        margin: -6px 0;
    }
}

.diagram-explanation-box {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 28px;
    border-radius: var(--radius-md);
    text-align: left;
    min-height: 120px;
    box-shadow: 0 2px 8px var(--shadow-color);
}

.exp-slide {
    display: none;
    animation: slideReveal 0.5s ease forwards;
}

.exp-slide.active {
    display: block;
}

.exp-slide h5 {
    font-family: var(--font-ui);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--accent-sage);
    margin-bottom: 8px;
}

.exp-slide p {
    font-size: 0.98rem;
    margin-bottom: 0;
    line-height: 1.65;
    color: var(--text-secondary);
}

@keyframes slideReveal {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Disclaimer & Pauses
   ========================================================================== */

.practice-disclaimer {
    background-color: var(--accent-soft-terracotta);
    border-left: 3px solid var(--accent-terracotta);
    padding: 24px;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin: 40px 0;
    font-size: 1.05rem;
    line-height: 1.7;
}

.meditation-pause-box {
    background-color: var(--accent-soft-sage);
    border: 1px solid var(--border-color);
    padding: 28px 32px;
    border-radius: var(--radius-lg);
    margin: 48px 0;
    display: flex;
    gap: 20px;
    align-items: center;
    box-shadow: 0 4px 12px var(--shadow-color);
}

.pause-icon {
    font-size: 1.8rem;
    animation: slowBreath 4s infinite ease-in-out;
}

.meditation-pause-box p {
    margin-bottom: 0 !important;
    font-size: 1.025rem;
    line-height: 1.7;
    color: var(--text-primary);
}

@keyframes slowBreath {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.15); opacity: 1; }
}

@media (max-width: 600px) {
    .meditation-pause-box {
        flex-direction: column;
        text-align: center;
        padding: 24px;
    }
}

/* ==========================================================================
   Practice Exercises (Accordion & Tiers layout)
   ========================================================================== */

.exercises-grid {
    display: flex;
    flex-direction: column;
    gap: 36px;
    margin: 40px 0 60px;
}

.exercise-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 36px;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 16px var(--shadow-color);
    transition: var(--transition-smooth);
}

.exercise-card.active-practice {
    border-color: var(--accent-sage);
    box-shadow: 0 8px 24px rgba(73, 90, 79, 0.1);
}

.ex-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.ex-number {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 300;
    color: var(--accent-terracotta);
}

.select-practice-btn {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 18px;
    border-radius: 30px;
    font-family: var(--font-ui);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    letter-spacing: 0.05em;
}

.select-practice-btn:hover {
    background-color: var(--accent-sage);
    color: #ffffff;
    border-color: var(--accent-sage);
}

.exercise-card.active-practice .select-practice-btn {
    background-color: var(--accent-sage);
    color: #ffffff;
    border-color: var(--accent-sage);
    cursor: default;
}

.exercise-card h3 {
    margin-top: 0;
    margin-bottom: 24px;
}

.exercise-steps {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.step-segment {
    padding-left: 20px;
    border-left: 2px solid var(--border-color);
    transition: border-color 0.3s ease;
}

.step-segment:hover {
    border-left-color: var(--accent-sage);
}

.segment-label {
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: inline-block;
    padding: 2px 10px;
    border-radius: 4px;
    margin-bottom: 8px;
}

/* Custom styles per segment type */
.step-segment.pract { border-left-color: var(--accent-sage); }
.step-segment.pract .segment-label {
    background-color: var(--accent-soft-sage);
    color: var(--accent-sage);
}

.step-segment.realize { border-left-color: #d97706; }
.step-segment.realize .segment-label {
    background-color: #fef3c7;
    color: #b45309;
}
[data-theme="dark"] .step-segment.realize .segment-label {
    background-color: rgba(217, 119, 6, 0.15);
    color: #fbbf24;
}

.step-segment.explain { border-left-color: #2563eb; }
.step-segment.explain .segment-label {
    background-color: #dbeafe;
    color: #1d4ed8;
}
[data-theme="dark"] .step-segment.explain .segment-label {
    background-color: rgba(37, 99, 235, 0.15);
    color: #60a5fa;
}

.step-segment.correct { border-left-color: #059669; }
.step-segment.correct .segment-label {
    background-color: #d1fae5;
    color: #047857;
}
[data-theme="dark"] .step-segment.correct .segment-label {
    background-color: rgba(5, 150, 105, 0.15);
    color: #34d399;
}

.step-segment.expand { border-left-color: #7c3aed; }
.step-segment.expand .segment-label {
    background-color: #ede9fe;
    color: #6d28d9;
}
[data-theme="dark"] .step-segment.expand .segment-label {
    background-color: rgba(124, 58, 237, 0.15);
    color: #a78bfa;
}

.segment-text {
    font-size: 1rem !important;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0 !important;
    text-align: left !important;
}

.segment-text strong {
    color: var(--text-primary);
}

/* ==========================================================================
   Special Exercise 2 Word Box Tương Tác
   ========================================================================== */

.interactive-word-box {
    margin: 24px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    background-color: var(--bg-primary);
    padding: 40px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: background-color 0.6s ease;
}

#zen-word {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--accent-sage);
    user-select: none;
    text-align: center;
    padding: 10px 0;
}

#zen-word.unfocused {
    filter: blur(6px);
    opacity: 0.25;
    transition: var(--transition-slow);
}

#zen-word.focused {
    filter: blur(0px);
    opacity: 1;
    transition: filter 1.2s cubic-bezier(0.1, 0.8, 0.2, 1), opacity 1.2s ease;
}

.zen-btn {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 22px;
    border-radius: 30px;
    font-family: var(--font-ui);
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 6px var(--shadow-color);
    transition: var(--transition-smooth);
}

.zen-btn:hover {
    border-color: var(--accent-sage);
    background-color: var(--accent-soft-sage);
    transform: translateY(-1px);
}

.zen-btn:active {
    transform: translateY(1px);
}

.zen-btn.playing {
    background-color: var(--accent-sage);
    color: #ffffff;
    border-color: var(--accent-sage);
}

/* ==========================================================================
   Myths & Benefits Layout
   ========================================================================== */

.myth-list {
    list-style: none;
    margin: 36px 0;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.myth-list li {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 28px;
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 8px var(--shadow-color);
}

.myth-list li strong {
    font-family: var(--font-display);
    font-size: 1.35rem;
    color: var(--accent-terracotta);
    display: block;
    margin-bottom: 12px;
    font-weight: 500;
}

.myth-list li p {
    font-size: 1.025rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 16px;
    text-align: justify;
}
.myth-list li p:last-child {
    margin-bottom: 0;
}

/* Benefits Container */
.benefits-container {
    display: flex;
    flex-direction: column;
    gap: 28px;
    margin: 36px 0;
}

.benefit-item {
    background-color: var(--bg-secondary);
    padding: 28px;
    border-radius: var(--radius-lg);
    transition: var(--transition-smooth);
}

.benefit-item:hover {
    transform: translateY(-2px);
}

.benefit-item h4 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--accent-sage);
    margin-bottom: 12px;
}

.benefit-item p {
    font-size: 1.025rem;
    line-height: 1.7;
    margin-bottom: 0;
    text-align: justify;
}

.benefit-item .footnote {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 16px;
    font-style: italic;
}

/* Tips Grid */
.tips-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin: 40px 0;
}

@media (max-width: 680px) {
    .tips-grid {
        grid-template-columns: 1fr;
    }
}

.tip-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 28px;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.tip-card h5 {
    font-family: var(--font-ui);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--accent-sage);
    margin-bottom: 14px;
}

.tip-card p {
    font-size: 0.98rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.6;
}

.tip-card ul {
    list-style: none;
}

.tip-card ul li {
    position: relative;
    padding-left: 20px;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.tip-card ul li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent-terracotta);
    font-size: 1.2rem;
    top: -2px;
}

/* ==========================================================================
   FAQ Elements (Details/Summary)
   ========================================================================== */

.faq-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 40px 0 60px;
}

.faq-item {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition-smooth);
}

.faq-item:hover {
    box-shadow: 0 4px 16px var(--shadow-color);
    border-color: var(--accent-sage);
}

.faq-item summary {
    font-family: var(--font-ui);
    font-weight: 500;
    font-size: 1.05rem;
    padding: 22px 28px;
    cursor: pointer;
    user-select: none;
    color: var(--text-primary);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    font-size: 1.4rem;
    font-weight: 300;
    color: var(--accent-sage);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-content {
    padding: 0 28px 24px;
    border-top: 1px solid transparent;
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-item[open] .faq-content {
    border-top-color: var(--border-color);
}

.faq-content p {
    font-size: 1.025rem;
    line-height: 1.7;
    margin-bottom: 0;
    color: var(--text-secondary);
    text-align: justify;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Site Footer */
.site-footer {
    text-align: center;
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-family: var(--font-ui);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    opacity: 0.8;
}

/* ==========================================================================
   Weekly Practice Planner Widget (Journal style)
   ========================================================================== */

.planner-box {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--accent-sage);
    padding: 32px;
    border-radius: var(--radius-lg);
    margin: 60px 0;
    box-shadow: 0 8px 24px var(--shadow-color);
    animation: slideReveal 0.4s ease;
}

.planner-box.hidden {
    display: none;
}

.planner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.planner-header h4 {
    font-family: var(--font-ui);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-sage);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

#reset-planner-btn {
    background: none;
    border: none;
    color: var(--accent-terracotta);
    font-family: var(--font-ui);
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: underline;
    transition: var(--transition-smooth);
}

#reset-planner-btn:hover {
    color: var(--text-primary);
}

.planner-meta {
    font-size: 1.05rem;
    margin-bottom: 24px;
    color: var(--text-secondary);
}

.planner-meta strong {
    color: var(--accent-sage);
}

.checklist-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
}

@media (max-width: 500px) {
    .checklist-row {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
}

.progress-streak {
    font-family: var(--font-ui);
    font-size: 1.05rem;
}

.progress-streak span {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-sage);
}

#checkin-btn {
    background-color: var(--accent-sage);
    color: #ffffff;
    border: none;
    padding: 12px 28px;
    border-radius: 30px;
    font-family: var(--font-ui);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(73, 90, 79, 0.15);
    transition: var(--transition-smooth);
}

#checkin-btn:hover {
    background-color: var(--accent-sage-hover);
    transform: translateY(-1px);
}

#checkin-btn:disabled {
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: not-allowed;
    box-shadow: none;
}

.days-indicator {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 20px;
}

.day-dot {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-ui);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.day-dot.completed {
    background-color: var(--accent-sage);
    color: #ffffff;
    border-color: var(--accent-sage);
    box-shadow: 0 2px 8px rgba(73, 90, 79, 0.2);
}

.motivation-text {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 0.95rem;
    color: var(--text-secondary);
    text-align: center;
    opacity: 0.85;
}

/* ==========================================================================
   Ambient Sound Player (Sleek Drawer Widget)
   ========================================================================== */

.ambient-player {
    position: fixed;
    bottom: 28px;
    right: 28px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 10px 30px var(--shadow-color);
    width: 290px;
    z-index: 900;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.ambient-player.collapsed {
    width: 190px;
    border-radius: 30px;
}

.player-toggle-tab {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    cursor: pointer;
    user-select: none;
    justify-content: space-between;
    gap: 10px;
}

.sound-wave {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 14px;
    width: 20px;
}

.sound-wave span {
    background-color: var(--accent-sage);
    width: 2.5px;
    height: 100%;
    border-radius: 1px;
    animation: waveAnim 1.2s ease-in-out infinite alternate;
    transform-origin: bottom;
}

.sound-wave span:nth-child(2) { animation-delay: 0.3s; }
.sound-wave span:nth-child(3) { animation-delay: 0.6s; }
.sound-wave span:nth-child(4) { animation-delay: 0.9s; }

.ambient-player.collapsed:not(.playing) .sound-wave span {
    animation-play-state: paused;
    height: 2px;
}

@keyframes waveAnim {
    0% { transform: scaleY(0.15); }
    100% { transform: scaleY(1); }
}

.tab-text {
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--text-primary);
    flex-grow: 1;
    text-align: left;
    white-space: nowrap;
}

#player-collapse-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: transform 0.3s;
}

#player-collapse-btn svg {
    width: 14px;
    height: 14px;
}

.ambient-player.collapsed #player-collapse-btn svg {
    transform: rotate(180deg);
}

.player-body {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: opacity 0.25s;
}

.ambient-player.collapsed .player-body {
    display: none;
    opacity: 0;
}

.sound-select {
    display: flex;
    gap: 8px;
}

.sound-btn {
    flex: 1;
    padding: 8px 4px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-family: var(--font-ui);
    font-size: 0.78rem;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.sound-btn:hover {
    border-color: var(--accent-sage);
}

.sound-btn.active {
    background-color: var(--accent-soft-sage);
    border-color: var(--accent-sage);
    color: var(--accent-sage);
    font-weight: 600;
}

.volume-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.volume-control label {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

#volume-slider {
    flex-grow: 1;
    height: 3px;
    accent-color: var(--accent-sage);
    cursor: pointer;
}

.player-note {
    font-size: 0.72rem;
    line-height: 1.4;
    color: var(--text-secondary);
    text-align: center;
    opacity: 0.8;
}

@media (max-width: 550px) {
    .ambient-player {
        bottom: 12px;
        right: 12px;
        left: 12px;
        width: calc(100% - 24px);
    }
    .ambient-player.collapsed {
        left: auto;
        width: 190px;
    }
}

/* ==========================================================================
   Mindfulness Bell Widget & Full Screen Overlay
   ========================================================================== */

.mindfulness-bell-widget {
    position: fixed;
    bottom: 28px;
    left: 28px;
    z-index: 899;
}

#bell-trigger {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px var(--shadow-color);
    position: relative;
    transition: var(--transition-smooth);
}

#bell-trigger:hover {
    transform: scale(1.08) rotate(-8deg);
    border-color: var(--accent-terracotta);
}

#bell-trigger .bell-icon {
    font-size: 1.4rem;
}

/* Bell ring animation effect */
#bell-trigger.ringing {
    animation: ringShake 0.15s ease-in-out infinite alternate;
}

@keyframes ringShake {
    0% { transform: rotate(-8deg); }
    100% { transform: rotate(8deg); }
}

/* Wave visual ring */
.bell-wave {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    border: 1.5px solid var(--accent-terracotta);
    opacity: 0;
    pointer-events: none;
}

.ringing .bell-wave {
    animation: ringWave 1.8s cubic-bezier(0.1, 0.8, 0.2, 1) infinite;
}

@keyframes ringWave {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(2.2); opacity: 0; }
}

@media (max-width: 550px) {
    .mindfulness-bell-widget {
        bottom: auto;
        top: 12px;
        left: 16px;
        z-index: 1002;
    }
    #bell-trigger {
        width: 38px;
        height: 38px;
    }
    #bell-trigger .bell-icon {
        font-size: 1.1rem;
    }
}

/* Fullscreen Overlay */
#mindfulness-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(245, 242, 235, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s cubic-bezier(0.25, 1, 0.5, 1);
}

[data-theme="dark"] #mindfulness-overlay {
    background-color: rgba(18, 17, 16, 0.65);
}

#mindfulness-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.overlay-card {
    text-align: center;
    max-width: 400px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.overlay-icon {
    font-size: 2.8rem;
    animation: slowBreath 4s infinite ease-in-out;
}

#overlay-message {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 300;
    line-height: 1.5;
    color: var(--text-primary);
    animation: breathText 8s infinite ease-in-out;
}

.breath-indicator {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--accent-sage);
    position: relative;
    animation: breathCircle 8s infinite ease-in-out;
}

@keyframes breathCircle {
    0%, 100% { transform: scale(0.6); opacity: 0.3; border-color: var(--accent-terracotta); }
    50% { transform: scale(1.3); opacity: 0.9; border-color: var(--accent-sage); }
}

@keyframes breathText {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ==========================================================================
   Zen Focus Mode (Tĩnh Lặng Tuyệt Đối)
   ========================================================================== */

[data-focus-mode="true"] {
    background-color: var(--bg-primary);
}

[data-focus-mode="true"] .navbar,
[data-focus-mode="true"] .site-footer,
[data-focus-mode="true"] .ambient-player,
[data-focus-mode="true"] .mindfulness-bell-widget,
[data-focus-mode="true"] #progress-container,
[data-focus-mode="true"] .select-practice-btn,
[data-focus-mode="true"] #weekly-planner {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Show back button only in zen mode */
#zen-mode-toggle {
    z-index: 10005 !important;
}

[data-focus-mode="true"] #zen-mode-toggle {
    position: fixed;
    top: 24px;
    right: 24px;
    opacity: 0.7 !important;
    pointer-events: auto !important;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 10px var(--shadow-color);
    transform: none !important;
}

[data-focus-mode="true"] #zen-mode-toggle:hover {
    opacity: 1 !important;
    background-color: var(--bg-secondary);
}

[data-focus-mode="true"] .content-wrapper {
    max-width: var(--max-content-width);
    padding-top: 120px;
    padding-bottom: 150px;
    border: none;
    box-shadow: none;
    background: none;
}

[data-focus-mode="true"] .article-body p {
    font-size: 1.25rem;
    line-height: 2.1;
    color: var(--text-primary);
    opacity: 0.85;
}

[data-focus-mode="true"] .pain-item,
[data-focus-mode="true"] .reaction-card,
[data-focus-mode="true"] .interactive-diagram-container,
[data-focus-mode="true"] .exercise-card,
[data-focus-mode="true"] .faq-item {
    border-color: var(--border-color);
    box-shadow: none;
    background-color: transparent;
}

/* ==========================================================================
   Book Introduction Section
   ========================================================================== */

.book-intro-section {
    margin: 60px auto;
    max-width: var(--max-content-width);
    padding: 0 0 40px;
    transition: var(--transition-smooth);
}

.book-intro-container {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 16px var(--shadow-color);
    transition: var(--transition-smooth);
}

.book-intro-container:hover {
    box-shadow: 0 8px 24px var(--shadow-color);
}

.book-intro-grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 36px;
    align-items: center;
}

.book-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.book-cover-wrapper {
    position: relative;
    width: 160px;
    perspective: 1000px;
    transition: var(--transition-smooth);
}

.book-cover-img {
    width: 100%;
    height: auto;
    border-radius: 4px 8px 8px 4px;
    border: 1px solid var(--border-color);
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.15);
    transition: var(--transition-smooth);
    display: block;
}

.book-cover-wrapper:hover .book-cover-img {
    transform: translateY(-4px) rotateY(-8deg);
    box-shadow: 12px 12px 24px rgba(0, 0, 0, 0.2);
}

.book-info-content {
    display: flex;
    flex-direction: column;
}

.book-tag {
    font-family: var(--font-ui);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent-terracotta);
    margin-bottom: 8px;
    font-weight: 600;
}

.book-title {
    font-family: var(--font-display);
    font-size: 1.8rem !important;
    font-weight: 400;
    color: var(--text-primary);
    margin: 0 0 6px !important;
    line-height: 1.3;
}

.book-subtitle {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    opacity: 0.9;
}

.book-description {
    font-size: 1rem !important;
    line-height: 1.75;
    color: var(--text-primary);
    margin-bottom: 18px;
    text-align: justify;
}

.book-highlights-list {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.book-highlights-list li {
    font-size: 0.95rem;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--text-secondary);
    padding-left: 0 !important; /* Override standard lists if any */
}

.book-highlights-list li::before {
    display: none !important; /* Remove defaults */
}

.book-highlights-list li span {
    color: var(--accent-sage);
    font-size: 0.8rem;
    margin-top: 2px;
}

.book-highlights-list li strong {
    color: var(--text-primary);
    font-weight: 600;
}

.book-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

/* Nút tải sách nổi bật */
.book-download-btn {
    background-color: var(--accent-sage) !important;
    color: #ffffff !important;
    border: 1px solid var(--accent-sage) !important;
    font-weight: 600;
    text-decoration: none;
}

.book-download-btn:hover {
    background-color: var(--accent-sage-hover) !important;
    border-color: var(--accent-sage-hover) !important;
    color: #ffffff !important;
}

/* Nút nghe nhạc thiền phụ */
.book-music-btn {
    background-color: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    text-decoration: none;
}

.book-music-btn:hover {
    background-color: var(--accent-soft-sage) !important;
    border-color: var(--accent-sage) !important;
    color: var(--accent-sage) !important;
}

.btn-arrow-icon, .btn-music-icon {
    stroke: currentColor;
    fill: none;
    transition: transform 0.3s ease;
}

.book-download-btn:hover .btn-arrow-icon {
    transform: translateX(3px);
}

/* Focus mode support */
[data-focus-mode="true"] .book-intro-container {
    border-color: var(--border-color);
    box-shadow: none;
    background-color: transparent;
}

@media (max-width: 600px) {
    .book-intro-section {
        padding: 0 16px 20px;
        margin: 40px auto;
    }
    .book-intro-container {
        padding: 28px;
    }
    .book-intro-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        text-align: center;
    }
    .book-cover-wrapper {
        width: 140px;
    }
    .book-description {
        text-align: left;
    }
    .book-highlights-list li {
        text-align: left;
    }
    .book-actions {
        justify-content: center;
    }
}

/* ==========================================================================
   Feedback Form (Form góp ý)
   ========================================================================== */

.feedback-section {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 40px;
    border-radius: var(--radius-lg);
    margin: 60px auto 40px;
    max-width: var(--max-content-width);
    box-shadow: 0 4px 16px var(--shadow-color);
    transition: var(--transition-smooth);
}

.feedback-section:hover {
    box-shadow: 0 8px 24px var(--shadow-color);
}

.feedback-header {
    margin-bottom: 28px;
    text-align: center;
}

.feedback-header h3 {
    margin: 0 0 10px;
    font-size: 1.8rem;
    color: var(--text-primary);
}

.feedback-header p {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0;
}

.feedback-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.honeypot-field {
    display: none; /* hidden from real users, visible to simple bot scripts */
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.form-group label {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.required {
    color: var(--accent-terracotta);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    font-family: var(--font-body);
    font-size: 1rem;
    padding: 12px 16px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    transition: var(--transition-smooth);
    width: 100%;
    box-sizing: border-box;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-sage);
    box-shadow: 0 0 0 3px rgba(73, 90, 79, 0.15);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-actions {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.feedback-message {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    text-align: center;
    line-height: 1.5;
    animation: fadeIn 0.4s ease;
    margin-top: 10px;
    width: 100%;
}

.feedback-message.success {
    background-color: var(--accent-soft-sage);
    color: var(--accent-sage);
    border: 1px solid var(--accent-sage);
}

.feedback-message.error {
    background-color: var(--accent-soft-terracotta);
    color: var(--accent-terracotta);
    border: 1px solid var(--accent-terracotta);
}

.feedback-message.hidden {
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
    .feedback-section {
        padding: 24px;
        margin: 40px 16px;
    }
    .form-row {
        flex-direction: column;
        gap: 20px;
    }
}

/* Support for focus mode if user turns it on */
[data-focus-mode="true"] .feedback-section {
    border-color: var(--border-color);
    box-shadow: none;
    background-color: transparent;
}
