/* 减小底部渐变区域的内边距 */
.bg-gradient-to-t.from-white.via-white.to-transparent {
  padding-bottom: 0.5rem !important; /* 从 1rem 减少到 0.75rem */
}

/* 减小容器的上边距 */
.bg-gradient-to-t .mx-auto.w-full.max-w-\[720px\] {
  margin-top: 0 !important;
}

.bg-gradient-to-t .mx-auto.w-full.max-w-\[720px\] .relative.mt-2 {
  margin-top: 0.25rem !important; /* 从 0.5rem 减少到 0.25rem */
}

/* 优化按钮区域 */
.bg-gradient-to-t .flex.items-center.gap-2.pb-2 {
  gap: 0.3rem !important; /* 从 0.5rem 减少到 0.375rem */
  padding-bottom: 0.3rem !important; /* 从 0.5rem 减少 */
}

/* 优化按钮样式 */
.bg-gradient-to-t button.MuiButton-outlinedSizeSmall {
  padding: 0.25rem 0.625rem !important; /* 减小内边距 */
  font-size: 0.8rem !important; /* 稍微减小字体 */
  height: 1.875rem !important; /* 固定高度 30px */
  min-width: auto !important;
  border-radius: 0.7rem !important; /* 更圆润的边角 */
  border-width: 1px !important;
  transition: all 0.2s ease !important;
}

/* 按钮悬停效果 */
.bg-gradient-to-t button.MuiButton-outlinedSizeSmall:hover {
  background-color: #EBF5FF !important;
  border-color: #1E88E5 !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(30, 136, 229, 0.1) !important;
}

/* 按钮图标优化 */
.bg-gradient-to-t button.MuiButton-outlinedSizeSmall svg {
  width: 0.875rem !important;
  height: 0.875rem !important;
  margin-right: 0.25rem !important;
}

/* 优化输入框容器 */
.bg-gradient-to-t .bg-white.border-\[1\.5px\] {
  margin-bottom: 0.3rem !important; /* 从 0.5rem 减少 */
  border-radius: 0.75rem !important; /* 更圆润 */
  border-color: #E5E7EB !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

/* 输入框获得焦点时的效果 */
.bg-gradient-to-t .bg-white.border-\[1\.5px\]:focus-within {
  border-color: #1E88E5 !important;
  box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1) !important;
}

/* 优化输入框内部 */
.bg-gradient-to-t .w-full.overflow-y-auto {
  padding: 0.375rem !important; /* 从 5.5px 调整 */
  max-height: 120px !important; /* 从 150px 减少到 120px */
}

/* 优化文本域 */
.bg-gradient-to-t textarea#ai-chat-input {
  padding: 0.375rem 0.5rem !important;
  padding-right: 90px !important; /* 从 100px 减少 */
  line-height: 1.375 !important;
  font-size: 0.875rem !important;
}

/* 优化右下角按钮组 */
.bg-gradient-to-t .absolute.bottom-2.right-2 {
  bottom: 0.5rem !important;
  right: 0.5rem !important;
  height: 1.75rem !important; /* 从 2rem 减少到 1.75rem */
  padding: 0 0.25rem !important;
  border-radius: 0.5rem !important;
  background: rgba(255, 255, 255, 0.95) !important;
}

/* 字符计数器 */
.bg-gradient-to-t .flex.items-center.px-1.h-5 {
  height: 1.25rem !important;
  padding: 0 0.375rem !important;
  font-size: 0.6875rem !important;
  border-radius: 0.25rem !important;
}

/* 发送按钮优化 */
.bg-gradient-to-t #ai-send-button {
  width: 1.75rem !important;
  height: 1.75rem !important;
  border-radius: 0.5rem !important;
  transition: all 0.2s ease !important;
}

.bg-gradient-to-t #ai-send-button:hover {
  background-color: #EBF5FF !important;
  transform: scale(1.05);
}

.bg-gradient-to-t #ai-send-button svg {
  font-size: 1.125rem !important;
}

/* 分隔线优化 */
.bg-gradient-to-t .mx-1.w-\[1px\] {
  margin: 0 0.375rem !important;
  height: 1rem !important;
}

/* 响应式优化 - 移动端 */
@media (max-width: 768px) {
  .bg-gradient-to-t.from-white.via-white.to-transparent {
    padding-bottom: 0.5rem !important;
  }
  
  .bg-gradient-to-t button.MuiButton-outlinedSizeSmall {
    padding: 0.25rem 0.5rem !important;
    font-size: 0.75rem !important;
    height: 1.75rem !important;
  }
  
  .bg-gradient-to-t .flex.items-center.gap-2.pb-2 {
    gap: 0.25rem !important;
    padding-bottom: 0.375rem !important;
  }
}

/* 滚动条优化 */
.bg-gradient-to-t .overflow-x-auto::-webkit-scrollbar {
  height: 4px;
}

.bg-gradient-to-t .overflow-x-auto::-webkit-scrollbar-track {
  background: transparent;
}

.bg-gradient-to-t .overflow-x-auto::-webkit-scrollbar-thumb {
  background: #D1D5DB;
  border-radius: 2px;
}

.bg-gradient-to-t .overflow-x-auto::-webkit-scrollbar-thumb:hover {
  background: #9CA3AF;
}

