/* ⚠ 转换警告 ════════════════════════════════════════
   4 处游离 .bg-gray-100\/90 已按通用气泡处理
═══════════════════════════════════════════════════ */

/* ═══ B平台加载动画适配（自动注入）═══ */
.flex.items-center.justify-center.size-6 { opacity: 1 !important; }
.flex.items-center.justify-center.size-6 > .flex.gap-2 { display: none !important; }
.is-assistant.w-fit { width: 100% !important; }
.is-assistant > .border.border-muted:has(.flex.items-center.justify-center.size-6) {
  width: 100% !important; background: transparent !important;
  border: none !important; padding: 0 !important;
}
.is-assistant .space-y-3:has(.flex.items-center.justify-center.size-6) {
  display: flex; justify-content: center; width: 100%;
}

/* ═══ B平台表格修正（自动注入）═══ */
.rili-markdown-renderer table { display:table!important; table-layout:auto!important; width:100%!important; border-collapse:collapse!important; }
.rili-markdown-renderer table caption { display:table-caption!important; caption-side:top!important; text-align:center!important; padding:8px!important; }
.rili-markdown-renderer thead { display:table-header-group!important; }
.rili-markdown-renderer tbody { display:table-row-group!important; }
.rili-markdown-renderer tr { display:table-row!important; }
.rili-markdown-renderer th, .rili-markdown-renderer td { display:table-cell!important; }

/* ═══ B平台按钮组保护（自动注入 — 防止按钮消失）═══
   原理：B平台消息操作按钮结构为：
   .flex.items-center.gap-1.ml-auto (hover显隐包装)
     └── .bg-muted.rounded.flex.p-0.5 (按钮组容器)
           └── button.rounded-full.size-7 (单个按钮)
   以下规则使用高specificity + !important确保按钮
   不被任何转换后/透传的CSS规则意外隐藏
   ═══════════════════════════════════════════════ */
/* 按钮组容器保护 */
.w-full.h-full.flex.group .bg-muted.rounded.flex.p-0\.5,
.is-user .bg-muted.rounded.flex.p-0\.5,
.is-assistant .bg-muted.rounded.flex.p-0\.5 {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  overflow: visible !important;
  position: relative !important;
  width: auto !important;
  height: auto !important;
  max-height: none !important;
  pointer-events: auto !important;
  clip: auto !important;
  clip-path: none !important;
}
/* 单个按钮保护 */
.w-full.h-full.flex.group .bg-muted.rounded.flex.p-0\.5 > button,
.is-user .bg-muted.rounded.flex.p-0\.5 > button,
.is-assistant .bg-muted.rounded.flex.p-0\.5 > button {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  position: relative !important;
  clip: auto !important;
  clip-path: none !important;
}
/* hover显隐包装层保护 — 仅保留B平台原生的opacity过渡 */
.flex.items-center.gap-1.ml-auto.md\:opacity-0.group-hover\:opacity-100 {
  visibility: visible !important;
  display: flex !important;
  pointer-events: auto !important;
  overflow: visible !important;
}
/* 操作行保护 */
.flex.w-full.items-center.justify-between.gap-2.px-2 {
  display: flex !important;
  visibility: visible !important;
  overflow: visible !important;
}

/* =================================================================
   PROJECT: WONDER_FILM_OS [Review_Fix_Ultimate]
   Target: RADIO:1956 / Universal Renderer
   Version: 3.0 (The "Nuclear" Patch)
   
   [Design Philosophy]
   Day:   Physical Paper, Ink, Tape, Analog Texture
   Night: Darkroom, Red Safe-light, Soft Charcoal, Scanlines
   ================================================================= */

/* --- [SECTION 0] 字体与核心变量库 (Variables) --- */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;700&family=Caveat:wght@400;700&family=Courier+Prime:wght@400;700&family=Ma+Shan+Zheng&display=swap');

/* 🌞 白天模式 (Day Mode) */
.Lemon-theme-output,
.mes_text { 
    /* 定义核心变量，供后续调用 */
    --w-bg: #fffaf0;        /* 纸张主色 */
    --w-card: #ffffff;      /* 卡片底色 */
    --w-text: #2d3436;      /* 主文字色 */
    --w-sub: #636e72;       /* 副文字色 */
    --w-border: #d4c5b0;    /* 边框色 */
    --w-accent: #ff6b6b;    /* 强调色(红) */
    --w-gold: #e09f3e;      /* 金色 */
    --w-blue: #74b9ff;      /* 蓝色 */
    
    --w-texture: 
        linear-gradient(rgba(0,0,0,0.02) 1px, transparent 1px), 
        linear-gradient(90deg, rgba(0,0,0,0.02) 1px, transparent 1px);
    --w-shadow: 2px 4px 10px rgba(0,0,0,0.05);
    --w-glow: 0 5px 15px rgba(224, 159, 62, 0.25);
}

/* 🌑 夜间模式 (Night Mode) - 温柔的黑 */
.dark .Lemon-theme-output,
.dark .mes_text {
    --w-bg: #141414;        /* 温柔炭黑 (非纯黑) */
    --w-card: #1c1c1c;      /* 稍微亮一点的卡片 */
    --w-text: #dcdde1;      /* 灰白文字 */
    --w-sub: #7f8fa6;       /* 灰蓝副字 */
    --w-border: #333333;    /* 暗淡边框 */
    --w-accent: #ff4757;    /* 暗房红光 */
    --w-gold: #ffa502;      /* 琥珀金 */
    --w-blue: #3742fa;      /* 氖蓝 */
    
    /* 纹理：去除方格，改为细腻的噪点 */
    --w-texture: 
        radial-gradient(transparent 95%, rgba(0,0,0,0.5) 100%),
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.1) 3px);
    --w-shadow: 0 4px 15px rgba(0,0,0,0.6);
    --w-glow: 0 0 20px rgba(255, 71, 87, 0.2);
}

/* --- [SECTION 1] 根容器强制重置 (Root Reset) --- */
/* 作用：无论外面套了什么层级，这里强制初始化背景 */
.Lemon-theme-output {
    display: block !important;
    position: relative !important;
    background-color: var(--w-bg) !important;
    background-image: var(--w-texture) !important;
    background-size: 20px 20px !important; /* 夜间模式会自动覆盖这个尺寸 */
    border: 1px solid var(--w-border) !important;
    border-radius: 6px !important;
    padding: 25px !important;
    color: var(--w-text) !important;
    font-family: 'Noto Serif SC', serif !important;
    box-shadow: var(--w-shadow) !important;
    overflow: visible !important; /* 允许浮窗溢出 */
    line-height: 1.6 !important;
}

/* 夜间模式纹理尺寸特化 */
.dark .Lemon-theme-output {
    background-size: 100% 100% !important;
}

/* --- [SECTION 2] 通用容器统一渲染 (The Universal Container) --- */
/* 🔴 核心修复：把所有的 details, summary, story-branch 全部抓起来强制渲染 */

/* 2.1 强制所有折叠框变成“实体卡片” */
.Lemon-theme-output details,
.Lemon-theme-output .story-branch {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    
    background-color: var(--w-card) !important;
    border: 1px solid var(--w-border) !important;
    border-radius: 6px !important;
    margin: 15px 0 20px 0 !important;
    padding: 0 !important;
    
    box-shadow: var(--w-shadow) !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    position: relative !important;
    z-index: 1 !important;
}

/* 2.2 悬停时的物理反馈：上浮+发光 */
.Lemon-theme-output details:hover,
.Lemon-theme-output .story-branch:hover {
    transform: translateY(-3px) !important;
    border-color: var(--w-accent) !important;
    box-shadow: var(--w-glow) !important;
    z-index: 10 !important;
}

/* 2.3 强制清除 Summary (标题栏) 的默认样式 */
.Lemon-theme-output summary,
.story-branch summary {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    
    background-color: rgba(0,0,0,0.03) !important;
    padding: 12px 18px !important;
    min-height: 24px !important;
    
    font-family: 'Courier Prime', monospace !important;
    font-weight: 700 !important;
    font-size: 0.95em !important;
    color: var(--w-sub) !important;
    
    border-bottom: 1px solid var(--w-border) !important;
    cursor: pointer !important;
    list-style: none !important; /* 杀掉默认三角 */
    outline: none !important;
}
.dark .Lemon-theme-output summary { background-color: rgba(255,255,255,0.03) !important; }

/* 2.4 彻底隐藏原生三角 (Chrome/Safari/Firefox) */
.Lemon-theme-output summary::-webkit-details-marker { display: none !important; }
.Lemon-theme-output summary::marker { content: none !important; }

/* 2.5 自定义开关图标 */
.Lemon-theme-output summary::after {
    content: '[+]';
    font-family: monospace !important;
    color: var(--w-accent) !important;
    font-weight: bold !important;
    margin-left: 10px !important;
}
.Lemon-theme-output details[open] summary::after {
    content: '[-]';
}

/* 2.6 内容区域修正 */
.Lemon-theme-output details > div,
.story-branch > div {
    padding: 15px !important;
    background: transparent !important;
    color: var(--w-text) !important;
}

/* --- [SECTION 3] 叙事正文 (Narrative) --- */
.Lemon-theme-output .text {
    font-size: 1.1em;
    line-height: 1.8;
    margin: 20px 0;
    color: var(--w-text);
    text-align: justify;
}

