:root {
  --bg: #15121f; --panel: #241f33; --slot: #2c2740;
  --ur: linear-gradient(160deg, #ffd86b, #c98a2b);
  --ssr: linear-gradient(160deg, #d9a3ff, #7a4ad0);
  --sr: linear-gradient(160deg, #a3c9ff, #4a6ad0);
  --accent: #e0a3ff;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: #eee;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
#app { max-width: 960px; margin: 0 auto; padding: 16px; }

/* 顶栏 */
#topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.brand { font-size: 18px; font-weight: 700; color: var(--accent); }
.board-meter { margin-left: auto; font-size: 13px; color: #bbb; }
.btn { padding: 9px 16px; background: var(--accent); border: none; border-radius: 8px; color: #1a1a1a; font-weight: 600; cursor: pointer; }
.btn:hover { filter: brightness(1.08); }

/* 旁白 */
#narration { background: var(--panel); border-radius: 10px; padding: 12px 16px; font-size: 14px; line-height: 1.7; margin-bottom: 14px; }

/* 场景区 */
#scenes { display: flex; gap: 12px; margin-bottom: 16px; }
.scene { flex: 1; background: var(--panel); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; }
.scene-title { font-size: 14px; margin-bottom: 8px; color: var(--accent); }
.slot {
  min-height: 92px; background: var(--slot); border: 2px dashed #5a5570; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  font-size: 12px; color: #777; transition: border-color .2s, background .2s; text-align: center; padding: 6px;
}
.slot.dragover { border-color: var(--accent); background: #332b48; }
.slot .placed { font-size: 30px; }
.slot .placed-name { font-size: 12px; color: #ddd; margin-top: 2px; }
.scene-narration { font-size: 12px; color: #9b93ad; margin-top: 8px; min-height: 56px; line-height: 1.6; }
.scene-testimony { font-size: 12px; color: #ffe; margin-top: 8px; min-height: 56px; line-height: 1.6; }

/* 线索板 */
#board { background: var(--panel); border-radius: 12px; padding: 10px 14px; margin-bottom: 16px; }
.board-head { font-size: 13px; color: #bbb; margin-bottom: 8px; }
.board-empty { font-size: 12px; color: #777; }
.board-item { font-size: 12px; line-height: 1.7; padding: 6px 0; border-bottom: 1px solid #332e45; }
.board-item:last-child { border-bottom: none; }
.board-src { display: inline-block; font-size: 11px; color: #1a1a1a; background: var(--accent); border-radius: 4px; padding: 1px 6px; margin-right: 6px; }

/* 手牌（男主卡） */
#hand { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.card {
  width: 132px; border-radius: 10px; cursor: grab; padding: 10px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: #1a1a1a; user-select: none; box-shadow: 0 2px 6px #0006; text-align: center;
}
.card.rarity-UR { background: var(--ur); }
.card.rarity-SSR { background: var(--ssr); }
.card.rarity-SR { background: var(--sr); }
.card.dragging { opacity: .5; }
.card.placed-card { outline: 2px solid #fff8; opacity: .7; }
.card .face { font-size: 30px; }
.card .cname { font-size: 14px; font-weight: 700; }
.card .crarity { font-size: 10px; opacity: .8; }
.card .cpersona { font-size: 10px; opacity: .85; margin-top: 3px; line-height: 1.3; }
.card .clens { font-size: 10px; font-weight: 600; margin-top: 2px; }

/* 弹层 */
#overlay { position: fixed; inset: 0; background: #000b; display: flex; align-items: center; justify-content: center; padding: 16px; }
#overlay.hidden { display: none; }
#overlay-box { background: var(--panel); border-radius: 14px; padding: 22px; max-width: 560px; width: 100%; max-height: 86vh; overflow-y: auto; }
#overlay-box h2 { margin-top: 0; color: var(--accent); }
#overlay-box { position: relative; }
.overlay-close { position: absolute; top: 12px; right: 14px; background: transparent; border: none; color: #aaa; font-size: 18px; cursor: pointer; line-height: 1; }
.overlay-close:hover { color: var(--accent); }
.osub { font-size: 13px; color: #ccc; }
.acc-section { margin: 14px 0; }
.acc-section .label { font-size: 12px; color: #aaa; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.suspect, .evi { display: block; padding: 9px 11px; margin: 6px 0; background: var(--slot); border: 1px solid #4a445e; border-radius: 8px; cursor: pointer; font-size: 13px; line-height: 1.5; }
.suspect:hover, .evi:hover { border-color: var(--accent); }
.sdesc { font-size: 12px; color: #aaa; }
.verdict-msg { margin: 12px 0; font-size: 14px; line-height: 1.7; }
