#lockScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
    radial-gradient(
        circle at 50% 42%,
        #faf9f5 0%,
        #f5f3ed 58%,
        #efede6 100%
    );

    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 7vh;
}

.lockBox {
    width: 350px;
    max-width: calc(100vw - 36px);
    text-align: center;
}
.lockIcon {
    font-size: 42px;
    margin-bottom: 12px;
}

.lockBox input {
    width: 100%;
    padding: 12px;
    font-size: 18px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
}

.lockBox input:focus {
    outline: none;
    border-color: #9fb5aa;
    box-shadow: 0 0 0 3px rgba(159, 181, 170, 0.18);
}

.lockBox button {
    padding: 12px 25px;
    transition: transform 0.18s ease, filter 0.18s ease;
}

.lockBox button:hover {
    transform: translateY(-1px);
    filter: brightness(0.97);
}

#passwordError {
    margin-top: 15px;
    color: #b55;
}
.lockBrand {
    margin-top: 18px;
    font-size: 13px;
    color: #8a8a82;
    letter-spacing: 0.3px;
}

        * {
            box-sizing: border-box;
        }

        body {
    font-family: Arial, sans-serif;
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
    background: #eef0ec;
    color: #333;
}

        h1 {
            text-align: center;
            margin-bottom: 30px;
        }

  .writing-forest-title {
    margin: 0;

    color: #355c42;
    font-size: 42px;
    font-weight: 700;
}
        button {
            padding: 10px 18px;
            font-size: 15px;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            background: #d8e4dc;
            margin-right: 8px;
        }

        button:hover {
            background: #c5d8cc;
        }

        .new-button {
            display: block;
            margin: 0 auto 30px auto;
            font-size: 17px;
            padding: 12px 25px;
        }
#searchInput {
    display: block;
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 20px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 8px;
    outline: none;
}

#searchInput:focus {
    border-color: #9bb5a5;
}
        .article-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .article-card {
            background: white;
            padding: 18px 20px;
            border-radius: 10px;
            cursor: pointer;
            border: 1px solid #ddd;
        }

        .article-card:hover {
            background: #fafafa;
        }

        .article-title {
            font-size: 20px;
            font-weight: bold;
            margin-bottom: 8px;
        }

        .article-date {
            font-size: 13px;
            color: #888;
        }

        .empty {
            text-align: center;
            color: #888;
            margin-top: 50px;
        }

        #editor {
            display: none;
        }

        #title {
            width: 100%;
            font-size: 26px;
            padding: 12px;
            margin-bottom: 15px;
            border: 1px solid #ccc;
            border-radius: 8px;
        }

        #content {
            width: 100%;
            height: 500px;
            font-size: 18px;
            line-height: 1.8;
            padding: 15px;
            border: 1px solid #ccc;
            border-radius: 8px;
            resize: vertical;
        }

        .top-buttons {
            margin-bottom: 15px;
        }

        /* Writing Forest｜Desktop 書架文章卡稍微收緊，保留每篇文章作為一棵樹的卡片感。 */
@media (min-width: 681px) {
    #writingForestView .article-card {
        padding: 14px 18px;
    }
}

        @media (max-width: 768px) {
    .top-buttons {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin-bottom: 18px;
    }

    .top-buttons button {
        width: 100%;
        margin: 0;
        box-sizing: border-box;
    }

    #editorMoreMenu:not([hidden]) {
    display: contents;
}
}

        #saveStatus {
            margin-top: 10px;
            color: #777;
            font-size: 14px;
        }
#wordCount {
    margin-top: 5px;
    color: #999;
    
    font-size: 14px;
}
/* =========================
   深夜写作模式
   ========================= */

body.night-mode {
    background: #202321;
    color: #eeeeee;
}

body.night-mode h1 {
    color: #eeeeee;
}

body.night-mode button {
    background: #343936;
    color: #eeeeee;
}

body.night-mode button:hover {
    background: #454b47;
}

/* Wealth Forest｜流水編輯入口在 Night Mode 保持輕量。 */
body.night-mode .wealth-ledger-edit-button {
    background: transparent;
    box-shadow: none;
}

body.night-mode .wealth-ledger-edit-button:hover {
    background: rgba(255, 255, 255, 0.06);
}

/* Writing Forest｜更多按鈕深夜模式 */
body.night-mode .forest-more-tools summary {
    background: #343936;
    color: #eeeeee;
}

body.night-mode .forest-more-tools summary:hover {
    background: #454b47;
}

body.night-mode #title,
body.night-mode #content {
    background: #292d2b;
    color: #eeeeee;
    border-color: #555;
}

body.night-mode #title::placeholder,
body.night-mode #content::placeholder {
    color: #999;
}

body.night-mode #saveStatus,
body.night-mode #wordCount {
    color: #aaa;
}

body.night-mode .article-card {
    background: #292d2b;
    color: #eeeeee;
    border-color: #444;
}

body.night-mode .article-card:hover {
    background: #343936;
}

body.night-mode .article-date {
    color: #aaa;
}

body.night-mode .empty {
    color: #aaa;
}

body.night-mode #searchInput {
    background: #292d2b;
    color: #eeeeee;
    border-color: #555;
}
/* =========================
   专注写作模式
   ========================= */

body.focus-mode {
    max-width: 100%;
    padding: 0;
}

body.focus-mode #app {
    width: 100%;
}

body.focus-mode #home {
    display: none !important;
}

body.focus-mode #editor {
    display: block !important;
    max-width: 900px;
    margin: 0 auto;
    padding: 50px 30px;
}

body.focus-mode .top-buttons {
    opacity: 0.5;
}

body.focus-mode #title {
    border: none;
    background: transparent;
    font-size: 32px;
    padding-left: 0;
}

body.focus-mode #content {
    border: none;
    background: transparent;
    padding-left: 0;
    padding-right: 0;
    height: 70vh;
    outline: none;
}

body.focus-mode #title:focus {
    outline: none;
}
body.night-mode #searchInput::placeholder {
    color: #999;
    }
    /* 夜間模式 */
body.dark-mode {
    background: #1e1e1e;
    color: #f5f5f5;
}

body.dark-mode .container,
body.dark-mode .sidebar,
body.dark-mode .editor,
body.dark-mode .article-item,
body.dark-mode .continue-writing {
    background: #2b2b2b;
    color: #f5f5f5;
}

body.dark-mode input,
body.dark-mode textarea {
    background: #383838;
    color: #f5f5f5;
    border-color: #666;
}

body.dark-mode button {
    color: #f5f5f5;
}

body.dark-mode .article-item {
    border-color: #555;
}
/* ===== 夜間模式 ===== */

body.night-mode {
    background-color: #1f1f1f;
    color: #f5f5f5;
}

body.night-mode #app {
    background-color: #1f1f1f;
    color: #f5f5f5;
}

body.night-mode .sidebar,
body.night-mode .editor,
body.night-mode .article-item,
body.night-mode .forest-more-tools-menu {
    background-color: #2d2d2d;
}
body.night-mode .continue-writing {
    background-color: #2d2d2d;
    color: #f5f5f5;
}

body.night-mode input,
body.night-mode textarea {
    background-color: #383838;
    color: #f5f5f5;
    border-color: #666;
}

body.night-mode #lockScreen h1,
body.night-mode #lockScreen h2,
body.night-mode #lockScreen h3,
body.night-mode #lockScreen p,
body.night-mode #lockScreen span,
body.night-mode #lockScreen label {
    color: #2f6047;
}
body.night-mode .forest-reminder-complete,
body.dark .forest-reminder-complete {
    border-color: rgba(176, 211, 180, 0.16);
    background: rgba(113, 157, 118, 0.14);
    color: #cde2cf;
}

body.night-mode .forest-reminder-complete:hover,
body.dark .forest-reminder-complete:hover {
    background: rgba(113, 157, 118, 0.22);
}
/* ===== Supabase 登入畫面 ===== */

#authScreen {
    position: fixed;
    inset: 0;
    z-index: 10000;

    display: flex;
    justify-content: center;
    align-items: center;

    background: #f5f3ed;
}

.auth-box {
    width: min(360px, calc(100% - 40px));
    padding: 36px;

    background: white;
    border-radius: 20px;

    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.12);
    text-align: center;
}

.auth-icon {
    margin-bottom: 10px;
    font-size: 48px;
}

.auth-box h1 {
    margin: 0 0 10px;
}

.auth-box p {
    margin: 0 0 24px;
    color: #666;
}

.auth-box input {
    box-sizing: border-box;
    width: 100%;
    margin-bottom: 12px;
    padding: 12px 14px;

    border: 1px solid #ccc;
    border-radius: 10px;
    font-size: 16px;
}

.auth-box button {
    width: 100%;
    padding: 12px;

    border: none;
    border-radius: 10px;
    cursor: pointer;
}

#authMessage {
    min-height: 22px;
    margin-top: 14px;
    font-size: 14px;
}

#authMessage.error {
    color: #b42318;
}

#authMessage.success {
    color: #287a3e;
}
.forest-info{

    background:#f7fbf7;

    border-radius:16px;

    padding:18px;

    margin-bottom:18px;

    border:1px solid #dfeee0;

}

.forest-info div{

    margin:8px 0;

    font-size:15px;

}
/* ========================================
   森林資訊卡
======================================== */

/* ========================================
   森林首頁資訊區
======================================== */

/* 森林今日低語 */

.forest-whisper {

    position: relative;

    margin-bottom: 18px;
    padding: 24px 22px;

    overflow: hidden;

    background:
        linear-gradient(
            135deg,
            #f1f7f1,
            #f8fbf7
        );

    border: 1px solid #dcebdd;
    border-radius: 18px;

}

.forest-whisper::after {

    content: "🍃";

    position: absolute;
    right: 18px;
    bottom: 10px;

    font-size: 42px;
    opacity: 0.12;

    pointer-events: none;

}

.whisper-heading {

    margin-bottom: 12px;

    color: #5b7561;

    font-size: 14px;
    font-weight: bold;
    letter-spacing: 1px;

}

.whisper-message {

    position: relative;
    z-index: 1;

    color: #344b39;

    font-size: 18px;
    line-height: 1.8;

}

/* ========================================
   Forest OS Home｜Living Desktop 主區
   Version 6.5
======================================== */

.forest-home-primary-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 1.7fr)
        minmax(280px, 0.8fr);

    gap: 18px;

    align-items: start;

    max-width: 1100px;
    margin: 0 auto 22px;
    padding: 0 24px;

    box-sizing: border-box;
}

/* ========================================
   Forest OS Home｜Living Desktop 右側資訊
   Version 6.5
======================================== */

.forest-home-side-stack {
    display: grid;
    gap: 14px;

    align-content: start;
}

.forest-home-side-stack .forest-whisper {
    margin-bottom: 0;
}

.forest-home-side-stack .forest-clock-grid {
    grid-template-columns: 1fr;

    gap: 12px;
    margin-top: 0;
}

/* 進入 Bento 後，由 grid 統一管理間距 */
.forest-home-primary-grid
.forest-home-hero,
.forest-home-primary-grid
.forest-whisper {
    margin-bottom: 0;
}

/* 森林狀態卡 */

.forest-info {

    margin-bottom: 18px;
    padding: 18px 20px;

    background: #ffffff;

    border: 1px solid #e1e9e2;
    border-radius: 16px;

}

.forest-title {

    margin: 0 0 14px;
    padding-bottom: 10px;

    color: #4e6b55;

    font-size: 17px;
    font-weight: bold;

    border-bottom: 1px solid #e7eee8;

}

.forest-info div {

    margin: 8px 0;

    color: #4b554d;

    font-size: 15px;
    line-height: 1.7;

}


/* 夜間模式 */

body.night-mode .forest-whisper {

    background:
        linear-gradient(
            135deg,
            #28312b,
            #242a26
        );

    border-color: #3d4a41;

}

body.night-mode .whisper-heading {

    color: #a9c0ae;

}

body.night-mode .whisper-message {

    color: #edf4ef;

}

body.night-mode .forest-info {

    background: #292d2b;
    border-color: #414944;

}

body.night-mode .forest-title {

    color: #c4d7c8;
    border-bottom-color: #414944;

}

body.night-mode .forest-info div {

    color: #e4e9e5;

}

body.night-mode .forest-info .forest-journal-label {
    color: #56735b;
}

body.night-mode .forest-info .forest-journal-title {
    color: #334d39;
}

body.night-mode .forest-info .forest-journal-time {
    color: rgba(82, 103, 87, 0.62);
}

/* ========================================
   森林入口
======================================== */

.forest-hero {

    text-align: center;

    padding: 10px 20px 24px;

}

.forest-hero {
    text-align: center;
    padding: 0 20px 8px;
    transform: translateX(24px);
}

.forest-logo {
    display: none;
}

.forest-name {
    margin: 16px 0 0;

    color: #718078;

    font-size: 17px;
    font-weight: 400;
    line-height: 1.8;
    letter-spacing: 0;
}

.forest-greeting {

    margin-top: 18px;

    color: #526b58;

    font-size: 17px;
    line-height: 1.7;

}

.forest-slogan {

    margin: 12px 0 0;

    color: #7a897d;

    font-size: 16px;
    line-height: 1.8;

}


/* 夜間模式 */

body.night-mode .forest-name {

    color: #edf4ef;

}

body.night-mode .forest-greeting {

    color: #d5e2d8;

}

body.night-mode .forest-slogan {

    color: #aebcb1;

}
/* ========================================
   森林回聲
======================================== */

.forest-echo{

    background:#fcfdf9;

    border:1px solid #e5eee2;

    border-radius:16px;

    padding:22px;

    margin-bottom:18px;

}

.echo-heading{

    font-weight:700;

    color:#46624b;

    margin-bottom:14px;

}

.echo-text{

    margin:0;

    font-size:18px;

    line-height:1.9;

    color:#35443a;

    font-style:italic;

    opacity:0;

    transform:translateY(10px);

    transition:all .8s ease;

}

.echo-text.show{

    opacity:1;

    transform:translateY(0);

}

.echo-source{

    margin-top:16px;

    text-align:right;

    color:#7b8c7d;

    font-size:14px;

}

body.night-mode .forest-echo{

    background:#27302b;

    border-color:#39463d;

}

body.night-mode .echo-heading{

    color:#dce8de;

}

body.night-mode .echo-text {
    color: #3f5243;
}

body.night-mode .echo-source{

    color:#aab8ad;

}
/* ===== 森林回聲 ===== */

.echo-heading{
    font-size:22px;
    font-weight:bold;
    color:#3b6b48;
    margin-top:30px;
}

.echo-text{
    margin-top:15px;
    padding:20px;
    border-left:5px solid #8bbf92;
    background:#f7fbf7;
    border-radius:12px;
    font-style:italic;
    line-height:1.8;
    color:#444;
    transition:0.4s;
}

.echo-source{
    margin-top:10px;
    text-align:right;
    color:#777;
    font-size:14px;
}

body.night-mode .forest-home-title {
    color: #3f6048;
}

/* ===== 文字森林｜繼續寫作 + 森林回聲 ===== */

.writing-top-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 24px;
    align-items: stretch;

    margin: 20px 0 34px;
}

.writing-top-row > #continueWriting,
.writing-top-row > .forest-echo {
    min-width: 0;
    margin: 0;
}

.writing-top-row .continue-box,
.writing-top-row .forest-echo {
    height: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .writing-top-row {
        grid-template-columns: 1fr;
        gap: 18px;
    }
}

/* ========================================
   文章年輪視窗
======================================== */

.version-modal {

    display: none;

    position: fixed;
    inset: 0;

    z-index: 1000;

    padding: 30px 18px;

    background: rgba(30, 45, 35, 0.55);

    overflow-y: auto;

}

.version-modal.show {

    display: block;

}

.version-modal-content {

    width: min(720px, 100%);

    margin: 40px auto;

    padding: 24px;

    border-radius: 18px;

    background: #fffdf8;

    box-shadow: 0 18px 50px rgba(30, 50, 35, 0.2);

}

.version-modal-header {

    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 20px;

}

.version-modal-header h2 {

    margin: 0;

    color: #35523b;

}

.version-close-button {

    border: none;

    background: transparent;

    font-size: 22px;
    cursor: pointer;

}

/* Writing Forest｜森林日誌只保留今日摘要 */
#forestWriting,
#forestWeek,
#forestLast {
    display: none;
}

.forest-journal-timeline {
    grid-template-columns: 1fr;
}

