/* =========================================
   护眼书页主题 (由原刺眼主题重构净化)
   ========================================= */
/* 隐藏顶部彩条 */
[class*="bg-[#F1CBCB]"], [class*="bg-[#c9e1e9]"] { display: none !important; }

/* 核心聊天框美化 - 小说书页淡黄色 */
.bg-gray-100\/90.relative.inline-block {
    background: #FDF9EE !important; /* 淡黄书页底色 */
    backdrop-filter: none !important;
    border: 1px solid #E8DFCE !important; 
    border-radius: 6px !important;
    box-shadow: 2px 4px 12px rgba(0, 0, 0, 0.04) !important; /* 极柔和的纸张投影 */
    color: #2C2C2C !important; 
    padding: 20px 25px !important;
    position: relative !important;
}
/* 移除原有的刺眼水印 */
.bg-gray-100\/90.relative.inline-block::after { display: none !important; }

/* 聊天框内文字 - 黑色，稍微加大，极致护眼 */
.markdown-body {
    font-family: "Georgia", "Songti SC", "SimSun", serif !important; /* 增加书卷气 */
    color: #262626 !important; /* 柔和的深黑色，比纯黑更护眼 */
    text-shadow: none !important; /* 移除所有文字发光阴影 */
    font-size: 16.5px !important; /* 字体适度加大 */
    letter-spacing: 0.5px !important;
    line-height: 1.8 !important; /* 增加行高，提升长文阅读舒适度 */
    background: transparent !important; 
    padding: 0 !important;
}
.markdown-body strong { 
    color: #8A3324 !important; /* 护眼的暗红色，替代原本刺眼的亮粉色 */
    text-shadow: none !important; 
    font-weight: bold !important; 
}
.markdown-body code { 
    background: #F0E8D5 !important; 
    border: 1px solid #DCD1B9 !important; 
    color: #2C4F7C !important; 
    border-radius: 4px !important; 
    padding: 2px 6px !important;
}

/* 底部附加元素 (按钮、模型名称、Token) 适配浅色背景，防止看不清 */
.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary,
.MuiTypography-root.MuiTypography-body2.css-6c0gf2,
.text-orange-500 {
    color: #736B5E !important; /* 柔和的褐色，在浅黄底色上清晰且不刺眼 */
}

