/* ============ NTL档案 · 神秘黄页风格 ============ */
ai {
  display: block;
  max-width: 100%;
  margin: 8px 0;
  padding: 14px 12px 18px;
  font-family: "Georgia", "Times New Roman", "STSong", serif;
  font-size: 14px;
  line-height: 1.65;
  color: #2b2418;
  background:
    radial-gradient(ellipse at top left, rgba(180,120,40,.15), transparent 60%),
    radial-gradient(ellipse at bottom right, rgba(139,69,19,.12), transparent 55%),
    repeating-linear-gradient(0deg, rgba(120,80,30,.04) 0 2px, transparent 2px 4px),
    linear-gradient(135deg, #f4e4c1 0%, #ecd6a8 50%, #e8cf9a 100%);
  border: 1px solid #8b6f3d;
  border-radius: 4px;
  box-shadow:
    inset 0 0 60px rgba(139,69,19,.18),
    inset 0 0 8px rgba(101,67,33,.25),
    0 4px 14px rgba(0,0,0,.25);
  position: relative;
  overflow: hidden;
  animation: fadeInDoc 0.8s ease-out;
}

@keyframes fadeInDoc {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* 做旧纸张污渍/褶皱 */
ai::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 25%, rgba(101,67,33,.18) 0, transparent 8%),
    radial-gradient(circle at 85% 60%, rgba(139,69,19,.15) 0, transparent 12%),
    radial-gradient(circle at 50% 90%, rgba(101,67,33,.12) 0, transparent 10%),
    radial-gradient(circle at 92% 12%, rgba(120,80,30,.2) 0, transparent 5%);
  opacity: .8;
  z-index: 0;
  animation: stainPulse 8s ease-in-out infinite;
}

@keyframes stainPulse {
  0%, 100% { opacity: .8; }
  50% { opacity: .65; }
}

/* 机密水印 */
ai::after {
  content: "TOP SECRET";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%) rotate(-30deg);
  font-family: "Impact", "Arial Black", sans-serif;
  font-size: 72px;
  font-weight: 900;
  letter-spacing: 8px;
  color: rgba(196,30,58,.06);
  pointer-events: none;
  z-index: 0;
  white-space: nowrap;
  animation: watermarkFloat 20s linear infinite;
}

@keyframes watermarkFloat {
  0% { transform: translate(-50%,-50%) rotate(-30deg); }
  50% { transform: translate(-48%,-52%) rotate(-28deg); }
  100% { transform: translate(-50%,-50%) rotate(-30deg); }
}

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

/* ============ 顶部档案头 ============ */
ai .top {
  display: block;
  text-align: center;
  padding: 14px 10px 18px;
  margin-bottom: 16px;
  border-bottom: 3px double #8b4513;
  position: relative;
  animation: slideDown 0.6s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

ai .top h1 {
  font-family: "Impact", "Arial Black", "STKaiti", serif;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 4px;
  color: #2b1810;
  margin: 0;
  text-shadow: 1px 1px 0 rgba(139,69,19,.3);
  animation: titleGlow 3s ease-in-out infinite;
}

@keyframes titleGlow {
  0%, 100% { text-shadow: 1px 1px 0 rgba(139,69,19,.3); }
  50% { text-shadow: 1px 1px 4px rgba(139,69,19,.5), 0 0 8px rgba(196,30,58,.2); }
}

ai .top h1 small {
  display: block;
  font-size: 12px;
  letter-spacing: 4px;
  word-spacing: 2px;
  color: #8b4513;
  margin-top: 4px;
  font-weight: normal;
}

ai .top .stamp {
  display: inline-block;
  position: absolute;
  top: 6px;
  right: 8px;
  padding: 4px 10px;
  font-family: "Impact", sans-serif;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #c41e3a;
  border: 2px solid #c41e3a;
  border-radius: 2px;
  transform: rotate(8deg);
  opacity: .75;
  background: rgba(255,240,230,.3);
  text-shadow: 0 0 1px rgba(196,30,58,.5);
  animation: stampBounce 0.8s ease-out 0.3s backwards, stampPulse 4s ease-in-out 1.1s infinite;
}

@keyframes stampBounce {
  0% {
    opacity: 0;
    transform: rotate(8deg) scale(0) translateY(-50px);
  }
  60% {
    transform: rotate(8deg) scale(1.15) translateY(0);
  }
  100% {
    opacity: .75;
    transform: rotate(8deg) scale(1) translateY(0);
  }
}

@keyframes stampPulse {
  0%, 100% { transform: rotate(8deg) scale(1); }
  50% { transform: rotate(6deg) scale(1.05); }
}

ai .top::after {
  content: "★ CASE FILE ★";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: #f4e4c1;
  padding: 0 12px;
  font-size: 10px;
  letter-spacing: 3px;
  color: #8b4513;
  animation: badgeShine 5s ease-in-out infinite;
}

@keyframes badgeShine {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.2); }
}

/* ============ details 通用样式 ============ */
ai details {
  margin: 14px 0;
  padding: 0;
  background: rgba(255,248,225,.55);
  border: 1px solid #a08050;
  border-radius: 3px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.4),
    0 2px 6px rgba(0,0,0,.15);
  position: relative;
  overflow: visible;
  animation: detailsFadeIn 0.5s ease-out backwards;
}

ai details:nth-of-type(1) { animation-delay: 0.1s; }
ai details:nth-of-type(2) { animation-delay: 0.2s; }
ai details:nth-of-type(3) { animation-delay: 0.3s; }
ai details:nth-of-type(4) { animation-delay: 0.4s; }
ai details:nth-of-type(5) { animation-delay: 0.5s; }
ai details:nth-of-type(6) { animation-delay: 0.6s; }
ai details:nth-of-type(7) { animation-delay: 0.7s; }

@keyframes detailsFadeIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

ai details summary {
  cursor: pointer;
  padding: 10px 14px;
  font-family: "Impact", "STKaiti", sans-serif;
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 2px;
  color: #2b1810;
  background: linear-gradient(180deg, rgba(212,160,23,.25), rgba(180,120,40,.15));
  border-bottom: 1px dashed #8b6f3d;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
  position: relative;
  border-radius: 3px 3px 0 0;
  transition: all 0.3s ease;
}

ai details summary:hover {
  background: linear-gradient(180deg, rgba(212,160,23,.35), rgba(180,120,40,.25));
  box-shadow: inset 0 0 10px rgba(139,69,19,.15);
  transform: translateX(2px);
}

ai details summary::-webkit-details-marker { display: none; }

ai details summary::before {
  content: "▶";
  font-size: 10px;
  color: #8b4513;
  transition: transform .3s ease;
  margin-right: 2px;
}

ai details[open] > summary::before { 
  transform: rotate(90deg);
  animation: arrowBounce 0.5s ease-out;
}

@keyframes arrowBounce {
  0% { transform: rotate(0deg); }
  60% { transform: rotate(100deg); }
  100% { transform: rotate(90deg); }
}

