/* ========== 全局變量 ========== */
:root {
    --bg-base: #FFF8F0;
    --bg-card: #FFFFFF;
    --bg-soft: #FDF1E5;
    --color-pink: #F4C2C2;
    --color-pink-deep: #E8A5A5;
    --color-mint: #B5EAD7;
    --color-mint-deep: #8FD9C0;
    --color-lavender: #C7CEEA;
    --color-lavender-deep: #A5ADD8;
    --color-peach: #FFDAC1;
    --color-yellow: #FFF1A8;
    --color-cream: #FFE8D6;
    --text-main: #5C4D3C;
    --text-sub: #9A8A78;
    --text-light: #C7B8A6;
    --border-soft: #F0E5D8;
    --shadow-soft: 0 4px 20px rgba(184, 152, 122, 0.08);
    --shadow-hover: 0 8px 28px rgba(184, 152, 122, 0.15);
    --shadow-sidebar: 4px 0 20px rgba(184, 152, 122, 0.08);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 999px;
    --font-zh: 'Comic Sans MS', 'Comic Sans', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --font-hand: 'Caveat', 'Ma Shan Zheng', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', cursive, sans-serif;
    --font-en: 'Caveat', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', cursive, sans-serif;
}

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

html, body {
    font-family: var(--font-zh);
    color: var(--text-main);
    background: var(--bg-base);
    background-image:
        radial-gradient(circle at 10% 0%, rgba(244, 194, 194, 0.15) 0%, transparent 35%),
        radial-gradient(circle at 90% 10%, rgba(181, 234, 215, 0.18) 0%, transparent 40%),
        radial-gradient(circle at 50% 100%, rgba(199, 206, 234, 0.12) 0%, transparent 45%);
    min-height: 100vh;
    line-height: 1.6;
    font-size: 14px;
    /* VIVO / Android 瀏覽器優化 */
    -webkit-text-size-adjust: 100% !important;
    -webkit-tap-highlight-color: transparent;
    text-size-adjust: 100%;
    /* 防止小桌面模式橫向溢出 */
    overflow-x: hidden;
    max-width: 100vw;
}

/* VIVO / Android 瀏覽器專屬：確保 body 使用實際視口寬度 */
html[data-vivo] body {
    min-width: 100vw;
    width: 100vw;
}

button {
    font-family: inherit;
    border: none;
    background: none;
    cursor: pointer;
    color: inherit;
}

input, textarea, select {
    font-family: inherit;
    color: var(--text-main);
    background: var(--bg-soft);
    border: 1.5px solid var(--border-soft);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    outline: none;
    transition: all 0.2s;
    font-size: 14px;
}

input:focus, textarea:focus, select:focus {
    border-color: var(--color-pink-deep);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(244, 194, 194, 0.2);
}

textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

/* ========== 頂部導航 ========== */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 16px 32px;
    background: rgba(255, 248, 240, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1.5px dashed var(--border-soft);
}

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

.brand-emoji {
    font-size: 32px;
    filter: drop-shadow(0 2px 4px rgba(244, 194, 194, 0.4));
}

.brand-text h1 {
    font-family: var(--font-hand);
    font-size: 26px;
    color: var(--color-pink-deep);
    line-height: 1.2;
    font-weight: normal;
    letter-spacing: 1px;
}

.brand-sub {
    font-size: 12px;
    color: var(--text-sub);
    margin-top: 2px;
}

.tabs {
    display: flex;
    gap: 8px;
    background: var(--bg-soft);
    padding: 6px;
    border-radius: var(--radius-pill);
    box-shadow: inset 0 2px 6px rgba(184, 152, 122, 0.08);
}

.tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-sub);
    transition: all 0.25s;
}

.tab:hover {
    color: var(--text-main);
}

.tab.active {
    background: #fff;
    color: var(--color-pink-deep);
    box-shadow: var(--shadow-soft);
}

.tab-emoji {
    font-size: 16px;
}

.topbar-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.weather {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg-card);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-soft);
    font-size: 13px;
    color: var(--text-sub);
}

.date-pill {
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--color-pink) 0%, var(--color-peach) 100%);
    color: #fff;
    border-radius: var(--radius-pill);
    font-weight: 500;
    font-size: 13px;
    box-shadow: 0 4px 12px rgba(244, 194, 194, 0.3);
}

/* ========== 頂部 Strip：心情 + 金句 ========== */
.top-strip {
    background: linear-gradient(135deg, #FFF1E6 0%, #FFE0EC 50%, #E8F8F0 100%);
    border-bottom: 1.5px dashed var(--color-pink);
    position: relative;
    overflow: hidden;
}

.top-strip::before {
    content: '🌷';
    position: absolute;
    left: -10px;
    bottom: -30px;
    font-size: 100px;
    opacity: 0.06;
    transform: rotate(-10deg);
}

.top-strip::after {
    content: '✨';
    position: absolute;
    right: 5%;
    top: 10px;
    font-size: 30px;
    opacity: 0.4;
    animation: twinkle 2s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1) rotate(15deg); }
}

.top-strip-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 14px 32px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 24px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.mood-strip, .quote-strip {
    display: flex;
    align-items: center;
    gap: 12px;
}

.strip-label {
    font-family: var(--font-hand);
    font-size: 16px;
    color: var(--color-pink-deep);
    white-space: nowrap;
}

