css
/* --- 全局根容器设置 --- */
.mushoku-world-root {
    --bg-base: #fdf6e3; --bg-paper: #f4e4bc; --text-main: #2c241b; --text-sub: #5d4a3b; --accent-wood: #8b5a2b; --accent-gold: #d4af37; --accent-red: #c0392b; --accent-blue: #2980b9; --border-color: #d3c0a5; --modal-bg-overlay: rgba(44, 36, 27, 0.6);
    font-family: 'Georgia', 'Noto Serif SC', serif; color: var(--text-main); background-color: var(--bg-base); max-width: 850px; margin: 0 auto; padding: 15px; line-height: 1.6; box-sizing: border-box;
}

/* --- 通用模块外壳 --- */
.m-section { margin-bottom: 16px; border: 1px solid var(--border-color); border-radius: 6px; background: #fff; box-shadow: 0 2px 6px rgba(139, 90, 43, 0.08); overflow: hidden; }
.m-header { background: linear-gradient(135deg, #704214 0%, #8b5a2b 100%); color: #ffffff; padding: 10px 15px; font-weight: 700; cursor: pointer; user-select: none; list-style: none; position: relative; text-shadow: 0 1px 2px rgba(0,0,0,0.3); border-bottom: 1px solid #5e3a15; }
.m-header::after { content: "▼"; position: absolute; right: 15px; font-size: 0.8em; opacity: 0.8; transition: transform 0.2s; }
details[open] > .m-header::after { transform: rotate(180deg); }
.m-header::-webkit-details-marker { display: none; }
.m-body { padding: 15px; background: rgba(255,255,255,0.85); }

/* === 思维链(CoT) - 轻量级异世界风格 === */
/* 优化性能，移除复杂动画和阴影 */

.cot-container details {
    --epic-bg: #0d0b14;
    --epic-border: #4a3c6e;
    --epic-text-main: #e6d9c2;
    --epic-text-header: #d4af37;
    --epic-text-accent: #8a6de9;
    
    background-color: var(--epic-bg);
    border: 1px solid var(--epic-border);
    border-radius: 8px;
    font-family: 'Georgia', 'Times New Roman', serif;
    color: var(--epic-text-main);
    line-height: 1.6;
    margin: 15px 0;
    position: relative;
    overflow: hidden;
}

/* 简单的边缘装饰线 */
.cot-container details::before,
.cot-container details::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--epic-text-header);
    opacity: 0.3;
}

.cot-container details::before {
    top: 0;
}

.cot-container details::after {
    bottom: 0;
}

/* 可折叠标题栏 - 简版 */
.cot-container summary {
    background-color: rgba(42, 35, 66, 0.9);
    color: var(--epic-text-header);
    padding: 14px 20px;
    font-weight: 700;
    font-size: 1.1em;
    cursor: pointer;
    list-style: none;
    user-select: none;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    transition: background-color 0.2s ease;
}

.cot-container summary:hover {
    background-color: rgba(58, 48, 92, 0.9);
}

/* 展开/折叠标记 */
.cot-container summary::before {
    content: '▶';
    color: var(--epic-text-accent);
    margin-right: 12px;
    font-weight: bold;
    display: inline-block;
    transition: transform 0.2s ease;
}

.cot-container details[open] summary::before {
    content: '▼';
    transform: rotate(0deg);
}

/* 内容区域 */
.cot-container details > div {
    padding: 18px 22px;
}

/* 分割线 */
.cot-container hr {
    border: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--epic-text-header), transparent);
    margin: 20px 0;
}

/* 段落样式 */
.cot-container p {
    margin-bottom: 1.2em;
    text-align: justify;
}

.cot-container p:first-of-type::first-letter {
    font-size: 2em;
    color: var(--epic-text-header);
    float: left;
    line-height: 0.8;
    margin-right: 8px;
    margin-top: 6px;
    font-weight: bold;
}

/* 列表样式 */
.cot-container ul, .cot-container ol {
    padding-left: 24px;
    margin: 15px 0;
}

.cot-container li {
    margin-bottom: 8px;
    position: relative;
}

.cot-container ul li::before {
    content: '•';
    color: var(--epic-text-accent);
    position: absolute;
    left: -15px;
    font-size: 1.2em;
}

