:root {
    --bg-color: #F7F5F0;         /* 米白 */
    --wood-color: #D4C4A8;       /* 淺木色 */
    --wood-dark: #C1AF91;        /* 深木色，用於陰影或互動 */
    --ink-color: #2C3E35;        /* 墨綠 */
    --ink-light: #4A6356;        /* 淺墨綠 */
    --mist-blue: #899EAC;        /* 霧藍 */
    --mist-blue-light: #B4C6D1;  /* 淺霧藍 */
    
    --font-serif: 'Noto Serif TC', serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--ink-color);
    font-family: var(--font-serif);
    min-height: 100vh;
    overflow: hidden; /* 防止滾動，營造 App 感 */
    position: relative;
}

/* 水墨暈染裝飾 (背景) */
.ink-stain {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.15;
}

.ink-1 {
    width: 400px;
    height: 400px;
    background: var(--ink-color);
    top: -100px;
    right: -100px;
}

.ink-2 {
    width: 500px;
    height: 500px;
    background: var(--wood-color);
    bottom: -150px;
    left: -150px;
}

/* 頂部區域 */
header {
    position: absolute;
    top: 40px;
    left: 40px;
    z-index: 10;
}

.title-container h1 {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: 4px;
    margin-bottom: 12px;
    color: var(--ink-color);
    text-shadow: 1px 1px 3px rgba(212, 196, 168, 0.3);
}

.user-input-group {
    position: relative;
    width: 200px;
}

.user-input-group input {
    background: transparent;
    border: none;
    outline: none;
    font-family: var(--font-serif);
    font-size: 16px;
    color: var(--ink-color);
    padding: 4px 0;
    width: 100%;
    letter-spacing: 2px;
    text-align: center;
}

.user-input-group input::placeholder {
    color: var(--ink-light);
    opacity: 0.6;
}

.input-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--wood-color);
    transform-origin: center;
    transition: transform 0.4s ease, background-color 0.4s ease;
}

.user-input-group input:focus + .input-line {
    transform: scaleX(1);
    background-color: var(--ink-color);
}

/* 遊戲主體區域 */
main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.plant-container {
    position: relative;
    width: 300px;
    height: 400px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    margin-bottom: 40px;
}

#plant-svg-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    transition: all 1s ease;
}

#plant-svg-wrapper svg {
    max-width: 100%;
    max-height: 100%;
    transform-origin: bottom center;
}

.plant-image {
    max-width: 100%;
    max-height: 100%;
    transform-origin: bottom center;
}

/* 澆水特效層 */
#particles-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.water-drop {
    position: absolute;
    width: 6px;
    height: 12px;
    background: linear-gradient(to bottom, transparent, var(--mist-blue));
    border-radius: 50%;
    animation: dropFall 1.5s ease-in forwards;
    opacity: 0;
}

@keyframes dropFall {
    0% { transform: translateY(-50px) scale(0.8); opacity: 0; }
    20% { opacity: 0.8; }
    80% { transform: translateY(150px) scale(1.2); opacity: 0.5; }
    100% { transform: translateY(200px) scale(0); opacity: 0; }
}

.light-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background-color: #FFF;
    border-radius: 50%;
    box-shadow: 0 0 8px 2px var(--wood-color);
    animation: floatUp 2s ease-out forwards;
}

@keyframes floatUp {
    0% { transform: translateY(0) scale(0); opacity: 0; }
    30% { transform: translateY(-20px) scale(1); opacity: 0.8; }
    100% { transform: translateY(-80px) scale(0); opacity: 0; }
}

/* 按鈕樣式 */
.zen-btn {
    position: relative;
    background: transparent;
    border: 1px solid var(--wood-color);
    padding: 12px 36px;
    font-family: var(--font-serif);
    font-size: 18px;
    color: var(--ink-color);
    letter-spacing: 4px;
    cursor: pointer;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.4s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.zen-btn:hover {
    background: rgba(212, 196, 168, 0.15); /* 淺木色微透 */
    border-color: var(--ink-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -5px rgba(44, 62, 53, 0.1);
}

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

.zen-btn.disabled {
    opacity: 0.5;
    pointer-events: none;
    border-color: #ddd;
}

/* 彈窗樣式 (每日簽到) */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 1;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.modal.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(247, 245, 240, 0.6); /* 米白半透明 */
    backdrop-filter: blur(12px); /* 玻璃擬物毛玻璃效果 */
}

.modal-content {
    position: relative;
    width: 80%;
    max-width: 500px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(44, 62, 53, 0.08);
}

/* 木質與水墨邊框感 */
.wooden-border {
    border: 1px solid var(--wood-color);
    position: relative;
}

.wooden-border::before {
    content: '';
    position: absolute;
    top: 6px; left: 6px; right: 6px; bottom: 6px;
    border: 1px dashed var(--wood-dark);
    opacity: 0.3;
    border-radius: 4px;
    pointer-events: none;
}

.modal-inner {
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 2;
}

.quote-icon {
    font-size: 36px;
    color: var(--mist-blue);
    opacity: 0.5;
    margin-bottom: 16px;
    font-family: serif;
}

.quote-text {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.6;
    letter-spacing: 2px;
    margin-bottom: 24px;
    color: var(--ink-color);
}

.quote-explanation {
    font-size: 15px;
    line-height: 1.8;
    color: var(--ink-light);
    letter-spacing: 1.5px;
    margin-bottom: 36px;
    position: relative;
    padding-top: 20px;
}

.quote-explanation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 1px;
    background-color: var(--wood-dark);
    opacity: 0.5;
}

.small-btn {
    font-size: 14px;
    padding: 8px 24px;
    letter-spacing: 3px;
}

/* 生長動畫用 class */
.grow-animation {
    animation: gentleGrow 1.5s ease-out forwards;
}

