:root {
    --bg: #f7f6f4;
    --card-bg: #ffffff;
    --text: #1a1a2e;
    --text-light: #6b7a8a;
    --text-muted: #a0aab4;
    --accent: #3a5068;
    --amber: #5a7a9a;
    --amber-light: #f4f6f8;
    --divider: #eae8e4;
    --shadow: 0 1px 6px rgba(0,0,0,0.03);
    --radius: 14px;
    --font: -apple-system,"PingFang SC","Noto Sans SC","GensenRounded",sans-serif;
    --delete-bg: #d4786e;
    --delete-hover: #c06058;
    --send-bg: #5a7a9a;
    --send-hover: #4a6a8a;
    --plus-bg: #f0f2f5;
    --plus-hover: #e2e6ea;
    --menu-bg: #ffffff;
    --menu-hover: #f4f6f8;
    --nav-active: #5a7a9a;
    --nav-inactive: #a0aab4;
    --bookmark-bao: #f5ecd7;
    --bookmark-jian: #dce8f2;
    --bookmark-both: #f0e8dc;
    --bookmark-star: #c9a96e;
    --mood-tag-bg: #edf1f4;
}

*{margin:0;padding:0;box-sizing:border-box;}
body{
    font-family:var(--font);background:#e8e6e2;
    min-height:100vh;margin:0;padding:0;
}
/* 页面容器 */
.page{flex:1;display:none;flex-direction:column;overflow:hidden;}
.page.active{display:flex;}
.page-content{
    flex:1;overflow-y:auto;padding:16px 16px 12px;
    display:flex;flex-direction:column;gap:12px;
}
.page-content::-webkit-scrollbar{width:3px;}
.page-content::-webkit-scrollbar-track{background:transparent;}
.page-content::-webkit-scrollbar-thumb{background:var(--divider);border-radius:3px;}

/* 底部导航 */
.bottom-nav{
    display:flex;justify-content:center;gap:8px;
    padding:8px 16px 4px;flex-shrink:0;background:var(--bg);
}
.nav-inner{
    display:flex;gap:4px;background:var(--card-bg);
    border-radius:20px;padding:4px;box-shadow:var(--shadow);
    border:1px solid var(--divider);
}
.nav-item{
    padding:10px 18px;border-radius:16px;font-size:13px;
    color:var(--nav-inactive);cursor:pointer;transition:all 0.25s;
    white-space:nowrap;font-weight:500;border:none;
    background:transparent;font-family:var(--font);
}
.nav-item.active{
    background:var(--nav-active);color:#fff;font-weight:600;
    box-shadow:0 2px 8px rgba(90,122,154,0.25);
}
.nav-item:not(.active):hover{color:var(--text-light);background:rgba(0,0,0,0.02);}

/* 底部文字 */
.bottom-footer{
    text-align:center;font-size:10px;color:rgba(0,0,0,0.18);
    padding:4px 0 6px;flex-shrink:0;user-select:none;
    background:var(--bg);font-style:italic;letter-spacing:0.5px;
    line-height:1.6;
}
.bottom-footer.beian a{
    color:rgba(0,0,0,0.2);text-decoration:none;
    display:inline-flex;align-items:center;gap:2px;font-style:normal;
}
.bottom-footer.beian a:hover{color:rgba(0,0,0,0.4);}
.beian-icon{width:12px;height:12px;opacity:0.4;vertical-align:-1px;}
.beian-divider{margin:0 8px;color:rgba(0,0,0,0.1);}

/* 返回箭头 */
.back-arrow{
    display:inline-flex;align-items:center;gap:4px;
    font-size:14px;color:var(--amber);cursor:pointer;
    padding:4px 0;font-weight:500;background:none;border:none;
    font-family:var(--font);margin-bottom:4px;
}
.back-arrow:hover{color:var(--accent);}