.mood-picker {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.7);
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-soft);
}

.mood {
    font-size: 22px;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.2s;
    filter: grayscale(0.4);
}

.mood:hover {
    transform: scale(1.2);
}

.mood.active {
    filter: grayscale(0);
    background: var(--bg-soft);
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(244, 194, 194, 0.3);
}

.quote-strip {
    flex: 1;
    min-width: 0;
}

.quote-inline {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: rgba(255, 255, 255, 0.6);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    border-left: 3px solid var(--color-pink);
    min-width: 0;
}

.quote-inline .quote-zh {
    font-family: var(--font-hand);
    font-size: 18px;
    color: var(--text-main);
    line-height: 1.3;
    letter-spacing: 1px;
}

.quote-inline .quote-en {
    font-family: var(--font-en);
    font-size: 14px;
    color: var(--text-sub);
    line-height: 1.2;
    font-style: italic;
}

/* 顶部 strip 中的"换一句"按钮 */
.quote-strip .btn-mini {
    flex-shrink: 0;
    padding: 4px 10px;
    font-size: 14px;
    background: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1.5px solid var(--color-pink);
    color: var(--color-pink-deep);
}

.quote-strip .btn-mini:hover {
    background: var(--color-pink);
    color: #fff;
    transform: rotate(180deg);
}

/* ========== 主區：左任務欄 + 右內容 ========== */
.main {
    max-width: 1320px;
    margin: 0 auto;
    padding: 24px 32px 100px;
}

.view {
    display: none;
    animation: fadeIn 0.4s ease;
}

.view.active {
    display: block;
}

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

.view-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 20px;
    align-items: start;
}

/* ========== 左側任務欄 ========== */
.task-sidebar {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sidebar);
    border: 1.5px dashed var(--color-pink);
    position: sticky;
    top: 90px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1.5px dashed var(--border-soft);
}

.sidebar-header h3 {
    font-family: var(--font-hand);
    font-size: 22px;
    color: var(--color-pink-deep);
    font-weight: normal;
    letter-spacing: 1px;
}

.sidebar-date {
    background: linear-gradient(135deg, var(--color-pink) 0%, var(--color-peach) 100%);
    color: #fff;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 500;
}

.sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-section-head h4 {
    font-size: 13px;
    color: var(--text-sub);
    font-weight: 500;
}

.badge {
    background: var(--color-mint);
    color: var(--text-main);
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 8px;
    font-weight: 500;
}

/* Sidebar 內的 6 項打卡 */
.side-checkin {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.side-checkin li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 8px;
    background: var(--bg-soft);
    transition: all 0.2s;
    cursor: pointer;
    font-size: 13px;
}

.side-checkin li:hover {
    background: var(--color-pink);
    color: #fff;
}

.side-checkin li.done {
    background: linear-gradient(135deg, #E8F8F0 0%, #D4F0E0 100%);
    color: var(--text-main);
}

.side-checkin .sc-emoji {
    font-size: 18px;
}

.side-checkin .sc-name {
    flex: 1;
}

.side-checkin .sc-status {
    font-size: 11px;
    color: var(--text-sub);
}

.side-checkin li.done .sc-status {
    color: var(--color-mint-deep);
    font-weight: 500;
}

.side-checkin .sc-counter {
    display: flex;
    align-items: center;
    gap: 4px;
}

.side-checkin .sc-counter button {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    color: var(--text-sub);
    font-size: 10px;
    line-height: 1;
}

.side-checkin .sc-counter button:hover {
    background: var(--color-pink);
    color: #fff;
}

.side-checkin .sc-counter span {
    font-size: 11px;
    min-width: 28px;
    text-align: center;
}

/* Sidebar 內的待辦 */
.side-todo {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 160px;
    overflow-y: auto;
}

.side-todo li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 6px;
    font-size: 12px;
    border-radius: 6px;
    transition: background 0.2s;
}

.side-todo li:hover {
    background: var(--bg-soft);
}

.side-todo .check {
    width: 14px;
    height: 14px;
    border: 1.5px solid var(--color-pink);
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
}

.side-todo .check.checked {
    background: var(--color-pink);
}

.side-todo .check.checked::after {
    content: '✓';
    color: #fff;
    font-size: 10px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.side-todo .text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.side-todo .text.done {
    text-decoration: line-through;
    color: var(--text-light);
}

.side-todo .del {
    color: var(--text-light);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
}

.side-todo li:hover .del {
    opacity: 1;
}

.side-input {
    display: flex;
    gap: 4px;
}

.side-input input {
    flex: 1;
    font-size: 12px;
    padding: 4px 8px;
    min-width: 0;
}

.side-input .btn-mini {
    padding: 2px 10px;
    font-size: 12px;
}

/* Sidebar 月度進度 */
.side-month {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.side-month .sm-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
}

.side-month .sm-item span:first-child {
    flex: 1;
    color: var(--text-sub);
}

.side-month .sm-bar {
    width: 60px;
    height: 6px;
    background: var(--bg-soft);
    border-radius: 3px;
    overflow: hidden;
}

.side-month .sm-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-mint) 0%, var(--color-mint-deep) 100%);
    border-radius: 3px;
}

.side-month .sm-val {
    color: var(--text-main);
    font-weight: 500;
    width: 30px;
    text-align: right;
    font-family: var(--font-hand);
    font-size: 13px;
}

