/* ============ 主题变量（换主题只需改这里 + js/app.js 里的 THEME） ============ */
@font-face {
  font-family: 'Anton';
  src: url(../fonts/anton-latin.woff2) format('woff2');
  font-display: swap;
}

:root {
  --bg: #0b1119;
  --bg-2: #121c28;
  --panel: rgba(8, 12, 18, 0.86);
  --panel-border: rgba(255, 255, 255, 0.08);
  --text: #f2f2f2;
  --text-dim: #9aa6b2;
  --money: #7cd17c;
  --gold: #f6c343;
  --red: #e0413a;
  --blue: #5aa9e6;
  --hp: #58b957;
  --accent: #f6c343;
  --font-display: 'Anton', 'Impact', 'Arial Narrow Bold', sans-serif;
  --font-cn: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --stroke: 0 0 2px #000, 0 0 2px #000, 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body { font-family: var(--font-cn); color: var(--text); background: var(--bg); }
.hidden { display: none !important; }

button {
  font: inherit; font-size: 14px; font-weight: 600; letter-spacing: .5px;
  padding: 7px 14px; border-radius: 2px; cursor: pointer;
  color: var(--text); background: rgba(0, 0, 0, .7); border: 1px solid rgba(255, 255, 255, .18);
  transition: background .15s, border-color .15s, transform .1s;
}
button:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .4); }
button:active { transform: translateY(1px); }
button:disabled { opacity: .35; cursor: default; }
button.primary { background: var(--accent); border-color: var(--accent); color: #111; }
button.primary:hover { background: #ffd35c; }
button.big { font-size: 18px; padding: 10px 26px; }
kbd {
  font-family: var(--font-cn); font-size: 11px; padding: 0 5px; margin-left: 4px;
  border: 1px solid rgba(255, 255, 255, .35); border-radius: 3px; color: var(--text-dim);
}
select {
  font: inherit; padding: 8px 10px; min-width: 240px; border-radius: 2px;
  color: var(--text); background: #111820; border: 1px solid rgba(255, 255, 255, .2);
}

/* ============ 地图区域 ============ */
.map-wrap {
  position: fixed; inset: 0;
  background: radial-gradient(ellipse at 50% 40%, #16263a 0%, var(--bg) 75%);
}
/* 地图区域的手势完全交给 ECharts（拖拽/双指缩放），不让浏览器原生的整页缩放/回弹手势跟它抢——
   否则手机上双指缩放地图时可能同时触发浏览器整页缩放，两套缩放打架 */
#map { position: absolute; inset: 0; z-index: 1; touch-action: none; overscroll-behavior: none; }
#terrain { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.map-grid {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(90, 169, 230, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(90, 169, 230, .05) 1px, transparent 1px);
  background-size: 48px 48px;
}
.map-wrap.shake { animation: shake .45s; }
@keyframes shake {
  0%, 100% { transform: translate(0, 0); }
  15% { transform: translate(-9px, 3px); } 30% { transform: translate(8px, -4px); }
  45% { transform: translate(-6px, -2px); } 60% { transform: translate(5px, 3px); }
  75% { transform: translate(-3px, 1px); }
}
.map-wrap.wasted #map, .map-wrap.wasted #terrain { filter: grayscale(1) brightness(.7); transition: filter .6s; }

.flash { position: absolute; inset: 0; pointer-events: none; z-index: 20; opacity: 0; }
.flash.bad { animation: flash-bad .6s; }
.flash.good { animation: flash-good .6s; }
@keyframes flash-bad { 0% { opacity: 1; box-shadow: inset 0 0 160px 40px rgba(224, 65, 58, .75); } 100% { opacity: 0; box-shadow: inset 0 0 160px 40px rgba(224, 65, 58, .75); } }
@keyframes flash-good { 0% { opacity: 1; box-shadow: inset 0 0 140px 20px rgba(124, 209, 124, .45); } 100% { opacity: 0; box-shadow: inset 0 0 140px 20px rgba(124, 209, 124, .45); } }

/* ============ HUD ============ */
.objective {
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%); z-index: 5;
  text-align: center; pointer-events: none;
}
.objective-label { font-size: 13px; letter-spacing: 6px; color: var(--text-dim); text-shadow: var(--stroke); }
.objective-name {
  font-size: 38px; font-weight: 900; color: var(--gold); letter-spacing: 2px;
  text-shadow: var(--stroke), 0 4px 18px rgba(0, 0, 0, .8); white-space: nowrap;
}
.objective-name.pop { animation: pop-in .35s cubic-bezier(.2, 1.6, .5, 1); }
@keyframes pop-in { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
/* 知识线索/证据链/历史追踪：这里显示的是一整句线索，不是短短的地名，
   不能沿用地名那套「不换行的大字」，否则窄屏上会整句顶出屏幕外 */
.objective-name.clue-mode {
  font-size: 22px; font-weight: 700; white-space: normal; line-height: 1.4; letter-spacing: 0;
  max-width: min(760px, calc(100vw - 48px)); margin: 0 auto;
}
@media (max-width: 720px) { .objective-name.clue-mode { font-size: 16px; max-width: calc(100vw - 32px); } }

.hud-right {
  position: absolute; top: calc(16px + env(safe-area-inset-top)); right: calc(20px + env(safe-area-inset-right));
  z-index: 5; text-align: right; pointer-events: none;
}
.money {
  font-family: var(--font-display); font-size: 42px; line-height: 1.05; color: var(--money);
  text-shadow: var(--stroke), 0 0 3px #000; font-variant-numeric: tabular-nums;
}
.money.bump { animation: bump .4s; }
@keyframes bump { 40% { transform: scale(1.12); color: #b6ffb6; } }
.stars { font-size: 26px; letter-spacing: 2px; height: 32px; }
.stars span { color: rgba(255, 255, 255, .18); text-shadow: var(--stroke); display: inline-block; }
.stars span.on { color: #fff; text-shadow: var(--stroke), 0 0 10px rgba(255, 255, 255, .7); }
.stars span.gain { animation: star-gain .5s; }
.stars.lost span { animation: star-lost .6s; }
@keyframes star-gain { 0% { transform: scale(2.2) rotate(-30deg); color: var(--gold); } 100% { transform: scale(1); } }
@keyframes star-lost { 0%, 50% { color: var(--red); } 25%, 75% { opacity: .2; } }
.hud-line { font-size: 13px; color: var(--text-dim); text-shadow: var(--stroke); margin-top: 3px; }
.hud-line span { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
#hud-mult { color: var(--gold); }

.hud-left {
  position: absolute; left: calc(20px + env(safe-area-inset-left)); bottom: calc(22px + env(safe-area-inset-bottom));
  z-index: 5; width: 240px; pointer-events: none;
}
.bounty { font-size: 14px; color: var(--text-dim); text-shadow: var(--stroke); margin-bottom: 8px; }
.bounty b { font-family: var(--font-display); font-weight: normal; font-size: 22px; color: var(--money); margin-left: 6px; letter-spacing: 1px; }
.bounty.drop b { animation: pot-drop .5s; }
@keyframes pot-drop { 30% { color: var(--red); transform: translateY(3px); } }
.bar-label { font-size: 11px; letter-spacing: 3px; color: var(--text-dim); margin-bottom: 3px; text-shadow: var(--stroke); }
.bar { height: 9px; background: rgba(0, 0, 0, .6); border: 1px solid rgba(0, 0, 0, .8); }
.bar > div { height: 100%; background: var(--hp); transition: width .45s ease, background .3s; box-shadow: 0 0 8px rgba(88, 185, 87, .5); }
.bar.low > div { background: var(--red); box-shadow: 0 0 8px rgba(224, 65, 58, .7); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .5; } }

/* 隐藏但可聚焦：不能用 display:none / visibility:hidden，那样元素就不能被 focus() 了 */
.key-capture {
  position: fixed; left: -9999px; top: 0; width: 1px; height: 1px; opacity: 0; border: none;
  padding: 0; pointer-events: none;
}

.toolbar-tl {
  position: fixed; top: calc(16px + env(safe-area-inset-top)); left: calc(20px + env(safe-area-inset-left));
  z-index: 7; display: flex; gap: 6px;
}
.icon-btn-lg {
  position: relative; width: 40px; height: 40px; padding: 0; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
}
.icon-btn-lg .kbd-badge {
  position: absolute; right: -3px; bottom: -3px; font-size: 9px; line-height: 1.4; padding: 0 3px;
  background: rgba(0, 0, 0, .85); border: 1px solid rgba(255, 255, 255, .3); border-radius: 3px; color: var(--text-dim);
}

.help-box {
  position: absolute; top: 66px; left: 20px; z-index: 6; width: 340px; max-width: calc(100vw - 40px);
  background: var(--panel); border: 1px solid var(--panel-border); padding: 12px 16px 10px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .5); animation: slide-left .3s ease-out;
}
.help-title { font-size: 12px; letter-spacing: 4px; color: var(--gold); margin-bottom: 6px; }
.help-box ol { margin: 0; padding-left: 20px; font-size: 15px; line-height: 1.6; }
.help-box li { margin-bottom: 4px; }
.help-box li.new { animation: hint-in .5s; }
.help-box li b { color: var(--gold); }
@keyframes slide-left { from { transform: translateX(-30px); opacity: 0; } }
@keyframes hint-in { from { background: rgba(246, 195, 67, .35); } }

.subtitle {
  position: absolute; left: 50%; bottom: calc(60px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 6;
  max-width: min(760px, calc(100vw - 40px)); text-align: center;
  font-size: 19px; font-weight: 700; text-shadow: var(--stroke), 0 2px 8px #000; pointer-events: none;
}
.subtitle b { color: var(--gold); }
.subtitle .ok { color: var(--money); }
.subtitle .bad { color: #ff6b63; }
.subtitle.show { animation: sub-in .25s ease-out; }

.mode-intro {
  position: absolute; top: 100px; left: 50%; transform: translateX(-50%); z-index: 6;
  max-width: min(420px, calc(100vw - 40px)); text-align: center; font-size: 13.5px; line-height: 1.5;
  color: var(--text); background: rgba(10, 14, 20, .88); border: 1px solid rgba(246, 195, 67, .4);
  padding: 8px 16px; box-shadow: 0 6px 20px rgba(0, 0, 0, .5); pointer-events: none;
}
.mode-intro.show { animation: sub-in .3s ease-out, mode-intro-out .3s ease-in 4.5s forwards; }
@keyframes mode-intro-out { to { opacity: 0; transform: translate(-50%, -6px); } }
@media (max-width: 720px) { .mode-intro { top: 190px; font-size: 12.5px; } }
@keyframes sub-in { from { opacity: 0; transform: translate(-50%, 8px); } }

/* 「选名字」题的 4 个候选按钮：够大够好点，兼顾小孩和老人 */
.choice-box {
  position: absolute; left: 50%; bottom: calc(108px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 6;
  display: grid; grid-template-columns: repeat(2, minmax(150px, 240px)); gap: 10px;
  animation: sub-in .25s ease-out;
}
.choice-btn {
  display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 8px 16px;
  font-size: 17px; font-weight: 700; background: rgba(10, 14, 20, .88); border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 6px; text-align: left;
}
.choice-btn:hover:not(:disabled) { border-color: var(--gold); background: rgba(246, 195, 67, .12); }
.choice-btn i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; background: rgba(255, 255, 255, .12); color: var(--text-dim); font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.choice-btn.eliminated { opacity: .35; text-decoration: line-through; }
.choice-btn.wrong-pick { border-color: var(--red); background: rgba(224, 65, 58, .18); animation: shake-btn .35s; }
.choice-btn.correct-pick { border-color: var(--money); background: rgba(76, 175, 80, .22); }
.choice-btn.correct-pick i { background: var(--money); color: #0a1a0a; }
@keyframes shake-btn { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@media (max-width: 720px) {
  .choice-box { grid-template-columns: minmax(0, 320px); bottom: calc(150px + env(safe-area-inset-bottom)); width: calc(100vw - 40px); }
}

.zoom-ctrl {
  position: fixed; right: calc(20px + env(safe-area-inset-right)); top: 50%; transform: translateY(-50%);
  z-index: 6; display: flex; flex-direction: column; gap: 4px;
}
.zoom-ctrl button { width: 36px; height: 34px; padding: 0; font-size: 17px; }
/* 触屏设备（手指比鼠标指针粗得多）把主要工具按钮的可点击热区放大到接近 44×44px 的常见触屏最小建议尺寸 */
@media (pointer: coarse) {
  .icon-btn-lg { width: 44px; height: 44px; font-size: 20px; }
  .zoom-ctrl button { width: 44px; height: 44px; font-size: 19px; }
}

/* 情报卡（手机通知风格） */
.intel {
  position: absolute; right: 20px; top: 172px; z-index: 7; width: 330px; max-width: calc(100vw - 40px);
  background: linear-gradient(180deg, rgba(22, 32, 46, .96), rgba(10, 14, 20, .96));
  border-left: 4px solid var(--blue); padding: 12px 14px 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .6); animation: intel-in .4s cubic-bezier(.2, 1.2, .4, 1);
}
@keyframes intel-in { from { transform: translateX(120%); } }
.intel-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.intel-kicker { font-size: 11px; letter-spacing: 3px; color: #111; background: var(--blue); padding: 1px 6px; font-weight: 700; }
.intel-name { font-weight: 800; font-size: 17px; flex: 1; }
.icon-btn { padding: 0 8px; font-size: 18px; line-height: 24px; background: transparent; border: none; color: var(--text-dim); }
.fact { font-size: 14px; line-height: 1.6; margin-bottom: 8px; }
.fact .tag {
  display: inline-block; font-size: 11px; padding: 0 6px; margin-right: 6px; border-radius: 2px;
  color: #111; background: var(--gold); font-weight: 700; vertical-align: 1px;
}
.link-btn { background: none; border: none; padding: 0; color: var(--blue); font-size: 13px; font-weight: 500; }
.link-btn:hover { background: none; text-decoration: underline; }

/* 飘字 */
.fx-layer { position: absolute; inset: 0; pointer-events: none; z-index: 30; overflow: hidden; }
.float-text {
  position: absolute; transform: translate(-50%, -50%); white-space: nowrap;
  font-family: var(--font-display); font-size: 34px; color: var(--money); text-shadow: var(--stroke), 0 0 12px rgba(0, 0, 0, .7);
  animation: float-up 1.4s ease-out forwards;
}
.float-text.bad { color: #ff5b52; font-size: 28px; }
.float-text.small { font-size: 20px; font-family: var(--font-cn); font-weight: 800; color: var(--gold); }
@keyframes float-up {
  0% { opacity: 0; transform: translate(-50%, -30%) scale(.6); }
  15% { opacity: 1; transform: translate(-50%, -60%) scale(1.15); }
  30% { transform: translate(-50%, -80%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -260%); }
}

/* 横幅：MISSION PASSED / WASTED */
.banner { position: absolute; inset: 0; z-index: 40; display: flex; align-items: center; pointer-events: none; opacity: 0; }
.banner.show { animation: banner-fade 1.8s forwards; }
.banner-band {
  width: 100%; padding: 22px 0 18px; text-align: center;
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, .78) 20%, rgba(0, 0, 0, .78) 80%, transparent);
}
.banner-title {
  font-family: var(--font-display); font-size: clamp(44px, 9vw, 96px); line-height: 1; letter-spacing: 3px;
  color: var(--gold); text-shadow: 3px 3px 0 #000, -1px -1px 0 #000, 0 0 30px rgba(0, 0, 0, .6);
}
.banner-sub { font-size: 20px; font-weight: 800; margin-top: 8px; letter-spacing: 2px; text-shadow: var(--stroke); }
.banner.wasted .banner-title { color: #c9302c; font-size: clamp(56px, 12vw, 130px); letter-spacing: 6px; }
.banner.wasted .banner-band { background: none; }
.banner.failed .banner-title { color: #e0413a; }
.banner.info .banner-title { color: #fff; font-size: clamp(34px, 6vw, 60px); }
.banner.show .banner-title { animation: banner-title .6s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes banner-fade { 0% { opacity: 0; } 10%, 80% { opacity: 1; } 100% { opacity: 0; } }
@keyframes banner-title { from { transform: scale(1.8); opacity: 0; letter-spacing: 30px; } }

/* ============ 菜单 / 面板 ============ */
.overlay {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(4, 7, 12, .72); backdrop-filter: blur(3px);
}
.menu-bg {
  background:
    linear-gradient(180deg, rgba(10, 8, 20, .2) 0%, rgba(8, 10, 16, .95) 70%),
    linear-gradient(135deg, #ff8a3d 0%, #c9407a 38%, #3b2a7a 70%, #0b1119 100%);
  background-size: 100% 100%, 220% 220%;
  animation: menu-bg-drift 22s ease-in-out infinite alternate;
}
@keyframes menu-bg-drift {
  0% { background-position: 0 0, 0% 30%; }
  100% { background-position: 0 0, 100% 70%; }
}
@media (prefers-reduced-motion: reduce) { .menu-bg { animation: none; } }
/* 背景里那张淡淡的中国地图：按「情报档案」解锁进度实时点亮，纯装饰，不挡菜单可读性 */
.start-map { position: absolute; inset: 0; z-index: 0; opacity: .5; pointer-events: none; filter: saturate(.8); }
.menu { position: relative; z-index: 1; width: 520px; max-width: 100%; max-height: 100%; overflow-y: auto; overflow-x: hidden; padding: 12px; }
.logo { text-align: center; margin-bottom: 22px; transform: rotate(-3deg); }
.logo-main {
  font-size: clamp(54px, 13vw, 88px); font-weight: 900; line-height: 1.05; letter-spacing: 4px; color: #fff; font-style: italic;
  text-shadow: 4px 4px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 0 10px 40px rgba(0, 0, 0, .6);
}
.logo-sub { font-family: var(--font-display); font-size: 22px; letter-spacing: 6px; color: var(--gold); text-shadow: 2px 2px 0 #000; }
.menu-panel, .panel {
  background: var(--panel); border: 1px solid var(--panel-border); padding: 22px 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
}
.panel { width: 460px; max-width: 100%; max-height: 100%; overflow: auto; }
.panel.wide { width: 720px; }
.panel h2 {
  margin: 0 0 14px; font-family: var(--font-display), var(--font-cn); font-weight: normal;
  font-size: 34px; letter-spacing: 2px; color: var(--gold); text-shadow: 2px 2px 0 #000;
}
.panel h3 { margin: 18px 0 8px; font-size: 15px; letter-spacing: 2px; color: var(--text-dim); }
.field { margin-bottom: 14px; }
.field > label { display: block; font-size: 12px; letter-spacing: 3px; color: var(--text-dim); margin-bottom: 6px; }
.field-hint { letter-spacing: 0; text-transform: none; color: var(--text-dim); margin-left: 6px; font-size: 12px; }
.field.checks label { font-size: 14px; color: var(--text); letter-spacing: 0; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button { flex: 1; min-width: 64px; }
.seg button.active { background: var(--accent); border-color: var(--accent); color: #111; }
.menu-actions { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.campaign-entry {
  display: flex; align-items: baseline; gap: 8px; width: 100%; margin-top: 10px; padding: 10px 14px;
  background: linear-gradient(90deg, rgba(246, 195, 67, .12), rgba(246, 195, 67, .03));
  border: 1px solid rgba(246, 195, 67, .35); color: var(--gold); font-size: 15px; font-weight: 700; text-align: left;
}
.campaign-entry:hover { border-color: var(--gold); background: rgba(246, 195, 67, .18); }
.campaign-entry small { color: var(--text-dim); font-weight: 400; font-size: 12px; }
.campaign-entry .tag-new {
  margin-left: auto; font-size: 10px; font-weight: 800; color: #111; background: var(--gold);
  border-radius: 3px; padding: 1px 5px; letter-spacing: 1px;
}
.advanced-toggle {
  display: flex; width: 100%; justify-content: space-between; align-items: center; margin-top: 16px;
  background: none; border: none; border-top: 1px dashed var(--panel-border); padding: 12px 2px 0;
  color: var(--text-dim); font-size: 12.5px; cursor: pointer; letter-spacing: .5px;
}
.advanced-toggle:hover { color: var(--text); }
.advanced-toggle .advanced-caret { color: var(--blue); white-space: nowrap; }
.advanced-panel { margin-top: 14px; padding-top: 2px; }
.menu-links { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 16px; font-size: 13px; }
.menu-links a { color: var(--blue); text-decoration: none; }
.menu-links a:hover { text-decoration: underline; }
.msg { color: #ff6b63; font-size: 14px; min-height: 1em; margin: 10px 0 0; }

.summary { display: flex; gap: 26px; flex-wrap: wrap; color: var(--text-dim); font-size: 13px; }
.summary b { display: block; font-family: var(--font-display); font-weight: normal; font-size: 30px; color: var(--text); letter-spacing: 1px; }
.summary .grade b { color: var(--gold); font-size: 40px; }
.summary .cash b { color: var(--money); }
.record-badge {
  flex-basis: 100%; font-size: 15px; font-weight: 800; color: var(--gold);
  padding: 8px 12px; background: rgba(246, 195, 67, .1); border: 1px solid rgba(246, 195, 67, .35);
  animation: pop-in .4s cubic-bezier(.2, 1.6, .5, 1);
}
.record-note { flex-basis: 100%; font-size: 13px; color: var(--text-dim); }
.record-note b { color: var(--text); font-family: inherit; font-size: 13px; display: inline; }
.review { max-height: 46vh; overflow: auto; margin-top: 6px; }
.review-item { padding: 10px 12px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.review-item .ri-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.review-item .ri-name { font-weight: 800; font-size: 16px; }
.review-item .ri-meta { font-size: 12px; color: var(--text-dim); }
.review-item .ri-clue { font-size: 13px; color: var(--blue); margin-top: 4px; }
.review-item .fact { margin: 4px 0 0; font-size: 13px; }
.empty { color: var(--text-dim); padding: 20px; text-align: center; }
.rules { font-size: 14px; line-height: 1.8; color: #d8dde2; }
.rules b { color: var(--gold); }
.rules ul { padding-left: 20px; margin: 6px 0; }

.coll-group { margin-top: 12px; }
.coll-group h4 { margin: 0 0 6px; font-size: 13px; color: var(--text-dim); font-weight: 600; }
.coll-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.coll-item { font-size: 13px; padding: 3px 8px; border: 1px solid rgba(255, 255, 255, .15); cursor: pointer; background: rgba(255, 255, 255, .04); }
.coll-item.locked { color: #56606a; cursor: default; border-style: dashed; }
.coll-item.unlocked:hover { border-color: var(--gold); color: var(--gold); }
.coll-detail { margin-top: 12px; padding: 12px; border-left: 3px solid var(--gold); background: rgba(255, 255, 255, .04); }

.loading {
  position: fixed; right: 24px; bottom: 24px; z-index: 60; display: flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 700; text-shadow: var(--stroke);
}
.spinner {
  width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .25); border-top-color: #fff;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 720px) {
  .objective { top: 150px; }
  .objective-name { font-size: 28px; }
  .money { font-size: 32px; }
  /* 提示框贴着左上角 💡 按钮下拉，而不是挤到底部——底部已经挤了选项按钮/字幕/生命值条，
     之前把它也锚在 bottom:150px 会跟"选名字"的答案按钮完全叠在一起，点不到按钮 */
  .help-box { top: 64px; left: 12px; right: auto; width: min(280px, calc(100vw - 32px)); }
  .help-box ol { max-height: 30vh; overflow-y: auto; }
  .hud-left { left: calc(12px + env(safe-area-inset-left)); width: 160px; bottom: calc(70px + env(safe-area-inset-bottom)); }
  .toolbar-tl { left: calc(12px + env(safe-area-inset-left)); }
  .zoom-ctrl { right: calc(12px + env(safe-area-inset-right)); }
  .intel { right: 12px; left: 12px; width: auto; top: auto; bottom: calc(60px + env(safe-area-inset-bottom)); }
  .subtitle { bottom: calc(120px + env(safe-area-inset-bottom)); font-size: 16px; }
}

/* ============ 情报卡 v2 ============ */
.intel { width: 360px; max-height: calc(100vh - 290px); display: flex; flex-direction: column; }
.intel-body { overflow-y: auto; min-height: 0; padding-right: 4px; }
.intel-foot { display: flex; gap: 14px; margin-top: 6px; }
.intel.pinned { border-left-color: var(--gold); }
.intel.pinned #intel-pin { color: var(--gold); }
.origin { font-size: 13.5px; line-height: 1.6; margin-bottom: 8px; color: #dfe6ec; }
.origin .tag { background: var(--blue); }
.mnemonic {
  font-size: 14.5px; font-weight: 700; line-height: 1.5; color: var(--gold); margin-bottom: 10px;
  padding: 6px 10px; background: rgba(246, 195, 67, .1); border-left: 3px solid var(--gold);
}
.geo-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.geo-chip {
  font-size: 12px; padding: 1px 7px; border-radius: 10px; white-space: nowrap;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14);
}
.geo-chip i { font-style: normal; color: var(--text-dim); margin-left: 3px; font-size: 11px; }
.intel-note { font-size: 12px; color: var(--text-dim); margin-bottom: 6px; }
.identity-strip {
  font-size: 12px; color: var(--text-dim); margin-bottom: 6px; padding-bottom: 6px;
  border-bottom: 1px dashed rgba(255, 255, 255, .12);
}
.identity-strip b { color: #dfe6ec; font-weight: 600; }
.identity-strip.sub { border-bottom: none; padding-bottom: 0; margin-top: -4px; color: var(--gold); }
.identity-tag {
  display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; margin-bottom: 6px;
  border-radius: 3px; color: #111; background: var(--gold);
}

/* ============ 偏好面板 ============ */
.prefs-overlay { z-index: 70; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { font-size: 13px; padding: 4px 12px; border-radius: 14px; }
.chips button.on { background: var(--accent); border-color: var(--accent); color: #111; }
.field.checks label { margin-bottom: 6px; line-height: 1.5; }

.resume { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 10px 12px; background: rgba(124, 209, 124, .08); border: 1px solid rgba(124, 209, 124, .3); }
.resume span { font-size: 13px; color: var(--text-dim); }
.resume b { color: var(--money); }
.record-box {
  margin-top: 12px; padding: 8px 12px; font-size: 13px; color: var(--text-dim);
  background: rgba(246, 195, 67, .06); border: 1px solid rgba(246, 195, 67, .22);
}
.record-box b { color: var(--gold); font-weight: 800; }
.progress-map-wrap { margin: 4px 0 16px; }
.progress-map { width: 100%; height: 220px; }
.progress-legend { display: flex; gap: 14px; font-size: 12px; color: var(--text-dim); margin-top: 4px; }
.progress-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.zoom-ctrl button.off { opacity: .45; }
.review-item .ri-origin { font-size: 13px; color: #cfd6dc; margin-top: 4px; }
.review-item .ri-mnemonic { font-size: 13px; color: var(--gold); margin-top: 3px; }

.scope-pickers { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.scope-pickers select { min-width: 0; flex: 1 1 120px; }
.scope-all { font-size: 14px; color: var(--text-dim); padding: 8px 0; }

/* 位置小地图 */
.locator { position: absolute; left: 20px; bottom: 92px; z-index: 5; display: flex; gap: 8px; pointer-events: none; }
.loc-box { background: rgba(8, 12, 18, .78); border: 1px solid rgba(255, 255, 255, .1); padding: 4px 6px 2px; }
.loc-title { font-size: 11px; letter-spacing: 1px; color: var(--text-dim); }
.loc-map { width: 170px; height: 125px; }
@media (max-width: 720px) { .locator { display: none; } }
