/* ═══════════════════════════════════════════
   星际开拓：源能纪元 · 终端样式（浅色版）
   风格：科幻星际 / 明亮干净 / 黑色文字
   ═══════════════════════════════════════════ */

ai {
  display: block;
  max-width: 100%;
  padding: 20px;
  background: #ffffff;
  color: #1a1a1a;
  font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
  line-height: 1.85;
  border-radius: 8px;
  border: 1px solid #d0d7de;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  letter-spacing: 0.2px;
}

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

/* ── 顶部时间地点栏 ── */
.time-location {
  background: #f5f9fc;
  color: #1a1a1a;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 0.88em;
  letter-spacing: 0.5px;
  border: 1px solid #cfe3ef;
  border-left: 4px solid #2b7a9e;
}

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

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

/* ── 区域日报（星际全频段广播） ── */
.news-panel {
  border-top: 2px solid #b8860b;
  background: #fffcf5;
  border: 1px solid #e8d8b7;
}

.news-panel summary {
  color: #7a5c00;
  font-size: 0.92em;
  letter-spacing: 1px;
}

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

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

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

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

.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: #333333;
  line-height: 1.7;
  margin: 0;
}

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

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

text p {
  margin: 0 0 12px 0;
  text-indent: 0;
  line-height: 1.9;
  color: #1a1a1a;
}

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

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

details:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border-color: #a8b8c8;
}

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

details summary:hover {
  background: #f0f4f8;
}

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

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

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

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

details > *:not(summary) {
  padding: 12px 16px;
  color: #1a1a1a;
}

/* ── 玩家面板（觉醒者档案） ── */
.player-panel {
  border-top: 3px solid #2b7a9e;
  background: #f5fafc;
}

.player-panel summary {
  color: #1a1a1a;
  font-size: 1em;
  letter-spacing: 1px;
}

/* ── 技能面板（源能法门 & 技艺矩阵） ── */
.skills-panel {
  border-top: 3px solid #3a9b6e;
  background: #f5fcf8;
}

.skills-panel summary {
  color: #1a1a1a;
}

/* ── 装备与物品 ── */
.weapon-panel {
  border-top: 3px solid #b8860b;
  background: #fcfaf5;
}

.weapon-panel summary {
  color: #1a1a1a;
}

/* 备用物品栏样式 */
.inventory-panel {
  border-top: 3px solid #b8860b;
  background: #fcfaf5;
}

/* ── 交互角色（目标扫描） ── */
.npc-panel,
.locked-npc-panel {
  border-top: 3px solid #b85c6e;
  background: #fcf5f6;
}

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

/* ── 任务面板 ── */
.task-panel {
  border-top: 3px solid #4a7bb5;
  background: #f5f8fc;
}

.task-panel summary {
  color: #1a1a1a;
}

/* ── 记忆区 ── */
.memory-panel {
  border-top: 3px solid #6b7f8e;
  background: #f8fafb;
  font-size: 0.88em;
}

.memory-panel summary {
  color: #1a1a1a;
}

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

.memory-panel th,
.memory-panel td {
  padding: 7px 12px;
  border-bottom: 1px solid #e0e5ea;
  text-align: left;
}

.memory-panel th {
  background: #f0f4f8;
  color: #1a1a1a;
  font-weight: 600;
  letter-spacing: 0.3px;
}

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

/* ── 行动选项 ── */
.action-panel {
  border-top: 3px solid #2b7a9e;
  background: #f5fafc;
}

.action-panel summary {
  color: #1a1a1a;
  font-size: 1em;
  letter-spacing: 1px;
}

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

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

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

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

  text {
    padding: 6px 2px;
  }

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

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

  details summary {
    font-size: 0.85em;
    padding: 9px 12px 9px 30px;
  }

  .memory-panel table {
    font-size: 0.88em;
  }
}

/* ── 对话颜色标签 ── */
m {
  color: #2b5f8a;
  font-weight: 600;
}

w {
  color: #b04a6a;
  font-weight: 600;
}

/* ── 正文段落优化 ── */
text p {
  margin-bottom: 12px;
  line-height: 1.9;
}

/* ── 滚动条美化 ── */
ai::-webkit-scrollbar {
  width: 4px;
}

ai::-webkit-scrollbar-track {
  background: #f0f0f0;
}

ai::-webkit-scrollbar-thumb {
  background: #b0b8c0;
  border-radius: 2px;
}

ai::-webkit-scrollbar-thumb:hover {
  background: #8a9aa8;
}