/* ============================================================
   云上日记本 diary.s1.css
   玻璃拟态 + 紫粉渐变主题，移动端自适应 + 自定义弹窗
   ============================================================ */

.di-card {
    background: linear-gradient(160deg, rgba(255,255,255,0.95), rgba(249,243,255,0.90));
    border: 1px solid rgba(196, 165, 255, 0.40);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(139, 92, 246, 0.12);
    padding: 22px;
    position: relative;
    overflow: hidden;
}
.di-card::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(236,72,153,0.12), transparent 70%);
    pointer-events: none;
}
.di-card::after {
    content: '';
    position: absolute;
    bottom: -40px; left: -40px;
    width: 180px; height: 180px;
    background: radial-gradient(circle, rgba(139,92,246,0.10), transparent 70%);
    pointer-events: none;
}
.di-icon {
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%) !important;
    box-shadow: 0 6px 18px rgba(139, 92, 246, 0.35);
    animation: di-breath 3s ease-in-out infinite;
}
@keyframes di-breath {
    0%, 100% { box-shadow: 0 6px 18px rgba(139,92,246,0.35); }
    50% { box-shadow: 0 6px 26px rgba(236,72,153,0.55); }
}

/* ---------- 登录引导 ---------- */
@keyframes di-badge-spin { to { transform: rotate(360deg); } }
@keyframes di-shine { 0% { left: -80%; } 60%, 100% { left: 120%; } }
.di-login-guide { text-align: center; padding: 34px 16px 26px; }
.di-login-badge {
    width: 92px; height: 92px; margin: 0 auto 20px;
    border-radius: 28px; position: relative;
    background: linear-gradient(135deg,#8b5cf6,#ec4899);
    box-shadow: 0 14px 34px rgba(236,72,153,0.38), inset 0 1px 0 rgba(255,255,255,0.4);
    display: flex; align-items: center; justify-content: center;
}
.di-login-badge::before {
    content: ''; position: absolute; inset: -8px; border-radius: 34px;
    border: 1.5px dashed rgba(139,92,246,0.4);
    animation: di-badge-spin 16s linear infinite;
}
.di-login-badge i { font-size: 2.4rem; color: #fff; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.18)); }
.di-login-guide h3 { margin: 6px 0 8px; font-size: 1.22rem; color: #1e293b; letter-spacing: .3px; }
.di-login-guide p { margin: 0 0 20px; font-size: 0.85rem; color: #64748b; line-height: 1.6; }
/* 特性亮点 */
.di-login-feats { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; max-width: 360px; margin: 0 auto 24px; }
.di-login-feat {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 13px; border-radius: 999px;
    background: rgba(139,92,246,0.08); border: 1px solid rgba(139,92,246,0.28);
    color: #475569; font-size: 0.78rem; font-weight: 600;
}
.di-login-feat i { font-size: 0.8rem; color: #7c3aed; }
.di-login-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.di-login-btns a {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 10px 26px; border-radius: 999px; text-decoration: none;
    font-size: 0.9rem; font-weight: 600; transition: all .25s ease;
    min-height: 44px; position: relative; overflow: hidden;
}
.di-login-btns a.main { background: linear-gradient(135deg,#8b5cf6,#ec4899); color: #fff; box-shadow: 0 8px 22px rgba(236,72,153,0.35); }
.di-login-btns a.main::before {
    content: ''; position: absolute; top: 0; left: -80%; width: 50%; height: 100%;
    background: linear-gradient(105deg, transparent, rgba(255,255,255,0.45), transparent);
    transform: skewX(-20deg); animation: di-shine 2.8s ease infinite;
}
.di-login-btns a.main:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(236,72,153,0.45); }
.di-login-btns a.ghost { border: 1.5px solid rgba(139,92,246,0.45); color: #7c3aed; background: rgba(255,255,255,0.7); }
.di-login-btns a.ghost:hover { background: rgba(139,92,246,0.08); }

/* ---------- Tabs ---------- */
.di-tabs {
    display: flex; gap: 6px; margin: 6px 0 16px;
    background: rgba(240,232,255,0.55); border: 1px solid rgba(196,165,255,0.28);
    padding: 5px; border-radius: 14px;
    position: relative; z-index: 1;
}
.di-tab {
    flex: 1; border: none; background: transparent; cursor: pointer;
    padding: 9px 4px; border-radius: 10px; font-size: 0.85rem; font-weight: 600;
    color: #64748b; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
    transition: all .22s ease; white-space: nowrap;
}
.di-tab i { font-size: 0.8rem; }
.di-tab:hover { color: #7c3aed; }
.di-tab.active {
    background: linear-gradient(135deg,#8b5cf6,#ec4899); color: #fff;
    box-shadow: 0 4px 14px rgba(139,92,246,0.35);
}
.di-pane { display: none; animation: di-slide-in .3s ease; position: relative; z-index: 1; }
.di-pane.active { display: block; }
@keyframes di-slide-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Tab1 写日记 ---------- */
.di-title-row { display: flex; gap: 10px; margin-bottom: 12px; }
.di-title-input {
    flex: 1; min-width: 0;
    border: 2px solid rgba(196,165,255,0.35); background: rgba(255,255,255,0.8);
    border-radius: 12px; padding: 11px 14px; font-size: 0.95rem; color: #1e293b;
    outline: none; transition: border-color .2s ease, box-shadow .2s ease;
}
.di-title-input:focus { border-color: #a78bfa; box-shadow: 0 0 0 3px rgba(139,92,246,0.12); }
.di-date-input {
    width: 150px; flex-shrink: 0;
    border: 2px solid rgba(196,165,255,0.35); background: rgba(255,255,255,0.8);
    border-radius: 12px; padding: 8px 12px; font-size: 0.88rem; color: #475569;
    outline: none; cursor: pointer;
}
.di-date-input:focus { border-color: #a78bfa; }

.di-picker-row { display: flex; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.di-picker { flex: 1; min-width: 230px; background: rgba(255,255,255,0.55); border: 1px solid rgba(196,165,255,0.22); border-radius: 14px; padding: 10px 12px; }
.di-picker-label { font-size: 0.78rem; font-weight: 700; color: #7c6f9b; margin-bottom: 8px; display: flex; align-items: center; gap: 5px; }
.di-picker-label i { color: #a78bfa; }
.di-mood-grid, .di-weather-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.di-weather-grid { grid-template-columns: repeat(7, 1fr); }
.di-mood-item, .di-weather-item {
    border: 2px solid transparent; background: rgba(255,255,255,0.75);
    border-radius: 10px; padding: 7px 2px 5px; cursor: pointer; text-align: center;
    transition: all .18s ease; line-height: 1.2;
}
.di-mood-item .em, .di-weather-item .em { font-size: 1.25rem; display: block; }
.di-mood-item .nm, .di-weather-item .nm { font-size: 0.66rem; color: #94a3b8; margin-top: 2px; display: block; }
.di-mood-item:hover, .di-weather-item:hover { transform: translateY(-2px); }
.di-mood-item.active {
    border-color: #a78bfa; background: linear-gradient(135deg, rgba(139,92,246,0.14), rgba(236,72,153,0.14));
    box-shadow: 0 4px 12px rgba(139,92,246,0.25);
}
.di-mood-item.active .nm { color: #7c3aed; font-weight: 700; }
.di-weather-item.active {
    border-color: #38bdf8; background: linear-gradient(135deg, rgba(56,189,248,0.14), rgba(139,92,246,0.12));
    box-shadow: 0 4px 12px rgba(56,189,248,0.22);
}
.di-weather-item.active .nm { color: #0284c7; font-weight: 700; }

/* 分类横向滚动 chips */
.di-cat-scroll { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin-bottom: 2px; scrollbar-width: thin; }
.di-cat-scroll::-webkit-scrollbar { height: 5px; }
.di-cat-scroll::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.25); border-radius: 99px; }
.di-cat-chip {
    flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px;
    border: 1.5px solid rgba(196,165,255,0.35); background: rgba(255,255,255,0.8);
    border-radius: 999px; padding: 7px 14px; cursor: pointer;
    font-size: 0.8rem; font-weight: 600; color: #64748b;
    transition: all .2s ease;
}
.di-cat-chip i { font-size: 0.75rem; }
.di-cat-chip:hover { transform: translateY(-1px); border-color: #a78bfa; }
.di-cat-chip.active { color: #fff; border-color: transparent; box-shadow: 0 4px 12px rgba(139,92,246,0.32); }

.di-content-wrap { position: relative; }
.di-content-input {
    width: 100%; min-height: 190px; resize: vertical;
    border: 2px solid rgba(196,165,255,0.35); background: rgba(255,255,255,0.85);
    border-radius: 14px; padding: 14px 16px 30px; font-size: 0.92rem; line-height: 1.75;
    color: #1e293b; font-family: inherit; outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.di-content-input:focus { border-color: #a78bfa; box-shadow: 0 0 0 3px rgba(139,92,246,0.12); }
.di-word-count {
    position: absolute; right: 12px; bottom: 10px;
    font-size: 0.72rem; color: #a78bfa; font-weight: 600;
    background: rgba(255,255,255,0.85); padding: 2px 8px; border-radius: 99px;
    pointer-events: none;
}
.di-tags-row {
    display: flex; align-items: center; gap: 8px; margin-top: 10px;
}
.di-tags-row > i { color: #a78bfa; font-size: 0.85rem; }
.di-tags-input {
    flex: 1; border: 2px solid rgba(196,165,255,0.35); background: rgba(255,255,255,0.8);
    border-radius: 12px; padding: 9px 14px; font-size: 0.85rem; color: #1e293b;
    outline: none;
}
.di-tags-input:focus { border-color: #a78bfa; }

.di-save-row { display: flex; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.di-save-btn {
    border: none; cursor: pointer; border-radius: 999px;
    padding: 11px 34px; font-size: 0.92rem; font-weight: 700; color: #fff;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    box-shadow: 0 6px 18px rgba(139,92,246,0.38);
    display: inline-flex; align-items: center; gap: 7px;
    transition: all .25s ease; position: relative; overflow: hidden;
}
.di-save-btn::after {
    content: ''; position: absolute; top: 0; left: -80%;
    width: 50%; height: 100%;
    background: linear-gradient(105deg, transparent, rgba(255,255,255,0.45), transparent);
    animation: di-shine 2.8s ease infinite;
}
@keyframes di-shine { 0% { left: -80%; } 60%, 100% { left: 130%; } }
.di-save-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(236,72,153,0.45); }
.di-save-btn:active { transform: scale(0.97); }
.di-save-btn:disabled { opacity: 0.7; cursor: not-allowed; }
.di-cancel-btn {
    border: 1.5px solid rgba(148,163,184,0.5); background: rgba(255,255,255,0.8);
    border-radius: 999px; padding: 10px 22px; font-size: 0.85rem; font-weight: 600;
    color: #64748b; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
    transition: all .2s ease;
}
.di-cancel-btn:hover { border-color: #f43f5e; color: #f43f5e; }
.di-draft-tip { font-size: 0.72rem; color: #94a3b8; }
.di-recent-tip { margin-top: 8px; font-size: 0.8rem; min-height: 1.2em; text-align: center; }

/* ---------- Tab2 日记本 ---------- */
.di-book-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.di-view-switch { display: inline-flex; background: rgba(240,232,255,0.6); border: 1px solid rgba(196,165,255,0.28); border-radius: 10px; padding: 3px; gap: 2px; }
.di-view-btn {
    border: none; background: transparent; cursor: pointer;
    padding: 6px 14px; border-radius: 8px; font-size: 0.78rem; font-weight: 700; color: #64748b;
    display: inline-flex; align-items: center; gap: 5px; transition: all .2s ease;
}
.di-view-btn.active { background: linear-gradient(135deg,#8b5cf6,#ec4899); color: #fff; box-shadow: 0 3px 10px rgba(139,92,246,0.3); }
.di-month-nav { display: inline-flex; align-items: center; gap: 8px; }
.di-month-nav button {
    width: 30px; height: 30px; border-radius: 9px; border: 1px solid rgba(196,165,255,0.35);
    background: rgba(255,255,255,0.8); color: #7c3aed; cursor: pointer; font-size: 0.75rem;
    transition: all .2s ease; display: inline-flex; align-items: center; justify-content: center;
}
.di-month-nav button:hover { background: #8b5cf6; color: #fff; border-color: transparent; }
.di-month-label { font-size: 0.88rem; font-weight: 800; color: #4c1d95; min-width: 96px; text-align: center; }

.di-filter-row { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.di-search-box {
    flex: 1; min-width: 160px; display: flex; align-items: center; gap: 7px;
    border: 2px solid rgba(196,165,255,0.3); background: rgba(255,255,255,0.8);
    border-radius: 11px; padding: 0 12px;
}
.di-search-box i { color: #a78bfa; font-size: 0.8rem; }
.di-search-box input { flex: 1; min-width: 0; border: none; background: transparent; outline: none; padding: 9px 0; font-size: 0.85rem; color: #1e293b; }
.di-cat-filter {
    border: 2px solid rgba(196,165,255,0.3); background: rgba(255,255,255,0.85);
    border-radius: 11px; padding: 8px 10px; font-size: 0.82rem; color: #475569; outline: none; cursor: pointer;
    max-width: 128px;
}
.di-fav-filter {
    width: 38px; height: 38px; border-radius: 11px; border: 2px solid rgba(196,165,255,0.3);
    background: rgba(255,255,255,0.8); color: #94a3b8; cursor: pointer; font-size: 0.85rem;
    transition: all .2s ease; flex-shrink: 0;
}
.di-fav-filter:hover { color: #f59e0b; border-color: #fbbf24; }
.di-fav-filter.active { background: linear-gradient(135deg,#f59e0b,#f97316); color: #fff; border-color: transparent; box-shadow: 0 4px 12px rgba(245,158,11,0.35); }

/* 日记条目卡片 */
.di-entry-list { display: flex; flex-direction: column; gap: 10px; }
.di-entry-item {
    display: flex; align-items: flex-start; gap: 12px;
    background: rgba(255,255,255,0.85); border: 1px solid rgba(196,165,255,0.28);
    border-radius: 14px; padding: 13px 14px; cursor: pointer;
    transition: all .22s ease; position: relative; overflow: hidden;
}
.di-entry-item::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
    background: var(--cat-c, #8b5cf6); opacity: 0.75;
}
.di-entry-item:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(139,92,246,0.16); border-color: rgba(139,92,246,0.4); }
.di-entry-emoji {
    width: 42px; height: 42px; flex-shrink: 0; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; font-size: 1.35rem;
    background: linear-gradient(135deg, rgba(139,92,246,0.12), rgba(236,72,153,0.12));
}
.di-entry-info { flex: 1; min-width: 0; }
.di-entry-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.di-entry-title { font-size: 0.92rem; font-weight: 700; color: #1e293b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.di-entry-title.no-title { color: #94a3b8; font-weight: 600; font-style: italic; }
.di-entry-fav { color: #f59e0b; font-size: 0.75rem; }
.di-entry-excerpt { font-size: 0.8rem; color: #64748b; margin-top: 4px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.di-entry-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 7px; font-size: 0.72rem; color: #94a3b8; }
.di-entry-meta .m-cat { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.di-entry-meta .m-wx { color: #0ea5e9; }
.di-entry-meta .m-words { color: #a78bfa; }
.di-entry-tags { display: inline-flex; gap: 5px; flex-wrap: wrap; }
.di-entry-tags span { background: rgba(139,92,246,0.09); color: #7c3aed; border-radius: 99px; padding: 1px 8px; font-size: 0.68rem; font-weight: 600; }
.di-entry-ops { display: flex; flex-direction: column; gap: 5px; flex-shrink: 0; }
.di-entry-ops button {
    width: 28px; height: 28px; border-radius: 8px; border: 1px solid rgba(196,165,255,0.3);
    background: rgba(255,255,255,0.85); color: #94a3b8; cursor: pointer; font-size: 0.72rem;
    transition: all .18s ease; display: inline-flex; align-items: center; justify-content: center;
}
.di-entry-ops .op-edit:hover { background: #8b5cf6; color: #fff; border-color: transparent; }
.di-entry-ops .op-del:hover { background: #f43f5e; color: #fff; border-color: transparent; }
.di-entry-ops .op-fav.on { color: #f59e0b; }
.di-entry-ops .op-fav:hover { background: #f59e0b; color: #fff; border-color: transparent; }
.di-entry-group-date { font-size: 0.78rem; font-weight: 800; color: #7c6f9b; margin: 8px 2px 2px; }

/* 日历视图 */
.di-calendar {
    background: rgba(255,255,255,0.75); border: 1px solid rgba(196,165,255,0.28);
    border-radius: 14px; padding: 12px;
}
.di-cal-head { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 6px; }
.di-cal-head span { text-align: center; font-size: 0.72rem; font-weight: 700; color: #7c6f9b; padding: 4px 0; }
.di-cal-body { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.di-cal-cell {
    aspect-ratio: 1 / 1; border-radius: 10px; position: relative;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    font-size: 0.8rem; color: #475569; background: rgba(248,245,255,0.6);
    border: 1.5px solid transparent; transition: all .18s ease; overflow: hidden;
}
.di-cal-cell.other { color: #cbd5e1; background: transparent; }
.di-cal-cell:hover { border-color: #c4b5fd; }
.di-cal-cell.has-diary {
    background: linear-gradient(135deg, rgba(139,92,246,0.16), rgba(236,72,153,0.16));
    border-color: rgba(139,92,246,0.35); cursor: pointer; font-weight: 700;
}
.di-cal-cell.has-diary:hover { transform: scale(1.06); box-shadow: 0 4px 12px rgba(139,92,246,0.25); }
.di-cal-cell.today { border-color: #ec4899; box-shadow: 0 0 0 2px rgba(236,72,153,0.18); }
.di-cal-cell .d-em { font-size: 1rem; line-height: 1; }
.di-cal-cell .d-num { font-size: 0.72rem; color: #64748b; margin-top: 1px; }
.di-cal-cell .d-cnt {
    position: absolute; top: 3px; right: 4px; font-size: 0.6rem; font-weight: 800;
    background: linear-gradient(135deg,#8b5cf6,#ec4899); color: #fff;
    border-radius: 99px; padding: 0 5px; line-height: 1.5;
}
.di-cal-legend { display: flex; gap: 16px; align-items: center; margin-top: 10px; font-size: 0.72rem; color: #94a3b8; flex-wrap: wrap; }
.di-cal-legend .di-cal-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; }
.di-cal-dot.on { background: linear-gradient(135deg,#8b5cf6,#ec4899); }
.di-cal-dot.today { background: #fff; border: 2px solid #ec4899; }

/* ---------- Tab3 统计 ---------- */
.di-streak-card {
    display: flex; align-items: center; gap: 14px;
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    border-radius: 16px; padding: 16px 20px; color: #fff;
    margin-bottom: 14px; position: relative; overflow: hidden;
    box-shadow: 0 8px 24px rgba(139,92,246,0.32);
}
.di-streak-card::after {
    content: ''; position: absolute; right: -30px; top: -30px;
    width: 130px; height: 130px; border-radius: 50%;
    background: rgba(255,255,255,0.10); pointer-events: none;
}
.di-streak-flame {
    width: 52px; height: 52px; border-radius: 15px; flex-shrink: 0;
    background: rgba(255,255,255,0.18); display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem; animation: di-flicker 1.6s ease-in-out infinite;
}
@keyframes di-flicker { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
.di-streak-info { flex: 1; }
.di-streak-num { font-size: 1.5rem; font-weight: 800; line-height: 1.1; }
.di-streak-num span { font-size: 2rem; }
.di-streak-label { font-size: 0.76rem; color: rgba(255,255,255,0.85); margin-top: 2px; }
.di-streak-badge {
    background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.4);
    border-radius: 999px; padding: 6px 14px; font-size: 0.76rem; font-weight: 700;
    display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0;
    animation: di-pulse 2s ease-in-out infinite;
}
@keyframes di-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0.35); } 50% { box-shadow: 0 0 0 8px rgba(255,255,255,0); } }

.di-stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.di-stat-card {
    background: rgba(255,255,255,0.85); border: 1px solid rgba(196,165,255,0.28);
    border-radius: 13px; padding: 13px 12px; text-align: center;
    transition: transform .2s ease;
}
.di-stat-card:hover { transform: translateY(-2px); }
.di-stat-label { font-size: 0.72rem; color: #7c6f9b; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 4px; }
.di-stat-label i { color: #a78bfa; }
.di-stat-value { font-size: 1.25rem; font-weight: 800; color: #1e293b; margin-top: 5px; }
.di-stat-card.c1 .di-stat-value { color: #8b5cf6; }
.di-stat-card.c2 .di-stat-value { color: #ec4899; }
.di-stat-card.c3 .di-stat-value { color: #0ea5e9; }
.di-stat-card.c4 .di-stat-value { color: #f59e0b; }

.di-goal-box {
    background: rgba(255,255,255,0.85); border: 1px solid rgba(196,165,255,0.28);
    border-radius: 13px; padding: 14px 16px; margin-bottom: 14px;
}
.di-goal-head { display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem; color: #4c1d95; font-weight: 700; margin-bottom: 9px; }
.di-goal-head i { color: #a78bfa; }
.di-goal-num { font-size: 0.76rem; color: #7c6f9b; font-weight: 600; }
.di-goal-bar { height: 10px; border-radius: 99px; background: rgba(196,165,255,0.25); overflow: hidden; }
.di-goal-fill {
    height: 100%; width: 0; border-radius: 99px;
    background: linear-gradient(90deg, #8b5cf6, #ec4899);
    transition: width .6s cubic-bezier(.22,.9,.36,1);
}
.di-goal-fill.done { animation: di-goal-glow 1.8s ease-in-out infinite; }
@keyframes di-goal-glow { 0%, 100% { box-shadow: 0 0 6px rgba(236,72,153,0.4); } 50% { box-shadow: 0 0 16px rgba(236,72,153,0.75); } }

.di-top-title { font-size: 0.85rem; font-weight: 800; color: #4c1d95; margin: 4px 0 10px; display: flex; align-items: center; gap: 6px; }
.di-top-title i { color: #a78bfa; }
.di-mood-dist { display: flex; flex-direction: column; gap: 9px; }
.di-md-item { display: flex; align-items: center; gap: 10px; }
.di-md-em { font-size: 1.2rem; width: 30px; text-align: center; flex-shrink: 0; }
.di-md-bar-wrap { flex: 1; height: 12px; background: rgba(196,165,255,0.2); border-radius: 99px; overflow: hidden; }
.di-md-bar { height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #8b5cf6, #ec4899); transition: width .6s cubic-bezier(.22,.9,.36,1); }
.di-md-num { font-size: 0.74rem; color: #7c6f9b; font-weight: 700; width: 74px; text-align: right; flex-shrink: 0; }

/* ---------- Tab4 设置 ---------- */
.di-set-section {
    background: rgba(255,255,255,0.8); border: 1px solid rgba(196,165,255,0.26);
    border-radius: 14px; padding: 15px 16px; margin-bottom: 12px;
}
.di-set-title { font-size: 0.88rem; font-weight: 800; color: #4c1d95; margin-bottom: 11px; display: flex; align-items: center; gap: 7px; }
.di-set-title i { color: #a78bfa; }
.di-tip {
    background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px;
    padding: 10px 13px; font-size: 0.76rem; color: #b45309; line-height: 1.6; margin-bottom: 10px;
    display: flex; gap: 7px; align-items: flex-start;
}
.di-tip i { margin-top: 2px; }
.di-set-row { margin-bottom: 10px; }
.di-switch-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 0.85rem; color: #475569; cursor: pointer; }
.di-switch { position: relative; display: inline-block; width: 46px; height: 25px; flex-shrink: 0; }
.di-switch input { opacity: 0; width: 0; height: 0; }
.di-switch i {
    position: absolute; inset: 0; border-radius: 99px; cursor: pointer;
    background: #d8d3e8; transition: all .25s ease;
}
.di-switch i::before {
    content: ''; position: absolute; left: 3px; top: 3px;
    width: 19px; height: 19px; border-radius: 50%; background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.18); transition: all .25s ease;
}
.di-switch input:checked + i { background: linear-gradient(135deg, #8b5cf6, #ec4899); }
.di-switch input:checked + i::before { transform: translateX(21px); }
.di-remind-detail { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; animation: di-slide-in .3s ease; }
.di-field { flex: 1; min-width: 130px; }
.di-field label { display: block; font-size: 0.72rem; color: #7c6f9b; font-weight: 700; margin-bottom: 5px; }
.di-field input {
    width: 100%; border: 2px solid rgba(196,165,255,0.35); background: rgba(255,255,255,0.9);
    border-radius: 10px; padding: 8px 12px; font-size: 0.85rem; color: #1e293b; outline: none;
}
.di-field input:focus { border-color: #a78bfa; }
.di-mini-btn {
    border: none; cursor: pointer; border-radius: 10px;
    padding: 9px 16px; font-size: 0.8rem; font-weight: 700; color: #fff;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    box-shadow: 0 4px 12px rgba(139,92,246,0.3);
    display: inline-flex; align-items: center; gap: 6px;
    transition: all .22s ease; flex-shrink: 0;
}
.di-mini-btn:hover { transform: translateY(-2px); box-shadow: 0 7px 18px rgba(236,72,153,0.4); }
.di-mini-btn.wide { width: 100%; justify-content: center; padding: 11px; }
.di-cat-manage { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 11px; }
.di-mg-item {
    display: inline-flex; align-items: center; gap: 6px;
    border: 1.5px solid rgba(196,165,255,0.3); background: rgba(255,255,255,0.85);
    border-radius: 999px; padding: 6px 12px; font-size: 0.78rem; font-weight: 600; color: #475569;
}
.di-mg-ico { width: 20px; height: 20px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 0.62rem; }
.di-mg-del {
    border: none; background: transparent; color: #cbd5e1; cursor: pointer; font-size: 0.72rem;
    padding: 0; line-height: 1; transition: color .2s ease;
}
.di-mg-del:hover { color: #f43f5e; }
.di-cat-add-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.di-cat-add-row input {
    flex: 1; min-width: 120px; border: 2px solid rgba(196,165,255,0.35); background: rgba(255,255,255,0.9);
    border-radius: 10px; padding: 8px 12px; font-size: 0.85rem; outline: none;
}
.di-cat-add-row input:focus { border-color: #a78bfa; }
.di-cat-icon-pick { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; max-height: 96px; overflow-y: auto; padding: 2px; }
.di-ico-opt {
    width: 30px; height: 30px; border-radius: 8px; border: 1.5px solid rgba(196,165,255,0.3);
    background: rgba(255,255,255,0.85); color: #7c6f9b; cursor: pointer; font-size: 0.78rem;
    transition: all .18s ease; display: inline-flex; align-items: center; justify-content: center;
}
.di-ico-opt:hover { border-color: #a78bfa; color: #7c3aed; }
.di-ico-opt.sel { background: linear-gradient(135deg, #8b5cf6, #ec4899); color: #fff; border-color: transparent; }

/* ---------- 空状态 / 加载更多 ---------- */
.di-empty { text-align: center; padding: 30px 16px; color: #94a3b8; }
.di-empty i { font-size: 34px; margin-bottom: 10px; display: block; background: linear-gradient(135deg,#c4b5fd,#f9a8d4); -webkit-background-clip: text; background-clip: text; color: transparent; }
.di-empty div { font-size: 0.82rem; }
.di-load-more { text-align: center; margin-top: 12px; }
.di-load-more button {
    border: 1.5px solid rgba(196,165,255,0.4); background: rgba(255,255,255,0.85);
    border-radius: 999px; padding: 8px 24px; font-size: 0.8rem; font-weight: 700; color: #7c3aed;
    cursor: pointer; transition: all .2s ease; display: inline-flex; align-items: center; gap: 6px;
}
.di-load-more button:hover { background: #8b5cf6; color: #fff; border-color: transparent; }

/* ---------- Toast ---------- */
.di-toast {
    position: fixed; top: 24px; left: 50%; transform: translateX(-50%);
    z-index: 999999; display: flex; align-items: center; gap: 9px;
    background: rgba(255,255,255,0.96); border-radius: 14px; padding: 12px 20px;
    box-shadow: 0 10px 36px rgba(76, 29, 149, 0.22);
    font-size: 0.88rem; font-weight: 600; color: #1e293b;
    animation: di-toast-in .3s cubic-bezier(.22,.9,.36,1);
    max-width: calc(100vw - 40px); pointer-events: none;
    border: 1px solid rgba(196,165,255,0.4);
}
.di-toast.success { border-left: 4px solid #10b981; }
.di-toast.success i { color: #10b981; }
.di-toast.error { border-left: 4px solid #f43f5e; }
.di-toast.error i { color: #f43f5e; }
.di-toast.warning { border-left: 4px solid #f59e0b; }
.di-toast.warning i { color: #f59e0b; }
.di-toast.info { border-left: 4px solid #8b5cf6; }
.di-toast.info i { color: #8b5cf6; }
@keyframes di-toast-in { from { opacity: 0; transform: translateX(-50%) translateY(-16px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* ---------- 确认弹窗 ---------- */
.di-modal-mask {
    position: fixed; inset: 0; z-index: 999998;
    background: rgba(30, 20, 50, 0.45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center; padding: 20px;
    animation: di-fade-in .22s ease;
}
@keyframes di-fade-in { from { opacity: 0; } to { opacity: 1; } }
.di-modal {
    background: #fff; border-radius: 20px; width: 100%; max-width: 380px;
    padding: 26px 24px 20px; text-align: center;
    box-shadow: 0 24px 70px rgba(76, 29, 149, 0.35);
    animation: di-modal-in .28s cubic-bezier(.22,.9,.36,1);
    max-height: 86vh; display: flex; flex-direction: column;
}
@keyframes di-modal-in { from { opacity: 0; transform: scale(.88) translateY(14px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.di-modal-head { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.di-modal-icon {
    width: 56px; height: 56px; border-radius: 17px;
    display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
}
.di-modal-icon.warn { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #d97706; }
.di-modal-icon.danger { background: linear-gradient(135deg, #ffe4e6, #fecdd3); color: #e11d48; }
.di-modal-icon.info { background: linear-gradient(135deg, #ede9fe, #ddd6fe); color: #7c3aed; }
.di-modal-icon.primary { background: linear-gradient(135deg, #8b5cf6, #ec4899); color: #fff; }
.di-modal-title { font-size: 1.02rem; font-weight: 800; color: #1e293b; }
.di-modal-desc { font-size: 0.84rem; color: #64748b; line-height: 1.65; white-space: pre-line; }
.di-modal-foot { display: flex; gap: 10px; margin-top: 20px; }
.di-modal-btn {
    flex: 1; border-radius: 12px; padding: 11px 0; font-size: 0.88rem; font-weight: 700;
    cursor: pointer; border: 1.5px solid rgba(148,163,184,0.4); background: #fff; color: #64748b;
    transition: all .2s ease;
}
.di-modal-btn:hover { border-color: #94a3b8; }
.di-modal-btn.confirm:hover { background: #f43f5e; color: #fff; border-color: transparent; }
.di-modal-btn.primary {
    background: linear-gradient(135deg, #8b5cf6, #ec4899); color: #fff; border-color: transparent;
    box-shadow: 0 5px 15px rgba(139,92,246,0.35);
}
.di-modal-btn.primary:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(236,72,153,0.45); }

/* ---------- 阅读日记弹窗 ---------- */
.di-read-modal {
    background: #fff; border-radius: 20px; width: 100%; max-width: 560px;
    box-shadow: 0 24px 70px rgba(76, 29, 149, 0.35);
    animation: di-modal-in .28s cubic-bezier(.22,.9,.36,1);
    max-height: 86vh; display: flex; flex-direction: column; overflow: hidden;
}
.di-read-head {
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    padding: 20px 22px 16px; color: #fff; position: relative; flex-shrink: 0;
}
.di-read-head::after {
    content: ''; position: absolute; right: -24px; top: -24px;
    width: 110px; height: 110px; border-radius: 50%;
    background: rgba(255,255,255,0.10); pointer-events: none;
}
.di-read-date { font-size: 0.74rem; color: rgba(255,255,255,0.85); letter-spacing: 1px; margin-bottom: 6px; }
.di-read-title { font-size: 1.12rem; font-weight: 800; line-height: 1.45; word-break: break-all; }
.di-read-close {
    position: absolute; top: 14px; right: 14px;
    width: 30px; height: 30px; border-radius: 50%; border: none; cursor: pointer;
    background: rgba(255,255,255,0.2); color: #fff; font-size: 0.85rem;
    transition: all .2s ease; display: flex; align-items: center; justify-content: center;
}
.di-read-close:hover { background: rgba(255,255,255,0.35); transform: rotate(90deg); }
.di-read-body { padding: 18px 22px; overflow-y: auto; flex: 1; }
.di-read-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; font-size: 0.75rem; color: #7c6f9b; }
.di-read-meta .rm { display: inline-flex; align-items: center; gap: 5px; background: rgba(139,92,246,0.08); border-radius: 99px; padding: 4px 11px; font-weight: 600; }
.di-read-meta .rm i { color: #a78bfa; }
.di-read-content {
    font-size: 0.92rem; color: #334155; line-height: 1.9;
    white-space: pre-wrap; word-break: break-word;
}
.di-read-content.empty { color: #94a3b8; font-style: italic; }
.di-read-foot {
    display: flex; gap: 9px; padding: 13px 22px; border-top: 1px solid #f1ecfa; flex-shrink: 0;
    flex-wrap: wrap;
}
.di-read-foot button {
    flex: 1; min-width: 90px; border-radius: 11px; padding: 10px 0; font-size: 0.82rem; font-weight: 700;
    cursor: pointer; border: 1.5px solid rgba(196,165,255,0.4); background: #fff; color: #64748b;
    transition: all .2s ease; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.di-read-foot .rf-edit:hover { background: #8b5cf6; color: #fff; border-color: transparent; }
.di-read-foot .rf-fav.on { color: #f59e0b; border-color: #fbbf24; }
.di-read-foot .rf-fav:hover { background: #f59e0b; color: #fff; border-color: transparent; }
.di-read-foot .rf-del:hover { background: #f43f5e; color: #fff; border-color: transparent; }

/* ---------- 移动端适配 ---------- */
@media (max-width: 640px) {
    .di-card { padding: 15px 13px; border-radius: 16px; }
    .di-tabs { gap: 3px; padding: 4px; }
    .di-tab { padding: 8px 2px; font-size: 0.76rem; }
    .di-tab i { display: none; }
    .di-title-row { flex-direction: column; gap: 8px; }
    .di-date-input { width: 100%; }
    .di-picker-row { flex-direction: column; gap: 8px; }
    .di-picker { min-width: 0; }
    .di-mood-grid, .di-weather-grid { gap: 4px; }
    .di-mood-item .em, .di-weather-item .em { font-size: 1.05rem; }
    .di-mood-item .nm, .di-weather-item .nm { font-size: 0.58rem; }
    .di-content-input { min-height: 150px; font-size: 0.88rem; }
    .di-save-btn { width: 100%; justify-content: center; }
    .di-cancel-btn { width: 100%; justify-content: center; }
    .di-book-toolbar { flex-direction: column; align-items: stretch; }
    .di-view-switch { justify-content: center; }
    .di-month-nav { justify-content: center; }
    .di-filter-row .di-cat-filter { max-width: none; flex: 1; }
    .di-entry-item { padding: 11px 11px 11px 13px; gap: 9px; }
    .di-entry-emoji { width: 36px; height: 36px; font-size: 1.15rem; }
    .di-entry-ops { flex-direction: row; }
    .di-entry-ops button { width: 26px; height: 26px; }
    .di-cal-cell { font-size: 0.68rem; border-radius: 7px; }
    .di-cal-cell .d-em { font-size: 0.82rem; }
    .di-cal-cell .d-num { font-size: 0.6rem; }
    .di-cal-cell .d-cnt { font-size: 0.52rem; padding: 0 3px; top: 2px; right: 3px; }
    .di-stat-grid { grid-template-columns: repeat(2, 1fr); }
    .di-stat-value { font-size: 1.1rem; }
    .di-streak-card { padding: 14px 16px; }
    .di-streak-num span { font-size: 1.6rem; }
    .di-streak-badge { display: none; }
    .di-read-head { padding: 16px 16px 13px; }
    .di-read-body { padding: 14px 16px; }
    .di-read-foot { padding: 11px 16px; }
    .di-modal { padding: 22px 18px 16px; }
    .di-remind-detail { flex-direction: column; align-items: stretch; }
    .di-field { min-width: 0; }
}

/* ============================================================
   V2 · 手机端「云上日记本」质感升级覆盖层
   （仅移动端生效；沿用紫粉渐变主题，作用域为 .di-app 内的 di-* 组件）
   ============================================================ */

/* ---- 今日状态 Hero（默认隐藏，仅手机端显示） ---- */
.di-hero { display: none; }

@media (max-width: 768px) {

    /* ---------- 0. 写日记页 · 今日状态 Hero ---------- */
    .di-hero {
        display: block; position: relative; overflow: hidden;
        margin: 0 0 16px; padding: 18px 18px 14px;
        border-radius: 24px;
        background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
        color: #fff;
        box-shadow: 0 14px 32px rgba(236,72,153,0.28);
    }
    .di-hero::before {
        content: ''; position: absolute; right: -42px; top: -56px;
        width: 190px; height: 190px; border-radius: 50%;
        background: radial-gradient(circle, rgba(255,255,255,0.30) 0%, rgba(255,255,255,0) 70%);
        pointer-events: none;
    }
    .di-hero::after {
        content: ''; position: absolute; left: -52px; bottom: -92px;
        width: 220px; height: 220px; border-radius: 50%;
        background: radial-gradient(circle, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0) 70%);
        pointer-events: none;
    }
    .di-hero-top { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
    .di-hero-tag {
        display: inline-flex; align-items: center; gap: 5px;
        padding: 5px 12px; border-radius: 999px;
        background: rgba(255,255,255,0.22); border: 1px solid rgba(255,255,255,0.18);
        font-size: 0.7rem; font-weight: 700; letter-spacing: .6px;
    }
    .di-hero-tag i { font-size: 0.7rem; }
    .di-hero-tag b { font-size: 0.86rem; }
    .di-hero-date { font-size: 0.7rem; font-weight: 600; opacity: .85; }
    .di-hero-title {
        position: relative; z-index: 1;
        font-size: 1.36rem; font-weight: 800; letter-spacing: .3px; line-height: 1.25;
        text-shadow: 0 1px 6px rgba(0,0,0,0.08);
    }
    .di-hero-sub { position: relative; z-index: 1; font-size: 0.72rem; opacity: .82; margin-top: 4px; }
    .di-hero-cols {
        position: relative; z-index: 1; display: flex; gap: 4px;
        margin-top: 16px; padding-top: 12px;
        border-top: 1px solid rgba(255,255,255,0.20);
    }
    .di-hero-col { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; }
    .di-hero-mini {
        width: 32px; height: 32px; border-radius: 11px; flex-shrink: 0;
        display: flex; align-items: center; justify-content: center; font-size: 0.82rem;
        background: rgba(255,255,255,0.22); box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
    }
    .di-hero-col:nth-child(1) .di-hero-mini { color: #c8f5e0; }
    .di-hero-col:nth-child(2) .di-hero-mini { color: #ffe3b8; }
    .di-hero-col:nth-child(3) .di-hero-mini { color: #ffd9cf; }
    .di-hero-txt { min-width: 0; }
    .di-hero-txt > span { display: block; font-size: 0.58rem; font-weight: 600; opacity: .82; margin-bottom: 1px; white-space: nowrap; }
    .di-hero-txt b { display: block; font-size: 0.92rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
    .di-hero-txt b.done { color: #c8f5e0; }

    /* ---------- 1. 顶部 Tab 栏 ---------- */
    .di-tabs {
        background: #fff; border: 1px solid rgba(139,92,246,0.12);
        border-radius: 22px; padding: 6px; gap: 4px;
        box-shadow: 0 4px 18px rgba(139,92,246,0.10);
        margin: 0 0 16px;
    }
    .di-tab { padding: 9px 2px; border-radius: 16px; gap: 4px; color: #7c6f9b; }
    .di-tab i { display: inline-flex; font-size: 0.82rem; transition: transform .2s ease; }
    .di-tab.active { background: linear-gradient(135deg,#8b5cf6,#ec4899); box-shadow: 0 6px 16px rgba(139,92,246,0.32); }
    .di-tab.active i { transform: scale(1.06); }

    /* ---------- 2. 写日记 · 输入与选择 ---------- */
    .di-title-input, .di-date-input {
        background: #fff; border: 1.5px solid rgba(139,92,246,0.18); border-radius: 16px;
        box-shadow: 0 2px 10px rgba(139,92,246,0.06);
    }
    .di-title-input { padding: 13px 16px; font-size: 0.95rem; }
    .di-date-input { padding: 9px 13px; font-size: 0.9rem; }
    .di-title-input:focus, .di-date-input:focus { border-color: #a78bfa; box-shadow: 0 0 0 4px rgba(139,92,246,0.12); }
    .di-picker {
        background: #fff; border: 1px solid rgba(139,92,246,0.12); border-radius: 20px;
        padding: 14px; box-shadow: 0 4px 18px rgba(139,92,246,0.06);
    }
    .di-picker-label { font-size: 0.8rem; margin-bottom: 10px; }
    .di-mood-item, .di-weather-item { background: #f8f5fe; border: 1.5px solid transparent; border-radius: 14px; padding: 10px 2px 8px; }
    .di-mood-item .em, .di-weather-item .em { font-size: 1.2rem; }
    .di-mood-item .nm, .di-weather-item .nm { font-size: 0.62rem; }
    .di-mood-item.active, .di-weather-item.active {
        background: linear-gradient(160deg, rgba(139,92,246,0.16), rgba(236,72,153,0.12));
        border-color: #a78bfa; box-shadow: 0 6px 16px rgba(139,92,246,0.18);
    }
    .di-weather-item.active { border-color: #38bdf8; box-shadow: 0 6px 16px rgba(56,189,248,0.18); }
    .di-cat-chip {
        border: 1.5px solid rgba(139,92,246,0.14); background: #fff; border-radius: 999px;
        padding: 8px 16px; box-shadow: 0 2px 8px rgba(139,92,246,0.05);
    }
    .di-cat-chip.active { box-shadow: 0 6px 16px rgba(139,92,246,0.32); }
    .di-content-input {
        background: #fff; border: 1.5px solid rgba(139,92,246,0.18); border-radius: 18px;
        padding: 16px 16px 34px; box-shadow: 0 2px 12px rgba(139,92,246,0.05);
    }
    .di-content-input:focus { border-color: #a78bfa; box-shadow: 0 0 0 4px rgba(139,92,246,0.12); }
    .di-tags-input { background: #fff; border: 1.5px solid rgba(139,92,246,0.18); border-radius: 16px; box-shadow: 0 2px 10px rgba(139,92,246,0.05); }
    .di-tags-input:focus { border-color: #a78bfa; }
    .di-save-btn { border-radius: 18px; padding: 13px 30px; font-size: 0.95rem; }
    .di-cancel-btn { border-radius: 18px; }
    .di-recent-tip { font-size: 0.78rem; }

    /* ---------- 3. 日记本页 · 工具栏/筛选/条目/日历 ---------- */
    .di-book-toolbar { margin-bottom: 12px; }
    .di-view-switch { background: #fff; border: 1px solid rgba(139,92,246,0.14); border-radius: 16px; padding: 4px; box-shadow: 0 2px 10px rgba(139,92,246,0.06); }
    .di-view-btn { border-radius: 12px; padding: 7px 16px; }
    .di-month-nav button { width: 36px; height: 36px; border-radius: 12px; border: 1px solid rgba(139,92,246,0.16); background: #fff; box-shadow: 0 2px 8px rgba(139,92,246,0.05); }
    .di-month-label { font-size: 0.92rem; }
    .di-search-box { background: #fff; border: 1.5px solid rgba(139,92,246,0.16); border-radius: 16px; padding: 0 16px; box-shadow: 0 2px 10px rgba(139,92,246,0.05); }
    .di-cat-filter { background: #fff; border: 1.5px solid rgba(139,92,246,0.16); border-radius: 16px; }
    .di-fav-filter { width: 40px; height: 40px; border-radius: 14px; border: 1.5px solid rgba(139,92,246,0.16); background: #fff; box-shadow: 0 2px 10px rgba(139,92,246,0.05); }
    .di-entry-list { gap: 12px; }
    .di-entry-item {
        background: #fff; border: 1px solid rgba(139,92,246,0.12); border-radius: 20px;
        padding: 14px 15px 14px 19px; gap: 13px;
        box-shadow: 0 4px 16px rgba(139,92,246,0.06);
    }
    .di-entry-item::before { width: 4px; border-radius: 0 4px 4px 0; }
    .di-entry-item:active { transform: scale(.985); }
    .di-entry-emoji { width: 46px; height: 46px; border-radius: 15px; font-size: 1.5rem; background: linear-gradient(135deg, rgba(139,92,246,0.12), rgba(236,72,153,0.12)); border: 1px solid rgba(139,92,246,0.10); }
    .di-entry-title { font-size: 0.95rem; }
    .di-entry-ops button { width: 28px; height: 28px; border-radius: 10px; border-color: rgba(139,92,246,0.16); background: rgba(255,255,255,0.9); }
    .di-entry-group-date { display: flex; align-items: center; gap: 8px; margin: 14px 2px 6px; font-size: 0.78rem; }
    .di-entry-group-date::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(139,92,246,0.18) 0%, rgba(139,92,246,0) 100%); }
    .di-empty { padding: 44px 16px; }
    .di-empty i { font-size: 40px; }
    .di-load-more button { border-radius: 999px; }
    .di-calendar { background: #fff; border: 1px solid rgba(139,92,246,0.12); border-radius: 20px; padding: 14px; box-shadow: 0 4px 18px rgba(139,92,246,0.06); }
    .di-cal-cell { background: #f8f5fe; border-radius: 12px; }
    .di-cal-cell.has-diary { background: linear-gradient(135deg, rgba(139,92,246,0.16), rgba(236,72,153,0.16)); border-color: rgba(139,92,246,0.35); }
    .di-cal-cell.today { border-color: #ec4899; box-shadow: 0 0 0 2px rgba(236,72,153,0.18); }

    /* ---------- 4. 统计页 ---------- */
    .di-streak-card { border-radius: 22px; padding: 18px 20px; box-shadow: 0 10px 30px rgba(139,92,246,0.30); }
    .di-streak-flame { width: 54px; height: 54px; border-radius: 16px; }
    .di-streak-num span { font-size: 2rem; }
    .di-stat-grid { gap: 10px; }
    .di-stat-card { background: #fff; border: 1px solid rgba(139,92,246,0.12); border-radius: 18px; padding: 14px 12px; box-shadow: 0 2px 12px rgba(139,92,246,0.05); }
    .di-stat-value { font-size: 1.2rem; }
    .di-goal-box { background: #fff; border: 1px solid rgba(139,92,246,0.12); border-radius: 18px; box-shadow: 0 2px 12px rgba(139,92,246,0.05); }
    .di-md-bar-wrap { background: #f1ebfb; }
    .di-md-em { font-size: 1.3rem; }

    /* ---------- 5. 设置页 ---------- */
    .di-set-section { background: #fff; border: 1px solid rgba(139,92,246,0.12); border-radius: 20px; padding: 18px; box-shadow: 0 2px 14px rgba(139,92,246,0.05); }
    .di-set-title { font-size: 0.95rem; }
    .di-tip { border-radius: 14px; }
    .di-field input, .di-cat-add-row input { background: #fff; border: 1.5px solid rgba(139,92,246,0.18); border-radius: 14px; }
    .di-field input:focus, .di-cat-add-row input:focus { border-color: #a78bfa; box-shadow: 0 0 0 4px rgba(139,92,246,0.12); }
    .di-mini-btn { border-radius: 14px; }
    .di-mg-item { border-radius: 999px; border-color: rgba(139,92,246,0.16); background: #fff; }
    .di-ico-opt { width: 34px; height: 34px; border-radius: 12px; }

    /* ---------- 6. 弹窗 / Toast ---------- */
    .di-modal { border-radius: 24px; }
    .di-read-modal { border-radius: 24px; }
    .di-toast { border-radius: 16px; }

    /* ---------- 7. 登录引导 · APP 启动页化 ---------- */
    .di-login-guide {
        min-height: calc(100vh - 56px - env(safe-area-inset-top, 0px) - 60px);
        display: flex; flex-direction: column; justify-content: center;
        padding: 40px 26px 32px;
    }
    .di-login-badge { width: 104px; height: 104px; border-radius: 30px; margin-bottom: 22px; }
    .di-login-badge i { font-size: 2.6rem; }
    .di-login-guide h3 { font-size: 1.28rem; margin: 8px 0 10px; }
    .di-login-guide p { font-size: 0.9rem; }
    .di-login-feats { gap: 10px; margin-bottom: 26px; }
    .di-login-feat { padding: 9px 15px; font-size: 0.8rem; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
    .di-login-btns { flex-direction: column; gap: 13px; width: 100%; margin-top: 4px; }
    .di-login-btns a { padding: 16px 0; min-height: 52px; font-size: 1.02rem; }
    .di-login-btns a.main,
    .di-login-btns a.ghost { width: 100%; max-width: 360px; justify-content: center; border-radius: 16px; }
}

/* ============================================================
   v2 新增样式：玻璃拟态 + 极光背景 + 动态特效 + 三套主题
   ============================================================ */

/* ---------- 主题 CSS 变量 ---------- */
.di-app {
    --di-bg-1: #f5f3ff;
    --di-bg-2: #ede9fe;
    --di-bg-3: #fce7f3;
    --di-card-bg: rgba(255,255,255,0.72);
    --di-card-border: rgba(139,92,246,0.22);
    --di-card-shadow: 0 10px 36px rgba(139,92,246,0.12);
    --di-text: #1e293b;
    --di-text-soft: #475569;
    --di-text-mute: #94a3b8;
    --di-accent: #8b5cf6;
    --di-accent-2: #ec4899;
    --di-accent-3: #38bdf8;
    --di-glow: rgba(139,92,246,0.45);
    --di-input-bg: rgba(255,255,255,0.85);
    --di-input-border: rgba(196,165,255,0.38);
    --di-mask: rgba(30,27,75,0.55);
}
.di-app[data-di-theme="dawn"] {
    --di-bg-1: #fff7ed;
    --di-bg-2: #ffedd5;
    --di-bg-3: #fee2e2;
    --di-card-bg: rgba(255,251,245,0.78);
    --di-card-border: rgba(251,146,60,0.30);
    --di-card-shadow: 0 10px 36px rgba(251,146,60,0.14);
    --di-text: #431407;
    --di-text-soft: #7c2d12;
    --di-text-mute: #a8a29e;
    --di-accent: #f97316;
    --di-accent-2: #ef4444;
    --di-accent-3: #f59e0b;
    --di-glow: rgba(251,146,60,0.45);
    --di-input-bg: rgba(255,251,245,0.88);
    --di-input-border: rgba(251,146,60,0.35);
    --di-mask: rgba(67,20,7,0.55);
}
.di-app[data-di-theme="night"] {
    --di-bg-1: #0f172a;
    --di-bg-2: #1e1b4b;
    --di-bg-3: #312e81;
    --di-card-bg: rgba(30,27,75,0.55);
    --di-card-border: rgba(165,180,252,0.22);
    --di-card-shadow: 0 12px 38px rgba(99,102,241,0.32);
    --di-text: #e0e7ff;
    --di-text-soft: #c7d2fe;
    --di-text-mute: #94a3b8;
    --di-accent: #a78bfa;
    --di-accent-2: #f472b6;
    --di-accent-3: #38bdf8;
    --di-glow: rgba(167,139,250,0.55);
    --di-input-bg: rgba(15,23,42,0.55);
    --di-input-border: rgba(165,180,252,0.30);
    --di-mask: rgba(0,0,0,0.72);
}

/* 让原卡片、输入等使用主题变量 */
.di-app .di-card,
.di-app .di-picker,
.di-app .di-cm-card,
.di-app .di-set-section {
    background: var(--di-card-bg);
    border-color: var(--di-card-border);
    box-shadow: var(--di-card-shadow);
    color: var(--di-text);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
.di-app .di-title-input,
.di-app .di-date-input,
.di-app .di-tags-input,
.di-app .di-content-input {
    background: var(--di-input-bg);
    border-color: var(--di-input-border);
    color: var(--di-text);
}
.di-app .di-cat-chip { background: var(--di-input-bg); border-color: var(--di-input-border); color: var(--di-text-soft); }
.di-app .di-cat-chip.active { background: linear-gradient(135deg, var(--di-accent), var(--di-accent-2)); color: #fff; border-color: transparent; }
.di-app .di-tab.active { background: linear-gradient(135deg, var(--di-accent), var(--di-accent-2)); }
.di-app .di-mood-item.active { border-color: var(--di-accent); background: linear-gradient(135deg, rgba(139,92,246,0.14), rgba(236,72,153,0.14)); }
.di-app .di-weather-item.active { border-color: var(--di-accent-3); }

/* ---------- 极光背景动画 ---------- */
@keyframes di-aurora-flow {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.di-aurora-bg {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background: linear-gradient(120deg, var(--di-bg-1), var(--di-bg-2), var(--di-bg-3), var(--di-bg-2), var(--di-bg-1));
    background-size: 400% 400%;
    animation: di-aurora-flow 18s ease infinite;
    opacity: 0.85;
    transition: opacity .6s ease;
}

/* ---------- 通用卡片 ---------- */
.di-cm-card {
    background: var(--di-card-bg);
    border: 1px solid var(--di-card-border);
    border-radius: 18px; padding: 16px;
    box-shadow: var(--di-card-shadow);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform .25s ease, box-shadow .25s ease;
    position: relative; overflow: hidden;
}
.di-cm-card:hover { transform: translateY(-2px); box-shadow: 0 14px 42px rgba(139,92,246,0.22); }
.di-cm-card-h { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 0.88rem; font-weight: 700; color: var(--di-text); }
.di-cm-card-h i { color: var(--di-accent); }
.di-cm-card-sub { font-size: 0.74rem; color: var(--di-text-mute); margin-top: 4px; }

/* ---------- 去年今日卡片 ---------- */
.di-memory {
    margin-top: 14px; padding: 12px 14px;
    background: linear-gradient(135deg, rgba(139,92,246,0.10), rgba(236,72,153,0.08));
    border: 1px solid rgba(139,92,246,0.28);
    border-radius: 14px; position: relative; overflow: hidden;
}
.di-memory::before {
    content: ''; position: absolute; top: -20px; right: -20px;
    width: 80px; height: 80px; border-radius: 50%;
    background: radial-gradient(circle, rgba(236,72,153,0.18), transparent 70%);
}
.di-memory-head { display: flex; align-items: center; gap: 6px; font-size: 0.82rem; font-weight: 700; color: var(--di-accent); margin-bottom: 8px; }
.di-memory-head i { animation: di-spin-slow 12s linear infinite; }
@keyframes di-spin-slow { to { transform: rotate(360deg); } }
.di-memory-list { display: flex; flex-direction: column; gap: 6px; }
.di-memory-item {
    padding: 8px 10px; background: rgba(255,255,255,0.65);
    border-radius: 10px; font-size: 0.78rem; color: var(--di-text-soft);
    cursor: pointer; transition: all .2s ease;
}
.di-memory-item:hover { background: rgba(255,255,255,0.92); transform: translateX(3px); }
.di-memory-item .mi-title { font-weight: 600; color: var(--di-text); margin-bottom: 3px; }
.di-memory-item .mi-snippet { font-size: 0.74rem; color: var(--di-text-mute); line-height: 1.45; }

/* ---------- 工具栏 ---------- */
.di-toolbar {
    display: flex; gap: 8px; margin: 10px 0 12px; flex-wrap: wrap;
    padding: 8px; background: var(--di-card-bg);
    border: 1px solid var(--di-card-border);
    border-radius: 14px; backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.di-tool-btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 7px 12px; border-radius: 10px; cursor: pointer;
    border: 1px solid rgba(139,92,246,0.22);
    background: rgba(255,255,255,0.7); color: var(--di-text-soft);
    font-size: 0.78rem; font-weight: 600;
    transition: all .2s ease; user-select: none;
}
.di-tool-btn:hover { transform: translateY(-1px); color: var(--di-accent); border-color: var(--di-accent); box-shadow: 0 4px 12px var(--di-glow); }
.di-tool-btn.on {
    background: linear-gradient(135deg, var(--di-accent), var(--di-accent-2));
    color: #fff; border-color: transparent; box-shadow: 0 6px 16px var(--di-glow);
}
.di-tool-btn i { font-size: 0.82rem; }
.di-lock-toggle { cursor: pointer; }
.di-lock-toggle input { display: none; }
.di-lock-toggle.on .fa-lock { color: #f59e0b; }
.di-lock-mark { color: #f59e0b; font-size: 0.7rem; margin-left: 4px; }
.di-att-mark { color: var(--di-accent); font-size: 0.7rem; margin-left: 4px; }

/* ---------- Markdown 工具条 ---------- */
.di-md-bar {
    display: flex; gap: 4px; flex-wrap: wrap; padding: 6px;
    background: var(--di-card-bg); border: 1px solid var(--di-card-border);
    border-radius: 10px; margin-bottom: 8px;
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.di-md-bar button {
    min-width: 30px; height: 30px; padding: 0 8px;
    border: 1px solid rgba(139,92,246,0.18);
    background: rgba(255,255,255,0.7); color: var(--di-text-soft);
    border-radius: 8px; cursor: pointer; font-size: 0.8rem; font-weight: 700;
    transition: all .15s ease;
}
.di-md-bar button:hover { color: #fff; background: linear-gradient(135deg, var(--di-accent), var(--di-accent-2)); border-color: transparent; }
.di-md-bar button i { font-size: 0.74rem; }

/* ---------- 附件预览区 ---------- */
.di-att-row {
    margin-top: 10px; padding: 10px 12px;
    background: var(--di-card-bg); border: 1px solid var(--di-card-border);
    border-radius: 14px; backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.di-att-head { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 700; color: var(--di-accent); margin-bottom: 8px; }
.di-att-list { display: flex; gap: 8px; flex-wrap: wrap; }
.di-att-item {
    position: relative; width: 80px; height: 80px;
    border-radius: 12px; overflow: hidden;
    border: 1px solid rgba(139,92,246,0.28);
    background: #fff; box-shadow: 0 4px 10px rgba(139,92,246,0.15);
    transition: transform .2s ease;
}
.di-att-item:hover { transform: scale(1.04); }
.di-att-item img { width: 100%; height: 100%; object-fit: cover; }
.di-att-item .att-audio {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--di-accent), var(--di-accent-2));
    color: #fff; font-size: 1.4rem;
}
.di-att-del {
    position: absolute; top: 2px; right: 2px;
    width: 20px; height: 20px; border-radius: 50%;
    background: rgba(239,68,68,0.9); color: #fff; border: none;
    cursor: pointer; font-size: 0.7rem; display: flex; align-items: center; justify-content: center;
    transition: transform .15s ease;
}
.di-att-del:hover { transform: scale(1.15); }

/* ---------- 回收站按钮 ---------- */
.di-trash-btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 7px 14px; border-radius: 10px; cursor: pointer;
    border: 1px solid rgba(139,92,246,0.22);
    background: rgba(255,255,255,0.7); color: #64748b;
    font-size: 0.8rem; font-weight: 600;
    transition: all .2s ease;
}
.di-trash-btn:hover { color: #ef4444; border-color: #ef4444; box-shadow: 0 4px 12px rgba(239,68,68,0.22); }

/* ---------- 写作热力图 ---------- */
.di-heat { margin-top: 4px; }
.di-heat-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(11px, 1fr));
    gap: 3px; padding: 10px; background: var(--di-card-bg);
    border: 1px solid var(--di-card-border); border-radius: 14px;
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.di-heat-cell {
    width: 11px; height: 11px; border-radius: 3px;
    background: rgba(139,92,246,0.08); transition: transform .15s ease;
}
.di-heat-cell:hover { transform: scale(1.5); }
.di-heat-cell.l1 { background: rgba(139,92,246,0.25); }
.di-heat-cell.l2 { background: rgba(139,92,246,0.45); }
.di-heat-cell.l3 { background: rgba(139,92,246,0.68); }
.di-heat-cell.l4 { background: linear-gradient(135deg, #8b5cf6, #ec4899); box-shadow: 0 0 6px rgba(139,92,246,0.55); }
.di-heat-legend {
    display: flex; align-items: center; gap: 6px; justify-content: flex-end;
    margin-top: 6px; font-size: 0.7rem; color: var(--di-text-mute);
}
.di-heat-legend .di-heat-cell { width: 10px; height: 10px; }

/* ---------- 心情趋势曲线 ---------- */
.di-trend { margin-top: 4px; }
.di-trend-svg {
    width: 100%; height: 160px; display: block;
    background: var(--di-card-bg); border: 1px solid var(--di-card-border);
    border-radius: 14px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.di-trend-svg .axis-line { stroke: rgba(139,92,246,0.22); stroke-width: 1; }
.di-trend-svg .axis-text { fill: var(--di-text-mute); font-size: 9px; }
.di-trend-svg .trend-path { fill: none; stroke: url(#di-trend-grad); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.di-trend-svg .trend-area { fill: url(#di-trend-fill); opacity: 0.5; }
.di-trend-svg .trend-dot { fill: #fff; stroke: var(--di-accent); stroke-width: 2; transition: r .2s ease; }
.di-trend-svg .trend-dot:hover { r: 6; }

/* ---------- 标签云 ---------- */
.di-tag-cloud {
    display: flex; gap: 8px; flex-wrap: wrap; padding: 12px;
    background: var(--di-card-bg); border: 1px solid var(--di-card-border);
    border-radius: 14px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    min-height: 80px;
}
.di-tag-chip {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 6px 12px; border-radius: 999px; cursor: pointer;
    background: rgba(139,92,246,0.08); border: 1px solid rgba(139,92,246,0.22);
    color: var(--di-text-soft); font-weight: 600;
    transition: all .2s ease;
}
.di-tag-chip:hover { transform: translateY(-2px); color: #fff; background: linear-gradient(135deg, var(--di-accent), var(--di-accent-2)); border-color: transparent; box-shadow: 0 4px 12px var(--di-glow); }
.di-tag-chip .tc-count { font-size: 0.68rem; color: var(--di-text-mute); padding: 1px 6px; background: rgba(255,255,255,0.7); border-radius: 99px; }
.di-tag-chip:hover .tc-count { color: #fff; background: rgba(255,255,255,0.22); }
.di-tag-chip.tc-s1 { font-size: 0.78rem; }
.di-tag-chip.tc-s2 { font-size: 0.88rem; }
.di-tag-chip.tc-s3 { font-size: 1.0rem; font-weight: 700; }

/* ---------- 月度报告 ---------- */
.di-report { margin-top: 4px; }
.di-report-sel {
    display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
    padding: 8px 12px; background: var(--di-card-bg);
    border: 1px solid var(--di-card-border); border-radius: 12px;
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.di-report-sel select {
    flex: 1; padding: 7px 10px; border-radius: 8px;
    border: 1px solid var(--di-input-border); background: var(--di-input-bg);
    color: var(--di-text); font-size: 0.85rem; outline: none;
}
.di-report-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 10px; padding: 12px; background: var(--di-card-bg);
    border: 1px solid var(--di-card-border); border-radius: 14px;
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.di-report-item { text-align: center; padding: 8px 4px; }
.di-report-item .ri-num { font-size: 1.4rem; font-weight: 800; background: linear-gradient(135deg, var(--di-accent), var(--di-accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.di-report-item .ri-lbl { font-size: 0.72rem; color: var(--di-text-mute); margin-top: 4px; }
.di-report-bar { margin-top: 8px; }
.di-report-bar .rb-track { height: 6px; background: rgba(139,92,246,0.10); border-radius: 99px; overflow: hidden; }
.di-report-bar .rb-fill { height: 100%; background: linear-gradient(90deg, var(--di-accent), var(--di-accent-2)); border-radius: 99px; transition: width .8s ease; }
.di-report-bar .rb-lbl { font-size: 0.7rem; color: var(--di-text-mute); margin-top: 4px; display: flex; justify-content: space-between; }

/* ---------- 成就徽章墙 ---------- */
.di-ach-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px; padding: 12px; background: var(--di-card-bg);
    border: 1px solid var(--di-card-border); border-radius: 14px;
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.di-ach-item {
    position: relative; padding: 14px 8px 10px; text-align: center;
    background: rgba(255,255,255,0.6); border: 1px dashed rgba(139,92,246,0.28);
    border-radius: 14px; transition: all .25s ease;
    filter: grayscale(1); opacity: 0.55;
}
.di-ach-item.on {
    filter: none; opacity: 1;
    background: linear-gradient(135deg, rgba(139,92,246,0.14), rgba(236,72,153,0.12));
    border: 1px solid rgba(139,92,246,0.55);
    box-shadow: 0 6px 18px var(--di-glow);
    animation: di-badge-glow 2.4s ease-in-out infinite;
}
@keyframes di-badge-glow {
    0%, 100% { box-shadow: 0 6px 18px rgba(139,92,246,0.45); }
    50% { box-shadow: 0 6px 26px rgba(236,72,153,0.65); }
}
.di-ach-ico {
    width: 44px; height: 44px; margin: 0 auto 6px;
    border-radius: 12px; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--di-accent), var(--di-accent-2));
    color: #fff; font-size: 1.1rem;
    box-shadow: 0 4px 10px var(--di-glow);
}
.di-ach-item:not(.on) .di-ach-ico { background: #cbd5e1; box-shadow: none; }
.di-ach-name { font-size: 0.76rem; font-weight: 700; color: var(--di-text); }
.di-ach-desc { font-size: 0.66rem; color: var(--di-text-mute); margin-top: 2px; }
.di-ach-unlock {
    position: absolute; top: 4px; right: 4px;
    width: 18px; height: 18px; border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #fff; font-size: 0.6rem; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 6px rgba(245,158,11,0.55);
}

/* ---------- 年度回顾入口 ---------- */
.di-year-entry {
    margin-top: 4px; padding: 14px 16px;
    background: linear-gradient(135deg, rgba(139,92,246,0.18), rgba(236,72,153,0.14), rgba(56,189,248,0.10));
    border: 1px solid rgba(139,92,246,0.35); border-radius: 18px;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    position: relative; overflow: hidden;
}
.di-year-entry::before {
    content: ''; position: absolute; top: -40px; right: -40px;
    width: 120px; height: 120px; border-radius: 50%;
    background: radial-gradient(circle, rgba(236,72,153,0.32), transparent 70%);
    animation: di-pulse 4s ease-in-out infinite;
}
@keyframes di-pulse { 0%, 100% { transform: scale(1); opacity: 0.55; } 50% { transform: scale(1.2); opacity: 0.85; } }
.di-year-entry .ye-l { display: flex; align-items: center; gap: 10px; z-index: 1; }
.di-year-entry .ye-ico {
    width: 42px; height: 42px; border-radius: 12px;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    color: #fff; font-size: 1.1rem;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 18px var(--di-glow);
    animation: di-breath 3s ease-in-out infinite;
}
.di-year-entry .ye-t { font-size: 0.92rem; font-weight: 700; color: var(--di-text); }
.di-year-entry .ye-s { font-size: 0.74rem; color: var(--di-text-mute); margin-top: 2px; }
.di-year-btn {
    padding: 8px 16px; border-radius: 999px; border: none; cursor: pointer;
    background: linear-gradient(135deg, var(--di-accent), var(--di-accent-2));
    color: #fff; font-size: 0.82rem; font-weight: 700;
    box-shadow: 0 6px 16px var(--di-glow);
    transition: all .25s ease;
    animation: di-slide-up .5s ease;
}
.di-year-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px var(--di-glow); }
@keyframes di-slide-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- 年度回顾弹窗（极光动画） ---------- */
.di-yr-modal {
    position: fixed; inset: 0; z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    background: var(--di-mask); backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: di-fade-in .35s ease;
}
@keyframes di-fade-in { from { opacity: 0; } to { opacity: 1; } }
.di-yr-aurora {
    position: absolute; inset: 0; overflow: hidden; border-radius: 24px;
    background: linear-gradient(120deg, #f5f3ff, #ede9fe, #fce7f3, #e0f2fe, #f5f3ff);
    background-size: 400% 400%;
    animation: di-aurora-flow 14s ease infinite;
}
.di-yr-aurora::before, .di-yr-aurora::after {
    content: ''; position: absolute; border-radius: 50%; filter: blur(60px);
}
.di-yr-aurora::before { top: -100px; left: -100px; width: 280px; height: 280px; background: rgba(139,92,246,0.55); animation: di-pulse 6s ease-in-out infinite; }
.di-yr-aurora::after { bottom: -100px; right: -100px; width: 320px; height: 320px; background: rgba(236,72,153,0.45); animation: di-pulse 7s ease-in-out infinite 1s; }
.di-yr-content {
    position: relative; z-index: 2; max-width: 720px; width: 92vw;
    max-height: 88vh; overflow-y: auto; padding: 24px;
    color: #1e293b;
}
.di-yr-head { text-align: center; margin-bottom: 18px; }
.di-yr-head h2 { font-size: 1.6rem; font-weight: 800; background: linear-gradient(135deg, #8b5cf6, #ec4899, #38bdf8); -webkit-background-clip: text; background-clip: text; color: transparent; margin: 0; }
.di-yr-head p { color: #64748b; font-size: 0.85rem; margin: 6px 0 0; }
.di-yr-stats {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px; margin: 16px 0;
}
.di-yr-stat {
    background: rgba(255,255,255,0.72); border: 1px solid rgba(139,92,246,0.22);
    border-radius: 16px; padding: 12px; text-align: center;
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.di-yr-stat .ys-num { font-size: 1.6rem; font-weight: 800; background: linear-gradient(135deg, #8b5cf6, #ec4899); -webkit-background-clip: text; background-clip: text; color: transparent; }
.di-yr-stat .ys-lbl { font-size: 0.74rem; color: #64748b; margin-top: 2px; }
.di-yr-month {
    margin-top: 14px; padding: 12px 14px;
    background: rgba(255,255,255,0.6); border: 1px solid rgba(139,92,246,0.22);
    border-radius: 14px;
}
.di-yr-mh { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.di-yr-mh .ym-name { font-size: 0.88rem; font-weight: 700; color: #1e293b; }
.di-yr-mh .ym-cnt { font-size: 0.74rem; color: #7c3aed; }
.di-yr-mbar { height: 8px; background: rgba(139,92,246,0.10); border-radius: 99px; overflow: hidden; }
.di-yr-mbar .ym-fill { height: 100%; background: linear-gradient(90deg, #8b5cf6, #ec4899); border-radius: 99px; transition: width 1s ease; }
.di-yr-close {
    position: absolute; top: 14px; right: 14px;
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(255,255,255,0.85); border: none; cursor: pointer;
    color: #64748b; font-size: 1rem; z-index: 3;
    transition: all .2s ease;
}
.di-yr-close:hover { background: #fff; color: #ef4444; transform: rotate(90deg); }

/* ---------- 模板弹窗 ---------- */
.di-tpl-modal {
    position: fixed; inset: 0; z-index: 9998;
    display: flex; align-items: center; justify-content: center;
    background: var(--di-mask); backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: di-fade-in .3s ease;
}
.di-tpl-box {
    position: relative; max-width: 540px; width: 92vw;
    max-height: 80vh; overflow-y: auto; padding: 20px;
    background: var(--di-card-bg); border: 1px solid var(--di-card-border);
    border-radius: 18px; box-shadow: 0 20px 50px rgba(0,0,0,0.25);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    animation: di-slide-up .35s ease;
}
.di-tpl-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.di-tpl-head h3 { font-size: 1.05rem; font-weight: 700; color: var(--di-text); margin: 0; }
.di-tpl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.di-tpl-item {
    padding: 12px 10px; cursor: pointer; text-align: left;
    background: rgba(255,255,255,0.7); border: 1px solid rgba(139,92,246,0.22);
    border-radius: 12px; transition: all .2s ease;
}
.di-tpl-item:hover { transform: translateY(-2px); background: linear-gradient(135deg, rgba(139,92,246,0.14), rgba(236,72,153,0.10)); border-color: var(--di-accent); }
.di-tpl-item .ti-ico { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, var(--di-accent), var(--di-accent-2)); color: #fff; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.di-tpl-item .ti-name { font-size: 0.82rem; font-weight: 700; color: var(--di-text); }
.di-tpl-item .ti-desc { font-size: 0.7rem; color: var(--di-text-mute); margin-top: 2px; }

/* ---------- AI 助手弹窗 ---------- */
.di-ai-modal {
    position: fixed; inset: 0; z-index: 9998;
    display: flex; align-items: center; justify-content: center;
    background: var(--di-mask); backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: di-fade-in .3s ease;
}
.di-ai-box {
    position: relative; max-width: 560px; width: 92vw;
    max-height: 82vh; overflow-y: auto; padding: 20px;
    background: var(--di-card-bg); border: 1px solid var(--di-card-border);
    border-radius: 18px; box-shadow: 0 20px 50px rgba(0,0,0,0.25);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    animation: di-slide-up .35s ease;
}
.di-ai-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.di-ai-head h3 { font-size: 1.05rem; font-weight: 700; color: var(--di-text); margin: 0; display: flex; align-items: center; gap: 6px; }
.di-ai-head h3 i { color: var(--di-accent); animation: di-spin-slow 8s linear infinite; }
.di-ai-mode { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.di-ai-mode button {
    padding: 6px 12px; border-radius: 999px; cursor: pointer;
    border: 1px solid rgba(139,92,246,0.28); background: rgba(255,255,255,0.7);
    color: var(--di-text-soft); font-size: 0.78rem; font-weight: 600;
    transition: all .2s ease;
}
.di-ai-mode button.on { background: linear-gradient(135deg, var(--di-accent), var(--di-accent-2)); color: #fff; border-color: transparent; box-shadow: 0 4px 12px var(--di-glow); }
.di-ai-out {
    min-height: 180px; padding: 14px;
    background: rgba(255,255,255,0.6); border: 1px solid rgba(139,92,246,0.22);
    border-radius: 12px; margin-bottom: 10px;
    color: var(--di-text); font-size: 0.88rem; line-height: 1.7;
    white-space: pre-wrap; word-break: break-word;
}
.di-ai-text {
    width: 100%; min-height: 60px; padding: 10px 12px;
    background: var(--di-input-bg); border: 1px solid var(--di-input-border);
    border-radius: 10px; color: var(--di-text); font-size: 0.85rem;
    outline: none; resize: vertical; font-family: inherit;
}
.di-ai-acts { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.di-ai-acts button {
    padding: 8px 16px; border-radius: 10px; cursor: pointer;
    border: none; font-size: 0.82rem; font-weight: 700;
    transition: all .2s ease;
}
.di-ai-acts .ai-gen { background: linear-gradient(135deg, var(--di-accent), var(--di-accent-2)); color: #fff; box-shadow: 0 4px 12px var(--di-glow); }
.di-ai-acts .ai-gen:hover { transform: translateY(-1px); box-shadow: 0 6px 18px var(--di-glow); }
.di-ai-acts .ai-append, .di-ai-acts .ai-copy {
    background: rgba(255,255,255,0.8); color: var(--di-text-soft);
    border: 1px solid rgba(139,92,246,0.28);
}
.di-ai-acts .ai-append:hover, .di-ai-acts .ai-copy:hover { color: var(--di-accent); border-color: var(--di-accent); }

/* ---------- 回收站弹窗 ---------- */
.di-trash-modal {
    position: fixed; inset: 0; z-index: 9998;
    display: flex; align-items: center; justify-content: center;
    background: var(--di-mask); backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: di-fade-in .3s ease;
}
.di-trash-box {
    position: relative; max-width: 620px; width: 92vw;
    max-height: 80vh; overflow-y: auto; padding: 20px;
    background: var(--di-card-bg); border: 1px solid var(--di-card-border);
    border-radius: 18px; box-shadow: 0 20px 50px rgba(0,0,0,0.25);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    animation: di-slide-up .35s ease;
}
.di-trash-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.di-trash-head h3 { font-size: 1.05rem; font-weight: 700; color: var(--di-text); margin: 0; }
.di-trash-empty { text-align: center; padding: 30px 10px; color: var(--di-text-mute); }
.di-trash-empty i { font-size: 2rem; color: #cbd5e1; margin-bottom: 8px; }
.di-trash-item {
    padding: 10px 12px; margin-bottom: 8px;
    background: rgba(255,255,255,0.6); border: 1px solid rgba(139,92,246,0.18);
    border-radius: 12px; transition: all .2s ease;
}
.di-trash-item:hover { background: rgba(255,255,255,0.85); }
.di-trash-item .ti-title { font-size: 0.88rem; font-weight: 700; color: var(--di-text); }
.di-trash-item .ti-meta { font-size: 0.72rem; color: var(--di-text-mute); margin-top: 4px; }
.di-trash-item .ti-snippet { font-size: 0.76rem; color: var(--di-text-soft); margin-top: 4px; line-height: 1.5; }
.di-trash-ops { display: flex; gap: 6px; margin-top: 8px; }
.di-trash-ops button {
    padding: 5px 12px; border-radius: 8px; cursor: pointer;
    border: 1px solid rgba(139,92,246,0.28); background: rgba(255,255,255,0.8);
    color: var(--di-text-soft); font-size: 0.74rem; font-weight: 600;
    transition: all .2s ease;
}
.di-trash-ops .op-restore:hover { color: #22c55e; border-color: #22c55e; }
.di-trash-ops .op-purge:hover { color: #ef4444; border-color: #ef4444; }

/* ---------- 分享长图弹窗 ---------- */
.di-share-modal {
    position: fixed; inset: 0; z-index: 9998;
    display: flex; align-items: center; justify-content: center;
    background: var(--di-mask); backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: di-fade-in .3s ease;
}
.di-share-box {
    position: relative; max-width: 520px; width: 92vw;
    max-height: 86vh; overflow-y: auto; padding: 20px;
    background: var(--di-card-bg); border: 1px solid var(--di-card-border);
    border-radius: 18px; box-shadow: 0 20px 50px rgba(0,0,0,0.25);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    animation: di-slide-up .35s ease;
}
.di-share-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.di-share-head h3 { font-size: 1.05rem; font-weight: 700; color: var(--di-text); margin: 0; }
.di-share-body { text-align: center; }
.di-share-body img { max-width: 100%; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,0.15); margin-bottom: 12px; }
.di-share-link {
    display: flex; gap: 6px; margin-top: 10px;
    padding: 8px; background: rgba(255,255,255,0.6);
    border: 1px solid rgba(139,92,246,0.22); border-radius: 10px;
}
.di-share-link input {
    flex: 1; padding: 6px 10px; border: none; background: transparent;
    color: var(--di-text-soft); font-size: 0.78rem; outline: none;
}
.di-share-link button {
    padding: 6px 12px; border-radius: 8px; cursor: pointer;
    background: linear-gradient(135deg, var(--di-accent), var(--di-accent-2));
    color: #fff; border: none; font-size: 0.78rem; font-weight: 700;
}
.di-share-link button:hover { box-shadow: 0 4px 12px var(--di-glow); }

/* ---------- 主题切换 ---------- */
.di-theme-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 10px; margin-top: 8px;
}
.di-theme-opt {
    cursor: pointer; padding: 10px 8px 8px;
    border: 2px solid rgba(139,92,246,0.22); border-radius: 14px;
    background: rgba(255,255,255,0.7); transition: all .25s ease;
    text-align: center;
}
.di-theme-opt:hover { transform: translateY(-2px); }
.di-theme-opt.on { border-color: var(--di-accent); box-shadow: 0 6px 18px var(--di-glow); }
.di-theme-prev {
    width: 100%; height: 50px; border-radius: 10px; margin-bottom: 6px;
    background: linear-gradient(120deg, #f5f3ff, #ede9fe, #fce7f3);
}
.di-theme-opt[data-theme="dawn"] .di-theme-prev { background: linear-gradient(120deg, #fff7ed, #ffedd5, #fee2e2); }
.di-theme-opt[data-theme="night"] .di-theme-prev { background: linear-gradient(120deg, #0f172a, #1e1b4b, #312e81); }
.di-theme-opt .to-name { font-size: 0.78rem; font-weight: 700; color: var(--di-text); }

/* ---------- 批量导出筛选 ---------- */
.di-export-filter {
    display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px;
    padding: 10px; background: rgba(255,255,255,0.5);
    border: 1px solid rgba(139,92,246,0.22); border-radius: 12px;
}
.di-export-filter select {
    flex: 1; min-width: 100px; padding: 7px 10px;
    border: 1px solid var(--di-input-border); background: var(--di-input-bg);
    color: var(--di-text); border-radius: 8px; font-size: 0.82rem; outline: none;
}
.di-export-filter .ef-btn {
    padding: 7px 14px; border-radius: 8px; cursor: pointer;
    background: linear-gradient(135deg, var(--di-accent), var(--di-accent-2));
    color: #fff; border: none; font-size: 0.8rem; font-weight: 700;
    box-shadow: 0 4px 12px var(--di-glow);
}
.di-export-filter .ef-btn:hover { transform: translateY(-1px); }
.di-fav-row {
    display: flex; align-items: center; gap: 8px; margin-top: 8px;
    font-size: 0.8rem; color: var(--di-text-soft);
}
.di-fav-row input { width: 16px; height: 16px; cursor: pointer; accent-color: var(--di-accent); }

/* ---------- 阅读弹窗附件/Markdown ---------- */
.di-read-att {
    margin-top: 14px; padding: 10px;
    background: rgba(139,92,246,0.06); border: 1px dashed rgba(139,92,246,0.28);
    border-radius: 12px;
}
.di-read-att .ra-head { font-size: 0.78rem; font-weight: 700; color: var(--di-accent); margin-bottom: 8px; }
.di-read-att .ra-list { display: flex; gap: 8px; flex-wrap: wrap; }
.di-read-att .ra-list img { width: 80px; height: 80px; object-fit: cover; border-radius: 10px; cursor: pointer; transition: transform .2s ease; }
.di-read-att .ra-list img:hover { transform: scale(1.05); }
.di-read-att .ra-list audio { width: 100%; max-width: 280px; }
.di-read-content.markdown {
    padding: 14px; background: rgba(255,255,255,0.6);
    border-radius: 12px; line-height: 1.8;
}
.di-read-content.markdown h1 { font-size: 1.3rem; margin: 10px 0 8px; }
.di-read-content.markdown h2 { font-size: 1.15rem; margin: 10px 0 6px; }
.di-read-content.markdown h3 { font-size: 1.0rem; margin: 8px 0 4px; }
.di-read-content.markdown p { margin: 6px 0; }
.di-read-content.markdown blockquote { padding: 6px 12px; background: rgba(139,92,246,0.08); border-left: 3px solid var(--di-accent); border-radius: 6px; margin: 8px 0; color: var(--di-text-soft); }
.di-read-content.markdown code { padding: 2px 6px; background: rgba(139,92,246,0.12); border-radius: 4px; font-family: monospace; font-size: 0.85em; }
.di-read-content.markdown pre { padding: 10px; background: rgba(30,27,75,0.06); border-radius: 8px; overflow-x: auto; }
.di-read-content.markdown ul, .di-read-content.markdown ol { padding-left: 22px; margin: 6px 0; }
.di-read-content.markdown img { max-width: 100%; border-radius: 8px; }

/* 分享按钮 */
.rf-share {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 6px 12px; border-radius: 8px; cursor: pointer;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #fff; border: none; font-size: 0.78rem; font-weight: 700;
    box-shadow: 0 4px 12px rgba(245,158,11,0.32);
    transition: all .2s ease;
}
.rf-share:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(236,72,153,0.42); }

/* ---------- 通用弹窗关闭按钮 ---------- */
.di-modal-close {
    width: 30px; height: 30px; border-radius: 50%;
    background: rgba(255,255,255,0.85); border: none; cursor: pointer;
    color: #64748b; font-size: 0.9rem;
    transition: all .2s ease;
    display: flex; align-items: center; justify-content: center;
}
.di-modal-close:hover { background: #fff; color: #ef4444; transform: rotate(90deg); }

/* ---------- 成就解锁弹窗 ---------- */
.di-ach-unlock-modal {
    position: fixed; inset: 0; z-index: 99999;
    display: flex; align-items: center; justify-content: center;
    background: var(--di-mask); backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: di-fade-in .3s ease;
}
.di-ach-unlock-box {
    text-align: center; padding: 30px 24px;
    background: var(--di-card-bg); border: 1px solid var(--di-card-border);
    border-radius: 22px; box-shadow: 0 24px 60px rgba(0,0,0,0.3);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    animation: di-slide-up .4s ease;
    max-width: 360px; width: 88vw; position: relative; overflow: hidden;
}
.di-ach-unlock-box::before {
    content: ''; position: absolute; inset: -50%;
    background: conic-gradient(from 0deg, transparent, rgba(236,72,153,0.32), transparent, rgba(139,92,246,0.32), transparent);
    animation: di-badge-spin 6s linear infinite;
}
.di-ach-unlock-box > * { position: relative; z-index: 1; }
@keyframes di-badge-spin { to { transform: rotate(360deg); } }
.di-ach-unlock-box .au-ico {
    width: 80px; height: 80px; margin: 0 auto 12px;
    border-radius: 22px; background: linear-gradient(135deg, #8b5cf6, #ec4899);
    color: #fff; font-size: 2rem;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 12px 30px var(--di-glow);
    animation: di-breath 2.4s ease-in-out infinite;
}
.di-ach-unlock-box h3 { font-size: 1.1rem; font-weight: 800; color: var(--di-text); margin: 6px 0; }
.di-ach-unlock-box p { font-size: 0.82rem; color: var(--di-text-soft); margin: 0 0 14px; }
.di-ach-unlock-box .au-btn {
    padding: 8px 22px; border-radius: 999px; cursor: pointer;
    background: linear-gradient(135deg, var(--di-accent), var(--di-accent-2));
    color: #fff; border: none; font-size: 0.84rem; font-weight: 700;
    box-shadow: 0 6px 18px var(--di-glow);
}

/* ---------- 密码输入弹窗 ---------- */
.di-pwd-modal {
    position: fixed; inset: 0; z-index: 9998;
    display: flex; align-items: center; justify-content: center;
    background: var(--di-mask); backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: di-fade-in .3s ease;
}
.di-pwd-box {
    text-align: center; padding: 22px 20px;
    background: var(--di-card-bg); border: 1px solid var(--di-card-border);
    border-radius: 18px; box-shadow: 0 20px 50px rgba(0,0,0,0.25);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    animation: di-slide-up .35s ease;
    max-width: 320px; width: 88vw;
}
.di-pwd-box .pd-ico { width: 50px; height: 50px; margin: 0 auto 10px; border-radius: 14px; background: linear-gradient(135deg, #f59e0b, #ef4444); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.di-pwd-box h3 { font-size: 1rem; font-weight: 700; color: var(--di-text); margin: 0 0 10px; }
.di-pwd-box input {
    width: 100%; padding: 10px 12px; margin-bottom: 10px;
    background: var(--di-input-bg); border: 1px solid var(--di-input-border);
    border-radius: 10px; color: var(--di-text); font-size: 0.88rem;
    outline: none; text-align: center;
}
.di-pwd-box input:focus { border-color: var(--di-accent); box-shadow: 0 0 0 3px var(--di-glow); }
.di-pwd-box .pd-btns { display: flex; gap: 8px; }
.di-pwd-box .pd-btns button { flex: 1; padding: 9px; border-radius: 10px; cursor: pointer; border: none; font-size: 0.82rem; font-weight: 700; }
.di-pwd-box .pd-ok { background: linear-gradient(135deg, var(--di-accent), var(--di-accent-2)); color: #fff; }
.di-pwd-box .pd-cancel { background: rgba(255,255,255,0.7); color: var(--di-text-soft); border: 1px solid rgba(139,92,246,0.28); }

/* ---------- 响应式适配 ---------- */
@media (max-width: 768px) {
    .di-toolbar { gap: 5px; padding: 6px; }
    .di-tool-btn { padding: 6px 9px; font-size: 0.72rem; }
    .di-tool-btn span { display: none; }
    .di-tool-btn i { font-size: 0.88rem; }
    .di-md-bar button { min-width: 26px; height: 26px; font-size: 0.74rem; }
    .di-memory { padding: 10px; }
    .di-memory-item .mi-snippet { font-size: 0.7rem; }
    .di-att-item { width: 64px; height: 64px; }
    .di-heat-grid { grid-template-columns: repeat(auto-fit, minmax(9px, 1fr)); gap: 2px; }
    .di-heat-cell { width: 9px; height: 9px; }
    .di-trend-svg { height: 130px; }
    .di-ach-grid { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
    .di-ach-ico { width: 36px; height: 36px; font-size: 0.92rem; }
    .di-year-entry { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; }
    .di-yr-content { padding: 16px; }
    .di-yr-head h2 { font-size: 1.3rem; }
    .di-yr-stats { grid-template-columns: repeat(2, 1fr); }
    .di-tpl-grid, .di-ai-mode { grid-template-columns: repeat(2, 1fr); }
    .di-theme-grid { gap: 6px; }
    .di-theme-prev { height: 40px; }
    .di-export-filter select { min-width: 80px; font-size: 0.76rem; }
}

@media (max-width: 480px) {
    .di-toolbar { flex-wrap: nowrap; overflow-x: auto; padding: 6px 4px; }
    .di-tool-btn { flex-shrink: 0; }
    .di-att-item { width: 56px; height: 56px; }
    .di-heat-cell { width: 8px; height: 8px; border-radius: 2px; }
    .di-trend-svg { height: 110px; }
    .di-ach-grid { grid-template-columns: repeat(2, 1fr); }
    .di-yr-stats { grid-template-columns: 1fr; }
    .di-tpl-grid, .di-ai-mode { grid-template-columns: 1fr; }
    .di-theme-grid { grid-template-columns: 1fr; }
    .di-trash-ops button { padding: 4px 10px; font-size: 0.7rem; }
    .di-ach-unlock-box { padding: 22px 16px; }
    .di-ach-unlock-box .au-ico { width: 64px; height: 64px; font-size: 1.6rem; }
}

/* ---------- 暗夜主题细节调整 ---------- */
.di-app[data-di-theme="night"] .di-card,
.di-app[data-di-theme="night"] .di-cm-card,
.di-app[data-di-theme="night"] .di-set-section {
    color: #e0e7ff;
}
.di-app[data-di-theme="night"] .di-content-input::placeholder,
.di-app[data-di-theme="night"] .di-title-input::placeholder,
.di-app[data-di-theme="night"] .di-tags-input::placeholder { color: #94a3b8; }
.di-app[data-di-theme="night"] .di-mood-item,
.di-app[data-di-theme="night"] .di-weather-item,
.di-app[data-di-theme="night"] .di-cat-chip,
.di-app[data-di-theme="night"] .di-tool-btn { background: rgba(30,27,75,0.55); color: #c7d2fe; }
.di-app[data-di-theme="night"] .di-tab { color: #94a3b8; }
.di-app[data-di-theme="night"] .di-tab.active { color: #fff; }
.di-app[data-di-theme="night"] .di-att-item { background: #1e1b4b; }
.di-app[data-di-theme="night"] .di-att-del { background: rgba(239,68,68,0.85); }
.di-app[data-di-theme="night"] .di-heat-cell { background: rgba(165,180,252,0.08); }
.di-app[data-di-theme="night"] .di-heat-cell.l1 { background: rgba(167,139,250,0.25); }
.di-app[data-di-theme="night"] .di-heat-cell.l2 { background: rgba(167,139,250,0.45); }
.di-app[data-di-theme="night"] .di-heat-cell.l3 { background: rgba(244,114,182,0.65); }
.di-app[data-di-theme="night"] .di-heat-cell.l4 { background: linear-gradient(135deg, #a78bfa, #f472b6); box-shadow: 0 0 8px rgba(167,139,250,0.65); }
.di-app[data-di-theme="night"] .di-tag-chip { background: rgba(167,139,250,0.12); color: #c7d2fe; border-color: rgba(165,180,252,0.30); }
.di-app[data-di-theme="night"] .di-tag-chip .tc-count { background: rgba(30,27,75,0.7); color: #94a3b8; }
.di-app[data-di-theme="night"] .di-ach-item { background: rgba(30,27,75,0.55); border-color: rgba(165,180,252,0.28); }
.di-app[data-di-theme="night"] .di-ach-item:not(.on) .di-ach-ico { background: #475569; }
.di-app[data-di-theme="night"] .di-tpl-item,
.di-app[data-di-theme="night"] .di-trash-item,
.di-app[data-di-theme="night"] .di-memory-item { background: rgba(30,27,75,0.55); color: #c7d2fe; }
.di-app[data-di-theme="night"] .di-read-content.markdown { background: rgba(15,23,42,0.45); color: #e0e7ff; }
.di-app[data-di-theme="night"] .di-read-content.markdown blockquote { background: rgba(167,139,250,0.10); color: #c7d2fe; }
.di-app[data-di-theme="night"] .di-read-content.markdown code { background: rgba(167,139,250,0.18); }
.di-app[data-di-theme="night"] .di-read-content.markdown pre { background: rgba(0,0,0,0.35); }
.di-app[data-di-theme="night"] .di-yr-aurora {
    background: linear-gradient(120deg, #0f172a, #1e1b4b, #312e81, #1e1b4b, #0f172a);
    background-size: 400% 400%;
}
.di-app[data-di-theme="night"] .di-yr-content { color: #e0e7ff; }
.di-app[data-di-theme="night"] .di-yr-stat { background: rgba(30,27,75,0.55); border-color: rgba(165,180,252,0.22); }
.di-app[data-di-theme="night"] .di-yr-stat .ys-lbl { color: #94a3b8; }
.di-app[data-di-theme="night"] .di-yr-month { background: rgba(30,27,75,0.55); border-color: rgba(165,180,252,0.22); }

/* ---------- 晨曦主题细节调整 ---------- */
.di-app[data-di-theme="dawn"] .di-tab.active { background: linear-gradient(135deg, #f97316, #ef4444); }
.di-app[data-di-theme="dawn"] .di-cat-chip.active { background: linear-gradient(135deg, #f97316, #ef4444); }
.di-app[data-di-theme="dawn"] .di-mood-item.active { border-color: #f97316; }
.di-app[data-di-theme="dawn"] .di-tool-btn.on { background: linear-gradient(135deg, #f97316, #ef4444); }
.di-app[data-di-theme="dawn"] .di-heat-cell.l4 { background: linear-gradient(135deg, #f97316, #ef4444); box-shadow: 0 0 6px rgba(251,146,60,0.55); }
.di-app[data-di-theme="dawn"] .di-yr-aurora {
    background: linear-gradient(120deg, #fff7ed, #ffedd5, #fee2e2, #ffedd5, #fff7ed);
    background-size: 400% 400%;
}
.di-app[data-di-theme="dawn"] .di-yr-stat .ys-num { background: linear-gradient(135deg, #f97316, #ef4444); -webkit-background-clip: text; background-clip: text; color: transparent; }
.di-app[data-di-theme="dawn"] .di-yr-mbar .ym-fill { background: linear-gradient(90deg, #f97316, #ef4444); }
