.absolute.top-0.MuiBox-root {
    background:transparent;
}
.mb-2 .shrink-0 {
    display:none;
}
.chat-answer-container.mr-2 {
    margin-right: 0rem;
}
.group .px-4 {
    padding-left: 0.1rem;
    padding-right: 0.1rem;
}
/* --- 统一聊天框基础设置 --- */
.bg-gray-100\/90.relative.inline-block {
    isolation: isolate !important;
    position: relative !important;
    overflow: visible !important;
}

/* --- 输入聊天框：暖色都市风 --- */
.bg-gray-100\/90.relative.inline-block:not(.chat-answer-container .bg-gray-100\/90) {
    background: linear-gradient(135deg, #2C1810 0%, #4A2520 30%, #5C3328 55%, #3D2218 80%, #1E0F0A 100%) !important;
    border: 1px solid rgba(255, 160, 80, 0.25) !important;
    border-radius: 16px !important;
    box-shadow:
        0 4px 24px rgba(255, 120, 50, 0.12),
        0 1px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 180, 100, 0.08) !important;
    padding: 18px 20px !important;
    transition: box-shadow 0.3s ease, border-color 0.3s ease !important;
}

.bg-gray-100\/90.relative.inline-block:not(.chat-answer-container .bg-gray-100\/90):hover {
    box-shadow:
        0 6px 32px rgba(255, 120, 50, 0.2),
        0 2px 12px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 180, 100, 0.12) !important;
    border-color: rgba(255, 160, 80, 0.4) !important;
}

/* 输入框 - 背景都市光效 ::before */
.bg-gray-100\/90.relative.inline-block:not(.chat-answer-container .bg-gray-100\/90)::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    border-radius: 16px !important;
    z-index: 0 !important;
    pointer-events: none !important;
    opacity: 0.4 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cdefs%3E%3CradialGradient id='a' cx='20%25' cy='80%25' r='50%25'%3E%3Cstop offset='0%25' stop-color='%23FF8C42' stop-opacity='0.3'%3E%3Canimate attributeName='stop-opacity' values='0.3;0.5;0.3' dur='4s' repeatCount='indefinite'/%3E%3C/stop%3E%3Cstop offset='100%25' stop-color='%23FF8C42' stop-opacity='0'/%3E%3C/radialGradient%3E%3CradialGradient id='b' cx='75%25' cy='30%25' r='40%25'%3E%3Cstop offset='0%25' stop-color='%23FFB366' stop-opacity='0.2'%3E%3Canimate attributeName='stop-opacity' values='0.2;0.4;0.2' dur='5s' repeatCount='indefinite'/%3E%3C/stop%3E%3Cstop offset='100%25' stop-color='%23FFB366' stop-opacity='0'/%3E%3C/radialGradient%3E%3CradialGradient id='c' cx='50%25' cy='50%25' r='35%25'%3E%3Cstop offset='0%25' stop-color='%23E8734A' stop-opacity='0.15'%3E%3Canimate attributeName='stop-opacity' values='0.15;0.3;0.15' dur='6s' repeatCount='indefinite'/%3E%3C/stop%3E%3Cstop offset='100%25' stop-color='%23E8734A' stop-opacity='0'/%3E%3C/radialGradient%3E%3C/defs%3E%3Crect width='300' height='300' fill='url(%23a)'/%3E%3Crect width='300' height='300' fill='url(%23b)'/%3E%3Crect width='300' height='300' fill='url(%23c)'/%3E%3C/svg%3E") !important;
    background-size: cover !important;
}

/* 输入框 - 顶部城市天际线剪影 ::after */
.bg-gray-100\/90.relative.inline-block:not(.chat-answer-container .bg-gray-100\/90)::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 60px !important;
    border-radius: 0 0 16px 16px !important;
    z-index: 0 !important;
    pointer-events: none !important;
    opacity: 0.08 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 60' preserveAspectRatio='none'%3E%3Cpath d='M0,60 L0,40 L15,40 L15,28 L25,28 L25,35 L35,35 L35,20 L42,20 L42,15 L48,15 L48,20 L55,20 L55,32 L65,32 L65,25 L72,25 L72,18 L78,18 L78,25 L88,25 L88,38 L100,38 L100,22 L108,22 L108,12 L115,12 L115,22 L122,22 L122,30 L135,30 L135,42 L148,42 L148,28 L155,28 L155,20 L162,20 L162,10 L168,10 L168,20 L175,20 L175,28 L185,28 L185,35 L200,35 L200,25 L210,25 L210,15 L218,15 L218,8 L225,8 L225,15 L232,15 L232,25 L242,25 L242,38 L255,38 L255,30 L265,30 L265,22 L272,22 L272,16 L280,16 L280,22 L290,22 L290,32 L305,32 L305,42 L318,42 L318,35 L328,35 L328,25 L338,25 L338,18 L345,18 L345,25 L355,25 L355,38 L370,38 L370,30 L380,30 L380,40 L395,40 L400,40 L400,60 Z' fill='%23FF9955'/%3E%3C/svg%3E") !important;
    background-size: 100% 100% !important;
    background-repeat: no-repeat !important;
}

/* --- 输入框文本样式（深色背景 → 浅色文字） --- */
.bg-gray-100\/90.relative.inline-block:not(.chat-answer-container .bg-gray-100\/90) .markdown-body {
    color: #FFE8D6 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 15px !important;
    line-height: 1.7 !important;
    z-index: 1 !important;
    position: relative !important;
    background: transparent !important;
}

/* --- 输入框底部附加元素样式 --- */
.bg-gray-100\/90.relative.inline-block:not(.chat-answer-container .bg-gray-100\/90) .MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary {
    color: #EACDAF !important;
    transition: color 0.2s ease !important;
}

.bg-gray-100\/90.relative.inline-block:not(.chat-answer-container .bg-gray-100\/90) .MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary:hover {
    color: #FFD4A8 !important;
}

.bg-gray-100\/90.relative.inline-block:not(.chat-answer-container .bg-gray-100\/90) .MuiTypography-root.MuiTypography-body2.css-6c0gf2 {
    color: #EACDAF !important;
}

.bg-gray-100\/90.relative.inline-block:not(.chat-answer-container .bg-gray-100\/90) .text-orange-500 {
    color: #FFB366 !important;
}

/* ==============================================
   🔲 输出聊天框：透明背景
   ============================================== */
.chat-answer-container .bg-gray-100\/90.relative.inline-block {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 16px !important;
}

/* 输出框文本样式 */
.chat-answer-container .bg-gray-100\/90.relative.inline-block .markdown-body {
    color: #333333 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 15px !important;
    line-height: 1.7 !important;
    z-index: 1 !important;
    position: relative !important;
    background: transparent !important;
}

/* 清除输出框伪元素 */
.chat-answer-container .bg-gray-100\/90.relative.inline-block::before,
.chat-answer-container .bg-gray-100\/90.relative.inline-block::after {
    display: none !important;
}

/* ==============================================
   ⏳ 加载动画：带独立暖色外框的脉冲光点
   ============================================== */

/* 隐藏默认加载动画 */
.style_dot-flashing__8L91Q.style_text__zGhNq {
    display: none !important;
}

/* 加载容器设置 */
.flex.items-center.justify-center.w-6.h-5 {
    position: relative !important;
    width: 120px !important;
    min-height: 52px !important;
    height: 52px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: visible !important;
}

/* ::before - 独立暖色外框背景卡片 */
.flex.items-center.justify-center.w-6.h-5::before {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 110px !important;
    height: 44px !important;
    border-radius: 22px !important;
    background: linear-gradient(135deg, #3D2015 0%, #5A3020 50%, #3D2015 100%) !important;
    border: 1px solid rgba(255, 160, 80, 0.3) !important;
    box-shadow:
        0 2px 12px rgba(255, 120, 50, 0.15),
        0 1px 4px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 180, 100, 0.1) !important;
    z-index: 0 !important;
    pointer-events: none !important;
}