/* Writing Forest｜森林近況 Desktop */
.forest-overview-grid {
    display: grid;
    grid-template-columns: minmax(180px, 0.55fr) minmax(0, 2fr);
    gap: 40px;
    align-items: start;
}

@media (min-width: 769px) {
    .forest-overview-grid .forest-journal-timeline {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* Mobile 回到上下排列 */
@media (max-width: 680px) {
    .forest-overview-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Writing Forest｜森林近況合併後收掉舊卡片留白 */
.forest-overview-grid .forest-journal-timeline {
    margin-top: 0;
    padding: 0;
    border-left: none;
}

.forest-overview-grid #forestToday::before {
    display: none;
}

.forest-overview-grid .forest-activity-list {
    margin-top: 0;
}

/* ========================================
   Version 3.4｜Forest Confirm Modal
======================================== */

.forest-confirm-content {
    width: min(460px, 100%);
}

.forest-confirm-message {
    color: #5f6f64;
    font-size: 15px;
    line-height: 1.8;

    margin-bottom: 24px;
}

.forest-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.forest-confirm-actions button {
    padding: 10px 16px;

    border-radius: 10px;
    border: 1px solid #d6e0d8;

    cursor: pointer;
}

#cancelForestConfirmButton {
    background: transparent;
    color: #5f6f64;
}

#confirmForestRestoreButton {
    border-color: #4f805f;

    background: #4f805f;
    color: #ffffff;

    #forestConfirmModal {
    z-index: 1100;
}
}

#confirmForestRestoreButton:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.85);
    outline-offset: 3px;
}

.forest-confirm-shortcuts {
    margin-top: 14px;
    text-align: right;
    font-size: 12px;
    color: rgba(95, 111, 100, 0.62);
}

.version-card {

    margin-bottom: 18px;

    padding: 18px;

    border: 1px solid #e0e8df;
    border-radius: 14px;

    background: #f8fbf7;

}

.version-card:last-child {

    margin-bottom: 0;

}

.version-card-title {

    margin-bottom: 8px;

    font-weight: 700;

    color: #3f5e46;

}

.version-card-date {

    margin-bottom: 12px;

    font-size: 13px;

    color: #819084;

}

.version-card-content {

    white-space: pre-wrap;

    line-height: 1.7;

    color: #3d463f;

}

.version-empty {

    padding: 30px 10px;

    text-align: center;

    color: #7e8c80;

}


/* 夜間模式 */

body.night-mode .version-modal-content {

    background: #242d27;

}

body.night-mode .version-modal-header h2 {

    color: #edf4ef;

}

body.night-mode .version-card {

    border-color: #3d4b41;

    background: #2d3831;

}

body.night-mode .version-card-title,
body.night-mode .version-card-content {

    color: #edf4ef;

}

body.night-mode .version-card-date,
body.night-mode .version-empty {

    color: #aebbb1;

}
.version-restore-button{

    margin-top:16px;

    padding:10px 16px;

    border:none;

    border-radius:10px;

    background:#4f7d58;

    color:white;

    cursor:pointer;

}

.version-restore-button:hover{

    opacity:.9;

}
/* ========================================
   Forest Home：森林生長統計
======================================== */

.forest-growth {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin: 20px 0 34px;

    padding: 28px 24px 22px;
    border: 1px solid #d8e3d7;
    border-radius: 28px;
    background: rgba(247, 250, 245, 0.96);
    box-shadow: 0 10px 24px rgba(57, 85, 63, 0.05);
}


.growth-card {
    padding: 18px;
    text-align: center;

    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;

    transition: none;
}

.growth-week-card {
      display: none;
    grid-column: 1 / -1;

    padding: 22px 24px;
    border: 1px solid #dfe8de;
    border-radius: 22px;
    background: rgba(252, 253, 250, 0.94);
    box-shadow: none;
}

.growth-week-title {
    margin-bottom: 18px;

    color: #3f664b;
    font-size: 0.95rem;
    font-weight: 700;
}

.growth-week-stats {
    display: grid;

    grid-template-columns:
    repeat(2, minmax(0, 1fr));

    gap: 16px;
}

.growth-week-item {
    text-align: center;
}

.growth-week-label {
    margin-bottom: 7px;

    color: #7b8f80;
    font-size: 0.82rem;
}

.growth-week-value {
    color: #356043;
    font-size: 1.35rem;
    font-weight: 700;
}

.growth-week-unit {
    margin-left: 3px;

    color: #8c9b90;
    font-size: 0.72rem;
    font-weight: 400;
}


.growth-card:hover {
    transform: none;
    box-shadow: none;
}


.growth-icon {

    margin-bottom: 10px;

    font-size: 30px;

}


.growth-label {

    margin-bottom: 12px;

    font-size: 15px;

    color: #6f8173;

}


.growth-number {

    font-size: 34px;

    font-weight: 700;

    line-height: 1;

    color: #345d3f;

}


.growth-unit {

    margin-top: 9px;

    font-size: 13px;

    color: #87948a;

}


/* 夜間模式 */

body.night-mode .growth-card {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
}

body.night-mode .forest-growth {
    border-color: #3b4b40;
    background: #29342d;
    border-radius: 22px;
    box-shadow:
        0 10px 26px
        rgba(0, 0, 0, 0.2);
}

body.night-mode .growth-overview-title {
    color: #aebbb1;
}

body.night-mode .growth-week-card {
    border-color: #3b4b40;
    background: transparent;
    box-shadow: none;
}

body.night-mode .growth-week-title,
body.night-mode .growth-week-label,
body.night-mode .growth-week-unit {
    color: #aebbb1;
}

body.night-mode .growth-week-value {
    color: #e5f0e7;
}


body.night-mode .growth-label,
body.night-mode .growth-unit {

    color: #aebbb1;

}


body.night-mode .growth-number {

    color: #e5f0e7;

}


/* 小螢幕 */

@media (max-width: 720px) {

    .forest-growth {

        grid-template-columns: 1fr;

    }

    .growth-week-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 12px;
}

.writing-forest-title {
    margin-top: 28px;
}

}

/* 財富森林｜月度流水 Mobile */
.wealth-monthly-ledger-table-wrap {
    margin-top: 16px;
    overflow-x: visible;
}

.wealth-monthly-ledger-table {
    width: 100%;
    min-width: 0;
}

/* 手機不再顯示桌面三欄標題 */
.wealth-monthly-ledger-table thead {
    display: none;
}

.wealth-monthly-ledger-table tbody {
    display: block;
    width: 100%;
}

/* 一般流水：項目＋金額第一層，分類第二層 */
.wealth-monthly-ledger-table tbody tr:not(.wealth-ledger-date-row):not(.wealth-ledger-daily-total) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "content amount"
        "category amount";

    column-gap: 12px;
    row-gap: 4px;

    padding: 12px 0;
    border-bottom: 1px solid rgba(79, 128, 95, 0.12);
}

.wealth-monthly-ledger-table tbody tr:not(.wealth-ledger-date-row):not(.wealth-ledger-daily-total) td {
    padding: 0;
    border: 0;
}

.wealth-monthly-ledger-table tbody tr:not(.wealth-ledger-date-row):not(.wealth-ledger-daily-total) td:nth-child(1) {
    grid-area: content;
}

.wealth-monthly-ledger-table tbody tr:not(.wealth-ledger-date-row):not(.wealth-ledger-daily-total) td:nth-child(2) {
    grid-area: category;

    color: #718078;
    font-size: 13px;
}

.wealth-monthly-ledger-table tbody tr:not(.wealth-ledger-date-row):not(.wealth-ledger-daily-total) td:nth-child(3) {
    grid-area: amount;

    align-self: center;
    text-align: right;
    white-space: nowrap;
}

/* 日期仍然獨立成一行 */
.wealth-ledger-date-row {
    display: block;
}

.wealth-ledger-date-row td {
    display: block;
    width: 100%;

    padding-top: 18px;
    padding-bottom: 8px;
}

