/* ========== 思维链·隐藏 ========== */
think {
  display: none;
}

/* ========== 世界状态栏·古风卷轴题头（缩小版） ========== */
top {
  display: block;
  margin: 8px auto 14px;          /* 上下间距缩小 */
  padding: 6px 36px;              /* 内边距缩小 */
  background: 
    linear-gradient(90deg, 
      transparent 0%, 
      #a67c3a 3%, 
      #d4b985 12%, 
      #faf3e0 45%, 
      #faf3e0 55%, 
      #d4b985 88%, 
      #a67c3a 97%, 
      transparent 100%);
  border-top: 1px solid #8b6c3f;  /* 线条变细 */
  border-bottom: 1px solid #8b6c3f;
  text-align: center;
  font-family: "STKaiti", "KaiTi", "Ma Shan Zheng", serif;
  color: #4a3218;
  letter-spacing: 1.5px;
  position: relative;
  box-shadow: 
    inset 0 1px 0 rgba(255, 248, 225, 0.9),
    inset 0 -1px 0 rgba(255, 248, 225, 0.9),
    0 1px 4px rgba(107, 74, 43, 0.12);
}

top::before,
top::after {
  content: "❦";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #8b3a3a;
  font-size: 13px;               /* 花饰缩小 */
}
top::before { left: 10px; }      /* 位置微调 */
top::after { right: 10px; }

