/* 1. 隐藏默认的顶部颜色装饰条 */
[class*="bg-[#F1CBCB]"], 
[class*="bg-[#c9e1e9]"] {
    display: none !important;
}

/* 2. 纯白纸张质感主体（默认：极致紧贴文字，零留白） */
.bg-gray-100\/90.relative.inline-block {
    background-color: #FFFFFF !important; 
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E") !important;
    border: 1px solid #EBEBEB !important; 
    border-radius: 0px !important; 
    box-shadow: none !important; 
    
    /* 保持文字输出时的紧贴状态 */
    padding: 2px 4px !important; 
    
    position: relative !important;
    isolation: isolate !important;
    overflow: hidden !important; 
}

/* 3. 日文元素点缀（右下角极简微弱水印） */
.bg-gray-100\/90.relative.inline-block::after {
    content: "文庫" !important; 
    position: absolute !important;
    bottom: 2px !important;
    right: 4px !important;
    font-family: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", serif !important;
    font-size: 10px !important;
    color: rgba(0, 0, 0, 0.03) !important; 
    letter-spacing: 0.1em !important;
    z-index: 0 !important;
    pointer-events: none !important;
}

/* 4. 极简纸面排版（纯净对比度） */
.markdown-body {
    color: #1A1A1A !important; 
    font-family: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif JP", "Noto Serif SC", serif !important; 
    font-size: 15px !important;
    line-height: 1.75 !important; 
    letter-spacing: 0.03em !important;
    background: transparent !important;
    z-index: 1 !important;
    position: relative !important;
    margin: 0 !important; 
}

.markdown-body strong {
    color: #000000 !important;
    font-weight: 900 !important;
}

/* 5. 底部附加元素 */
.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary,
.MuiTypography-root.MuiTypography-body2.css-6c0gf2,
.text-orange-500 {
    color: #CCCCCC !important; 
    font-family: inherit !important;
    transition: color 0.2s ease !important;
    margin-top: 8px !important; 
    margin-bottom: 2px !important;
}

.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary:hover {
    color: #1A1A1A !important;
}

/* 6. 【核心】加载动画（居中、留白框、保证大小与完整显示） */
.style_dot-flashing__8L91Q {
    display: none !important;
}

.flex.items-center.justify-center.w-6.h-5 {
    display: block !important;
    
    /* 保证大小：您指定的尺寸 */
    width: 540px !important;  
    height: 308px !important; 
    max-width: 100% !important; /* 防止屏幕较窄时动图超出边界 */
    
    /* 居中 + 有边：上下左右留出 16px 的边距，auto 保证水平绝对居中 */
    margin: 16px auto !important; 
    
    background-image: url("https://i.imgs.ovh/2026/04/13/Zd30vg.gif") !important;
    
    /* contain：保证动图完整显示在框内，绝不裁切 */
    background-size: contain !important; 
    background-position: center !important;
    background-repeat: no-repeat !important;
}

/* 7. 移动端适配（已修复原本多余标点导致的报错） */
@media (max-width: 480px) {
    .bg-gray-100\/90.relative.inline-block {
        padding: 0px 2px !important; 
    }
    .flex.items-center.justify-center.w-6.h-5 {
        /* 手机屏幕较窄，自动适应宽度，保持居中和留边 */
        width: 100% !important;
        height: 200px !important; 
        margin: 12px auto !important; 
    }
}

/* ==========================================
   8. 全局基础按钮：轻盈白底细黑框
   ========================================== */
button, 
[role="button"], 
a[role="button"],
[class*="MuiChip-root"] {
    background-color: #FFFFFF !important; 
    border: 1px solid #1A1A1A !important; 
    border-radius: 8px !important; 
    color: #1A1A1A !important; 
    padding: 6px 12px !important;
    margin: 4px !important;
    font-weight: 500 !important;
    box-shadow: none !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important; /* 防止边距撑爆容器 */
}

button svg, [role="button"] svg {
    color: #1A1A1A !important;
    fill: #1A1A1A !important;
}

