/* =========================================
   1. 核心气泡容器样式 (偶像荣耀·七彩霓虹风格 - 兼容性优化版)
   ========================================= */
:root {
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Source Han Serif CN", "Songti SC", "SimSun", "STSong", "KaiTi", serif;
  --font-kaiti: "LXGW WenKai", "KaiTi", "STKaiti", "HKaiT", "Fangkaiti", serif;
}
div.group.relative,
.momo-talk-wrapper,
.classUI-panel,
.classUI-details-panel,
.styled-prose-container {
  box-sizing: border-box;
}
div.group.relative *,
.momo-talk-wrapper *,
.classUI-panel *,
.classUI-details-panel * {
  box-sizing: border-box;
}
div.group.relative > div.relative.inline-block.bg-gray-100\/90 p[data-character="天照院夜夜"] {
  position: relative;
  display: inline-block;
  padding-right: 14px;
  font-family: var(--font-kaiti);
  z-index: 2;
}
div.group.relative > div.relative.inline-block.bg-gray-100\/90 p[data-character="天照院夜夜"]::after {
  content: "✦";
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-55%);
  font-size: 0.9em;
  opacity: 0.9;
  color: #FF69B4;
  animation: heartbeat 1.5s infinite ease-in-out;
  z-index: 1;
}
@keyframes heartbeat {
  0% { transform: translateY(-55%) scale(1) rotate(0deg); opacity: 0.7; }
  50% { transform: translateY(-55%) scale(1.2) rotate(15deg); opacity: 1; text-shadow: 0 0 8px rgba(255, 105, 180, 0.6); }
  100% { transform: translateY(-55%) scale(1) rotate(0deg); opacity: 0.7; }
}
div.group.relative > div.relative.inline-block.bg-gray-100\/90 {
  display: block !important;
  background: linear-gradient(135deg, #FFFCF0 0%, #FFF8E1 100%);
  border: 2px solid transparent;
  background-clip: padding-box, border-box;
  background-origin: padding-box, border-box;
  background-image: linear-gradient(135deg, #FFFCF0 0%, #FFF8E1 100%), 
                    linear-gradient(45deg, #FF9A9E, #FECFEF, #A1C4FD, #C2E9FB, #FBC2EB);
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.15), 0 0 20px rgba(255, 192, 203, 0.1);
  padding: 16px 20px;
  max-width: 38em;
  width: 100%;
  margin: 10px auto;
  font-family: var(--font-serif);
  color: #4A4A4A !important;
  font-size: 1rem;
  line-height: 1.8;
  position: relative;
  -webkit-font-smoothing: antialiased;
  isolation: isolate;
  z-index: 1;
}
div.group.relative > div.relative.inline-block.bg-gray-100\/90::before {
  content: "";
  position: absolute;
  top: 4px; left: 4px; right: 4px; bottom: 4px;
  border: 1px solid rgba(255, 215, 0, 0.3);
  pointer-events: none;
  border-radius: 4px;
  z-index: -1;
}
/* =========================================
   2. ClassUI 面板通用样式 (现代舞台/专辑风格)
   ========================================= */
.classUI-details-panel {
  margin-bottom: 15px;
  border: 1px solid #FFE082;
  border-radius: 8px;
  overflow: hidden;
  background-color: #FFFEFA;
  position: relative;
}
.classUI-panel {
  margin-bottom: 15px;
  border: 1px solid #FFE082;
  border-radius: 8px;
  overflow: hidden;
  background-color: #FFFEFA;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  position: relative;
}
.styled-prose-container {
  background: transparent;
  --classUI-panel-bg: #FFFEFA;
  --classUI-panel-border: #FFE082;
  --classUI-header-bg: #FFF8E1;
  --classUI-text-secondary: #78909C;
  --classUI-accent: #EC407A;
  --classUI-code-bg: #FFF3E0;
  --classUI-code-text: #E65100;
  --classUI-summary-hover-bg: #FFF0F5;
  --novel-text-underline: rgba(236, 64, 122, 0.15);
  --novel-text-color: #37474F;
  padding: 0;
  box-shadow: none;
  width: 100%;
}
.styled-prose-container > p:not([class]),
.styled-prose-container > div > p:not([class]),
.story-content p {
  text-indent: 2em;
  margin-bottom: 0.8em;
  font-family: var(--font-serif);
}
@media (max-width: 768px) {
  .classUI-panel,
  .classUI-details-panel {
    margin: 0.5em 0;
    border-radius: 6px;
  }
  div.group.relative > div.relative.inline-block.bg-gray-100\/90 {
    border-radius: 8px;
    width: 100%;
    max-width: 100%;
    padding: 10px 10px;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-left: 0;
    margin-right: 0;
  }
  .styled-prose-container > p:not([class]),
  .styled-prose-container > div > p:not([class]),
  .story-content p {
    text-indent: 1.8em;
    margin-bottom: 0.6em;
  }
}
.classUI-panel,
.classUI-details-panel {
  margin: 0.8em 0;
  overflow: hidden;
  max-width: 100%;
}
.classUI-panel-header,
.classUI-summary-header {
  background-color: var(--classUI-header-bg);
  padding: 0.7em 1.2em;
  font-weight: 600;
  cursor: default;
  color: #37474F;
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
  font-family: var(--font-serif);
}
.classUI-summary-header {
  cursor: pointer;
  background: linear-gradient(to right, #F48FB1, #FFCC80);
  color: #FFFFFF;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
  padding: 10px 18px;
  font-weight: 600;
  border-radius: 6px 6px 0 0;
  transition: all 0.3s ease;
}
.classUI-summary-header:hover,
.classUI-summary-header:focus {
  background: linear-gradient(to right, #F06292, #FFB74D);
}
.classUI-details-panel[open] > .classUI-summary-header {
  border-bottom-color: var(--classUI-panel-border);
}
.classUI-panel-content {
  padding: 1.2em;
  font-family: var(--font-serif);
  color: #37474F;
}
.classUI-master-system {
  font-family: var(--font-serif);
}
.classUI-master-system .classUI-system-line {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 0.6em;
  align-items: baseline;
  line-height: 1.7;
}
.classUI-master-system .classUI-system-line:last-child {
  margin-bottom: 0;
}
.classUI-master-system .classUI-label {
  color: var(--classUI-text-secondary);
  flex-shrink: 0;
  margin-right: 0.4em;
  font-weight: 600;
  font-family: var(--font-serif);
}
.classUI-master-system .classUI-value {
  word-break: break-word;
  flex-grow: 1;
  min-width: 60%;
  color: #37474F;
}
.classUI-master-system .classUI-indent-1 {
  padding-left: 1.8em;
  position: relative;
}
.classUI-master-system .classUI-indent-1::before {
  content: "♪";
  position: absolute;
  left: 1em;
  font-size: 0.8em;
  color: var(--classUI-accent);
}
.classUI-master-system .classUI-indent-2 {
  padding-left: 3.2em;
  position: relative;
}
.classUI-master-system .classUI-indent-2::before {
  content: "♫";
  position: absolute;
  left: 2.4em;
  font-size: 0.8em;
  color: var(--classUI-accent);
}
.classUI-master-system .classUI-task-active,
.classUI-master-system .classUI-task-completed,
.classUI-master-system .classUI-task-failed {
  font-size: 0.85em;
  padding: 0.1em 0.5em;
  border-radius: 12px;
  margin-left: 0.5em;
  font-weight: bold;
  border-style: solid;
  border-width: 1px;
  font-family: var(--font-kaiti);
}
.classUI-master-system .classUI-task-active {
  background-color: #E3F2FD;
  color: #1565C0;
  border-color: #90CAF9;
}
.classUI-master-system .classUI-task-completed {
  background-color: #E8F5E9;
  color: #2E7D32;
  border-color: #A5D6A7;
}
.classUI-master-system .classUI-task-failed {
  background-color: #FFEBEE;
  color: #C62828;
  border-color: #EF9A9A;
}
.classUI-status-grid {
  font-family: var(--font-serif);
  display: flex;
  flex-direction: column;
  gap: 1em;
}
.classUI-status-grid .classUI-status-item {
  display: flex;
  flex-wrap: nowrap;
  margin-bottom: 0.8em;
  align-items: flex-start;
  line-height: 1.7;
}
.classUI-status-grid .classUI-status-item:last-child {
  margin-bottom: 0;
}
.classUI-status-grid .classUI-label {
  font-weight: 600;
  color: var(--classUI-text-secondary);
  flex-shrink: 0;
  width: 6.5em;
}
.classUI-status-grid .classUI-value {
  word-break: break-word;
  flex-grow: 1;
  padding-left: 0.5em;
  border-left: 2px solid var(--classUI-accent);
  color: #37474F;
}
.classUI-memory-section {
  display: flex;
  flex-direction: column;
  width: 100%;
}
.classUI-memory-header {
  font-weight: 700;
  color: var(--classUI-accent);
  padding-bottom: 0.4em;
  border-bottom: 1px dashed var(--classUI-panel-border);
  margin-bottom: 0.6em;
  font-size: 0.95em;
  letter-spacing: 0.5px;
}
.classUI-memory-content {
  line-height: 1.8;
  white-space: pre-wrap;
  word-wrap: break-word;
  padding-left: 0.5em;
  font-family: var(--font-serif);
  color: #37474F;
}
.classUI-compass-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 8px;
}
.classUI-compass-option {
  position: relative;
  padding: 12px 14px;
  border: 1px solid #E0E0E0;
  color: #37474F;
  border-radius: 8px;
  background: linear-gradient(145deg, #ffffff, #f0f0f0);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  user-select: text;
  font-weight: 600;
  font-family: var(--font-serif);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.classUI-compass-option:hover,
.classUI-compass-option:focus-visible {
  background: linear-gradient(145deg, #FFF0F5, #FFE4E1);
  border-color: var(--classUI-accent);
  outline: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(236, 64, 122, 0.2);
}
.classUI-option-label {
  color: var(--classUI-accent);
  font-weight: 800;
  display: block;
  text-shadow: 0 0 1px rgba(255, 255, 255, 0.5);
  font-family: var(--font-kaiti);
}
.classUI-hint-content {
  font-size: 0.95em;
  opacity: 1;
  color: #37474F;
  line-height: 1.6;
  font-weight: 500;
  font-family: var(--font-serif);
}
.classUI-compass-disabled {
  color: var(--classUI-text-secondary);
  text-align: center;
  padding: 1em 0;
  font-style: italic;
  user-select: text;
}
@media (min-width: 768px) {
  .classUI-compass-options {
    flex-direction: column;
  }
  .classUI-compass-option {
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
    padding: 14px 18px;
  }
  .classUI-option-label {
    width: 6em;
    flex-shrink: 0;
    margin-right: 15px;
    border-right: 2px solid rgba(0,0,0,0.1);
    padding-right: 12px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: auto;
    min-height: 1.5em;
  }
  .classUI-hint-content {
    flex-grow: 1;
    display: block;
    padding-top: 0;
  }
}
/* =========================================
   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: none;
}
.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); }
}
/* =========================================
   4. 角色信息面板 - 气泡进度条样式
   ========================================= */
.classUI-bubble-bar {
  position: relative;
  width: 100%;
  min-height: 24px;
  height: auto;
  background-color: #F8F9FA;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
  margin-top: 4px;
  display: flex;
  align-items: center;
  border: 1px solid #E0E0E0;
}
.classUI-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  height: 100%;
  border-radius: 12px;
  transition: width 0.5s ease;
  z-index: 1;
}
.classUI-bar-text {
  position: relative;
  width: 100%;
  padding: 3px 10px;
  font-size: 0.85em;
  line-height: 1.4;
  color: #333333;
  font-weight: bold;
  z-index: 2;
  white-space: normal;
  word-break: break-word;
  text-align: left;
  font-family: var(--font-serif);
  text-shadow: 0 0 2px rgba(255,255,255,0.8);
}
.classUI-bar-fill.pink {
  background: linear-gradient(90deg, #FF9A9E, #FBC2EB);
}
.classUI-bar-fill.dark {
  background: linear-gradient(90deg, #A18CD1, #FBC2EB);
}
.classUI-bar-fill.blue {
  background: linear-gradient(90deg, #84FAB0, #8FD3F4);
}
.classUI-bar-fill.purple {
  background: linear-gradient(90deg, #D58BDD, #9D50BB);
}
.classUI-bar-fill.green {
  background: linear-gradient(90deg, #A8E063, #56AB2F);
}
/* =========================================
   5. [修改版] 顶部角色面板 (Dashboard - 偶像档案卡风格)
   ========================================= */
.classUI-top-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
  padding: 5px;
}
.classUI-top-dashboard .classUI-system-line {
  margin-bottom: 0 !important;
  box-sizing: border-box;
}
.classUI-top-dashboard .classUI-system-line:nth-child(1) {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  background: transparent;
  border: none;
  border-bottom: 2px solid;
  border-image: linear-gradient(to right, #FF9A9E, #FECFEF, #E0C3FC) 1;
  box-shadow: none;
  padding-bottom: 8px;
  margin-bottom: 5px;
  font-size: 1.6em;
  font-weight: 800;
  color: #EC407A;
  font-family: var(--font-serif);
  text-shadow: 2px 2px 0px rgba(236, 64, 122, 0.1);
}
.classUI-top-dashboard .classUI-system-line:nth-child(1) .classUI-label {
  font-size: 0.8em;
  margin-right: 8px;
  opacity: 0.6;
}
.classUI-top-dashboard .classUI-system-line:not(:nth-child(1)) {
  background-color: #FFFFFF;
  border: 1px solid #E0E0E0;
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
  min-width: 0;
  position: relative;
  overflow: hidden;
}
.classUI-top-dashboard .classUI-system-line:not(:nth-child(1))::after {
  content: "";
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(120deg, rgba(255,255,255,0) 30%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0) 70%);
  transform: translateX(-100%);
  transition: transform 0.6s;
}
.classUI-top-dashboard .classUI-system-line:not(:nth-child(1)):hover::after {
  transform: translateX(100%);
}
.classUI-top-dashboard .classUI-system-line:not(:nth-child(1)):hover {
  transform: translateY(-2px);
  border-color: #FF80AB;
  box-shadow: 0 6px 12px rgba(255, 128, 171, 0.2);
}
.classUI-top-dashboard .classUI-system-line:not(:nth-child(1)) .classUI-label {
  margin-right: 8px;
  font-size: 1.1em;
  flex-shrink: 0;
  color: #90A4AE;
}
.classUI-top-dashboard .classUI-system-line:not(:nth-child(1)) .classUI-value {
  font-weight: 600;
  color: #455A64;
  font-family: var(--font-serif);
  white-space: normal;          /* ← 允许正常换行 */
  word-wrap: break-word;        /* ← 长单词/长数字可断行 */
  overflow-wrap: break-word;   /* ← 同上，双保险 */
}
/* =========================================
   新增：开发度标签美化 (Rank徽章/SSR风格)
   ========================================= */
.classUI-dev-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #FF5252 0%, #D50000 100%);
  color: #FFFFFF !important;
  font-family: var(--font-serif);
  font-size: 0.85rem;
  font-weight: bold;
  padding: 2px 10px;
  border-radius: 4px;
  margin-left: 8px;
  line-height: 1.4;
  vertical-align: middle;
  box-shadow: 0 2px 6px rgba(213, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.4);
  cursor: help;
  transition: all 0.2s ease;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
}
.classUI-dev-tag::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(to bottom right, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 50%, rgba(255,255,255,0) 100%);
  transform: rotate(30deg);
  pointer-events: none;
}
.classUI-dev-tag:hover {
  transform: scale(1.1) rotate(-2deg);
  box-shadow: 0 4px 10px rgba(255, 82, 82, 0.6);
  z-index: 10;
}
/* =========================================
   夜间模式：仅 MomoTalk 组件适配 (完全参照粉色恋曲)
   ========================================= */
@media (prefers-color-scheme: dark) {
  .momo-talk-wrapper {
    background-color: #1B1B1B !important;
    box-shadow: none;
    border: 1px solid #333 !important;
  }
  .momo-header {
    background-color: #202020 !important;
    border-bottom-color: #333 !important;
  }
  .momo-body {
    background-color: #1B1B1B !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-name {
    color: #BBBBBB !important;
    text-shadow: none;
  }
}
/* ========== 人际关系网络面板样式 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; }
/* =========================================
   [终极防断层版] 字号精准自适应，解决换行割裂，手机端头像放大
   ========================================= */
/* 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;
  }
}