/* ═══════════════════════════════════════════
   埃尔德里亚 · 原初刻记 CSS
   风格：轻小说 / 干净明亮 / 白色背景
   ═══════════════════════════════════════════ */

ai {
  display: block;
  max-width: 100%;
  padding: 20px;
  background: #ffffff;
  color: #1a1a1a;
  line-height: 1.85;
  border-radius: 8px;
  border: 1px solid #e5e5e5;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

/* ── 隐藏元素 ── */
.think-box, cot {
  display: none;
}

/* ── 顶部时间地点栏 ── */
.time-location {
  background: #f8f8f8;
  color: #333333;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 0.88em;
  letter-spacing: 0.5px;
  position: relative;
  border-left: 3px solid #7c6ff0;
}

.time-location summary {
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  color: #7c6ff0;
  list-style: none;
  letter-spacing: 1px;
}

.time-location summary::-webkit-details-marker { display: none; }

/* ── 区域日报 ── */
.news-panel {
  border-top: 2px solid #c9a96e;
  background: #fffdf8;
}

.news-panel summary {
  color: #c9a96e;
  font-size: 0.92em;
}

.news-masthead {
  text-align: center;
  padding: 8px 0 12px;
  border-bottom: 2px double #d8c8a8;
  margin-bottom: 14px;
}

.news-masthead strong {
  display: block;
  font-size: 1.1em;
  letter-spacing: 2px;
  color: #1a1a1a;
}

.news-masthead span {
  display: block;
  font-size: 0.75em;
  color: #8a7a5c;
  margin-top: 2px;
  letter-spacing: 1px;
}

.news-item {
  padding: 10px 0;
  border-bottom: 1px dashed #e8e0d0;
}

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

.news-item h4 {
  font-size: 0.92em;
  color: #1a1a1a;
  margin: 0 0 4px;
  letter-spacing: 0.5px;
}

.news-item p {
  font-size: 0.85em;
  color: #555555;
  line-height: 1.7;
  margin: 0;
}

/* ── 分割线 ── */
hr {
  border: none;
  height: 1px;
  background: #eeeeee;
  margin: 18px 0;
}

/* ── 正文区 ── */
text {
  display: block;
  padding: 8px 4px;
  background: transparent;
  border: none;
  margin-bottom: 12px;
  font-size: 1em;
  letter-spacing: 0.2px;
}

text p {
  margin: 0 0 12px 0;
  text-indent: 0;
}

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

/* ── 状态栏通用 ── */
details {
  background: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  padding: 0;
  margin-bottom: 8px;
  transition: box-shadow 0.2s ease;
  overflow: hidden;
}

details:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

details summary {
  font-weight: 600;
  color: #1a1a1a;
  cursor: pointer;
  user-select: none;
  padding: 10px 14px 10px 32px;
  list-style: none;
  position: relative;
  background: #fafafa;
  letter-spacing: 0.5px;
  font-size: 0.92em;
}

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

details summary::before {
  content: "▸";
  position: absolute;
  left: 12px;
  color: #7c6ff0;
  font-size: 0.8em;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.2s ease, color 0.2s;
}

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

details[open] summary {
  border-bottom: 1px solid #eeeeee;
  margin-bottom: 0;
}

details > *:not(summary) {
  padding: 10px 14px;
}

/* ── 玩家面板 ── */
.player-panel {
  border-top: 2px solid #7c6ff0;
}

.player-panel summary {
  color: #7c6ff0;
  font-size: 1em;
}

/* ── 职业与技能 ── */
.skills-panel {
  border-top: 2px solid #4caf93;
}

.skills-panel summary {
  color: #4caf93;
}

/* ── 装备与物品 ── */
.weapon-panel {
  border-top: 2px solid #e8a75c;
}

.weapon-panel summary {
  color: #e8a75c;
}

/* 备用物品栏样式 */
.inventory-panel {
  border-top: 2px solid #e8a75c;
}

/* ── 交互角色 ── */
.npc-panel, .locked-npc-panel {
  border-top: 2px solid #d46b8e;
}

.npc-panel summary, .locked-npc-panel summary {
  color: #d46b8e;
}

/* ── 任务面板 ── */
.task-panel {
  border-top: 2px solid #5b8fd9;
}

.task-panel summary {
  color: #5b8fd9;
}

/* ── 周边动态 ── */
.surroundings-panel {
  border-top: 2px solid #67b7c7;
}

.surroundings-panel summary {
  color: #67b7c7;
}

/* ── 记忆区 ── */
.memory-panel {
  border-top: 2px solid #8fa3b8;
  font-size: 0.88em;
}

.memory-panel summary {
  color: #8fa3b8;
}

.memory-panel table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95em;
}