@keyframes gentleGrow {
    0% { transform: scale(0.95) translateY(10px); opacity: 0.8; }
    50% { transform: scale(1.02) translateY(-2px); opacity: 1; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

/* 葉片微動 (適用於 SVG 內部元件) */
.leaf-sway {
    transform-origin: bottom center;
    animation: sway 4s ease-in-out infinite alternate;
}

@keyframes sway {
    0% { transform: rotate(-2deg); }
    100% { transform: rotate(2deg); }
}

/* 右上角選單 */
.top-right-menu {
    position: absolute;
    top: 40px;
    right: 40px;
    display: flex;
    gap: 16px;
    z-index: 10;
}

.menu-btn {
    width: 48px;
    height: 48px;
    border-radius: 16px; /* 圓角 */
    background: linear-gradient(135deg, #E3D5CA, #D4C4A8); /* 木質漸層 */
    border: 1px solid var(--wood-dark);
    box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.5), 0 2px 5px rgba(44, 62, 53, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.4s ease;
    outline: none;
    position: relative;
    overflow: hidden;
}

.menu-btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 16px;
    background: radial-gradient(circle at center, transparent 30%, rgba(193, 175, 145, 0.3) 100%);
    pointer-events: none;
    transition: opacity 0.4s ease;
}

/* 懸停微光效果 */
.menu-btn:hover {
    transform: translateY(-2px);
    box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.6), 0 0 15px 3px rgba(212, 196, 168, 0.8); /* 微光 */
    border-color: #F7F5F0;
}

.menu-btn:active {
    transform: translateY(0);
    box-shadow: inset 0 2px 4px rgba(44, 62, 53, 0.2);
}

/* 水墨圖示字體 */
.ink-icon {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 600;
    color: var(--ink-color);
    position: relative;
    z-index: 1;
    text-shadow: 1px 1px 2px rgba(44, 62, 53, 0.3); /* 輕微墨跡感 */
    opacity: 0.85;
    transition: opacity 0.4s ease;
}

.menu-btn:hover .ink-icon {
    opacity: 1;
}

/* 語錄收藏簿 - 卷軸/手帳風格 */
.scroll-content {
    position: relative;
    width: 90%;
    max-width: 600px;
    height: 80vh;
    display: flex;
    box-shadow: 0 30px 60px rgba(44, 62, 53, 0.15);
    background-color: #FDFBF7; /* 稍微偏白的宣紙色 */
    border-radius: 4px;
    z-index: 101;
}

.scroll-inner {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
    position: relative;
    background-image: linear-gradient(to right, rgba(212, 196, 168, 0.1) 1px, transparent 1px);
    background-size: 30px 100%; /* 仿直行書寫的隱約格線 */
}

/* 卷軸兩側木軸 */
.scroll-roller {
    width: 24px;
    height: calc(100% + 40px);
    background: linear-gradient(to right, #9C8360, #C1AF91, #8A7251);
    position: absolute;
    top: -20px;
    border-radius: 12px;
    box-shadow: 2px 5px 10px rgba(0,0,0,0.1);
}

.left-roller {
    left: -12px;
}

.right-roller {
    right: -12px;
}

.close-scroll-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    background: transparent;
    border: none;
    font-size: 28px;
    color: var(--wood-dark);
    cursor: pointer;
    transition: color 0.3s;
    z-index: 10;
}

.close-scroll-btn:hover {
    color: var(--ink-color);
}

.scroll-header h2 {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 4px;
    color: var(--ink-color);
    margin-bottom: 24px;
    text-align: center;
}

.scroll-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--wood-color);
    padding-bottom: 10px;
}

.scroll-tab {
    background: none;
    border: none;
    font-family: var(--font-serif);
    font-size: 16px;
    color: var(--ink-light);
    cursor: pointer;
    letter-spacing: 2px;
    position: relative;
    transition: color 0.3s;
}

.scroll-tab.active {
    color: var(--ink-color);
    font-weight: 600;
}

.scroll-tab.active::after {
    content: '';
    position: absolute;
    bottom: -11px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--ink-color);
}

.scroll-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.quote-item {
    padding: 20px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(212, 196, 168, 0.4);
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
}

.quote-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(44, 62, 53, 0.05);
}

.quote-item-date {
    font-size: 13px;
    color: var(--mist-blue);
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.quote-item-text {
    font-size: 18px;
    color: var(--ink-color);
    line-height: 1.6;
    letter-spacing: 1.5px;
    padding-right: 30px; /* 給愛心留空間 */
}

/* 紀錄編輯與刪除相關樣式 */
.record-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.record-actions {
    display: flex;
    gap: 8px;
    opacity: 0.3;
    transition: opacity 0.3s;
}

.reflection-item:hover .record-actions,
.awareness-item:hover .record-actions,
.emotion-item:hover .record-actions,
.practice-item:hover .record-actions,
.goodness-item:hover .record-actions,
.obs-list-item:hover .record-actions {
    opacity: 1;
}

.edit-btn, .delete-btn {
    background: transparent;
    border: none;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.2s, filter 0.2s;
    filter: grayscale(100%);
}

.edit-btn:hover, .delete-btn:hover {
    transform: scale(1.1);
    filter: grayscale(0%);
}

.edit-textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--mist-blue);
    border-radius: 4px;
    padding: 10px;
    font-family: var(--font-serif);
    font-size: 15px;
    color: var(--ink-color);
    resize: vertical;
    min-height: 80px;
    margin-bottom: 10px;
}

.save-edit-btn {
    background: var(--mist-blue);
    color: #FFF;
    border: none;
    padding: 6px 16px;
    border-radius: 4px;
    font-family: var(--font-serif);
    font-size: 13px;
    cursor: pointer;
    transition: background 0.3s;
}

.save-edit-btn:hover {
    background: var(--ink-light);
}

.cancel-edit-btn {
    background: transparent;
    color: var(--ink-light);
    border: 1px solid var(--ink-light);
    padding: 6px 16px;
    border-radius: 4px;
    font-family: var(--font-serif);
    font-size: 13px;
    cursor: pointer;
    margin-left: 8px;
    transition: all 0.3s;
}

.cancel-edit-btn:hover {
    background: rgba(0,0,0,0.05);
    color: var(--ink-color);
}

/* 清明觀測 - 歷史紀錄列表 */
.obs-list-container {
    margin-top: 20px;
    border-top: 1px solid rgba(137, 158, 172, 0.2);
    padding-top: 20px;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.obs-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    border: 1px solid rgba(212, 196, 168, 0.3);
}

.obs-item-info {
    display: flex;
    gap: 20px;
    color: var(--ink-color);
    font-size: 14px;
}

.obs-item-date {
    color: var(--wood-dark);
    min-width: 90px;
}

.obs-item-minutes, .obs-item-clarity {
    color: var(--mist-blue);
    font-weight: 600;
}

/* 針對深色主題 (去惡實踐) 的特例 */
.practice-item .edit-textarea {
    background: rgba(0, 0, 0, 0.3);
    color: var(--bg-color);
    border-color: var(--wood-dark);
}
.practice-item .save-edit-btn {
    background: var(--wood-color);
    color: var(--ink-color);
}
.practice-item .cancel-edit-btn {
    color: var(--wood-color);
    border-color: var(--wood-color);
}
.practice-item .edit-btn, .practice-item .delete-btn {
    filter: invert(0.8) grayscale(100%);
}
.practice-item .edit-btn:hover, .practice-item .delete-btn:hover {
    filter: invert(0.8) grayscale(0%);
}

.practice-content .counter-reset-btn {
    color: var(--wood-color);
}
.practice-content .counter-reset-btn:hover {
    color: var(--bg-color);
}