/* Sidebar 記帳 */
.side-money {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.side-money-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.side-money-row span {
    color: var(--text-sub);
}

.side-money-row strong {
    font-family: var(--font-hand);
    color: var(--color-pink-deep);
    font-size: 15px;
}

.progress-bar {
    height: 10px;
    background: var(--bg-soft);
    border-radius: 5px;
    overflow: hidden;
    margin-top: 4px;
}

.progress-bar.mini {
    height: 6px;
    border-radius: 3px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-mint) 0%, var(--color-pink) 100%);
    border-radius: 5px;
    transition: width 0.4s;
}

/* Sidebar 創業 SOP */
.side-sop {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.side-sop li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 8px;
    background: var(--bg-soft);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.side-sop li:hover {
    background: var(--color-mint);
}

.side-sop li.done {
    background: linear-gradient(135deg, #E8F8F0 0%, #D4F0E0 100%);
}

.side-sop .check {
    width: 14px;
    height: 14px;
    border: 1.5px solid var(--color-mint-deep);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 1px;
    cursor: pointer;
    position: relative;
}

.side-sop .check.checked {
    background: var(--color-mint-deep);
}

.side-sop .check.checked::after {
    content: '✓';
    color: #fff;
    font-size: 10px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.side-sop .text {
    flex: 1;
    line-height: 1.4;
}

.side-sop .text.done {
    text-decoration: line-through;
    color: var(--text-light);
}

.side-sop .tag {
    background: var(--color-peach);
    color: var(--text-main);
    font-size: 9px;
    padding: 1px 5px;
    border-radius: 6px;
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 2px;
}

/* Sidebar 靈感 */
.side-inspiration {
    background: linear-gradient(135deg, #FFF8F0 0%, #FFE0EC 100%);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 12px;
    line-height: 1.6;
}

.side-inspiration .si-title {
    font-family: var(--font-hand);
    font-size: 14px;
    color: var(--color-pink-deep);
    margin-bottom: 4px;
    display: block;
}

.side-inspiration ul {
    list-style: none;
    padding: 0;
}

.side-inspiration li {
    padding: 2px 0 2px 14px;
    position: relative;
}

.side-inspiration li::before {
    content: '✿';
    position: absolute;
    left: 0;
    color: var(--color-pink);
    font-size: 10px;
}

/* Sidebar 當前主理貓 */
.side-cat {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-soft);
    padding: 10px;
    border-radius: var(--radius-md);
}

.side-cat .sc-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.side-cat .sc-info {
    flex: 1;
    min-width: 0;
}

.side-cat .sc-name {
    font-family: var(--font-hand);
    font-size: 16px;
    color: var(--text-main);
    line-height: 1.2;
}

.side-cat .sc-persona {
    font-size: 11px;
    color: var(--text-sub);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Sidebar 發布 */
.side-publish {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.side-fab-review {
    width: 100%;
    margin-top: 4px;
    padding: 8px 12px;
    font-size: 12px;
}

/* ========== 右側內容 ========== */
.view-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

/* 簡化歡迎條 */
.welcome-strip {
    background: linear-gradient(135deg, #fff 0%, var(--bg-soft) 100%);
    border-radius: var(--radius-lg);
    padding: 18px 24px;
    box-shadow: var(--shadow-soft);
    border: 1.5px dashed var(--color-pink);
    position: relative;
    overflow: hidden;
}

.welcome-strip::before {
    content: '🌷';
    position: absolute;
    right: -10px;
    bottom: -20px;
    font-size: 100px;
    opacity: 0.08;
    transform: rotate(-15deg);
}

.welcome-title {
    font-family: var(--font-hand);
    font-size: 28px;
    color: var(--color-pink-deep);
    font-weight: normal;
    letter-spacing: 1px;
}

.welcome-sub {
    color: var(--text-sub);
    margin-top: 2px;
    font-size: 13px;
}

/* ========== Section 通用 ========== */
.section {
    margin-bottom: 0;
}

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.section-title {
    font-family: var(--font-hand);
    font-size: 22px;
    color: var(--text-main);
    font-weight: normal;
    letter-spacing: 1px;
    position: relative;
    padding-left: 14px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 22px;
    background: linear-gradient(180deg, var(--color-pink) 0%, var(--color-peach) 100%);
    border-radius: 3px;
}

.section-sub {
    font-size: 12px;
    color: var(--text-sub);
}

.btn-mini {
    padding: 6px 14px;
    background: var(--bg-card);
    border: 1.5px solid var(--color-pink);
    border-radius: var(--radius-pill);
    color: var(--color-pink-deep);
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-mini:hover {
    background: var(--color-pink);
    color: #fff;
    transform: translateY(-1px);
}

.btn-primary {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--color-pink) 0%, var(--color-peach) 100%);
    color: #fff;
    border-radius: var(--radius-pill);
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(244, 194, 194, 0.35);
    transition: all 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(244, 194, 194, 0.5);
}

.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }

/* ========== Planner Tabs ========== */
.planner-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-soft);
    padding: 4px;
    border-radius: var(--radius-pill);
    margin-bottom: 16px;
    width: fit-content;
}

.planner-tab {
    padding: 8px 20px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    color: var(--text-sub);
    font-weight: 500;
    transition: all 0.25s;
}

.planner-tab.active {
    background: #fff;
    color: var(--color-pink-deep);
    box-shadow: var(--shadow-soft);
}

.planner-panel {
    display: none;
}

.planner-panel.active {
    display: block;
    animation: fadeIn 0.3s;
}

/* ========== 每日手帳 ========== */
.planner-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.planner-block {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-soft);
    border: 1.5px solid var(--border-soft);
}

.planner-block h4 {
    font-size: 15px;
    margin-bottom: 12px;
    color: var(--text-main);
}

.todo-list {
    list-style: none;
    min-height: 120px;
}

.todo-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 4px;
    border-bottom: 1px dashed var(--border-soft);
    font-size: 14px;
}

