/* ═══ B平台加载动画适配（自动注入）═══ */
.flex.items-center.justify-center.size-6 { opacity: 1 !important; }
.flex.items-center.justify-center.size-6 > .flex.gap-2 { display: none !important; }
.is-assistant.w-fit { width: 100% !important; }
.is-assistant > .border.border-muted:has(.flex.items-center.justify-center.size-6) {
  width: 100% !important; background: transparent !important;
  border: none !important; padding: 0 !important;
}
.is-assistant .space-y-3:has(.flex.items-center.justify-center.size-6) {
  display: flex; justify-content: center; width: 100%;
}

/* ═══ B平台表格修正（自动注入）═══ */
.rili-markdown-renderer table { display:table!important; table-layout:auto!important; width:100%!important; border-collapse:collapse!important; }
.rili-markdown-renderer table caption { display:table-caption!important; caption-side:top!important; text-align:center!important; padding:8px!important; }
.rili-markdown-renderer thead { display:table-header-group!important; }
.rili-markdown-renderer tbody { display:table-row-group!important; }
.rili-markdown-renderer tr { display:table-row!important; }
.rili-markdown-renderer th, .rili-markdown-renderer td { display:table-cell!important; }

/* ═══ B平台按钮组保护（自动注入 — 防止按钮消失）═══
   原理：B平台消息操作按钮结构为：
   .flex.items-center.gap-1.ml-auto (hover显隐包装)
     └── .bg-muted.rounded.flex.p-0.5 (按钮组容器)
           └── button.rounded-full.size-7 (单个按钮)
   以下规则使用高specificity + !important确保按钮
   不被任何转换后/透传的CSS规则意外隐藏
   ═══════════════════════════════════════════════ */
/* 按钮组容器保护 */
.w-full.h-full.flex.group .bg-muted.rounded.flex.p-0\.5,
.is-user .bg-muted.rounded.flex.p-0\.5,
.is-assistant .bg-muted.rounded.flex.p-0\.5 {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  overflow: visible !important;
  position: relative !important;
  width: auto !important;
  height: auto !important;
  max-height: none !important;
  pointer-events: auto !important;
  clip: auto !important;
  clip-path: none !important;
}
/* 单个按钮保护 */
.w-full.h-full.flex.group .bg-muted.rounded.flex.p-0\.5 > button,
.is-user .bg-muted.rounded.flex.p-0\.5 > button,
.is-assistant .bg-muted.rounded.flex.p-0\.5 > button {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  position: relative !important;
  clip: auto !important;
  clip-path: none !important;
}
/* hover显隐包装层保护 — 仅保留B平台原生的opacity过渡 */
.flex.items-center.gap-1.ml-auto.md\:opacity-0.group-hover\:opacity-100 {
  visibility: visible !important;
  display: flex !important;
  pointer-events: auto !important;
  overflow: visible !important;
}
/* 操作行保护 */
.flex.w-full.items-center.justify-between.gap-2.px-2 {
  display: flex !important;
  visibility: visible !important;
  overflow: visible !important;
}

/* ═══ B平台顶部栏适配说明（自动注入）═══
   A: div.sticky > div.flex.justify-between
      ├── 左侧空区
      ├── #ai-model-selector (居中)
      └── 右侧工具(设置按钮等)
   B: <header.flex.justify-between>
      ├── #nav-left (侧边栏开关)
      ├── #nav-middle (可能为空)
      └── #nav-right (通知/主题/语言)
   B平台模型按钮不在header内，选择器:
   button:has(> .flex-1.truncate.text-left)
   ═══════════════════════════════════════ */
header.flex.justify-between { position: relative; overflow: visible; }

/* =============================================
   赛博朋克霓虹都市 · 状态栏/整页主题
   配色与字体对齐「角色编辑器 [异常连接]」
   全部颜色写死，不依赖 CSS 变量
   ============================================= */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;600&family=JetBrains+Mono:wght@400;700&display=swap');