.heart-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--wood-color);
    transition: transform 0.2s, color 0.2s;
}

.heart-btn:hover {
    transform: scale(1.2);
}

.heart-btn.favorited {
    color: #C25B56; /* 硃砂紅 */
}

.empty-state {
    text-align: center;
    color: var(--ink-light);
    padding: 40px 0;
    letter-spacing: 2px;
    font-size: 15px;
}

/* 念頭省察 筆記本風格 */
.notebook-content {
    position: relative;
    width: 90%;
    max-width: 600px;
    height: 85vh;
    background-color: #FDFBF7;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(44, 62, 53, 0.12);
    display: flex;
    flex-direction: column;
    z-index: 101;
}

.notebook-inner {
    padding: 40px;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    /* 橫向筆記本線條 */
    background-image: repeating-linear-gradient(transparent, transparent 31px, rgba(212, 196, 168, 0.3) 31px, rgba(212, 196, 168, 0.3) 32px);
    background-attachment: local;
}

.notebook-header h2 {
    font-size: 26px;
    letter-spacing: 6px;
    text-align: center;
    margin-bottom: 30px;
    color: var(--ink-color);
    background: #FDFBF7; /* 遮擋背景線條 */
    display: inline-block;
    padding: 0 10px;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

.counter-section {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-bottom: 25px;
}

.counter-reset-btn {
    position: absolute;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 18px;
    color: var(--ink-light);
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.6;
    padding: 10px;
}

.counter-reset-btn:hover {
    opacity: 1;
    color: var(--ink-color);
    transform: rotate(-45deg);
}

.counter-minus-btn {
    position: absolute;
    top: 5px;
    right: calc(50% - 65px);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--wood-color);
    color: var(--ink-color);
    font-size: 16px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 5;
    transition: all 0.2s ease;
}

.counter-minus-btn:hover {
    background: var(--wood-color);
    color: #fff;
    transform: scale(1.1);
}

.counter-minus-btn.hidden {
    display: none !important;
}