button:hover { background-color: #F7F7F7 !important; }

/* ==========================================
   9. 对话操作小按钮：轻盈天蓝底白字 + 统一等大圆角矩形
   ========================================== */
div[class*="message"] button,
div[class*="chat"] button,
.group button,
.markdown-body ~ * button,
button[class*="text-gray-"],
button[class*="text-slate-"] {
    background-color: #0EA5E9 !important; /* 极其轻盈透亮的天蓝色 */
    border: 1px solid #0EA5E9 !important; /* 边框与底色融为一体，去除厚重感 */
    border-radius: 8px !important; /* 优雅的圆角矩形 */
    color: #FFFFFF !important; /* 纯白文字 */
    
    /* 核心：强制所有按钮等大对齐 */
    height: 32px !important; /* 统一高度 */
    min-width: 32px !important; /* 统一最小宽度，纯图标会变成正方形，带字会变成胶囊形 */
    padding: 0 6px !important; /* 靠高度支撑，左右留出适度呼吸感 */
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    
    opacity: 1 !important; 
    visibility: visible !important;
    box-shadow: 0 2px 6px rgba(14, 165, 233, 0.25) !important; /* 匹配天蓝色的轻盈阴影 */
}

/* 强制内部的 Icon 变白且大小统一 */
div[class*="message"] button svg,
.group button svg,
.markdown-body ~ * button svg {
    color: #FFFFFF !important;
    fill: #FFFFFF !important;
    stroke: #FFFFFF !important;
    width: 16px !important; 
    height: 16px !important;
}

/* 悬浮时变得更亮 */
div[class*="message"] button:hover,
.group button:hover {
    background-color: #38BDF8 !important; /* 悬浮时提亮为更浅的天蓝 */
    border-color: #38BDF8 !important;
    box-shadow: 0 4px 10px rgba(14, 165, 233, 0.4) !important;
}

/* ==========================================
   10. 核心：输入栏“双层画框”凸起效果 + 动态黑框
   ========================================== */
/* 【外层底座】 */
form:has(textarea) &gt; div,
div.relative:has(textarea),
div[class*="MuiInputBase-root"],
div[class*="MuiOutlinedInput-root"] {
    background-color: #FFFFFF !important;
    border-radius: 16px !important; 
    border: 1px solid #E5E5E5 !important; 
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04) !important;
    padding: 4px !important; 
    transition: all 0.3s ease !important;
    
    /* 核心修复：强制盒模型，保证内外框加起来不超过 100% 宽度 */
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important; 
}

/* 【内层输入区】 */
textarea,
fieldset[class*="MuiOutlinedInput-notchedOutline"] {
    border: 1.5px solid #CCCCCC !important; 
    border-radius: 12px !important; 
    background-color: #FAFAFA !important; 
    padding: 8px !important;
    transition: all 0.2s ease !important;
    
    /* 核心修复：保证文本域自身不越界 */
    width: 100% !important;
    box-sizing: border-box !important;
}

/* 【动态交互】：点击输入时变黑框 */
textarea:focus {
    border: 2px solid #000000 !important; 
    background-color: #FFFFFF !important; 
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05) !important; 
}

div[class*="Mui-focused"] fieldset[class*="MuiOutlinedInput-notchedOutline"] {
    border: 2px solid #000000 !important;
}

form:has(textarea:focus) &gt; div,
div.relative:has(textarea:focus),
div[class*="MuiInputBase-root"]:focus-within {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12), 0 4px 10px rgba(0, 0, 0, 0.06) !important;
    border-color: #D4D4D4 !important;
}

/* ==========================================
   11. 移动端终极适配 (彻底解决撑爆屏幕、按钮挤压问题)
   ========================================== */
@media (max-width: 768px) {
    /* 1. 顶部按钮区：允许换行，防止横向撑爆屏幕 */
    header, nav, div[class*="fixed"][class*="top-"] {
        display: flex !important;
        flex-wrap: wrap !important; /* 改为允许换行 */
        justify-content: flex-start !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 4px !important;
    }
    
    /* 2. 缩小全局按钮尺寸 */
    button, [role="button"], [class*="MuiChip-root"] {
        padding: 4px 8px !important;
        font-size: 12px !important;
        margin: 2px !important;
        border-radius: 6px !important;
        height: auto !important;
    }

    /* 3. 极致压缩蓝色小按钮，防止在消息下方占太多空间 */
    div[class*="message"] button,
    .group button,
    .markdown-body ~ * button {
        padding: 4px 6px !important;
        margin: 2px !important;
    }
    
    div[class*="message"] button svg,
    .group button svg {
        width: 14px !important;
        height: 14px !important;
    }
    
    /* 4. 移动端输入框：收缩内外边距，减弱阴影，完美贴合小屏幕 */
    form:has(textarea) &gt; div,
    div[class*="MuiInputBase-root"],
    div[class*="MuiOutlinedInput-root"] {
        padding: 2px !important; /* 外框厚度减半 */
        border-radius: 12px !important; /* 圆角改小 */
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04) !important; /* 阴影减弱，防止显得笨重 */
    }

    textarea,
    fieldset[class*="MuiOutlinedInput-notchedOutline"] {
        padding: 6px !important; /* 内框输入区留白减小 */
        border-radius: 8px !important;
        font-size: 14px !important; /* 字体适度调整 */
    }
}

/* =========================================
《春物》V4.2 究极感官引擎 (流式全端自适应版)
========================================= */