/* 角色对话染色 */
.npc-dialog { color: #27ae60 !important; font-weight: 700; }
.dark .npc-dialog { color: #2ecc71 !important; }

.user-dialog { color: #2980b9 !important; font-weight: 700; }
.dark .user-dialog { color: #3498db !important; }

.npc-thought {
    color: var(--w-accent) !important;
    font-family: 'KaiTi', 'Ma Shan Zheng', cursive !important;
    opacity: 0.9;
}

.sound-effect {
    font-family: 'Courier Prime', monospace !important;
    font-size: 0.8em !important;
    color: var(--w-blue) !important;
    background: rgba(0,0,0,0.05) !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    border-left: 2px solid var(--w-blue) !important;
    margin: 0 4px !important;
}
.dark .sound-effect { background: rgba(255,255,255,0.1) !important; }

/* --- [SECTION 4] 模块特化：邂逅相册 (Encounters) --- */
/* 对应你截图里的邂逅板块 */

/* 4.1 广播条 */
.news-strip {
    background: rgba(0,0,0,0.03) !important;
    border-left: 3px solid var(--w-accent) !important;
    padding: 10px !important;
    font-size: 0.85em !important;
    margin-bottom: 15px !important;
    font-family: 'Noto Serif SC', serif !important;
}
.news-tag {
    background: var(--w-accent) !important;
    color: #fff !important;
    padding: 1px 6px !important;
    border-radius: 3px !important;
    font-size: 0.8em !important;
    margin-right: 6px !important;
    font-weight: bold !important;
}

/* 4.2 VIP卡片 (小晴) */
.vip-card {
    background: var(--w-card) !important;
    border: 1px solid var(--w-border) !important;
    padding: 15px !important;
    margin-bottom: 15px !important;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.05) !important;
    transform: rotate(-1deg) !important;
    position: relative !important;
}
/* 胶带效果 */
.vip-card::before {
    content: '' !important; position: absolute !important; top: -8px !important; right: 20% !important;
    width: 60px !important; height: 16px !important;
    background: rgba(200,200,200,0.3) !important;
    transform: rotate(2deg) !important;
    backdrop-filter: blur(1px) !important;
    border-left: 1px dashed rgba(0,0,0,0.2) !important;
    border-right: 1px dashed rgba(0,0,0,0.2) !important;
}

.vip-head {
    display: flex !important; justify-content: space-between !important;
    border-bottom: 1px dashed var(--w-border) !important;
    padding-bottom: 5px !important; margin-bottom: 8px !important;
}
.vip-name { font-size: 1.1em !important; font-weight: 900 !important; }
.vip-stat { font-family: 'Courier Prime', monospace !important; color: var(--w-gold) !important; font-size: 0.8em !important; }

/* 4.3 守望者网格 (Cast Grid) */
.cast-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
}
.cast-card {
    background: rgba(0,0,0,0.02) !important;
    border: 1px solid var(--w-border) !important;
    padding: 10px !important;
    font-size: 0.85em !important;
    text-align: center !important;
    border-radius: 4px !important;
    cursor: help !important;
    position: relative !important;
}
.cast-role { font-weight: bold !important; display: block !important; margin-bottom: 4px !important; }
.cast-status { color: var(--w-blue) !important; display: block !important; }

/* --- [SECTION 5] 模块特化：镜头聚焦 (Viewfinder) --- */
/* 5.1 顶部黑条 */
.cam-bar {
    background: #111 !important;
    color: #fff !important;
    padding: 10px 15px !important;
    font-family: 'Courier Prime', monospace !important;
    font-size: 0.85em !important;
    display: flex !important; justify-content: space-between !important;
    border-bottom: 2px solid var(--w-accent) !important;
    margin-bottom: 15px !important;
    border-radius: 4px !important;
}
.c-item b { color: #fff !important; }
.c-subj { color: var(--w-accent) !important; }

/* 5.2 侧写区 */
.view-box {
    border-left: 2px solid var(--w-border) !important;
    padding-left: 15px !important;
    margin-bottom: 15px !important;
    font-style: italic !important;
}

/* 5.3 标签云 */
.tag-cloud { display: flex !important; flex-wrap: wrap !important; gap: 8px !important; margin-bottom: 15px !important; }
.a-tag {
    padding: 4px 8px !important;
    border-bottom: 1px solid var(--w-border) !important;
    font-size: 0.85em !important;
    color: var(--w-sub) !important;
    cursor: help !important;
    position: relative !important;
}
.a-tag:hover { color: var(--w-accent) !important; border-bottom-color: var(--w-accent) !important; }

/* 5.4 决定性瞬间 */
.moment-card {
    background: var(--w-bg) !important;
    border-left: 4px solid var(--w-accent) !important;
    padding: 15px !important;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.05) !important;
}
.moment-note {
    font-family: 'Caveat', cursive !important;
    color: var(--w-accent) !important;
    font-size: 1.2em !important;
    margin-top: 10px !important;
    padding-top: 8px !important;
    border-top: 1px dashed var(--w-border) !important;
}

/* --- [SECTION 6] 模块特化：手账与星记忆 (Journal & Memory) --- */
/* 6.1 手账内页 */
.journal-ui .film-header {
    background: #1e1e1e !important;
    color: #eee !important;
    padding: 10px 15px !important;
    font-family: 'Courier Prime', monospace !important;
    font-size: 0.8em !important;
    display: flex !important; justify-content: space-between !important;
    border-bottom: 3px solid var(--w-accent) !important;
}

.scrap-list {
    background: var(--w-card) !important;
    padding: 15px !important; margin: 0 !important; list-style: none !important;
}
.scrap-item {
    background: var(--w-bg) !important;
    border: 1px solid var(--w-border) !important;
    padding: 10px !important;
    margin-bottom: 10px !important;
    box-shadow: 1px 1px 3px rgba(0,0,0,0.1) !important;
    transform: rotate(-0.5deg) !important;
    transition: transform 0.2s !important;
}
.scrap-item:hover { transform: rotate(0) scale(1.02) !important; z-index: 10 !important; }

/* 6.2 星记忆表格 */
.Lemon-theme-output table {
    width: 100% !important; border-collapse: collapse !important; margin: 10px 0 !important;
}
.Lemon-theme-output th {
    background: rgba(0,0,0,0.05) !important;
    border: 1px solid var(--w-border) !important;
    padding: 8px !important; text-align: left !important;
    font-family: 'Courier Prime', monospace !important;
    font-size: 0.9em !important;
}
.dark .Lemon-theme-output th { background: #2f2f2f !important; color: #fff !important; }
.Lemon-theme-output td {
    border: 1px solid var(--w-border) !important; padding: 8px !important; font-size: 0.9em !important;
}

/* --- [SECTION 7] NEXT STEP (终极渲染修复) --- */
/* 确保这个容器绝对不会因为 HTML 结构问题而隐形 */

.story-branch {
    /* 强制显示 */
    display: block !important;
    opacity: 1 !important; 
    margin-top: 30px !important;
    
    /* 强制应用卡片样式 */
    background-color: var(--w-card) !important;
    border: 1px solid var(--w-border) !important;
    box-shadow: var(--w-shadow) !important;
}

/* 7.1 标题栏特化 */
.story-branch summary {
    color: var(--w-accent) !important;
    border-bottom: 2px dashed var(--w-accent) !important;
}
.story-branch summary::after {
    content: '⚡' !important; /* 闪电图标 */
    color: var(--w-accent) !important;
    margin-left: auto !important;
}

/* 7.2 选项按钮 (Physical Keys) */
.opt-btn {
    display: block !important;
    background-color: var(--w-bg) !important;
    border: 1px solid var(--w-border) !important;
    padding: 12px 15px !important;
    margin-bottom: 10px !important;
    border-radius: 4px !important;
    
    color: var(--w-text) !important;
    font-weight: 700 !important;
    font-family: 'Noto Serif SC', serif !important;
    
    cursor: pointer !important;
    transition: all 0.2s !important;
    box-shadow: 0 2px 0 var(--w-border) !important; /* 物理按键厚度 */
    position: relative !important;
}

/* 按钮悬停 */
.opt-btn:hover {
    transform: translateY(2px) !important; /* 按下效果 */
    box-shadow: 0 0 0 var(--w-border) !important; /* 阴影消失 */
    border-color: var(--w-accent) !important;
    color: var(--w-accent) !important;
    background-color: var(--w-card) !important;
}

/* --- [SECTION 8] 浮窗系统 (Universal Popups) --- */
/* 适用于印章、贴纸、特质的悬停提示 */
.note-pop {
    position: absolute !important;
    bottom: 125% !important; left: 50% !important;
    transform: translateX(-50%) translateY(10px) !important;
    width: 200px !important;
    
    background: #000 !important; /* P5 纯黑 */
    border: 1px solid var(--w-accent) !important;
    color: #fff !important;
    padding: 12px !important;
    
    font-size: 0.85em !important;
    line-height: 1.4 !important;
    text-align: left !important;
    z-index: 9999 !important;
    
    opacity: 0 !important; visibility: hidden !important; pointer-events: none !important;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    box-shadow: 6px 6px 0 var(--w-accent) !important; /* 硬投影 */
}

/* 浮窗小三角 */
.note-pop::after {
    content:'' !important; position:absolute !important; top:100% !important; left:50% !important; margin-left:-6px !important;
    border-width:6px !important; border-style:solid !important;
    border-color: var(--w-accent) transparent transparent transparent !important;
}

/* 悬停触发 */
.t-stamp:hover .note-pop,
.a-tag:hover .note-pop,
.i-sticker:hover .note-pop,
.vip-card:hover .note-pop {
    opacity: 1 !important; visibility: visible !important;
    transform: translateX(-50%) translateY(0) !important;
}

/* --- [SECTION 9] 印章与贴纸 (Stamps & Stickers) --- */
.p-talents { display: flex !important; justify-content: space-around !important; overflow: visible !important; padding: 10px !important; }

.t-stamp {
    width: 65px !important; height: 65px !important;
    border: 3px double var(--w-gold) !important;
    border-radius: 50% !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    color: var(--w-gold) !important;
    font-family: 'Courier Prime', monospace !important;
    font-weight: 900 !important;
    font-size: 0.7em !important;
    transform: rotate(-10deg) !important;
    opacity: 0.7 !important;
    background: radial-gradient(transparent 60%, rgba(224, 159, 62, 0.1)) !important;
    position: relative !important; cursor: help !important;
    transition: all 0.3s !important;
}
.t-stamp:hover { opacity: 1 !important; transform: scale(1.1) rotate(0) !important; background: var(--w-card) !important; z-index: 100 !important; }

.i-box { display: flex !important; flex-wrap: wrap !important; gap: 8px !important; overflow: visible !important; }
.i-sticker {
    background: var(--w-card) !important;
    border: 1px solid var(--w-border) !important;
    padding: 4px 10px !important; border-radius: 4px !important;
    font-size: 0.85em !important; font-weight: 700 !important;
    transform: rotate(2deg) !important; cursor: help !important;
    position: relative !important;
}
.i-sticker:hover { z-index: 100 !important; border-color: var(--w-accent) !important; color: var(--w-accent) !important; transform: scale(1.1) rotate(0) !important; }

/* --- [SECTION 10] 手写便签 (Handwritten Note) --- */
.msg-note {
    background: #fffdf5 !important;
    padding: 15px 20px !important; margin: 15px auto !important;
    font-family: 'Caveat', cursive !important;
    font-size: 1.2em !important; color: #444 !important;
    box-shadow: 2px 3px 6px rgba(0,0,0,0.1) !important;
    transform: rotate(-1deg) !important; position: relative !important;
    max-width: 90% !important; border: 1px solid rgba(0,0,0,0.05) !important;
}
.msg-note::before {
    content: '' !important; position: absolute !important; top: -10px !important; left: 50% !important;
    width: 50px !important; height: 15px !important;
    background: rgba(255,255,255,0.4) !important;
    border: 1px solid rgba(0,0,0,0.1) !important;
    transform: translateX(-50%) rotate(2deg) !important;
}

/* 选中文本高亮 */
::selection { background: rgba(255, 107, 107, 0.3) !important; }

/* End of WONDER_FILM_OS (Nuclear Patch) */

/* =================================================================
   [PATCH] 渲染丢失定向修复补丁
   针对：Focus Ring, VIP Card, Moment Card, Cast Grid
   ================================================================= */

/* --- 1. 修复【世界正在为你让路】(Focus Ring) --- */
/* 现在的它看起来像普通文字，我们要把它变成“HUD 锁定框” */
.focus-ring {
    display: block !important;
    background: #000 !important; /* 强制纯黑底 */
    border: 2px solid #ff4757 !important; /* 强制红框 */
    padding: 15px !important;
    margin: 15px 0 !important;
    border-radius: 4px !important;
    position: relative !important;
    box-shadow: 0 0 15px rgba(255, 71, 87, 0.2) !important; /* 红光 */
    font-family: 'Courier Prime', monospace !important;
    text-align: center !important;
    color: #ff4757 !important; /* 强制红字 */
}

/* 添加动态扫描线装饰 */
.focus-ring::after {
    content: '';
    position: absolute; top: 0; left: 0; width: 100%; height: 2px;
    background: #ff4757;
    opacity: 0.5;
    animation: scan-move 2s linear infinite;
    pointer-events: none;
}
@keyframes scan-move { 0% {top:0;} 100% {top:100%;} }

/* --- 2. 修复【邂逅相册】内部卡片透明问题 --- */
/* 强制给 VIP 卡片上色 */
.vip-card {
    display: block !important;
    background-color: #1e1e1e !important; /* 比背景亮一点的黑 */
    border: 1px solid #444 !important;
    padding: 15px !important;
    margin-bottom: 15px !important;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.3) !important;
}
/* 修复 VIP 卡片里的文字颜色 */
.vip-head, .vip-body { color: #dcdde1 !important; }
.vip-name { font-weight: 900 !important; font-size: 1.1em !important; color: #fff !important; }

/* 强制给路人卡片 (Cast Card) 上色 */
.cast-card {
    background-color: rgba(255,255,255,0.05) !important;
    border: 1px solid #333 !important;
    padding: 10px !important;
    border-radius: 4px !important;
    text-align: center !important;
}
.cast-role { color: #fff !important; font-weight: bold !important; display: block !important; }

/* --- 3. 修复【镜头聚焦】内部卡片问题 --- */
/* 强制给侧写区 (View Box) 加边框 */
.view-box {
    border-left: 3px solid #ff6b6b !important;
    background: rgba(0,0,0,0.2) !important;
    padding: 10px 15px !important;
    margin-bottom: 15px !important;
    color: #ccc !important;
    font-style: italic !important;
}

/* 强制给“决定性瞬间” (Moment Card) 上色 */
.moment-card {
    display: block !important;
    background-color: #1e1e1e !important; /* 实体卡片色 */
    border-left: 4px solid #ff4757 !important;
    padding: 15px !important;
    margin-top: 15px !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3) !important;
}

/* --- 4. 修复广播条 (News Strip) --- */
.news-strip {
    display: block !important;
    background-color: rgba(255, 71, 87, 0.1) !important; /* 淡红背景 */
    border-left: 3px solid #ff4757 !important;
    padding: 10px !important;
    margin-bottom: 15px !important;
    color: #aaa !important;
}

/* --- 5. 修复标签云 (Tags) --- */
.tag-cloud { display: flex !important; flex-wrap: wrap !important; gap: 8px !important; }
.a-tag {
    background: #222 !important;
    border: 1px solid #444 !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
    color: #888 !important;
}
.a-tag:hover { border-color: #ff4757 !important; color: #fff !important; }

/* =================================================================
   PROJECT: WONDER_FILM_OS [Module: Journal]
   Target: wt-* classes (Unique Namespace)
   ================================================================= */

/* --- 0. 核心变量 (日夜切换) --- */
.Lemon-theme-output {
    --wt-bg: #fffaf0;       /* 白天：米色纸 */
    --wt-card: #ffffff;     /* 白天：卡片白 */
    --wt-text: #2d3436;     /* 白天：墨水黑 */
    --wt-border: #d4c5b0;   /* 白天：纸边框 */
    --wt-accent: #ff6b6b;   /* 强调红 */
    --wt-gold: #e09f3e;     /* 金色 */
    --wt-hud-bg: #000000;   /* HUD背景 */
}

.dark .Lemon-theme-output {
    --wt-bg: #141414;       /* 夜间：温柔黑 */
    --wt-card: #1e1e1e;     /* 夜间：卡片灰 */
    --wt-text: #dcdde1;     /* 夜间：灰白字 */
    --wt-border: #333333;   /* 夜间：暗边框 */
    --wt-accent: #ff4757;   /* 夜间：荧光红 */
    --wt-gold: #ffa502;     /* 夜间：琥珀金 */
    --wt-hud-bg: #000000;   /* HUD背景保持黑 */
}

/* --- 1. 外层容器 (Journal Box) --- */
.wt-journal-box {
    display: block !important;
    background: var(--wt-bg) !important;
    border: 1px solid var(--wt-border) !important;
    border-radius: 6px !important;
    margin: 15px 0 !important;
    padding: 0 !important;
    box-shadow: 2px 4px 10px rgba(0,0,0,0.05) !important;
    overflow: hidden !important; /* 防止内容溢出圆角 */
}

/* 标题栏 */
.wt-journal-box summary {
    background: rgba(0,0,0,0.03) !important;
    padding: 10px 15px !important;
    font-family: 'Courier Prime', monospace !important;
    font-weight: 700 !important;
    color: var(--wt-text) !important;
    border-bottom: 1px solid var(--wt-border) !important;
    list-style: none !important;
    cursor: pointer !important;
}
.wt-journal-box summary::-webkit-details-marker { display: none !important; }

/* 内容区 */
.wt-journal-content {
    padding: 0 !important;
}

/* --- 2. 顶部相机条 (Film Header) --- */
.wt-film-header {
    background: #111 !important; /* 永远纯黑 */
    color: #eee !important;
    padding: 8px 15px !important;
    font-family: 'Courier Prime', monospace !important;
    font-size: 0.85em !important;
    display: flex !important;
    justify-content: space-between !important;
    border-bottom: 3px solid var(--wt-accent) !important;
}
.wt-highlight { color: var(--wt-accent) !important; }
.wt-sep { opacity: 0.5; margin: 0 5px; }

/* --- 3. 剪贴列表 (Scrap List) --- */
.wt-scrap-list {
    padding: 15px !important;
    background: var(--wt-bg) !important; /* 确保背景色正确 */
}

/* 通用物品卡片 */
.wt-scrap-item {
    background: var(--wt-card) !important;
    border: 1px solid var(--wt-border) !important;
    padding: 10px !important;
    margin-bottom: 12px !important;
    box-shadow: 1px 1px 3px rgba(0,0,0,0.1) !important;
    font-family: 'Noto Serif SC', serif !important;
    font-size: 0.9em !important;
    color: var(--wt-text) !important;
    position: relative !important;
}

/* [特化] 车票 */
.wt-type-ticket {
    border-left: 4px solid var(--wt-gold) !important;
    background-image: radial-gradient(circle at 100% 50%, transparent 4px, var(--wt-card) 5px) !important;
    background-size: 10px 100% !important;
    background-position: right !important;
    background-repeat: repeat-y !important;
}
.wt-item-id { float: right; font-size: 0.8em; opacity: 0.7; font-family: monospace; }
.wt-gold { color: var(--wt-gold) !important; }

/* [特化] 广播 */
.wt-type-radio {
    border-left: 4px solid #74b9ff !important;
}
.wt-item-italic { font-style: italic; opacity: 0.9; }

/* [特化] 手写便签 */
.wt-type-note {
    background: transparent !important;
    border: none !important;
    border-bottom: 1px dashed var(--wt-border) !important;
    box-shadow: none !important;
    transform: rotate(-1deg) !important;
}
.wt-handwriting {
    font-family: 'Caveat', cursive !important; /* 手写字体 */
    font-size: 1.2em !important;
    color: var(--wt-accent) !important; /* 用红色墨水 */
}

/* --- 4. 底部：世界让路 HUD (Focus Ring) [重点修复] --- */
.wt-focus-ring {
    display: block !important; /* 强制显示 */
    background: var(--wt-hud-bg) !important; /* 强制黑底 */
    border: 1px solid var(--wt-accent) !important;
    border-radius: 4px !important;
    margin: 15px !important;
    padding: 15px !important;
    text-align: center !important;
    position: relative !important;
    overflow: hidden !important;
    box-shadow: 0 0 10px rgba(255, 71, 87, 0.3) !important; /* 红光晕 */
}

.wt-focus-main {
    color: var(--wt-accent) !important;
    font-family: 'Noto Serif SC', serif !important;
    font-weight: bold !important;
    font-size: 1.1em !important;
    position: relative; z-index: 2;
}

.wt-focus-sub {
    color: var(--wt-accent) !important;
    font-family: 'Courier Prime', monospace !important;
    font-size: 0.75em !important;
    opacity: 0.7;
    margin-top: 5px;
    position: relative; z-index: 2;
}

/* 扫描线动画 */
.wt-focus-scanline {
    position: absolute !important;
    top: 0; left: 0; width: 100%; height: 2px;
    background: var(--wt-accent) !important;
    opacity: 0.5;
    animation: wt-scan 2s linear infinite;
    pointer-events: none;
}
@keyframes wt-scan { 0% {top:0;} 100% {top:100%;} }

/* =================================================================
   PROJECT: WONDER_FILM_OS [Module: Profile]
   Target: wt-profile-box & children
   ================================================================= */

/* 1. 容器架构 */
.wt-profile-box {
    display: block !important;
    background: var(--wt-card) !important; /* 继承白天的卡片白/夜间的卡片灰 */
    border: 1px solid var(--wt-border) !important;
    border-radius: 6px !important;
    margin: 15px 0 !important;
    box-shadow: 2px 4px 10px rgba(0,0,0,0.05) !important;
}

.wt-profile-box summary {
    background: rgba(0,0,0,0.03) !important;
    padding: 10px 15px !important;
    font-family: 'Courier Prime', monospace !important;
    font-weight: 700 !important;
    color: var(--wt-text) !important;
    border-bottom: 1px solid var(--wt-border) !important;
    list-style: none !important;
    cursor: pointer !important;
}
.wt-profile-box summary::-webkit-details-marker { display: none !important; }

.wt-profile-content {
    padding: 15px !important;
    overflow: visible !important; /* 关键：允许弹窗飞出去 */
}

/* 分隔标题 */
.wt-section-header {
    font-size: 0.8em !important;
    font-weight: bold !important;
    color: var(--wt-sub) !important; /* 副标题色 */
    border-bottom: 2px dashed var(--wt-border) !important;
    padding-bottom: 5px !important;
    margin: 20px 0 10px 0 !important;
    font-family: 'Courier Prime', monospace !important;
    letter-spacing: 1px !important;
}
.wt-section-header:first-child { margin-top: 0 !important; }

/* --- 2. 旅人特质 (Stamps) --- */
.wt-traits-container {
    display: flex !important;
    justify-content: space-around !important;
    padding: 10px !important;
}

.wt-stamp {
    width: 70px !important; height: 70px !important;
    border: 3px double var(--wt-gold) !important;
    border-radius: 50% !important;
    display: flex !important; flex-direction: column !important;
    align-items: center !important; justify-content: center !important;
    color: var(--wt-gold) !important;
    font-family: 'Courier Prime', monospace !important;
    font-weight: 900 !important;
    font-size: 0.75em !important;
    transform: rotate(-8deg) !important;
    opacity: 0.8 !important;
    background: radial-gradient(transparent 60%, rgba(224, 159, 62, 0.1)) !important;
    cursor: help !important;
    position: relative !important;
    transition: all 0.3s !important;
}

/* 印章悬停 */
.wt-stamp:hover {
    opacity: 1 !important;
    transform: scale(1.1) rotate(0) !important;
    background: var(--wt-bg) !important;
    z-index: 100 !important;
    box-shadow: 0 0 15px rgba(224, 159, 62, 0.4) !important;
    border-color: var(--wt-accent) !important; /* 悬停变红 */
    color: var(--wt-accent) !important;
}

/* --- 3. 速写 (Sketch) --- */
.wt-sketch-text {
    padding: 10px !important;
    background: var(--wt-bg) !important;
    border: 1px solid var(--wt-border) !important;
    font-style: italic !important;
    margin-bottom: 10px !important;
    font-size: 0.9em !important;
    color: var(--wt-text) !important;
    position: relative !important;
}
.wt-sketch-text::after {
    content: '📎' !important; position: absolute !important; top: -10px !important; right: 5px !important; font-size: 1.2em !important;
}

.wt-outfit-grid {
    display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 8px !important;
}

.wt-outfit-tag {
    font-size: 0.85em !important;
    padding: 4px 8px !important;
    border-bottom: 1px solid var(--wt-border) !important;
    color: var(--wt-text) !important;
    cursor: help !important;
    position: relative !important;
}
.wt-outfit-tag:hover {
    color: var(--wt-accent) !important;
    border-color: var(--wt-accent) !important;
}

/* --- 4. 行囊 (Backpack) --- */
.wt-inventory-box {
    display: flex !important; flex-wrap: wrap !important; gap: 8px !important;
}

.wt-sticker {
    background: var(--wt-card) !important;
    border: 1px solid var(--wt-border) !important;
    padding: 4px 10px !important;
    border-radius: 4px !important;
    font-size: 0.85em !important;
    font-weight: 700 !important;
    transform: rotate(2deg) !important;
    cursor: help !important;
    position: relative !important;
    box-shadow: 1px 1px 2px rgba(0,0,0,0.1) !important;
}
.wt-sticker:nth-child(even) { transform: rotate(-1deg) !important; }

/* 贴纸悬停 */
.wt-sticker:hover {
    transform: scale(1.1) rotate(0) !important;
    z-index: 100 !important;
    border-color: var(--wt-accent) !important;
    color: var(--wt-accent) !important;
}

/* --- 5. 通用弹窗系统 (P5 Style Popups) --- */
/* 这是最关键的部分，确保所有元素的悬浮提示一致且酷炫 */
.wt-pop {
    position: absolute !important;
    bottom: 125% !important; left: 50% !important;
    transform: translateX(-50%) translateY(10px) !important; /* 初始下沉 */
    width: 180px !important;
    
    background: #000 !important; /* 无论日夜，弹窗永远黑 */
    border: 1px solid var(--wt-accent) !important;
    color: #fff !important;
    padding: 8px 10px !important;
    
    font-size: 0.85em !important;
    line-height: 1.4 !important;
    text-align: left !important;
    font-family: 'Noto Serif SC', serif !important;
    font-weight: normal !important;
    font-style: normal !important;
    
    opacity: 0 !important; 
    visibility: hidden !important; 
    pointer-events: none !important;
    z-index: 9999 !important;
    
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    box-shadow: 5px 5px 0 var(--wt-accent) !important; /* 硬投影 */
}

/* 弹窗小标题 (SYSTEM_LOG) */
.wt-pop-title {
    font-family: 'Courier Prime', monospace !important;
    font-size: 0.7em !important;
    color: var(--wt-accent) !important;
    border-bottom: 1px dashed #555 !important;
    margin-bottom: 4px !important;
    padding-bottom: 2px !important;
    font-weight: bold !important;
}

/* 弹窗小三角 */
.wt-pop::after {
    content: '' !important; position: absolute !important; top: 100% !important; left: 50% !important; margin-left: -5px !important;
    border-width: 5px !important; border-style: solid !important;
    border-color: var(--wt-accent) transparent transparent transparent !important;
}

/* 触发显示逻辑 */
.wt-stamp:hover .wt-pop,
.wt-outfit-tag:hover .wt-pop,
.wt-sticker:hover .wt-pop {
    opacity: 1 !important; 
    visibility: visible !important;
    transform: translateX(-50%) translateY(0) !important; /* 上浮 */
}

/* =================================================================
   PROJECT: WONDER_FILM_OS [Module: Next Step]
   Target: wt-step-box & wt-opt-btn
   ================================================================= */

/* 1. 容器架构 */
.wt-step-box {
    display: block !important; /* 强制显示，防止渲染失败 */
    opacity: 1 !important;
    visibility: visible !important;
    
    background: var(--wt-card) !important;
    border: 1px solid var(--wt-border) !important;
    border-radius: 6px !important;
    margin-top: 30px !important; /* 与上方拉开距离 */
    margin-bottom: 15px !important;
    
    box-shadow: 2px 4px 15px rgba(0,0,0,0.08) !important; /* 更深的投影 */
    position: relative !important;
    z-index: 5 !important;
}

/* 标题栏 */
.wt-step-box summary {
    background: rgba(0,0,0,0.02) !important;
    padding: 12px 15px !important;
    font-family: 'Courier Prime', monospace !important;
    font-weight: 700 !important;
    font-size: 1em !important;
    color: var(--wt-accent) !important; /* 使用强调色(红) */
    border-bottom: 2px dashed var(--wt-accent) !important; /* 虚线分割 */
    list-style: none !important;
    cursor: pointer !important;
    outline: none !important;
}
.wt-step-box summary::-webkit-details-marker { display: none !important; }

/* 标题栏右侧闪电图标 */
.wt-step-box summary::after {
    content: '⚡' !important;
    float: right !important;
    opacity: 0.8 !important;
}

/* 内容区内边距 */
.wt-step-content {
    padding: 15px !important;
}

/* --- 2. 选项按钮 (Physical Keys) --- */
.wt-opt-btn {
    display: block !important;
    position: relative !important;
    
    background: var(--wt-bg) !important; /* 纸张背景 */
    border: 1px solid var(--wt-border) !important;
    border-left: 4px solid var(--wt-border) !important; /* 左侧加粗，像书签 */
    
    padding: 12px 15px 12px 45px !important; /* 左边留空给序号 */
    margin-bottom: 10px !important;
    border-radius: 4px !important;
    
    font-family: 'Noto Serif SC', serif !important;
    font-weight: 600 !important;
    color: var(--wt-text) !important;
    font-size: 0.95em !important;
    
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    box-shadow: 0 2px 0 var(--wt-border) !important; /* 物理按键厚度 */
    user-select: text !important; /* 允许复制文本 */
}

/* 自动生成序号 A, B, C... */
.wt-opt-btn::before {
    content: attr(data-key) !important; /* 读取 HTML 里的 data-key */
    position: absolute !important;
    left: 10px !important; top: 50% !important;
    transform: translateY(-50%) !important;
    
    width: 24px !important; height: 24px !important;
    background: var(--wt-border) !important;
    color: var(--wt-card) !important;
    
    border-radius: 4px !important;
    text-align: center !important;
    line-height: 24px !important;
    font-family: 'Courier Prime', monospace !important;
    font-weight: bold !important;
    font-size: 0.9em !important;
    transition: all 0.2s !important;
}

/* 关键标签高亮 [牵手] */
.wt-opt-tag {
    color: var(--wt-sub) !important;
    font-size: 0.85em !important;
    margin-right: 5px !important;
    font-family: 'Courier Prime', monospace !important;
}

/* --- 3. 交互特效 (Hover & Active) --- */
.wt-opt-btn:hover {
    transform: translateX(5px) !important; /* 向右滑动 */
    background: var(--wt-card) !important;
    border-color: var(--wt-accent) !important; /* 边框变红 */
    border-left-color: var(--wt-accent) !important;
    color: var(--wt-accent) !important; /* 文字变红 */
    box-shadow: -4px 4px 0 rgba(0,0,0,0.1) !important; /* 浮起投影 */
    z-index: 10 !important;
}

/* 悬停时序号变色 */
.wt-opt-btn:hover::before {
    background: var(--wt-accent) !important;
    color: #fff !important;
}
.wt-opt-btn:hover .wt-opt-tag {
    color: var(--wt-accent) !important;
    opacity: 0.7 !important;
}

/* 点击时的按压感 */
.wt-opt-btn:active {
    transform: translateX(5px) scale(0.98) !important;
    box-shadow: none !important;
}

/* --- 4. 自定义选项特化 (Custom E) --- */
.wt-opt-custom {
    border-style: dashed !important; /* 虚线边框 */
    opacity: 0.9 !important;
}
.wt-opt-custom:hover {
    border-style: solid !important;
    opacity: 1 !important;
}

/* =================================================================
   PROJECT: WONDER_FILM_OS [Module: Tear Line]
   Description: 车票虚线剪切效果
   ================================================================= */

/* 1. 撕裂线容器 */
.wt-tear-line {
    position: relative;
    height: 30px; /* 占据的高度 */
    margin: 10px -30px 0 -30px !important; /* 负边距！让线条横向撑满整个屏幕宽度 */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* 2. 红色虚线本体 */
.wt-tear-line::before {
    content: '';
    position: absolute;
    width: 100%;
    top: 50%;
    border-bottom: 2px dashed #ff6b6b !important; /* 盛夏红虚线 */
    opacity: 0.7;
}

/* 3. 剪刀与文字图标 (背景遮罩) */
.wt-cut-icon {
    position: relative;
    z-index: 2;
    background: var(--main-bg); /* 继承背景色，遮住虚线 */
    padding: 0 10px;
    font-family: 'Courier Prime', monospace;
    font-size: 0.75em;
    color: #ff6b6b;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 4. [关键] 拉近 NEXT STEP 与上方的距离 */
/* 这一步是为了解决“突兀”感，让它们吸附在一起 */
.wt-step-box {
    margin-top: 0 !important; /* 消除顶部间距 */
    border-top: none !important; /* 去掉上边框，模拟连接感 */
    border-top-left-radius: 0 !important; /* 变直角 */
    border-top-right-radius: 0 !important; /* 变直角 */
    
    /* 视觉微调：让它看起来是从上面“长”出来的 */
    box-shadow: 0 4px 10px rgba(0,0,0,0.05) !important; 
}

/* 5. 夜间模式适配 */
.dark .wt-tear-line::before {
    border-color: #ff4757 !important; /* 夜间荧光红 */
}
.dark .wt-cut-icon {
    background: #141414; /* 匹配夜间背景 */
    color: #ff4757;
}

/* =================================================================
   [PATCH] 镜头聚焦可视性修复 (Viewfinder Visibility Fix)
   逻辑：强制取景器区域保持“暗房”状态，模拟相机电子屏
   ================================================================= */

/* 1. 强制取景器容器为深色实体 */
.view-box {
    /* 核心修复：不再使用半透明，而是强制纯深色背景 */
    background-color: #1a1a1a !important; 
    
    /* 核心修复：强制文字为高亮白，确保在任何模式下都清晰 */
    color: #eeeeee !important; 
    
    /* 装饰：增加一点“内发光”感，模拟屏幕 */
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5) !important;
    border: 1px solid #333 !important;
    
    /* 保持左侧红线 */
    border-left: 4px solid #ff6b6b !important;
    
    padding: 15px !important;
    margin-bottom: 15px !important;
    border-radius: 0 4px 4px 0 !important;
}

/* 2. 修复内部标签的颜色 (容姿/着装) */
/* 确保它们在黑底上足够醒目 */
.v-row {
    margin-bottom: 8px !important;
    line-height: 1.6 !important;
    color: #ccc !important; /* 正文灰白 */
}

/* 3. 强制标签头颜色 (比如 "容姿 ➤") */
/* 这里利用 CSS 变量 fallback，或者直接指定颜色 */
.view-box .v-row::before {
    /* 强制使用亮橙色/金色，保证在黑底上看得到 */
    color: #e09f3e !important; 
    font-weight: bold !important;
    text-shadow: 0 0 5px rgba(224, 159, 62, 0.3) !important;
}

/* 4. 修复标签云 (Tag Cloud) 在日间模式的显示 */
/* 让下方的标签也变成暗色块，与取景器呼应 */
.tag-cloud .a-tag {
    background-color: #2d3436 !important; /* 深色底 */
    border: 1px solid #444 !important;
    color: #aaa !important; /* 浅色字 */
}
.tag-cloud .a-tag:hover {
    border-color: #ff6b6b !important;
    color: #fff !important;
}

/* =================================================================
   PATCH: DAY_MODE_HARMONIZER (强力去黑化)
   Logic: 强制日间模式下的所有容器变为白纸风格
   ================================================================= */

/* 1. 镜头聚焦 (Viewfinder) -> 半透明白纸 */
.Lemon-theme-output:not(.dark) .view-box {
    background-color: rgba(255, 255, 255, 0.7) !important;
    border: 1px solid #d4c5b0 !important;
    border-left: 4px solid #c0392b !important;
    color: #2c3e50 !important; /* 深字 */
    box-shadow: none !important;
}
/* 修正镜头聚焦内的文字颜色 */
.Lemon-theme-output:not(.dark) .view-box .v-row { color: #5d4037 !important; }
.Lemon-theme-output:not(.dark) .view-box .v-row::before { color: #c0392b !important; text-shadow: none !important; }

/* 2. 同行者/VIP卡片 -> 白色档案卡 */
.Lemon-theme-output:not(.dark) .vip-card {
    background-color: #ffffff !important;
    border: 1px solid #d4c5b0 !important;
    color: #333 !important;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.05) !important;
}
.Lemon-theme-output:not(.dark) .vip-name { color: #2c3e50 !important; }
.Lemon-theme-output:not(.dark) .vip-body { color: #5d4037 !important; }

/* 3. 决定性瞬间 (Moment Card) -> 白色照片纸 */
.Lemon-theme-output:not(.dark) .moment-card {
    background-color: #ffffff !important;
    color: #2c3e50 !important; /* 强制深色文字 */
    border-color: #dcdcdc !important;
    border-left: 5px solid #c0392b !important;
}
.Lemon-theme-output:not(.dark) .moment-card div { color: #2c3e50 !important; }

/* 4. 世界让路 HUD -> 醒目贴纸 */
.Lemon-theme-output:not(.dark) .wt-focus-ring {
    background-color: #fff0e6 !important; /* 淡粉背景 */
    border: 2px solid #c0392b !important;
    color: #c0392b !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05) !important;
}
.Lemon-theme-output:not(.dark) .wt-focus-main { color: #c0392b !important; text-shadow: none !important; }
.Lemon-theme-output:not(.dark) .wt-focus-sub { color: #d35400 !important; opacity: 0.8 !important; }

/* =================================================================
   [PATCH] 守望者卡片显影修复
   作用：修复日间模式下，角色名(使徒/黑衣人等)白字看不清的问题
   ================================================================= */

/* 仅在【非】夜间模式下生效 */
.Lemon-theme-output:not(.dark) .cast-role {
    /* 1. 核心修复：强制将文字改为深红色 (Dark Red) */
    color: #c0392b !important; 
    
    /* 2. 优化背景：使用极淡的粉色衬底，不再使用高亮粉 */
    background-color: rgba(255, 107, 107, 0.1) !important;
    
    /* 3. 样式微调：让它看起来像一个印上去的标签 */
    font-weight: 900 !important;
    padding: 2px 8px !important;
    border-radius: 4px !important;
    display: inline-block !important; /* 确保背景色只包裹文字 */
    margin-bottom: 5px !important;
}

/* 4. 增强卡片轮廓，防止“过曝”感 */
.Lemon-theme-output:not(.dark) .cast-card {
    border: 1px solid #bbb !important; /* 加深边框 */
    background-color: #fff !important; /* 确认为纯白底 */
    box-shadow: 0 3px 6px rgba(0,0,0,0.08) !important; /* 加强投影 */
}

/* 5. 确保下方的状态文字清晰 */
.Lemon-theme-output:not(.dark) .cast-status {
    color: #2980b9 !important; /* 深蓝色 */
    font-weight: bold !important;
}

/* =================================================================
   MODULE: NARRATIVE_ELEMENTS (正文融入组件)
   Design: Inline-flow, Non-obstructive, Atmospheric
   ================================================================= */

/* --- 1. 手写便签 (Handwritten Note) --- */
/* 就像贴在日记本旁边的便利贴，或者是随手撕下的纸条 */
.msg-note {
    display: block; /* 独占一行，但不强制全宽 */
    width: fit-content;
    max-width: 90%;
    margin: 10px auto; /* 上下留白，居中 */
    padding: 8px 15px;
    
    /* 纸张质感 */
    background-color: #fffdf5; 
    border: 1px solid rgba(0,0,0,0.05);
    border-left: 3px solid #e09f3e; /* 金色边缘，像书签 */
    border-radius: 2px 8px 8px 2px;
    
    /* 文字风格 */
    font-family: 'Caveat', 'Ma Shan Zheng', cursive; /* 手写体 */
    font-size: 1.1em;
    color: #5d5d5d;
    line-height: 1.5;
    
    /* 微物理特效 */
    transform: rotate(-0.5deg); /* 极其轻微的倾斜 */
    box-shadow: 1px 2px 4px rgba(0,0,0,0.05);
}

/* 夜间适配：降低亮度，像暗处的纸条 */
.dark .msg-note {
    background-color: #252525;
    color: #aaa;
    border: 1px solid #333;
    border-left-color: #d4c5b0;
}

/* --- 2. 拍立得备注 (Polaroid Caption) --- */
/* 模拟照片底部留白的马克笔字迹 */
.msg-polaroid {
    display: inline-block; /* 允许嵌在段落中间，也可以独立 */
    padding: 2px 8px;
    margin: 4px 0;
    
    /* 材质：照片纸 */
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    
    /* 文字：马克笔 */
    font-family: 'Caveat', 'Ma Shan Zheng', cursive;
    color: #333; /* 默认黑色记号笔 */
    font-size: 1.05em;
    transform: rotate(1deg); /* 随意的书写感 */
}

/* 红色马克笔特化 (data-marker="Red") */
.msg-polaroid[data-marker="Red"] {
    color: #d63031; /* 鲜艳的红 */
    border-bottom: 2px solid #d63031; /* 笔触加重 */
}

/* 夜间适配：变成显影液里的反色效果 */
.dark .msg-polaroid {
    background-color: #1a1a1a;
    border-color: #333;
    color: #ccc;
}
.dark .msg-polaroid[data-marker="Red"] {
    color: #ff6b6b; /* 荧光红 */
    border-bottom-color: #ff6b6b;
}

/* --- 3. 心灵感应/额头贴贴 (Telepathy) --- */
/* 表现“未说出口的话”，像是一种脑波信号 */
.msg-telepathy {
    display: inline; /* 必须完全融入行内 */
    font-family: 'Noto Serif SC', serif;
    font-style: italic;
    color: #888; /* 弱化颜色，表示内心 */
    
    /* 视觉特效：模糊与扩散 */
    text-shadow: 0 0 1px rgba(0,0,0,0.1);
    letter-spacing: 1px; /* 增加字距，表示信号传输 */
    background: linear-gradient(to right, transparent, rgba(0,0,0,0.03), transparent);
    padding: 0 5px;
    border-radius: 4px;
}

/* 装饰：括号发光 */
.msg-telepathy::before, .msg-telepathy::after {
    opacity: 0.5;
    font-weight: 300;
}

/* 夜间适配：微弱的荧光讯号 */
.dark .msg-telepathy {
    color: #7f8fa6;
    text-shadow: 0 0 5px rgba(116, 185, 255, 0.3); /* 蓝光 */
}

/* --- 4. 世界广播 (World Broadcast) --- */
/* 机械的、背景的、非侵入式的通告 */
.msg-broadcast {
    display: block;
    font-family: 'Courier Prime', monospace; /* 打字机字体 */
    font-size: 0.85em;
    color: #636e72;
    
    /* 样式：像一条滚动的LED屏或旧报纸条 */
    background-color: rgba(0,0,0,0.03);
    border-left: 3px solid #74b9ff; /* 信号蓝 */
    padding: 6px 10px;
    margin: 10px 0;
    
    white-space: normal; /* 允许换行 */
    line-height: 1.4;
}

/* 喇叭图标微调 */
.msg-broadcast::first-letter {
    font-size: 1.2em;
    margin-right: 2px;
}

/* 夜间适配：终端风格 */
.dark .msg-broadcast {
    background-color: rgba(255,255,255,0.05);
    color: #a4b0be;
    border-left-color: #3742fa;
}

/* =================================================================
   PROJECT: WONDER_FILM_OS [Module: System UI & Train]
   Target: Input, Buttons, Bubbles, Loading
   ================================================================= */

/* --- [SECTION 1] 对话气泡美化 (Chat Bubbles) --- */
/* 覆盖酒馆默认的 .group .is-user > .border.border-muted,
.is-assistant > .border.border-muted */

.group .is-user > .border.border-muted,
.is-assistant > .border.border-muted {
    /* 通用物理属性 */
    border-radius: 2px 8px 8px 2px !important; /* 像撕下来的纸条 */
    padding: 18px 22px !important;
    transition: all 0.3s ease !important;
    position: relative !important;
}

/* 🌞 日间模式：泛黄信纸 */
.Lemon-theme-output:not(.dark) .group .is-user > .border.border-muted,
.is-assistant > .border.border-muted {
    background-color: #fffaf0 !important;
    background-image: 
        linear-gradient(#e8e8e8 1px, transparent 1px) !important; /* 信纸横线 */
    background-size: 100% 24px !important;
    
    border: 1px solid #d4c5b0 !important;
    border-left: 4px solid #ff6b6b !important; /* 红色边缘 */
    color: #2d3436 !important;
    box-shadow: 2px 4px 8px rgba(0,0,0,0.05) !important;
}

/* 🌑 夜间模式：暗房显示屏 */
.dark .group .is-user > .border.border-muted,
.is-assistant > .border.border-muted {
    background-color: #141414 !important;
    border: 1px solid #333 !important;
    border-left: 4px solid #ff4757 !important; /* 荧光红边缘 */
    color: #dcdde1 !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5) !important;
}

/* --- [SECTION 2] 输入框与容器 (Input Area) --- */

/* 2.1 底部容器透明化 */
#ai-chat-bottom-input {
    background: transparent !important;
    backdrop-filter: none !important;
    border-top: none !important;
}

/* 2.2 输入框本体 */
#ai-chat-input {
    border-radius: 4px !important;
    font-family: 'Noto Serif SC', serif !important;
    font-size: 1rem !important;
    padding: 12px !important;
    transition: all 0.3s !important;
}

/* 🌞 日间：素描本输入框 */
.Lemon-theme-output:not(.dark) #ai-chat-input {
    background-color: #ffffff !important;
    border: 2px solid #e0e0e0 !important;
    color: #2d3436 !important;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.05) !important;
}
.Lemon-theme-output:not(.dark) #ai-chat-input:focus {
    border-color: #ff6b6b !important; /* 聚焦变红 */
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1) !important;
}

/* 🌑 夜间：终端命令行 */
.dark #ai-chat-input {
    background-color: #1a1a1a !important;
    border: 2px solid #333 !important;
    color: #eee !important;
}
.dark #ai-chat-input:focus {
    border-color: #ff4757 !important;
    background-color: #000 !important;
}

/* --- [SECTION 3] 平台功能按钮 (Mod/Send/Edit) --- */
/* 统一成物理按键风格 */

.flex.items-center.gap-2.pb-2 > button:not(.rounded-full):not(.size-7),
.MuiButtonBase-root {
    border-radius: 4px !important;
    text-transform: none !important; /* 禁止大写 */
    font-weight: 700 !important;
    font-family: 'Courier Prime', monospace !important;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    padding: 6px 14px !important;
}

/* 🌞 日间按钮 */
.Lemon-theme-output:not(.dark) .flex.items-center.gap-2.pb-2 > button:not(.rounded-full):not(.size-7) {
    background: #fff !important;
    border: 1px solid #ccc !important;
    color: #555 !important;
    box-shadow: 0 2px 0 #bbb !important; /* 物理厚度 */
}
.Lemon-theme-output:not(.dark) .flex.items-center.gap-2.pb-2 > button:not(.rounded-full):not(.size-7):hover {
    transform: translateY(2px) !important; /* 按下 */
    box-shadow: none !important;
    border-color: #ff6b6b !important;
    color: #ff6b6b !important;
}

/* 🌑 夜间按钮 */
.dark .flex.items-center.gap-2.pb-2 > button:not(.rounded-full):not(.size-7) {
    background: #1f1f1f !important;
    border: 1px solid #444 !important;
    color: #aaa !important;
    box-shadow: 0 2px 0 #000 !important;
}
.dark .flex.items-center.gap-2.pb-2 > button:not(.rounded-full):not(.size-7):hover {
    transform: translateY(2px) !important;
    background: #ff4757 !important;
    color: #fff !important;
    border-color: #ff4757 !important;
    box-shadow: 0 0 10px #ff4757 !important; /* 发光 */
}

/* =================================================================
   PROJECT: WONDER_FILM_OS [Module: Galaxy Express Loading]
   Target: Loading Animation (The 3 dots wrapper)
   Concept: Day=Seaside Train / Night=Galaxy Express
   ================================================================= */

/* 1. 隐藏原本的三个点 (Clean up) */
.flex.items-center.justify-center.size-6 > .flex.gap-2,
.flex.items-center.justify-center.size-6 > .flex.gap-2::before,
.flex.items-center.justify-center.size-6 > .flex.gap-2::after {
    background-color: transparent !important;
    width: 0 !important; height: 0 !important;
    animation: none !important;
    display: none !important;
}

/* =================================================================
   PROJECT: WONDER_OS [Module: Sunset Airmail]
   Target: Loading Animation (Cinematic Paper Plane)
   Theme: Nostalgic, Golden Hour, Voyage, Letter
   ================================================================= */

/* --- 1. 清理旧元素 --- */
.flex.items-center.justify-center.size-6 > .flex.gap-2,
.flex.items-center.justify-center.size-6 > .flex.gap-2::before,
.flex.items-center.justify-center.size-6 > .flex.gap-2::after {
    /* 重置所有默认属性，为新动画腾出空间 */
    width: auto !important; height: auto !important;
    background: none !important; margin: 0 !important;
    animation: none !important; border: none !important;
    opacity: 1 !important; color: transparent !important;
    content: '' !important; /* 确保伪元素存在 */
}

/* --- 2. 舞台容器：复古越洋信笺 (The Vintage Letter Stage) --- */
.flex.items-center.justify-center.size-6 {
    /* === 电影感大尺寸 === */
    width: 420px !important;
    height: 120px !important;
    margin: 30px auto !important;
    display: block !important;
    position: relative !important;
    overflow: hidden !important;
    border-radius: 8px !important;
    
    /* === 核心背景：夕阳与旧纸张 === */
    border: 3px solid #d4c5b0 !important; /* 复古纸张边框色 */
    box-shadow: 
        inset 0 0 30px rgba(0,0,0,0.1), /* 内阴影增加景深 */
        0 10px 20px -5px rgba(0,0,0,0.2) !important; /* 外部柔和投影 */
        
    /* 背景图层叠加 (从下到上) */
    background: 
        /* L4: 纸张纹理噪点 */
        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.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E"),
        /* L3: 柔和的航空信条纹 (仅上下边缘) */
        linear-gradient(to right, transparent 10px, #c0392b 10px, #c0392b 20px, transparent 20px, transparent 30px, #2980b9 30px, #2980b9 40px, transparent 40px) repeat-x top/40px 4px,
        linear-gradient(to right, transparent 10px, #2980b9 10px, #2980b9 20px, transparent 20px, transparent 30px, #c0392b 30px, #c0392b 40px, transparent 40px) repeat-x bottom/40px 4px,
        /* L2: 夕阳渐变天空 */
        linear-gradient(180deg, #ff9a8b 0%, #ff6a88 50%, #ff99ac 100%) !important;
    background-color: #fffaf0 !important; /* 纸张底色 */
}

/* 🌑 夜间舞台：深蓝月夜 */
.dark .flex.items-center.justify-center.size-6 {
    border-color: #444 !important;
    background: 
        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.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E"),
        linear-gradient(to right, transparent, #c0392b, transparent) repeat-x top/40px 2px, /* 夜间条纹变细 */
        /* 夜间天空 */
        linear-gradient(180deg, #0f0c29 0%, #302b63 50%, #24243e 100%) !important;
    box-shadow: inset 0 0 30px rgba(0,0,0,0.5), 0 10px 20px -5px rgba(0,0,0,0.5) !important;
}


/* --- 3. 主角：纸飞机 (The Paper Plane - Container::after) --- */
.flex.items-center.justify-center.size-6::after {
    content: '' !important;
    position: absolute !important;
    left: 50% !important; top: 50% !important;
    z-index: 50 !important;
    
    /* 飞机尺寸与塑形 */
    width: 50px !important; height: 24px !important;
    background-color: #fdfbf7 !important; /* 米白信纸色 */
    
    /* 利用 clip-path 裁剪出锐利的折纸形状 */
    clip-path: polygon(0% 10%, 100% 50%, 0% 90%, 15% 50%) !important;
    
    /* 核心优化：增加立体感和对比度 */
    /* 1. 使用 drop-shadow 滤镜创造真实的悬浮投影，使其从背景中分离 */
    /* 2. 使用 inset box-shadow 模拟折痕阴影 */
    filter: drop-shadow(0px 6px 4px rgba(0,0,0,0.2)) !important;
    box-shadow: inset 2px 0 10px rgba(0,0,0,0.05) !important;
    
    /* 复合飞行姿态动画 */
    animation: plane-glide 4s ease-in-out infinite !important;
}

/* 🌑 夜间飞机：受月光照亮，发冷光 */
.dark .flex.items-center.justify-center.size-6::after {
    background-color: #e6e6e6 !important;
    filter: drop-shadow(0px 6px 8px rgba(255,255,255,0.1)) !important; /* 微弱白光晕 */
}


/* --- 4. 环境层：云海与光效 (The Atmosphere) --- */

/* 4.1 后景：慢速夕阳云山 (Inner Div) */
.flex.items-center.justify-center.size-6 > .flex.gap-2 {
    display: block !important;
    position: absolute !important;
    bottom: 0 !important; left: 0 !important;
    width: 200% !important; height: 100% !important;
    z-index: 10 !important;
    opacity: 0.8 !important;
    
    /* 使用径向渐变堆叠出云层山峰，染上夕阳红 */
    background-image: 
        radial-gradient(circle at 70% 80%, rgba(255, 235, 235, 0.8) 10%, transparent 60%),
        radial-gradient(circle at 30% 90%, rgba(255, 200, 200, 0.8) 10%, transparent 50%),
        linear-gradient(to top, #ffecd2 0%, transparent 40%) !important; /* 底部的暖雾 */
    background-size: 100% 100% !important;
    
    /* 缓慢的视差滚动 */
    animation: cloud-scroll-slow 20s linear infinite !important;
}
/* 🌑 夜间后景云 */
.dark .flex.items-center.justify-center.size-6 > .flex.gap-2 {
    opacity: 0.4 !important;
    background-image: 
        radial-gradient(circle at 70% 80%, rgba(100, 100, 150, 0.8) 10%, transparent 60%),
        linear-gradient(to top, #24243e 0%, transparent 40%) !important;
}

/* 4.2 前景：快速流云与丁达尔光 (Inner::before) */
.flex.items-center.justify-center.size-6 > .flex.gap-2::before {
    display: block !important; position: absolute !important; inset: 0 !important; z-index: 20 !important;
    
    /* 前景云雾更稀薄快速 */
    background-image: 
        linear-gradient(90deg, transparent 20%, rgba(255,255,255,0.3) 40%, transparent 60%),
        /* 添加倾斜的夕阳光柱 (God Rays) */
        repeating-linear-gradient(45deg, transparent, transparent 20px, rgba(255,215,0,0.1) 20px, rgba(255,215,0,0.05) 40px) !important;
    background-size: 200% 100%, 100% 100% !important;
    
    /* 快速流动 */
    animation: cloud-scroll-fast 5s linear infinite !important;
    mix-blend-mode: overlay !important; /* 叠加模式让光效更通透 */
}
/* 🌑 夜间前景：冷光 */
.dark .flex.items-center.justify-center.size-6 > .flex.gap-2::before {
    background-image: linear-gradient(90deg, transparent 20%, rgba(255,255,255,0.1) 40%, transparent 60%) !important;
    mix-blend-mode: soft-light !important;
}

/* 4.3 装饰层：空气微尘颗粒 (Inner::after) */
.flex.items-center.justify-center.size-6 > .flex.gap-2::after {
    display: block !important; position: absolute !important; inset: 0 !important; z-index: 30 !important;
    
    /* 利用噪点SVG模拟漂浮的灰尘/光点 */
    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.3'/%3E%3C/svg%3E") !important;
    opacity: 0.4 !important;
    mix-blend-mode: screen !important; /* 让颗粒发光 */
}


/* --- 5. 动画物理引擎 (Animation Engine) --- */

/* 飞机的复合滑翔姿态：上下浮动 + 左右侧倾 + 前后位移 */
@keyframes plane-glide {
    0% { 
        transform: translate(-60%, -50%) rotateZ(1deg) translateY(0px); 
    }
    25% { 
        /* 向右上方爬升，向左侧倾 */
        transform: translate(-45%, -55%) rotateZ(-2deg) translateY(-8px) scale(1.02); 
    }
    50% { 
        /* 回到中间，姿态改平 */
        transform: translate(-50%, -50%) rotateZ(0deg) translateY(0px); 
    }
    75% { 
        /* 向左下方俯冲，向右侧倾 */
        transform: translate(-55%, -45%) rotateZ(3deg) translateY(5px) scale(0.98); 
    }
    100% { 
        transform: translate(-60%, -50%) rotateZ(1deg) translateY(0px); 
    }
}

/* 背景云层视差滚动 */
@keyframes cloud-scroll-slow {
    0% { transform: translateX(0); } 100% { transform: translateX(-20%); }
}
@keyframes cloud-scroll-fast {
    0% { background-position: 0 0, 0 0; } 100% { background-position: -200% 0, 0 0; }
}

/* === 1. AI回复气泡 (收到的信) === */
.is-assistant .relative.inline-block,
.flex .relative.inline-block {
    background: #fdfbf7 !important; /* 实心米白信纸 */
    color: #2c3e50 !important;      /* 墨蓝色字迹 */
    border: 1px solid #d4c5b0 !important; /* 纸张边缘 */
    border-left: 4px solid #8d6e63 !important; /* 书脊装饰 */
    border-radius: 2px 8px 8px 2px !important; /* 微折角 */
    padding: 15px 20px !important;
    margin: 10px 0 !important;
    position: relative !important;
    box-shadow: 2px 3px 0px rgba(0,0,0,0.1) !important; /* 实体投影，非模糊 */
    font-family: "Microsoft YaHei", "serif" !important;
    line-height: 1.6 !important;
    /* 纸张纹理：实心横线，模拟信纸 */
    background-image: repeating-linear-gradient(180deg, 
        #fdfbf7 0, 
        #fdfbf7 29px, 
        #eaddcf 30px
    ) !important; 
}

/* === 2. 用户输入气泡 (寄出的信) === */
.group.relative.ml-2 .relative.inline-block,
.group.relative.ml-4 .relative.inline-block {
    background: #fff0e6 !important; /* 实心淡粉色信纸 */
    color: #4e342e !important;      /* 深褐色字迹 */
    border: 1px solid #e6ceba !important;
    border-right: 4px solid #c0392b !important; /* 红色封缄装饰 */
    border-radius: 8px 2px 2px 8px !important;
    padding: 15px 20px !important;
    margin: 10px 0 !important;
    position: relative !important;
    box-shadow: -2px 3px 0px rgba(0,0,0,0.1) !important;
    font-family: "Microsoft YaHei", "serif" !important;
    line-height: 1.6 !important;
    /* 纸张纹理：实心横线 */
    background-image: repeating-linear-gradient(180deg, 
        #fff0e6 0, 
        #fff0e6 29px, 
        #f0dcc5 30px
    ) !important; 
}

/* === 3. 装饰元素：邮戳 (右上角) === */
/* 给所有气泡加一个实体的邮戳效果 */
.is-assistant .relative.inline-block::after,
.flex .relative.inline-block::after,
.group.relative.ml-2 .relative.inline-block::after,
.group.relative.ml-4 .relative.inline-block::after {
    content: "POST" !important;
    position: absolute !important;
    top: 5px !important;
    right: 10px !important;
    font-family: "Courier New", monospace !important;
    font-weight: bold !important;
    font-size: 12px !important;
    color: #aab7c4 !important; /* 淡墨色 */
    border: 2px solid #aab7c4 !important;
    border-radius: 50% !important;
    width: 35px !important;
    height: 35px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transform: rotate(-15deg) !important;
    pointer-events: none !important;
    z-index: 1 !important;
    opacity: 0.6 !important;
}

/* === 4. 移除默认的顶部装饰线与三角 === */
.absolute.top-0 { display: none !important; }

/* === 1. 输入框容器 (底板) === */
#ai-chat-bottom-input { 
    background: #e3dcd3 !important; /* 实心灰棕色底板，像桌垫 */
    border-top: 3px solid #cbbfae !important;
    padding: 10px !important;
    backdrop-filter: none !important;
}

/* === 2. 输入框本体 (纸张) === */
#ai-chat-input, 
textarea, 
input[type="text"] {
    background-color: #ffffff !important; /* 纯白纸张 */
    border: 2px solid #5d4037 !important; /* 深棕色边框 */
    border-radius: 0px !important;        /* 直角，像便签本 */
    color: #000000 !important;
    padding: 12px !important;
    font-family: "Microsoft YaHei", sans-serif !important;
    box-shadow: 4px 4px 0px #8d6e63 !important; /* 实体投影，像一叠纸 */
    transition: all 0.2s !important;
}

/* 输入框聚焦效果 */
#ai-chat-input:focus, 
textarea:focus {
    background-color: #fffbf0 !important; /* 聚焦变暖色 */
    border-color: #c0392b !important;     /* 边框变红，像红笔 */
    outline: none !important;
    transform: translate(2px, 2px) !important; /* 按压效果 */
    box-shadow: 2px 2px 0px #8d6e63 !important; /* 投影变小 */
}

/* === 1. 通用按钮样式 (邮票风格) === */
.bg-muted.rounded.flex.p-0\.5 > button.rounded-full.size-7,
.flex.items-center.gap-2.pb-2 > button:not(.rounded-full):not(.size-7),
button[class*="button"] {
    background: #2c3e50 !important; /* 普鲁士蓝底色 */
    color: #fdfbf7 !important;      /* 米白文字 */
    border: 2px dashed #fdfbf7 !important; /* 虚线边框模拟邮票齿孔 */
    border-radius: 4px !important;
    padding: 6px 16px !important;
    margin: 2px !important;
    font-weight: bold !important;
    font-family: "Courier New", monospace !important; /* 打字机字体 */
    box-shadow: 0 0 0 2px #2c3e50 !important; /* 外层实线边框包裹虚线 */
    transition: all 0.2s !important;
    text-transform: none !important;
}

/* === 2. 按钮悬停 (盖戳) === */
.bg-muted.rounded.flex.p-0\.5 > button.rounded-full.size-7,
.flex.items-center.gap-2.pb-2 > button:not(.rounded-full):not(.size-7):hover {
    background: #c0392b !important; /* 悬停变为火漆红色 */
    border-color: #ffffff !important;
    box-shadow: 0 0 0 2px #c0392b !important;
    transform: rotate(-2deg) scale(1.05) !important; /* 微微倾斜放大 */
}

/* === 3. 功能小按钮 (复制/编辑/删除 - 票据风格) === */
.flex.w-full.items-center.justify-between.gap-2.px-2.css-1ajg1ui button {
    background: #e0e0e0 !important; /* 浅灰底 */
    color: #333 !important;
    border: 1px solid #333 !important; /* 实线黑边 */
    border-radius: 0 !important;       /* 纯方角 */
    box-shadow: 2px 2px 0 #333 !important; /* 硬阴影 */
    font-size: 12px !important;
    padding: 4px 10px !important;
}

.flex.w-full.items-center.justify-between.gap-2.px-2.css-1ajg1ui button:hover {
    background: #fff !important;
    transform: translate(1px, 1px) !important;
    box-shadow: 1px 1px 0 #333 !important;
}

/* === 4. 按钮容器背景 === */
/* 去除默认的圆角背景，改为实心底色条 */
.flex.w-full.items-center.justify-between.gap-2.px-2.css-1ajg1ui {
    background: #d7ccc8 !important;
    border: 1px solid #a1887f !important;
    border-radius: 0 !important;
    padding: 5px !important;
}

/* === 1. 积分条容器 (收据纸) === */
/* [Token消耗hover逻辑转换未启用]
.flex.w-full.items-center.justify-between.gap-2.px-2.text-purple-500.mt-1.css-1kz283j {
    background: #fffde7 !important; /* 淡黄收据纸 */
    border: 1px solid #000 !important;
    border-top: 4px dotted #000 !important; /* 顶部撕裂线 */
    border-radius: 0 !important;
    padding: 8px 12px !important;
    margin: 10px 0 !important;
    width: fit-content !important;
    transform: rotate(1deg) !important; /* 微微贴歪 */
    box-shadow: 2px 2px 5px rgba(0,0,0,0.1) !important;
}
*/

/* === 2. 文字内容 (打印机字体) === */
.MuiTypography-root.MuiTypography-body2 {
    font-family: "Courier New", monospace !important;
    font-size: 12px !important;
    color: #333 !important;
    margin: 2px 0 !important;
}

/* === 3. 强调数字 (红黑墨水) === */
/* 模型名称 */
.flex.items-center.gap-2.text-xs.font-mono.text-muted-foreground { 
    color: #000 !important; 
    font-weight: 900 !important;
    border-bottom: 1px solid #ccc !important;
    padding-bottom: 2px !important;
    margin-bottom: 4px !important;
    display: block !important;
}
/* 消耗数值 */
/* [Token消耗hover逻辑转换未启用]
.text-orange-500 {
    color: #c0392b !important; /* 红色赤字 */
}
*/

/* =================================================================
   MODULE: TAG_POPUPS_FILM (标签浮窗系统 - 暗房标签版)
   Theme: Solid Black, Red Border, Physical Label
   ================================================================= */

/* 1. 标签本体 (触发器) */
.a-tag, .wt-sticker, .wt-stamp {
    position: relative !important;
    display: inline-block !important;
    cursor: help !important;
    z-index: 10 !important; /* 基础层级 */
}

/* 2. 浮窗容器 (暗房标签) */
.wt-pop, .note-pop {
    /* === 核心：跟随定位 === */
    position: absolute !important;
    bottom: 110% !important; /* 位于元素正上方 */
    left: 50% !important;
    transform: translateX(-50%) translateY(10px) !important; /* 初始下沉 */
    
    /* === 尺寸与外观 (参考 image_d96d5e.png) === */
    width: max-content !important;
    max-width: 220px !important; /* 限制最大宽度 */
    
    /* 实心黑底 (不透光) */
    background: #000000 !important;
    
    /* 红色实体边框 + 红色投影 (模拟贴纸厚度) */
    border: 2px solid #ff4757 !important; /* 航空红 */
    box-shadow: 4px 4px 0px rgba(255, 71, 87, 0.4) !important;
    
    /* 内容排版 */
    color: #ffffff !important;
    padding: 10px 12px !important;
    border-radius: 2px !important; /* 直角/微圆角 */
    font-family: "Noto Serif SC", serif !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    text-align: left !important;
    
    /* === 动画与显隐 === */
    z-index: 99999 !important; /* 最高层级 */
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

/* 3. 触发显示 */
.a-tag:hover .wt-pop,
.wt-sticker:hover .wt-pop,
.wt-stamp:hover .wt-pop,
.t-stamp:hover .note-pop,
.i-sticker:hover .note-pop {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-50%) translateY(0) !important; /* 上浮复位 */
}

/* 4. 浮窗小三角 (指向下方) */
.wt-pop::after, .note-pop::after {
    content: '' !important;
    position: absolute !important;
    top: 100% !important;
    left: 50% !important;
    margin-left: -6px !important;
    border-width: 6px !important;
    border-style: solid !important;
    /* 黑色箭头 + 红色边缘模拟 (伪元素只能画单色，这里用黑色融合) */
    border-color: #000000 transparent transparent transparent !important; 
}

/* 5. 浮窗内的小标题 (ITEM_INFO) */
.wt-pop-title, .wt-pop-header {
    display: block !important;
    font-family: "Courier Prime", monospace !important;
    font-weight: 700 !important;
    font-size: 11px !important;
    color: #ff4757 !important; /* 红色标题 */
    
    /* 虚线分割 */
    border-bottom: 1px dashed #555 !important;
    padding-bottom: 4px !important;
    margin-bottom: 6px !important;
    
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
}

/* 6. 右上角装饰 (可选，如需保持简洁可删除) */
.wt-pop::before {
    content: '' !important;
    position: absolute !important;
    top: -4px !important; right: -4px !important;
    width: 8px !important; height: 8px !important;
    background: #ff4757 !important; /* 红点装饰 */
}

/* 确保浮窗不被父容器切断 */
.wt-profile-box, .wt-profile-content, .wt-outfit-grid, .tag-cloud {
    overflow: visible !important;
}

/* =================================================================
   SURGICAL PATCH: POPUP_STYLE (暗房标签风格重塑)
   Target: .wt-pop (The Tooltip)
   Ref: Image d96d5e.png / d9f0de.png
   ================================================================= */

/* 1. 浮窗容器本体 */
.wt-pop, .note-pop {
    /* === 核心定位：绝对定位 === */
    position: absolute !important;
    bottom: 120% !important; /* 悬浮在物体正上方 */
    left: 50% !important;
    transform: translateX(-50%) translateY(10px) !important; /* 初始位置：稍向下沉 */
    
    /* === 尺寸控制 === */
    width: max-content !important;  /* 宽度随文字自动撑开 */
    max-width: 240px !important;    /* 但最宽不超过240px */
    min-width: 120px !important;
    
    /* === 视觉风格 (复刻截图) === */
    background-color: #111111 !important; /* 极黑灰色底，比纯黑更有质感 */
    border: 2px solid #ff4757 !important; /* 航空红边框 */
    border-radius: 4px !important;        /* 微圆角 */
    
    /* 实体投影，模拟贴纸厚度 */
    box-shadow: 4px 4px 0px rgba(255, 71, 87, 0.3) !important;
    
    /* === 内部排版 === */
    padding: 12px 14px !important;
    z-index: 99999 !important; /* 最高层级 */
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    
    /* 文字 */
    color: #eeeeee !important;
    font-family: "Noto Serif SC", serif !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    text-align: left !important;
    white-space: normal !important; /* 允许换行 */
}

/* 2. 鼠标悬停触发 */
/* 只要鼠标碰到这些父元素，浮窗就浮现 */
.a-tag:hover .wt-pop,
.wt-sticker:hover .wt-pop,
.wt-stamp:hover .wt-pop,
.t-stamp:hover .note-pop,
.i-sticker:hover .note-pop,
.wt-outfit-tag:hover .wt-pop {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-50%) translateY(0) !important; /* 上浮归位 */
}

/* 3. 浮窗底部的小三角 (指向物体) */
.wt-pop::after, .note-pop::after {
    content: '' !important;
    position: absolute !important;
    top: 100% !important; /* 在浮窗底部 */
    left: 50% !important;
    margin-left: -6px !important;
    border-width: 6px !important;
    border-style: solid !important;
    /* 上黑下透，形成黑色箭头 */
    border-color: #111111 transparent transparent transparent !important; 
    z-index: 100000 !important;
}
/* 给小三角加个红色描边 (伪元素叠伪元素做不到，用 drop-shadow 模拟) */
.wt-pop, .note-pop {
    filter: drop-shadow(0 1px 0 #ff4757); 
}

/* 4. 浮窗内的小标题 (ITEM_INFO / SHIRT) */
.wt-pop-title, .wt-pop-header {
    display: block !important;
    font-family: "Courier Prime", monospace !important;
    font-weight: 900 !important;
    font-size: 12px !important;
    color: #ff4757 !important; /* 红色标题 */
    
    /* 虚线分割 */
    border-bottom: 1px dashed #555 !important;
    padding-bottom: 6px !important;
    margin-bottom: 8px !important;
    
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
}

/* =================================================================
   SURGICAL PATCH: OVERFLOW_FIX (溢出修正与防漂移)
   Target: Profile Containers
   ================================================================= */

/* 1. 锚点锁定：防止浮窗飞到屏幕左上角 */
/* 这一步至关重要！所有触发浮窗的元素必须是相对定位基准 */
.a-tag, .wt-sticker, .wt-stamp, .t-stamp, .i-sticker, .wt-outfit-tag {
    position: relative !important;
    overflow: visible !important; /* 允许子元素(浮窗)跑出去 */
}

/* 2. 定向越狱：只打开这几个容器的围墙 */
/* 这样浮窗才能显示在容器外面 */
.wt-profile-content, 
.wt-outfit-grid, 
.tag-cloud, 
.wt-inventory-box,
.wt-traits-container {
    overflow: visible !important; 
    transform: none !important; /* 移除变换，防止层级锁死 */
    z-index: 10 !important;
}

/* 3. 修复印章 (Fix Stamps) */
/* 针对 image_d9691e.png 的字符漂移修复 */
.wt-stamp, .t-stamp {
    /* 保持圆形外观 */
    border-radius: 50% !important;
    /* 内部文字布局修正 */
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    /* 关键：虽然允许overflow visible，但我们要确保印章本身大小固定 */
    width: 65px !important;
    height: 65px !important;
}

/* 4. 修复详情页 (Details) 的层级问题 */
/* 确保当 Details 展开时，内容不会被下一行遮挡 */
details[open] {
    overflow: visible !important;
    z-index: 20 !important; /* 展开时层级提高 */
}

/* === [UI Component] 章节进度条 (Chapter Tracker) === */
.chapter-bar {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding: 8px 5px;
    margin-bottom: 12px;
    border-bottom: 2px dashed #dcd0c0; /* 虚线分割 */
    font-family: 'Courier New', monospace;
    font-size: 0.8em;
    position: relative;
}

/* 进度线 */
.chapter-bar::after {
    content: ''; position: absolute; 
    top: 50%; left: 10px; right: 10px; height: 2px; 
    background: #e0e0e0; z-index: 0;
}

/* 章节节点 */
.chap-node {
    background: #fff;
    border: 1px solid #ccc;
    color: #ccc;
    padding: 2px 8px;
    border-radius: 10px;
    position: relative;
    z-index: 1; /* 盖住线 */
    transition: all 0.3s;
}

/* 激活状态 (当前章节) */
.chap-active {
    border-color: var(--accent-red);
    color: var(--accent-red);
    font-weight: 900;
    transform: scale(1.1);
    box-shadow: 0 0 5px rgba(255, 107, 107, 0.3);
}

/* 完成状态 (已过) */
.chap-done {
    background: #f0f0f0;
    color: #aaa;
    text-decoration: line-through;
}