/* 當日小計：左文字、右金額 */
.wealth-ledger-daily-total {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.wealth-ledger-daily-total td {
    display: block;
}

.wealth-ledger-daily-total td:last-child {
    text-align: right;
    white-space: nowrap;
}

/* Wealth Forest｜當日小計作為日期區段的輕量收尾。 */
.wealth-ledger-daily-total {
    padding-top: 7px;
}

.wealth-ledger-daily-total td:first-child {
    color: #7f8b84;
    font-size: 0.86rem;
    font-weight: 600;
}

.wealth-ledger-daily-total td:last-child {
    font-size: 0.9rem;
    font-weight: 650;
}

/* ========================================
   Forest Home：森林最近活動
======================================== */

.forest-activity {

    margin: 28px 0;

    padding: 24px;

    border: 1px solid #e2ebe3;

    border-radius: 22px;

    background:
        rgba(250, 253, 249, 0.9);

    box-shadow:
        0 10px 26px
        rgba(57, 85, 63, 0.06);

}


.forest-activity-list {

    position: relative;

    margin-top: 18px;

    padding-left: 24px;

}


.forest-activity-list::before {

    content: "";

    position: absolute;

    top: 6px;

    bottom: 6px;

    left: 7px;

    width: 2px;

    border-radius: 999px;

    background: #dce8de;

}


.forest-activity-item {

    position: relative;

    padding:
        0 0 12px 18px;

}


.forest-activity-item:last-child {

    padding-bottom: 0;

}


.forest-activity-item::before {

    content: "";

    position: absolute;

    top: 6px;

    left: -22px;

    width: 10px;

    height: 10px;

    border: 3px solid #f8fbf8;

    border-radius: 50%;

    background: #6f9375;

    box-shadow:
        0 0 0 1px #cbdccc;

}


.forest-activity-time {

    margin-bottom: 5px;

    font-size: 12px;

    color: #8a978c;

}


.forest-activity-text {

    font-size: 15px;

    line-height: 1.6;

    color: #4e6252;

}


.forest-activity-empty {

    padding: 10px 0;

    font-size: 14px;

    color: #8a978c;

}


/* 夜間模式 */

body.night-mode .forest-activity {

    border-color: #3b4b40;

    background: #29342d;

    box-shadow:
        0 10px 26px
        rgba(0, 0, 0, 0.2);

}


body.night-mode
.forest-activity-list::before {

    background: #435549;

}


body.night-mode
.forest-activity-item::before {

    border-color: #29342d;

    background: #9fbea5;

    box-shadow:
        0 0 0 1px #55695a;

}


body.night-mode
.forest-activity-time,
body.night-mode
.forest-activity-empty {

    color: #aab6ad;

}


body.night-mode
.forest-activity-text {

    color: #d8e3da;

}
/* 森林活動：可點擊文章入口 */

button.forest-activity-item {

    display: block;

    width: 100%;

    border: 0;

    background: transparent;

    font-family: inherit;

    text-align: left;

    cursor: pointer;

}


button.forest-activity-item:hover
.forest-activity-text {

    color: #345d3f;

}


button.forest-activity-item:focus-visible {

    outline: 2px solid #8eaa93;

    outline-offset: 5px;

    border-radius: 10px;

}


body.night-mode
button.forest-activity-item:hover
.forest-activity-text {

    color: #eef7ef;

}
/* ========================================
   Forest Planner：森林行程
======================================== */

.forest-planner {

    max-width: 1080px;

    margin: 0 auto;

    padding: 36px 24px 60px;

}


.planner-header {

    display: flex;

    align-items: flex-start;

    gap: 22px;

    margin-bottom: 28px;

}


.planner-back-button {

    flex-shrink: 0;

    padding: 10px 16px;

    border: 1px solid #d9e6db;

    border-radius: 999px;

    background: #f8fbf8;

    color: #47634d;

    cursor: pointer;

}


.planner-kicker {

    margin-bottom: 6px;

    font-size: 13px;

    letter-spacing: 0.12em;

    text-transform: uppercase;

    color: #8a9a8d;

}


.planner-title {

    margin: 0;

    font-size: 32px;

    color: #31583b;

}


.planner-subtitle {

    margin: 10px 0 0;

    line-height: 1.7;

    color: #718075;

}


.planner-form-card,
.planner-list-card {

    margin-bottom: 26px;

    padding: 26px;

    border: 1px solid #e0e9e1;

    border-radius: 24px;

    background:
        rgba(250, 253, 249, 0.94);

    box-shadow:
        0 12px 30px
        rgba(55, 82, 61, 0.07);

}


.planner-form-card h3,
.planner-list-card h3 {

    margin-top: 0;

    color: #3e6447;

}


.planner-form-grid {

    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 18px;

}


.planner-field {

    display: flex;

    flex-direction: column;

    gap: 8px;

}


.planner-field span {

    font-size: 14px;

    color: #68786b;

}


.planner-field input,
.planner-field select,
.planner-field textarea {

    width: 100%;

    box-sizing: border-box;

    padding: 12px 14px;

    border: 1px solid #dce6dd;

    border-radius: 14px;

    background: #ffffff;

    font: inherit;

    color: #344d39;

}


.planner-field textarea {

    resize: vertical;

}


.planner-field-wide {

    grid-column: 1 / -1;

}


.planner-save-button {

    margin-top: 20px;

    padding: 12px 20px;

    border: 0;

    border-radius: 999px;

    background: #5f8767;

    color: #ffffff;

    font: inherit;

    cursor: pointer;

}


.planner-save-button:hover {

    transform: translateY(-1px);

}


.planner-empty {

    padding: 24px 10px;

    text-align: center;

    color: #8b978d;

}


/* 夜間模式 */

body.night-mode .forest-planner {

    color: #dce6de;

}


body.night-mode
.planner-form-card,
body.night-mode
.planner-list-card {

    border-color: #3c4c41;

    background: #29342d;

}


body.night-mode
.planner-title,
body.night-mode
.planner-form-card h3,
body.night-mode
.planner-list-card h3 {

    color: #e4efe6;

}


body.night-mode
.planner-subtitle,
body.night-mode
.planner-field span,
body.night-mode
.planner-empty {

    color: #abb7ae;

}


body.night-mode
.planner-field input,
body.night-mode
.planner-field select,
body.night-mode
.planner-field textarea {

    border-color: #48594d;

    background: #1f2923;

    color: #e5eee7;

}


body.night-mode
.planner-back-button {

    border-color: #46564a;

    background: #273129;

    color: #dfe9e1;

}


/* 小螢幕 */

@media (max-width: 720px) {

    .forest-planner {

        padding:
            24px 16px 44px;

    }


    .planner-header {

        flex-direction: column;

    }


    .planner-form-grid {

        grid-template-columns: 1fr;

    }


    .planner-field-wide {

        grid-column: auto;

    }

}
/* Forest Planner：行程卡操作 */

.planner-event-card {

    margin-bottom: 16px;

    padding: 20px;

    border: 1px solid #e0e9e1;

    border-radius: 18px;

    background: #ffffff;

}


.planner-event-top {

    display: flex;

    justify-content: space-between;

    gap: 14px;

    margin-bottom: 12px;

}


.planner-event-type,
.planner-event-date,
.planner-event-time {

    font-size: 14px;

    color: #718075;

}


.planner-event-title {

    margin-bottom: 8px;

    font-size: 19px;

    font-weight: 700;

    color: #35583d;

}


.planner-event-notes {

    margin-top: 10px;

    line-height: 1.7;

    color: #667469;

}


.planner-event-actions {

    display: flex;

    gap: 10px;

    margin-top: 16px;

}


.planner-event-actions button {

    padding: 8px 14px;

    border: 1px solid #dbe5dc;

    border-radius: 999px;

    background: #f7faf7;

    color: #526a57;

    font: inherit;

    cursor: pointer;

}


.planner-event-actions button:hover {

    background: #edf4ee;

}


body.night-mode
.planner-event-card {

    border-color: #405046;

    background: #202a24;

}


body.night-mode
.planner-event-title {

    color: #e3eee5;

}


body.night-mode
.planner-event-type,
body.night-mode
.planner-event-date,
body.night-mode
.planner-event-time,
body.night-mode
.planner-event-notes {

    color: #acb8af;

}


body.night-mode
.planner-event-actions button {

    border-color: #46574b;

    background: #2a352e;

    color: #dce6de;

}
/* ========================================
   Forest Home：接下來的行程
======================================== */

.forest-upcoming {

    margin: 28px 0;

    padding: 24px;

    border: 1px solid #e0e9e1;

    border-radius: 22px;

    background:
        rgba(250, 253, 249, 0.92);

    box-shadow:
        0 10px 26px
        rgba(57, 85, 63, 0.06);

}


.forest-upcoming-header {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 16px;

    margin-bottom: 18px;

}


.forest-upcoming-header
.forest-title {

    margin: 0;

}


.forest-upcoming-more {

    padding: 8px 13px;

    border: 1px solid #dce6dd;

    border-radius: 999px;

    background: #f7faf7;

    color: #56705c;

    font: inherit;

    font-size: 13px;

    cursor: pointer;

}


.forest-upcoming-more:hover {

    background: #edf4ee;

}


.forest-upcoming-item {

    display: flex;

    align-items: center;

    gap: 16px;

    width: 100%;

    padding: 15px 4px;

   border: 1px solid rgba(79, 128, 95, 0.14);
border-radius: 12px;

background: transparent;

    font: inherit;

    text-align: left;

    cursor: pointer;

}

.forest-upcoming-item + .forest-upcoming-item {
    margin-top: 8px;
}


.forest-upcoming-item:hover
.forest-upcoming-title {

    color: #31583b;

}


.forest-upcoming-date {

    flex-shrink: 0;

    min-width: 88px;

    font-size: 13px;

    line-height: 1.5;

    color: #849087;

}


.forest-upcoming-content {

    min-width: 0;

}


.forest-upcoming-title {

    overflow: hidden;

    font-size: 15px;

    font-weight: 600;

    color: #4a6250;

    text-overflow: ellipsis;

    white-space: nowrap;

}


.forest-upcoming-meta {

    margin-top: 4px;

    font-size: 13px;

    color: #89958b;

}


.forest-upcoming-empty {

    padding: 18px 4px;

    text-align: center;

    font-size: 14px;

    color: #8a978c;

}


/* 夜間模式 */

body.night-mode
.forest-upcoming {

    border-color: #3b4b40;

    background: #29342d;

    box-shadow:
        0 10px 26px
        rgba(0, 0, 0, 0.2);

}


body.night-mode
.forest-upcoming-more {

    border-color: #46564a;

    background: #263129;

    color: #dbe6dd;

}


body.night-mode
.forest-upcoming-more:hover {

    background: #334037;

}


body.night-mode
.forest-upcoming-item {

    border-bottom-color: #39473e;

}


body.night-mode
.forest-upcoming-title {

    color: #dce7de;

}


body.night-mode
.forest-upcoming-item:hover
.forest-upcoming-title {

    color: #f0f7f1;

}


body.night-mode
.forest-upcoming-date,
body.night-mode
.forest-upcoming-meta,
body.night-mode
.forest-upcoming-empty {

    color: #aab6ad;

}


/* 小螢幕 */

@media (max-width: 620px) {

    .forest-upcoming {

        padding: 20px;

    }


    .forest-upcoming-item {

        align-items: flex-start;

        flex-direction: column;

        gap: 6px;

    }


    .forest-upcoming-date {

        min-width: 0;

    }

}
/* ========================================
   Planner：重複行程設定
======================================== */

.planner-repeat-card {
    margin-top: 4px;
    padding: 18px;
    border: 1px solid rgba(82, 115, 86, 0.18);
    border-radius: 18px;
    background: rgba(245, 249, 243, 0.72);
}

.planner-repeat-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.planner-repeat-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.planner-repeat-switch {
    position: relative;
    flex-shrink: 0;
    width: 46px;
    height: 26px;
    border-radius: 999px;
    background: rgba(99, 112, 99, 0.28);
    transition:
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.planner-repeat-switch::after {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 2px 6px rgba(43, 61, 45, 0.2);
    transition: transform 0.2s ease;
}

#plannerRepeatEnabled:checked
    + .planner-repeat-switch {
    background: #6f9272;
}

#plannerRepeatEnabled:checked
    + .planner-repeat-switch::after {
    transform: translateX(20px);
}

#plannerRepeatEnabled:focus-visible
    + .planner-repeat-switch {
    box-shadow:
        0 0 0 3px rgba(111, 146, 114, 0.22);
}

.planner-repeat-toggle-text {
    font-weight: 650;
    color: #405643;
}

.planner-repeat-settings {
    display: none;
    margin-top: 18px;
    padding-top: 17px;
    border-top: 1px dashed rgba(82, 115, 86, 0.25);
}

.planner-repeat-toggle:has(
    #plannerRepeatEnabled:checked
) + .planner-repeat-settings {
    display: block;
}

.planner-repeat-intro {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 15px;
    color: #526b55;
}

.planner-repeat-intro span {
    font-size: 0.88rem;
    opacity: 0.8;
}

.planner-repeat-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 15px;
}

.planner-repeat-interval {
    display: grid;
    grid-template-columns:
        auto minmax(70px, 1fr) auto;
    align-items: center;
    gap: 9px;
}

.planner-repeat-interval span {
    color: #667568;
    font-size: 0.92rem;
}

.planner-repeat-interval input {
    width: 100%;
}


/* 夜間模式 */

body.night-mode .planner-repeat-card,
body.dark .planner-repeat-card {
    border-color: rgba(190, 215, 192, 0.15);
    background: rgba(35, 50, 38, 0.62);
}

body.night-mode .planner-repeat-toggle-text,
body.dark .planner-repeat-toggle-text {
    color: #d4e3d5;
}

body.night-mode .planner-repeat-settings,
body.dark .planner-repeat-settings {
    border-top-color: rgba(190, 215, 192, 0.18);
}

body.night-mode .planner-repeat-intro,
body.dark .planner-repeat-intro,
body.night-mode .planner-repeat-interval span,
body.dark .planner-repeat-interval span {
    color: #c4d4c6;
}


/* 手機版 */

@media (max-width: 680px) {

    .planner-repeat-card {
        padding: 15px;
    }

    .planner-repeat-grid {
        grid-template-columns: 1fr;
    }

}
/* ========================================
   Planner：重複系列主卡
======================================== */

.planner-series-card {
    border-left:
        4px solid
        rgba(103, 143, 107, 0.7);
}

.planner-event-repeat {
    margin-top: 8px;
    font-size: 0.92rem;
    font-weight: 650;
    color: #55715a;
}

.planner-series-dates {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 13px;
    padding: 12px 14px;
    border-radius: 13px;
    background: rgba(102, 139, 105, 0.08);
    color: #526656;
    font-size: 0.9rem;
    line-height: 1.6;
}

.planner-series-dates-label {
    flex-shrink: 0;
    font-weight: 700;
    color: #607d64;
}

.planner-series-count {
    margin-top: 8px;
    font-size: 0.82rem;
    color: #7a897c;
}


/* 夜間模式 */

body.night-mode .planner-event-repeat,
body.dark .planner-event-repeat {
    color: #c9ddcb;
}

body.night-mode .planner-series-dates,
body.dark .planner-series-dates {
    background: rgba(185, 215, 188, 0.08);
    color: #c8d5ca;
}

body.night-mode .planner-series-dates-label,
body.dark .planner-series-dates-label {
    color: #d8e7da;
}

body.night-mode .planner-series-count,
body.dark .planner-series-count {
    color: #aab9ac;
}
/* ========================================
   Planner：展開全部系列日期
======================================== */

.planner-series-toggle {
    margin-top: 12px;
    padding: 0;
    border: none;
    background: transparent;
    color: #5d7961;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
}

.planner-series-toggle:hover {
    text-decoration: underline;
}

.planner-series-all-dates {
    margin-top: 10px;
    padding: 13px 16px;
    border-radius: 13px;
    background: rgba(102, 139, 105, 0.06);
}

.planner-series-all-dates ol {
    margin: 0;
    padding-left: 22px;
}

.planner-series-all-dates li {
    margin: 6px 0;
    color: #596d5c;
    font-size: 0.88rem;
    line-height: 1.5;
}


/* 夜間模式 */

body.night-mode .planner-series-toggle,
body.dark .planner-series-toggle {
    color: #c9ddcb;
}

body.night-mode .planner-series-all-dates,
body.dark .planner-series-all-dates {
    background: rgba(185, 215, 188, 0.07);
}

body.night-mode .planner-series-all-dates li,
body.dark .planner-series-all-dates li {
    color: #c7d4c9;
}
/* ========================================
   Planner：行程提醒設定
======================================== */

.planner-reminder-card {
    margin-top: 4px;
    padding: 18px;
    border: 1px solid rgba(157, 126, 70, 0.2);
    border-radius: 18px;
    background: rgba(252, 248, 237, 0.76);
}

.planner-reminder-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.planner-reminder-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.planner-reminder-switch {
    position: relative;
    flex-shrink: 0;
    width: 46px;
    height: 26px;
    border-radius: 999px;
    background: rgba(120, 112, 92, 0.28);
    transition:
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.planner-reminder-switch::after {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 2px 6px rgba(65, 55, 35, 0.2);
    transition: transform 0.2s ease;
}

#plannerReminderEnabled:checked
    + .planner-reminder-switch {
    background: #b28b4e;
}

#plannerReminderEnabled:checked
    + .planner-reminder-switch::after {
    transform: translateX(20px);
}

#plannerReminderEnabled:focus-visible
    + .planner-reminder-switch {
    box-shadow:
        0 0 0 3px rgba(178, 139, 78, 0.22);
}

.planner-reminder-toggle-text {
    font-weight: 650;
    color: #6f5834;
}

.planner-reminder-settings {
    display: none;
    margin-top: 18px;
    padding-top: 17px;
    border-top: 1px dashed rgba(157, 126, 70, 0.28);
}

.planner-reminder-toggle:has(
    #plannerReminderEnabled:checked
) + .planner-reminder-settings {
    display: block;
}

.planner-reminder-note {
    margin: 9px 0 0;
    color: #806f52;
    font-size: 0.86rem;
    line-height: 1.5;
}


/* 夜間模式 */

body.night-mode .planner-reminder-card,
body.dark .planner-reminder-card {
    border-color: rgba(224, 199, 145, 0.16);
    background: rgba(57, 48, 32, 0.58);
}

body.night-mode .planner-reminder-toggle-text,
body.dark .planner-reminder-toggle-text {
    color: #ead7b2;
}

body.night-mode .planner-reminder-settings,
body.dark .planner-reminder-settings {
    border-top-color: rgba(224, 199, 145, 0.2);
}

body.night-mode .planner-reminder-note,
body.dark .planner-reminder-note {
    color: #d1c19f;
}
/* ========================================
   Forest Home：森林提醒
======================================== */

.forest-reminders {
    margin-top: 22px;
    padding: 20px;

    border: 1px solid rgba(111, 143, 124, 0.18);
    border-radius: 22px;

    background:
        linear-gradient(
            145deg,
            rgba(248, 251, 247, 0.96),
            rgba(241, 246, 242, 0.9)
        );

    box-shadow:
        0 12px 30px
        rgba(70, 96, 80, 0.05);
}

.forest-reminders-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.forest-reminders-topbar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.forest-reminders-kicker {
    margin-bottom: 3px;
    color: #6f8f7c;
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.forest-reminders-more {
    flex-shrink: 0;
    padding: 8px 12px;
    border: 1px solid rgba(157, 121, 61, 0.2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.66);
    color: #765d36;
    font-size: 0.84rem;
    font-weight: 650;
    cursor: pointer;
    transition:
        transform 0.18s ease,
        background 0.18s ease;
}

.forest-reminders-more:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.9);
}

.forest-reminders-empty {
    padding: 16px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.5);
    color: #8a7c63;
    font-size: 0.9rem;
    text-align: center;
}


/* 夜間模式 */

body.night-mode .forest-reminders,
body.dark .forest-reminders {
    border-color: rgba(111, 143, 124, 0.18);
    background:
        linear-gradient(
            145deg,
            rgba(38, 50, 43, 0.96),
            rgba(31, 42, 36, 0.92)
        );
}

body.night-mode .forest-reminders-kicker,
body.dark .forest-reminders-kicker {
    color: #9fb8a8;
}

body.night-mode .forest-reminders-more,
body.dark .forest-reminders-more {
    border-color: rgba(159, 184, 168, 0.18);
    background: rgba(255, 255, 255, 0.05);
    color: #c7d7cc;
}

body.night-mode .forest-reminders-empty,
body.dark .forest-reminders-empty {
    background: rgba(255, 255, 255, 0.04);
    color: #cfc2a8;
}

body.night-mode .forest-reminder-status,
body.dark .forest-reminder-status {
    color: #d8c89f;
}


/* 手機版 */

@media (max-width: 680px) {

    .forest-reminders {
        padding: 17px;
    }

    .forest-reminders-header {
        align-items: flex-start;
    }

    .forest-reminders-more {
        padding: 7px 10px;
        font-size: 0.8rem;
    }

}
/* ========================================
   Forest Home：Hero 與雙城市時間
======================================== */

.forest-home-hero {
     position: relative;
    margin-bottom: 22px;
    padding: 24px;
    border-radius: 24px;
    background:
        linear-gradient(
            145deg,
            rgba(242, 249, 241, 0.96),
            rgba(232, 243, 230, 0.9)
        );
    box-shadow:
        0 14px 34px
        rgba(70, 100, 72, 0.08);
}

.forest-home-kicker {
    color: #728c75;
    font-size: 0.74rem;
    font-weight: 750;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.forest-home-title {
    margin: 6px 0 4px;
}

.forest-home-greeting {
    margin: 0;
    color: #4f6652;
    font-size: 1.05rem;
    font-weight: 700;
}

.forest-home-quote {
    margin: 7px 0 0;
    color: #718074;
    font-size: 0.92rem;
}

.forest-clock-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 20px;
}

.forest-clock-card {
    padding: 18px;
    border: 1px solid
        rgba(91, 138, 95, 0.14);
    border-radius: 18px;
    background:
        rgba(255, 255, 255, 0.62);
}

.forest-clock-city {
    color: #647467;
    font-size: 0.88rem;
    font-weight: 700;
}

.forest-clock-time {
    margin-top: 7px;
    color: #405d44;
    font-size: 2rem;
    font-weight: 760;
    letter-spacing: 0.02em;
}

.forest-clock-note {
    margin-top: 4px;
    color: #879289;
    font-size: 0.78rem;
}
.forest-home-date {

    margin-top: 10px;

    font-size: 15px;

    color: rgba(76, 98, 77, 0.75);

}
.forest-home-summary {

    display: inline-flex;

    align-items: center;

    padding: 8px 14px;

    margin-top: 10px;

    border-radius: 999px;

    background:
        rgba(92, 147, 95, 0.08);

    border:
        1px solid
        rgba(92, 147, 95, 0.15);

    color: #56715a;

    font-size: 14px;

    font-weight: 650;

    width: fit-content;

}

@media (max-width: 680px) {

    .forest-clock-grid {
        grid-template-columns: 1fr;
    }

}
/* ========================================
   Forest Home：提醒項目
======================================== */

.forest-reminder-item {
    width: 100%;
    margin-top: 9px;
    overflow: hidden;
    border: 1px solid rgba(167, 128, 67, 0.14);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.62);
    color: inherit;
    transition:
        transform 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease;
}

.forest-reminder-item:first-child {
    margin-top: 0;
}

.forest-reminder-item:hover {
    transform: translateY(-1px);
    border-color: rgba(167, 128, 67, 0.28);
    background: rgba(255, 255, 255, 0.88);
}
.forest-reminder-main {
    width: 100%;
    display: grid;
    grid-template-columns:
        auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 13px;
    padding: 10px 12px;
    border: none;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.forest-reminder-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 12px 8px;
}

.forest-reminder-snooze {
    padding: 7px 11px;
    border: 1px solid rgba(151, 119, 69, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.58);
    color: #775f39;
    font-size: 0.78rem;
    font-weight: 680;
    cursor: pointer;
    transition:
        transform 0.18s ease,
        background 0.18s ease;
}


.forest-reminder-snooze:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.92);
}
.forest-reminder-item:first-child {
    margin-top: 0;
}

.forest-reminder-item:hover {
    transform: translateY(-1px);
    border-color: rgba(167, 128, 67, 0.28);
    background: rgba(255, 255, 255, 0.88);
}

.forest-reminder-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(184, 143, 77, 0.12);
    font-size: 1.15rem;
}

.forest-reminder-content {
    min-width: 0;
}

