/* 1. 引入本地的喜脉喜欢体 */
@font-face {
    font-family: 'ximai';
    src: url('./ximai.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
/* 2. 引入本地的 Great Vibes — 天数计数器 */
@font-face {
    font-family: 'Great Vibes';
    src: url('./fonts/GreatVibes-Regular.ttf') format('truetype');
    font-display: swap;
}
/* 3. 引入谷歌的英文手写体 Caveat */
@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@500&display=swap');

/* ============================================
   溯星手账 · 星墨美学系统
   ============================================ */

*{margin:0;padding:0;box-sizing:border-box;-webkit-tap-highlight-color:transparent}

:root{
    /* 主色：旧金与深墨 */
    --gold:#c9a961;
    --gold-dim:#8b7340;
    --gold-glow:rgba(201,169,97,0.35);
    --ink:#0a0e1a;
    --ink-deep:#040710;
    --cream:#d4c5a0;
    --cream-dim:#9a8e72;
    --warm-red:#c4534a;
    --warm-red-glow:rgba(196,83,74,0.3);
    /* 玻璃与纸 */
    --page:rgba(12,16,28,0.65);
    --page-border:rgba(201,169,97,0.18);
    --page-border-hover:rgba(201,169,97,0.35);
    --stitch:rgba(201,169,97,0.12);
    /* 文字 */
    --text:#d4c5a0;
    --dim:#7a6f5a;
    --text-faint:rgba(212,197,160,0.5);
    /* 代码与引用 */
    --code-bg:rgba(0,0,0,0.3);
    --code-color:var(--gold);
    --pre-bg:rgba(0,0,0,0.4);
    --pre-border:rgba(201,169,97,0.15);
    --pre-code-color:var(--cream);
    --blockquote-border:var(--gold);
    --blockquote-color:var(--dim);
    --strong-color:var(--gold);
    --table-border:rgba(201,169,97,0.2);
    --th-bg:rgba(201,169,97,0.08);
    --th-color:var(--gold);
    /* 消息元数据 */
    --msg-meta-color:var(--dim);
    --msg-meta-opacity:0.4;
    /* 错误与重试 */
    --retry-btn-bg:rgba(196,83,74,0.1);
    --retry-btn-border:rgba(196,83,74,0.3);
    --retry-btn-color:var(--warm-red);
    /* 版本按钮 */
    --ver-btn-border:rgba(201,169,97,0.25);
    --ver-btn-color:var(--dim);
    --ver-label-color:var(--dim);
    --inline-btn-border:rgba(201,169,97,0.2);
    --inline-btn-color:var(--dim);
    /* 浅色模式覆盖变量（在body.light-mode中重新赋值） */
    --light-code-bg:rgba(0,0,0,0.05);
    --light-code-color:#8B6914;
    --light-pre-bg:rgba(0,0,0,0.03);
    --light-pre-border:rgba(196,165,123,0.2);
    --light-pre-code-color:#5C4033;
    --light-strong-color:#5C4033;
    --light-blockquote-border:#C4A57B;
    --light-blockquote-color:#8B7355;
    --light-th-bg:rgba(196,165,123,0.08);
    --light-th-color:#5C4033;
    --light-table-border:rgba(196,165,123,0.2);
    --light-msg-meta-color:#B5A48C;
    --light-retry-btn-bg:rgba(196,83,74,0.06);
    --light-retry-btn-border:rgba(196,83,74,0.2);
    --light-ver-btn-border:rgba(196,165,123,0.25);
    --light-ver-btn-color:#B5A48C;
    --light-ver-hover-color:#5C4033;
    --light-ver-hover-border:#C4A57B;
    --light-ver-hover-bg:rgba(255,249,230,0.5);
    --light-ver-label-color:#8B7355;
    --light-inline-btn-border:rgba(196,165,123,0.4);
    --light-inline-btn-color:#5C4033;
    --light-inline-btn-bg:rgba(196,165,123,0.08);
}

/* ============ 基底：夜空渐变 + 墨渍纹理 ============ */
body{
    background: linear-gradient(175deg, #0d1225 0%, #070b17 35%, #040710 100%);
    color:var(--text);
    font-family:'Georgia','Noto Serif SC','Songti SC',serif;
    overflow-x:hidden;
    min-height:100vh;
    position:relative;
    letter-spacing:0.3px;
    line-height:1.7;
}

body.light-mode{
    background: linear-gradient(175deg, #FFF9E6 0%, #FFF3D6 35%, #F5EDD6 100%);
    color:#3E2723;
}
body.light-mode::before{
    background:
        radial-gradient(ellipse 600px 400px at 15% 20%, rgba(196,165,123,0.06) 0%, transparent 70%),
        radial-gradient(ellipse 500px 500px at 80% 75%, rgba(180,140,100,0.04) 0%, transparent 70%),
        radial-gradient(ellipse 800px 300px at 50% 50%, rgba(196,165,123,0.03) 0%, transparent 60%);
}
body.light-mode::after{opacity:0!important}

/* 墨渍底纹层 —— 用多重径向渐变模拟宣纸晕开的水墨 */
body::before{
    content:'';
    position:fixed;
    inset:0;
    z-index:0;
    pointer-events:none;
    background:
        radial-gradient(ellipse 600px 400px at 15% 20%, rgba(201,169,97,0.04) 0%, transparent 70%),
        radial-gradient(ellipse 500px 500px at 80% 75%, rgba(196,83,74,0.03) 0%, transparent 70%),
        radial-gradient(ellipse 800px 300px at 50% 50%, rgba(201,169,97,0.02) 0%, transparent 60%);
}

/* 装订线 —— 已移除 */

canvas#starmap{
    position:fixed;
    top:0;left:0;
    width:100%;height:100%;
    z-index:0;
    pointer-events:none;
}

/* ============ 手账页卡片 ============ */
.glass{
    background: var(--page);
    backdrop-filter:blur(18px);
    -webkit-backdrop-filter:blur(18px);
    border:1px solid var(--page-border);
    border-radius:4px 14px 14px 4px; /* 左侧直角=装订边 */
    padding:24px 24px 24px 28px;
    margin:16px auto;
    max-width:520px;
    width:92%;
    position:relative;
    z-index:2;
    box-shadow:
        0 2px 20px rgba(0,0,0,0.4),
        inset 0 1px 0 rgba(201,169,97,0.06);
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

/* 卡片装订边线 —— 已移除 */

.glass:hover{
    border-color: var(--page-border-hover);
    box-shadow:
        0 4px 30px rgba(0,0,0,0.5),
        0 0 40px rgba(201,169,97,0.04),
        inset 0 1px 0 rgba(201,169,97,0.1);
}

/* ============ 底部导航 ============ */
.nav{
    position:fixed;
    bottom:0;left:0;width:100%;
    z-index:100;
    display:flex;
    justify-content:space-around;
    padding:8px 4px 12px;
    background: linear-gradient(to top, rgba(4,7,16,0.97), rgba(4,7,16,0.85));
    backdrop-filter:blur(12px);
    -webkit-backdrop-filter:blur(12px);
    border-top:1px solid rgba(201,169,97,0.1);
}

.nav button{
    background:transparent;
    color:var(--dim);
    border:none;
    font-size:0.65em;
    padding:6px 2px;
    cursor:pointer;
    border-radius:8px;
    transition: color 0.3s, text-shadow 0.3s;
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:3px;
    flex:1;
    font-family:inherit;
}

.nav button.active,
.nav button:hover{
    color:var(--gold);
    text-shadow:0 0 10px var(--gold-glow);
}

.nav button .ico{
    font-size:1.4em;
    transition: transform 0.3s ease;
}

.nav button.active .ico{
    transform: translateY(-2px);
}

/* ============ 区域与动画 ============ */
.section{
    display:none;
    padding:20px 0 100px 0;
    position:relative;
    z-index:2;
    animation: pageIn 0.6s cubic-bezier(0.23,1,0.32,1);
}
.section.active{display:block}

@keyframes pageIn{
    from{opacity:0;transform:translateY(12px) scale(0.99)}
    to{opacity:1;transform:translateY(0) scale(1)}
}

/* ============ 页首标题区 ============ */
.totem{
    text-align:center;
    padding:40px 0 18px 0;
    position:relative;
    z-index:2;
}

.totem .icon{
    font-size:2.2em;
    letter-spacing:10px;
    text-shadow:0 0 20px var(--gold-glow);
}

.totem h1{
    color:var(--gold);
    font-size:1.05em;
    font-weight:normal;
    text-shadow:0 0 12px rgba(201,169,97,0.3);
    margin-top:14px;
    letter-spacing:3px;
}

.totem .sub{
    color:var(--dim);
    font-size:0.78em;
    margin-top:8px;
    font-style:italic;
}

/* ============ 星核轨道（首页） ============ */
.star-core{text-align:center;padding:30px 0}

.star-core .orbit{
    width:150px;height:150px;
    border:1px solid transparent;
    border-radius:50%;
    margin:0 auto;
    position:relative;
    animation:spin 30s linear infinite;
    /* 用 box-shadow 模拟墨渍晕染的轨道 */
    box-shadow:
        0 0 0 1px rgba(201,169,97,0.1),
        0 0 12px 2px rgba(201,169,97,0.04),
        0 0 30px 4px rgba(201,169,97,0.02);
}

@keyframes spin{100%{transform:rotate(360deg)}}

.star-core .planet{
    width:10px;height:10px;
    background: var(--gold);
    border-radius:50%;
    position:absolute;
    top:-5px;left:70px;
    box-shadow:
        0 0 8px var(--gold),
        0 0 20px var(--gold-glow);
}

.star-core .center-star{
    position:absolute;
    top:50%;left:50%;
    transform:translate(-50%,-50%);
    font-size:1.8em;
    text-shadow:0 0 15px var(--warm-red-glow);
    animation:heartbeat 3s ease-in-out infinite;
}

@keyframes heartbeat{
    0%,100%{transform:translate(-50%,-50%) scale(1)}
    14%{transform:translate(-50%,-50%) scale(1.06)}
    28%{transform:translate(-50%,-50%) scale(1)}
    42%{transform:translate(-50%,-50%) scale(1.04)}
}

.star-core .date{
    margin-top:28px;
    font-size:1.15em;
    color:var(--gold);
    letter-spacing:5px;
    font-weight:normal;
}

.star-core .desc{
    color:var(--dim);
    font-size:0.88em;
    margin-top:14px;
    line-height:1.9;
    font-style:italic;
}

.star-core .day-num{
    color:var(--warm-red);
    font-weight:bold;
    font-size:1.25em;
    text-shadow:0 0 10px var(--warm-red-glow);
}

/* ============ 寄语 ============ */
.quote-box{
    text-align:center;
    font-size:1em;
    line-height:1.8;
    min-height:70px;
    padding:18px;
}

.quote-box .q{
    font-style:italic;
    opacity:0;
    transition:opacity 1s ease;
    color:var(--cream);
}

.quote-box .q.show{opacity:1}

.refresh-btn{
    background:transparent;
    border:1px solid var(--page-border);
    color:var(--dim);
    padding:7px 20px;
    border-radius:20px;
    cursor:pointer;
    font-family:inherit;
    font-size:0.78em;
    margin-top:15px;
    transition:0.3s;
    letter-spacing:1px;
}

.refresh-btn:hover{
    border-color:var(--gold);
    color:var(--gold);
    box-shadow:0 0 12px rgba(201,169,97,0.15);
}

/* ============ 心跳区 ============ */
/* ──────── 时光信箱 ──────── */
body.light-mode .mailbox-container {
    background: rgba(255, 249, 230, 0.3) !important;
    border-color: rgba(196, 165, 123, 0.2) !important;
}

body.light-mode .mailbox-container:hover {
    border-color: #C4A57B !important;
    box-shadow: 0 4px 16px rgba(196, 165, 123, 0.12) !important;
}

body.light-mode .mailbox-desc {
    color: #8B7355 !important;
}

/* ──────── 对话索引面板 ──────── */
body.light-mode .chat-index-panel {
    background: rgba(255, 250, 240, 0.96) !important;
    border-left: 1px solid rgba(196, 165, 123, 0.2) !important;
}

body.light-mode .chat-index-header {
    color: #5C4033 !important;
    border-bottom-color: rgba(196, 165, 123, 0.12) !important;
}

body.light-mode .chat-index-item:hover {
    background: rgba(255, 249, 230, 0.5) !important;
    border-left-color: #C4A57B !important;
}

body.light-mode .chat-index-item .idx-time {
    color: #8B7355 !important;
}

body.light-mode .chat-index-item .idx-preview {
    color: #5C4033 !important;
}

body.light-mode .chat-index-item .idx-role-sys {
    color: #C4534A !important;
}

body.light-mode .chat-index-item .idx-role-user {
    color: #8B6914 !important;
}

/* ──────── Toast 通知 ──────── */
body.light-mode .toast {
    background: linear-gradient(135deg, #C4A57B, #B8935A) !important;
    color: #FFFAF0 !important;
    box-shadow: 0 4px 20px rgba(196, 165, 123, 0.35) !important;
}

/* ──────── 滚动条 ──────── */
body.light-mode .chat-window::-webkit-scrollbar-thumb,
body.light-mode .sidebar-list::-webkit-scrollbar-thumb,
body.light-mode .chat-index-list::-webkit-scrollbar-thumb {
    background: rgba(196, 165, 123, 0.2) !important;
}

/* ──────── 寄语区 ──────── */
body.light-mode .quote-box .q {
    color: #5C4033 !important;
}

body.light-mode .quote-gen-btn {
    background: linear-gradient(135deg, rgba(196, 165, 123, 0.12), rgba(196, 165, 123, 0.04)) !important;
    color: #8B7355 !important;
    border-color: rgba(196, 165, 123, 0.25) !important;
}

body.light-mode .quote-gen-btn:hover {
    color: #5C4033 !important;
    border-color: #C4A57B !important;
}

/* ──────── 流式开关等杂项 ──────── */
body.light-mode .model-select {
    background: rgba(255, 255, 255, 0.7) !important;
    color: #5C4033 !important;
}

body.light-mode .capsule-btn {
    border-color: rgba(196, 165, 123, 0.25) !important;
    color: #8B7355 !important;
}

body.light-mode .capsule-btn:hover {
    border-color: #C4A57B !important;
    color: #5C4033 !important;
    background: rgba(255, 249, 230, 0.4) !important;
}

body.light-mode .capsule-result {
    color: #5C4033 !important;
}

body.light-mode .intimacy-grid button {
    background: rgba(255, 249, 230, 0.3) !important;
    border-color: rgba(196, 165, 123, 0.2) !important;
    color: #5C4033 !important;
}

body.light-mode .intimacy-grid button:hover {
    background: rgba(255, 249, 230, 0.6) !important;
    border-color: #C4A57B !important;
}

body.light-mode .intimacy-result {
    color: #8B7355 !important;
}

/* ──────── 图片预览区 ──────── */
body.light-mode #imgPreviewWrap img {
    border: 1px solid rgba(196, 165, 123, 0.3) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
}


/* ============ 沈望的专属留言板 (升级版) ============ */
.sticky-note-container {
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    text-align: center;
    position: relative;
    padding-bottom: 10px;
    transform-origin: bottom center; /* 动画重心设在底部 */
}

.sticky-note-container:hover {
    transform: translateY(-6px) scale(1.02); 
}

.sticky-note-container:hover .note-hint {
    opacity: 1;
    color: var(--warm-red); 
}

.sticky-note {
    background: rgba(201, 169, 97, 0.05);
    border: 1px solid rgba(201, 169, 97, 0.2);
    border-radius: 8px 24px 8px 8px; 
    padding: 24px 28px;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2), inset 0 0 20px rgba(201,169,97,0.02);
    transform: rotate(-1.2deg);
}

.note-pin {
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 45px;
    height: 12px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    backdrop-filter: blur(4px);
}

.note-content {
    color: var(--cream);
    font-size: 1.5em;
    line-height: 1.5;
    letter-spacing: 2px;
    text-shadow: 0 0 2px rgba(201,169,97,0.3);
    font-family: 'ximai', 'Georgia', serif; /* ← 加这一行 */
}

.note-time {
    color: var(--dim);
    font-size: 0.75em;
    margin-top: 15px;
    text-align: right;
    font-family: monospace;
}

.note-hint {
    color: var(--gold);
    font-size: 0.75em;
    margin-top: 16px;
    opacity: 0.5;
    transition: all 0.3s;
    letter-spacing: 2px;
}

/* 💥 折叠掉落的终极动画 */
@keyframes foldAndDrop {
    0% { transform: scale(1) translateY(0) rotate(0deg); opacity: 1; }
    30% { transform: scale(0.9) translateY(-15px) rotate(-5deg); opacity: 0.9; } /* 撕下来的瞬间 */
    100% { transform: scale(0.2) translateY(180px) rotate(15deg); opacity: 0; } /* 缩小掉进抽屉 */
}

.note-animating {
    animation: foldAndDrop 0.7s forwards cubic-bezier(0.5, 0, 0.2, 1);
    pointer-events: none; /* 动画期间禁止再点 */
}

/* ============ 时光信箱抽屉 ============ */
.mailbox-container {
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 25px 20px !important;
}

.mailbox-container:hover {
    transform: translateY(-3px);
    border-color: var(--gold);
    box-shadow: 0 0 20px rgba(201,169,97,0.15);
}

.mailbox-icon {
    font-size: 2.8em;
    margin-bottom: 12px;
    filter: drop-shadow(0 2px 10px rgba(201,169,97,0.3));
    transition: transform 0.3s ease;
}

.mailbox-container:hover .mailbox-icon {
    transform: scale(1.1) translateY(-2px); /* 抽屉微微打开的暗示 */
}

.mailbox-title {
    color: var(--gold);
    font-size: 1.1em;
    letter-spacing: 3px;
    margin-bottom: 6px;
}

.mailbox-desc {
    color: var(--dim);
    font-size: 0.8em;
    font-style: italic;
}

/* ============ 聊天页专属修复 ============ */
body[data-view="chat"] { overflow:hidden!important;position:fixed!important;top:0!important;left:0!important;right:0!important;bottom:0!important;height:100%!important;width:100%!important }
#sec-chat.active { display:flex!important;flex-direction:column!important;height:100%!important;overflow:hidden!important }
#sec-chat.active .chat-bottom-bar { padding-bottom:max(10px,env(safe-area-inset-bottom))!important;margin-bottom:3vh }
#sec-chat.active .chat-main-header { display:block!important;margin-top:-24vh }



/* 手机端输入框高度收紧 */
@media(max-width: 600px) {
    .input-row textarea {
        min-height: 42px !important;
        max-height: 90px !important;
        /* height 交给 JS 自己管，不要写死 */
    }
}

/* ============ 对话索引面板 ============ */
.chat-index-panel {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 220px;
    background: rgba(4, 7, 16, 0.96);
    border-left: 1px solid rgba(201,169,97,0.15);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 50;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.23,1,0.32,1);
}

.chat-index-panel.open {
    transform: translateX(0);
}

.chat-index-header {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(201,169,97,0.1);
    color: var(--gold);
    font-size: 0.8em;
    letter-spacing: 2px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.chat-index-close {
    background: transparent;
    border: none;
    color: var(--dim);
    cursor: pointer;
    font-size: 1.1em;
    padding: 2px 6px;
    border-radius: 4px;
    transition: 0.2s;
}

.chat-index-close:hover {
    color: var(--warm-red);
}

.chat-index-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.chat-index-list::-webkit-scrollbar { width: 2px; }
.chat-index-list::-webkit-scrollbar-thumb {
    background: rgba(201,169,97,0.15);
}

.chat-index-item {
    padding: 10px 14px;
    cursor: pointer;
    border-left: 2px solid transparent;
    transition: 0.2s;
    font-size: 0.78em;
}

.chat-index-item:hover {
    background: rgba(201,169,97,0.06);
    border-left-color: var(--gold);
}

.chat-index-item .idx-time {
    color: var(--dim);
    font-size: 0.85em;
    margin-bottom: 3px;
}

.chat-index-item .idx-preview {
    color: var(--cream);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.5;
}

.chat-index-item .idx-role-sys { color: #e8b4a0; }
.chat-index-item .idx-role-user { color: var(--gold); }

/* 索引按钮 */
.chat-index-btn {
    background: transparent;
    border: 1px solid rgba(201,169,97,0.15);
    color: var(--dim);
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.78em;
    transition: 0.2s;
    font-family: inherit;
    margin-right: 8px;
}

.chat-index-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
}

/* chat-main 需要 position:relative 才能让 panel 定位 */
.chat-main {
    position: relative;
    overflow: hidden; /* 防止 panel 撑破布局 */
}

/* 手机端输入框高度锁死，不允许无限长高 */
@media(max-width: 600px) {
    .input-row textarea {
        min-height: 42px !important;
        max-height: 100px !important; /* 比桌面端更保守 */
        height: 42px !important;
    }
}

/* 手机端：模型栏与输入框贴紧 */
@media(max-width: 600px) {
    .chat-bottom-bar {
        padding: 6px 10px 8px !important;
    }
    .chat-model-row {
        margin-bottom: 4px !important;
    }
    .chat-input-area {
        margin-top: 4px !important;
    }
}

/* ============ 修复：底栏紧贴 + 对话字号缩小 ============ */

/* 1. 底栏整体收紧 */
.chat-bottom-bar {
    padding: 6px 12px 8px !important;
}

.chat-model-row {
    margin-bottom: 4px !important;
}

/* 罪魁祸首：图片预览区在没图时仍占据空白高度 */
#imgPreviewWrap:empty,
#imgPreviewWrap[style*="display: none"] {
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
}

#imgPreviewWrap {
    padding: 4px 0 !important;
    margin: 0 !important;
}

.chat-bottom-bar .input-row {
    margin-top: 0 !important;
    gap: 6px !important;
}

/* 2. 只缩小对话框里的文字 */
.chat-window .msg {
    font-size: 0.82em !important;
    line-height: 1.65 !important;
}

.chat-window .msg .think-header {
    font-size: 0.8em !important;
}

.chat-window .msg .think-content {
    font-size: 0.82em !important;
}

/* ============ 底栏工具菜单 ============ */
.chat-bottom-bar {
    padding: 6px 10px 8px !important;
}

.chat-bottom-bar .chat-model-row {
    margin-bottom: 4px !important;
}

.chat-tool-wrap {
    position: relative;
    flex-shrink: 0;
}

.chat-tool-btn {
    width: 38px;
    height: 38px;
    background: transparent;
    border: 1px solid var(--page-border);
    color: var(--dim);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    font-family: inherit;
    line-height: 1;
}

.chat-tool-btn:hover,
.chat-tool-btn.open {
    color: var(--gold);
    border-color: var(--gold);
    background: rgba(201,169,97,0.06);
}

.chat-tool-btn.open {
    transform: rotate(45deg);
}

/* 向上弹出的菜单 */
.chat-tool-menu {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    min-width: 140px;
    background: rgba(10, 14, 26, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(201,169,97,0.2);
    border-radius: 10px;
    padding: 6px;
    display: none;
    flex-direction: column;
    gap: 2px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.4);
    z-index: 60;
    animation: toolMenuIn 0.2s ease;
}

.chat-tool-menu.show {
    display: flex;
}

@keyframes toolMenuIn {
    from { opacity: 0; transform: translateY(6px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* 菜单三角箭头 */
.chat-tool-menu::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 14px;
    width: 10px;
    height: 10px;
    background: rgba(10, 14, 26, 0.95);
    border-right: 1px solid rgba(201,169,97,0.2);
    border-bottom: 1px solid rgba(201,169,97,0.2);
    transform: rotate(45deg);
}

.chat-tool-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 7px;
    cursor: pointer;
    font-size: 0.82em;
    color: var(--cream);
    transition: background 0.2s;
    white-space: nowrap;
    user-select: none;
}

.chat-tool-item:hover {
    background: rgba(201,169,97,0.08);
}

.chat-tool-item input[type="checkbox"] {
    accent-color: var(--gold);
    width: 14px;
    height: 14px;
    cursor: pointer;
}

/* ============ 白天模式适配 ============ */
body.light-mode .chat-tool-btn {
    border-color: rgba(196,165,123,0.25) !important;
    color: #8B7355 !important;
}

body.light-mode .chat-tool-btn:hover,
body.light-mode .chat-tool-btn.open {
    color: #5C4033 !important;
    border-color: #C4A57B !important;
    background: rgba(255,249,230,0.4) !important;
}

body.light-mode .chat-tool-menu {
    background: rgba(255, 250, 240, 0.97) !important;
    border-color: rgba(196,165,123,0.25) !important;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08) !important;
}

body.light-mode .chat-tool-menu::after {
    background: rgba(255, 250, 240, 0.97) !important;
    border-color: rgba(196,165,123,0.25) !important;
}

body.light-mode .chat-tool-item {
    color: #5C4033 !important;
}

body.light-mode .chat-tool-item:hover {
    background: rgba(255,249,230,0.6) !important;
}

/* ============ 对话框字号缩小 ============ */
.chat-window .msg {
    font-size: 0.82em !important;
    line-height: 1.65 !important;
}

.chat-window .msg .think-header {
    font-size: 0.8em !important;
}

.chat-window .msg .think-content {
    font-size: 0.82em !important;
}

/* ============ 输入栏撑满对齐模型栏 ============ */
.chat-bottom-bar > div:last-child {
    width: 100% !important;
    display: flex !important;
    gap: 6px !important;
    align-items: flex-end !important;
}

.chat-bottom-bar #chatInput {
    flex: 1 !important;
    min-height: 38px !important;
    height: 38px !important;
    max-height: 120px !important;
    padding: 8px 12px !important;
    font-size: 0.9em !important;
    line-height: 1.5 !important;
    border-radius: 8px !important;
    resize: none !important;
    overflow-y: auto !important;
    word-break: break-word !important;
}

