/* 法律人模拟器 —— 法院卷宗质感
 * 米白纸面 + 深墨蓝，宋体标题 + 楷体叙述
 */

:root {
  --paper: #f6f4ef;
  --card: #ffffff;
  --ink: #23272e;
  --ink-2: #4a505a;
  --muted: #838b96;
  --line: #e2ded5;
  --line-2: #d5d0c5;
  --blue: #2d5fa8;
  --blue-dark: #1e4a86;
  --blue-soft: #eaf0f9;
  --red: #c0392b;
  --red-soft: #fbeeec;
  --green: #1f9d6b;
  --green-soft: #eaf6f1;
  --amber: #b7791f;
  --amber-soft: #fdf5e6;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }
.muted { color: var(--muted); }

.serif { font-family: "SimSun", "Songti SC", serif; }
.kai { font-family: "KaiTi", "Kaiti SC", serif; }

button { font-family: inherit; cursor: pointer; }

/* ---------------- 入口页 ---------------- */

.entry {
  position: fixed;
  inset: 0;
  background: var(--paper);
  overflow-y: auto;
  z-index: 50;
  padding-top: env(safe-area-inset-top);
}

.entry-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 56px 24px 48px;
}

.entry-brand { text-align: center; margin-bottom: 40px; }

.entry-seal {
  width: 62px; height: 62px;
  margin: 0 auto 18px;
  border: 2px solid var(--blue);
  border-radius: 6px;
  color: var(--blue);
  font-family: "SimSun", serif;
  font-size: 34px;
  line-height: 58px;
  letter-spacing: 0;
}

.entry-brand h1 {
  font-family: "SimSun", serif;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: 4px;
  color: var(--ink);
}

.entry-sub {
  margin-top: 10px;
  color: var(--muted);
  font-family: "KaiTi", serif;
  font-size: 15px;
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 16px;
}

.role-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px 22px 20px;
  text-align: left;
  transition: border-color .15s, box-shadow .15s, transform .15s;
  position: relative;
}

/* P1：角色卡顶部像素形象 */
.role-card .role-sprite {
  display: block;
  width: 76px;
  height: 68px;
  margin: 0 auto 10px;
  image-rendering: pixelated;
}
.role-card .role-sprite svg { display: block; width: 100%; height: 100%; }

/* P1：庆祝演出横幅（结案通过 / 晋升成功） */
.celebrate-band {
  width: 100%;
  height: 132px;
  margin: 0 auto 10px;
  border-radius: 8px;
  overflow: hidden;
  background: #f6f4ef;
  border: 1px solid var(--line);
}
.celebrate-band svg { display: block; width: 100%; height: 100%; }
.rp-pass-hero { text-align: center; margin: 6px 0 2px; font-size: 15px; letter-spacing: 2px; }

.role-card.playable:hover {
  border-color: var(--blue);
  box-shadow: 0 6px 20px rgba(45, 95, 168, .12);
  transform: translateY(-2px);
}

.role-card.locked { opacity: .62; cursor: not-allowed; }

/* 角色入口颜色区分（保持法院卷宗风格，仅边框微调） */
.role-card.role-accent-blue.playable:hover { border-color: var(--blue); box-shadow: 0 6px 20px rgba(45, 95, 168, .12); }
.role-card.role-accent-green.playable:hover { border-color: var(--green); box-shadow: 0 6px 20px rgba(31, 157, 107, .12); }
.role-card.role-accent-amber.playable:hover { border-color: var(--amber); box-shadow: 0 6px 20px rgba(183, 121, 31, .12); }
.role-accent-green .role-tag { background: var(--green-soft); color: var(--green); }
.role-accent-amber .role-tag { background: var(--amber-soft); color: var(--amber); }
.role-card.role-accent-green { border-left: 3px solid var(--green); }
.role-card.role-accent-amber { border-left: 3px solid var(--amber); }
.role-card.role-accent-blue { border-left: 3px solid var(--blue); }

.role-card h3 {
  font-family: "SimSun", serif;
  font-size: 20px;
  letter-spacing: 2px;
  margin-bottom: 4px;
}

.role-card .role-tag {
  display: inline-block;
  font-size: 12px;
  padding: 1px 8px;
  border-radius: 3px;
  background: var(--blue-soft);
  color: var(--blue);
  margin-bottom: 10px;
}

.role-card.locked .role-tag { background: #efefef; color: var(--muted); }

/* C12 角色差异化玩法标签（胶囊） */
.role-card .role-kinds {
  display: block;
  margin-bottom: 8px;
}
.role-card .role-kind {
  display: inline-block;
  font-size: 11.5px;
  padding: 1px 8px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fafbfd;
  color: var(--ink-2);
  margin: 0 4px 4px 0;
}

.role-card p { color: var(--ink-2); font-size: 13.5px; }

.entry-foot { margin-top: 34px; text-align: center; }
.entry-foot .muted { font-size: 12.5px; margin-bottom: 12px; }

/* ---------------- 通用按钮 ---------------- */

.btn {
  border: 1px solid var(--blue);
  background: var(--blue);
  color: #fff;
  padding: 8px 18px;
  border-radius: 5px;
  font-size: 14px;
  transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); }

