/* ═══════════════════════════════════════════════
   星蓝清透主题 · Rili适配
   聊天框 + 界面 + 内容UI完整版
   ═══════════════════════════════════════════════ */

/* ═══ 动画═══ */
@keyframes breathe {
  0%, 100% { box-shadow: 0 0 4px rgba(147,197,253,0.2); border-color: rgba(147,197,253,0.35); }
  50% { box-shadow: 0 0 14px rgba(96,165,250,0.35), 0 0 4px rgba(147,197,253,0.2); border-color: rgba(96,165,250,0.55); }
}
@keyframes sweep {
  0% { left: -100%; }
  45% { left: 100%; }
  100% { left: 100%; }
}
@keyframes mp-shimmer {
  0% { background-position: -150px 0; }
  100% { background-position: 150px 0; }
}
@keyframes weather-spin {
  0% { transform: translateY(-50%) rotate(0deg); }
  100% { transform: translateY(-50%) rotate(360deg); }
}
@keyframes weather-pulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}
@keyframes tip-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes s-glow {
  0%, 100% { text-shadow: 0 0 4px rgba(220,38,38,0.3); }
  50% { text-shadow: 0 0 12px rgba(220,38,38,0.6), 0 0 4px rgba(220,38,38,0.3); }
}
@keyframes content-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes msg-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════
   第一部分：界面 & 聊天框
   ═══════════════════════════════════════ */

/* ── 全局背景 ── */
body,
html {
  background: #dbeafe !important;
}