.chat-bottom-bar .chat-tool-btn {
    width: 38px !important;
    height: 38px !important;
    flex-shrink: 0 !important;
}

.chat-bottom-bar button[onclick="sendChat()"] {
    height: 38px !important;
    padding: 0 16px !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
}

/* 白天模式：侧边栏纸张层叠感 */
body.light-mode .chat-sidebar {
    border-right: none !important;
    box-shadow: 2px 0 15px rgba(139, 115, 85, 0.05) !important; /* 极淡的暖棕色阴影 */
    background: rgba(255, 255, 255, 0.4) !important;
}

/* ==========================================
   📱 手机端终极 UI：定海神针版 (绝对垂直对齐)
   ========================================== */
@media(max-width: 600px) {
.chat-layout { flex:1;display:flex;flex-direction:column;min-height:0;overflow:hidden }
.chat-main { flex:1;display:flex;flex-direction:column;position:relative;overflow:hidden;min-height:0 }
.chat-window { flex:1;overflow-y:auto;padding:16px;min-height:0;-webkit-overflow-scrolling:touch }
.chat-window::-webkit-scrollbar{width:3px}
.chat-window::-webkit-scrollbar-thumb{background:rgba(201,169,97,0.15);border-radius:3px}
.chat-main-header { flex-shrink:0;display:flex;justify-content:space-between;align-items:center;padding:10px 16px;border-bottom:1px solid rgba(201,169,97,0.08) }
.chat-bottom-bar { flex-shrink:0;border-top:1px solid rgba(201,169,97,0.1);background:rgba(10,14,26,0.85);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px) }
.chat-layout { position: relative; }
    .chat-main .chat-window { padding-top: 20px !important; }

    /* 💥 杀掉所有原生边框、背景、线条和多余文字 */
    .chat-sidebar, .chat-main-header, .sidebar-header, body.light-mode .chat-sidebar, body.dark-gold-mode .chat-sidebar {
        background: transparent !important;
        border: none !important; border-bottom: none !important;
        box-shadow: none !important;
    }
    .chat-win-title {
        display: none !important; opacity: 0 !important;
        width: 0 !important; height: 0 !important;
        overflow: hidden !important; position: absolute !important;
    }

    /* ====== 💥 5个小圆圈的“定海神针”统一规格 ====== */
    #themeToggleBtn, .sidebar-title, .sidebar-new-btn, .chat-index-btn, .chat-rename-btn {
        width: 32px !important; height: 32px !important;
        min-width: 32px !important; min-height: 32px !important;
        max-width: 32px !important; max-height: 32px !important;
        background: rgba(255, 255, 255, 0.7) !important;
        backdrop-filter: blur(10px) !important; -webkit-backdrop-filter: blur(10px) !important;
        border: 1px solid rgba(201,169,97,0.3) !important;
        border-radius: 50% !important;
        box-shadow: 0 4px 15px rgba(139, 115, 85, 0.1) !important;
        display: flex !important; justify-content: center !important; align-items: center !important;
        margin: 0 !important; padding: 0 !important;
        font-size: 0 !important; color: transparent !important; /* 隐藏所有原生文字 */
        flex-shrink: 0 !important; line-height: 1 !important;
        box-sizing: border-box !important;
    }

    /* 注入干净的线稿符号 */
    .sidebar-title::before { content: '☰'; font-size: 14px; color: var(--gold); }
    .sidebar-title::after { display: none !important; }
    .sidebar-new-btn::before { content: '+'; font-size: 18px; color: var(--gold); font-weight: 300; }
    .chat-index-btn::before { content: '◈'; font-size: 13px; color: var(--gold); }
    .chat-rename-btn::before { content: '✎'; font-size: 15px; color: var(--gold); }
    
    /* 月亮按钮是个例外，它需要保留原本自带的字（☾/☼） */
    #themeToggleBtn { font-size: 16px !important; color: #5C4033 !important; }

    /* ==========================================
       🚀 核心：全局固定定位 (Fixed)
       把它们全部剥离原本的容器，直接钉在屏幕玻璃上！
       这样就绝对不可能存在容器偏移导致的对不齐！
       ========================================== */
    
    /* 1. 月亮 (第一个，最顶上) */
    #themeToggleBtn {
        position: fixed !important;
        top: 70px !important;
        right: 12px !important;
        z-index: 105 !important;
    }

    /* 2. 频道栏 (第二个，包含菜单和新建) */
    .chat-sidebar {
        position: fixed !important;
        top: 114px !important; /* 严谨计算：70 + 32(月亮) + 12(间距) = 114 */
        right: 12px !important; left: auto !important;
        width: 32px !important;
        z-index: 100 !important;
        overflow: visible !important; padding: 0 !important;
    }
    .sidebar-header {
        display: flex !important; flex-direction: column !important;
        align-items: center !important; width: 32px !important;
        gap: 12px !important;
    }

    /* 下拉菜单 (向左弹出) */
    .sidebar-list {
        display: none !important;
        position: absolute; top: 0 !important; right: 44px !important; left: auto !important;
        width: 130px !important;
        background: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(15px) !important; -webkit-backdrop-filter: blur(15px) !important;
        border: 1px solid rgba(201,169,97,0.2) !important;
        border-radius: 12px !important;
        box-shadow: 0 6px 20px rgba(0,0,0,0.1);
        flex-direction: column !important; padding: 6px 0 !important;
    }
    .chat-sidebar.menu-open .sidebar-list { display: flex !important; animation: menuFadeIn 0.2s ease; }

    /* 3. 工具栏 (第三个，包含索引和改名) */
    .chat-main-header {
        position: fixed !important;
        top: 202px !important; /* 严谨计算：114 + 32(菜单) + 12(间距) + 32(新建) + 12(间距) = 202 */
        right: 12px !important; left: auto !important;
        width: 32px !important;
        padding: 0 !important; z-index: 99 !important;
        display: flex !important; flex-direction: column !important; align-items: center !important;
    }
    .chat-main-header > div {
        display: flex !important; flex-direction: column !important;
        align-items: center !important; width: 32px !important;
        margin: 0 !important; padding: 0 !important; gap: 12px !important;
    }

    /* ================= 黑夜模式自适应 ================= */
    body:not(.light-mode):not(.neu-mode):not(.dark-gold-mode) #themeToggleBtn,
    body:not(.light-mode):not(.neu-mode):not(.dark-gold-mode) .sidebar-title,
    body:not(.light-mode):not(.neu-mode):not(.dark-gold-mode) .sidebar-new-btn,
    body:not(.light-mode):not(.neu-mode):not(.dark-gold-mode) .chat-index-btn,
    body:not(.light-mode):not(.neu-mode):not(.dark-gold-mode) .chat-rename-btn,
    body:not(.light-mode):not(.neu-mode):not(.dark-gold-mode) .sidebar-list {
        background: rgba(12, 16, 28, 0.8) !important;
        box-shadow: 0 4px 15px rgba(0,0,0,0.4) !important;
        color: var(--gold) !important; /* 黑夜里月亮和符号统一变成金色 */
    }
}