ai details[open] > summary {
  border-bottom: 2px solid #8b4513;
  background: linear-gradient(180deg, rgba(212,160,23,.4), rgba(180,120,40,.2));
}

ai details summary i {
  font-style: normal;
  font-size: 18px;
  filter: sepia(.3);
  animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

ai details summary span {
  margin-left: auto;
}

/* details 展开内容动画 */
ai details[open] > *:not(summary) {
  animation: contentSlideDown 0.4s ease-out;
}

@keyframes contentSlideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* details 内容公共内边距 */
ai details > *:not(summary) {
  padding: 0 14px;
}
ai details > *:not(summary):first-of-type { padding-top: 12px; }
ai details > *:not(summary):last-child { padding-bottom: 12px; }

/* ============ 通用 dl 键值表 ============ */
ai dl {
  display: grid;
  grid-template-columns: 5.5em 1fr;
  gap: 8px 14px;
  align-items: start;
  margin: 8px 0;
}

ai dt {
  font-weight: bold;
  color: #6b3410;
  font-family: "STKaiti", "Georgia", serif;
  border-right: 2px solid #c4a060;
  padding: 2px 10px 2px 0;
  text-align: right;
  font-size: 13px;
  letter-spacing: 1px;
  position: relative;
  line-height: 1.6;
  word-break: break-all;
  white-space: normal;
  align-self: start;
  transition: all 0.25s ease;
}

ai dt:hover {
  color: #8b0000;
  border-right-color: #c41e3a;
  transform: translateX(-2px);
}

ai dt::after {
  content: "›";
  position: absolute;
  right: -2px;
  top: 50%;
  transform: translateY(-50%);
  color: #8b4513;
  font-weight: bold;
  transition: all 0.25s ease;
}

ai dt:hover::after {
  color: #c41e3a;
  right: -4px;
}

ai dd {
  margin: 0;
  color: #2b1810;
  font-size: 13px;
  line-height: 1.7;
  padding: 2px 0;
  word-break: break-word;
  align-self: start;
}

ai dd p {
  margin: 4px 0;
}
ai dd p:first-child { margin-top: 0; }
ai dd p:last-child { margin-bottom: 0; }

/* ============ 当前情况 - 紧急档案袋 ============ */
ai .sit {
  border: 2px solid #c41e3a;
  background:
    repeating-linear-gradient(45deg,
      rgba(196,30,58,.05) 0 10px,
      transparent 10px 20px),
    rgba(255,248,225,.7);
  position: relative;
}

ai .sit::before {
  content: "";
  position: absolute;
  top: -1px; left: -1px; right: -1px;
  height: 6px;
  background: repeating-linear-gradient(90deg,
    #c41e3a 0 12px,
    #2b1810 12px 24px);
  animation: tapeScroll 2s linear infinite;
}

@keyframes tapeScroll {
  from { background-position: 0 0; }
  to { background-position: 24px 0; }
}

ai .sit summary {
  background: linear-gradient(180deg, rgba(196,30,58,.2), rgba(196,30,58,.08));
  color: #8b0000;
  padding-top: 14px;
}

ai .sit .tag {
  background: #c41e3a;
  color: #fff;
  padding: 2px 8px;
  font-size: 10px;
  letter-spacing: 2px;
  border-radius: 2px;
  font-family: "Impact", sans-serif;
  animation: urgentBlink 2s infinite;
  box-shadow: 0 0 8px rgba(196,30,58,.5);
}

@keyframes urgentBlink {
  0%, 100% { 
    opacity: 1; 
    box-shadow: 0 0 8px rgba(196,30,58,.5);
  }
  50% { 
    opacity: .55; 
    box-shadow: 0 0 15px rgba(196,30,58,.8);
  }
}

ai .sit dl {
  grid-template-columns: 4em 1fr;
}

/* ============ 正文 ============ */
ai .story {
  margin: 16px 4px;
  padding: 14px 16px;
  background:
    linear-gradient(180deg, rgba(255,248,225,.6), rgba(245,230,195,.5));
  border-left: 4px solid #8b4513;
  border-right: 1px solid #c4a060;
  font-family: "STKaiti", "Georgia", serif;
  font-size: 15px;
  line-height: 1.85;
  color: #2b1810;
  text-indent: 2em;
  box-shadow: inset 0 0 20px rgba(139,69,19,.08);
  position: relative;
  animation: storyFadeIn 0.8s ease-out 0.4s backwards;
}

@keyframes storyFadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

ai .story::before {
  content: "❝";
  position: absolute;
  top: -4px;
  left: 8px;
  font-size: 36px;
  color: rgba(139,69,19,.3);
  font-family: serif;
  animation: quoteFloat 4s ease-in-out infinite;
}

@keyframes quoteFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-3px) rotate(-2deg); }
}

ai .story p { margin: 8px 0; }
ai .story p:first-child { margin-top: 0; }

/* ============ 主角信息 - 身份卡 ============ */
ai .hero {
  background:
    linear-gradient(135deg, rgba(255,248,225,.7), rgba(232,207,154,.5));
  border: 1px solid #8b6f3d;
}

ai .hero summary {
  background: linear-gradient(180deg, rgba(70,90,120,.18), rgba(50,70,100,.1));
  color: #2b3850;
}

ai .hero .clip {
  width: 30px;
  height: 50px;
  background: linear-gradient(180deg, #b0b0b0, #888);
  border-radius: 12px 12px 4px 4px;
  position: absolute;
  top: -16px;
  right: 18px;
  box-shadow:
    inset 2px 0 3px rgba(255,255,255,.4),
    inset -2px 0 3px rgba(0,0,0,.3),
    2px 3px 5px rgba(0,0,0,.3);
  animation: clipShake 5s ease-in-out infinite;
}

@keyframes clipShake {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-1deg); }
  75% { transform: rotate(1deg); }
}

ai .hero .clip::before {
  content: "";
  position: absolute;
  inset: 4px 6px 8px 6px;
  border: 2px solid #666;
  border-radius: 8px 8px 2px 2px;
}

ai .hero dl {
  grid-template-columns: 5em 1fr;
}

/* ============ NPC信息 - 目标档案 ============ */
ai .npc {
  background:
    linear-gradient(135deg, rgba(255,240,235,.6), rgba(245,220,200,.5));
  border-left: 4px solid #c41e3a;
}

ai .npc summary {
  background: linear-gradient(180deg, rgba(196,30,58,.15), rgba(139,0,0,.08));
  color: #8b0000;
}