.counter-btn {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid var(--wood-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(212, 196, 168, 0.2);
}

.counter-btn:hover {
    transform: scale(1.05);
    background: rgba(212, 196, 168, 0.1);
    box-shadow: 0 6px 20px rgba(212, 196, 168, 0.4);
}

.counter-btn:active {
    transform: scale(0.95);
}

.counter-number {
    font-size: 36px;
    font-weight: 600;
    color: var(--ink-color);
    font-family: serif;
    margin-bottom: 5px;
}

.counter-label {
    font-size: 14px;
    color: var(--ink-light);
    letter-spacing: 2px;
}

.reflection-prompt {
    font-size: 15px;
    color: var(--mist-blue);
    text-align: center;
    line-height: 1.8;
    margin-bottom: 30px;
    padding: 15px;
    background: rgba(137, 158, 172, 0.05);
    border-radius: 8px;
    letter-spacing: 1px;
}

.reflection-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.reflection-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.reflection-item {
    background: rgba(255, 255, 255, 0.7);
    padding: 15px 20px;
    border-radius: 6px;
    border-left: 3px solid var(--mist-blue);
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.reflection-date {
    font-size: 12px;
    color: var(--mist-blue);
    margin-bottom: 6px;
}

.reflection-content {
    font-size: 16px;
    color: var(--ink-color);
    line-height: 1.6;
    letter-spacing: 1px;
}

.add-reflection-container {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: #FDFBF7;
    padding-top: 10px;
}

.reflection-textarea {
    width: 100%;
    background: transparent;
    border: 1px solid var(--wood-color);
    border-radius: 6px;
    padding: 15px;
    font-family: var(--font-serif);
    font-size: 16px;
    color: var(--ink-color);
    resize: none;
    line-height: 1.6;
    letter-spacing: 1px;
    transition: border-color 0.3s;
}

.reflection-textarea:focus {
    outline: none;
    border-color: var(--ink-color);
    background: rgba(255,255,255,0.5);
}

.add-btn {
    align-self: flex-end;
    background: var(--ink-color);
    color: #FDFBF7;
    border: none;
    padding: 10px 24px;
    border-radius: 4px;
    font-family: var(--font-serif);
    font-size: 15px;
    letter-spacing: 2px;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.add-btn:hover {
    background: var(--ink-light);
}

.plus-icon {
    font-size: 18px;
    font-weight: 300;
}

/* 覺知生活 - 留白與呼吸感 */
.awareness-content {
    position: relative;
    width: 90%;
    max-width: 600px;
    height: 85vh;
    background: rgba(247, 245, 240, 0.95); /* 更輕透的米白 */
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(137, 158, 172, 0.1); /* 霧藍色的柔和陰影 */
    display: flex;
    flex-direction: column;
    z-index: 101;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.awareness-inner {
    padding: 50px;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
}

.awareness-header h2 {
    font-size: 24px;
    letter-spacing: 8px;
    text-align: center;
    margin-bottom: 40px;
    color: var(--mist-blue); /* 柔和的藍色 */
    font-weight: 400;
}

.breath-counter-btn {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid rgba(137, 158, 172, 0.3); /* 霧藍細邊 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.5s ease;
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.5), 0 0 20px rgba(255, 255, 255, 0.5);
    animation: breathe 4s infinite alternate ease-in-out;
}

@keyframes breathe {
    0% { transform: scale(0.98); box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.5), 0 0 10px rgba(255, 255, 255, 0.2); }
    100% { transform: scale(1.02); box-shadow: inset 0 0 30px rgba(255, 255, 255, 0.8), 0 0 30px rgba(137, 158, 172, 0.2); }
}

.breath-counter-btn:hover {
    background: rgba(255, 255, 255, 0.5);
}

.breath-counter-btn:active {
    transform: scale(0.95);
    animation: none;
}

.awareness-prompt {
    font-size: 15px;
    color: var(--mist-blue);
    text-align: center;
    line-height: 2;
    margin-bottom: 40px;
    padding: 0 20px;
    letter-spacing: 1.5px;
    font-weight: 300;
}

.awareness-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.awareness-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.awareness-item {
    background: transparent;
    padding: 20px 0;
    border-bottom: 1px dotted rgba(212, 196, 168, 0.5);
}

.awareness-date {
    font-size: 11px;
    color: var(--wood-dark);
    margin-bottom: 10px;
    letter-spacing: 1.5px;
}

.awareness-content-text {
    font-size: 16px;
    color: var(--ink-light);
    line-height: 1.8;
    letter-spacing: 1px;
    font-weight: 300;
}

.add-awareness-container {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.awareness-textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    border-bottom: 1px solid var(--mist-blue);
    padding: 10px 5px;
    font-family: var(--font-serif);
    font-size: 15px;
    color: var(--ink-color);
    resize: none;
    line-height: 1.8;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.awareness-textarea:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.6);
    border-bottom-color: var(--ink-color);
}

.soft-add-btn {
    align-self: center;
    background: transparent;
    color: var(--mist-blue);
    border: 1px solid var(--mist-blue);
    padding: 8px 30px;
    border-radius: 30px; /* 更圓潤 */
    font-family: var(--font-serif);
    font-size: 14px;
    letter-spacing: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.soft-add-btn:hover {
    background: rgba(137, 158, 172, 0.1);
    transform: translateY(-1px);
}

/* 情緒轉化 - 流光與水波紋風格 */
.emotion-content {
    position: relative;
    width: 90%;
    max-width: 600px;
    height: 85vh;
    background: rgba(255, 255, 255, 0.85); /* 半透明底色，讓流光透出 */
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(44, 62, 53, 0.15);
    display: flex;
    flex-direction: column;
    z-index: 101;
    backdrop-filter: blur(15px);
    overflow: hidden; /* 隱藏超出邊界的動畫 */
}

/* 柔和流光層 */
.light-flow-bg {
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: linear-gradient(
        45deg,
        rgba(137, 158, 172, 0) 0%,
        rgba(212, 196, 168, 0.1) 25%,
        rgba(180, 198, 209, 0.2) 50%,
        rgba(137, 158, 172, 0) 100%
    );
    z-index: 0;
    animation: flowLight 15s linear infinite;
    pointer-events: none;
}

@keyframes flowLight {
    0% { transform: rotate(0deg) translate(-10%, -10%); }
    50% { transform: rotate(180deg) translate(10%, 10%); }
    100% { transform: rotate(360deg) translate(-10%, -10%); }
}

/* 水波紋背景裝飾 */
.ripple-bg {
    position: absolute;
    bottom: -100px; right: -50px;
    width: 400px; height: 400px;
    border-radius: 50%;
    border: 2px solid rgba(137, 158, 172, 0.1);
    z-index: 0;
    pointer-events: none;
    box-shadow: inset 0 0 50px rgba(137, 158, 172, 0.05);
}

.ripple-bg::after {
    content: '';
    position: absolute;
    top: 50px; left: 50px;
    width: 300px; height: 300px;
    border-radius: 50%;
    border: 1px solid rgba(212, 196, 168, 0.15);
}

.emotion-inner {
    padding: 50px;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    position: relative;
    z-index: 2; /* 確保內容在流光之上 */
}

.emotion-header h2 {
    font-size: 24px;
    letter-spacing: 8px;
    text-align: center;
    margin-bottom: 40px;
    color: var(--ink-color);
    font-weight: 600;
}

.ripple-counter-btn {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    border: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: relative;
    box-shadow: 0 5px 20px rgba(137, 158, 172, 0.15);
    backdrop-filter: blur(5px);
}

.ripple-circle {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 100%; height: 100%;
    border-radius: 50%;
    border: 1px solid var(--mist-blue);
    opacity: 0;
    z-index: -1;
    pointer-events: none;
}

/* 點擊時的波紋擴散動畫 */
.ripple-counter-btn.clicked .ripple-circle {
    animation: rippleEffect 1s ease-out;
}

@keyframes rippleEffect {
    0% { width: 100%; height: 100%; opacity: 0.6; }
    100% { width: 200%; height: 200%; opacity: 0; border-width: 2px; }
}

.emotion-prompt {
    font-size: 15px;
    color: var(--ink-light);
    text-align: center;
    line-height: 2;
    margin-bottom: 40px;
    padding: 0 20px;
    letter-spacing: 1.5px;
    font-weight: 300;
}

.emotion-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.emotion-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.emotion-item {
    background: rgba(255, 255, 255, 0.5);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(137, 158, 172, 0.2);
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    position: relative;
    overflow: hidden;
}

.emotion-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
    background: var(--mist-blue);
    opacity: 0.7;
}

.emotion-date {
    font-size: 11px;
    color: var(--mist-blue);
    margin-bottom: 10px;
    letter-spacing: 1.5px;
}

.emotion-content-text {
    font-size: 16px;
    color: var(--ink-color);
    line-height: 1.8;
    letter-spacing: 1px;
    font-weight: 300;
}

.add-emotion-container {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.emotion-textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(137, 158, 172, 0.3);
    border-radius: 8px;
    padding: 15px;
    font-family: var(--font-serif);
    font-size: 15px;
    color: var(--ink-color);
    resize: none;
    line-height: 1.8;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.emotion-textarea:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--mist-blue);
    box-shadow: 0 0 10px rgba(137, 158, 172, 0.2);
}

.flow-add-btn {
    align-self: center;
    background: linear-gradient(135deg, rgba(137, 158, 172, 0.8), rgba(74, 99, 86, 0.8));
    color: #FFF;
    border: none;
    padding: 10px 36px;
    border-radius: 30px;
    font-family: var(--font-serif);
    font-size: 15px;
    letter-spacing: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(137, 158, 172, 0.3);
}

.flow-add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(137, 158, 172, 0.5);
    background: linear-gradient(135deg, rgba(137, 158, 172, 1), rgba(74, 99, 86, 1));
}

/* 去惡實踐 - 沉穩內省風格 */
.practice-content {
    position: relative;
    width: 90%;
    max-width: 600px;
    height: 85vh;
    background: var(--ink-color); /* 深色墨綠背景 */
    border-radius: 12px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    z-index: 101;
    border: 1px solid var(--wood-dark);
}

.practice-inner {
    padding: 50px;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
}

.light-close-btn {
    color: var(--wood-color);
}

.light-close-btn:hover {
    color: #FFF;
}

.practice-header h2 {
    font-size: 24px;
    letter-spacing: 8px;
    text-align: center;
    margin-bottom: 40px;
    color: var(--bg-color); /* 米白字體 */
    font-weight: 400;
}

.solid-counter-btn {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid var(--wood-dark);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
}

.solid-counter-btn:hover {
    background: rgba(212, 196, 168, 0.1);
    box-shadow: 0 0 25px rgba(212, 196, 168, 0.2);
}

.solid-counter-btn:active {
    transform: scale(0.95);
    background: rgba(212, 196, 168, 0.2);
}

.dark-bg-num {
    color: var(--bg-color);
}

.dark-bg-label {
    color: var(--wood-color);
}

.practice-prompt {
    font-size: 15px;
    color: var(--wood-color);
    text-align: center;
    line-height: 2;
    margin-bottom: 40px;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    letter-spacing: 1.5px;
    font-weight: 300;
    border-left: 3px solid var(--wood-dark);
}

.practice-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.practice-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 40px;
}

.practice-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid rgba(212, 196, 168, 0.2);
}

