/* =========================================
   0. 全局变量与背景 (粉色恋曲·内核兼容优化版)
   ========================================= */
:root {
  --scroll-bg: #FFF5F7;          /* 樱粉色底 */
  --scroll-ink: #5D4037;          /* 柔和深咖 */
  --scroll-red: #FF85A2;          /* 甜心粉红 */
  --scroll-gold: #FFD1DC;          /* 蕾丝浅粉 */
  --scroll-accent: #FF4D6D;       /* 浓郁心动红 */
  --scroll-border: 2px solid #FFB3C1;
  --scroll-shadow: 4px 4px 0px 0px rgba(255, 179, 193, 0.3);
  --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.05"/></svg>');
  /* 字体族优化：确保移动端和PC端均能优先回退至衬线体 */
  --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; /* 强化 3D 渲染层级，彻底杜绝覆盖 */
  background-color: #FFFFFF !important;
  background-image: var(--paper-texture) !important;
  border: 1px solid #FFC2D1;
  border-top: 4px solid var(--scroll-red);
  border-bottom: 1px solid #FFC2D1;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(255, 133, 162, 0.15);
  padding: 20px 28px;
  width: 95%; 
  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 12px;
    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(255, 133, 162, 0.3);
  border-radius: 8px;
  pointer-events: none;
  z-index: -1;
  transform: translateZ(-1px); /* 在 3D 空间中物理置于底层 */
  background: transparent !important;
}
div.group.relative > div.relative.inline-block.bg-gray-100\/90 p[data-character="天照院夜夜"] {
  color: var(--scroll-accent);
  font-weight: 900;
  border-bottom: 2px solid rgba(255, 77, 109, 0.3);
  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: var(--scroll-red);
  font-size: 0.9em;
  opacity: 0.8;
}
/* =========================================
   2. ClassUI 面板 (糖果色屏风)
   ========================================= */
.classUI-details-panel,
.classUI-panel {
  margin-bottom: 20px;
  background-color: #FFF9FA;
  background-image: var(--paper-texture);
  border: 1px solid #FFD1DC;
  border-radius: 8px;
  box-shadow: 3px 3px 0 rgba(255, 179, 193, 0.2);
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}
.classUI-details-panel:hover,
.classUI-panel:hover {
  transform: translateY(-2px);
  box-shadow: 4px 4px 0 rgba(255, 179, 193, 0.3);
  transition: all 0.3s ease;
}
.styled-prose-container {
  background: transparent;
  --classUI-panel-bg: #FFF9FA;
  --classUI-panel-border: #FFD1DC;
  --classUI-header-bg: #FFE5EC;
  --classUI-text-secondary: #8E5D67;
  --classUI-accent: var(--scroll-red);
  padding: 0;
  box-shadow: none;
}
.classUI-panel-header,
.classUI-summary-header {
  background-color: #FFE5EC;
  padding: 10px 15px;
  font-weight: 700;
  color: #C9184A;
  border-bottom: 1px solid #FFC2D1;
  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: #5D4037;
  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 #FFD1DC;
  padding-bottom: 6px;
}
.classUI-master-system .classUI-label {
  color: #C9184A;
  background: rgba(255, 182, 193, 0.2);
  padding: 0 6px;
  margin-right: 0.6em;
  font-weight: bold;
  border-radius: 4px;
  font-family: var(--font-serif);
  display: inline-block;
  margin-bottom: 4px;
}
.classUI-master-system .classUI-value {
  color: #5D4037;
  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: 4px;
  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: #FF85A2;
  border-color: #FF85A2;
}
.classUI-master-system .classUI-task-completed {
  color: #fff;
  background-color: #70E000;
  border-color: #70E000;
}
.classUI-master-system .classUI-task-failed {
  color: #fff;
  background-color: #FF4D6D;
  border-color: #FF4D6D;
}
.classUI-compass-options {
  gap: 12px;
}
.classUI-compass-option {
  border: 1px solid #FFC2D1;
  background-color: #FFFFFF;
  color: #8E5D67;
  border-radius: 8px;
  position: relative;
  box-shadow: 2px 2px 0 rgba(255, 179, 193, 0.2);
}
.classUI-compass-option:hover {
  background-color: #FFF0F3;
  border-color: #FF758F;
  transform: translateY(-1px);
  box-shadow: 3px 3px 0 rgba(255, 117, 143, 0.2);
}
.classUI-option-label {
  color: #FF4D6D;
  font-weight: 900;
  border-right: 1px solid rgba(255, 194, 209, 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; }

/* === 新增：主角侧若无图片头像则隐藏占位框 === */
.momo-msg.sensei-side .momo-avatar-box:not(:has(.momo-avatar-img)) {
  display: none !important;
}

@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; }
  /* 暗色模式下同样隐藏无头像的主角框 */
  .momo-msg.sensei-side .momo-avatar-box:not(:has(.momo-avatar-img)) {
    display: none !important;
  }
}
/* =========================================
   4. 角色信息面板 - 进度条 (定位固化修复版)
   ========================================= */
