/* 第 2 章试玩：沿用第 1 章的档案风格（牛皮纸、墨色、正文黑体、标题宋体） */
@font-face {
  font-family: 'MB Handwrite';
  src: url('../assets/fonts/mb-handwrite.woff2') format('woff2');
  font-display: swap;
}
:root {
  --desk: #1c1611;
  --paper: #e6dcc4;
  --paper-2: #efe8d6;
  --manila: #c2a46c;
  --ink: #2a2118;
  --ink-soft: #3f3122;
  --seal: #9e2b25;
  --seal-ink: #761a13;
  --green: #1c4430;
  --lamp: #e9c98a;
  --print: 'Noto Serif SC', 'Songti SC', 'STSong', 'SimSun', Georgia, serif;
  --body: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  --hand: 'MB Handwrite', 'Kaiti SC', 'STKaiti', 'KaiTi', serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  font-family: var(--body);
  color: #eadfc8;
  background: radial-gradient(ellipse 70% 55% at 50% 8%, rgba(233, 201, 138, 0.14), transparent 70%), linear-gradient(180deg, #241b14, var(--desk) 40%, #120d09);
  background-attachment: fixed;
}
button { font: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 2px solid var(--lamp); outline-offset: 2px; }

.c2-top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 18px;
  background: rgba(18, 13, 9, 0.92);
  border-bottom: 1px solid rgba(233, 201, 138, 0.18);
}
.c2-top h1 { margin: 0; font-family: var(--print); font-size: 17px; font-weight: 700; color: #f1e6cd; }
.c2-top h1 small { font-family: var(--body); font-size: 12px; color: #c9b892; margin-left: 8px; font-weight: 400; }
.c2-top a { color: var(--lamp); font-size: 13px; text-decoration: none; }

.c2-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 18px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px;
}

/* ---------- 左侧：调查员 ---------- */
.c2-side {
  align-self: start;
  position: sticky;
  top: 66px;
  color: var(--ink);
  background: linear-gradient(170deg, #dcc596, #d0b67f 45%, #c3a670);
  border-radius: 2px;
  padding: 14px 14px 16px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.5);
}
.c2-side h2 { margin: 0 0 10px; font-family: var(--print); font-size: 16px; }
.stat { margin-bottom: 9px; }
.stat-row { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; }
.bar { height: 6px; background: rgba(42, 33, 24, 0.2); margin-top: 3px; }
.bar i { display: block; height: 100%; background: var(--seal); transition: width 0.4s; }
.bar.san i { background: #3b6b56; }
.dist { display: flex; gap: 5px; margin-top: 4px; }
.dist span { width: 22px; height: 22px; border-radius: 50%; border: 1.5px dashed #6b5640; }
.dist span.on { border: 1.5px solid var(--ink); background: radial-gradient(circle at 40% 35%, #4a3a28, var(--ink) 70%); }
.dist-note { font-size: 12px; color: var(--ink-soft); margin-top: 3px; }
.side-sec { margin-top: 12px; border-top: 1px dashed rgba(42, 33, 24, 0.45); padding-top: 9px; }
.side-sec h3 { margin: 0 0 6px; font-family: var(--print); font-size: 13.5px; }
.side-sec ul { margin: 0; padding-left: 16px; font-size: 12.5px; line-height: 1.55; }
.side-sec li.lost { text-decoration: line-through; color: #6b5a45; }
.slots { display: flex; gap: 5px; flex-wrap: wrap; }
.slots span { min-width: 40px; padding: 3px 6px; font-size: 12px; border: 1.5px dashed #6b5640; border-radius: 3px; }
.slots span.on { border: 1.5px solid var(--ink); background: rgba(255, 250, 238, 0.5); font-weight: 600; }

/* ---------- 中间：照片 + 文字 + 选项 ---------- */
.c2-main { min-width: 0; }
.stage {
  position: relative;
  margin: 0 auto 16px;
  width: min(100%, 560px);
  padding: 10px 10px 34px;
  background: #ece4d0;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.55);
  transform: rotate(-0.7deg);
}
.stage-photo { position: relative; aspect-ratio: 4 / 3; background: #0d0b08; overflow: hidden; }
.dr-canvas, .dr-fallback, .dr-fallback img { position: absolute; inset: 0; width: 100%; height: 100%; }
.dr-gl .dr-fallback { display: none; }
.stage:not(.dr-gl) .dr-canvas { display: none; }
.dr-fade { animation: drFade 2.6s ease-out both; }
@keyframes drFade { from { opacity: 0; filter: brightness(2.2) blur(2px); } to { opacity: 1; filter: none; } }
.stage-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 7px;
  text-align: center;
  font-family: var(--hand);
  font-size: 16px;
  color: var(--ink);
}
.viewfinder::after {
  content: '';
  position: absolute;
  inset: 8%;
  border: 1.5px solid rgba(240, 230, 210, 0.55);
  background:
    linear-gradient(rgba(240, 230, 210, 0.55), rgba(240, 230, 210, 0.55)) center / 26px 1.5px no-repeat,
    linear-gradient(rgba(240, 230, 210, 0.55), rgba(240, 230, 210, 0.55)) center / 1.5px 26px no-repeat;
  pointer-events: none;
}
.film-counter {
  position: absolute;
  right: 12%;
  top: 10%;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: #f2e8d2;
  background: rgba(0, 0, 0, 0.45);
  padding: 2px 6px;
  pointer-events: none;
}
.flash { animation: shot 0.35s ease-out; }
@keyframes shot { 0% { filter: brightness(3); } 100% { filter: none; } }

.log {
  color: var(--ink);
  background: var(--paper-2);
  padding: 16px 20px 6px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45);
  line-height: 1.8;
  font-size: 15.5px;
}
.log h2 { font-family: var(--print); font-size: 19px; margin: 0 0 6px; }
.log .meta { font-size: 12px; color: var(--ink-soft); font-weight: 600; margin-bottom: 4px; }
.log p { margin: 0 0 10px; }
.log .say { font-family: var(--hand); font-size: 17px; }
.log .sys { font-size: 13.5px; color: var(--ink-soft); border-left: 3px solid var(--manila); padding-left: 9px; }
.log .bad { color: var(--seal-ink); font-weight: 600; }
.log .good { color: var(--green); font-weight: 600; }
.log .lost { color: #5c4a35; text-decoration: line-through; }

.actions { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.act {
  text-align: left;
  color: var(--ink);
  background: linear-gradient(180deg, #fbf6ea, #e9dfc7);
  background-color: #efe6cf;
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  padding: 10px 14px;
  box-shadow: 0 3px 0 #0e0a06;
  font-size: 15px;
}
.act:hover:not(:disabled) { background: #fffaf0; }
.act:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 #0e0a06; }
.act small { display: block; font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.act:disabled { color: #cbbd9f; background: transparent; border-style: dashed; border-color: #7a6548; box-shadow: none; }
.act:disabled small { color: #b5a582; }
.act.primary { background: linear-gradient(180deg, #b23a2e, var(--seal-ink)); background-color: #8a2219; color: #fbeee0; border-color: #3d0c08; box-shadow: 0 3px 0 #3d0c08; }
.act.primary small { color: #f6dcd0; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.row .act { flex: 1 1 140px; }

/* 人物卡 */
.people { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 14px; }
.pcard { color: var(--ink); background: var(--paper); padding: 12px 12px 10px; box-shadow: 0 6px 14px rgba(0, 0, 0, 0.45); border-top: 4px solid var(--manila); }
.pcard h3 { margin: 0 0 4px; font-family: var(--print); font-size: 16px; }
.pcard p { margin: 0 0 8px; font-size: 13.5px; line-height: 1.6; }
.pcard .claim { font-family: var(--hand); font-size: 15px; }
.pcard .qa { font-size: 13px; border-left: 2px solid var(--manila); padding-left: 7px; margin: 4px 0; }
.pcard .act { font-size: 13.5px; padding: 6px 10px; }
.pcard.done { opacity: 0.72; }
.pcard .verdict { font-size: 13px; font-weight: 700; }

/* 推理板 */
.board { margin-top: 14px; color: var(--ink); background: #8a6a45 repeating-radial-gradient(circle at 20% 30%, rgba(0,0,0,0.08) 0 2px, transparent 2px 7px); padding: 14px; box-shadow: inset 0 0 0 6px #5e4428, 0 10px 22px rgba(0, 0, 0, 0.5); }
.board-hint { color: #fbf3e0; font-size: 13.5px; margin: 0 0 10px; }
.ecards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ecard { position: relative; text-align: left; color: var(--ink); background: var(--paper-2); border: none; padding: 6px 6px 8px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4); }
.ecard img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; filter: sepia(0.3); }
.ecard b { display: block; font-size: 13px; margin-top: 5px; font-family: var(--print); }
.ecard.sel { outline: 3px solid var(--seal); outline-offset: 1px; }
.ecard::before { content: ''; position: absolute; top: -5px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #d4554a, var(--seal-ink)); }
.inferences { margin-top: 12px; display: grid; gap: 6px; }
.inf { color: var(--ink); background: #f3e3a0; padding: 7px 10px; font-size: 14px; border-left: 4px solid var(--seal); }
.verdict-form { margin-top: 14px; background: var(--paper-2); color: var(--ink); padding: 12px 14px; }
.verdict-form label { display: block; font-weight: 600; font-size: 14px; margin: 8px 0 4px; }
.verdict-form select { width: 100%; font: inherit; font-size: 14px; padding: 6px; border: 1.5px solid var(--ink); background: #fffaf0; color: var(--ink); }

/* 战斗取景 */
.combat-hud { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--ink); background: var(--paper); padding: 6px 10px; margin-top: 10px; }
.hpbar { height: 8px; background: rgba(42, 33, 24, 0.2); margin-top: 4px; }
.hpbar i { display: block; height: 100%; background: #4a2c5e; transition: width 0.3s; }

.lock { max-width: 560px; margin: 60px auto; color: var(--ink); background: var(--paper-2); padding: 24px; box-shadow: 0 12px 26px rgba(0, 0, 0, 0.55); line-height: 1.8; }
.lock h2 { font-family: var(--print); margin-top: 0; }

@media (max-width: 820px) {
  .c2-layout { grid-template-columns: 1fr; padding: 10px; gap: 12px; }
  .c2-side { position: static; order: 2; }
  .c2-main { order: 1; }
  .log { padding: 14px 14px 4px; font-size: 15px; }
  .stage { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .dr-fade, .flash { animation: none; }
}
/* 结果标签与线索卡 */
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.chip { display: inline-block; font-size: 12.5px; font-weight: 600; padding: 1px 7px; border: 1.5px solid var(--ink-soft); color: var(--ink); background: rgba(255, 250, 238, 0.6); border-radius: 2px; }
.chip.good { border-color: var(--green); color: var(--green); }
.chip.bad { border-color: var(--seal-ink); color: var(--seal-ink); }
.log .bad .chip { font-weight: 600; }
.facts { color: var(--ink); background: #f3e3a0; padding: 10px 14px; margin-top: 14px; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35); border-left: 4px solid var(--seal); }
.facts h3 { margin: 0 0 6px; font-family: var(--print); font-size: 15px; }
.facts ul { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.7; }
.facts .small { font-size: 13px; color: var(--ink-soft); }
.facts.review { background: var(--paper); margin: 6px 0 12px; }
.facts.review li { margin-bottom: 8px; }
@media (max-width: 820px) {
  .c2-top { position: static; flex-wrap: wrap; }
  .c2-top h1 small { display: block; margin: 2px 0 0; }
}

/* V7.29c 推理板：手机也能看懂 */
.board-top { display: flex; justify-content: space-between; color: #fbf3e0; font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.board-top .progress { background: rgba(0,0,0,0.3); padding: 2px 8px; }
.board-msg { margin: 0 0 10px; padding: 8px 10px; font-size: 14px; line-height: 1.6; color: var(--ink); background: var(--paper-2); border-left: 5px solid #7a6a55; }
.board-msg.good { background: #f3e3a0; border-left-color: #3d6b35; }
.board-msg.bad { border-left-color: var(--seal); }
.ecard small { display: block; font-size: 12px; line-height: 1.5; color: #4a3f33; margin-top: 3px; }
.ecard .tag { position: absolute; top: 10px; left: 10px; font-style: normal; font-size: 12px; font-weight: 700; color: #fff; background: #3d6b35; padding: 1px 6px; }
.ecard .tag.pick { background: var(--seal); left: auto; right: 10px; }
.ecard.sel { outline: 4px solid var(--seal); outline-offset: 2px; transform: translateY(-3px); }
.ecard.hint { outline: 3px dashed #fbf3e0; outline-offset: 2px; }
.ecard.linked img { filter: sepia(0.3) brightness(0.85); }
@media (max-width: 560px) { .ecards { grid-template-columns: 1fr 1fr; } .ecard small { font-size: 11.5px; } }

/* V7.30 选项按钮：一眼看出“这是可以点的” */
.act { display: flex; align-items: center; gap: 10px; min-height: 48px; cursor: pointer; }
.act-text { flex: 1; min-width: 0; }
.act-label { display: block; font-weight: 700; }
.act-go { flex: none; font-size: 26px; line-height: 1; opacity: 0.85; }
.act:disabled .act-go { display: none; }
.act.option {
  color: #f6efe0;
  background: linear-gradient(180deg, #2f4b63, #1f3446);
  background-color: #243c52;
  border: 1.5px solid #10202d;
  border-left: 6px solid #d9b66a;
  box-shadow: 0 3px 0 #0b1620;
}
.act.option small { color: #cfdbe6; }
.act.option:hover:not(:disabled) { background: #36577a; }
.act.option:focus-visible, .act.primary:focus-visible { outline: 3px solid #f3d27a; outline-offset: 2px; }
.act.option:disabled { color: #c9bfae; background: rgba(0, 0, 0, 0.2); border: 1.5px dashed #7a6548; box-shadow: none; }
.act.option:disabled small { color: #b5a582; }
.choose-prompt { display: flex; align-items: center; gap: 8px; color: #fbf3e0; font-size: 15px; font-weight: 700; padding: 8px 2px 2px; }
.choose-prompt .hand { font-size: 18px; }
.actions.is-choice { padding: 10px; margin-top: 18px; background: rgba(217, 182, 106, 0.12); border: 1.5px dashed rgba(217, 182, 106, 0.55); border-radius: 8px; }
/* 人物卡里的按钮也用同一种“可以点”的样子 */
.pcard .act:not(.primary):not(:disabled) { color: #f6efe0; background: #243c52; border: 1.5px solid #10202d; border-left: 5px solid #d9b66a; box-shadow: 0 2px 0 #0b1620; min-height: 40px; }
.pcard .act:not(.primary):not(:disabled) small { color: #cfdbe6; }
.pcard .act { flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; }

/* V7.30b 立体按键：去掉金色边条，用厚底阴影 + 顶部高光，按下会下沉 */
.act.option, .pcard .act:not(.primary):not(:disabled) {
  border: 1.5px solid #0f1e2b;
  border-radius: 9px;
  background: linear-gradient(180deg, #3d6080 0%, #2a4660 45%, #213a50 100%);
  background-color: #2a4660;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 5px 0 #0c1823, 0 8px 12px rgba(0, 0, 0, 0.45);
  transition: transform 0.06s ease, box-shadow 0.06s ease;
}
.act.primary {
  border-radius: 9px;
  background: linear-gradient(180deg, #c84a3c 0%, #a32e23 50%, #861f17 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 5px 0 #3d0c08, 0 8px 12px rgba(0, 0, 0, 0.45);
  transition: transform 0.06s ease, box-shadow 0.06s ease;
}
.act.option:hover:not(:disabled), .pcard .act:not(.primary):not(:disabled):hover { background: linear-gradient(180deg, #4a7194, #2f5070); }
.act.option:active:not(:disabled), .act.primary:active:not(:disabled), .pcard .act:not(:disabled):active {
  transform: translateY(4px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 0 #0c1823, 0 2px 4px rgba(0, 0, 0, 0.4);
}
.act .act-go { color: #f3d27a; }
.actions { gap: 12px; }

/* V7.30c 人物阶段：提问次数和步骤写清楚 */
.ask-status { display: grid; gap: 6px; margin-top: 12px; padding: 10px 12px; color: #fbf3e0; background: rgba(0, 0, 0, 0.35); border: 1.5px solid rgba(217, 182, 106, 0.5); border-radius: 8px; font-size: 14px; }
.ask-status > div { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.ask-status .k { min-width: 4.5em; color: #d9c9a0; }
.ask-status b { color: #fff6e0; }
.ask-status .note { flex-basis: 100%; padding-left: calc(4.5em + 8px); font-size: 12.5px; color: #cdbf9c; }
.ask-status .dots { display: inline-flex; gap: 4px; }
.ask-status .dot { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid #d9b66a; }
.ask-status .dot.on { background: #f3d27a; }
.pcard .step { margin-top: 12px; padding-top: 10px; border-top: 1px dashed rgba(60, 40, 15, 0.35); }
.pcard .step-h { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; font-weight: 700; font-size: 14.5px; margin-bottom: 8px; }
.pcard .step-h small { flex-basis: 100%; padding-left: 30px; font-weight: 400; font-size: 12.5px; color: #5c4a35; }
.pcard .step-h .n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: var(--paper); font-size: 13px; }
.pcard .step.must .step-h .n { background: var(--seal); }
.pcard .step .actions { margin-top: 0; }
.pcard .step-empty { margin: 0; font-size: 13px; color: #5c4a35; }

/* V7.32 “正在处理”提示 */
@keyframes mbSpin { to { transform: rotate(360deg); } }
.wait-note { display: flex; align-items: center; gap: 10px; padding: 12px 14px; color: #fbf3e0; font-size: 14.5px; background: rgba(0, 0, 0, 0.35); border: 1.5px dashed rgba(217, 182, 106, 0.6); border-radius: 8px; }
.wait-note .spin { flex: none; width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid rgba(243, 210, 122, 0.3); border-top-color: #f3d27a; animation: mbSpin 0.8s linear infinite; }

/* V7.35 推理板上缺的证物 */
.ecard.missing { background: rgba(251, 243, 224, 0.18); border: 2px dashed rgba(251, 243, 224, 0.6); box-shadow: none; color: #fbf3e0; cursor: default; }
.ecard.missing::before { display: none; }
.ecard.missing .ph { display: grid; place-items: center; aspect-ratio: 4 / 3; font-size: 40px; font-weight: 700; color: rgba(251, 243, 224, 0.6); background: rgba(0, 0, 0, 0.25); }
.ecard.missing small { color: #f3e6c8; }
.board-missing { color: #ffe3a8; font-weight: 700; }

/* V7.35 结案报告 */
.case-report { margin-top: 16px; padding: 16px; color: var(--ink); background: var(--paper); box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45); border-top: 5px solid var(--seal); }
.case-report h3 { margin: 0 0 6px; font-family: var(--print); font-size: 18px; }
.cr-intro { margin: 0 0 8px; font-size: 14px; line-height: 1.7; }
.cr-reward { margin: 0 0 12px; padding: 8px 10px 8px 26px; font-size: 13.5px; line-height: 1.7; background: #f3e3a0; }
.cr-q { margin-top: 14px; padding-top: 12px; border-top: 1px dashed rgba(60, 40, 15, 0.4); }
.cr-n { display: inline-block; padding: 1px 8px; font-size: 12px; font-weight: 700; color: var(--paper); background: var(--ink); border-radius: 10px; }
.cr-q h4 { margin: 6px 0 8px; font-size: 16px; line-height: 1.5; }
.cr-hint { margin-bottom: 10px; padding: 8px 10px; font-size: 13.5px; line-height: 1.6; background: rgba(61, 107, 53, 0.12); border-left: 4px solid #3d6b35; }
.cr-hint.none { background: rgba(0, 0, 0, 0.05); border-left-color: #8a7a62; color: #5c4a35; }
.cr-opts { display: grid; gap: 10px; }
.cr-opt { text-align: left; padding: 11px 14px; min-height: 46px; font-size: 15px; color: #f6efe0; border: 1.5px solid #0f1e2b; border-radius: 9px; background: linear-gradient(180deg, #3d6080 0%, #2a4660 45%, #213a50 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 4px 0 #0c1823; cursor: pointer; }
.cr-opt:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 #0c1823; }
.cr-opt.picked { background: linear-gradient(180deg, #d9b66a, #b8913f); color: #1f1710; border-color: #6b5220; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 4px 0 #6b5220; font-weight: 700; }
.cr-opt:disabled { cursor: default; opacity: 0.55; }
.cr-opt.right { opacity: 1; background: #3d6b35; color: #fff; border-color: #1a3316; }
.cr-opt.wrong { opacity: 1; background: #8a2219; color: #fff; border-color: #3d0c08; }
.cr-res { margin-top: 8px; font-weight: 700; font-size: 14px; }
.cr-res.ok { color: #2f5a29; }
.cr-res.no { color: #8a2219; }
.cr-submit { width: 100%; margin-top: 18px; }
.cr-submit:disabled { opacity: 0.6; filter: grayscale(0.4); }

/* 修：主按钮悬停 / 手机点过后变白、字看不见（.act:hover 的优先级盖过了 .act.primary） */
.act.primary:hover:not(:disabled) { background: linear-gradient(180deg, #d4594a 0%, #ab3328 50%, #8e2119 100%); color: #fbeee0; }
@media (hover: none) { .act.option:hover:not(:disabled) { background: linear-gradient(180deg, #3d6080 0%, #2a4660 45%, #213a50 100%); } .act.primary:hover:not(:disabled) { background: linear-gradient(180deg, #c84a3c 0%, #a32e23 50%, #861f17 100%); } }

/* V7.36 调查员档案：特质 + 属性 */
.build { margin-top: 14px; padding: 16px; color: var(--ink); background: var(--paper); box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45); }
.build h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 4px 0 10px; font-size: 16px; }
.build h3 small { flex-basis: 100%; padding-left: 30px; font-weight: 400; font-size: 13px; color: #5c4a35; }
.build h3 small b.left { color: var(--seal); font-size: 15px; }
.build h3 .n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--seal); color: #fff; font-size: 13px; }
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 18px; }
.tcard { position: relative; text-align: left; padding: 10px 12px; min-height: 64px; color: #f6efe0; border: 1.5px solid #0f1e2b; border-radius: 9px; background: linear-gradient(180deg, #3d6080 0%, #2a4660 45%, #213a50 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 4px 0 #0c1823; cursor: pointer; }
.tcard b { display: block; font-size: 15px; }
.tcard small { display: block; margin-top: 3px; font-size: 12.5px; line-height: 1.5; color: #cfdbe6; }
.tcard.on { background: linear-gradient(180deg, #d9b66a, #b8913f); color: #1f1710; border-color: #6b5220; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 4px 0 #6b5220; }
.tcard.on small { color: #3a2c1d; }
.tcard:active { transform: translateY(3px); box-shadow: 0 1px 0 #0c1823; }
.tag-prequel { display: inline-block; margin-top: 6px; padding: 1px 6px; font-size: 11.5px; font-weight: 700; color: #1f1710; background: #f3d27a; border-radius: 4px; }
.tcard.on .tag-prequel { background: #fff6dc; }
.srow { padding: 10px 0; border-top: 1px dashed rgba(60, 40, 15, 0.35); }
.shead { display: flex; align-items: center; gap: 8px; }
.shead b { min-width: 2.6em; font-size: 15px; }
.pips { display: inline-flex; gap: 4px; flex: 1; }
.pips i { width: 14px; height: 14px; border-radius: 3px; border: 1.5px solid #5c4a35; }
.pips i.on { background: var(--seal); border-color: var(--seal-ink); }
.sval { min-width: 1.2em; text-align: center; font-weight: 700; font-size: 16px; }
.sbtn { width: 40px; height: 40px; font-size: 20px; font-weight: 700; color: #f6efe0; border: 1.5px solid #0f1e2b; border-radius: 8px; background: linear-gradient(180deg, #3d6080, #213a50); box-shadow: 0 3px 0 #0c1823; cursor: pointer; }
.sbtn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 #0c1823; }
.sbtn:disabled { opacity: 0.35; cursor: default; }
.sfx { margin-top: 5px; font-size: 13px; line-height: 1.5; color: #4a3f33; }
.build-go { width: 100%; margin-top: 16px; }
.build-go:disabled { opacity: 0.6; filter: grayscale(0.4); }
.side-trait { display: inline-block; margin: 0 0 6px; padding: 2px 8px; font-weight: 700; font-size: 13px; color: #fff; background: var(--seal); border-radius: 4px; }
.side-stats { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 10px; font-size: 13px; }

/* V7.40 完整版 */
.side-where { margin: -4px 0 8px; font-size: 13px; font-weight: 700; color: var(--seal); }
.end-stamp { display: inline-block; padding: 4px 14px; border: 3px solid var(--seal); color: var(--seal); font-size: 22px; font-weight: 700; letter-spacing: 0.2em; transform: rotate(-4deg); }

/* V7.44 技能代价：卡片上直接写清楚 */
.act small.cost { color: #8a2117; font-weight: 600; }
.act.option small.cost { color: #ffc2b5; }
.act.primary small.cost { color: #ffe0d6; }
.slots span.on.edge { border-color: #a32e23; box-shadow: inset 0 -3px 0 rgba(163, 46, 35, 0.35); }
.slots span.on.forbidden { border-color: #3a1d3e; background: rgba(58, 29, 62, 0.18); }

/* V7.44 按过 / 不能按的主按钮一律变灰，不再是红色 */
.act.primary:disabled, .act.primary:disabled:hover {
  color: #f1ece2; background: linear-gradient(180deg, #a39c8e 0%, #8a8376 55%, #766f63 100%);
  border: 1.5px solid #4f493f; box-shadow: 0 3px 0 #4f493f; transform: none; cursor: not-allowed;
}
.act.primary:disabled small { color: #ece6da; }
.build.done { opacity: 0.72; filter: saturate(0.5); }
.build.done .tcard, .build.done .sbtn { cursor: default; }

/* V7.45 照片静止时显示原图，不经过 WebGL（有些手机的 WebGL 会把照片压得很暗） */
.dr-fallback canvas.dr-still { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.dr-gl.dr-rest .dr-fallback { display: block; }
.dr-gl.dr-rest .dr-canvas { visibility: hidden; }

/* V7.46 存档码按钮与“已自动存档”提示 */
.c2-links { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
.c2-save { min-height: 38px; padding: 6px 12px; font: inherit; font-size: 14px; font-weight: 700; color: #f6efe0; cursor: pointer;
  border: 1.5px solid #0f1e2b; border-radius: 8px; background: linear-gradient(180deg, #3d6080 0%, #2a4660 45%, #213a50 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 3px 0 #0c1823; }
.c2-save:active { transform: translateY(2px); box-shadow: 0 1px 0 #0c1823; }
.c2-save:focus-visible { outline: 3px solid #f3d27a; outline-offset: 2px; }
#c2Saved { position: fixed; right: 14px; bottom: 14px; z-index: 50; padding: 7px 12px; border-radius: 8px; font-size: 13.5px; font-weight: 700;
  color: #e9f5ee; background: rgba(26, 74, 60, 0.94); border: 1.5px solid #0a231b; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  opacity: 0; transform: translateY(8px); transition: opacity 0.25s, transform 0.25s; pointer-events: none; }
#c2Saved.on { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { #c2Saved { transition: none; } }

/* V7.47/48/49 手机：往下读时照片变成右上角小窗；一律默认小窗，只有玩家点了才放大 */
.pip-hint { display: none; }
@media (max-width: 820px) {
  .stage.pip {
    position: fixed; z-index: 40; top: 8px; right: 8px; left: auto; margin: 0;
    width: 40vw; max-width: 220px; padding: 4px; transform: none; cursor: zoom-in;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.7); border-radius: 3px;
    transition: width 0.25s ease, max-width 0.25s ease;
  }
  .stage.pip .stage-cap { display: none; }
  .stage.pip .pip-hint {
    display: block; position: absolute; left: 4px; right: 4px; bottom: 4px; padding: 3px 0;
    font-size: 11.5px; font-weight: 700; text-align: center; color: #f6efe0; background: rgba(0, 0, 0, 0.6); pointer-events: none;
  }
  .stage.pip .pip-hint::before { content: '点一下放大'; }
  /* 放大：最多占屏幕高度的 34%，下面的字和按钮会自动推到照片下方 */
  .stage.pip.pip-big {
    width: min(calc(100vw - 16px), calc(34vh * 4 / 3 + 8px)); max-width: 560px; cursor: zoom-out;
  }
  .stage.pip.pip-big .pip-hint::before { content: '点一下缩小'; }
  /* 玩家自己缩小的，优先 */
  .stage.pip.pip-min { width: 40vw; max-width: 220px; cursor: zoom-in; }
  .stage.pip.pip-min .pip-hint::before { content: '点一下放大'; }
}
@media (max-width: 820px) and (prefers-reduced-motion: reduce) { .stage.pip { transition: none; } }

/* V7.50 推理板：连完马上在屏幕下方看到对错，两张卡闪一下；推理板时不显示照片小窗 */
@media (max-width: 820px) { .stage.pip.pip-off { display: none; } }
#boardToast {
  position: fixed; left: 50%; bottom: 16px; z-index: 60; width: min(calc(100vw - 24px), 520px);
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px;
  font-size: 15px; line-height: 1.55; color: #fbf6ea; cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55); border: 2px solid rgba(0, 0, 0, 0.35);
  opacity: 0; transform: translate(-50%, 16px); pointer-events: none; transition: opacity 0.2s, transform 0.2s;
}
#boardToast.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
#boardToast.good { background: #24604e; }
#boardToast.bad { background: #8e2419; }
#boardToast.info { background: #3a3328; }
#boardToast .bt-icon {
  flex: none; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800; background: rgba(255, 255, 255, 0.18);
}
.ecard.flash-good { animation: ecGood 1.2s ease-out; }
.ecard.flash-bad { animation: ecBad 0.6s ease-out; }
@keyframes ecGood { 0% { box-shadow: 0 0 0 6px #3a8a70; } 100% { box-shadow: 0 0 0 0 rgba(58, 138, 112, 0); } }
@keyframes ecBad { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-6px); box-shadow: 0 0 0 5px #b3392b; } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
@media (prefers-reduced-motion: reduce) { #boardToast { transition: none; } .ecard.flash-good, .ecard.flash-bad { animation: none; } }

/* V7.51 报告题目：自己选的不再打勾（像是答对了），改成中性的「你选了」标签 */
.cr-mine { display: inline-block; margin-right: 8px; padding: 1px 7px; font-size: 12px; font-weight: 700; vertical-align: 2px;
  color: #f6efe0; background: #3a2a14; border-radius: 4px; }
.cr-opt.picked { background: linear-gradient(180deg, #5d7c99 0%, #456583 50%, #37526b 100%); color: #fff; border-color: #0f1e2b;
  box-shadow: inset 0 0 0 3px #f3d27a, 0 4px 0 #0c1823; }
.cr-opt.picked .cr-mine { color: #2a2016; background: #f3d27a; }
@media (max-width: 820px) { body.no-pip .stage.pip { display: none; } }
/* 交卷后：对的绿、错的红，盖过“你选了”的样式 */
.cr-opt.picked.right, .cr-opt.right { background: #3d6b35; color: #fff; border-color: #1a3316; box-shadow: 0 4px 0 #1a3316; }
.cr-opt.picked.wrong { background: #8a2219; color: #fff; border-color: #3d0c08; box-shadow: 0 4px 0 #3d0c08; }

/* V7.56 每站结束的「这一站的故事」 */
.log p.story { margin: 14px 0 6px; padding: 0; border: 0; }
.st-story { background: #f3ead2; color: #2a2016; border: 1.5px solid #8a7558; border-radius: 6px; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25); overflow: hidden; }
.st-head { padding: 8px 12px; font-family: var(--print); font-weight: 700; font-size: 15px; color: #f6efe0; background: #3a2a1a; }
.st-row { display: grid; grid-template-columns: 7.5em 1fr; gap: 10px; padding: 8px 12px; border-top: 1px dashed rgba(60, 40, 15, 0.3); font-size: 14px; line-height: 1.65; }
.st-row:first-of-type { border-top: 0; }
.st-k { font-weight: 700; color: #7a2a1c; }
.st-q { display: inline-block; margin-top: 4px; font-size: 13px; color: #5c4a35; }
@media (max-width: 560px) { .st-row { grid-template-columns: 1fr; gap: 2px; } }

/* V7.58 手机：顶部固定状态条；电脑上旁边就有完整资料，不显示 */
.c2-hud { display: none; }
@media (max-width: 820px) {
  .c2-hud:not([hidden]) {
    position: fixed; top: 0; left: 0; right: 0; z-index: 45; display: flex; gap: 4px; align-items: stretch;
    padding: 6px 8px; cursor: pointer;
    background: rgba(20, 15, 10, 0.96); border-bottom: 1.5px solid rgba(233, 201, 138, 0.35);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  }
  .c2-hud .hd { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 1px;
    padding: 3px 2px; border-radius: 6px; color: #f3ead6; transition: background 0.3s; }
  .c2-hud .hd-hp, .c2-hud .hd-san { flex-grow: 1.4; }
  .c2-hud .hd-dist { flex-grow: 1.5; }
  .c2-hud b { font-size: 11px; font-weight: 600; color: #c9b892; white-space: nowrap; }
  .c2-hud em { font-style: normal; font-size: 15px; font-weight: 800; line-height: 1.15; white-space: nowrap; }
  .c2-hud s { display: block; width: 90%; height: 4px; background: rgba(255, 255, 255, 0.14); border-radius: 2px; overflow: hidden; text-decoration: none; }
  .c2-hud s i { display: block; height: 100%; background: #c84a3c; }
  .c2-hud .hd-san s i { background: #3a8a70; }
  .c2-hud .dots { display: flex; gap: 3px; padding-top: 3px; }
  .c2-hud .dots i { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid #c9b892; }
  .c2-hud .dots i.on { background: #e9c98a; border-color: #e9c98a; }
  .c2-hud .low em { color: #ff9a86; }
  .c2-hud .hd-dist.low .dots i.on { background: #ff7a66; border-color: #ff7a66; }
  .c2-hud .up { animation: hudUp 1.2s ease-out; }
  .c2-hud .down { animation: hudDown 1.2s ease-out; }
  @keyframes hudUp { 0% { background: rgba(58, 138, 112, 0.75); } 100% { background: transparent; } }
  @keyframes hudDown { 0% { background: rgba(200, 74, 60, 0.8); } 100% { background: transparent; } }
  body.has-hud { padding-top: 56px; }
  /* 照片小窗放在状态条下面 */
  .stage.pip { top: 66px; }
}
@media (prefers-reduced-motion: reduce) { .c2-hud .up, .c2-hud .down { animation: none; } }

/* V7.59 冲洗出来的结果：做成一张暗房相纸，跟正文分开 */
.log p.dev {
  position: relative; margin: 12px 0 14px; padding: 12px 14px 12px 14px;
  color: #f3ead6; background: #2a231b; border-radius: 4px;
  border-left: 5px solid #8a7558; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}
.log p.dev b { color: #ffe3a6; }
.log p.dev.good { border-left-color: #3a8a70; }
.log p.dev.bad { border-left-color: #c84a3c; }
.log p.dev.none { border-left-color: #6b6150; color: #d8ceb8; }
.log p.dev .dv-tag {
  display: inline-block; margin: 0 8px 4px 0; padding: 1px 8px; font-size: 12.5px; font-weight: 700;
  color: #2a2016; background: #e9c98a; border-radius: 3px; vertical-align: 1px;
}
.log p.dev .chip { color: #f3ead6; border-color: rgba(243, 234, 214, 0.55); background: rgba(255, 255, 255, 0.06); }
.log p.dev .chip.good { color: #8fe0c2; border-color: #5fb898; }
.log p.dev .chip.bad { color: #ffab9c; border-color: #e07a6a; }

/* V7.64 侧栏「走过的站」：点开再看那一站的故事 */
.st-past { margin: 6px 0; }
.st-past summary { cursor: pointer; padding: 8px 10px; font-weight: 700; font-size: 14px; color: #f6efe0; background: #3a2a1a; border-radius: 5px; list-style: none; }
.st-past summary::-webkit-details-marker { display: none; }
.st-past summary::before { content: '▸ '; }
.st-past[open] summary::before { content: '▾ '; }
.st-past .st-story { margin-top: 6px; }
.side-empty { margin: 4px 0; font-size: 13px; color: #5c4a35; }

/* V7.65 侧栏：技能和特质的效果直接写出来 */
.sk-list { list-style: none; margin: 8px 0 0; padding: 0; }
.sk-list li { margin: 0 0 8px; padding: 7px 9px; font-size: 13.5px; line-height: 1.6; background: rgba(255, 250, 238, 0.45); border-left: 3px solid #5c4a35; border-radius: 3px; }
.sk-list .sk-type { margin-left: 6px; font-size: 12px; color: #6b5640; }
.sk-list .sk-cost { color: #8a2117; font-weight: 600; }
.side-trait-fx { margin: 4px 0 6px; font-size: 13px; line-height: 1.55; color: #4a3c2c; }

/* V7.66 推理板：卡片写出在哪里拿到的；提示怎么看出有关 */
.ecard .ec-from { display: block; margin-top: 4px; font-style: normal; font-size: 12px; font-weight: 600; color: #6b4a2a; }
.board-tip { display: inline-block; margin-top: 4px; font-size: 13px; opacity: 0.9; }


/* V7.78 推理板防卡关视觉区分：已结清 / 已试过 / 3选1候选 */
.ecard.done {
  opacity: 0.62;
  filter: saturate(0.75);
}
.ecard.done img {
  filter: sepia(0.45) brightness(0.78);
}
.ecard .tag.done {
  background: #6a6357;
  color: #f3ecdc;
}
.ecard.tried-with {
  opacity: 0.48;
}
.ecard .tag.tried {
  left: auto;
  right: 10px;
  background: rgba(52, 42, 34, 0.88);
  color: #e6dac2;
}
.ecard.hint-cand {
  outline: 3px dashed #e6b85c;
  outline-offset: 2px;
}
.ecard .tag.cand {
  left: auto;
  right: 10px;
  background: #b07a24;
  color: #fff8e6;
}