.forest-reminder-title {
    overflow: hidden;
    color: #5f4a2d;
    font-size: 0.96rem;
    font-weight: 720;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.forest-reminder-details {
    margin-top: 4px;
    overflow: hidden;
    color: #8a775a;
    font-size: 0.8rem;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.forest-reminder-status {
    flex-shrink: 0;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(178, 139, 78, 0.12);
    color: #826330;
    font-size: 0.8rem;
    font-weight: 750;
}

.forest-reminder-item.is-today {
    border-color: rgba(177, 132, 58, 0.34);
    background: rgba(255, 248, 222, 0.88);
}

.forest-reminder-item.is-overdue {
    border-color: rgba(174, 88, 75, 0.25);
    background: rgba(255, 239, 235, 0.78);
}

.forest-reminder-item.is-overdue
.forest-reminder-status {
    background: rgba(174, 88, 75, 0.12);
    color: #9a5045;
}

.forest-completed {
    display: none;
}

.forest-completed-empty {

    padding: 18px;
    text-align: center;
    color: rgba(90, 90, 90, 0.65);

}
.forest-completed-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 9px;
    padding: 14px;
    border: 1px solid rgba(91, 138, 95, 0.16);
    border-radius: 16px;
    background: rgba(235, 245, 236, 0.72);
}

.forest-completed-item:first-child {
    margin-top: 0;
}

.forest-completed-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: rgba(91, 138, 95, 0.12);
}

.forest-completed-content {
    min-width: 0;
}

.forest-completed-title {
    color: #4f6f53;
    font-size: 0.94rem;
    font-weight: 700;
}

.forest-completed-meta {
    margin-top: 4px;
    color: #788a7a;
    font-size: 0.8rem;
}
/* 夜間模式 */

body.night-mode .forest-reminder-item,
body.dark .forest-reminder-item {
    border-color: rgba(224, 194, 135, 0.12);
    background: rgba(255, 255, 255, 0.045);
}

body.night-mode .forest-reminder-item:hover,
body.dark .forest-reminder-item:hover {
    border-color: rgba(224, 194, 135, 0.22);
    background: rgba(255, 255, 255, 0.075);
}

body.night-mode .forest-reminder-title,
body.dark .forest-reminder-title {
    color: #f0dfbd;
}

body.night-mode .forest-reminder-details,
body.dark .forest-reminder-details {
    color: #cabb9e;
}

body.night-mode
.forest-reminder-item.is-today,
body.dark
.forest-reminder-item.is-today {
    background: rgba(116, 88, 40, 0.22);
}

body.night-mode
.forest-reminder-item.is-overdue,
body.dark
.forest-reminder-item.is-overdue {
    background: rgba(119, 57, 48, 0.2);
}
body.night-mode .forest-reminder-snooze,
body.dark .forest-reminder-snooze {
    border-color: rgba(224, 194, 135, 0.15);
    background: rgba(255, 255, 255, 0.06);
    color: #e1cfaa;
}

body.night-mode .forest-reminder-snooze:hover,
body.dark .forest-reminder-snooze:hover {
    background: rgba(255, 255, 255, 0.1);
}
.forest-reminder-complete {
    padding: 7px 11px;
    border: 1px solid rgba(91, 138, 95, 0.2);
    border-radius: 999px;
    background: rgba(229, 243, 230, 0.76);
    color: #507254;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition:
        transform 0.18s ease,
        background 0.18s ease;
}

.forest-reminder-complete:hover {
    transform: translateY(-1px);
    background: rgba(215, 237, 217, 0.96);
}

/* 手機版 */

@media (max-width: 680px) {

    .forest-reminder-main {
        grid-template-columns:
            auto minmax(0, 1fr);
    }

    .forest-reminder-status {
        grid-column: 2;
        justify-self: start;
    }

}
/* =======================================
   Forest Footer
======================================= */

.forest-footer{

    margin-top:80px;

    padding:40px 20px;

    text-align:center;

    opacity:.75;

}

.forest-footer-logo{

    font-size:18px;

    font-weight:700;

    color:#49634d;

    margin-bottom:10px;

}

.forest-footer-brand{

    font-size:13px;

    color:#6d8372;

    letter-spacing:.08em;

    margin-bottom:6px;

}

.forest-footer-version{

    font-size:12px;

    color:#8a998d;

}
.forest-clock-seconds{

    font-size:0.55em;

    font-weight:400;

    opacity:.35;

    margin-left:1px;

    position:relative;

    top:-2px;

}
.forest-home-watermark{

    position:absolute;

    right:50px;

    top:40px;

    font-size:180px;

    opacity: 0.07;

    pointer-events:none;

    user-select:none;

}
/* =====================================
   森林日誌
===================================== */
#forestToday,
#forestLast {

    
    font-size: .95rem;

    color:
        rgba(63, 82, 67, .76);

    line-height: 1.7;

}

#forestToday {

    margin-top: 12px;

}

#forestLast {

    margin-top: 8px;

}

.forest-journal-label {

    font-size:1.05rem;

    font-weight:600;
    letter-spacing: .04em;
      color:#56735b;
    margin-bottom: 8px;

}

.forest-journal-title {

    margin-top: 0px;
     font-size:1.42rem;
     font-weight:650;
    line-height: 1.6;
    color:#2f4334;

}

.forest-journal-title {

    margin-top: 8px;

    font-size: 1.28rem;

    font-weight: 600;

    line-height: 1.6;

    color: #334d39;

}


#forestCount {
    display: none;
    
    width: 68%;
min-width: 340px;

    margin-top: 16px;
    margin-bottom: 18px;

    padding: 18px 22px;

    border: 1px solid
        rgba(108, 140, 112, 0.10);

    border-left:
        4px solid #9cc89d;

    border-radius: 16px;

    background:
        rgba(252, 253, 250, 0.92);

    box-shadow:
        0 4px 10px
        rgba(70, 100, 75, 0.035);

}
@media (max-width: 680px) {

    #forestCount {

        width: 100%;
        min-width: 0;

    }

}

#forestCount > * {

    max-width: 520px;

}
#forestCount {
    overflow: hidden;
}
.forest-journal-divider{

    width:240px;

    max-width:100%;

    height:1px;

    background:rgba(92,126,97,.10);

    margin:16px 0;

}
#forestToday,
#forestWeek,
#forestLast {
    margin-left: 22px;
}
.forest-journal-time {

    margin-top: 12px;
    padding-top: 10px;

    border-top:
        1px solid
        rgba(120, 150, 120, 0.12);

    color:
        rgba(82, 103, 87, 0.62);

    font-size: 0.82rem;
    font-weight: 400;

}
.forest-journal-card {
width:100%;
    max-width: 700px;
    margin-top:18px;

}
.forest-journal-timeline {

    position: relative;

    margin-left: 22px;
    margin-top: 22px;

    padding:
        8px 0
        8px 27px;

    border-left:
        2px solid
        rgba(126, 166, 130, 0.30);

}
#forestToday,
#forestWeek,
#forestLast {
    position: relative;
}
.forest-timeline-caption {

    color:
        rgba(63, 82, 67, .72);

}

.forest-timeline-article {

    margin-top: 4px;

    color: #3f5243;

    line-height: 1.65;

    overflow-wrap: anywhere;

}

#forestToday::before,
#forestWeek::before,
#forestLast::before {

    content: "";

    position: absolute;

    left: -33px;
    top: 11px;

    width: 8px;
    height: 8px;

    border-radius: 50%;

    background: #a9cdaa;

    box-shadow:
        0 0 0 4px
        rgba(169, 205, 170, 0.16);

}
#forestToday {

    margin-top: 4px;

}

#forestLast {

    margin-top: 22px;

}
.forest-timeline-label {

    font-size: .86rem;
    font-weight: 700;
    letter-spacing: .04em;

    color: #58745d;

}

.forest-timeline-text {

    margin-top: 4px;

    font-size: .95rem;
    line-height: 1.65;

    color:
        rgba(63, 82, 67, .72);

}
.forest-timeline-time {

    margin-top: 4px;

    font-size: .82rem;

    color:
        rgba(82, 103, 87, .58);

}
@media (max-width: 680px) {

    .forest-timeline-text {

        overflow-wrap: anywhere;

        line-height: 1.75;

    }

}
@media (max-width: 680px) {

    .forest-reminders-header {

        display: flex;
        flex-direction: column;

        gap: 14px;

    }

    .forest-reminders-heading {

        width: 100%;

    }

    .forest-completed {

        width: 100%;

    }

    .forest-reminders-more {

        align-self: flex-start;

        white-space: nowrap;

    }

}

/* Writing Forest｜首頁常用工具 */
.forest-tools {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 18px;
}

.forest-tools > button {
    width: 140px;
    margin-right: 0;
    box-sizing: border-box;
}

/* Writing Forest｜同步按鈕內的最後同步狀態 */
.forest-sync-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

.forest-sync-button .forest-sync-time {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    opacity: 0.72;
}

.forest-more-tools {
    position: relative;
}

.forest-more-tools summary {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 140px;
    box-sizing: border-box;

    padding: 10px 18px;
    font-size: 15px;

    border: none;
    border-radius: 8px;
    background: #d8e4dc;

    cursor: pointer;
    list-style: none;
    white-space: nowrap;
}

.forest-more-tools summary:hover {
    background: #c5d8cc;
}

.forest-more-tools summary::-webkit-details-marker {
    display: none;
}

/* Writing Forest｜更多工具面板 */
.forest-more-tools-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 20;

    display: grid;
    grid-template-columns: repeat(2, 140px);
    gap: 8px;

    padding: 10px;

    background: #ffffff;
    border: 1px solid rgba(53, 92, 66, 0.14);
    border-radius: 12px;

    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.forest-more-tools-menu button {
    width: 140px;
    margin: 0;
    white-space: nowrap;
}

@media (max-width: 680px) {

    .new-button {

        width: 100%;

        margin:
            18px 0
            20px;

        min-height: 48px;

        padding: 11px 16px;

        font-size: 1rem;

    }

    .forest-tools {

        display: grid;

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 10px;

        width: 100%;

        margin-bottom: 18px;

    }

    .forest-tools button {

        width: 100%;

        min-height: 48px;

        padding: 10px 8px;

        border-radius: 12px;

        font-size: .95rem;

        line-height: 1.35;

        white-space: normal;

    }

    /* Writing Forest｜Mobile 更多工具面板 */
.forest-more-tools-menu {
    left: auto;
    right: 0;

    width: min(300px, calc(100vw - 48px));
    box-sizing: border-box;

    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.forest-more-tools-menu button {
    width: 100%;
    min-width: 0;
}

}
@media (max-width: 680px) {

    .article-item {

        padding: 20px 22px;

    }

}

/* ===== 森林日誌｜Desktop 精簡三欄 ===== */
@media (min-width: 769px) {
    .forest-journal-timeline {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 28px;

        margin-left: 0;
        margin-top: 18px;
        padding: 8px 0;

        border-left: none;
    }

    #forestWriting {
        display: none;
    }

    #forestToday,
    #forestWeek,
    #forestLast {
        position: relative;
        margin: 0;
        padding: 0 8px;
    }

    #forestToday::before,
    #forestWeek::before,
    #forestLast::before {
        display: none;
    }
}

#cloudArticleList {

    display: grid;
    gap: 12px;

    margin-top: 14px;

}

.cloud-article-card {

    padding: 16px 18px;

    border:
        1px solid
        rgba(93, 116, 98, 0.14);

    border-radius: 14px;

    background:
        rgba(255, 255, 255, 0.72);

}

.cloud-article-title {

    margin: 0;

    font-size: 1rem;
    font-weight: 700;
    line-height: 1.45;

    color: #334d39;

}

.cloud-article-preview {

    margin:
        6px 0 0;

    font-size: 0.9rem;
    line-height: 1.6;

    color:
        rgba(63, 82, 67, 0.72);

    overflow-wrap: anywhere;

}

@media (max-width: 680px) {

    .cloud-article-card {

        padding: 14px 16px;

        border-radius: 14px;

    }

}

.cloud-articles-toggle {

    justify-self: center;

    margin-top: 4px;

    padding: 10px 18px;

    border:
        1px solid
        rgba(93, 116, 98, 0.18);

    border-radius: 999px;

    background:
        rgba(255, 255, 255, 0.72);

    color: #52705a;

    font-size: 0.9rem;
    font-weight: 600;

    cursor: pointer;

}

.cloud-articles-toggle:hover {

    background:
        rgba(236, 244, 236, 0.92);

}

.forest-today-list {

    margin-top: 10px;

}

.forest-today-item {

    display: flex;
    align-items: flex-start;

    gap: 10px;

    margin-top: 8px;

    line-height: 1.6;

}

.forest-today-time {

    flex: 0 0 auto;

    color:
        rgba(82, 103, 87, 0.68);

    font-size: 0.9rem;

}

.forest-today-title {

    color: #3f5243;

    overflow-wrap: anywhere;

}

@media (max-width: 680px) {

    .forest-today-item {

        display: grid;

        gap: 2px;

    }

}

.forest-today-more {
    margin-top: 12px;
    font-size: 14px;
    color: #7d8f84;
    line-height: 1.6;
}

.forest-sync-status {

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 16px;

    margin:
        18px 28px
        24px;

    padding:
        14px 18px;

    border:
        1px solid
        rgba(93, 116, 98, 0.14);

    border-radius: 14px;

    background:
        rgba(255, 255, 255, 0.72);

}

.forest-sync-label {

    margin: 0;

    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.04em;

    color: #58745d;

}

.forest-sync-time {

    margin: 0;

    font-size: 0.95rem;
    font-weight: 600;

    color: #334d39;

}
@media (max-width: 680px) {

    .forest-sync-status {

        margin:
            14px 0
            20px;

        padding:
            13px 15px;

    }

}

#forestBestWritingDay {
    margin-top: 14px;
    font-size: 22px !important;
    font-weight: 700;
    line-height: 1.4;
    color: #2f6047;
    text-align: center;
    white-space: nowrap;
}

#rainLayer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 9999;
    display: none;
}
body.rain-mode #rainLayer {
    display: block;
}

.rain-drop {
    position: absolute;
    top: -40px;

    width: 1px;
height: 24px;
background: rgba(90, 110, 120, 0.5);
    animation: forestRainFall 1.9s linear infinite;
}

@keyframes forestRainFall {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(110vh);
    }
}
.rain-drop:nth-child(1)  { left: 6%;  animation-delay: -0.2s; }
.rain-drop:nth-child(2)  { left: 13%; animation-delay: -0.7s; animation-duration: 2.2s;  height: 18px;}
.rain-drop:nth-child(3)  { left: 21%; animation-delay: -1.1s; }
.rain-drop:nth-child(4)  { left: 29%; animation-delay: -0.4s; }
.rain-drop:nth-child(5)  { left: 37%; animation-delay: -1.5s; animation-duration: 2.4s; height: 28px;}
.rain-drop:nth-child(6)  { left: 44%; animation-delay: -0.9s; }
.rain-drop:nth-child(7)  { left: 51%; animation-delay: -1.7s; animation-duration: 1.7s; }
.rain-drop:nth-child(8)  { left: 58%; animation-delay: -0.1s; height: 20px; }
.rain-drop:nth-child(9)  { left: 65%; animation-delay: -1.3s; }
.rain-drop:nth-child(10) { left: 72%; animation-delay: -0.6s; animation-duration: 2.1s; }
.rain-drop:nth-child(11) { left: 79%; animation-delay: -1.8s;height: 30px;  }
.rain-drop:nth-child(12) { left: 86%; animation-delay: -0.3s; animation-duration: 2.3s; }
.rain-drop:nth-child(13) { left: 92%; animation-delay: -1.0s; }
.rain-drop:nth-child(14) { left: 97%; animation-delay: -1.6s; animation-duration: 1.8s;height: 19px;}
.rain-drop:nth-child(15) { left: 17%; animation-delay: -1.4s; animation-duration: 2.1s; }
.rain-drop:nth-child(16) { left: 33%; animation-delay: -0.5s; animation-duration: 1.8s; }
.rain-drop:nth-child(17) { left: 68%; animation-delay: -1.2s; animation-duration: 2.3s; height: 27px;}
.rain-drop:nth-child(18) { left: 89%; animation-delay: -0.8s; animation-duration: 2.0s; }

/* ========================================
   Version 3.0｜Forest OS 模組入口
======================================== */
.forest-module-card.active {
    cursor: pointer;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.forest-module-card.active:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(47, 96, 71, 0.12);
}

.forest-modules {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;

    max-width: 1100px;
    margin: 0 auto 40px;
    padding: 0 24px;
}