.practice-date {
    font-size: 12px;
    color: var(--wood-dark);
    margin-bottom: 8px;
    letter-spacing: 1.5px;
}

.practice-content-text {
    font-size: 16px;
    color: var(--bg-color);
    line-height: 1.8;
    letter-spacing: 1px;
    font-weight: 300;
}

.add-practice-container {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.practice-textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--wood-dark);
    border-radius: 8px;
    padding: 15px;
    font-family: var(--font-serif);
    font-size: 15px;
    color: var(--bg-color);
    resize: none;
    line-height: 1.8;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.practice-textarea::placeholder {
    color: rgba(212, 196, 168, 0.5);
}

.practice-textarea:focus {
    outline: none;
    background: rgba(0, 0, 0, 0.3);
    border-color: var(--wood-color);
    box-shadow: 0 0 10px rgba(212, 196, 168, 0.1);
}

.solid-add-btn {
    align-self: flex-end;
    background: var(--wood-color);
    color: var(--ink-color);
    border: none;
    padding: 10px 30px;
    border-radius: 4px;
    font-family: var(--font-serif);
    font-size: 15px;
    letter-spacing: 3px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.solid-add-btn:hover {
    background: var(--bg-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(212, 196, 168, 0.3);
}

/* 為善實踐 - 柔和暖光與植物風格 */
.goodness-content {
    position: relative;
    width: 90%;
    max-width: 600px;
    height: 85vh;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    box-shadow: 0 15px 50px rgba(106, 133, 109, 0.15);
    display: flex;
    flex-direction: column;
    z-index: 101;
    backdrop-filter: blur(10px);
    overflow: hidden;
    border: 1px solid rgba(250, 215, 161, 0.3);
}

/* 柔和暖光背景 */
.warm-glow-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: radial-gradient(circle at center 30%, rgba(250, 215, 161, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
    pointer-events: none;
    z-index: 0;
    animation: warmPulse 6s ease-in-out infinite alternate;
}

@keyframes warmPulse {
    0% { opacity: 0.6; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1.05); }
}

/* 植物裝飾 SVG */
.plant-deco {
    position: absolute;
    width: 150px;
    height: 150px;
    z-index: 1;
    pointer-events: none;
}

.top-right-plant {
    top: -20px;
    right: -20px;
    animation: plantSway 5s ease-in-out infinite alternate;
    transform-origin: top right;
}

.bottom-left-plant {
    bottom: -30px;
    left: -30px;
    animation: plantSway 6s ease-in-out infinite alternate-reverse;
    transform-origin: bottom left;
}

@keyframes plantSway {
    0% { transform: rotate(-2deg); }
    100% { transform: rotate(3deg); }
}

.goodness-inner {
    padding: 50px;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    position: relative;
    z-index: 2;
}

.goodness-header h2 {
    font-size: 24px;
    letter-spacing: 8px;
    text-align: center;
    margin-bottom: 40px;
    color: #6A856D; /* 柔和植物綠 */
    font-weight: 600;
}

.warm-counter-btn {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: #FFF;
    border: 2px solid rgba(250, 215, 161, 0.6);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 5px 20px rgba(250, 215, 161, 0.3), inset 0 0 10px rgba(250, 215, 161, 0.2);
    position: relative;
    overflow: hidden;
}

.warm-counter-btn::before {
    content: '';
    position: absolute;
    width: 100%; height: 100%;
    background: radial-gradient(circle, rgba(250, 215, 161, 0.4) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
}

.warm-counter-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(250, 215, 161, 0.5), inset 0 0 15px rgba(250, 215, 161, 0.3);
    border-color: #FAD7A1;
}

.warm-counter-btn:hover::before {
    opacity: 1;
}

.warm-counter-btn:active {
    transform: scale(0.95);
}

.goodness-prompt {
    font-size: 15px;
    color: #6A856D;
    text-align: center;
    line-height: 2;
    margin-bottom: 40px;
    padding: 15px 20px;
    background: rgba(106, 133, 109, 0.05);
    border-radius: 8px;
    letter-spacing: 1.5px;
    font-weight: 300;
}

.goodness-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.goodness-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 40px;
}

.goodness-item {
    background: #FFF;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(250, 215, 161, 0.3);
    box-shadow: 0 4px 12px rgba(250, 215, 161, 0.1);
}

.goodness-date {
    font-size: 11px;
    color: var(--wood-dark);
    margin-bottom: 10px;
    letter-spacing: 1.5px;
}

.goodness-content-text {
    font-size: 16px;
    color: var(--ink-color);
    line-height: 1.8;
    letter-spacing: 1px;
    font-weight: 300;
}

.add-goodness-container {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.goodness-textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(106, 133, 109, 0.2);
    border-radius: 8px;
    padding: 15px;
    font-family: var(--font-serif);
    font-size: 15px;
    color: var(--ink-color);
    resize: none;
    line-height: 1.8;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.goodness-textarea:focus {
    outline: none;
    background: #FFF;
    border-color: #8FA691;
    box-shadow: 0 0 15px rgba(143, 166, 145, 0.15);
}

.warm-add-btn {
    align-self: center;
    background: #8FA691;
    color: #FFF;
    border: none;
    padding: 10px 36px;
    border-radius: 30px;
    font-family: var(--font-serif);
    font-size: 15px;
    letter-spacing: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(106, 133, 109, 0.3);
}

.warm-add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(106, 133, 109, 0.4);
    background: #6A856D;
}

/* 清明觀測 - 數據追蹤風格 */
.observation-content {
    position: relative;
    width: 90%;
    max-width: 650px;
    height: 85vh;
    background-color: #FDFBF7;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(44, 62, 53, 0.12);
    display: flex;
    flex-direction: column;
    z-index: 101;
}

.observation-inner {
    padding: 40px;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
}

.observation-header {
    text-align: center;
    margin-bottom: 30px;
}

.observation-header h2 {
    font-size: 24px;
    letter-spacing: 6px;
    color: var(--ink-color);
    margin-bottom: 5px;
}

.observation-subtitle {
    font-size: 13px;
    color: var(--mist-blue);
    letter-spacing: 2px;
}

/* 圖表區域 */
.chart-container-wrapper {
    display: flex;
    background: #FFF;
    border: 1px solid var(--wood-color);
    border-radius: 8px;
    padding: 20px 10px;
    margin-bottom: 30px;
    position: relative;
    height: 280px;
    box-shadow: inset 0 0 10px rgba(212, 196, 168, 0.1);
}

.y-axis-labels {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 205px;
    margin-top: 10px;
    padding-right: 10px;
    border-right: 1px dashed var(--wood-color);
    color: var(--ink-light);
    font-size: 11px;
    font-family: monospace;
    flex-shrink: 0;
    align-items: flex-end;
}

.chart-scroll-area {
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    position: relative;
    /* 隱藏捲軸但允許捲動 */
    scrollbar-width: thin;
    scrollbar-color: var(--wood-color) transparent;
    padding-bottom: 10px; /* erin */
}

#chart-x-labels text {
    font-size: 12px;
    fill: #899EAC; /* 搭配你原本線條的顏色，或者改成你喜歡的顏色 */
    text-anchor: middle; /* 讓文字依據 X 座標置中對齊 */
    dominant-baseline: hanging; /* 讓文字從 Y 座標往下延伸，避免被切掉 */
} /* erin */

