/* ══════════════════════════════════════════
   《我终于考上日历大学啦》
   主题：暖橘校园 · Warm Campus
   ══════════════════════════════════════════ */

/* ── 主容器 ── */
ai {
  display: block;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  color: #3D3028;
  line-height: 1.85;
  max-width: 100%;
  padding: 2px 0;
}

/* ── 顶部状态栏 ── */
topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 14px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #FFF7F0 0%, #FFE9D5 60%, #FFF2E8 100%);
  border: 1px solid #F0D4BC;
  border-radius: 14px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}

topbar::after {
  content: "";
  position: absolute;
  top: -25px;
  right: -15px;
  width: 70px;
  height: 70px;
  background: radial-gradient(circle, rgba(240, 148, 90, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

topbar span {
  font-size: 13px;
  color: #C4613A;
  font-weight: 600;
  letter-spacing: 0.3px;
  position: relative;
  z-index: 1;
}

/* ── 正文区域 ── */
scene {
  display: block;
  padding: 22px 20px;
  background: #FFFCF9;
  border: 1px solid #F0E2D6;
  border-radius: 14px;
  margin-bottom: 14px;
  position: relative;
}

scene::before {
  content: "✦ · ────────";
  display: block;
  text-align: center;
  font-size: 11px;
  color: #E8C4A0;
  margin-bottom: 14px;
  letter-spacing: 4px;
  opacity: 0.6;
}

scene::after {
  content: "──────── · ✦";
  display: block;
  text-align: center;
  font-size: 11px;
  color: #E8C4A0;
  margin-top: 14px;
  letter-spacing: 4px;
  opacity: 0.6;
}

scene p {
  margin: 0 0 10px 0;
  text-indent: 2em;
  font-size: 15px;
  color: #2E2420;
  line-height: 2.05;
}

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

/* ── 面板通用样式 ── */
.panel {
  margin-bottom: 12px;
  border: 1px solid #F0DDD0;
  border-radius: 14px;
  background: #FFFFFF;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(180, 120, 80, 0.05);
  transition: box-shadow 0.3s ease;
}

.panel:hover {
  box-shadow: 0 4px 16px rgba(180, 120, 80, 0.1);
}

.panel > summary {
  display: flex;
  align-items: center;
  padding: 11px 16px;
  font-size: 15px;
  font-weight: 700;
  color: #D4663A;
  cursor: pointer;
  background: linear-gradient(to right, #FFF8F2, #FFFFFF);
  border-bottom: 1px solid #F0DDD0;
  list-style: none;
  user-select: none;
  transition: background 0.2s;
}

.panel > summary:hover {
  background: linear-gradient(to right, #FFF2E8, #FFF8F2);
}

.panel > summary::-webkit-details-marker {
  display: none;
}

.panel > summary::after {
  content: "▸";
  margin-left: auto;
  font-size: 14px;
  color: #D4A88C;
  transition: transform 0.3s ease;
}

.panel[open] > summary::after {
  transform: rotate(90deg);
}

.panel:not([open]) > summary {
  border-bottom: none;
}

/* ── 面板色彩区分（顶部微渐变） ── */
.player-panel {
  border-top: 3px solid #F09050;
}

.npc-panel {
  border-top: 3px solid #E88A6C;
}

.campus-panel {
  border-top: 3px solid #8FBC8F;
}

.news-panel {
  border-top: 3px solid #6CA6CD;
}

.option-panel {
  border-top: 3px solid #E8A060;
}

.campus-panel > summary {
  color: #5A8A5A;
}

.news-panel > summary {
  color: #4A80A0;
}

/* ── 信息行 ── */
info {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  padding: 7px 16px;
  gap: 5px 8px;
  border-bottom: 1px dashed #F5E8DE;
  font-size: 14px;
  line-height: 1.75;
}

info:last-child,
info:last-of-type {
  border-bottom: none;
}

info b {
  display: inline-block;
  background: #FFF0E4;
  color: #D46A3C;
  font-size: 12px;
  font-weight: 600;
  padding: 1px 10px;
  border-radius: 20px;
  border: 1px solid #F0D0B8;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.5px;
  transition: all 0.2s;
}

info:hover b {
  background: #FEEADC;
  border-color: #E8B898;
}

info span {
  color: #3D3028;
  flex: 1;
  min-width: 0;
  font-size: 14px;
  word-break: break-word;
}

/* ── NPC卡片 ── */
npc-card {
  display: block;
  margin: 10px 12px;
  padding: 14px;
  background: linear-gradient(to bottom, #FFFAF6, #FFF6EF);
  border-radius: 12px;
  border: 1px solid #F0DDD0;
  border-left: 4px solid #F09858;
  position: relative;
  transition: border-left-color 0.3s;
}

npc-card:hover {
  border-left-color: #E07030;
}

npc-card + npc-card {
  margin-top: 10px;
}

npc-card info {
  padding: 4px 6px;
}

npc-card info:last-child {
  border-bottom: none;
}

/* ── 行动选项 ── */
choice {
  display: block;
  padding: 10px 16px 10px 20px;
  margin: 6px 12px;
  background: #FFFAF5;
  border: 1px solid #F0DDD0;
  border-radius: 12px;
  font-size: 14px;
  color: #5A3E2E;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

choice::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #F0A068;
  border-radius: 3px 0 0 3px;
  opacity: 0;
  transition: opacity 0.3s;
}

choice:hover {
  background: linear-gradient(to right, #FFF0E2, #FFFAF5);
  border-color: #E8A06A;
  padding-left: 26px;
  color: #C75B39;
  box-shadow: 0 2px 10px rgba(200, 120, 60, 0.12);
}

choice:hover::before {
  opacity: 1;
}

choice:active {
  transform: scale(0.99);
}

/* ── 星记忆回廊（外层） ── */
ai > details:not(.panel) {
  margin-bottom: 12px;
  border: 1px solid #DDD0C2;
  border-radius: 14px;
  background: #FFFDF9;
  overflow: hidden;
  border-top: 3px solid #C8A86C;
}

ai > details:not(.panel) > summary {
  padding: 11px 16px;
  font-size: 15px;
  font-weight: 700;
  color: #A07830;
  cursor: pointer;
  background: linear-gradient(to right, #FFF8EE, #FFFDF8);
  border-bottom: 1px solid #E8D8C4;
  list-style: none;
  user-select: none;
}

ai > details:not(.panel) > summary::-webkit-details-marker {
  display: none;
}

ai > details:not(.panel) > summary::after {
  content: " ⚜️";
  font-size: 12px;
}

ai > details:not(.panel):not([open]) > summary {
  border-bottom: none;
}

/* ── 星记忆回廊（内层嵌套） ── */
ai > details:not(.panel) details {
  margin: 8px 10px;
  border: 1px solid #E8D8C8;
  border-radius: 10px;
  overflow: hidden;
  background: #FFFBF5;
}

ai > details:not(.panel) details summary {
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #A07830;
  cursor: pointer;
  background: linear-gradient(to right, #FFF5E6, #FFFBF5);
  list-style: none;
  border-bottom: 1px solid #E8D8C8;
}

ai > details:not(.panel) details summary::-webkit-details-marker {
  display: none;
}

ai > details:not(.panel) details:not([open]) summary {
  border-bottom: none;
}

/* ── 表格（记忆区） ── */
ai table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin: 6px 0;
}

ai table th {
  background: linear-gradient(to bottom, #FFF2E4, #FFE8D4);
  color: #B87030;
  font-weight: 700;
  padding: 7px 8px;
  text-align: left;
  border-bottom: 2px solid #E8C8A0;
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

ai table td {
  padding: 6px 8px;
  border-bottom: 1px dashed #F0E4D8;
  color: #3D3028;
  line-height: 1.55;
  vertical-align: top;
  font-size: 12px;
}

ai table tr:last-child td {
  border-bottom: none;
}

ai table tr:hover td {
  background: #FFFAF5;
}

/* ── 任务记忆Mod ── */
.task-memory {
  margin-bottom: 12px;
  border: 1px solid #F0DDD0;
  border-radius: 14px;
  background: #FFFFFF;
  overflow: hidden;
  border-top: 3px solid #E8884A;
}

.task-memory summary {
  padding: 11px 16px;
  font-size: 15px;
  font-weight: 700;
  color: #D4663A;
  cursor: pointer;
  background: linear-gradient(to right, #FFF8F2, #FFFFFF);
  list-style: none;
  border-bottom: 1px solid #F0DDD0;
}

.task-memory summary::-webkit-details-marker {
  display: none;
}

.task-memory details:not([open]) summary {
  border-bottom: none;
}

.task-memory p {
  padding: 5px 16px;
  margin: 0;
  font-size: 14px;
  color: #3D3028;
  line-height: 1.75;
  border-bottom: 1px dashed #F5E8DE;
}

.task-memory p:last-child {
  border-bottom: none;
}

.task-memory p strong {
  color: #D4663A;
  font-size: 13px;
}

/* ── 分隔线 ── */
ai hr {
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, #E8C8A8, transparent);
  margin: 14px 0;
}

/* ── 锁定标记动效 ── */
@keyframes lockPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

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

ai ::-webkit-scrollbar-track {
  background: #FFF5EE;
  border-radius: 4px;
}

ai ::-webkit-scrollbar-thumb {
  background: #E8B87C;
  border-radius: 4px;
}

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

/* ── 移动端适配 ── */
@media (max-width: 500px) {
  topbar {
    gap: 4px 10px;
    padding: 8px 12px;
  }
  topbar span {
    font-size: 12px;
  }
  scene {
    padding: 16px 14px;
  }
  scene p {
    font-size: 14px;
    line-height: 1.95;
  }
  .panel > summary {
    padding: 10px 14px;
    font-size: 14px;
  }
  info {
    padding: 6px 12px;
    gap: 4px 6px;
  }
  info b {
    font-size: 11px;
    padding: 1px 8px;
  }
  info span {
    font-size: 13px;
  }
  choice {
    padding: 9px 14px 9px 18px;
    margin: 5px 8px;
    font-size: 13px;
  }
  npc-card {
    margin: 8px 8px;
    padding: 10px;
  }
  ai table {
    font-size: 11px;
  }
  ai table th,
  ai table td {
    padding: 5px 6px;
  }
}

@media (max-width: 360px) {
  scene p {
    text-indent: 1.5em;
    font-size: 13.5px;
  }
  info b {
    font-size: 10.5px;
    padding: 1px 6px;
  }
}