.forest-module-card {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    column-gap: 16px;
    row-gap: 4px;

    align-items: start;

    padding: 22px 24px;
    min-height: 100px;
    box-sizing: border-box;

    border: 1px solid #d8e4dc;
    border-radius: 18px;

    background: rgba(255, 255, 255, 0.55);

    text-align: left;
}

/* 文字森林在日間模式使用淡淡的森林綠氣候。 */
body:not(.night-mode) #writingForestModule {
    background: rgba(236, 244, 236, 0.82);
}

/* 時光森林在日間模式使用柔和的暖金氣候。 */
body:not(.night-mode) #timeForestModule {
    background: rgba(248, 242, 230, 0.88);
}

/* 財富森林在日間模式使用淡淡的暖杏氣候。 */
body:not(.night-mode) #wealthForestModule {
    background: rgba(248, 239, 233, 0.82);
}

/* 學習森林在日間模式使用淡淡的暖米氣候。 */
body:not(.night-mode) #learningForestModule {
    background: rgba(247, 241, 235, 0.72);
}

.forest-module-icon {
    grid-column: 1;
    grid-row: 1 / span 3;

    margin-top: 2px;
    margin-bottom: 0;

    font-size: 30px;
    text-align: center;
}

.forest-module-name,
.forest-module-desc,
.forest-module-status {
    grid-column: 2;
}

.forest-module-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.forest-module-desc {
    font-size: 14px;
    line-height: 1.6;
    opacity: 0.7;
    white-space: nowrap;
}

/* ========================================
   Forest OS Home｜森林入口
   Version 6.5 深夜模式
======================================== */

body.night-mode .forest-module-card {
    border-color: rgba(150, 180, 158, 0.14);
    background: rgba(48, 57, 51, 0.92);
}

body.night-mode .forest-module-name {
    color: #d2ded5;
}

body.night-mode .forest-module-desc {
    color: #aeb9b1;
    opacity: 1;
}

body.night-mode .forest-module-status {
    color: #8fa097;
    opacity: 1;
}


.forest-os-home-header {
    text-align: center;
    padding: 24px 24px 12px;
}

.forest-os-brand {
    margin-bottom: 12px;
}

.forest-os-home-header h1,
.forest-os-home-header p {
    margin-left: auto;
    margin-right: auto;
}

.forest-os-home-header h1 {
    margin-top: 8px;
    margin-bottom: 8px;
}

.forest-os-home-header p {
    margin-top: 0;
    margin-bottom: 0;
}

.forest-os-home-header p {
    margin-bottom: 0;
}

.forest-module-card.coming-soon {
    opacity: 0.72;
}

.forest-module-status {
    margin-top: 10px;
    font-size: 12px;
    font-weight: 600;
    opacity: 0.65;
}

/* ========================================
   Forest OS Home｜Top Bar
   Version 6.5
======================================== */

.forest-os-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;

    max-width: 1100px;
    margin: 0 auto 12px;
}

.forest-os-topbar .forest-os-brand {
    margin-bottom: 0;
}

/* ========================================
   Forest OS Home｜Living Desktop
   Version 6.5 深夜模式
======================================== */

body.night-mode .forest-home-hero {
    background:
        linear-gradient(
            145deg,
            rgba(48, 57, 51, 0.96),
            rgba(42, 51, 45, 0.92)
        );

    box-shadow:
        0 14px 34px
        rgba(0, 0, 0, 0.12);
}

body.night-mode .forest-home-kicker {
    color: #8fa097;
}

body.night-mode .forest-home-title {
    color: #d2ded5;
}

body.night-mode .forest-home-greeting {
    color: #c6d5ca;
}

body.night-mode .forest-home-date,
body.night-mode .forest-home-quote {
    color: #9aa9a0;
}

body.night-mode .forest-home-summary {
    border-color: rgba(150, 180, 158, 0.16);
    background: rgba(150, 180, 158, 0.08);

    color: #b8c7bc;
}


/* 雙城市時間卡 */

body.night-mode .forest-clock-card {
    border-color: rgba(150, 180, 158, 0.14);
    background: rgba(48, 57, 51, 0.92);
}

body.night-mode .forest-clock-city {
    color: #aeb9b1;
}

body.night-mode .forest-clock-time {
    color: #d2ded5;
}

body.night-mode .forest-clock-note {
    color: #7f8d84;
}

body.night-mode .forest-clock-seconds {
    color: #7f8d84;
}

/* ========================================
   Version 3.0｜Forest OS 模組入口
   Mobile
======================================== */

@media (max-width: 600px) {
    .forest-modules {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 0 18px;
    }

    .forest-module-card {
        padding: 20px 12px;
    }

    .forest-module-desc {
        white-space: normal;
    }

}
@media (max-width: 600px) {
/* 手機首頁把兩個時區並排，讓森林入口更早出現。 */
.forest-home-side-stack .forest-clock-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

/* 手機雙時區卡隱藏秒數，避免窄卡換行。 */
.forest-clock-seconds {
    display: none;
}

/* 手機雙時區卡隱藏 UTC 資訊，保留較有意義的地點說明。 */
.forest-clock-utc {
    display: none;
}

}

    /* ========================================
       Version 6.5｜Living Desktop Mobile
    ======================================== */

    @media (max-width: 600px) {

    .forest-home-primary-grid {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 0 18px;
    }

}

.forest-module-card.coming-soon {
    cursor: pointer;
}

.forest-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);

    padding: 12px 18px;
    border-radius: 14px;

    background: rgba(47, 96, 71, 0.92);
    color: #ffffff;

    font-size: 14px;

    opacity: 0;
    pointer-events: none;

    z-index: 9999;

    transition: opacity 0.25s ease;
}

.forest-toast.show {
    opacity: 1;
}

.forest-toast.success {
    background: rgba(55, 122, 82, 0.95);
}

.version-count {
    margin-bottom: 18px;
    padding: 10px 14px;

    border-radius: 12px;

    background: rgba(79, 128, 95, 0.08);

    color: #4f6756;

    font-size: 14px;
    font-weight: 600;
}

/* ========================================
   Version 4.0｜時光森林
======================================== */

.time-forest-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 48px 32px 24px;
}

.time-forest-back {
    border: none;
    border-radius: 14px;
    padding: 12px 18px;

    background: rgba(79, 128, 95, 0.10);
    color: #496451;

    font-size: 14px;
    cursor: pointer;
}

.time-forest-header {
    margin-top: 0px;
    text-align: center;
}

.time-forest-title {
    margin: 0;

    color: #355c42;
    font-size: 42px;
    font-weight: 700;
}

.time-forest-subtitle {
    margin-top: 16px;

    color: #718078;
    font-size: 17px;
    line-height: 1.8;
}

.time-countdown-card {
    max-width: 620px;
    margin: 24px auto 0;
    padding: 34px 30px;

    border: 1px solid rgba(79, 128, 95, 0.16);
    border-radius: 24px;

    background: rgba(255, 255, 255, 0.58);

    text-align: center;

    box-shadow:
        0 10px 30px rgba(47, 96, 71, 0.06);
}

.time-countdown-label {
    color: #718078;
    font-size: 14px;
    font-weight: 600;
}

.time-countdown-title {
    margin-top: 14px;

    color: #3f5b47;
    font-size: 22px;
    font-weight: 650;
}

.time-countdown-number {
    margin-top: 18px;

    color: #355c42;
    font-size: 64px;
    font-weight: 700;
    line-height: 1;
}

.time-countdown-unit {
    margin-top: 8px;

    color: #718078;
    font-size: 15px;
}

.time-countdown-date {
    margin-top: 22px;

    color: #718078;
    font-size: 13px;
    letter-spacing: 0.08em;
}

.time-tree-edit-button {
    margin-top: 18px;
    padding: 8px 14px;

    border: 1px solid rgba(79, 128, 95, 0.22);
    border-radius: 10px;

    background: rgba(79, 128, 95, 0.08);
    color: #4f6756;

    font-size: 13px;
    font-weight: 600;

    cursor: pointer;
}

.time-tree-edit-button:hover {
    background: rgba(79, 128, 95, 0.13);
}

.time-tree-edit-panel {
    margin-top: 22px;
    padding: 20px;

    border: 1px solid rgba(79, 128, 95, 0.16);
    border-radius: 16px;

    background: rgba(255, 255, 255, 0.46);

    text-align: left;
}

.time-tree-edit-panel label {
    display: block;
    margin-bottom: 14px;

    color: #5d7363;
    font-size: 13px;
    font-weight: 600;
}

.time-tree-edit-panel input {
    width: 100%;
    margin-top: 7px;
    padding: 10px 12px;

    border: 1px solid rgba(79, 128, 95, 0.22);
    border-radius: 10px;

    background: rgba(255, 255, 255, 0.80);
    color: #354f3d;

    box-sizing: border-box;
}

.time-tree-edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;

    margin-top: 18px;
}

.time-tree-edit-actions button {
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid rgba(79, 128, 95, 0.22);

    cursor: pointer;
}

#cancelTimeTreeEditButton {
    background: transparent;
    color: #5f7164;
}

#saveTimeTreeEditButton {
    background: #4f805f;
    border-color: #4f805f;
    color: #ffffff;
}

.time-forest-list-section {
    max-width: 620px;
    margin: 24px auto 0;
}

.time-forest-list-title {
    margin-bottom: 16px;

    color: #3f5b47;
    font-size: 22px;
    font-weight: 700;
}

.time-forest-event-item {
    
    padding: 5px 24px;

    border: 1px solid rgba(79, 128, 95, 0.16);
    border-radius: 14px;

    background: rgba(255, 255, 255, 0.55);

    color: #4f6756;

    font-size: 14px;
    line-height: 1.6;

    
    display: flex;
justify-content: space-between;
align-items: center;
}

.time-forest-event-item + .time-forest-event-item {
    margin-top: 10px;
}

.time-tree-add-button {
    margin-bottom: 16px;
    padding: 9px 14px;

    border: 1px solid rgba(79, 128, 95, 0.22);
    border-radius: 10px;

    background: rgba(79, 128, 95, 0.08);
    color: #4f6756;

    font-size: 13px;
    font-weight: 600;

    cursor: pointer;
}

.time-tree-add-button:hover {
    background: rgba(79, 128, 95, 0.13);
}

.time-forest-event-item.past {
    opacity: 0.58;
}

.time-forest-event-main {
    flex: 1;
    min-width: 0;
}

.time-forest-event-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.time-forest-event-icon {
    flex: 0 0 auto;
}

.time-forest-event-title {
    font-weight: 650;
}

.time-forest-event-date {
    margin-top: 4px;
    padding-left: 30px;

    color: #879087;
    font-size: 13px;
}

.time-forest-event-side {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.time-forest-event-days {
    min-width: 58px;
    padding: 6px 10px;

    border-radius: 999px;
    background: rgba(111, 148, 103, 0.12);

    color: #5f7d58;
    font-size: 13px;
    font-weight: 650;
    text-align: center;
    white-space: nowrap;
}

.time-forest-event-days.is-past {
    background: rgba(120, 120, 110, 0.08);
    color: #918d84;
}

#backToTopButton {
    position: fixed;
    right: 24px;
    bottom: 24px;

    width: 44px;
    height: 44px;

    border: 1px solid rgba(79, 128, 95, 0.22);
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.88);
    color: #4f6756;

    font-size: 20px;
    font-weight: 700;

    cursor: pointer;

    box-shadow:
        0 8px 24px rgba(47, 96, 71, 0.10);

    z-index: 900;

    display: none;

    transition:
    transform 0.2s ease,
    background 0.2s ease;
}

#backToTopButton:hover {
    transform: translateY(-2px);
}

.time-forest-event-edit,
.time-forest-event-delete {
    width: 36px;
    height: 36px;
    margin-left: 12px;
    margin-right: 0;
    padding: 0;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(79, 128, 95, 0.18);
    border-radius: 8px;

    background: rgba(79, 128, 95, 0.07);
    color: #4f6756;

    font-size: 13px;
    cursor: pointer;
}

.time-forest-event-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.time-forest-category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;

    margin: 14px 0 18px;
}

.time-forest-filter-button {
    padding: 8px 12px;

    border: 1px solid rgba(79, 128, 95, 0.18);
    border-radius: 999px;

    background: rgba(255, 255, 255, 0.55);
    color: #56705d;

    font-size: 13px;
    cursor: pointer;
}

.time-forest-filter-button.active {
    background: rgba(79, 128, 95, 0.14);
    border-color: rgba(79, 128, 95, 0.28);

    color: #3f5b47;
    font-weight: 700;
}

.time-forest-filter-button span {
    display: inline-block;

    margin-left: 5px;
    min-width: 18px;

    padding: 1px 5px;

    border-radius: 999px;

    background: rgba(79, 128, 95, 0.12);
    color: #4f6756;

    font-size: 11px;
    font-weight: 700;

    text-align: center;
}

.time-forest-upcoming {
    display: none;
    max-width: 620px;
    margin: 34px auto 0;

    padding: 22px 20px;

    border: 1px solid rgba(79, 128, 95, 0.14);
    border-radius: 18px;

    background: rgba(255, 255, 255, 0.48);
}

.time-forest-upcoming-title {
    margin: 0;

    color: #3f5b47;
    font-size: 20px;
    font-weight: 700;
}

.time-forest-upcoming-subtitle {
    margin-top: 6px;
    margin-bottom: 16px;

    color: #758579;
    font-size: 13px;
}

.time-forest-upcoming-item {
    display: flex;
justify-content: space-between;
align-items: center;
gap: 12px;

    margin-top: 8px;
    padding: 10px 12px;

    border-radius: 12px;

    background: rgba(79, 128, 95, 0.06);

    color: #4f6756;
    font-size: 13px;
    line-height: 1.5;
}

.time-forest-upcoming-countdown {
    font-weight: 700;
    white-space: nowrap;
}

.time-forest-sync-area {
    max-width: 620px;
    margin: 12px auto 18px;
    text-align: right;
}

/* ========================================
   財富森林
   Version 5.0 Desktop 基礎樣式
======================================== */

.wealth-forest-page {
    width: min(920px, calc(100% - 40px));
    margin: 0 auto;
    padding: 40px 0 80px;
}

#wealthMonthlyLedgerView {
    width: min(920px, calc(100% - 40px));
    margin: 0 auto;
    padding: 40px 0 80px;
}

.wealth-forest-sync-area {
    text-align: right;
    margin: 12px 0 18px;
}

/* ======================================
   財富森林｜月度流水內容容器
====================================== */
.wealth-monthly-ledger-table-wrap {
     margin-top: 20px;
    padding: 24px 28px;

    border: 1px solid rgba(79, 128, 95, 0.14);
    border-radius: 18px;

    background: rgba(255, 255, 255, 0.72);
}

.wealth-monthly-ledger-table {
    width: 100%;
}

.wealth-monthly-ledger-table th {
    text-align: left;
}

.wealth-monthly-ledger-table th,
.wealth-monthly-ledger-table td {
    padding: 6px 4px;
}

.wealth-monthly-ledger-table th:last-child,
.wealth-monthly-ledger-table td:last-child {
    text-align: right;
}

.wealth-monthly-ledger-table td[colspan="3"] {
    text-align: left;
}

.wealth-ledger-income {
    color: #4f8060;
    font-weight: 600;
}

.wealth-ledger-expense {
    color: #a8645e;
    font-weight: 600;
}

.wealth-budget-overrun {
    color: #a8645e;
}

.wealth-forest-back {
    margin-bottom: 32px;
    padding: 10px 16px;

    border: 1px solid rgba(79, 128, 95, 0.2);
    border-radius: 12px;

    background: rgba(255, 255, 255, 0.72);
    color: #4f6756;

    font-size: 14px;
    cursor: pointer;
}

.wealth-forest-header {
    margin-bottom: 32px;
    text-align: center;
}

.wealth-forest-title {
    margin: 0 0 12px;
    color: #355c42;
    font-size: 36px;
}

.wealth-forest-subtitle {
    margin: 0;
    color: #718078;
    font-size: 16px;
    line-height: 1.8;
}

