/* 美漫风 UI 核心设置 */
.coser-panel {
  --thm: #FEEA3B; /* 默认主色调：警戒黄 */
  margin: 16px 0;
  border: 3px solid currentColor;
  border-radius: 4px;
  box-shadow: 4px 4px 0px currentColor;
  background-color: color-mix(in srgb, var(--thm) 8%, transparent);
  background-image: radial-gradient(color-mix(in srgb, currentColor 15%, transparent) 1.5px, transparent 1.5px);
  background-size: 10px 10px;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.6;
  transition: transform 0.2s ease;
}

/* 独立调色板 (高饱和度+黑字=极致漫画张力) */
.scene-panel { --thm: #29B6F6; }   /* 蓝: 场景 */
.memory-panel { --thm: #AB47BC; }  /* 紫: 记忆 */
.player-panel { --thm: #66BB6A; }  /* 绿: 玩家 */
.comment-panel { --thm: #EF5350; } /* 红: XP */
.social-panel { --thm: #FFA726; }  /* 橙: 社交 */
.rep-panel { --thm: #26C6DA; }     /* 青: 声望 */
.npc-panel { --thm: #EC407A; }     /* 粉: NPC */
.action-panel { --thm: #FFEE58; }  /* 黄: 行动 */

/* 漫画风折叠框标题 */
.coser-panel summary {
  background: var(--thm);
  color: #111 !important; /* 强制黑字保证阅读清晰度 */
  font-weight: 900;
  font-size: 15px;
  font-style: italic;
  padding: 12px 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  display: flex;
  align-items: center;
  text-shadow: 1.5px 1.5px 0px #FFF;
}
.coser-panel[open] summary {
  border-bottom-color: currentColor;
}
.coser-panel summary::-webkit-details-marker { display: none; }
.coser-panel summary::before {
  content: '▶';
  display: inline-block;
  margin-right: 10px;
  font-size: 12px;
  transition: transform 0.3s;
}
.coser-panel[open] summary::before {
  transform: rotate(90deg);
}

/* 内部内容排版优化 */
.coser-panel ul {
  padding-left: 18px;
  margin: 10px 0;
}
.coser-panel li { margin-bottom: 6px; }
.coser-panel p { padding: 0 16px; margin: 10px 0; }
.coser-panel hr {
  border: none;
  height: 3px;
  background-color: currentColor;
  margin: 16px 16px;
  transform: rotate(-0.5deg); /* 美漫动感斜切分界线 */
}

/* 记忆面板表格定制 */
.memory-panel table {
  width: calc(100% - 32px);
  margin: 10px 16px;
  border-collapse: collapse;
  border: 2px solid currentColor;
  background: color-mix(in srgb, var(--thm) 15%, transparent);
}
.memory-panel th {
  background: currentColor;
  color: color-mix(in srgb, var(--thm) 30%, #fff); /* 智能反色 */
  font-weight: 900;
  padding: 8px;
  text-align: left;
  border: 1px solid currentColor;
}
.memory-panel td {
  border: 1px solid currentColor;
  padding: 8px;
  font-size: 13px;
}

/* === 正文与系统模拟专属美化 === */

.rev-main {
  font-size: 15px;
  line-height: 1.8;
  padding: 10px 4px;
}

/* 对话：漫画色彩，加粗醒目 */
.char-dialogue {
  font-weight: 800;
  color: #EF5350; /* 亮赤红 */
  text-shadow: 0.5px 0.5px 0 currentColor;
}
/* 独白：蓝调倾斜思维 */
.inner-thought {
  font-style: italic;
  color: #42A5F5; /* 亮海蓝 */
  font-weight: 600;
}
/* 系统警告：旁白大框式样 */
.system-alert {
  background: #FEEA3B;
  color: #000;
  font-weight: 900;
  border: 3px dashed currentColor;
  padding: 12px;
  margin: 16px 0;
  text-align: center;
  box-shadow: 4px 4px 0 currentColor;
  transform: skewX(-3deg);
}

/* === 特殊界面：手机短讯模拟 === */
.comic-phone {
  margin: 20px auto;
  width: 95%;
  border: 3px solid currentColor;
  border-radius: 12px;
  background: color-mix(in srgb, currentColor 5%, transparent);
  box-shadow: 6px 6px 0 currentColor;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.cp-header {
  background: #2196F3;
  color: #000;
  font-weight: 900;
  padding: 10px;
  text-align: center;
  border-bottom: 3px solid currentColor;
  letter-spacing: 1px;
}
.cp-msg {
  padding: 8px 12px;
  margin: 6px 12px;
  border: 2px solid currentColor;
  border-radius: 8px;
  width: fit-content;
  max-width: 80%;
  box-shadow: 2px 2px 0 currentColor;
}
.cp-msg.op {
  background: color-mix(in srgb, #29B6F6 40%, transparent);
  border-top-left-radius: 0;
  align-self: flex-start;
}
.cp-msg.me {
  background: color-mix(in srgb, #66BB6A 40%, transparent);
  border-top-right-radius: 0;
  align-self: flex-end;
}
.cp-name {
  font-weight: 900;
  display: block;
  font-size: 12px;
  margin-bottom: 2px;
}