ai .npc .tab {
  background: linear-gradient(180deg, #c41e3a, #8b0000);
  color: #fff;
  padding: 3px 10px;
  font-size: 10px;
  letter-spacing: 3px;
  font-family: "Impact", sans-serif;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
  animation: targetPulse 3s ease-in-out infinite;
}

@keyframes targetPulse {
  0%, 100% { 
    box-shadow: 0 1px 3px rgba(0,0,0,.3);
    transform: scale(1);
  }
  50% { 
    box-shadow: 0 2px 8px rgba(196,30,58,.6);
    transform: scale(1.05);
  }
}

ai .npc .prof {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  margin: 10px 0;
  padding: 10px;
  background: rgba(255,248,225,.5);
  border: 1px dashed #a08050;
  border-radius: 3px;
  position: relative;
}

ai .npc .prof::before {
  content: "PHOTO";
  position: absolute;
  top: -10px;
  left: 10px;
  background: #f4e4c1;
  padding: 0 6px;
  font-size: 10px;
  letter-spacing: 3px;
  color: #8b4513;
  font-family: "Impact", sans-serif;
  animation: photoLabelGlow 4s ease-in-out infinite;
}

@keyframes photoLabelGlow {
  0%, 100% { text-shadow: none; }
  50% { text-shadow: 0 0 4px rgba(139,69,19,.5); }
}

ai .npc .prof img {
  width: 100%;
  max-width: 280px;
  height: auto;
  aspect-ratio: 3 / 4;
  margin: 0 auto;
  display: block;
  object-fit: cover;
  border: 4px solid #fff;
  box-shadow:
    0 0 0 1px #8b4513,
    0 0 0 6px rgba(255,248,225,.6),
    0 0 0 7px #8b4513,
    4px 6px 14px rgba(0,0,0,.4);
  filter: sepia(.18) contrast(1.05) saturate(1.05);
  transition: all 0.4s ease;
  animation: photoReveal 1s ease-out 0.5s backwards;
}

@keyframes photoReveal {
  from {
    opacity: 0;
    transform: scale(0.9) rotateY(15deg);
    filter: sepia(.18) contrast(1.05) saturate(1.05) blur(4px);
  }
  to {
    opacity: 1;
    transform: scale(1) rotateY(0deg);
    filter: sepia(.18) contrast(1.05) saturate(1.05) blur(0);
  }
}

ai .npc .prof img:hover {
  transform: scale(1.02);
  box-shadow:
    0 0 0 1px #c41e3a,
    0 0 0 6px rgba(255,248,225,.8),
    0 0 0 7px #c41e3a,
    6px 8px 20px rgba(196,30,58,.4);
  filter: sepia(.1) contrast(1.08) saturate(1.1);
}

ai .npc .prof dl {
  flex: 1;
  margin: 0;
  font-size: 13px;
  gap: 6px 12px;
}

ai .npc .prof dt,
ai .npc .prof dd { font-size: 13px; }

ai .npc .body {
  display: block;
  background: rgba(255,250,235,.5);
  padding: 12px;
  border: 1px solid #c4a060;
  border-radius: 3px;
  margin-top: 12px;
  position: relative;
}

ai .npc .body::before {
  content: "▌身体档案 BODY DOSSIER";
  display: block;
  font-family: "Impact", "STKaiti", sans-serif;
  font-size: 12px;
  letter-spacing: 3px;
  color: #c41e3a;
  border-bottom: 1px dashed #c41e3a;
  padding-bottom: 4px;
  margin-bottom: 8px;
  animation: sectionTitleSlide 0.6s ease-out;
}

@keyframes sectionTitleSlide {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

ai .npc .body dt {
  display: block;
  width: 100%;
  border-right: none;
  border-bottom: 1px dashed #c41e3a;
  padding: 6px 0 3px;
  margin-top: 8px;
  text-align: left;
  font-size: 13px;
  letter-spacing: 2px;
  color: #8b0000;
  transition: all 0.3s ease;
}

ai .npc .body dt:hover {
  color: #c41e3a;
  border-bottom-color: #8b0000;
  padding-left: 4px;
}

ai .npc .body dt::after {
  content: " ▸";
  color: #c41e3a;
  position: static;
  transform: none;
  transition: all 0.3s ease;
}

ai .npc .body dt:hover::after {
  content: " ▸▸";
}

ai .npc .body dd {
  display: block;
  margin: 4px 0 8px;
  padding-left: 12px;
  border-left: 2px solid rgba(196,30,58,.25);
  transition: all 0.3s ease;
}

ai .npc .body dd:hover {
  border-left-color: rgba(196,30,58,.6);
  padding-left: 16px;
  background: rgba(196,30,58,.03);
}

ai .npc .body dd p {
  margin: 4px 0;
  padding-left: 10px;
  border-left: 2px solid rgba(196,30,58,.3);
  font-size: 12.5px;
  line-height: 1.7;
}

ai .npc .body dd b {
  color: #8b0000;
  font-family: "STKaiti", serif;
  letter-spacing: 1px;
}

ai .npc hr {
  border: none;
  border-top: 2px dashed #8b4513;
  margin: 14px 0;
  position: relative;
  animation: hrExpand 0.8s ease-out;
}

@keyframes hrExpand {
  from {
    transform: scaleX(0);
    opacity: 0;
  }
  to {
    transform: scaleX(1);
    opacity: 1;
  }
}

ai .npc hr::after {
  content: "✦ 丈夫档案 HUSBAND ✦";
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: #f4e4c1;
  padding: 0 10px;
  font-size: 11px;
  letter-spacing: 3px;
  color: #6b3410;
  font-family: "Impact", sans-serif;
  animation: labelFadeIn 0.6s ease-out 0.4s backwards;
}

@keyframes labelFadeIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

ai .npc .husb {
  background: rgba(70,90,120,.08);
  padding: 10px;
  border-left: 3px solid #4a5f7a;
  border-radius: 0 3px 3px 0;
  margin-top: 8px;
  grid-template-columns: 5em 1fr;
}

ai .npc .husb dt { 
  color: #2b3850; 
  border-color: #4a5f7a; 
}

/* ============ 关系数值面板 ============ */
ai .stat {
  background:
    linear-gradient(135deg, rgba(255,248,225,.7), rgba(232,207,154,.5));
  border: 1px solid #8b6f3d;
}

ai .stat summary {
  background: linear-gradient(180deg, rgba(212,160,23,.3), rgba(180,120,40,.15));
}

ai .stat .seal {
  font-family: "Impact", sans-serif;
  font-size: 11px;
  letter-spacing: 3px;
  color: #c41e3a;
  border: 2px solid #c41e3a;
  padding: 2px 8px;
  border-radius: 50%;
  transform: rotate(-5deg);
  opacity: .8;
  animation: sealRotate 6s ease-in-out infinite;
}

@keyframes sealRotate {
  0%, 100% { transform: rotate(-5deg); }
  50% { transform: rotate(5deg); }
}

ai .meter {
  margin: 12px 0;
  padding: 10px 12px;
  background: rgba(255,250,235,.6);
  border: 1px solid #c4a060;
  border-radius: 3px;
  box-shadow: inset 0 1px 3px rgba(139,69,19,.1);
  position: relative;
  animation: meterSlideIn 0.5s ease-out backwards;
}

ai .meter:nth-of-type(1) { animation-delay: 0.1s; }
ai .meter:nth-of-type(2) { animation-delay: 0.2s; }
ai .meter:nth-of-type(3) { animation-delay: 0.3s; }

@keyframes meterSlideIn {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

ai .meter h3 {
  margin: 0 0 8px;
  font-family: "STKaiti", serif;
  font-size: 15px;
  color: #2b1810;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px dashed #a08050;
  padding-bottom: 4px;
  flex-wrap: wrap;
  gap: 6px 10px;
}

ai .meter h3 small {
  font-family: "Courier New", monospace;
  font-size: 12px;
  color: #8b4513;
  letter-spacing: 1px;
  font-weight: normal;
  white-space: nowrap;
}

ai .bar {
  height: 18px;
  background:
    repeating-linear-gradient(90deg,
      rgba(139,69,19,.15) 0 1px,
      transparent 1px 10%);
  background-color: rgba(101,67,33,.15);
  border: 1px solid #8b4513;
  border-radius: 2px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.3);
}

ai .bar span {
  display: block;
  height: 100%;
  background: linear-gradient(180deg, #ff7090, #d4385a, #a02040);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.3),
    inset 0 -2px 4px rgba(0,0,0,.3);
  transition: width .8s ease;
  position: relative;
  animation: barPulse 3s infinite, barFill 1.2s ease-out;
}

@keyframes barPulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.15); }
}