/* 主页 */
.love-timer{
    background:var(--card-bg);border-radius:var(--radius);
    padding:18px 20px;box-shadow:var(--shadow);text-align:center;
    border:1px solid var(--divider);
}
.timer-label{font-size:12px;color:var(--text-muted);margin-bottom:6px;letter-spacing:0.5px;}
.timer-days{font-size:28px;font-weight:300;color:var(--text);letter-spacing:1px;}
.timer-note{font-size:10px;color:var(--text-muted);margin-top:6px;font-style:italic;}
.message-board{
    background:var(--card-bg);border-radius:var(--radius);
    padding:24px 20px;box-shadow:var(--shadow);flex:1;
    border:1px solid var(--divider);min-height:60vh;
    display:flex;flex-direction:column;
    font-family: 'GensenRounded', var(--font);
}
.board-header{
    font-size:11px;color:var(--text-muted);margin-bottom:16px;
    text-align:center;letter-spacing:0.5px;
}
.board-content{flex:1;display:flex;flex-direction:column;gap:14px;font-size:14px;line-height:1.8;color:var(--text);}
.board-sample{color:var(--text-muted);font-size:13px;line-height:1.8;}
.board-divider{border:none;border-top:1px dashed var(--divider);margin:4px 0;}

/* ========== 聊天气泡 ========== */

/* 基础气泡 */
.msg {
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
    max-width: 88%;
    margin-bottom: 10px;
    position: relative;
}

/* 用户气泡：右侧灰蓝底 */
.msg.user {
    background: rgba(90,122,154,0.1);
    color: #1a1a2e;
    border-radius: 16px 16px 4px 16px;
    margin-left: auto;
}

/* 简简回复气泡：左侧浅灰底 */
.msg.bot:not(.thinking) {
    background: #f8f7f5;
    color: #1a1a2e;
    border: 1px solid #eae8e4;
    border-radius: 16px 16px 16px 4px;
    margin-right: auto;
}

/* 简简深度思考气泡：虚线边框 */
.msg.bot.thinking {
    background: #f4f4f6;
    color: #6b7a8a;
    border: 1px dashed #c0c8d0;
    border-radius: 16px 16px 16px 4px;
    margin-right: auto;
}

/* 收藏状态：用更具体的选择器确保覆盖默认背景 */
.msg.user.bookmarked-by-bao,
.msg.bot.bookmarked-by-bao {
    background: #f5ecd7;
    box-shadow: 0 0 0 1px rgba(201,169,110,0.2);
}
.msg.user.bookmarked-by-jian,
.msg.bot.bookmarked-by-jian {
    background: #dce8f2;
    border-color: rgba(180,200,220,0.4);
}
.msg.user.bookmarked-by-both,
.msg.bot.bookmarked-by-both {
    background: #f0e8dc;
    box-shadow: 0 0 0 1.5px rgba(180,170,150,0.35);
}