/* ::after - SMIL动画：三个脉冲光点 */
.flex.items-center.justify-center.w-6.h-5::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 80px !important;
    height: 20px !important;
    z-index: 1 !important;
    pointer-events: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 20'%3E%3Ccircle cx='15' cy='10' r='4' fill='%23FF9955'%3E%3Canimate attributeName='opacity' values='0.3;1;0.3' dur='1.4s' begin='0s' repeatCount='indefinite'/%3E%3Canimate attributeName='r' values='3;5;3' dur='1.4s' begin='0s' repeatCount='indefinite'/%3E%3C/circle%3E%3Ccircle cx='40' cy='10' r='4' fill='%23FFBB77'%3E%3Canimate attributeName='opacity' values='0.3;1;0.3' dur='1.4s' begin='0.2s' repeatCount='indefinite'/%3E%3Canimate attributeName='r' values='3;5;3' dur='1.4s' begin='0.2s' repeatCount='indefinite'/%3E%3C/circle%3E%3Ccircle cx='65' cy='10' r='4' fill='%23FFD4A8'%3E%3Canimate attributeName='opacity' values='0.3;1;0.3' dur='1.4s' begin='0.4s' repeatCount='indefinite'/%3E%3Canimate attributeName='r' values='3;5;3' dur='1.4s' begin='0.4s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/svg%3E") !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}

/* ==============================================
   📱 移动端适配
   ============================================== */
@media (max-width: 480px) {
    .bg-gray-100\/90.relative.inline-block:not(.chat-answer-container .bg-gray-100\/90) {
        padding: 14px 14px !important;
        border-radius: 12px !important;
    }

    .bg-gray-100\/90.relative.inline-block:not(.chat-answer-container .bg-gray-100\/90)::after {
        height: 40px !important;
        opacity: 0.06 !important;
    }

    .flex.items-center.justify-center.w-6.h-5 {
        width: 100px !important;
        min-height: 46px !important;
        height: 46px !important;
    }

    .flex.items-center.justify-center.w-6.h-5::before {
        width: 94px !important;
        height: 38px !important;
        border-radius: 19px !important;
    }

    .flex.items-center.justify-center.w-6.h-5::after {
        width: 66px !important;
        height: 18px !important;
    }
}

/* ==============================================
   🔇 减弱动效偏好
   ============================================== */
@media (prefers-reduced-motion: reduce) {
    .bg-gray-100\/90.relative.inline-block:not(.chat-answer-container .bg-gray-100\/90)::before {
        opacity: 0.25 !important;
        /* SMIL动画内部已有缓动，此处降低整体透明度减少视觉刺激 */
    }

    .flex.items-center.justify-center.w-6.h-5::after {
        /* 动画仍保留但减小幅度感知，SMIL继续运行 */
        opacity: 0.6 !important;
    }
}
/* ====== 容器与CSS变量 ====== */
tag-task {
  --bg: #1a1410;
  --card: #231c14;
  --card2: #2b2118;
  --text: #e8d5b7;
  --text2: #b8a48a;
  --gold: #d4952a;
  --gold2: #f5c96a;
  --amber: #c47f17;
  --bronze: #8b6d4a;
  --danger: #c73e39;
  --danger2: #ff5e57;
  --purple: #6b3fa0;
  --lv1-bg: #3a332a;
  --lv1-bd: #7a6e5d;
  --lv2-bg: #3d3020;
  --lv2-bd: #b8922e;
  --lv3-bg: #3a2810;
  --lv3-bd: #d4952a;
  --lv4-bg: #351a18;
  --lv4-bd: #a33;
  --lv5-bg: #1f0a1a;
  --lv5-bd: #8b2fc7;
  display: block;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 "Segoe UI", "Noto Sans SC", "PingFang SC", sans-serif;
  padding: 0;
  max-width: 100%;
  overflow: visible;
  position: relative;
}

/* ★ 修复1: position: fixed → absolute，避免全视口重绘 */
tag-task::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='.08'/%3E%3C/svg%3E");
  opacity: .4;
  z-index: 0;
}

tag-task > * {
  position: relative;
  z-index: 1;
}

tag-task hd {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  align-items: center;
  padding: 14px 16px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='120'%3E%3Cdefs%3E%3ClinearGradient id='g1' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23d4952a' stop-opacity='.06'/%3E%3Cstop offset='1' stop-color='%23d4952a' stop-opacity='0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='300' height='120' fill='url(%23g1)'/%3E%3Cpath d='M0 60Q30 40 60 55T120 45T180 58T240 42T300 55' fill='none' stroke='%23d4952a' stroke-width='.5' opacity='.12'/%3E%3Cpath d='M0 80Q40 65 80 75T160 62T240 72T300 65' fill='none' stroke='%238b6d4a' stroke-width='.4' opacity='.08'/%3E%3C/svg%3E") no-repeat center / cover,
    linear-gradient(135deg, #2e2316 0%, #1a1410 50%, #2a1f14 100%);
  border-bottom: 2px solid var(--gold);
  position: relative;
  z-index: 10;
  box-shadow: 0 4px 16px rgba(0,0,0,.5);
}

/* 顶部金光分割线 */
tag-task hd::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold2), var(--gold), var(--gold2), transparent);
  animation: hd-glow 3s ease-in-out infinite;
  will-change: opacity;
}

/* ★ 补充: 原CSS中引用但缺失的 hd-glow 关键帧 */
@keyframes hd-glow {
  0%, 100% { opacity: .6; }
  50% { opacity: 1; }
}

/* 左上角装饰纹 */
tag-task hd::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 60px;
  height: 60px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M0 0L20 0L20 2L2 2L2 20L0 20Z' fill='%23d4952a' opacity='.5'/%3E%3Cpath d='M6 6L14 6L14 7L7 7L7 14L6 14Z' fill='%23f5c96a' opacity='.3'/%3E%3Ccircle cx='4' cy='4' r='1.5' fill='%23f5c96a' opacity='.4'/%3E%3C/svg%3E") no-repeat top left;
  pointer-events: none;
}

/* ====== HEADER 内 TAG - 带 SVG 图标装饰 ====== */
tag-task hd > tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px 3px 8px;
  background: linear-gradient(135deg, rgba(212,149,42,.12), rgba(212,149,42,.04));
  border: 1px solid rgba(212,149,42,.3);
  border-radius: 3px;
  font-size: 13px;
  color: var(--gold2);
  letter-spacing: .3px;
  transition: all .3s;
  position: relative;
}

tag-task hd > tag:hover {
  background: linear-gradient(135deg, rgba(212,149,42,.28), rgba(212,149,42,.1));
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(212,149,42,.3), 0 2px 8px rgba(0,0,0,.3);
  transform: translateY(-1px);
}

/* 第1个tag: 世界 - 地球/球体SVG */
tag-task hd > tag:nth-child(1)::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='12' cy='12' r='10' stroke='%23f5c96a' stroke-width='1.5'/%3E%3Cellipse cx='12' cy='12' rx='4' ry='10' stroke='%23f5c96a' stroke-width='1' opacity='.6'/%3E%3Cpath d='M2 12h20' stroke='%23f5c96a' stroke-width='.8' opacity='.5'/%3E%3Cpath d='M4 7h16' stroke='%23f5c96a' stroke-width='.5' opacity='.35'/%3E%3Cpath d='M4 17h16' stroke='%23f5c96a' stroke-width='.5' opacity='.35'/%3E%3C/svg%3E") no-repeat center / contain;
  flex-shrink: 0;
  opacity: .8;
  transition: opacity .3s;
}

tag-task hd > tag:nth-child(1):hover::before {
  opacity: 1;
  filter: drop-shadow(0 0 3px rgba(245,201,106,.5));
}

/* 第2个tag: 地点 - 地标/定位SVG */
tag-task hd > tag:nth-child(2)::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7z' stroke='%23f5c96a' stroke-width='1.5' fill='rgba(245,201,106,.1)'/%3E%3Ccircle cx='12' cy='9' r='2.5' stroke='%23f5c96a' stroke-width='1.2' fill='rgba(245,201,106,.15)'/%3E%3C/svg%3E") no-repeat center / contain;
  flex-shrink: 0;
  opacity: .8;
  transition: opacity .3s;
}