@keyframes barFill {
  from {
    width: 0 !important;
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

ai .bar span::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255,255,255,.3) 50%, 
    transparent 100%);
  animation: barShine 2s ease-in-out infinite;
}

@keyframes barShine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

ai .bar.c span {
  background: linear-gradient(180deg, #6a4080, #4a2060, #2b0040);
}

ai .bar.d span {
  background: linear-gradient(180deg, #ffb030, #d47010, #8b3a00);
}

ai .meter .lv {
  margin: 6px 0 4px;
  font-family: "STKaiti", serif;
  font-size: 14px;
  color: #8b0000;
  font-weight: bold;
  letter-spacing: 2px;
  animation: lvFadeIn 0.6s ease-out 0.3s backwards;
}

@keyframes lvFadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

ai .meter .desc {
  margin: 0;
  font-size: 12.5px;
  color: #4a3820;
  font-style: italic;
  padding-left: 10px;
  border-left: 2px solid #c4a060;
  line-height: 1.6;
  animation: descSlideIn 0.6s ease-out 0.5s backwards;
}

@keyframes descSlideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ============ 手机界面 ============ */
ai .msg {
  background: linear-gradient(135deg, rgba(255,248,225,.6), rgba(232,207,154,.4));
}

ai .msg summary {
  background: linear-gradient(180deg, rgba(70,130,90,.18), rgba(50,100,70,.1));
  color: #1f4d2f;
}

ai .msg .notif {
  background: #ff3b30;
  color: #fff;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  font-family: -apple-system, "Helvetica", sans-serif;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
  animation: notifBounce 2s ease-in-out infinite;
}

@keyframes notifBounce {
  0%, 100% { 
    transform: scale(1);
    box-shadow: 0 1px 3px rgba(0,0,0,.3);
  }
  50% { 
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(255,59,48,.6);
  }
}

/* 手机外壳 */
ai .phone {
  max-width: 320px;
  margin: 14px auto;
  padding: 10px 8px 12px;
  background: linear-gradient(180deg, #2b2b2b, #1a1a1a);
  border-radius: 30px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.15),
    inset 0 0 0 2px #444,
    0 6px 18px rgba(0,0,0,.5),
    0 2px 4px rgba(0,0,0,.4);
  position: relative;
  animation: phoneSlideUp 0.8s ease-out 0.6s backwards;
}

@keyframes phoneSlideUp {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

ai .phone::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 6px;
  background: #000;
  border-radius: 3px;
  z-index: 2;
}

ai .phone::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 40%;
  height: 4px;
  background: #555;
  border-radius: 2px;
}

ai .screen {
  background: #f2f2f7;
  border-radius: 22px;
  padding: 0;
  overflow: hidden;
  font-family: -apple-system, "Helvetica Neue", "PingFang SC", sans-serif;
  font-size: 13px;
  color: #000;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.1);
  animation: screenGlow 4s ease-in-out infinite;
}

@keyframes screenGlow {
  0%, 100% { box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }
  50% { box-shadow: inset 0 0 0 1px rgba(0,0,0,.1), inset 0 0 20px rgba(255,255,255,.3); }
}

/* 状态栏 */
ai .status-bar {
  background: #f2f2f7;
  padding: 6px 16px 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  color: #000;
  padding-top: 18px;
}

ai .status-bar .icons {
  letter-spacing: 2px;
  font-size: 11px;
}

/* 应用通用 */
ai .app {
  background: #fff;
  margin: 8px 6px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
  animation: appFadeIn 0.5s ease-out backwards;
}

ai .app:nth-of-type(1) { animation-delay: 0.8s; }
ai .app:nth-of-type(2) { animation-delay: 0.9s; }
ai .app:nth-of-type(3) { animation-delay: 1s; }
ai .app:nth-of-type(4) { animation-delay: 1.1s; }

@keyframes appFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

ai .app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
  border-bottom: 1px solid #e5e5ea;
  background: #f9f9f9;
}

ai .app-header .back {
  font-size: 22px;
  color: #007aff;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
}

ai .app-header .back:hover {
  transform: translateX(-3px);
  color: #0051d5;
}

ai .app-header .title {
  font-weight: 600;
  letter-spacing: 1px;
  color: #000;
}