.memory-panel th, .memory-panel td {
  padding: 6px 10px;
  border-bottom: 1px solid #f0f0f0;
  text-align: left;
}

.memory-panel th {
  background: #fafafa;
  color: #8fa3b8;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.memory-panel tr:hover td {
  background: #f8f8f8;
}

/* ── 行动选项 ── */
.action-panel {
  border-top: 2px solid #7c6ff0;
}

.action-panel summary {
  color: #7c6ff0;
  font-size: 1em;
}

.action-panel ol {
  margin: 0;
  padding-left: 20px;
}

.action-panel li {
  margin: 6px 0;
  color: #1a1a1a;
  transition: all 0.18s;
  cursor: pointer;
  letter-spacing: 0.2px;
}

.action-panel li:hover {
  color: #7c6ff0;
  padding-left: 4px;
}

/* ── 移动端适配 ── */
@media (max-width: 768px) {
  ai {
    padding: 12px;
    font-size: 0.94em;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
  }

  text {
    padding: 6px 2px;
  }

  .news-item h4 {
    font-size: 0.88em;
  }

  .news-item p {
    font-size: 0.82em;
  }
}

/* 男性对话颜色 - 蓝 */
m {
    color: #4a7fd4;
    font-weight: 600;
}

/* 女性对话颜色 - 粉 */
w {
    color: #d4698e;
    font-weight: 600;
}

/* 优化正文段落间距 */
text p {
    margin-bottom: 10px;
    line-height: 1.7;
}

/* ═══════════════════════════════════════════
   图库映射 - 角色立绘（简化短类名）
   ═══════════════════════════════════════════ */

/* 立绘容器统一样式 */
div[class^="lh-"] {
    display: block;
    width: 100%;
    max-width: 280px;
    aspect-ratio: 3 / 4;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    margin: 10px auto 6px auto;
    border-radius: 12px;
    border: 2px solid #e5e5e5;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    background-color: #fafafa;
}

/* 18个角色映射（简化名） */
.lh-all { background-image: url("https://catai.wiki/2754a45b-d000-47ab-5225-8323a2fd6b00/w=3000"); }
.lh-mly { background-image: url("https://catai.wiki/899283af-136c-4554-dea0-9578ad79cb00/w=3000"); }
.lh-yly { background-image: url("https://catai.wiki/127e9d19-2e37-4f88-56cf-de7601f61000/w=3000"); }
.lh-sew { background-image: url("https://catai.wiki/f10b8791-978e-4902-4f19-bb1dd9f1cc00/w=3000"); }
.lh-sxl { background-image: url("https://catai.wiki/fdb7c89f-1143-45ba-5ad1-fca591b81200/w=3000"); }
.lh-alr { background-image: url("https://catai.wiki/c6043174-8ee7-4da2-1ae3-6bad17843000/w=3000"); }
.lh-ylx { background-image: url("https://catai.wiki/a778baf8-0d57-4e2e-3c34-fb2fe0627a00/w=3000"); }
.lh-alx { background-image: url("https://catai.wiki/83cbb09b-7420-4803-3580-57d2eaf60d00/w=3000"); }
.lh-wls { background-image: url("https://catai.wiki/7134b911-91eb-4796-d683-43bff851b000/w=3000"); }
.lh-lnl { background-image: url("https://catai.wiki/bd26082c-568d-494c-6d6e-d64d1b155800/w=3000"); }
.lh-lls { background-image: url("https://catai.wiki/6d434f80-8da1-491f-9011-6eb9416fb200/w=3000"); }
.lh-zfl { background-image: url("https://catai.wiki/b3d4e839-382a-48cb-8aae-b5901bf3e900/w=3000"); }
.lh-xgl { background-image: url("https://catai.wiki/55ec60a3-94b6-42ea-76d0-cbb459dfab00/w=3000"); }
.lh-slf { background-image: url("https://catai.wiki/9a2a3405-93c7-401f-08dd-0a44ece07600/w=3000"); }
.lh-kml { background-image: url("https://catai.wiki/06d1be72-5cbc-468e-5767-f948b6872500/w=3000"); }
.lh-wel { background-image: url("https://catai.wiki/11441c91-dd34-4a2f-c963-f2414f00f100/w=3000"); }
.lh-ygn { background-image: url("https://catai.wiki/8c120211-62ba-46dc-4fc7-8d8c567fd900/w=3000"); }
.lh-ksl { background-image: url("https://catai.wiki/1e3e4b92-a441-464c-cfb2-de3d084da600/w=3000"); }