tag-task hd > tag:nth-child(2):hover::before {
  opacity: 1;
  filter: drop-shadow(0 0 3px rgba(245,201,106,.5));
}

/* 第3个tag: 时间 */
tag-task hd > tag:nth-child(3) {
  border-left: 2px solid rgba(212,149,42,.4);
}

tag-task hd > tag:nth-child(3):hover {
  border-left-color: var(--gold2);
}

/* 第4个tag: 天气 - 太阳/云SVG */
tag-task hd > tag:nth-child(4)::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='12' cy='12' r='4' stroke='%23f5c96a' stroke-width='1.5' fill='rgba(245,201,106,.12)'/%3E%3Cpath d='M12 2v3M12 19v3M2 12h3M19 12h3M4.93 4.93l2.12 2.12M16.95 16.95l2.12 2.12M4.93 19.07l2.12-2.12M16.95 7.05l2.12-2.12' stroke='%23f5c96a' stroke-width='1' stroke-linecap='round' opacity='.7'/%3E%3C/svg%3E") no-repeat center / contain;
  flex-shrink: 0;
  opacity: .8;
  transition: all .3s;
}

tag-task hd > tag:nth-child(4):hover::before {
  opacity: 1;
  filter: drop-shadow(0 0 4px rgba(245,201,106,.6));
  transform: rotate(15deg);
}

/* ====== 移动端 hd 优化 ====== */
@media (max-width: 420px) {
  tag-task hd {
    padding: 10px;
    gap: 4px 6px;
  }

  tag-task hd > tag {
    font-size: 11px;
    padding: 2px 7px 2px 6px;
  }

  tag-task hd > tag:nth-child(1)::before,
  tag-task hd > tag:nth-child(2)::before,
  tag-task hd > tag:nth-child(4)::before {
    width: 12px;
    height: 12px;
  }

  tag-task hd::before {
    width: 40px;
    height: 40px;
  }
}

/* ====== PROGRESS 进度条 ====== */
tag-task progress {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 100%;
  height: 22px;
  border: 1px solid var(--bronze);
  border-radius: 4px;
  background: var(--bg);
  position: relative;
  overflow: hidden;
  display: block;
  flex-basis: 100%;
  transition: border-color .3s;
}

tag-task progress:hover {
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(212,149,42,.25);
}