/* 代码块样式 */
.cot-container pre, .cot-container code {
    font-family: 'Consolas', 'Courier New', monospace;
    background-color: rgba(13, 11, 20, 0.8);
    border: 1px solid rgba(74, 60, 110, 0.3);
    border-radius: 4px;
    padding: 6px 10px;
    color: #b5a8e0;
    font-size: 0.9em;
}

.cot-container pre {
    padding: 12px;
    overflow-x: auto;
    margin: 15px 0;
}

/* 链接样式 */
.cot-container a {
    color: var(--epic-text-accent);
    text-decoration: none;
    border-bottom: 1px dotted var(--epic-text-accent);
}

.cot-container a:hover {
    color: var(--epic-text-header);
    border-bottom: 1px solid var(--epic-text-header);
}

/* 移除WebKit默认箭头 */
.cot-container summary::-webkit-details-marker {
    display: none;
}

/* 移动设备优化 */
@media (max-width: 768px) {
    .cot-container details {
        margin: 12px 0;
        border-radius: 6px;
    }
    
    .cot-container summary {
        padding: 12px 16px;
        font-size: 1em;
    }
    
    .cot-container details > div {
        padding: 15px 18px;
    }
}

/* --- [1] 环境面板 --- */
.env-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.env-card { background: #fffcf5; border: 1px solid #e8e0d5; padding: 8px 12px; border-radius: 4px; display: flex; align-items: center; gap: 10px; font-size: 0.9em; color: var(--text-sub); }
.env-icon { font-size: 1.2em; } .env-text { font-weight: 500; }

/* --- [2] 羊皮纸正文 --- */
.story-container { margin: 25px 0; }
.parchment-paper { position: relative; background-color: var(--bg-paper); background-image: url("https://www.transparenttextures.com/patterns/parchment.png"); padding: 40px 35px; box-shadow: 0 4px 15px rgba(0,0,0,0.15), inset 0 0 60px rgba(139, 90, 43, 0.15); border-radius: 3px; border: 1px solid #cbb89d; }
.parchment-paper::before { content: ""; position: absolute; top: 6px; left: 6px; right: 6px; bottom: 6px; border: 2px solid rgba(139, 90, 43, 0.2); pointer-events: none; }
.story-content { font-size: 1.1em; color: #1a1510; text-align: justify; line-height: 1.8; }

/* --- [3] 角色与羁绊 --- */
.char-top-row { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 15px; margin-bottom: 15px; }
.char-name { font-size: 1.4em; font-weight: 800; color: var(--accent-wood); }
.char-race { font-size: 0.9em; color: #665544; font-weight: 600; }
.char-status-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.status-badge { padding: 4px 12px; border-radius: 12px; font-size: 0.8em; font-weight: bold; color: #fff; box-shadow: 0 2px 4px rgba(0,0,0,0.15); }
.status-badge.state { background: #7f8c8d; } .status-badge.nature { background: #27ae60; }
.char-appearance-box { background: #fcf9f2; padding: 12px; border-left: 4px solid var(--accent-wood); font-size: 0.95em; color: #443322; }
.char-appearance-box .label { font-weight: bold; display: block; margin-bottom: 6px; color: var(--accent-wood); }
.char-appearance-box p { margin: 0; }
.m-divider, .npc-panel hr { height: 1px; background: linear-gradient(90deg, transparent, #e0d0c0, transparent); margin: 15px 0; border: 0; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-bottom: 15px; }
.stat-box { display: flex; flex-direction: column; gap: 6px; }
.stat-info { display: flex; justify-content: space-between; font-size: 0.9em; font-weight: 700; }
.bar-track { height: 10px; background: #e0e0e0; border-radius: 5px; overflow: hidden; border: 1px solid #ccc; }
.bar-fill { height: 100%; transition: width 0.5s ease; }
.bar-fill.hp { background: linear-gradient(180deg, #e74c3c, #c0392b); }
.bar-fill.mp { background: linear-gradient(180deg, #3498db, #2980b9); }
.stat-box.single { background: #f4f0ec; padding: 10px; border-radius: 6px; flex-direction: row; justify-content: space-between; align-items: center; border: 1px solid #e8ded4; }

/* 羁绊列表 (无class) */
.sub-header { color: var(--accent-wood); font-weight: bold; cursor: pointer; padding: 8px 0; border-bottom: 2px dashed #e0d0c0; }
.relation-list-no-class { display: grid; gap: 10px; margin-top: 10px; }
.relation-list-no-class > div { background: #fff; border: 1px solid #eee; padding: 10px; border-radius: 4px; transition: transform 0.2s, border-color 0.2s; }
.relation-list-no-class > div:first-child:not(:only-child) { border: 1px dashed #ddd; background: #fafafa; text-align: center; color: #999; font-style: italic; } /*占位符*/
.relation-list-no-class > div:not(:first-child):hover { transform: translateX(5px); border-color: var(--accent-wood); }
.relation-list-no-class > div > div:first-child { display: flex; justify-content: space-between; font-weight: bold; color: #444; margin-bottom: 4px; }
.relation-list-no-class > div > div:first-child > span:last-child { color: var(--accent-red); font-size: 0.9em; }

/* --- 基础面板样式 (异世界羊皮纸风格) --- */
.game-panel { font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif; color: #3e2723; max-width: 100%; line-height: 1.6; text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5); }
.game-panel .panel-section { border: 2px solid #8d6e63; border-radius: 4px; overflow: hidden; background: #efebe2; background-image: radial-gradient(#d7ccc8 1px, transparent 1px); background-size: 20px 20px; box-shadow: 2px 3px 6px rgba(0,0,0,0.15), inset 0 0 20px rgba(139, 110, 99, 0.1); }
.game-panel .panel-header { background: linear-gradient(135deg, #d7ccc8, #efebe2); padding: 12px 15px; font-weight: bold; cursor: pointer; user-select: none; list-style: none; font-size: 1.1em; color: #4e342e; border-bottom: 2px solid #a1887f; font-family: "Georgia", serif; letter-spacing: 1px; }
.game-panel .panel-header::-webkit-details-marker { display: none; }
.game-panel .panel-body { padding: 15px; background: rgba(239, 235, 226, 0.85); box-shadow: inset 0 0 15px rgba(100, 80, 70, 0.1); }
.game-panel .category-block { margin-bottom: 22px; }
.game-panel .category-block:last-child { margin-bottom: 0; }
.game-panel .category-title { font-size: 1.05em; color: #5d4037; margin-bottom: 12px; font-weight: bold; border-bottom: 2px dashed #bcaaa4; padding-bottom: 5px; position: relative; }
.game-panel .category-title::before { content: "✧"; margin-right: 6px; color: #8d6e63; font-size: 0.9em; }

/* --- 资产栏 --- */
.game-panel .asset-bar { background: #e7e0d3; border: 1px solid #c8b7a6; border-radius: 2px; padding: 10px 14px; margin-bottom: 15px; display: flex; justify-content: space-between; font-size: 0.95em; box-shadow: inset 1px 1px 3px rgba(0,0,0,0.05); border-left: 4px solid #8d6e63; }
.game-panel .asset-title { font-weight: bold; color: #4e342e; }
.game-panel .asset-value { font-family: "Courier New", Courier, monospace; font-weight: bold; color: #b71c1c; text-shadow: 0 1px 0 rgba(255,255,255,0.8); }

/* --- 统一的标签云 (技能/天赋/装备 共用) --- */
.game-panel .tag-cloud { display: flex; flex-wrap: wrap; gap: 12px; }
.game-panel .tag-wrapper { position: static; display: inline-block; outline: none; cursor: pointer; }
.game-panel .tag-item { padding: 6px 16px; background: #fdfaf6; border: 1px solid #d7ccc8; border-radius: 2px; font-size: 0.9em; transition: all 0.2s ease-in-out; box-shadow: 1px 2px 4px rgba(0,0,0,0.08); user-select: none; display: flex; align-items: center; gap: 6px; color: #4e342e; position: relative; overflow: hidden; }
.game-panel .tag-item::after { content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%; background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0) 100%); transform: skewX(-25deg); transition: all 0.5s ease; }
.game-panel .tag-item.empty { color: #a1887f; border-style: dashed; cursor: default; background: transparent; box-shadow: none; }
.game-panel .tag-qty { font-size: 0.8em; background: #e0e0e0; color: #424242; padding: 2px 7px; border-radius: 2px; border: 1px solid #bdbdbd; box-shadow: inset 0 1px 2px rgba(255,255,255,0.8); }

/* --- 交互状态 --- */
.game-panel .tag-wrapper:hover .tag-item,
.game-panel .tag-wrapper:focus-within .tag-item { background: #5d4037; color: #efebe2; border-color: #3e2723; box-shadow: 2px 3px 5px rgba(0,0,0,0.2); }
.game-panel .tag-wrapper:hover .tag-item::after { left: 200%; }
.game-panel .tag-wrapper:hover .tag-qty,
.game-panel .tag-wrapper:focus-within .tag-qty { background: #a1887f; color: #fff; border-color: #8d6e63; }

/* --- 统一的悬浮详情框 (上下跟随模式 - 异世界魔法面板) --- */
.game-panel .tag-tooltip { 
    visibility: hidden; 
    opacity: 0; 
    
    /* 核心定位修改：左右居中 + 上下跟随元素 */
    position: fixed !important; 
    left: 50% !important; 
    top: anchor(top) !important; 
    transform: translate(-50%, 16px); 
    z-index: 99999 !important; 
    
    width: 260px; 
    background: #faf8f5; 
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.04" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23n)" opacity="0.05"/></svg>'); 
    border: 2px solid #8d6e63; 
    border-radius: 4px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.4), 0 0 0 100vw rgba(0,0,0,0.3); 
    padding: 16px; 
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    pointer-events: none; 
    color: #3e2723; 
    font-family: "Georgia", serif; 
    text-shadow: none; 
}

.game-panel .tag-wrapper:hover .tag-tooltip,
.game-panel .tag-wrapper:focus-within .tag-tooltip { 
    visibility: visible; 
    opacity: 1; 
    /* 悬停时归位，保持水平居中，垂直在下方 8px 处 */
    transform: translate(-50%, 8px) !important; 
}

/* 移除不再需要的详情框小箭头 (因为改为悬浮跟随了) */
.game-panel .tag-tooltip::after, .game-panel .tag-tooltip::before { 
    display: none; 
}

/* 详情框内部排版 */
.game-panel .tt-title { 
    font-weight: bold; 
    border-bottom: 2px double #a1887f; 
    padding-bottom: 8px; 
    margin-bottom: 10px; 
    text-align: center; 
    font-size: 1.15em; 
    color: #3e2723; 
}

.game-panel .tt-title::before, .game-panel .tt-title::after { 
    content: " ~ "; 
    color: #8d6e63; 
}

.game-panel .tt-row { 
    display: flex; 
    justify-content: space-between; 
    font-size: 0.9em; 
    margin-bottom: 6px; 
    color: #5d4037; 
    font-family: sans-serif; 
}

.game-panel .tt-desc { 
    font-size: 0.9em; 
    color: #4e342e; 
    margin-top: 12px; 
    padding-top: 10px; 
    border-top: 1px dashed #bcaaa4; 
    background: rgba(215, 204, 200, 0.2); 
    padding: 8px; 
    border-radius: 2px; 
    line-height: 1.5; 
    font-style: italic; 
}

/* 移动端防溢出适配 */
@media (max-width: 768px) {
  .game-panel .tag-tooltip { 
      width: 85vw; 
      max-width: 300px; 
  }
}

/* --- [5] NPC 卡片 (无class) --- */
.npc-panel .m-body > div:first-child { text-align: center; padding-bottom: 10px; border-bottom: 2px solid var(--accent-gold); }
.npc-panel .m-body > div:first-child > div:first-child { font-size: 1.5em; font-weight: bold; color: var(--accent-red); text-shadow: 1px 1px 2px rgba(0,0,0,0.1); }
.npc-panel .m-body > div:first-child > div:last-child { margin-top: 8px; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.npc-panel .m-body > div:first-child > div:last-child > span { font-size: 0.8em; font-weight: bold; padding: 3px 10px; border-radius: 10px; color: #fff; }
.npc-panel .m-body span:nth-of-type(1) { background-color: #8e44ad; } /* 种族 */
.npc-panel .m-body span:nth-of-type(2) { background-color: #e91e63; } /* 性别 */
.npc-panel .m-body span:nth-of-type(3) { background-color: #795548; } /* 年龄 */
.npc-panel .m-body > div:last-child { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 15px; }
.npc-panel .m-body > div:last-child > div > div:first-child { font-weight: bold; color: var(--accent-wood); margin-bottom: 10px; border-bottom: 1px solid #e0d0c0; padding-bottom: 5px; }
.npc-panel .m-body > div:last-child > div:first-child p { font-size: 0.95em; color: #333; line-height: 1.6; margin: 0; }
.npc-panel .m-body > div:last-child > div:last-child { background: #fdf6e3; padding: 10px; border-radius: 4px; }
.npc-panel .m-body > div:last-child > div:last-child > div { display: flex; justify-content: space-between; font-size: 0.9em; padding: 6px 0; border-bottom: 1px dashed #d3c0a5; }
.npc-panel .m-body > div:last-child > div:last-child > div:last-child { border-bottom: none; }
.npc-panel .m-body > div:last-child > div:last-child > div > span:first-child { font-weight: bold; color: #5d4a3b; }

/* --- [6] 世界线仪表 --- */
.world-meter-box { margin-bottom: 15px; }
.meter-label { font-size: 0.9em; font-weight: bold; margin-bottom: 5px; color: var(--text-sub); }
.meter-track { height: 12px; background: #ecf0f1; border-radius: 6px; overflow: hidden; box-shadow: inset 0 1px 3px rgba(0,0,0,0.1); border: 1px solid #bdc3c7; }
.meter-bar { height: 100%; background: linear-gradient(90deg, #3498db, #9b59b6); }
.gods-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 15px; }
.god-box { padding: 12px; border-radius: 5px; text-align: center; font-weight: bold; border: 1px solid transparent; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.god-box.human-god { background: #fffcf0; border-color: #f1c40f; color: #d35400; }
.god-box.dragon-god { background: #f4f6f7; border-color: #bdc3c7; color: #2c3e50; }
.god-name { display: block; font-size: 0.8em; opacity: 0.7; margin-bottom: 2px; }
.god-val { font-size: 1.2em; }
.butterfly-box { background: #fdfefe; padding: 12px; border: 1px dashed #d0d3d4; border-radius: 4px; }
.bf-title { font-size: 0.9em; font-weight: bold; color: #16a085; margin-bottom: 8px; }
.bf-list { margin: 0; padding-left: 20px; font-size: 0.9em; color: #555; }
.bf-empty { color: #999; font-style: italic; list-style: none; margin-left: -20px; text-align: center; }

/* --- [7] 记忆档案 (无class) --- */
.memory-layout-no-class { display: flex; flex-wrap: wrap; gap: 15px; }
.memory-layout-no-class > details { flex: 1; min-width: 250px; background: #f9f9f9; border: 1px solid #eee; padding: 10px; border-radius: 4px; }
.memory-layout-no-class > details > summary { font-weight: bold; color: var(--accent-wood); cursor: pointer; padding-bottom: 5px; }
.memory-layout-no-class > details > b { font-size: 0.9em; color: #555; }
.memory-layout-no-class > details > div { font-size: 0.9em; color: #555; line-height: 1.5; margin-top: 8px; }

/* --- [8] 按钮组 (可复制交互优化版) --- */
.action-flex { 
  display: flex; 
  flex-wrap: wrap; 
  gap: 10px; 
}

.act-btn { 
  flex: 1; 
  min-width: 120px; 
  padding: 14px 10px; 
  border: 1px solid var(--border-color); 
  background: #fff; 
  color: var(--text-main); 
  border-radius: 5px; 
  font-family: inherit; 
  font-size: 0.95em; 
  font-weight: 600; 
  transition: all 0.2s; 
  text-align: center; 
  box-shadow: 0 2px 4px rgba(0,0,0,0.05); 
  position: relative;
  
  /* 交互核心：实现PC端/移动端一键点击/轻触全选文本，便于直接复制 */
  -webkit-user-select: all;
  user-select: all;
  /* 将光标更改为复制样式，提供直观的桌面端交互暗示 */
  cursor: copy; 
}

.act-btn:hover { 
  background: var(--accent-wood); 
  color: #fff; 
  border-color: var(--accent-wood); 
  transform: translateY(-2px); 
  box-shadow: 0 5px 12px rgba(139, 90, 43, 0.25); 
}

/* 交互增强：增加移动端按下时的物理下沉反馈，提升“点击”真实感 */
.act-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 4px rgba(139, 90, 43, 0.15);
  filter: brightness(0.95);
}

/* 交互增强：优化全选后的高亮颜色，防止选中状态下文字与hover背景色糊在一起 */
.act-btn::selection {
  background: rgba(255, 255, 255, 0.4);
  color: #fff;
}

/* --- 移动端适配 --- */
@media (max-width: 600px) {
    .char-top-row, .action-flex { flex-direction: column; }
    .stats-grid, .npc-panel .m-body > div:last-child { grid-template-columns: 1fr; }
    .parchment-paper { padding: 30px 20px; }
    .m-modal-box { width: 95%; }
}

/* ═══ 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;
}

/* 7.2 输入框：无职转生风格 (Warm Parchment & Magic Gold) */
/* 设计理念：模拟羊皮纸古书的质感，配合象征魔力与冒险的金色点缀 */
textarea, input[type="text"] {
    /* 背景：暖米色羊皮纸质感，替代原本的黑暗玻璃风 */
    background-color: rgba(250, 243, 224, 0.95) !important;
    
    /* 文字：深褐色，如同羽毛笔书写的陈旧墨迹 */
    color: #3e2723 !important;
    
    /* 边框：皮革质感的棕褐色，替代原本的工业灰 */
    border: 2px solid #8d6e63 !important;
    
    /* 左侧高亮：由霓虹青改为暗金色，象征鲁迪乌斯的魔力或阿斯拉金币 */
    border-left: 5px solid #d4af37 !important;
    
    /* 字体：使用衬线体，营造阅读异世界传记的沉浸感 */
    font-family: 'Georgia', 'Times New Roman', serif !important;
    
    /* 圆角：稍微圆润，去除科技棱角，更具生活气息 */
    border-radius: 6px !important;
    
    /* 光标：深棕色，与文字保持一致 */
    caret-color: #5d4037 !important;
    
    /* 阴影：柔和的内阴影，增加纸张的厚重感，而非发光 */
    box-shadow: inset 0 2px 6px rgba(62, 39, 35, 0.1) !important;
    
    /* 增加内边距，提升书写舒适度 */
    padding: 10px 12px !important;
    
    /* 添加平滑过渡 */
    transition: all 0.3s ease !important;
}

/* 聚焦状态：当输入时，边框泛起微弱的魔力金光 */
textarea:focus, input[type="text"]:focus {
    background-color: #fffaf0 !important; /* 纸张变亮 */
    border-color: #d4af37 !important;
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.3) !important; /* 柔和金光 */
    outline: none !important;
}

/* 占位符：褪色的墨水颜色，带一点斜体 */
textarea::placeholder, input::placeholder {
    color: rgba(141, 110, 99, 0.5) !important;
    font-style: italic !important;
}

/* 7.3 平台按钮：适配 无职转生 风格 (古典奇幻/羊皮纸与皮革质感) */
button, .menu_button {
    /* 背景：模仿深色皮革或旧木纹理，去除了科技感的冷色调 */
    background: linear-gradient(180deg, #6d4c41, #3e2723) !important;
    /* 文字：羊皮纸色，带有轻微的阴影以增加可读性 */
    color: #efebe9 !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
    
    /* 边框：做旧的铜色/淡褐色 */
    border: 1px solid #8d6e63 !important;
    border-bottom: 3px solid #281b15 !important; /* 底部加深模拟厚度 */
    
    /* 字体：改为衬线体，符合异世界书卷气 */
    font-family: 'Georgia', 'Times New Roman', serif !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    
    /* 细节：圆角与阴影 */
    border-radius: 4px !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4) !important;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

button:hover, .menu_button:hover {
    /* 悬停：提亮背景，仿佛注入了魔力 */
    background: linear-gradient(180deg, #8d6e63, #5d4037) !important;
    
    /* 文字：变为魔力光辉的金色 */
    color: #ffe082 !important;
    
    /* 边框：高亮发光 */
    border-color: #ffe082 !important;
    border-bottom-color: #3e2723 !important;
    
    /* 效果：添加金色的魔力光晕 */
    box-shadow: 0 0 12px rgba(255, 224, 130, 0.3), inset 0 0 5px rgba(255, 224, 130, 0.2) !important;
    transform: translateY(-1px) !important;
}

button:active, .menu_button:active {
    /* 点击：下沉效果 */
    transform: translateY(2px) !important;
    border-bottom-width: 1px !important;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.6) !important;
}

/* 1. 聊天框主体美化 - 无职转生：温馨异世界风格 */
.is-user > .border.border-muted,
.is-assistant > .border.border-muted {
    /* 背景：拟真羊皮纸质感 */
    /* 使用暖色调的米黄渐变，模拟陈旧纸张或魔法书页的颜色，给人安心、温馨的感觉 */
    background: linear-gradient(to bottom, #fffdf7, #f2e6d5) !important;
    
    /* 边框：古朴的木质/铜制边框 */
    /* 四周统一为淡褐色的轮廓，模拟书页边缘 */
    border: 1px solid #cbbba0 !important;
    
    /* 左侧修饰：魔法书脊/法杖风格 */
    /* 将原本刺眼的赫红色改为深沉的“胡桃木色”或“皮革色”，代表冒险者的行囊与书本 */
    border-left: 5px solid #8b5e3c !important; 
    
    /* 造型：柔和的圆角 */
    /* 更加圆润，去除了机械的棱角，符合生活化的异世界氛围 */
    border-radius: 8px 8px 8px 4px !important;
    
    /* 阴影：暖色调的烛光氛围 */
    /* 模拟在室内烛光下阅读的漫反射光晕，而非冷硬的悬浮阴影 */
    box-shadow: 
        0 4px 6px rgba(139, 94, 60, 0.1), /* 外部柔和投影 */
        inset 0 1px 0 rgba(255, 255, 255, 0.8) !important; /* 顶部高光，增加纸张厚度感 */
        
    /* 字体颜色适配（建议）：深褐色，比纯黑更护眼且契合羊皮纸 */
    color: #4e342e !important; 
}

/* =========================================
   Mushoku Tensei Theme - 无职转生：水王级魔法阵
   适配平台：Rili (B平台)
   基于原生容器尺寸与SVG SMIL动画的重构版 (放大版)
   ========================================= */

/* 1. 强制隐藏Rili系统默认的加载点(三个span) */
.flex.gap-2.w-full.h-full.items-center.justify-center span {
    display: none !important;
}

/* 2. 定制加载动画容器：大幅放大尺寸以展现复杂的无咏唱魔法阵 */
.flex.gap-2.w-full.h-full.items-center.justify-center {
    position: relative !important;
    min-width: 120px !important;
    min-height: 120px !important;
    width: 120px !important;
    height: 120px !important;
    overflow: visible !important;
    background-color: transparent !important;
}

/* 3. 魔法阵外圈：水蓝色魔力回路与古文刻度环缓慢顺时针旋转（SMIL SVG动画） */
.flex.gap-2.w-full.h-full.items-center.justify-center::before {
    content: "" !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 120px !important;
    height: 120px !important;
    /* 注入清澈蓝魔力环、虚线刻度与古文字(希腊字母代指)的SVG */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cdefs%3E%3Cfilter id='glow'%3E%3CfeGaussianBlur stdDeviation='3' result='b'/%3E%3CfeMerge%3E%3CfeMergeNode in='b'/%3E%3CfeMergeNode in='SourceGraphic'/%3E%3C/feMerge%3E%3C/filter%3E%3C/defs%3E%3Cg filter='url(%23glow)'%3E%3Ccircle cx='100' cy='100' r='90' fill='none' stroke='%2300bfff' stroke-width='2' opacity='0.9'/%3E%3Ccircle cx='100' cy='100' r='80' fill='none' stroke='%2348d1cc' stroke-width='1.5' stroke-dasharray='4 6' opacity='0.8'/%3E%3Ccircle cx='100' cy='100' r='65' fill='none' stroke='%2300bfff' stroke-width='1' opacity='0.6'/%3E%3Cg fill='%23e0ffff' font-family='serif' font-size='18' font-weight='bold' text-anchor='middle'%3E%3Ctext x='100' y='25'%3EΔ%3C/text%3E%3Ctext x='153' y='47'%3EΦ%3C/text%3E%3Ctext x='178' y='105'%3EΩ%3C/text%3E%3Ctext x='153' y='163'%3EΨ%3C/text%3E%3Ctext x='100' y='185'%3EΣ%3C/text%3E%3Ctext x='47' y='163'%3EΘ%3C/text%3E%3Ctext x='22' y='105'%3EΛ%3C/text%3E%3Ctext x='47' y='47'%3EΞ%3C/text%3E%3C/g%3E%3C/g%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 100 100' to='360 100 100' dur='10s' repeatCount='indefinite'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: contain !important;
    z-index: 1 !important;
}

/* 4. 魔法阵内层：深蓝六芒星阵逆时针旋转 + 中心纯白魔力结晶脉动（SMIL SVG动画） */
.flex.gap-2.w-full.h-full.items-center.justify-center::after {
    content: "" !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 120px !important;
    height: 120px !important;
    /* 注入六芒星、内层虚线环与中心脉动光芒的SVG */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cg%3E%3Cg stroke='%231e90ff' stroke-width='2' fill='none' opacity='0.9'%3E%3Cpolygon points='100,40 152,130 48,130'/%3E%3Cpolygon points='100,160 48,70 152,70'/%3E%3C/g%3E%3Ccircle cx='100' cy='100' r='40' fill='none' stroke='%2387cefa' stroke-width='1.5' stroke-dasharray='3 3'/%3E%3CanimateTransform attributeName='transform' type='rotate' from='360 100 100' to='0 100 100' dur='4s' repeatCount='indefinite'/%3E%3C/g%3E%3Cg font-family='serif' font-size='36' font-weight='900' fill='%23ffffff' text-anchor='middle'%3E%3Ctext x='100' y='112'%3E✧%3Canimate attributeName='opacity' values='0.3;1;0.3' dur='2s' repeatCount='indefinite'/%3E%3C/text%3E%3C/g%3E%3Ccircle cx='100' cy='100' r='20' fill='none' stroke='%2300ffff' stroke-width='2' opacity='0.8'%3E%3Canimate attributeName='r' values='15;25;15' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='opacity' values='0.9;0.1;0.9' dur='2s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: contain !important;
    z-index: 2 !important;
    pointer-events: none !important;
}

/* 5. CSS增强动画（模拟鲁迪乌斯水系无咏唱魔法的青蓝光晕脉动） */
@keyframes mushokuMagicPulse {
    0%, 100% { 
        filter: drop-shadow(0 0 6px rgba(0, 191, 255, 0.6)) drop-shadow(0 0 10px rgba(30, 144, 255, 0.4));
    }
    50% { 
        filter: drop-shadow(0 0 15px rgba(0, 255, 255, 1)) drop-shadow(0 0 20px rgba(0, 191, 255, 0.8));
    }
}

.flex.gap-2.w-full.h-full.items-center.justify-center::before,
.flex.gap-2.w-full.h-full.items-center.justify-center::after {
    animation: mushokuMagicPulse 2.5s ease-in-out infinite !important;
}

/* 6. 移动端适配 (按比例缩小以适配Rili聊天框容器) */
@media (max-width: 480px) {
    .flex.gap-2.w-full.h-full.items-center.justify-center {
        min-width: 90px !important;
        min-height: 90px !important;
        width: 90px !important;
        height: 90px !important;
    }
    .flex.gap-2.w-full.h-full.items-center.justify-center::before,
    .flex.gap-2.w-full.h-full.items-center.justify-center::after {
        width: 90px !important;
        height: 90px !important;
    }
}

/* 7. 低动效用户偏好适配：降低法阵运转频率但保留施法动效可见性 */
@media (prefers-reduced-motion: reduce) {
    .flex.gap-2.w-full.h-full.items-center.justify-center::before,
    .flex.gap-2.w-full.h-full.items-center.justify-center::after {
        animation-duration: 6s !important;
    }
}