.wealth-summary {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

.wealth-summary-card {
    padding: 26px 20px;

    border: 1px solid rgba(79, 128, 95, 0.14);
    border-radius: 20px;

    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 10px 28px rgba(53, 92, 66, 0.08);

    text-align: center;
}
.wealth-summary-card-hidden {
    display: none;
}

.wealth-summary-label {
    margin-bottom: 12px;
    color: #718078;
    font-size: 14px;
}

.wealth-summary-amount {
    color: #355c42;
    font-size: 25px;
    font-weight: 700;
}

/* 財富森林｜月度流水日期分組 */
.wealth-ledger-date-row td {
    padding-top: 18px;
    padding-bottom: 8px;

    color: #355c42;
    font-weight: 700;
}

/* 財富森林｜月度流水當日小計 */

    

.wealth-ledger-daily-total td:first-child {
    color: #718078;
}

/* 財富森林｜月度流水編輯入口 */
.wealth-ledger-edit-button {
    appearance: none;
    width: auto;
    min-width: 0;
    height: auto;

    margin-left: 6px;
    padding: 3px 5px;

    border: 0;
    border-radius: 6px;
    background: transparent;
    box-shadow: none;

    color: #718078;
    font: inherit;
    font-size: 14px;
    line-height: 1;

    cursor: pointer;
    vertical-align: middle;
}

.wealth-ledger-edit-button:hover {
    background: rgba(79, 128, 95, 0.08);
}

/* ======================================
   財富森林｜月度流水 Night Mode
====================================== */

body.night-mode .wealth-monthly-ledger-table-wrap {
    border-color: rgba(150, 180, 158, 0.14);
    background: rgba(38, 46, 41, 0.92);
}

body.night-mode .wealth-monthly-ledger-table th,
body.night-mode .wealth-monthly-ledger-table td {
    color: #e1e8e3;
}

body.night-mode .wealth-ledger-date-row td {
    color: #83ad8e;
}

body.night-mode .wealth-ledger-daily-total td {
    border-top-color: rgba(150, 180, 158, 0.14);
}

body.night-mode .wealth-ledger-daily-total td:first-child {
    color: #aebbb2;
}

/* 收支金額保持 Night Mode 語意色 */
body.night-mode .wealth-monthly-ledger-table td.wealth-ledger-income {
    color: #83ad8e;
}

body.night-mode .wealth-monthly-ledger-table td.wealth-ledger-expense {
    color: #cf8880;
}


/* ========================================
   財富森林
   Version 5.0 手機版樣式
======================================== */

@media (max-width: 700px) {

    .wealth-forest-page {
        width: min(100% - 28px, 920px);
        padding: 24px 0 60px;
    }

    .wealth-forest-back {
        margin-bottom: 26px;
    }

    .wealth-forest-title {
        font-size: 30px;
    }

    .wealth-forest-subtitle {
        font-size: 15px;
    }

    .wealth-summary {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .wealth-summary-card {
        padding: 22px 18px;
    }

    /* 財富森林｜手機空月份收斂間距 */
.wealth-expense-summary.is-empty-month {
    margin-bottom: 4px;
}

.wealth-expense-summary.is-empty-month
.wealth-expense-summary-header {
    margin-bottom: 0;
}

/* 財富森林｜支出分類統計 Mobile */
.wealth-expense-category-summary > div {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

.wealth-expense-category-amount {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wealth-budget-stat {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

}

/* ========================================
   財富森林
   Version 5.0 深夜模式
======================================== */

body.night-mode .wealth-forest-back {
    border-color: rgba(150, 180, 158, 0.18);
    background: rgba(54, 64, 57, 0.9);
    color: #d7dfd9;
}

body.night-mode .wealth-forest-title {
    color: #eef3ef;
}

body.night-mode .wealth-forest-subtitle,
body.night-mode .wealth-summary-label {
    color: #92a099;
}

body.night-mode .wealth-summary-card {
    border-color: rgba(150, 180, 158, 0.14);
    background: rgba(45, 52, 47, 0.92);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

body.night-mode .wealth-summary-amount {
    color: #b7d2bd;
}

/* ========================================
   財富森林收支紀錄
   Version 5.0 Desktop 樣式
======================================== */

.wealth-records {
    margin-top: 36px;
    padding: 26px;

    border: 1px solid rgba(79, 128, 95, 0.14);
    border-radius: 20px;

    background: rgba(255, 255, 255, 0.62);
    box-shadow: 0 10px 28px rgba(53, 92, 66, 0.06);
}

.wealth-records-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.wealth-records-title {
    margin: 0;
    color: #355c42;
    font-size: 22px;
}

.wealth-record-add-button {
    padding: 10px 16px;

    border: none;
    border-radius: 12px;

    background: #5f8a6c;
    color: #ffffff;

    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.wealth-record-add-button:hover {
    background: #4f785c;
}

.wealth-record-list {
    min-height: 110px;
}

.wealth-record-empty {
    padding: 28px 18px;
    color: #849088;
    font-size: 14px;
    line-height: 1.8;
    text-align: center;
}

/* ========================================
   財富森林收支紀錄
   Version 5.0 手機版樣式
======================================== */

@media (max-width: 700px) {

    .wealth-records {
        margin-top: 24px;
        padding: 20px 16px;
    }

    .wealth-records-header {
        align-items: stretch;
        flex-direction: column;
        gap: 14px;
    }

    .wealth-record-add-button {
        width: 100%;
    }

    .wealth-record-list {
    min-height: 0;
}

/* 財富森林｜手機收支日期保持單行 */
.wealth-record-meta {
    white-space: nowrap;
}

    .wealth-record-empty {
        padding: 24px 12px;
    }

}

/* ========================================
   財富森林收支紀錄
   Version 5.0 深夜模式
======================================== */

body.night-mode .wealth-records {
    border-color: rgba(150, 180, 158, 0.14);
    background: rgba(45, 52, 47, 0.92);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

body.night-mode .wealth-records-title {
    color: #d7e3da;
}

body.night-mode .wealth-record-add-button {
    background: #587762;
    color: #ffffff;
}

body.night-mode .wealth-record-add-button:hover {
    background: #668a71;
}

body.night-mode .wealth-record-empty {
    color: #92a099;
}

/* ========================================
   新增收支表單
   Version 5.0 Desktop 樣式
======================================== */

.wealth-record-form {
    margin-bottom: 24px;
    padding: 24px;

    border: 1px solid rgba(79, 128, 95, 0.14);
    border-radius: 16px;

    background: rgba(245, 249, 246, 0.88);
}

.wealth-record-form-title {
    margin: 0 0 22px;
    color: #355c42;
    font-size: 19px;
}

.wealth-form-field {
    display: grid;
    grid-template-columns: 90px 1fr;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.wealth-form-field label {
    color: #5f6f64;
    font-size: 14px;
    font-weight: 600;
}

.wealth-form-field input,
.wealth-form-field select {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 13px;

    border: 1px solid rgba(79, 128, 95, 0.2);
    border-radius: 10px;

    background: #ffffff;
    color: #3f4f44;

    font: inherit;
}

.wealth-form-field input:focus,
.wealth-form-field select:focus {
    outline: none;
    border-color: #6d9678;
    box-shadow: 0 0 0 3px rgba(109, 150, 120, 0.12);
}

.wealth-budget-input-wrap {
    display: grid;
    grid-template-columns: 34px 1fr;
    align-items: center;
    gap: 8px;
}

.wealth-budget-input {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 13px;

    border: 1px solid rgba(79, 128, 95, 0.2);
    border-radius: 10px;

    background: #ffffff;
    color: #3f4f44;

    font: inherit;
}

.wealth-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 22px;
}

.wealth-form-cancel-button,
.wealth-form-save-button {
    padding: 10px 18px;
    border-radius: 11px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.wealth-form-cancel-button {
    border: 1px solid rgba(79, 128, 95, 0.22);
    background: transparent;
    color: #66756b;
}

.wealth-form-save-button {
    border: none;
    background: #5f8a6c;
    color: #ffffff;
}

.wealth-form-save-button:hover {
    background: #4f785c;
}

/* ========================================
   新增收支表單
   Version 5.0 手機版樣式
======================================== */

@media (max-width: 700px) {

    .wealth-record-form {
        padding: 20px 16px;
    }

    .wealth-record-form-title {
        margin-bottom: 20px;
    }

    .wealth-form-field {
    display: block;
    min-width: 0;
    margin-bottom: 16px;
}

    .wealth-form-field label {
        display: block;
        margin-bottom: 8px;
    }

    /* 財富森林｜手機日期欄位避免超出表單 */
/* 財富森林｜iPhone 日期欄位寬度修正 */
#wealthRecordDate {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;

    -webkit-appearance: none;
    appearance: none;
}
    .wealth-form-actions {
        flex-direction: column-reverse;
        gap: 10px;
    }

    .wealth-form-cancel-button,
    .wealth-form-save-button {
        width: 100%;
    }

}

/* ========================================
   新增收支表單
   Version 5.0 深夜模式
======================================== */

body.night-mode .wealth-record-form {
    border-color: rgba(150, 180, 158, 0.14);
    background: rgba(38, 46, 41, 0.92);
}

body.night-mode .wealth-record-form-title {
    color: #d7e3da;
}

body.night-mode .wealth-form-field label {
    color: #aebbb2;
}

body.night-mode .wealth-form-field input,
body.night-mode .wealth-form-field select {
    border-color: rgba(150, 180, 158, 0.18);
    background: #343b36;
    color: #e1e8e3;
    color-scheme: dark;
}

body.night-mode .wealth-form-field input::placeholder {
    color: #7f8982;
}

body.night-mode .wealth-form-field input:focus,
body.night-mode .wealth-form-field select:focus {
    border-color: #789783;
    box-shadow: 0 0 0 3px rgba(120, 151, 131, 0.14);
}

body.night-mode .wealth-form-cancel-button {
    border-color: rgba(150, 180, 158, 0.22);
    background: transparent;
    color: #bdc9c0;
}

body.night-mode .wealth-form-save-button {
    background: #587762;
    color: #ffffff;
}

body.night-mode .wealth-form-save-button:hover {
    background: #668a71;
}

/* ========================================
   財富森林收支紀錄項目
   Version 5.0 Desktop 樣式
======================================== */

.wealth-record-list {
    display: grid;
    gap: 12px;
}

.wealth-record-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    padding: 18px 20px;

    border: 1px solid rgba(79, 128, 95, 0.12);
    border-radius: 14px;

    background: rgba(255, 255, 255, 0.7);
}

.wealth-record-main {
    min-width: 0;
}

.wealth-record-category {
    margin-bottom: 4px;

    color: #405e49;
    font-size: 16px;
    font-weight: 700;
}

.wealth-record-note {
    margin-bottom: 6px;

    overflow: hidden;
    color: #657269;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wealth-record-meta {
    color: #929c95;
    font-size: 12px;
}

.wealth-record-amount {
    flex-shrink: 0;

    font-size: 17px;
    font-weight: 700;
    white-space: nowrap;
}

.wealth-record-item.income .wealth-record-amount {
    color: #4f8060;
}

.wealth-record-item.expense .wealth-record-amount {
    color: #a8645e;
}

/* ========================================
   財富森林收支紀錄項目
   Version 5.0 深夜模式
======================================== */

body.night-mode .wealth-record-item {
    border-color: rgba(150, 180, 158, 0.14);
    background: rgba(48, 57, 51, 0.92);
}

body.night-mode .wealth-record-category {
    color: #d2ded5;
}

body.night-mode .wealth-record-note {
    color: #aeb9b1;
}

body.night-mode .wealth-record-meta {
    color: #7f8d84;
}

body.night-mode .wealth-record-item.income
.wealth-record-amount {
    color: #83ad8e;
}

body.night-mode .wealth-record-item.expense
.wealth-record-amount {
    color: #cf8880;
}

/* ========================================
   財富森林刪除按鈕
   Version 5.0 Desktop 樣式
======================================== */

.wealth-record-side {
    display: flex;
    flex-shrink: 0;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.wealth-record-delete-button {
    padding: 6px 12px;

    border: 1px solid rgba(168, 100, 94, 0.18);
    border-radius: 8px;

    background: transparent;
    color: #9a6a65;

    font-size: 13px;
    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.wealth-record-delete-button:hover {
    border-color: rgba(168, 100, 94, 0.32);
    background: rgba(168, 100, 94, 0.08);
    color: #985b55;
}

/* 財富森林刪除按鈕・深夜模式 */

body.night-mode .wealth-record-delete-button {
    border-color: rgba(207, 136, 128, 0.2);
    background: transparent;
    color: #bd817b;
}

body.night-mode .wealth-record-delete-button:hover {
    border-color: rgba(207, 136, 128, 0.36);
    background: rgba(207, 136, 128, 0.1);
    color: #dc9891;
}

/* 財富森林本月結餘顏色 */

#wealthMonthlyBalance.positive,
#wealthLedgerMonthlyBalance.positive {
    color: #4f8060;
}

#wealthMonthlyBalance.negative,
#wealthLedgerMonthlyBalance.negative {
    color: #a8645e;
}

/* 深夜模式 */

body.night-mode #wealthMonthlyBalance.positive,
body.night-mode #wealthLedgerMonthlyBalance.positive {
    color: #83ad8e;
}

body.night-mode #wealthMonthlyBalance.negative,
body.night-mode #wealthLedgerMonthlyBalance.negative {
    color: #cf8880;
}

/* 財富森林本月支出顏色 */

#wealthMonthlyExpense,
#wealthLedgerMonthlyExpense {
    color: #a8645e;
}

/* 深夜模式 */

body.night-mode #wealthMonthlyExpense,
body.night-mode #wealthLedgerMonthlyExpense {
    color: #cf8880;
}

/* ========================================
   財富森林紀錄操作按鈕
   Version 5.0
======================================== */

.wealth-record-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.wealth-record-edit-button,
.wealth-record-delete-button {
    min-width: 58px;
    padding: 6px 12px;

    border-radius: 8px;

    font-size: 13px;
    line-height: 1.4;
    cursor: pointer;
}

.wealth-record-edit-button {
    border: 1px solid rgba(104, 135, 112, 0.22);
    background: rgba(104, 135, 112, 0.08);
    color: #617d68;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.wealth-record-edit-button:hover {
    border-color: rgba(104, 135, 112, 0.38);
    background: rgba(104, 135, 112, 0.14);
    color: #4f7059;
}

/* 財富森林編輯按鈕・深夜模式 */

body.night-mode .wealth-record-edit-button {
    border-color: rgba(132, 169, 141, 0.22);
    background: rgba(132, 169, 141, 0.08);
    color: #9cbea4;
}

body.night-mode .wealth-record-edit-button:hover {
    border-color: rgba(132, 169, 141, 0.38);
    background: rgba(132, 169, 141, 0.14);
    color: #b3d0ba;
}

/* ========================================
   財富森林分類篩選
   Version 5.0
======================================== */

.wealth-filter-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;

    margin: 18px 0 14px;
}

.wealth-filter-row label {
    color: #718277;
    font-size: 13px;
    white-space: nowrap;
}

.wealth-filter-row select {
    min-width: 150px;
    padding: 8px 34px 8px 12px;

    border: 1px solid rgba(104, 135, 112, 0.2);
    border-radius: 10px;

    background-color: rgba(255, 255, 255, 0.65);
    color: #53685a;

    font-size: 13px;
    cursor: pointer;
    outline: none;

    transition:
        border-color 0.2s ease,
        background-color 0.2s ease;
}

.wealth-filter-row select:hover,
.wealth-filter-row select:focus {
    border-color: rgba(104, 135, 112, 0.42);
    background-color: rgba(255, 255, 255, 0.9);
}

/* 財富森林分類篩選・深夜模式 */

body.night-mode .wealth-filter-row label {
    color: #9ca9a0;
}

body.night-mode .wealth-filter-row select {
    border-color: rgba(132, 169, 141, 0.2);
    background-color: rgba(255, 255, 255, 0.04);
    color: #b8c7bc;
}

body.night-mode .wealth-filter-row select:hover,
body.night-mode .wealth-filter-row select:focus {
    border-color: rgba(132, 169, 141, 0.4);
    background-color: rgba(255, 255, 255, 0.07);
}

/* 財富森林分類篩選・深夜模式 */

body.night-mode .wealth-filter-row label {
    color: #9ca9a0;
}

body.night-mode .wealth-filter-row select {
    border-color: rgba(132, 169, 141, 0.2);
    background-color: rgba(255, 255, 255, 0.04);
    color: #b8c7bc;
}

body.night-mode .wealth-filter-row select:hover,
body.night-mode .wealth-filter-row select:focus {
    border-color: rgba(132, 169, 141, 0.4);
    background-color: rgba(255, 255, 255, 0.07);
}

/* 中央首頁・時區與模組入口間距 */
#home .forest-modules {
    margin-top: 28px;
}
/* =========================
   時光森林｜深夜模式
========================= */

body.night-mode .time-forest-title {
    color: #eef3ef;
}

body.night-mode .time-forest-subtitle,
body.night-mode .time-countdown-label,
body.night-mode .time-countdown-unit,
body.night-mode .time-countdown-date {
    color: #92a099;
}

body.night-mode .time-countdown-card,
body.night-mode .time-forest-upcoming,
body.night-mode .time-tree-edit-panel {
    background: rgba(45, 52, 47, 0.92);
    border-color: rgba(150, 180, 158, 0.14);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

body.night-mode .time-countdown-title,
body.night-mode .time-countdown-number,
body.night-mode .time-forest-upcoming-title {
    color: #d7e3da;
}

body.night-mode .time-forest-upcoming-subtitle {
    color: #92a099;
}

body.night-mode .time-forest-upcoming-item {
    background: rgba(150, 180, 158, 0.08);
    color: #d7dfd9;
}

body.night-mode .time-forest-upcoming-countdown {
    color: #d7e3da;
}

body.night-mode .time-tree-edit-panel label {
    color: #d7dfd9;
}

body.night-mode .time-tree-edit-button {
    background: #587762;
    color: #ffffff;
}

body.night-mode .time-tree-edit-button:hover {
    background: #668a71;
}

body.night-mode .time-forest-list-title {
    color: #eef3ef;
}

/* =========================
   首頁｜繼續上次寫作卡片
========================= */

.continue-box {
    max-width: 320px;
    padding: 18px 20px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.5);
}

.continue-label {
    font-size: 0.95rem;
    color: #6f806f;
    margin-bottom: 8px;
}

.continue-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #2f4f3f;
    margin-bottom: 6px;
}