.todo-list li:last-child { border: none; }

.todo-list .check {
    width: 18px;
    height: 18px;
    border: 2px solid var(--color-pink);
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
    position: relative;
}

.todo-list .check.checked {
    background: var(--color-pink);
}

.todo-list .check.checked::after {
    content: '✓';
    color: #fff;
    font-size: 12px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.todo-list .text {
    flex: 1;
    color: var(--text-main);
    transition: all 0.2s;
}

.todo-list .text.done {
    text-decoration: line-through;
    color: var(--text-light);
}

.todo-list .del {
    color: var(--text-light);
    font-size: 16px;
    padding: 0 4px;
    transition: color 0.2s;
}

.todo-list .del:hover { color: var(--color-pink-deep); }

.todo-input-wrap {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.todo-input-wrap input {
    flex: 1;
    font-size: 13px;
    padding: 6px 10px;
}

#dayDiary {
    width: 100%;
    min-height: 160px;
    font-size: 13px;
}

/* ========== 每週手帳 ========== */
.week-board {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.week-day {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 12px 8px;
    box-shadow: var(--shadow-soft);
    border: 1.5px solid var(--border-soft);
    min-height: 160px;
    display: flex;
    flex-direction: column;
}

.week-day.today {
    border-color: var(--color-pink-deep);
    background: linear-gradient(135deg, #fff 0%, #FFF1E6 100%);
}

.week-day-head {
    text-align: center;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--border-soft);
    margin-bottom: 8px;
}

.week-day-name {
    font-size: 12px;
    color: var(--text-sub);
}

.week-day-date {
    font-family: var(--font-hand);
    font-size: 20px;
    color: var(--text-main);
}

.week-day.today .week-day-date { color: var(--color-pink-deep); }

.week-day textarea {
    flex: 1;
    border: none;
    background: transparent;
    resize: none;
    font-size: 12px;
    padding: 4px;
    color: var(--text-main);
}

.week-day textarea:focus {
    background: var(--bg-soft);
    border-radius: 6px;
}

.week-goal {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    box-shadow: var(--shadow-soft);
    border: 1.5px dashed var(--color-mint);
}

.week-goal h4 { margin-bottom: 8px; font-size: 14px; }

.week-goal input { width: 100%; }

/* ========== 每月手帳 ========== */
.month-layout {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 16px;
}

.month-calendar {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-soft);
    border: 1.5px solid var(--border-soft);
}

.cal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.cal-title {
    font-family: var(--font-hand);
    font-size: 22px;
    color: var(--color-pink-deep);
}

.cal-nav button {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-soft);
    color: var(--text-sub);
    transition: all 0.2s;
}

.cal-nav button:hover {
    background: var(--color-pink);
    color: #fff;
}

.cal-week, .cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.cal-week span {
    text-align: center;
    font-size: 11px;
    color: var(--text-sub);
    padding: 6px 0;
}

.cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-main);
    transition: all 0.2s;
    cursor: pointer;
    position: relative;
}

.cal-day:hover {
    background: var(--bg-soft);
}

.cal-day.muted { color: var(--text-light); }
.cal-day.today {
    background: linear-gradient(135deg, var(--color-pink) 0%, var(--color-peach) 100%);
    color: #fff;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(244, 194, 194, 0.4);
}
.cal-day.has-event::after {
    content: '';
    position: absolute;
    bottom: 4px;
    width: 4px;
    height: 4px;
    background: var(--color-mint-deep);
    border-radius: 50%;
}

.month-side {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-soft);
    border: 1.5px solid var(--border-soft);
}

.wish-list {
    list-style: none;
}

.wish-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 4px;
    border-bottom: 1px dashed var(--border-soft);
    font-size: 13px;
}

.wish-list .star {
    color: var(--color-pink);
    cursor: pointer;
}

.wish-list .text { flex: 1; }
.wish-list .del { color: var(--text-light); cursor: pointer; }

.month-progress {
    display: grid;
    gap: 8px;
}

.mp-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
}

.mp-item span:first-child {
    width: 80px;
    color: var(--text-sub);
}

.mp-item .bar {
    flex: 1;
    height: 8px;
    background: var(--bg-soft);
    border-radius: 4px;
    overflow: hidden;
}

.mp-item .fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-mint) 0%, var(--color-mint-deep) 100%);
    border-radius: 4px;
    transition: width 0.4s;
}

.mp-item .val {
    width: 36px;
    text-align: right;
    color: var(--text-main);
    font-weight: 500;
}

/* ========== 記帳 ========== */
.money-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 16px;
}

.money-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-content: start;
}

.money-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-soft);
    border: 1.5px solid var(--border-soft);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.money-card.money-bar { grid-column: span 2; }