.chart-scroll-area::-webkit-scrollbar {
    height: 6px;
}
.chart-scroll-area::-webkit-scrollbar-thumb {
    background: var(--wood-color);
    border-radius: 3px;
}

.observation-chart {
    min-width: 100%;
    display: block;
}

/* 輸入區域 */
.observation-input-section {
    background: rgba(137, 158, 172, 0.05);
    padding: 25px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: auto;
}

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

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

.input-group label {
    font-size: 13px;
    color: var(--ink-light);
    letter-spacing: 1px;
}

.zen-input {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--mist-blue);
    padding: 8px 5px;
    font-family: var(--font-serif);
    font-size: 15px;
    color: var(--ink-color);
    transition: all 0.3s;
}

.zen-input:focus {
    outline: none;
    border-bottom-color: var(--ink-color);
    background: rgba(255, 255, 255, 0.5);
}

/* 日期選擇器圖示微調 */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: opacity(0.6);
    cursor: pointer;
}

/* 滑桿設計 */
.slider-group {
    margin-top: 10px;
}

.slider-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 12px;
    color: var(--mist-blue);
}

.zen-slider {
    flex: 1;
    -webkit-appearance: none;
    background: transparent;
    height: 4px;
    border-radius: 2px;
    background: var(--wood-color);
    outline: none;
}

.zen-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--ink-color);
    cursor: pointer;
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}

.zen-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: var(--mist-blue);
}

.save-obs-btn {
    align-self: center;
    margin-top: 10px;
    background: var(--mist-blue);
    color: #FFF;
    border: none;
    padding: 10px 40px;
    border-radius: 4px;
    font-family: var(--font-serif);
    font-size: 15px;
    letter-spacing: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.save-obs-btn:hover {
    background: var(--ink-light);
    box-shadow: 0 4px 12px rgba(137, 158, 172, 0.3);
}

/* ========================================================= */
/* CARTOON STYLE REDESIGN OVERRIDES */
/* ========================================================= */

:root {
    --cartoon-border: #3A2F2B;
    --primary-yellow: #FFCF40;
    --font-primary: 'M PLUS Rounded 1c', sans-serif;
}

body {
    font-family: var(--font-primary) !important;
    background: transparent;
}

.cartoon-bg {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: url('images/bg_balanced.jpg') center bottom / cover no-repeat;
    z-index: -2;
}

.cartoon-bg::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.65); /* 半透明白色遮罩，避免背景干擾按鈕與植物 */
    z-index: -1;
}

.cartoon-border {
    border: 3px solid var(--cartoon-border) !important;
    box-shadow: 4px 4px 0px rgba(58, 47, 43, 0.3) !important;
    border-radius: 20px !important;
}

/* Header & Name Tag */
header {
    position: absolute !important;
    top: 20px !important;
    left: 20px !important;
    display: block !important;
    width: auto !important;
}
.title-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.title-container h1 {
    display: block !important;
    font-size: 28px;
    font-weight: 800;
    color: #333;
    text-shadow: 2px 2px 0px #FFF;
    margin-bottom: 10px;
}
.user-input-group {
    background: #FFF;
    padding: 5px 15px !important;
    display: flex;
    align-items: center;
    border-radius: 20px !important;
    width: auto !important;
}
.user-input-group input {
    font-family: var(--font-primary) !important;
    font-weight: 700;
    color: #333 !important;
    font-size: 16px !important;
    width: 90px !important;
    text-align: left !important;
}
.settings-icon {
    font-size: 18px;
    margin-left: 5px;
    cursor: pointer;
}
.input-line { display: none !important; }

/* Top Right Menu Grid */
.top-right-menu {
    position: absolute !important;
    top: 20px !important;
    right: 20px !important;
    display: flex !important;
    gap: 10px !important;
    width: auto !important;
    padding: 0 !important;
    justify-content: end !important;
}
.menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.menu-btn {
    width: 45px !important;
    height: 45px !important;
    border-radius: 50% !important;
    background: #FFF !important;
    padding: 0 !important;
    display: flex;
    justify-content: center;
    align-items: center;
}
.menu-btn::before { display: none !important; }
.menu-icon {
    font-size: 20px;
    font-weight: 800;
    color: #333;
}
.menu-label {
    display: none; /* Hide labels since we are reverting to the single icon style */
}

/* Center Plant & Level Panel */
.plant-container {
    margin-top: 100px;
    position: relative;
    width: 300px;
    height: 350px;
}
.plant-status-bubble {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.85);
    padding: 8px 16px;
    font-weight: 700;
    color: #333;
    z-index: 10;
    white-space: nowrap;
}
.check-mark { color: #8C52FF; font-weight: 900; }

.level-panel {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    padding: 15px 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 150px;
    z-index: 5;
}
.level-badge {
    background: #000;
    color: #FFF;
    padding: 2px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 5px;
}
.level-line {
    width: 80%;
    height: 2px;
    background: rgba(0,0,0,0.3);
    margin: 5px 0;
}
.level-label {
    font-weight: 700;
    font-size: 14px;
    color: #333;
}

/* Bottom Action Button */
.action-container {
    margin-top: 40px;
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 0 20px;
    position: absolute;
    bottom: 30px;
}
.big-yellow-btn {
    width: 100%;
    max-width: 350px;
    background: var(--primary-yellow) !important;
    padding: 15px 0 !important;
    border-radius: 30px !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    cursor: pointer;
    transition: transform 0.1s;
    outline: none;
}
.big-yellow-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px rgba(58, 47, 43, 0.3) !important;
}
.btn-primary-text {
    font-size: 18px;
    font-weight: 800;
    color: #333;
}
.btn-secondary-text {
    font-size: 12px;
    font-weight: 700;
    color: #666;
}
.sparkle {
    position: absolute;
    font-size: 20px;
}
.sparkle-left { left: 20px; top: 15px; }
.sparkle-right { right: 20px; top: 15px; }

/* Global Modals overriding */
.modal-content, .scroll-content, .notebook-content, .awareness-content, .emotion-content, .practice-content, .goodness-content, .observation-content {
    border: 4px solid var(--cartoon-border) !important;
    box-shadow: 8px 8px 0px rgba(58, 47, 43, 0.4) !important;
    border-radius: 16px !important;
}
.zen-btn, .close-scroll-btn, .counter-reset-btn {
    font-family: var(--font-primary) !important;
    font-weight: 700;
}