/* Webkit 进度条轨道 */
tag-task progress::-webkit-progress-bar {
  background: linear-gradient(180deg, #1a1410, #231c14);
  border-radius: 3px;
}

/* Webkit 进度条填充 - TE */
tag-task progress[lv="TE"]::-webkit-progress-value {
  background: linear-gradient(90deg, #8b5a00, #d4952a, #f5c96a, #d4952a);
  border-radius: 3px;
  box-shadow: inset 0 -1px 2px rgba(0,0,0,.3), 0 0 6px rgba(212,149,42,.4);
  transition: width .4s ease;
}

/* Webkit 进度条填充 - Lv */
tag-task progress[lv="Lv"]::-webkit-progress-value {
  background: linear-gradient(90deg, #2a6b3f, #3da55d, #6bdb8a, #3da55d);
  border-radius: 3px;
  box-shadow: inset 0 -1px 2px rgba(0,0,0,.3), 0 0 6px rgba(61,165,93,.4);
}

/* Webkit 进度条填充 - TX */
tag-task progress[lv="TX"]::-webkit-progress-value {
  background: linear-gradient(90deg, #1a5276, #2e86c1, #5dade2, #2e86c1);
  border-radius: 3px;
  box-shadow: inset 0 -1px 2px rgba(0,0,0,.3), 0 0 6px rgba(46,134,193,.4);
}

/* Webkit 进度条填充 - 裂隙 */
tag-task progress[lv="裂隙"]::-webkit-progress-value {
  background: linear-gradient(90deg, #6b2020, #c73e39, #ff5e57, #c73e39);
  border-radius: 3px;
  box-shadow: inset 0 -1px 2px rgba(0,0,0,.3), 0 0 8px rgba(199,62,57,.5);
}

/* Firefox 进度条 */
tag-task progress[lv="TE"]::-moz-progress-bar {
  background: linear-gradient(90deg, #8b5a00, #d4952a, #f5c96a, #d4952a);
  border-radius: 3px;
}
tag-task progress[lv="Lv"]::-moz-progress-bar {
  background: linear-gradient(90deg, #2a6b3f, #3da55d, #6bdb8a, #3da55d);
  border-radius: 3px;
}
tag-task progress[lv="TX"]::-moz-progress-bar {
  background: linear-gradient(90deg, #1a5276, #2e86c1, #5dade2, #2e86c1);
  border-radius: 3px;
}
tag-task progress[lv="裂隙"]::-moz-progress-bar {
  background: linear-gradient(90deg, #6b2020, #c73e39, #ff5e57, #c73e39);
  border-radius: 3px;
}

/* 进度条标签名与数值 */
tag-task progress::before {
  content: attr(lv);
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  text-shadow: 0 1px 3px rgba(0,0,0,.9), 0 0 4px rgba(0,0,0,.7);
  z-index: 2;
  pointer-events: none;
  letter-spacing: .5px;
}

tag-task progress::after {
  content: attr(value) " / " attr(max);
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,.9), 0 0 4px rgba(0,0,0,.7);
  z-index: 2;
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}

/* 进度条两列布局（桌面端） */
@media (min-width: 420px) {
  tag-task hd {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 6px 10px;
  }
  tag-task progress {
    flex-basis: auto;
    grid-column: span 1;
  }
  tag-task hd > tag {
    grid-column: span 1;
  }
}

/* ====== 正文区 TEXT ====== */
tag-task text {
  display: block;
  padding: 16px 14px;
  line-height: 1.85;
  color: var(--text);
}

tag-task text p {
  margin: 0 0 12px;
  text-indent: 2em;
}

/* ====== DETAILS / SUMMARY 通用 ====== */
tag-task details {
  border-top: 1px solid rgba(139,109,74,.3);
  background: var(--card);
}

tag-task details[open] {
  background: var(--card2);
}

tag-task summary {
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--gold2);
  cursor: pointer;
  list-style: none;
  position: relative;
  transition: all .25s;
  user-select: none;
}

tag-task summary::-webkit-details-marker {
  display: none;
}

tag-task summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 6px;
  transition: transform .25s;
  font-size: 12px;
}

tag-task details[open] > summary::before {
  transform: rotate(90deg);
}

tag-task summary::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 14px;
  right: 14px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transform: scaleX(0);
  transition: transform .35s;
}

tag-task summary:hover::after {
  transform: scaleX(1);
}

tag-task summary:hover {
  color: #fff;
  background: rgba(212,149,42,.08);
}

tag-task details > p {
  padding: 4px 14px;
  margin: 0;
  font-size: 13px;
  color: var(--text2);
  line-height: 1.7;
}

/* ====== 五级标签系统 ====== */
tag-task tag {
  display: inline-block;
  padding: 2px 8px;
  margin: 2px 3px;
  border-radius: 3px;
  font-size: 13px;
  line-height: 1.5;
  transition: all .3s cubic-bezier(.25,.8,.25,1);
  position: relative;
}

/* Lv.1 表层 - 素朴纸签 */
tag-task group[lv="1"] {
  display: flex;
  flex-wrap: wrap;
  padding: 6px 10px;
  gap: 2px;
}

tag-task group[lv="1"] > tag {
  background: var(--lv1-bg);
  border: 1px dashed var(--lv1-bd);
  color: #c4b49a;
}

tag-task group[lv="1"] > tag:hover {
  background: #4a4235;
  border-color: #a09580;
  box-shadow: 0 2px 8px rgba(122,110,93,.25);
  transform: translateY(-2px);
}

tag-task group[lv="1"]::before {
  content: "Lv.1 ◦ 表层";
  display: block;
  width: 100%;
  font-size: 10px;
  color: var(--lv1-bd);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 2px;
  opacity: .7;
}

/* Lv.2 浅层 - 琥珀铜纹 */
tag-task group[lv="2"] {
  display: flex;
  flex-wrap: wrap;
  padding: 6px 10px;
  gap: 2px;
}

tag-task group[lv="2"] > tag {
  background: linear-gradient(135deg, var(--lv2-bg), #4a3b22);
  border: 1px solid var(--lv2-bd);
  color: #e0c67a;
}

tag-task group[lv="2"] > tag:hover {
  background: linear-gradient(135deg, #4d3c20, #5a4828);
  border-color: var(--gold2);
  box-shadow: 0 0 12px rgba(184,146,46,.35), inset 0 0 6px rgba(184,146,46,.1);
  transform: translateY(-2px);
}

tag-task group[lv="2"]::before {
  content: "Lv.2 ◦ 浅层";
  display: block;
  width: 100%;
  font-size: 10px;
  color: var(--lv2-bd);
  letter-spacing: 1px;
  margin-bottom: 2px;
  opacity: .7;
}

/* Lv.3 核心 - 金铭文 */
tag-task group[lv="3"] {
  display: flex;
  flex-wrap: wrap;
  padding: 6px 10px;
  gap: 2px;
  position: relative;
}

tag-task group[lv="3"] > tag {
  background: linear-gradient(135deg, var(--lv3-bg), #4a3010);
  border: 1px solid var(--lv3-bd);
  color: var(--gold2);
  font-weight: 600;
  text-shadow: 0 0 4px rgba(212,149,42,.3);
}

tag-task group[lv="3"] > tag::before {
  content: "◆";
  margin-right: 3px;
  font-size: 8px;
  opacity: .6;
}

tag-task group[lv="3"] > tag:hover {
  background: linear-gradient(135deg, #5a3a12, #6a4818);
  border-color: var(--gold2);
  box-shadow: 0 0 16px rgba(212,149,42,.4), 0 0 4px rgba(245,201,106,.2);
  transform: translateY(-2px) scale(1.02);
  text-shadow: 0 0 8px rgba(212,149,42,.6);
}

tag-task group[lv="3"]::before {
  content: "Lv.3 ◆ 核心";
  display: block;
  width: 100%;
  font-size: 10px;
  color: var(--lv3-bd);
  letter-spacing: 1px;
  margin-bottom: 2px;
  font-weight: 700;
}

/* Lv.4 深层 - 深红暗金 */
tag-task group[lv="4"] {
  display: flex;
  flex-wrap: wrap;
  padding: 6px 10px;
  gap: 2px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Ccircle cx='20' cy='20' r='18' fill='none' stroke='%23a33' stroke-width='.3' opacity='.2'/%3E%3Cpath d='M20 2v36M2 20h36' stroke='%23a33' stroke-width='.2' opacity='.1'/%3E%3C/svg%3E");
  contain: layout style;
}

tag-task group[lv="4"] > tag {
  background: linear-gradient(135deg, var(--lv4-bg), #451a18);
  border: 2px solid var(--lv4-bd);
  border-left: 3px solid #d44;
  color: #ff9a8a;
  font-weight: 600;
  text-shadow: 0 0 4px rgba(199,62,57,.3);
}

tag-task group[lv="4"] > tag::before {
  content: "◈";
  margin-right: 3px;
  font-size: 9px;
  color: #d44;
}

/* ★ 修复2: lv4-pulse 仅桌面端hover触发，添加 will-change */
tag-task group[lv="4"] > tag:hover {
  background: linear-gradient(135deg, #551a18, #652a28);
  border-color: #d44;
  box-shadow:
    0 0 20px rgba(199,62,57,.4),
    0 0 6px rgba(255,94,87,.2),
    inset 0 0 8px rgba(199,62,57,.15);
  transform: translateY(-2px) scale(1.03);
  will-change: box-shadow;
  animation: lv4-pulse 1.5s ease-in-out infinite;
}

@keyframes lv4-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(199,62,57,.4), 0 0 6px rgba(255,94,87,.2); }
  50% { box-shadow: 0 0 28px rgba(199,62,57,.6), 0 0 10px rgba(255,94,87,.35); }
}

tag-task group[lv="4"]::before {
  content: "Lv.4 ◈ 深层";
  display: block;
  width: 100%;
  font-size: 10px;
  color: var(--lv4-bd);
  letter-spacing: 1px;
  margin-bottom: 2px;
  font-weight: 700;
}

/* Lv.5 根源 - 黑紫裂纹 */
tag-task group[lv="5"] {
  display: flex;
  flex-wrap: wrap;
  padding: 6px 10px;
  gap: 2px;
  background:
    linear-gradient(135deg, rgba(107,63,160,.08), transparent),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cpath d='M10 40 Q25 20 40 40 Q55 60 70 40' fill='none' stroke='%238b2fc7' stroke-width='.6' opacity='.15'/%3E%3Cpath d='M20 10 Q40 30 20 50 Q0 70 20 70' fill='none' stroke='%236b3fa0' stroke-width='.4' opacity='.1'/%3E%3Cpath d='M60 5 L62 35 L50 60' fill='none' stroke='%23c73e39' stroke-width='.3' opacity='.15'/%3E%3C/svg%3E");
  position: relative;
  contain: layout style;
}

/* ★ 修复3: lv5-border 改用 opacity 驱动，GPU合成 */
tag-task group[lv="5"]::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(139,47,199,.5);
  border-radius: 2px;
  pointer-events: none;
  box-shadow: inset 0 0 15px rgba(139,47,199,.1);
  animation: lv5-border 4s ease-in-out infinite;
  will-change: opacity;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

@keyframes lv5-border {
  0%, 100% { opacity: .45; }
  25% { opacity: .7; }
  50% { opacity: 1; }
  75% { opacity: .65; }
}

tag-task group[lv="5"] > tag {
  background: linear-gradient(135deg, var(--lv5-bg), #2a0f25, #1f0a1a);
  border: 1px solid var(--lv5-bd);
  color: #d8a0f0;
  font-weight: 700;
  text-shadow: 0 0 6px rgba(139,47,199,.5);
  position: relative;
}

/* ★ 修复4: lv5-rune 改为仅 opacity 动画 */
tag-task group[lv="5"] > tag::before {
  content: "✦";
  margin-right: 3px;
  font-size: 9px;
  color: #b060e0;
  text-shadow: 0 0 6px #d090ff;
  animation: lv5-rune 2s ease-in-out infinite;
  will-change: opacity;
}

@keyframes lv5-rune {
  0%, 100% { opacity: .5; }
  50% { opacity: 1; }
}

tag-task group[lv="5"] > tag:hover {
  background: linear-gradient(135deg, #2f1030, #3a1540);
  border-color: #b060e0;
  box-shadow:
    0 0 24px rgba(139,47,199,.5),
    0 0 8px rgba(176,96,224,.3);
  transform: translateY(-2px) scale(1.03);
  animation: lv5-shake .15s ease-in-out 3;
}

@keyframes lv5-shake {
  0%, 100% { transform: translateY(-2px) scale(1.03) rotate(0deg); }
  25% { transform: translateY(-2px) scale(1.03) rotate(.5deg); }
  75% { transform: translateY(-2px) scale(1.03) rotate(-.5deg); }
}

tag-task group[lv="5"]::before {
  content: "Lv.5 ✦ 根源";
  display: block;
  width: 100%;
  font-size: 10px;
  color: var(--lv5-bd);
  letter-spacing: 1px;
  margin-bottom: 2px;
  font-weight: 700;
  text-shadow: 0 0 6px rgba(139,47,199,.3);
}

/* ====== WARN 篡改标签 ====== */
/* ★ 修复5（核心）: 将发光脉冲移至 ::after 伪元素，用 opacity 驱动 */
tag-task tag[warn] {
  border-color: var(--danger) !important;
  background: linear-gradient(135deg, #3a1515, #2a0f0f) !important;
  color: var(--danger2) !important;
  box-shadow: 0 0 4px rgba(199,62,57,.3);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

tag-task tag[warn]::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  box-shadow: 0 0 16px rgba(255,94,87,.6), 0 0 4px rgba(199,62,57,.4);
  pointer-events: none;
  opacity: 0;
  animation: warn-flash 1.2s ease-in-out infinite;
  will-change: opacity;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

@keyframes warn-flash {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

tag-task tag[warn]:hover {
  box-shadow: 0 0 20px rgba(255,94,87,.7) !important;
  transform: scale(1.05);
}

tag-task tag[warn]:hover::after {
  animation: none;
  opacity: 0;
}

/* ====== NPC 区块 ====== */
tag-task npc {
  display: block;
  padding: 8px 10px;
  margin: 4px 0;
  border-left: 3px solid var(--bronze);
  transition: border-color .3s;
}

tag-task npc:hover {
  border-left-color: var(--gold);
}

tag-task nm {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--gold2);
  padding: 2px 0 4px;
  position: relative;
}

tag-task nm::after {
  content: "";
  display: block;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width .3s;
  margin-top: 2px;
}

tag-task npc:hover nm::after {
  width: 100%;
}

tag-task npc + npc {
  border-top: 1px solid rgba(139,109,74,.15);
}

/* ====== 记忆区 TABLE ====== */
tag-task table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin: 4px 0;
}

tag-task caption {
  text-align: left;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: .5px;
}

tag-task th {
  background: rgba(212,149,42,.12);
  padding: 5px 8px;
  text-align: left;
  color: var(--gold2);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .5px;
  border-bottom: 1px solid rgba(212,149,42,.25);
}

tag-task td {
  padding: 5px 8px;
  border-bottom: 1px solid rgba(139,109,74,.12);
  color: var(--text2);
  vertical-align: top;
}

tag-task tbody tr:nth-child(even) td {
  background: rgba(212,149,42,.03);
}

tag-task tbody tr {
  transition: background .2s;
}

tag-task tbody tr:hover td {
  background: rgba(212,149,42,.1);
  color: var(--text);
}

/* ====== 行动建议 OL ====== */
tag-task ol {
  list-style: none;
  padding: 4px 14px;
  margin: 0;
  counter-reset: act;
}

tag-task ol li {
  counter-increment: act;
  padding: 6px 8px 6px 28px;
  margin: 2px 0;
  position: relative;
  font-size: 13px;
  color: var(--text2);
  border-radius: 3px;
  transition: all .3s;
  cursor: default;
}

tag-task ol li::before {
  content: counter(act);
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  background: linear-gradient(135deg, var(--gold), var(--amber));
  color: var(--bg);
  font-size: 11px;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .3s;
}

tag-task ol li::after {
  content: "▸";
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%) translateX(-10px);
  opacity: 0;
  color: var(--gold2);
  font-size: 14px;
  font-weight: 700;
  transition: all .3s;
}

tag-task ol li:hover {
  background: rgba(212,149,42,.08);
  color: var(--text);
  padding-left: 34px;
}

tag-task ol li:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

tag-task ol li:hover::before {
  box-shadow: 0 0 8px rgba(212,149,42,.5);
  transform: translateY(-50%) scale(1.1);
}

/* ====== 编辑日志 ====== */
tag-task details:first-of-type > p {
  font-family: "Cascadia Code", "Fira Code", monospace;
  font-size: 12px;
  background: rgba(0,0,0,.2);
  margin: 4px 10px 8px;
  padding: 8px 10px;
  border-radius: 3px;
  border-left: 3px solid var(--amber);
  line-height: 1.7;
}

/* ====== 分隔装饰线 ====== */
tag-task text {
  border-bottom: 1px solid transparent;
  background-image: linear-gradient(var(--card), var(--card)),
    linear-gradient(90deg, transparent 10%, var(--bronze) 30%, var(--gold) 50%, var(--bronze) 70%, transparent 90%);
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

/* ====== 容器四角装饰 ====== */
tag-task::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M0 0L8 0L8 2L2 2L2 8L0 8Z' fill='%23d4952a' opacity='.4'/%3E%3C/svg%3E") no-repeat top left,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M24 0L16 0L16 2L22 2L22 8L24 8Z' fill='%23d4952a' opacity='.4'/%3E%3C/svg%3E") no-repeat top right,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M0 24L8 24L8 22L2 22L2 16L0 16Z' fill='%23d4952a' opacity='.4'/%3E%3C/svg%3E") no-repeat bottom left,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M24 24L16 24L16 22L22 22L22 16L24 16Z' fill='%23d4952a' opacity='.4'/%3E%3C/svg%3E") no-repeat bottom right;
}

/* ====== 移动端优化 ====== */
@media (max-width: 420px) {
  tag-task {
    font-size: 14px;
  }

  tag-task hd {
    padding: 8px 10px;
    gap: 4px 6px;
  }

  tag-task hd > tag {
    font-size: 11px;
    padding: 1px 6px;
  }

  tag-task progress {
    height: 20px;
  }

  tag-task progress::before,
  tag-task progress::after {
    font-size: 10px;
  }

  tag-task text {
    padding: 12px 10px;
    font-size: 14px;
  }

  tag-task tag {
    font-size: 12px;
    padding: 1px 6px;
    margin: 1px 2px;
  }

  tag-task summary {
    padding: 8px 10px;
    font-size: 13px;
  }

  tag-task details > p {
    padding: 3px 10px;
    font-size: 12px;
  }

  tag-task table {
    font-size: 11px;
  }

  tag-task th, tag-task td {
    padding: 4px 5px;
  }

  tag-task ol li {
    font-size: 12px;
    padding: 5px 6px 5px 26px;
  }

  tag-task group[lv="1"],
  tag-task group[lv="2"],
  tag-task group[lv="3"],
  tag-task group[lv="4"],
  tag-task group[lv="5"] {
    padding: 4px 6px;
  }

  /* ★ 修复6: 移动端降频/简化残余动画 */
  tag-task tag[warn]::after {
    animation-duration: 2.4s;
  }

  tag-task group[lv="5"]::after {
    animation-duration: 6s;
  }

  tag-task group[lv="5"] > tag::before {
    animation-duration: 4s;
  }

  tag-task hd::after {
    animation-duration: 5s;
  }

  /* 移动端禁用 hover 触发的脉冲（触屏无真hover） */
  tag-task group[lv="4"] > tag:hover {
    animation: none;
  }

  tag-task group[lv="5"] > tag:hover {
    animation: none;
  }
}

/* ====== 裂隙高值特殊效果 ====== */
tag-task progress[lv="裂隙"] {
  position: relative;
}

tag-task progress[lv="裂隙"]:hover::before {
  color: var(--danger2);
  text-shadow: 0 0 6px rgba(255,94,87,.6);
}

/* ====== details open 动画 ====== */
tag-task details > *:not(summary) {
  animation: fade-in .3s ease;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ====== 滚动条美化 ====== */
tag-task {
  scrollbar-width: thin;
  scrollbar-color: var(--bronze) var(--bg);
}

tag-task::-webkit-scrollbar {
  width: 6px;
}

tag-task::-webkit-scrollbar-track {
  background: var(--bg);
}

tag-task::-webkit-scrollbar-thumb {
  background: var(--bronze);
  border-radius: 3px;
}

tag-task::-webkit-scrollbar-thumb:hover {
  background: var(--gold);
}

/* ====== ★ 修复7: 尊重用户减弱动画偏好 ====== */
@media (prefers-reduced-motion: reduce) {
  tag-task tag[warn]::after,
  tag-task group[lv="5"]::after,
  tag-task group[lv="5"] > tag::before,
  tag-task hd::after {
    animation: none !important;
    opacity: .7;
  }

  tag-task group[lv="4"] > tag:hover,
  tag-task group[lv="5"] > tag:hover {
    animation: none !important;
  }

  tag-task details > *:not(summary) {
    animation: none !important;
  }
}
/* ====== <t> 标签元信息叙事 - 基础 ====== */
tag-task t {
  position: relative;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: var(--bronze);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
  cursor: help;
  transition: text-decoration-color .3s, color .3s;
  display: inline;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

tag-task t:hover {
  text-decoration-style: solid;
  text-decoration-color: var(--gold);
  color: #fff;
}

/* ====== Tooltip 框体（桌面端：相对文字定位） ====== */
tag-task t::after {
  content: attr(mem);
  position: absolute;
  left: 0;
  bottom: calc(100% + 10px);
  background: linear-gradient(145deg, #2e2316 0%, #1a1410 100%);
  border: 1px solid var(--gold);
  color: var(--gold2);
  font-size: 11px;
  font-weight: 400;
  font-style: normal;
  line-height: 1.6;
  padding: 6px 10px;
  border-radius: 5px;
  white-space: pre-wrap;
  max-width: min(320px, 85vw);
  width: max-content;
  z-index: 500;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .2s ease, transform .2s ease;
  box-shadow: 0 6px 24px rgba(0,0,0,.7), 0 0 12px rgba(212,149,42,.12);
  text-decoration: none;
  text-indent: 0;
  text-align: left;
}

tag-task t:hover::after {
  opacity: 1;
  transform: translateY(0);
}

/* ====== 箭头（桌面端：文字上方朝下） ====== */
tag-task t::before {
  content: "";
  position: absolute;
  left: 1em;
  bottom: calc(100% + -2px);
  border: 6px solid transparent;
  border-top-color: var(--gold);
  z-index: 501;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s ease;
}

tag-task t:hover::before {
  opacity: 1;
}

/* ====== 移动端：tooltip 居中但用 absolute 不用 fixed ====== */
@media (max-width: 500px) {
  tag-task text {
    position: relative;
  }
  tag-task t {
    position: relative;
  }
  tag-task t::after {
    position: absolute;
    left: 50%;
    right: auto;
    bottom: calc(100% + 10px);
    top: auto;
    transform: translateX(-50%) translateY(6px);
    max-width: 82vw;
  }
  tag-task t:hover::after {
    transform: translateX(-50%) translateY(0);
  }
  tag-task t::before {
    display: none;
  }
}

/* ====== 移动端长按触发 ====== */
@media (max-width: 500px) {
  tag-task t:active::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* ====== 按 mem 关键词分色 ====== */

/* 标签编辑（含→箭头、TE消耗）- 蓝 */
tag-task t[mem*="→"],
tag-task t[mem*="TE:"] {
  text-decoration-color: #2e86c1;
}
tag-task t[mem*="→"]:hover,
tag-task t[mem*="TE:"]:hover {
  text-decoration-color: #5dade2;
}
tag-task t[mem*="→"]::after,
tag-task t[mem*="TE:"]::after {
  border-color: #2e86c1;
  color: #7ec8e3;
  background: linear-gradient(145deg, #0f1a26, #162230);
}
tag-task t[mem*="→"]::before,
tag-task t[mem*="TE:"]::before {
  border-top-color: #2e86c1;
}

/* 反噬 / 偏移 / 失控 / 扭曲 - 红 wavy */
tag-task t[mem*="反噬"],
tag-task t[mem*="偏移"],
tag-task t[mem*="失控"],
tag-task t[mem*="扭曲"] {
  text-decoration-color: var(--danger);
  text-decoration-style: wavy;
  text-decoration-thickness: 1.5px;
}
tag-task t[mem*="反噬"]:hover,
tag-task t[mem*="偏移"]:hover,
tag-task t[mem*="失控"]:hover,
tag-task t[mem*="扭曲"]:hover {
  text-decoration-color: var(--danger2);
  color: #ffb0a8;
}
tag-task t[mem*="反噬"]::after,
tag-task t[mem*="偏移"]::after,
tag-task t[mem*="失控"]::after,
tag-task t[mem*="扭曲"]::after {
  border-color: var(--danger);
  color: #ff9a8a;
  background: linear-gradient(145deg, #2a1210, #1a0808);
}
tag-task t[mem*="反噬"]::before,
tag-task t[mem*="偏移"]::before,
tag-task t[mem*="失控"]::before,
tag-task t[mem*="扭曲"]::before {
  border-top-color: var(--danger);
}

/* 性格 / 情绪 / 心理 / 心声 - 金 */
tag-task t[mem*="性格"],
tag-task t[mem*="情绪"],
tag-task t[mem*="心理"],
tag-task t[mem*="心声"] {
  text-decoration-color: #c49b2a;
}
tag-task t[mem*="性格"]:hover,
tag-task t[mem*="情绪"]:hover,
tag-task t[mem*="心理"]:hover,
tag-task t[mem*="心声"]:hover {
  text-decoration-color: var(--gold2);
}
tag-task t[mem*="性格"]::after,
tag-task t[mem*="情绪"]::after,
tag-task t[mem*="心理"]::after,
tag-task t[mem*="心声"]::after {
  border-color: var(--gold);
  color: var(--gold2);
}
tag-task t[mem*="性格"]::before,
tag-task t[mem*="情绪"]::before,
tag-task t[mem*="心理"]::before,
tag-task t[mem*="心声"]::before {
  border-top-color: var(--gold);
}

/* 能力 / 技能 / 激活 - 绿 */
tag-task t[mem*="能力"],
tag-task t[mem*="技能"],
tag-task t[mem*="激活"] {
  text-decoration-color: #3da55d;
}
tag-task t[mem*="能力"]:hover,
tag-task t[mem*="技能"]:hover,
tag-task t[mem*="激活"]:hover {
  text-decoration-color: #6bdb8a;
}
tag-task t[mem*="能力"]::after,
tag-task t[mem*="技能"]::after,
tag-task t[mem*="激活"]::after {
  border-color: #3da55d;
  color: #8be8a8;
  background: linear-gradient(145deg, #0e1f14, #0a1a0f);
}
tag-task t[mem*="能力"]::before,
tag-task t[mem*="技能"]::before,
tag-task t[mem*="激活"]::before {
  border-top-color: #3da55d;
}

/* 矛盾 / 冲突 / 困惑 - 紫 dashed */
tag-task t[mem*="矛盾"],
tag-task t[mem*="冲突"],
tag-task t[mem*="困惑"] {
  text-decoration-color: #a855c7;
  text-decoration-style: dashed;
}
tag-task t[mem*="矛盾"]:hover,
tag-task t[mem*="冲突"]:hover,
tag-task t[mem*="困惑"]:hover {
  text-decoration-color: #d090ff;
}
tag-task t[mem*="矛盾"]::after,
tag-task t[mem*="冲突"]::after,
tag-task t[mem*="困惑"]::after {
  border-color: #a855c7;
  color: #d8a0f0;
  background: linear-gradient(145deg, #1f0a2a, #150820);
}
tag-task t[mem*="矛盾"]::before,
tag-task t[mem*="冲突"]::before,
tag-task t[mem*="困惑"]::before {
  border-top-color: #a855c7;
}

/* 外貌 / 身材 / 罩杯 / 身体 / 发色 / 瞳色 - 粉 */
tag-task t[mem*="外貌"],
tag-task t[mem*="身材"],
tag-task t[mem*="罩杯"],
tag-task t[mem*="身体"],
tag-task t[mem*="发色"],
tag-task t[mem*="瞳色"] {
  text-decoration-color: #d4768a;
}
tag-task t[mem*="外貌"]:hover,
tag-task t[mem*="身材"]:hover,
tag-task t[mem*="罩杯"]:hover,
tag-task t[mem*="身体"]:hover,
tag-task t[mem*="发色"]:hover,
tag-task t[mem*="瞳色"]:hover {
  text-decoration-color: #f0a0b8;
}
tag-task t[mem*="外貌"]::after,
tag-task t[mem*="身材"]::after,
tag-task t[mem*="罩杯"]::after,
tag-task t[mem*="身体"]::after,
tag-task t[mem*="发色"]::after,
tag-task t[mem*="瞳色"]::after {
  border-color: #d4768a;
  color: #f0b8c8;
  background: linear-gradient(145deg, #2a1520, #1a0a14);
}
tag-task t[mem*="外貌"]::before,
tag-task t[mem*="身材"]::before,
tag-task t[mem*="罩杯"]::before,
tag-task t[mem*="身体"]::before,
tag-task t[mem*="发色"]::before,
tag-task t[mem*="瞳色"]::before {
  border-top-color: #d4768a;
}

/* 好感 / 关系 - 珊瑚橙 */
tag-task t[mem*="好感"],
tag-task t[mem*="关系"] {
  text-decoration-color: #e07a5f;
}
tag-task t[mem*="好感"]:hover,
tag-task t[mem*="关系"]:hover {
  text-decoration-color: #f4a48a;
}
tag-task t[mem*="好感"]::after,
tag-task t[mem*="关系"]::after {
  border-color: #e07a5f;
  color: #f4b8a0;
  background: linear-gradient(145deg, #2a1812, #1a100a);
}
tag-task t[mem*="好感"]::before,
tag-task t[mem*="关系"]::before {
  border-top-color: #e07a5f;
}

/* 种族 / 职业 / 阵营 - 灰蓝 */
tag-task t[mem*="种族"],
tag-task t[mem*="职业"],
tag-task t[mem*="阵营"] {
  text-decoration-color: #6b8fa8;
}
tag-task t[mem*="种族"]:hover,
tag-task t[mem*="职业"]:hover,
tag-task t[mem*="阵营"]:hover {
  text-decoration-color: #a0c8e0;
}
tag-task t[mem*="种族"]::after,
tag-task t[mem*="职业"]::after,
tag-task t[mem*="阵营"]::after {
  border-color: #6b8fa8;
  color: #b0d0e8;
  background: linear-gradient(145deg, #121a22, #0a1218);
}
tag-task t[mem*="种族"]::before,
tag-task t[mem*="职业"]::before,
tag-task t[mem*="阵营"]::before {
  border-top-color: #6b8fa8;
}

/* ====== 反噬下划线微动 ====== */
@keyframes wavy-shift {
  0%, 100% { text-underline-offset: 3px; }
  50% { text-underline-offset: 5px; }
}

tag-task t[mem*="反噬"],
tag-task t[mem*="失控"] {
  animation: wavy-shift 2s ease-in-out infinite;
}

/* ---------- 顶部栏 ---------- */
.sticky.w-full.top-0.flex.items-center {
  background: linear-gradient(135deg, #1a1208 0%, #2a1f0a 40%, #352810 100%) !important;
  border-bottom: 2px solid rgba(218, 165, 32, 0.35) !important;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.5) !important;
  transition: box-shadow 0.3s ease !important;
}

.sticky.w-full.top-0.flex.items-center:hover {
  box-shadow: 0 4px 24px rgba(218, 165, 32, 0.2) !important;
}

/* 模型选择器 */
#ai-model-selector .group.flex.items-center {
  background: rgba(218, 165, 32, 0.1) !important;
  border: 1px solid rgba(218, 165, 32, 0.3) !important;
  border-radius: 8px !important;
  padding: 4px 10px !important;
  transition: all 0.3s ease !important;
}

#ai-model-selector .group.flex.items-center:hover {
  background: rgba(218, 165, 32, 0.2) !important;
  border-color: rgba(218, 165, 32, 0.55) !important;
}

#ai-model-selector .truncate.text-\[13px\] {
  color: #f0d68a !important;
  font-weight: 600 !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4) !important;
}

#ai-model-selector .shrink-0.flex.items-center svg {
  color: #e0c06a !important;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3)) !important;
  transition: transform 0.3s ease !important;
}

#ai-model-selector .group.flex.items-center:hover svg {
  transform: translateY(1px) !important;
}

/* 顶部栏图标 */
.sticky.w-full.top-0 svg.lucide-clock-8,
.sticky.w-full.top-0 svg:has(use[href="#icon-icon-set"]),
.sticky.w-full.top-0 button.MuiIconButton-root svg.lucide-music-2 {
  color: #e0c06a !important;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3)) !important;
  transition: transform 0.25s ease !important;
}

.sticky.w-full.top-0 svg.lucide-clock-8:hover,
.sticky.w-full.top-0 svg:has(use[href="#icon-icon-set"]):hover {
  transform: scale(1.12) !important;
  color: #f5d76e !important;
}

/* 历史记录角标 */
.sticky.w-full.top-0 span.MuiBadge-dot.md\:hidden {
  background-color: #daa520 !important;
  box-shadow: 0 0 8px rgba(218, 165, 32, 0.7) !important;
}

/* 设置按钮 */
#header-setting-button {
  color: #e0c06a !important;
  transition: transform 0.3s ease !important;
}

#header-setting-button:hover {
  transform: rotate(30deg) !important;
}

#header-setting-button svg {
  color: #e0c06a !important;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3)) !important;
}

/* ---------- 开场白选择器 ---------- */
div.flex.items-center.h-9.bg-white.rounded-md.cursor-pointer.group[class*="border-gray"] {
  background: linear-gradient(135deg, #1e1710, #2a1f0e) !important;
  border: 1.5px solid rgba(218, 165, 32, 0.4) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
  transition: all 0.3s ease !important;
}

div.flex.items-center.h-9.bg-white.rounded-md.cursor-pointer.group[class*="border-gray"]:hover {
  border-color: #daa520 !important;
  box-shadow: 0 4px 16px rgba(218, 165, 32, 0.2) !important;
  transform: translateY(-1px) !important;
}

div.flex.items-center.h-9.cursor-pointer.group svg[data-icon="SlidersH"],
div.flex.items-center.h-9.cursor-pointer.group svg[data-icon="ChevronDown"] {
  color: #d4a838 !important;
  transition: transform 0.3s ease !important;
}

div.flex.items-center.h-9.cursor-pointer.group:hover svg[data-icon="ChevronDown"] {
  transform: translateY(2px) !important;
}

div.flex.items-center.h-9.cursor-pointer.group:hover svg[data-icon="SlidersH"] {
  transform: rotate(15deg) !important;
}

/* ---------- 按钮栏 ---------- */
#ai-mod-button2 {
  background: rgba(26, 18, 8, 0.6) !important;
  border-radius: 10px !important;
  padding: 6px !important;
}

#ai-mod-button2 button.MuiButton-root {
  background: linear-gradient(135deg, #3a2a0e, #4a350f) !important;
  color: #f0d68a !important;
  border: 1px solid rgba(218, 165, 32, 0.3) !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
  transition: all 0.3s ease !important;
}

#ai-mod-button2 button.MuiButton-root:hover {
  background: linear-gradient(135deg, #4a350f, #5a4212) !important;
  color: #ffe4a0 !important;
  border-color: rgba(218, 165, 32, 0.6) !important;
  box-shadow: 0 4px 16px rgba(218, 165, 32, 0.2) !important;
  transform: translateY(-2px) !important;
}

#ai-mod-button2 button.MuiButton-root:active {
  transform: translateY(0px) !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4) !important;
}

#ai-mod-button2 button.MuiButton-root svg {
  color: inherit !important;
  transition: transform 0.3s ease !important;
}

#ai-mod-button2 button.MuiButton-root:hover svg {
  transform: scale(1.15) !important;
}

/* ---------- 底部栏 ---------- */
.bg-gradient-to-t {
  background: linear-gradient(to top, #14100a 0%, rgba(20, 16, 10, 0.9) 60%, transparent 100%) !important;
}

#ai-chat-bottom-input {
  background: linear-gradient(135deg, #1e1710, #251c0e) !important;
  border: 2px solid rgba(218, 165, 32, 0.35) !important;
  border-radius: 14px !important;
  box-shadow: 0 3px 18px rgba(0, 0, 0, 0.4) !important;
  transition: all 0.3s ease !important;
}

#ai-chat-bottom-input:focus-within {
  border-color: #daa520 !important;
  box-shadow: 0 4px 24px rgba(218, 165, 32, 0.15), 0 0 0 3px rgba(218, 165, 32, 0.08) !important;
}

#ai-chat-input {
  color: #f0e0b8 !important;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif !important;
  caret-color: #daa520 !important;
}

#ai-chat-input::placeholder {
  color: #7a6530 !important;
  font-style: italic !important;
}

#ai-chat-input::selection {
  background: rgba(218, 165, 32, 0.35) !important;
  color: #fff !important;
}

/* ---------- 分页栏 ---------- */
.MuiPaginationItem-root {
  color: #d4a838 !important;
  border-color: rgba(218, 165, 32, 0.3) !important;
  background: rgba(30, 23, 12, 0.8) !important;
  transition: all 0.25s ease !important;
}

.MuiPaginationItem-root:hover {
  background: rgba(218, 165, 32, 0.12) !important;
  color: #f0d68a !important;
  border-color: rgba(218, 165, 32, 0.5) !important;
}

.MuiPaginationItem-root.Mui-selected {
  background: linear-gradient(135deg, #8b6914, #a67c1a) !important;
  color: #fff !important;
  border-color: #b8860b !important;
  box-shadow: 0 2px 10px rgba(218, 165, 32, 0.3) !important;
  font-weight: 700 !important;
}

.MuiPaginationItem-root.Mui-disabled {
  color: #5a4a25 !important;
  opacity: 0.5 !important;
}

.MuiPaginationItem-icon {
  color: #d4a838 !important;
}

.MuiStack-root.css-1uwir8f {
  color: #c4a44a !important;
}

.MuiStack-root.css-1uwir8f .MuiBox-root {
  color: #c4a44a !important;
}

.MuiInputBase-input {
  color: #f0d68a !important;
  border-color: rgba(218, 165, 32, 0.3) !important;
  background: #1e1710 !important;
}

/* ---------- 评论区 ---------- */
div[class*="w-full"][class*="bg-white"][class*="bottom-0"] {
  background: linear-gradient(180deg, #18120a 0%, #1e1610 100%) !important;
}

/* 顶部标题 */
div.text-lg.font-bold {
  color: #f0d68a !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5) !important;
}

div.text-lg.font-bold::before {
  content: "✦ " !important;
  color: #daa520 !important;
  filter: drop-shadow(0 0 4px rgba(218, 165, 32, 0.5)) !important;
}

/* 个人评分文字 */
p.MuiTypography-body1.text-grey-600 {
  color: #c4a44a !important;
}

/* 评分星星 */
span.MuiRating-iconEmpty svg {
  color: #4a3a1a !important;
  transition: transform 0.2s ease !important;
}

span.MuiRating-iconEmpty svg:hover {
  transform: scale(1.2) !important;
  color: #6a5428 !important;
}

span.MuiRating-iconFilled svg {
  color: #daa520 !important;
  filter: drop-shadow(0 0 6px rgba(218, 165, 32, 0.6)) !important;
}

/* 评分数字 */
span.text-orange-500 {
  color: #f0c45a !important;
  font-weight: 700 !important;
}

/* 评分容器 */
span.MuiRating-root {
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3)) !important;
}

/* 评论输入框容器 */
div.flex.flex-col.border-gray-200 {
  border-color: rgba(218, 165, 32, 0.25) !important;
}

/* 评论输入框 */
textarea.rc-textarea {
  background: #1a1408 !important;
  color: #f0e0b8 !important;
  border-color: rgba(218, 165, 32, 0.3) !important;
  border-radius: 8px !important;
  transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif !important;
}

textarea.rc-textarea:focus {
  border-color: #daa520 !important;
  box-shadow: 0 0 0 3px rgba(218, 165, 32, 0.1) !important;
}

/* 字数统计 */
div.bg-gray-100.text-gray-500 {
  background: rgba(218, 165, 32, 0.06) !important;
  color: #8a7430 !important;
}

/* 发送评论按钮 */
div.cursor-pointer.group.flex.items-center.justify-center {
  transition: all 0.3s ease !important;
}

div.cursor-pointer.group.flex.items-center.justify-center:hover {
  transform: scale(1.08) !important;
}

div[data-state="closed"] svg[data-icon="Send03"] {
  color: #daa520 !important;
  filter: drop-shadow(0 0 5px rgba(218, 165, 32, 0.4)) !important;
  transition: transform 0.3s ease !important;
}

div.cursor-pointer.group.flex.items-center.justify-center:hover svg[data-icon="Send03"] {
  transform: translateX(2px) !important;
  color: #f0d068 !important;
}

/* 分割线 */
div.style_divider__mW0YX {
  background: linear-gradient(to right, transparent, rgba(218, 165, 32, 0.35), transparent) !important;
}

/* 排序按钮容器 */
.MuiStack-root.css-1dmzxoz {
  background: transparent !important;
}

/* 排序按钮(已选中) */
button.MuiButton-containedPrimary {
  background: linear-gradient(135deg, #8b6914, #a67c1a) !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  transition: all 0.25s ease !important;
}

button.MuiButton-containedPrimary:hover {
  background: linear-gradient(135deg, #a67c1a, #b8860b) !important;
  box-shadow: 0 3px 12px rgba(218, 165, 32, 0.25) !important;
}

/* 排序按钮(未选中) */
button.MuiButton-outlinedPrimary {
  color: #c4a44a !important;
  border-color: rgba(218, 165, 32, 0.3) !important;
  background: rgba(218, 165, 32, 0.05) !important;
  border-radius: 8px !important;
  transition: all 0.25s ease !important;
}

button.MuiButton-outlinedPrimary:hover {
  background: rgba(218, 165, 32, 0.12) !important;
  border-color: rgba(218, 165, 32, 0.5) !important;
  color: #f0d68a !important;
}

/* 评论列表 */
div.p-3.overflow-y-auto {
  scrollbar-width: thin !important;
  scrollbar-color: #5a4212 #1a1408 !important;
}

/* 评论项 */
div.group.ml-0 {
  border-radius: 10px !important;
  transition: background 0.25s ease !important;
}

div.group.ml-0:hover {
  background: rgba(218, 165, 32, 0.05) !important;
}

/* 用户头像 */
div.group img.rounded-full {
  border: 2px solid rgba(218, 165, 32, 0.45) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

div.group img.rounded-full:hover {
  transform: scale(1.1) !important;
  box-shadow: 0 3px 14px rgba(218, 165, 32, 0.3) !important;
  border-color: #daa520 !important;
}

/* 用户名 */
div.text-sm.text-grey-600 span.font-bold {
  color: #e8c868 !important;
}

/* "（你）"标签 */
span.text-\[10px\] {
  color: #daa520 !important;
  background: rgba(218, 165, 32, 0.12) !important;
  border-radius: 4px !important;
  padding: 1px 4px !important;
  border: 1px solid rgba(218, 165, 32, 0.2) !important;
}

/* 评论内容 */
div.break-all {
  color: #e0d0a8 !important;
  line-height: 1.6 !important;
}

/* 时间戳 */
div.text-xs.text-grey-600 {
  color: #7a6a3a !important;
}

/* 点赞按钮 */
button.text-gray-400 {
  color: #6a5828 !important;
  transition: all 0.25s ease !important;
}

button.text-gray-400:hover {
  color: #daa520 !important;
}

button.text-gray-400 svg {
  transition: transform 0.25s ease !important;
}

button.text-gray-400:hover svg {
  transform: scale(1.2) !important;
}

/* 回复文字 */
span.cursor-pointer {
  color: #c4a44a !important;
  transition: color 0.2s ease !important;
}

span.cursor-pointer:hover {
  color: #f0d68a !important;
  text-decoration: underline !important;
}

/* 回复区域边框 */
div.ml-8.border-l {
  border-color: rgba(218, 165, 32, 0.2) !important;
}
@keyframes darkGoldGlow {
  0%, 100% { border-bottom-color: rgba(218, 165, 32, 0.25); }
  50% { border-bottom-color: rgba(218, 165, 32, 0.55); }
}

.sticky.w-full.top-0.flex.items-center {
  animation: darkGoldGlow 4s ease-in-out infinite !important;
}

/* 🔸 填充星星闪烁 */
@keyframes starGlow {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(218, 165, 32, 0.4)); }
  50% { filter: drop-shadow(0 0 10px rgba(218, 165, 32, 0.8)); }
}

span.MuiRating-iconFilled svg {
  animation: starGlow 2.5s ease-in-out infinite !important;
}

/* 🔸 输入框聚焦金边呼吸 */
@keyframes darkGoldPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(218, 165, 32, 0.06); }
  50% { box-shadow: 0 0 0 5px rgba(218, 165, 32, 0.14); }
}

#ai-chat-bottom-input:focus-within {
  animation: darkGoldPulse 2.5s ease-in-out infinite !important;
}

/* 🔸 发送图标持续微弱辉光 */
div[data-state="closed"] svg[data-icon="Send03"] {
  animation: starGlow 3s ease-in-out infinite !important;
}