/* 输入框与全局背景柔和化 */
body, .w-full.bg-white { background-color: #F4EED8 !important; color: #333333 !important; }
.sticky.top-0 { background: rgba(244, 238, 216, 0.95) !important; border-bottom: 1px solid #E8DFCE !important; }

div[class*="bg-white"], textarea, input[type="text"] {
    background-color: #FDF9EE !important; 
    color: #2C2C2C !important; 
    border: 1px solid #DCD1B9 !important;
    border-left: 3px solid #8A3324 !important; 
    border-radius: 6px !important; 
}
textarea:focus, input[type="text"]:focus {
    background-color: #FFFFFF !important;
    border-color: #8A3324 !important; 
    box-shadow: 0 0 8px rgba(138, 51, 36, 0.1) !important;
}

/* 发送按钮 - 改为古朴印章风格，移除霓虹发光 */
button[aria-label="send"], button[class*="send"], div.cursor-pointer.group.flex.items-center.justify-center, .MuiButtonBase-root.MuiIconButton-root[type="button"]:has(svg path[d*="M2.01"]) {
    background: #FDF9EE !important;
    border: 1px solid #8A3324 !important;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.05) !important;
    border-radius: 50% !important; 
    width: 48px !important; height: 48px !important; 
    transition: all 0.3s ease !important;
}
button[aria-label="send"] svg, button[class*="send"] svg, div.cursor-pointer.group.flex.items-center.justify-center svg, .MuiButtonBase-root.MuiIconButton-root[type="button"]:has(svg path[d*="M2.01"]) svg { display: none !important; }
button[aria-label="send"]::before, button[class*="send"]::before, div.cursor-pointer.group.flex.items-center.justify-center::before, .MuiButtonBase-root.MuiIconButton-root[type="button"]:has(svg path[d*="M2.01"])::before {
    content: "印" !important;
    position: absolute !important; top: 50% !important; left: 50% !important; transform: translate(-50%, -50%) !important;
    color: #8A3324 !important; font-family: "Georgia", serif !important;
    font-weight: bold !important; font-size: 18px !important;
    text-shadow: none !important; z-index: 2 !important;
}
button[aria-label="send"]:hover, button[class*="send"]:hover, div.cursor-pointer.group.flex.items-center.justify-center:hover, .MuiButtonBase-root.MuiIconButton-root[type="button"]:has(svg path[d*="M2.01"]):hover {
    transform: scale(1.05) !important;
    background: #8A3324 !important;
    box-shadow: 0 4px 10px rgba(138, 51, 36, 0.2) !important;
}
button[aria-label="send"]:hover::before, button[class*="send"]:hover::before, div.cursor-pointer.group.flex.items-center.justify-center:hover::before, .MuiButtonBase-root.MuiIconButton-root[type="button"]:has(svg path[d*="M2.01"]):hover::before {
    color: #FDF9EE !important; 
}

/* 滚动条护眼化 */
::-webkit-scrollbar { width: 6px !important; }
::-webkit-scrollbar-track { background: #F4EED8 !important; border-left: 1px solid #E8DFCE !important; }
::-webkit-scrollbar-thumb { background: #DCD1B9 !important; border-radius: 3px !important; }
::selection { background: rgba(138, 51, 36, 0.2) !important; color: #2C2C2C !important; }

/* 护眼加载动画 - 墨滴呼吸效果 (内嵌SVG SMIL, 移除原有红月刺眼动效) */
.style_dot-flashing__8L91Q.style_text__zGhNq { display: none !important; }
.flex.items-center.justify-center.w-6.h-5 {
    position: relative !important; width: 60px !important; height: 30px !important;
    margin: 0 auto !important; background: transparent !important;
    animation: none !important; filter: none !important;
}
.flex.items-center.justify-center.w-6.h-5::before {
    content: "" !important; position: absolute !important; left: 50% !important; top: 50% !important;
    width: 60px !important; height: 30px !important; transform: translate(-50%, -50%) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='30' cy='50' r='6' fill='%238A3324' opacity='0.7'%3E%3Canimate attributeName='opacity' values='0.3;1;0.3' dur='1.5s' begin='0s' repeatCount='indefinite'/%3E%3C/circle%3E%3Ccircle cx='50' cy='50' r='6' fill='%238A3324' opacity='0.7'%3E%3Canimate attributeName='opacity' values='0.3;1;0.3' dur='1.5s' begin='0.3s' repeatCount='indefinite'/%3E%3C/circle%3E%3Ccircle cx='70' cy='50' r='6' fill='%238A3324' opacity='0.7'%3E%3Canimate attributeName='opacity' values='0.3;1;0.3' dur='1.5s' begin='0.6s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important; background-position: center !important;
    z-index: 10 !important; animation: none !important;
}
.flex.items-center.justify-center.w-6.h-5::after { display: none !important; }
.cot-status-processing { color: #8A3324 !important; letter-spacing: 2px !important; font-family: "Georgia", serif !important; }
.d-dot { color: #8A3324 !important; animation: star-blink 1.5s infinite !important; }
@keyframes star-blink { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; text-shadow: none; } }

/* =========================================
   保留您原有的卡片结构，但将配色全部转换为护眼纸张系
   ========================================= */
.c {
  max-width: 800px; margin: 0 auto;
  background: #FDF9EE; color: #333333; font-family: "Georgia", "Songti SC", serif;
  font-size: 14px; line-height: 1.8; border-radius: 6px; padding: 18px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.03); border: 1px solid #E8DFCE;
}
details { margin-bottom: 14px; border-radius: 6px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
summary {
  padding: 12px 18px; font-weight: 800; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center;
  font-size: 14px; letter-spacing: 2px; border-radius: 6px;
  background: #F4EED8; color: #554A3C !important; text-shadow: none; border: 1px solid #E8DFCE;
}
details[open] > summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom: 1px solid #E8DFCE; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "✦"; font-size: 12px; transition: transform 0.4s; color: #8A3324; text-shadow: none; }
details[open] > summary::after { transform: rotate(180deg); color: #2C4F7C; text-shadow: none; }

.c > details:nth-of-type(1), .c > details:nth-of-type(2), .c > details:nth-of-type(3), .c > details:nth-of-type(4) { background: #FDF9EE; border: 1px solid #E8DFCE; }
.c > details:nth-of-type(1) > summary, .c > details:nth-of-type(2) > summary, .c > details:nth-of-type(3) > summary, .c > details:nth-of-type(4) > summary {
  background: #F4EED8; box-shadow: none; border-bottom: 1px solid #E8DFCE; color: #333 !important;
}
.c > details:nth-of-type(1) .i, .c > details:nth-of-type(1) .l div, .c > details:nth-of-type(1) .txt div { color: #8A3324; }
.c > details:nth-of-type(1) .i { background: #F4EED8; border: 1px solid #E8DFCE; }
.c > details:nth-of-type(1) .i span { color: #736B5E; }
.c > details:nth-of-type(2) .i, .c > details:nth-of-type(2) .txt div, .c > details:nth-of-type(2) .bd { color: #2C4F7C; }
.c > details:nth-of-type(2) .i { background: #F4EED8; border: 1px solid #E8DFCE; }
.c > details:nth-of-type(2) .i span { color: #736B5E; }

.term { padding: 15px; background: none; }
.term > div { font-weight: 700; color: #333; text-shadow: none; border-bottom: 1px dashed #E8DFCE; padding: 6px 0; }
.mon { padding: 8px; border-radius: 4px; margin: 8px 0; font-family: monospace; background: #F4EED8; border: 1px solid #DCD1B9; color: #2C4F7C !important; box-shadow: none; }

.tip { position: static; cursor: help; font-weight: bold; transition: all 0.3s; border-bottom: 1px dotted #8A3324; color: #333; }
.tip:hover { color: #8A3324; text-shadow: none; }
.pop {
  visibility: hidden; backdrop-filter: none; -webkit-backdrop-filter: none; text-align: center; border-radius: 6px; padding: 16px 20px; position: fixed; z-index: 99999; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.95); width: max-content; min-width: 220px; max-width: min(320px, 90vw); white-space: normal; line-height: 1.6; font-size: 13px; font-weight: normal; opacity: 0; transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); pointer-events: none; 
  background: rgba(253, 249, 238, 0.98); color: #333 !important; border: 1px solid #E8DFCE; box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.tip:hover .pop, .tip:active .pop { visibility: visible; opacity: 1; transform: translate(-50%, -50%) scale(1); }
.pop::before { content: "档案注释"; display: block; font-size: 11px; margin-bottom: 10px; padding-bottom: 6px; letter-spacing: 4px; font-family: 'Times New Roman', serif; color: #8A3324; border-bottom: 1px solid #E8DFCE; }

.b { padding: 14px; }
.g { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 12px; }
.compact { grid-template-columns: 1fr 1fr; }
.i { padding: 10px; border-radius: 4px; text-align: center; font-weight: bold; background: #F4EED8; box-shadow: none; border: 1px solid #E8DFCE; color: #333; }
.i span { display: block; font-size: 11px; font-weight: normal; margin-bottom: 4px; color: #736B5E; }
.s { padding: 10px; border-radius: 4px; margin-bottom: 10px; font-weight: bold; background: #F4EED8; border: 1px solid #E8DFCE; box-shadow: none; }
.c > details:nth-of-type(1) .s { color: #8A3324; }
.c > details:nth-of-type(2) .s { color: #2C4F7C; }

.p { display: flex; align-items: center; gap: 8px; font-size: 11px; margin-top: 5px; color: #736B5E; }
.t { flex: 1; height: 8px; border-radius: 4px; overflow: hidden; background: #E8DFCE; box-shadow: none; border: none; }
.f { height: 100%; border-radius: 4px; background: #8A3324; box-shadow: none; }
.l div, .txt div, .lo div { padding: 8px 0; border-bottom: 1px dashed #E8DFCE; }
.l div::before, .txt div::before, .lo div::before { content: "✧"; margin-right: 8px; color: #8A3324; }

.sb { margin: 10px 0; border-radius: 4px; border: 1px solid #E8DFCE; background: #FDF9EE; }
.sb > summary { font-size: 13px; padding: 10px 14px; background: #F4EED8 !important; color: #333 !important; border-bottom: 1px solid #E8DFCE; }
.in { padding: 12px 14px; font-size: 13px; line-height: 1.7; color: #333; }
.c > details:nth-of-type(1) .in, .c > details:nth-of-type(2) .in { color: #333; }
.md { padding: 14px; border-radius: 4px; margin-top: 10px; font-style: italic; background: #F4EED8; color: #333; border-left: 4px solid #8A3324; box-shadow: none; }

.npc { padding: 16px; border-radius: 6px; display: flex; gap: 18px; align-items: center; margin-bottom: 16px; background: #FDF9EE; border: 1px solid #E8DFCE; box-shadow: none; }
.ni { flex: 1; font-weight: 800; font-size: 19px; letter-spacing: 2px; font-family: 'Times New Roman', serif; color: #8A3324; text-shadow: none; }
.nt span { font-size: 11px; padding: 4px 12px; border-radius: 12px; margin-right: 6px; font-weight: bold; background: #F4EED8; border: 1px solid #DCD1B9; color: #333; box-shadow: none; }
.npc-avatar-face { width: 85px; height: 85px; border-radius: 50%; background-size: cover; background-position: top center; transition: transform 0.4s ease; border: 2px solid #8A3324; box-shadow: none; background-color: #F4EED8; filter: none; }
.npc-avatar-face:hover { transform: scale(1.02); box-shadow: 0 4px 12px rgba(0,0,0,0.1); border-color: #2C4F7C; }

.header-barrier-scene { position: relative; height: 200px; overflow: hidden; margin-bottom: 24px; border-radius: 6px 6px 0 0; background: #F4EED8; border-bottom: 2px solid #E8DFCE; }
.sky-gradient { position: absolute; width: 100%; height: 100%; background: #FDF9EE; }
.barrier-dome { position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%); width: 120%; height: 220px; border-radius: 50% 50% 0 0; z-index: 10; overflow: hidden; background: none; border: 1px dashed #DCD1B9; box-shadow: none; }
.barrier-grid-anim { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-size: 40px 40px; opacity: 0.3; animation: starDrift 30s linear infinite; background-image: radial-gradient(rgba(0,0,0,0.05) 1px, transparent 1px); }

.fill-hp { background: #8A3324; box-shadow: none; }
.fill-mp { background: #2C4F7C; box-shadow: none; }
.fill-sp { background: #5D4037; box-shadow: none; }
.progress-fill::after { display: none; }

d { display: inline !important; font-weight: bold !important; padding-bottom: 1px !important; margin: 0 3px !important; border-bottom: 1px dashed currentColor !important; }
m { display: block !important; font-style: italic !important; font-size: 0.95em !important; margin: 8px 0 !important; padding-left: 12px !important; color: #736B5E !important; border-left: 3px solid #DCD1B9 !important; background: #F4EED8 !important; }
d.kurumi, d.akame { color: #8A3324 !important; text-shadow: none !important; }
d.mio, d.esdeath { padding: 0 !important; border: none !important; box-shadow: none !important; color: #2C4F7C !important; border-bottom: 2px solid #2C4F7C !important; text-shadow: none !important; background-color: transparent !important; }
d.origami { padding: 0 !important; border: none !important; box-shadow: none !important; color: #333 !important; border-bottom: 2px solid #736B5E !important; background-color: transparent !important; }

@media (max-width: 600px) {
  .g { grid-template-columns: 1fr 1fr; }
  .npc { flex-direction: column; text-align: center; } 
  .header-barrier-scene { height: 160px; }
  .barrier-dome { height: 180px; }
}