/* Floating Share Button */
#floating-share-btn {
    position: fixed;
    bottom: 30px;
    right: 20px;
    background: #FFF;
    padding: 10px 15px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    z-index: 100;
    box-shadow: 4px 4px 0px rgba(58, 47, 43, 0.4) !important;
    transition: transform 0.1s;
}
#floating-share-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px rgba(58, 47, 43, 0.4) !important;
}

/* Share Card Template (Hidden but rendered by html2canvas) */
.share-card {
    position: fixed;
    left: -9999px;
    top: 0;
    width: 400px; /* 增加寬度以容納折線圖與文字紀錄 */
    background: #FFF;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(135deg, #FDEAD8 0%, #E3C5AD 100%);
    box-sizing: border-box;
    z-index: -10;
}
.share-card-header {
    text-align: center;
    margin-bottom: 20px;
}
.share-card-header h2 {
    font-size: 24px;
    font-weight: 800;
    color: #333;
    margin: 0;
    text-shadow: 2px 2px 0px #FFF;
}
.share-title {
    font-size: 14px;
    font-weight: 700;
    color: #666;
    background: rgba(255,255,255,0.7);
    padding: 2px 10px;
    border-radius: 12px;
    display: inline-block;
    margin-top: 5px;
}
.share-plant-area {
    width: 100%;
    height: 250px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    margin-bottom: 20px;
    background: rgba(255,255,255,0.5);
    border-radius: 20px;
    border: 3px solid var(--cartoon-border);
}
.share-plant-area img {
    width: auto;
    height: 100%;
    max-height: 250px;
}
.share-level-badge {
    position: absolute;
    bottom: -15px;
    background: #000;
    color: #FFF;
    padding: 5px 15px;
    border-radius: 15px !important;
    font-size: 16px;
    font-weight: 800;
    z-index: 5;
}
.share-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    width: 100%;
}
.stat-item {
    background: rgba(255, 255, 255, 0.8);
    padding: 10px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    border: 3px solid var(--cartoon-border);
    box-shadow: 2px 2px 0px rgba(58, 47, 43, 0.2);
}
.stat-item.full-width {
    grid-column: span 2;
    justify-content: center;
}
.stat-icon {
    font-size: 16px;
    font-weight: 800;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #FFCF40;
    border-radius: 50% !important;
    margin-right: 10px;
}
.stat-val {
    font-size: 16px;
    font-weight: 800;
    color: #333;
}

/* 結算卡片新增區塊樣式 */
.share-chart-section {
    width: 100%;
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.7);
    border: 3px solid var(--cartoon-border);
    border-radius: 15px;
    padding: 12px;
    box-sizing: border-box;
    box-shadow: 2px 2px 0px rgba(58, 47, 43, 0.2);
}

.share-section-title {
    font-size: 13px;
    font-weight: 800;
    color: #333;
    margin-bottom: 8px;
    text-align: center;
    border-bottom: 2px dashed rgba(58, 47, 43, 0.2);
    padding-bottom: 4px;
}

#share-chart-wrapper {
    width: 100%;
    height: auto;
    display: flex;
    justify-content: center;
}

.share-records-section {
    width: 100%;
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.7);
    border: 3px solid var(--cartoon-border);
    border-radius: 15px;
    padding: 12px;
    box-sizing: border-box;
    box-shadow: 2px 2px 0px rgba(58, 47, 43, 0.2);
}

.share-record-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.share-record-item {
    background: #FFF;
    border: 2px solid var(--cartoon-border);
    border-radius: 8px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.share-record-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
}

.share-record-badge {
    background: #FFCF40;
    color: #333;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 6px;
    border: 1.5px solid var(--cartoon-border);
}

.share-record-date {
    color: #888;
}

.share-record-content {
    font-size: 13px;
    color: #333;
    line-height: 1.4;
    word-break: break-all;
    text-align: left;
}

/* Share Modal overrides */
#share-image-container img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* RWD Adjustments */
@media (max-width: 768px) {
    header {
        position: relative !important;
        top: 20px !important;
        left: 0 !important;
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        margin-bottom: 20px !important;
    }
    .title-container {
        align-items: center;
    }
    .top-right-menu {
        position: relative !important;
        top: 0 !important;
        right: 0 !important;
        width: 100% !important;
        justify-content: center !important;
        flex-wrap: wrap !important;
        padding: 0 10px !important;
    }
    .menu-btn {
        width: 40px !important;
        height: 40px !important;
    }
    .menu-icon { font-size: 18px; }
    .plant-container {
        margin-top: 40px;
    }
    #floating-share-btn {
        bottom: 20px;
        right: 20px;
        width: 60px;
        height: 60px;
        font-size: 28px;
    }
}

/* 音樂播放控制按鈕 */
.music-toggle-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50% !important;
    font-size: 28px;
    background-color: var(--card-bg);
    cursor: pointer;
    z-index: 100;
    transition: transform 0.2s, filter 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
}
.music-toggle-btn:hover {
    transform: scale(1.1);
}
.music-toggle-btn.muted {
    filter: grayscale(100%);
    opacity: 0.7;
}

/* 左側半透明修心小語 */
.cultivation-quote {
    margin-top: 25px;
    font-size: 14px;
    line-height: 1.8;
    color: var(--ink-color);
    opacity: 0.45;
    font-weight: 700;
    letter-spacing: 1.5px;
    white-space: pre-line;
    max-width: 280px;
    pointer-events: none;
    text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.8);
    transition: opacity 0.3s;
}
.cultivation-quote:hover {
    opacity: 0.8;
}

/* 浮動功能導覽按鈕 */
#floating-guide-btn {
    position: fixed;
    bottom: 100px; /* 置於結算按鈕 (bottom: 30px) 的上方 */
    right: 20px;
    background: #FFF;
    padding: 10px 15px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    z-index: 100;
    box-shadow: 4px 4px 0px rgba(58, 47, 43, 0.4) !important;
    transition: transform 0.1s, background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 3px solid var(--cartoon-border) !important;
    font-family: var(--font-primary) !important;
}
#floating-guide-btn:hover {
    background-color: #FFF9E6;
}
#floating-guide-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px rgba(58, 47, 43, 0.4) !important;
}

/* 導覽彈窗樣式 */
.guide-content {
    position: relative;
    width: 95%;
    max-width: 900px;
    height: 85vh;
    background-color: #FDFBF7;
    border-radius: 16px !important;
    display: flex;
    flex-direction: column;
    z-index: 101;
    border: 4px solid var(--cartoon-border) !important;
    box-shadow: 8px 8px 0px rgba(58, 47, 43, 0.4) !important;
    animation: guideZoomIn 0.3s ease-out;
}