ai .app-header .more {
  color: #007aff;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

ai .app-header .more:hover {
  transform: scale(1.2);
  color: #0051d5;
}

/* 微信 */
ai .wechat .app-header {
  background: #ededed;
}

ai .wechat .app-header .title { color: #000; }

ai .chat-list { background: #fff; }

ai .chat-item {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #e5e5ea;
  gap: 10px;
  transition: all 0.25s ease;
  cursor: pointer;
}

ai .chat-item:hover {
  background: #f5f5f5;
  transform: translateX(3px);
}

ai .chat-item:last-child { border-bottom: none; }

ai .chat-item img {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #4caf50, #2e7d32);
  animation: avatarPulse 3s ease-in-out infinite;
}

@keyframes avatarPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

ai .chat-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

ai .chat-name {
  font-weight: 500;
  font-size: 14px;
  color: #000;
  margin-bottom: 2px;
}

ai .chat-preview {
  font-size: 12px;
  color: #888;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

ai .chat-meta {
  text-align: right;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

ai .chat-time {
  font-size: 11px;
  color: #999;
}

ai .chat-badge {
  background: #fa3e3e;
  color: #fff;
  font-size: 10px;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  padding: 0 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  animation: badgePop 0.5s ease-out, badgePulse 2s ease-in-out 0.5s infinite;
}

@keyframes badgePop {
  0% { transform: scale(0); }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* 通话 */
ai .phone-app .app-header { background: #f9f9f9; }

ai .call-list { background: #fff; }

ai .call-item {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #e5e5ea;
  gap: 12px;
  transition: all 0.25s ease;
  cursor: pointer;
}

ai .call-item:hover {
  background: #f5f5f5;
  transform: translateX(3px);
}

ai .call-item:last-child { border-bottom: none; }

ai .call-icon {
  width: 32px;
  height: 32px;
  background: #4cd964;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #fff;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

ai .call-item:hover .call-icon {
  transform: rotate(15deg) scale(1.1);
}

ai .call-item.missed .call-icon {
  background: #ff3b30;
  animation: missedCallShake 0.5s ease-out, missedCallPulse 2s ease-in-out 0.5s infinite;
}

@keyframes missedCallShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

@keyframes missedCallPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,59,48,.7); }
  50% { box-shadow: 0 0 0 6px rgba(255,59,48,0); }
}

ai .call-info { flex: 1; min-width: 0; }

ai .call-name {
  font-size: 14px;
  font-weight: 500;
  color: #000;
}

ai .call-item.missed .call-name { color: #ff3b30; }

ai .call-detail {
  font-size: 12px;
  color: #888;
  margin-top: 2px;
}

/* 朋友圈 */
ai .moments .app-header {
  background: #2c2c2c;
  color: #fff;
}

ai .moments .app-header .title,
ai .moments .app-header .back,
ai .moments .app-header .more { color: #fff; }

ai .moment-list { background: #fff; }

ai .moment-item {
  display: flex;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid #f0f0f0;
  transition: all 0.25s ease;
  cursor: pointer;
}

ai .moment-item:hover {
  background: #fafafa;
}

ai .moment-item:last-child { border-bottom: none; }

ai .moment-item img {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  flex-shrink: 0;
  background: #ddd;
  transition: all 0.3s ease;
}

ai .moment-item:hover img {
  transform: scale(1.1) rotate(3deg);
}

ai .moment-content { flex: 1; min-width: 0; }

ai .moment-name {
  color: #576b95;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 4px;
}

ai .moment-text {
  font-size: 13px;
  color: #000;
  line-height: 1.5;
  margin-bottom: 4px;
}

ai .moment-time {
  font-size: 11px;
  color: #999;
}

/* 日程 */
ai .calendar .app-header {
  background: #fff;
  border-bottom: 2px solid #ff3b30;
}

ai .calendar .app-header .title { 
  color: #ff3b30; 
  font-weight: 700; 
}

ai .event-list { background: #fff; }

ai .event-item {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #e5e5ea;
  transition: all 0.25s ease;
  cursor: pointer;
}

ai .event-item:hover {
  background: #fff5f5;
  transform: translateX(3px);
}

ai .event-item:last-child { border-bottom: none; }

ai .event-date {
  font-size: 11px;
  color: #ff3b30;
  font-weight: 600;
  text-align: center;
  padding: 4px;
  border: 1px solid #ff3b30;
  border-radius: 4px;
  transition: all 0.3s ease;
}

ai .event-item:hover .event-date {
  background: #ff3b30;
  color: #fff;
  transform: scale(1.05);
}

ai .event-title {
  font-size: 13px;
  color: #000;
  font-weight: 500;
}

ai .event-time {
  font-size: 11px;
  color: #888;
}

/* ============ 记忆回廊 - 羊皮卷轴 ============ */
ai .m {
  background:
    radial-gradient(ellipse at center,
      rgba(255,248,225,.85) 0%,
      rgba(232,207,154,.7) 80%,
      rgba(180,140,80,.5) 100%);
  border: 1px solid #8b6f3d;
  box-shadow:
    inset 0 0 30px rgba(139,69,19,.2),
    0 2px 8px rgba(0,0,0,.2);
  position: relative;
  animation: scrollUnroll 1s ease-out 0.7s backwards;
}

@keyframes scrollUnroll {
  from {
    opacity: 0;
    transform: scaleY(0.3) rotateX(45deg);
    transform-origin: top center;
  }
  to {
    opacity: 1;
    transform: scaleY(1) rotateX(0deg);
  }
}

ai .m::before, ai .m::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 8px;
  background:
    linear-gradient(180deg, #6b3410, #8b4513, #6b3410);
  box-shadow: 0 0 4px rgba(0,0,0,.4);
  animation: rodShine 5s ease-in-out infinite;
}

@keyframes rodShine {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.2); }
}

ai .m::before { top: 0; border-radius: 3px 3px 0 0; }
ai .m::after { bottom: 0; border-radius: 0 0 3px 3px; }

ai .m summary {
  background: linear-gradient(180deg, rgba(139,69,19,.2), rgba(101,67,33,.1));
  color: #4a2810;
  margin-top: 6px;
  font-family: "STKaiti", "Georgia", serif;
  font-size: 16px;
  letter-spacing: 4px;
  text-align: center;
  justify-content: center;
}

ai .m h2, ai .m h3, ai .m h4,
ai .m p {
  text-align: center;
}

ai .m table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  font-size: 12px;
  background: rgba(255,250,235,.5);
  border: 1px solid #8b6f3d;
  font-family: "STKaiti", serif;
  animation: tableFadeIn 0.6s ease-out;
}

@keyframes tableFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

ai .m th {
  background: linear-gradient(180deg, #8b4513, #6b3410);
  color: #f4e4c1;
  padding: 6px 4px;
  font-family: "Impact", sans-serif;
  letter-spacing: 2px;
  font-size: 11px;
  border: 1px solid #4a2810;
  position: relative;
}

ai .m th::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.1), transparent);
  animation: thShine 3s ease-in-out infinite;
}

@keyframes thShine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

ai .m td {
  padding: 6px 8px;
  border: 1px solid #c4a060;
  color: #2b1810;
  vertical-align: top;
  line-height: 1.5;
  transition: all 0.25s ease;
}

ai .m tbody tr:nth-child(odd) td {
  background: rgba(212,160,23,.08);
}

ai .m tbody tr:hover td {
  background: rgba(196,30,58,.08);
  transform: translateX(2px);
}

/* 装饰性段落（如 ⚜️ ... ⚜️） */
ai .m > p {
  font-family: "STKaiti", serif;
  font-size: 14px;
  letter-spacing: 6px;
  color: #6b3410;
  font-weight: bold;
  margin: 14px 0 6px;
  padding: 4px 0;
  border-top: 1px dashed #8b4513;
  border-bottom: 1px dashed #8b4513;
  animation: sectionFadeIn 0.6s ease-out;
}

@keyframes sectionFadeIn {
  from {
    opacity: 0;
    letter-spacing: 10px;
  }
  to {
    opacity: 1;
    letter-spacing: 6px;
  }
}

/* ============ 行动推荐 - 作战计划 ============ */
ai .act {
  background:
    linear-gradient(135deg, rgba(255,248,225,.7), rgba(232,207,154,.5));
  border: 2px solid #2b3850;
}

ai .act summary {
  background:
    repeating-linear-gradient(45deg,
      rgba(43,56,80,.15) 0 8px,
      rgba(43,56,80,.05) 8px 16px);
  color: #1a2535;
  border-bottom: 2px solid #2b3850;
}

ai .act .code {
  background: #2b3850;
  color: #d4a017;
  padding: 3px 10px;
  font-family: "Courier New", monospace;
  font-size: 11px;
  letter-spacing: 2px;
  border-radius: 2px;
  font-weight: bold;
  border: 1px solid #d4a017;
  animation: codeFlicker 4s ease-in-out infinite;
}

@keyframes codeFlicker {
  0%, 100% { 
    box-shadow: 0 0 5px rgba(212,160,23,.3);
    text-shadow: 0 0 3px rgba(212,160,23,.5);
  }
  50% { 
    box-shadow: 0 0 10px rgba(212,160,23,.6);
    text-shadow: 0 0 6px rgba(212,160,23,.8);
  }
}

ai .act ol {
  list-style: none;
  padding: 0;
  margin: 10px 0;
  counter-reset: opt;
}

ai .act li {
  counter-increment: opt;
  position: relative;
  padding: 10px 12px 10px 48px;
  margin: 8px 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,.5), rgba(255,250,235,.3));
  border-left: 3px solid #2b3850;
  border-radius: 0 4px 4px 0;
  font-family: "STKaiti", serif;
  font-size: 14px;
  color: #2b1810;
  transition: all .3s ease;
  cursor: pointer;
  box-shadow: 1px 1px 3px rgba(0,0,0,.1);
  animation: optionSlideIn 0.4s ease-out backwards;
}

ai .act li:nth-child(1) { animation-delay: 0.1s; }
ai .act li:nth-child(2) { animation-delay: 0.2s; }
ai .act li:nth-child(3) { animation-delay: 0.3s; }
ai .act li:nth-child(4) { animation-delay: 0.4s; }
ai .act li:nth-child(5) { animation-delay: 0.5s; }

@keyframes optionSlideIn {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

ai .act li::before {
  content: "OP-" counter(opt, decimal-leading-zero);
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: #2b3850;
  color: #d4a017;
  font-family: "Courier New", monospace;
  font-size: 10px;
  font-weight: bold;
  padding: 3px 5px;
  border-radius: 2px;
  letter-spacing: 1px;
  box-shadow: 0 1px 2px rgba(0,0,0,.3);
  transition: all 0.3s ease;
}

ai .act li:hover {
  background: linear-gradient(90deg, rgba(212,160,23,.2), rgba(255,250,235,.5));
  border-left-color: #c41e3a;
  transform: translateX(5px);
  box-shadow: 3px 3px 8px rgba(0,0,0,.25);
}

ai .act li:hover::before {
  background: #c41e3a;
  color: #fff;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 0 8px rgba(196,30,58,.6);
}

ai .act li::after {
  content: "→";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #2b3850;
  font-size: 16px;
  opacity: 0;
  transition: all 0.3s ease;
}

ai .act li:hover::after {
  opacity: 1;
  right: 8px;
}

/* ============ 移动端适配 ============ */
@media (max-width: 480px) {
  ai { 
    padding: 10px 8px 14px; 
    font-size: 13px; 
  }
  
  ai .top h1 { 
    font-size: 22px; 
    letter-spacing: 2px; 
  }
  
  ai::after { 
    font-size: 52px; 
  }
  
  ai dl { 
    grid-template-columns: 4.5em 1fr; 
    gap: 6px 10px; 
  }
  
  ai .hero dl,
  ai .npc .husb {
    grid-template-columns: 4.5em 1fr;
  }
  
  ai dt, ai dd { 
    font-size: 12.5px; 
  }
  
  ai .npc .prof img { 
    max-width: 100%;
    width: 100%;
  }
  
  ai .phone { 
    max-width: 100%; 
  }
  
  ai .m table { 
    font-size: 11px; 
  }
  
  ai .m td { 
    padding: 4px 5px; 
  }
}

/* ============ 性能优化 ============ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
/* ============ 聊天框美化 · 档案风格 ============ */

/* 统一聊天框 */
.bg-gray-100\/90.relative.inline-block {
  background: 
    radial-gradient(ellipse at top left, rgba(180,120,40,.12), transparent 50%),
    linear-gradient(135deg, #f4e4c1 0%, #ecd6a8 50%, #e8cf9a 100%) !important;
  border: 1px solid #8b6f3d !important;
  border-radius: 4px !important;
  box-shadow:
    inset 0 0 40px rgba(139,69,19,.15),
    inset 0 0 6px rgba(101,67,33,.2),
    0 3px 10px rgba(0,0,0,.2) !important;
  position: relative !important;
  overflow: visible !important;
  animation: chatFadeIn 0.5s ease-out !important;
}

@keyframes chatFadeIn {
  from {
    opacity: 0;
    transform: translateY(15px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* 做旧纸张纹理 */
.bg-gray-100\/90.relative.inline-block::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  pointer-events: none !important;
  background:
    radial-gradient(circle at 12% 20%, rgba(101,67,33,.15) 0, transparent 6%),
    radial-gradient(circle at 88% 65%, rgba(139,69,19,.12) 0, transparent 8%),
    repeating-linear-gradient(0deg, rgba(120,80,30,.03) 0 2px, transparent 2px 4px) !important;
  opacity: .75 !important;
  z-index: 0 !important;
  border-radius: 4px !important;
}

/* 机密水印 */
.bg-gray-100\/90.relative.inline-block::after {
  content: "CONFIDENTIAL" !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%,-50%) rotate(-25deg) !important;
  font-family: "Impact", "Arial Black", sans-serif !important;
  font-size: 48px !important;
  font-weight: 900 !important;
  letter-spacing: 6px !important;
  color: rgba(196,30,58,.04) !important;
  pointer-events: none !important;
  z-index: 0 !important;
  white-space: nowrap !important;
  animation: watermarkFloat 18s linear infinite !important;
}

@keyframes watermarkFloat {
  0% { transform: translate(-50%,-50%) rotate(-25deg); }
  50% { transform: translate(-48%,-52%) rotate(-23deg); }
  100% { transform: translate(-50%,-50%) rotate(-25deg); }
}

/* 输入聊天框（用户） */
.bg-gray-100\/90.relative.inline-block:not(.chat-answer-container .bg-gray-100\/90) {
  border-left: 3px solid #4a5f7a !important;
  background: 
    linear-gradient(135deg, rgba(232,240,248,.8), rgba(220,230,240,.7)) !important;
}

.bg-gray-100\/90.relative.inline-block:not(.chat-answer-container .bg-gray-100\/90)::after {
  content: "USER INPUT" !important;
  color: rgba(74,95,122,.05) !important;
}

/* 聊天框文本内容 */
.markdown-body {
  color: #2b2418 !important;
  font-family: "Georgia", "STSong", serif !important;
  font-size: 14px !important;
  line-height: 1.7 !important;
  position: relative !important;
  z-index: 1 !important;
  text-shadow: none !important;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
  color: #6b3410 !important;
  font-family: "Impact", "STKaiti", sans-serif !important;
  letter-spacing: 2px !important;
  border-bottom: 2px solid #c4a060 !important;
  padding-bottom: 4px !important;
  margin-top: 12px !important;
}

.markdown-body code {
  background: rgba(139,69,19,.1) !important;
  border: 1px solid #c4a060 !important;
  color: #8b4513 !important;
  padding: 2px 6px !important;
  border-radius: 2px !important;
  font-family: "Courier New", monospace !important;
}

.markdown-body pre {
  background: rgba(43,56,80,.08) !important;
  border: 1px solid #4a5f7a !important;
  border-left: 3px solid #2b3850 !important;
  padding: 10px !important;
  border-radius: 3px !important;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.1) !important;
}

.markdown-body a {
  color: #c41e3a !important;
  text-decoration: underline !important;
  text-decoration-style: dashed !important;
  transition: all 0.25s ease !important;
}

.markdown-body a:hover {
  color: #8b0000 !important;
  text-decoration-style: solid !important;
  text-shadow: 0 0 3px rgba(196,30,58,.3) !important;
}

/* 隐藏顶部颜色条 */
[class*="bg-[#F1CBCB]"], 
[class*="bg-[#c9e1e9]"] {
  display: none !important;
}

/* 底部按钮（复制/编辑/删除） */
.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary {
  color: #6b3410 !important;
  font-family: "STKaiti", serif !important;
  font-size: 12px !important;
  letter-spacing: 1px !important;
  padding: 4px 10px !important;
  border: 1px solid transparent !important;
  border-radius: 3px !important;
  transition: all 0.3s ease !important;
  background: rgba(212,160,23,.08) !important;
}

.MuiButtonBase-root.MuiButton-root.MuiButton-text.MuiButton-textPrimary:hover {
  background: rgba(212,160,23,.2) !important;
  border-color: #c4a060 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 2px 6px rgba(139,69,19,.2) !important;
}

/* 模型名称 */
.MuiTypography-root.MuiTypography-body2.css-6c0gf2 {
  color: #8b4513 !important;
  font-family: "Courier New", monospace !important;
  font-size: 11px !important;
  letter-spacing: 1px !important;
  background: rgba(139,69,19,.1) !important;
  padding: 2px 6px !important;
  border-radius: 2px !important;
  border: 1px solid #c4a060 !important;
}

/* Token消耗 */
.text-orange-500 {
  color: #d47010 !important;
  font-family: "Courier New", monospace !important;
  font-size: 11px !important;
  font-weight: bold !important;
  background: rgba(212,112,16,.1) !important;
  padding: 2px 6px !important;
  border-radius: 2px !important;
  border: 1px dashed #d47010 !important;
}

/* 加载动画容器 */
.flex.items-center.justify-center.w-6.h-5 {
  position: relative !important;
  isolation: isolate !important;
  min-height: 24px !important;
}

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

/* 自定义档案解密加载动画 */
.flex.items-center.justify-center.w-6.h-5::before {
  content: "" !important;
  width: 20px !important;
  height: 20px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Ccircle cx='20' cy='20' r='16' fill='none' stroke='%238b4513' stroke-width='3' stroke-dasharray='80 20' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 20 20' to='360 20 20' dur='1.2s' repeatCount='indefinite'/%3E%3C/circle%3E%3Ccircle cx='20' cy='20' r='10' fill='none' stroke='%23c41e3a' stroke-width='2' stroke-dasharray='50 10' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='360 20 20' to='0 20 20' dur='0.9s' repeatCount='indefinite'/%3E%3C/circle%3E%3Ctext x='20' y='24' text-anchor='middle' font-family='Impact' font-size='10' fill='%236b3410'%3E%3Canimate attributeName='opacity' values='0.3;1;0.3' dur='1.5s' repeatCount='indefinite'/%3E...%3C/text%3E%3C/svg%3E") !important;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  display: block !important;
  margin: 0 auto !important;
}

/* ============ 界面美化 · 档案风格 ============ */

/* 顶部栏主容器 */
.sticky.w-full.top-0.flex.items-center {
  background: 
    linear-gradient(180deg, rgba(244,228,193,.95), rgba(236,214,168,.9)) !important;
  border-bottom: 2px solid #8b6f3d !important;
  box-shadow: 
    0 2px 8px rgba(139,69,19,.2),
    inset 0 -1px 0 rgba(255,255,255,.3) !important;
  backdrop-filter: blur(8px) !important;
  position: relative !important;
}

.sticky.w-full.top-0.flex.items-center::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  background: 
    repeating-linear-gradient(90deg, 
      rgba(139,69,19,.03) 0 1px, 
      transparent 1px 20px) !important;
  pointer-events: none !important;
}

/* 模型选择器 */
#ai-model-selector .group.flex.items-center {
  background: rgba(255,248,225,.6) !important;
  border: 1px solid #a08050 !important;
  border-radius: 4px !important;
  padding: 6px 10px !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 1px 3px rgba(0,0,0,.1) !important;
}

#ai-model-selector .group.flex.items-center:hover {
  background: rgba(212,160,23,.15) !important;
  border-color: #8b6f3d !important;
  box-shadow: 0 2px 6px rgba(139,69,19,.2) !important;
  transform: translateY(-1px) !important;
}

#ai-model-selector .truncate.text-\[13px\] {
  color: #6b3410 !important;
  font-family: "STKaiti", "Georgia", serif !important;
  font-weight: 600 !important;
  letter-spacing: 1px !important;
}

#ai-model-selector .shrink-0.flex.items-center svg {
  color: #8b4513 !important;
  transition: transform 0.3s ease !important;
}

