/* =========================================
   0. 全局变量与背景 (竹取卷轴·亚麻纸)
   ========================================= */
:root {
  --scroll-bg: #F2EAD3;           /* 羊皮纸/亚麻色底 */
  --scroll-ink: #2C241B;           /* 浓墨深棕 */
  --scroll-red: #C41E3A;           /* 茜色/朱砂红 */
  --scroll-gold: #D4AF37;          /* 泥金 */
  --scroll-accent: #E76F51;        /* 珊瑚红 */
  --scroll-border: 2px solid #5D4037;
  --scroll-shadow: 4px 4px 0px 0px rgba(93, 64, 55, 0.2);
  --paper-texture: url('data:image/svg+xml;utf8,<svg width="200" height="200" xmlns="http://www.w3.org/2000/svg"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23noise)" opacity="0.08"/></svg>');
  /* 字体族优化：强制跨平台衬线体回退，防止安卓显示为黑体 */
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Source Han Serif CN", "Songti SC", "SimSun", "STSong", "KaiTi", serif;
  --font-kaiti: "KaiTi", "STKaiti", "HKaiT", "Fangkaiti", serif;
}

/* =========================================
   1. 核心气泡容器 (古籍书简·宽屏优化版)
   ========================================= */
div.group.relative > div.relative.inline-block.bg-gray-100\/90 {
  display: block !important;
  isolation: isolate;
  transform-style: preserve-3d;
  background-color: #FFFDF5 !important;
  background-image: var(--paper-texture) !important;
  border: 1px solid #8D6E63;
  border-top: 4px solid var(--scroll-red);
  border-bottom: 1px solid #8D6E63;
  border-radius: 2px;
  box-shadow: 0 2px 10px rgba(141, 110, 99, 0.2);
  padding: 20px 28px;
  width: auto;
  min-width: 92%;
  max-width: 48em;
  margin: 10px auto;
  box-sizing: border-box;
  font-family: var(--font-serif);
  color: var(--scroll-ink) !important;
  font-size: 1.05rem;
  line-height: 1.9;
  letter-spacing: 0.05em;
  position: relative;
  z-index: 1;
  -webkit-font-smoothing: antialiased;
}
@media screen and (max-width: 600px) {
  div.group.relative > div.relative.inline-block.bg-gray-100\/90 {
    padding: 15px 10px;
    min-width: 98%;
    font-size: 1rem;
  }
}
div.group.relative > div.relative.inline-block.bg-gray-100\/90::before {
  content: "";
  position: absolute;
  top: 6px; bottom: 6px; left: 6px; right: 6px;
  border: 1px dashed rgba(141, 110, 99, 0.3);
  pointer-events: none;
  z-index: -1;
  transform: translateZ(-1px);
}
div.group.relative > div.relative.inline-block.bg-gray-100\/90 p[data-character="天照院夜夜"] {
  color: var(--scroll-red);
  font-weight: 900;
  border-bottom: 2px solid rgba(196, 30, 58, 0.2);
  display: inline-block;
  padding-bottom: 2px;
  margin-bottom: 5px;
  font-family: var(--font-kaiti);
}
div.group.relative > div.relative.inline-block.bg-gray-100\/90 p[data-character="天照院夜夜"]::after {
  content: "❀";
  position: absolute;
  right: -18px;
  top: 50%;
  transform: translateY(-55%);
  color: #E91E63;
  font-size: 0.9em;
  opacity: 0.8;
}

/* =========================================
   2. ClassUI 面板 (折叠屏风)
   ========================================= */
.classUI-details-panel,
.classUI-panel {
  margin-bottom: 20px;
  background-color: #FAF3E0;
  background-image: var(--paper-texture);
  border: 1px solid #A1887F;
  border-radius: 4px;
  box-shadow: 3px 3px 0 rgba(161, 136, 127, 0.3);
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}
.classUI-details-panel:hover,
.classUI-panel:hover {
  transform: translateY(-2px);
  box-shadow: 4px 4px 0 rgba(161, 136, 127, 0.4);
  transition: all 0.3s ease;
}
.styled-prose-container {
  background: transparent;
  --classUI-panel-bg: #FAF3E0;
  --classUI-panel-border: #A1887F;
  --classUI-header-bg: #EFEBE9;
  --classUI-text-secondary: #5D4037;
  --classUI-accent: var(--scroll-red);
  padding: 0;
  box-shadow: none;
}
.classUI-panel-header,
.classUI-summary-header {
  background-color: #EFEBE9;
  padding: 10px 15px;
  font-weight: 700;
  color: #4E342E;
  border-bottom: 1px solid #D7CCC8;
  font-family: var(--font-serif);
  display: flex;
  align-items: center;
}
.classUI-summary-header::before {
  content: "◈";
  color: var(--scroll-red);
  margin-right: 10px;
  font-size: 0.8em;
}
.classUI-panel-content {
  padding: 1.2em;
  color: #3E2723;
  font-family: var(--font-serif);
}
.classUI-master-system .classUI-system-line {
  display: block;
  margin-bottom: 0.8em;
  line-height: 1.6;
  border-bottom: 1px dotted #BCAAA4;
  padding-bottom: 6px;
}
.classUI-master-system .classUI-label {
  color: #5D4037;
  background: rgba(141, 110, 99, 0.1);
  padding: 0 6px;
  margin-right: 0.6em;
  font-weight: bold;
  border-radius: 2px;
  font-family: var(--font-serif);
  display: inline-block;
  margin-bottom: 4px;
}
.classUI-master-system .classUI-value {
  color: #2C241B;
  font-family: var(--font-serif);
  display: block;
  width: 100%;
}
.classUI-master-system .classUI-task-active,
.classUI-master-system .classUI-task-completed,
.classUI-master-system .classUI-task-failed {
  font-size: 0.75em;
  padding: 1px 5px;
  border-radius: 2px;
  margin-left: 0.5em;
  font-weight: 900;
  border: 1px solid;
  font-family: var(--font-kaiti);
  display: inline-block;
}
.classUI-master-system .classUI-task-active {
  color: #fff;
  background-color: #8D6E63;
  border-color: #8D6E63;
}
.classUI-master-system .classUI-task-completed {
  color: #fff;
  background-color: #2E7D32;
  border-color: #2E7D32;
}
.classUI-master-system .classUI-task-failed {
  color: #fff;
  background-color: #C62828;
  border-color: #C62828;
}
.classUI-compass-options {
  gap: 12px;
}
.classUI-compass-option {
  border: 1px solid #8D6E63;
  background-color: #FFF8E1;
  color: #4E342E;
  border-radius: 4px;
  position: relative;
  box-shadow: 2px 2px 0 rgba(141, 110, 99, 0.2);
}
.classUI-compass-option:hover {
  background-color: #FFE0B2;
  border-color: #E65100;
  transform: translateY(-1px);
  box-shadow: 3px 3px 0 rgba(230, 81, 0, 0.2);
}
.classUI-option-label {
  color: #BF360C;
  font-weight: 900;
  border-right: 1px solid rgba(141, 110, 99, 0.2);
  padding-right: 10px;
  font-family: var(--font-kaiti);
}

/* =========================================
   3. MomoTalk (偶像荣耀·LINE风格)
   ========================================= */