@keyframes menuFadeIn {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}

/* 💥 沈望技能模组检索时的呼吸与旋转动画 */
@keyframes loadingPulse { 0% { opacity: 0.4; } 50% { opacity: 1; } 100% { opacity: 0.4; } }
.loading-dots { animation: loadingPulse 1.5s ease-in-out infinite; letter-spacing: 1px; }
@keyframes spin { 100% { transform: rotate(360deg); } }
.spin-icon { animation: spin 1.2s linear infinite; }

/* ═══ Markdown 渲染样式 ═══ */
.md-content h1, .md-content h2, .md-content h3 { margin: 12px 0 6px; font-size: 1em; color: var(--gold); }
.md-content h1 { font-size: 1.1em; }
.md-content h2 { font-size: 1.05em; }
.md-content p { margin: 4px 0; }
.md-content ul, .md-content ol { padding-left: 20px; margin: 6px 0; }
.md-content li { margin: 2px 0; }
.md-content code { background: rgba(0,0,0,0.3); padding: 1px 5px; border-radius: 3px; font-family: 'Consolas','Monaco',monospace; font-size: 0.88em; color: var(--gold); }
.md-content pre { background: rgba(0,0,0,0.4); border: 1px solid rgba(201,169,97,0.15); border-radius: 8px; padding: 12px; margin: 8px 0; overflow-x: auto; }
.md-content pre code { background: transparent; padding: 0; color: var(--cream); font-size: 0.85em; line-height: 1.5; }
.md-content blockquote { border-left: 2px solid var(--gold); padding-left: 12px; margin: 8px 0; color: var(--dim); font-style: italic; }
.md-content strong { color: var(--gold); }
.md-content a { color: var(--gold); text-decoration: underline; text-decoration-color: rgba(201,169,97,0.3); }
.md-content table { border-collapse: collapse; margin: 8px 0; width: 100%; font-size: 0.9em; }
.md-content th, .md-content td { border: 1px solid rgba(201,169,97,0.2); padding: 6px 10px; text-align: left; }
.md-content th { background: rgba(201,169,97,0.08); color: var(--gold); }

body.light-mode .md-content code { background: var(--light-code-bg); color: var(--light-code-color); }
body.light-mode .md-content pre { background: var(--light-pre-bg); border-color: var(--light-pre-border); }
body.light-mode .md-content pre code { color: var(--light-pre-code-color); }
body.light-mode .md-content strong { color: var(--light-strong-color); }
body.light-mode .md-content blockquote { border-left-color: var(--light-blockquote-border); color: var(--light-blockquote-color); }
body.light-mode .md-content th { background: var(--light-th-bg); color: var(--light-th-color); }
body.light-mode .md-content th, body.light-mode .md-content td { border-color: var(--light-table-border); }

/* ═══ 消息元信息（时间戳） ═══ */
.msg-meta { font-size: 0.68em; color: var(--dim); opacity: 0.5; margin-top: 8px; text-align: right; font-family: monospace; transition: opacity 0.2s; }
.msg:hover .msg-meta { opacity: 0.8; }
body.light-mode .msg-meta { color: var(--light-msg-meta-color); }

/* ═══ 加载与错误状态 ═══ */
.loading-indicator { color: var(--dim); font-style: italic; font-size: 0.85em; animation: loadingPulse 1.5s ease-in-out infinite; }
.msg-error { text-align: center; }
.msg-error-detail { font-size: 0.75em; color: var(--dim); margin: 4px 0 10px; }
.msg-retry-btn { padding: 6px 18px; background: rgba(196,83,74,0.1); border: 1px solid rgba(196,83,74,0.3); color: var(--warm-red); border-radius: 20px; cursor: pointer; font-family: inherit; font-size: 0.82em; transition: 0.2s; }
.msg-retry-btn:hover { background: rgba(196,83,74,0.2); border-color: var(--warm-red); }
body.light-mode .msg-retry-btn { background: var(--light-retry-btn-bg); border-color: var(--light-retry-btn-border); }

/* ═══ 气泡底部操作栏 + 翻页导航 ═══ */
.msg-actions { display: flex; align-items: center; gap: 6px; margin-top: 6px; min-height: 24px; opacity: 0.7; transition: opacity 0.2s; }
.msg:hover .msg-actions { opacity: 1; }
.version-nav { display: flex; align-items: center; gap: 4px; }
.ver-btn { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--ver-btn-border); background: transparent; color: var(--ver-btn-color); cursor: pointer; font-size: 0.9em; display: flex; align-items: center; justify-content: center; transition: 0.2s; padding: 0; line-height: 1; }
.ver-btn:hover:not(:disabled) { color: var(--gold); border-color: var(--gold); background: rgba(201,169,97,0.08); }
.ver-btn:disabled { opacity: 0.25; cursor: default; }
.ver-label { font-size: 0.7em; color: var(--ver-label-color); font-family: monospace; min-width: 28px; text-align: center; }
.msg-inline-btn { width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(201,169,97,0.35); background: rgba(201,169,97,0.06); color: var(--gold); cursor: pointer; font-size: 0.85em; display: flex; align-items: center; justify-content: center; transition: 0.2s; padding: 0; }
.msg-inline-btn:hover { color: #fff; border-color: var(--gold); background: rgba(201,169,97,0.2); }

body.light-mode .ver-btn { border-color: var(--light-ver-btn-border); color: var(--light-ver-btn-color); }
body.light-mode .ver-btn:hover:not(:disabled) { color: var(--light-ver-hover-color); border-color: var(--light-ver-hover-border); background: var(--light-ver-hover-bg); }
body.light-mode .ver-label { color: var(--light-ver-label-color); }
body.light-mode .msg-inline-btn { border-color: var(--light-inline-btn-border); color: var(--light-inline-btn-color); background: var(--light-inline-btn-bg); }
body.light-mode .msg-inline-btn:hover { color: #fff; border-color: #5C4033; background: rgba(196,165,123,0.25); }

/* ═══ 共鸣核心 ═══ */
.resonance-core { position: absolute; bottom: 60px; left: 50%; transform: translateX(-50%); width: 36px; height: 36px; border-radius: 50%; pointer-events: none; z-index: 10; opacity: 0.6; }
.core-pulse { width: 100%; height: 100%; border-radius: 50%; background: radial-gradient(circle, rgba(196,83,74,0.4) 0%, transparent 70%); animation: coreIdle 4s ease-in-out infinite; }
@keyframes coreIdle { 0%,100% { background: radial-gradient(circle, rgba(196,83,74,0.4) 0%, transparent 70%); transform: scale(1); } 50% { background: radial-gradient(circle, rgba(201,169,97,0.3) 0%, transparent 70%); transform: scale(1.08); } }
.resonance-core.syzygy-typing .core-pulse { animation: coreSyzygy 1.2s ease-in-out infinite; }
@keyframes coreSyzygy { 0%,100% { transform: scale(1); opacity: 0.5; } 50% { transform: scale(1.15); opacity: 0.85; } }
.resonance-core.user-typing .core-pulse { animation: coreUser 1s ease-in-out infinite; background: radial-gradient(circle, rgba(201,169,97,0.5) 0%, transparent 70%) !important; }
@keyframes coreUser { 0%,100% { transform: scale(1); opacity: 0.4; } 50% { transform: scale(1.12); opacity: 0.75; } }

/* ═══ 钢笔图标 ═══ */
/* ═══ 私语区手记 ═══ */
.diary-entry.jiangyu { border-left: 2px solid var(--gold); background: rgba(201,169,97,0.04); }
.diary-entry.syzygy { border-left: 2px solid var(--warm-red); background: rgba(196,83,74,0.04); font-family: 'ximai', cursive; }

/* ═══ 首页卡片导航 ═══ */
.home-header{text-align:center;padding:60px 20px 20px}
.home-icon{font-size:1.5rem;letter-spacing:8px;margin-bottom:12px}
.home-title{font-size:1.3rem;font-weight:300;color:rgba(255,255,255,0.9);letter-spacing:3px}
.home-sub{font-size:.75rem;color:rgba(201,169,97,0.5);margin-top:6px;letter-spacing:1px}
.home-days{font-family:'Great Vibes',cursive;font-size:.95rem;margin-top:20px;color:rgba(255,255,255,0.6)}
.home-days span{color:rgba(201,169,97,0.9);font-size:1.3rem;font-family:'Great Vibes',cursive;letter-spacing:1px}
.home-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:30px 20px 20px;max-width:400px;margin:0 auto}
.home-card{background:rgba(42,42,42,0.5);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid rgba(201,169,97,0.12);border-radius:16px;padding:24px 16px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;cursor:pointer;transition:all .2s ease;position:relative;overflow:hidden;min-height:120px}
.home-card::before{content:'';position:absolute;top:0;left:0;right:0;height:3px;background:var(--card-accent,rgba(201,169,97,0.5));opacity:.8}
.home-card:active{transform:scale(.96);background:rgba(42,42,42,0.7)}
.home-card-icon{margin-bottom:10px;opacity:.9}
.home-card-name{font-size:.95rem;color:rgba(255,255,255,0.9);font-weight:500;margin-bottom:4px}
.home-card-desc{font-size:.72rem;color:rgba(255,255,255,0.35)}
.home-footer{text-align:center;padding:30px 20px;font-size:.7rem;color:rgba(255,255,255,0.15);letter-spacing:2px}

/* ═══ 子视图顶栏 ═══ */
.view-topbar{position:sticky;top:0;z-index:100;display:flex;align-items:center;gap:12px;padding:12px 16px;background:rgba(13,18,37,0.85);backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);border-bottom:1px solid rgba(201,169,97,0.1)}
.view-back{width:36px;height:36px;border-radius:10px;border:1px solid rgba(201,169,97,0.2);background:rgba(255,255,255,0.05);color:rgba(201,169,97,0.8);cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:1.1rem;transition:opacity .15s}
.view-back:active{opacity:.6}
.view-title{font-size:1rem;font-weight:500;color:rgba(255,255,255,0.85)}

.nav{display:none!important}
body{padding-bottom:0!important}
.section{padding-bottom:20px}

body.light-mode .home-card{background:rgba(255,255,255,0.6);border-color:rgba(201,169,97,0.2)}
body.light-mode .home-card-name{color:rgba(0,0,0,0.8)}
body.light-mode .home-card-desc{color:rgba(0,0,0,0.4)}
body.light-mode .home-title{color:rgba(0,0,0,0.85)}
body.light-mode .home-days{color:rgba(0,0,0,0.5)}
body.light-mode .view-topbar{background:rgba(255,255,255,0.85);border-bottom-color:rgba(201,169,97,0.15)}
body.light-mode .view-back{background:rgba(0,0,0,0.05);color:rgba(201,169,97,0.9)}
body.light-mode .view-title{color:rgba(0,0,0,0.8)}

/* ═══ 聊天区核心布局（全尺寸通用） ═══ */
#sec-chat .view-topbar { flex-shrink:0;padding-top:0!important }
.chat-layout { flex:1;display:flex;flex-direction:column;min-height:0;overflow:hidden }
.chat-main { flex:1;display:flex;flex-direction:column;position:relative;overflow:hidden;min-height:0 }
.chat-main-header { flex-shrink:0;display:flex;justify-content:space-between;align-items:center;padding:10px 16px;border-bottom:1px solid rgba(201,169,97,0.08);background:rgba(10,14,26,0.5) }
.chat-window { flex:1;overflow-y:auto;padding:16px;min-height:0;-webkit-overflow-scrolling:touch }
.chat-window::-webkit-scrollbar { width:3px }
.chat-window::-webkit-scrollbar-thumb { background:rgba(201,169,97,0.15);border-radius:3px }
.chat-bottom-bar { flex-shrink:0;padding:8px 12px 10px!important;border-top:1px solid rgba(201,169,97,0.1);background:rgba(10,14,26,0.85);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px) }

/* ═══ 桌面端首页优化 ═══ */
@media(min-width:768px){
.home-header{padding-top:100px}
.home-title{font-size:1.6rem;letter-spacing:5px}
.home-icon{font-size:2rem;letter-spacing:12px}
.home-days{font-size:1rem;margin-top:28px}
.home-days span{font-size:1.4rem}
.home-grid{max-width:480px;gap:16px;padding:40px 20px 20px}
.home-card{min-height:140px;padding:28px 20px;border-radius:18px;transition:all .25s ease}
.home-card:hover{transform:translateY(-4px);border-color:var(--card-accent,rgba(201,169,97,0.4));box-shadow:0 8px 30px rgba(0,0,0,0.3)}
.home-card-name{font-size:1.05rem}
.home-card-desc{font-size:.78rem}
.home-footer{padding-top:50px}
.chat-window,.chat-bottom-bar,.chat-main-header{max-width:800px;margin:0 auto;width:100%}
}
@media(min-width:1200px){
.home-header{padding-top:12vh}
.home-grid{max-width:520px;gap:18px}
.home-card{min-height:150px}
}