#ai-model-selector .group:hover svg {
  transform: rotate(180deg) !important;
}

/* 历史记录图标（移动端） */
.sticky.w-full.top-0 svg.lucide-clock-8 {
  color: #8b4513 !important;
  filter: drop-shadow(0 1px 2px rgba(139,69,19,.3)) !important;
  transition: all 0.3s ease !important;
}

.sticky.w-full.top-0 svg.lucide-clock-8:hover {
  color: #c41e3a !important;
  transform: rotate(15deg) scale(1.1) !important;
}

/* 历史记录未读角标 */
.sticky.w-full.top-0 span.MuiBadge-dot.md\:hidden {
  background: #c41e3a !important;
  box-shadow: 0 0 6px rgba(196,30,58,.6) !important;
  animation: badgePulse 2s ease-in-out infinite !important;
}

@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* 音乐按钮 */
.sticky.w-full.top-0 button.MuiIconButton-root:has(svg.lucide-music-2) {
  background: rgba(212,160,23,.1) !important;
  border: 1px solid #c4a060 !important;
  transition: all 0.3s ease !important;
}

.sticky.w-full.top-0 button.MuiIconButton-root:has(svg.lucide-music-2):hover {
  background: rgba(212,160,23,.25) !important;
  border-color: #8b6f3d !important;
  transform: rotate(5deg) scale(1.05) !important;
}