.momo-talk-wrapper {
  font-family: 'Segoe UI', 'Helvetica Neue', Helvetica, 'Microsoft YaHei', sans-serif !important;
  background-color: #89C4F4 !important;
  border: none !important;
  border-radius: 16px;
  overflow: hidden;
  max-width: 100%;
  margin: 20px 0;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  color: #000 !important;
  text-indent: 0 !important;
  clear: both;
  isolation: isolate;
  z-index: 1;
}
.momo-talk-wrapper details > summary { list-style: none; cursor: pointer; outline: none; }
.momo-talk-wrapper details > summary::-webkit-details-marker { display: none; }
.momo-talk-wrapper * { text-indent: 0 !important; box-sizing: border-box; }
.momo-header {
  background-color: #2C3E50 !important;
  color: #FFFFFF !important;
  padding: 14px 18px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.1) !important;
  font-size: 1em;
  letter-spacing: 0.5px;
}
.momo-header:hover { filter: brightness(1.1); }
.momo-body {
  background-color: #89C4F4 !important;
  padding: 20px 15px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  overflow-y: auto;
  background-image: none;
}
.momo-msg { display: flex; align-items: flex-start; animation: momoFadeIn 0.3s ease-out; margin-bottom: 5px; width: 100%; }
.momo-msg.student-side { justify-content: flex-start; }
.momo-msg.student-side .momo-avatar-box { margin-right: 8px; margin-top: 2px; }
/* --- 主角侧（右侧）--- */
.momo-msg.sensei-side { justify-content: flex-end; }
.momo-msg.sensei-side .momo-avatar-box {
  display: flex;
  margin-left: 8px;
  margin-top: 2px;
}
.momo-msg.sensei-side .momo-content { align-items: flex-end; }
.momo-msg.sensei-side .momo-bubble {
  background-color: #98E165 !important;
  color: #000000 !important;
  border: none !important;
  border-radius: 18px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  position: relative;
}
.momo-msg.sensei-side .momo-bubble::after {
  content: ""; position: absolute; right: -6px; top: 12px; width: 0; height: 0;
  border-style: solid; border-width: 6px 0 6px 8px; border-color: transparent transparent transparent #98E165;
}
/* --- 头像通用样式 --- */
.momo-avatar-box {
  width: 42px; height: 42px; border-radius: 50%; background-color: #F0F0F0; flex-shrink: 0;
  display: flex; justify-content: center; align-items: center; border: 2px solid #FFFFFF;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1); overflow: hidden;
}
.momo-avatar-img { width: 100%; height: 100%; object-fit: cover; }
.momo-avatar-text { font-size: 10px; display: none; }
.momo-content { display: flex; flex-direction: column; max-width: 75%; }
.momo-name {
  font-size: 0.75em; color: #FFFFFF !important; text-shadow: 0 1px 2px rgba(0,0,0,0.2);
  margin-bottom: 4px; margin-left: 2px; line-height: 1.2;
}
.momo-msg.sensei-side .momo-name { display: none; }
.momo-bubble {
  background-color: #FFFFFF !important; border: none !important; padding: 10px 14px;
  border-radius: 18px; font-size: 0.95em; line-height: 1.5; color: #000000 !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05); text-align: left; white-space: pre-line !important;
  word-wrap: break-word; min-width: 2em; position: relative;
}
.momo-subtext { display: block; font-size: 0.75em; color: #555555 !important; margin-top: 4px; margin-left: 4px; line-height: 1.2; opacity: 1; font-weight: 500; }
.momo-msg.student-side .momo-bubble::before {
  content: ""; position: absolute; left: -6px; top: 12px; width: 0; height: 0;
  border-style: solid; border-width: 6px 8px 6px 0; border-color: transparent #FFFFFF transparent transparent;
}
.momo-bubble p { text-indent: 0 !important; margin: 0 !important; padding: 0 !important; }
.momo-sticker { max-width: 140px; border-radius: 12px; margin-top: 4px; }
@keyframes momoFadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}
/* ========== 暗色模式 ========== */
@media (prefers-color-scheme: dark) {
  .momo-talk-wrapper { background-color: #202020 !important; box-shadow: 0 8px 20px rgba(0,0,0,0.5); border: 1px solid #333 !important; }
  .momo-header { background-color: #151515 !important; border-bottom-color: #333 !important; }
  .momo-body { background-color: #202020 !important; }
  .momo-bubble { background-color: #2F2F2F !important; color: #FFFFFF !important; }
  .momo-msg.student-side .momo-bubble::before { border-color: transparent #2F2F2F transparent transparent; }
  .momo-msg.sensei-side .momo-bubble { background-color: #518F42 !important; color: #FFFFFF !important; }
  .momo-msg.sensei-side .momo-bubble::after { border-color: transparent transparent transparent #518F42; }
  .momo-msg.sensei-side .momo-avatar-box {
    display: flex;
    margin-left: 8px;
    margin-top: 2px;
  }
  .momo-name { color: #BBBBBB !important; text-shadow: none; }
  .momo-avatar-box { border-color: #444; }
  .momo-subtext { color: #AAAAAA !important; }
}

/* =========================================
   4. 角色信息面板 - 进度条渲染深度修复版
   ========================================= */
.classUI-bubble-bar {
  position: relative;
  background-color: #EFEBE9;
  border: 1px solid #A1887F;
  border-radius: 4px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
  min-height: 24px;
  height: auto;
  width: 100%;
  overflow: hidden;
  margin-top: 2px;
  display: flex;
  align-items: center;
}
.classUI-bar-fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  z-index: 1;
  opacity: 0.85;
  transition: width 0.5s ease-in-out;
  background-color: #D7CCC8;
}
.classUI-bar-text {
  position: relative;
  z-index: 2;
  color: #3E2723;
  font-weight: 900;
  font-family: var(--font-serif);
  font-size: 0.85em;
  line-height: 1.5;
  padding: 4px 8px;
  white-space: normal;
  word-wrap: break-word;
  text-shadow: 0 0 2px rgba(255,255,255,0.7);
  width: 100%;
}
.classUI-bar-fill.pink { background-color: #EF9A9A !important; }
.classUI-bar-fill.purple { background-color: #9FA8DA !important; }
.classUI-bar-fill.teal, .classUI-bar-fill.cyan { background-color: #80CBC4 !important; }
.classUI-bar-fill.green { background-color: #A5D6A7 !important; }
.classUI-bar-fill.dark, .classUI-bar-fill.black { background-color: #90A4AE !important; }
.classUI-bar-fill.yellow, .classUI-bar-fill.gold { background-color: #FFF59D !important; }

/* =========================================
   5. 角色面板 (Dashboard - 云纹匾额)
   ========================================= */
.classUI-top-dashboard {
  border: 2px solid #5D4037;
  padding: 10px;
  background: #FFF8E1;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  border-radius: 4px;
}
.classUI-top-dashboard .classUI-system-line:nth-child(1) {
  color: #3E2723;
  border-bottom: 2px solid #8D6E63;
  font-size: 1.6em;
  font-family: var(--font-kaiti);
}
.classUI-top-dashboard .classUI-system-line:not(:nth-child(1)) {
  background-color: #FFFDF5;
  border: 1px solid #D7CCC8;
  border-radius: 4px;
  padding: 4px 8px;
}
.classUI-top-dashboard .classUI-system-line:not(:nth-child(1)) .classUI-label {
  color: #8D6E63;
  font-weight: bold;
}
/* ==================== 角色头像强制圆形化修复 ==================== */
.classUI-avatar-wrapper {
  flex-shrink: 0 !important;
  width: 85px !important;
  height: 85px !important;
  min-width: 85px !important;
  min-height: 85px !important;
  max-width: 85px !important;
  max-height: 85px !important;
  margin-left: 15px !important;
  box-sizing: border-box !important;
  
  /* 核心：圆形裁剪 */
  border-radius: 50% !important;
  clip-path: circle(50% at 50% 50%) !important;
  overflow: hidden !important;
  
  /* 适配CS的竹取卷轴配色 */
  border: 3px solid #5D4037 !important;
  background: #FFFDF5 !important;
  box-shadow: 3px 3px 0px 0px rgba(93, 64, 55, 0.2) !important;
  
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  transition: all 0.3s ease !important;
}

.classUI-avatar {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
}

/* 防止手机隔离区里的全局图片样式干扰 */
.phone-wrapper .classUI-avatar-wrapper {
  width: 80px !important;
  height: 80px !important;
  border-radius: 50% !important;
}
.phone-wrapper .classUI-avatar {
  width: 100% !important;
  height: 100% !important;
  border-radius: 50% !important;
}

/* =========================================
   6. 开发度标签 (朱印)
   ========================================= */
.classUI-dev-tag {
  background: transparent;
  color: #C62828;
  border: 2px solid #C62828;
  border-radius: 4px;
  padding: 2px 10px;
  font-weight: 900;
  font-family: var(--font-kaiti);
  transform: rotate(-2deg);
  display: inline-block;
}
.classUI-dev-tag:hover {
  background: #C62828;
  color: #fff;
  transform: rotate(0deg) scale(1.05);
  box-shadow: 0 2px 6px rgba(198, 40, 40, 0.3);
}

/* ==================== 加载动画 ==================== */
.style_dot-flashing__8L91Q { display: none !important; }
.flex.items-center.justify-center.w-6.h-5 { position: relative !important; }
.flex.items-center.justify-center.w-6.h-5::before {
  content: '' !important; display: block !important; width: 100% !important; height: 100% !important;
  background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"%3E%3Cdefs%3E%3CradialGradient id="magicGlow"%3E%3Cstop offset="0%25" stop-color="%23D4AF37" stop-opacity="0.9"/%3E%3Cstop offset="100%25" stop-color="%238D6E63" stop-opacity="0.5"/%3E%3C/radialGradient%3E%3C/defs%3E%3Cg transform="translate(50,50)"%3E%3CanimateTransform attributeName="transform" type="rotate" from="0 50 50" to="360 50 50" dur="1.5s" repeatCount="indefinite"/%3E%3Ccircle cx="0" cy="0" r="35" fill="none" stroke="%238D6E63" stroke-width="2.5" opacity="0.8"/%3E%3Cpath d="M 0,-30 L 0,30 M -30,0 L 30,0" stroke="%23D4AF37" stroke-width="3" stroke-linecap="round"/%3E%3Ccircle cx="0" cy="-25" r="4" fill="%23D4AF37"%3E%3Canimate attributeName="opacity" values="1;0.3;1" dur="0.8s" repeatCount="indefinite"/%3E%3C/circle%3E%3Ccircle cx="25" cy="0" r="4" fill="%23D4AF37"%3E%3Canimate attributeName="opacity" values="0.3;1;0.3" dur="0.8s" repeatCount="indefinite"/%3E%3C/circle%3E%3Ccircle cx="0" cy="25" r="4" fill="%23D4AF37"%3E%3Canimate attributeName="opacity" values="1;0.3;1" dur="0.8s" repeatCount="indefinite"/%3E%3C/circle%3E%3Ccircle cx="-25" cy="0" r="4" fill="%23D4AF37"%3E%3Canimate attributeName="opacity" values="0.3;1;0.3" dur="0.8s" repeatCount="indefinite"/%3E%3C/circle%3E%3Cpolygon points="0,-15 4,-5 15,-5 6,3 10,13 0,7 -10,13 -6,3 -15,-5 -4,-5" fill="%23D4AF37" opacity="0.8"%3E%3CanimateTransform attributeName="transform" type="rotate" from="0 0 0" to="-360 0 0" dur="3s" repeatCount="indefinite"/%3E%3C/polygon%3E%3C/g%3E%3C/svg%3E') !important;
  background-size: contain !important; background-repeat: no-repeat !important; background-position: center !important;
}

/* ==================== 界面控制区 ==================== */
.sticky.top-0 {
  background: linear-gradient(180deg, #FFFDF5 0%, #F2EAD3 100%) !important;
  box-shadow: 4px 4px 0px 0px rgba(93, 64, 55, 0.2) !important;
  border-bottom: 2px solid #5D4037 !important;
}
#ai-model-selector {
  background: linear-gradient(135deg, rgba(253, 247, 235, 0.95) 0%, rgba(242, 234, 211, 0.95) 100%) !important;
  border: 2px solid #5D4037 !important; border-radius: 4px !important;
  box-shadow: 4px 4px 0px 0px rgba(93, 64, 55, 0.2) !important; transition: all 0.3s ease !important;
}
#ai-model-selector:hover {
  box-shadow: 5px 5px 0px 0px rgba(196, 30, 58, 0.4), 0 0 15px rgba(212, 175, 55, 0.3) !important;
  transform: translateY(-2px) !important; border-color: #C41E3A !important;
}
#ai-model-selector .truncate { color: #2C241B !important; font-weight: 600 !important; font-family: "Noto Serif SC", "Source Han Serif SC", "Source Han Serif CN", "Songti SC", "SimSun", "STSong", "KaiTi", serif !important; }
#ai-model-selector svg[data-icon="ChevronDown"] { color: #8D6E63 !important; filter: drop-shadow(0 0 4px rgba(93, 64, 55, 0.5)) !important; }
#header-setting-button {
  background: linear-gradient(135deg, #D4AF37 0%, #B8960A 100%) !important; border-radius: 4px !important;
  box-shadow: 3px 3px 0px 0px rgba(93, 64, 55, 0.3) !important; transition: all 0.3s ease !important;
}
#header-setting-button:hover {
  box-shadow: 5px 5px 0px 0px rgba(212, 175, 55, 0.5), 0 0 20px rgba(212, 175, 55, 0.4) !important;
  transform: translateY(-2px) scale(1.02) !important;
}
#ai-mod-button2 .MuiButton-outlinedPrimary {
  border: 2px solid #5D4037 !important; color: #5D4037 !important; background: rgba(253, 247, 235, 0.8) !important;
  border-radius: 4px !important; transition: all 0.3s ease !important; font-weight: 600 !important;
}
#ai-mod-button2 .MuiButton-outlinedPrimary:hover {
  background: linear-gradient(135deg, #8D6E63 0%, #5D4037 100%) !important; color: #FFFDF5 !important;
  border-color: #C41E3A !important; box-shadow: 4px 4px 0px 0px rgba(141, 110, 99, 0.4), 0 0 15px rgba(212, 175, 55, 0.3) !important; transform: translateY(-2px) !important;
}
#ai-mod-button2 svg { filter: drop-shadow(0 0 4px rgba(141, 110, 99, 0.4)) !important; }
.bg-gradient-to-t { background: linear-gradient(to top, #F2EAD3 0%, rgba(242, 234, 211, 0) 100%) !important; }
.bg-white.border-\[1\.5px\] {
  background: linear-gradient(135deg, #FFFDF5 0%, #F2EAD3 100%) !important; border: 2px solid #5D4037 !important;
  border-radius: 4px !important; box-shadow: 4px 4px 0px 0px rgba(93, 64, 55, 0.2) !important; transition: all 0.3s ease !important;
}
.bg-white.border-\[1\.5px\]:focus-within {
  border-color: #C41E3A !important; box-shadow: 5px 5px 0px 0px rgba(196, 30, 58, 0.35), 0 0 20px rgba(212, 175, 55, 0.2) !important;
}
#ai-chat-input { color: #2C241B !important; font-weight: 500 !important; font-family: "Noto Serif SC", "Source Han Serif SC", "Source Han Serif CN", "Songti SC", "SimSun", "STSong", "KaiTi", serif !important; }
#ai-chat-input::placeholder { color: #8D6E63 !important; opacity: 0.7 !important; }
#ai-chat-input::selection { background: rgba(196, 30, 58, 0.3) !important; color: #2C241B !important; }
.absolute.bottom-2.right-2 .bg-gray-100 {
  background: linear-gradient(135deg, #FDF5E6 0%, #F2EAD3 100%) !important; color: #5D4037 !important;
  border-radius: 4px !important; font-weight: 600 !important; box-shadow: 2px 2px 0px 0px rgba(93, 64, 55, 0.2) !important;
}
#ai-send-button {
  background: linear-gradient(135deg, #8D6E63 0%, #5D4037 100%) !important; border-radius: 4px !important;
  box-shadow: 3px 3px 0px 0px rgba(141, 110, 99, 0.4) !important; transition: all 0.3s ease !important;
}
#ai-send-button:hover {
  background: linear-gradient(135deg, #D4AF37 0%, #B8960A 100%) !important;
  box-shadow: 5px 5px 0px 0px rgba(212, 175, 55, 0.5), 0 0 20px rgba(212, 175, 55, 0.4) !important;
  transform: translateY(-2px) scale(1.02) !important;
}
#ai-send-button .icon-icon-send { filter: drop-shadow(0 0 6px rgba(255, 253, 245, 0.6)) !important; }
.MuiPaginationItem-root {
  color: #5D4037 !important; border: 2px solid #5D4037 !important; border-radius: 4px !important;
  transition: all 0.3s ease !important; font-weight: 600 !important; font-family: "Noto Serif SC", "Source Han Serif SC", "Source Han Serif CN", "Songti SC", "SimSun", "STSong", "KaiTi", serif !important;
}
.MuiPaginationItem-root:hover { background: rgba(141, 110, 99, 0.15) !important; border-color: #C41E3A !important; box-shadow: 3px 3px 0px 0px rgba(212, 175, 55, 0.4) !important; }
.MuiPaginationItem-root.Mui-selected {
  background: linear-gradient(135deg, #8D6E63 0%, #5D4037 100%) !important; color: #FFFDF5 !important;
  border-color: #C41E3A !important; box-shadow: 3px 3px 0px 0px rgba(141, 110, 99, 0.4) !important;
}

/* ==================== 隐藏头像 ==================== */
#customized-question-avatar, #customized-answer-avatar { display: none !important; }

/* ==================== 开场白选择框 ==================== */
#customized-opening-statement-selector {
  background: rgba(253, 247, 235, 0.92) !important; border: 2px solid #5D4037 !important;
  border-radius: 4px !important; color: #3E2723 !important; font-family: "Noto Serif SC", "Source Han Serif SC", "Source Han Serif CN", "Songti SC", "SimSun", "STSong", "KaiTi", serif !important;
  font-weight: 600 !important; font-size: 0.9rem !important; padding: 8px 14px !important;
  box-shadow: 3px 3px 0px 0px rgba(93, 64, 55, 0.25) !important; backdrop-filter: blur(4px) !important; transition: all 0.3s ease !important; cursor: pointer !important;
}
#customized-opening-statement-selector:hover { border-color: #C41E3A !important; box-shadow: 4px 4px 0px 0px rgba(212, 175, 55, 0.3) !important; transform: translateY(-1px) !important; }
#customized-opening-statement-selector:focus { outline: none !important; border-color: #C41E3A !important; box-shadow: 0 0 0 3px rgba(141, 110, 99, 0.3) !important; }

/* ==================== 底部功能菜单：一排不换行，允许横向滚动 ==================== */
#ai-mod-button2 {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 4px !important;
  padding: 4px 0 !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
}

/* ==================== 所有操作按钮（包含复制、快捷指令等） ==================== */
#customized-reload-button,
#customized-edit-button,
#customized-resend-button,
#customized-delete-button,
#customized-create-image-button,
#customized-create-audio-button,
#customized-branch-and-share-button,
#customized-prompt-log-button,
#customized-answer-content > div.MuiStack-root.css-1ajg1ui > button:nth-child(1),
#customized-copy-button,
#customized-chat-copy-button,
#copy-button,
#message-copy-button,
button:has(svg use[xlink\:href="#icon-a-icon-chat-copy01"]),
[role="button"]:has(svg use[xlink\:href="#icon-a-icon-chat-copy01"]),
[id^="customized-shortcut-command-button-"],
#customized-ai-summary-button,
#customized-flow-button,
#customized-comment-button,
#customized-scroll-to-bottom-button,
#toggle-sub-buttons,
#ai-mod-button {
  padding: 6px 12px !important;
  min-width: 70px !important;
  height: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  flex-shrink: 0 !important;
  border: 2px solid #5D4037 !important;
  color: #3E2723 !important;
  background: rgba(253, 247, 235, 0.92) !important;
  border-radius: 4px !important;
  font-family: "Noto Serif SC", "Source Han Serif SC", "Source Han Serif CN", "Songti SC", "SimSun", "STSong", "KaiTi", serif !important;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
  line-height: 1.3 !important;
  box-shadow: 2px 2px 0px 0px rgba(93, 64, 55, 0.2) !important;
  backdrop-filter: blur(4px) !important;
  transition: all 0.3s ease !important;
  cursor: pointer !important;
  margin: 2px !important;
  white-space: nowrap !important;
  text-transform: none !important;
  letter-spacing: 0.5px !important;
}
/* 悬停效果 */
#customized-reload-button:hover,
#customized-edit-button:hover,
#customized-resend-button:hover,
#customized-delete-button:hover,
#customized-create-image-button:hover,
#customized-create-audio-button:hover,
#customized-branch-and-share-button:hover,
#customized-prompt-log-button:hover,
#customized-answer-content > div.MuiStack-root.css-1ajg1ui > button:nth-child(1):hover,
#customized-copy-button:hover,
#customized-chat-copy-button:hover,
#copy-button:hover,
#message-copy-button:hover,
[id^="customized-shortcut-command-button-"]:hover,
#customized-ai-summary-button:hover,
#customized-flow-button:hover,
#customized-comment-button:hover,
#customized-scroll-to-bottom-button:hover,
#toggle-sub-buttons:hover,
#ai-mod-button:hover,
button:has(svg use[xlink\:href="#icon-a-icon-chat-copy01"]):hover,
[role="button"]:has(svg use[xlink\:href="#icon-a-icon-chat-copy01"]):hover {
  background: linear-gradient(135deg, #8D6E63 0%, #5D4037 100%) !important;
  color: #FFFDF5 !important;
  border-color: #C41E3A !important;
  transform: translateY(-1px) !important;
  box-shadow: 3px 3px 0px 0px rgba(196, 30, 58, 0.3) !important;
}
#customized-delete-button:hover { background: linear-gradient(135deg, #C41E3A, #8B1A2B) !important; }

/* ==================== 移动端强制显示按钮文字 ==================== */
@media (max-width: 767px) {
  #customized-reload-button,
  #customized-edit-button,
  #customized-resend-button,
  #customized-delete-button,
  #customized-create-image-button,
  #customized-create-audio-button,
  #customized-branch-and-share-button,
  #customized-prompt-log-button,
  #customized-answer-content > div.MuiStack-root.css-1ajg1ui > button:nth-child(1),
  #customized-copy-button,
  #customized-chat-copy-button,
  #copy-button,
  #message-copy-button,
  [id^="customized-shortcut-command-button-"],
  #customized-ai-summary-button,
  #customized-flow-button,
  #customized-comment-button,
  #customized-scroll-to-bottom-button,
  #toggle-sub-buttons,
  #ai-mod-button,
  button:has(svg use[xlink\:href="#icon-a-icon-chat-copy01"]),
  [role="button"]:has(svg use[xlink\:href="#icon-a-icon-chat-copy01"]) {
    font-size: 0.8rem !important;
    padding: 5px 10px !important;
    min-width: 72px !important;
    color: #3E2723 !important;
    -webkit-text-fill-color: #3E2723 !important;
  }
  #customized-reload-button span,
  #customized-edit-button span,
  #customized-resend-button span,
  #customized-delete-button span,
  #customized-create-image-button span,
  #customized-create-audio-button span,
  #customized-branch-and-share-button span,
  #customized-prompt-log-button span,
  #customized-copy-button span,
  #customized-chat-copy-button span,
  #copy-button span,
  #message-copy-button span,
  [id^="customized-shortcut-command-button-"] span,
  #customized-ai-summary-button span,
  #customized-flow-button span,
  #customized-comment-button span,
  #customized-scroll-to-bottom-button span,
  #toggle-sub-buttons span,
  #ai-mod-button span,
  button:has(svg use[xlink\:href="#icon-a-icon-chat-copy01"]) span,
  [role="button"]:has(svg use[xlink\:href="#icon-a-icon-chat-copy01"]) span {
    display: inline !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: inherit !important;
    -webkit-text-fill-color: inherit !important;
    margin-left: 2px !important;
  }
}

/* ==================== 暗色模式 ==================== */
@media (prefers-color-scheme: dark) {
  .sticky.top-0 { background: linear-gradient(180deg, #2C241B 0%, #3E2723 100%) !important; box-shadow: 4px 4px 0px 0px rgba(212, 175, 55, 0.15) !important; border-bottom: 2px solid #5D4037 !important; }
  #ai-model-selector { background: linear-gradient(135deg, rgba(42, 36, 27, 0.95) 0%, rgba(62, 39, 35, 0.95) 100%) !important; border: 2px solid #5D4037 !important; box-shadow: 4px 4px 0px 0px rgba(0, 0, 0, 0.5) !important; }
  #ai-model-selector:hover { box-shadow: 5px 5px 0px 0px rgba(212, 175, 55, 0.3), 0 0 15px rgba(212, 175, 55, 0.15) !important; border-color: #C41E3A !important; }
  #ai-model-selector .truncate { color: #FDF5E6 !important; }
  #ai-model-selector svg[data-icon="ChevronDown"] { color: #D4AF37 !important; filter: drop-shadow(0 0 4px rgba(212, 175, 55, 0.4)) !important; }
  #header-setting-button { background: linear-gradient(135deg, #B8960A 0%, #8B7300 100%) !important; box-shadow: 3px 3px 0px 0px rgba(212, 175, 55, 0.25) !important; }
  #ai-mod-button2 .MuiButton-outlinedPrimary { border-color: #5D4037 !important; color: #D4AF37 !important; background: rgba(42, 36, 27, 0.8) !important; }
  #ai-mod-button2 .MuiButton-outlinedPrimary:hover { background: linear-gradient(135deg, #5D4037 0%, #3E2723 100%) !important; color: #FFFDF5 !important; border-color: #C41E3A !important; }
  #ai-mod-button2 svg { filter: drop-shadow(0 0 4px rgba(212, 175, 55, 0.3)) !important; }
  .bg-gradient-to-t { background: linear-gradient(to top, #3E2723 0%, rgba(62, 39, 35, 0) 100%) !important; }
  .bg-white.border-\[1\.5px\] { background: linear-gradient(135deg, #2C241B 0%, #3E2723 100%) !important; border-color: #5D4037 !important; box-shadow: 4px 4px 0px 0px rgba(0, 0, 0, 0.5) !important; }
  .bg-white.border-\[1\.5px\]:focus-within { border-color: #C41E3A !important; box-shadow: 5px 5px 0px 0px rgba(196, 30, 58, 0.25), 0 0 15px rgba(212, 175, 55, 0.15) !important; }
  #ai-chat-input { color: #FDF5E6 !important; }
  #ai-chat-input::placeholder { color: #A1887F !important; }
  #ai-chat-input::selection { background: rgba(196, 30, 58, 0.4) !important; color: #FDF5E6 !important; }
  .absolute.bottom-2.right-2 .bg-gray-100 { background: linear-gradient(135deg, #4E342E 0%, #5D4037 100%) !important; color: #A1887F !important; }
  #ai-send-button { background: linear-gradient(135deg, #5D4037 0%, #3E2723 100%) !important; box-shadow: 3px 3px 0px 0px rgba(0, 0, 0, 0.4) !important; }
  #ai-send-button:hover { background: linear-gradient(135deg, #B8960A 0%, #8B7300 100%) !important; box-shadow: 5px 5px 0px 0px rgba(212, 175, 55, 0.4) !important; }
  .MuiPaginationItem-root { color: #D4AF37 !important; border-color: #5D4037 !important; }
  .MuiPaginationItem-root:hover { background: rgba(141, 110, 99, 0.1) !important; border-color: #C41E3A !important; }
  .MuiPaginationItem-root.Mui-selected { background: linear-gradient(135deg, #5D4037 0%, #3E2723 100%) !important; color: #FFFDF5 !important; border-color: #C41E3A !important; }
  #customized-opening-statement-selector { background: rgba(42, 36, 27, 0.9) !important; border-color: #5D4037 !important; color: #D4AF37 !important; box-shadow: 3px 3px 0px 0px rgba(0,0,0,0.5) !important; }
  #customized-opening-statement-selector:hover { border-color: #C41E3A !important; }
  /* 暗色模式 - 操作按钮 */
  #customized-reload-button,
  #customized-edit-button,
  #customized-resend-button,
  #customized-delete-button,
  #customized-create-image-button,
  #customized-create-audio-button,
  #customized-branch-and-share-button,
  #customized-prompt-log-button,
  #customized-answer-content > div.MuiStack-root.css-1ajg1ui > button:nth-child(1),
  #customized-copy-button,
  #customized-chat-copy-button,
  #copy-button,
  #message-copy-button,
  [id^="customized-shortcut-command-button-"],
  #customized-ai-summary-button,
  #customized-flow-button,
  #customized-comment-button,
  #customized-scroll-to-bottom-button,
  #toggle-sub-buttons,
  #ai-mod-button,
  button:has(svg use[xlink\:href="#icon-a-icon-chat-copy01"]),
  [role="button"]:has(svg use[xlink\:href="#icon-a-icon-chat-copy01"]) {
    background: rgba(42, 36, 27, 0.9) !important;
    border-color: #5D4037 !important;
    color: #D4AF37 !important;
    box-shadow: 2px 2px 0px 0px rgba(0,0,0,0.4) !important;
  }
  #customized-reload-button:hover,
  #customized-edit-button:hover,
  #customized-resend-button:hover,
  #customized-delete-button:hover,
  #customized-create-image-button:hover,
  #customized-create-audio-button:hover,
  #customized-branch-and-share-button:hover,
  #customized-prompt-log-button:hover,
  #customized-answer-content > div.MuiStack-root.css-1ajg1ui > button:nth-child(1):hover,
  #customized-copy-button:hover,
  #customized-chat-copy-button:hover,
  #copy-button:hover,
  #message-copy-button:hover,
  [id^="customized-shortcut-command-button-"]:hover,
  #customized-ai-summary-button:hover,
  #customized-flow-button:hover,
  #customized-comment-button:hover,
  #customized-scroll-to-bottom-button:hover,
  #toggle-sub-buttons:hover,
  #ai-mod-button:hover,
  button:has(svg use[xlink\:href="#icon-a-icon-chat-copy01"]):hover,
  [role="button"]:has(svg use[xlink\:href="#icon-a-icon-chat-copy01"]):hover {
    background: linear-gradient(135deg, #5D4037 0%, #3E2723 100%) !important;
    color: #FFFDF5 !important;
    border-color: #C41E3A !important;
    box-shadow: 3px 3px 0px 0px rgba(212, 175, 55, 0.3) !important;
  }
  /* 暗色模式移动端：按钮文字颜色与强制显示 */
  @media (max-width: 767px) {
    #customized-reload-button,
    #customized-edit-button,
    #customized-resend-button,
    #customized-delete-button,
    #customized-create-image-button,
    #customized-create-audio-button,
    #customized-branch-and-share-button,
    #customized-prompt-log-button,
    #customized-copy-button,
    #customized-chat-copy-button,
    #copy-button,
    #message-copy-button,
    [id^="customized-shortcut-command-button-"],
    #customized-ai-summary-button,
    #customized-flow-button,
    #customized-comment-button,
    #customized-scroll-to-bottom-button,
    #toggle-sub-buttons,
    #ai-mod-button,
    button:has(svg use[xlink\:href="#icon-a-icon-chat-copy01"]),
    [role="button"]:has(svg use[xlink\:href="#icon-a-icon-chat-copy01"]) {
      color: #D4AF37 !important;
      -webkit-text-fill-color: #D4AF37 !important;
    }
    #customized-reload-button span,
    #customized-edit-button span,
    #customized-resend-button span,
    #customized-delete-button span,
    #customized-create-image-button span,
    #customized-create-audio-button span,
    #customized-branch-and-share-button span,
    #customized-prompt-log-button span,
    #customized-copy-button span,
    #customized-chat-copy-button span,
    #copy-button span,
    #message-copy-button span,
    [id^="customized-shortcut-command-button-"] span,
    #customized-ai-summary-button span,
    #customized-flow-button span,
    #customized-comment-button span,
    #customized-scroll-to-bottom-button span,
    #toggle-sub-buttons span,
    #ai-mod-button span,
    button:has(svg use[xlink\:href="#icon-a-icon-chat-copy01"]) span,
    [role="button"]:has(svg use[xlink\:href="#icon-a-icon-chat-copy01"]) span {
      display: inline !important;
      visibility: visible !important;
      opacity: 1 !important;
      color: inherit !important;
      -webkit-text-fill-color: inherit !important;
    }
  }
}
/* 另一个复制按钮（用户提问内容区域） */
#customized-question-content > div.MuiStack-root.css-1ajg1ui > button:nth-child(1) {
  padding: 6px 12px !important;
  min-width: 70px !important;
  height: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  flex-shrink: 0 !important;
  border: 2px solid #5D4037 !important;
  color: #3E2723 !important;
  background: rgba(253, 247, 235, 0.92) !important;
  border-radius: 4px !important;
  font-family: "Noto Serif SC", "Source Han Serif SC", "Source Han Serif CN", "Songti SC", "SimSun", "STSong", "KaiTi", serif !important;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
  line-height: 1.3 !important;
  box-shadow: 2px 2px 0px 0px rgba(93, 64, 55, 0.2) !important;
  backdrop-filter: blur(4px) !important;
  transition: all 0.3s ease !important;
  cursor: pointer !important;
  margin: 2px !important;
  white-space: nowrap !important;
  text-transform: none !important;
  letter-spacing: 0.5px !important;
}
#customized-question-content > div.MuiStack-root.css-1ajg1ui > button:nth-child(1):hover {
  background: linear-gradient(135deg, #8D6E63 0%, #5D4037 100%) !important;
  color: #FFFDF5 !important;
  border-color: #C41E3A !important;
  transform: translateY(-1px) !important;
  box-shadow: 3px 3px 0px 0px rgba(196, 30, 58, 0.3) !important;
}
/* 暗色模式 */
@media (prefers-color-scheme: dark) {
  #customized-question-content > div.MuiStack-root.css-1ajg1ui > button:nth-child(1) {
    background: rgba(42, 36, 27, 0.9) !important;
    border-color: #5D4037 !important;
    color: #D4AF37 !important;
    box-shadow: 2px 2px 0px 0px rgba(0,0,0,0.4) !important;
  }
  #customized-question-content > div.MuiStack-root.css-1ajg1ui > button:nth-child(1):hover {
    background: linear-gradient(135deg, #5D4037 0%, #3E2723 100%) !important;
    color: #FFFDF5 !important;
    border-color: #C41E3A !important;
  }
}
/* 移动端文字强制显示 */
@media (max-width: 767px) {
  #customized-question-content > div.MuiStack-root.css-1ajg1ui > button:nth-child(1) {
    font-size: 0.8rem !important;
    padding: 5px 10px !important;
    min-width: 72px !important;
    color: #3E2723 !important;
    -webkit-text-fill-color: #3E2723 !important;
  }
  #customized-question-content > div.MuiStack-root.css-1ajg1ui > button:nth-child(1) span {
    display: inline !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: inherit !important;
    -webkit-text-fill-color: inherit !important;
    margin-left: 2px !important;
  }
}
/* 暗色模式移动端文字颜色 */
@media (prefers-color-scheme: dark) and (max-width: 767px) {
  #customized-question-content > div.MuiStack-root.css-1ajg1ui > button:nth-child(1) {
    color: #D4AF37 !important;
    -webkit-text-fill-color: #D4AF37 !important;
  }
}

/* ========== 人际关系网络面板样式 v2.0 ========== */
.relation-network {
  max-width: 680px;
  margin: 1.5em auto;
  background: #f8f6f9;
  border: 1px solid #dcd5e6;
  border-radius: 12px;
  font-family: 'Noto Serif JP', 'Source Han Serif', 'Hiragino Mincho Pro', serif;
  box-shadow: 0 3px 12px rgba(0,0,0,0.05);
  overflow: hidden;
}
.relation-network[open] .relation-summary {
  border-bottom: 1px dashed #cfc3da;
}
.relation-summary {
  list-style: none !important;
  cursor: pointer;
  padding: 0.9em 1.4em;
  font-size: 1.1em;
  font-weight: 700;
  color: #463c5a !important;
  background: #ece4f2;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.5em;
  user-select: none;
  border-radius: 12px 12px 0 0;
}
.relation-summary::marker { display: none; }
.relation-summary::-webkit-details-marker { display: none; }
.relation-content {
  padding: 1.4em 1.6em;
  display: flex;
  flex-direction: column;
  gap: 1.2em;
  background: #f8f6f9;
}
.relation-section {
  background: #ffffff;
  padding: 0.8em 1.2em;
  border-left: 5px solid #aaa;
  border-radius: 0 8px 8px 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}
.relation-section.core {
  border-left-color: #e05a6b;
  background: #fffafb;
}
.relation-section.normal {
  border-left-color: #5a8ec0;
  background: #fafcff;
}
.relation-section.dormant {
  border-left-color: #b5a58c;
  background: #fafaf8;
}
.relation-section.social {
  border-left-color: #5a9e7c;
  background: #f9fdfa;
}
.relation-section-title {
  font-weight: 700;
  font-size: 0.95em;
  color: #4a3e5c;
  margin-bottom: 0.5em;
  display: flex;
  align-items: center;
  gap: 0.3em;
}
.relation-list {
  margin: 0;
  padding-left: 1.2em;
  list-style: none;
}
.relation-list li {
  font-size: 0.92em;
  line-height: 1.65;
  color: #3d3548;
  position: relative;
  padding: 0.15em 0;
}
.relation-list li::before {
  content: "•";
  position: absolute;
  left: -1.2em;
  color: #b9a7c9;
  font-weight: bold;
}
.relation-empty {
  font-style: italic;
  color: #a092b0 !important;
}
.relation-empty::before {
  display: none;
}
@media (prefers-color-scheme: dark) {
  .relation-network { background: #3a3540; border-color: #5a4e5e; box-shadow: 0 3px 12px rgba(0,0,0,0.3); }
  .relation-summary { background: #4d4255; color: #e8daf0 !important; }
  .relation-content { background: #3a3540; }
  .relation-section { background: #453c4a; box-shadow: 0 1px 4px rgba(0,0,0,0.2); }
  .relation-section.core { background: #4d3f44; border-left-color: #e05a6b; }
  .relation-section.normal { background: #3f4852; border-left-color: #5a8ec0; }
  .relation-section.dormant { background: #44403c; border-left-color: #b5a58c; }
  .relation-section.social { background: #3f4a42; border-left-color: #5a9e7c; }
  .relation-section-title { color: #d4cae0; }
  .relation-list li { color: #e0d8ea; }
  .relation-list li::before { color: #b9a7c9; }
  .relation-empty { color: #8a7a9a !important; }
}

/* ========== 手机界面隔离 ========== */
.phone-wrapper { all: initial; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif; display: block; box-sizing: border-box; width: 380px; max-width: 95vw; height: 820px; max-height: 95vh; background: #0a0a0a; border-radius: 48px; padding: 10px; box-shadow: 0 0 0 2px #222, 0 0 0 6px #0a0a0a, 0 0 0 8px #1a1a1a, 0 20px 50px rgba(0,0,0,0.6); margin: 20px auto; color: #000; position: relative; }
.phone-wrapper * { all: unset; display: revert; box-sizing: border-box; font-family: inherit; color: inherit; }
.phone-wrapper span { display: inline; }
.phone-wrapper details { display: block; }
.phone-wrapper summary { cursor: pointer; list-style: none; outline: none; }
.phone-wrapper summary::-webkit-details-marker { display: none; }
.phone-wrapper br { display: none !important; }
/* 基础图片设定：全占容器 */
.phone-wrapper img { display: block; width: 100%; height: 100%; }
.phone-wrapper textarea { display: block; }
.phone-wrapper button { cursor: pointer; }
.phone-screen { width: 100%; height: 100%; background: #ffffff; border-radius: 38px; overflow: hidden; position: relative; display: flex; flex-direction: column; box-shadow: inset 0 0 4px rgba(0,0,0,0.2); }
.phone-statusbar { height: 48px; background: rgba(255,255,255,0.92); display: flex; justify-content: space-between; align-items: center; padding: 0 24px; font-weight: 600; font-size: 15px; z-index: 200; flex-shrink: 0; border-bottom: 0.5px solid rgba(0,0,0,0.08); color: #000; }
.phone-home { position: absolute; top: 48px; left: 0; right: 0; bottom: 0; background-image: url('https://i.postimg.cc/zfqQhHgg/wei-xin-tu-pian-20260519032318-265-40.jpg'); background-size: cover; background-position: center; display: flex; flex-direction: column; justify-content: space-between; padding: 30px 20px 40px; z-index: 50; }
.app-page { position: absolute; top: 48px; left: 0; right: 0; bottom: 0; width: 100%; height: calc(100% - 48px); background: #ffffff; display: flex; flex-direction: column; z-index: 60; color: #000; }
.phone-wrapper details:not([open]) > .app-page { display: none !important; }
.phone-wrapper .app-page .app-page { top: 0; left: 0; right: 0; bottom: 0; width: 100%; height: 100%; z-index: 70; }
/* 分层返回按钮 */
.phone-wrapper .level-1[open]:not(:has(.level-2[open])) > summary {
  position: absolute !important; top: 48px !important; left: 0 !important; width: 50px !important; height: 54px !important; z-index: 100 !important;
  display: flex !important; align-items: center !important; justify-content: center !important; font-size: 18px !important; color: #000 !important;
  background: rgba(255,255,255,0.98) !important; border: none !important; margin: 0 !important; padding: 0 !important; pointer-events: auto !important;
}
.phone-wrapper .level-1[open]:has(.level-2[open]) > summary {
  position: absolute !important; top: 48px !important; left: 0 !important; width: 50px !important; height: 54px !important; z-index: 100 !important;
  opacity: 0 !important; pointer-events: none !important;
}
.phone-wrapper .level-2[open] > summary {
  position: absolute !important; top: 0 !important; left: 0 !important; width: 50px !important; height: 54px !important; z-index: 110 !important;
  display: flex !important; align-items: center !important; justify-content: center !important; font-size: 18px !important; color: #000 !important;
  background: #ffffff !important; border: none !important; margin: 0 !important; padding: 0 !important; pointer-events: auto !important;
  box-shadow: 2px 0 8px rgba(0,0,0,0.05);
}
.phone-wrapper .level-1[open]:not(:has(.level-2[open])) > summary > * { display: none !important; }
.phone-wrapper .level-2[open] > summary > * { display: none !important; }
.phone-wrapper .level-1[open]:not(:has(.level-2[open])) > summary::before { content: "←"; font-weight: 600; display: block; }
.phone-wrapper .level-2[open] > summary::before { content: "←"; font-weight: 600; display: block; }
/* 图标布局 */
.phone-home .home-row > details { display: inline-block; width: auto; margin: 0; }
.app-icon { display: flex; flex-direction: column; align-items: center; color: #fff; gap: 6px; position: relative; cursor: pointer; }
.app-icon-img { width: 64px; height: 64px; background: rgba(255,255,255,0.85); border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 30px; box-shadow: 0 8px 20px rgba(0,0,0,0.2); }
.app-icon-name { font-size: 11px; font-weight: 500; text-shadow: 0 1px 3px rgba(0,0,0,0.5); }
.app-badge { position: absolute; top: -4px; right: -6px; background: #ff3b30; color: #fff; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0 5px; box-shadow: 0 1px 3px rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.5); line-height: 1; text-shadow: none; }
.home-row { display: flex; justify-content: center; gap: 18px; flex-wrap: nowrap; width: 100%; }
.home-row.top { flex: 1; align-items: flex-start; }
.home-row.middle { align-items: center; margin-bottom: 20px; }
.home-row.bottom { align-items: flex-end; padding-bottom: 20px; }
.app-header { height: 54px; background: #ffffff; display: flex; align-items: center; padding: 0 18px 0 50px; border-bottom: 1px solid #e5e5ea; flex-shrink: 0; }
.app-title { font-size: 18px; font-weight: 620; }
.app-body { flex: 1; overflow-y: auto; background: #ffffff; }
/* 所有头像容器：圆形 + 溢出隐藏 */
.phone-wrapper .line-contact-avatar,
.phone-wrapper .twitter-compose-avatar,
.phone-wrapper .twitter-tweet-avatar,
.phone-wrapper .contacts-item-avatar,
.phone-wrapper .contacts-detail-avatar,
.phone-wrapper .call-item-avatar,
.phone-wrapper .call-detail-avatar,
.phone-wrapper .mail-item-avatar,
.phone-wrapper .mail-detail-avatar,
.phone-wrapper .twitter-comment-avatar,
.phone-wrapper .momo-avatar-box {
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: #d9d9dc;
  overflow: hidden;
}
/* 所有头像图片强制居中裁剪 */
.phone-wrapper .line-contact-avatar img,
.phone-wrapper .twitter-compose-avatar img,
.phone-wrapper .twitter-tweet-avatar img,
.phone-wrapper .contacts-item-avatar img,
.phone-wrapper .contacts-detail-avatar img,
.phone-wrapper .call-item-avatar img,
.phone-wrapper .call-detail-avatar img,
.phone-wrapper .mail-item-avatar img,
.phone-wrapper .mail-detail-avatar img,
.phone-wrapper .twitter-comment-avatar img,
.phone-wrapper .momo-avatar-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.phone-wrapper .momo-avatar-text { font-size: 11px; color: #6c6c70; font-weight: bold; display: none; }
/* 文字强制 */
.phone-wrapper .line-contact-name, .phone-wrapper .line-chat-title, .phone-wrapper .momo-name,
.phone-wrapper .contacts-item-name, .phone-wrapper .call-item-name, .phone-wrapper .mail-item-sender,
.phone-wrapper .mail-item-subject, .phone-wrapper .mail-detail-sender-name, .phone-wrapper .call-detail-name,
.phone-wrapper .contacts-detail-name { color: #000000 !important; text-shadow: none !important; }
/* LINE */
.phone-wrapper .line-app-body { background: #ffffff; }
.phone-wrapper .line-contact-item { display: flex; align-items: center; padding: 16px 18px; border-bottom: 0.5px solid #f0f0f5; color: #1d1d1f; cursor: pointer; }
.phone-wrapper .line-contact-avatar { width: 52px; height: 52px; border-radius: 50%; margin-right: 14px; flex-shrink: 0; }
.phone-wrapper .line-contact-info { flex: 1; }
.phone-wrapper .line-contact-name { font-size: 17px; font-weight: 600; margin-bottom: 4px; }
.phone-wrapper .line-contact-preview { font-size: 14px; color: #8e8e93; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phone-wrapper .line-chat-header { height: 54px; background: #ffffff; border-bottom: 1px solid #e5e5ea; display: flex; align-items: center; padding: 0 16px 0 50px; flex-shrink: 0; }
.phone-wrapper .line-chat-title { font-size: 18px; font-weight: 620; color: #000; }
.phone-wrapper .line-chat-detail { display: flex; flex-direction: column; height: 100%; width: 100%; background: #f2f2f7; }
.phone-wrapper .line-chat-messages { flex: 1; overflow-y: auto; padding: 16px 12px; background: #f2f2f7; }
.phone-wrapper .line-chat-input-bar { height: 60px; background: #ffffff; border-top: 1px solid #e5e5ea; display: flex; align-items: center; padding: 0 12px; flex-shrink: 0; }
.phone-wrapper .line-chat-input { flex: 1; height: 40px; background: #f2f2f7; border-radius: 20px; padding: 0 16px; font-size: 15px; color: #8e8e93; display: flex; align-items: center; }
/* 聊天气泡 */
.phone-wrapper .momo-msg { display: flex; gap: 10px; margin-bottom: 18px; align-items: flex-end; }
.phone-wrapper .momo-msg.student-side { flex-direction: row; justify-content: flex-start; }
.phone-wrapper .momo-msg.sensei-side { flex-direction: row; justify-content: flex-end; width: 100%; }
.phone-wrapper .momo-avatar-box { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.phone-wrapper .momo-content { max-width: 75%; display: flex; flex-direction: column; }
.phone-wrapper .momo-name { font-size: 11px; margin-bottom: 3px; }
.phone-wrapper .momo-bubble { background: #ffffff; padding: 10px 14px; border-radius: 20px; font-size: 14px; line-height: 1.45; color: #1c1c1e !important; box-shadow: 0 1px 4px rgba(0,0,0,0.04); position: relative; }
.phone-wrapper .momo-subtext { font-size: 10px; color: #8e8e93; margin-top: 4px; font-style: italic; }
.phone-wrapper .momo-msg.student-side .momo-bubble::before { content: ""; position: absolute; left: -6px; top: 12px; width: 0; height: 0; border-style: solid; border-width: 6px 6px 6px 0; border-color: transparent #ffffff transparent transparent; }
.phone-wrapper .sensei-side .momo-bubble { background: #06c755 !important; color: #ffffff !important; }
.phone-wrapper .momo-msg.sensei-side .momo-bubble::after { content: ""; position: absolute; right: -6px; top: 12px; width: 0; height: 0; border-style: solid; border-width: 6px 0 6px 6px; border-color: transparent transparent transparent #06c755; }
/* Twitter */
.phone-wrapper .twitter-compose { padding: 14px 16px; border-bottom: 6px solid #f2f2f7; display: flex; gap: 10px; align-items: flex-start; }
.phone-wrapper .twitter-compose-avatar { width: 46px; height: 46px; border-radius: 50%; }
.phone-wrapper .twitter-compose-content { flex: 1; }
.phone-wrapper .twitter-compose-input { width: 100%; min-height: 55px; border: none; font-size: 15px; resize: none; outline: none; background: transparent; color: #1d1d1f; }
.phone-wrapper .twitter-compose-btn { background: #1da1f2; color: #fff; border: none; padding: 8px 18px; border-radius: 20px; font-weight: 600; margin-top: 6px; }
.phone-wrapper .twitter-tweet { padding: 16px; border-bottom: 0.5px solid #e5e5ea; display: flex; gap: 10px; }
.phone-wrapper .twitter-tweet-avatar { width: 48px; height: 48px; border-radius: 50%; }
.phone-wrapper .twitter-tweet-content { flex: 1; }
.phone-wrapper .twitter-tweet-header { display: flex; gap: 6px; margin-bottom: 4px; flex-wrap: wrap; }
.phone-wrapper .twitter-tweet-name { font-weight: 700; font-size: 15px; color: #0f1419; }
.phone-wrapper .twitter-tweet-handle, .phone-wrapper .twitter-tweet-time { font-size: 13px; color: #536471; }
.phone-wrapper .twitter-tweet-text { font-size: 15px; line-height: 1.45; margin-bottom: 10px; color: #0f1419; }
.phone-wrapper .twitter-tweet-actions { display: flex; gap: 40px; color: #536471; font-size: 13px; }
/* Twitter 评论 */
.phone-wrapper .twitter-comment-view { background: #ffffff; }
.phone-wrapper .twitter-comment-header { height: 54px; background: #ffffff; border-bottom: 1px solid #e5e5ea; display: flex; align-items: center; padding: 0 16px 0 50px; flex-shrink: 0; }
.phone-wrapper .twitter-comment-title { font-size: 18px; font-weight: 620; }
.phone-wrapper .twitter-comment-list { flex: 1; overflow-y: auto; padding: 16px; }
.phone-wrapper .twitter-comment { display: flex; gap: 10px; margin-bottom: 16px; }
.phone-wrapper .twitter-comment-avatar { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; }
.phone-wrapper .twitter-comment-body { font-size: 14px; line-height: 1.4; color: #0f1419; }
.phone-wrapper .twitter-comment-user { font-weight: 700; margin-right: 6px; }
/* 联系人 */
.phone-wrapper .contacts-item { display: flex; align-items: center; padding: 12px 18px; border-bottom: 0.5px solid #f0f0f5; color: #1d1d1f; cursor: pointer; }
.phone-wrapper .contacts-item-avatar { width: 48px; height: 48px; border-radius: 50%; margin-right: 14px; }
.phone-wrapper .contacts-item-info { flex: 1; }
.phone-wrapper .contacts-item-name { font-size: 16px; font-weight: 600; }
.phone-wrapper .contacts-item-detail { font-size: 14px; color: #8e8e93; }
.phone-wrapper .contacts-detail-view { display: flex; flex-direction: column; height: 100%; width: 100%; overflow-y: auto; background: #ffffff; padding: 54px 20px 24px; color: #000; }
.phone-wrapper .contacts-detail-avatar { width: 100px; height: 100px; border-radius: 50%; margin: 0 auto 18px; }
.phone-wrapper .contacts-detail-name { font-size: 24px; font-weight: 680; text-align: center; margin-bottom: 24px; }
.phone-wrapper .contacts-detail-info { background: #f9f9fb; border-radius: 12px; padding: 14px 18px; }
.phone-wrapper .contacts-detail-row { padding: 12px 0; border-bottom: 0.5px solid #e5e5ea; }
.phone-wrapper .contacts-detail-row:last-child { border-bottom: none; }
.phone-wrapper .contacts-detail-label { font-size: 12px; color: #8e8e93; margin-bottom: 4px; }
.phone-wrapper .contacts-detail-value { font-size: 16px; color: #000; }
/* 来电 */
.phone-wrapper .call-item { display: flex; align-items: center; padding: 12px 18px; border-bottom: 0.5px solid #f0f0f5; color: #1d1d1f; cursor: pointer; }
.phone-wrapper .call-item-avatar { width: 48px; height: 48px; border-radius: 50%; margin-right: 14px; }
.phone-wrapper .call-item-info { flex: 1; }
.phone-wrapper .call-item-name { font-size: 16px; font-weight: 600; }
.phone-wrapper .call-item-status { font-size: 13px; color: #ff3b30; }
.phone-wrapper .call-item-time { font-size: 13px; color: #8e8e93; }
.phone-wrapper .call-item-type { font-size: 20px; }
.phone-wrapper .call-detail-view { display: flex; flex-direction: column; height: 100%; width: 100%; overflow-y: auto; background: #ffffff; padding: 54px 20px 20px; color: #000; }
.phone-wrapper .call-detail-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.phone-wrapper .call-detail-avatar { width: 50px; height: 50px; border-radius: 50%; }
.phone-wrapper .call-detail-name { font-size: 20px; font-weight: 680; }
.phone-wrapper .call-detail-reason { background: #f9f9fb; border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.phone-wrapper .call-detail-reason-label { font-size: 13px; color: #8e8e93; margin-bottom: 6px; }
.phone-wrapper .call-detail-reason-text { font-size: 15px; line-height: 1.4; color: #000; }
.phone-wrapper .call-voicemail { background: #f0f0f5; border-radius: 12px; padding: 16px; display: flex; align-items: center; gap: 12px; }
.phone-wrapper .call-voicemail-icon { font-size: 28px; }
.phone-wrapper .call-voicemail-text { font-size: 14px; font-style: italic; color: #000; }
/* 邮箱 */
.phone-wrapper .mail-item { padding: 14px 18px; border-bottom: 0.5px solid #f0f0f5; color: #1d1d1f; display: flex; gap: 12px; cursor: pointer; }
.phone-wrapper .mail-item-avatar { width: 46px; height: 46px; border-radius: 50%; }
.phone-wrapper .mail-item-content { flex: 1; }
.phone-wrapper .mail-item-header { display: flex; justify-content: space-between; margin-bottom: 3px; }
.phone-wrapper .mail-item-sender { font-size: 15px; font-weight: 620; }
.phone-wrapper .mail-item-time { font-size: 12px; color: #8e8e93; }
.phone-wrapper .mail-item-email { font-size: 11px; color: #6c6c70; margin-bottom: 4px; }
.phone-wrapper .mail-item-subject { font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.phone-wrapper .mail-item-preview { font-size: 13px; color: #8e8e93; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phone-wrapper .mail-detail-view { display: flex; flex-direction: column; height: 100%; width: 100%; overflow-y: auto; background: #ffffff; padding: 54px 18px 18px; color: #000; }
.phone-wrapper .mail-detail-header { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid #e5e5ea; }
.phone-wrapper .mail-detail-sender-info { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.phone-wrapper .mail-detail-avatar { width: 46px; height: 46px; border-radius: 50%; }
.phone-wrapper .mail-detail-sender-text { flex: 1; }
.phone-wrapper .mail-detail-sender-name { font-size: 16px; font-weight: 620; }
.phone-wrapper .mail-detail-sender-email { font-size: 13px; color: #6c6c70; }
.phone-wrapper .mail-detail-subject { font-size: 20px; font-weight: 680; margin-bottom: 6px; color: #000; }
.phone-wrapper .mail-detail-time { font-size: 13px; color: #8e8e93; }
.phone-wrapper .mail-detail-body { line-height: 1.7; font-size: 15px; color: #000; }
.phone-wrapper .mail-detail-body p { margin-bottom: 0.8em; }
/* ==========================================
   新平台适配样式 - CS复古暖棕系
   参照CS原始美化风格，适配新平台通用class结构
   ========================================== */

/* ==================== 加载动画 ==================== */
.style_dot-flashing__8L91Q { display: none !important; }
.flex.items-center.justify-center.w-6.h-5 { position: relative !important; }
.flex.items-center.justify-center.w-6.h-5::before {
  content: '' !important; display: block !important; width: 100% !important; height: 100% !important;
  background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"%3E%3Cdefs%3E%3CradialGradient id="magicGlow"%3E%3Cstop offset="0%25" stop-color="%23D4AF37" stop-opacity="0.9"/%3E%3Cstop offset="100%25" stop-color="%238D6E63" stop-opacity="0.5"/%3E%3C/radialGradient%3E%3C/defs%3E%3Cg transform="translate(50,50)"%3E%3CanimateTransform attributeName="transform" type="rotate" from="0 50 50" to="360 50 50" dur="1.5s" repeatCount="indefinite"/%3E%3Ccircle cx="0" cy="0" r="35" fill="none" stroke="%238D6E63" stroke-width="2.5" opacity="0.8"/%3E%3Cpath d="M 0,-30 L 0,30 M -30,0 L 30,0" stroke="%23D4AF37" stroke-width="3" stroke-linecap="round"/%3E%3Ccircle cx="0" cy="-25" r="4" fill="%23D4AF37"%3E%3Canimate attributeName="opacity" values="1;0.3;1" dur="0.8s" repeatCount="indefinite"/%3E%3C/circle%3E%3Ccircle cx="25" cy="0" r="4" fill="%23D4AF37"%3E%3Canimate attributeName="opacity" values="0.3;1;0.3" dur="0.8s" repeatCount="indefinite"/%3E%3C/circle%3E%3Ccircle cx="0" cy="25" r="4" fill="%23D4AF37"%3E%3Canimate attributeName="opacity" values="1;0.3;1" dur="0.8s" repeatCount="indefinite"/%3E%3C/circle%3E%3Ccircle cx="-25" cy="0" r="4" fill="%23D4AF37"%3E%3Canimate attributeName="opacity" values="0.3;1;0.3" dur="0.8s" repeatCount="indefinite"/%3E%3C/circle%3E%3Cpolygon points="0,-15 4,-5 15,-5 6,3 10,13 0,7 -10,13 -6,3 -15,-5 -4,-5" fill="%23D4AF37" opacity="0.8"%3E%3CanimateTransform attributeName="transform" type="rotate" from="0 0 0" to="-360 0 0" dur="3s" repeatCount="indefinite"/%3E%3C/polygon%3E%3C/g%3E%3C/svg%3E') !important;
  background-size: contain !important; background-repeat: no-repeat !important; background-position: center !important;
}

/* ==================== 1. 用户输入框上方的功能按钮区域 ==================== */
.flex.min-w-max.items-start.whitespace-nowrap.pr-1.gap-1\.5 {
  background: rgba(253, 247, 235, 0.6) !important;
  padding: 8px 12px !important;
  border-radius: 4px 4px 0 0 !important;
  backdrop-filter: blur(4px) !important;
}

/* ==================== 2. 功能按钮（模组、评论、滚动到底部等） ==================== */
.flex.min-w-max.items-start button.inline-flex.items-center.justify-center,
button.inline-flex.items-center.justify-center.gap-2[aria-label*="滚动"],
button.inline-flex.items-center.justify-center.gap-2[aria-label*="Add"],
button.inline-flex.items-center.justify-center.gap-2[aria-label*="搜索"] {
  background: rgba(253, 247, 235, 0.95) !important;
  border: 2px solid #5D4037 !important;
  color: #3E2723 !important;
  border-radius: 4px !important;
  font-family: "Noto Serif SC", "Source Han Serif SC", "Source Han Serif CN", "Songti SC", "SimSun", "STSong", "KaiTi", serif !important;
  font-weight: 600 !important;
  box-shadow: 2px 2px 0px 0px rgba(93, 64, 55, 0.2) !important;
  backdrop-filter: blur(4px) !important;
  transition: all 0.3s ease !important;
  padding: 6px 12px !important;
  height: auto !important;
  min-height: 28px !important;
}

.flex.min-w-max.items-start button.inline-flex.items-center.justify-center:hover,
button.inline-flex.items-center.justify-center.gap-2[aria-label*="滚动"]:hover,
button.inline-flex.items-center.justify-center.gap-2[aria-label*="Add"]:hover,
button.inline-flex.items-center.justify-center.gap-2[aria-label*="搜索"]:hover {
  background: linear-gradient(135deg, #8D6E63 0%, #5D4037 100%) !important;
  color: #FFFDF5 !important;
  border-color: #C41E3A !important;
  transform: translateY(-2px) !important;
  box-shadow: 3px 3px 0px 0px rgba(196, 30, 58, 0.35), 0 0 15px rgba(212, 175, 55, 0.3) !important;
}

/* ==================== 3. 模组按钮特殊样式（带图标） ==================== */
button.inline-flex.items-center.justify-center:has(svg.lucide-package) {
  background: linear-gradient(135deg, rgba(253, 247, 235, 0.95), rgba(242, 234, 211, 0.95)) !important;
  border: 2px solid #D4AF37 !important;
  color: #3E2723 !important;
}

button.inline-flex.items-center.justify-center:has(svg.lucide-package):hover {
  background: linear-gradient(135deg, #8D6E63 0%, #5D4037 100%) !important;
  color: #FFFDF5 !important;
  border-color: #C41E3A !important;
  box-shadow: 4px 4px 0px 0px rgba(212, 175, 55, 0.4) !important;
}

/* ==================== 4. 快捷指令按钮区域 ==================== */
.flex.shrink-0.items-center.gap-1 button.rounded-full {
  background: rgba(253, 247, 235, 0.95) !important;
  border: 2px solid #5D4037 !important;
  color: #3E2723 !important;
  font-family: "Noto Serif SC", "Source Han Serif SC", "Source Han Serif CN", "Songti SC", "SimSun", "STSong", "KaiTi", serif !important;
  font-weight: 600 !important;
  box-shadow: 2px 2px 0px 0px rgba(93, 64, 55, 0.2) !important;
  backdrop-filter: blur(4px) !important;
  transition: all 0.3s ease !important;
  padding: 6px 14px !important;
  letter-spacing: 0.5px !important;
}

.flex.shrink-0.items-center.gap-1 button.rounded-full:hover {
  background: linear-gradient(135deg, #8D6E63 0%, #5D4037 100%) !important;
  color: #FFFDF5 !important;
  border-color: #C41E3A !important;
  transform: translateY(-2px) !important;
  box-shadow: 3px 3px 0px 0px rgba(141, 110, 99, 0.4), 0 0 15px rgba(212, 175, 55, 0.3) !important;
}

/* ==================== 5. 输入框容器 ==================== */
#prompt-input-body,
.contents#prompt-input-body {
  background: transparent !important;
}

/* ==================== 6. 输入框本身 ==================== */
textarea[data-slot="input-group-control"],
textarea[name="message"] {
  background: rgba(253, 247, 235, 0.95) !important;
  border: 2px solid #5D4037 !important;
  border-radius: 0 0 4px 4px !important;
  color: #2C241B !important;
  font-family: "Noto Serif SC", "Source Han Serif SC", "Source Han Serif CN", "Songti SC", "SimSun", "STSong", "KaiTi", serif !important;
  font-weight: 500 !important;
  padding: 12px 16px !important;
  box-shadow: 4px 4px 0px 0px rgba(93, 64, 55, 0.2) !important;
  backdrop-filter: blur(4px) !important;
  transition: all 0.3s ease !important;
}

textarea[data-slot="input-group-control"]:focus,
textarea[name="message"]:focus {
  border-color: #C41E3A !important;
  box-shadow: 5px 5px 0px 0px rgba(196, 30, 58, 0.35), 0 0 20px rgba(212, 175, 55, 0.25) !important;
  outline: none !important;
}

textarea[data-slot="input-group-control"]::placeholder,
textarea[name="message"]::placeholder {
  color: #8D6E63 !important;
  opacity: 0.7 !important;
  font-family: "Noto Serif SC", "Source Han Serif SC", "Source Han Serif CN", "Songti SC", "SimSun", "STSong", "KaiTi", serif !important;
}

textarea[data-slot="input-group-control"]::selection,
textarea[name="message"]::selection {
  background: rgba(212, 175, 55, 0.3) !important;
  color: #2C241B !important;
}

/* ==================== 7. 底部控制按钮区域 ==================== */
.gap-1.group-data-\[compact\=true\]\/input-group\:gap-0\.5,
div[class*="gap-1"][class*="items-center"][class*="w-full"] {
  background: rgba(253, 247, 235, 0.85) !important;
  padding: 8px 12px !important;
  border-radius: 0 0 4px 4px !important;
  backdrop-filter: blur(4px) !important;
  margin-top: -8px !important;
}

/* ==================== 8. 设置和信息按钮 ==================== */
button.inline-flex.items-center.justify-center.gap-2:has(svg.lucide-settings),
button.inline-flex.items-center.justify-center.gap-2:has(svg.lucide-info) {
  background: rgba(253, 247, 235, 0.95) !important;
  border: 2px solid #5D4037 !important;
  color: #3E2723 !important;
  border-radius: 4px !important;
  box-shadow: 2px 2px 0px 0px rgba(93, 64, 55, 0.2) !important;
  backdrop-filter: blur(4px) !important;
  transition: all 0.3s ease !important;
}

button.inline-flex.items-center.justify-center.gap-2:has(svg.lucide-settings):hover,
button.inline-flex.items-center.justify-center.gap-2:has(svg.lucide-info):hover {
  background: linear-gradient(135deg, #D4AF37 0%, #B8960A 100%) !important;
  color: #FFFDF5 !important;
  border-color: #C41E3A !important;
  transform: translateY(-2px) scale(1.02) !important;
  box-shadow: 4px 4px 0px 0px rgba(212, 175, 55, 0.5), 0 0 20px rgba(212, 175, 55, 0.4) !important;
}

/* ==================== 9. 模型选择框 - 核心优化区域 ==================== */
button.inline-flex.gap-2:has(img[alt*="logo"]) {
  background: linear-gradient(135deg, rgba(253, 247, 235, 0.95) 0%, rgba(242, 234, 211, 0.95) 100%) !important;
  border: 2px solid #5D4037 !important;
  border-radius: 4px !important;
  color: #2C241B !important;
  font-family: "Noto Serif SC", "Source Han Serif SC", "Source Han Serif CN", "Songti SC", "SimSun", "STSong", "KaiTi", serif !important;
  font-weight: 600 !important;
  box-shadow: 4px 4px 0px 0px rgba(93, 64, 55, 0.2) !important;
  backdrop-filter: blur(4px) !important;
  transition: all 0.3s ease !important;
  padding: 6px 12px !important;
  min-width: 0 !important;
  flex-shrink: 1 !important;
}

button.inline-flex.gap-2:has(img[alt*="logo"]):hover {
  border-color: #C41E3A !important;
  box-shadow: 5px 5px 0px 0px rgba(196, 30, 58, 0.35), 0 0 20px rgba(212, 175, 55, 0.3) !important;
  transform: translateY(-2px) !important;
}

button.inline-flex.gap-2:has(img[alt*="logo"]) span.flex-1.truncate {
  color: #2C241B !important;
  font-weight: 600 !important;
  font-family: "Noto Serif SC", "Source Han Serif SC", "Source Han Serif CN", "Songti SC", "SimSun", "STSong", "KaiTi", serif !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  max-width: 100% !important;
}

button.inline-flex.gap-2:has(img[alt*="logo"]) img {
  filter: drop-shadow(0 0 4px rgba(93, 64, 55, 0.3)) !important;
  transition: all 0.3s ease !important;
  flex-shrink: 0 !important;
}

button.inline-flex.gap-2:has(img[alt*="logo"]):hover img {
  filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.5)) !important;
}

/* ==================== 10. 回复模式按钮 - 核心优化区域 ==================== */
button[aria-label*="回复模式"],
button:has(svg.lucide-waves) {
  background: rgba(253, 247, 235, 0.95) !important;
  border: 2px solid #5D4037 !important;
  color: #3E2723 !important;
  border-radius: 4px !important;
  font-family: "Noto Serif SC", "Source Han Serif SC", "Source Han Serif CN", "Songti SC", "SimSun", "STSong", "KaiTi", serif !important;
  font-weight: 600 !important;
  box-shadow: 2px 2px 0px 0px rgba(93, 64, 55, 0.2) !important;
  backdrop-filter: blur(4px) !important;
  transition: all 0.3s ease !important;
  flex-shrink: 0 !important;
  min-width: fit-content !important;
}

button[aria-label*="回复模式"]:hover,
button:has(svg.lucide-waves):hover {
  background: linear-gradient(135deg, #8D6E63 0%, #5D4037 100%) !important;
  color: #FFFDF5 !important;
  border-color: #C41E3A !important;
  transform: translateY(-2px) !important;
  box-shadow: 3px 3px 0px 0px rgba(196, 30, 58, 0.35) !important;
}

button[aria-label*="回复模式"] span,
button:has(svg.lucide-waves) span {
  color: inherit !important;
  font-weight: 600 !important;
}

/* ==================== 11. 发送按钮 ==================== */
button[type="submit"][data-size="icon-sm"],
button[aria-label*="发送"],
button:has(svg.lucide-corner-down-left) {
  background: linear-gradient(135deg, #8D6E63 0%, #5D4037 100%) !important;
  border: none !important;
  border-radius: 4px !important;
  box-shadow: 3px 3px 0px 0px rgba(141, 110, 99, 0.4) !important;
  transition: all 0.3s ease !important;
  flex-shrink: 0 !important;
}

button[type="submit"][data-size="icon-sm"]:hover,
button[aria-label*="发送"]:hover,
button:has(svg.lucide-corner-down-left):hover {
  background: linear-gradient(135deg, #D4AF37 0%, #B8960A 100%) !important;
  box-shadow: 5px 5px 0px 0px rgba(212, 175, 55, 0.5), 0 0 20px rgba(212, 175, 55, 0.4) !important;
  transform: translateY(-3px) scale(1.02) !important;
}

button[type="submit"][data-size="icon-sm"] svg,
button[aria-label*="发送"] svg,
button:has(svg.lucide-corner-down-left) svg {
  filter: drop-shadow(0 0 6px rgba(255, 253, 245, 0.6)) !important;
  color: #FFFDF5 !important;
}

/* ==================== 12. SVG图标通用美化 ==================== */
.flex.min-w-max.items-start svg.lucide,
button svg.lucide {
  transition: all 0.3s ease !important;
  filter: drop-shadow(0 0 2px rgba(93, 64, 55, 0.3)) !important;
}

button:hover svg.lucide {
  filter: drop-shadow(0 0 4px rgba(212, 175, 55, 0.5)) !important;
}

/* ==================== 13. 分隔线美化 ==================== */
.w-px.shrink-0.bg-border {
  background: linear-gradient(to bottom, transparent, #5D4037, transparent) !important;
  opacity: 0.4 !important;
}

/* ==================== 14. 其他特定组件（开场白选择框等） ==================== */
#customized-opening-statement-selector {
  background: rgba(253, 247, 235, 0.95) !important;
  border: 2px solid #5D4037 !important;
  border-radius: 4px !important;
  color: #3E2723 !important;
  font-family: "Noto Serif SC", "Source Han Serif SC", "Source Han Serif CN", "Songti SC", "SimSun", "STSong", "KaiTi", serif !important;
  font-weight: 600 !important;
  font-size: 0.9rem !important;
  padding: 8px 14px !important;
  box-shadow: 3px 3px 0px 0px rgba(93, 64, 55, 0.25) !important;
  backdrop-filter: blur(4px) !important;
  transition: all 0.3s ease !important;
  cursor: pointer !important;
}

#customized-opening-statement-selector:hover {
  border-color: #C41E3A !important;
  box-shadow: 4px 4px 0px 0px rgba(212, 175, 55, 0.3) !important;
  transform: translateY(-1px) !important;
}

#customized-opening-statement-selector:focus {
  outline: none !important;
  border-color: #C41E3A !important;
  box-shadow: 0 0 0 3px rgba(141, 110, 99, 0.3) !important;
}

/* ==================== 15. 隐藏头像 ==================== */
#customized-question-avatar,
#customized-answer-avatar {
  display: none !important;
}

/* ==================== 16. 按钮文字强制显示（防止被Tailwind隐藏） ==================== */
.flex.min-w-max.items-start button span,
.flex.shrink-0.items-center.gap-1 button span,
button[aria-label*="回复模式"] span {
  display: inline !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* ==================== 17. 动画效果 ==================== */
@keyframes subtle-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}

button[type="submit"][data-size="icon-sm"]:not(:hover),
button:has(svg.lucide-corner-down-left):not(:hover) {
  animation: subtle-pulse 2s ease-in-out infinite;
}

/* ==================== 18. 聚焦可访问性增强 ==================== */
.flex.min-w-max.items-start button:focus-visible,
.flex.shrink-0.items-center.gap-1 button:focus-visible,
button[aria-label*="回复模式"]:focus-visible,
button:has(svg.lucide-settings):focus-visible,
button:has(svg.lucide-info):focus-visible,
button.inline-flex.gap-2:has(img[alt*="logo"]):focus-visible,
button[type="submit"][data-size="icon-sm"]:focus-visible {
  outline: 2px solid #D4AF37 !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.35) !important;
}

/* ==================== 19. 暗色模式适配 ==================== */
.dark textarea[data-slot="input-group-control"],
.dark textarea[name="message"] {
  background: rgba(42, 36, 27, 0.95) !important;
  border-color: #5D4037 !important;
  color: #FDF5E6 !important;
  box-shadow: 4px 4px 0px 0px rgba(0, 0, 0, 0.5) !important;
}

.dark textarea[data-slot="input-group-control"]:focus,
.dark textarea[name="message"]:focus {
  border-color: #C41E3A !important;
  box-shadow: 5px 5px 0px 0px rgba(196, 30, 58, 0.25), 0 0 15px rgba(212, 175, 55, 0.15) !important;
}

.dark textarea[data-slot="input-group-control"]::placeholder,
.dark textarea[name="message"]::placeholder {
  color: #A1887F !important;
}

.dark .flex.min-w-max.items-start button,
.dark .flex.shrink-0.items-center.gap-1 button,
.dark button[aria-label*="回复模式"],
.dark button:has(svg.lucide-settings),
.dark button:has(svg.lucide-info) {
  background: rgba(42, 36, 27, 0.95) !important;
  border-color: #5D4037 !important;
  color: #D4AF37 !important;
  box-shadow: 2px 2px 0px 0px rgba(0, 0, 0, 0.4) !important;
}

.dark .flex.min-w-max.items-start button:hover,
.dark .flex.shrink-0.items-center.gap-1 button:hover,
.dark button[aria-label*="回复模式"]:hover,
.dark button:has(svg.lucide-settings):hover,
.dark button:has(svg.lucide-info):hover {
  background: linear-gradient(135deg, #5D4037 0%, #3E2723 100%) !important;
  color: #FFFDF5 !important;
  border-color: #C41E3A !important;
  box-shadow: 4px 4px 0px 0px rgba(212, 175, 55, 0.3) !important;
}

.dark button.inline-flex.gap-2:has(img[alt*="logo"]) {
  background: linear-gradient(135deg, rgba(42, 36, 27, 0.95) 0%, rgba(62, 39, 35, 0.95) 100%) !important;
  border-color: #5D4037 !important;
  color: #FDF5E6 !important;
  box-shadow: 4px 4px 0px 0px rgba(0, 0, 0, 0.5) !important;
}

.dark button.inline-flex.gap-2:has(img[alt*="logo"]):hover {
  border-color: #C41E3A !important;
  box-shadow: 5px 5px 0px 0px rgba(212, 175, 55, 0.3), 0 0 15px rgba(212, 175, 55, 0.15) !important;
}

.dark button.inline-flex.gap-2:has(img[alt*="logo"]) span.flex-1.truncate {
  color: #FDF5E6 !important;
}

.dark button[type="submit"][data-size="icon-sm"],
.dark button:has(svg.lucide-corner-down-left) {
  background: linear-gradient(135deg, #5D4037 0%, #3E2723 100%) !important;
  box-shadow: 3px 3px 0px 0px rgba(0, 0, 0, 0.4) !important;
}

.dark button[type="submit"][data-size="icon-sm"]:hover,
.dark button:has(svg.lucide-corner-down-left):hover {
  background: linear-gradient(135deg, #D4AF37 0%, #B8960A 100%) !important;
  box-shadow: 5px 5px 0px 0px rgba(212, 175, 55, 0.4) !important;
}

.dark .gap-1.group-data-\[compact\=true\]\/input-group\:gap-0\.5,
.dark div[class*="gap-1"][class*="items-center"][class*="w-full"] {
  background: rgba(42, 36, 27, 0.85) !important;
}

.dark .flex.min-w-max.items-start.whitespace-nowrap.pr-1.gap-1\.5 {
  background: rgba(42, 36, 27, 0.6) !important;
}

.dark #customized-opening-statement-selector {
  background: rgba(42, 36, 27, 0.95) !important;
  border-color: #5D4037 !important;
  color: #D4AF37 !important;
  box-shadow: 3px 3px 0px 0px rgba(0, 0, 0, 0.5) !important;
}

.dark #customized-opening-statement-selector:hover {
  border-color: #C41E3A !important;
  box-shadow: 4px 4px 0px 0px rgba(212, 175, 55, 0.25) !important;
}

.dark .w-px.shrink-0.bg-border {
  background: linear-gradient(to bottom, transparent, #5D4037, transparent) !important;
  opacity: 0.6 !important;
}

/* ==================== 20. 移动端适配 - 重点优化区域 ==================== */
@media (max-width: 768px) {
  .gap-1.group-data-\[compact\=true\]\/input-group\:gap-0\.5,
  div[class*="gap-1"][class*="items-center"][class*="w-full"] {
    padding: 8px 8px !important;
    gap: 6px !important;
  }
  
  .flex.items-center.gap-1\.5 {
    gap: 6px !important;
    flex-shrink: 0 !important;
  }
  
  button:has(svg.lucide-settings),
  button:has(svg.lucide-info) {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
  }
  
  .flex.min-w-0.flex-1.items-center.justify-end {
    gap: 6px !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }
  
  .min-w-0.flex-1.overflow-x-hidden.truncate {
    min-width: 0 !important;
    flex: 1 1 0% !important;
    overflow: hidden !important;
  }
  
  button.inline-flex.gap-2:has(img[alt*="logo"]) {
    padding: 4px 8px !important;
    height: 32px !important;
    min-width: 0 !important;
    max-width: 100% !important;
    flex-shrink: 1 !important;
    gap: 6px !important;
  }
  
  button.inline-flex.gap-2:has(img[alt*="logo"]) img {
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    flex-shrink: 0 !important;
  }
  
  button.inline-flex.gap-2:has(img[alt*="logo"]) span.flex-1.truncate {
    font-size: 12px !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  
  button[aria-label*="回复模式"],
  button:has(svg.lucide-waves) {
    padding: 4px 8px !important;
    height: 32px !important;
    min-width: fit-content !important;
    flex-shrink: 0 !important;
    gap: 4px !important;
  }
  
  button[aria-label*="回复模式"] svg,
  button:has(svg.lucide-waves) svg {
    width: 16px !important;
    height: 16px !important;
  }
  
  button[aria-label*="回复模式"] span,
  button:has(svg.lucide-waves) span {
    font-size: 12px !important;
    white-space: nowrap !important;
  }
  
  button[type="submit"][data-size="icon-sm"],
  button:has(svg.lucide-corner-down-left) {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
  }
  
  .flex.min-w-max.items-start button.inline-flex.items-center.justify-center,
  .flex.shrink-0.items-center.gap-1 button.rounded-full {
    font-size: 12px !important;
    padding: 5px 10px !important;
    min-width: auto !important;
    height: 28px !important;
  }
  
  textarea[data-slot="input-group-control"],
  textarea[name="message"] {
    font-size: 14px !important;
    padding: 10px 12px !important;
  }
}

/* ==================== 21. 极小屏幕适配（< 375px） ==================== */
@media (max-width: 374px) {
  .gap-1.group-data-\[compact\=true\]\/input-group\:gap-0\.5,
  div[class*="gap-1"][class*="items-center"][class*="w-full"] {
    gap: 4px !important;
    padding: 6px 6px !important;
  }
  
  .flex.min-w-0.flex-1.items-center.justify-end {
    gap: 4px !important;
  }
  
  button.inline-flex.gap-2:has(img[alt*="logo"]) {
    padding: 4px 6px !important;
    gap: 4px !important;
  }
  
  button.inline-flex.gap-2:has(img[alt*="logo"]) span.flex-1.truncate {
    font-size: 10px !important;
  }
  
  button[aria-label*="回复模式"] span,
  button:has(svg.lucide-waves) span {
    font-size: 10px !important;
  }
  
  button[aria-label*="回复模式"],
  button:has(svg.lucide-waves) {
    padding: 4px 6px !important;
  }
}

/* ==================== 22. 响应式横向滚动（快捷指令区域） ==================== */
.flex.shrink-0.items-center.gap-1 {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: thin !important;
  scrollbar-color: #5D4037 transparent !important;
}

.flex.shrink-0.items-center.gap-1::-webkit-scrollbar {
  height: 4px !important;
}

.flex.shrink-0.items-center.gap-1::-webkit-scrollbar-track {
  background: rgba(253, 247, 235, 0.4) !important;
  border-radius: 2px !important;
}

.flex.shrink-0.items-center.gap-1::-webkit-scrollbar-thumb {
  background: #5D4037 !important;
  border-radius: 2px !important;
}

.flex.shrink-0.items-center.gap-1::-webkit-scrollbar-thumb:hover {
  background: #D4AF37 !important;
}

/* ==================== 23. 暗色模式移动端按钮文字颜色 ==================== */
@media (prefers-color-scheme: dark) and (max-width: 767px) {
  .flex.min-w-max.items-start button.inline-flex.items-center.justify-center,
  .flex.shrink-0.items-center.gap-1 button.rounded-full,
  button[aria-label*="回复模式"],
  button:has(svg.lucide-settings),
  button:has(svg.lucide-info) {
    color: #D4AF37 !important;
    -webkit-text-fill-color: #D4AF37 !important;
  }
  
  .flex.min-w-max.items-start button.inline-flex.items-center.justify-center span,
  .flex.shrink-0.items-center.gap-1 button.rounded-full span,
  button[aria-label*="回复模式"] span {
    color: inherit !important;
    -webkit-text-fill-color: inherit !important;
  }
}
/* 8.弹幕动画关键帧（废弃 transform，采用 margin-left） */
/* 核心动画：无缝循环，复位点在屏幕外 */
@keyframes danmu-scroll {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* 轨道设定：绝对定位 */
#high-dimension-live-chat .danmu-line {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.8em;
  line-height: 1.8;
  overflow: hidden;
  white-space: nowrap;
}

/* 弹幕本体：靠右绝对定位，永不堆叠 */
#high-dimension-live-chat .danmu-line > .danmu-item {
  position: absolute;        /* 继承旧版精髓，绝对定位 */
  right: 0;                  /* 始终锚定在轨道右端 */
  transform: translateX(100%); /* 初始位置在屏幕外右侧 */
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
  
  /* 调用动画，使用内联传进来的变量 */
  animation-name: danmu-scroll;
  animation-timing-function: linear;
  animation-iteration-count: infinite; /* 必须无限循环 */
  animation-duration: var(--danmu-dur, 18s);
  animation-delay: var(--danmu-delay, 0s); /* 核心：随机延迟！ */
}
/* ==================== 终极修复：头像放姓名右侧（直接覆盖） ==================== */
.classUI-top-dashboard .classUI-system-line:nth-child(1),
.classUI-top-dashboard .classUI-system-line.classUI-name-row {
  display: flex !important;
  flex-wrap: nowrap !important;
  justify-content: space-between !important; /* 左侧名字，右侧头像 */
  align-items: center !important;            /* 垂直居中 */
  gap: 10px !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 5px 0 12px 0 !important;
  border-bottom: 2px solid !important;
  border-image: linear-gradient(to right, #5D4037, #D4AF37, #5D4037) 1 !important;
  margin-bottom: 10px !important;
}

/* 左侧姓名区域：占满剩余空间，防止挤压 */
.classUI-top-dashboard .classUI-system-line:nth-child(1) .classUI-name-area,
.classUI-top-dashboard .classUI-system-line.classUI-name-row .classUI-name-area {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  display: flex !important;
  align-items: baseline !important;
  overflow: hidden !important;
}

/* 右侧头像：强制靠右，且绝不换行 */
.classUI-top-dashboard .classUI-system-line:nth-child(1) .classUI-avatar-wrapper,
.classUI-top-dashboard .classUI-system-line.classUI-name-row .classUI-avatar-wrapper {
  flex-shrink: 0 !important;
  margin-left: auto !important; /* 确保在最右侧 */
  width: 85px !important;
  height: 85px !important;
  min-width: 85px !important;
  min-height: 85px !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  border: 3px solid #5D4037 !important; /* 竹取卷轴配色边框 */
  background: #FFFDF5 !important;
  box-shadow: 3px 3px 0px 0px rgba(93, 64, 55, 0.2) !important;
  display: block !important;
}

.classUI-top-dashboard .classUI-system-line:nth-child(1) .classUI-avatar,
.classUI-top-dashboard .classUI-system-line.classUI-name-row .classUI-avatar {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 50% !important;
  display: block !important;
}

/* 移动端缩小头像 */
@media (max-width: 768px) {
  .classUI-top-dashboard .classUI-system-line:nth-child(1) .classUI-avatar-wrapper,
  .classUI-top-dashboard .classUI-system-line.classUI-name-row .classUI-avatar-wrapper {
    width: 70px !important;
    height: 70px !important;
    border-width: 2px !important;
  }
}