        @font-face { font-family: 'AllTextRemix'; src: url('../fonts/remixicon.woff2') format('woff2'), url('../fonts/remixicon.woff') format('woff'), url('../fonts/remixicon.ttf') format('truetype'); font-display: swap; }
        body { font-family: 'AllTextRemix', theme('fontFamily.serif'); background-color: theme('colors.paper'); color: theme('colors.ink'); line-height: 1.6; transition: background-color 0.3s; height: 100vh; height: 100dvh; }
        @media (max-width: 768px) { 
            body, html { 
                height: 100%; 
                position: fixed;
                width: 100%;
                overflow: hidden;
            }
            #app {
                height: 100%;
                overflow-y: auto;
                overflow-x: hidden;
                -webkit-overflow-scrolling: touch;
            }
            body::before {
                content: "";
                position: fixed;
                top: 0;
                left: 0;
                width: 100vw;
                height: var(--vh, 100vh);
                z-index: -1;
                background-color: inherit;
                background-image: inherit;
                background-size: cover;
                background-position: center;
                background-repeat: no-repeat;
                pointer-events: none;
            }
            body {
                background-image: none !important;
            }
        }
        .dark body { background-color: #1a1a1a; color: #e5e7eb; }
        .glass { background: rgba(255, 255, 255, 0.6); backdrop-filter: blur(12px); border: 1px solid rgba(0,0,0,0.05); }
        .dark .glass { background: rgba(30, 30, 30, 0.6); border: 1px solid rgba(255,255,255,0.05); }
        
        /* 登录卡片风格 */
        .login-card { background: white; border-radius: 1rem; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }
        
        /* 气泡菜单 */
        .bubble-menu { position: fixed; background: #222; color: white; border-radius: 6px; padding: 6px 10px; display: flex; gap: 8px; z-index: 1000; transform: translateX(-50%) translateY(-100%); margin-top: -10px; opacity: 0; pointer-events: none; transition: opacity 0.2s, top 0.2s; box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
        .bubble-menu::after { content: ''; position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); border-width: 6px 6px 0; border-style: solid; border-color: #222 transparent transparent transparent; }
        .bubble-menu.active { opacity: 1; pointer-events: auto; }
        .bubble-btn { cursor: pointer; padding: 4px; border-radius: 4px; display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; }
        .bubble-btn:hover { background: #444; }

        #app, #app input, #app textarea, #app button, #app select { font-family: 'AllTextRemix', theme('fontFamily.serif') !important; }
        .font-sans { font-family: 'AllTextRemix', theme('fontFamily.serif') !important; }
        .editor-surface {
            position: relative;
            min-height: 420px;
            padding: 0.25rem 0 0;
        }
        .editor-input {
            width: 100%;
            min-height: 420px;
            border: none;
            outline: none;
            resize: none;
            background: transparent;
            color: #2b2b2b;
            font-size: var(--editor-font-size, 1.1rem);
            line-height: var(--editor-line-height, 1.95);
            padding: 0;
            overflow-y: auto;
            overflow-x: hidden;
            caret-color: #8b5e3c;
            white-space: pre-wrap;
            word-wrap: break-word;
            overflow-wrap: anywhere;
            word-break: break-all;
            transition: all 0.3s ease;
            font-family: var(--editor-font-family, 'Georgia', 'Noto Serif SC', 'Songti SC', 'SimSun', serif);
        }
        .editor-input[placeholder]:empty:before {
            content: attr(placeholder);
            color: rgba(120, 113, 108, 0.78);
            pointer-events: none;
            display: block; 
        }
        /* Rich Text Styles */
        .editor-input b, .editor-input strong { font-weight: bold; color: #1a1a1a; }
        .editor-input i, .editor-input em { font-style: italic; }
        .editor-input strike, .editor-input s,
        .editor-readonly strike, .editor-readonly s {
            text-decoration: line-through;
            color: #78716c;
            text-decoration-color: currentColor;
        }
        /* 无论先高亮还是先删除线，只要存在删除线，文字和删除线都统一变灰 */
        .editor-input strike mark, .editor-input s mark,
        .editor-input mark strike, .editor-input mark s,
        .editor-readonly strike mark, .editor-readonly s mark,
        .editor-readonly mark strike, .editor-readonly mark s {
            color: inherit;
            text-decoration-color: currentColor;
        }
        .editor-input h4 { font-size: 1.25rem; font-weight: bold; margin: 1.25rem 0 0.5rem; color: #111827; }
        .editor-input mark { background-color: #fef08a; color: inherit; padding: 0; border-radius: 0; }
        .editor-input mark.search-highlight,
        .editor-readonly mark.search-highlight,
        .search-result-preview mark {
            background-color: #facc15;
            color: inherit;
            padding: 0 0.08em;
            border-radius: 0.22em;
        }
        .search-result-preview {
            display: -webkit-box;
            line-clamp: 2;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            white-space: normal;
            word-break: break-word;
        }
        html.dark .search-result-preview {
            color: #d4d4d8 !important;
        }
        html.dark .search-result-preview mark {
            background-color: rgba(250, 204, 21, 0.92);
            color: #18181b !important;
            box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
        }
        .search-inline-field-shell {
            position: relative;
            width: 100%;
        }
        .search-inline-field-layer {
            position: absolute;
            inset: 0;
            z-index: 1;
            pointer-events: none;
            overflow: auto;
            white-space: pre-wrap;
            word-break: break-word;
            overflow-wrap: anywhere;
            color: inherit;
            background: transparent;
            border-color: transparent !important;
            box-shadow: none !important;
            resize: none !important;
            scrollbar-width: none;
        }
        .search-inline-field-layer::-webkit-scrollbar { display: none; }
        .search-inline-field-layer.search-inline-field-layer-input {
            white-space: pre;
        }
        .search-inline-field-layer mark {
            background-color: #facc15;
            color: #18181b;
            padding: 0 0.08em;
            border-radius: 0.22em;
            box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
        }
        .search-hit-editable {
            border-color: rgba(245, 158, 11, 0.55) !important;
            box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.16);
        }
        .search-inline-highlight-active {
            position: relative;
            z-index: 2;
            background-color: transparent !important;
            color: transparent !important;
            -webkit-text-fill-color: transparent;
            caret-color: #1f2937 !important;
        }
        html.dark .search-inline-field-layer {
            background-color: #3f3f46 !important;
            border: 1px solid #52525b !important;
            color: #e4e4e7 !important;
            border-radius: 1rem;
        }
        html.dark .search-inline-field-layer mark {
            background-color: rgba(250, 204, 21, 0.92) !important;
            color: #18181b !important;
        }
        html.dark .search-hit-editable {
            border-color: rgba(250, 204, 21, 0.45) !important;
            box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.12);
        }
        html.dark .search-inline-highlight-active {
            background-color: transparent !important;
            color: transparent !important;
            -webkit-text-fill-color: transparent !important;
            caret-color: #f4f4f5 !important;
            border-color: transparent !important;
            box-shadow: none !important;
        }
        .editor-input ul { list-style-type: none; padding-left: 0.5rem; margin: 0.75rem 0; }
        .editor-input ol { list-style-type: decimal; padding-left: 1.5rem; margin: 0.75rem 0; }
        .editor-input li { margin-bottom: 0.25rem; }
        .editor-input img, .editor-readonly img {
            display: block;
            max-width: calc(100% - 8px);
            width: auto;
            height: auto;
            border-radius: 18px;
            margin: 1rem 4px;
            box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
            user-select: none;
        }
        .editor-input img {
            cursor: grab;
            -webkit-user-drag: element;
        }
        .editor-input img:active {
            cursor: grabbing;
        }
        .editor-input .media-overlay-composite,
        .editor-readonly .media-overlay-composite {
            position: relative;
            display: block;
            line-height: 0;
            max-width: calc(100% - 8px);
            border-radius: 1rem;
            overflow: hidden;
            margin: 1rem 4px;
        }
        .editor-input .media-overlay-composite > img,
        .editor-readonly .media-overlay-composite > img {
            display: block;
            width: 100% !important;
            max-width: none !important;
            margin: 0;
            border-radius: inherit;
        }
        .editor-input .media-overlay-svg,
        .editor-readonly .media-overlay-svg {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
        }
        .editor-readonly img {
            -webkit-user-drag: none;
        }
        .editor-input .media-overlay-composite[data-media-align="center"],
        .editor-readonly .media-overlay-composite[data-media-align="center"] {
            margin-left: auto;
            margin-right: auto;
        }
        .editor-input .media-overlay-composite[data-media-align="left"],
        .editor-readonly .media-overlay-composite[data-media-align="left"] {
            margin-left: 4px;
            margin-right: auto;
        }
        .editor-input .media-overlay-composite > img[data-media-align],
        .editor-readonly .media-overlay-composite > img[data-media-align] {
            margin-left: 0 !important;
            margin-right: 0 !important;
        }
        .editor-input img[data-media-align="center"],
        .editor-readonly img[data-media-align="center"] {
            margin-left: auto;
            margin-right: auto;
        }
        .editor-input img[data-media-align="left"],
        .editor-readonly img[data-media-align="left"] {
            margin-left: 4px;
            margin-right: auto;
        }
        .editor-input img[data-media-size="large"],
        .editor-readonly img[data-media-size="large"] {
            width: calc(100% - 8px);
            max-width: calc(100% - 8px);
        }
        .editor-input .media-overlay-composite[data-media-size="large"],
        .editor-readonly .media-overlay-composite[data-media-size="large"] {
            width: calc(100% - 8px);
            max-width: calc(100% - 8px);
        }
        .editor-input img[data-media-size="small"],
        .editor-input img[data-media-size="original"],
        .editor-readonly img[data-media-size="small"],
        .editor-readonly img[data-media-size="original"] {
            width: calc((100% - 8px) * 0.5);
            max-width: calc((100% - 8px) * 0.5);
        }
        .editor-input .media-overlay-composite[data-media-size="small"],
        .editor-input .media-overlay-composite[data-media-size="original"],
        .editor-readonly .media-overlay-composite[data-media-size="small"],
        .editor-readonly .media-overlay-composite[data-media-size="original"] {
            width: calc((100% - 8px) * 0.5);
            max-width: calc((100% - 8px) * 0.5);
        }
        .admin-diary-preview {
            display: -webkit-box;
            line-clamp: 3;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
            white-space: normal;
            word-break: break-word;
        }
        .admin-diary-detail-content {
            min-height: 12rem;
            line-height: 1.9;
            font-size: 1rem;
        }
        .admin-diary-detail-divider {
            height: 1px;
            margin: 1.75rem 0;
            background: rgba(231, 229, 228, 0.95);
        }
        .admin-diary-module-stack {
            display: grid;
            gap: 1rem;
        }
        .admin-diary-module-card {
            border: 1px solid rgba(231, 229, 228, 0.95);
            border-radius: 1.25rem;
            padding: 1rem 1.1rem;
            background: linear-gradient(180deg, rgba(250,250,249,0.98), rgba(255,255,255,0.98));
            box-shadow: 0 12px 26px rgba(28, 25, 23, 0.06);
        }
        .admin-diary-module-header {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            margin-bottom: 0.9rem;
        }
        .admin-diary-module-badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 3.5rem;
            min-height: 1.9rem;
            padding: 0 0.7rem;
            border-radius: 999px;
            background: rgba(245, 245, 244, 1);
            color: #57534e;
            font-size: 0.78rem;
            font-weight: 700;
        }
        .admin-diary-module-title {
            margin: 0;
            font-size: 1rem;
            font-weight: 700;
            color: #292524;
        }
        .admin-diary-module-text,
        .admin-diary-module-source,
        .admin-diary-module-empty {
            color: #44403c;
            white-space: normal;
            word-break: break-word;
        }
        .admin-diary-module-quote-title {
            margin-bottom: 0.55rem;
            color: #065f46;
            font-weight: 700;
        }
        .admin-diary-module-source {
            margin-top: 0.75rem;
            font-size: 0.9rem;
            color: #78716c;
        }
        .admin-diary-module-empty {
            color: #a8a29e;
        }
        .admin-diary-module-field + .admin-diary-module-field {
            margin-top: 0.8rem;
        }
        .admin-diary-module-field-label {
            display: inline-block;
            margin-bottom: 0.35rem;
            font-size: 0.82rem;
            font-weight: 700;
            color: #78716c;
        }
        .admin-diary-module-todo-row {
            display: flex;
            align-items: center;
            gap: 0.6rem;
            padding: 0.35rem 0;
        }
        .admin-diary-module-todo-row + .admin-diary-module-todo-row {
            border-top: 1px dashed rgba(14, 165, 233, 0.14);
        }
        .admin-diary-module-todo-check {
            flex-shrink: 0;
            width: 1.1rem;
            height: 1.1rem;
            border-radius: 9999px;
            border: 2px solid #94a3b8;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 0.6rem;
            color: #fff;
            background: transparent;
        }
        .admin-diary-module-todo-check.is-done {
            background: #0ea5e9;
            border-color: #0ea5e9;
        }
        .admin-diary-module-todo-done {
            text-decoration: line-through;
            color: #94a3b8;
        }
        .admin-diary-audio-card {
            margin: 1rem 0;
            padding: 0.95rem 1rem;
            border-radius: 1.1rem;
            border: 1px solid rgba(214, 211, 209, 0.95);
            background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.98));
            box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
        }
        .admin-diary-audio-title {
            margin-bottom: 0.7rem;
            color: #1f2937;
            font-size: 0.92rem;
            font-weight: 700;
        }
        .admin-diary-audio-card audio {
            display: block;
            width: 100%;
        }
        .admin-diary-detail-content > :first-child {
            margin-top: 0;
        }
        .admin-diary-detail-content > :last-child {
            margin-bottom: 0;
        }
        .editor-input img.media-delete-selected,
        .editor-readonly img.media-delete-selected,
        .editor-input .media-overlay-composite.media-delete-selected,
        .editor-readonly .media-overlay-composite.media-delete-selected {
            /* 使用 outline 代替部分 box-shadow，防止被 overflow: hidden 裁剪，同时保持圆角效果（现代浏览器支持） */
            outline: 3px solid #facc15 !important;
            outline-offset: 1px;
            box-shadow: 0 0 0 7px rgba(250, 204, 21, 0.2), 0 10px 24px rgba(15, 23, 42, 0.12);
            z-index: 10;
        }
        .editor-input .media-highlight,
        .editor-readonly .media-highlight {
            display: block;
            width: fit-content;
            max-width: 100%;
            padding: 4px;
            margin: 0.35rem 0;
            border-radius: 22px;
            background: transparent;
            box-shadow: 0 0 0 3px #facc15, 0 0 0 7px rgba(250, 204, 21, 0.24);
        }
        .editor-input .media-highlight img,
        .editor-readonly .media-highlight img {
            margin: 0;
        }
        .editor-input img::selection,
        .editor-readonly img::selection,
        .editor-input .media-highlight::selection,
        .editor-readonly .media-highlight::selection,
        .editor-input .media-highlight *::selection,
        .editor-readonly .media-highlight *::selection {
            background: transparent;
            color: inherit;
        }
        .editor-input audio, .editor-readonly audio {
            display: block;
            width: min(100%, 560px);
            margin: 1rem 0;
            padding: 10px;
            border-radius: 18px;
            border: 1px solid rgba(120, 113, 108, 0.16);
            background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,250,252,0.96));
            box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
        }
        .editor-input audio::-webkit-media-controls-panel,
        .editor-readonly audio::-webkit-media-controls-panel {
            background: linear-gradient(180deg, #f8fafc, #eef2f7);
        }
        .editor-input audio::-webkit-media-controls-enclosure,
        .editor-readonly audio::-webkit-media-controls-enclosure {
            border-radius: 14px;
        }
        .audio-widget {
            display: block;
            width: calc(100% - 12px);
            margin: 0.55rem auto;
            white-space: normal;
            font-size: 0;
            line-height: 0;
            user-select: none;
            cursor: default;
        }
        .audio-widget[draggable="true"] {
            cursor: grab;
        }
        .audio-widget[draggable="true"]:active {
            cursor: grabbing;
        }
        .audio-widget audio {
            display: none !important;
        }
        .audio-widget__shell {
            display: flex;
            align-items: center;
            gap: 12px;
            width: 100%;
            padding: 12px 14px;
            border-radius: 20px;
            border: 1px solid rgba(120, 113, 108, 0.16);
            background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.98));
            box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
            font-size: 1rem;
            line-height: normal;
        }
        .audio-widget.media-delete-selected .audio-widget__shell {
            box-shadow: 0 0 0 3px #facc15, 0 0 0 6px rgba(250, 204, 21, 0.24), 0 14px 28px rgba(15, 23, 42, 0.12);
        }
        .audio-widget__play,
        .audio-widget__more {
            flex: 0 0 auto;
            width: 44px;
            height: 44px;
            border: none;
            border-radius: 999px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: rgba(24, 24, 27, 0.08);
            color: #27272a;
            cursor: pointer;
            transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
        }
        .audio-widget__play:hover,
        .audio-widget__more:hover {
            background: rgba(24, 24, 27, 0.14);
            transform: translateY(-1px);
        }
        .audio-widget__play {
            background: linear-gradient(135deg, #111827, #374151);
            color: #f8fafc;
            box-shadow: 0 10px 24px rgba(17, 24, 39, 0.18);
        }
        .audio-widget__play:hover {
            background: linear-gradient(135deg, #0f172a, #1f2937);
        }
        .audio-widget__main {
            flex: 1 1 auto;
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        .audio-widget__row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            min-width: 0;
        }
        .audio-widget__title {
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            font-size: 0.95rem;
            font-weight: 600;
            color: #1f2937;
        }
        .audio-widget__time {
            flex: 0 0 auto;
            font-size: 0.78rem;
            color: #6b7280;
            font-variant-numeric: tabular-nums;
        }
        .audio-widget__progress {
            width: 100%;
            height: 6px;
            margin: 0;
            border-radius: 999px;
            appearance: none;
            background: linear-gradient(90deg, #111827 0%, #111827 var(--audio-progress, 0%), #e5e7eb var(--audio-progress, 0%), #e5e7eb 100%);
            outline: none;
            cursor: pointer;
        }
        .audio-widget__progress::-webkit-slider-thumb {
            appearance: none;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            border: 2px solid #ffffff;
            background: #111827;
            box-shadow: 0 4px 12px rgba(17, 24, 39, 0.22);
        }
        .audio-widget__progress::-moz-range-thumb {
            width: 16px;
            height: 16px;
            border: 2px solid #ffffff;
            border-radius: 50%;
            background: #111827;
            box-shadow: 0 4px 12px rgba(17, 24, 39, 0.22);
        }
        .audio-widget__progress::-moz-range-track {
            height: 6px;
            border-radius: 999px;
            background: #e5e7eb;
        }
        .audio-more-menu {
            position: fixed;
            z-index: 1200;
            width: min(260px, calc(100vw - 24px));
            max-height: calc(100vh - 24px);
            overflow-y: auto;
            padding: 14px;
            border-radius: 20px;
            background: rgba(255,255,255,0.98);
            border: 1px solid rgba(120, 113, 108, 0.16);
            box-shadow: 0 20px 40px rgba(15, 23, 42, 0.2);
            backdrop-filter: blur(16px);
        }
        .audio-more-menu__title {
            font-size: 0.82rem;
            font-weight: 700;
            color: #4b5563;
            margin-bottom: 10px;
        }
        .audio-more-menu__speeds {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 8px;
            margin-bottom: 12px;
        }
        .audio-more-menu__speed,
        .audio-more-menu__action {
            border: none;
            border-radius: 14px;
            cursor: pointer;
            transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
        }
        .audio-more-menu__speed {
            padding: 10px 0;
            background: #f3f4f6;
            color: #374151;
            font-size: 0.82rem;
            font-weight: 700;
        }
        .audio-more-menu__speed:hover,
        .audio-more-menu__action:hover {
            transform: translateY(-1px);
        }
        .audio-more-menu__speed.is-active {
            background: linear-gradient(135deg, #111827, #374151);
            color: #f9fafb;
        }
        .audio-more-menu__actions {
            display: grid;
            gap: 8px;
        }
        .audio-more-menu__action {
            width: 100%;
            padding: 11px 14px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            background: #f8fafc;
            color: #1f2937;
            font-size: 0.9rem;
            font-weight: 600;
        }
        .audio-more-menu__action.is-danger {
            background: #fef2f2;
            color: #b91c1c;
        }

        .editor-readonly {
            white-space: pre-wrap;
            word-wrap: break-word;
            overflow-wrap: anywhere;
            word-break: break-all;
            min-height: 420px;
            line-height: var(--editor-line-height, 1.95);
            font-size: var(--editor-font-size, 1.1rem);
            color: #57534e;
            font-family: var(--editor-font-family, 'Georgia', 'Noto Serif SC', 'Songti SC', 'SimSun', serif);
        }
        .bubble-menu {
            padding: 8px 10px;
            border-radius: 999px;
            background: rgba(28, 25, 23, 0.96);
            box-shadow: 0 12px 30px rgba(0,0,0,0.18);
            backdrop-filter: blur(12px);
        }
        .bubble-btn {
            width: 30px;
            height: 30px;
            color: #fefce8;
        }
        .bubble-btn:hover {
            background: rgba(255,255,255,0.12);
        }
        .bubble-btn.is-active {
            background: rgba(250, 204, 21, 0.2);
            color: #facc15;
        }
        .date-trigger {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            min-height: 2.6rem;
            border-radius: 999px;
            border: 1px solid rgba(120, 113, 108, 0.14);
            padding: 0.35rem 0.85rem;
            background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(250,248,240,0.92));
            box-shadow: 0 8px 24px rgba(120,113,108,0.08);
            transition: all 0.2s ease;
        }
        .date-trigger:hover {
            transform: translateY(-1px);
            box-shadow: 0 12px 28px rgba(120,113,108,0.12);
            border-color: rgba(212,175,55,0.35);
        }
        .date-trigger-text {
            display: inline-flex;
            align-items: baseline;
            gap: 0.4rem;
        }
        .date-weekday {
            font-size: 0.75rem;
            font-weight: 400;
            color: rgba(120,113,108,0.72);
            letter-spacing: 0.02em;
        }
        .date-trigger-icon {
            width: 1.9rem;
            height: 1.9rem;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 999px;
            background: rgba(212,175,55,0.14);
            color: #8b5e3c;
        }
        .picker-trigger {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.4rem;
            min-height: 2.6rem;
            padding: 0.35rem 0.8rem;
            border-radius: 999px;
            background: rgba(255,255,255,0.82);
            border: 1px solid rgba(120,113,108,0.12);
            box-shadow: 0 6px 18px rgba(120,113,108,0.06);
            transition: all 0.2s ease;
        }
        .picker-trigger:hover { border-color: rgba(212,175,55,0.35); box-shadow: 0 10px 20px rgba(120,113,108,0.10); }
        .desktop-status-pill {
            display: inline-flex;
            align-items: stretch;
            min-height: 2.6rem;
            border-radius: 999px;
            background: rgba(255,255,255,0.82);
            border: 1px solid rgba(120,113,108,0.12);
            box-shadow: 0 6px 18px rgba(120,113,108,0.06);
            overflow: visible;
        }
        .desktop-status-segment {
            position: relative;
            display: inline-flex;
            align-items: center;
            padding-top: 0;
        }
        .desktop-status-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 2.3rem;
            padding: 0.35rem 0.5rem;
            border-radius: 999px;
            color: #374151;
            transition: background 0.18s ease, color 0.18s ease;
        }
        .desktop-status-btn:hover {
            background: rgba(249,250,251,0.95);
        }
        .desktop-status-divider {
            width: 1px;
            margin: 0.38rem 0;
            background: rgba(120,113,108,0.14);
        }
        .picker-menu {
            position: absolute;
            top: 100%;
            left: 0;
            min-width: 12rem;
            padding-top: 0.6rem;
            z-index: 80;
        }
        .picker-panel {
            background: rgba(255,255,255,0.98);
            border: 1px solid rgb(243 244 246);
            box-shadow: 0 20px 35px rgba(0,0,0,0.10);
            border-radius: 0.5rem;
            padding: 0.5rem;
            backdrop-filter: blur(14px);
        }
        .mobile-toolbar {
            position: relative;
            z-index: 35;
            overflow: visible;
            padding: calc(0.85rem + env(safe-area-inset-top, 0px)) 1rem 0.85rem;
            border-bottom: 1px solid rgba(120,113,108,0.12);
            background: rgba(250,248,240,0.96);
            backdrop-filter: blur(10px);
        }
        .mobile-action-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 2.6rem;
            height: 2.6rem;
            border-radius: 0.95rem;
            background: rgba(255,255,255,0.88);
            border: 1px solid rgba(120,113,108,0.10);
            box-shadow: 0 8px 20px rgba(120,113,108,0.07);
        }
        .mobile-action-btn-wide {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.45rem;
            min-width: 2.6rem;
            height: 2.6rem;
            padding: 0 0.9rem;
            border-radius: 0.95rem;
            background: rgba(255,255,255,0.88);
            border: 1px solid rgba(120,113,108,0.10);
            box-shadow: 0 8px 20px rgba(120,113,108,0.07);
        }
        .mobile-date-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.45rem;
            height: 2.6rem;
            padding: 0 1rem;
            border-radius: 999px;
            background: rgba(255,255,255,0.92);
            border: 1px solid rgba(120,113,108,0.10);
            box-shadow: 0 8px 20px rgba(120,113,108,0.07);
            white-space: nowrap;
        }
        .mobile-picker-menu {
            left: auto;
            right: 0;
            min-width: 10rem;
        }
        .date-modal-card { background: #f6f3e8; }
        html.dark .date-modal-card { background: #27272a; }
        .flatpickr-calendar.inline {
            width: 100%;
            box-shadow: none;
            border: none;
            background: transparent;
        }
        .flatpickr-calendar {
            width: 100% !important;
            max-width: 340px;
            margin: 0 auto;
            padding-bottom: 10px;
        }
        .flatpickr-days {
            width: 100%;
        }
        .flatpickr-innerContainer,
        .flatpickr-rContainer,
        .flatpickr-weekdays,
        .flatpickr-days,
        .flatpickr-days .dayContainer {
            width: 100% !important;
            min-width: 100% !important;
            max-width: 100% !important;
        }
        .flatpickr-days .dayContainer {
            display: grid !important;
            grid-template-columns: repeat(7, 1fr);
            gap: 2px 0;
            justify-items: center;
        }
        .flatpickr-day {
            max-width: none;
            width: 38px;
            min-width: 38px;
            height: 38px;
            line-height: 38px;
            margin: 0;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
        }
        .flatpickr-weekday {
            color: #44403c;
        }
        .flatpickr-day.selected,
        .flatpickr-day.startRange,
        .flatpickr-day.endRange {
            background: #1f2937;
            border-color: #1f2937;
        }
        .flatpickr-day.today {
            border-color: #d4af37;
        }
        .flatpickr-day.flatpickr-disabled,
        .flatpickr-day.flatpickr-disabled:hover {
            color: #c4b8ab;
            background: rgba(120,113,108,0.06);
            cursor: not-allowed;
        }
        .flatpickr-months .flatpickr-month,
        .flatpickr-current-month .flatpickr-monthDropdown-months,
        .flatpickr-current-month input.cur-year {
            color: #292524;
            fill: #292524;
        }
        .flatpickr-prev-month:hover svg,
        .flatpickr-next-month:hover svg {
            fill: #8b5e3c;
        }
        .module-viewer-overlay { background: rgba(0,0,0,0.45); backdrop-filter: blur(3px); }
        .module-viewer-panel { background: #f6f3e8; width: min(920px, 92vw); max-height: 85vh; border-radius: 1rem; box-shadow: 0 24px 60px rgba(0,0,0,0.25); }
        
        [v-cloak] { display: none !important; }
        .boot-skeleton { display: none !important; }
        .booting .boot-skeleton { display: flex !important; }
        .booting #app { display: none !important; }
        .spin { animation: spin 1s linear infinite; }
        @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
        
        /* 模块样式 */
        .module-dream {
            position: relative;
            overflow: hidden;
            border: 1px solid rgba(139, 92, 246, 0.16);
            background: linear-gradient(180deg, rgba(245, 243, 255, 0.98), rgba(255, 255, 255, 0.94));
            padding: 1.25rem;
            margin-bottom: 1.25rem;
            border-radius: 1.25rem;
            box-shadow: 0 18px 36px rgba(139, 92, 246, 0.08);
        }
        .module-dream::before {
            content: '';
            position: absolute;
            inset: 0 auto 0 0;
            width: 4px;
            background: linear-gradient(180deg, #8b5cf6, #c084fc);
        }
        .module-dream-textarea {
            width: 100%;
            min-height: 9rem;
            border: 1px solid rgba(139, 92, 246, 0.08);
            background: rgba(255,255,255,0.78);
            border-radius: 1rem;
            padding: 1rem 1.05rem;
            outline: none;
            resize: vertical;
            color: #4c1d95;
            line-height: 1.85;
            overflow-wrap: anywhere;
            word-break: break-all;
            box-shadow: inset 0 1px 2px rgba(255,255,255,0.55);
        }
        .module-dream-textarea::placeholder { color: rgba(109, 40, 217, 0.48); }
        .module-quote {
            break-inside: avoid;
            display: flex;
            flex-direction: column;
            gap: 0.85rem;
            border: 1px solid rgba(16, 185, 129, 0.15);
            padding: 1rem;
            border-radius: 1.25rem;
            background: linear-gradient(180deg, rgba(236, 253, 245, 0.95), rgba(255,255,255,0.98));
            box-shadow: 0 18px 36px rgba(15, 118, 110, 0.07);
        }
        .module-quote-title {
            width: 100%;
            border: none;
            outline: none;
            background: transparent;
            border-radius: 0.85rem;
            padding: 0 1rem;
            box-sizing: border-box;
            color: #065f46;
            font-size: 1.05rem;
            font-weight: 700;
            overflow-wrap: anywhere;
            word-break: break-all;
        }
        .quote-toolbar-btn {
            background: #d1fae5;
            color: #059669;
        }
        .module-quote-textarea {
            width: 100%;
            min-height: 8.5rem;
            border: 1px solid rgba(16, 185, 129, 0.08);
            background: rgba(255,255,255,0.84);
            border-radius: 1rem;
            padding: 0.95rem 1rem;
            resize: vertical;
            outline: none;
            color: #334155;
            line-height: 1.85;
            overflow-wrap: anywhere;
            word-break: break-all;
        }
        .module-quote-textarea::placeholder { color: rgba(71, 85, 105, 0.5); }
        .module-inspiration {
            position: relative;
            display: flex;
            flex-direction: column;
            gap: 0.9rem;
            border: 1px solid rgba(245, 158, 11, 0.16);
            border-radius: 1.25rem;
            background: linear-gradient(180deg, rgba(255, 251, 235, 0.96), rgba(255,255,255,0.98));
            padding: 1rem;
            box-shadow: 0 18px 36px rgba(245, 158, 11, 0.08);
        }
        .inspiration-toolbar-btn {
            background: #fef3c7;
            color: #d97706;
        }
        .module-inspiration-textarea {
            width: 100%;
            min-height: 7rem;
            border: 1px solid rgba(245, 158, 11, 0.08);
            border-radius: 1rem;
            background: rgba(255,255,255,0.88);
            padding: 0.95rem 1rem;
            resize: vertical;
            outline: none;
            color: #57534e;
            line-height: 1.8;
            overflow-wrap: anywhere;
            word-break: break-all;
        }
        .module-generic {
            position: relative;
            display: flex;
            flex-direction: column;
            gap: 0.9rem;
            border: 1px solid rgba(148, 163, 184, 0.18);
            border-radius: 1.25rem;
            background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(255,255,255,0.98));
            padding: 1rem;
            box-shadow: 0 18px 36px rgba(71, 85, 105, 0.08);
        }
        .module-generic-title {
            width: 100%;
            border: none;
            outline: none;
            background: transparent;
            padding: 0 1rem;
            box-sizing: border-box;
            color: #334155;
            font-size: 1.02rem;
            font-weight: 700;
            overflow-wrap: anywhere;
            word-break: break-all;
        }
        .module-generic-input,
        .module-generic-textarea {
            width: 100%;
            border: 1px solid rgba(148, 163, 184, 0.14);
            border-radius: 1rem;
            background: rgba(255,255,255,0.9);
            padding: 0.95rem 1rem;
            outline: none;
            color: #334155;
            line-height: 1.8;
            overflow-wrap: anywhere;
            word-break: break-all;
        }
        .module-generic-textarea {
            min-height: 7rem;
            resize: vertical;
        }
        .module-action-btn {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            min-height: 2.15rem;
            padding: 0 0.75rem;
            border-radius: 999px;
            border: 1px solid rgba(120, 113, 108, 0.12);
            background: rgba(255,255,255,0.94);
            color: #57534e;
            font-size: 0.8rem;
            font-weight: 600;
            box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
            transition: all 0.2s ease;
        }
        .module-action-btn:hover {
            transform: translateY(-1px);
            color: #111827;
            box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
        }
        .module-action-btn-danger {
            color: #dc2626;
            border-color: rgba(248, 113, 113, 0.24);
            background: rgba(254, 242, 242, 0.96);
        }
        
        /* 隐藏滚动条但保留功能 */
        .no-scrollbar::-webkit-scrollbar { display: none; }
        .no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
        /* 自定义滚动条 */
        .custom-scroll::-webkit-scrollbar { width: 4px; }
        .custom-scroll::-webkit-scrollbar-track { background: transparent; }
        .custom-scroll::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 2px; }
        .custom-scroll::-webkit-scrollbar-thumb:hover { background: #9ca3af; }
        .animate-fade-in { animation: zoomIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
        @keyframes zoomIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
        /* 居中弹出动画 */
        .animate-zoom-in { animation: modalZoom 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
        @keyframes modalZoom { from { opacity: 0; transform: scale(0.9) translateY(0); } to { opacity: 1; transform: scale(1) translateY(0); } }
        /* 模块列表删除动画 */
        .module-list-enter-active,
        .module-list-leave-active {
            transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
            transform-origin: top right;
            max-height: 800px;
            opacity: 1;
            overflow: hidden;
        }
        .module-list-enter-from,
        .module-list-leave-to {
            opacity: 0;
            transform: scale(0.3);
            max-height: 0;
            margin-bottom: 0 !important;
            padding-top: 0 !important;
            padding-bottom: 0 !important;
            border-width: 0 !important;
            overflow: hidden;
        }
        .module-list-move {
            transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
        }
        .diary-list-enter-active,
        .diary-list-leave-active {
            transition: opacity 0.26s ease, transform 0.26s cubic-bezier(0.16, 1, 0.3, 1), max-height 0.26s ease, margin 0.26s ease, padding 0.26s ease;
            overflow: hidden;
            transform-origin: top center;
        }
        .diary-list-enter-from,
        .diary-list-leave-to {
            opacity: 0;
            transform: translateY(12px) scale(0.98);
            max-height: 0;
            margin-top: 0 !important;
            margin-bottom: 0 !important;
            padding-top: 0 !important;
            padding-bottom: 0 !important;
            border-width: 0 !important;
        }
        .diary-list-enter-to,
        .diary-list-leave-from {
            max-height: 220px;
        }
        .diary-list-move {
            transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
        }
        .quote-container:empty, .inspiration-container:empty {
            display: none !important;
            margin-top: 0 !important;
        }

        /* --- 极其激进的定制化高级动画 --- */
        .radical-animations-enabled *:not(.fixed.inset-0):not(.module-viewer-overlay):not(.privacy-overlay):not(.privacy-mask):not(.brightness-ease) {
            transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55) !important; /* 带有更强Q弹性反馈的阻尼动画 */
        }
        .radical-animations-enabled .transition-all { transition-duration: 0.4s !important; }
        .radical-animations-enabled .transition { transition-duration: 0.3s !important; }
        
        .radical-animations-enabled .module-dream, 
        .radical-animations-enabled .module-quote, 
        .radical-animations-enabled .module-inspiration,
        .radical-animations-enabled .module-generic {
            transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
            transform: perspective(1000px) translateZ(0) rotateX(0deg) scale(1);
        }
        .radical-animations-enabled .module-dream:hover, 
        .radical-animations-enabled .module-quote:hover, 
        .radical-animations-enabled .module-inspiration:hover,
        .radical-animations-enabled .module-generic:hover {
            transform: perspective(1000px) translateZ(30px) rotateX(1deg) scale(1.02);
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.2);
            z-index: 10;
        }
        .radical-animations-enabled button,
        .radical-animations-enabled input[type="range"],
        .radical-animations-enabled select,
        .radical-animations-enabled .module-action-btn,
        .radical-animations-enabled .desktop-status-btn,
        .radical-animations-enabled .profile-nav-btn {
            transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
        }
        .radical-animations-enabled button:hover,
        .radical-animations-enabled .module-action-btn:hover {
            transform: scale(1.1) rotate(2deg);
        }
        .radical-animations-enabled input[type="range"]:active,
        .radical-animations-enabled select:focus {
            transform: scale(1.05);
        }
        .radical-animations-enabled button:active {
            transform: scale(0.9) !important;
        }
        .radical-animations-enabled .module-list-enter-active,
        .radical-animations-enabled .module-list-leave-active {
            transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
            transform-origin: center center;
        }
        .radical-animations-enabled .diary-list-enter-active,
        .radical-animations-enabled .diary-list-leave-active {
            transition: opacity 0.42s cubic-bezier(0.68, -0.55, 0.265, 1.55), transform 0.42s cubic-bezier(0.68, -0.55, 0.265, 1.55), max-height 0.42s ease;
        }
        .radical-animations-enabled .diary-list-enter-from {
            opacity: 0;
            transform: perspective(900px) translateY(20px) rotateX(-8deg) scale(0.94);
        }
        .radical-animations-enabled .diary-list-leave-to {
            opacity: 0;
            transform: perspective(900px) translateY(-20px) rotateX(8deg) scale(0.96);
            filter: blur(6px);
        }
        .radical-animations-enabled .diary-list-move {
            transition: transform 0.42s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        }
        .radical-animations-enabled .module-list-enter-from {
            opacity: 0;
            transform: perspective(1000px) translateX(120px) translateZ(-50px) rotateY(10deg) scale(0.9);
        }
        .radical-animations-enabled .module-list-leave-to {
            opacity: 0;
            transform: perspective(1000px) translateX(-120px) translateZ(100px) rotateY(-10deg) scale(1.1);
            filter: blur(10px);
        }
        .radical-animations-enabled .animate-fade-in {
            animation: radicalZoomIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
        }
        @keyframes radicalZoomIn { 
            0% { opacity: 0; transform: perspective(1000px) translateZ(-200px) rotateY(10deg) scale(0.9); filter: blur(5px); } 
            100% { opacity: 1; transform: perspective(1000px) translateZ(0) rotateY(0) scale(1); filter: blur(0); } 
        }
        .radical-animations-enabled .animate-zoom-in {
            animation: radicalModalZoom 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
        }
        @keyframes radicalModalZoom { 
            0% { opacity: 0; transform: scale(0.6) translateY(50px) rotate(-3deg); } 
            100% { opacity: 1; transform: scale(1) translateY(0) rotate(0deg); } 
        }
        .radical-animations-enabled input:focus, .radical-animations-enabled textarea:focus {
            transform: scale(1.01);
            transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        }
        /* 全局衬线字体 */
        .global-serif-enabled #app,
        .global-serif-enabled #app input,
        .global-serif-enabled #app textarea,
        .global-serif-enabled #app button,
        .global-serif-enabled #app select,
        .global-serif-enabled #app .font-sans {
            font-family: 'AllTextRemix', 'Georgia', 'Noto Serif SC', 'Songti SC', 'SimSun', serif !important;
        }
        .global-serif-enabled .login-card,
        .global-serif-enabled .login-card input,
        .global-serif-enabled .login-card textarea,
        .global-serif-enabled .login-card button,
        .global-serif-enabled .login-card select {
            font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
        }

        /* 涂鸦板 */
        .doodle-canvas { cursor: crosshair; touch-action: none; }
        .doodle-toolbar-group {
            display: flex;
            align-items: center;
            gap: 0.875rem;
            padding: 0.55rem 0.75rem;
            border-radius: 1rem;
            border: 1px solid rgba(231, 229, 228, 0.9);
            background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(250,250,249,0.96));
            box-shadow: 0 10px 24px rgba(28, 25, 23, 0.05);
            min-width: 0;
        }
        .doodle-toolbar-label {
            flex: 0 0 auto;
            font-size: 0.82rem;
            font-weight: 600;
            color: rgb(120 113 108);
        }
        .doodle-toolbar-main {
            display: flex;
            align-items: center;
            gap: 0.7rem;
            flex: 1 1 auto;
            min-width: 0;
            flex-wrap: nowrap;
        }
        .doodle-color-selector {
            display: flex;
            align-items: center;
            gap: 0.55rem;
            flex-wrap: nowrap;
            position: relative;
            min-width: 0;
        }
        .doodle-color-grid {
            display: flex;
            align-items: center;
            gap: 0.35rem;
            flex-wrap: nowrap;
            flex: 0 0 auto;
        }
        .doodle-color-grid--panel {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 0.45rem;
        }
        .doodle-color-swatch {
            position: relative;
            width: 1.48rem;
            height: 1.48rem;
            border-radius: 9999px;
            border: 2px solid rgba(255, 255, 255, 0.92);
            box-shadow: 0 0 0 1px rgba(214, 211, 209, 0.95), 0 6px 14px rgba(28, 25, 23, 0.08);
            transition: transform 0.15s ease, box-shadow 0.15s ease;
        }
        .doodle-color-swatch:hover {
            transform: translateY(-1px) scale(1.04);
            box-shadow: 0 0 0 1px rgba(168, 162, 158, 0.9), 0 10px 18px rgba(28, 25, 23, 0.12);
        }
        .doodle-color-swatch--active {
            box-shadow: 0 0 0 2px rgba(24, 24, 27, 0.9), 0 0 0 5px rgba(255, 255, 255, 0.94), 0 12px 20px rgba(28, 25, 23, 0.14);
        }
        .doodle-color-more-btn {
            height: 1.95rem;
            padding: 0 0.7rem;
            border-radius: 9999px;
            border: 1px solid rgba(214, 211, 209, 0.95);
            background: rgba(255,255,255,0.92);
            color: rgb(68 64 60);
            font-size: 0.76rem;
            font-weight: 600;
            transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
            white-space: nowrap;
        }
        .doodle-color-more-btn:hover {
            background: rgba(245, 245, 244, 0.98);
            border-color: rgba(168, 162, 158, 0.95);
        }
        .doodle-color-panel {
            position: absolute;
            top: calc(100% + 0.7rem);
            left: 0;
            z-index: 20;
            width: min(18rem, calc(100vw - 3rem));
            padding: 0.95rem;
            border-radius: 1rem;
            border: 1px solid rgba(231, 229, 228, 0.95);
            background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(250,250,249,0.98));
            box-shadow: 0 18px 36px rgba(28, 25, 23, 0.16);
        }
        .doodle-color-panel__title {
            margin-bottom: 0.75rem;
            font-size: 0.82rem;
            font-weight: 600;
            color: rgb(120 113 108);
        }
        .doodle-color-hex {
            width: 6rem;
            height: 2rem;
            border-radius: 0.8rem;
            border: 1px solid rgba(214, 211, 209, 0.95);
            background: rgba(250, 250, 249, 0.92);
            color: rgb(41 37 36);
            font-size: 0.78rem;
            font-weight: 600;
            text-transform: uppercase;
            text-align: center;
            letter-spacing: 0.03em;
            outline: none;
        }
        .doodle-color-hex:focus {
            border-color: rgba(87, 83, 78, 0.55);
            box-shadow: 0 0 0 3px rgba(231, 229, 228, 0.95);
        }
        .doodle-size-control {
            display: flex;
            align-items: center;
            gap: 0.6rem;
            flex-wrap: nowrap;
            min-width: 0;
        }
        .doodle-size-slider {
            width: 8rem;
            accent-color: rgb(24 24 27);
        }
        .doodle-size-preview {
            min-width: 4.8rem;
            height: 2rem;
            padding: 0 0.65rem;
            border-radius: 9999px;
            border: 1px solid rgba(231, 229, 228, 0.95);
            background: radial-gradient(circle at top, rgba(255,255,255,0.98), rgba(245,245,244,0.96));
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.45rem;
            flex: 0 0 auto;
        }
        .doodle-size-preview__stroke {
            display: inline-block;
            width: 2.2rem;
            border-radius: 9999px;
            flex: 0 0 auto;
        }
        .doodle-toolbar-actions {
            display: flex;
            align-items: center;
            gap: 0.6rem;
            flex: 0 0 auto;
        }
        .dark .doodle-toolbar-group {
            border-color: rgba(63, 63, 70, 0.95);
            background: linear-gradient(180deg, rgba(28,25,23,0.92), rgba(24,24,27,0.94));
            box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
        }
        .dark .doodle-toolbar-label,
        .dark .doodle-color-panel__title {
            color: rgb(214 211 209);
        }
        .dark .doodle-color-swatch {
            border-color: rgba(39, 39, 42, 0.94);
            box-shadow: 0 0 0 1px rgba(82, 82, 91, 0.92), 0 8px 16px rgba(0, 0, 0, 0.24);
        }
        .dark .doodle-color-swatch:hover {
            box-shadow: 0 0 0 1px rgba(161, 161, 170, 0.9), 0 12px 20px rgba(0, 0, 0, 0.3);
        }
        .dark .doodle-color-swatch--active {
            box-shadow: 0 0 0 2px rgba(244, 244, 245, 0.92), 0 0 0 5px rgba(39, 39, 42, 0.95), 0 12px 20px rgba(0, 0, 0, 0.32);
        }
        .dark .doodle-color-more-btn,
        .dark .doodle-color-hex {
            border-color: rgba(82, 82, 91, 0.95);
            background: rgba(39, 39, 42, 0.92);
            color: rgb(244 244 245);
        }
        .dark .doodle-color-more-btn:hover {
            background: rgba(63, 63, 70, 0.96);
            border-color: rgba(161, 161, 170, 0.9);
        }
        .dark .doodle-color-hex:focus {
            border-color: rgba(212, 212, 216, 0.72);
            box-shadow: 0 0 0 3px rgba(63, 63, 70, 0.9);
        }
        .dark .doodle-color-panel {
            border-color: rgba(63, 63, 70, 0.95);
            background: linear-gradient(180deg, rgba(28,25,23,0.98), rgba(24,24,27,0.98));
            box-shadow: 0 18px 36px rgba(0, 0, 0, 0.36);
        }
        .dark .doodle-size-slider {
            accent-color: rgb(229 229 229);
        }
        .dark .doodle-size-preview {
            border-color: rgba(63, 63, 70, 0.95);
            background: radial-gradient(circle at top, rgba(39,39,42,0.98), rgba(24,24,27,0.96));
            color: rgb(228 228 231);
        }
        @media (max-width: 768px) {
            .doodle-toolbar-main {
                width: 100%;
                flex-wrap: wrap;
                gap: 0.55rem;
            }
            .doodle-toolbar-actions {
                gap: 0.25rem;
            }
            .doodle-toolbar-group {
                padding: 0.45rem 0.6rem;
                gap: 0.55rem;
            }
            .doodle-toolbar-group:first-child,
            .doodle-toolbar-group:last-child {
                flex: 1 1 100%;
            }
            .doodle-color-panel {
                left: auto;
                right: 0;
                width: min(15rem, calc(100vw - 2rem));
                padding: 0.8rem;
            }
            .doodle-color-grid--panel {
                grid-template-columns: repeat(3, minmax(0, 1fr));
            }
            .doodle-color-swatch {
                width: 1.34rem;
                height: 1.34rem;
            }
            .doodle-color-more-btn {
                height: 1.82rem;
                padding: 0 0.62rem;
                font-size: 0.72rem;
            }
            .doodle-color-hex {
                width: 5.3rem;
                height: 1.82rem;
                font-size: 0.74rem;
            }
            .doodle-size-slider {
                width: min(8.5rem, 42vw);
            }
            .doodle-size-preview {
                min-width: 4.2rem;
                height: 1.82rem;
                padding: 0 0.55rem;
            }
            .doodle-size-preview__stroke {
                width: 1.8rem;
            }
        }
        /* 纸张阴影 */
        .paper-shadow { box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.1); }
        .profile-shell {
            width: 100%;
            min-width: 0;
            overflow-x: hidden;
            padding: 1.5rem;
            background:
                radial-gradient(circle at top right, rgba(212, 175, 55, 0.12), transparent 30%),
                linear-gradient(180deg, rgba(250, 248, 240, 0.96), rgba(255, 255, 255, 0.9));
        }
        .profile-hero {
            position: relative;
            overflow: hidden;
            border-radius: 1.75rem;
            border: 1px solid rgba(120, 113, 108, 0.12);
            background: linear-gradient(135deg, rgba(255,255,255,0.96), rgba(246, 243, 232, 0.96));
            box-shadow: 0 28px 60px rgba(120, 113, 108, 0.12);
        }
        .profile-hero::after {
            content: '';
            position: absolute;
            inset: auto -10% -35% auto;
            width: 280px;
            height: 280px;
            border-radius: 999px;
            background: radial-gradient(circle, rgba(212,175,55,0.15), transparent 68%);
            pointer-events: none;
        }
        .profile-card {
            border-radius: 1.25rem;
            border: 1px solid rgba(120, 113, 108, 0.12);
            background: rgba(255,255,255,0.86);
            box-shadow: 0 18px 40px rgba(120, 113, 108, 0.08);
            backdrop-filter: blur(14px);
        }
        .profile-metric {
            border-radius: 1rem;
            border: 1px solid rgba(120, 113, 108, 0.1);
            background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(250,248,240,0.82));
        }
        .profile-entry {
            border-radius: 1rem;
            border: 1px solid rgba(120, 113, 108, 0.1);
            background: rgba(255,255,255,0.75);
            transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
        }
        .profile-entry:hover {
            transform: translateY(-2px);
            border-color: rgba(212, 175, 55, 0.35);
            box-shadow: 0 18px 32px rgba(120, 113, 108, 0.1);
        }
        .profile-tag {
            display: inline-flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 0.35rem;
            min-height: 2rem;
            padding: 0.2rem 0.75rem;
            border-radius: 999px;
            background: rgba(255,255,255,0.85);
            border: 1px solid rgba(120, 113, 108, 0.1);
            color: #57534e;
            font-size: 0.82rem;
            white-space: normal;
            overflow-wrap: anywhere;
            word-break: break-word;
        }
        .profile-shell section,
        .profile-shell .profile-card,
        .profile-shell .profile-entry,
        .profile-shell .grid > *,
        .profile-shell .flex > * {
            min-width: 0;
            max-width: 100%;
        }
        .profile-shell .profile-tag {
            max-width: 100%;
        }
        .profile-shell :where(
            .profile-card,
            .profile-entry,
            .profile-metric,
            .profile-tag,
            .profile-card *,
            .profile-entry *,
            .profile-metric *
        ) {
            min-width: 0;
            max-width: 100%;
            overflow-wrap: anywhere;
            word-break: break-word;
        }
        .module-viewer-panel,
        .module-viewer-panel * {
            min-width: 0;
            max-width: 100%;
            overflow-wrap: anywhere;
            word-break: break-word;
        }
        .profile-nav-btn {
            width: 2.4rem;
            height: 2.4rem;
            border-radius: 999px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }
        .profile-nav-btn.active {
            background: rgba(43, 43, 43, 0.92);
            color: white;
            box-shadow: 0 10px 20px rgba(43, 43, 43, 0.18);
        }
        .profile-nav-btn:not(.active) {
            color: #78716c;
            background: rgba(255,255,255,0.72);
            border: 1px solid rgba(120, 113, 108, 0.08);
        }
        .profile-avatar-ring {
            width: 4.75rem;
            height: 4.75rem;
            border-radius: 999px;
            border: 1px solid rgba(120, 113, 108, 0.12);
            background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(246,243,232,0.92));
            box-shadow: 0 16px 28px rgba(120, 113, 108, 0.12);
            overflow: hidden;
        }
        .profile-avatar-ring img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        /* 隐私探照灯遮罩 */
        @property --privacy-radius {
            syntax: '<length>';
            inherits: true;
            initial-value: 3000px;
        }
        .privacy-overlay {
            position: fixed;
            inset: 0;
            z-index: 9999;
            pointer-events: none;
            visibility: hidden;
            transition: visibility 0s linear 1.5s;
        }
        .privacy-overlay.is-active {
            visibility: visible;
            transition: visibility 0s linear 0s;
        }
        .privacy-mask {
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.98);
            --privacy-radius: 3000px;
            transition: --privacy-radius 1.5s cubic-bezier(0.22, 1, 0.36, 1), -webkit-mask-position 0.2s ease-out, mask-position 0.2s ease-out;
            mask-repeat: no-repeat;
            -webkit-mask-repeat: no-repeat;
            pointer-events: none;
        }
        .privacy-overlay.is-active .privacy-mask {
            --privacy-radius: var(--target-radius, 160px);
            transition: --privacy-radius 0.3s cubic-bezier(0.22, 1, 0.36, 1), -webkit-mask-position 0.2s ease-out, mask-position 0.2s ease-out;
        }
        .brightness-ease {
            position: fixed;
            inset: 0;
            z-index: 9998;
            pointer-events: none;
            background:
                radial-gradient(circle at center, rgba(255,250,240,0.18), rgba(255,244,214,0.42)),
                linear-gradient(180deg, rgba(255,248,232,0.55), rgba(255,248,232,0.20));
            opacity: 0;
            transition: opacity 0.72s ease;
            mix-blend-mode: screen;
        }
        .brightness-ease.active {
            opacity: 1;
        }
        /* --- 黑夜模式强制覆写 --- */
        .theme-transitioning * {
            transition: background-color 1.5s ease, border-color 1.5s ease, color 1.5s ease, box-shadow 1.5s ease !important;
        }
        .theme-transitioning-fast * {
            transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease !important;
        }
        html.dark {
            color-scheme: dark;
        }
        html.dark body,
        html.dark #app,
        html.dark main,
        html.dark aside {
            background-color: #121417 !important;
            color: #e5e7eb !important;
        }
        html.dark body {
            background-color: #121212 !important;
            color: #e5e5e5 !important;
        }
        html.dark .bg-paper, html.dark .bg-paper-light, html.dark .bg-paper-light\/95 {
            background-color: #18181b !important; /* 极深灰 */
        }
        html.dark .boot-skeleton,
        html.dark .booting .boot-skeleton {
            background: linear-gradient(180deg, #14161a, #101215) !important;
        }
        html.dark .bg-white {
            background-color: #27272a !important; /* 深灰 */
        }
        html.dark .shadow-xl,
        html.dark .shadow-2xl,
        html.dark .shadow-md,
        html.dark .shadow-lg,
        html.dark .shadow-sm,
        html.dark .shadow-inner {
            box-shadow: 0 18px 40px rgba(0, 0, 0, 0.42) !important;
        }
        html.dark .bg-gray-50, html.dark .bg-stone-50, html.dark .bg-gray-100, html.dark .bg-stone-100 {
            background-color: #3f3f46 !important;
        }
        html.dark .text-white {
            color: #f4f4f5 !important;
        }
        html.dark .text-gray-900, html.dark .text-gray-800, html.dark .text-stone-900, html.dark .text-stone-800, html.dark .text-ink {
            color: #f4f4f5 !important;
        }
        html.dark .text-gray-700, html.dark .text-gray-600, html.dark .text-stone-700, html.dark .text-stone-600, html.dark .text-stone-400 {
            color: #d4d4d8 !important;
        }
        html.dark .text-gray-500, html.dark .text-stone-500 {
            color: #a1a1aa !important;
        }
        html.dark .border-gray-200, html.dark .border-gray-100, html.dark .border-stone-200, html.dark .border-stone-100, html.dark .border-emerald-100, html.dark .border-black\/10 {
            border-color: #52525b !important;
        }
        html.dark .border-amber-900\/15 {
            border-color: rgba(255, 255, 255, 0.1) !important;
        }
        html.dark .bg-amber-900\/10 {
            background-color: rgba(255, 255, 255, 0.05) !important;
        }
        html.dark .text-amber-800\/60 {
            color: rgba(255, 255, 255, 0.4) !important;
        }
        html.dark .editor-input {
            color: #e5e5e5 !important;
        }
        html.dark .editor-readonly {
            color: #e5e5e5 !important;
        }
        html.dark .editor-input b,
        html.dark .editor-input strong,
        html.dark .editor-readonly b,
        html.dark .editor-readonly strong,
        html.dark .editor-input h4,
        html.dark .editor-readonly h4 {
            color: #ffffff !important;
        }
        html.dark .editor-input mark,
        html.dark .editor-readonly mark {
            color: #111111 !important;
            text-decoration-color: #111111 !important;
        }
        html.dark .editor-input strike,
        html.dark .editor-input s,
        html.dark .editor-readonly strike,
        html.dark .editor-readonly s {
            color: #a1a1aa !important;
            text-decoration-color: currentColor !important;
        }
        html.dark .editor-input strike:has(mark),
        html.dark .editor-input s:has(mark),
        html.dark .editor-readonly strike:has(mark),
        html.dark .editor-readonly s:has(mark) {
            color: #585435 !important;
            text-decoration-color: #585435 !important;
        }
        html.dark .editor-input strike mark,
        html.dark .editor-input s mark,
        html.dark .editor-input mark strike,
        html.dark .editor-input mark s,
        html.dark .editor-readonly strike mark,
        html.dark .editor-readonly s mark,
        html.dark .editor-readonly mark strike,
        html.dark .editor-readonly mark s {
            color: #585435 !important;
            text-decoration-color: currentColor !important;
        }
        html.dark .editor-input mark b,
        html.dark .editor-input mark strong,
        html.dark .editor-readonly mark b,
        html.dark .editor-readonly mark strong {
            color: #111111 !important;
        }
        html.dark .editor-input[placeholder]:empty:before {
            color: rgba(255, 255, 255, 0.3) !important;
        }
        html.dark .editor-input audio,
        html.dark .editor-readonly audio {
            border-color: rgba(113, 113, 122, 0.34) !important;
            background: linear-gradient(180deg, rgba(39,39,42,0.98), rgba(28,28,32,0.98)) !important;
            box-shadow: 0 18px 34px rgba(0, 0, 0, 0.24) !important;
        }
        html.dark .editor-input audio::-webkit-media-controls-panel,
        html.dark .editor-readonly audio::-webkit-media-controls-panel {
            background: linear-gradient(180deg, #3f3f46, #27272a);
        }
        html.dark .editor-input .media-highlight,
        html.dark .editor-readonly .media-highlight {
            box-shadow: 0 0 0 3px #facc15, 0 0 0 8px rgba(250, 204, 21, 0.18);
        }
        html.dark .editor-input img.media-delete-selected,
        html.dark .editor-readonly img.media-delete-selected,
        html.dark .editor-input .media-overlay-composite.media-delete-selected,
        html.dark .editor-readonly .media-overlay-composite.media-delete-selected {
            box-shadow: 0 0 0 3px #facc15, 0 0 0 8px rgba(250, 204, 21, 0.18), 0 10px 24px rgba(15, 23, 42, 0.45);
        }
        html.dark .audio-widget__shell {
            border-color: rgba(113, 113, 122, 0.34);
            background: linear-gradient(180deg, rgba(39,39,42,0.98), rgba(28,28,32,0.98));
            box-shadow: 0 18px 34px rgba(0, 0, 0, 0.24);
        }
        html.dark .audio-widget.media-delete-selected .audio-widget__shell {
            box-shadow: 0 0 0 3px #facc15, 0 0 0 8px rgba(250, 204, 21, 0.18), 0 18px 34px rgba(0, 0, 0, 0.28);
        }
        html.dark .audio-widget__play {
            background: linear-gradient(135deg, #f8fafc, #d6d3d1);
            color: #111827;
            box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
        }
        html.dark .audio-widget__play:hover,
        html.dark .audio-widget__more:hover {
            background-color: rgba(255,255,255,0.18);
        }
        html.dark .audio-widget__more {
            background: rgba(255,255,255,0.08);
            color: #f5f5f4;
        }
        html.dark .audio-widget__title {
            color: #f5f5f4;
        }
        html.dark .audio-widget__time {
            color: #d6d3d1;
        }
        html.dark .audio-widget__progress {
            background: linear-gradient(90deg, #f8fafc 0%, #f8fafc var(--audio-progress, 0%), #52525b var(--audio-progress, 0%), #52525b 100%);
        }
        html.dark .audio-widget__progress::-webkit-slider-thumb,
        html.dark .audio-widget__progress::-moz-range-thumb {
            border-color: #18181b;
            background: #f8fafc;
        }
        html.dark .audio-more-menu {
            background: rgba(39,39,42,0.98);
            border-color: rgba(113,113,122,0.34);
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.28);
        }
        html.dark .audio-more-menu__title {
            color: #e7e5e4;
        }
        html.dark .audio-more-menu__speed {
            background: #3f3f46;
            color: #f5f5f4;
        }
        html.dark .audio-more-menu__speed.is-active {
            background: linear-gradient(135deg, #f8fafc, #d6d3d1);
            color: #111827;
        }
        html.dark .audio-more-menu__action {
            background: #27272a;
            color: #f5f5f4;
        }
        html.dark .audio-more-menu__action.is-danger {
            background: rgba(127, 29, 29, 0.32);
            color: #fecaca;
        }
        html.dark input, html.dark textarea {
            background-color: #3f3f46 !important;
            color: #e5e5e5 !important;
            border-color: #52525b !important;
        }
        html.dark .bg-transparent {
            background-color: transparent !important;
        }
        html.dark .date-trigger,
        html.dark .picker-trigger,
        html.dark .desktop-status-pill,
        html.dark .mobile-action-btn,
        html.dark .mobile-action-btn-wide,
        html.dark .mobile-date-btn,
        html.dark .profile-nav-btn:not(.active),
        html.dark .module-action-btn {
            background: rgba(39, 39, 42, 0.96) !important;
            border-color: rgba(113, 113, 122, 0.48) !important;
            color: #e4e4e7 !important;
            box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28) !important;
        }
        html.dark .date-trigger-icon,
        html.dark .inline-flex.items-center.gap-2.rounded-full.bg-violet-100\/90,
        html.dark .w-11.h-11.rounded-2xl.bg-amber-100 {
            background: rgba(63, 63, 70, 0.98) !important;
            color: #e9d5ff !important;
        }
        html.dark .module-quote-title {
            background: transparent !important;
            border: none !important;
            border-radius: 0.85rem !important;
            width: 100%;
            padding: 0 0 0 1rem !important;
        }
        html.dark .quote-toolbar-btn {
            background: #3f3f46 !important;
            color: #d4d4d8 !important;
        }
        html.dark .quote-header-icon {
            background: rgba(63, 63, 70, 0.92) !important;
            color: #d4d4d8 !important;
        }
        html.dark .inspiration-toolbar-btn {
            background: #3f3f46 !important;
            color: #d4d4d8 !important;
        }
        html.dark .desktop-status-btn,
        html.dark .mobile-toolbar .text-gray-700,
        html.dark .mobile-toolbar .text-gray-500,
        html.dark .date-weekday {
            color: #d4d4d8 !important;
        }
        html.dark .desktop-status-divider {
            background: rgba(113, 113, 122, 0.42) !important;
        }
        html.dark .mobile-toolbar {
            background: rgba(24, 24, 27, 0.94) !important;
            border-bottom-color: rgba(113, 113, 122, 0.32) !important;
            box-shadow: 0 10px 32px rgba(0, 0, 0, 0.24);
        }
        html.dark .date-modal-card,
        html.dark .module-viewer-panel {
            background: linear-gradient(180deg, #202226, #191b1f) !important;
            border-color: rgba(113, 113, 122, 0.36) !important;
            color: #e4e4e7 !important;
        }
        html.dark .module-viewer-overlay {
            background: rgba(0, 0, 0, 0.62) !important;
        }
        html.dark .picker-panel,
        html.dark .bubble-menu {
            background: rgba(32, 34, 38, 0.98) !important;
            border-color: rgba(113, 113, 122, 0.34) !important;
            color: #e4e4e7 !important;
        }
        html.dark .module-dream, html.dark .module-quote, html.dark .module-inspiration, html.dark .module-generic {
            background: linear-gradient(180deg, rgba(39,39,42,0.98), rgba(28,28,32,0.98)) !important;
            border-color: rgba(113, 113, 122, 0.34) !important;
            box-shadow: 0 18px 34px rgba(0, 0, 0, 0.24) !important;
        }
        html.dark .module-dream-textarea, html.dark .module-quote-textarea, html.dark .module-inspiration-textarea, html.dark .module-quote-title, html.dark .module-generic-textarea, html.dark .module-generic-input, html.dark .module-generic-title {
            color: #d4d4d8 !important;
        }
        html.dark .module-dream-textarea::placeholder, html.dark .module-quote-textarea::placeholder, html.dark .module-inspiration-textarea::placeholder, html.dark .module-quote-title::placeholder, html.dark .module-generic-textarea::placeholder, html.dark .module-generic-input::placeholder, html.dark .module-generic-title::placeholder {
            color: #71717a !important;
        }
        html.dark .profile-shell {
            background:
                radial-gradient(circle at top right, rgba(96, 165, 250, 0.08), transparent 28%),
                linear-gradient(180deg, rgba(20, 22, 26, 0.98), rgba(16, 18, 22, 0.98)) !important;
        }
        html.dark .profile-hero {
            background: linear-gradient(135deg, rgba(36,38,44,0.98), rgba(26,28,33,0.98)) !important;
            border-color: rgba(113, 113, 122, 0.26) !important;
            box-shadow: 0 28px 54px rgba(0, 0, 0, 0.32) !important;
        }
        html.dark .profile-hero::after {
            background: radial-gradient(circle, rgba(168, 85, 247, 0.16), transparent 68%) !important;
        }
        html.dark .profile-card,
        html.dark .glass,
        html.dark .profile-entry,
        html.dark .profile-metric {
            background: linear-gradient(180deg, rgba(39,39,42,0.96), rgba(28,28,32,0.96)) !important;
            border-color: rgba(113, 113, 122, 0.28) !important;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3) !important;
        }
        html.dark .profile-entry:hover {
            border-color: rgba(148, 163, 184, 0.42) !important;
            box-shadow: 0 18px 32px rgba(0, 0, 0, 0.34) !important;
        }
        html.dark .profile-avatar-ring {
            background: linear-gradient(180deg, rgba(39,39,42,0.96), rgba(24,24,27,0.92)) !important;
            border-color: rgba(113, 113, 122, 0.34) !important;
        }
        html.dark .bg-white\/90, html.dark .bg-white\/85, html.dark .bg-white\/80, html.dark .bg-white\/60, html.dark .bg-white\/50 {
            background-color: #27272a !important;
        }
        html.dark .bg-stone-50\/80, html.dark .bg-stone-50\/70 {
            background-color: #3f3f46 !important;
        }
        html.dark .bg-stone-50\/40 {
            background-color: rgba(39, 39, 42, 0.72) !important;
        }
        html.dark .bg-stone-900 {
            background-color: #e5e5e5 !important;
            color: #18181b !important;
        }
        html.dark .text-stone-900 {
            color: #18181b !important;
        }
        html.dark .bg-violet-100,
        html.dark .bg-emerald-100,
        html.dark .bg-amber-100,
        html.dark .bg-red-50,
        html.dark .bg-green-50,
        html.dark .bg-emerald-100,
        html.dark .bg-violet-100\/90 {
            background-color: rgba(63, 63, 70, 0.92) !important;
        }
        html.dark .bg-amber-50, html.dark .bg-slate-50, html.dark .bg-purple-100, html.dark .bg-green-100, html.dark .bg-yellow-100, html.dark .bg-red-50 {
            background-color: #3f3f46 !important;
        }
        html.dark .text-amber-600, html.dark .text-purple-600, html.dark .text-green-600, html.dark .text-yellow-600, html.dark .text-red-600,
        html.dark .text-violet-700, html.dark .text-emerald-700, html.dark .text-amber-700 {
            color: #d4d4d8 !important;
        }
        html.dark .text-amber-900, html.dark .text-amber-800 {
            color: #fbbf24 !important;
        }
        html.dark .hover\:bg-gray-50:hover, html.dark .hover\:bg-stone-50:hover, html.dark .hover\:bg-white\/60:hover {
            background-color: #52525b !important;
        }
        html.dark .profile-tag {
            background-color: #3f3f46 !important;
            color: #d4d4d8 !important;
            border-color: #52525b !important;
        }
        html.dark .border-stone-200, html.dark .border-gray-200 {
            border-color: #52525b !important;
        }
        html.dark .border-amber-200 {
            border-color: #a1a1aa !important;
        }
        html.dark .bg-gradient-to-br {
            background-image: linear-gradient(to bottom right, #27272a, #18181b) !important;
        }
        html.dark .rounded-2xl.border.border-dashed.border-stone-200.bg-stone-50\/70,
        html.dark .rounded-2xl.border.border-stone-200.bg-stone-50\/70,
        html.dark .rounded-2xl.border.border-stone-200.bg-stone-50\/80 {
            background: rgba(39,39,42,0.86) !important;
            border-color: rgba(113,113,122,0.28) !important;
        }
        html.dark .custom-scroll::-webkit-scrollbar-thumb {
            background: #71717a;
        }
        html.dark .custom-scroll::-webkit-scrollbar-thumb:hover {
            background: #a1a1aa;
        }
        html.dark .flatpickr-calendar,
        html.dark .flatpickr-calendar.inline,
        html.dark .flatpickr-months,
        html.dark .flatpickr-innerContainer,
        html.dark .flatpickr-rContainer,
        html.dark .flatpickr-days,
        html.dark .dayContainer,
        html.dark .flatpickr-weekdays {
            background: #232326 !important;
            border: none !important;
            box-shadow: none !important;
        }
        html.dark .flatpickr-months {
            border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
            border-radius: 1rem 1rem 0 0;
        }
        html.dark .flatpickr-weekdays,
        html.dark .flatpickr-days {
            border-radius: 0 0 1rem 1rem;
        }
        html.dark .flatpickr-months .flatpickr-month,
        html.dark .flatpickr-current-month,
        html.dark .flatpickr-current-month .flatpickr-monthDropdown-months,
        html.dark .flatpickr-current-month input.cur-year {
            background: transparent !important;
            color: #e7e5e4 !important;
            fill: #e7e5e4 !important;
        }
        html.dark .flatpickr-current-month .flatpickr-monthDropdown-months,
        html.dark .flatpickr-current-month input.cur-year {
            border-radius: 0.5rem;
        }
        html.dark .flatpickr-weekday {
            color: #a8a29e !important;
        }
        html.dark .flatpickr-day {
            color: #f5f5f4 !important;
            background: transparent !important;
        }
        html.dark .flatpickr-day.prevMonthDay,
        html.dark .flatpickr-day.nextMonthDay {
            color: #78716c !important;
        }
        html.dark .flatpickr-day:hover,
        html.dark .flatpickr-day:focus {
            background: #3a3a3f !important;
            border-color: #3a3a3f !important;
        }
        html.dark .flatpickr-day.selected,
        html.dark .flatpickr-day.startRange,
        html.dark .flatpickr-day.endRange {
            background: #d4af37 !important;
            color: #18181b !important;
            border-color: #d4af37 !important;
        }
        html.dark .flatpickr-day.today {
            border-color: #d4af37 !important;
        }
        html.dark .flatpickr-prev-month svg,
        html.dark .flatpickr-next-month svg {
            fill: #a8a29e !important;
        }
        html.dark .flatpickr-prev-month:hover svg,
        html.dark .flatpickr-next-month:hover svg {
            fill: #d4af37 !important;
        }
        html.dark .flatpickr-day.flatpickr-disabled,
        html.dark .flatpickr-day.flatpickr-disabled:hover {
            color: #57534e !important;
            background: transparent !important;
        }

        /* ===== 书本日记本（俯视角、轻3D） ===== */
        .notebook-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 1rem;
            padding: 0.25rem;
        }
        @media (max-width: 768px) {
            .notebook-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 0.85rem;
            }
        }
        @media (max-width: 480px) {
            .notebook-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 0.65rem;
            }
        }

        /* ===== 容器：轻微俯视角 ===== */
        .book-3d {
            position: relative;
            display: flex;
            min-height: 210px;
            cursor: pointer;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            transform: perspective(800px) rotateX(4deg);
            transform-origin: center bottom;
            box-shadow: 0 4px 12px rgba(120,113,108,0.10), 0 1px 3px rgba(120,113,108,0.06);
            border-radius: 8px;
        }
        .book-3d:hover {
            transform: perspective(800px) rotateX(2deg) translateY(-3px);
            box-shadow: 0 8px 20px rgba(120,113,108,0.14), 0 2px 6px rgba(120,113,108,0.08);
        }
        .book-3d:active {
            transform: perspective(800px) rotateX(3deg) translateY(-1px);
            box-shadow: 0 3px 8px rgba(120,113,108,0.08);
        }

        /* 选中态 */
        .book-3d-active {
            transform: perspective(800px) rotateX(2deg) translateY(-2px) !important;
            box-shadow: 0 6px 16px rgba(212,175,55,0.16), 0 1px 4px rgba(212,175,55,0.10) !important;
            outline: 2px solid rgba(212, 175, 55, 0.45);
            outline-offset: 2px;
            border-radius: 8px;
        }
        .book-3d-active:hover {
            transform: perspective(800px) rotateX(1deg) translateY(-4px) !important;
            box-shadow: 0 10px 22px rgba(212,175,55,0.2), 0 2px 6px rgba(212,175,55,0.12) !important;
        }

        /* ===== 书脊 ===== */
        .book-spine {
            position: relative;
            width: 22px;
            min-width: 22px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            border-radius: 6px 0 0 6px;
            overflow: hidden;
            z-index: 2;
        }
        .book-spine-text {
            writing-mode: vertical-rl;
            text-orientation: mixed;
            font-size: 0.58rem;
            font-weight: 600;
            letter-spacing: 0.15em;
            color: rgba(255,255,255,0.78);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-height: 100%;
            padding: 0.4rem 0;
            text-shadow: 0 1px 1px rgba(0,0,0,0.15);
            user-select: none;
            pointer-events: none;
        }
        .book-spine-lines {
            position: absolute;
            left: 3px;
            right: 3px;
            top: 14px;
            bottom: 14px;
            border-top: 1px solid rgba(255,255,255,0.14);
            border-bottom: 1px solid rgba(255,255,255,0.14);
            pointer-events: none;
        }
        .book-spine-lines::before,
        .book-spine-lines::after {
            content: '';
            position: absolute;
            left: 0;
            right: 0;
            height: 1px;
            background: rgba(255,255,255,0.08);
        }
        .book-spine-lines::before { top: 33%; }
        .book-spine-lines::after { top: 66%; }

        /* ===== 书签丝带（简化） ===== */
        .book-ribbon {
            position: absolute;
            top: -1px;
            right: 16px;
            width: 8px;
            height: 32px;
            z-index: 5;
            border-radius: 0 0 3px 3px;
            pointer-events: none;
            opacity: 0.7;
        }

        /* ===== 封面 ===== */
        .book-cover {
            flex: 1;
            position: relative;
            border-radius: 0 6px 6px 0;
            overflow: hidden;
            z-index: 1;
        }
        /* 封面光泽 */
        .book-cover::before {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(
                145deg,
                rgba(255,255,255,0.18) 0%,
                transparent 40%,
                transparent 75%,
                rgba(0,0,0,0.04) 100%
            );
            pointer-events: none;
            z-index: 1;
        }
        /* 右侧页边 */
        .book-cover::after {
            content: '';
            position: absolute;
            right: 0;
            top: 5px;
            bottom: 5px;
            width: 4px;
            background: repeating-linear-gradient(
                0deg,
                rgba(255,255,255,0.12) 0px,
                rgba(255,255,255,0.12) 1px,
                rgba(0,0,0,0.04) 1px,
                rgba(0,0,0,0.04) 2px
            );
            border-radius: 0 3px 3px 0;
            pointer-events: none;
            z-index: 1;
        }

        /* 封面内容区 */
        .book-cover-inner {
            position: relative;
            z-index: 2;
            display: flex;
            flex-direction: column;
            height: 100%;
            min-height: 210px;
            padding: 0.7rem 0.75rem 0.65rem 0.65rem;
        }

        .book-cover-center {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
            gap: 0.25rem;
        }
        .book-cover-name {
            font-size: 1rem;
            font-weight: 700;
            color: rgba(255,255,255,0.92);
            line-height: 1.3;
            max-width: 100%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        /* 徽章 */
        .book-badge {
            display: inline-flex;
            align-items: center;
            font-size: 0.56rem;
            font-weight: 600;
            padding: 0.1rem 0.4rem;
            border-radius: 999px;
            white-space: nowrap;
            backdrop-filter: blur(4px);
        }
        .book-badge-shared {
            background: rgba(255,255,255,0.2);
            color: rgba(255,255,255,0.8);
            border: 1px solid rgba(255,255,255,0.15);
        }

        /* 日记总数 */
        .book-cover-count {
            display: flex;
            align-items: baseline;
            gap: 0.25rem;
        }
        .book-count-num {
            font-size: 1.1rem;
            font-weight: 800;
            color: rgba(255,255,255,0.88);
            line-height: 1;
        }
        .book-count-label {
            font-size: 0.66rem;
            color: rgba(255,255,255,0.5);
        }

        /* 操作区 */
        .book-cover-actions {
            flex: 0 0 auto;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding-top: 0.3rem;
            border-top: 1px solid rgba(255,255,255,0.10);
        }
        .book-cover-actions-right {
            display: flex;
            align-items: center;
            gap: 0.3rem;
        }
        .book-action-btn {
            width: 1.6rem;
            height: 1.6rem;
            border-radius: 999px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            color: rgba(255,255,255,0.5);
            background: transparent;
            border: none;
            cursor: pointer;
            transition: all 0.2s ease;
            font-size: 0.8rem;
        }
        .book-action-btn:hover {
            color: #fff;
            background: rgba(255,255,255,0.12);
        }
        .book-check {
            width: 1.6rem;
            height: 1.6rem;
            border-radius: 999px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            color: rgba(255,255,255,0.85);
            background: rgba(255,255,255,0.12);
            font-size: 0.85rem;
        }

        /* ===== 8 种柔色封面 ===== */
        /* 0 - 暖褐 */
        .book-color-0 .book-spine { background: linear-gradient(180deg, #a47148, #8b5e3c, #6b4226); }
        .book-color-0 .book-cover { background: linear-gradient(155deg, #c4a27c 0%, #a47148 40%, #8b5e3c 100%); }
        .book-color-0 .book-ribbon { background: #d4af37; }

        /* 1 - 鼠尾绿 */
        .book-color-1 .book-spine { background: linear-gradient(180deg, #7a9e7e, #5c7c60, #3d5a40); }
        .book-color-1 .book-cover { background: linear-gradient(155deg, #9bb89d 0%, #7a9e7e 40%, #5c7c60 100%); }
        .book-color-1 .book-ribbon { background: #c9a96e; }

        /* 2 - 雾蓝 */
        .book-color-2 .book-spine { background: linear-gradient(180deg, #7b8faa, #5f728c, #3f5268); }
        .book-color-2 .book-cover { background: linear-gradient(155deg, #9aafc7 0%, #7b8faa 40%, #5f728c 100%); }
        .book-color-2 .book-ribbon { background: #d4845a; }

        /* 3 - 豆沙红 */
        .book-color-3 .book-spine { background: linear-gradient(180deg, #a06a6a, #7f5050, #5a3535); }
        .book-color-3 .book-cover { background: linear-gradient(155deg, #c4908a 0%, #a06a6a 40%, #7f5050 100%); }
        .book-color-3 .book-ribbon { background: #d4af7a; }

        /* 4 - 薰衣草灰 */
        .book-color-4 .book-spine { background: linear-gradient(180deg, #8b7d9b, #6d5f7d, #4d405d); }
        .book-color-4 .book-cover { background: linear-gradient(155deg, #a899b5 0%, #8b7d9b 40%, #6d5f7d 100%); }
        .book-color-4 .book-ribbon { background: #c4a0c4; }

        /* 5 - 青瓷 */
        .book-color-5 .book-spine { background: linear-gradient(180deg, #739e93, #557d72, #375b50); }
        .book-color-5 .book-cover { background: linear-gradient(155deg, #94b8ad 0%, #739e93 40%, #557d72 100%); }
        .book-color-5 .book-ribbon { background: #d4c08a; }

        /* 6 - 陶土橙 */
        .book-color-6 .book-spine { background: linear-gradient(180deg, #b08060, #8e6244, #66442a); }
        .book-color-6 .book-cover { background: linear-gradient(155deg, #d0a080 0%, #b08060 40%, #8e6244 100%); }
        .book-color-6 .book-ribbon { background: #d4af5a; }

        /* 7 - 岩灰 */
        .book-color-7 .book-spine { background: linear-gradient(180deg, #8a8a8a, #6a6a6a, #484848); }
        .book-color-7 .book-cover { background: linear-gradient(155deg, #a8a8a8 0%, #8a8a8a 40%, #6a6a6a 100%); }
        .book-color-7 .book-ribbon { background: #c49bc4; }

        /* ===== 深色模式适配 ===== */
        html.dark .book-3d {
            box-shadow: 0 4px 14px rgba(0,0,0,0.28), 0 1px 3px rgba(0,0,0,0.18);
        }
        html.dark .book-3d:hover {
            box-shadow: 0 8px 22px rgba(0,0,0,0.36), 0 2px 6px rgba(0,0,0,0.22);
        }
        html.dark .book-3d-active {
            box-shadow: 0 6px 18px rgba(212,175,55,0.18), 0 1px 4px rgba(212,175,55,0.10) !important;
        }
        html.dark .book-3d-active:hover {
            box-shadow: 0 10px 24px rgba(212,175,55,0.22), 0 2px 6px rgba(212,175,55,0.14) !important;
        }
        html.dark .book-cover::after {
            background: repeating-linear-gradient(
                0deg,
                rgba(255,255,255,0.06) 0px,
                rgba(255,255,255,0.06) 1px,
                rgba(0,0,0,0.12) 1px,
                rgba(0,0,0,0.12) 2px
            );
        }

        /* ===== 头像弹出层 ===== */
        .avatar-popup-overlay {
            position: fixed;
            inset: 0;
            z-index: 70;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(0, 0, 0, 0.45);
            backdrop-filter: blur(4px);
        }
        .avatar-popup-modal {
            width: min(320px, 88vw);
            background: #fff;
            border-radius: 1.25rem;
            box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
            overflow: hidden;
            padding: 1.25rem 0;
        }
        .avatar-popup-header {
            display: flex;
            align-items: center;
            padding: 0 1.25rem 1rem;
        }
        .avatar-popup-divider {
            height: 1px;
            background: rgba(120, 113, 108, 0.1);
            margin: 0 0.75rem;
        }
        .avatar-popup-item {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            width: 100%;
            padding: 0.85rem 1.25rem;
            border: none;
            background: transparent;
            color: #292524;
            font-size: 0.95rem;
            font-weight: 500;
            cursor: pointer;
            transition: background-color 0.15s ease;
            text-align: left;
        }
        .avatar-popup-item:hover {
            background: rgba(120, 113, 108, 0.06);
        }
        .avatar-popup-item-danger:hover {
            background: rgba(239, 68, 68, 0.06);
        }
        .avatar-popup-badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 1.4rem;
            height: 1.4rem;
            padding: 0 0.35rem;
            border-radius: 999px;
            background: #ef4444;
            color: #fff;
            font-size: 0.7rem;
            font-weight: 700;
            line-height: 1;
        }
        html.dark .avatar-popup-overlay {
            background: rgba(0, 0, 0, 0.62);
        }
        html.dark .avatar-popup-modal {
            background: #27272a;
            box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
        }
        html.dark .avatar-popup-divider {
            background: rgba(255, 255, 255, 0.08);
        }
        html.dark .avatar-popup-item {
            color: #e4e4e7;
        }
        html.dark .avatar-popup-item:hover {
            background: rgba(255, 255, 255, 0.06);
        }
        html.dark .avatar-popup-item-danger:hover {
            background: rgba(239, 68, 68, 0.12);
        }

        /* ===== 消息页面 ===== */
        .messages-page {
            position: absolute;
            inset: 0;
            z-index: 20;
            display: flex;
            flex-direction: column;
            background: #faf8f0;
        }
        .messages-page-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 1rem 1.25rem;
            border-bottom: 1px solid rgba(120, 113, 108, 0.1);
            background: rgba(255, 255, 255, 0.8);
            backdrop-filter: blur(8px);
        }
        .messages-back-btn {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            padding: 0.45rem 0.85rem;
            border-radius: 999px;
            border: 1px solid rgba(120, 113, 108, 0.12);
            background: rgba(255, 255, 255, 0.88);
            color: #57534e;
            font-size: 0.85rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .messages-back-btn:hover {
            background: rgba(255, 255, 255, 0.98);
            border-color: rgba(120, 113, 108, 0.22);
        }
        .messages-page-title {
            font-size: 1.05rem;
            font-weight: 700;
            color: #292524;
        }
        .messages-page-body {
            flex: 1;
            overflow-y: auto;
            padding: 1rem 1.25rem;
        }
        .messages-loading {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 3rem 0;
        }
        .messages-empty {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 4rem 0;
        }
        .messages-list {
            display: flex;
            flex-direction: column;
            gap: 0.65rem;
        }
        .message-item {
            display: flex;
            gap: 0.65rem;
            padding: 1rem 1.1rem;
            border-radius: 1rem;
            border: 1px solid rgba(120, 113, 108, 0.1);
            background: rgba(255, 255, 255, 0.82);
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .message-item:hover {
            border-color: rgba(212, 175, 55, 0.3);
            box-shadow: 0 8px 20px rgba(120, 113, 108, 0.08);
            transform: translateY(-1px);
        }
        .message-item.unread {
            background: linear-gradient(180deg, rgba(255, 251, 235, 0.95), rgba(255, 255, 255, 0.88));
            border-color: rgba(245, 158, 11, 0.18);
        }
        .message-item-indicator {
            flex: 0 0 auto;
            padding-top: 0.25rem;
        }
        .message-unread-dot {
            display: block;
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #3b82f6;
            box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
        }
        .message-item-content {
            flex: 1;
            min-width: 0;
        }
        .message-item-header {
            display: flex;
            align-items: baseline;
            justify-content: space-between;
            gap: 0.75rem;
            margin-bottom: 0.3rem;
        }
        .message-item-title {
            font-size: 0.92rem;
            color: #292524;
            line-height: 1.4;
            min-width: 0;
        }
        .message-item-title.font-bold {
            font-weight: 700;
        }
        .message-item-time {
            flex: 0 0 auto;
            font-size: 0.72rem;
            color: #a8a29e;
            white-space: nowrap;
        }
        .message-item-preview {
            font-size: 0.82rem;
            color: #78716c;
            line-height: 1.5;
        }
        .message-item-full {
            font-size: 0.85rem;
            color: #44403c;
            line-height: 1.7;
            white-space: pre-wrap;
            word-break: break-word;
        }
        html.dark .messages-page {
            background: #18181b;
        }
        html.dark .messages-page-header {
            background: rgba(39, 39, 42, 0.92);
            border-bottom-color: rgba(255, 255, 255, 0.08);
        }
        html.dark .messages-back-btn {
            background: rgba(39, 39, 42, 0.92);
            border-color: rgba(255, 255, 255, 0.1);
            color: #d4d4d8;
        }
        html.dark .messages-back-btn:hover {
            background: rgba(39, 39, 42, 0.98);
            border-color: rgba(255, 255, 255, 0.18);
        }
        html.dark .messages-page-title {
            color: #f4f4f5;
        }
        html.dark .message-item {
            background: rgba(39, 39, 42, 0.82);
            border-color: rgba(255, 255, 255, 0.06);
        }
        html.dark .message-item:hover {
            border-color: rgba(255, 255, 255, 0.14);
        }
        html.dark .message-item.unread {
            background: linear-gradient(180deg, rgba(59, 130, 246, 0.08), rgba(39, 39, 42, 0.82));
            border-color: rgba(59, 130, 246, 0.18);
        }
        html.dark .message-item-title {
            color: #f4f4f5;
        }
        html.dark .message-item-time {
            color: #71717a;
        }
        html.dark .message-item-preview {
            color: #a1a1aa;
        }
        html.dark .message-item-full {
            color: #d4d4d8;
        }

        /* ===== 登录通知弹窗 ===== */
        .notification-popup-overlay {
            position: fixed;
            inset: 0;
            z-index: 75;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(0, 0, 0, 0.5);
            backdrop-filter: blur(6px);
        }
        .notification-popup-modal {
            width: min(420px, 90vw);
            max-height: 80vh;
            background: #fff;
            border-radius: 1.5rem;
            box-shadow: 0 28px 64px rgba(0, 0, 0, 0.22);
            overflow: hidden;
            display: flex;
            flex-direction: column;
        }
        .notification-popup-header {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 1.5rem 1.5rem 0.75rem;
        }
        .notification-popup-title {
            font-size: 1.1rem;
            font-weight: 700;
            color: #292524;
            line-height: 1.4;
        }
        .notification-popup-body {
            flex: 1;
            overflow-y: auto;
            padding: 0.5rem 1.5rem 1.25rem;
        }
        .notification-popup-content {
            font-size: 0.9rem;
            color: #57534e;
            line-height: 1.75;
            white-space: pre-wrap;
            word-break: break-word;
        }
        .notification-popup-footer {
            padding: 1rem 1.5rem;
            border-top: 1px solid rgba(120, 113, 108, 0.1);
            display: flex;
            justify-content: flex-end;
        }
        .notification-popup-close-btn {
            padding: 0.6rem 1.5rem;
            border-radius: 999px;
            border: none;
            background: #1f2937;
            color: #fff;
            font-size: 0.9rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .notification-popup-close-btn:hover {
            background: #111827;
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        }
        html.dark .notification-popup-overlay {
            background: rgba(0, 0, 0, 0.65);
        }
        html.dark .notification-popup-modal {
            background: #27272a;
            box-shadow: 0 28px 64px rgba(0, 0, 0, 0.42);
        }
        html.dark .notification-popup-title {
            color: #f4f4f5;
        }
        html.dark .notification-popup-content {
            color: #d4d4d8;
        }
        html.dark .notification-popup-footer {
            border-top-color: rgba(255, 255, 255, 0.08);
        }
        html.dark .notification-popup-close-btn {
            background: #e5e5e5;
            color: #18181b;
        }
        html.dark .notification-popup-close-btn:hover {
            background: #f4f4f5;
        }

        /* 移动端适配 */
        @media (max-width: 768px) {
            .avatar-popup-modal {
                width: min(300px, 92vw);
            }
            .messages-page-header {
                padding: 0.85rem 1rem;
            }
            .messages-page-body {
                padding: 0.85rem 1rem;
            }
            .message-item {
                padding: 0.85rem 0.95rem;
            }
            .notification-popup-modal {
                width: min(380px, 94vw);
                max-height: 85vh;
                border-radius: 1.25rem;
            }
            .notification-popup-header {
                padding: 1.25rem 1.25rem 0.5rem;
            }
            .notification-popup-body {
                padding: 0.5rem 1.25rem 1rem;
            }
            .notification-popup-footer {
                padding: 0.85rem 1.25rem;
            }
        }

        /* ==================== 今日待办模块 ==================== */
        .module-todo {
            position: relative;
            display: flex;
            flex-direction: column;
            gap: 0.85rem;
            border: 1px solid rgba(14, 165, 233, 0.16);
            border-radius: 1.25rem;
            background: linear-gradient(180deg, rgba(240, 249, 255, 0.96), rgba(255, 255, 255, 0.98));
            padding: 1rem;
            margin-bottom: 1.25rem;
            box-shadow: 0 18px 36px rgba(14, 165, 233, 0.08);
        }
        /* 待办卡片用 flex gap 控制内部间距，头部徽章的 mb-4 会造成间距叠加过大，此处覆盖为 0 */
        .module-todo > .flex {
            margin-bottom: 0;
        }
        .todo-toolbar-btn {
            background: #e0f2fe;
            color: #0284c7;
        }
        html.dark .module-todo {
            border-color: rgba(56, 189, 248, 0.2);
            background: linear-gradient(180deg, rgba(12, 74, 110, 0.35), rgba(30, 41, 59, 0.45));
            box-shadow: 0 18px 36px rgba(0, 0, 0, 0.25);
        }
        .module-todo-list {
            display: flex;
            flex-direction: column;
            gap: 0.15rem;
            position: relative;
        }
        /* 待办增删/移动动画（transition-group name=todo-list）
           注意：.module-todo-row 自带 transition: background，会覆盖这里同优先级的动画过渡，
           因此必须用 !important 确保 transform 等动画属性生效 */
        .todo-list-move {
            transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1) !important;
        }
        .todo-list-enter-active {
            transition: opacity 0.25s ease, transform 0.25s ease !important;
        }
        .todo-list-leave-active {
            position: absolute;
            width: 100%;
            transition: opacity 0.2s ease, transform 0.2s ease !important;
        }
        .todo-list-enter-from,
        .todo-list-leave-to {
            opacity: 0;
            transform: translateY(-6px);
        }
        /* 已完成待办行：整体置灰、不可编辑、不响应悬停高亮 */
        .module-todo-row.is-done-row {
            opacity: 0.8;
        }
        .module-todo-row.is-done-row:hover {
            background: transparent;
        }
        .module-todo-row.is-done-row .module-todo-input {
            cursor: default;
        }
        .module-todo-row {
            display: flex;
            align-items: flex-start;
            gap: 0.5rem;
            padding: 0.3rem 0.5rem 0.3rem 0.35rem;
            border-radius: 0.9rem;
            transition: background 0.15s ease;
        }
        .module-todo-row:hover {
            background: rgba(120, 113, 108, 0.06);
        }
        html.dark .module-todo-row:hover {
            background: rgba(255, 255, 255, 0.05);
        }
        .module-todo-check {
            width: 1.4rem;
            height: 1.4rem;
            margin-top: 0.4rem;
            border-radius: 9999px;
            border: 2px solid #94a3b8;
            background: transparent;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            color: #fff;
            font-size: 0.8rem;
            line-height: 1;
            cursor: pointer;
            transition: all 0.15s ease;
        }
        .module-todo-check:hover {
            border-color: #0ea5e9;
            background: rgba(14, 165, 233, 0.08);
        }
        .module-todo-check.is-done {
            background: #0ea5e9;
            border-color: #0ea5e9;
            box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
        }
        .module-todo-input,
        .module-todo-highlight {
            font-family: inherit;
            font-size: 0.9375rem;
            line-height: 1.6;
            padding: 0.5rem 0.75rem;
        }
        .module-todo-input {
            width: 100%;
            background: transparent;
            border: none;
            outline: none;
            color: #292524;
            font-size: 0.9375rem;
            line-height: 1.6;
            padding: 0.5rem 0.75rem;
            resize: none;
            overflow: hidden;
            white-space: pre-wrap;
            word-break: break-word;
            overflow-wrap: anywhere;
            box-sizing: border-box;
        }
        html.dark .module-todo-input {
            color: #e7e5e4;
        }
        .module-todo-input::placeholder {
            color: #a8a29e;
        }
        .module-todo-input.is-done {
            text-decoration: line-through;
            color: #a8a29e;
        }
        .module-todo-remove {
            width: 1.75rem;
            height: 1.75rem;
            margin-top: 0.2rem;
            border-radius: 9999px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #a8a29e;
            opacity: 0;
            transition: all 0.15s ease;
            flex-shrink: 0;
        }
        .module-todo-row:hover .module-todo-remove {
            opacity: 1;
        }
        .module-todo-remove:hover {
            background: rgba(239, 68, 68, 0.1);
            color: #ef4444;
        }
        .module-todo-add {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            margin: 0.35rem 0.5rem 0.25rem;
            padding: 0.35rem 0.8rem;
            border-radius: 9999px;
            font-size: 0.8125rem;
            font-weight: 600;
            color: #0284c7;
            background: rgba(14, 165, 233, 0.08);
            transition: all 0.15s ease;
            width: fit-content;
        }
        .module-todo-add:hover {
            background: rgba(14, 165, 233, 0.16);
            color: #0369a1;
        }
        html.dark .module-todo-add {
            color: #38bdf8;
            background: rgba(14, 165, 233, 0.14);
        }
        html.dark .module-todo-add:hover {
            background: rgba(14, 165, 233, 0.24);
        }

        /* ==================== 待办悬浮按钮（FAB） ==================== */
        .todo-fab-btn {
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 3.25rem;
            height: 3.25rem;
            border-radius: 9999px;
            border: 1px solid rgba(14, 165, 233, 0.35);
            background: rgba(255, 255, 255, 0.55);
            color: #0284c7;
            box-shadow: 0 8px 24px rgba(2, 132, 199, 0.18), 0 2px 6px rgba(0, 0, 0, 0.06);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            transition: all 0.25s ease;
            opacity: 0.82;
            touch-action: none;
        }
        .todo-fab-btn:hover {
            opacity: 1;
            transform: scale(1.05);
        }
        .todo-fab-btn.is-open {
            opacity: 1;
            transform: scale(1.08);
            box-shadow: 0 12px 32px rgba(2, 132, 199, 0.28);
        }
        html.dark .todo-fab-btn {
            background: rgba(30, 41, 59, 0.55);
            border-color: rgba(56, 189, 248, 0.4);
            color: #38bdf8;
            box-shadow: 0 8px 24px rgba(2, 132, 199, 0.25);
        }
        .todo-fab-badge {
            position: absolute;
            top: -0.35rem;
            right: -0.35rem;
            min-width: 1.35rem;
            height: 1.35rem;
            padding: 0 0.3rem;
            border-radius: 9999px;
            background: linear-gradient(135deg, #0ea5e9, #0284c7);
            color: #fff;
            font-size: 0.6875rem;
            font-weight: 700;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
            border: 2px solid rgba(255, 255, 255, 0.8);
        }
        html.dark .todo-fab-badge {
            border-color: rgba(30, 41, 59, 0.9);
        }
        .todo-fab-panel {
            position: absolute;
            bottom: calc(100% + 0.75rem);
            right: 0;
            width: min(20rem, calc(100vw - 2rem));
            max-height: min(70vh, 30rem);
            display: flex;
            flex-direction: column;
            border-radius: 1.25rem;
            border: 1px solid rgba(2, 132, 199, 0.15);
            background: rgba(255, 255, 255, 0.94);
            box-shadow: 0 18px 48px rgba(2, 132, 199, 0.16), 0 4px 12px rgba(0, 0, 0, 0.06);
            backdrop-filter: blur(14px);
            -webkit-backdrop-filter: blur(14px);
            overflow: hidden;
        }
        html.dark .todo-fab-panel {
            background: rgba(24, 34, 51, 0.94);
            border-color: rgba(56, 189, 248, 0.2);
            box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
        }
        .todo-fab-panel-head {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.85rem 1rem 0.7rem;
            border-bottom: 1px solid rgba(120, 113, 108, 0.12);
            flex-shrink: 0;
        }
        html.dark .todo-fab-panel-head {
            border-bottom-color: rgba(255, 255, 255, 0.08);
        }
        .todo-fab-panel-count {
            margin-left: auto;
            font-size: 0.6875rem;
            font-weight: 600;
            color: #0ea5e9;
            background: rgba(14, 165, 233, 0.1);
            padding: 0.18rem 0.55rem;
            border-radius: 9999px;
            flex-shrink: 0;
        }
        html.dark .todo-fab-panel-count {
            color: #38bdf8;
            background: rgba(14, 165, 233, 0.16);
        }
        .todo-fab-panel-close {
            width: 1.75rem;
            height: 1.75rem;
            border-radius: 9999px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #a8a29e;
            transition: all 0.15s ease;
            flex-shrink: 0;
        }
        .todo-fab-panel-close:hover {
            background: rgba(120, 113, 108, 0.12);
            color: #44403c;
        }
        html.dark .todo-fab-panel-close:hover {
            background: rgba(255, 255, 255, 0.1);
            color: #e7e5e4;
        }
        .todo-fab-panel-body {
            overflow-y: auto;
            padding: 0.6rem;
            flex: 1 1 auto;
            min-height: 0;
        }
        .todo-fab-empty {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 0.4rem;
            padding: 1.6rem 1rem;
            color: #a8a29e;
        }
        .todo-fab-group {
            margin-bottom: 0.5rem;
        }
        .todo-fab-group:last-child {
            margin-bottom: 0;
        }
        .todo-fab-group-head {
            display: flex;
            align-items: center;
            gap: 0.4rem;
            font-size: 0.75rem;
            font-weight: 700;
            color: #57534e;
            padding: 0.35rem 0.5rem 0.3rem;
            border-radius: 0.6rem;
        }
        html.dark .todo-fab-group-head {
            color: #d6d3d1;
        }
        .todo-fab-group-head i {
            color: #0ea5e9;
            font-size: 0.85rem;
            flex-shrink: 0;
        }
        .todo-fab-group-count {
            margin-left: auto;
            font-size: 0.625rem;
            font-weight: 700;
            color: #fff;
            background: rgba(14, 165, 233, 0.75);
            min-width: 1.15rem;
            height: 1.15rem;
            padding: 0 0.28rem;
            border-radius: 9999px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }
        .todo-fab-entry {
            margin: 0.15rem 0.1rem 0.5rem;
            padding: 0.55rem 0.6rem;
            border-radius: 0.9rem;
            background: rgba(14, 165, 233, 0.05);
            border: 1px solid rgba(14, 165, 233, 0.1);
        }
        html.dark .todo-fab-entry {
            background: rgba(14, 165, 233, 0.08);
            border-color: rgba(56, 189, 248, 0.12);
        }
        .todo-fab-entry-meta {
            display: flex;
            align-items: center;
            gap: 0.35rem;
            font-size: 0.6875rem;
            color: #78716c;
            padding: 0 0.25rem 0.35rem;
        }
        html.dark .todo-fab-entry-meta {
            color: #a8a29e;
        }
        .todo-fab-entry-meta i {
            color: #0ea5e9;
            flex-shrink: 0;
        }
        .todo-fab-item {
            width: 100%;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.4rem 0.45rem;
            border-radius: 0.7rem;
            text-align: left;
            transition: background 0.15s ease;
        }
        .todo-fab-item:hover {
            background: rgba(255, 255, 255, 0.7);
        }
        .todo-fab-item:disabled {
            opacity: 0.65;
            cursor: wait;
        }
        html.dark .todo-fab-item:hover {
            background: rgba(255, 255, 255, 0.06);
        }
        .todo-fab-item-check {
            width: 1.15rem;
            height: 1.15rem;
            border-radius: 9999px;
            border: 2px solid #94a3b8;
            display: flex;
            align-items: center;
            justify-content: center;
            color: transparent;
            font-size: 0.65rem;
            flex-shrink: 0;
            transition: all 0.15s ease;
        }
        .todo-fab-item:hover .todo-fab-item-check {
            border-color: #0ea5e9;
        }
        .todo-fab-item-text {
            font-size: 0.8125rem;
            color: #292524;
            line-height: 1.45;
        }
        html.dark .todo-fab-item-text {
            color: #e7e5e4;
        }
        @media (max-width: 768px) {
            .todo-fab-btn {
                width: 3rem;
                height: 3rem;
            }
            .todo-fab-panel {
                width: min(19rem, calc(100vw - 2rem));
            }
        }