/* ============ 全局基底 ============ */
.shu,.zwx,.jyq,.zdz,.xdt{
  font-family:"PingFang SC","Hiragino Sans GB","Microsoft YaHei",-apple-system,sans-serif;
  color:#3a2e26;
  box-sizing:border-box;
  max-width:100%;
  margin:14px auto;
  -webkit-font-smoothing:antialiased;
}
.shu *,.zwx *,.jyq *,.zdz *,.xdt *{box-sizing:border-box}

/* ============ 1. 环境状态 shu ============ */
.shu{
  position:relative;
  background:
    radial-gradient(circle at 92% 10%, rgba(255,210,170,.35), transparent 40%),
    linear-gradient(135deg,#fff8ed 0%,#fef0dc 50%,#fde6c8 100%);
  border:1px solid #e8c89a;
  border-radius:14px;
  padding:0;
  box-shadow:0 6px 18px -8px rgba(180,120,60,.25),inset 0 0 0 1px rgba(255,255,255,.6);
  overflow:hidden;
}
.shu::before{
  content:"";position:absolute;left:0;top:0;bottom:0;width:5px;
  background:linear-gradient(180deg,#ffb37a,#ff7a8a,#7ec4d6);
}
.sh-hd{
  display:flex;justify-content:space-between;align-items:center;
  padding:9px 16px 9px 22px;
  background:linear-gradient(90deg,rgba(255,200,150,.4),rgba(255,200,150,0));
  border-bottom:1px dashed #d9b88a;
  font-size:.78em;letter-spacing:1.5px;
}
.sh-ch{font-weight:700;color:#b3582a;letter-spacing:2px}
.sh-dt{color:#8c6a48;font-variant-numeric:tabular-nums}
.sh-gd{
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:0;
  padding:0;
}
.sh-it{
  position:relative;
  padding:12px 10px 12px;
  text-align:center;
  border-right:1px dashed rgba(180,130,80,.3);
  display:flex;flex-direction:column;align-items:center;justify-content:flex-start;
  gap:3px;
  min-height:96px;
}
.sh-it:last-child{border-right:none}
.sh-it i{font-size:1.4em;line-height:1;margin-bottom:2px;filter:drop-shadow(0 1px 1px rgba(0,0,0,.1))}
.sh-it b{font-size:.7em;color:#a07449;letter-spacing:1px;font-weight:600}
.sh-it p{margin:1px 0;font-size:.92em;color:#3a2e26;font-weight:600}
.sh-it em{font-size:.68em;color:#8c6a48;font-style:normal;line-height:1.35;opacity:.88}
.sh-ct{
  background:linear-gradient(180deg,rgba(255,180,140,.18),rgba(255,180,140,.05));
}
.sh-num{
  font-size:1.6em;font-weight:800;color:#d9533a;
  font-family:"Georgia",serif;
  text-shadow:0 1px 0 #fff,0 2px 4px rgba(217,83,58,.25);
  padding:0 2px;
}
.sh-un{font-size:.7em;color:#8c6a48;margin-left:2px}

/* ============ 2. 叙事 zwx ============ */
.zwx{
  position:relative;
  background:
    repeating-linear-gradient(180deg,transparent 0,transparent 31px,rgba(180,140,90,.06) 31px,rgba(180,140,90,.06) 32px),
    linear-gradient(180deg,#fffdf8,#fdf6e8);
  border:1px solid #e6d4ad;
  border-radius:10px;
  padding:22px 18px 22px 26px;
  margin:14px 2px;
  box-shadow:0 4px 14px -6px rgba(160,110,60,.18),inset 0 0 40px rgba(255,235,200,.3);
  font-size:1em;
  line-height:1.95;
  letter-spacing:.3px;
  color:#2d2520;
  text-indent:2em;
  text-align:justify;
}
.zwx::before{
  content:"";position:absolute;left:10px;top:14px;bottom:14px;width:2px;
  background:linear-gradient(180deg,#d9a468,transparent 30%,transparent 70%,#d9a468);
  opacity:.5;
}
.zwx p{margin:0 0 .9em;font-size:1em}

/* 道具/便签穿插容器（AI生成的 div 自动美化） */
.zwx > div{
  transform:rotate(-.5deg);
  position: relative;
  text-indent: 0 !important;
}
.zwx > div:nth-of-type(even){transform:rotate(.7deg);}
.zwx > div strong{display:block;}

/* ============ details 通用 ============ */
.jyq,.zdz{
  background:linear-gradient(180deg,#fffaf2,#fff5e8);
  border:1px solid #e3cba0;
  border-radius:12px;
  padding:0;
  box-shadow:0 4px 12px -6px rgba(160,110,60,.2);
  overflow:hidden;
}
.jyq>summary,.zdz>summary{
  cursor:pointer;list-style:none;
  padding:11px 16px;
  font-size:.95em;letter-spacing:1.5px;
  background:linear-gradient(90deg,#f5d8a8,#fce8c8);
  border-bottom:1px solid #e3cba0;
  color:#7a4a1e;
  position:relative;
}
.jyq>summary::-webkit-details-marker,.zdz>summary::-webkit-details-marker,
.jy-sub>summary::-webkit-details-marker,.np>summary::-webkit-details-marker,
.zd-sub>summary::-webkit-details-marker,.mb-sub>summary::-webkit-details-marker,.md-sub>summary::-webkit-details-marker{display:none}
.jyq>summary::after,.zdz>summary::after{
  content:"▾";position:absolute;right:18px;top:50%;transform:translateY(-50%);
  transition:transform .3s;color:#b3582a;
}
.jyq[open]>summary::after,.zdz[open]>summary::after{transform:translateY(-50%) rotate(180deg)}

/* ============ 3. 记忆区 jyq ============ */
.jyq{
  background:
    radial-gradient(circle at 100% 0,rgba(255,210,170,.3),transparent 30%),
    linear-gradient(180deg,#fffaf2,#fff5e8);
}
.jy-sub{
  margin:10px 12px;
  background:#fffefb;
  border:1px solid #e8d4a8;
  border-radius:8px;
  padding:0;
  box-shadow:0 2px 6px -3px rgba(160,110,60,.2);
}
.jy-sub>summary{
  cursor:pointer;list-style:none;
  padding:8px 14px;
  font-size:.85em;
  background:linear-gradient(90deg,#fbe9c8,transparent);
  border-bottom:1px dashed #d9b88a;
  color:#8a5a2a;letter-spacing:1px;
  position:relative;
}
.jy-sub>summary::after{
  content:"+";position:absolute;right:14px;top:50%;transform:translateY(-50%);
  font-weight:700;color:#b3582a;transition:transform .3s;
}
.jy-sub[open]>summary::after{transform:translateY(-50%) rotate(45deg)}
.jy-sub table{
  width:100%;border-collapse:collapse;
  font-size:.82em;margin:0;background:transparent;
}
.jy-sub th{
  background:linear-gradient(180deg,#fff0d4,#fde4b8);
  color:#7a4a1e;font-weight:600;letter-spacing:1px;
  padding:7px 8px;text-align:left;
  border-bottom:2px solid #e3cba0;font-size:.92em;
}
.jy-sub td{
  padding:7px 8px;
  border-bottom:1px dashed rgba(200,160,100,.4);
  color:#3a2e26;line-height:1.6;
  vertical-align:top;
}
.jy-sub tr:hover td{background:rgba(255,230,190,.35)}
.jy-sub td:first-child{
  color:#b3582a;font-weight:600;font-family:"Georgia",serif;
  white-space:nowrap;font-size:.92em;
}

/* ============ 4. 人物档案 zdz ============ */
.zdz{
  background:
    linear-gradient(135deg,rgba(180,210,220,.2),transparent 40%),
    linear-gradient(180deg,#fdfaf3,#fbf2e2);
}
.zdz>summary{
  background:linear-gradient(90deg,#d4ebf0,#f5d8a8);
  color:#3a5a6a;
}
.zdz>summary::after{color:#3a5a6a}
.np,.zd-sub,.mb-sub,.md-sub{
  margin:10px 12px;
  background:#fffefb;
  border:1px solid #d8c8a8;
  border-radius:8px;
  box-shadow:0 2px 6px -3px rgba(120,100,70,.2);
  overflow:hidden;
}
.np>summary,.zd-sub>summary,.mb-sub>summary,.md-sub>summary{
  cursor:pointer;list-style:none;
  padding:8px 14px;
  font-size:.85em;letter-spacing:1px;
  border-bottom:1px dashed #d9b88a;
  position:relative;
  font-weight:600;
}
.np>summary{background:linear-gradient(90deg,#e8f0d8,transparent);color:#5a7030}
.zd-sub>summary{background:linear-gradient(90deg,#f3d8e3,transparent);color:#8a3a5a}
.md-sub>summary{background:linear-gradient(90deg,#d8e3f0,transparent);color:#3a5a8a}
.mb-sub>summary{background:linear-gradient(90deg,#f0e4d8,transparent);color:#8a673a}
.np>summary::after,.zd-sub>summary::after,.mb-sub>summary::after,.md-sub>summary::after{
  content:"▸";position:absolute;right:14px;top:50%;
  transform:translateY(-50%);transition:transform .3s;opacity:.6;
}
.np[open]>summary::after,.zd-sub[open]>summary::after,.mb-sub[open]>summary::after,.md-sub[open]>summary::after{
  transform:translateY(-50%) rotate(90deg);
}

/* 基础信息：列表行美化为资料卡条目 */
.np ul{list-style:none;padding:10px 14px;margin:0}
.np li{
  padding:6px 0;
  border-bottom:1px dotted rgba(180,140,90,.3);
  font-size:.88em;line-height:1.7;
  color:#3a2e26;
  position:relative;padding-left:14px;
}
.np li::before{
  content:"◆";position:absolute;left:0;top:6px;
  color:#b3582a;font-size:.7em;
}
.np li:last-child{border-bottom:none}
.np li strong{color:#8a3a5a}

/* 关键转变：便签贴纸 */
.zd-sub ul{list-style:none;padding:10px 14px;margin:0}
.zd-sub li{
  background:linear-gradient(135deg,#fff5e8,#fce8d0);
  border-left:3px solid #d9533a;
  padding:8px 12px;
  margin:0 0 8px;
  border-radius:0 6px 6px 0;
  font-size:.85em;line-height:1.65;
  box-shadow:0 1px 3px rgba(160,110,60,.15);
  position:relative;
}
.zd-sub li strong{
  color:#a02828;background:rgba(255,220,200,.6);
  padding:0 4px;border-radius:3px;font-weight:700;
}

/* 关键转变：便签贴纸 */
.mb-sub ul{list-style:none;padding:8px 10px;margin:0}
.mb-sub li{
  background:linear-gradient(135deg,#ffe8e8,#fcd0d0);
  border-left:3px solid #d93a3a;
  padding:6px 9px;
  margin:0 0 8px;
  border-radius:0 8px 8px 0;
  font-size:.85em;line-height:1.65;
  box-shadow:0 1px 3px rgba(160,60,60,.15);
  position:relative;
}
.mb-sub li strong{
  color:#a02828;background:rgba(255,200,200,.6);
  padding:0 4px;border-radius:5px;font-weight:700;
}

/* 锚点池：行囊清单 */
.md-sub ul{list-style:none;padding:10px 14px;margin:0}
.md-sub li{
  padding:7px 10px 7px 26px;
  margin:0 0 5px;
  background:linear-gradient(90deg,#eef4fc,transparent);
  border-radius:5px;
  font-size:.85em;line-height:1.6;
  position:relative;
  border:1px dashed transparent;
  transition:.2s;
}
.md-sub li::before{
  content:"🪢";position:absolute;left:6px;top:6px;font-size:.9em;
}
.md-sub li:hover{border-color:#a8c4dc;background:linear-gradient(90deg,#dceaf5,transparent)}

/* ============ PC 档案 pcz（紫罗兰暮光主题） ============ */
.pcz{
  font-family:"PingFang SC","Hiragino Sans GB","Microsoft YaHei",-apple-system,sans-serif;
  color:#3a2e26;
  box-sizing:border-box;
  max-width:100%;
  margin:14px auto;
  background:
    radial-gradient(circle at 0% 100%,rgba(200,170,220,.28),transparent 45%),
    radial-gradient(circle at 100% 0,rgba(255,200,220,.22),transparent 40%),
    linear-gradient(180deg,#fbf6fb,#f2e6f2);
  border:1px solid #c8a8d0;
  border-radius:12px;
  padding:0;
  box-shadow:0 4px 12px -6px rgba(120,80,140,.28);
  overflow:hidden;
  position:relative;
}
.pcz *{box-sizing:border-box}
/* 顶部彩带,与 shu 呼应但换成紫粉金三段 */
.pcz::before{
  content:"";position:absolute;left:0;right:0;top:0;height:3px;
  background:linear-gradient(90deg,#a060c0,#e88ab0,#f0c878);
}

.pcz>summary{
  cursor:pointer;list-style:none;
  padding:11px 16px 11px 18px;
  font-size:.95em;letter-spacing:1.5px;
  background:linear-gradient(90deg,#d8b8e0,#f0d8e8 60%,#f5e0d0);
  border-bottom:1px solid #c8a8d0;
  color:#5a2a7a;
  position:relative;
  font-weight:700;
}
.pcz>summary::-webkit-details-marker{display:none}
.pcz>summary::before{
  content:"✦";margin-right:8px;color:#a060c0;
  text-shadow:0 1px 0 #fff;
}
.pcz>summary::after{
  content:"▾";position:absolute;right:18px;top:50%;transform:translateY(-50%);
  transition:transform .3s;color:#7a3aa0;
}
.pcz[open]>summary::after{transform:translateY(-50%) rotate(180deg)}

/* PC 的子折叠块 */
.pc-info,.pc-mb-sub{
  margin:10px 12px;
  background:#fffcfe;
  border:1px solid #d8c0e0;
  border-radius:8px;
  box-shadow:0 2px 6px -3px rgba(120,80,140,.22);
  overflow:hidden;
}
.pc-info>summary,.pc-mb-sub>summary{
  cursor:pointer;list-style:none;
  padding:8px 14px;
  font-size:.85em;letter-spacing:1px;
  border-bottom:1px dashed #c8a8d0;
  position:relative;
  font-weight:600;
}
.pc-info>summary::-webkit-details-marker,
.pc-mb-sub>summary::-webkit-details-marker{display:none}
.pc-info>summary{background:linear-gradient(90deg,#e8d8f0,transparent);color:#5a3a7a}
.pc-mb-sub>summary{background:linear-gradient(90deg,#f0d8e0,transparent);color:#8a3a6a}
.pc-info>summary::after,.pc-mb-sub>summary::after{
  content:"▸";position:absolute;right:14px;top:50%;
  transform:translateY(-50%);transition:transform .3s;opacity:.6;
}
.pc-info[open]>summary::after,.pc-mb-sub[open]>summary::after{
  transform:translateY(-50%) rotate(90deg);
}

.pc-st,.pc-md{
  display:flex;align-items:center;gap:8px;
  padding:8px 10px;border-radius:8px;
  font-size:.83em;line-height:1.5;
  background:linear-gradient(135deg,#fffcfe,#f2e6f2);
  border:1px solid #d8c0e0;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.6);
}
.pc-st i,.pc-md i{
  flex:none;width:24px;height:24px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  background:linear-gradient(135deg,#e8d0f0,#c8a0d8);
  font-size:.85em;box-shadow:0 1px 2px rgba(120,80,140,.25);
  font-style:normal;
}
.pc-md i{background:linear-gradient(135deg,#fce0e8,#e8a0c0)}

/* NPC 对 PC 好感度容器 —— 卡片纵向堆叠 */
.pc-fv-wrap{
  padding:6px 14px 12px;
  display:grid;grid-template-columns:1fr;gap:8px;
}

/* 单条好感度徽章（紫罗兰主题，与 np-fv 珊瑚粉形成冷暖对照） */
.pc-fv{
  padding:11px 13px 10px;
  background:
    radial-gradient(circle at 0% 100%,rgba(200,160,220,.28),transparent 50%),
    linear-gradient(180deg,#faf3fb,#efdff0);
  border:1px solid #c8a8d0;border-radius:10px;
  box-shadow:0 2px 6px -3px rgba(120,80,140,.22),inset 0 1px 0 rgba(255,255,255,.5);
  position:relative;overflow:hidden;
  transition:transform .2s;
}
.pc-fv:hover{transform:translateY(-1px)}
.pc-fv::before{
  content:"";position:absolute;bottom:-22px;right:-22px;
  width:76px;height:76px;border-radius:50%;
  background:radial-gradient(circle,rgba(180,120,200,.18),transparent 65%);
}
.pc-fv-hd{
  display:flex;align-items:center;flex-wrap:wrap;gap:6px 10px;
  margin-bottom:8px;font-size:.85em;position:relative;
}
.pc-fv-nm{font-weight:700;color:#5a2a7a;letter-spacing:.5px}
.pc-fv-lv{
  display:inline-block;padding:2px 9px;border-radius:10px;
  background:linear-gradient(135deg,#a060c0,#7040a0);
  color:#fff;font-weight:700;font-size:.85em;
  font-family:"Georgia",serif;letter-spacing:.5px;
  box-shadow:0 2px 4px rgba(120,60,180,.35),inset 0 1px 0 rgba(255,255,255,.3);
}
.pc-fv-tg{
  color:#6a3888;font-weight:600;
  padding:1px 7px;border:1px dashed #b090c0;border-radius:4px;
  background:rgba(255,255,255,.55);font-size:.92em;
}
.pc-fv-vl{
  margin-left:auto;color:#7a4898;font-weight:600;
  font-family:"Georgia",serif;font-size:.92em;
  font-variant-numeric:tabular-nums;
}
.pc-fv-br{
  height:8px;border-radius:5px;
  background:linear-gradient(180deg,#e8d8ee,#d8c0e0);
  box-shadow:inset 0 1px 2px rgba(80,40,120,.22);
  overflow:hidden;position:relative;
}
.pc-fv-br i{
  display:block;height:100%;
  background:linear-gradient(90deg,#c890e0,#a060c8 60%,#7038a0);
  border-radius:5px;
  box-shadow:0 0 6px rgba(160,96,200,.5),inset 0 1px 0 rgba(255,255,255,.4);
  position:relative;
  transition:width .6s ease;
}
.pc-fv-br i::after{
  content:"";position:absolute;right:0;top:50%;transform:translate(50%,-50%);
  width:10px;height:10px;border-radius:50%;
  background:radial-gradient(circle,#fff,#c890e0);
  box-shadow:0 0 6px rgba(200,144,224,.7);
}

/* PC 长期目标：紫粉便签 */
.pc-mb-sub ul{list-style:none;padding:8px 10px;margin:0}
.pc-mb-sub li{
  background:linear-gradient(135deg,#f5eaf5,#e8d0ee);
  border-left:3px solid #a060c0;
  padding:6px 9px;
  margin:0 0 8px;
  border-radius:0 8px 8px 0;
  font-size:.85em;line-height:1.65;
  box-shadow:0 1px 3px rgba(120,60,160,.15);
  position:relative;
}
.pc-mb-sub li::before{
  content:"✧";position:absolute;left:-14px;top:6px;
  color:#a060c0;font-size:.9em;
}
.pc-mb-sub li strong{
  color:#7a2898;background:rgba(220,180,240,.55);
  padding:0 4px;border-radius:5px;font-weight:700;
}

/* 移动端 */
@media (max-width:640px){
  .pc-fv-wrap{padding:6px 10px 10px}
  .pc-info,.pc-mb-sub{margin:8px}
}

/* ============ 5. 互动引导 xdt ============ */
.xdt{
  position:relative;
  background:
    repeating-linear-gradient(90deg,transparent 0,transparent 6px,rgba(160,110,60,.04) 6px,rgba(160,110,60,.04) 7px),
    linear-gradient(180deg,#fbf2dd,#f5e6c4);
  border:1px solid #c9a878;
  border-radius:12px;
  padding:14px 16px 6px;
  margin:14px 2px;
  box-shadow:
    0 6px 16px -8px rgba(140,90,40,.3),
    inset 0 1px 0 rgba(255,255,255,.5),
    inset 0 -2px 0 rgba(140,90,40,.1);
}
.xdt::before,.xdt::after{
  content:"";position:absolute;top:50%;transform:translateY(-50%);
  width:8px;height:8px;border-radius:50%;
  background:radial-gradient(circle,#fff,#8a6a3a);
  box-shadow:0 0 0 2px rgba(140,90,40,.2);
}
.xdt::before{left:6px}
.xdt::after{right:6px}
.xd-sd{
  font-size:.92em;color:#7a4a1e;
  padding-bottom:6px;border-bottom:1px dashed #c9a878;
  margin-bottom:8px;letter-spacing:.5px;
}
.xd-sd strong{color:#a03828}
.xd-xz{
  font-size:.85em;color:#5a4a3a;
  background:rgba(255,250,235,.7);
  padding:7px 11px;border-radius:6px;
  border-left:3px solid #c9a878;
  margin-bottom:10px;line-height:1.6;
}
.xd-xz em{color:#a03828;font-style:normal;font-weight:600;margin-right:4px}
.xd-hd{
  font-size:.95em;color:#7a4a1e;font-weight:700;
  letter-spacing:1.5px;margin:8px 0 6px;
}

/* 三个代码块差异化 */
.xdt pre{
  position:relative;
  margin:8px 0 !important;
  padding:11px 14px 11px 42px !important;
  border-radius:8px !important;
  font-family:"PingFang SC","Microsoft YaHei",sans-serif !important;
  font-size:.9em !important;
  line-height:1.7 !important;
  white-space:pre-wrap !important;
  word-break:break-word !important;
  box-shadow:0 2px 6px -2px rgba(0,0,0,.15),inset 0 1px 0 rgba(255,255,255,.5) !important;
  border:1px solid transparent !important;
  overflow:visible !important;
}
.xdt pre code{
  background:transparent !important;
  padding:0 !important;
  font-family:inherit !important;
  font-size:inherit !important;
  color:inherit !important;
  white-space:pre-wrap !important;
}
.xdt pre::before{
  position:absolute;left:10px;top:50%;transform:translateY(-50%);
  width:24px;height:24px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  font-size:.9em;font-weight:700;color:#fff;
  box-shadow:0 2px 4px rgba(0,0,0,.2);
}
/* A 日常 - 沙金 */
.xdt pre:nth-of-type(1){
  background:linear-gradient(135deg,#fff5dc,#fce6b8) !important;
  border-color:#e0b870 !important;color:#6a4818 !important;
}
.xdt pre:nth-of-type(1)::before{content:"A";background:linear-gradient(135deg,#e0a040,#b37828)}
/* B 性爱 - 珊瑚 */
.xdt pre:nth-of-type(2){
  background:linear-gradient(135deg,#ffe4e0,#ffc8c0) !important;
  border-color:#e88878 !important;color:#8a2828 !important;
}
.xdt pre:nth-of-type(2)::before{content:"B";background:linear-gradient(135deg,#e85858,#b32828)}
/* C 恋爱 - 海蓝 */
.xdt pre:nth-of-type(3){
  background:linear-gradient(135deg,#dcebf5,#bcd8e8) !important;
  border-color:#6a9cb8 !important;color:#1a4868 !important;
}
.xdt pre:nth-of-type(3)::before{content:"C";background:linear-gradient(135deg,#4080a8,#1a5070)}

.xdt pre:hover{transform:translateY(-1px);transition:transform .2s}
/* ============ 基础信息卡升级 ============ */
.np[open]>summary{border-bottom:1px solid #d8c8a8}

/* 状态横幅 */
.np-bn{
  display:grid;grid-template-columns:1fr 1fr;gap:8px;
  padding:12px 14px 4px;
}
.np-st,.np-md{
  display:flex;align-items:center;gap:8px;
  padding:8px 10px;border-radius:8px;
  font-size:.83em;line-height:1.5;
  background:linear-gradient(135deg,#fffefb,#f5ecd8);
  border:1px solid #e3d4ab;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.6);
}
.np-st i,.np-md i{
  flex:none;width:24px;height:24px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  background:linear-gradient(135deg,#fce8c8,#e8c89a);
  font-size:.85em;box-shadow:0 1px 2px rgba(140,90,40,.2);
  font-style:normal;
}
.np-md i{background:linear-gradient(135deg,#fce0e0,#f0b0b8)}

/* 好感度徽章 + 进度条 */
.np-fv{
  margin:10px 14px;padding:11px 13px 10px;
  background:
    radial-gradient(circle at 100% 0,rgba(255,180,200,.25),transparent 45%),
    linear-gradient(180deg,#fff5f0,#ffe8e0);
  border:1px solid #e8b8b0;border-radius:10px;
  box-shadow:0 2px 6px -3px rgba(180,80,80,.2),inset 0 1px 0 rgba(255,255,255,.5);
  position:relative;overflow:hidden;
}
.np-fv::before{
  content:"";position:absolute;top:-20px;right:-20px;
  width:70px;height:70px;border-radius:50%;
  background:radial-gradient(circle,rgba(255,150,160,.18),transparent 65%);
}
.np-fv-hd{
  display:flex;align-items:center;flex-wrap:wrap;gap:6px 10px;
  margin-bottom:8px;font-size:.85em;position:relative;
}
.np-fv-nm{font-weight:700;color:#8a2838;letter-spacing:.5px}
.np-fv-lv{
  display:inline-block;padding:2px 9px;border-radius:10px;
  background:linear-gradient(135deg,#d9533a,#a02828);
  color:#fff;font-weight:700;font-size:.85em;
  font-family:"Georgia",serif;letter-spacing:.5px;
  box-shadow:0 2px 4px rgba(160,40,40,.35),inset 0 1px 0 rgba(255,255,255,.3);
}
.np-fv-tg{
  color:#7a3848;font-weight:600;
  padding:1px 7px;border:1px dashed #c08890;border-radius:4px;
  background:rgba(255,255,255,.5);font-size:.92em;
}
.np-fv-vl{
  margin-left:auto;color:#a04848;font-weight:600;
  font-family:"Georgia",serif;font-size:.92em;
  font-variant-numeric:tabular-nums;
}
.np-fv-br{
  height:8px;border-radius:5px;
  background:linear-gradient(180deg,#f0d8d0,#e8c0b8);
  box-shadow:inset 0 1px 2px rgba(140,40,40,.2);
  overflow:hidden;position:relative;
}
.np-fv-br i{
  display:block;height:100%;
  background:
    linear-gradient(90deg,#ff9080,#e8506a 60%,#c83858);
  border-radius:5px;
  box-shadow:0 0 6px rgba(232,80,106,.5),inset 0 1px 0 rgba(255,255,255,.4);
  position:relative;
  transition:width .6s ease;
}
.np-fv-br i::after{
  content:"";position:absolute;right:0;top:50%;transform:translate(50%,-50%);
  width:10px;height:10px;border-radius:50%;
  background:radial-gradient(circle,#fff,#ff8090);
  box-shadow:0 0 6px rgba(255,120,140,.7);
}

/* 四维隐藏数值 */
.np-dm{
  display:grid;grid-template-columns:1fr 1fr;
  gap:6px 10px;padding:4px 14px 10px;
}
.np-dm-it{
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;gap:8px;
  font-size:.8em;
  padding:5px 9px;
  background:rgba(255,253,245,.7);
  border-radius:6px;
  border:1px solid rgba(200,170,120,.3);
}
.np-dm-it b{color:#5a4830;font-weight:600;white-space:nowrap}
.np-dm-it em{
  font-style:normal;font-family:"Georgia",serif;
  color:#7a4a1e;font-weight:700;
  font-variant-numeric:tabular-nums;
  min-width:24px;text-align:right;font-size:.95em;
}
.np-dm-br{
  height:6px;border-radius:4px;
  background:linear-gradient(180deg,#ede0c8,#e0d0b0);
  box-shadow:inset 0 1px 2px rgba(120,80,40,.2);
  overflow:hidden;
}
.np-dm-br i{
  display:block;height:100%;border-radius:4px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.4);
  transition:width .6s ease;
}
/* 四色：信任=金/欲望=红/共鸣=青/羁绊=紫 */
.np-tr i{background:linear-gradient(90deg,#f0c878,#d99838)}
.np-ds i{background:linear-gradient(90deg,#ff8878,#d83848)}
.np-rs i{background:linear-gradient(90deg,#88c8d8,#3888a8)}
.np-bd i{background:linear-gradient(90deg,#b890d0,#7848a0)}

/* 性事统计双栏 */
.np-sx{
  display:grid;grid-template-columns:1fr 1fr;gap:8px;
  padding:0 14px 12px;
}
.np-sx-it{
  position:relative;
  padding:9px 12px 8px;
  border-radius:8px;
  border:1px solid;
  background:linear-gradient(180deg,rgba(255,255,255,.6),rgba(255,255,255,.2));
  box-shadow:0 1px 4px rgba(120,60,80,.12),inset 0 1px 0 rgba(255,255,255,.6);
}
.np-sx-a{background-color:#eef0fa;border-color:#a8b0d8}
.np-sx-b{background-color:#fae8ef;border-color:#d8a0b8}
.np-sx-it b{
  display:block;font-size:.78em;letter-spacing:2px;
  margin-bottom:4px;padding-bottom:4px;
  border-bottom:1px dashed currentColor;font-weight:700;
}
.np-sx-a b{color:#4858a0}
.np-sx-b b{color:#a04060}
.np-sx-it p{
  display:flex;justify-content:space-between;align-items:baseline;
  margin:3px 0;font-size:.78em;
}
.np-sx-it p span{color:#5a4a3a;opacity:.85}
.np-sx-it p em{
  font-style:normal;font-family:"Georgia",serif;
  font-weight:700;font-size:1.15em;
  font-variant-numeric:tabular-nums;
}
.np-sx-a p em{color:#3848a0}
.np-sx-b p em{color:#a02858}

/* 移动端 */
@media (max-width:640px){
  .np-bn,.np-dm,.np-sx{grid-template-columns:1fr;padding-left:10px;padding-right:10px}
  .np-fv{margin:8px 10px}
}

/* ============ 移动端适配 ============ */
@media (max-width:640px){
  .sh-gd{grid-template-columns:repeat(2,1fr)}
  .sh-it{border-right:1px dashed rgba(180,130,80,.3);border-bottom:1px dashed rgba(180,130,80,.3)}
  .sh-it:nth-child(2n){border-right:none}
  .sh-ct{grid-column:1/-1;border-bottom:none}
  .sh-hd{flex-direction:column;align-items:flex-start;gap:3px}
  .zwx{padding:16px 12px 16px 18px;font-size:.96em;line-height:1.85}
  .jy-sub{margin:8px}
  .jy-sub table{font-size:.76em}
  .jy-sub th,.jy-sub td{padding:5px 6px}
  .np,.zd-sub,.mb-sub,.md-sub{margin:8px}
  .xdt{padding:12px 12px 4px}
  .xdt pre{font-size:.86em !important;padding:10px 12px 10px 38px !important}
}
/* 结局标题卡 */
.end-title{
  background:
    linear-gradient(135deg, rgba(139,106,58,0.95) 0%, rgba(168,128,74,0.95) 50%, rgba(139,106,58,0.95) 100%),
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="50" font-size="80" opacity="0.03" fill="%23fff">終</text></svg>') center/cover;
  border:2px solid #8b6a3a;
  border-radius:12px;
  padding:28px 24px;
  margin:20px 0;
  text-align:center;
  box-shadow:
    0 6px 20px rgba(80,50,20,.35),
    inset 0 0 0 6px rgba(255,255,255,.15),
    inset 0 0 0 7px rgba(139,106,58,.4);
  position:relative;
  overflow:hidden;
}

.end-title::before{
  content:"";
  position:absolute;
  top:0;left:0;right:0;bottom:0;
  background:
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 10px,
      rgba(255,255,255,.03) 10px,
      rgba(255,255,255,.03) 20px
    );
  pointer-events:none;
}

.end-badge{
  display:inline-block;
  background:rgba(255,248,224,.25);
  color:#fff8e0;
  font-size:12px;
  letter-spacing:3px;
  padding:4px 16px;
  border:1px solid rgba(255,248,224,.4);
  border-radius:20px;
  margin-bottom:12px;
  font-weight:600;
  text-transform:uppercase;
  box-shadow:0 2px 8px rgba(0,0,0,.2);
}

.end-name{
  font-size:32px;
  font-weight:900;
  color:#fff8e0;
  letter-spacing:4px;
  margin:16px 0;
  text-shadow:
    2px 2px 0 rgba(80,50,20,.4),
    4px 4px 12px rgba(0,0,0,.3);
  font-family:"Noto Serif SC","Source Han Serif SC",serif;
  position:relative;
  z-index:1;
}

.end-time{
  font-size:13px;
  color:#f4e6c8;
  letter-spacing:2px;
  font-family:Consolas,monospace;
  opacity:.9;
  margin-top:8px;
}

/* 结局叙事区 - 继承zwx样式并增强 */
.zwx h3{
  font-size:22px;
  color:#5c3d18;
  text-align:center;
  margin:24px 0 16px;
  padding:0 0 12px;
  border-bottom:2px double #c9a96a;
  letter-spacing:3px;
  font-weight:700;
  text-indent:0;
  position:relative;
  z-index:1;
}

.zwx h3::before{
  content:"◆";
  color:#c8a45c;
  margin-right:8px;
  font-size:.85em;
}

.zwx h3::after{
  content:"◆";
  color:#c8a45c;
  margin-left:8px;
  font-size:.85em;
}

.zwx hr{
  border:none;
  height:2px;
  background:linear-gradient(
    to right,
    transparent,
    #c9a96a 20%,
    #c9a96a 80%,
    transparent
  );
  margin:28px auto;
  width:80%;
  position:relative;
  z-index:1;
}

.zwx hr::before{
  content:"❖";
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  background:#f8f4e8;
  color:#c8a45c;
  padding:0 12px;
  font-size:14px;
}

/* 结局致谢 */
.end-thanks{
  background:linear-gradient(135deg,#faf6ec 0%,#f3ead4 100%);
  border:2px solid #c9a96a;
  border-radius:10px;
  padding:32px 24px;
  margin:24px 0;
  text-align:center;
  box-shadow:
    0 4px 16px rgba(120,90,40,.2),
    inset 0 0 0 4px rgba(255,255,255,.6);
  position:relative;
}

.end-thanks::before{
  content:"";
  position:absolute;
  top:0;left:0;right:0;bottom:0;
  background:
    radial-gradient(circle at 30% 40%, rgba(200,164,92,.08) 0%, transparent 60%),
    radial-gradient(circle at 70% 60%, rgba(139,106,58,.06) 0%, transparent 60%);
  pointer-events:none;
}

.end-thanks p{
  margin:10px 0;
  color:#5c3d18;
  font-size:15px;
  line-height:1.8;
  position:relative;
  z-index:1;
}

.end-thanks p:first-child,
.end-thanks p:last-child{
  color:#c8a45c;
  font-size:13px;
  letter-spacing:8px;
  opacity:.6;
}

.end-thanks p b{
  font-size:20px;
  font-weight:700;
  letter-spacing:4px;
  color:#6b4226;
  display:block;
  margin:8px 0;
  text-shadow:1px 1px 0 rgba(255,255,255,.8);
}

.end-thanks p:nth-child(3),
.end-thanks p:nth-child(4){
  font-size:14px;
  color:#8b6a3a;
  letter-spacing:1px;
}

/* 响应式适配 */
@media(max-width:600px){
  .end-title{
    padding:20px 16px;
  }
  
  .end-name{
    font-size:24px;
    letter-spacing:2px;
  }
  
  .end-badge{
    font-size:11px;
    padding:3px 12px;
    letter-spacing:2px;
  }
  
  .end-time{
    font-size:12px;
  }
  
  .zwx h3{
    font-size:18px;
    letter-spacing:2px;
  }
  
  .end-thanks{
    padding:24px 16px;
  }
  
  .end-thanks p b{
    font-size:17px;
    letter-spacing:3px;
  }
}