.classUI-bubble-bar {
  position: relative;
  background-color: #FFF0F3;
  border: 1px solid #FFC2D1;
  border-radius: 8px;
  box-shadow: inset 0 1px 3px rgba(255,133,162,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: #FFB3C1;
  border-radius: inherit; 
}
.classUI-bar-text {
  position: relative;
  z-index: 2;
  color: #8E5D67;
  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%;
  text-indent: 0 !important; 
}
.classUI-bar-fill.pink { background-color: #FF85A2 !important; }
.classUI-bar-fill.purple { background-color: #C77DFF !important; }
.classUI-bar-fill.teal, .classUI-bar-fill.cyan { background-color: #4CC9F0 !important; }
.classUI-bar-fill.green { background-color: #70E000 !important; }
.classUI-bar-fill.dark, .classUI-bar-fill.black { background-color: #5D4037 !important; }
.classUI-bar-fill.yellow, .classUI-bar-fill.gold { background-color: #FFB703 !important; }
/* =========================================
   5. 角色面板 (Dashboard)
   ========================================= */
.classUI-top-dashboard {
  border: 2px solid #FF85A2;
  padding: 10px;
  background: #FFF9FA;
  box-shadow: 0 4px 8px rgba(255,182,193,0.3);
  border-radius: 12px;
}
.classUI-top-dashboard .classUI-system-line:nth-child(1) {
  color: #C9184A;
  border-bottom: 2px solid #FFB3C1;
  font-size: 1.6em;
  font-family: var(--font-kaiti);
}
.classUI-top-dashboard .classUI-system-line:not(:nth-child(1)) {
  background-color: #FFFFFF;
  border: 1px solid #FFD1DC;
  border-radius: 8px;
  padding: 4px 8px;
}
/* =========================================
   6. 开发度标签
   ========================================= */
.classUI-dev-tag {
  background: transparent;
  color: #FF4D6D;
  border: 2px solid #FF4D6D;
  border-radius: 4px;
  padding: 2px 10px;
  font-weight: 900;
  font-family: var(--font-kaiti);
  transform: rotate(-3deg);
  display: inline-block;
}
/* ========== 世界信息面板样式 v3.0 ========== */
.world-briefing {
  max-width: 680px;
  margin: 0 auto;
  background: #faf7f2;
  border: 1px solid #d6cec2;
  border-radius: 12px;
  font-family: 'Noto Serif JP', 'Source Han Serif', 'Hiragino Mincho Pro', 'Times New Roman', serif;
  box-shadow: 0 3px 12px rgba(0,0,0,0.06);
  overflow: hidden;
}
.world-briefing[open] .world-summary {
  border-bottom: 1px dashed #c4b8a8;
}
.world-summary {
  list-style: none !important;
  cursor: pointer;
  padding: 0.9em 1.4em;
  font-size: 1.1em;
  font-weight: 700;
  color: #4e3b2c !important;
  background: #efe6db;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.5em;
  user-select: none;
  border-radius: 12px 12px 0 0;
}
.world-summary::marker { display: none; }
.world-summary::-webkit-details-marker { display: none; }
.world-content {
  padding: 1.4em 1.6em;
  display: flex;
  flex-direction: column;
  gap: 1.2em;
  background: #faf7f2;
}
.world-section {
  background: #ffffff;
  border-left: 4px solid #c7b295;
  padding: 0.7em 1em 0.7em 1.2em;
  border-radius: 0 8px 8px 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.world-section-title {
  font-weight: 700;
  font-size: 0.95em;
  color: #5a4636;
  margin-bottom: 0.5em;
  display: flex;
  align-items: center;
  gap: 0.3em;
}
.world-list {
  margin: 0;
  padding-left: 1.5em;
  list-style: none;
}
.world-list li {
  font-size: 0.9em;
  line-height: 1.65;
  color: #3d3227;
  position: relative;
}
.world-list li::before {
  content: "•";
  position: absolute;
  left: -1.2em;
  color: #b29a7a;
  font-weight: bold;
}
.world-murmur {
  font-style: italic;
  color: #6b5e4f;
  background: #f5f0e9;
  padding: 0.6em 1em;
  border-radius: 6px;
  font-size: 0.9em;
  line-height: 1.75;
}
.world-event-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9em;
}
.world-event-table td {
  padding: 0.4em 0.6em;
  border-bottom: 1px dotted #e2d8cc;
  vertical-align: top;
  color: #3d3227;
}
.world-event-table td:first-child {
  font-weight: 600;
  white-space: nowrap;
  color: #8b7355;
  width: 30%;
}
@media (prefers-color-scheme: dark) {
  .world-briefing { background: #3d362f; border-color: #5a4e3e; box-shadow: 0 3px 12px rgba(0,0,0,0.3); }
  .world-summary { background: #4d443a; color: #e8dcca !important; }
  .world-content { background: #3d362f; }
  .world-section { background: #4a4036; border-left-color: #8f7a66; box-shadow: 0 1px 4px rgba(0,0,0,0.2); }
  .world-section-title { color: #d4c5b2; }
  .world-list li { color: #e0d6c8; }
  .world-list li::before { color: #b29a7a; }
  .world-murmur { background: #52483e; color: #c8bcab; }
  .world-event-table td { border-bottom-color: #5a4e3e; color: #e0d6c8; }
  .world-event-table td:first-child { color: #c7b295; }
}
/* ========== 人际关系网络面板样式 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; }
}
/* ==================== 加载动画 ==================== */
.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="%23FF85A2" stop-opacity="0.9"/%3E%3Cstop offset="100%25" stop-color="%23FFD1DC" 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="%23FFB3C1" stroke-width="2.5" opacity="0.8"/%3E%3Cpath d="M 0,-30 L 0,30 M -30,0 L 30,0" stroke="%23FF4D6D" stroke-width="3" stroke-linecap="round"/%3E%3Ccircle cx="0" cy="-25" r="4" fill="%23FF85A2"%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="%23FF85A2"%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="%23FF85A2"%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="%23FF85A2"%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="%23FF85A2" 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, #FFFFFF 0%, #FFF5F7 100%) !important;
  box-shadow: 0 2px 15px rgba(255, 133, 162, 0.2) !important;
  border-bottom: 2px solid #FFB3C1 !important;
}
#ai-model-selector {
  background: linear-gradient(135deg, rgba(255, 245, 247, 0.95) 0%, rgba(255, 235, 238, 0.95) 100%) !important;
  border: 2px solid #FFB3C1 !important; border-radius: 16px !important;
  box-shadow: 0 4px 12px rgba(255, 179, 193, 0.25) !important; transition: all 0.3s ease !important;
}
#ai-model-selector:hover {
  box-shadow: 0 6px 20px rgba(255, 77, 109, 0.4), 0 0 20px rgba(255, 77, 109, 0.3) !important;
  transform: translateY(-2px) !important; border-color: #FF4D6D !important;
}
#ai-model-selector .truncate { color: #5D4037 !important; font-weight: 600 !important; font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif !important; }
#ai-model-selector svg[data-icon="ChevronDown"] { color: #FF85A2 !important; filter: drop-shadow(0 0 4px rgba(255, 133, 162, 0.5)) !important; }
#header-setting-button {
  background: linear-gradient(135deg, #FF85A2 0%, #FF4D6D 100%) !important; border-radius: 14px !important;
  box-shadow: 0 4px 12px rgba(255, 133, 162, 0.3) !important; transition: all 0.3s ease !important;
}
#header-setting-button:hover {
  box-shadow: 0 6px 20px rgba(255, 133, 162, 0.5), 0 0 25px rgba(255, 133, 162, 0.4) !important;
  transform: translateY(-2px) scale(1.05) !important;
}
#ai-mod-button2 .MuiButton-outlinedPrimary {
  border: 2px solid #FFB3C1 !important; color: #FF85A2 !important; background: rgba(255, 255, 255, 0.8) !important;
  border-radius: 14px !important; transition: all 0.3s ease !important; font-weight: 600 !important;
}
#ai-mod-button2 .MuiButton-outlinedPrimary:hover {
  background: linear-gradient(135deg, #FF85A2 0%, #FF4D6D 100%) !important; color: #FFFFFF !important;
  border-color: #FFD1DC !important; box-shadow: 0 4px 15px rgba(255, 133, 162, 0.4), 0 0 20px rgba(255, 77, 109, 0.3) !important; transform: translateY(-2px) !important;
}
#ai-mod-button2 svg { filter: drop-shadow(0 0 4px rgba(255, 133, 162, 0.4)) !important; }
.bg-gradient-to-t { background: linear-gradient(to top, #FFF5F7 0%, rgba(255, 245, 247, 0) 100%) !important; }
.bg-white.border-\[1\.5px\] {
  background: linear-gradient(135deg, #FFFFFF 0%, #FFF5F7 100%) !important; border: 2px solid #FFB3C1 !important;
  border-radius: 20px !important; box-shadow: 0 4px 20px rgba(255, 179, 193, 0.25) !important; transition: all 0.3s ease !important;
}
.bg-white.border-\[1\.5px\]:focus-within {
  border-color: #FF4D6D !important; box-shadow: 0 6px 25px rgba(255, 77, 109, 0.35), 0 0 30px rgba(255, 77, 109, 0.2) !important;
}
#ai-chat-input { color: #5D4037 !important; font-weight: 500 !important; font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif !important; }
#ai-chat-input::placeholder { color: #FFB3C1 !important; opacity: 0.7 !important; }
#ai-chat-input::selection { background: rgba(255, 133, 162, 0.3) !important; color: #5D4037 !important; }
.absolute.bottom-2.right-2 .bg-gray-100 {
  background: linear-gradient(135deg, #FFF0F3 0%, #FFF5F7 100%) !important; color: #5D4037 !important;
  border-radius: 10px !important; font-weight: 600 !important; box-shadow: 0 2px 8px rgba(255, 179, 193, 0.2) !important;
}
#ai-send-button {
  background: linear-gradient(135deg, #FF85A2 0%, #FF4D6D 100%) !important; border-radius: 16px !important;
  box-shadow: 0 4px 15px rgba(255, 133, 162, 0.4) !important; transition: all 0.3s ease !important;
}
#ai-send-button:hover {
  background: linear-gradient(135deg, #FF4D6D 0%, #D93B5C 100%) !important;
  box-shadow: 0 6px 25px rgba(255, 77, 109, 0.5), 0 0 30px rgba(255, 133, 162, 0.4) !important;
  transform: translateY(-3px) scale(1.05) !important;
}
#ai-send-button .icon-icon-send { filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.6)) !important; }
.MuiPaginationItem-root {
  color: #FF85A2 !important; border: 2px solid #FFB3C1 !important; border-radius: 12px !important;
  transition: all 0.3s ease !important; font-weight: 600 !important; font-family: "Noto Serif SC", serif !important;
}
.MuiPaginationItem-root:hover { background: rgba(255, 133, 162, 0.15) !important; border-color: #FF4D6D !important; box-shadow: 0 0 15px rgba(255, 133, 162, 0.4) !important; }
.MuiPaginationItem-root.Mui-selected {
  background: linear-gradient(135deg, #FF85A2 0%, #FF4D6D 100%) !important; color: #FFFFFF !important;
  border-color: #FFD1DC !important; box-shadow: 0 4px 15px rgba(255, 133, 162, 0.4) !important;
}
/* ==================== 隐藏头像 ==================== */
#customized-question-avatar, #customized-answer-avatar { display: none !important; }
/* ==================== 开场白选择框 ==================== */
#customized-opening-statement-selector {
  background: rgba(255, 245, 247, 0.92) !important; border: 2px solid #FFB3C1 !important;
  border-radius: 14px !important; color: #5D4037 !important; font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif !important;
  font-weight: 600 !important; font-size: 0.9rem !important; padding: 8px 14px !important;
  box-shadow: 0 4px 10px rgba(255, 179, 193, 0.25) !important; backdrop-filter: blur(4px) !important; transition: all 0.3s ease !important; cursor: pointer !important;
}
#customized-opening-statement-selector:hover { border-color: #FF4D6D !important; box-shadow: 0 6px 15px rgba(255, 77, 109, 0.3) !important; transform: translateY(-1px) !important; }
#customized-opening-statement-selector:focus { outline: none !important; border-color: #FF4D6D !important; box-shadow: 0 0 0 3px rgba(255, 133, 162, 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-question-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: 1.5px solid #FFB3C1 !important;
  color: #5D4037 !important;
  background: rgba(255, 245, 247, 0.92) !important;
  border-radius: 10px !important;
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif !important;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
  line-height: 1.3 !important;
  box-shadow: 0 2px 6px rgba(255, 179, 193, 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-question-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, #FF85A2 0%, #FF4D6D 100%) !important;
  color: #FFFFFF !important;
  border-color: #FFD1DC !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 10px rgba(255, 133, 162, 0.3) !important;
}
#customized-delete-button:hover { background: linear-gradient(135deg, #FF4D6D, #D93B5C) !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-question-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: #5D4037 !important;
    -webkit-text-fill-color: #5D4037 !important;
  }
  /* 核心：强制显示所有按钮内的文字标签（覆盖 Tailwind 的 .hidden .md:inline 等） */
  #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-answer-content > div.MuiStack-root.css-1ajg1ui > button:nth-child(1) span,
  #customized-question-content > div.MuiStack-root.css-1ajg1ui > button:nth-child(1) 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, #3D2427 0%, #523637 100%) !important; box-shadow: 0 2px 15px rgba(255, 133, 162, 0.15) !important; border-bottom: 2px solid #FF85A2 !important; }
  #ai-model-selector { background: linear-gradient(135deg, rgba(61, 36, 39, 0.95) 0%, rgba(82, 54, 55, 0.95) 100%) !important; border: 2px solid #FF85A2 !important; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important; }
  #ai-model-selector:hover { box-shadow: 0 6px 20px rgba(255, 77, 109, 0.3), 0 0 20px rgba(255, 77, 109, 0.15) !important; border-color: #FF4D6D !important; }
  #ai-model-selector .truncate { color: #FFD1DC !important; }
  #ai-model-selector svg[data-icon="ChevronDown"] { color: #FF85A2 !important; filter: drop-shadow(0 0 4px rgba(255, 133, 162, 0.4)) !important; }
  #header-setting-button { background: linear-gradient(135deg, #FF85A2 0%, #FF4D6D 100%) !important; box-shadow: 0 4px 12px rgba(255, 133, 162, 0.25) !important; }
  #ai-mod-button2 .MuiButton-outlinedPrimary { border-color: #FF85A2 !important; color: #FFB3C1 !important; background: rgba(61, 36, 39, 0.8) !important; }
  #ai-mod-button2 .MuiButton-outlinedPrimary:hover { background: linear-gradient(135deg, #FF85A2 0%, #FF4D6D 100%) !important; color: #FFFFFF !important; border-color: #FFD1DC !important; }
  #ai-mod-button2 svg { filter: drop-shadow(0 0 4px rgba(255, 133, 162, 0.3)) !important; }
  .bg-gradient-to-t { background: linear-gradient(to top, #3D2427 0%, rgba(61, 36, 39, 0) 100%) !important; }
  .bg-white.border-\[1\.5px\] { background: linear-gradient(135deg, #3D2427 0%, #523637 100%) !important; border-color: #FF85A2 !important; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5) !important; }
  .bg-white.border-\[1\.5px\]:focus-within { border-color: #FF4D6D !important; box-shadow: 0 6px 25px rgba(255, 77, 109, 0.25), 0 0 30px rgba(255, 77, 109, 0.15) !important; }
  #ai-chat-input { color: #FFD1DC !important; }
  #ai-chat-input::placeholder { color: #FFB3C1 !important; }
  #ai-chat-input::selection { background: rgba(255, 133, 162, 0.4) !important; color: #FFD1DC !important; }
  .absolute.bottom-2.right-2 .bg-gray-100 { background: linear-gradient(135deg, #523637 0%, #634447 100%) !important; color: #FFD1DC !important; }
  #ai-send-button { background: linear-gradient(135deg, #FF85A2 0%, #FF4D6D 100%) !important; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4) !important; }
  #ai-send-button:hover { background: linear-gradient(135deg, #FF4D6D 0%, #D93B5C 100%) !important; box-shadow: 0 6px 25px rgba(255, 77, 109, 0.4) !important; }
  .MuiPaginationItem-root { color: #FF85A2 !important; border-color: #FF85A2 !important; }
  .MuiPaginationItem-root:hover { background: rgba(255, 133, 162, 0.1) !important; border-color: #FF4D6D !important; }
  .MuiPaginationItem-root.Mui-selected { background: linear-gradient(135deg, #FF85A2 0%, #FF4D6D 100%) !important; color: #FFFFFF !important; border-color: #FFD1DC !important; }
  #customized-opening-statement-selector { background: rgba(61, 36, 39, 0.9) !important; border-color: #FF85A2 !important; color: #FFD1DC !important; box-shadow: 0 4px 10px rgba(0,0,0,0.5) !important; }
  #customized-opening-statement-selector:hover { border-color: #FF4D6D !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-question-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(61, 36, 39, 0.9) !important;
    border-color: #FF85A2 !important;
    color: #FFB3C1 !important;
    box-shadow: 0 2px 6px 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-question-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, #FF85A2 0%, #FF4D6D 100%) !important;
    color: #FFFFFF !important;
    border-color: #FFD1DC !important;
    box-shadow: 0 4px 10px rgba(255, 133, 162, 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-answer-content > div.MuiStack-root.css-1ajg1ui > button:nth-child(1),
    #customized-question-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"]) {
      color: #FFD1DC !important;
      -webkit-text-fill-color: #FFD1DC !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-answer-content > div.MuiStack-root.css-1ajg1ui > button:nth-child(1) span,
    #customized-question-content > div.MuiStack-root.css-1ajg1ui > button:nth-child(1) 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;
    }
  }
}
/* ========== 手机界面隔离 ========== */
.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; }
/* =========================================
   [终极防断层版] 字号精准自适应，解决换行割裂，手机端头像放大
   ========================================= */
/* 1. 名字行基础布局：限制整体空间 */
.classUI-top-dashboard .classUI-system-line.classUI-name-row {
  grid-column: 1 / -1 !important;
  display: flex !important;
  flex-wrap: nowrap !important;
  justify-content: space-between !important;
  align-items: center !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 5px 0 12px 0 !important;
  margin-bottom: 10px !important;
  border-bottom: 2px solid !important;
  border-image: linear-gradient(to right, #A8D5C5, #E6C07B, #A8D5C5) 1 !important;
}

/* 2. 名字文字区域：自适应可用空间 */
.classUI-name-area {
  display: flex !important;
  align-items: center !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

/* 前面的“姓名”标签 */
.classUI-name-area .classUI-label {
  flex-shrink: 0 !important;
  font-size: 0.95em !important;
  white-space: nowrap !important;
}

/* 名字内容：废除导致断层的webkit-box，采用紧凑行高+彻底的断词换行 */
.classUI-name-area .classUI-value {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  font-size: 1.25em !important;   /* 电脑端默认字号 */
  font-weight: 800 !important;
  padding-left: 4px !important;
  
  /* 核心修复：解决长名字换行时，上下字间距过大(撕裂)的问题 */
  line-height: 1.15 !important;
  white-space: normal !important;
  word-break: break-all !important; /* 确保长名字能在任何字断开换行，绝不越界 */
  display: inline-block !important; /* 保持为内联块，使紧凑line-height完美生效 */
}

/* 3. 右侧头像容器：电脑端保持不变 (85px) */
.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;  
  border: 3px solid #E6C07B !important;
  overflow: hidden !important;
  background: #F5EFE6 !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  box-shadow: 0 4px 12px rgba(230, 192, 123, 0.3) !important;
  transition: all 0.3s ease !important;
}

.classUI-avatar-wrapper:hover {
  transform: scale(1.05) rotate(-2deg) !important;
  border-color: #D4A85A !important;
}

/* 4. 头像图片自身强制约束 */
.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: top center !important; 
  display: block !important;
}

/* 5. 适配暗色模式 */
.classUI-avatar-wrapper:is(.dark *) {
  border-color: #D4A85A !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
  background: #4D443A !important;
}
.classUI-avatar-wrapper:hover:is(.dark *) {
  border-color: #E6C07B !important;
}

/* 6. 移动端适配：强制缩小字号，同时进一步放大头像 */
@media (max-width: 768px) {
  .classUI-avatar-wrapper {
    /* 手机端头像大幅放大至 80px (非常接近电脑端尺寸) */
    width: 80px !important;
    height: 80px !important;
    min-width: 80px !important;
    min-height: 80px !important;
    max-width: 80px !important;
    max-height: 80px !important;
    border-width: 2px !important;
    margin-left: 10px !important;
  }
  /* 强制缩小字号，防止名字过长换行 */
  .classUI-name-area .classUI-value {
    font-size: 1.05em !important; 
  }
  .classUI-name-area .classUI-label {
    font-size: 0.85em !important;
  }
}

/* 7. 小屏手机极值适配 */
@media (max-width: 420px) {
  .classUI-avatar-wrapper {
    /* 极小屏头像也强行保持 75px 的大尺寸（原来只有52px） */
    width: 75px !important;
    height: 75px !important;
    min-width: 75px !important;
    min-height: 75px !important;
    max-width: 75px !important;
    max-height: 75px !important;
    margin-left: 8px !important;
  }
  /* 极限缩小字号，把空间全让给名字，绝不溢出 */
  .classUI-name-area .classUI-value {
    font-size: 0.9em !important; 
  }
  .classUI-name-area .classUI-label {
    font-size: 0.8em !important;
  }
}