.money-label {
    font-size: 12px;
    color: var(--text-sub);
}

.money-value {
    font-family: var(--font-hand);
    font-size: 26px;
    color: var(--color-pink-deep);
}

.money-value input {
    font-family: var(--font-hand);
    font-size: 22px;
    color: var(--color-pink-deep);
    background: transparent;
    border: none;
    padding: 0;
    width: 100px;
}

.money-form {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-soft);
    border: 1.5px solid var(--border-soft);
}

.form-row {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr auto;
    gap: 8px;
    margin-bottom: 4px;
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

.form-row input, .form-row select,
.form-row-2 input, .form-row-2 select,
.form-row-3 input, .form-row-3 select {
    font-size: 13px;
    padding: 6px 10px;
}

.expense-list {
    list-style: none;
    max-height: 240px;
    overflow-y: auto;
}

.expense-list li {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 10px;
    align-items: center;
    padding: 8px 4px;
    border-bottom: 1px dashed var(--border-soft);
    font-size: 13px;
}

.expense-list .cat {
    font-size: 18px;
}

.expense-list .amt {
    font-family: var(--font-hand);
    font-size: 16px;
    color: var(--color-pink-deep);
}

.expense-list .del {
    color: var(--text-light);
    cursor: pointer;
    font-size: 16px;
}

.empty-tip {
    text-align: center;
    color: var(--text-light);
    font-size: 13px;
    padding: 20px;
}

/* ========== 創業手帳 ========== */
.cat-matrix {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}

.cat-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 14px 8px;
    text-align: center;
    box-shadow: var(--shadow-soft);
    border: 2px solid transparent;
    transition: all 0.25s;
    cursor: pointer;
    position: relative;
}

.cat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.cat-card.active {
    border-color: var(--color-pink-deep);
    background: linear-gradient(135deg, #fff 0%, #FFF1E6 100%);
}

.cat-card.active::before {
    content: '★';
    position: absolute;
    top: 4px;
    right: 8px;
    color: var(--color-pink);
    font-size: 14px;
}

.cat-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}

.cat-name {
    font-family: var(--font-hand);
    font-size: 18px;
    color: var(--text-main);
    margin-bottom: 2px;
}