/* ── 聊天滚动区域背景 ── */
main,
[class*="overflow-y-auto"] {
  background:
    radial-gradient(ellipse 600px 400px at 20% 30%, rgba(147,197,253,0.2) 0%, transparent 70%),
    radial-gradient(ellipse 500px 350px at 80% 70%, rgba(191,219,254,0.25) 0%, transparent 70%),
    linear-gradient(170deg, #dbeafe 0%, #e8f1ff 40%, #f0f6ff 60%, #dbeafe 100%) !important;
}

/* ── 消息容器通用 ── */
.w-full.h-full.flex.group.scroll-mt-\[96px\] {
  background: transparent !important;
  border: none !important;
  animation: msg-in 0.3s ease-out;position: relative;
  z-index: 1;
}

/* ── AI消息气泡 ── */
.is-assistant > .border.border-muted {
  background: linear-gradient(135deg, #f0f6ff, #f5f9ff) !important;
  border: 1px solid rgba(147,197,253,0.4) !important;
  border-radius: 4px 16px 16px 16px !important;
  padding: 14px 16px !important;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 8px rgba(96,165,250,0.1);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.is-assistant > .border.border-muted::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #93c5fd, #bfdbfe, transparent);
  border-radius: 2px;
}

/* AI消息文本 */
.is-assistant .rili-markdown-renderer {
  color: #1a2a3a !important;
  font-size: 0.94em;
  line-height: 2.05;
}

/* ── 用户消息气泡 ── */
.is-user > .border.border-muted {
  background: linear-gradient(135deg, #bfdbfe, #dbeafe) !important;
  border: 1px solid rgba(147,197,253,0.5) !important;
  border-radius: 16px 4px 16px 16px !important;
  padding: 12px 16px !important;
  position: relative;
  box-shadow: 0 1px 6px rgba(96,165,250,0.12);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.is-user > .border.border-muted::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #93c5fd, transparent);
  border-radius: 2px;
}

/* 用户消息文本 */
.is-user .rili-markdown-renderer {
  color: #1e3a5f !important;
  font-size: 0.92em;
  line-height: 1.8;
  font-weight: 500;
}

/* ── 操作按钮栏 ── */
.group.scroll-mt-\[96px\] .bg-muted.rounded.flex.p-0\.5 {
  background: linear-gradient(135deg, #e8f1ff, #f0f6ff) !important;
  border: 1px solid rgba(147,197,253,0.3) !important;
  border-radius: 12px !important;
}

.group.scroll-mt-\[96px\] .bg-muted.rounded.flex.p-0\.5 button {
  background: transparent !important;
  border: none !important;
  border-radius: 10px !important;
  color: #3b82f6 !important;
  transition: background 0.2s ease;
}

.group.scroll-mt-\[96px\] .bg-muted.rounded.flex.p-0\.5 button:hover {
  background: rgba(96,165,250,0.15) !important;
}

.group.scroll-mt-\[96px\] .bg-muted.rounded.flex.p-0\.5 button svg {
  stroke: #3b82f6 !important;
}

/* ── 输入区域 ── */
textarea,
form textarea {
  background: linear-gradient(135deg, #f0f6ff, #f5f9ff) !important;
  border: 1px solid rgba(147,197,253,0.45) !important;
  border-radius: 12px !important;
  color: #1a2a3a !important;
  font-size: 0.92em;
  padding: 12px 16px !important;
  box-shadow: 0 1px 4px rgba(96,165,250,0.08);
  transition: border-color 0.3s, box-shadow 0.3s;
  caret-color: #3b82f6;
}

textarea:focus,
form textarea:focus {
  border-color: #93c5fd !important;
  box-shadow: 0 0 12px rgba(96,165,250,0.15), 0 0 4px rgba(147,197,253,0.2) !important;
}

textarea::placeholder,
form textarea::placeholder {
  color: rgba(30,58,95,0.35) !important;
  font-style: italic;
}

/* ── hover高亮 ── */
.is-assistant:hover > .border.border-muted {
  border-color: #93c5fd !important;box-shadow: 0 2px 12px rgba(96,165,250,0.15);
}

.is-user:hover > .border.border-muted {
  border-color: #60a5fa !important;
  box-shadow: 0 2px 10px rgba(96,165,250,0.18);
}

/* ── 消息分隔线 ── */
.w-full.max-w-2xl.mx-auto + .w-full.max-w-2xl.mx-auto::before {
  content: "";
  display: block;
  width: 60%;
  height: 1px;
  margin: 4px auto 12px;
  background: linear-gradient(90deg, transparent, rgba(147,197,253,0.35), transparent);
}

/* ── 滚动条 ── */
main::-webkit-scrollbar,
[class*="overflow-y-auto"]::-webkit-scrollbar {
  width: 5px;
}
main::-webkit-scrollbar-track,
[class*="overflow-y-auto"]::-webkit-scrollbar-track {
  background: rgba(219,234,254,0.5);
}
main::-webkit-scrollbar-thumb,
[class*="overflow-y-auto"]::-webkit-scrollbar-thumb {
  background: #93c5fd;
  border-radius: 3px;
}
main::-webkit-scrollbar-thumb:hover,
[class*="overflow-y-auto"]::-webkit-scrollbar-thumb:hover {
  background: #60a5fa;
}

/* ── 加载动画小球 ── */
.flex.gap-2.w-full.h-full.items-center.justify-center span {
  background: #93c5fd !important;
  box-shadow: 0 0 6px rgba(147,197,253,0.4);
}

/* ── token消耗信息 ── */
.text-xs.font-mono.text-muted-foreground {
  color: #3b82f6 !important;
}

/* ── 侧边栏/顶栏 ── */
header,
nav,
aside {
  background: linear-gradient(135deg, #dbeafe, #e8f1ff) !important;
  border-color: rgba(147,197,253,0.35) !important;
}

header *,
nav * {
  color: #1e3a5f;
}


/* ═══════════════════════════════════════
   第二部分：AI输出内容内部UI（原样保留）
   以下选择器作用于AI输出的自定义HTML，
   两平台结构一致，无需修改选择器
   ═══════════════════════════════════════ */

/* ═══ 主容器 ═══ */
.asterisk-ui {
  background: #dbeafe;
  padding: 0;
  font-family: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: #1a2a3a;
}
/* ═══ 顶部状态栏 ═══ */
.top-bar {
  background: linear-gradient(135deg, #bfdbfe, #dbeafe);
  padding: 12px 14px;
  border-bottom: 2px solid #93c5fd;
}
.tb-item {
  margin: 4px 0 !important;
  color: #1e3a5f;
  font-size: 0.84em;
  line-height: 1.6;
  padding-left: 22px;
  position: relative;font-weight: 500;
}
.tb-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.85;
}
.tb-time::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 6v6l4 2'/%3E%3C/svg%3E");
}
.tb-match::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2'%3E%3Cpath d='M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z'/%3E%3Cpath d='M14 2v6h6'/%3E%3C/svg%3E");
}
.tb-weather::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2'/%3E%3Cpath d='M12 20v2'/%3E%3Cpath d='M4.93 4.93l1.41 1.41'/%3E%3Cpath d='M17.66 17.66l1.41 1.41'/%3E%3Cpath d='M2 12h2'/%3E%3Cpath d='M20 12h2'/%3E%3Cpath d='M6.34 17.66l-1.41 1.41'/%3E%3Cpath d='M19.07 4.93l-1.41 1.41'/%3E%3C/svg%3E");animation: weather-spin 12s linear infinite, weather-pulse 3s ease-in-out infinite;
}
.tb-loc::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
}
.tb-people::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
}
/* ═══ 正文═══ */
text {
  display: block !important;
  color: #1a1a1a !important;
  line-height: 2.05!important;
  padding: 18px 14px 22px !important;
  font-size: 0.94em !important;
  background: #f0f6ff !important;
  font-family: "瘦金体", "STSong", "Songti SC", "SimSun", serif !important;
  overflow: visible !important;
  position: relative;
}
text p {
  margin: 0 0 14px !important;
  text-indent: 2em;font-family: inherit !important;
  overflow: visible !important;
  position: relative;
}
text .pc,
text .fn,
text .mn {
  color: #1e3a8a;
  font-weight: 700;
  text-shadow: 0 0 6px rgba(30,58,138,0.25), 0 0 2px rgba(30,58,138,0.15);
}
/* ═══ 底部容器 ═══ */
.bottom-bar {
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
/* ═══ 折叠块通用 ═══ */
.sb-block {
  border: 1px solid rgba(147,197,253,0.4);
  background: #eef4ff;
  overflow: visible;
  position: relative;
  animation: breathe 4s ease-in-out infinite;
}
/* ═══ Summary通用 ═══ */
.sb-block summary {
  padding: 10px 14px 10px 36px;
  cursor: pointer;
  font-weight: 700;
  color: #1e3a5f;
  background: linear-gradient(135deg, #bfdbfe, #dbeafe);
  border: none;
  list-style: none;
  user-select: none;
  font-size: 0.88em;
  letter-spacing: 0.04em;
  position: relative;
  overflow: hidden;
  transition: background 0.25s;
}
.sb-block summary:hover {
  background: linear-gradient(135deg, #93c5fd, #bfdbfe);
}
.sb-block[open] summary {
  border-bottom: 1px solid rgba(147,197,253,0.3);
}
.sb-block summary::-webkit-details-marker { display: none; }
.sb-block summary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: sweep 4.5s ease-in-out infinite;
  pointer-events: none;
}
/* ═══ Summary SVG图标 ═══ */
.sb-block summary::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.7;
  transition: opacity 0.2s;
  z-index: 1;
}
.sb-block[open] summary::before { opacity: 1; }
.sb-world summary::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231e3a5f' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M2 12h20'/%3E%3Cpath d='M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z'/%3E%3C/svg%3E");
}
.sb-bond summary::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231e3a5f' stroke-width='2'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78L12 21.23l8.84-8.84a5.5 5.5 0 0 0 0-7.78z'/%3E%3C/svg%3E");
}
.sb-player summary::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231e3a5f' stroke-width='2'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3Ccircle cx='12' cy='10' r='2.5'/%3E%3Cpath d='M9 16c0-1.66 1.34-3 3-3s3 1.34 3 3'/%3E%3C/svg%3E");
}
.sb-interact summary::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231e3a5f' stroke-width='2'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3Cpath d='M8 9h8'/%3E%3Cpath d='M8 13h4'/%3E%3C/svg%3E");
}
.sb-around summary::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231e3a5f' stroke-width='2'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
}
.sb-terminal summary::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231e3a5f' stroke-width='1.6' stroke-linejoin='round'%3E%3Cpolygon points='12,3 3,17 21,17'/%3E%3Cpolygon points='12,21 3,7 21,7'/%3E%3C/svg%3E");
}
.sb-action summary::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231e3a5f' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v4'/%3E%3Cpath d='M12 18v4'/%3E%3Cpath d='M2 12h4'/%3E%3Cpath d='M18 12h4'/%3E%3C/svg%3E");
}
.sb-memory summary::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231e3a5f' stroke-width='2'%3E%3Crect x='4' y='4' width='16' height='16' rx='2'/%3E%3Crect x='9' y='9' width='6' height='6'/%3E%3Cpath d='M9 1v3'/%3E%3Cpath d='M15 1v3'/%3E%3Cpath d='M9 20v3'/%3E%3Cpath d='M15 20v3'/%3E%3Cpath d='M20 9h3'/%3E%3Cpath d='M20 14h3'/%3E%3Cpath d='M1 9h3'/%3E%3Cpath d='M1 14h3'/%3E%3C/svg%3E");
}
.sb-lore summary::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231e3a5f' stroke-width='2'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20'/%3E%3Cpath d='M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z'/%3E%3C/svg%3E");
}
/* ═══ 折叠块内容 ═══ */
.sb-content {
  padding: 10px 14px 16px;
  color: #1a2a3a;
  font-size: 0.84em;
  line-height: 1.8;
  background: #f5f9ff;
  font-weight: 450;
  overflow: visible;
  position: relative;
}
.sb-block[open] .sb-content {
  animation: content-in 0.25s ease-out;
}
.sb-content p {
  margin: 3px 0 !important;
  line-height: 1.8;
  overflow: visible;
  position: relative;
}
.sb-sub {
  color: #1d4ed8;
  font-weight: 700;
  margin: 14px 0 5px !important;
  font-size: 0.9em;
  border-bottom: 1px solid rgba(37,99,235,0.2);
  padding-bottom: 3px;
}
/* ═══ 心声 & 身体感受 斜体 ═══ */
.ic-mind em, .ic-body em {
  font-style: italic;
  color: #475569;
}
/* ═══ 星辰力蓝条 ═══ */
.mp-bar {
  display: inline-block;
  width: 140px;
  height: 18px;
  background: rgba(30,58,95,0.1);
  border-radius: 9px;
  position: relative;
  overflow: hidden;
  vertical-align: middle;
  border: 1px solid rgba(96,165,250,0.3);
}
.mp-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #60a5fa, #93c5fd);
  background-size: 200% 100%;
  border-radius: 9px;
  position: relative;
}
.mp-fill::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  background-size: 150px 100%;
  animation: mp-shimmer 2s ease-in-out infinite;
}
.mp-text {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62em;
  color: #1e3a5f;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-shadow: 0 0 2px rgba(255,255,255,0.6);
  z-index: 1;
}
/* ═══ SVG字段图标（带框） ═══ */
.ic-name, .ic-per, .ic-look, .ic-outfit, .ic-power,
.ic-item, .ic-fund, .ic-gender, .ic-id, .ic-status,
.ic-mind, .ic-pose, .ic-heart, .ic-body, .ic-talent {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px 3px 24px;
  position: relative;
  background: rgba(37,99,235,0.05);
  border: 1px solid rgba(37,99,235,0.1);
  border-radius: 4px;
  margin: 2px 0;
  font-weight: 500;
  overflow: visible;
}
.ic-name::before, .ic-per::before, .ic-look::before, .ic-outfit::before,
.ic-power::before, .ic-item::before, .ic-fund::before, .ic-gender::before,
.ic-id::before, .ic-status::before, .ic-mind::before, .ic-pose::before,
.ic-heart::before, .ic-body::before, .ic-talent::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 13px;
  height: 13px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.8;
}
.ic-name::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2.2'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21v-1a6 6 0 0 1 12 0v1'/%3E%3C/svg%3E");
}
.ic-per::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2.2'%3E%3Cpolygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/%3E%3C/svg%3E");
}
.ic-look::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2.2'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
}
.ic-outfit::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2.2'%3E%3Cpath d='M20 21V5a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v16'/%3E%3Cpath d='M12 3v4'/%3E%3Cpath d='M4 21h16'/%3E%3C/svg%3E");
}
.ic-power::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2.2'%3E%3Cpolygon points='13 2 3 14 12 14 11 22 21 10 12 10 13 2'/%3E%3C/svg%3E");
}
.ic-talent::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2.2'%3E%3Cpolygon points='6 3 18 3 22 9 12 22 2 9'/%3E%3Cpath d='M2 9h20'/%3E%3Cpath d='M12 22L6 9'/%3E%3Cpath d='M12 22l6-13'/%3E%3C/svg%3E");
}
.ic-item::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2.2'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Cpath d='M3 9h18'/%3E%3Cpath d='M9 3v6'/%3E%3C/svg%3E");
}
.ic-fund::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2.2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 6v12'/%3E%3Cpath d='M8 10h8'/%3E%3Cpath d='M8 14h8'/%3E%3C/svg%3E");
}
.ic-gender::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2.2'%3E%3Ccircle cx='12' cy='10' r='6'/%3E%3Cpath d='M12 16v6'/%3E%3Cpath d='M9 19h6'/%3E%3C/svg%3E");
}
.ic-id::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2.2'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3C/svg%3E");
}
.ic-status::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2.2'%3E%3Cpath d='M22 12h-4l-3 9L9 3l-3 9H2'/%3E%3C/svg%3E");
}
.ic-mind::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2.2'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E");
}
.ic-pose::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2.2'%3E%3Ccircle cx='12' cy='4' r='2'/%3E%3Cpath d='M12 6v8'/%3E%3Cpath d='M8 10l4-242'/%3E%3Cpath d='M8 20l4-64 6'/%3E%3C/svg%3E");
}
.ic-heart::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2.2'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78L12 21.23l8.84-8.84a5.5 5.5 0 0 0 0-7.78z'/%3E%3C/svg%3E");
}
.ic-body::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2.2'%3E%3Cpath d='M12 2a4 4 0 0 0-4 4c0 2.21 1.79 4 4 4s4-1.79 4-4a4 4 0 0 0-4-4z'/%3E%3Cpath d='M6 21v-2a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v2'/%3E%3C/svg%3E");
}
/* ═══ 记忆表格 ═══ */
.mem-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8em;
  margin: 6px 0;
}
.mem-table th {
  background: linear-gradient(135deg, #93c5fd, #bfdbfe);
  color: #1e3a5f;
  padding: 6px 8px;
  border: 1px solid #93c5fd;
  text-align: left;
  font-weight: 700;
}
.mem-table td {
  padding: 6px 8px;
  border: 1px solid rgba(147,197,253,0.25);
  color: #1a2a3a;
  vertical-align: top;
  line-height: 1.6;
  background: rgba(255,255,255,0.6);
  font-weight: 450;
}
.mem-table tr:nth-child(even) td {
  background: rgba(96,165,250,0.06);
}
/* ═══ 功能区═══ */
.func-bar {
  border: 1px solid rgba(147,197,253,0.4);
  background: linear-gradient(135deg, #dbeafe, #e8f0fe);
  padding: 10px 14px;
  animation: breathe 4s ease-in-out infinite;
}
.func-label {
  font-weight: 700;
  color: #1d4ed8;
  margin: 0 0 3px !important;
  font-size: 0.86em;
}
.func-toggle {
  color: #334155;
  font-size: 0.82em;
  margin: 0 !important;
  font-weight: 500;
}
/* ═══ 终端UI ═══ */
.sb-terminal summary {
  background: linear-gradient(135deg, #bfdbfe, #dbeafe);
  color: #1e3a5f;
}
.tm-wrap {
  background: #0a0f1e !important;
  padding: 14px !important;
  font-family: "Cascadia Code", "Fira Code", "Consolas", monospace;
  overflow: visible;
}
.tm-header {
  color: #60a5fa;
  font-size: 0.7em;
  letter-spacing: 0.15em;
  margin: 0 0 16px !important;
  text-align: center;
  opacity: 0.7;
}
.tm-footer {
  color: #475569;
  font-size: 0.55em;
  letter-spacing: 0.1em;
  margin: 14px 0 0 !important;
  text-align: center;
}
.tm-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  justify-items: center;
  padding: 10px 0;
}
.tm-grid:has(.tm-app[open]) .tm-app:not([open]) { display: none; }
.tm-app {
  border: none !important;
  background: transparent !important;
  margin: 0 !important;
  width: 100%;
  animation: none !important;
}
.tm-app[open] { grid-column: 1 / -1; }
.tm-app summary {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  color: inherit !important;
}
.tm-app summary::before { display: none !important; }
.tm-app summary::after { display: none !important; }
.tm-icon {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 8px 12px !important;
  background: linear-gradient(145deg, rgba(96,165,250,0.1), rgba(96,165,250,0.03)) !important;
  border: 1px solid rgba(96,165,250,0.2) !important;
  border-radius: 16px !important;
  cursor: pointer;
  transition: all 0.25s ease;
  list-style: none !important;
}
.tm-icon::-webkit-details-marker { display: none !important; }
.tm-icon:hover {
  background: linear-gradient(145deg, rgba(96,165,250,0.2), rgba(96,165,250,0.08)) !important;
  border-color: rgba(96,165,250,0.4) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(96,165,250,0.2);
}
.tm-emoji { font-size: 2em; display: block; line-height: 1; }
.tm-label { color: #94a3b8; font-size: 0.62em; text-align: center; letter-spacing: 0.02em; }
.tm-icon:hover .tm-label { color: #e2e8f0; }
.tm-app[open] .tm-icon {
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 8px 14px !important;
  border-radius: 6px !important;
  background: rgba(96,165,250,0.12) !important;
  border-color: rgba(96,165,250,0.3) !important;
  margin-bottom: 10px;
}
.tm-app[open] .tm-emoji { display: none; }
.tm-app[open] .tm-label { display: none; }
.tm-app[open] .tm-icon::before {
  content: "" !important;
  display: inline-block !important;
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2360a5fa' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5'/%3E%3Cpath d='M12 19l-7-7 7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  flex-shrink: 0;
}
.tm-app[open] .tm-icon::after {
  content: "返回终端";
  color: #60a5fa;
  font-size: 0.75em;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.tm-app[open] .tm-icon:hover {
  background: rgba(96,165,250,0.22) !important;
  transform: none;
  box-shadow: none;
}
.tm-page {
  padding: 12px 10px;
  background: rgba(15,23,42,0.5);
  border: 1px solid rgba(96,165,250,0.12);
  border-radius: 8px;
}
/* ═══ 论坛 ═══ */
.forum-post {
  border-left: 2px solid rgba(96,165,250,0.25);
  padding: 8px 10px;
  margin: 8px 0;
  transition: border-color 0.2s;
}
.forum-post:hover { border-left-color: #60a5fa; }
.post-title {
  font-weight: 700;
  color: #93c5fd;
  margin: 0 0 3px !important;
  font-size: 0.84em;
  background: linear-gradient(90deg, rgba(96,165,250,0.18), transparent);
  padding: 3px 8px;
  border-radius: 2px;
  text-shadow: 0 0 8px rgba(96,165,250,0.4);
}
.hot-tag {
  display: inline-block;
  background: #ef4444;
  color: #fff;
  font-size: 0.58em;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 2px;
  margin-right: 4px;
  vertical-align: middle;
}
.new-tag {
  display: inline-block;
  background: #60a5fa;
  color: #fff;
  font-size: 0.58em;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 2px;
  margin-right: 4px;
  vertical-align: middle;
}
.post-meta { color: #64748b; font-size: 0.7em; margin: 2px 0 !important; }
.post-body { color: #e2e8f0; font-size: 0.78em; margin: 4px 0 !important; line-height: 1.55; }
.post-reply {
  color: #94a3b8;
  font-size: 0.72em;
  margin: 2px 0 !important;
  padding-left: 12px;
  position: relative;
}
.post-reply::before { content: "└"; position: absolute; left: 0; color: #475569; }
/* ═══ 赛程 ═══ */
.sch-header { padding: 0 0 8px; margin-bottom: 8px; border-bottom: 1px solid rgba(96,165,250,0.15); text-align: center; }
.sch-title { color: #60a5fa; font-size: 0.9em; font-weight: 700; margin: 0 0 3px !important; }
.sch-phase { color: #64748b; font-size: 0.72em; margin: 0 !important; }
.sch-section { margin: 8px 0; }
.sch-label { color: #60a5fa; font-size: 0.78em; font-weight: 600; margin: 0 0 5px !important; }
.sch-match { border-left: 2px solid rgba(96,165,250,0.2); padding: 6px 10px; margin: 5px 0; }
.sch-match:hover { border-left-color: #60a5fa; }
.sch-vs { display: flex; align-items: center; justify-content: center; gap: 5px; flex-wrap: wrap; margin: 0 0 3px !important; }
.sch-team { color: #e2e8f0; font-weight: 700; font-size: 0.85em; }
.sch-badge { color: #64748b; font-size: 0.62em; background: rgba(96,165,250,0.1); padding: 1px 5px; border-radius: 2px; }
.sch-x { color: #f59e0b; font-weight: 800; font-size: 0.72em; margin: 0 3px; }
.sch-info { color: #64748b; font-size: 0.7em; text-align: center; margin: 0 !important; }
.sch-my { color: #94a3b8; font-size: 0.76em; margin: 3px 0 !important; padding-left: 6px; }
/* ═══ 博彩 ═══ */
.bet-section { margin: 8px 0; }
.bet-num { color: #fbbf24; font-weight: 700; }
.bet-mine { color: #94a3b8; font-size: 0.76em; margin: 3px 0 !important; padding-left: 6px; }
/* ═══ 悬浮窗 ═══ */
item, skill, talent, equip {
  position: relative;
  display: inline;
  cursor: help;
  font-weight: 700;
  padding: 0;
  border-bottom: none;
  z-index: 1;
  vertical-align: baseline;
  line-height: 1.4;
}
item:hover, item:active,
skill:hover, skill:active,
talent:hover, talent:active,
equip:hover, equip:active {
  z-index: 2147483647;
}
/* ═══ 品级颜色 ═══ */
item[data-grade="s"], skill[data-grade="s"], talent[data-grade="s"], equip[data-grade="s"] {
  color: #dc2626;
  animation: s-glow 2s ease-in-out infinite;
}
item[data-grade="a"], skill[data-grade="a"], talent[data-grade="a"], equip[data-grade="a"] { color: #7c3aed; }
item[data-grade="b"], skill[data-grade="b"], talent[data-grade="b"], equip[data-grade="b"] { color: #3b82f6; }
item[data-grade="c"], skill[data-grade="c"], talent[data-grade="c"], equip[data-grade="c"] { color: #16a34a; }
item[data-grade="d"], skill[data-grade="d"], talent[data-grade="d"], equip[data-grade="d"] { color: #6b7280; }
/* ═══ 悬浮窗面板 ═══ */
item .tip, skill .tip, talent .tip, equip .tip {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: max(-35px, calc(-50vw + 80px));
  width: 160px;
  min-height: 140px;
  max-width: 65vw;
  background: linear-gradient(135deg, #eef4ff, #f5f9ff);
  border: 1px solid rgba(147,197,253,0.5);
  padding: 10px;
  font-size: 0.82em;
  font-weight: normal;
  color: #1a2a3a;
  line-height: 1.6;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12), 0 0 8px rgba(96,165,250,0.15);
  z-index: 2147483647;
  white-space: normal;
  border-radius: 4px;
}
item.u .tip, skill.u .tip, talent.u .tip, equip.u .tip {
  top: auto;
  bottom: calc(100% + 4px);
}
item .tip .tl, skill .tip .tl, talent .tip .tl, equip .tip .tl {
  display: block;
  margin: 3px 0;
}
/* ═══ 品级边框 ═══ */
item[data-grade="s"] .tip, skill[data-grade="s"] .tip, talent[data-grade="s"] .tip, equip[data-grade="s"] .tip {
  border-top: 3px solid #dc2626;
  box-shadow: 0 4px 16px rgba(220,38,38,0.15), 0 0 20px rgba(220,38,38,0.08), inset 0 0 30px rgba(220,38,38,0.03);
}
item[data-grade="a"] .tip, skill[data-grade="a"] .tip, talent[data-grade="a"] .tip, equip[data-grade="a"] .tip {
  border-top: 3px solid #7c3aed;
  box-shadow: 0 4px 16px rgba(124,58,237,0.15), 0 0 20px rgba(124,58,237,0.08), inset 0 0 30px rgba(124,58,237,0.03);
}
item[data-grade="b"] .tip, skill[data-grade="b"] .tip, talent[data-grade="b"] .tip, equip[data-grade="b"] .tip { border-top: 3px solid #3b82f6; }
item[data-grade="c"] .tip, skill[data-grade="c"] .tip, talent[data-grade="c"] .tip, equip[data-grade="c"] .tip { border-top: 3px solid #16a34a; }
item[data-grade="d"] .tip, skill[data-grade="d"] .tip, talent[data-grade="d"] .tip, equip[data-grade="d"] .tip { border-top: 3px solid #9ca3af; }
/* ═══ 品级标题色 ═══ */
item[data-grade="s"] .tip .tl:first-child, skill[data-grade="s"] .tip .tl:first-child,
talent[data-grade="s"] .tip .tl:first-child, equip[data-grade="s"] .tip .tl:first-child { color: #dc2626; font-weight: 700; }
item[data-grade="a"] .tip .tl:first-child, skill[data-grade="a"] .tip .tl:first-child,
talent[data-grade="a"] .tip .tl:first-child, equip[data-grade="a"] .tip .tl:first-child { color: #7c3aed; font-weight: 700; }
item[data-grade="b"] .tip .tl:first-child, skill[data-grade="b"] .tip .tl:first-child,
talent[data-grade="b"] .tip .tl:first-child, equip[data-grade="b"] .tip .tl:first-child { color: #3b82f6; font-weight: 700; }
item[data-grade="c"] .tip .tl:first-child, skill[data-grade="c"] .tip .tl:first-child,
talent[data-grade="c"] .tip .tl:first-child, equip[data-grade="c"] .tip .tl:first-child { color: #16a34a; font-weight: 700; }
item[data-grade="d"] .tip .tl:first-child, skill[data-grade="d"] .tip .tl:first-child,
talent[data-grade="d"] .tip .tl:first-child, equip[data-grade="d"] .tip .tl:first-child { color: #6b7280; font-weight: 700; }
/* ═══ 悬浮窗显示+入场动画 ═══ */
item:hover .tip, item:active .tip,
skill:hover .tip, skill:active .tip,
talent:hover .tip, talent:active .tip,
equip:hover .tip, equip:active .tip {
  display: block;
  animation: tip-in 0.2s ease-out;
}
/* ═══ 行动推荐内容加框 ═══ */
.sb-action .sb-content p {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px 3px 10px;
  background: rgba(37,99,235,0.05);
  border: 1px solid rgba(37,99,235,0.1);
  border-radius: 4px;
  margin: 2px 0;
  font-weight: 500;
  width: calc(100% - 20px);
}
.sb-think {
  border: 1px dashed rgba(96,165,250,0.35) !important;
  background: rgba(219,234,254,0.4) !important;
  animation: breathe 6s ease-in-out infinite;
}
.sb-think summary::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231e3a5f' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 1v4M12 19v4M4.22 4.22l2.83 2.83M16.95 16.95l2.83 2.83M1 12h4M19 12h4M4.22 19.78l2.83-2.83M16.95 7.05l2.83-2.83'/%3E%3C/svg%3E");
}
.think-step {
  border-left: 2px solid rgba(96,165,250,0.25);
  padding: 5px 8px 5px 10px !important;
  margin: 4px 0 !important;
  font-size: 0.8em;
  color: #334155;
  line-height: 1.75;
  background: rgba(255,255,255,0.35);
  border-radius: 0 3px 3px 0;transition: border-color 0.2s, background 0.2s;
}
.think-step:hover {
  border-left-color: #60a5fa;
  background: rgba(255,255,255,0.6);
}
.think-step::first-line {
  color: #1d4ed8;
  font-weight: 700;
}