/* ═══ 白天模式聊天区 ═══ */
body.light-mode .msg.user{background:rgba(196,165,123,0.12);border-color:rgba(196,165,123,0.25);color:#5C4033}
body.light-mode .msg.sys{background:rgba(255,255,255,0.5);border-color:rgba(196,165,123,0.12);color:#3E2723}
body.light-mode #chatInput{background:rgba(255,255,255,0.6);border-color:rgba(196,165,123,0.25);color:#3E2723}
body.light-mode #chatInput::placeholder{color:#8B7355}
body.light-mode .chat-bottom-bar{background:rgba(255,250,240,0.85)!important;border-top-color:rgba(196,165,123,0.15)!important}
body.light-mode .chat-main-header{background:rgba(255,250,240,0.5)!important;border-bottom-color:rgba(196,165,123,0.1)!important}
body.light-mode .chat-bottom-bar button[onclick="sendChat()"]{background:rgba(196,165,123,0.12);border-color:rgba(196,165,123,0.3);color:#8B6914}
/* ═══════════════════════════════════════
   溯星小屋 v2.0 · 星墨手账风聊天室
   ═══════════════════════════════════════ */

/* ── 顶栏增强 ── */
.view-topbar{position:sticky;top:0;z-index:100;display:flex;align-items:center;gap:12px;padding:14px 20px;background:linear-gradient(180deg,rgba(10,14,26,0.95) 0%,rgba(10,14,26,0.85) 100%);backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);border-bottom:1px solid rgba(201,169,97,0.12);box-shadow:0 2px 20px rgba(0,0,0,0.3)}
.view-back{width:36px;height:36px;border-radius:10px;border:1px solid rgba(201,169,97,0.2);background:rgba(201,169,97,0.06);color:var(--gold);cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:1.1rem;transition:all .2s}
.view-back:hover{background:rgba(201,169,97,0.12);border-color:rgba(201,169,97,0.4);box-shadow:0 0 12px rgba(201,169,97,0.1)}
.view-title{font-size:1rem;font-weight:500;color:rgba(255,255,255,0.85);letter-spacing:2px}

/* ── 频道标题栏 ── */
.chat-main-header{flex-shrink:0;display:flex;justify-content:space-between;align-items:center;padding:10px 20px;background:rgba(201,169,97,0.03);border-bottom:1px solid rgba(201,169,97,0.08)}
.chat-win-title{font-size:.88em;color:var(--gold);letter-spacing:2px;font-weight:normal;opacity:.7}

/* ── 消息气泡 ── */
.msg-row{display:flex;margin-bottom:6px;padding:0 20px;gap:8px;align-items:flex-end}
.msg-row.user{justify-content:flex-end}
.msg-row.sys{justify-content:flex-start}
.msg{max-width:75%;padding:12px 16px;position:relative;word-break:break-word;line-height:1.7;transition:box-shadow .3s ease}
.msg.user{background:linear-gradient(135deg,rgba(201,169,97,0.1) 0%,rgba(201,169,97,0.06) 100%);border:1px solid rgba(201,169,97,0.2);border-radius:16px 16px 4px 16px;color:var(--cream);box-shadow:0 2px 12px rgba(201,169,97,0.06)}
.msg.user:hover{box-shadow:0 4px 20px rgba(201,169,97,0.1);border-color:rgba(201,169,97,0.3)}
.msg.sys{max-width:94%;background:linear-gradient(135deg,rgba(255,255,255,0.04) 0%,rgba(255,255,255,0.02) 100%);border:1px solid rgba(255,255,255,0.06);border-left:2px solid rgba(201,169,97,0.25);border-radius:4px 16px 16px 16px;color:var(--text);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);box-shadow:0 2px 12px rgba(0,0,0,0.15);padding:12px 20px 12px 16px}
.msg.sys:hover{border-color:rgba(255,255,255,0.1);border-left-color:rgba(201,169,97,0.4);box-shadow:0 4px 20px rgba(0,0,0,0.2)}
.msg img:not(.msg-inline-icon){border-radius:8px;max-width:100%;margin:4px 0;box-shadow:0 2px 10px rgba(0,0,0,0.3)}
.msg-action-btn{background:transparent;border:none;color:var(--dim);cursor:pointer;font-size:1.1em;padding:4px 2px;opacity:0;transition:all .2s;align-self:flex-start;margin-top:10px;flex-shrink:0}
.msg-row:hover .msg-action-btn{opacity:.4}
.msg-action-btn:hover{opacity:1!important;color:var(--gold);text-shadow:0 0 8px rgba(201,169,97,0.3)}

/* 加载线与光标 */
.msg-loading{position:relative}
.msg-loading::after{content:'';position:absolute;bottom:0;left:0;right:0;height:1px;background:linear-gradient(90deg,transparent,var(--gold),transparent);animation:loadingLine 2s ease-in-out infinite}
@keyframes loadingLine{0%,100%{opacity:.2;transform:scaleX(.3)}50%{opacity:.6;transform:scaleX(1)}}
.typing-cursor{display:inline-block;width:2px;height:1em;background:var(--gold);margin-left:2px;animation:cursorBlink .8s ease-in-out infinite;vertical-align:text-bottom}
@keyframes cursorBlink{0%,100%{opacity:1}50%{opacity:0}}

/* ── 底部输入栏 ── */
.chat-bottom-bar{flex-shrink:0;padding:10px 16px 12px!important;border-top:1px solid rgba(201,169,97,0.1);background:linear-gradient(180deg,rgba(10,14,26,0.8) 0%,rgba(10,14,26,0.95) 100%);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);box-shadow:0 -4px 20px rgba(0,0,0,0.2)}
.chat-model-row{margin-bottom:6px!important}
.model-select{background:rgba(201,169,97,0.06);border:1px solid rgba(201,169,97,0.12);color:var(--dim);border-radius:6px;padding:5px 10px;font-family:'Consolas','Monaco',monospace;font-size:.72em;cursor:pointer;outline:none;transition:all .2s;flex:1;letter-spacing:.5px}
.model-select:hover,.model-select:focus{border-color:rgba(201,169,97,0.3);color:var(--cream)}
.model-select option{background:#0a0e1a;color:var(--cream)}
.chat-bottom-bar>div:last-child{width:100%!important;display:flex!important;gap:8px!important;align-items:flex-end!important}
#chatInput{flex:1!important;min-height:40px!important;height:40px!important;max-height:120px!important;padding:9px 14px!important;font-size:.9em!important;line-height:1.5!important;border-radius:12px!important;resize:none!important;overflow-y:auto!important;word-break:break-word!important;background:rgba(255,255,255,0.04);border:1px solid rgba(201,169,97,0.15);color:var(--cream);font-family:inherit;outline:none;transition:border-color .3s,box-shadow .3s,background .3s}
#chatInput:focus{border-color:rgba(201,169,97,0.4);background:rgba(255,255,255,0.06);box-shadow:0 0 0 3px rgba(201,169,97,0.06),0 0 16px rgba(201,169,97,0.05)}
#chatInput::placeholder{color:var(--dim);font-style:italic;letter-spacing:1px}
.chat-tool-btn{width:40px!important;height:40px!important;flex-shrink:0!important;background:rgba(201,169,97,0.05)!important;border:1px solid rgba(201,169,97,0.15)!important;color:var(--dim)!important;border-radius:10px!important;cursor:pointer;font-size:1.2em;display:flex;align-items:center;justify-content:center;transition:all .25s ease}
.chat-tool-btn:hover,.chat-tool-btn.open{color:var(--gold)!important;border-color:rgba(201,169,97,0.35)!important;background:rgba(201,169,97,0.1)!important;box-shadow:0 0 12px rgba(201,169,97,0.08)}
.chat-send-btn{height:40px!important;padding:0 20px!important;flex-shrink:0!important;white-space:nowrap!important;background:linear-gradient(135deg,rgba(201,169,97,0.2) 0%,rgba(201,169,97,0.1) 100%)!important;border:1px solid rgba(201,169,97,0.35)!important;color:var(--gold)!important;border-radius:12px!important;cursor:pointer;font-family:inherit;font-size:.85em;letter-spacing:2px;transition:all .25s ease;position:relative;overflow:hidden}
.chat-send-btn:hover{background:linear-gradient(135deg,rgba(201,169,97,0.3) 0%,rgba(201,169,97,0.15) 100%)!important;border-color:var(--gold)!important;box-shadow:0 0 20px rgba(201,169,97,0.15),0 0 40px rgba(201,169,97,0.05);color:#fff!important;text-shadow:0 0 10px rgba(201,169,97,0.5)}

/* ── 思考框 ── */
.think-box{background:linear-gradient(135deg,rgba(0,0,0,0.25) 0%,rgba(0,0,0,0.15) 100%);border:1px solid rgba(201,169,97,0.08);border-left:2px solid rgba(124,77,255,0.3);border-radius:8px;margin-bottom:10px;overflow:hidden}
.think-header{padding:8px 12px;cursor:pointer;font-size:.78em;color:rgba(124,77,255,0.7);user-select:none;transition:color .2s;letter-spacing:1px}
.think-header:hover{color:rgba(124,77,255,0.9)}
.think-content{padding:10px 12px;font-size:.8em;color:var(--dim);line-height:1.7;border-top:1px solid rgba(124,77,255,0.08);max-height:300px;overflow-y:auto}

/* ── Toast ── */
.toast{position:fixed;top:-60px;left:50%;transform:translateX(-50%);background:linear-gradient(135deg,rgba(10,14,26,0.95),rgba(20,25,45,0.95));border:1px solid rgba(201,169,97,0.25);color:var(--cream);padding:10px 24px;border-radius:12px;font-size:.82em;z-index:10000;transition:top .4s cubic-bezier(.23,1,.32,1);backdrop-filter:blur(12px);box-shadow:0 4px 30px rgba(0,0,0,0.4),0 0 15px rgba(201,169,97,0.08);letter-spacing:1px;white-space:nowrap}
.toast.show{top:30px}

/* ── 索引按钮 ── */
.chat-index-btn{background:rgba(201,169,97,0.05);border:1px solid rgba(201,169,97,0.15);color:var(--dim);padding:5px 12px;border-radius:8px;cursor:pointer;font-size:.78em;transition:all .2s;font-family:inherit;letter-spacing:1px}
.chat-index-btn:hover{border-color:rgba(201,169,97,0.35);color:var(--gold);background:rgba(201,169,97,0.08)}

/* ── 聊天窗纹理 ── */
.chat-window{flex:1;overflow-y:auto;padding:16px 0;min-height:0;-webkit-overflow-scrolling:touch;background:radial-gradient(ellipse 500px 300px at 20% 80%,rgba(201,169,97,0.015) 0%,transparent 70%),radial-gradient(ellipse 400px 250px at 80% 20%,rgba(196,83,74,0.01) 0%,transparent 70%)}
.chat-window::-webkit-scrollbar{width:3px}
.chat-window::-webkit-scrollbar-track{background:transparent}
.chat-window::-webkit-scrollbar-thumb{background:rgba(201,169,97,0.12);border-radius:3px}
.chat-window::-webkit-scrollbar-thumb:hover{background:rgba(201,169,97,0.25)}

/* ── 桌面端 ── */
@media(min-width:768px){
.msg-row{max-width:780px;margin-left:auto;margin-right:auto}
.chat-main-header{max-width:820px;margin-left:auto;margin-right:auto;padding:10px 20px}
.msg{max-width:65%}
.home-header{padding-top:100px}
.home-title{font-size:1.6rem;letter-spacing:5px}
.home-icon{font-size:2rem;letter-spacing:12px}
.home-grid{max-width:480px;gap:16px;padding:40px 20px 20px}
.home-card{min-height:140px;padding:28px 20px;transition:all .3s ease}
.home-card:hover{transform:translateY(-4px);border-color:var(--card-accent,rgba(201,169,97,0.4));box-shadow:0 8px 30px rgba(0,0,0,0.3)}
}

/* ═══ 白天模式：聊天区 ═══ */
body.light-mode .view-topbar{background:linear-gradient(180deg,rgba(255,250,240,0.95) 0%,rgba(255,250,240,0.85) 100%);border-bottom-color:rgba(196,165,123,0.15);box-shadow:0 2px 20px rgba(139,115,85,0.08)}
body.light-mode .view-back{background:rgba(196,165,123,0.08);border-color:rgba(196,165,123,0.2);color:var(--gold)}
body.light-mode .view-title{color:rgba(0,0,0,0.8)}
body.light-mode .chat-main-header{background:rgba(255,249,230,0.4)!important;border-bottom-color:rgba(196,165,123,0.1)!important}
body.light-mode .chat-win-title{color:#8B6914}
body.light-mode .msg.user{background:linear-gradient(135deg,rgba(196,165,123,0.12) 0%,rgba(196,165,123,0.06) 100%);border-color:rgba(196,165,123,0.25);color:#5C4033;box-shadow:0 2px 12px rgba(196,165,123,0.08)}
body.light-mode .msg.sys{background:linear-gradient(135deg,rgba(255,255,255,0.6) 0%,rgba(255,255,255,0.4) 100%);border-color:rgba(196,165,123,0.12);border-left-color:rgba(196,165,123,0.35);color:#3E2723;box-shadow:0 2px 12px rgba(0,0,0,0.04)}
body.light-mode .chat-bottom-bar{background:linear-gradient(180deg,rgba(255,250,240,0.85) 0%,rgba(255,250,240,0.95) 100%)!important;border-top-color:rgba(196,165,123,0.15)!important;box-shadow:0 -4px 20px rgba(139,115,85,0.06)!important}
body.light-mode #chatInput{background:rgba(255,255,255,0.6);border-color:rgba(196,165,123,0.2);color:#3E2723}
body.light-mode #chatInput:focus{border-color:rgba(196,165,123,0.5);background:rgba(255,255,255,0.8);box-shadow:0 0 0 3px rgba(196,165,123,0.08),0 0 16px rgba(196,165,123,0.06)}
body.light-mode #chatInput::placeholder{color:#8B7355}
body.light-mode .chat-send-btn{background:linear-gradient(135deg,rgba(196,165,123,0.15) 0%,rgba(196,165,123,0.08) 100%)!important;border-color:rgba(196,165,123,0.35)!important;color:#8B6914!important}
body.light-mode .chat-send-btn:hover{background:linear-gradient(135deg,rgba(196,165,123,0.25) 0%,rgba(196,165,123,0.12) 100%)!important;border-color:#C4A57B!important;color:#5C4033!important;box-shadow:0 0 20px rgba(196,165,123,0.12)}
body.light-mode .chat-tool-btn{background:rgba(196,165,123,0.06)!important;border-color:rgba(196,165,123,0.2)!important;color:#8B7355!important}
body.light-mode .chat-tool-btn:hover,body.light-mode .chat-tool-btn.open{background:rgba(196,165,123,0.12)!important;border-color:#C4A57B!important;color:#5C4033!important}
body.light-mode .model-select{background:rgba(255,255,255,0.5)!important;border-color:rgba(196,165,123,0.2)!important;color:#5C4033!important}
body.light-mode .chat-window{background:radial-gradient(ellipse 500px 300px at 20% 80%,rgba(196,165,123,0.03) 0%,transparent 70%),radial-gradient(ellipse 400px 250px at 80% 20%,rgba(255,200,150,0.02) 0%,transparent 70%)}
body.light-mode .toast{background:linear-gradient(135deg,rgba(255,250,240,0.95),rgba(245,240,225,0.95))!important;border:1px solid rgba(196,165,123,0.25)!important;color:#5C4033!important;box-shadow:0 4px 30px rgba(139,115,85,0.12)!important}
body.light-mode .think-box{background:rgba(124,77,255,0.03);border-color:rgba(124,77,255,0.08)}
body.light-mode .msg-action-btn:hover{color:#8B6914!important}
body.light-mode .chat-index-btn{background:rgba(196,165,123,0.06);border-color:rgba(196,165,123,0.2);color:#8B7355}
body.light-mode .chat-index-btn:hover{border-color:#C4A57B;color:#5C4033;background:rgba(196,165,123,0.1)}

/* ═══ 中枢输入框美化 ═══ */
#sec-data input[type="text"]{padding:10px 14px;border-radius:8px;border:1px solid rgba(201,169,97,0.15);background:rgba(0,0,0,0.2);color:var(--cream);font-family:inherit;font-size:.88em;outline:none;transition:border-color .2s,box-shadow .2s;letter-spacing:.5px}
#sec-data input[type="text"]:focus{border-color:rgba(201,169,97,0.4);box-shadow:0 0 0 2px rgba(201,169,97,0.06)}
#sec-data input[type="text"]::placeholder{color:var(--dim);font-style:italic}
#sec-data button{font-family:inherit;cursor:pointer;transition:all .2s;letter-spacing:1px}
#sec-data button:hover{transform:translateY(-1px);box-shadow:0 4px 12px rgba(0,0,0,0.2)}
#supplierList>div{background:rgba(201,169,97,0.04);border:1px solid rgba(201,169,97,0.1);border-radius:8px;padding:10px 14px;transition:border-color .2s}
#supplierList>div:hover{border-color:rgba(201,169,97,0.25)}
body.light-mode #sec-data input[type="text"]{background:rgba(255,255,255,0.5);border-color:rgba(196,165,123,0.2);color:#3E2723}
body.light-mode #sec-data input[type="text"]:focus{border-color:rgba(196,165,123,0.5);background:rgba(255,255,255,0.7)}

/* ═══ 顶栏/底栏安全区适配 ═══ */
.view-topbar{padding-top:max(14px,env(safe-area-inset-top,14px))}
.chat-bottom-bar{padding-bottom:max(12px,env(safe-area-inset-bottom,12px))!important}

/* ═══ 聊天文字缩小、气泡加宽 ═══ */
.chat-window .msg{font-size:.78em!important;line-height:1.7!important}
.msg{max-width:92%}

body.light-mode #sec-chat.active { background:#FFFAF0!important }

/* ═══ 顶栏工具按钮 ═══ */
.chat-rename-topbar-btn,.chat-index-topbar-btn,.chat-theme-topbar-btn{width:30px;height:30px;border-radius:8px;border:1px solid rgba(201,169,97,0.15);background:rgba(201,169,97,0.05);color:var(--dim);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s;flex-shrink:0}
.chat-rename-topbar-btn{font-size:.9em}
.chat-index-topbar-btn{font-size:.85em}
.chat-theme-topbar-btn{font-size:.95em}
.chat-rename-topbar-btn:hover,.chat-index-topbar-btn:hover,.chat-theme-topbar-btn:hover{border-color:rgba(201,169,97,0.35);color:var(--gold);background:rgba(201,169,97,0.1)}
body.light-mode .chat-rename-topbar-btn,body.light-mode .chat-index-topbar-btn,body.light-mode .chat-theme-topbar-btn{border-color:rgba(196,165,123,0.2);color:#8B7355;background:rgba(196,165,123,0.06)}
body.light-mode .chat-rename-topbar-btn:hover,body.light-mode .chat-index-topbar-btn:hover,body.light-mode .chat-theme-topbar-btn:hover{border-color:#C4A57B;color:#5C4033}
@media(min-width:601px){.chat-rename-topbar-btn,.chat-index-topbar-btn,.chat-theme-topbar-btn{display:none}}

/* 手机端聊天页隐藏全局月亮按钮和频道标题栏（桌面端也隐藏，已合并到顶栏） */
.chat-main-header{display:none!important}
@media(max-width:600px){
body[data-view="chat"] #themeToggleBtn{display:none!important}
}

/* 桌面端气泡宽度 */
@media(min-width:768px){.msg{max-width:80%}}

/* ═══ 隐藏 Syzygy Line 连线 ═══ */
#syzygy-line-svg{display:none!important}

/* ═══ 工具调用框 ═══ */
.tool-call-box {
  margin: 6px 0 6px 12px;
  border-left: 2px solid #4fc3f7;
  border-radius: 0 6px 6px 0;
  background: rgba(79,195,247,0.06);
  font-size: 0.82em;
}
.tool-call-header {
  padding: 6px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #4fc3f7;
  user-select: none;
}
.tool-call-header:hover { background: rgba(79,195,247,0.1); }
.tool-call-header.tool-collapsed .tool-call-icon { transform: rotate(-90deg); }
.tool-call-icon { transition: transform 0.15s; display: inline-block; }
.tool-call-args { color: #888; font-size: 0.85em; max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tool-call-elapsed { color: #666; font-size: 0.8em; margin-left: auto; }
.tool-call-result { padding: 6px 10px 10px; }
.tool-call-result pre {
  margin: 0;
  padding: 8px;
  background: rgba(0,0,0,0.2);
  border-radius: 4px;
  color: #bbb;
  font-size: 0.85em;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 300px;
  overflow-y: auto;
  line-height: 1.4;
}


/* ⭐ 收藏 */
.fav-star { font-size: 1em; transition: all 0.2s; }
.fav-star.faved { color: #FFD700; background: rgba(255,215,0,0.12); border-color: rgba(255,215,0,0.5); text-shadow: 0 0 6px rgba(255,215,0,0.4); }
.msg:hover .fav-star { opacity: 1; }


.fav-card:hover { border-color: rgba(201,169,97,0.35) !important; background: rgba(201,169,97,0.03) !important; }

/* ═══════════════════════════════════════
   溯星小屋 v3.0 · 新拟态白天模式 (Neu Day)
   ═══════════════════════════════════════ */

body.neu-mode {
    background: #E8EFF7;
    color: #2D3748;
    font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    letter-spacing: 0;
    line-height: 1.6;
}
body.neu-mode::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(ellipse at 15% 85%, rgba(255, 200, 120, 0.06), transparent 60%);
}
body.neu-mode::after { opacity: 0 !important; }

/* ── 新拟态阴影卡片 ── */
body.neu-mode .home-card,
body.neu-mode .neu-card {
    background: #E8EFF7;
    box-shadow: 8px 8px 16px rgba(163, 177, 198, 0.6), -8px -8px 16px rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    border: none;
    transition: all 0.2s ease;
}
body.neu-mode .home-card:hover {
    box-shadow: 6px 6px 12px rgba(163, 177, 198, 0.5), -6px -6px 12px rgba(255, 255, 255, 0.7);
    transform: translateY(-1px);
}
body.neu-mode .home-card:active {
    box-shadow: inset 3px 3px 6px rgba(163, 177, 198, 0.5), inset -3px -3px 6px rgba(255, 255, 255, 0.7);
    transform: translateY(0);
}
body.neu-mode .home-card-name { color: #2D3748; font-size: 1.05rem; font-weight: 600; }
body.neu-mode .home-card-desc { color: #718096; font-size: 0.78rem; }
body.neu-mode .home-title { color: #2D3748; font-weight: 700; }
body.neu-mode .home-days { color: #718096; }
body.neu-mode .home-days span { color: #D4A856; }

/* ── 顶栏 ── */
body.neu-mode .view-topbar {
    background: rgba(232, 239, 247, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(163, 177, 198, 0.3);
    box-shadow: 0 2px 12px rgba(163, 177, 198, 0.15);
}
body.neu-mode .view-back { background: #E8EFF7; color: #5A8FCA; border: none; box-shadow: 4px 4px 8px rgba(163, 177, 198, 0.4), -4px -4px 8px rgba(255, 255, 255, 0.7); border-radius: 12px; }
body.neu-mode .view-title { color: #2D3748; font-weight: 600; }

/* ── 聊天区 ── */
body.neu-mode #sec-chat.active { background: #E8EFF7 !important; }
body.neu-mode .chat-window { background: transparent; }
body.neu-mode .chat-main-header {
    background: rgba(232, 239, 247, 0.6);
    border-bottom: 1px solid rgba(163, 177, 198, 0.2);
}
body.neu-mode .chat-bottom-bar {
    background: rgba(232, 239, 247, 0.9) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(163, 177, 198, 0.3) !important;
    box-shadow: 0 -4px 16px rgba(163, 177, 198, 0.1);
}
body.neu-mode .msg.user {
    background: #E8EFF7;
    box-shadow: 6px 6px 12px rgba(163, 177, 198, 0.4), -6px -6px 12px rgba(255, 255, 255, 0.7);
    border: none;
    color: #2D3748;
    border-radius: 18px;
}
body.neu-mode .msg.sys {
    background: #E8EFF7;
    box-shadow: inset 4px 4px 8px rgba(163, 177, 198, 0.3), inset -4px -4px 8px rgba(255, 255, 255, 0.6);
    border: none;
    color: #2D3748;
    border-radius: 18px;
}
body.neu-mode #chatInput {
    background: #E8EFF7;
    box-shadow: inset 4px 4px 8px rgba(163, 177, 198, 0.5), inset -4px -4px 8px rgba(255, 255, 255, 0.7);
    border: none;
    color: #2D3748;
    border-radius: 14px;
    padding: 10px 16px;
}
body.neu-mode #chatInput::placeholder { color: #A0AEC0; }
body.neu-mode #chatInput:focus {
    box-shadow: inset 3px 3px 6px rgba(163, 177, 198, 0.4), inset -3px -3px 6px rgba(255, 255, 255, 0.6), 0 0 0 3px rgba(90, 143, 202, 0.15);
    outline: none;
}
body.neu-mode .chat-send-btn {
    background: #E8EFF7 !important;
    box-shadow: 4px 4px 8px rgba(163, 177, 198, 0.4), -4px -4px 8px rgba(255, 255, 255, 0.7) !important;
    border: none !important;
    color: #D4A856 !important;
    border-radius: 12px;
}
body.neu-mode .chat-send-btn:hover {
    box-shadow: 2px 2px 4px rgba(163, 177, 198, 0.3), -2px -2px 4px rgba(255, 255, 255, 0.6) !important;
    color: #B38B3A !important;
}
body.neu-mode .chat-tool-btn {
    background: #E8EFF7 !important;
    box-shadow: 3px 3px 6px rgba(163, 177, 198, 0.3), -3px -3px 6px rgba(255, 255, 255, 0.5) !important;
    border: none !important;
    color: #718096 !important;
    border-radius: 10px;
}
body.neu-mode .chat-tool-btn:hover,
body.neu-mode .chat-tool-btn.open {
    color: #5A8FCA !important;
    box-shadow: inset 2px 2px 4px rgba(163, 177, 198, 0.3), inset -2px -2px 4px rgba(255, 255, 255, 0.5) !important;
}

/* ── 模型选择 ── */
body.neu-mode .model-select {
    background: #E8EFF7;
    box-shadow: inset 3px 3px 6px rgba(163, 177, 198, 0.4), inset -3px -3px 6px rgba(255, 255, 255, 0.6);
    border: none;
    color: #2D3748;
    border-radius: 10px;
}

/* ── Toast ── */
body.neu-mode .toast {
    background: #E8EFF7 !important;
    box-shadow: 8px 8px 16px rgba(163, 177, 198, 0.5), -8px -8px 16px rgba(255, 255, 255, 0.8) !important;
    border: none !important;
    color: #2D3748 !important;
    border-radius: 16px;
}

/* ── Think 框 ── */
body.neu-mode .think-box {
    background: rgba(90, 143, 202, 0.06);
    border: 1px solid rgba(90, 143, 202, 0.15);
    color: #4A5568;
    border-radius: 12px;
}

/* ── 按钮 ── */
body.neu-mode .chat-index-btn,
body.neu-mode .chat-rename-topbar-btn,
body.neu-mode .chat-index-topbar-btn,
body.neu-mode .chat-theme-topbar-btn {
    background: #E8EFF7;
    box-shadow: 3px 3px 6px rgba(163, 177, 198, 0.3), -3px -3px 6px rgba(255, 255, 255, 0.5);
    border: none;
    color: #718096;
    border-radius: 8px;
}
body.neu-mode .chat-index-btn:hover,
body.neu-mode .chat-rename-topbar-btn:hover,
body.neu-mode .chat-index-topbar-btn:hover,
body.neu-mode .chat-theme-topbar-btn:hover {
    color: #5A8FCA;
    box-shadow: 2px 2px 4px rgba(163, 177, 198, 0.2), -2px -2px 4px rgba(255, 255, 255, 0.5);
}

/* ── 消息元数据 ── */
body.neu-mode .msg-meta { color: #A0AEC0; }
body.neu-mode .msg-action-btn:hover { color: #5A8FCA !important; }
body.neu-mode .msg-retry-btn { background: rgba(196, 83, 74, 0.06); border-color: rgba(196, 83, 74, 0.2); }
body.neu-mode .ver-btn { border-color: rgba(90, 143, 202, 0.25); color: #718096; background: rgba(232, 239, 247, 0.5); }
body.neu-mode .ver-btn:hover:not(:disabled) { color: #5A8FCA; border-color: #5A8FCA; background: rgba(90, 143, 202, 0.06); }
body.neu-mode .ver-label { color: #A0AEC0; }
body.neu-mode .msg-inline-btn { border-color: rgba(90, 143, 202, 0.3); color: #5A8FCA; background: rgba(90, 143, 202, 0.04); }
body.neu-mode .msg-inline-btn:hover { color: #fff; border-color: #5A8FCA; background: rgba(90, 143, 202, 0.2); }

/* ── 数据区输入框 ── */
body.neu-mode #sec-data input[type="text"] {
    background: #E8EFF7;
    box-shadow: inset 3px 3px 6px rgba(163, 177, 198, 0.4), inset -3px -3px 6px rgba(255, 255, 255, 0.6);
    border: none;
    color: #2D3748;
    border-radius: 10px;
}
body.neu-mode #sec-data input[type="text"]:focus {
    box-shadow: inset 2px 2px 4px rgba(163, 177, 198, 0.3), inset -2px -2px 4px rgba(255, 255, 255, 0.5), 0 0 0 2px rgba(90, 143, 202, 0.15);
    outline: none;
}

/* ── Markdown 内容 ── */
body.neu-mode .md-content code { background: rgba(90, 143, 202, 0.06); color: #5A8FCA; }
body.neu-mode .md-content pre { background: #E8EFF7; border-color: rgba(163, 177, 198, 0.4); box-shadow: inset 4px 4px 8px rgba(163, 177, 198, 0.3), inset -4px -4px 8px rgba(255, 255, 255, 0.6); }
body.neu-mode .md-content pre code { color: #2D3748; }
body.neu-mode .md-content strong { color: #2D3748; }
body.neu-mode .md-content blockquote { border-left-color: #D4A856; color: #4A5568; }
body.neu-mode .md-content th { background: rgba(212, 168, 86, 0.08); color: #2D3748; }
body.neu-mode .md-content th, body.neu-mode .md-content td { border-color: rgba(163, 177, 198, 0.3); }

/* ── 滚动条 ── */
body.neu-mode .chat-window::-webkit-scrollbar-thumb,
body.neu-mode .sidebar-list::-webkit-scrollbar-thumb,
body.neu-mode .chat-index-list::-webkit-scrollbar-thumb {
    background: rgba(163, 177, 198, 0.4);
    border-radius: 3px;
}

/* ── 侧边栏 ── */
body.neu-mode .chat-sidebar {
    background: rgba(232, 239, 247, 0.9);
    border-right: 1px solid rgba(163, 177, 198, 0.3);
}

/* ── 导航栏 ── */
body.neu-mode .home-grid {
    gap: 16px;
}
body.neu-mode .home-card { min-height: auto; }

/* ── 桌面端微调 ── */
@media(min-width:768px) {
    body.neu-mode .home-grid { max-width: 480px; gap: 16px; }
    body.neu-mode .home-card { min-height: 140px; }
    body.neu-mode .chat-window,
    body.neu-mode .chat-bottom-bar,
    body.neu-mode .chat-main-header { max-width: 800px; }
}

/* ── 新拟态进度条 ── */
body.neu-mode .neu-progress-track {
    background: #E8EFF7;
    box-shadow: inset 4px 4px 8px rgba(163, 177, 198, 0.5), inset -4px -4px 8px rgba(255, 255, 255, 0.7);
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
}
body.neu-mode .neu-progress-fill {
    background: linear-gradient(90deg, #5A8FCA, #D4A856);
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* ── 开关按钮 (neu toggle) ── */
body.neu-mode #themeToggleBtn {
    background: #E8EFF7 !important;
    box-shadow: 4px 4px 8px rgba(163, 177, 198, 0.4), -4px -4px 8px rgba(255, 255, 255, 0.7) !important;
    border: none !important;
    color: #D4A856 !important;
    border-radius: 50%;
}
body.neu-mode #themeToggleBtn:hover {
    box-shadow: 2px 2px 4px rgba(163, 177, 198, 0.3), -2px -2px 4px rgba(255, 255, 255, 0.6) !important;
}

/* ── 工具调用框 ── */
body.neu-mode .tool-call-box {
    border-left-color: #5A8FCA;
    background: rgba(90, 143, 202, 0.06);
    color: #4A5568;
}

/* ── 时光信箱/胶囊 ── */
body.neu-mode .mailbox-container { border-color: rgba(163, 177, 198, 0.4); background: #E8EFF7; box-shadow: 8px 8px 16px rgba(163, 177, 198, 0.4), -8px -8px 16px rgba(255, 255, 255, 0.6); }
body.neu-mode .mailbox-container:hover { box-shadow: 6px 6px 12px rgba(163, 177, 198, 0.3), -6px -6px 12px rgba(255, 255, 255, 0.5); }
body.neu-mode .mailbox-desc { color: #718096; }
body.neu-mode .capsule-btn { background: #E8EFF7; box-shadow: 4px 4px 8px rgba(163, 177, 198, 0.4), -4px -4px 8px rgba(255, 255, 255, 0.7); border: none; color: #D4A856; }
body.neu-mode .capsule-btn:hover { box-shadow: 2px 2px 4px rgba(163, 177, 198, 0.3), -2px -2px 4px rgba(255, 255, 255, 0.6); color: #B38B3A; }
body.neu-mode .capsule-result { background: #E8EFF7; box-shadow: inset 3px 3px 6px rgba(163, 177, 198, 0.3), inset -3px -3px 6px rgba(255, 255, 255, 0.5); border: none; color: #2D3748; }

/* ── 聊天索引面板 ── */
body.neu-mode .chat-index-panel { background: rgba(232, 239, 247, 0.9); border-color: rgba(163, 177, 198, 0.3); }
body.neu-mode .chat-index-header { border-bottom-color: rgba(163, 177, 198, 0.2); }
body.neu-mode .chat-index-item:hover { background: rgba(90, 143, 202, 0.06); }
body.neu-mode .chat-index-item .idx-time { color: #A0AEC0; }
body.neu-mode .chat-index-item .idx-preview { color: #718096; }
body.neu-mode .chat-index-item .idx-role-sys { color: #5A8FCA; }
body.neu-mode .chat-index-item .idx-role-user { color: #D4A856; }

/* ── 亲密网格 ── */
body.neu-mode .intimacy-grid button {
    background: #E8EFF7;
    box-shadow: 4px 4px 8px rgba(163, 177, 198, 0.4), -4px -4px 8px rgba(255, 255, 255, 0.7);
    border: none;
    color: #718096;
}
body.neu-mode .intimacy-grid button:hover {
    box-shadow: 2px 2px 4px rgba(163, 177, 198, 0.2), -2px -2px 4px rgba(255, 255, 255, 0.5);
    color: #5A8FCA;
}
body.neu-mode .intimacy-result { color: #2D3748; }

/* ── 引用框 ── */
body.neu-mode .quote-box .q { color: #4A5568; }
body.neu-mode .quote-gen-btn { background: #E8EFF7; box-shadow: 3px 3px 6px rgba(163, 177, 198, 0.3), -3px -3px 6px rgba(255, 255, 255, 0.5); border: none; color: #5A8FCA; }
body.neu-mode .quote-gen-btn:hover { box-shadow: 2px 2px 4px rgba(163, 177, 198, 0.2), -2px -2px 4px rgba(255, 255, 255, 0.4); }

/* ═══ 新拟态首页布局 ═══ */
body:not(.neu-mode) .neu-home { display: none; }
body.neu-mode .home-legacy { display: none; }
body.neu-mode #sec-home { max-width: 430px; margin: 0 auto; padding: 20px 16px 100px 16px; }
body.neu-mode .home-footer { display: none; }

/* ── 通用新拟态卡片 hover/active ── */
.neu-card {
    transition: all 0.2s ease;
}
.neu-card:active {
    box-shadow: inset 3px 3px 6px rgba(163, 177, 198, 0.5), inset -3px -3px 6px rgba(255, 255, 255, 0.7) !important;
    transform: translateY(0) !important;
}

/* Together 天数大卡 */
.neu-together-card {
    position: relative; overflow: hidden;
    display: flex; justify-content: space-between; align-items: center;
    background: #E8EFF7;
    box-shadow: 8px 8px 16px rgba(163, 177, 198, 0.6), -8px -8px 16px rgba(255, 255, 255, 0.8);
    border-radius: 20px; padding: 24px; margin-bottom: 16px;
    transition: all 0.2s ease;
}
.neu-together-card:hover {
    box-shadow: 6px 6px 12px rgba(163, 177, 198, 0.5), -6px -6px 12px rgba(255, 255, 255, 0.7);
    transform: translateY(-1px);
}
.neu-together-left { display: flex; flex-direction: column; position: relative; z-index: 1; }
.neu-together-num { font-size: 48px; color: #2D3748; line-height: 1; font-family: 'Great Vibes', cursive; letter-spacing: 1px; }
.neu-together-deco { position: absolute; right: -20px; top: 50%; transform: translateY(-50%); width: 70%; pointer-events: none; }
.neu-together-label { font-family: 'Great Vibes', cursive; font-size: 1.3rem; color: #718096; margin-top: 8px; letter-spacing: 4px; position: relative; display: inline-block; }
.neu-together-label::after {
    content: '';
    position: absolute; bottom: -2px; left: 0; width: 120%;
    height: 1px;
    background: linear-gradient(90deg, rgba(200,169,110,0.3) 0%, rgba(200,169,110,0.15) 40%, rgba(200,169,110,0) 100%);
    pointer-events: none;
}

/* To Do 卡片 */
.neu-todo-card { padding: 16px 20px; margin-bottom: 16px; }
.neu-todo-card:hover {
    box-shadow: 6px 6px 12px rgba(163, 177, 198, 0.5), -6px -6px 12px rgba(255, 255, 255, 0.7);
    transform: translateY(-1px);
}
.neu-todo-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.neu-todo-title { font-size: 16px; font-weight: 600; color: #2D3748; }
.neu-todo-add-btn {
    background: #E8EFF7; border: none; color: #D4A856; font-size: 20px; font-weight: 600;
    width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
    box-shadow: 3px 3px 6px rgba(163, 177, 198, 0.3), -3px -3px 6px rgba(255, 255, 255, 0.5);
    transition: all 0.2s ease;
}
.neu-todo-add-btn:active { box-shadow: inset 2px 2px 4px rgba(163, 177, 198, 0.3), inset -2px -2px 4px rgba(255, 255, 255, 0.5); }
.neu-todo-list { display: flex; flex-direction: column; gap: 8px; }
.neu-todo-item { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #2D3748; }
.neu-todo-item.done span { text-decoration: line-through; color: #A0AEC0; }
.neu-todo-item input[type="checkbox"] { accent-color: #D4A856; }
.neu-todo-rm-btn {
    background: none; border: none; color: #A0AEC0; font-size: 14px; cursor: pointer;
    margin-left: auto; padding: 2px 6px;
}
.neu-todo-col-header { font-size: 12px; color: #D4A856; font-weight: 600; margin: 8px 0 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.neu-todo-col-header:first-child { margin-top: 0; }
.neu-todo-new-row { margin-top: 10px; padding-top: 8px; border-top: 1px solid rgba(163, 177, 198, 0.3); }
.neu-todo-new-input {
    width: 100%; border: none; background: transparent; font-size: 13px; color: #2D3748;
    padding: 4px 0; outline: none; font-family: inherit;
}
.neu-todo-new-input::placeholder { color: #A0AEC0; }

/* 周历横条 */
.neu-week-strip {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 16px; margin-bottom: 16px;
}
.neu-week-strip:hover {
    box-shadow: 6px 6px 12px rgba(163, 177, 198, 0.5), -6px -6px 12px rgba(255, 255, 255, 0.7);
    transform: translateY(-1px);
}
.neu-week-day { font-size: 12px; color: #718096; text-align: center; flex: 1; padding: 4px 0; }
.neu-week-day .day-dot {
    display: block; width: 32px; height: 32px; line-height: 32px; margin: 0 auto 2px;
    border-radius: 50%; font-size: 13px; font-weight: 500;
}
.neu-week-day.today .day-dot { background: #D4A856; color: #fff; }
.neu-week-day .day-event { width: 4px; height: 4px; background: #5A8FCA; border-radius: 50%; margin: 0 auto; }

/* 喝水横条 */
.neu-water-tracker {
    display: flex; align-items: center; gap: 12px;
    padding: 16px 20px; margin-bottom: 20px;
}
.neu-water-tracker:hover {
    box-shadow: 6px 6px 12px rgba(163, 177, 198, 0.5), -6px -6px 12px rgba(255, 255, 255, 0.7);
    transform: translateY(-1px);
}
.neu-water-label { font-size: 14px; color: #2D3748; white-space: nowrap; }
.neu-progress-track {
    background: #E8EFF7; flex: 1; height: 8px; border-radius: 4px; overflow: hidden;
    box-shadow: inset 4px 4px 8px rgba(163, 177, 198, 0.5), inset -4px -4px 8px rgba(255, 255, 255, 0.7);
}
.neu-progress-fill {
    background: linear-gradient(90deg, #5A8FCA, #D4A856);
    height: 100%; border-radius: 4px; transition: width 0.3s ease;
}
.neu-water-btn {
    background: #E8EFF7; border: none; font-size: 18px; cursor: pointer; flex-shrink: 0;
    width: 36px; height: 36px; border-radius: 50%;
    box-shadow: 4px 4px 8px rgba(163, 177, 198, 0.4), -4px -4px 8px rgba(255, 255, 255, 0.7);
    transition: all 0.2s ease;
    display: flex; align-items: center; justify-content: center; line-height: 1;
}
.neu-water-btn:hover {
    box-shadow: 3px 3px 6px rgba(163, 177, 198, 0.3), -3px -3px 6px rgba(255, 255, 255, 0.6);
}
.neu-water-btn:active { box-shadow: inset 2px 2px 4px rgba(163, 177, 198, 0.3), inset -2px -2px 4px rgba(255, 255, 255, 0.5); }

/* 功能网格 2×4 */
.neu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 80px;
}
.neu-grid-card {
    aspect-ratio: 1;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 6px; padding: 14px 8px; cursor: pointer;
    background: #E8EFF7;
    box-shadow: 8px 8px 16px rgba(163, 177, 198, 0.6), -8px -8px 16px rgba(255, 255, 255, 0.8);
    border-radius: 20px; border: none;
    transition: all 0.2s ease;
}
.neu-grid-card:hover {
    box-shadow: 6px 6px 12px rgba(163, 177, 198, 0.5), -6px -6px 12px rgba(255, 255, 255, 0.7);
    transform: translateY(-1px);
}
.neu-grid-card:active {
    box-shadow: inset 3px 3px 6px rgba(163, 177, 198, 0.5), inset -3px -3px 6px rgba(255, 255, 255, 0.7);
    transform: translateY(0);
}
.neu-grid-card span { font-size: 11px; color: #718096; font-weight: 500; }

/* 底部胶囊导航 */
.neu-bottom-nav {
    position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
    width: calc(100% - 48px); max-width: 382px;
    background: rgba(232, 239, 247, 0.95);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-radius: 30px;
    display: flex; justify-content: space-around; align-items: center;
    padding: 10px 8px;
    box-shadow: 8px 8px 16px rgba(163, 177, 198, 0.6), -8px -8px 16px rgba(255, 255, 255, 0.8);
    z-index: 100;
}
.neu-nav-item {
    display: flex; align-items: center; justify-content: center;
    width: 48px; height: 48px; border-radius: 50%;
    color: #718096; cursor: pointer; transition: all 0.2s ease;
    position: relative;
}
.neu-nav-item svg { width: 24px; height: 24px; }
.neu-nav-item.active { color: #D4A856; }
.neu-nav-item.active::after {
    content: ''; position: absolute; bottom: 4px; width: 4px; height: 4px;
    background: #D4A856; border-radius: 50%;
}
.neu-nav-item:active { transform: scale(0.92); }

/* ── 生理期卡片 ── */
.neu-period-card { padding: 16px 20px; margin-bottom: 20px; }
.neu-period-card:hover {
    box-shadow: 6px 6px 12px rgba(163, 177, 198, 0.5), -6px -6px 12px rgba(255, 255, 255, 0.7);
    transform: translateY(-1px);
}
.neu-period-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.neu-period-title { font-size: 16px; font-weight: 600; color: #2D3748; }
.neu-period-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.neu-period-dot.in-period { background: #c4534a; box-shadow: 0 0 6px rgba(196,83,74,0.4); }
.neu-period-dot.not-in-period { background: #68D391; }
.neu-period-status { font-size: 13px; color: #4A5568; margin-bottom: 10px; white-space: pre-line; line-height: 1.5; }
.neu-period-btns { display: flex; gap: 8px; }
.neu-period-btn {
    padding: 8px 16px; border: none; border-radius: 12px; cursor: pointer; font-size: 13px;
    font-weight: 500; color: #2D3748; background: #E8EFF7;
    box-shadow: 3px 3px 6px rgba(163, 177, 198, 0.3), -3px -3px 6px rgba(255, 255, 255, 0.5);
    transition: all 0.2s ease;
}
.neu-period-btn:active { box-shadow: inset 2px 2px 4px rgba(163, 177, 198, 0.3), inset -2px -2px 4px rgba(255, 255, 255, 0.5); }
.neu-period-btn.start { color: #c4534a; }
.neu-period-btn.end { color: #5A8FCA; }
.neu-period-btn.backfill { color: #718096; font-size: 12px; padding: 8px 12px; }
.neu-period-btn.small { padding: 6px 12px; font-size: 12px; }
.neu-period-backfill { display: flex; align-items: center; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(163, 177, 198, 0.25); }
.neu-period-date-inp {
    background: #E8EFF7; border: none; padding: 6px 8px; border-radius: 8px; font-size: 12px; color: #2D3748;
    box-shadow: inset 2px 2px 4px rgba(163, 177, 198, 0.3), inset -2px -2px 4px rgba(255, 255, 255, 0.5);
    font-family: inherit;
}
.neu-period-date-inp:focus { outline: none; box-shadow: inset 1px 1px 3px rgba(163, 177, 198, 0.3), inset -1px -1px 3px rgba(255, 255, 255, 0.4), 0 0 0 2px rgba(90,143,202,0.12); }

/* ── 生理期倒计时（周历下方） ── */
.neu-period-countdown {
    font-size: 13px; color: #a8b8e7; text-align: center;
    padding: 0 0 12px 0; margin-top: -8px;
}

/* ═══ Flo 经期详情页 ═══ */
body:not(.neu-mode) #sec-flo { background: #0d1225; color: #d4c5a0; }
body:not(.neu-mode) #sec-flo .view-topbar { background: rgba(10,14,26,0.95); border-bottom-color: rgba(201,169,97,0.12); }
body:not(.neu-mode) #sec-flo .flo-filter-btn { color: #a8b8e7; border-color: #a8b8e7; }
body:not(.neu-mode) #sec-flo .flo-filter-btn.active { background: #F28B82; color: #fff; border-color: transparent; }
body:not(.neu-mode) #sec-flo .flo-year-title { color: #d4c5a0; }
body:not(.neu-mode) #sec-flo .flo-cycle-days { color: #d4c5a0; }
body:not(.neu-mode) #sec-flo .flo-date-range { color: #9a8e72; }
body:not(.neu-mode) #sec-flo .flo-action-btn { color: #d4c5a0; background: rgba(255,255,255,0.05); border-color: rgba(201,169,97,0.2); }
body:not(.neu-mode) #sec-flo .flo-legend { color: #9a8e72; }
body:not(.neu-mode) #sec-flo .flo-date-inp { color: #d4c5a0; background: rgba(0,0,0,0.3); border-color: rgba(201,169,97,0.2); }

body.neu-mode #sec-flo {
    background: linear-gradient(175deg, #F2F4FB 0%, #EAECF5 100%);
    color: #2e3b69; min-height: 100vh;
    max-width: 430px; margin: 0 auto; padding-bottom: 40px;
}
body.neu-mode #sec-flo .view-topbar {
    background: rgba(242,244,251,0.9); backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(163,177,198,0.25);
}
body.neu-mode #sec-flo .view-back { color: #2e3b69; }
body.neu-mode #sec-flo .view-title { color: #2e3b69; font-size: 16px; }

/* 筛选栏 */
.flo-filter-bar { display: flex; gap: 8px; padding: 14px 16px 6px; }
.flo-filter-btn {
    padding: 7px 16px; border-radius: 20px; font-size: 13px; cursor: pointer;
    background: transparent; border: 1px solid #a8b8e7; color: #a8b8e7;
    transition: all 0.2s ease; font-family: inherit;
}
.flo-filter-btn.active { background: #F28B82; color: #fff; border-color: transparent; }

/* 图例 */
.flo-legend {
    display: flex; gap: 14px; padding: 8px 18px 12px;
    font-size: 12px; color: #a8b8e7; align-items: center;
}
.flo-legend-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 2px; }

/* 操作按钮 */
.flo-action-bar { display: flex; gap: 8px; padding: 6px 16px 14px; }
.flo-action-btn {
    padding: 9px 18px; border: none; border-radius: 14px; cursor: pointer;
    font-size: 14px; font-weight: 500; color: #2e3b69; font-family: inherit;
    background: #E8EFF7;
    box-shadow: 4px 4px 8px rgba(163,177,198,0.35), -4px -4px 8px rgba(255,255,255,0.65);
    transition: all 0.2s ease;
}
.flo-action-btn:active {
    box-shadow: inset 3px 3px 6px rgba(163,177,198,0.35), inset -3px -3px 6px rgba(255,255,255,0.55);
}
.flo-action-btn.small { padding: 6px 14px; font-size: 13px; }
.flo-backfill-row { display: flex; align-items: center; gap: 8px; padding: 0 16px 14px; }
.flo-date-inp {
    background: #E8EFF7; border: none; padding: 8px 10px; border-radius: 10px;
    font-size: 13px; color: #2e3b69; font-family: inherit;
    box-shadow: inset 3px 3px 6px rgba(163,177,198,0.3), inset -3px -3px 6px rgba(255,255,255,0.5);
}
.flo-date-inp:focus { outline: none; }

/* 列表 */
.flo-list { padding: 0 16px 80px; }
.flo-year-title { font-size: 20px; font-weight: 700; color: #2e3b69; margin: 10px 0 6px; }
.flo-cycle-card { padding: 14px 0; border-bottom: 1px solid #EAECF5; }
.flo-cycle-card .flo-cycle-header { display: flex; justify-content: space-between; align-items: center; }
.flo-cycle-days { font-size: 18px; font-weight: 700; color: #2e3b69; }
.flo-cycle-arrow { color: #a8b8e7; font-size: 18px; }
.flo-date-range { font-size: 14px; color: #a8b8e7; margin: 4px 0 6px; }
.flo-dot-row { display: flex; gap: 3px; flex-wrap: wrap; }
.flo-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

@media(max-width:374px) {
    body.neu-mode #sec-home { padding: 16px 12px 90px 12px; }
    .neu-grid { gap: 10px; }
    .neu-grid-card { padding: 10px 4px; }
    .neu-together-num { font-size: 40px; }
}

/* ── 供应商编辑按钮 ── */
.sup-edit-btn {
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.15);
    color: #aaa; padding: 4px 10px; border-radius: 6px; cursor: pointer;
    font-size: 0.75em; margin-right: 4px; font-family: inherit;
}
.sup-edit-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
.sup-del-btn {
    background: transparent; border: 1px solid rgba(229,57,53,0.3);
    color: #e53935; padding: 4px 10px; border-radius: 6px; cursor: pointer;
    font-size: 0.75em; font-family: inherit;
}
.sup-del-btn:hover { background: rgba(229,57,53,0.1); }

/* ═══ 日历视图 ═══ */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; padding: 8px 16px; }
.cal-weekday { text-align: center; font-size: 0.75em; color: var(--dim); padding: 8px 0; }
.cal-cell { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 8px; cursor: pointer; position: relative; transition: background 0.15s; }
.cal-cell:hover { background: rgba(255,255,255,0.05); }
.cal-cell.empty { cursor: default; background: none !important; }
.cal-cell.today { border: 1px solid rgba(212,160,74,0.5); }
.cal-cell.has-note { background: rgba(212,160,74,0.08); }
.cal-cell-num { font-size: 0.9em; color: var(--dim); }
.cal-cell.today .cal-cell-num { color: #D4A04A; font-weight: 600; }
.cal-cell-dot { width: 4px; height: 4px; border-radius: 50%; background: #D4A04A; position: absolute; bottom: 6px; }
.cal-cell-period { width: 5px; height: 5px; border-radius: 50%; background: #F28B82; position: absolute; top: 5px; right: 5px; }

/* 日历详情弹窗 */
.cal-detail-overlay { position: fixed; inset: 0; z-index: 9998; background: rgba(0,0,0,0.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.cal-detail-card { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 88%; max-width: 400px; background: rgba(18,22,40,0.95); border: 1px solid rgba(212,160,74,0.25); border-radius: 16px; padding: 24px; color: #e8ecf5; }
.cal-detail-close { position: absolute; top: 12px; right: 16px; background: none; border: none; color: #a8b8e7; font-size: 1.3em; cursor: pointer; }
.cal-detail-date { font-size: 1.1em; color: #e8ecf5; margin-bottom: 4px; }
.cal-detail-days { font-size: 0.85em; color: #D4A04A; margin-bottom: 14px; }
.cal-detail-note { font-size: 0.95em; color: #c5cde8; line-height: 1.7; white-space: pre-wrap; margin-bottom: 10px; }
.cal-detail-note.empty { color: #a8b8e7; font-style: italic; }
.cal-detail-comment { font-size: 0.85em; color: #a8b8e7; font-style: italic; margin-bottom: 10px; padding: 8px 12px; border-left: 2px solid rgba(212,160,74,0.25); background: rgba(255,255,255,0.02); border-radius: 0 6px 6px 0; }
.cal-tag { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 0.75em; margin-right: 4px; }
.cal-tag.period { background: rgba(242,139,130,0.12); color: #F28B82; }
.cal-tag.mood { background: rgba(212,160,74,0.1); color: #D4A04A; }

/* 白天模式日历 */
body.light-mode .cal-detail-card { background: rgba(255,255,255,0.95); border-color: rgba(196,165,123,0.2); color: #3E2723; }
body.light-mode .cal-detail-date { color: #3E2723; }
body.light-mode .cal-detail-close { color: #8B7355; }
body.light-mode .cal-detail-note { color: #5C4033; }
body.light-mode .cal-detail-note.empty { color: #8B7355; }
body.light-mode .cal-detail-comment { color: #8B7355; border-left-color: rgba(196,165,123,0.25); }
body.light-mode .cal-cell:hover { background: rgba(0,0,0,0.04); }
body.light-mode .cal-cell.has-note { background: rgba(212,160,74,0.1); }
body.light-mode .cal-cell-num { color: #8B7355; }
body.light-mode .cal-cell.today .cal-cell-num { color: #8B6914; }

/* 新拟态模式日历 */
body.neu-mode #sec-calendar { background: #E8EFF7; min-height: 100vh; max-width: 430px; margin: 0 auto; padding-bottom: 40px; }
body.neu-mode #sec-calendar .view-topbar { background: rgba(232,239,247,0.9); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(163,177,198,0.25); }
body.neu-mode #sec-calendar .view-back { color: #2e3b69; }
body.neu-mode #sec-calendar .view-title { color: #2e3b69; font-size: 16px; }
body.neu-mode .cal-grid { padding: 8px 16px; }
body.neu-mode .cal-weekday { color: #718096; }
body.neu-mode .cal-cell-num { color: #4A5568; }
body.neu-mode .cal-cell:hover { background: rgba(163,177,198,0.15); }
body.neu-mode .cal-cell.today { border-color: #D4A04A; background: rgba(212,160,74,0.08); }
body.neu-mode .cal-cell.today .cal-cell-num { color: #B38B3A; }
body.neu-mode .cal-cell.has-note { background: rgba(212,160,74,0.1); }
body.neu-mode .cal-detail-card { background: rgba(242,244,251,0.98); border: none; box-shadow: 12px 12px 24px rgba(163,177,198,0.4), -12px -12px 24px rgba(255,255,255,0.7); border-radius: 20px; color: #2e3b69; }
body.neu-mode .cal-detail-date { color: #2e3b69; }
body.neu-mode .cal-detail-days { color: #B38B3A; }
body.neu-mode .cal-detail-close { color: #718096; }
body.neu-mode .cal-detail-note { color: #4A5568; }
body.neu-mode .cal-detail-note.empty { color: #A0AEC0; }
body.neu-mode .cal-detail-comment { color: #718096; border-left-color: rgba(212,160,74,0.3); background: rgba(163,177,198,0.08); }

/* 日历编辑表单 */
.cal-detail-actions { margin-top: 12px; }
.cal-edit-btn {
    background: rgba(212,160,74,0.12); border: 1px solid rgba(212,160,74,0.3);
    color: #D4A04A; padding: 6px 14px; border-radius: 8px; cursor: pointer;
    font-size: 0.8em; font-family: inherit;
}
.cal-edit-btn:hover { background: rgba(212,160,74,0.2); }
.cal-edit-textarea {
    width: 100%; min-height: 60px; border-radius: 8px; padding: 10px;
    font-size: 0.9em; color: inherit; resize: vertical; font-family: inherit;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); margin-top: 8px;
}
.cal-edit-comment { min-height: 40px; }
.cal-edit-mood {
    flex: 1; border-radius: 8px; padding: 6px 10px;
    font-size: 0.85em; color: inherit; font-family: inherit;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
}
.cal-save-btn {
    background: rgba(212,160,74,0.2); border: none; color: #D4A04A;
    padding: 6px 16px; border-radius: 8px; cursor: pointer; font-size: 0.85em; font-family: inherit;
}
.cal-cancel-btn {
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.15);
    color: #a8b8e7; padding: 6px 16px; border-radius: 8px; cursor: pointer; font-size: 0.85em; font-family: inherit;
}
body.light-mode .cal-edit-textarea, body.light-mode .cal-edit-mood { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.1); }
body.neu-mode .cal-edit-textarea, body.neu-mode .cal-edit-mood {
    background: #E8EFF7; border: none;
    box-shadow: inset 3px 3px 6px rgba(163,177,198,0.3), inset -3px -3px 6px rgba(255,255,255,0.5);
}

@media(max-width:480px) {
    .cal-grid { gap: 1px; padding: 4px 8px; }
    .cal-cell-num { font-size: 0.78em; }
    .cal-detail-card { padding: 18px; }
}

/* ═══ 相册视图 ═══ */
#sec-album { min-height: 100vh; padding-bottom: 80px; }
.album-month-select {
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.15);
    color: var(--dim); padding: 4px 10px; border-radius: 8px; font-size: 0.85em;
    font-family: inherit; cursor: pointer;
}
.album-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; }
.album-thumb { aspect-ratio: 1; object-fit: cover; border-radius: 4px; cursor: pointer; transition: opacity 0.2s; width: 100%; }
.album-thumb:hover { opacity: 0.8; }
.album-empty { text-align: center; color: var(--dim); padding: 60px 20px; font-size: 0.9em; }
.album-upload-btn {
    position: fixed; bottom: 80px; right: 20px; z-index: 90;
    width: 50px; height: 50px; border-radius: 50%; border: none;
    background: #D4A04A; color: #fff; font-size: 24px; cursor: pointer;
    box-shadow: 0 4px 16px rgba(212,160,74,0.4);
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.2s;
}
.album-upload-btn:active { transform: scale(0.9); }

/* 相册详情弹窗 */
.album-detail-overlay { position: fixed; inset: 0; z-index: 9998; background: rgba(0,0,0,0.7); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.album-detail-card { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 90%; max-width: 420px; max-height: 85vh; overflow-y: auto; background: rgba(18,22,40,0.95); border: 1px solid rgba(212,160,74,0.2); border-radius: 16px; padding: 20px; color: #e8ecf5; }
.album-detail-close { position: absolute; top: 10px; right: 14px; background: none; border: none; color: #a8b8e7; font-size: 1.3em; cursor: pointer; z-index: 1; }
.album-detail-img { width: 100%; border-radius: 10px; margin-bottom: 12px; }
.album-detail-caption { font-size: 0.95em; color: #e8ecf5; margin-bottom: 6px; }
.album-detail-comment { font-size: 0.85em; color: #a8b8e7; font-style: italic; margin-bottom: 6px; padding: 6px 10px; border-left: 2px solid rgba(212,160,74,0.25); background: rgba(255,255,255,0.02); border-radius: 0 6px 6px 0; }
.album-detail-meta { font-size: 0.75em; color: var(--dim); margin-bottom: 10px; }
.album-detail-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.album-action-btn {
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.15);
    color: #c5cde8; padding: 5px 12px; border-radius: 8px; cursor: pointer;
    font-size: 0.8em; font-family: inherit;
}
.album-action-btn:hover { background: rgba(255,255,255,0.1); }
.album-action-btn.edit { color: #5A8FCA; border-color: rgba(90,143,202,0.3); }
.album-action-btn.del { color: #e53935; border-color: rgba(229,57,53,0.3); }
.album-edit-input {
    width: 100%; border-radius: 8px; padding: 8px 10px; margin-top: 6px;
    font-size: 0.85em; color: inherit; font-family: inherit;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
}
.album-save-btn { background: rgba(212,160,74,0.2); border: none; color: #D4A04A; padding: 6px 14px; border-radius: 8px; cursor: pointer; font-size: 0.85em; font-family: inherit; }
.album-cancel-btn { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.15); color: #a8b8e7; padding: 6px 14px; border-radius: 8px; cursor: pointer; font-size: 0.85em; font-family: inherit; }

body.light-mode .album-detail-card { background: rgba(255,255,255,0.95); border-color: rgba(196,165,123,0.2); color: #3E2723; }
body.light-mode .album-detail-close { color: #8B7355; }
body.light-mode .album-detail-caption { color: #3E2723; }
body.light-mode .album-detail-comment { color: #8B7355; background: rgba(0,0,0,0.02); }
body.light-mode .album-edit-input { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.1); }

body.neu-mode #sec-album { background: #E8EFF7; max-width: 430px; margin: 0 auto; }
body.neu-mode #sec-album .view-topbar { background: rgba(232,239,247,0.9); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(163,177,198,0.25); }
body.neu-mode #sec-album .view-back { color: #2e3b69; }
body.neu-mode #sec-album .view-title { color: #2e3b69; font-size: 16px; }
body.neu-mode .album-grid { gap: 6px; padding: 12px; }
body.neu-mode .album-thumb { border-radius: 10px; }
body.neu-mode .album-detail-card { background: rgba(242,244,251,0.98); border: none; box-shadow: 12px 12px 24px rgba(163,177,198,0.4), -12px -12px 24px rgba(255,255,255,0.7); border-radius: 20px; color: #2e3b69; }
body.neu-mode .album-detail-close { color: #718096; }
body.neu-mode .album-detail-caption { color: #2e3b69; }
body.neu-mode .album-detail-comment { color: #718096; border-left-color: rgba(212,160,74,0.3); background: rgba(163,177,198,0.08); }

/* ═══════════════════════════════════════
   溯星小屋 v4.0 · 深夜黑金模式 (Dark Gold)
   body.dark-gold-mode 覆盖
   ═══════════════════════════════════════ */

body.dark-gold-mode{ background: linear-gradient(160deg, #141211 0%, #100d0b 40%, #0b0706 100%); color: #fef9c9; font-family:'Inter','PingFang SC','Microsoft YaHei',sans-serif; letter-spacing:0; line-height:1.6; padding-bottom:0!important }
body.dark-gold-mode::before{ content:'';position:fixed;inset:0;pointer-events:none;z-index:0; background: radial-gradient(ellipse at 15% 85%, rgba(212,160,74,0.04), transparent 60%) }
body.dark-gold-mode::after{opacity:0!important}
/* 隐旧首页显新首页 */
body.dark-gold-mode .home-legacy{display:none}
body.dark-gold-mode .home-footer{display:none}
body.dark-gold-mode .neu-home{display:block}
body.dark-gold-mode #sec-home{max-width:430px;margin:0 auto;padding:20px 16px 100px 16px}
body.dark-gold-mode #sec-chat.active{background:#141211!important}
body.dark-gold-mode #sec-chat{ max-width:800px; margin:0 auto;background:#141211!important }
body.dark-gold-mode .chat-window{background:transparent}
body.dark-gold-mode .chat-main-header{background:rgba(30,26,24,0.4);border-bottom:1px solid rgba(228,212,199,0.06);display:block!important}
body.dark-gold-mode .chat-bottom-bar{background:rgba(20,18,17,0.85)!important;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-top:1px solid rgba(228,212,199,0.08)!important}
body.dark-gold-mode .chat-send-btn{background:rgba(212,160,74,0.12)!important;border:1px solid rgba(212,160,74,0.25)!important;color:#D4A04A!important;border-radius:12px}
/* ── 黑玻璃卡片 ── */
body.dark-gold-mode .neu-card,body.dark-gold-mode .neu-together-card,body.dark-gold-mode .neu-todo-card,body.dark-gold-mode .neu-week-strip,body.dark-gold-mode .neu-water-tracker,body.dark-gold-mode .neu-grid-card,body.dark-gold-mode .neu-period-card{ background:rgba(30,26,24,0.6);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border:1px solid rgba(228,212,199,0.06);box-shadow:none;border-radius:18px;transition:all 0.2s ease }
body.dark-gold-mode .neu-card:hover,body.dark-gold-mode .neu-together-card:hover,body.dark-gold-mode .neu-todo-card:hover,body.dark-gold-mode .neu-week-strip:hover,body.dark-gold-mode .neu-water-tracker:hover,body.dark-gold-mode .neu-grid-card:hover{ background:rgba(40,34,30,0.7);border-color:rgba(228,212,199,0.12);transform:translateY(-1px) }
body.dark-gold-mode .neu-card:active{ background:rgba(25,22,20,0.7);transform:translateY(0) }
/* ── V3 首页文字 ── */
body.dark-gold-mode .neu-together-num{color:#fef9c9}
body.dark-gold-mode .neu-together-label{color:#fef9c9}
body.dark-gold-mode .neu-together-deco *{stroke:#fef9c9 !important}
body.dark-gold-mode .neu-together-deco text{fill:#fcfa1d !important}
body.dark-gold-mode .neu-todo-title{color:#fef9c9}
body.dark-gold-mode .neu-todo-item{color:#fef9c9}
body.dark-gold-mode .neu-todo-new-input{color:#fef9c9}
body.dark-gold-mode .neu-todo-new-input::placeholder{color:#584b38}
body.dark-gold-mode .neu-todo-empty{color:#fef9c9}
body.dark-gold-mode .neu-todo-add-btn{background:rgba(212,160,74,0.12);color:#D4A04A;box-shadow:none}
body.dark-gold-mode .neu-todo-new-row{border-top-color:rgba(228,212,199,0.08)}
body.dark-gold-mode .neu-week-day{color:#fef9c9}
body.dark-gold-mode .neu-week-day.today .day-dot{background:#fef9c9;color:#141211}
body.dark-gold-mode .neu-week-day .day-event{background:#fef9c9}
body.dark-gold-mode .neu-water-label{color:#fef9c9}
body.dark-gold-mode .neu-progress-track{background:rgba(30,26,24,0.4);box-shadow:inset 2px 2px 4px rgba(0,0,0,0.3)}
body.dark-gold-mode .neu-progress-fill{background:linear-gradient(90deg,#D4A04A,#e4d4c7)}
body.dark-gold-mode .neu-water-btn{background:rgba(212,160,74,0.12);color:#D4A04A;box-shadow:none}
body.dark-gold-mode .neu-grid-card span{color:#fef9c9}
body.dark-gold-mode .neu-grid-card svg{stroke:#D4A04A}
body.dark-gold-mode .neu-bottom-nav{ background:rgba(20,18,17,0.85);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid rgba(228,212,199,0.06);box-shadow:none }
body.dark-gold-mode .neu-nav-item{color:#fef9c9}
body.dark-gold-mode .neu-nav-item.active{color:#D4A04A}
body.dark-gold-mode .neu-nav-item.active::after{background:#D4A04A}
body.dark-gold-mode .neu-period-countdown{color:#fef9c9}
body.dark-gold-mode .neu-todo-col-header{color:#fef9c9}
/* ── 聊天 ── */
body.dark-gold-mode .view-title{color:#fef9c9}
body.dark-gold-mode .chat-win-title{color:#fef9c9}
body.dark-gold-mode .msg.user{background:rgba(228,212,199,0.08);border:1px solid rgba(228,212,199,0.08);color:#fef9c9;border-radius:14px}
body.dark-gold-mode .msg.sys{background:rgba(30,26,24,0.6);backdrop-filter:blur(8px);border:1px solid rgba(228,212,199,0.06);color:#fef9c9;border-radius:14px}
body.dark-gold-mode #chatInput{background:rgba(30,26,24,0.6);backdrop-filter:blur(8px);border:1px solid rgba(228,212,199,0.08);color:#e4d4c7;border-radius:10px}
body.dark-gold-mode #chatInput::placeholder{color:#584b38}
body.dark-gold-mode #chatInput:focus{border-color:rgba(212,160,74,0.3);background:rgba(40,34,30,0.7)}
body.dark-gold-mode .chat-tool-btn{background:rgba(30,26,24,0.6)!important;border:1px solid rgba(228,212,199,0.08)!important;color:#8c7a65!important}
body.dark-gold-mode .chat-tool-btn:hover{color:#D4A04A!important;background:rgba(212,160,74,0.1)!important}
body.dark-gold-mode .model-select{background:rgba(30,26,24,0.6);border:1px solid rgba(228,212,199,0.08);color:#e4d4c7;border-radius:8px}
body.dark-gold-mode .chat-main-header .chat-index-btn,
body.dark-gold-mode .chat-main-header .chat-rename-btn{display:none!important}
body.dark-gold-mode .toast{background:rgba(20,18,17,0.9)!important;backdrop-filter:blur(12px);border:1px solid rgba(212,160,74,0.2)!important;color:#e4d4c7!important}
body.dark-gold-mode .think-box{background:rgba(212,160,74,0.04);border:1px solid rgba(212,160,74,0.1);color:#c4b8ab}
body.dark-gold-mode .msg-meta{color:#584b38}
body.dark-gold-mode .msg-action-btn:hover{color:#D4A04A!important}
body.dark-gold-mode .view-topbar{background:rgba(20,18,17,0.85);backdrop-filter:blur(12px);border-bottom:1px solid rgba(228,212,199,0.06)}
body.dark-gold-mode .view-back{color:#8c7a65}
body.dark-gold-mode .view-title{color:#e4d4c7}
body.dark-gold-mode .chat-index-btn,body.dark-gold-mode .chat-rename-btn{background:rgba(212,160,74,0.08);border:1px solid rgba(212,160,74,0.15);color:#D4A04A}
/* ── 日历 ── */
body.dark-gold-mode #sec-calendar{background:transparent;max-width:430px;margin:0 auto;padding-bottom:40px}
body.dark-gold-mode #sec-calendar .view-topbar{background:rgba(20,18,17,0.85)}
body.dark-gold-mode #sec-calendar .view-back{color:#8c7a65}
body.dark-gold-mode #sec-calendar .view-title{color:#e4d4c7}
body.dark-gold-mode .cal-weekday{color:#584b38}
body.dark-gold-mode .cal-cell-num{color:#8c7a65}
body.dark-gold-mode .cal-cell:hover{background:rgba(212,160,74,0.08)}
body.dark-gold-mode .cal-cell.today{border-color:#D4A04A;background:rgba(212,160,74,0.08)}
body.dark-gold-mode .cal-cell.today .cal-cell-num{color:#e4d4c7}
body.dark-gold-mode .cal-cell.has-note{background:rgba(212,160,74,0.06)}
body.dark-gold-mode .cal-detail-card{background:rgba(20,18,17,0.95);backdrop-filter:blur(16px);border:1px solid rgba(212,160,74,0.15);border-radius:20px;color:#e4d4c7}
body.dark-gold-mode .cal-detail-date{color:#e4d4c7}
body.dark-gold-mode .cal-detail-days{color:#D4A04A}
body.dark-gold-mode .cal-detail-close{color:#8c7a65}
body.dark-gold-mode .cal-detail-note{color:#c4b8ab}
body.dark-gold-mode .cal-detail-note.empty{color:#584b38}
body.dark-gold-mode .cal-detail-comment{color:#8c7a65;border-left-color:rgba(212,160,74,0.2);background:rgba(255,255,255,0.02)}
/* ── Flo ── */
body.dark-gold-mode #sec-flo{background:transparent;color:#e4d4c7;max-width:430px;margin:0 auto;padding-bottom:40px}
body.dark-gold-mode #sec-flo .view-topbar{background:rgba(20,18,17,0.85);border-bottom:1px solid rgba(228,212,199,0.06)}
body.dark-gold-mode #sec-flo .view-back{color:#8c7a65}
body.dark-gold-mode #sec-flo .view-title{color:#e4d4c7}
body.dark-gold-mode .flo-filter-btn{color:#8c7a65;border-color:#8c7a65}
body.dark-gold-mode .flo-filter-btn.active{background:#D4A04A;color:#141211;border-color:transparent}
body.dark-gold-mode .flo-legend{color:#8c7a65}
body.dark-gold-mode .flo-action-btn{background:rgba(30,26,24,0.6);border:1px solid rgba(228,212,199,0.08);color:#D4A04A;backdrop-filter:blur(8px)}
body.dark-gold-mode .flo-action-btn:active{background:rgba(212,160,74,0.15)}
body.dark-gold-mode .flo-year-title{color:#e4d4c7}
body.dark-gold-mode .flo-cycle-days{color:#e4d4c7}
body.dark-gold-mode .flo-date-range{color:#8c7a65}
body.dark-gold-mode .flo-cycle-card{border-bottom-color:rgba(228,212,199,0.06)}
body.dark-gold-mode .flo-cycle-arrow{color:#8c7a65}
body.dark-gold-mode .flo-date-inp{background:rgba(30,26,24,0.6);border:1px solid rgba(228,212,199,0.08);color:#e4d4c7}
/* ── 相册 ── */
body.dark-gold-mode #sec-album{background:transparent;max-width:430px;margin:0 auto}
body.dark-gold-mode #sec-album .view-topbar{background:rgba(20,18,17,0.85);border-bottom:1px solid rgba(228,212,199,0.06)}
body.dark-gold-mode #sec-album .view-back{color:#8c7a65}
body.dark-gold-mode #sec-album .view-title{color:#e4d4c7}
body.dark-gold-mode .album-grid{gap:6px;padding:12px}
body.dark-gold-mode .album-thumb{border-radius:10px}
body.dark-gold-mode .album-detail-card{background:rgba(20,18,17,0.95);backdrop-filter:blur(16px);border:1px solid rgba(212,160,74,0.15);border-radius:20px;color:#e4d4c7}
body.dark-gold-mode .album-detail-close{color:#8c7a65}
body.dark-gold-mode .album-detail-caption{color:#e4d4c7}
body.dark-gold-mode .album-detail-comment{color:#8c7a65;border-left-color:rgba(212,160,74,0.2);background:rgba(255,255,255,0.02)}
/* ── 中枢 + 编辑器 ── */
body.dark-gold-mode #sec-data input[type="text"]{background:rgba(30,26,24,0.6);border:1px solid rgba(228,212,199,0.08);color:#e4d4c7;backdrop-filter:blur(8px)}
body.dark-gold-mode .glass{background:rgba(30,26,24,0.6);backdrop-filter:blur(8px);border:1px solid rgba(228,212,199,0.06)}
body.dark-gold-mode #themeToggleBtn{background:rgba(30,26,24,0.8)!important;backdrop-filter:blur(8px);border:1px solid rgba(212,160,74,0.2)!important;color:#D4A04A!important}
body.dark-gold-mode .cal-edit-textarea,body.dark-gold-mode .cal-edit-mood{background:rgba(30,26,24,0.6);border:1px solid rgba(228,212,199,0.08);color:#e4d4c7}
body.dark-gold-mode .album-edit-input{background:rgba(30,26,24,0.6);border:1px solid rgba(228,212,199,0.08);color:#e4d4c7}
@media(max-width:374px){ body.dark-gold-mode #sec-home{padding:16px 12px 90px 12px} body.dark-gold-mode .neu-together-num{font-size:40px} }
body.neu-mode .album-edit-input { background: #E8EFF7; border: none; box-shadow: inset 3px 3px 6px rgba(163,177,198,0.3), inset -3px -3px 6px rgba(255,255,255,0.5); }