.sticky.w-full.top-0 button.MuiIconButton-root svg.lucide-music-2 {
  color: #8b4513 !important;
}

/* 移动端设置图标 */
.sticky.w-full.top-0 svg:has(use[href="#icon-icon-set"]) {
  color: #6b3410 !important;
  filter: drop-shadow(0 1px 2px rgba(139,69,19,.3)) !important;
  transition: all 0.3s ease !important;
}

.sticky.w-full.top-0 svg:has(use[href="#icon-icon-set"]):hover {
  color: #c41e3a !important;
  transform: scale(1.15) !important;
}

/* 设置按钮 */
#header-setting-button {
  background: rgba(43,56,80,.08) !important;
  border: 1px solid #4a5f7a !important;
  border-radius: 4px !important;
  padding: 6px 12px !important;
  transition: all 0.3s ease !important;
  color: #2b3850 !important;
  font-family: "STKaiti", serif !important;
  letter-spacing: 1px !important;
}

#header-setting-button:hover {
  background: rgba(43,56,80,.15) !important;
  border-color: #2b3850 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 2px 6px rgba(43,56,80,.2) !important;
}

#header-setting-button svg {
  color: #2b3850 !important;
  transition: transform 0.5s ease !important;
}

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

/* 开场白选择器 */
div.flex.items-center.h-9.bg-white.rounded-md.cursor-pointer.group[class*="border-gray"],
div.h-9.rounded-md.cursor-pointer.group:has(svg[data-icon="SlidersH"]) {
  background: rgba(255,248,225,.6) !important;
  border: 1px solid #a08050 !important;
  border-radius: 4px !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 1px 3px rgba(0,0,0,.08) !important;
}