.cat-platforms {
    font-size: 10px;
    color: var(--text-sub);
    display: flex;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.cat-platforms span {
    background: var(--bg-soft);
    padding: 1px 6px;
    border-radius: 8px;
}

/* ========== 爆款熱點 ========== */
.hot-filters {
    display: flex;
    gap: 6px;
    align-items: center;
}

.hot-tab {
    padding: 6px 14px;
    background: var(--bg-soft);
    border-radius: var(--radius-pill);
    font-size: 12px;
    color: var(--text-sub);
    transition: all 0.2s;
}

.hot-tab.active {
    background: linear-gradient(135deg, var(--color-pink) 0%, var(--color-peach) 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(244, 194, 194, 0.4);
}

.hot-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.hot-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 14px;
    box-shadow: var(--shadow-soft);
    border: 1.5px solid var(--border-soft);
    transition: all 0.25s;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.hot-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.hot-rank {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--color-pink) 0%, var(--color-peach) 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.hot-cover {
    width: 100%;
    aspect-ratio: 16/10;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    margin-top: 8px;
}

.hot-title {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hot-meta {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-sub);
}

.hot-meta .stat {
    display: flex;
    align-items: center;
    gap: 3px;
}

.hot-tag {
    display: inline-block;
    background: var(--color-mint);
    color: var(--text-main);
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 8px;
    align-self: flex-start;
}

/* 爆款统计 */
.hot-stats {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.hot-stat {
    background: var(--bg-card);
    border-radius: var(--radius-pill);
    padding: 6px 14px;
    font-size: 12px;
    color: var(--text-sub);
    border: 1.5px solid var(--border-soft);
    display: flex;
    align-items: center;
    gap: 4px;
}

.hot-stat strong {
    font-family: var(--font-hand);
    color: var(--color-pink-deep);
    font-size: 15px;
    font-weight: normal;
}

.hot-stat.done strong { color: var(--color-mint-deep); }
.hot-stat.fav strong { color: #E8B05A; }

/* 新增爆款表单 */
.add-hot-form {
    background: linear-gradient(135deg, #FFF1E6 0%, #FFE0EC 100%);
    border-radius: var(--radius-md);
    padding: 16px;
    border: 1.5px dashed var(--color-pink);
    margin-bottom: 16px;
}

.add-hot-form h4 {
    margin-bottom: 8px;
    color: var(--color-pink-deep);
    font-size: 14px;
}

/* 爆款卡片状态 */
.hot-card .status-row {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.hot-card .status-btn {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 8px;
    background: var(--bg-soft);
    color: var(--text-sub);
    transition: all 0.2s;
    cursor: pointer;
    border: 1px solid transparent;
}

.hot-card .status-btn:hover {
    transform: translateY(-1px);
}

.hot-card .status-btn.active.pending {
    background: var(--color-peach);
    color: var(--text-main);
    border-color: var(--color-peach);
}

.hot-card .status-btn.active.done {
    background: var(--color-mint-deep);
    color: #fff;
    border-color: var(--color-mint-deep);
}

.hot-card .status-btn.active.favorite {
    background: #FFD78A;
    color: var(--text-main);
    border-color: #FFD78A;
}

.hot-card .del-hot {
    position: absolute;
    bottom: 8px;
    right: 8px;
    color: var(--text-light);
    cursor: pointer;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s;
    opacity: 0;
}

.hot-card:hover .del-hot {
    opacity: 1;
}

.hot-card .del-hot:hover {
    color: var(--color-pink-deep);
    background: var(--bg-soft);
}

.hot-card .platform-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

/* ========== 每天正能量 5 句網格 ========== */
.energy-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.energy-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 14px 12px;
    box-shadow: var(--shadow-soft);
    border: 1.5px solid var(--border-soft);
    transition: all 0.3s;
    cursor: default;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 140px;
    position: relative;
    overflow: hidden;
}

.energy-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-pink) 0%, var(--color-peach) 50%, var(--color-mint) 100%);
}

.energy-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.energy-card .ec-num {
    font-family: var(--font-en);
    font-size: 28px;
    color: var(--color-pink);
    line-height: 1;
    opacity: 0.6;
}

.energy-card .ec-zh {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-main);
    flex: 1;
    font-weight: 500;
}

.energy-card .ec-en {
    font-family: var(--font-en);
    font-size: 12px;
    color: var(--text-sub);
    font-style: italic;
    line-height: 1.3;
}

.energy-card .ec-tag {
    align-self: flex-start;
    background: var(--color-cream);
    color: var(--text-sub);
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 6px;
}

/* ========== 二次改編建議 ========== */
.remix-board {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.remix-card {
    background: linear-gradient(135deg, #FFF1E6 0%, #FFF8F0 100%);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    border: 1.5px dashed var(--color-pink);
    position: relative;
}

.remix-card::before {
    content: '🪄';
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 22px;
    opacity: 0.5;
}

.remix-from {
    font-size: 11px;
    color: var(--text-sub);
    margin-bottom: 6px;
}

.remix-from strong { color: var(--color-pink-deep); }

.remix-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 8px;
}

.remix-script {
    font-size: 12px;
    color: var(--text-sub);
    line-height: 1.6;
    background: rgba(255, 255, 255, 0.6);
    padding: 10px;
    border-radius: 10px;
}

/* ========== 復盤 ========== */
.review-layout {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 16px;
}

.review-form, .review-list {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-soft);
    border: 1.5px solid var(--border-soft);
}

.review-form h4, .review-list h4 { margin-bottom: 12px; }

.form-col {
    display: grid;
    gap: 8px;
}

.form-col textarea {
    min-height: 60px;
    font-size: 13px;
}

.review-item {
    background: var(--bg-soft);
    border-radius: var(--radius-md);
    padding: 14px;
    margin-bottom: 10px;
    border-left: 4px solid var(--color-pink);
}

.review-item-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.review-item-title {
    font-weight: 500;
    font-size: 14px;
    color: var(--text-main);
}

.review-item-meta {
    font-size: 11px;
    color: var(--text-sub);
}

.review-item-stats {
    display: flex;
    gap: 12px;
    margin: 8px 0;
}

.review-item-stats span {
    font-size: 11px;
    color: var(--text-sub);
    background: #fff;
    padding: 2px 8px;
    border-radius: 8px;
}

.review-item-stats strong {
    color: var(--color-pink-deep);
    font-family: var(--font-hand);
    font-size: 14px;
    margin-left: 4px;
}

.review-item-note {
    font-size: 12px;
    color: var(--text-sub);
    margin: 6px 0;
    line-height: 1.5;
}

.review-suggestion {
    background: linear-gradient(135deg, #FFF1E6 0%, #E8F8F0 100%);
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-main);
    margin-top: 8px;
}

.review-suggestion::before {
    content: '💡 優化建議：';
    font-weight: 500;
    color: var(--color-pink-deep);
}

.review-suggestion .bad { color: #C97B7B; text-decoration: line-through; opacity: 0.7; }
.review-suggestion .good { color: #5BA88E; font-weight: 500; }

/* ========== 浮動復盤按鈕 ========== */
.fab {
    position: fixed;
    right: 32px;
    bottom: 32px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 22px;
    background: linear-gradient(135deg, var(--color-pink) 0%, var(--color-peach) 100%);
    color: #fff;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(244, 194, 194, 0.5);
    transition: all 0.3s;
    cursor: pointer;
}

.fab:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 12px 32px rgba(244, 194, 194, 0.6);
}

.fab-emoji {
    font-size: 18px;
    animation: shake 3s ease-in-out infinite;
}

@keyframes shake {
    0%, 90%, 100% { transform: rotate(0); }
    92% { transform: rotate(-10deg); }
    94% { transform: rotate(10deg); }
    96% { transform: rotate(-5deg); }
    98% { transform: rotate(5deg); }
}

/* ========== 模態彈窗 ========== */
.modal-mask {
    position: fixed;
    inset: 0;
    background: rgba(92, 77, 60, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: fadeIn 0.2s;
}

.modal-mask.show {
    display: flex;
}

.modal {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    border: 1.5px dashed var(--color-pink);
    animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
    from { opacity: 0; transform: scale(0.85) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1.5px dashed var(--border-soft);
    background: linear-gradient(135deg, #FFF1E6 0%, #FFE0EC 100%);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-head h3 {
    font-family: var(--font-hand);
    font-size: 22px;
    color: var(--color-pink-deep);
    font-weight: normal;
    letter-spacing: 1px;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    font-size: 20px;
    color: var(--text-sub);
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--color-pink);
    color: #fff;
    transform: rotate(90deg);
}

.modal-body {
    padding: 20px 24px 24px;
}

.modal-hint {
    font-size: 12px;
    color: var(--text-sub);
    margin-bottom: 12px;
    background: var(--bg-soft);
    padding: 8px 12px;
    border-radius: 8px;
    border-left: 3px solid var(--color-mint);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}

/* ========== Footer ========== */
.footer {
    text-align: center;
    padding: 24px;
    color: var(--text-sub);
    font-size: 12px;
    border-top: 1.5px dashed var(--border-soft);
    margin-top: 20px;
}

/* ========== 滾動條 ========== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--color-pink);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-pink-deep);
}

/* ========== 響應式 ========== */
@media (max-width: 1100px) {
    .view-grid {
        grid-template-columns: 1fr;
    }
    .task-sidebar {
        position: static;
        max-height: none;
    }
    .planner-grid, .month-layout, .money-layout, .review-layout, .remix-board, .hot-content {
        grid-template-columns: 1fr;
    }
    .topbar {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .topbar-right { justify-content: center; }
    .top-strip-inner {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .cat-matrix {
        grid-template-columns: repeat(3, 1fr);
    }
    .energy-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .main { padding: 16px; }
    .topbar { padding: 12px 16px; }
    .top-strip { padding: 10px 16px; }
    .modal { margin: 12px; max-height: 90vh; }
    .settings-entry { padding: 14px 16px; }
    .settings-entry-icon { width: 44px; height: 44px; font-size: 24px; }
    .cat-card { padding: 12px; }
    .cat-avatar { width: 48px; height: 48px; font-size: 28px; }
    .energy-card { padding: 12px; }
    .quote-strip { font-size: 13px; }
}

/* ========== VIVO 瀏覽器小桌面提示 ========== */
.vivo-tip {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}
.vivo-tip-inner {
    background: linear-gradient(135deg, #FFF8F0 0%, #FFE8EC 100%);
    border-radius: 20px;
    padding: 24px 22px;
    max-width: 360px;
    width: 100%;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    border: 2px solid #F4C2C2;
    max-height: 85vh;
    overflow-y: auto;
}
.vivo-tip-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    font-size: 24px;
    color: #9A8A78;
    cursor: pointer;
    width: 32px;
    height: 32px;
    line-height: 1;
    border-radius: 50%;
}
.vivo-tip-close:hover {
    background: rgba(244, 194, 194, 0.3);
}
.vivo-tip-icon {
    font-size: 48px;
    text-align: center;
    margin-bottom: 8px;
}
.vivo-tip-title {
    font-size: 17px;
    font-weight: 600;
    color: #5C4D3C;
    text-align: center;
    margin-bottom: 12px;
    line-height: 1.4;
}
.vivo-tip-body {
    font-size: 14px;
    color: #5C4D3C;
    line-height: 1.7;
}
.vivo-tip-body p {
    margin-bottom: 6px;
}
.vivo-tip-body ol {
    padding-left: 22px;
    margin: 8px 0 14px;
}
.vivo-tip-body ol li {
    margin-bottom: 4px;
}
.vivo-tip-btn {
    display: block;
    text-align: center;
    background: linear-gradient(135deg, #F4C2C2 0%, #FFDAC1 100%);
    color: #5C4D3C;
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 500;
    margin-top: 8px;
    box-shadow: 0 4px 12px rgba(244, 194, 194, 0.4);
    border: none;
    cursor: pointer;
    width: 100%;
}
.vivo-tip-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(244, 194, 194, 0.5);
}
    .cat-matrix {
        grid-template-columns: repeat(2, 1fr);
    }
    .week-board { grid-template-columns: repeat(4, 1fr); }
    .money-summary { grid-template-columns: 1fr; }
    .money-card.money-bar { grid-column: span 1; }
    .form-row { grid-template-columns: 1fr; }
    .form-row-3 { grid-template-columns: 1fr; }
    .fab { right: 16px; bottom: 16px; padding: 10px 16px; }
    .fab-text { display: none; }
    .fab-emoji { font-size: 22px; }
}

/* ========== 設置入口卡片 ========== */
.settings-entry {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, #fff 0%, var(--bg-soft) 100%);
    border-radius: var(--radius-lg);
    padding: 18px 22px;
    box-shadow: var(--shadow-soft);
    border: 1.5px dashed var(--color-pink);
    cursor: pointer;
    transition: all 0.25s;
    margin-top: 8px;
}

.settings-entry:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    background: linear-gradient(135deg, #FFF1E6 0%, #FFE0EC 100%);
}

.settings-entry-icon {
    font-size: 32px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(244, 194, 194, 0.3);
    flex-shrink: 0;
}

.settings-entry-text {
    flex: 1;
    min-width: 0;
}

.settings-entry-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 2px;
}

.settings-entry-sub {
    font-size: 12px;
    color: var(--text-sub);
}

.settings-entry-arrow {
    font-size: 22px;
    color: var(--color-pink-deep);
    transition: transform 0.2s;
}

.settings-entry:hover .settings-entry-arrow {
    transform: translateX(4px);
}

/* ========== 設置彈窗 ========== */
.modal-wide {
    max-width: 720px;
}

.settings-tabs {
    display: flex;
    gap: 6px;
    background: var(--bg-soft);
    padding: 4px;
    border-radius: var(--radius-pill);
    margin-bottom: 16px;
    width: fit-content;
}

.settings-tab {
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    color: var(--text-sub);
    font-weight: 500;
    transition: all 0.2s;
}

.settings-tab.active {
    background: #fff;
    color: var(--color-pink-deep);
    box-shadow: var(--shadow-soft);
}

.settings-panel {
    display: none;
}

.settings-panel.active {
    display: block;
    animation: fadeIn 0.25s;
}

.settings-section {
    margin-bottom: 20px;
}

.settings-section h4 {
    font-size: 14px;
    color: var(--text-main);
    margin-bottom: 8px;
    padding-left: 10px;
    border-left: 3px solid var(--color-pink);
}

.settings-hint {
    font-size: 11px;
    color: var(--text-sub);
    background: var(--bg-soft);
    padding: 6px 10px;
    border-radius: 6px;
    margin-bottom: 10px;
}

.settings-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.set-item {
    background: var(--bg-soft);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1.5px solid transparent;
    transition: all 0.2s;
}

.set-item:hover {
    background: #fff;
    border-color: var(--color-pink);
}

.set-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    user-select: none;
}

.set-avatar:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(244, 194, 194, 0.4);
}

.set-avatar-hint {
    position: absolute;
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-main);
    color: #fff;
    font-size: 9px;
    padding: 1px 6px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.set-avatar {
    position: relative;
}

.set-avatar:hover .set-avatar-hint {
    opacity: 1;
}

.set-fields {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    min-width: 0;
}

.set-fields.single { grid-template-columns: 1fr; }

.set-fields input {
    font-size: 12px;
    padding: 5px 8px;
    min-width: 0;
}

.set-fields label {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 10px;
    color: var(--text-sub);
    min-width: 0;
}

.set-fields label input,
.set-fields label select {
    margin-top: 2px;
}

/* 字號選項 */
.font-size-options {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.font-size-opt {
    flex: 1;
    min-width: 110px;
    background: var(--bg-soft);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.font-size-opt:hover {
    background: #fff;
}

.font-size-opt input { display: none; }

.font-size-opt span:not(.demo-text) {
    font-size: 13px;
    color: var(--text-sub);
    font-weight: 500;
}

.font-size-opt:has(input:checked) {
    background: #fff;
    border-color: var(--color-pink);
    box-shadow: 0 4px 12px rgba(244, 194, 194, 0.3);
}

.font-size-opt:has(input:checked) span:not(.demo-text) {
    color: var(--color-pink-deep);
}

.demo-text.fs-small { font-size: 11px; }
.demo-text.fs-normal { font-size: 14px; }
.demo-text.fs-large { font-size: 18px; }

/* 顏色主題預設 */
.theme-presets {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}
.theme-preset {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 2px solid var(--border-soft);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    cursor: pointer;
    transition: all 0.2s;
}
.theme-preset:hover {
    border-color: var(--color-pink);
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
}
.theme-preset.active {
    border-color: var(--color-pink-deep);
    background: var(--bg-soft);
    box-shadow: 0 0 0 3px rgba(232, 165, 165, 0.2);
}
.theme-preset-swatches {
    display: flex;
    gap: 3px;
    flex-shrink: 0;
}
.theme-preset-swatch {
    width: 18px;
    height: 28px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.theme-preset-name {
    font-size: 13px;
    color: var(--text-main);
    font-weight: 500;
    line-height: 1.3;
}

/* 字體選擇下拉 */
.settings-section select {
    font-family: inherit;
    color: var(--text-main);
    background: var(--bg-soft);
    border: 1.5px solid var(--border-soft);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    outline: none;
    transition: all 0.2s;
    width: 100%;
    cursor: pointer;
}
.settings-section select:focus {
    border-color: var(--color-pink);
    background: var(--bg-card);
}

/* 數據管理 */
.data-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.data-actions .btn-mini.danger {
    border-color: #E8A5A5;
    color: #C97B7B;
}

.data-actions .btn-mini.danger:hover {
    background: #E8A5A5;
    color: #fff;
}

.settings-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1.5px dashed var(--border-soft);
}

/* ========== Emoji 選擇器 ========== */
.modal-emoji {
    max-width: 480px;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
}

.emoji-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: var(--bg-soft);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s;
    border: 2px solid transparent;
}

.emoji-cell:hover {
    background: #fff;
    border-color: var(--color-pink);
    transform: scale(1.15);
}

/* ========== 字號全站效果 ========== */
html.font-small { font-size: 13px; }
html.font-large { font-size: 15px; }
html.font-small .welcome-title { font-size: 24px; }
html.font-large .welcome-title { font-size: 32px; }
html.font-small .section-title { font-size: 19px; }
html.font-large .section-title { font-size: 25px; }

@media (max-width: 640px) {
    .settings-tabs {
        width: 100%;
        overflow-x: auto;
    }
    .set-fields {
        grid-template-columns: 1fr;
    }
    .emoji-grid {
        grid-template-columns: repeat(6, 1fr);
    }
    .font-size-opt {
        min-width: 80px;
    }
}