@keyframes guideZoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.guide-inner {
    flex: 1;
    overflow-y: auto;
    padding: 30px 40px;
    display: flex;
    flex-direction: column;
    gap: 25px;
    scrollbar-width: thin;
    scrollbar-color: var(--wood-color) transparent;
}

/* 滾動條 */
.guide-inner::-webkit-scrollbar {
    width: 8px;
}
.guide-inner::-webkit-scrollbar-track {
    background: transparent;
}
.guide-inner::-webkit-scrollbar-thumb {
    background-color: var(--wood-color);
    border-radius: 4px;
    border: 2px solid #FDFBF7;
}

.guide-header {
    text-align: center;
    border-bottom: 2px dashed var(--wood-color);
    padding-bottom: 20px;
}

.guide-header h2 {
    font-size: 28px;
    font-weight: 800;
    color: var(--ink-color);
    margin-bottom: 12px;
    letter-spacing: 4px;
}

.guide-intro {
    font-size: 15px;
    line-height: 1.8;
    color: var(--ink-light);
    letter-spacing: 1.5px;
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
    font-weight: 700;
    white-space: pre-line;
}

/* 陽明先生引導區 */
.guide-master-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 10px 0;
    background: rgba(212, 196, 168, 0.1);
    padding: 15px;
    border-radius: 12px;
    border: 2px solid rgba(212, 196, 168, 0.2);
}

.master-avatar {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 50%;
    border: 3px solid var(--cartoon-border);
    background-color: #FFF;
    padding: 3px;
    box-shadow: 4px 4px 0px rgba(58, 47, 43, 0.15);
}

.master-bubble {
    position: relative;
    background: #FFF;
    border: 3px solid var(--cartoon-border);
    border-radius: 16px;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 800;
    color: var(--ink-color);
    box-shadow: 4px 4px 0px rgba(58, 47, 43, 0.15);
}

.master-bubble .bubble-arrow {
    position: absolute;
    left: -15px;
    top: calc(50% - 10px);
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-right: 15px solid var(--cartoon-border);
}

.master-bubble .bubble-arrow::after {
    content: '';
    position: absolute;
    left: 4px;
    top: -8px;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 12px solid #FFF;
}

/* 七個功能區塊 */
.guide-blocks {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.guide-row {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.guide-block {
    background: #FFF;
    border-radius: 12px !important;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    box-shadow: 4px 4px 0px rgba(58, 47, 43, 0.1) !important;
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: left;
    border: 3px solid var(--cartoon-border) !important;
}

.guide-block:hover {
    transform: translateY(-2px);
    box-shadow: 6px 6px 0px rgba(58, 47, 43, 0.15) !important;
}

.top-row .guide-block {
    flex: 1 1 calc(33.33% - 15px);
    min-width: 220px;
    max-width: 260px;
}

.bottom-row .guide-block {
    flex: 1 1 calc(25% - 15px);
    min-width: 180px;
    max-width: 195px;
}

.block-badge {
    position: absolute;
    top: -14px;
    left: 20px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: #FFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    border: 2px solid var(--cartoon-border);
    box-shadow: 2px 2px 0px rgba(58, 47, 43, 0.15);
}

/* 工夫入口標籤與配色 */
.guide-录 { border-color: var(--wood-color) !important; }
.guide-录 .block-badge { background: var(--wood-color); }
.guide-省 { border-color: #A36A5E !important; }
.guide-省 .block-badge { background: #A36A5E; }
.guide-觉 { border-color: #6C8CA2 !important; }
.guide-觉 .block-badge { background: #6C8CA2; }
.guide-情 { border-color: #8C6CA2 !important; }
.guide-情 .block-badge { background: #8C6CA2; }
.guide-恶 { border-color: var(--ink-color) !important; }
.guide-恶 .block-badge { background: var(--ink-color); }
.guide-善 { border-color: #6A856D !important; }
.guide-善 .block-badge { background: #6A856D; }
.guide-观 { border-color: var(--mist-blue) !important; }
.guide-观 .block-badge { background: var(--mist-blue); }

.guide-block h3 {
    font-size: 16px;
    font-weight: 800;
    color: var(--ink-color);
    margin-top: 5px;
}

.block-tagline {
    font-size: 13px;
    color: #666;
    font-weight: 700;
    border-bottom: 1px dashed rgba(212, 196, 168, 0.5);
    padding-bottom: 6px;
    margin-bottom: 2px;
}

.block-details {
    font-size: 12px;
    color: var(--ink-color);
}

.block-details span {
    font-weight: 800;
    color: #555;
    display: block;
    margin-bottom: 4px;
}

.block-details ul {
    list-style-type: none;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.block-details ul li {
    position: relative;
    padding-left: 12px;
    line-height: 1.4;
    font-weight: 700;
}

.block-details ul li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--wood-color);
    font-weight: bold;
}

/* 頁尾 */
.guide-footer {
    display: flex;
    justify-content: center;
    margin: 10px 0;
}

/* RWD 響應式調整 */
@media (max-width: 768px) {
    .cultivation-quote {
        margin: 15px auto 0 auto;
        text-align: center;
        max-width: 90%;
        font-size: 12px;
        line-height: 1.6;
    }
    
    #floating-guide-btn {
        bottom: 90px;
        right: 20px;
        width: 60px;
        height: 60px;
        font-size: 28px;
        padding: 0;
        border-radius: 50% !important;
        justify-content: center;
    }
    
    #floating-guide-btn .guide-btn-text {
        display: none;
    }
    
    .guide-content {
        height: 90vh;
        width: 92%;
    }
    
    .guide-inner {
        padding: 20px 15px;
        gap: 20px;
    }
    
    .guide-header h2 {
        font-size: 22px;
    }
    
    .guide-intro {
        font-size: 13px;
    }
    
    .guide-master-section {
        flex-direction: column;
        text-align: center;
        gap: 12px;
        padding: 12px;
    }
    
    .master-bubble .bubble-arrow {
        left: calc(50% - 10px);
        top: -14px;
        border-left: 10px solid transparent;
        border-right: 10px solid transparent;
        border-bottom: 14px solid var(--cartoon-border);
        border-top: none;
        width: 0;
        height: 0;
    }
    
    .master-bubble .bubble-arrow::after {
        left: -8px;
        top: 4px;
        border-left: 8px solid transparent;
        border-right: 8px solid transparent;
        border-bottom: 10px solid #FFF;
        border-top: none;
    }
    
    .top-row .guide-block, .bottom-row .guide-block {
        flex: 1 1 100%;
        max-width: 100%;
    }
}