body {
  background: #0A0A1A;
  color: #E0E0FF;
  font-family: 'Outfit', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* =============================================
   危险区域
   ============================================= */
/* 1. 隐藏装饰条 */
[class*="bg-[#F1CBCB]"], [class*="bg-[#c9e1e9]"] { display: none !important; }

/* 2. 代码块 */
.rili-markdown-renderer pre {
  background: #0A0A1A !important;
  border: 1px solid rgba(160, 32, 240, 0.4) !important;
  border-left: 3px solid #A020F0 !important;
  border-radius: 8px !important;
  padding: 1em 1.2em !important;
  overflow-x: auto !important;
}
.rili-markdown-renderer pre code {
  background: transparent !important;
  color: #D0D0F0 !important;
  font-family: 'JetBrains Mono', monospace !important;
}
.rili-markdown-renderer :not(pre)>code {
  background: rgba(160, 32, 240, 0.15) !important;
  color: #D0B0FF !important;
  padding: 0.15em 0.45em !important;
  border-radius: 4px !important;
  font-family: 'JetBrains Mono', monospace !important;
}

/* 3. details 折叠块 */
.rili-markdown-renderer details {
  background: #18182A !important;
  border: 1px solid rgba(160, 32, 240, 0.3) !important;
  border-radius: 10px !important;
  margin: 8px 0 !important;
  overflow: hidden !important;
}
.rili-markdown-renderer details[open] {
  border-color: #00FFFF !important;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.3) !important;
}
.rili-markdown-renderer details summary {
  background: linear-gradient(90deg, rgba(160, 32, 240, 0.18), #18182A) !important;
  color: #E0E0FF !important;
  padding: 8px 12px 8px 32px !important;
  display: block !important;
  position: relative !important;
  border-bottom: 1px solid rgba(160, 32, 240, 0.25) !important;
  cursor: pointer !important;
  font-weight: 600 !important;
  font-family: 'Outfit', sans-serif !important;
  list-style: none !important;
  user-select: none !important;
}
.rili-markdown-renderer details summary::before {
  content: '▶' !important;
  position: absolute !important;
  left: 12px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  color: #A020F0 !important;
  font-size: 11px !important;
  text-shadow: 0 0 6px #A020F0 !important;
  transition: transform 0.2s ease !important;
}
.rili-markdown-renderer details[open] summary::before {
  transform: translateY(-50%) rotate(90deg) !important;
}
.rili-markdown-renderer details summary::-webkit-details-marker { display: none !important; }

/* 4. 滚动条 */
::-webkit-scrollbar { width: 6px !important; height: 6px !important; }
::-webkit-scrollbar-track { background: #18182A !important; }
::-webkit-scrollbar-thumb { background: #A020F0 !important; border-radius: 10px !important; }
::-webkit-scrollbar-thumb:hover { background: #00FFFF !important; }

/* 5. 选区 & 占位符 */
::placeholder { color: #A0A0B0 !important; opacity: 0.5 !important; }
::selection { background: rgba(160, 32, 240, 0.4) !important; color: #F0E0FF !important; }

/* 6. 页面背景 */
body, html, #root, .app-root, .h-screen {
  background: #0A0A1A !important;
  color: #E0E0FF !important;
}

/* 7. 输入框 */
#ai-chat-input {
  background: #0A0A1A !important;
  color: #E0E0FF !important;
  caret-color: #00FFFF !important;
  border: 1px solid rgba(0, 255, 255, 0.2) !important;
  border-radius: 8px !important;
  font-family: 'JetBrains Mono', monospace !important;
}
textarea.rc-textarea {
  background: #0A0A1A !important;
  color: #E0E0FF !important;
  border: 1px solid rgba(0, 255, 255, 0.2) !important;
  border-radius: 8px !important;
  font-family: 'JetBrains Mono', monospace !important;
}
#ai-chat-input:focus, textarea.rc-textarea:focus {
  border-color: #00FFFF !important;
  box-shadow: 0 0 12px rgba(0, 255, 255, 0.3) !important;
}

/* =============================================
   顶部导航
   ============================================= */
header.flex.justify-between {
  background: #0A0A1A !important;
  border-bottom: 1px solid rgba(160, 32, 240, 0.3) !important;
}
#nav-middle .group.flex.items-center { color: #E0E0FF !important; }
#nav-middle button:has(> .flex-1.truncate.text-left) .flex-1.truncate.text-left { color: #E0E0FF !important; }
#nav-middle .shrink-0.flex.items-center svg { color: #A0A0B0 !important; }
#nav-right button { color: #A0A0B0 !important; }

/* ===== 开场白区域 ===== */
div.flex.items-center.h-9.bg-white.rounded-md.cursor-pointer.group[class*="border-gray"] {
  background: #18182A !important;
  border: 1px solid rgba(160, 32, 240, 0.3) !important;
  color: #E0E0FF !important;
}
div.flex.items-center.h-9.cursor-pointer.group svg[data-icon="SlidersH"] { color: #A0A0B0 !important; }
div.flex.items-center.h-9.cursor-pointer.group svgbutton:has(> .flex-1.truncate.text-left) svg { color: #A0A0B0 !important; }

/* ===== 侧边栏 ===== */
.shadow-lg.border-r.border-gray-200 {
  background: #18182A !important;
  border-right: 1px solid rgba(160, 32, 240, 0.25) !important;
  box-shadow: none !important;
}
.MuiList-root { background: transparent !important; }
.conversation-text { color: #E0E0FF !important; }

/* ===== 功能按钮 ===== */
#ai-mod-button2 { background: transparent !important; }
#ai-mod-button2 button.MuiButton-root {
  background: linear-gradient(135deg, #A020F0 0%, #0891B2 100%) !important;
  color: #FFFFFF !important;
  border: 1px solid rgba(160, 32, 240, 0.6) !important;
  box-shadow: 0 0 15px rgba(160, 32, 240, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  border-radius: 999px !important;
  padding: 7px 18px !important;
  font-weight: 700 !important;
  font-family: 'JetBrains Mono', monospace !important;
  letter-spacing: 1px !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
  transition: all 0.2s ease-in-out !important;
}
#ai-mod-button2 button.MuiButton-root:hover {
  background: linear-gradient(135deg, #8B5CF6 0%, #00FFFF 100%) !important;
  border-color: #00FFFF !important;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.5), 0 0 15px rgba(160, 32, 240, 0.4) !important;
  transform: translateY(-1px) !important;
}
#ai-mod-button2 button.MuiButton-root:active {
  transform: translateY(0) scale(0.97) !important;
}
#ai-mod-button2 button.MuiButton-root svg { color: #FFFFFF !important; }

/* =============================================
   聊天气泡
   ============================================= */
/* 用户气泡 */
.is-user > .border.border-muted,
.is-assistant > .border.border-muted {
  background: rgba(160, 32, 240, 0.18) !important;
  border: 1px solid rgba(160, 32, 240, 0.4) !important;
  color: #E0E0FF !important;
  box-shadow: 0 0 15px rgba(160, 32, 240, 0.4) !important;
  transition: none !important;
}
.is-user > .border.border-muted,
.is-assistant > .border.border-muted:hover { box-shadow: 0 0 15px rgba(160, 32, 240, 0.4) !important; }
/* AI 气泡 */
.is-assistant > .border.border-muted {
  background: #18182A !important;
  border: 1px solid rgba(0, 255, 255, 0.25) !important;
  color: #E0E0FF !important;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.3) !important;
}
.is-assistant > .border.border-muted:hover { box-shadow: 0 0 10px rgba(0, 255, 255, 0.3) !important; }

.rili-markdown-renderer {
  color: #E0E0FF !important;
  line-height: 1.7 !important;
}
.rili-markdown-renderer h1, .rili-markdown-renderer h2, .rili-markdown-renderer h3 {
  color: #00FFFF !important;
  text-shadow: 0 0 8px rgba(0, 255, 255, 0.5) !important;
  font-weight: 600 !important;
  margin-top: 1.2em !important;
  margin-bottom: 0.6em !important;
}
.rili-markdown-renderer ul, .rili-markdown-renderer ol, .rili-markdown-renderer li { color: #E0E0FF !important; }
.rili-markdown-renderer blockquote {
  border-left: 3px solid #A020F0 !important;
  padding-left: 14px !important;
  font-style: italic !important;
  color: #C0C0D8 !important;
  background: rgba(160, 32, 240, 0.08) !important;
  margin: 1em 0 !important;
  border-radius: 0 6px 6px 0 !important;
}
.rili-markdown-renderer table {
  border-collapse: collapse !important;
  width: 100% !important;
  margin: 1em 0 !important;
}
.rili-markdown-renderer th, .rili-markdown-renderer td {
  border: 1px solid rgba(160, 32, 240, 0.3) !important;
  padding: 8px 12px !important;
  color: #E0E0FF !important;
}
.rili-markdown-renderer th {
  background: rgba(160, 32, 240, 0.15) !important;
  font-weight: 600 !important;
}
.rili-markdown-renderer strong {
  color: #00FFFF !important;
  text-shadow: 0 0 6px rgba(0, 255, 255, 0.4) !important;
  font-weight: 700 !important;
}
.rili-markdown-renderer em { color: #C084FC !important; font-style: italic !important; }
.rili-markdown-renderer a {
  color: #00FFFF !important;
  text-decoration: underline !important;
  text-underline-offset: 2px !important;
}

/* ===== 加载动画 ===== */
.flex.items-center.justify-center.size-6 > .flex.gap-2 { display: none !important; }
.flex.items-center.justify-center.size-6 {
  display: inline-block !important;
  width: 20px !important;
  height: 20px !important;
  position: relative !important;
  vertical-align: middle !important;
}
.flex.items-center.justify-center.size-6::before {
  content: '' !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 16px !important;
  height: 16px !important;
  border: 2px solid transparent !important;
  border-top-color: #00FFFF !important;
  border-radius: 50% !important;
  animation: spin 0.8s linear infinite !important;
}
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg) !important; } }
.flex.items-center.justify-center.size-6::after { display: none !important; }
/* ===== 评论区 ===== */
div[class*="w-full"][class*="bg-white"][class*="bottom-0"] {
  background: #0A0A1A !important;
  border-top: 1px solid rgba(160, 32, 240, 0.25) !important;
}
div.text-lg.font-bold {
  color: #00FFFF !important;
  text-shadow: 0 0 8px rgba(0, 255, 255, 0.4) !important;
}
p.MuiTypography-body1.text-grey-600 { color: #A0A0B0 !important; }
span.MuiRating-root { color: #A020F0 !important; }
span.MuiRating-iconEmpty svg { color: #4B5563 !important; }
span.MuiRating-iconFilled svg { color: #A020F0 !important; }
/* [Token消耗hover逻辑转换未启用]
span.text-orange-500 { color: #A020F0 !important; }
*/
div.flex.flex-col.border-gray-200 { border-color: rgba(160, 32, 240, 0.3) !important; }
div.bg-gray-100.text-gray-500 {
  background: rgba(160, 32, 240, 0.12) !important;
  color: #A0A0B0 !important;
}
div.cursor-pointer.group.flex.items-center.justify-center { background: transparent !important; }
div[data-state="closed"] svg[data-icon="Send03"] { color: #A020F0 !important; }
div.style_divider__mW0YX {
  background: rgba(160, 32, 240, 0.25) !important;
  height: 1px !important;
  border: none !important;
  margin: 16px 0 !important;
}
.flex.w-full.items-center.justify-between.gap-2.px-2.css-1dmzxoz { background: transparent !important; }
button.MuiButton-containedPrimary {
  background: #A020F0 !important;
  color: #FFFFFF !important;
  box-shadow: 0 0 15px rgba(160, 32, 240, 0.4) !important;
  border-radius: 6px !important;
}
button.MuiButton-containedPrimary:hover {
  background: #8B5CF6 !important;
  box-shadow: 0 0 20px rgba(160, 32, 240, 0.6) !important;
}
button.MuiButton-outlinedPrimary {
  border: 1px solid #A020F0 !important;
  color: #C084FC !important;
  background: transparent !important;
  border-radius: 6px !important;
}
button.MuiButton-outlinedPrimary:hover {
  background: rgba(160, 32, 240, 0.12) !important;
  box-shadow: 0 0 15px rgba(160, 32, 240, 0.4) !important;
}
div.p-3.overflow-y-auto { background: #18182A !important; }
div.group.ml-0 { background: transparent !important; }
div.group img.rounded-full { border: 1px solid #00FFFF !important; }
div.text-sm.text-grey-600 span.font-bold { color: #E0E0FF !important; }
span.text-[10px] { color: #A0A0B0 !important; }
div.break-all { color: #E0E0FF !important; }
div.text-xs.text-grey-600 { color: #A0A0B0 !important; }
button.text-gray-400 { color: #A0A0B0 !important; }
button.text-gray-400 svg { color: #A0A0B0 !important; }
span.cursor-pointer { color: #00FFFF !important; }
div.ml-8.border-l { border-left: 1px solid rgba(160, 32, 240, 0.3) !important; }

/* ===== 分页 ===== */
.MuiPaginationItem-root {
  color: #A0A0B0 !important;
  background: transparent !important;
  border-radius: 6px !important;
}
.MuiPaginationItem-root.Mui-selected {
  background: #A020F0 !important;
  color: #FFFFFF !important;
  box-shadow: 0 0 15px rgba(160, 32, 240, 0.4) !important;
}
.MuiPaginationItem-root.Mui-disabled { color: #4B5563 !important; }
.MuiPaginationItem-icon { color: #A0A0B0 !important; }
.flex.w-full.items-center.justify-between.gap-2.px-2.css-1uwir8f { background: transparent !important; }
.MuiInputBase-input {
  background: #0A0A1A !important;
  color: #E0E0FF !important;
  border: 1px solid rgba(0, 255, 255, 0.2) !important;
  border-radius: 6px !important;
  font-family: 'JetBrains Mono', monospace !important;
}

/* ===== MUI 全局 ===== */
.MuiButton-root, .MuiButton-contained, .MuiButton-outlined { transition: all 0.15s ease-in-out !important; }
.MuiButton-contained {
  background: #A020F0 !important;
  color: #FFFFFF !important;
  box-shadow: 0 0 15px rgba(160, 32, 240, 0.4) !important;
  border-radius: 6px !important;
}
.MuiButton-outlined {
  border: 1px solid #A020F0 !important;
  color: #C084FC !important;
  background: transparent !important;
  border-radius: 6px !important;
}
.MuiIconButton-root { color: #A0A0B0 !important; }
.MuiDialog-paper, .MuiDrawer-paper, .MuiBackdrop-root {
  background: #18182A !important;
  color: #E0E0FF !important;
}
.MuiDivider-root { background: rgba(160, 32, 240, 0.3) !important; }
.MuiTypography-root { color: #E0E0FF !important; }
.MuiRating-icon { color: #A020F0 !important; }
.MuiOutlinedInput-root {
  background: #0A0A1A !important;
  color: #E0E0FF !important;
  border-radius: 8px !important;
}
.MuiOutlinedInput-notchedOutline {
  border-color: rgba(0, 255, 255, 0.2) !important;
  transition: border-color 0.2s ease-in-out !important;
}
.MuiOutlinedInput-root:hover .MuiOutlinedInput-notchedOutline { border-color: rgba(0, 255, 255, 0.4) !important; }
.MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline {
  border-color: #00FFFF !important;
  box-shadow: 0 0 12px rgba(0, 255, 255, 0.3) !important;
}
/* .MuiTouchRipple-root  [removed: MUI ripple] */{ background-color: rgba(255, 255, 255, 0.2) !important; }
.flex.items-center.gap-2.text-xs.font-mono.text-muted-foreground { color: #A0A0B0 !important; }
.bg-muted.rounded.flex.p-0\.5 > button.rounded-full.size-7{
  color: #00FFFF !important;
}
/* [Token消耗hover逻辑转换未启用]
.text-orange-500 { color: #A020F0 !important; }
*/

/* =============================================
   状态栏 · 基础面板
   ============================================= */
.ui-panel {
  background: #18182A;
  border: 1px solid rgba(160, 32, 240, 0.3);
  border-radius: 12px;
  margin-bottom: 10px;
  box-shadow: 0 0 15px rgba(160, 32, 240, 0.4);
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.ui-panel:hover {
  border-color: rgba(160, 32, 240, 0.5);
  box-shadow: 0 0 25px rgba(160, 32, 240, 0.5);
}
/* 标题栏 */
.ui-panel > summary {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  color: #E0E0FF;
  background: linear-gradient(90deg, rgba(160, 32, 240, 0.18) 0%, #18182A 100%);
  cursor: pointer;
  list-style: none;
  border-bottom: 1px solid transparent;
  user-select: none;
}
.ui-panel > summary::-webkit-details-marker { display: none; }
.ui-panel > summary::before {
  content: "";
  width: 4px;
  height: 14px;
  border-radius: 2px;
  background: linear-gradient(180deg, #00FFFF, #A020F0);
  box-shadow: 0 0 6px #A020F0;
  margin-right: 9px;
  flex: none;
}
.ui-panel[open] > summary { border-bottom: 1px solid rgba(160, 32, 240, 0.3); }
/* 内容区 */
.panel-content {
  padding: 12px 16px;
  font-size: 0.95em;
  color: #E0E0FF;
  line-height: 1.7;
}
.panel-content p { margin: 6px 0; }
.panel-content b { color: #00FFFF; }
/* 子面板（NPC） */
.sub-panel {
  background: #10101F;
  border: 1px solid rgba(160, 32, 240, 0.25);
  border-left: 3px solid #A020F0;
  border-radius: 8px;
  margin-top: 8px;
}
.sub-panel > summary {
  padding: 8px 12px;
  color: #C084FC;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  list-style: none;
  text-shadow: 0 0 6px rgba(160, 32, 240, 0.5);
}
.sub-panel > summary::-webkit-details-marker { display: none; }

/* =============================================
   手机屏幕（真机样式 · 霓虹）
   ============================================= */
.phone-frame {
  position: relative;
  background: linear-gradient(160deg, #1C1C32 0%, #0A0A1A 100%);
  border: 1px solid rgba(160, 32, 240, 0.5);
  border-radius: 30px;
  padding: 13px;
  box-shadow:
    0 0 25px rgba(160, 32, 240, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 2px rgba(0, 0, 0, 0.5);
}
.phone-screen {
  position: relative;
  background: radial-gradient(120% 60% at 50% 0%, #14142A 0%, #0A0A1A 100%);
  border: 1px solid rgba(0, 255, 255, 0.3);
  border-radius: 22px;
  padding: 34px 12px 12px;
  overflow: hidden;
  box-shadow: inset 0 0 20px rgba(0, 255, 255, 0.05);
}
/* 状态栏 */
.phone-statusbar {
  position: absolute;
  top: 12px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 18px;
  font-size: 0.72em;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: #E0E0FF;
  letter-spacing: 0.5px;
  z-index: 3;
}
.ps-icons {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #00FFFF;
  text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}
.ps-icons .sig {
  display: inline-block;
  width: 17px;
  height: 11px;
  background:
    linear-gradient(180deg, currentColor 100%, transparent 0) 0 8px / 3px 3px no-repeat,
    linear-gradient(180deg, currentColor 100%, transparent 0) 4px 5px / 3px 6px no-repeat,
    linear-gradient(180deg, currentColor 100%, transparent 0) 8px 2px / 3px 9px no-repeat,
    linear-gradient(180deg, currentColor 100%, transparent 0) 12px 0 / 3px 11px no-repeat;
}
.ps-icons .wifi {
  position: relative;
  display: inline-block;
  width: 11px;
  height: 11px;
  border: 1.6px solid currentColor;
  border-left-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
  transform: rotate(-45deg);
}
.ps-icons .wifi::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.ps-icons .batt {
  position: relative;
  display: inline-block;
  width: 21px;
  height: 10px;
  border: 1.4px solid currentColor;
  border-radius: 3px;
}
.ps-icons .batt::before {
  content: "";
  position: absolute;
  left: 1.5px;
  top: 1.5px;
  bottom: 1.5px;
  width: 60%;
  background: currentColor;
  border-radius: 1px;
}
.ps-icons .batt::after {
  content: "";
  position: absolute;
  right: -3px;
  top: 2px;
  width: 2px;
  height: 4px;
  background: currentColor;
  border-radius: 1px;
}
/* 灵动岛 */
.phone-notch {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 92px;
  height: 22px;
  background: linear-gradient(180deg, #000010, #000);
  border-radius: 12px;
  box-shadow: inset 0 1px 2px rgba(0, 255, 255, 0.1), 0 0 8px rgba(160, 32, 240, 0.4);
  z-index: 2;
}
.phone-notch::before {
  content: "";
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: radial-gradient(circle at 35% 35%, #9fd8ff, #2a5aa8 70%);
  border-radius: 50%;
}
/* 屏幕内容 */
.phone-content {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.app-group {
  background: #14142A;
  border: 1px solid rgba(160, 32, 240, 0.25);
  border-radius: 12px;
  padding: 8px 12px;
}
.app-group:hover {
  border-color: #00FFFF;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.15);
}
.app-group:last-child { margin-bottom: 0; }
.app-group b { color: #00FFFF; }
/* Home 指示条 */
.phone-home {
  width: 110px;
  height: 5px;
  background: rgba(224, 224, 255, 0.5);
  border-radius: 3px;
  margin: 10px auto 2px;
}

/* ===== 分割线 ===== */
.ui-divider {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(160, 32, 240, 0.4), transparent);
  margin: 12px 0;
}

/* ===== 后宫/关系网 数值胶囊 ===== */
.wife-stress {
  display: inline-block;
  background: rgba(255, 68, 68, 0.12);
  border: 1px solid rgba(255, 68, 68, 0.4);
  color: #FF6B6B;
  border-radius: 999px;
  padding: 1px 10px;
  font-size: 0.88em;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  margin-right: 6px;
  text-shadow: 0 0 5px rgba(255, 68, 68, 0.4);
}
.wife-bond {
  display: inline-block;
  background: rgba(0, 255, 255, 0.1);
  border: 1px solid rgba(0, 255, 255, 0.35);
  color: #00FFFF;
  border-radius: 999px;
  padding: 1px 10px;
  font-size: 0.88em;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  text-shadow: 0 0 5px rgba(0, 255, 255, 0.4);
}

/* ===== 行动推荐 ===== */
.action-list p {
  background: #14142A;
  border: 1px solid rgba(160, 32, 240, 0.25);
  padding: 8px 12px;
  border-radius: 8px;
  margin: 5px 0;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.action-list p:hover {
  background: rgba(160, 32, 240, 0.12);
  border-color: #00FFFF;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.15);
}

/* =============================================
   场景面板（新格式 · 霓虹）
   ============================================= */
.scene {
  background: #18182A;
  border: 1px solid rgba(160, 32, 240, 0.3);
  border-radius: 12px;
  margin-bottom: 10px;
  box-shadow: 0 0 15px rgba(160, 32, 240, 0.4);
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.scene:hover {
  border-color: rgba(0, 255, 255, 0.4);
  box-shadow: 0 0 25px rgba(160, 32, 240, 0.5);
}
.scene > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  color: #E0E0FF;
  background: linear-gradient(90deg, rgba(160, 32, 240, 0.18) 0%, #18182A 100%);
  border-bottom: 1px solid transparent;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.scene > summary::-webkit-details-marker { display: none; }
.scene[open] > summary { border-bottom: 1px solid rgba(160, 32, 240, 0.3); }

.day-marker {
  margin-left: auto;
  font-size: 0.8em;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 1px;
  color: #0A0A1A;
  background: linear-gradient(135deg, #00FFFF 0%, #A020F0 100%);
  padding: 4px 14px;
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(160, 32, 240, 0.5);
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.3);
}

.scene .content {
  padding: 14px 16px;
  font-size: 0.95em;
  color: #E0E0FF;
  line-height: 1.7;
}
.scene .content p { margin: 8px 0; }
.scene strong { color: #E0E0FF; }

.scene-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 7px 16px;
  background: #10101F;
  border: 1px solid rgba(160, 32, 240, 0.25);
  border-radius: 10px;
  padding: 11px 14px;
  margin-bottom: 10px;
}
.scene-grid .k {
  color: #00FFFF;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85em;
  white-space: nowrap;
  text-shadow: 0 0 5px rgba(0, 255, 255, 0.4);
}
.scene-grid .v { color: #E0E0FF; }

.scene-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}
.scene-tags .go {
  background: rgba(160, 32, 240, 0.15);
  border: 1px solid rgba(160, 32, 240, 0.4);
  color: #C084FC;
  border-radius: 999px;
  padding: 1px 10px;
  font-size: 0.9em;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  text-shadow: 0 0 4px rgba(160, 32, 240, 0.4);
}
.scene-tags .go:hover {
  border-color: #00FFFF;
  color: #00FFFF;
}

.scene-now {
  background: rgba(160, 32, 240, 0.08);
  border-left: 3px solid #A020F0;
  border-radius: 6px;
  padding: 6px 10px;
}
.scene-npc {
  color: #00FFFF;
  font-weight: 600;
}

/* =============================================
   响应式 / 降速兜底
   ============================================= */
@media (max-width: 480px) {
  /* 移动端适配默认已包含在通用规则中 */
}
@media (prefers-reduced-motion: reduce) {
  .flex.items-center.justify-center.size-6::before { animation-duration: 2s !important; }
}
/* 用户的对话颜色：清爽的蓝色，带点加粗显得有底气 */
u-say {
    color: #4A90E2;
    font-weight: bold;
}

/* 老婆的对话颜色：温柔的粉色，甜度拉满 */
w-say {
    color: #FF69B4;
    font-weight: bold;
}