.continue-date {
    font-size: 0.88rem;
    color: #8a948d;
    margin-bottom: 12px;
}

#continueWritingButton {
    padding: 10px 16px;
    font-size: 0.95rem;
    border-radius: 12px;
}

/* =========================
   首頁｜繼續上次寫作卡片｜深夜模式
========================= */

body.night-mode .continue-box {
    background: rgba(45, 52, 47, 0.92);
    border: 1px solid rgba(150, 180, 158, 0.14);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

body.night-mode .continue-label {
    color: #92a099;
}

body.night-mode .continue-title {
    color: #eef3ef;
}

body.night-mode .continue-date {
    color: #d7dfd9;
}

body.night-mode #continueWritingButton {
    background: #587762;
    color: #ffffff;
}

body.night-mode #continueWritingButton:hover {
    background: #668a71;
}

/* =========================
   時光森林｜時間樹搜尋
========================= */

.time-tree-search {
    margin: 14px 0 16px;
}

#timeTreeSearchInput {
    width: 100%;
    max-width: 360px;
    padding: 11px 14px;
    border: 1px solid rgba(83, 111, 91, 0.18);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
    color: #365443;
    font-size: 0.95rem;
    outline: none;
}

#timeTreeSearchInput:focus {
    border-color: rgba(83, 111, 91, 0.38);
}

.time-tree-search-result-count {
    min-height: 20px;
    margin: -6px 0 12px;
    font-size: 0.88rem;
    color: #7f8d84;
}

/* =========================
   時光森林｜時間樹搜尋｜深夜模式
========================= */

body.night-mode #timeTreeSearchInput {
    background: rgba(45, 52, 47, 0.92);
    border-color: rgba(150, 180, 158, 0.14);
    color: #eef3ef;
}

body.night-mode .time-forest-event-item {
    background: rgba(45, 52, 47, 0.92);
    border-color: rgba(150, 180, 158, 0.14);
    color: #eef3ef;
}


body.night-mode #timeTreeSearchInput::placeholder {
    color: #92a099;
}

body.night-mode #timeTreeSearchInput:focus {
    border-color: rgba(150, 180, 158, 0.32);
}

body.night-mode .time-tree-search-result-count {
    color: #92a099;
}

/* Time Forest｜時光森林內部分頁導航。 */
  
.time-section-nav {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 12px auto 20px;
}

.time-section-nav button {
    border: 0;
    border-radius: 999px;
    padding: 8px 16px;
    background: transparent;
    color: #66756a;
    cursor: pointer;
}

/* Time Forest｜標示目前所在的內部分頁。 */
.time-section-nav button.is-active {
    background: rgba(111, 148, 103, 0.12);
    color: #355d46;
    font-weight: 600;
}

/* =========================
   財富森林｜月份瀏覽
========================= */

.wealth-month-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 6px 0 18px;
}

#wealthPreviousMonthButton,
#wealthNextMonthButton {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: none;
    font-size: 1rem;
    cursor: pointer;
}

#wealthSelectedMonth {
    min-width: 120px;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
}

button#wealthSelectedMonth {
    padding: 0;
    border: none;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

#wealthPreviousMonthButton:disabled,
#wealthNextMonthButton:disabled {
    opacity: 0.35;
    cursor: default;
}

/* =========================
   財富森林｜支出分類統計
========================= */

.wealth-expense-summary {
    margin: 18px 0 22px;
}

.wealth-expense-summary-title {
    margin-bottom: 14px;
}

.wealth-expense-summary-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.wealth-expense-summary-header
.wealth-expense-summary-title {
    margin-bottom: 0;
}

/* ======================================
   財富森林｜設定本月預算次要按鈕
====================================== */
#openWealthBudgetButton {
    background: transparent;
    color: #6f8f7b;
    border: 1px solid rgba(111, 143, 123, 0.45);
    box-shadow: none;
}

#openWealthBudgetButton:hover {
    background: rgba(111, 143, 123, 0.08);
    border-color: rgba(111, 143, 123, 0.65);
}

.wealth-expense-category-summary {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wealth-expense-category-summary > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(245, 247, 244, 0.9);
}

/* Wealth Forest｜新版消費分佈改回垂直結構，避免舊分類列 flex 規則干擾。 */
.wealth-expense-category-summary > .wealth-distribution-item {
    display: block;
    padding: 14px 0;
    background: transparent;
    border-radius: 0;
}

/* Wealth Forest｜新版消費分佈金額恢復為輕量右側數值。 */
.wealth-distribution-main .wealth-expense-category-amount {
    width: auto;
    display: block;
    flex: 0 0 auto;
    text-align: right;
}

.wealth-budget-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 28px;
    max-width: 680px;
    margin-bottom: 18px;
}

.wealth-budget-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    max-width: 680px;
}

.wealth-expense-category-name {
    font-weight: 600;
    color: #355d46;
}

.wealth-expense-category-amount {
    font-weight: 600;
}

/* ========================================
   財富森林｜支出分類預算資訊
======================================== */

.wealth-expense-category-amount {
    width: min(520px, 68%);
    display: grid;
    grid-template-columns: repeat(3, minmax(100px, 1fr));
    gap: 24px;
}

.wealth-budget-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.wealth-budget-stat-label {
    color: #849088;
    font-size: 12px;
    font-weight: 500;
}

.wealth-budget-stat > span:last-child {
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
}

/* ========================================
   財富森林｜支出分類預算資訊 Mobile
======================================== */

@media (max-width: 700px) {

  .wealth-expense-category-summary > div {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.wealth-expense-category-name {
    width: auto;
    text-align: left;
}

.wealth-expense-category-amount {
    width: auto;
    max-width: none;
    display: block;
    margin-left: auto;
    text-align: right;
    white-space: nowrap;
}

    .wealth-budget-stat {
        width: 100%;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

/* =========================
   財富森林｜支出分類統計｜深夜模式
========================= */

body.night-mode
.wealth-expense-category-summary > div {
    background: rgba(45, 52, 47, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

body.night-mode
.wealth-expense-category-name {
    color: #d7e3da;
}

body.night-mode
.wealth-expense-category-amount {
    color: #eef3ef;
}

/* =========================
   Forest OS｜通用頁面轉場
========================= */

.forest-view-enter {
    animation: forestViewFadeIn 0.2s ease;
}

@keyframes forestViewFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ========================================
   Learning Forest｜學習森林
   ======================================== */

.learning-forest-header {
    text-align: center;
}

.learning-song-add-button {
    margin-bottom: 14px;
}

@media (min-width: 769px) {
    .learning-forest-page {
        position: relative;
    }

    .learning-forest-sync-area {
        position: absolute;
        top: 0;
        right: 0;
    }
}

.learning-song-add-panel {
    padding: 16px;
    margin-bottom: 18px;

    border: 1px solid rgba(79, 128, 95, 0.12);
    border-radius: 14px;

    background: rgba(255, 255, 255, 0.45);
}

.learning-song-add-panel label {
    display: block;
    margin-bottom: 12px;

    font-size: 14px;
}

.learning-song-add-panel input {
    display: block;
    width: 100%;
    box-sizing: border-box;

    margin-top: 6px;
    padding: 9px 10px;

    border: 1px solid rgba(79, 128, 95, 0.2);
    border-radius: 8px;

    font-size: 15px;
}

.learning-song-add-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.learning-song-detail-back {
    margin-bottom: 18px;
}

.learning-song-detail-back {
    margin-bottom: 18px;
}

.learning-song-summary-card {
    position: relative;
}

@media (min-width: 769px) {
    .learning-song-edit-button {
        position: absolute;
        top: 16px;
        right: 18px;

        padding: 4px 6px;

        border: none;
        background: transparent;

        color: #657269;
        font-size: 13px;
        cursor: pointer;
    }

    .learning-song-edit-button:hover {
        background: rgba(79, 128, 95, 0.08);
        border-radius: 8px;
    }
}

#learningLyricList {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
}
/* ========================================
   Learning Forest｜歌曲詳情｜歌曲資料編輯
   ======================================== */

.learning-song-edit-panel {
    width: 100%;
    max-width: 400px;

    margin: 24px auto 0;

    text-align: left;
}

.learning-song-edit-panel label {
    display: block;

    margin-bottom: 12px;

    color: #5f6d63;
    font-size: 14px;
}

.learning-song-edit-panel input {
    display: block;
    width: 100%;
    box-sizing: border-box;

    margin-top: 6px;
    padding: 9px 10px;

    border: 1px solid rgba(79, 128, 95, 0.2);
    border-radius: 8px;

    font-size: 15px;
}

.learning-song-edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;

    margin-top: 16px;
}

.learning-song-edit-actions button {
    padding: 7px 12px;

    font-size: 13px;
}

/* ========================================
   Learning Forest｜歌曲列表卡片
   Version 6.4
======================================== */

.learning-song-list {
    display: grid;
    gap: 8px;

    width: 100%;
    max-width: 560px;
    margin: 0 auto;
}

.learning-song-item {
    position: relative;
    padding: 12px 16px;

    border: 1px solid rgba(79, 128, 95, 0.12);
    border-radius: 14px;

    background: rgba(255, 255, 255, 0.7);

    cursor: pointer;
}

.learning-song-card-title {
    margin-bottom: 6px;

    color: #2f3a32;
    font-size: 18px;
    font-weight: 700;
}

.learning-song-card-chinese-title {
    margin-bottom: 4px;

    color: #5f6d63;
    font-size: 15px;
}

.learning-song-card-artist {
    margin-bottom: 0;

    color: #879189;
    font-size: 13px;
}

.learning-song-delete-button {
    position: absolute;
    top: 12px;
    right: 12px;

    padding: 6px 9px;

    border: 1px solid rgba(168, 100, 94, 0.16);
    border-radius: 10px;

    background: rgba(168, 100, 94, 0.08);

    color: #a8645e;
    font-size: 13px;
}

.learning-lyric-delete-button {
    padding: 6px 9px;

    border: 1px solid rgba(168, 100, 94, 0.16);
    border-radius: 10px;

    background: rgba(168, 100, 94, 0.08);

    color: #a8645e;
    font-size: 13px;
    cursor: pointer;
}

body.night-mode .learning-lyric-delete-button {
    border-color: rgba(207, 136, 128, 0.18);
    background: rgba(207, 136, 128, 0.08);

    color: #cf8880;
}

.learning-song-library {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
}

.learning-song-more-button {
    justify-self: center;

    padding: 10px 20px;
    border: 1px solid #d9e3da;
    border-radius: 999px;

    background: rgba(250, 252, 249, 0.9);

    color: #45654d;
    font-size: 14px;
    cursor: pointer;
}

.learning-song-more-button:hover {
    background: #eef4ee;
}

body.night-mode .learning-song-more-button {
    border-color: #3b4b40;
    background: #29342d;
    color: #c9d7cc;
}
/* ========================================
   Learning Forest｜歌曲列表卡片
   Version 6.4 深夜模式
======================================== */

body.night-mode .learning-song-item {
    border-color: rgba(150, 180, 158, 0.14);
    background: rgba(48, 57, 51, 0.92);
}

body.night-mode .learning-song-card-title {
    color: #d2ded5;
}

body.night-mode .learning-song-card-chinese-title {
    color: #aeb9b1;
}

body.night-mode .learning-song-card-artist {
    color: #7f8d84;
}

body.night-mode .learning-song-delete-button {
    border-color: rgba(207, 136, 128, 0.18);
    background: rgba(207, 136, 128, 0.08);

    color: #cf8880;
}

/* ========================================
   Learning Forest｜歌詞句子卡片
   Version 6.4
======================================== */

.learning-lyric-list {
    display: grid;
    gap: 12px;
}

.learning-lyric-item {
     position: relative;
    padding: 18px 20px;

    border: 1px solid rgba(79, 128, 95, 0.12);
    border-radius: 14px;

    background: rgba(255, 255, 255, 0.7);
}

.learning-lyric-edit-button {
    position: absolute;
    top: 12px;
    right: 14px;

    padding: 4px 6px;

    border: none;
    background: transparent;

    color: #657269;
    font-size: 13px;
    cursor: pointer;
}

.learning-lyric-edit-button:hover {
    background: rgba(79, 128, 95, 0.08);
    border-radius: 8px;
}

/* ========================================
   Learning Forest｜歌詞句子卡片
   Version 6.4 深夜模式
======================================== */

body.night-mode .learning-lyric-item {
    border-color: rgba(150, 180, 158, 0.14);
    background: rgba(48, 57, 51, 0.92);
}

/* ========================================
   Learning Forest｜歌詞文字層級
   Version 6.4
======================================== */

.learning-lyric-number {
    margin-bottom: 4px;

    color: #929c95;
    font-size: 12px;
    font-weight: 600;
}

.learning-lyric-thai {
    margin-bottom: 5px;

    color: #2f3a32;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.6;
}

.learning-lyric-romanization {
    margin-bottom: 5px;

    color: #657269;
    font-size: 14px;
    line-height: 1.5;
}

.learning-lyric-chinese {
    margin-bottom: 8px;

    color: #405e49;
    font-size: 15px;
    line-height: 1.6;
}

.learning-lyric-status {
    margin-bottom: 12px;

    color: #879189;
    font-size: 13px;
}

body.night-mode .learning-lyric-number {
    color: #7f8d84;
}

body.night-mode .learning-lyric-thai {
    color: #d2ded5;
}

body.night-mode .learning-lyric-romanization {
    color: #9aa9a0;
}

body.night-mode .learning-lyric-chinese {
    color: #b8c7bc;
}

body.night-mode .learning-lyric-status {
    color: #8fa097;
}

/* ========================================
   Learning Forest｜歌詞操作按鈕
   Version 6.4
======================================== */

.learning-lyric-edit-button,
.learning-lyric-delete-button,
.learning-lyric-analysis-button {
    padding: 8px 11px;

    border-radius: 10px;

    font-size: 13px;
}

/* 編輯｜次要操作 */
.learning-lyric-edit-button {
    border: 1px solid rgba(79, 128, 95, 0.12);
    background: rgba(79, 128, 95, 0.06);

    color: #5f6d63;
}

/* 刪除｜危險操作 */
.learning-lyric-delete-button {
    border: 1px solid rgba(168, 100, 94, 0.16);
    background: rgba(168, 100, 94, 0.08);

    color: #a8645e;
}

/* 拆解｜主要操作 */
.learning-lyric-analysis-button {
    border: 1px solid rgba(79, 128, 95, 0.18);
    background: rgba(79, 128, 95, 0.12);

    color: #405e49;
    font-weight: 600;
}

body.night-mode .learning-lyric-edit-button {
    border-color: rgba(150, 180, 158, 0.12);
    background: rgba(150, 180, 158, 0.06);

    color: #aeb9b1;
}

body.night-mode .learning-lyric-delete-button {
    border-color: rgba(207, 136, 128, 0.18);
    background: rgba(207, 136, 128, 0.08);

    color: #cf8880;
}

body.night-mode .learning-lyric-analysis-button {
    border-color: rgba(150, 180, 158, 0.18);
    background: rgba(150, 180, 158, 0.10);

    color: #c6d5ca;
}

/* ========================================
   Learning Forest｜單句複習｜單詞閱讀區
   ======================================== */

.learning-lyric-word-section {
    width: 100%;
    max-width: 640px;
    box-sizing: border-box;

    margin: 32px auto 0;
    padding: 0;

    border: none;
    border-radius: 0;

    background: transparent;
}

/* ========================================
   Learning Forest｜單句複習｜單詞標題列
   ======================================== */

.learning-lyric-word-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;

    margin-bottom: 14px;
}

.learning-lyric-word-header h4 {
    margin: 0;
}

.learning-lyric-word-add-button {
    min-height: 36px;
    padding: 6px 10px;

    border: none;
    border-radius: 8px;
    background: transparent;

    color: #5f6d63;
    font-size: 14px;
    cursor: pointer;
}

.learning-lyric-word-add-button:hover {
    background: rgba(79, 128, 95, 0.08);
}

/* ========================================
   Learning Forest｜逐句拆解分析區
   Version 6.4
======================================== */

.learning-lyric-analysis-section {
    margin-top: 16px;
    padding: 18px 20px;

    border: 1px solid rgba(79, 128, 95, 0.12);
    border-radius: 14px;

    background: rgba(255, 255, 255, 0.7);
}

/* ========================================
   Learning Forest｜單句複習｜單詞閱讀區
   ======================================== */

.learning-lyric-analysis-section.learning-lyric-word-section {
    width: 100%;
    max-width: 640px;
    box-sizing: border-box;

    margin: 32px auto 0;
    padding: 0;

    border: none;
    border-radius: 0;

    background: transparent;
}

body.night-mode .learning-lyric-analysis-section {
    border-color: rgba(150, 180, 158, 0.14);
    background: rgba(48, 57, 51, 0.92);
}

.learning-lyric-analysis-section label {
    display: block;

    margin-top: 12px;
    margin-bottom: 6px;

    font-weight: 600;
}

.learning-lyric-analysis-section textarea,
.learning-lyric-analysis-section input {
    display: block;

    width: 100%;
    box-sizing: border-box;

    margin-bottom: 12px;
}

.learning-lyric-analysis-section textarea,
.learning-lyric-analysis-section input {
    padding: 10px 12px;

    border: 1px solid rgba(79, 128, 95, 0.16);
    border-radius: 10px;

    background: rgba(255, 255, 255, 0.82);

    color: #2f3a32;
    font: inherit;
    line-height: 1.6;
}

.learning-lyric-analysis-section textarea:focus,
.learning-lyric-analysis-section input:focus {
    outline: none;

    border-color: rgba(79, 128, 95, 0.38);
}

body.night-mode .learning-lyric-analysis-section textarea,
body.night-mode .learning-lyric-analysis-section input {
    border-color: rgba(150, 180, 158, 0.14);
    background: rgba(34, 42, 37, 0.9);

    color: #d2ded5;
}

body.night-mode .learning-lyric-analysis-section textarea::placeholder,
body.night-mode .learning-lyric-analysis-section input::placeholder {
    color: #7f8d84;
}

body.night-mode .learning-lyric-analysis-section textarea:focus,
body.night-mode .learning-lyric-analysis-section input:focus {
    border-color: rgba(150, 180, 158, 0.32);
}

/* ========================================
   Learning Forest｜分析區操作按鈕
   Version 6.4
======================================== */

.learning-lyric-analysis-section > button {
    padding: 9px 13px;

    border: 1px solid rgba(79, 128, 95, 0.16);
    border-radius: 10px;

    background: rgba(79, 128, 95, 0.10);

    color: #405e49;
    font-size: 13px;
    font-weight: 600;
}

body.night-mode .learning-lyric-analysis-section > button {
    border-color: rgba(150, 180, 158, 0.16);
    background: rgba(150, 180, 158, 0.08);

    color: #c6d5ca;
}

/* ========================================
   Learning Forest｜逐詞拆解小卡
   Version 6.4
======================================== */

.learning-lyric-word-list {
    display: grid;
    gap: 0;

    margin-top: 14px;
}

.learning-lyric-word-item {
    position: relative;

    padding: 12px 52px 12px 2px;

    border: none;
    border-bottom: 1px solid rgba(79, 128, 95, 0.12);
    border-radius: 0;

    background: transparent;
}

/* ========================================
   Learning Forest｜單句複習｜單詞選項
   ======================================== */

.learning-lyric-word-options-button {
    position: absolute;
    top: 12px;
    right: 2px;

    width: 40px;
    height: 40px;
    padding: 0;

    border: none;
    border-radius: 10px;
    background: transparent;

    color: #657269;
    font-size: 14px;
    cursor: pointer;
}

.learning-lyric-word-options-button:hover {
    background: rgba(79, 128, 95, 0.08);
}
body.night-mode .learning-lyric-word-item {
    border-bottom-color: rgba(150, 180, 158, 0.12);
    background: transparent;
}

.learning-lyric-word-thai {
    margin-bottom: 4px;

    color: #2f3a32;
    font-size: 17px;
    font-weight: 700;
}

.learning-lyric-word-meta {
    margin-bottom: 4px;

    color: #657269;
    font-size: 13px;
}

.learning-lyric-word-meaning {
    margin-bottom: 10px;

    color: #405e49;
    font-size: 15px;
}

body.night-mode .learning-lyric-word-thai {
    color: #d2ded5;
}

body.night-mode .learning-lyric-word-meta {
    color: #9aa9a0;
}

body.night-mode .learning-lyric-word-meaning {
    color: #b8c7bc;
}

.learning-lyric-word-edit-button,
.learning-lyric-word-delete-button {
    padding: 7px 10px;

    border-radius: 10px;

    font-size: 13px;
}

/* 編輯 */
.learning-lyric-word-edit-button {
    border: 1px solid rgba(79, 128, 95, 0.12);
    background: rgba(79, 128, 95, 0.06);

    color: #5f6d63;
}

/* 刪除 */
.learning-lyric-word-delete-button {
    border: 1px solid rgba(168, 100, 94, 0.16);
    background: rgba(168, 100, 94, 0.08);

    color: #a8645e;
}

body.night-mode .learning-lyric-word-edit-button {
    border-color: rgba(150, 180, 158, 0.12);
    background: rgba(150, 180, 158, 0.06);

    color: #aeb9b1;
}

body.night-mode .learning-lyric-word-delete-button {
    border-color: rgba(207, 136, 128, 0.18);
    background: rgba(207, 136, 128, 0.08);

    color: #cf8880;
}

/* ========================================
   Learning Forest｜單句複習｜羅馬拼音閱讀區
   ======================================== */

.learning-lyric-romanization-section {
    margin-top: 16px;
    padding: 0;

    border: none;
    border-radius: 0;

    background: transparent;
}

/* ========================================
   Learning Forest｜單句複習｜羅馬拼音列
   ======================================== */

.learning-lyric-romanization-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.learning-lyric-romanization-edit-button {
    width: 36px;
    height: 36px;
    padding: 0;

    border: none;
    border-radius: 8px;
    background: transparent;

    cursor: pointer;
}

.learning-lyric-romanization-edit-button:hover {
    background: rgba(79, 128, 95, 0.08);
}

/* ========================================
   Learning Forest｜歌曲詳情資訊卡
   Version 6.4
======================================== */

.learning-song-summary-card {
    position: relative;

    max-width: 620px;
    margin: 52px auto 0;
    padding: 34px 30px;

    border: 1px solid rgba(79, 128, 95, 0.16);
    border-radius: 24px;

    background: rgba(255, 255, 255, 0.58);

    text-align: center;

    box-shadow:
        0 10px 30px rgba(47, 96, 71, 0.06);
}

.learning-song-summary-card h2 {
    margin-top: 0;
    margin-bottom: 10px;
}

.learning-song-summary-card
#learningSongDetailChineseTitle {
    margin-bottom: 4px;

    color: #5f6d63;
}

.learning-song-summary-card
#learningSongDetailArtist {
    margin-bottom: 12px;

    color: #879189;
    font-size: 14px;
}