/* 输入栏 */
.input-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px 14px;
    background: var(--bg);
    border-top: 1px solid var(--divider);
    flex-shrink: 0;
    position: relative;
    z-index: 10;
    min-height: 56px;
    box-sizing: border-box;
}
.input-bar > * {
    flex-shrink: 0;
}
.input-bar .input-field {
    flex: 1;
    min-width: 0;
}
.mic-btn{
    width:38px;height:38px;border-radius:50%;border:none;
    background:var(--plus-bg);cursor:pointer;display:flex;
    align-items:center;justify-content:center;flex-shrink:0;
    transition:all 0.2s;color:var(--text-light);font-size:16px;
}
.mic-btn:hover{background:var(--plus-hover);}
.mic-btn:active{transform:scale(0.94);}
.mic-btn.recording{background:#ffe0e0;color:#d4786e;animation:pulse 1.2s infinite;}
@keyframes pulse{0%,100%{box-shadow:0 0 0 0 rgba(212,120,110,0.3)}50%{box-shadow:0 0 0 10px rgba(212,120,110,0)}}
.input-field{
    flex:1;height:38px;border:1px solid var(--divider);
    border-radius:20px;padding:0 16px;font-size:14px;
    background:rgba(0,0,0,0.02);color:var(--text);outline:none;
    font-family:var(--font);transition:border-color 0.2s;
}
.input-field:focus{border-color:var(--amber);background:var(--amber-light);}
.input-field::placeholder{color:var(--text-muted);}
.plus-btn{
    width:38px;height:38px;border-radius:50%;border:none;
    background:var(--plus-bg);cursor:pointer;display:flex;
    align-items:center;justify-content:center;flex-shrink:0;
    transition:all 0.3s cubic-bezier(0.34,1.56,0.64,1);
    color:var(--text-light);position:relative;
}
.plus-btn:hover{background:var(--plus-hover);}
.plus-btn.active{background:var(--text-light);color:#fff;transform:rotate(45deg);}
.plus-btn .plus-icon{font-size:20px;line-height:1;transition:inherit;}
.send-btn{
    width:38px;height:38px;border-radius:50%;border:none;
    background:var(--send-bg);cursor:pointer;display:flex;
    align-items:center;justify-content:center;flex-shrink:0;
    transition:all 0.2s;color:#fff;
}
.send-btn:hover{background:var(--send-hover);box-shadow:0 2px 8px rgba(90,122,154,0.3);}
.send-btn:active{transform:scale(0.92);}
.send-btn svg{width:16px;height:16px;}
.plus-menu{
    position:absolute;bottom:70px;right:14px;background:var(--menu-bg);
    border-radius:14px;box-shadow:0 4px 24px rgba(0,0,0,0.1);
    padding:6px 0;min-width:150px;display:flex;flex-direction:column;
    opacity:0;pointer-events:none;transform:translateY(10px) scale(0.92);
    transition:all 0.25s cubic-bezier(0.34,1.56,0.64,1);z-index:5;
}
.plus-menu.show{opacity:1;pointer-events:auto;transform:translateY(0) scale(1);}
.plus-menu .menu-item{
    display:flex;align-items:center;gap:10px;padding:12px 18px;
    cursor:pointer;font-size:14px;color:var(--text);
    transition:background 0.15s;border:none;background:transparent;
    width:100%;text-align:left;font-family:var(--font);
}
.plus-menu .menu-item:hover{background:var(--menu-hover);}
.plus-menu .menu-item:first-child{border-radius:14px 14px 0 0;}
.plus-menu .menu-item:last-child{border-radius:0 0 14px 14px;}
.menu-backdrop{position:fixed;top:0;left:0;width:100%;height:100%;z-index:4;display:none;}
.menu-backdrop.show{display:block;}
/* 功能菜单 */
.func-list{display:flex;flex-direction:column;gap:6px;}
.func-item{
    display:flex;align-items:center;padding:14px 16px;
    background:var(--card-bg);border-radius:12px;cursor:pointer;
    transition:all 0.2s;border:1px solid transparent;
    font-family:var(--font);font-size:15px;color:var(--text);font-weight:500;
}
.func-item:hover{border-color:var(--divider);box-shadow:0 2px 8px rgba(0,0,0,0.03);}
.func-item:active{background:var(--amber-light);}

/* 设置页面 */
.love-ticket{
    background:var(--card-bg);border-radius:16px;padding:18px 20px 16px;
    box-shadow:var(--shadow);border:1px solid var(--divider);flex-shrink:0;
}
.ticket-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px;}
.ticket-title{font-size:11px;letter-spacing:2px;color:#b0b8c0;text-transform:uppercase;}
.first-class-tag{
    padding:4px 12px;border:1px solid #dce0e4;border-radius:20px;
    font-size:10px;color:#b0b8c0;display:flex;align-items:center;gap:4px;
}
.route-section{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px;}
.route-col{display:flex;flex-direction:column;gap:2px;min-width:56px;}
.route-col:last-child{text-align:right;}
.route-label{font-size:9px;color:#b0b8c0;text-transform:uppercase;letter-spacing:1px;}
.route-text{font-size:18px;color:var(--text);font-weight:300;}
.route-line{flex:1;display:flex;align-items:center;justify-content:center;padding:0 8px;}
.dot-start{width:7px;height:7px;border-radius:50%;border:1.5px solid var(--accent);background:#fff;flex-shrink:0;}
.line-dash{flex:1;border-bottom:1.5px dashed #dce0e4;margin:0 4px;}
.heart-icon{font-size:12px;color:#c0b0a0;flex-shrink:0;}
.dot-end{width:7px;height:7px;border-radius:50%;background:var(--accent);flex-shrink:0;}
.info-row{display:flex;justify-content:space-between;margin-bottom:12px;}
.info-col{display:flex;flex-direction:column;gap:2px;}
.info-label{font-size:9px;color:#b0b8c0;text-transform:uppercase;letter-spacing:1px;}
.info-text{font-size:15px;color:var(--text);font-weight:300;}
.ticket-divider{border:none;border-top:1px dashed #eae8e4;margin:10px 0;}
.ticket-footer{text-align:center;font-size:11px;color:#c0b8b0;font-style:italic;letter-spacing:0.5px;}
.settings-list{display:flex;flex-direction:column;gap:6px;}
.setting-item{
    background:var(--card-bg);border-radius:12px;padding:14px 16px;
    box-shadow:var(--shadow);display:flex;align-items:center;
    justify-content:space-between;border:1px solid transparent;
    transition:all 0.2s;
}
.setting-label{font-size:15px;color:var(--text);font-weight:500;}
.setting-hint{font-size:10px;color:var(--text-muted);margin-top:2px;}
.setting-right{display:flex;align-items:center;gap:8px;flex-shrink:0;}
.setting-left{display:flex;flex-direction:column;gap:2px;}
.toggle-switch{
    width:44px;height:26px;border-radius:13px;background:#d0d4d8;
    cursor:pointer;position:relative;transition:background 0.25s;flex-shrink:0;
}
.toggle-switch.on{background:var(--amber);}
.toggle-switch .toggle-knob{
    width:22px;height:22px;border-radius:50%;background:#fff;
    position:absolute;top:2px;left:2px;transition:left 0.25s;
    box-shadow:0 1px 3px rgba(0,0,0,0.1);
}
.toggle-switch.on .toggle-knob{left:20px;}
.toggle-switch.disabled{opacity:0.4;cursor:not-allowed;}
.picker-arrow{font-size:14px;color:var(--text-muted);}
.clear-btn{
    padding:6px 14px;border-radius:14px;border:1px solid #e0d0d0;
    background:#fff;color:#b8908a;font-size:12px;cursor:pointer;
    transition:all 0.2s;font-family:var(--font);
}
.clear-btn:hover{background:#fdf5f4;border-color:#d0b0b0;}
.font-btn{
    padding:6px 12px;border-radius:8px;border:none;background:transparent;
    font-size:12px;color:var(--text-muted);cursor:pointer;font-family:var(--font);
    transition:all 0.2s;
}
.font-btn.active{background:#fff;color:var(--text);box-shadow:0 1px 3px rgba(0,0,0,0.06);}

/* 记忆面板 */
.section-title{
    font-size:12px;color:var(--text-light);margin:4px 0 2px;
    letter-spacing:0.5px;font-weight:500;
}
.memory-module{display:flex;flex-direction:column;gap:0;margin-top:8px;}
.function-tabs{display:flex;gap:8px;overflow-x:auto;padding:2px 0;}
.function-tab{
    flex:1;min-width:64px;padding:10px 8px;border-radius:12px;
    border:1px solid var(--divider);background:var(--card-bg);
    text-align:center;font-size:13px;color:var(--text-light);
    cursor:pointer;transition:all 0.2s;white-space:nowrap;font-weight:500;user-select:none;
}
.function-tab.active{
    background:var(--amber-light);border-color:#d0d8e0;
    color:var(--amber);font-weight:600;
}
.search-box{
    display:flex;align-items:center;gap:8px;padding:10px 14px;
    background:rgba(0,0,0,0.02);border-radius:22px;margin-top:12px;
    border:1px solid transparent;transition:border-color 0.2s;
}
.search-box:focus-within{border-color:#d0d8e0;background:var(--amber-light);}
.search-input{
    flex:1;border:none;background:transparent;font-size:14px;
    color:var(--text);outline:none;font-family:var(--font);
}
.search-input::placeholder{color:var(--text-muted);}
.search-scope{
    font-size:11px;color:var(--text-muted);background:rgba(0,0,0,0.03);
    padding:3px 8px;border-radius:10px;flex-shrink:0;
}
.memory-list{display:flex;flex-direction:column;gap:8px;margin-top:10px;padding-bottom:16px;}
.memory-card{
    background:var(--card-bg);border-radius:10px;padding:12px 14px;
    box-shadow:var(--shadow);cursor:pointer;display:flex;
    align-items:flex-start;gap:12px;transition:all 0.2s;
    border-left:3px solid transparent;flex-wrap:wrap;position:relative;
}
.memory-card:hover{border-left-color:var(--amber);box-shadow:0 2px 10px rgba(0,0,0,0.04);}
.memory-card.expanded{border-left-color:var(--amber);background:var(--amber-light);}
.card-time{font-size:11px;color:var(--text-muted);white-space:nowrap;flex-shrink:0;padding-top:1px;}
.card-summary{
    flex:1;font-size:14px;color:var(--text);line-height:1.5;word-break:break-word;
    display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;
}
.memory-card.expanded .card-summary{display:block;-webkit-line-clamp:unset;overflow:visible;}
.card-actions{display:flex;gap:6px;flex-shrink:0;opacity:0.4;transition:opacity 0.2s;}
.memory-card:hover .card-actions{opacity:1;}
.card-action-btn{
    width:26px;height:26px;border-radius:50%;border:none;
    background:rgba(0,0,0,0.03);cursor:pointer;font-size:12px;
    display:flex;align-items:center;justify-content:center;
    color:var(--text-light);transition:all 0.2s;
}
.card-action-btn.edit-btn:hover{background:var(--accent);color:#fff;}
.card-action-btn.delete-btn:hover{background:var(--delete-bg);color:#fff;}
.card-expanded-area{
    width:100%;padding-top:10px;border-top:1px solid var(--divider);
    display:none;flex-direction:column;gap:12px;
}
.memory-card.expanded .card-expanded-area{display:flex;}
.version-list{display:flex;flex-direction:column;gap:6px;}
.version-row{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--text);}
.version-tag{
    background:rgba(58,80,104,0.06);padding:2px 10px;border-radius:8px;
    color:var(--accent);font-size:11px;font-weight:600;flex-shrink:0;
}
.version-content{color:var(--text-light);}
.weight-slider-wrapper{
    display:flex;align-items:center;position:relative;
    padding:8px 0 4px;touch-action:none;
}
.weight-track{
    flex:1;height:4px;background:linear-gradient(to right,#d8d4cc,var(--amber));
    border-radius:2px;position:relative;margin:0 2px;cursor:pointer;
}
.weight-ticks{
    display:flex;justify-content:space-between;position:absolute;
    top:-3px;left:0;right:0;pointer-events:none;
}
.weight-tick{width:1px;height:10px;background:rgba(0,0,0,0.12);}
.weight-tick.major{height:14px;background:rgba(0,0,0,0.2);}
.weight-labels{
    display:flex;justify-content:space-between;font-size:9px;
    color:var(--text-muted);padding:2px 1px 0;margin-top:2px;
}
.weight-labels span{text-align:center;min-width:16px;}
.weight-thumb{
    position:absolute;top:50%;transform:translate(-50%,-50%);
    width:22px;height:22px;background:#fff;border:2px solid var(--amber);
    border-radius:50%;cursor:grab;box-shadow:0 1px 4px rgba(0,0,0,0.08);z-index:2;
    transition:box-shadow 0.15s;
}
.weight-thumb:hover{box-shadow:0 2px 8px rgba(0,0,0,0.15);}
.weight-thumb:active{cursor:grabbing;box-shadow:0 3px 12px rgba(0,0,0,0.25);}
.weight-track-fill{
    position:absolute;left:0;top:0;height:100%;background:var(--amber);
    border-radius:2px;pointer-events:none;
}
.meta-tags{display:flex;gap:8px;flex-wrap:wrap;align-items:center;}
.meta-tag{
    font-size:10px;padding:4px 10px;border-radius:10px;font-weight:500;white-space:nowrap;
}
.meta-tag.source{background:rgba(58,80,104,0.06);color:var(--accent);}
.meta-tag.mood{background:var(--mood-tag-bg);color:#5a6a7a;}
.meta-tag.status{background:rgba(90,122,106,0.1);color:#4a6b5e;}
.meta-tag.status.plan{background:rgba(201,184,122,0.15);color:#8a7a3a;}

/* 日历组件 */
.calendar-widget{
    background:var(--card-bg);border-radius:14px;padding:14px 16px;box-shadow:var(--shadow);
}
.calendar-nav{
    display:flex;align-items:center;justify-content:center;gap:10px;margin-bottom:12px;
}
.calendar-nav .nav-arrow{
    width:28px;height:28px;border-radius:50%;border:none;
    background:transparent;color:var(--accent);font-size:16px;
    cursor:pointer;display:flex;align-items:center;justify-content:center;
}
.calendar-nav .nav-arrow:hover{background:rgba(58,80,104,0.06);}
.calendar-nav .nav-year-arrow{font-size:14px;color:var(--text-light);}
.calendar-nav .month-year{
    font-size:15px;font-weight:600;color:var(--text);
    cursor:pointer;padding:4px 8px;border-radius:6px;
}
.calendar-nav .month-year:hover{background:rgba(0,0,0,0.03);}
.calendar-nav .year-clickable,.calendar-nav .month-clickable{cursor:pointer;}
.calendar-nav .year-input,.calendar-nav .month-input{
    width:50px;border:1px solid var(--amber);border-radius:6px;
    padding:2px 6px;font-size:14px;text-align:center;
    font-family:var(--font);outline:none;background:var(--amber-light);
}
.calendar-weekdays{
    display:grid;grid-template-columns:repeat(7,1fr);
    text-align:center;font-size:10px;color:var(--text-muted);margin-bottom:6px;
}
.calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:3px;text-align:center;}
.calendar-day{
    aspect-ratio:1;display:flex;align-items:center;justify-content:center;
    font-size:13px;color:var(--text);border-radius:50%;cursor:pointer;
    transition:all 0.2s;background:transparent;
}
.calendar-day.density-0{background:transparent;}
.calendar-day.density-1{background:rgba(90,122,154,0.06);}
.calendar-day.density-2{background:rgba(90,122,154,0.14);}
.calendar-day.density-3{background:rgba(90,122,154,0.24);}
.calendar-day.density-4{background:rgba(90,122,154,0.38);}
.calendar-day:hover{box-shadow:inset 0 0 0 1.5px var(--amber);}
.calendar-day.today{font-weight:700;color:var(--accent);box-shadow:inset 0 0 0 1.5px var(--accent);}
.calendar-day.selected{background:var(--accent)!important;color:#fff;font-weight:600;}
.calendar-day.empty{cursor:default;pointer-events:none;}
.calendar-day.weekend{color:#a09090;}

/* 弹窗 */
.confirm-overlay{
    position:fixed;top:0;left:0;width:100%;height:100%;
    background:rgba(0,0,0,0.3);z-index:999;
    display:flex;align-items:center;justify-content:center;
    animation:fadeIn 0.15s ease;
}
.confirm-dialog{
    background:#fff;border-radius:16px;padding:24px 20px 20px;
    width:280px;text-align:center;box-shadow:0 8px 30px rgba(0,0,0,0.12);
}
.confirm-dialog p{font-size:15px;color:var(--text);margin-bottom:20px;line-height:1.5;}
.confirm-buttons{display:flex;gap:12px;justify-content:center;}
.confirm-buttons button{
    padding:10px 28px;border-radius:20px;border:none;
    font-size:14px;cursor:pointer;font-weight:500;transition:all 0.2s;
}
.btn-cancel{background:#f0f0f0;color:var(--text-light);}
.btn-cancel:hover{background:#e5e5e5;}
.btn-delete{background:var(--delete-bg);color:#fff;}
.btn-delete:hover{background:var(--delete-hover);}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}

.toast{
    position:fixed;bottom:40px;left:50%;transform:translateX(-50%);
    background:var(--accent);color:#fff;padding:10px 24px;border-radius:20px;
    font-size:13px;z-index:999;opacity:0;transition:opacity 0.3s;
    pointer-events:none;font-family:var(--font);
}
.toast.show{opacity:1;}
/* ========== 待办编辑弹窗 ========== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.15s ease;
}
.modal {
    background: #fff;
    border-radius: 18px;
    padding: 24px 20px 20px;
    width: 340px;
    max-width: 90%;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 85vh;
    overflow-y: auto;
}
.modal h3 {
    font-size: 16px;
    color: var(--text);
    text-align: center;
    font-weight: 600;
}
.modal input[type="text"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--divider);
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    font-family: var(--font);
    background: rgba(0, 0, 0, 0.02);
    transition: border-color 0.2s;
}
.modal input[type="text"]:focus {
    border-color: var(--amber);
    background: var(--amber-light);
}
.field-label {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 4px;
    font-weight: 500;
}

/* 分类选择 */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.category-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: all 0.2s;
    font-size: 14px;
    color: var(--text);
}
.category-row:hover {
    background: rgba(0, 0, 0, 0.02);
}
.category-row.selected {
    border-color: var(--amber);
    background: var(--amber-light);
    font-weight: 500;
}
.category-bar {
    flex: 1;
    height: 24px;
    border-radius: 6px;
}

/* 日期选择 */
.date-picker-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.date-picker-row .year-input,
.date-picker-row .month-input {
    width: 55px;
    text-align: center;
    padding: 8px 4px;
    border: 1px solid var(--divider);
    border-radius: 8px;
    font-size: 14px;
    font-family: var(--font);
    background: rgba(0, 0, 0, 0.02);
}

/* 迷你日历 */
.calendar-mini {
    position: relative;
}
.mini-calendar {
    position: absolute;
    top: 40px;
    left: 0;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    padding: 10px;
    z-index: 10;
    width: 220px;
    display: none;
}
.mini-calendar.show {
    display: block;
}

/* 时间滚轮 */
.time-picker-row {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}
.time-wheel {
    width: 60px;
    height: 120px;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid var(--divider);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.02);
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
}
.time-wheel::-webkit-scrollbar {
    width: 0;
}
.time-wheel-item {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text-muted);
    cursor: pointer;
    scroll-snap-align: center;
    transition: color 0.15s;
}
.time-wheel-item.active {
    color: var(--text);
    font-weight: 600;
}

/* 弹窗按钮 */
.modal-btns {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 4px;
}
.modal-btns button {
    padding: 10px 28px;
    border-radius: 20px;
    border: none;
    font-size: 14px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    font-family: var(--font);
}
.btn-save {
    background: var(--send-bg);
    color: #fff;
}
.btn-save:hover {
    background: var(--send-hover);
}
.btn-cancel-modal {
    background: #f0f0f0;
    color: var(--text-light);
}
.btn-delete-modal {
    background: var(--delete-bg);
    color: #fff;
}