div.flex.items-center.h-9.cursor-pointer.group:hover,
div.h-9.rounded-md.cursor-pointer.group:hover {
  background: rgba(212,160,23,.15) !important;
  border-color: #8b6f3d !important;
  box-shadow: 0 2px 6px rgba(139,69,19,.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: #8b4513 !important;
  transition: all 0.3s ease !important;
}

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

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

/* 按钮栏按钮 */
#ai-mod-button2 button.MuiButton-root {
  background: rgba(255,248,225,.6) !important;
  border: 1px solid #a08050 !important;
  color: #6b3410 !important;
  font-family: "STKaiti", serif !important;
  letter-spacing: 1px !important;
  border-radius: 4px !important;
  padding: 6px 14px !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 1px 3px rgba(0,0,0,.1) !important;
}

#ai-mod-button2 button.MuiButton-root:hover {
  background: rgba(212,160,23,.2) !important;
  border-color: #8b6f3d !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 3px 8px rgba(139,69,19,.25) !important;
}

#ai-mod-button2 button.MuiButton-root svg {
  color: #8b4513 !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, 
      rgba(244,228,193,.98) 0%, 
      rgba(236,214,168,.95) 50%,
      rgba(232,207,154,.85) 100%) !important;
  border-top: 2px solid #8b6f3d !important;
  box-shadow: 
    0 -2px 8px rgba(139,69,19,.2),
    inset 0 1px 0 rgba(255,255,255,.3) !important;
}

/* 输入框容器 */
#ai-chat-bottom-input {
  background: rgba(255,248,225,.7) !important;
  border: 2px solid #a08050 !important;
  border-radius: 6px !important;
  box-shadow: 
    inset 0 1px 3px rgba(139,69,19,.1),
    0 2px 6px rgba(0,0,0,.1) !important;
  transition: all 0.3s ease !important;
}

#ai-chat-bottom-input:focus-within {
  border-color: #8b6f3d !important;
  box-shadow: 
    inset 0 1px 3px rgba(139,69,19,.15),
    0 3px 10px rgba(139,69,19,.2),
    0 0 0 3px rgba(212,160,23,.1) !important;
}

/* 主输入框 */
#ai-chat-input {
  color: #2b2418 !important;
  font-family: "Georgia", "STSong", serif !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
  background: transparent !important;
}

#ai-chat-input::placeholder {
  color: rgba(107,52,16,.5) !important;
  font-style: italic !important;
  letter-spacing: 1px !important;
}

#ai-chat-input::selection {
  background: rgba(196,30,58,.2) !important;
  color: #2b1810 !important;
}

/* 分页按钮 */
.MuiPaginationItem-root {
  color: #6b3410 !important;
  font-family: "Courier New", monospace !important;
  font-weight: 600 !important;
  border: 1px solid #c4a060 !important;
  background: rgba(255,248,225,.5) !important;
  transition: all 0.25s ease !important;
}

.MuiPaginationItem-root:hover {
  background: rgba(212,160,23,.2) !important;
  border-color: #8b6f3d !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 2px 5px rgba(139,69,19,.2) !important;
}

.MuiPaginationItem-root.Mui-selected {
  background: linear-gradient(135deg, #d4a017, #b8860b) !important;
  color: #fff !important;
  border-color: #8b6f3d !important;
  box-shadow: 
    inset 0 1px 0 rgba(255,255,255,.3),
    0 2px 6px rgba(139,69,19,.3) !important;
}

.MuiPaginationItem-root.Mui-disabled {
  opacity: .4 !important;
  background: rgba(180,140,80,.2) !important;
  border-color: #c4a060 !important;
}

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

/* 跳转输入区域 */
.MuiStack-root.css-1uwir8f {
  background: rgba(255,248,225,.5) !important;
  border: 1px solid #c4a060 !important;
  border-radius: 4px !important;
  padding: 6px 10px !important;
}

.MuiStack-root.css-1uwir8f .MuiBox-root {
  color: #6b3410 !important;
  font-family: "STKaiti", serif !important;
  letter-spacing: 1px !important;
}

.MuiInputBase-input {
  color: #2b2418 !important;
  font-family: "Courier New", monospace !important;
  font-weight: 600 !important;
  background: rgba(255,255,255,.6) !important;
  border: 1px solid #a08050 !important;
  border-radius: 3px !important;
  padding: 4px 8px !important;
}

/* ============ 移动端适配 ============ */
@media (max-width: 480px) {
  .bg-gray-100\/90.relative.inline-block::after {
    font-size: 32px !important;
  }
  
  .markdown-body {
    font-size: 13px !important;
  }
  
  #ai-model-selector .truncate.text-\[13px\] {
    font-size: 12px !important;
  }
}

/* ============ 性能优化 ============ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}