/* 1. 全局折叠面板 (引入 Clamp 流体排版) */
.dark-to-light-paper { 
    background-color: #ffffff; color: #333333; border: 1px solid #e0e0e0; border-radius: 6px; 
    margin-bottom: clamp(10px, 2vw, 15px); 
    padding: 0 clamp(12px, 3vw, 18px) clamp(12px, 3vw, 18px) clamp(12px, 3vw, 18px); 
    box-shadow: 0 2px 8px rgba(0,0,0,0.03); transition: all 0.3s ease; overflow: hidden; 
    font-family: 'Noto Serif SC', 'Songti SC', serif; line-height: 1.8; 
    font-size: clamp(14px, 1.2vw + 10px, 15.5px); /* 流体字体：手机14px，PC最大15.5px */
}
.dark-to-light-paper summary { 
    background-color: #2c303a; color: #f0f2f5; 
    padding: clamp(12px, 2.5vw, 15px) clamp(12px, 3vw, 18px); 
    margin: 0 calc(clamp(12px, 3vw, 18px) * -1); /* 动态负边距拉满 */
    font-weight: bold; font-size: clamp(1.05em, 1.5vw + 0.8em, 1.1em); 
    cursor: pointer; list-style: none; outline: none; transition: background 0.3s ease; 
    display: flex; align-items: center; 
}
.dark-to-light-paper summary::-webkit-details-marker { display: none; }
.dark-to-light-paper summary:hover { background-color: #3a404d; }
.dark-to-light-paper[open] summary { border-bottom: 1px solid #eeeeee; margin-bottom: clamp(10px, 2.5vw, 15px); }
.dark-to-light-paper blockquote { font-size: 0.9em; color: #888; border-left: 3px solid #3b719f; padding-left: 12px; margin: 10px 0 15px 0; font-style: italic; background: #f8f9fa; padding: 8px 12px; border-radius: 0 4px 4px 0; }

/* 🌟 2. 动态状态机专属图标 (Icon 流体自适应) */
.dark-to-light-paper summary::before { margin-right: clamp(6px, 1.5vw, 10px); font-size: clamp(1.1em, 2vw + 0.9em, 1.25em); display: inline-block; transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1); }
.summary-engine::before { content: '🌸'; color: #ffb7c5; text-shadow: none; filter: grayscale(30%); }
.dark-to-light-paper[open] .summary-engine::before { transform: rotate(360deg); filter: grayscale(0%); text-shadow: 0 0 10px #ffb7c5, 0 0 20px rgba(255,183,197,0.8); }
.summary-phone::before { content: '📱'; opacity: 0.6; filter: brightness(0.5); }
.dark-to-light-paper[open] .summary-phone::before { content: '📲'; opacity: 1; filter: brightness(1.2); }
.summary-user::before { content: '👤'; color: #888; }
.dark-to-light-paper[open] .summary-user::before { content: '🕵️‍♂️'; }
.summary-target::before { content: '📡'; opacity: 0.7; }
.dark-to-light-paper[open] .summary-target::before { content: '🎯'; transform: scale(1.1); }
.summary-offline::before { content: '🕸️'; opacity: 0.6; }
.dark-to-light-paper[open] .summary-offline::before { content: '✂️'; transform: rotate(-45deg); }
.summary-archive::before { content: '🗄️'; }
.dark-to-light-paper[open] .summary-archive::before { content: '📂'; }
.summary-choice::before { content: '🌫️'; }
.dark-to-light-paper[open] .summary-choice::before { content: '🧭'; transform: rotate(45deg); }

/* 🧠 3. 思维链高亮优化 */
.cot-step-title { background: linear-gradient(90deg, rgba(9, 132, 227, 0.1), transparent); border-left: 4px solid #0984e3; color: #0984e3; padding: 4px 10px; font-weight: 900; margin-top: 15px; margin-bottom: 8px; border-radius: 2px; display: inline-block; letter-spacing: 1px; }

/* 💥 4. 终极印章系统 (弹性侧边栏，自动折行居中) */
.dossier-sidebar { 
    display: flex; flex-direction: row; flex-wrap: wrap; /* 空间不足自动折行 */
    align-items: center; justify-content: flex-start; 
    gap: clamp(15px, 4vw, 30px); width: 100%; margin-bottom: 15px; flex-shrink: 0; 
}
.stamp-confidential, .stamp-target, .stamp-offline {
    position: relative;
    padding: clamp(6px, 1.5vw, 8px) clamp(10px, 2vw, 15px); 
    font-size: clamp(1.1em, 2vw + 0.8em, 1.3em); /* 印章文字流体缩放 */
    font-weight: 900; font-family: 'Noto Serif SC', 'Songti SC', serif;
    text-align: center; line-height: 1.1; z-index: 10; letter-spacing: 2px; border-radius: 4px;
    background: rgba(255, 255, 255, 0.95); box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.stamp-confidential { color: #d63031; border: 3px solid #d63031; transform: rotate(-8deg); }
.stamp-target { color: #e17055; border: 3px solid #e17055; transform: rotate(6deg); font-family: 'Courier New', monospace; }
.stamp-offline { color: #2d3436; border: 3px solid #2d3436; transform: rotate(-5deg); font-family: 'Courier New', monospace; }

/* 5. 统一信纸面板与布局 (智能网格重构) */
.anime-dossier { 
    position: relative; background: #fff; border: 2px solid #3b719f; border-radius: 4px; 
    padding: clamp(20px, 4vw, 25px) clamp(12px, 3vw, 15px) clamp(12px, 3vw, 15px) clamp(12px, 3vw, 15px); 
    margin-top: 15px; margin-bottom: 20px; 
    background-image: linear-gradient(rgba(59,113,159,0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(59,113,159,0.06) 1px, transparent 1px); background-size: 16px 16px; 
}
.anime-dossier::before { content: 'PROFILE.DAT'; position: absolute; top: -12px; left: 15px; background: #fff; padding: 0 8px; color: #3b719f; font-weight: bold; font-family: 'Courier New', monospace; }
.tape { position: absolute; top: -10px; left: 50%; transform: translateX(-50%) rotate(-2deg); width: clamp(90px, 20vw, 120px); height: clamp(20px, 5vw, 28px); background: rgba(255, 255, 255, 0.85); box-shadow: 0 1px 3px rgba(0,0,0,0.1); border: 1px solid rgba(0,0,0,0.05); z-index: 2; }
.dossier-layout { display: flex; flex-direction: column; gap: 0; position: relative; z-index: 1; }
.dossier-photo-box { width: clamp(110px, 25vw, 130px); padding: 6px; background: #fff; border: 1px solid #ccc; box-shadow: 2px 2px 6px rgba(0,0,0,0.15); position: relative; transform: rotate(-2deg); }
.mini-photo { transform: rotate(1.5deg); }
.paper-clip { position: absolute; top: -12px; left: 20px; width: 14px; height: 40px; border: 2px solid #888; border-radius: 12px; background: transparent; z-index: 3; box-shadow: 1px 1px 2px rgba(0,0,0,0.2); }
.photo-placeholder { width: 100%; height: clamp(120px, 28vw, 145px); background-color: #e0e6ed; border: 1px solid #ddd; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 120'%3E%3Cpath d='M50 20 c 15 0 20 15 20 30 c 0 20 -10 25 -20 25 c -10 0 -20 -5 -20 -25 c 0 -15 5 -30 20 -30 Z M 20 110 c 0 -25 15 -30 30 -30 c 15 0 30 5 30 30 Z' fill='%23aab8c6'/%3E%3Ctext x='50' y='65' font-family='monospace' font-size='14' fill='%23fff' text-anchor='middle' opacity='0.5'%3EIMAGE%3C/text%3E%3Ctext x='50' y='80' font-family='monospace' font-size='10' fill='%23fff' text-anchor='middle' opacity='0.5'%3EMISSING%3C/text%3E%3C/svg%3E"); background-size: cover; background-position: center; }
.photo-label { text-align: center; font-family: 'Courier New', monospace; font-size: 0.75em; color: #666; margin-top: 6px; letter-spacing: 1px; font-weight: bold; }
.character-motif { text-align: center; font-size: 1.4em; margin-top: 6px; letter-spacing: 4px; opacity: 0.85; filter: drop-shadow(1px 1px 1px rgba(0,0,0,0.1)); }

/* 🚀 核心自适应引擎：auto-fit 智能网格 */
.dossier-grid { 
    display: grid; 
    /* 魔法代码：最小宽度200px，空间够就并排，不够自动变单列，告别错位！ */
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); 
    gap: clamp(6px, 1.5vw, 8px); flex: 1; position: relative; z-index: 1; 
}
.d-item { background: rgba(255,255,255,0.9); border: 1px solid #d9d9d9; padding: clamp(4px, 1vw, 6px) clamp(8px, 2vw, 10px); font-size: 0.95em; border-radius: 2px; }
.d-full { grid-column: 1 / -1; } /* 满宽项目永远占满整行 */
.highlight-box { border-left: 3px solid #3b719f; background: rgba(244,248,251,0.95); }
.dossier-offline::after { content: 'NETWORK'; position: absolute; bottom: -5px; right: 5px; font-size: clamp(3em, 8vw, 4.5em); font-weight: 900; color: rgba(0,0,0,0.03); font-family: 'Courier New', monospace; pointer-events: none; z-index: 0; }
.pixel-name { position: absolute; top: -14px; right: 15px; background: #2c303a; color: #fff; font-family: 'Courier New', monospace; font-size: 0.85em; letter-spacing: 2px; padding: 2px 10px; border-radius: 2px; text-transform: uppercase; box-shadow: -2px 2px 0 #3b719f; z-index: 100; }

/* 🌟 空状态信纸化美化 (NO ONE / NO SIGNAL) */
.empty-state { 
    position: relative; background: #fff; border: 2px dashed #aab8c6; border-radius: 4px; 
    padding: clamp(30px, 8vw, 45px) 0; margin-top: 15px; margin-bottom: 20px;
    background-image: linear-gradient(rgba(59,113,159,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(59,113,159,0.05) 1px, transparent 1px);
    background-size: 16px 16px; text-align: center; font-family: 'Courier New', monospace; 
    font-size: clamp(1.4em, 4vw, 1.8em); color: rgba(59,113,159,0.25); letter-spacing: clamp(4px, 1.5vw, 8px); font-weight: 900; 
}
.empty-state::before { 
    content: 'RADAR_SCAN.DAT'; position: absolute; top: -12px; left: 15px; background: #fff; 
    padding: 0 8px; color: #aab8c6; font-size: 0.45em; font-weight: bold; 
    font-family: 'Courier New', monospace; letter-spacing: 1px; 
}

/* 📝 6. 记忆区：雪乃手写信纸增强 */
.yukinoshita-file { 
    background-color: #fdfdfd; background-image: repeating-linear-gradient(transparent, transparent 31px, #d1d8e0 31px, #d1d8e0 32px); 
    border: 1px solid #e0e0e0; border-left: 3px solid #ff7675; 
    padding: clamp(15px, 3vw, 20px) clamp(15px, 3vw, 20px) clamp(15px, 3vw, 20px) clamp(20px, 4vw, 30px); 
    border-radius: 2px 4px 4px 2px; box-shadow: 0 4px 6px rgba(0,0,0,0.02); 
}
.file-rule { font-size: 0.85em; color: #666; border-bottom: 2px dashed #ff7675; padding-bottom: 10px; margin-bottom: 15px; background: #fff; padding-left: 5px; }
.handwritten-log { font-family: 'Kaiti SC', 'STKaiti', 'KaiTi', '楷体', 'Caveat', cursive; font-size: 1.15em; color: #2c3e50; line-height: 32px; letter-spacing: 1px; }
.handwritten-log p { margin-bottom: 0; }

/* 📱 7. 手机部件高亮优化 (全端自适应宽) */
.device-phone-case { 
    background: #111; border-radius: clamp(12px, 3vw, 16px); 
    padding: clamp(6px, 1.5vw, 8px) clamp(6px, 1.5vw, 8px) clamp(10px, 3vw, 15px) clamp(6px, 1.5vw, 8px); 
    border: 2px solid #333; margin: 10px auto; 
    width: 100%; max-width: 380px; /* PC限制最大宽度保持手机感，手机端自动100% */
}
.phone-top-bar { display: flex; justify-content: space-between; color: #fff; font-size: 0.75em; padding: 0 10px 6px; }
.phone-screen-layout { display: flex; flex-direction: column; gap: 12px; background: #f0f2f5; padding: clamp(10px, 3vw, 15px); border-radius: 8px; }
.phone-widget { background: #fff; border-radius: 6px; padding: clamp(10px, 2.5vw, 12px); box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.widget-title { font-size: 0.85em; color: #555; font-weight: bold; border-bottom: 1px solid #eee; padding-bottom: 6px; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; }
.highlight-info { background: linear-gradient(120deg, #e0c3fc 0%, #8ec5fc 100%); color: #fff; font-weight: bold; padding: 3px 8px; border-radius: 4px; font-family: monospace; text-shadow: 0 1px 2px rgba(0,0,0,0.2); }
.app-item { font-size: 0.9em; padding: 8px 0; border-bottom: 1px dashed #f0f0f0; display: flex; align-items: center; }
.badge-new { background: #ff4757; color: #fff; font-size: 0.7em; padding: 2px 6px; border-radius: 10px; box-shadow: 0 2px 4px rgba(255,71,87,0.3); }
.badge-hot { background: linear-gradient(45deg, #ff6b81, #ff4757); color: #fff; font-size: 0.7em; padding: 2px 6px; border-radius: 4px; box-shadow: 0 2px 4px rgba(255,107,129,0.3); }
.badge-unread { background: #ff4757; color: white; border-radius: 10px; padding: 2px 7px; font-size: 0.75em; }
.tag-hot { color: #ff4757; font-weight: bold; border: 1px solid #ff4757; padding: 1px 5px; border-radius: 3px; font-size: 0.75em; margin-right: 8px; }
.tag-top { color: #ffa502; font-weight: 900; font-style: italic; margin-right: 8px; font-size: 0.85em; background: #fff3e0; padding: 2px 6px; border-radius: 3px; }
.sms-bubble { display: flex; gap: 10px; margin-bottom: 12px; }
.sms-avatar { width: 38px; height: 38px; border-radius: 50%; background-color: #dcdde1; background-size: cover; border: 2px solid #fff; box-shadow: 0 2px 4px rgba(0,0,0,0.1); flex-shrink: 0; }
.sms-content-box { flex: 1; min-width: 0; /* 防止文本溢出撑破Flex */ }
.sms-sender { display: flex; justify-content: space-between; font-size: 0.9em; margin-bottom: 4px; font-weight: bold; color: #2f3542; }
.sms-text { background: #f1f2f6; border: 1px solid #dfe4ea; padding: 8px 12px; border-radius: 0 12px 12px 12px; font-size: 0.9em; color: #57606f; word-break: break-all; }

/* 🎮 8. Galgame选项恢复与强化 */
.light-gal-choices { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; background: #f8f9fa; padding: clamp(15px, 4vw, 20px); border: 1px solid #e0e6ed; border-radius: 4px; position: relative; }
.gal-ui-corner { position: absolute; width: 15px; height: 15px; border: 2px solid #3b719f; pointer-events: none; }
.top-left { top: 5px; left: 5px; border-right: none; border-bottom: none; }
.top-right { top: 5px; right: 5px; border-left: none; border-bottom: none; }
.bottom-left { bottom: 5px; left: 5px; border-right: none; border-top: none; }
.bottom-right { bottom: 5px; right: 5px; border-left: none; border-top: none; }
.light-choice-item { background: #ffffff; border: 1px solid #d9e2ec; border-left: 4px solid #3b719f; padding: clamp(10px, 2.5vw, 12px) clamp(12px, 3vw, 15px); border-radius: 4px; color: #334e68; cursor: pointer; transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); box-shadow: 0 2px 4px rgba(0,0,0,0.02); font-family: 'Noto Serif SC', serif; font-weight: bold; position: relative; overflow: hidden; }
.choice-arrow { color: transparent; margin-right: 5px; transition: color 0.3s ease; }
.light-choice-item:hover { transform: translateX(10px) scale(1.02); border-left: 5px solid #ff7675; background: linear-gradient(to right, #ffffff, #fff5f5); box-shadow: 0 8px 15px rgba(0,0,0,0.08); color: #d63031; border-color: #ffb8b8; }
.light-choice-item:hover .choice-arrow { color: #d63031; }

/* 🎭 9. 沉浸式正文特效 */
.grid-sakura-paper { background-color: #fafafa; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' opacity='0.04'%3E%3Cpath d='M30,40 C45,15 75,30 60,60 C45,75 15,60 30,40 Z' fill='%23ffb7c5'/%3E%3Cpath d='M90,90 C105,65 135,80 120,110 C105,125 75,110 90,90 Z' fill='%23ffb7c5' transform='rotate(30 100 100)'/%3E%3C/svg%3E"), linear-gradient(#f0f0f0 1px, transparent 1px), linear-gradient(90deg, #f0f0f0 1px, transparent 1px); background-size: 200px 200px, 26px 26px, 26px 26px; border: 1px solid #eaeaea; border-radius: 4px; padding: clamp(20px, 5vw, 35px) clamp(15px, 4vw, 25px); margin-bottom: 20px; line-height: 2.2; color: #2c2c2c; font-family: 'Noto Serif SC', 'Songti SC', serif; text-align: justify; }
.grid-sakura-paper p { margin-bottom: 1.2em; text-indent: 2em; }
.dialogue { color: #4a69bd; font-weight: bold; background: linear-gradient(120deg, rgba(74,105,189,0.08) 0%, rgba(74,105,189,0.02) 100%); padding: 2px 6px; border-radius: 4px; border-bottom: 1px dashed rgba(74,105,189,0.4); text-indent: 0; display: inline; }

/* 🎵 10. 极客复古音频插件 (多维频谱特效) */
/* 基础音频框样式 */
.bgm, .bgm-nature, .bgm-city, .bgm-heartbeat { 
    display: block; text-align: center; font-family: 'Courier New', monospace; 
    background: #f4f4f4; border-left: 4px solid #3b719f; padding: clamp(10px, 2.5vw, 12px); margin: 15px 0; 
    color: #555; position: relative; font-size: 0.9em; box-shadow: inset 0 0 5px rgba(0,0,0,0.05); 
    text-indent: 0; border-radius: 0 4px 4px 0; word-break: break-all;
}
.bgm::before, .bgm-nature::before, .bgm-city::before, .bgm-heartbeat::before { 
    display: block; font-size: 0.9em; margin-bottom: 6px; font-weight: bold; animation: blink-text 1.5s infinite alternate; 
}
@keyframes blink-text { 0% { opacity: 0.6; } 100% { opacity: 1; text-shadow: 0 0 5px rgba(0,0,0,0.2); } }

/* 🎵 电子音/常规音乐 */
.bgm { border-left-color: #3b719f; }
.bgm::before { content: '▶ DIGITAL_AUDIO │ ▂ ▃ ▄ ▅ ▆ ▇ █'; color: #3b719f; }
/* 🍃 自然环境音 */
.bgm-nature { border-left-color: #27ae60; background: #f4fbf6; }
.bgm-nature::before { content: '🍃 AMBIENT_NATURE 〰〰 🎐 〰〰'; color: #27ae60; }
/* 🌆 城市/人群嘈杂音 */
.bgm-city { border-left-color: #e67e22; background: #fdfaf6; }
.bgm-city::before { content: '🌆 CITY_NOISE ▅ ▃ ▄ ▇ ▅ ▃ ▄'; color: #e67e22; }
/* 💓 心跳/极度紧张压抑 */
.bgm-heartbeat { border-left-color: #c0392b; background: #fbf4f4; }
.bgm-heartbeat::before { content: '💓 TENSION_SYNC ﮩ٨ـﮩﮩ٨ـ♡ﮩ٨ـﮩﮩ٨ـ'; color: #c0392b; }

/* 📱 论坛视窗 */
.bbs-view { background: #1e272e; color: #d2dae2; padding: clamp(12px, 3vw, 15px) clamp(15px, 4vw, 20px); font-family: 'Courier New', monospace; border-left: 4px solid #0fb9b1; margin: 15px 0; border-radius: 0 4px 4px 0; text-indent: 0; font-size: 0.95em; line-height: 1.6; box-shadow: inset 0 0 10px rgba(0,0,0,0.5); }
.bbs-view p { text-indent: 0; margin-bottom: 8px; }

/* 🎭 情绪台词特效 */
.whisper { color: #888; font-size: 0.9em; letter-spacing: 2px; font-style: italic; }
.rage { color: #d63031; font-weight: 900; font-size: 1.1em; text-shadow: 1px 1px 0px rgba(255,118,117,0.3); letter-spacing: -0.5px; }
.love { color: #e84393; text-shadow: 0 0 8px rgba(232, 67, 147, 0.3); }
.breakup { color: #2d3436; text-decoration: line-through; opacity: 0.6; }

/* 📜 11. 仪式感名言注脚 */
.end-quote { position: relative; margin-top: 40px; padding-top: 25px; text-align: center; font-family: 'Noto Serif SC', 'Songti SC', serif; color: #7f8fa6; font-size: 0.95em; letter-spacing: 2px; border-top: 1px solid rgba(0,0,0,0.08); font-style: italic; font-weight: bold; }
.end-quote::before { content: '🍂'; position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: #fff; padding: 0 10px; font-size: 1.2em; filter: grayscale(100%); opacity: 0.3; }

/* =========================================
12. 角色图库引擎 (动态头像映射)
========================================= */

/* 只要AI在HTML里输出了对应的拼音，CSS就会强制用这里的图片覆盖掉默认的剪影！ */

/* 比企谷八幡 */
.hachiman { background-image: url('https://iili.io/BLB7EIR.jpg') !important; }

/* 雪之下雪乃 */
.yukino { background-image: url('https://i.imgs.ovh/2026/04/12/Zd1cmX.jpeg') !important; }

/* 由比滨结衣 */
.yui { background-image: url('https://i.imgs.ovh/2026/04/12/Zd1rfQ.jpeg') !important; }

/* 一色伊吕波 */
.iroha { background-image: url('https://i.imgs.ovh/2026/04/12/Zd1Ly9.jpeg') !important; }

/* 比企谷小町 */
.komachi { background-image: url('https://i.imgs.ovh/2026/04/12/Zd1Ftm.jpeg') !important; }

/* 户冢彩加 */
.saika { background-image: url('https://iili.io/BpuS8Zb.jpg') !important; }

/* 平冢静 (静可爱) */
.shizuka { background-image: url('https://iili.io/Bstsi42.jpg') !important; }

/* 雪之下阳乃 */
.haruno { background-image: url('https://iili.io/Bsts6B4.jpg') !important; }

/* 雪之下母亲 */
.yukino_mom { background-image: url('https://iili.io/BsyyuiN.jpg') !important; }

/* 材木座义辉 */
.zaimokuza { background-image: url('https://iili.io/BspwP7j.jpg') !important; }

/* 由比滨母亲 */
.yui_mom { background-image: url('https://iili.io/Bsy9DRs.jpg') !important; }

/* 川崎沙希 */
.saki { background-image: url('https://iili.io/BLB6icN.jpg') !important; }

/* 叶山隼人 */
.hayama { background-image: url('https://iili.io/BLBLgeI.jpg') !important; }

/* 户部翔 */
.tobe { background-image: url('https://iili.io/BLn4vEv.jpg') !important; }

/* 三浦优美子 */
.yumiko { background-image: url('https://iili.io/BLnyFMN.jpg') !important; }

/* 海老名姬菜 */
.hina { background-image: url('https://iili.io/BLoHX8F.jpg') !important; }

/* 相模南 */
.sagami { background-image: url('https://iili.io/BsyLirb.jpg') !important; }

/* 城回巡 */
.meguri { background-image: url('https://iili.io/BsphUjS.jpg') !important; }

/* 比企谷母亲 */
.hachiman_mom { background-image: url('https://iili.io/Bpu4HcQ.jpg') !important; }

/* 雪之下夫人 */
.yukino_mom { background-image: url('https://iili.io/BsyyuiN.jpg') !important; }

/* 鹤见留美 */
.rumi { background-image: url('https://iili.io/BsyLPEu.jpg') !important; }

/* 川崎大志 */
.taishi { background-image: url('https://iili.io/BspiX5B.png') !important; }

/* 川崎京华 */
.keika { background-image: url('https://iili.io/BsppoWN.png') !important; }

/* 仲町千佳 */
.chika { background-image: url('https://iili.io/BLoKiN9.jpg') !important; }

/* 折本佳织 */
.kaori { background-image: url('https://iili.io/BsyUoB4.png') !important; }

/* 萨布雷 (由比滨家的狗) */
.sabre { background-image: url('https://iili.io/BLf3bYn.png') !important; }
/* 雪洞 (比企谷家的猫) */
.kamakura { background-image: url('https://iili.io/BLf3cvp.png') !important; }

/* 玉绳 */
.tamanawa { background-image: url('https://iili.io/BsyUCQf.png') !important; }

/* =========================================
   用户自定义头像图库 (防拦截预设版)
========================================= */
/* 提取了链接最后的那串字母作为专属标识 */
.avatar-BLf35IR { background-image: url('https://iili.io/BLf35IR.png') !important; }
.avatar-BLf3Amv { background-image: url('https://iili.io/BLf3Amv.png') !important; }
.avatar-BLf3ukJ { background-image: url('https://iili.io/BLf3ukJ.png') !important; }
.avatar-BLf3T7a { background-image: url('https://iili.io/BLf3T7a.png') !important; }
.avatar-BLf3Hge { background-image: url('https://iili.io/BLf3Hge.jpg') !important; }
.avatar-BLf3BLB { background-image: url('https://iili.io/BLf3BLB.png') !important; }
.avatar-BLf3Idg { background-image: url('https://iili.io/BLf3Idg.png') !important; }
.avatar-BLf3ddu { background-image: url('https://iili.io/BLf3ddu.png') !important; }
.avatar-BLf33ej { background-image: url('https://iili.io/BLf33ej.png') !important; }
.avatar-BLf3o11 { background-image: url('https://iili.io/BLf3o11.png') !important; }

/* 🚨 托底保障：极窄屏幕特化适配 (针对宽度&lt;400px的老旧手机) */
@media screen and (max-width: 400px) {
    .dossier-sidebar { justify-content: center; } /* 极小屏幕下头像和印章强制居中 */
    .stamp-confidential, .stamp-target, .stamp-offline { width: 100%; } /* 印章占满全宽 */

/* 让插入的头像图片完美覆盖默认占位图 */
.photo-placeholder img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
}
/* =========================================
   图片完整显示补丁 - 直接覆盖或追加
   ========================================= */

/* 针对使用背景图定义的角色 (如 .hachiman, .yukino 等) */
.photo-placeholder {
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-color: #f0f2f5 !important; /* 增加一个浅色底，防止图片比例不对时留白太难看 */
}

/* 针对在 HTML 中直接使用 <img> 标签的情况 */
.photo-placeholder img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important; /* 确保图片不被裁切 */
    object-position: center !important;
    background-color: #f0f2f5 !important;
}

/* 修正你原代码末尾可能存在的括号闭合错误 */
@media screen and (max-width: 400px) {
    .dossier-sidebar { justify-content: center !important; }
    .stamp-confidential, .stamp-target, .stamp-offline { width: 100% !important; }
}