.learning-song-summary-card
.learning-song-progress {
    margin-top: 12px;

    color: #657269;
    font-size: 14px;
}

/* ========================================
   Learning Forest｜本曲重點詞彙
   ======================================== */

.learning-song-summary {
    margin-top: 24px;
}

.learning-song-summary-content {
    margin-top: 14px;
    max-width: 760px;
}
.learning-summary-section {
    margin-bottom: 26px;
}

.learning-summary-section-title {
    margin: 0 0 10px;

    font-size: 16px;
    font-weight: 700;
}

.learning-summary-word {
    padding: 10px 0;

    border-bottom:
        1px solid rgba(79, 128, 95, 0.12);
}

.learning-summary-word:last-child {
    border-bottom: none;
}

.learning-summary-word-thai {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.5;
}

.learning-summary-word-romanization {
    margin-top: 2px;

    font-size: 13px;
    line-height: 1.5;

    opacity: 0.62;
}

.learning-summary-word-meaning {
    margin-top: 2px;

    font-size: 14px;
    line-height: 1.5;
}

.learning-summary-word-usage {
    margin-top: 4px;

    font-size: 13px;
    line-height: 1.55;

    opacity: 0.72;
}

body.night-mode .learning-song-summary-card {
    border-color: rgba(150, 180, 158, 0.14);
    background: rgba(48, 57, 51, 0.92);
}

body.night-mode .learning-song-summary-card
#learningSongDetailChineseTitle {
    color: #aeb9b1;
}

body.night-mode .learning-song-summary-card
#learningSongDetailArtist {
    color: #7f8d84;
}

body.night-mode .learning-song-summary-card
.learning-song-progress {
    color: #9aa9a0;
}

/* ========================================
   Forest OS Home｜Living Desktop Mobile
   Version 6.5
======================================== */

@media (max-width: 600px) {

    .forest-home-primary-grid {
        grid-template-columns: 1fr;
        gap: 14px;

        padding: 0 18px;
    }

        .forest-modules {
        grid-template-columns: 1fr;

        padding: 0 18px;
    }

}

/* ===== 文字森林｜文章列表展開按鈕 ===== */

.article-list-more {
    display: flex;
    justify-content: center;
    margin: 18px 0 26px;
}

#showAllArticlesButton {
    padding: 10px 20px;
    border: 1px solid #d9e3da;
    border-radius: 999px;
    background: rgba(250, 252, 249, 0.9);
    color: #45654d;
    font-size: 14px;
    cursor: pointer;
}

#showAllArticlesButton:hover {
    background: #eef4ee;
}

body.night-mode #showAllArticlesButton {
    border-color: #3b4b40;
    background: #29342d;
    color: #c9d7cc;
}

body.night-mode #showAllArticlesButton:hover {
    background: #324038;
}

/* =========================================
   Forest OS｜全域導覽
   五座森林共用的頂部入口。
   ========================================= */

.forest-global-nav {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 6px;

    width: 100%;
    padding: 12px 14px;

    background: rgba(57, 51, 42, 0.96);

    overflow-x: auto;
    white-space: nowrap;

    scrollbar-width: none;
}

.forest-global-nav::-webkit-scrollbar {
    display: none;
}

.forest-global-nav button {
    flex: 0 0 auto;

    border: none;
    background: transparent;

    padding: 8px 13px;
    border-radius: 20px;

    color: #CFC6B4;

    font-size: 13px;
    font-weight: 500;

    cursor: pointer;
}

.forest-global-nav button:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #FFFDF8;
}

.forest-global-nav button.is-active {
    background: rgba(255, 255, 255, 0.16);
    color: #FFFDF8;
    font-weight: 600;
}

/* Mobile 只縮短森林名稱，保留完整五個全域入口。 */
.forest-nav-mobile-label {
    display: none;
}

@media (max-width: 600px) {

    .forest-global-nav {
        gap: 2px;
        padding: 10px 8px;
        justify-content: center;
    }

    .forest-global-nav button {
        padding: 8px 9px;
        font-size: 12px;
    }

    .forest-nav-desktop-label {
        display: none;
    }

    .forest-nav-mobile-label {
        display: inline;
    }
}


.writing-section-nav {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 8px auto 24px;
}

.writing-section-nav button {
    border: 0;
    border-radius: 999px;
    padding: 8px 16px;
    background: transparent;
    color: #66756a;
    cursor: pointer;
}

.writing-section-nav button.is-active {
    background: rgba(91, 138, 95, 0.12);
    color: #355f45;
    font-weight: 700;
}

/* Writing 首頁暫時隱藏成長統計，先驗證更安靜的寫作入口。 */
#writingForestView .forest-growth {
    display: none;
}


    /* Writing 首頁的森林近況只保留最近動靜，拿掉今日統計摘要。 */
#writingForestView .forest-journal-timeline {
    display: none;
}

#writingForestView .forest-overview-grid {
    grid-template-columns: 1fr;
}

/* Writing 首頁的森林近況收窄，讓最近動靜更像輕量紀錄而不是大型面板。 */
#writingForestView .forest-info {
    max-width: 760px;
    margin: 0 auto 18px;
    box-sizing: border-box;
}

/* Writing 首頁的森林近況改成輕量區域，不再像大型資訊卡。 */
#writingForestView .forest-info {
    max-width: 760px;
    margin: 0 auto 18px;
    box-sizing: border-box;

    background: transparent;
    border: 0;
    border-radius: 0;
}

/* Writing Forest｜Desktop 書架把新增、同步與更多整理成同一條工具列。 */
@media (min-width: 681px) {
    .forest-actions {
        display: flex;
        justify-content: center;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 18px;
    }

    .forest-actions .new-button {
    width: 140px;
    margin: 0;
    box-sizing: border-box;
}

    .forest-actions .forest-tools {
        margin-bottom: 0;
    }
    
    /* Desktop 書架工具列保持同一高度，最後同步時間留給較需要狀態提示的 Mobile。 */
.forest-actions .forest-sync-time {
    display: none;
}
}


.wealth-section-nav {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 12px auto 20px;
}

.wealth-section-nav button {
    border: 0;
    border-radius: 999px;
    padding: 8px 16px;
    background: transparent;
    color: #66756a;
    cursor: pointer;
}

.wealth-section-nav button.is-active {
    background: rgba(91, 138, 95, 0.12);
    color: #355f45;
    font-weight: 700;
}

/* Wealth Forest｜概覽快速記帳入口。 */
.wealth-quick-entry {
    display: flex;
    justify-content: center;
    margin: 18px 0;
}

/* Wealth Forest｜概覽快速記帳入口保持清楚，但不搶過月度焦點。 */
.wealth-quick-entry button {
    padding: 10px 20px;

    border: 1px solid
        rgba(111, 148, 103, 0.22);

    border-radius: 12px;

    background:
        rgba(111, 148, 103, 0.12);

    color: #355d46;

    font-weight: 650;

    cursor: pointer;
}

/* Wealth Forest｜概覽消費分佈，以輕量進度顯示實際支出與預算。 */
.wealth-distribution-item {
    padding: 14px 0;
    border-bottom: 1px solid rgba(91, 138, 95, 0.12);
}

.wealth-distribution-item:last-child {
    border-bottom: 0;
}

.wealth-distribution-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.wealth-distribution-track {
    height: 7px;
    margin-top: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(91, 138, 95, 0.10);
}

.wealth-distribution-progress {
    height: 100%;
    border-radius: inherit;
    background: #6f9467;
}

.wealth-distribution-meta {
    margin-top: 7px;
    color: #879087;
    font-size: 0.78rem;
}

/* Wealth Forest｜流水交易列分成主要資訊與次要操作兩層。 */
.wealth-ledger-entry-row > td {
    padding: 14px 0;
}

.wealth-ledger-entry-main {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
}

.wealth-ledger-entry-note {
    font-weight: 600;
}

.wealth-ledger-entry-amount {
    flex: 0 0 auto;
    font-weight: 700;
    text-align: right;
}

.wealth-ledger-entry-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    margin-top: 5px;
}

.wealth-ledger-entry-meta .wealth-ledger-edit-button {
    margin-left: auto;
}

.wealth-ledger-entry-category {
    color: #879087;
    font-size: 0.82rem;
}