.btn-ghost {
  background: transparent;
  color: var(--ink-2);
  border-color: var(--line-2);
}
.btn-ghost:hover { background: #eeebe4; border-color: var(--line-2); color: var(--ink); }

.btn-sm { padding: 5px 12px; font-size: 12.5px; }

/* ---------------- 顶栏 ---------------- */

.app { display: flex; flex-direction: column; height: 100vh; background: #fff; padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }

.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  height: 54px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

/* 顶栏拆两段：信息徽章行 + 操作按钮行（桌面端同排，移动端上下堆叠） */
.tb-info { display: flex; align-items: center; gap: 20px; flex: 1; min-width: 0; }
.tb-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.tb-item { display: flex; align-items: baseline; gap: 7px; flex-shrink: 0; white-space: nowrap; }
.tb-label { font-size: 12px; color: var(--muted); }
.tb-value { font-family: "SimSun", serif; font-size: 16px; color: var(--ink); }
.tb-value.rank { color: var(--blue); letter-spacing: 1px; }

.tb-spacer { flex: 1; }

.tb-ach { display: flex; gap: 6px; }
.ach-chip {
  font-size: 12px;
  padding: 2px 9px;
  border-radius: 10px;
  background: var(--amber-soft);
  color: var(--amber);
  border: 1px solid #f0e0c0;
}

/* ---------------- 经营层：体力 / 压力条 ---------------- */

.tb-stam, .tb-press { align-items: center; gap: 6px; }

.stam-bar, .press-bar {
  display: inline-block;
  width: 62px;
  height: 7px;
  border-radius: 4px;
  background: #e8e5de;
  overflow: hidden;
  vertical-align: middle;
}
.stam-fill, .press-fill {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: var(--blue);
  transition: width .2s ease;
}
.stam-fill.warn { background: var(--amber); }
.stam-fill.low { background: var(--red); }
.press-fill { background: var(--green); }
.press-fill.warn { background: var(--amber); }
.press-fill.severe { background: var(--red); }

.meter-row { padding: 3px 0 6px; }
.meter-row .stam-bar, .meter-row .press-bar { width: 100%; height: 8px; }

.src-note {
  font-size: 12px;
  color: var(--muted);
  padding: 5px 8px;
  line-height: 1.6;
}
.src-note.bad { color: var(--red); background: var(--red-soft); border-radius: 4px; padding: 6px 8px; }
.src-note.warn { color: var(--amber); background: var(--amber-soft); border-radius: 4px; padding: 6px 8px; }

/* ---------------- 三栏布局 ---------------- */

.layout {
  flex: 1;
  display: grid;
  grid-template-columns: 268px 1fr 292px;
  gap: 0;
  overflow: hidden;
}

.desk {
  border-right: 1px solid var(--line);
  background: #fbfaf7;
  overflow-y: auto;
  padding: 14px;
}

.stage { overflow-y: auto; padding: 22px 26px; }

.side {
  border-left: 1px solid var(--line);
  background: #fbfaf7;
  overflow-y: auto;
  padding: 16px;
}

/* ---------------- 案头 ---------------- */

.desk-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 10px;
}
.desk-head h2 {
  font-family: "SimSun", serif;
  font-size: 15px;
  letter-spacing: 2px;
  color: var(--ink);
}
.desk-head span { font-size: 12px; color: var(--muted); }

.desk-group { margin-bottom: 16px; }
.desk-group-title {
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 1px;
  margin-bottom: 7px;
  padding-left: 2px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.desk-group-title .sg-hint {
  font-size: 10.5px;
  letter-spacing: 0;
  color: #a9aeb7;
}

.desk-cap { font-size: 12px; color: var(--muted); }
.desk-cap.full { color: var(--red); font-weight: 600; }

/* 案源池：待接案件，虚线框以示「尚未入手」 */
.source-group {
  border-top: 1px dashed var(--line);
  padding-top: 13px;
  margin-top: 4px;
}
.src-card {
  display: block;
  width: 100%;
  text-align: left;
  background: #fbfaf7;
  border: 1px dashed var(--line-2);
  border-left: 3px solid transparent;
  border-radius: 6px;
  padding: 9px 12px;
  margin-bottom: 8px;
  transition: border-color .15s, background .15s;
}
.src-card:hover:not(:disabled) {
  border-color: var(--green);
  border-left-color: var(--green);
  background: var(--green-soft);
}
.src-card:disabled { opacity: .6; cursor: not-allowed; }
.src-card .src-act {
  font-size: 11.5px;
  color: var(--green);
  font-weight: 600;
  white-space: nowrap;
}
.src-card:disabled .src-act { color: var(--muted); font-weight: 400; }

.case-card {
  display: block;
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-2);
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 8px;
  transition: border-color .15s, box-shadow .15s;
}
.case-card:hover { border-color: var(--blue); box-shadow: 0 3px 12px rgba(45,95,168,.10); }
.case-card.active { border-left-color: var(--blue); background: var(--blue-soft); }
.case-card.main { border-left-color: var(--blue); }
.case-card.urgent { border-left-color: var(--red); background: var(--red-soft); }

.cc-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 3px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cc-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cc-meta-row { display: inline-flex; flex-wrap: nowrap; align-items: center; gap: 3px 8px; min-width: 0; overflow: hidden; }
.cc-meta-row > span { white-space: nowrap; }
.cc-sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-meta .src-act { flex-shrink: 0; }
.cc-domain { font-size: 11.5px; color: var(--muted); }

.cc-due { font-size: 11.5px; color: var(--ink-2); white-space: nowrap; }
.cc-due.warn { color: var(--amber); font-weight: 600; }
.cc-due.over { color: var(--red); font-weight: 600; }

/* ---------------- 案件区 ---------------- */

.case-head { margin-bottom: 18px; border-bottom: 1px solid var(--line); padding-bottom: 14px; }

.case-head h2 {
  font-family: "SimSun", serif;
  font-size: 23px;
  letter-spacing: 2px;
  margin-bottom: 6px;
}

.case-head .meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.chip {
  font-size: 12px;
  padding: 2px 9px;
  border-radius: 3px;
  background: var(--blue-soft);
  color: var(--blue);
}
.chip.grey { background: #efefef; color: var(--ink-2); }
.chip.red { background: var(--red-soft); color: var(--red); }
.chip.amber { background: var(--amber-soft); color: var(--amber); }

.stage-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 18px;
  padding: 9px 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
}
.stage-bar .sb-name { font-family: "SimSun", serif; font-size: 15px; color: var(--ink); }
.stage-bar .sb-spacer { flex: 1; }
.stage-bar .sb-due { font-size: 13px; color: var(--ink-2); }
.stage-bar .sb-due.warn { color: var(--amber); font-weight: 600; }
.stage-bar .sb-due.over { color: var(--red); font-weight: 600; }
.stage-bar .sb-due.unknown { color: var(--muted); }
.stage-bar .sb-lookup { flex-shrink: 0; }
.stage-bar .sb-lookup:disabled { opacity: .5; cursor: not-allowed; }

.scene {
  font-family: "KaiTi", "Kaiti SC", serif;
  font-size: 16.5px;
  line-height: 2;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 18px 20px;
  margin-bottom: 16px;
  white-space: pre-wrap;
}

.prompt {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 11px;
}

.options { display: flex; flex-direction: column; gap: 9px; }

.opt {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 13px 15px;
  font-size: 14px;
  color: var(--ink);
  line-height: 1.65;
  transition: border-color .13s, background .13s;
}
.opt:hover { border-color: var(--blue); background: #fafcff; }
.opt .opt-idx {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12.5px;
  text-align: center;
  line-height: 22px;
  font-weight: 600;
  margin-top: 1px;
}

.opt:disabled { opacity: .55; cursor: default; }

/* 选项正文与耗时（耗时即体力消耗） */
.opt .opt-text { flex: 1; }
.opt .opt-cost {
  flex-shrink: 0;
  font-size: 11.5px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1px 8px;
  white-space: nowrap;
  margin-top: 1px;
}
.opt.unaffordable { background: #faf9f6; border-style: dashed; }
.opt.unaffordable:disabled { opacity: .75; }
.opt.unaffordable .opt-cost { color: var(--red); border-color: #ecc8c2; background: var(--red-soft); }
.opt.unaffordable .opt-idx { background: #efefef; color: var(--muted); }

/* ---------------- 反馈卡 ---------------- */

.event-card {
  margin: 18px 0;
  background: var(--amber-soft);
  border: 1px solid #f0d8a0;
  border-left: 4px solid var(--amber);
  border-radius: 6px;
  padding: 14px 16px;
  box-shadow: 0 2px 10px rgba(183, 121, 31, .12);
}
.event-card .ev-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 8px;
}
.event-card .ev-icon {
  display: inline-flex;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--amber);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  align-items: center;
  justify-content: center;
}
.event-card .ev-title {
  font-family: "SimSun", serif;
  font-size: 16px;
  letter-spacing: 1px;
  color: var(--amber);
}
.event-card .ev-desc {
  font-family: "KaiTi", serif;
  font-size: 14.5px;
  line-height: 1.85;
  color: var(--ink-2);
  margin-bottom: 11px;
}
.event-card .ev-options { display: flex; flex-direction: column; gap: 8px; }
.event-card .ev-opt {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 10px 14px;
  font-size: 13.5px;
  color: var(--ink);
  text-align: left;
  transition: border-color .13s, background .13s;
}
.event-card .ev-opt:hover { border-color: var(--amber); background: #fef9ec; }
.event-card .ev-tag {
  margin-left: auto;
  font-size: 11px;
  color: #fff;
  background: var(--amber);
  border-radius: 3px;
  padding: 1px 6px;
  letter-spacing: 1px;
}
.event-card .ev-mopt-row {
  display: flex; align-items: center; gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 10px 14px;
  font-size: 13.5px;
  color: var(--ink);
  cursor: pointer;
  transition: border-color .13s, background .13s;
}
.event-card .ev-mopt-row:hover { border-color: var(--amber); background: #fef9ec; }
.event-card .ev-mopt-row input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--amber); flex: none; }
.event-card .ev-submit {
  margin-top: 10px;
  background: var(--amber);
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.event-card .ev-submit:disabled { background: #d9d4c9; cursor: not-allowed; }
.event-card .ev-hint { margin-top: 6px; font-size: 12px; color: var(--muted); }
.event-card .ev-days {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
}

.feedback {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}
.feedback.good { border-color: #bfe0d1; }
.feedback.bad { border-color: #ecc8c2; }
/* 延后揭示：反馈卡保持中性，不给对错色彩暗示 */
.feedback .fb-head { background: #f3f2ee; color: var(--ink); }
.feedback.blocked { border-color: #ecdfc2; }
.feedback.blocked .fb-head { background: var(--amber-soft); color: var(--amber); }
.fb-note {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.7;
}

.fb-head {
  padding: 10px 15px;
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.feedback.good .fb-head { background: var(--green-soft); color: var(--green); }
.feedback.bad .fb-head { background: var(--red-soft); color: var(--red); }

.fb-body { padding: 14px 15px; }
.fb-row { margin-bottom: 11px; }
.fb-row:last-child { margin-bottom: 0; }
.fb-label {
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 1px;
  margin-bottom: 3px;
}
.fb-text { font-size: 13.5px; color: var(--ink-2); line-height: 1.75; }
.fb-law {
  font-family: "SimSun", serif;
  font-size: 13.5px;
  color: var(--blue);
}
.fb-over {
  background: var(--red-soft);
  border-radius: 4px;
  padding: 9px 12px;
  font-size: 13px;
  color: var(--red);
}

.fb-next { margin-top: 16px; }

/* ---------------- 侧栏 ---------------- */

.side-sec { margin-bottom: 20px; }
.side-sec h3 {
  font-family: "SimSun", serif;
  font-size: 14px;
  letter-spacing: 2px;
  color: var(--ink);
  margin-bottom: 9px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.kv { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; }
.kv .k { color: var(--muted); }
.kv .v { color: var(--ink); font-weight: 600; }

.flag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.flag {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 3px;
  background: #efefef;
  color: var(--ink-2);
}
.flag.bad { background: var(--red-soft); color: var(--red); }
.flag.good { background: var(--green-soft); color: var(--green); }
.kv .v.bad { color: var(--red); }

/* 办案记录：只列做过什么，不标对错 */
.pick-list {
  margin-top: 12px;
  border-top: 1px dashed var(--line);
  padding-top: 10px;
}
.pick-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.65;
  padding: 5px 0;
  border-bottom: 1px dashed var(--line);
}
.pick-item:last-child { border-bottom: none; }
.pick-item .pi-idx {
  flex-shrink: 0;
  width: 17px; height: 17px;
  border-radius: 50%;
  background: #efefef;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
  line-height: 17px;
}
.pick-item .pi-txt { flex: 1; }
.pick-item .pi-txt em {
  font-style: normal;
  color: var(--muted);
  margin-right: 5px;
}

.log-list { font-size: 12.5px; }
.log-item { padding: 5px 0; border-bottom: 1px dashed var(--line); color: var(--ink-2); }
.log-item:last-child { border-bottom: none; }
.log-item .d { color: var(--muted); margin-right: 6px; font-size: 11.5px; }
.log-item.good { color: var(--green); }
.log-item.bad { color: var(--red); }

.promo-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
}
.promo-box h4 { font-size: 13px; margin-bottom: 8px; font-family: "SimSun", serif; letter-spacing: 1px; }
.promo-item { display: flex; justify-content: space-between; font-size: 12.5px; padding: 3px 0; flex-wrap: wrap; }
.promo-item .px-bar { width: 100%; height: 6px; margin: 3px 0 1px; }
.promo-item .ok { color: var(--green); }
.promo-item .no { color: var(--muted); }

/* ---------------- v1.46 执业生涯档案 ---------------- */
.rp-sec-title {
  margin: 16px 0 8px;
  font-size: 13px;
  font-weight: 650;
  font-family: "SimSun", serif;
  letter-spacing: 1px;
  color: #1c2430;
  border-left: 3px solid var(--main, #2d5fa8);
  padding-left: 8px;
}
.exam-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 4px;
}
.exam-name { font-size: 13.5px; font-weight: 600; color: #1c2430; margin-bottom: 4px; }
.exam-note { font-size: 12px; color: var(--muted); line-height: 1.6; margin-bottom: 8px; }
.exam-state { font-size: 12.5px; }
.exam-state.ok { color: var(--green); }
.exam-state.no { color: #b0782a; }
.career-timeline {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  max-height: 220px;
  overflow: auto;
}
.ct-item { display: flex; gap: 8px; align-items: baseline; font-size: 12.5px; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.ct-item:last-child { border-bottom: none; }
.ct-day { color: var(--muted); font-size: 11.5px; min-width: 52px; }
.ct-type { font-weight: 600; min-width: 30px; }
.ct-item.up .ct-type { color: var(--green); }
.ct-item.down .ct-type { color: var(--red); }
.ct-item.side .ct-type { color: var(--main, #2d5fa8); }
.ct-note { color: #1c2430; }

/* ---------------- 空状态 ---------------- */

.empty {
  text-align: center;
  color: var(--muted);
  font-family: "KaiTi", serif;
  font-size: 15px;
  padding: 70px 20px;
  line-height: 2;
}

/* ---------------- 弹层 ---------------- */

.layer {
  position: fixed;
  inset: 0;
  background: rgba(35, 39, 46, .42);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
  padding: 24px;
}

.layer-box {
  background: var(--paper);
  border-radius: 8px;
  max-width: 640px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 28px 30px;
  box-shadow: 0 18px 50px rgba(0,0,0,.22);
}

.rp-title {
  font-family: "SimSun", serif;
  font-size: 22px;
  letter-spacing: 2px;
  margin-bottom: 6px;
}
.rp-sub { color: var(--muted); font-size: 13px; margin-bottom: 18px; }

.rp-score {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
.rp-score .cell {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 8px;
  text-align: center;
}
.rp-score .cell .n {
  font-family: "SimSun", serif;
  font-size: 22px;
  color: var(--blue);
  line-height: 1.2;
  white-space: nowrap;
}
.rp-score .cell .n.bad { color: var(--red); }
.rp-score .cell .n.good { color: var(--green); }
.rp-score .cell .l { font-size: 11.5px; color: var(--muted); margin-top: 3px; line-height: 1.4; }

/* 逐项复盘标题：这里是揭晓对错与法条的落点 */
.rp-steps-title {
  font-family: "SimSun", serif;
  font-size: 14px;
  letter-spacing: 1px;
  color: var(--ink);
  margin-bottom: 9px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--line);
}

.rp-ending {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: 6px;
  padding: 14px 16px;
  margin-bottom: 20px;
}
.rp-ending h4 { font-family: "SimSun", serif; font-size: 16px; margin-bottom: 6px; }
.rp-ending p { font-size: 13.5px; color: var(--ink-2); font-family: "KaiTi", serif; font-size: 15px; }

.rp-steps { margin-bottom: 20px; }
.rp-step {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13.5px;
}
.rp-step:last-child { border-bottom: none; }
.rp-step .idx {
  flex-shrink: 0;
  width: 20px; height: 20px;
  border-radius: 50%;
  font-size: 11.5px;
  text-align: center;
  line-height: 20px;
  background: var(--green-soft);
  color: var(--green);
  margin-top: 3px;
}
.rp-step.bad .idx { background: var(--red-soft); color: var(--red); }
.rp-step .txt { flex: 1; }
.rp-step .law { color: var(--blue); font-size: 12.5px; font-family: "SimSun", serif; }
.rp-step .ex { color: var(--muted); font-size: 12.5px; margin-top: 3px; }

.layer-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ---------------- 角色养成（RPG）面板 ---------------- */

.rpg-attr-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 12px 0; }
.rpg-attr { background: var(--bg2, #f4f1ec); border: 1px solid var(--bd, #ddd8cf); border-radius: 8px; padding: 10px 12px; }
.ra-name { font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: space-between; }
.ra-gear { color: #8a6d1a; font-style: normal; font-size: 11px; }
.ra-bar { height: 6px; background: #e4dfd5; border-radius: 3px; margin: 8px 0 6px; overflow: hidden; }
.ra-fill { display: block; height: 100%; background: linear-gradient(90deg, #7a9e6b, #4e7d46); border-radius: 3px; }
.ra-val { font-size: 18px; font-weight: 800; color: #3a3328; }
.ra-add { margin-top: 6px; }
.rpg-points { font-size: 13px; color: #5a5348; margin: 4px 0 14px; }
.rpg-points strong { color: #b8860b; font-size: 15px; }
.rpg-hint { color: #9a9284; margin-left: 8px; font-size: 12px; }

.rpg-sec-title { font-size: 14px; font-weight: 800; color: #4a4237; margin: 16px 0 8px; padding-bottom: 4px; border-bottom: 1px dashed #ddd8cf; }
.rpg-gear-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.rpg-gear-slot { border: 1px solid #ddd8cf; border-radius: 8px; padding: 8px; background: #faf8f4; }
.rpg-gear-slot.on { border-color: #b8860b; box-shadow: 0 0 0 1px #b8860b33; }
.rgs-slot { font-size: 11px; color: #9a9284; margin-bottom: 4px; }
.rgs-item { font-size: 13px; font-weight: 700; padding: 4px 0; border-radius: 6px; }
.rgs-item.empty { color: #b5ada0; font-weight: 400; }
.rgs-eff { display: block; font-size: 11px; font-weight: 400; color: #6a6358; margin: 2px 0 4px; }
.rgs-out { display: block; margin-top: 4px; }

.rpg-bag, .rpg-shop { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.rpg-bag-item, .rpg-shop-item { border-radius: 8px; padding: 8px 10px; border: 1px solid #ddd8cf; background: #faf8f4; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rbi-name, .rsi-name { font-weight: 700; font-size: 13px; }
.rbi-eff, .rsi-eff { font-size: 11px; color: #6a6358; flex: 1 1 100%; }
.rsi-slot { font-size: 11px; color: #9a9284; }
.rbi-wear { margin-left: auto; }

/* 装备品质色 */
.q1 { border-left: 4px solid #c9c2b4; }
.q3 { border-left: 4px solid #4a7ab5; }
.q5 { border-left: 4px solid #c9961a; background: linear-gradient(180deg, #fdf6e3, #f7e8c4) !important; }
.rp-rpg { margin-top: 6px; }
.rg-chip.q5 { background: #c9961a; color: #fff; }

/* ---------------- Roguelike 巡检局（批 4） ---------------- */

.rr-name { font-size: 15px; font-weight: 800; color: #3a3328; margin-bottom: 4px; }
.rr-desc { font-size: 12.5px; color: #6a6358; line-height: 1.55; margin-bottom: 6px; }
.rr-reward { font-size: 12px; color: #8a6d1a; margin-bottom: 8px; }
.btn-route { background: #8a6d1a; color: #fff; border: none; }
.rs-name { font-size: 16px; font-weight: 800; color: #3a3328; margin-bottom: 8px; }
.rs-meta { font-size: 13px; color: #3a3328; margin: 6px 0; }
.rs-meta .bad { color: #c0392b; }
.rs-desc { font-size: 12.5px; color: #6a6358; line-height: 1.55; margin: 6px 0; }
.rs-hint { font-size: 11.5px; color: #8a8578; margin-top: 6px; }

/* 事件弹层 */
.re-kind { font-size: 11.5px; font-weight: 700; color: #8a6d1a; letter-spacing: 2px; margin-bottom: 4px; }
.re-title { font-size: 19px; font-weight: 800; color: #3a3328; margin-bottom: 8px; }
.re-scene { font-size: 13.5px; line-height: 1.65; color: #4a4237; background: #f3ecdc; border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; }
.re-options { display: grid; gap: 8px; }
.re-opt { text-align: left; background: #fdf9ee; border: 1px solid #ddd8cf; border-radius: 8px; padding: 10px 12px; font-size: 13.5px; line-height: 1.5; color: #3a3328; cursor: pointer; }
.re-opt:hover { border-color: #8a6d1a; }
.re-why { margin-top: 10px; }
.re-why-text { font-weight: 700; font-size: 13.5px; margin-bottom: 4px; }
.re-why-text.good { color: #2e6b3f; }
.re-why-text.bad { color: #c0392b; }
.re-why-law { font-size: 13px; color: #4a4237; line-height: 1.6; background: #f3ecdc; border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; }
.re-ok { background: #8a6d1a; color: #fff; border: none; padding: 8px 26px; border-radius: 8px; cursor: pointer; }

/* 局结算弹层 */
/* ---------------- NPC 同事好感线（批 5） ---------------- */

.npc-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 760px) { .npc-list { grid-template-columns: 1fr; } }
.npc-card { border: 1px solid #ddd8cf; border-radius: 10px; background: #fdf9ee; padding: 12px; }
.npc-card.main { border-color: #8a6d1a; background: #fbf3dd; }
.npc-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.npc-icon { font-size: 22px; }
.npc-who { flex: 1; }
.npc-name { font-weight: 800; color: #3a3328; font-size: 14px; }
.npc-main-tag { font-style: normal; font-size: 10.5px; color: #8a6d1a; background: #f3e3b0; border-radius: 4px; padding: 1px 5px; margin-left: 4px; }
.npc-role { font-size: 11.5px; color: #8a8578; }
.npc-stage { font-size: 12px; font-weight: 700; color: #2e6b3f; background: #e7f2e7; border-radius: 6px; padding: 2px 8px; }
.npc-progress { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.npc-fill { background: linear-gradient(90deg, #2e6b3f, #5fae72) !important; }
.npc-line { font-size: 12px; color: #6a6358; font-style: italic; margin-bottom: 8px; }
.npc-stories { display: grid; gap: 5px; }
.npc-story { font-size: 12.5px; color: #3a3328; background: #f3ecdc; border-radius: 6px; padding: 6px 9px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.npc-story:hover:not(.locked) { border-color: #8a6d1a; }
.npc-story.locked { color: #aaa28f; cursor: default; }
.npc-story-aff { font-size: 10.5px; color: #8a8578; }
.npc-card.main .npc-story.locked { color: #b5a884; }

/* 剧情弹层 */
/* ---------------- 机构运营（批 6） ---------------- */

.org-status { border: 1px solid #ddd8cf; border-radius: 10px; background: #fdf9ee; padding: 14px; margin-bottom: 12px; }
.os-name { font-size: 17px; font-weight: 800; color: #3a3328; margin-bottom: 6px; }
.os-level { font-size: 13px; color: #3a3328; margin-bottom: 8px; }
.os-bonus { display: inline-block; margin-left: 8px; font-size: 11.5px; color: #2e6b3f; background: #e7f2e7; border-radius: 6px; padding: 2px 8px; }
.org-fill { background: linear-gradient(90deg, #b8860b, #f0c040) !important; }
.os-progress { display: flex; align-items: center; gap: 8px; margin: 8px 0; }
.os-next { font-size: 13px; color: #4a4237; line-height: 1.6; margin-bottom: 10px; }
.btn-org-up { background: #8a6d1a; color: #fff; border: none; }
.btn-org-up[disabled] { background: #c9c2b4; color: #fff; cursor: not-allowed; }
.org-know { display: grid; gap: 8px; }
.org-k { border: 1px solid #ddd8cf; border-radius: 8px; background: #faf6ec; padding: 10px 12px; }
.org-k.locked { opacity: .55; border-style: dashed; }
.ok-title { font-weight: 800; color: #3a3328; font-size: 13.5px; margin-bottom: 4px; }
.ok-law { font-size: 12.5px; color: #6a6358; line-height: 1.6; }

/* ---------------- 批 6 小游戏：限时压力 / 证据链 / 量刑天平 ---------------- */

/* 限时压力庭审：复用 mb-* 血条，倒计时 low 高亮 */
.mg-timer.low { color: #c0392b !important; font-weight: 800; }
.mg-streak-label { font-size: 11.5px; color: #8a8578; margin-right: 6px; }
.mg-streak-dots i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ddd8cf; margin-right: 3px; }
.mg-streak-dots i.on { background: #f0c040; }
.mg-streak-num { font-size: 12px; font-weight: 700; color: #8a6d1a; margin-left: 6px; }

/* 证据链搭建 */
.mg-chain { border: 1px solid #ddd8cf; border-radius: 10px; background: #fdf9ee; padding: 12px; }
.ch-buildup { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 30px; border-bottom: 1px dashed #ddd8cf; padding: 6px 0 10px; margin-bottom: 10px; }
.ch-link { font-size: 12.5px; color: #2e6b3f; background: #e7f2e7; border-radius: 6px; padding: 4px 8px; }
.ch-arrow { color: #8a6d1a; font-weight: 800; }
.ch-pool { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
@media (max-width: 760px) { .ch-pool { grid-template-columns: 1fr; } }
.ch-card { font-size: 12.5px; line-height: 1.5; text-align: left; background: #f3ecdc; border: 1px solid #ddd8cf; border-radius: 8px; padding: 8px 10px; color: #3a3328; cursor: pointer; }
.ch-card:hover:not(.disabled) { border-color: #8a6d1a; }
.ch-card.wrong { border-color: #c0392b; background: #f9e8e4; }
.ch-card.placed { opacity: .4; }
.mg-chain-why { font-size: 12.5px; color: #4a4237; background: #f3ecdc; border-radius: 6px; padding: 6px 10px; margin-top: 10px; }

/* 量刑天平 */
.mg-bal { border: 1px solid #ddd8cf; border-radius: 10px; background: #fdf9ee; padding: 12px; }
.bal-scales { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 10px; }
@media (max-width: 760px) { .bal-scales { grid-template-columns: repeat(2, 1fr); } }
.bal-pan { background: #f3ecdc; border: 1px solid #ddd8cf; border-radius: 8px; padding: 8px; text-align: center; cursor: pointer; }
.bal-pan:hover { border-color: #8a6d1a; }
.bp-name { display: block; font-weight: 700; color: #3a3328; font-size: 13px; }
.bp-num { display: block; font-size: 11.5px; color: #8a8578; margin-top: 2px; }
.bal-factors { display: grid; gap: 6px; }
.bal-factor { font-size: 12.5px; line-height: 1.5; text-align: left; background: #f3ecdc; border: 1px solid #ddd8cf; border-radius: 8px; padding: 8px 10px; color: #3a3328; cursor: pointer; }
.bal-factor:hover:not(.disabled) { border-color: #8a6d1a; }
.bal-factor.sel { border-color: #8a6d1a; background: #fbf3dd; }
.bal-factor.placed { opacity: .4; }
.mg-bal-why { font-size: 12.5px; color: #4a4237; background: #f3ecdc; border-radius: 6px; padding: 6px 10px; margin-top: 10px; }

.npc-story-box { width: 540px; max-width: 92vw; background: #faf6ec; border: 2px solid #2e6b3f; border-radius: 14px; padding: 20px 22px; box-shadow: 0 0 40px rgba(0, 0, 0, .5); }
.npc-story-kind { font-size: 11.5px; font-weight: 700; color: #2e6b3f; letter-spacing: 2px; margin-bottom: 4px; }
.npc-story-title { font-size: 19px; font-weight: 800; color: #3a3328; margin-bottom: 10px; }
.npc-story-talk { font-size: 14px; line-height: 1.7; color: #4a4237; background: #f3ecdc; border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; }
.npc-story-tip { font-size: 13px; line-height: 1.6; color: #2e6b3f; background: #e7f2e7; border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; }
.npc-story-reward { font-size: 13px; font-weight: 700; color: #8a6d1a; margin-bottom: 10px; }
.rr2-title { font-size: 26px; font-weight: 900; letter-spacing: 3px; color: #f8e7b0; margin-bottom: 6px; }
.rr2-sub { font-size: 13px; color: #d8cfa8; margin-bottom: 12px; }
.rr2-body { font-size: 14px; line-height: 1.6; color: #f5efe0; background: rgba(0, 0, 0, .3); border-radius: 8px; padding: 12px; margin-bottom: 14px; }
.rr2-ok { background: #f0c040; color: #3a2c08; border: none; padding: 9px 34px; border-radius: 8px; font-size: 14px; font-weight: 700; cursor: pointer; }

/* ---------------- 抽卡（批 3） ---------------- */

.rpg-gacha { border: 1px solid #ddd8cf; border-radius: 10px; background: #fdf9ee; padding: 12px; margin-bottom: 12px; }
.rpg-gacha-meta { font-size: 12.5px; color: #6a6358; margin-bottom: 8px; }
.rpg-gacha-meta strong { color: #8a6d1a; }
.rpg-gacha-pity { display: flex; align-items: center; gap: 8px; margin: 6px 0; font-size: 12px; }
.rgp-bar { flex: 1; height: 10px; background: #e8e3d8; border-radius: 5px; overflow: hidden; }
.rgp-fill { display: block; height: 100%; border-radius: 5px; }
.rgp-fill.p3 { background: linear-gradient(90deg, var(--blue-dark), var(--blue)); }
.rgp-fill.p5 { background: linear-gradient(90deg, #b8860b, #f0c040); }
.rgp-num { flex: 0 0 44px; text-align: right; font-weight: 700; color: #6a6358; }
.rpg-gacha-actions { display: flex; gap: 10px; margin-top: 10px; }
.btn-gacha { flex: 1; background: #8a6d1a; color: #fff; border: none; padding: 9px 0; border-radius: 8px; font-size: 14px; font-weight: 700; cursor: pointer; }
.btn-gacha:disabled { background: #c9c2b4; cursor: not-allowed; }
.btn-gacha-ten { background: linear-gradient(90deg, #8a6d1a, #b8860b); }
.rpg-gacha-hint { font-size: 11.5px; color: #8a8578; margin-top: 8px; line-height: 1.5; }
.rbi-lvl { font-style: normal; color: #b8860b; font-weight: 700; margin-left: 4px; }
.rbi-enh { margin-right: 4px; }

/* 抽卡弹层 */
.gacha-flash-layer { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; background: rgba(20, 16, 8, .72); animation: gf-fadein .2s ease; }
.gacha-flash { position: relative; border-radius: 16px; padding: 28px 24px 22px; max-width: 92vw; width: 520px; text-align: center; overflow: hidden; }
.gacha-flash.gold { background: radial-gradient(circle at 50% 20%, #7a5a10, #3a2c08 70%); border: 2px solid #f0c040; box-shadow: 0 0 60px rgba(240, 192, 64, .75); animation: gf-shake .5s ease .1s; }
.gacha-flash.gold::before { content: ''; position: absolute; inset: -60%; background: conic-gradient(from 0deg, transparent 0deg, rgba(255, 215, 120, .5) 20deg, transparent 60deg); animation: gf-spin 2.2s linear infinite; }
.gacha-flash.blue { background: radial-gradient(circle at 50% 20%, #1d4a63, #0c2233 70%); border: 2px solid var(--blue); box-shadow: 0 0 40px rgba(90, 167, 201, .6); }
.gacha-flash.white { background: radial-gradient(circle at 50% 20%, #3a3a3a, #171717 70%); border: 1px solid #8a8578; box-shadow: 0 0 24px rgba(255, 255, 255, .15); }
.gf-title { position: relative; z-index: 1; font-size: 26px; font-weight: 900; letter-spacing: 4px; color: #f8e7b0; margin-bottom: 14px; text-shadow: 0 0 18px rgba(255, 220, 130, .9); }
.gf-cards { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.gf-card { background: rgba(0, 0, 0, .35); border-radius: 10px; padding: 10px 6px; border: 1px solid rgba(255, 255, 255, .18); }
.gf-card.q5 { border-color: #f0c040; box-shadow: 0 0 14px rgba(240, 192, 64, .55); animation: gf-pop .4s ease; }
.gf-card.q3 { border-color: var(--blue); }
.gfc-name { font-size: 13px; font-weight: 700; color: #f5efe0; line-height: 1.35; }
.gf-card.q5 .gfc-name { color: #ffe9a8; }
.gfc-eff { font-size: 11.5px; color: #c9c2b4; margin-top: 4px; }
.gfc-dup { font-size: 11px; color: #f0c040; margin-top: 5px; }
.gfc-new { font-size: 11px; color: #7fd0a0; margin-top: 5px; }
.gf-foot { position: relative; z-index: 1; font-size: 13px; color: #f0c040; margin: 12px 0 10px; }
.gf-close { position: relative; z-index: 1; background: #f0c040; color: #3a2c08; border: none; padding: 9px 34px; border-radius: 8px; font-size: 14px; font-weight: 700; cursor: pointer; }
@keyframes gf-fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes gf-spin { to { transform: rotate(360deg); } }
@keyframes gf-pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
@keyframes gf-shake { 0%, 100% { transform: translate(0, 0); } 20% { transform: translate(-4px, 2px); } 40% { transform: translate(4px, -2px); } 60% { transform: translate(-3px, -2px); } 80% { transform: translate(3px, 2px); } }

/* ---------------- 庭审攻防（battle） ---------------- */

.mg-battle { margin-top: 10px; }
.mb-bars { display: grid; gap: 6px; margin-bottom: 10px; }
.mb-bar { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.mb-name { flex: 0 0 120px; font-weight: 700; color: #4a4237; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mb-track { flex: 1; height: 12px; background: #e8e3d8; border-radius: 6px; overflow: hidden; border: 1px solid #ddd8cf; }
.mb-fill { display: block; height: 100%; border-radius: 5px; transition: width .25s ease; }
.mb-fill.foe { background: linear-gradient(90deg, #c0392b, #e07a5f); }
.mb-fill.me { background: linear-gradient(90deg, var(--blue-dark), var(--blue)); }
.mb-num { flex: 0 0 38px; text-align: right; font-weight: 700; color: #6a6358; }
.mb-atk { border: 1px solid #ddd8cf; border-left: 4px solid #8a6d1a; background: #fdf9ee; border-radius: 8px; padding: 10px 12px; margin: 8px 0; }
.mb-atk.bad { border-left-color: #c0392b; }
.mb-atk-type { display: inline-block; font-size: 11px; font-weight: 700; color: #8a6d1a; background: #f3e6c4; border-radius: 4px; padding: 1px 7px; margin-bottom: 5px; }
.mb-atk-text { font-size: 14px; line-height: 1.6; color: #3a3328; }
.mb-respond-label { font-size: 12px; font-weight: 700; color: #6a6358; margin: 10px 0 6px; }
.mb-respond { display: grid; gap: 7px; }
.mb-opt { text-align: left; background: #faf8f4; border: 1px solid #ddd8cf; border-radius: 8px; padding: 9px 12px; font-size: 13.5px; line-height: 1.55; color: #3a3328; cursor: pointer; }
.mb-opt:hover:not([disabled]) { border-color: #8a6d1a; background: #fdf9ee; }
.mb-opt.wrong { border-color: #c0392b; background: #fbeae7; color: #7a2c22; }
.mb-opt[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------------- 角色养成（RPG）面板 ---------------- */

.rpg-attr-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 12px 0; }
.rpg-attr { background: var(--bg2, #f4f1ec); border: 1px solid var(--bd, #ddd8cf); border-radius: 8px; padding: 10px 12px; }
.ra-name { font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: space-between; }
.ra-gear { color: #8a6d1a; font-style: normal; font-size: 11px; }
.ra-bar { height: 6px; background: #e4dfd5; border-radius: 3px; margin: 8px 0 6px; overflow: hidden; }
.ra-fill { display: block; height: 100%; background: linear-gradient(90deg, #7a9e6b, #4e7d46); border-radius: 3px; }
.ra-val { font-size: 18px; font-weight: 800; color: #3a3328; }
.ra-add { margin-top: 6px; }
.rpg-points { font-size: 13px; color: #5a5348; margin: 4px 0 14px; }
.rpg-points strong { color: #b8860b; font-size: 15px; }
.rpg-hint { color: #9a9284; margin-left: 8px; font-size: 12px; }

.rpg-sec-title { font-size: 14px; font-weight: 800; color: #4a4237; margin: 16px 0 8px; padding-bottom: 4px; border-bottom: 1px dashed #ddd8cf; }
.rpg-gear-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.rpg-gear-slot { border: 1px solid #ddd8cf; border-radius: 8px; padding: 8px; background: #faf8f4; }
.rpg-gear-slot.on { border-color: #b8860b; box-shadow: 0 0 0 1px #b8860b33; }
.rgs-slot { font-size: 11px; color: #9a9284; margin-bottom: 4px; }
.rgs-item { font-size: 13px; font-weight: 700; padding: 4px 0; border-radius: 6px; }
.rgs-item.empty { color: #b5ada0; font-weight: 400; }
.rgs-eff { display: block; font-size: 11px; font-weight: 400; color: #6a6358; margin: 2px 0 4px; }
.rgs-out { display: block; margin-top: 4px; }

.rpg-bag, .rpg-shop { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.rpg-bag-item, .rpg-shop-item { border-radius: 8px; padding: 8px 10px; border: 1px solid #ddd8cf; background: #faf8f4; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rbi-name, .rsi-name { font-weight: 700; font-size: 13px; }
.rbi-eff, .rsi-eff { font-size: 11px; color: #6a6358; flex: 1 1 100%; }
.rsi-slot { font-size: 11px; color: #9a9284; }
.rbi-wear { margin-left: auto; }

/* 装备品质色 */
.q1 { border-left: 4px solid #c9c2b4; }
.q3 { border-left: 4px solid #4a7ab5; }
.q5 { border-left: 4px solid #c9961a; background: linear-gradient(180deg, #fdf6e3, #f7e8c4) !important; }
.rp-rpg { margin-top: 6px; }
.rg-chip.q5 { background: #c9961a; color: #fff; }

/* ---------------- 响应式 ---------------- */

/* 桌面端隐藏视图切换按钮 */
.tb-view-btn { display: none !important; }

@media (max-width: 1080px) {
  .layout { grid-template-columns: 232px 1fr; }
  .side { display: none; }
  /* 窄桌面/平板：顶栏信息项不再被硬压成竖排——允许换行，高度自适应 */
  .topbar { height: auto; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
  .tb-info { flex-wrap: wrap; gap: 6px 16px; row-gap: 4px; }
  .tb-info > * { flex-shrink: 0; white-space: nowrap; }
  .tb-actions { flex-wrap: wrap; }

@media (max-width: 760px) {
  /* 单栏布局：默认只显示案件区，案头/侧栏靠 body[data-view] 切换 */
  .layout { grid-template-columns: 1fr; }
  .desk, .side { display: none; }
  body[data-view="desk"] .desk { display: block; }
  body[data-view="desk"] .stage,
  body[data-view="desk"] .side { display: none; }
  body[data-view="side"] .side { display: block; }
  body[data-view="side"] .stage,
  body[data-view="side"] .desk { display: none; }

  /* 顶栏：拆成信息行(换行胶囊) + 操作行(横向滚动)，杜绝压缩截断 */
  .tb-view-btn { display: inline-flex !important; }
  .topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    height: auto;
    padding: 8px 10px;
    overflow: visible;
  }
  .tb-info {
    flex: none;
    flex-wrap: wrap;
    gap: 6px 10px;
    min-width: 0;
  }
  .tb-info > * { flex-shrink: 0; }
  /* 信息项统一成小胶囊，视觉整齐、不再生硬拼接 */
  .tb-info .tb-item,
  .tb-info .tb-stam,
  .tb-info .tb-press,
  .tb-info .tb-merit,
  .tb-info .tb-court {
    align-items: center;
    background: #f4f1ea;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 3px 10px;
    margin: 0;
  }
  /* 机构进度按钮手机端收紧，底色统一为浅米胶囊，避免深蓝突兀 */
  .tb-info .org-prog-btn {
    background: #f4f1ea;
    border-color: var(--line);
    padding: 2px 8px;
    border-radius: 16px;
    max-width: 100%;
  }
  .tb-info .org-prog-btn .org-prog-num,
  .tb-info .org-prog-btn .org-cur-name { color: var(--ink-2); }
  .tb-info .org-prog-btn.ready {
    background: #fffbea;
    border-color: #d9a114;
    color: #7a5a10;
  }
  .tb-info .org-prog-btn .org-prog-bar { width: 42px; }
  .tb-info .org-prog-btn .org-cur-name { max-width: 96px; }
  .tb-actions {
    flex: none;
    overflow-x: auto;
    gap: 6px;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }
  .tb-actions > * { flex-shrink: 0; white-space: nowrap; }
  .tb-actions .btn { padding: 5px 10px; font-size: 12px; }
  .tb-ach { display: none; }
  .tb-stam, .tb-press { gap: 5px; }
  .stam-bar, .press-bar { width: 38px; }
  .tb-view-btn.active {
    background: var(--blue-soft);
    color: var(--blue);
    border-color: var(--blue);
  }

  /* 案件区与字号收紧 */
  .stage { padding: 14px; }
  .case-head h2 { font-size: 20px; letter-spacing: 1px; }
  .scene { font-size: 15.5px; padding: 14px 15px; line-height: 1.9; }
  .prompt { font-size: 14px; }
  .opt { padding: 11px 13px; font-size: 13.5px; }
  /* 阶段条在窄屏折行：查法条按钮单独一行 */
  .stage-bar { flex-wrap: wrap; gap: 8px; }
  .stage-bar .sb-lookup { order: 3; width: 100%; }

  /* 入口页：单列 */
  .entry-inner { padding: 28px 16px 24px; }
  .role-grid { grid-template-columns: 1fr; gap: 12px; }
  .role-card { padding: 18px 18px 16px; }
  .role-card h3 { font-size: 18px; }
  .entry-brand h1 { font-size: 26px; letter-spacing: 2px; }
  .entry-sub { font-size: 14px; }

  /* 复盘层单列、字号收紧 */
  .layer { padding: 12px; }
  .layer-box { padding: 20px 18px; max-height: 92vh; }
  .rp-title { font-size: 19px; }
  .rp-score { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .rp-score .cell .n { font-size: 20px; }
}

/* 案件随机变体标签 */
.chip.vtag { border-color: #d35400; color: #d35400; }
.cc-vtag { font-size: 11px; color: #d35400; white-space: nowrap; }

/* ========================================================
   像素风沉浸层换皮（追加段）
   ======================================================== */

/* 像素字体（本地 woff2，运行时离线） */
@font-face {
  font-family: 'Fusion Pixel 12px Proportional SC';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(./fonts/pixel.woff2) format('woff2');
}

body {
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
}

button, input, select, textarea { font-family: inherit; }

img { image-rendering: pixelated; }



/* ---------- 办公室场景头图 ---------- */

.office {
  position: relative;
  height: 120px;
  overflow: hidden;
  margin-bottom: 12px;
  background: #dfe6ee;
  box-shadow: 0 -3px 0 0 var(--ink), 0 3px 0 0 var(--ink), -3px 0 0 0 var(--ink), 3px 0 0 0 var(--ink);
}
.office svg { width: 100%; height: 100%; display: block; }
.office-overtag {
  position: absolute;
  right: 8px;
  bottom: 6px;
  font-size: 11px;
  color: #f5d9a8;
  background: rgba(35,39,46,0.72);
  padding: 1px 8px;
}
.entry-cover svg { display: block; }

/* ---------- 当事人条 ---------- */

.party-bar { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 2px; }
.party {
  display: flex; align-items: center; gap: 7px;
  background: var(--card);
  border: 2px solid var(--line-2);
  padding: 4px 12px 4px 4px;
}
.p-ava { width: 34px; height: 34px; display: block; flex: none; }
.p-ava svg { width: 100%; height: 100%; display: block; }
.p-txt { display: flex; flex-direction: column; line-height: 1.25; }
.p-name { font-size: 13px; font-weight: 700; }
.p-role { font-size: 11px; color: var(--muted); }

/* ---------- 前情提要 ---------- */

.backstory {
  background: var(--amber-soft);
  padding: 8px 12px;
  margin: 10px 0;
  font-size: 13.5px;
}
.backstory summary { cursor: pointer; font-weight: 700; color: var(--amber); user-select: none; }
.backstory p { margin-top: 6px; line-height: 1.85; white-space: pre-line; }

/* ---------- 当事人对话气泡 ---------- */

.sayings { margin: 10px 0 4px; display: flex; flex-direction: column; gap: 8px; }
.saying { display: flex; gap: 8px; align-items: flex-start; }
.s-ava { width: 30px; height: 30px; flex: none; }
.s-ava svg { width: 100%; height: 100%; display: block; }
.bubble {
  position: relative;
  background: var(--card);
  padding: 6px 12px;
  font-size: 13.5px;
  line-height: 1.7;
  max-width: 640px;
}
.bubble .s-name { font-weight: 700; color: var(--blue-dark); margin-right: 8px; }
.bubble::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 9px;
  width: 0; height: 0;
  border: 6px solid transparent;
  border-right-color: var(--ink);
}

/* ---------- 案卷文书 ---------- */

.doc-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 2px; }
.doc-chips-label { font-size: 12px; color: var(--muted); font-weight: 700; }
.doc-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--card);
  border: 2px solid var(--blue);
  color: var(--blue-dark);
  font-size: 12.5px;
  padding: 3px 10px;
  cursor: pointer;
}
.doc-chip:hover { background: var(--blue-soft); }
.dc-ico { width: 18px; height: 18px; display: inline-block; flex: none; }
.dc-ico svg { width: 100%; height: 100%; display: block; }
.dc-ico.big { width: 44px; height: 44px; }

.doc-head { display: flex; gap: 12px; align-items: center; margin: 12px 0; }
.doc-title { font-weight: 700; font-size: 15px; }
.doc-from { font-size: 12.5px; color: var(--muted); }
.doc-body {
  background: var(--card);
  border: 2px solid var(--line-2);
  padding: 14px 16px;
  line-height: 1.95;
  font-size: 13.5px;
  max-height: 55vh;
  overflow: auto;
}

/* 反馈卡：新文书入卷 */
.fb-gain { color: var(--green); font-weight: 700; }

/* ---------- 结案印章 ---------- */

.stamp {
  position: absolute;
  top: 16px;
  right: 20px;
  padding: 6px 14px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 4px;
  border: 3px solid currentColor;
  box-shadow: inset 0 0 0 1px currentColor;
  transform: rotate(-12deg);
  opacity: 0.85;
  mix-blend-mode: multiply;
  pointer-events: none;
  animation: stampIn 0.35s cubic-bezier(0.2, 1.6, 0.4, 1) 0.15s both;
}
.stamp.pass { color: var(--green); }
.stamp.flaw { color: var(--amber); }
.stamp.illegal { color: var(--red); }

/* P2：印章像素角钉 */
.stamp::before, .stamp::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  background: currentColor;
  opacity: 0.85;
  image-rendering: pixelated;
}
.stamp::before {
  top: -4px;
  left: -4px;
  box-shadow: 9px 0 0 currentColor, 0 9px 0 currentColor;
}
.stamp::after {
  bottom: -4px;
  right: -4px;
  box-shadow: -9px 0 0 currentColor, 0 -9px 0 currentColor;
}

/* P4：开场演出覆盖层 */
#lawSplash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: #16202e;
  transition: opacity .55s ease;
}
#lawSplash.fade { opacity: 0; pointer-events: none; }
#lawSplash .splash-stage {
  width: min(420px, 78vw);
  aspect-ratio: 60 / 34;
  image-rendering: pixelated;
}
#lawSplash .splash-stage svg { display: block; width: 100%; height: 100%; }
#lawSplash .splash-sub {
  font-size: 14px;
  letter-spacing: 2px;
  color: #b7c4d4;
  font-family: "KaiTi", "楷体", serif;
}

/* P4：入口印章呼吸（极慢，不打扰） */
.entry-seal { animation: sealBreath 3.2s ease-in-out infinite; }
@keyframes sealBreath {
  0%, 100% { box-shadow: 0 0 0 0 rgba(192, 57, 43, 0); }
  50% { box-shadow: 0 0 12px 2px rgba(192, 57, 43, 0.28); }
}

/* P4：案头卡片错落入场（轻量 stagger） */
.desk .case-card, .desk .src-card {
  animation: cardIn .32s ease both;
}
.desk .case-card:nth-child(1), .desk .src-card:nth-child(1) { animation-delay: 0ms; }
.desk .case-card:nth-child(2), .desk .src-card:nth-child(2) { animation-delay: 35ms; }
.desk .case-card:nth-child(3), .desk .src-card:nth-child(3) { animation-delay: 70ms; }
.desk .case-card:nth-child(4), .desk .src-card:nth-child(4) { animation-delay: 105ms; }
.desk .case-card:nth-child(5), .desk .src-card:nth-child(5) { animation-delay: 140ms; }
.desk .case-card:nth-child(n+6), .desk .src-card:nth-child(n+6) { animation-delay: 175ms; }
@keyframes cardIn {
  0% { transform: translateY(6px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* P3：反馈卡 ok/bad 变体与选项点击动画 */
.opt-picked { animation: optPick 0.28s ease; }
@keyframes optPick {
  0% { transform: scale(1); }
  40% { transform: scale(0.985); box-shadow: 0 0 0 2px rgba(45, 95, 168, .25); }
  100% { transform: scale(1); }
}
.feedback.ok { border-color: var(--green); box-shadow: 0 0 0 1px rgba(31, 157, 107, .35); animation: fbOkIn 0.35s ease; }
.feedback.bad { border-color: var(--red); box-shadow: 0 0 0 1px rgba(192, 57, 43, .3); animation: fbBadIn 0.4s ease; }
@keyframes fbOkIn {
  0% { transform: translateY(6px); opacity: 0; }
  60% { transform: translateY(-1px); opacity: 1; }
  100% { transform: translateY(0); }
}
@keyframes fbBadIn {
  0% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
  100% { transform: translateX(0); }
}

/* P2：结算层卷宗封面横条 */
.rp-cover {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  margin-bottom: 12px;
  border-top: 3px solid var(--red);
  border-bottom: 1px solid var(--line);
  background: repeating-linear-gradient(90deg, #fff 0 22px, #faf8f2 22px 44px);
  font-size: 12px;
  color: var(--ink-2);
  letter-spacing: 1px;
}
.rp-cover .rp-cover-l { font-weight: 700; color: var(--ink); }
.rp-cover .rp-cover-r { font-family: "SimSun", serif; color: var(--muted); }

/* P2：案件卡卷宗角标 + 像素评分条 */
.cc-head { display: flex; align-items: flex-start; gap: 8px; }
.cc-docket {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  margin-top: 1px;
  image-rendering: pixelated;
}
.cc-docket svg { display: block; width: 100%; height: 100%; }
.px-bar {
  width: 100%;
  height: 10px;
  margin: 6px 0 4px;
  image-rendering: pixelated;
}
.px-bar svg { display: block; width: 100%; height: 100%; }
.doc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; padding-top: 8px; border-top: 2px dashed var(--line); }
.doc-seal { font-size: 11px; letter-spacing: 2px; color: #c0392b; border: 2px solid #c0392b; padding: 2px 8px; transform: rotate(-6deg); border-radius: 2px; opacity: 0.9; }
.doc-pg { font-size: 12px; color: var(--muted); font-family: "SimSun", serif; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin: 14px 0; }
.ach-card { border: 1px solid var(--line); border-radius: 8px; padding: 10px 8px; text-align: center; background: var(--panel); }
.ach-card.lock { opacity: 0.55; filter: grayscale(0.9); }
.ach-card.got { border-color: var(--green); background: linear-gradient(180deg, rgba(47,140,80,0.08), transparent 70%); }
.ach-icon { font-size: 22px; line-height: 1.4; color: var(--green); }
.ach-card.lock .ach-icon { color: var(--muted); }
.ach-name { font-size: 13px; font-weight: 600; margin-top: 4px; }
.ach-desc { font-size: 11.5px; color: var(--muted); margin-top: 2px; min-height: 28px; }
.ach-stamp { font-size: 11px; margin-top: 6px; color: var(--green); border: 1px solid currentColor; border-radius: 2px; display: inline-block; padding: 1px 6px; transform: rotate(-3deg); }
.ach-stamp.lock { color: var(--muted); }
.ach-card.got .ach-stamp { border-color: var(--green); }
.promo-scene { margin: 0 0 12px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #f7f3e8; }
.promo-scene svg { display: block; width: 100%; height: auto; image-rendering: pixelated; }
@keyframes stampIn {
  0% { transform: rotate(-12deg) scale(2.2); opacity: 0; }
  60% { opacity: 1; }
  100% { transform: rotate(-12deg) scale(1); opacity: 0.85; }
}

/* ---------- 入口页封面 ---------- */

.entry-cover {
  width: 100%;
  max-width: 520px;
  display: block;
  margin: 14px auto 0;
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 rgba(35,39,46,0.2);
}

/* ---------- 互动小游戏层 ---------- */

.mg-wrap { margin-top: 14px; }
.mg {
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 rgba(35,39,46,0.18);
  background: #fffdf6;
  padding: 14px;
  image-rendering: pixelated;
}
.mg-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.mg-kind {
  font-family: 'Fusion Pixel', monospace;
  background: var(--ink); color: #fffdf6;
  padding: 3px 10px; font-size: 14px; letter-spacing: 2px;
  box-shadow: 2px 2px 0 rgba(35,39,46,0.25);
}
.mg-tip { font-size: 12.5px; color: #6a6456; }
.mg-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 12px; padding-top: 8px; border-top: 2px dashed #d8d0c0;
  font-size: 12px; color: #8a8272;
}
.mg-mist { color: #c0392b; font-weight: 700; }
.mg-why { margin-top: 10px; font-size: 13px; color: #2d5fa8; min-height: 18px; }
.mg-actions { margin-top: 12px; }
.mg-warn { margin-top: 10px; font-size: 13px; color: #c0392b; min-height: 18px; }

/* 1. 调查取证：像素场景 + 热点 */
.mg-scene {
  position: relative; width: 100%;
  border: 3px solid var(--ink);
  aspect-ratio: 2 / 1;
  overflow: hidden;
  background: #e8e4da;
}
.mg-scene svg { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.mg-spots { position: absolute; inset: 0; }
.mg-spot {
  position: absolute; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: rgba(255,253,246,0.92);
  border: 2px solid var(--ink);
  padding: 4px 6px; cursor: pointer;
  font-family: inherit; font-size: 11.5px;
  box-shadow: 2px 2px 0 rgba(35,39,46,0.35);
  animation: spotPulse 1.6s steps(2) infinite;
}
@keyframes spotPulse { 0%,100% { transform: translate(-50%,-50%) scale(1);} 50% { transform: translate(-50%,-50%) scale(1.06);} }
.mg-spot .spot-dot {
  width: 16px; height: 16px; line-height: 16px; text-align: center;
  background: #b7791f; color: #fffdf6; font-weight: 700;
}
.mg-spot.done { animation: none; opacity: 0.85; }
.mg-spot.done .spot-dot { background: var(--green); }
.mg-spot.bad { animation: none; opacity: 0.9; border-color: #c0392b; }
.mg-spot.bad .spot-dot { background: #c0392b; }
.mg-spot:hover { filter: brightness(1.05); }
.mg-tray { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.mg-tray-label { font-size: 12.5px; font-weight: 700; color: var(--ink); }
.mg-evid {
  display: inline-flex; align-items: center; gap: 5px;
  border: 2px solid var(--ink); background: #fff;
  padding: 3px 8px; font-size: 12px;
  box-shadow: 2px 2px 0 rgba(35,39,46,0.15);
}
.mg-evid .me-ico { width: 18px; height: 18px; display: inline-block; }
.mg-evid .me-ico svg, .mm-ico svg { width: 100%; height: 100%; }
.mg-tray-empty { font-size: 12px; color: #a89e8a; }

/* 2. 质证配对 */
.mg-progress { display: flex; gap: 6px; margin-bottom: 10px; }
.mg-dot { width: 12px; height: 12px; border: 2px solid var(--ink); background: #fff; }
.mg-dot.cur { background: #b7791f; }
.mg-dot.done { background: var(--green); }
.mg-their { margin-bottom: 12px; }
.mg-their-label, .mg-mine-label { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 6px; color: var(--ink); }
.mg-their-card {
  border: 3px solid #c0392b; background: #fdf2f0;
  padding: 10px 12px; box-shadow: 3px 3px 0 rgba(192,57,43,0.25);
}
.mt-title { font-weight: 700; font-size: 14px; }
.mt-desc { font-size: 12.5px; color: #6a6456; margin-top: 4px; }
.mg-mine { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.mg-mine-card {
  display: flex; align-items: center; gap: 8px;
  border: 2px solid var(--ink); background: #fff;
  padding: 8px; cursor: pointer; font-family: inherit;
  box-shadow: 2px 2px 0 rgba(35,39,46,0.18);
  text-align: left;
}
.mg-mine-card .mm-ico { width: 22px; height: 22px; flex: none; display: inline-block; }
.mg-mine-card .mm-title { font-size: 12.5px; }
.mg-mine-card:hover { background: #f2f7ec; }
.mg-mine-card.wrong { border-color: #c0392b; opacity: 0.55; }
.mg-mine-card.sel { background: #e8f0fb; border-color: #2e6bb8; box-shadow: 2px 2px 0 rgba(46,107,184,0.25); }
.mr-multi-tag { display: inline-block; margin-left: 8px; font-size: 11.5px; font-weight: 700; color: #2e6bb8; background: #e4eefb; border: 1px solid #bcd2ee; border-radius: 4px; padding: 1px 6px; vertical-align: 2px; }

/* 4. 拖拽配对（批 59）：左事项 → 右依据 */
.mg-pair { display: flex; gap: 14px; align-items: stretch; }
.mp-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.mp-col-label {
  font-size: 12px; letter-spacing: 1px; color: #7a7468;
  padding-bottom: 2px; border-bottom: 1px dashed #cfc7b4;
}
.mp-card, .mp-slot {
  border: 2px solid var(--ink); background: #fff; padding: 8px 10px;
  font-size: 13px; line-height: 1.45; box-shadow: 2px 2px 0 rgba(35,39,46,0.12);
  cursor: grab; user-select: none;
}
.mp-card.sel { border-color: var(--amber); background: #fff6e0; }
.mp-card.paired { border-color: #1f9d6b; background: #eefaf3; cursor: default; }
.mp-card.paired .mp-card-p {
  display: block; margin-top: 5px; font-size: 12px; color: #1f7a54;
  border-top: 1px dashed #bfe6d2; padding-top: 4px;
}
.mp-slot { cursor: pointer; border-style: dashed; background: #faf7ee; min-height: 44px; }
.mp-slot.used { border-color: #1f9d6b; border-style: solid; background: #eefaf3; cursor: default; }
.mp-slot.used .mp-slot-u {
  display: block; margin-top: 5px; font-size: 12px; color: #1f7a54;
  border-top: 1px dashed #bfe6d2; padding-top: 4px;
}
.mp-card[ draggable="true" ]:active { cursor: grabbing; }
.mg-pair .mp-card[draggable="true"]:hover { border-color: var(--amber); }

/* 4. 期间计算月历 */
.mg-cal-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.mc-month { font-family: 'Fusion Pixel', monospace; font-size: 15px; }
.mc-rule { font-size: 12.5px; color: #2d5fa8; }
.mg-cal {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
  max-width: 420px;
}
.mc-wk { text-align: center; font-size: 11.5px; color: #8a8272; padding: 2px 0; }
.mc-cell {
  position: relative; aspect-ratio: 1; border: 2px solid #c8bfa8;
  background: #fff; cursor: pointer; font-family: inherit; padding: 0;
}
.mc-cell .mc-d { font-size: 13px; }
.mc-cell:not(.empty):not(:disabled):hover { border-color: var(--ink); background: #f2ecdd; }
.mc-cell.off { background: #eee7d6; opacity: 0.55; cursor: default; }
.mc-cell.holiday { border-color: #c0392b; }
.mc-cell.holiday .mc-d { color: #c0392b; }
.mc-cell .mc-h { position: absolute; top: 0; right: 1px; font-size: 9px; color: #c0392b; }
.mc-cell.bad { background: #f6d5d0; border-color: #c0392b; }
.mc-cell.good { background: #ddf2e4; border-color: var(--green); }
.mg-legend { display: flex; gap: 14px; margin-top: 10px; font-size: 11.5px; color: #8a8272; flex-wrap: wrap; }
.mg-legend i { display: inline-block; width: 10px; height: 10px; border: 2px solid #c8bfa8; margin-right: 4px; vertical-align: -1px; }
.mg-legend .lg-off { background: #eee7d6; }
.mg-legend .lg-hol { border-color: #c0392b; }
.mg-legend .lg-bad { background: #f6d5d0; border-color: #c0392b; }

/* 5. 文书填空 */
.mg-doc { border: 3px double var(--ink); background: #fbf8f0; padding: 14px 16px; }
.mg-doc-title { text-align: center; font-family: 'Fusion Pixel', monospace; font-size: 15px; margin-bottom: 10px; letter-spacing: 3px; }
.mg-doc-p { font-size: 13.5px; line-height: 2; margin: 0 0 8px; }
.mg-blank {
  font-family: inherit; font-size: 13px;
  border: 2px solid #2d5fa8; background: #eaf0f9;
  padding: 1px 10px; cursor: pointer; min-width: 72px;
  box-shadow: 1px 1px 0 rgba(35,39,46,0.2);
}
.mg-blank:hover { background: #d8e6f5; }
.mg-blank.bad { border-color: #c0392b; background: #f6d5d0; }

.mg-asks { display: flex; flex-direction: column; gap: 7px; }
.mg-ask {
  text-align: left; font-family: inherit; font-size: 13px; line-height: 1.55;
  border: 2px solid var(--ink); background: #fff; padding: 8px 11px; cursor: pointer;
  box-shadow: 2px 2px 0 rgba(35,39,46,0.12);
}
.mg-ask:hover { background: #f2ecdd; }
.mg-ask.wrong { border-color: #c0392b; opacity: 0.55; }

/* 结案复盘：非法证据排除揭示 */
.rp-illegal {
  border: 3px solid #c0392b; background: #fdf2f0;
  padding: 10px 14px; margin: 14px 0;
  font-size: 13px; color: #6a2a22;
}
.rp-illegal strong { display: block; color: #c0392b; margin-bottom: 4px; letter-spacing: 1px; }
.rp-illegal p { margin: 0; line-height: 1.7; }

/* ===================================================================
 * 主观题连环模式
 * =================================================================== */

.exam-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--blue-soft);
  border: 1px solid #cdddf2;
  border-radius: 6px;
  padding: 8px 12px; margin: 10px 0 4px;
  font-size: 13px;
}
.exam-prog { font-family: "SimSun", serif; font-weight: 600; color: var(--blue-dark); }
.exam-hint { color: var(--muted); font-size: 12px; }

.exam-facts {
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--blue);
  border-radius: 6px;
  background: #fff;
  padding: 8px 12px;
  margin: 8px 0 12px;
}
.exam-facts summary {
  cursor: pointer; font-family: "SimSun", serif; font-weight: 600;
  color: var(--blue-dark); font-size: 13.5px; letter-spacing: 1px;
  user-select: none;
}
.exam-facts p { margin-top: 8px; font-size: 13.5px; line-height: 1.9; color: var(--ink-2); white-space: pre-wrap; }

.exam-q {
  display: flex; align-items: baseline; gap: 10px;
  margin: 14px 0 6px;
}
.eq-no {
  flex-shrink: 0;
  background: var(--blue); color: #fff;
  font-family: "SimSun", serif; font-size: 13px;
  padding: 2px 10px; border-radius: 4px;
}
.eq-tx { font-family: "SimSun", serif; font-size: 16px; font-weight: 600; color: var(--ink); }
.exam-prompt { font-size: 14.5px; color: var(--ink); line-height: 1.9; margin: 4px 0; }
.exam-scene {
  font-size: 13px; color: var(--ink-2);
  background: #fbfaf7; border: 1px dashed var(--line-2); border-radius: 5px;
  padding: 8px 12px; margin: 6px 0 4px; line-height: 1.8;
}

.exam-chain { margin: 14px 0 4px; border-top: 1px dashed var(--line-2); padding-top: 10px; }
.ec-title { font-size: 12px; color: var(--muted); letter-spacing: 1px; margin-bottom: 8px; }
.xq-item { display: flex; gap: 8px; margin-bottom: 7px; }
.xq-no {
  flex-shrink: 0; width: 34px; height: 22px; line-height: 22px; text-align: center;
  background: #eeebe4; color: var(--ink-2); border-radius: 4px;
  font-size: 12px; font-family: "SimSun", serif;
}
.xq-body { flex: 1; font-size: 12.5px; line-height: 1.7; }
.xq-q { color: var(--ink-2); }
.xq-a { color: var(--ink); }
.xq-cons { color: var(--muted); font-size: 12px; }

/* 复盘：逐问采分点 */
.rp-exam .rp-xq { display: flex; align-items: flex-start; gap: 8px; }
.rq-issue { font-family: "SimSun", serif; font-weight: 600; font-size: 13.5px; color: var(--blue-dark); margin-bottom: 3px; }
.rq-ans { font-size: 13px; color: var(--ink-2); }
.rq-point {
  display: inline-block; margin-top: 5px;
  background: var(--green-soft); color: var(--green);
  border-radius: 4px; padding: 1px 8px; font-size: 12px;
}
.rp-step.bad .rq-point { background: var(--red-soft); color: var(--red); }
.rq-mark {
  flex-shrink: 0; font-size: 12.5px; font-weight: 600;
  color: var(--green); white-space: nowrap; padding-top: 2px;
}
.rp-step.bad .rq-mark { color: var(--red); }

/* ===================================================================
 * 互动小游戏层 · 新增三种
 * =================================================================== */

/* 法条检索（statute） */
.mg-progress { display: flex; gap: 5px; margin-bottom: 10px; }
.mg-dot { width: 22px; height: 5px; border-radius: 3px; background: #e2ded5; }
.mg-dot.done { background: var(--green); }
.mg-dot.cur { background: var(--blue); }
.mg-stat-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.mg-stat-ask { font-size: 12.5px; color: var(--muted); font-family: "SimSun", serif; }
.mg-timer {
  font-family: "SimSun", serif; font-weight: 700; font-size: 15px;
  color: var(--blue); background: var(--blue-soft);
  border-radius: 4px; padding: 1px 10px; min-width: 56px; text-align: center;
}
.mg-timer.low { color: var(--red); background: var(--red-soft); animation: spotPulse 1s infinite; }
.mg-stat-q {
  font-size: 14px; line-height: 1.8; color: var(--ink);
  background: #fbfaf7; border-left: 3px solid var(--blue);
  padding: 8px 12px; border-radius: 0 5px 5px 0; margin-bottom: 10px;
}
.mg-stat-label { font-size: 12.5px; color: var(--muted); margin: 10px 0 6px; letter-spacing: 1px; }
.mg-lawgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.mg-law {
  text-align: center; padding: 12px 8px;
  border: 1px solid var(--line-2); border-radius: 6px; background: #fff;
  font-family: "SimSun", serif; font-size: 13.5px; color: var(--ink);
  transition: border-color .15s, background .15s;
}
.mg-law:hover:not(:disabled) { border-color: var(--blue); background: var(--blue-soft); }
.mg-law.wrong { border-color: var(--red); background: var(--red-soft); color: var(--red); opacity: .7; }
.mg-stat-law { font-family: "SimSun", serif; font-size: 14px; font-weight: 600; color: var(--blue-dark); margin-bottom: 4px; }
.mg-stat-back {
  font-family: inherit; font-size: 11.5px; font-weight: 400;
  border: 1px solid var(--line-2); background: #fff; color: var(--muted);
  border-radius: 4px; padding: 1px 8px; margin-left: 8px;
}
.mg-stat-back:hover { border-color: var(--blue); color: var(--blue); }
.mg-arts { display: flex; flex-direction: column; gap: 6px; }
.mg-art {
  display: flex; gap: 10px; align-items: baseline; text-align: left;
  border: 1px solid var(--line-2); border-radius: 6px; background: #fff;
  padding: 8px 12px; transition: border-color .15s, background .15s;
}
.mg-art:hover:not(:disabled) { border-color: var(--blue); background: var(--blue-soft); }
.mg-art.wrong { border-color: var(--red); background: var(--red-soft); opacity: .7; }
.ma-no { flex-shrink: 0; font-family: "SimSun", serif; font-weight: 600; color: var(--blue-dark); font-size: 13px; }
.mg-art.wrong .ma-no { color: var(--red); }
.ma-tx { font-size: 12.5px; color: var(--ink-2); line-height: 1.6; }
.mg-stat-hit {
  margin-top: 10px; border-radius: 6px; padding: 10px 12px; font-size: 13px;
  border: 1px solid var(--green); background: var(--green-soft); color: #176b4b; line-height: 1.8;
}
.mg-stat-hit.timeout { border-color: var(--amber); background: var(--amber-soft); color: #7a5214; }
.mg-stat-hit p { margin: 6px 0 0; font-size: 12.5px; }

/* 卷宗审阅（debug） */
.mg-debug-title { font-family: "SimSun", serif; font-weight: 600; font-size: 13.5px; color: var(--ink); margin-bottom: 8px; }
.mg-debug { border: 1px solid var(--line-2); border-radius: 6px; overflow: hidden; }
.mg-dl {
  display: flex; gap: 10px; align-items: flex-start; text-align: left;
  width: 100%; background: #fff; border: 0; border-bottom: 1px solid var(--line);
  padding: 9px 12px; font-size: 13px; line-height: 1.75; color: var(--ink);
}
.mg-dl:last-child { border-bottom: 0; }
.mg-dl:hover { background: #f4f8fe; }
.dl-no {
  flex-shrink: 0; width: 20px; height: 20px; line-height: 20px; text-align: center;
  border-radius: 50%; background: #eeebe4; color: var(--muted); font-size: 11.5px; margin-top: 1px;
}
.dl-tx { flex: 1; }
.dl-why { display: block; margin-top: 5px; font-size: 12px; color: var(--red); line-height: 1.6; }
.mg-dl.pick { background: var(--blue-soft); }
.mg-dl.pick .dl-no { background: var(--blue); color: #fff; }
.mg-dl.hit { background: var(--green-soft); }
.mg-dl.hit .dl-no { background: var(--green); color: #fff; }
.mg-dl.miss { background: var(--red-soft); box-shadow: inset 3px 0 0 var(--red); }
.mg-dl.miss .dl-no { background: var(--red); color: #fff; }
.mg-dl.extra { background: #eef3fb; box-shadow: inset 3px 0 0 var(--blue); }
.mg-debug-stat { font-size: 12px; color: var(--muted); margin: 8px 0 2px; }

/* 判决说理（essay） */
.mg-mat {
  border: 1px solid var(--line-2); border-left: 3px solid var(--amber);
  border-radius: 0 6px 6px 0; background: #fff; padding: 10px 12px; margin-bottom: 12px;
}
.mm-title { font-family: "SimSun", serif; font-weight: 600; font-size: 13px; color: var(--amber); margin-bottom: 5px; }
.mm-body { font-size: 13px; line-height: 1.9; color: var(--ink-2); white-space: pre-wrap; }
.mg-es-title { font-family: "SimSun", serif; font-size: 14.5px; font-weight: 600; color: var(--ink); margin: 6px 0 10px; }
.mg-es-label { font-size: 12.5px; color: var(--muted); letter-spacing: 1px; margin: 10px 0 6px; }
.mg-ptpool { display: flex; flex-direction: column; gap: 6px; }
.mg-pt {
  text-align: left; border: 1px dashed var(--line-2); border-radius: 6px;
  background: #fbfaf7; padding: 8px 12px; font-size: 13px; line-height: 1.7; color: var(--ink);
}
.mg-pt:hover:not(:disabled) { border-color: var(--blue); border-style: solid; background: var(--blue-soft); }
.mg-pt.used { opacity: .4; }
.mg-sheet {
  min-height: 56px; border: 1px solid var(--blue); border-radius: 6px;
  background: var(--blue-soft); padding: 8px;
  display: flex; flex-direction: column; gap: 6px;
}
.mg-sheet-empty { color: var(--muted); font-size: 12.5px; text-align: center; padding: 10px 0; }
.mg-sheet-item {
  display: flex; gap: 8px; align-items: baseline; text-align: left;
  border: 1px solid #cdddf2; border-radius: 5px; background: #fff;
  padding: 7px 10px; font-size: 13px; line-height: 1.6;
}
.mg-sheet-item:hover { border-color: var(--red); }
.si-no {
  flex-shrink: 0; width: 20px; height: 20px; line-height: 20px; text-align: center;
  background: var(--blue); color: #fff; border-radius: 50%; font-size: 11.5px;
}
.si-tx { flex: 1; }
.si-rm { flex-shrink: 0; color: var(--red); font-size: 12px; }

/* ===================================================================
 * 养成层：绩效 / 分科经验 / 今日安排 / 技能树 / 挂牌要案
 * =================================================================== */

/* 顶栏绩效点 */
.tb-merit .merit-val { color: #8a6d1f; font-weight: 700; }
.tb-merit { gap: 4px; }

/* 侧栏业务能力 */
.growth-sec .tr-row { margin-bottom: 8px; }
.growth-sec .tr-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 3px; }
.growth-sec .tr-name { font-size: 13px; color: var(--ink); }
.growth-sec .tr-lv { font-size: 11.5px; color: var(--muted); }
.xp-bar { display: block; height: 6px; border-radius: 3px; background: #e7e2d6; overflow: hidden; }
.xp-fill { display: block; height: 100%; border-radius: 3px; background: var(--blue); transition: width .25s; }
.xp-fill.lv2 { background: #6f9bc8; }
.xp-fill.lv3 { background: #3f7fae; }
.xp-fill.lv4 { background: #2c6178; }
.xp-fill.lv5 { background: linear-gradient(90deg, #b8860b, #d4af37); }

/* 挂牌要案金卡 */
.src-card.elite { border-color: #c9a227; background: linear-gradient(180deg, #fdf8e6, #fbf3d2); box-shadow: 0 0 0 1px #e8cf7a inset; }
.case-card .cc-etag, .src-card .cc-etag {
  font-size: 11px; color: #7a5a10; background: #f4e2a2; border: 1px solid #ddc063;
  border-radius: 3px; padding: 0 5px; white-space: nowrap;
}

/* 结案报告：本局收获 */
.rp-growth {
  margin: 12px 0; padding: 10px 12px; border-left: 3px solid #b8860b;
  background: #fbf5e2; border-radius: 0 6px 6px 0; font-size: 13.5px;
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
}
.rp-growth strong { color: #7a5a10; }
.rg-chip {
  font-size: 12.5px; background: #fff; border: 1px solid #ddc063; color: #7a5a10;
  border-radius: 20px; padding: 2px 10px;
}
.rg-chip.elite { background: #f4e2a2; font-weight: 600; }

/* 今日安排弹窗 */
.plan-banner { border-radius: 6px; padding: 9px 12px; font-size: 13.5px; margin: 10px 0; }
.plan-banner.good { background: #eef7ec; border: 1px solid #bfe0b8; color: #2e6b26; }
.plan-banner.bad { background: #fbeceb; border: 1px solid #e3b7b3; color: #9c3b32; }
.plan-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 14px 0; }
.plan-card {
  border: 1px solid var(--line-2); border-radius: 8px; background: #fbfaf7;
  padding: 12px 14px; display: flex; flex-direction: column; gap: 8px;
}
.pc-head { display: flex; justify-content: space-between; align-items: baseline; }
.pc-name { font-size: 14.5px; font-weight: 700; color: var(--ink); }
.pc-cost { font-size: 12px; color: var(--muted); white-space: nowrap; }
.pc-desc { font-size: 13px; line-height: 1.7; color: #4a463c; margin: 0; flex: 1; }
.pc-tracks { display: flex; flex-wrap: wrap; gap: 6px; }
.pc-track em { font-style: normal; color: var(--muted); font-size: 11.5px; }

/* 技能树弹窗 */
.skill-group-title {
  font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: 1px;
  margin: 16px 0 8px;
}
.skill-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.skill-card {
  border: 1px solid var(--line-2); border-radius: 8px; padding: 10px 12px;
  background: #fbfaf7; display: flex; flex-direction: column; gap: 6px;
}
.skill-card.owned { background: #f1f7ef; border-color: #bfe0b8; }
.skill-card.locked { opacity: .62; background: #f5f3ee; }
.skill-card.poor { opacity: .85; }
.sk-name { font-size: 14px; font-weight: 700; color: var(--ink); }
.sk-desc { font-size: 12.5px; line-height: 1.65; color: #4a463c; margin: 0; flex: 1; }
.sk-state { font-size: 12px; }
.sk-state.ok { color: #2e6b26; }
.sk-state.bad { color: #9c3b32; }

/* ===================================================================
 * 法院层级（Phase 2）：court 维度 · 基层 / 中院 / 高院 / 最高
 * =================================================================== */

/* 顶栏法院层级 chip */
.tb-court { gap: 4px; }
.tb-court .court-val { color: var(--blue-dark); font-weight: 600; letter-spacing: 1px; }
.tb-court .court-badge {
  font-size: 10.5px; padding: 1px 6px; border-radius: 8px;
  background: var(--blue-soft); color: var(--blue-dark);
  border: 1px solid #c6d8ef; margin-left: 4px;
}

/* 案源池 boss 案金边徽章 */
.src-card.cc-boss {
  border-color: #b7791f; border-left-color: #b7791f;
  background: linear-gradient(180deg, #fdf5e6, #fbf0d8);
  box-shadow: 0 0 0 1px #e8cf7a inset;
}
.src-card.cc-boss:hover:not(:disabled) {
  border-color: var(--amber); border-left-color: var(--amber);
  background: linear-gradient(180deg, #fdf3d4, #fbecbf);
}
.cc-boss-tag {
  font-size: 10.5px; color: var(--amber); font-weight: 600;
  background: #fdf5e6; border: 1px solid #f0d99a;
  padding: 1px 6px; border-radius: 3px; margin-right: 4px;
}

/* 侧栏层级进度小节 */
.court-sec { padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.court-sec .court-val { color: var(--blue-dark); font-weight: 600; }

/* ===================================================================
 * 玩法深化（Phase 2.1）：多选加权 / 三级答案 / 情景驱动 / 三新互动 kind
 * =================================================================== */

/* ---------- 情景驱动（D13）：当前处境常驻卡片 ---------- */

.situation-card {
  margin-bottom: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 6px;
  overflow: hidden;
}
.situation-card summary {
  cursor: pointer;
  user-select: none;
  font-family: "SimSun", serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--blue-dark);
  padding: 9px 14px;
  background: var(--blue-soft);
  list-style: none;
}
.situation-card summary::-webkit-details-marker { display: none; }
.situation-card summary::before { content: "▼ "; font-size: 11px; }
.situation-card[open] summary::before { content: "▲ "; }
.situation-card p {
  font-family: "KaiTi", "Kaiti SC", serif;
  font-size: 16px;
  line-height: 1.95;
  color: var(--ink);
  padding: 14px 18px;
  white-space: pre-wrap;
}

/* ---------- 多选加权（A1） ---------- */

.multi-options .multi-opt { align-items: center; }
.multi-opt .mopt-box {
  flex-shrink: 0;
  width: 16px; height: 16px;
  accent-color: var(--blue);
  margin-top: 2px;
}
.mg-actions + .mg-actions { margin-top: 8px; }

/* ---------- 三级答案（A2）三档标记 ---------- */

.tier-chip {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 3px;
  padding: 1px 8px;
  margin-right: 6px;
  vertical-align: 1px;
}
.tier-chip.t-best { background: var(--green-soft); color: var(--green); border: 1px solid #bfe4d2; }
.tier-chip.t-risky { background: var(--amber-soft); color: var(--amber); border: 1px solid #f0d99a; }
.tier-chip.t-wrong { background: var(--red-soft); color: var(--red); border: 1px solid #ecc8c2; }

.fb-label.missed, .fb-text.missed { color: var(--amber); }
.fb-label.bad, .fb-text.bad-txt { color: var(--red); }
.fb-label.right { color: var(--green); }
.rp-step .ex.right { color: var(--green); }

.rp-tier-stat {
  display: flex;
  gap: 8px;
  margin: 4px 0 12px;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
}



/* ---------- 分类整理（classify） ---------- */

.mg-cls { margin-bottom: 12px; }
.mg-cls-items { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.mg-cls-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--ink);
  line-height: 1.5;
  text-align: left;
  max-width: 100%;
  transition: border-color .12s, background .12s;
}
.mg-cls-item:hover:not([disabled]) { border-color: var(--blue); }
.mg-cls-item.sel {
  border-color: var(--blue);
  border-left: 4px solid var(--blue);
  background: #fafcff;
  box-shadow: 0 2px 8px rgba(45, 95, 168, .10);
}
.mg-cls-item.placed {
  background: var(--green-soft);
  border-color: #bfe4d2;
  color: var(--green);
  opacity: .65;
  cursor: default;
}
.mg-cls-cats { display: flex; gap: 10px; flex-wrap: wrap; }
.mg-cls-cat {
  flex: 1 1 150px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 13px;
  cursor: pointer;
  text-align: left;
  transition: border-color .12s, background .12s, box-shadow .12s;
}
.mg-cls-cat:hover { border-color: var(--blue); box-shadow: 0 2px 8px rgba(45, 95, 168, .10); }
.mcc-name { display: block; font-size: 14px; font-weight: 600; color: var(--blue-dark); margin-bottom: 3px; }
.mcc-num { display: inline-block; font-size: 12px; color: var(--muted); background: var(--blue-soft); border-radius: 10px; padding: 1px 9px; }
.mg-cls-why {
  margin-top: 10px;
  padding: 10px 13px;
  background: #fffdf6;
  border: 1px solid #f0d99a;
  border-radius: 6px;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.7;
}
/* ---------- 窄屏适配 ---------- */

@media (max-width: 760px) {
  .office { height: 88px; }
  .stamp { font-size: 15px; top: 10px; right: 10px; padding: 4px 10px; letter-spacing: 2px; }
  .doc-body { max-height: 48vh; }
  .bubble { max-width: 100%; }
  .mg { padding: 10px; }
  .mg-spot { font-size: 10.5px; padding: 3px 4px; }
  .mg-spot .spot-dot { width: 14px; height: 14px; line-height: 14px; }
  .plan-grid, .skill-grid { grid-template-columns: 1fr; }
}
"""

/* ---------- 伙伴系统（批 7） ---------- */
.rpg-partner-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.rpg-partner {
  width: calc(20% - 8px); min-width: 128px; box-sizing: border-box;
  border: 1px solid #d8dee6; border-radius: 8px; padding: 8px;
  background: #fff; text-align: center; position: relative;
}
.rpg-partner.locked { opacity: .45; background: #f6f8fa; }
.rpg-partner.owned { box-shadow: 0 0 0 2px rgba(180, 150, 60, .35); }
.rpg-partner.q5.owned { box-shadow: 0 0 0 2px #e8b53a; background: linear-gradient(160deg, #fffdf2, #fff); }
.rpg-partner .rpa-icon { font-size: 26px; line-height: 1.3; }
.rpg-partner .rpa-name { font-size: 13px; font-weight: 700; margin-top: 2px; }
.rpg-partner .rpa-stars { display: block; color: #d9a114; font-size: 11px; }
.rpg-partner .rpa-bond { display: inline-block; margin-left: 5px; font-size: 10px; color: #2f8c50; border: 1px solid #2f8c50; border-radius: 2px; padding: 0 4px; transform: rotate(-4deg); font-style: normal; vertical-align: middle; }
.rpg-partner .rpa-role { font-size: 11.5px; color: #6b7280; margin-top: 2px; }
.rpg-partner .rpa-skill { font-size: 11.5px; color: #374151; margin-top: 4px; line-height: 1.45; text-align: left; }
.rpg-partner .rpa-line { font-size: 11px; color: #9ca3af; font-style: italic; margin-top: 4px; line-height: 1.4; text-align: left; }
.rpg-partner .rpa-unknown { font-size: 11px; color: #9ca3af; margin-top: 6px; }
.src-dispatch {
  display: inline-block; margin: 2px 6px 6px 2px;
  background: var(--blue-soft); color: var(--blue); border: 1px solid #b6ccf7;
}
"""


/* ---------- 机构晋升进度（批 8） ---------- */
.org-prog-btn { display: inline-flex; align-items: center; gap: 6px; max-width: 240px; }
.org-prog-btn .org-prog-bar {
  width: 56px; height: 8px; border-radius: 4px; background: #e5e7eb;
  overflow: hidden; display: inline-block; vertical-align: middle;
}
.org-prog-btn .org-prog-fill {
  display: block; height: 100%; background: var(--blue); border-radius: 4px;
  transition: width .3s ease;
}
.org-prog-btn .org-prog-num { font-size: 11px; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.org-prog-btn.ready { border-color: #d9a114; background: #fffbea; color: #7a5a10; }
.org-prog-btn .org-prog-ready {
  color: #b45309; font-weight: 700; font-size: 12px; animation: orgPulse 1.2s ease-in-out infinite;
}
@keyframes orgPulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
.os-next.ready { color: #b45309; font-weight: 600; }
.org-promo { border-color: #d9a114; box-shadow: 0 0 0 2px rgba(217, 161, 20, .25); }
.org-promo .ev-opt { width: 100%; text-align: left; margin: 4px 0; }
.org-promo-fb { margin-top: 8px; padding: 8px 10px; border-radius: 6px; font-size: 12.5px; line-height: 1.55; }
.org-promo-fb.good { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.org-promo-fb.bad { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.org-promo-start { margin: 10px 0; text-align: center; }

.org-prog-btn .org-cur-name {
  font-size: 12px; color: #fff; font-weight: 600;
  max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.org-prog-btn.ready .org-cur-name,
.org-prog-btn.ready .org-prog-num { color: #374151; text-shadow: none; }

/* ============================================================
   APK 竖屏专属：底部 Tab 导航
   仅 html.apk（Capacitor 容器内）生效；网页版/桌面/本地浏览器无 apk class，以下全部不启用。
   ============================================================ */
.tab-bar { display: none; }

@media (max-width: 760px) {
  /* 底部 Tab 栏：固定屏幕底部，避开手势条 */
  html.apk .tab-bar {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 60;
    background: #fff;
    border-top: 1px solid var(--line);
    height: 54px;
    padding-bottom: env(safe-area-inset-bottom);
    box-sizing: border-box;
  }
  /* 入口页（尚未进入角色）不显示底部 Tab */
  html.apk #entry:not(.hidden) ~ .tab-bar { display: none; }

  html.apk .tab-bar .tab {
    flex: 1;
    border: none;
    background: none;
    font-size: 13px;
    letter-spacing: 2px;
    color: var(--muted);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  /* 选中态：复用 body[data-view]，纯 CSS 同步，无需 JS */
  html.apk body[data-view="desk"]  .tab-bar .tab[data-view="desk"],
  html.apk body[data-view="stage"] .tab-bar .tab[data-view="stage"],
  html.apk body[data-view="side"]  .tab-bar .tab[data-view="side"] {
    color: var(--blue);
    font-weight: 600;
    box-shadow: inset 0 -3px 0 var(--blue);
  }

  /* 内容区底部留出 Tab 高度，避免被底栏遮挡 */
  html.apk .app { padding-bottom: calc(env(safe-area-inset-bottom) + 54px); }
  html.apk .stage { padding-bottom: 18px; }

  /* 顶栏精简：隐藏「状态页已有」或次要展示块（体力/压力/机构层级均在状态页可见） */
  html.apk .topbar .tb-court,
  html.apk .topbar .tb-stam,
  html.apk .topbar .tb-press { display: none; }
  /* 隐藏原顶部视图切换按钮，改用底部 Tab */
  html.apk .topbar .tb-view-btn { display: none !important; }
}

/* ---------- 批 9：错题本 / 月报 / 法考 ---------- */
.rev-badge { background: #e11d48; color: #fff; border-radius: 8px; padding: 0 5px; font-size: 11px; margin-left: 2px; }
.rev-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.rev-idle { color: #6b7280; font-size: 13px; }
.rev-radar-wrap { text-align: center; margin: 10px 0; }
.rev-radar-title { font-weight: 600; margin-bottom: 4px; }
.rev-radar { max-width: 300px; }
.rev-ring { fill: rgba(59, 130, 246, .06); stroke: #93c5fd; stroke-width: 1; }
.rev-spoke { stroke: #d1d5db; stroke-width: .5; }
.rev-poly { fill: rgba(239, 68, 68, .18); stroke: #ef4444; stroke-width: 1.5; }
.rev-rt { font-size: 11px; fill: #374151; }
.rev-rc { font-size: 10px; fill: #9ca3af; }
.rev-empty { color: #6b7280; padding: 14px 0; text-align: center; }
.rev-list { max-height: 340px; overflow: auto; margin: 8px 0; }
.rev-item { border: 1px solid #e5e7eb; border-radius: 8px; padding: 8px; margin-bottom: 8px; }
.rev-item.done { opacity: .6; }
.rv-top { display: flex; gap: 8px; align-items: center; margin-bottom: 4px; }
.rv-sub { background: #f3f4f6; border-radius: 4px; padding: 1px 6px; font-size: 11px; color: #374151; }
.rv-src { font-size: 11px; color: #9ca3af; }
.rv-done { color: #059669; font-size: 11px; }
.rv-stage { color: #6b7280; font-size: 11px; }
.rv-q { font-size: 13px; font-weight: 600; margin: 2px 0; }
.rv-a { font-size: 12px; margin: 2px 0; }
.rv-a.bad { color: #dc2626; }
.rv-a.good { color: #059669; }
.rv-why { font-size: 12px; color: #374151; background: #f9fafb; border-radius: 6px; padding: 6px; margin-top: 4px; }
.report-card { border: 1px solid #e5e7eb; border-radius: 8px; padding: 10px; margin: 8px 0; }
.rep-head { font-weight: 600; margin-bottom: 6px; }
.rep-row { display: flex; justify-content: space-between; padding: 3px 0; font-size: 13px; }
.rep-row b { color: #111827; }
.rep-subtitle { font-weight: 600; margin: 8px 0 4px; }
.rep-bars { margin: 4px 0 8px; }
.rep-bar { display: flex; align-items: center; gap: 8px; margin: 4px 0; }
.rb-name { width: 44px; font-size: 12px; color: #374151; }
.rb-track { flex: 1; background: #f3f4f6; border-radius: 6px; height: 10px; }
.rb-fill { display: block; height: 10px; border-radius: 6px; background: #ef4444; }
.rb-num { font-size: 11px; color: #6b7280; width: 34px; text-align: right; }
.rev-tip { font-size: 12px; color: #6b7280; margin-top: 6px; }
.btn-warn { background: #f59e0b; color: #fff; }


/* ---------- 批 10：考点查法条 / 漏查标记 / 年度执业考核 ---------- */
.statute-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 8px 0 2px; padding: 6px 10px; background: #f6f3ec;
  border: 1px dashed #cfc4a8; border-radius: 8px;
}
.statute-row .st-tip { font-size: 12px; color: #8a7f66; }
.statute-card {
  margin: 10px 0 4px; padding: 10px 12px; background: #fbf7ec;
  border: 1px solid #d9c9a3; border-left: 4px solid #b08d4c; border-radius: 8px;
}
.statute-card .st-head { font-weight: 700; color: #7a5c1e; font-size: 13px; margin-bottom: 6px; }
.statute-card .st-row { margin-bottom: 8px; }
.statute-card .st-row:last-child { margin-bottom: 0; }
.statute-card .st-src { display: inline-block; font-size: 12px; font-weight: 600;
  color: #5c4a1f; background: #efe6cd; border-radius: 4px; padding: 1px 6px; margin-bottom: 3px; }
.statute-card .st-tx { font-size: 13px; color: #4a4030; line-height: 1.6; }
.rv-missed { margin-top: 5px; font-size: 12px; color: #9a5b2e; }
.rv-missed::before { content: '⚠ '; }

.annual-score { text-align: center; padding: 10px 0 4px; }
.annual-score .as-num { font-size: 42px; font-weight: 800; color: #2f6f4f; line-height: 1.1; }
.annual-score .as-label { font-size: 12px; color: #77705f; }
.annual-rank { text-align: center; font-size: 16px; color: #574b30; margin: 4px 0 10px; }
.annual-rank b { color: #b08d4c; font-size: 20px; }
.annual-parts { border: 1px solid #e3dac4; border-radius: 8px; padding: 8px 10px; margin-bottom: 10px; }
.ap-row { display: flex; justify-content: space-between; gap: 8px; font-size: 13px;
  padding: 4px 0; border-bottom: 1px dashed #efe7d2; }
.ap-row:last-child { border-bottom: 0; }
.ap-row.bad .ap-k, .ap-row.bad .ap-v { color: #a33; }
.ap-k { color: #6b5f45; flex: 0 0 auto; }
.ap-d { color: #9a8f72; flex: 1 1 auto; text-align: right; font-size: 12px; }
.ap-v { color: #2f6f4f; font-weight: 700; }
.annual-reward { text-align: center; font-size: 14px; font-weight: 700;
  color: #1e5a3a; background: #e7f2ea; border-radius: 8px; padding: 8px; margin-bottom: 10px; }
.annual-board { border: 1px solid #e3dac4; border-radius: 8px; padding: 6px 10px; }
.ab-title { font-size: 12px; color: #8a7f66; margin-bottom: 4px; }
.ab-row { display: flex; justify-content: space-between; font-size: 13px; padding: 3px 0; }
.ab-idx { color: #b08d4c; font-weight: 700; width: 18px; }
.ab-name { color: #574b30; }
.ab-score { color: #77705f; }


/* ---------- 批 11：经营财务 / 案源风险标签 ---------- */
.fin-cash { text-align: center; padding: 8px 0 2px; }
.fin-cash .fc-num { font-size: 34px; font-weight: 800; color: #2f6f4f; line-height: 1.1; }
.fin-cash .fc-label { font-size: 12px; color: #77705f; }
.fin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.fin-cell { background: #f6f3ec; border: 1px solid #e3dac4; border-radius: 8px; padding: 8px 10px; }
.fin-cell .fc-t { font-size: 12px; color: #8a7f66; }
.fin-cell .fc-v { font-size: 13px; color: #574b30; }
.fc-warn { color: #a33; font-size: 12px; }
.fin-shop { border: 1px solid #e3dac4; border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; }
.fs-title { font-size: 13px; font-weight: 700; color: #574b30; margin-bottom: 6px; }
.fs-row { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 5px 0;
  border-bottom: 1px dashed #efe7d2; }
.fs-row:last-child { border-bottom: 0; }
.fs-name { font-weight: 600; color: #574b30; flex: 0 0 auto; }
.fs-desc { color: #9a8f72; flex: 1 1 auto; font-size: 12px; }
.fs-lv { color: #b08d4c; font-size: 12px; flex: 0 0 auto; }
.fs-done { color: #2f6f4f; font-size: 12px; }
.src-wrap { display: flex; gap: 4px; align-items: stretch; }
.src-refuse { align-self: center; }
.src-card.risky { border-color: #c66; background: #fdf1f1; }
.cc-rtag { color: #a33; font-size: 11px; background: #fdeaea; border-radius: 4px; padding: 0 5px; }
.cc-ttag { color: #6b5f45; font-size: 11px; background: #f1ecdd; border-radius: 4px; padding: 0 5px; }


/* ================= 批 13：新手引导 + 模拟经营工具栏 ================= */

/* 顶栏按钮分组：行动 / 发展 / 系统（模拟经营工具栏风格） */
.tb-actions { gap: 4px; }
.tb-group { display: flex; align-items: center; gap: 6px; }
.tb-group + .tb-group::before {
  content: ""; width: 1px; height: 20px; background: var(--line-2); margin: 0 4px;
}

/* 锁定态按钮（新手引导逐步解锁） */
.btn.locked {
  opacity: .5;
  background: transparent;
  color: var(--muted);
  border-color: var(--line-2);
  border-style: dashed;
  cursor: not-allowed;
  box-shadow: none;
}
.btn.locked:hover { background: transparent; border-color: var(--line-2); color: var(--muted); }
.btn.locked::before { content: "🔒 "; font-size: 11px; }
.org-prog-btn.locked { opacity: .5; cursor: not-allowed; }

/* ---- 新手引导遮罩 / 高亮 / 气泡 ---- */
.tut-mask {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(12, 16, 26, .5);
  pointer-events: none;
}
.tut-halo {
  position: fixed; z-index: 1000; pointer-events: none;
  border: 2px solid #ffd666;
  border-radius: 8px;
  box-shadow: 0 0 0 6px rgba(255, 214, 102, .28), 0 0 24px rgba(255, 214, 102, .35);
}
.tut-pop {
  position: fixed; z-index: 1001;
  width: min(340px, calc(100vw - 48px));
  background: #fffdf6;
  border: 1px solid #e6c87a;
  border-radius: 10px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .24);
  padding: 16px 18px 14px;
  font-size: 13.5px;
  color: #2c2a26;
  pointer-events: auto;
}
.tut-pop.no-target { pointer-events: auto; }
.tut-step { font-size: 11px; color: #a07b2c; margin-bottom: 4px; letter-spacing: 1px; }
.tut-title { font-size: 15px; font-weight: 700; color: #6b4e10; margin-bottom: 6px; }
.tut-text { line-height: 1.7; }
.tut-tip {
  margin-top: 8px; padding: 7px 9px; background: #fdf6e3; border-radius: 6px;
  font-size: 12.5px; color: #7a5c22; line-height: 1.6;
}
.tut-actions { margin-top: 12px; display: flex; justify-content: flex-end; gap: 8px; }

/* 模拟经营资源条微增强：资源项徽章化 */
.tb-item { background: #f7f4ec; border-radius: 6px; padding: 2px 9px; }
.tb-item .tb-value { font-weight: 700; }

/* ===== 批 24：程序阶梯 ladder ===== */
.mg-ladder { display: flex; flex-direction: column; gap: 8px; }
.ld-step { padding: 8px 10px; background: #f4f6fa; border-radius: 6px; }
.ld-title { font-weight: 600; font-size: 14px; color: var(--blue-dark); margin-bottom: 4px; }
.ld-scene { font-size: 13px; color: #374151; line-height: 1.5; }
.ld-opts { display: flex; flex-direction: column; gap: 6px; }

/* ---- 批 25：assemble 拼装/批注 / interrog 问话树 / live 限时裁量 ---- */
.mg-assemble, .mg-interrog, .mg-live { margin-top: 6px; }
.as-progress, .mg-progress { display: flex; gap: 6px; margin: 6px 0; align-items: center; }
.mg-dot { width: 8px; height: 8px; border-radius: 50%; background: #d7dbe3; display: inline-block; }
.mg-dot.done { background: var(--blue); }
.mg-dot.cur { background: var(--blue-dark); transform: scale(1.25); }
.as-clause { border: 1px solid #dfe3ec; border-radius: 8px; padding: 10px 12px; margin: 8px 0; background: #f8fafc; }
.as-title { font-weight: 600; color: var(--blue-dark); margin-bottom: 6px; }
.as-text { color: #3a4050; line-height: 1.55; }
.as-fix { background: var(--blue-soft); border: 1px solid #b8d6ff; border-radius: 8px; padding: 10px 12px; margin-top: 8px; color: #1f4d9e; line-height: 1.5; }
.as-slots { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.as-slot { flex: 1 1 140px; border: 1px dashed #b9c2d4; border-radius: 8px; padding: 10px; text-align: left; background: #fff; color: #3a4050; cursor: pointer; }
.as-slot.done { border-style: solid; border-color: var(--blue); background: var(--blue-soft); }
.as-slot.hasbad { border-color: #e05b4d; background: #fff3f1; }
.as-sname { display: block; font-weight: 600; }
.as-snum { display: block; font-size: 12px; color: #7a8298; margin-top: 2px; }
.as-pool { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.as-item { text-align: left; border: 1px solid #dfe3ec; border-radius: 8px; padding: 8px 10px; background: #fff; color: #3a4050; cursor: pointer; line-height: 1.4; }
.as-item.sel { border-color: var(--blue-dark); background: var(--blue-soft); box-shadow: 0 0 0 2px rgba(43,85,184,.15); }
.ig-bars { margin: 6px 0; }
.ig-bar { display: flex; align-items: center; gap: 8px; }
.ig-name { font-size: 12px; color: #7a8298; width: 64px; }
.ig-track { flex: 1; height: 10px; background: #e8ebf2; border-radius: 5px; overflow: hidden; }
.ig-fill { display: block; height: 100%; background: linear-gradient(90deg, #e05b4d, #f2a64b); transition: width .25s; }
.ig-num { font-size: 12px; color: #7a8298; width: 28px; text-align: right; }
.ig-scene { border: 1px solid #dfe3ec; border-radius: 8px; padding: 10px 12px; margin: 8px 0; background: #f8fafc; color: #3a4050; line-height: 1.55; }
.ig-end { border: 1px solid #cfe0ff; background: var(--blue-soft); border-radius: 8px; padding: 12px; color: #1f4d9e; line-height: 1.55; }
.lv-timer { font-size: 18px; font-weight: 700; color: var(--blue-dark); text-align: center; margin: 4px 0; }
.lv-timer.low { color: #e05b4d; animation: lvBlink 1s infinite; }
@keyframes lvBlink { 50% { opacity: .45; } }