top time {
  display: inline-block;
  margin: 0 8px;
  font-size: 13px;               /* 字号缩小 */
  font-weight: 600;
  color: #3a2818;
}
top time::before { content: "「"; color: #a67c3a; margin-right: 1px; }
top time::after  { content: "」"; color: #a67c3a; margin-left: 1px; }

top loc {
  display: inline-block;
  margin: 0 8px;
  font-size: 12.5px;            /* 字号缩小 */
  color: #6b4a2b;
}
top loc::before { content: "『"; color: #a67c3a; margin-right: 1px; }
top loc::after  { content: "』"; color: #a67c3a; margin-left: 1px; }

/* ========== 正文·宣纸底（同款美化） ========== */
article {
  display: block;
  position: relative;
  margin: 16px 0;
  padding: 22px 20px;
  border-radius: 6px;
  background:
    radial-gradient(circle at 18% 22%, rgba(180,140,80,.06) 0, transparent 9px),
    radial-gradient(circle at 72% 64%, rgba(160,110,60,.05) 0, transparent 11px),
    linear-gradient(135deg,#f8f0db 0%,#f4e8cd 100%);
  border: 1px solid #d8c096;
  box-shadow: 0 2px 10px rgba(120,90,50,.12), inset 0 0 30px rgba(200,170,120,.15);
  color: #3a2e22;
  font-family: "STKaiti", "KaiTi", "Songti SC", serif;
  font-size: 16px;
  line-height: 1.95;
  letter-spacing: .5px;
}

article::before {
  content: "";
  position: absolute;
  top: 6px; left: 6px; right: 6px; bottom: 6px;
  border: 1px solid rgba(166,124,78,.25);
  border-radius: 4px;
  pointer-events: none;
}

article p {
  margin: 0 0 14px;
  text-indent: 2em;
}

article p:last-child {
  margin-bottom: 0;
}

/* ========== 苏蘅台词·青金渲染 ========== */
article .苏蘅 {
  color: #1a5c8a;
  font-weight: 600;
  text-shadow: 0 0 1px rgba(26, 92, 138, .25);
}

/* ========== 折叠面板·卷轴题签（保持标题样式） ========== */
details {
  margin: 10px 0;
  background: linear-gradient(180deg, #fdf6e3 0%, #f5e8c9 100%);
  border: 1px solid #c9a961;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(107, 74, 43, 0.10);
  overflow: hidden;
}

details summary {
  padding: 11px 20px 11px 36px;
  background: 
    linear-gradient(90deg, 
      #b8934f 0%, 
      #d4b985 25%, 
      #e8d5a1 50%, 
      #d4b985 75%, 
      #b8934f 100%);
  color: #3a2818;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 15px;
  font-weight: bold;
  letter-spacing: 3px;
  cursor: pointer;
  list-style: none;
  position: relative;
  border-bottom: 1px solid #a67c3a;
  text-shadow: 0 1px 0 rgba(255, 248, 225, 0.6);
  transition: background 0.35s;
}

details summary::-webkit-details-marker { display: none; }
details summary::before {
  content: "❖";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #6b4a2b;
  font-size: 13px;
  transition: transform 0.3s, color 0.3s;
}

details[open] summary::before {
  transform: translateY(-50%) rotate(90deg);
  color: #8b3a3a;
}

details summary:hover {
  background: 
    linear-gradient(90deg, 
      #c9a961 0%, 
      #e8d5a1 50%, 
      #c9a961 100%);
}

/* ========== 面板内部格式美化 ========== */
details > p {
  padding: 7px 22px;
  margin: 0;
  color: #3a2e22;
  font-family: "STKaiti", "KaiTi", "Songti SC", serif;
  font-size: 14px;
  line-height: 1.8;
  border-bottom: 1px dashed rgba(201, 169, 97, 0.35);
}
details > p:last-child { border-bottom: none; }

details .sub-title {
  margin: 10px 16px 4px;
  padding: 3px 10px;
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: #8b4a2b;
  background: rgba(200,160,100,.2);
  border-left: 3px solid #b8895a;
  border-radius: 0 3px 3px 0;
  letter-spacing: 2px;
}

details .sb-block {
  margin: 8px 22px;
  padding: 10px 14px;
  background: rgba(255, 248, 225, 0.55);
  border-left: 3px solid #c9a961;
  border-radius: 3px;
}

details .sb-block b {
  display: block;
  color: #8b3a3a;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 14px;
  margin-bottom: 6px;
  letter-spacing: 2px;
  border-bottom: 1px dotted #c9a961;
  padding-bottom: 4px;
}

details .sb-block p {
  padding: 3px 0;
  margin: 0;
  border-bottom: none;
  font-size: 13.5px;
  color: #3a2e22;
}

/* ========== 子信息块 sb-block（格式统一） ========== */
details .sb-block {
  background: #FFFEF5;
  border: 1px dashed #FFE082;
  border-radius: 8px;
  padding: 8px 12px;
  margin: 8px 14px;
}

details .sb-block b {
  color: #F57F17;
  font-size: 0.88em;
  display: block;
  margin-bottom: 4px;
  letter-spacing: 1px;           /* 保留一点古风呼吸感 */
  border-bottom: none;           /* 去掉原来的下划线 */
}

details .sb-block p {
  margin: 4px 0;
  font-size: 0.85em;
  line-height: 1.6;
  color: #5D4037;
  border-bottom: none;           /* 确保无多余线条 */
}

/* ========== 记忆回廊：可横向滑动 ========== */
details .mem-title {
  margin: 8px 0 6px;
  text-align: center;
  font-weight: 600;
  color: #8b4a2b;
  font-size: 13px;
  letter-spacing: 1px;
}

details .mem-scroll {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 8px;
  background: rgba(255,255,255,.7);
  border: 1px dashed #d4b985;
  margin: 8px 12px 14px;
}

details .mem-scroll::-webkit-scrollbar {
  height: 4px;
}

details .mem-scroll::-webkit-scrollbar-thumb {
  background: #d4b985;
  border-radius: 2px;
}

details .mem-scroll table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 12.5px;
  color: #3a2e22;
  background: rgba(255,250,238,.6);
}

details .mem-scroll th {
  background: #d4b985;
  color: #3a2e22;
  padding: 6px 8px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px dashed #c9a961;
}

details .mem-scroll td {
  padding: 6px 8px;
  border-bottom: 1px dashed #d4b985;
  vertical-align: top;
  word-break: break-word;
}

details .mem-scroll tr:nth-child(even) td {
  background: rgba(255,244,217,.35);
}

details .mem-scroll tr:last-child td {
  border-bottom: none;
}

/* ========== 移动端适配 ========== */
@media (max-width: 480px) {
  article {
    padding: 16px 14px;
    font-size: 15px;
    line-height: 1.85;
  }
  
  article p {
    text-indent: 2em;
  }
  
  details summary {
    font-size: 14px;
    padding: 10px 14px 10px 36px;
  }
  
  details > p {
    font-size: 13.5px;
    padding: 0 14px;
  }
  
  details .mem-scroll table {
    font-size: 11px;
  }
  
  details .mem-scroll th,
  details .mem-scroll td {
    padding: 5px 3px;
  }
  
  details .sub-title {
    margin: 8px 14px 4px;
  }
}