/* ============================================================================
 * 暗区求生 2D —— 界面样式
 * 像素风：硬边框 + 双线内描边 + 无圆角 + 扫描线，配色取自原项目 theme.py
 * ========================================================================== */

:root {
  --bg-dark: #07090d;
  --bg-panel: #10151d;
  --bg-card: #161d28;
  --bg-input: #0b0f16;
  --bg-hover: #1e2735;
  --border: #26303f;
  --border-bright: #3d4c60;
  --text: #eef4fb;
  --text-dim: #8b96a5;
  --accent: #58a6ff;
  --red: #f85149;
  --green: #3fb950;
  --yellow: #d2991d;
  --blue: #58a6ff;
  --purple: #a371f7;
  --cyan: #39d2c0;
  --orange: #d2621e;
  --gold: #e3b341;
  --chaos-title: #ff2d2d;
  --chaos-bg: #150708;
  --chaos-panel: #2a0f0f;
  --chaos-border: #7a2a2a;
  --chaos-text: #ffd7d7;
  --ui-font: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  --mono: "Cascadia Mono", "Consolas", "Courier New", monospace;
  --vp-h: clamp(210px, 46vh, 460px);
}

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

html, body {
  height: 100%;
  background: var(--bg-dark);
  color: var(--text);
  font-family: var(--ui-font);
  font-size: 13px;
  overflow: hidden;
  user-select: none;
}

button, input { font-family: var(--ui-font); }

/* ---------------------------------------------------------------- 全局装饰 */
#scanlines {
  position: fixed; inset: 0; pointer-events: none; z-index: 9999;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,0.035) 0 1px, rgba(0,0,0,0.10) 1px 3px);
  mix-blend-mode: overlay;
  opacity: 0.7;
}
#vignette {
  position: fixed; inset: 0; pointer-events: none; z-index: 9998;
  box-shadow: inset 0 0 160px 50px rgba(0,0,0,0.75);
}

/* ---------------------------------------------------------------- 清晰（增亮）模式
   手机屏幕在户外/低亮度下这套深色底容易发闷：提亮底板、压淡扫描线与暗角。
   只动颜色变量与两层装饰，不动 canvas，避免手机端多一层实时滤镜掉帧。 */
body.dz-bright {
  --bg-dark: #151f2b;
  --bg-panel: #1d2836;
  --bg-card: #26323f;
  --bg-input: #17222e;
  --bg-hover: #2f3d4c;
  --border: #41536a;
  --border-bright: #62788f;
  --text: #f9fcff;
  --text-dim: #b2c2d3;
}
body.dz-bright #scanlines { opacity: 0.28; }
body.dz-bright #vignette { box-shadow: inset 0 0 96px 18px rgba(0,0,0,0.34); }
/* 一层固定的浅色叠加：提亮包括 canvas 在内的整屏，静态层不产生逐帧滤镜开销 */
body.dz-bright::after {
  content: "";
  position: fixed; inset: 0;
  z-index: 9997;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.045);
}
body.dz-bright .modal,
body.dz-bright .panel { box-shadow: inset 0 0 0 2px #0a1017, 0 8px 26px rgba(0,0,0,.55); }

.screen { position: fixed; inset: 0; display: none; }
.screen.active { display: block; }

/* ---------------------------------------------------------------- 标题界面 */
#screen-title {
  background: #05070b url("../assets/pixel/bg/bg_title.png") center/cover no-repeat;
  image-rendering: pixelated;
}
#screen-title::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(5,7,11,0.30), rgba(5,7,11,0.62) 55%, rgba(5,7,11,0.88));
}
.title-wrap {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px;
}
.title-logo {
  font-family: var(--mono);
  font-size: 64px; font-weight: 900; letter-spacing: 10px;
  color: #e8f1fb;
  text-shadow: 4px 4px 0 #6b1f1f, 8px 8px 0 rgba(0,0,0,0.55), 0 0 28px rgba(248,81,73,0.45);
  line-height: 1;
  margin-bottom: 2px;
}
.title-sub {
  font-family: var(--mono);
  color: var(--text-dim); letter-spacing: 6px; font-size: 12px;
  margin-bottom: 22px; text-transform: uppercase;
}
.title-menu { display: flex; flex-direction: column; gap: 10px; width: 260px; }

.pixel-btn {
  position: relative;
  display: block; width: 100%;
  padding: 12px 14px;
  background: #0d1219;
  color: var(--text);
  border: 2px solid var(--border-bright);
  box-shadow: inset 0 0 0 2px #070a0f, 3px 3px 0 rgba(0,0,0,0.6);
  font-size: 14px; letter-spacing: 4px; cursor: pointer;
  transition: transform 0.08s, background 0.15s, border-color 0.15s, color 0.15s;
  text-align: left;
}
.pixel-btn::before {
  content: ""; position: absolute; left: 0; top: 0; width: 10px; height: 100%;
  background: rgba(88,166,255,0.18);
}
.pixel-btn:hover:not(:disabled) { background: #16202c; border-color: var(--accent); color: #fff; transform: translate(-1px,-1px); }
.pixel-btn:active:not(:disabled) { transform: translate(2px,2px); box-shadow: inset 0 0 0 2px #070a0f; }
.pixel-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.pixel-btn.locked { opacity: 0.45; filter: grayscale(0.4); cursor: not-allowed; border-color: #3a2b2b; color: #9c8a8a; }
.pixel-btn.locked:hover { background: transparent; border-color: #3a2b2b; color: #9c8a8a; transform: none; }
.pixel-btn.small { padding: 6px 10px; font-size: 12px; letter-spacing: 1px; width: auto; }
.pixel-btn.tiny { padding: 3px 8px; font-size: 11px; letter-spacing: 0; width: auto; box-shadow: none; }
.pixel-btn.primary { border-color: var(--accent); background: #12202f; }
.pixel-btn.danger { border-color: #6b2b2b; color: #ffb4ae; }
.pixel-btn.chaos { border-color: var(--chaos-border); background: #1a0a0a; color: var(--chaos-text); }
.pixel-btn.gold { border-color: #6b5320; background: #1a1508; color: var(--gold); }

.title-foot {
  position: absolute; bottom: 18px; width: 100%; text-align: center;
  color: #5d6674; font-size: 11px; letter-spacing: 2px; z-index: 3;
}

/* ---------------------------------------------------------------- 顶栏 */
#screen-main { display: none; }
#screen-main.active { display: grid; grid-template-rows: 54px 1fr; height: 100%; }

.topbar {
  display: flex; align-items: center; gap: 18px;
  padding: 0 14px;
  background: linear-gradient(#121821, #0b0f15);
  border-bottom: 2px solid var(--border-bright);
  box-shadow: 0 3px 0 rgba(0,0,0,0.5);
  /* 顶栏必须是独立层：手机「≡ 菜单」是 fixed 下拉，不能被困在低层堆叠里被引导浮窗盖住 */
  position: relative;
  z-index: 180;
}
.topbar .brand {
  font-family: var(--mono); font-size: 20px; font-weight: 900; letter-spacing: 3px;
  color: #dfeaf7; text-shadow: 2px 2px 0 #5a1c1c;
}
.topbar .brand small { font-size: 10px; letter-spacing: 1px; color: var(--text-dim); display: block; font-weight: 400; text-shadow: none; }

.tb-player { display: flex; align-items: center; gap: 10px; min-width: 210px; }
.tb-name { font-weight: 700; font-size: 14px; }
.lv-badge {
  font-family: var(--mono); font-size: 11px; padding: 2px 7px;
  border: 1px solid var(--accent); color: var(--accent); background: rgba(88,166,255,0.08);
}
.exp-wrap { width: 110px; }
.exp-label { font-size: 10px; color: var(--text-dim); font-family: var(--mono); margin-bottom: 2px; }

/* ---------------------------------------------------------------- 名望六边形 */
.rep-hex {
  --rep-edge: #6b7280; --rep-fill: linear-gradient(180deg, #202631, #11151c);
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 72px; height: 82px; padding: 0; border: 0; background: transparent;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  color: #fff; font-family: var(--mono); font-weight: 800; font-size: 26px;
  text-shadow: 0 2px 3px #000; cursor: pointer; isolation: isolate;
}
.rep-hex::before {
  content: ''; position: absolute; inset: 0; z-index: -2;
  background: var(--rep-edge); clip-path: inherit;
}
.rep-hex::after {
  content: ''; position: absolute; inset: 3px; z-index: -1;
  background: var(--rep-fill); clip-path: inherit;
}
.rep-hex > span { position: relative; z-index: 1; line-height: 1; }
.rep-hex-sm { width: 31px; height: 36px; font-size: 11px; margin-left: 1px; flex: 0 0 auto; }
.rep-hex-sm::after { inset: 2px; }
.rep-hex-sm > span { font-size: 11px; }
.rep-hex-lg { width: 96px; height: 110px; font-size: 36px; }
.rep-hex-lg::after { inset: 4px; }
.rep-hex.rep-locked { --rep-edge: #3a4250; --rep-fill: linear-gradient(180deg, #1a1f28, #0d1117); color: #697384; opacity: .9; }
.rep-hex.rep-bronze { --rep-edge: #d59a5f; --rep-fill: linear-gradient(180deg, #4a2b16, #8a5528); color: #ffd7ae; }
.rep-hex.rep-silver { --rep-edge: #e4edf7; --rep-fill: linear-gradient(180deg, #3a424e, #8b97a5); color: #f4f8fc; }
.rep-hex.rep-gold { --rep-edge: #ffdf7e; --rep-fill: linear-gradient(180deg, #4a3508, #9a7414); color: #fff0b8; }
.rep-hex.rep-purple { --rep-edge: #c58cff; --rep-fill: linear-gradient(180deg, #2c1147, #6d28d9); color: #efdcff; }
.rep-hex.rep-red { --rep-edge: #ff7b7b; --rep-fill: linear-gradient(180deg, #431010, #991b1b); color: #ffe0dc; }
.rep-hex.rep-rainbow { --rep-edge: conic-gradient(from 20deg, #ffffff, #77c8ff, #ff8fd1, #ffffff, #77c8ff); --rep-fill: linear-gradient(150deg, #ffffff 0%, #93c5fd 35%, #f9a8d4 68%, #ffffff 100%); color: #1a2233; text-shadow: 0 1px 1px rgba(255,255,255,.75); }
.rep-hex.rep-rainbow::before { animation: rep-hue 7s linear infinite; }
@keyframes rep-hue { from { filter: hue-rotate(0deg); } to { filter: hue-rotate(360deg); } }

.rep-hero {
  display: flex; align-items: center; gap: 16px; padding: 14px;
  border: 2px solid var(--border); background: linear-gradient(135deg, #111722, #0b0f16);
}
.rep-hero-main { flex: 1; min-width: 0; }
.rep-kicker { font-family: var(--mono); font-size: 10px; letter-spacing: 2px; color: var(--text-dim); }
.rep-title { font-size: 18px; font-weight: 800; margin: 3px 0 6px; }
.rep-sub { font-size: 12px; color: var(--text-dim); line-height: 1.55; }
.rep-points { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 9px; }
.rep-chip {
  font-family: var(--mono); font-size: 11px; padding: 3px 8px;
  border: 1px solid #2b4a63; background: rgba(88,166,255,.08); color: #bfdcff;
}
.rep-chip.gold { border-color: #6b5320; background: rgba(227,179,65,.1); color: #f0d99a; }
.rep-progress { margin-top: 12px; }
.rep-progress .bar { height: 8px; }
.rep-progress-label { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; color: var(--text-dim); margin-bottom: 5px; }
.rep-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.rep-actions .pixel-btn { flex: 1 1 140px; }
.rep-note { margin-top: 10px; font-size: 11px; line-height: 1.6; color: var(--text-dim); border-left: 2px solid #2b4a63; padding-left: 8px; }

.rep-path-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 10px; border: 1px solid #2b4a63; background: rgba(88,166,255,.06); margin-bottom: 10px;
}
.rep-path-head b { color: #bfdcff; font-size: 12px; }
.rep-path-head > div:first-child { flex: 1; min-width: 0; }
.rep-path-head .pixel-btn { width: auto; padding: 4px 10px; font-size: 11px; white-space: nowrap; flex: 0 0 auto; }
.rep-path { display: flex; flex-direction: column; gap: 0; }
.rep-node {
  position: relative; border: 2px solid var(--border); background: #111722;
  padding: 10px 11px; margin-left: 14px;
}
.rep-node + .rep-node { margin-top: 14px; }
.rep-node::before {
  content: ''; position: absolute; left: -14px; top: 50%; width: 12px; height: 2px; background: #2a3442;
}
.rep-node::after {
  content: ''; position: absolute; left: -6px; top: calc(50% - 4px); width: 7px; height: 7px;
  background: #2a3442; transform: rotate(45deg);
}
.rep-node.maxed { border-color: #2d6b3a; background: linear-gradient(135deg, #101b14, #0e1319); }
.rep-node.maxed::before, .rep-node.maxed::after { background: #3fb950; }
.rep-node.available { border-color: #6b5320; }
.rep-node.available::before, .rep-node.available::after { background: #e3b341; }
.rep-node.locked { opacity: .58; }
.rep-node-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rep-node-idx { font-family: var(--mono); font-size: 10px; color: var(--text-dim); border: 1px solid #2a3442; padding: 1px 5px; }
.rep-node-name { font-weight: 800; font-size: 14px; }
.rep-node-lv { margin-left: auto; font-family: var(--mono); font-size: 11px; color: #e3b341; }
.rep-node.maxed .rep-node-lv { color: #3fb950; }
.rep-node-desc { font-size: 11px; line-height: 1.6; color: var(--text-dim); margin-top: 6px; }
.rep-node-effect { font-size: 11px; line-height: 1.6; color: #bfdcff; margin-top: 5px; }
.rep-node-foot { display: flex; align-items: center; gap: 8px; margin-top: 9px; }
.rep-node-foot .pixel-btn { padding: 4px 9px; font-size: 11px; }
.rep-node-foot .muted { font-size: 10px; }
.rep-node-lock { font-family: var(--mono); font-size: 10px; color: #8b96a5; }
.rep-path-end { margin: 12px 0 0 14px; padding: 10px; border: 1px dashed #2a3442; color: var(--text-dim); font-size: 11px; text-align: center; }

@media (max-width: 720px) {
  .rep-hero { padding: 10px; gap: 11px; }
  .rep-hex-lg { width: 76px; height: 88px; font-size: 29px; }
  .rep-title { font-size: 15px; }
  .rep-node { padding: 9px; }
  .rep-node-name { font-size: 13px; }
  .rep-path-head { align-items: flex-start; flex-direction: column; }
}

.tb-sep { width: 1px; height: 30px; background: var(--border); }
.tb-item { display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 13px; }
.tb-item .ico { font-size: 14px; }
.tb-item .val { color: var(--gold); font-weight: 700; }
.tb-item .val.ap { color: var(--purple); }
.tb-item .val.dim { color: var(--text-dim); }
.tb-spacer { flex: 1; }
.tb-actions { display: flex; gap: 6px; }

/* ---------------------------------------------------------------- 主布局 */
.layout {
  display: grid;
  grid-template-columns: 300px minmax(520px, 1fr) 310px;
  gap: 10px;
  padding: 10px;
  overflow: hidden;
  height: 100%;
}

.panel {
  background: var(--bg-panel);
  border: 2px solid var(--border);
  box-shadow: inset 0 0 0 2px #080b10, 0 0 0 1px #000;
  display: flex; flex-direction: column;
  overflow: hidden;
  position: relative;
}
.panel::before, .panel::after {
  content: ""; position: absolute; width: 8px; height: 8px; border: 2px solid var(--border-bright);
  pointer-events: none;
}
.panel::before { left: 4px; top: 4px; border-right: 0; border-bottom: 0; }
.panel::after { right: 4px; bottom: 4px; border-left: 0; border-top: 0; }

.panel-title {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 10px;
  font-size: 12px; letter-spacing: 2px; color: var(--text-dim);
  background: #0c1119;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.panel-title .accent { color: var(--accent); }
.panel-body { padding: 9px; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.panel-body::-webkit-scrollbar, .log-body::-webkit-scrollbar, .modal-body::-webkit-scrollbar { width: 8px; }
.panel-body::-webkit-scrollbar-thumb, .log-body::-webkit-scrollbar-thumb, .modal-body::-webkit-scrollbar-thumb { background: #2a3546; border: 2px solid #0b0f15; }
.panel-body::-webkit-scrollbar-track { background: #080b0f; }

/* 角色卡 */
.hero-card { display: flex; gap: 9px; align-items: center; margin-bottom: 10px; }
.hero-portrait {
  width: 78px; height: 78px; flex-shrink: 0;
  border: 2px solid var(--border-bright);
  background: radial-gradient(circle at 50% 70%, #1c2532, #0a0e14 75%);
  display: flex; align-items: flex-end; justify-content: center;
  overflow: hidden; position: relative;
}
.hero-portrait img { width: 74px; height: 74px; image-rendering: pixelated; }
.hero-meta { flex: 1; min-width: 0; }
.hero-meta .n { font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero-meta .d { font-size: 11px; color: var(--text-dim); margin-top: 3px; line-height: 1.5; }
.hero-meta .t { font-family: var(--mono); font-size: 11px; color: var(--cyan); margin-top: 2px; }

/* 状态条 */
.stat-row { margin-bottom: 7px; }
.stat-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 11px; margin-bottom: 2px; }
.stat-top .nm { color: var(--text-dim); }
.stat-top .nm .ico { margin-right: 3px; }
.stat-top .vl { font-family: var(--mono); font-weight: 700; }
.bar { height: 9px; background: #06090d; border: 1px solid #222a36; position: relative; overflow: hidden; }
.bar-fill { height: 100%; transition: width 0.25s ease-out; position: relative; }
.bar-fill::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: rgba(255,255,255,0.25); }
.bar .ticks { position: absolute; inset: 0; background: repeating-linear-gradient(to right, transparent 0 9px, rgba(0,0,0,0.35) 9px 10px); }
.stat-row.warn .vl { color: var(--red); animation: blink 1.1s infinite; }
@keyframes blink { 50% { opacity: 0.45; } }

/* 技能 */
.skill-list { display: flex; flex-direction: column; gap: 5px; }
.skill-row {
  display: grid; grid-template-columns: 20px 1fr auto; gap: 6px; align-items: center;
  padding: 4px 5px; background: #0c1219; border: 1px solid #1c2531; cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.skill-row:hover { border-color: var(--accent); background: #121d2a; }
.skill-row .ico { text-align: center; font-size: 13px; }
.skill-row .nm { font-size: 11.5px; }
.skill-row .lv { font-family: var(--mono); font-size: 11px; color: var(--accent); }
.skill-row .xp { grid-column: 1 / -1; height: 3px; background: #06090d; margin-top: 1px; }
.skill-row .xp i { display: block; height: 100%; background: #37517a; }
.skill-pips { display: flex; gap: 2px; }
.skill-pips i { width: 6px; height: 6px; background: #1e2735; display: block; }
.skill-pips i.on { background: var(--accent); }

/* 装备 */
.equip-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.equip-slot {
  position: relative; aspect-ratio: 1/1;
  background: #0a0e14; border: 1px solid #1c2531;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; overflow: hidden;
  transition: border-color 0.12s, background 0.12s;
}
.equip-slot:hover { border-color: var(--accent); background: #101a26; }
.equip-slot img { width: 38px; height: 38px; image-rendering: pixelated; object-fit: contain; }
.equip-slot .slot-name { font-size: 9px; color: #55606f; letter-spacing: 1px; margin-top: 2px; }
.equip-slot.filled .slot-name { color: var(--text-dim); }
.equip-slot .dura { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: #06090d; }
.equip-slot .dura i { display: block; height: 100%; background: var(--green); }
.equip-slot .dura i.low { background: var(--red); }

/* 背包速览 */
.inv-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.inv-cell {
  position: relative; aspect-ratio: 1/1; background: #0a0e14; border: 1px solid #1c2531;
  display: flex; align-items: center; justify-content: center; cursor: pointer; overflow: hidden;
}
.inv-cell:hover { border-color: var(--accent); background: #101a26; }
.inv-cell img { width: 32px; height: 32px; image-rendering: pixelated; object-fit: contain; }
.inv-cell .qty {
  position: absolute; right: 1px; bottom: 0; font-family: var(--mono); font-size: 9px;
  color: #fff; background: rgba(0,0,0,0.75); padding: 0 2px;
  text-shadow: 1px 1px 0 #000;
}
.inv-empty { color: #4a5563; font-size: 11px; text-align: center; padding: 10px 0; }

/* 委托 */
.bounty-row { padding: 5px; border-left: 3px solid #2c3a4d; background: #0c1219; margin-bottom: 4px; font-size: 11px; }
.bounty-row .bn { display: flex; justify-content: space-between; gap: 4px; margin-bottom: 2px; }
.bounty-row .bd { color: var(--text-dim); font-size: 10px; }
.bounty-row .bp { font-family: var(--mono); color: var(--green); font-size: 10px; }
.bounty-row.done { border-left-color: var(--green); background: #0d1a12; }
.bounty-row.done .bp { color: var(--gold); }

/* ---------------------------------------------------------------- 中栏 */
/* 中栏必须锁死在栅格行高内：日志区自己滚动，操作栏永远贴底可见 */
.center-col {
  display: flex; flex-direction: column; gap: 8px;
  min-width: 0; min-height: 0; height: 100%; overflow: hidden;
}

.viewport-shell {
  position: relative;
  border: 2px solid var(--border-bright);
  box-shadow: inset 0 0 0 2px #05080c, 0 0 24px rgba(0,0,0,0.6);
  background: #05070a;
  overflow: hidden;
  flex-shrink: 0;
  height: var(--vp-h);
  width: min(100%, calc(var(--vp-h) * 16 / 9));
  margin: 0 auto;
}
/* 高度驱动 + 外框等比：矮屏不会把画布压扁，也不会把操作栏挤出屏幕 */
.viewport-shell .scene-canvas {
  display: block; width: 100%; height: 100%;
  image-rendering: pixelated;
  background: #05070a;
}

.viewport-top {
  position: absolute; left: 0; right: 0; top: 0;
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 7px 9px;
  background: linear-gradient(rgba(4,6,10,0.72), rgba(4,6,10,0));
  pointer-events: none;
}
.loc-name { font-size: 14px; font-weight: 700; letter-spacing: 2px; text-shadow: 2px 2px 0 #000; }
.loc-risk {
  font-size: 10px; padding: 2px 6px; border: 1px solid currentColor; margin-left: 8px;
  letter-spacing: 1px; vertical-align: middle;
}
.loc-desc { font-size: 11px; color: #a8b3c2; margin-top: 3px; max-width: 380px; text-shadow: 1px 1px 0 #000; }
.viewport-time {
  font-family: var(--mono); font-size: 11px; color: #cddcec; text-align: right;
  background: rgba(4,6,10,0.5); padding: 2px 6px; border: 1px solid #1d2735;
}

/* 探索进度条（覆盖在场景底部） */
.journey {
  position: absolute; left: 14px; right: 14px; bottom: 12px;
  padding: 7px 9px 8px;
  background: rgba(6,9,14,0.82);
  border: 1px solid #2b3a4d;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.8), inset 0 0 12px rgba(0,0,0,0.6);
  opacity: 0; transform: translateY(8px); transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
}
.journey.on { opacity: 1; transform: translateY(0); }
.journey-head { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--text-dim); margin-bottom: 4px; letter-spacing: 1px; }
.journey-head .s { color: var(--cyan); font-family: var(--mono); }
.jbar { height: 10px; background: #05080c; border: 1px solid #24303f; position: relative; }
.jbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #2ea043, #58a6ff); transition: width 0.18s linear; }
.jbar .glow { position: absolute; top: 0; bottom: 0; width: 26px; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent); }
.jsteps { display: flex; gap: 4px; margin-top: 5px; }
.jsteps i { flex: 1; height: 3px; background: #1b2431; }
.jsteps i.done { background: var(--green); }
.jsteps i.cur { background: var(--yellow); }

/* 日志 */
.log-panel { flex: 1 1 auto; min-height: 0; }
.log-body { padding: 7px 10px; font-size: 11.5px; line-height: 1.65; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.log-line { color: var(--text); }
.log-line.dim { color: var(--text-dim); }
.log-line.green { color: var(--green); }
.log-line.red { color: var(--red); }
.log-line.yellow { color: var(--yellow); }
.log-line.purple { color: var(--purple); }
.log-line.blue { color: var(--blue); }
.log-line.gold { color: var(--gold); }
.log-line.bold { font-weight: 700; color: #fff; }
.log-line.chaos { color: var(--chaos-title); }
.log-line + .log-line { margin-top: 1px; }

/* 操作栏 */
.action-bar { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; flex-shrink: 0; }
.act-btn {
  position: relative; padding: 9px 4px 8px; background: #0d141d;
  border: 2px solid #2a3849; box-shadow: inset 0 0 0 2px #070a0f, 2px 2px 0 rgba(0,0,0,0.55);
  color: var(--text); cursor: pointer; text-align: center;
  transition: transform 0.08s, border-color 0.15s, background 0.15s;
}
.act-btn:hover:not(:disabled) { border-color: var(--accent); background: #14202e; transform: translateY(-1px); }
.act-btn:active:not(:disabled) { transform: translateY(2px); box-shadow: inset 0 0 0 2px #070a0f; }
.act-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.act-btn .ico { font-size: 17px; display: block; line-height: 1.2; }
.act-btn .lb { display: block; font-size: 11.5px; letter-spacing: 1px; margin-top: 2px; }
.act-btn .sub { display: block; font-size: 9px; color: #6f7c8d; font-family: var(--mono); margin-top: 1px; }
.act-btn.hot { border-color: #5b3a20; background: #1a1208; }
.act-btn.hot:hover { border-color: var(--orange); }

/* ---------------------------------------------------------------- 模态框 */
#modalRoot { position: fixed; inset: 0; z-index: 200; pointer-events: none; }
.modal-backdrop {
  position: absolute; inset: 0; background: rgba(3,5,9,0.78);
  display: flex; align-items: center; justify-content: center; pointer-events: auto;
  animation: fadeIn 0.12s ease-out;
  padding: 20px;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: min(760px, 92vw); max-height: 88vh;
  background: var(--bg-panel);
  border: 2px solid var(--border-bright);
  box-shadow: inset 0 0 0 2px #06090d, 0 18px 50px rgba(0,0,0,0.8);
  display: flex; flex-direction: column;
  animation: popIn 0.14s cubic-bezier(.2,.9,.3,1.2);
  position: relative;
}
@keyframes popIn { from { transform: translateY(10px) scale(0.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal.wide { width: min(980px, 95vw); }
.modal.narrow { width: min(520px, 92vw); }
.modal.battle { width: min(1040px, 96vw); border-color: #4a5a6f; }
.modal.chaos { background: var(--chaos-bg); border-color: var(--chaos-border); box-shadow: inset 0 0 40px rgba(120,10,10,0.35), 0 18px 50px rgba(0,0,0,0.8); }
.modal.chaos .modal-head { background: #260b0b; border-bottom-color: var(--chaos-border); color: var(--chaos-text); }
.modal.chaos .modal-body { color: var(--chaos-text); }

.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px; background: #0b1018; border-bottom: 2px solid var(--border);
  flex-shrink: 0;
}
.modal-head .ttl { font-size: 14px; letter-spacing: 2px; font-weight: 700; display: flex; gap: 8px; align-items: center; }
.modal-head .sub { font-size: 10px; color: var(--text-dim); letter-spacing: 1px; }
.modal-close {
  width: 26px; height: 24px; background: #1a1113; border: 1px solid #5a2a2a; color: #ff9d95;
  cursor: pointer; font-family: var(--mono); font-size: 14px;
}
.modal-close:hover { background: #3a1a1a; color: #fff; }
.modal-body { padding: 12px; overflow-y: auto; flex: 1; }
.modal-foot {
  padding: 9px 12px; border-top: 1px solid var(--border); background: #0a0f16;
  display: flex; gap: 8px; justify-content: flex-end; flex-shrink: 0;
}

/* 通用小组件 */
.section-label {
  font-size: 11px; letter-spacing: 2px; color: var(--text-dim);
  padding-bottom: 4px; margin: 10px 0 8px; border-bottom: 1px solid #1c2531;
}
.section-label:first-child { margin-top: 0; }
.tag { display: inline-block; font-size: 10px; padding: 1px 5px; border: 1px solid currentColor; font-family: var(--mono); }
.tag .status-ico { width: 13px; height: 13px; image-rendering: pixelated; vertical-align: -2px; margin-right: 3px; }
.muted { color: var(--text-dim); }
.mono { font-family: var(--mono); }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 8px; }
.row.between { justify-content: space-between; }
/* 战利品行：允许换行，避免同类物资多时把文字挤出弹窗 */
.row.loot-row { align-items: flex-start; }
.row.loot-row b { flex: 1 1 auto; min-width: 0; text-align: right; white-space: normal; word-break: break-all; line-height: 1.5; }
.grow { flex: 1; min-width: 0; }
.wrap { display: flex; flex-wrap: wrap; gap: 6px; }

/* 多弹种枪械：逐发弹仓 */
.ammo-loader { display: flex; flex-direction: column; gap: 10px; }
.ammo-loader-hint {
  font-size: 11px; line-height: 1.7; color: #9fb0c3;
  border: 1px solid #243246; background: #0a1018; padding: 8px 10px;
}
.ammo-chambers { display: flex; flex-direction: column; gap: 7px; }
.ammo-chamber {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; padding: 9px 10px; text-align: left; cursor: pointer;
  background: #0b1119; border: 2px solid #273549; color: #aeb9c6;
  font-family: var(--mono); font-size: 12px;
}
.ammo-chamber:hover { border-color: #4a607a; background: #101a26; }
.ammo-chamber.filled { border-color: #3b82c4; background: #102033; color: #e6edf3; box-shadow: inset 0 0 0 1px #0b1724; }
.ammo-chamber .ch-no { flex: 0 0 52px; color: #7f8d9d; letter-spacing: 1px; }
.ammo-chamber .ch-ammo { display: flex; align-items: center; gap: 7px; flex: 1 1 auto; min-width: 0; }
.ammo-chamber .ch-ammo img { width: 22px; height: 22px; image-rendering: pixelated; }
.ammo-chamber .ch-ammo.empty { color: #64717f; }
.ammo-chamber .ch-tag { flex: 0 0 auto; font-size: 10px; color: #8fb8de; }
.ammo-chamber:not(.filled) .ch-tag { color: #6e7a87; }
.ammo-types { display: flex; flex-direction: column; gap: 7px; }
.ammo-type {
  display: grid; grid-template-columns: 24px minmax(0, 1.15fr) auto minmax(0, 1.8fr);
  align-items: center; gap: 8px; width: 100%; padding: 8px 9px;
  background: #0b1119; border: 2px solid #2c3a4b; color: #c7d2df;
  text-align: left; cursor: pointer; font-family: var(--mono); font-size: 11px;
}
.ammo-type:hover:not(:disabled) { border-color: var(--accent); background: #12202f; color: #fff; }
.ammo-type:disabled { opacity: 0.38; cursor: not-allowed; }
.ammo-type img { width: 22px; height: 22px; image-rendering: pixelated; }
.ammo-type .at-name { color: #e6edf3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ammo-type .at-count { color: #e3b341; font-size: 12px; }
.ammo-type .at-stat { color: #8fa3b8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ammo-loader-summary { font-size: 11px; line-height: 1.6; color: #78889a; border-top: 1px solid #1c2633; padding-top: 8px; }
.ammo-loader-summary.ready { color: #7ee787; }
@media (max-width: 640px) {
  /* 手机窄弹窗：弹种说明换到第二行，避免名字/伤害/命中被横向截断 */
  .ammo-type { grid-template-columns: 24px minmax(0, 1fr) auto; row-gap: 4px; }
  .ammo-type .at-stat { grid-column: 2 / -1; white-space: normal; line-height: 1.5; }
}

/* 地点选择 */
.loc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.loc-card {
  position: relative; border: 2px solid #26303f; background: #0c1219;
  cursor: pointer; overflow: hidden; transition: border-color 0.15s, transform 0.1s;
}
.loc-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.loc-card .thumb { height: 96px; background-size: cover; background-position: center; image-rendering: pixelated; filter: brightness(0.85); position: relative; }
.loc-card .thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(0,0,0,0.1), rgba(6,9,14,0.95)); }
.loc-card .info { padding: 7px 8px 9px; }
.loc-card .ln { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.loc-card .ln b { font-size: 13px; }
.loc-card .ld { font-size: 10.5px; color: var(--text-dim); margin-top: 3px; min-height: 30px; line-height: 1.45; }
.loc-card .lmeta { display: flex; justify-content: space-between; margin-top: 6px; font-size: 10px; font-family: var(--mono); color: #7d8899; }
.loc-card.disabled { opacity: 0.45; cursor: not-allowed; }
.loc-card.disabled:hover { border-color: #26303f; transform: none; }

/* 事件卡 */
.event-card { }
.ev-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.ev-title .en { font-size: 17px; font-weight: 700; letter-spacing: 2px; }
.ev-type { font-size: 10px; padding: 2px 7px; border: 1px solid currentColor; font-family: var(--mono); }
.ev-desc { font-size: 13px; line-height: 1.75; color: #cfd8e3; background: #0a0f16; border-left: 3px solid #2c3a4d; padding: 9px 11px; margin: 8px 0 10px; }
.prob-wrap { margin: 10px 0 6px; }
.prob-head { display: flex; justify-content: space-between; font-size: 11px; margin-bottom: 3px; }
.prob-bar { height: 16px; background: #06090d; border: 1px solid #223040; position: relative; overflow: hidden; }
.prob-bar i { display: block; height: 100%; background: linear-gradient(90deg, #1f6b34, #3fb950); transition: width 0.3s; }
.prob-bar.low i { background: linear-gradient(90deg, #6b241f, #f85149); }
.prob-bar::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(to right, transparent 0 7px, rgba(0,0,0,0.3) 7px 8px);
}
.prob-num { font-family: var(--mono); font-weight: 700; font-size: 13px; }
.breakdown { margin-top: 6px; font-size: 10.5px; color: #7f8b9c; line-height: 1.6; font-family: var(--mono); }
.breakdown div { padding-left: 10px; position: relative; }
.breakdown div::before { content: "·"; position: absolute; left: 2px; }
.ev-result { padding: 8px 10px; border: 1px solid #24303f; background: #0a1118; font-size: 12px; line-height: 1.7; margin-top: 8px; }
.ev-result.ok { border-color: #1f6b34; background: #0a1710; }
.ev-result.bad { border-color: #6b241f; background: #170b0b; }
.ev-gains { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.gain-chip { font-size: 11px; font-family: var(--mono); padding: 2px 7px; border: 1px solid currentColor; background: rgba(0,0,0,0.3); }

/* 密码箱 */
.pwdbox-modal .modal-foot { flex-wrap: wrap; }
.pwdbox-modal .modal-foot .pixel-btn { flex: 1 1 auto; }
.px-emblem {
  float: right; width: 46px; height: 46px; margin: 0 0 8px 10px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid #6b5424; background: #171208; color: #d2991d;
  font-size: 24px; box-shadow: inset 0 0 14px rgba(210,153,29,0.18);
}
.px-legend { display: flex; flex-wrap: wrap; gap: 5px 14px; margin: 8px 0 2px; font-size: 10.5px; color: #8b96a5; }
.px-legend span { display: inline-flex; align-items: center; gap: 5px; }
.px-legend-compact { justify-content: center; margin: 7px 0 0; }
.px-dot { display: inline-block; width: 9px; height: 9px; border: 1px solid currentColor; background: rgba(0,0,0,0.35); }
.px-dot.red { color: #f85149; background: #2a0d10; }
.px-dot.yellow { color: #d2991d; background: #2a2109; }
.px-dot.green { color: #3fb950; background: #0b1e12; }
.px-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.px-tag { font-family: var(--mono); font-size: 10px; letter-spacing: 2px; color: #d2991d; border: 1px solid #6b5424; padding: 2px 7px; background: #171208; }
.px-tries { font-family: var(--mono); font-size: 10px; color: #8b96a5; }
.px-slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 4px 0 8px; }
.px-slot {
  height: 54px; display: flex; align-items: center; justify-content: center;
  background: #06090d; border: 2px solid #2a3546; color: #cfd8e3;
  font-family: var(--mono); font-size: 27px; font-weight: 700;
  box-shadow: inset 0 0 12px rgba(0,0,0,0.6);
  transition: color .12s, border-color .12s, background .12s;
}
.px-slot.green { color: #3fb950; border-color: #2f7a42; background: #0b1a10; box-shadow: inset 0 0 14px rgba(63,185,80,0.18); }
.px-slot.yellow { color: #d2991d; border-color: #7a6422; background: #1a1508; box-shadow: inset 0 0 14px rgba(210,153,29,0.18); }
.px-slot.red { color: #f85149; border-color: #7a2c2c; background: #1c0d0f; box-shadow: inset 0 0 14px rgba(248,81,73,0.16); }
.px-status { min-height: 18px; font-size: 11px; color: #8b96a5; text-align: center; line-height: 1.5; }
.px-green { color: #3fb950; }
.px-yellow { color: #d2991d; }
.px-red { color: #f85149; }
.px-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.px-key {
  height: 44px; background: #111821; border: 1px solid #38475a; color: #dce5ef;
  font-family: var(--mono); font-size: 18px; cursor: pointer;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,0.45);
}
.px-key:hover { border-color: #5a7390; background: #172131; }
.px-key:active { transform: translateY(1px); box-shadow: inset 0 -1px 0 rgba(0,0,0,0.45); }
.px-key:disabled { opacity: 0.4; cursor: not-allowed; }
.px-key-back { color: #d2991d; font-size: 14px; letter-spacing: 1px; }
.px-key-submit { background: #12331d; border-color: #2f7a42; color: #7ee787; font-size: 15px; letter-spacing: 2px; }
.px-key-submit:hover { background: #17452a; border-color: #3fb950; }
.px-actions { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 10px; min-height: 28px; }
.px-link { background: none; border: 0; color: #8b96a5; font-size: 11px; cursor: pointer; text-decoration: underline; font-family: var(--mono); }
.px-link:hover { color: #d2991d; }
.px-result-head { font-size: 18px; font-weight: 700; letter-spacing: 2px; margin-bottom: 6px; }
.px-result-head.green { color: #3fb950; }
.px-result-head.red { color: #f85149; }
.px-result-line { font-size: 12px; margin-top: 4px; font-family: var(--mono); }
.px-result-line.red { color: #f85149; }
.px-result-line.purple { color: #a371f7; }
.px-loot-box { margin-top: 8px; }
.px-loot-row { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; padding: 4px 0; border-bottom: 1px dashed #1d2836; }
.px-loot-row b { color: #3fb950; font-family: var(--mono); }

/* 列表式柜 */
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 6px; }
.item-tile {
  position: relative; background: #0a0e14; border: 1px solid #1e2836; padding: 6px 4px;
  display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.item-tile:hover { border-color: var(--accent); background: #101a26; }
.item-tile img { width: 40px; height: 40px; image-rendering: pixelated; object-fit: contain; }
.item-tile .in { font-size: 10.5px; text-align: center; line-height: 1.3; color: #cfd8e3; }
.item-tile .qty { position: absolute; top: 2px; right: 3px; font-family: var(--mono); font-size: 9px; color: var(--gold); }
.item-tile.equipped { border-color: #2d5c33; }
.item-tile .tag-eq { position: absolute; top: 2px; left: 3px; font-size: 8px; color: var(--green); }

.list-row {
  display: flex; align-items: center; gap: 8px; padding: 7px 8px;
  border: 1px solid #1c2531; background: #0b1119; margin-bottom: 5px;
}
.list-row:hover { border-color: #2e4155; }
.list-row .lr-ico { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border: 1px solid #1c2531; background: #060a0f; }
.list-row .lr-ico img { width: 30px; height: 30px; image-rendering: pixelated; }
.list-row .lr-main { flex: 1; min-width: 0; }
.list-row .lr-name { font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 5px; }
.list-row .lr-desc { font-size: 10.5px; color: var(--text-dim); margin-top: 2px; line-height: 1.45; }
.list-row .lr-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.list-row .lr-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.list-row .lr-actions .pixel-btn { min-width: 42px; padding-left: 8px; padding-right: 8px; }
@media (max-width: 640px) {
  .merchant-buy-row { flex-wrap: wrap; }
  .merchant-buy-row .lr-main { flex: 1 1 calc(100% - 52px); }
  .merchant-buy-row .lr-actions { order: 9; flex: 1 1 100%; margin-top: 4px; }
}

/* 商店 */
.merchant-tabs { display: flex; gap: 8px; margin-bottom: 10px; border-bottom: 2px solid #26303f; padding-bottom: 8px; }
/* 未选中态也要一眼能看出是按钮：亮一档的底 + 可见边框 + 字色 */
.mtab {
  padding: 7px 16px;
  background: #16202c;
  border: 2px solid #4a5d75;
  color: #c9d6e4;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  box-shadow: inset 0 -2px 0 #0a0c11;
  transition: background .12s, border-color .12s, color .12s;
}
.mtab:hover { background: #1e2b3a; border-color: #6f89a8; color: #fff; }
.mtab.on {
  border-color: var(--accent);
  background: #13202e;
  color: #ffd76a;
  box-shadow: inset 0 0 0 2px rgba(88, 166, 255, .28), inset 0 -2px 0 #0a0c11;
}
.price { font-family: var(--mono); color: var(--gold); font-size: 12px; }
.price.buy { color: var(--gold); }
.price.sell { color: var(--green); }

/* 战斗界面 */
.battle-stage { position: relative; border-bottom: 2px solid var(--border); background: #05070a; }
.battle-outcome {
  position: absolute; left: 50%; top: 44%; z-index: 3;
  transform: translate(-50%, -50%);
  padding: 12px 24px; border: 2px solid #30363d;
  background: rgba(5, 8, 13, .88); box-shadow: 0 0 0 3px rgba(0,0,0,.55), 0 10px 30px rgba(0,0,0,.6);
  text-align: center; pointer-events: none; animation: outcome-in .38s steps(4, end) both;
}
.battle-outcome b { display: block; font-size: 20px; letter-spacing: 2px; text-shadow: 2px 2px 0 #000; }
.battle-outcome.win { border-color: #3fb950; color: #8ef0a2; }
.battle-outcome.lose { border-color: #f85149; color: #ff9b93; }
@keyframes outcome-in {
  from { opacity: 0; transform: translate(-50%, -38%) scale(.88); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.battle-stage canvas { display: block; width: 100%; aspect-ratio: 640 / 300; image-rendering: pixelated; }
.battle-hud {
  position: absolute; left: 0; right: 0; top: 0; padding: 8px 10px;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
  pointer-events: none;
}
.bside { width: 46%; }
.bside.right { text-align: right; }
.bname { font-size: 13px; font-weight: 700; text-shadow: 2px 2px 0 #000; display: flex; align-items: center; gap: 6px; }
.bside.right .bname { justify-content: flex-end; gap: 7px; padding-right: 4px; }
.bhp { height: 14px; background: #05080c; border: 1px solid #2a3646; margin-top: 4px; position: relative; }
.bhp i { display: block; height: 100%; transition: width 0.25s; }
.bhp .n {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  font-family: var(--mono); font-size: 10px; color: #f0f6ff;
  text-shadow: 1px 1px 0 #000, -1px -1px 0 #000; pointer-events: none;
}
.bside.right .bhp .n { right: auto; left: 5px; }
.bstatus { margin-top: 3px; font-size: 10px; color: #a9b5c4; display: flex; gap: 8px; flex-wrap: wrap; row-gap: 2px; }
.bstatus > span { flex: 0 0 auto; white-space: nowrap; }
.bside.right .bstatus { justify-content: flex-end; }
/* PvP 玩家 buff 行：单独一行，不再挤进两侧窄 HUD */
.inv-buffs {
  display: flex; flex-wrap: wrap; gap: 5px; padding: 6px 12px;
  background: #0a1018; border-top: 1px solid #1a2431; min-height: 13px;
}
.inv-buffs .ib-buff {
  font-family: var(--mono); font-size: 10px; color: #cfe3ff;
  background: #101a26; border: 1px solid #2b3b4e; padding: 1px 6px;
}
@media (max-width: 640px) {
  .inv-buffs { padding: 5px 8px; gap: 4px; }
  .inv-buffs .ib-buff { font-size: 9px; padding: 1px 4px; }
}
.battle-log {
  padding: 8px 12px; height: 104px; overflow-y: auto; background: #080c12;
  border-top: 1px solid #1a2431; font-size: 11.5px; line-height: 1.65;
}
.battle-actions { padding: 10px 12px 12px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.batk {
  padding: 9px 6px; background: #0e151f; border: 2px solid #2a3849; cursor: pointer;
  text-align: left; color: var(--text); transition: border-color 0.12s, background 0.12s, transform 0.08s;
  position: relative;
}
.batk:hover:not(:disabled) { border-color: var(--accent); background: #15212f; transform: translateY(-1px); }
.batk:disabled { opacity: 0.35; cursor: not-allowed; }
.batk .k { display: block; font-size: 12.5px; font-weight: 700; }
.batk .d { display: block; font-size: 10px; color: var(--text-dim); margin-top: 2px; font-family: var(--mono); }
.batk.crit { border-color: #6b4a20; }
.batk.gun { border-color: #2b4a63; }
.batk.flee { border-color: #6b2b2b; }
.batk.reject-marked { border-color: #b07cff; box-shadow: inset 0 0 0 1px rgba(163,113,247,0.55); }
.batk .rej-tag {
  position: absolute; top: 3px; right: 4px; padding: 0 3px; border: 1px solid #6e46a8;
  background: #241437; color: #d2b6ff; font-size: 9px; line-height: 13px; font-family: var(--mono);
  letter-spacing: 0.5px;
}

/* Toast */
#toastRoot {
  position: fixed; top: 66px; left: 50%; transform: translateX(-50%);
  z-index: 300; display: flex; flex-direction: column; gap: 6px; align-items: center;
  pointer-events: none;
}
.toast {
  padding: 7px 14px; background: rgba(10,15,22,0.96); border: 2px solid var(--border-bright);
  font-size: 12px; letter-spacing: 0.5px; box-shadow: 0 6px 18px rgba(0,0,0,0.6);
  animation: toastIn 0.18s ease-out;
  max-width: 70vw;
}
.toast.ok { border-color: #2d6b3a; color: #b9e6c2; }
.toast.bad { border-color: #7a2a2a; color: #ffb4ae; }
.toast.info { border-color: #2b4a63; color: #bfdcff; }
.toast.gold { border-color: #6b5320; color: #f0d99a; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* 死亡 */
.death-screen {
  position: fixed; inset: 0; z-index: 400; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px;
  background: radial-gradient(circle at 50% 50%, rgba(60,6,6,0.85), rgba(2,2,4,0.97) 70%);
  animation: fadeIn 0.4s;
  text-align: center;
}
.death-title { font-family: var(--mono); font-size: 54px; font-weight: 900; color: #8b1414; letter-spacing: 12px; text-shadow: 0 0 30px rgba(248,81,73,0.5); }
.death-sub { color: #b98b8b; font-size: 13px; letter-spacing: 3px; }
.death-screen .row .pixel-btn { white-space: nowrap; min-width: 150px; justify-content: center; }

/* 存档槽 */
.save-grid { display: flex; flex-direction: column; gap: 6px; }
.save-row {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px;
  border: 1px solid #232e3d; background: #0b1119;
}
.save-row.active { border-color: #2d5c33; background: #0c1710; }
.save-row .sn { font-family: var(--mono); font-size: 11px; color: var(--accent); width: 34px; }
.save-row .sm { flex: 1; min-width: 0; }
.save-row .sname { font-size: 12px; font-weight: 600; }
.save-row .sinfo { font-size: 10px; color: var(--text-dim); font-family: var(--mono); margin-top: 1px; }
.save-row .sact { display: flex; gap: 4px; }
.save-row.empty .sname { color: #55606f; }
.save-row.empty .sinfo { color: #3f4854; }

/* 技能树 / 专精 */
.spec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
/* 外观 / 装束 */
.skin-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.skin-card { border: 1px solid #26303f; background: #0b1119; padding: 8px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.skin-card.on { border-color: var(--accent); background: #101c28; }
.skin-card.locked { opacity: 0.62; }
.skin-card .sk-pic { width: 100%; height: 108px; display: flex; align-items: flex-end; justify-content: center; background: radial-gradient(circle at 50% 70%, #16202c 0, #0a0f16 70%); border: 1px solid #1b2430; overflow: hidden; }
.skin-card .sk-pic img { width: 96px; height: 96px; image-rendering: pixelated; }
.skin-card .sk-name { font-size: 12.5px; font-weight: 700; margin: 6px 0 3px; }
.skin-card .sk-desc { font-size: 10px; color: var(--text-dim); line-height: 1.45; min-height: 44px; text-align: left; }
.skin-card .sk-lv { font-family: var(--mono); font-size: 10px; color: #8b96a5; margin: 4px 0 6px; }
@media (max-width: 640px) { .skin-grid { grid-template-columns: repeat(2, 1fr); } .skin-card .sk-pic { height: 92px; } .skin-card .sk-pic img { width: 84px; height: 84px; } }
.spec-card { border: 1px solid #26303f; background: #0b1119; padding: 9px; text-align: center; }
.spec-card .si { font-size: 22px; }
.spec-card .sn { font-size: 12.5px; font-weight: 700; margin: 4px 0 2px; }
.spec-card .sd { font-size: 10px; color: var(--text-dim); min-height: 28px; line-height: 1.4; }
.spec-card .sl { font-family: var(--mono); color: var(--accent); font-size: 11px; margin: 4px 0; }
.spec-card .pips { display: flex; justify-content: center; gap: 2px; margin-bottom: 7px; }
.spec-card .pips i { width: 7px; height: 7px; background: #1e2735; }
.spec-card .pips i.on { background: var(--purple); }

/* 动力装甲 */
.pa-layout { display: grid; grid-template-columns: 220px 1fr; gap: 12px; }
.pa-visual {
  border: 1px solid #26303f; background: radial-gradient(circle at 50% 40%, #14212c, #060a0f 80%);
  padding: 10px; display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.pa-figure { position: relative; width: 120px; height: 190px; }
.pa-figure .part {
  position: absolute; border: 1px solid #2c3a4d; background: rgba(30,45,60,0.45);
  font-size: 9px; color: #8b96a5; display: flex; align-items: center; justify-content: center;
}
.pa-figure .part.on { background: rgba(58,140,190,0.28); border-color: #3f7ba6; color: #cfeaf7; }
.pa-energy { width: 100%; }
.pa-parts { display: flex; flex-direction: column; gap: 6px; }
.pa-part-row { display: flex; align-items: center; gap: 8px; padding: 7px; border: 1px solid #1c2531; background: #0b1119; }
.pa-part-row .ppn { width: 44px; font-size: 12px; }
.pa-part-row .ppl { font-family: var(--mono); font-size: 11px; color: var(--accent); width: 42px; }
.pa-part-row .ppe { flex: 1; font-size: 10px; color: var(--text-dim); }
.pa-part-row .ppm { font-family: var(--mono); font-size: 10px; color: #7f8b9c; }

/* 合成 */
.recipe-row { display: flex; gap: 9px; align-items: flex-start; padding: 8px 9px; border: 1px solid #1c2531; background: #0b1119; margin-bottom: 6px; }
.recipe-row.can { border-color: #24512e; background: #0b1610; }
.recipe-row.preview { border-style: dashed; border-color: #4a3a1f; background: #100d08; opacity: .9; }
.recipe-row .rname { font-size: 12.5px; font-weight: 600; }
.recipe-row .rdesc { font-size: 10.5px; color: var(--text-dim); margin-top: 2px; }
.recipe-row .rmats { font-family: var(--mono); font-size: 10.5px; margin-top: 4px; display: flex; flex-wrap: wrap; gap: 8px; }
.recipe-row .rmats b { color: #7f8b9c; font-weight: 400; }
.recipe-row .rmats b.ok { color: var(--green); }
.recipe-row .rmats b.no { color: var(--red); }
.recipe-row .wb-qty { display: flex; align-items: center; gap: 7px; font-size: 10.5px; flex-wrap: wrap; }
.recipe-row .wb-batch-btn { padding: 2px 7px; min-width: 30px; }
.recipe-row .wb-batch-btn.active { border-color: #58a6ff; background: #10243a; color: #dcecff; }
.recipe-row .wb-all { color: #ffd76a; border-color: #6b5a22; }
.recipe-row .wb-all.active { background: #2b2410; border-color: #ffd76a; }
.recipe-row .wb-select {
  font-family: var(--mono); font-size: 10.5px; color: var(--text);
  background: #060a0f; border: 1px solid #3d4c60; padding: 1px 4px; outline: none; cursor: pointer;
}
.recipe-row .wb-select:hover { border-color: #58a6ff; }

/* 杂项 */
.hint { font-size: 10.5px; color: #6f7c8d; line-height: 1.6; }
.divider { height: 1px; background: #1c2531; margin: 9px 0; }
.kbd { display: inline-block; min-width: 16px; padding: 0 4px; border: 1px solid #3d4c60; font-family: var(--mono); font-size: 10px; color: #b7c3d2; background: #0a0f16; }
.os-bar { display: flex; gap: 8px; align-items: center; }

/* 受伤抖屏 / 混沌模式氛围 */
body.hit-shake { animation: hitShake 0.26s steps(6) 1; }
@keyframes hitShake {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-5px, 2px); }
  40% { transform: translate(4px, -3px); }
  60% { transform: translate(-3px, -1px); }
  80% { transform: translate(3px, 2px); }
  100% { transform: translate(0, 0); }
}
body.chaos-mode { filter: hue-rotate(-12deg) saturate(1.15) contrast(1.06); }
body.chaos-mode #vignette { box-shadow: inset 0 0 120px 40px rgba(150,25,45,0.55); }
body.chaos-mode .topbar { border-bottom-color: #5a1a2a; }
body.chaos-mode .scene-canvas { box-shadow: 0 0 20px rgba(200,40,60,0.35); }

@media (max-width: 1240px) {
  .layout { grid-template-columns: 268px minmax(460px, 1fr) 278px; gap: 8px; padding: 8px; }
  .title-logo { font-size: 52px; }
}
@media (max-width: 1040px) {
  .layout { grid-template-columns: 250px minmax(420px, 1fr); }
  .layout > .panel.right { display: none; }
}
/* 极窄窗口的紧凑模式：只保留场景 + 日志 + 操作栏，侧栏数据走模态框 */
@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 6px; }
  .layout > .panel { display: none; }
  .topbar { gap: 8px; padding: 0 8px; }
  .topbar .brand small, .tb-sep, .exp-wrap, .tb-actions .pixel-btn.tiny { display: none; }
  .tb-player { min-width: 0; gap: 6px; }
  /* 紧凑模式：仍按高度驱动保持 16:9，并给日志/操作栏留出空间 */
  :root { --vp-h: clamp(180px, min(54vh, 52vw), 520px); }
  .log-panel { min-height: 0; }
  .act-btn { padding: 7px 4px 6px; }
  .act-btn .ico { font-size: 15px; }
}
@media (max-height: 760px) {
  .battle-log { height: 84px; }
}
/* 战斗弹窗在窄屏要同时容纳舞台、日志和两行动作，压缩舞台高度避免动作栏被弹窗底边裁掉 */
@media (max-width: 900px) {
  .modal.battle .battle-stage canvas { aspect-ratio: 640 / 250; }
  .modal.battle .battle-log { height: 68px; }
  .modal.battle .battle-actions { padding: 7px 9px 9px; gap: 5px; }
  .modal.battle .batk { padding: 7px 5px; }
}

/* 手机竖屏（<=640px）：藏 logo、压缩顶栏、按钮缩一档，保证 10 个操作键都点得到 */
/* ------------------------------------------------------------------------
   窄屏 / 手机：左右两栏默认隐藏，但可以通过「状态」「装备」两个键把同一份
   面板 DOM 铺成全屏抽屉（数据仍由 refresh() 实时更新，不存在两份状态）。
   顶栏的音效/难度/帮助/返回标题 收进「≡ 菜单」。
   ------------------------------------------------------------------------ */
.mobile-only { display: none; }
.tb-menu-btn { display: none; }

@media (max-width: 900px) {
  .act-btn.mobile-only { display: block; }

  .drawer-mask { position: fixed; inset: 0; background: rgba(3,5,9,.78); z-index: 118; }
  .layout > .panel.drawer-open {
    display: flex;
    position: fixed; left: 8px; right: 8px; top: 56px; bottom: 62px;
    z-index: 120; margin: 0; width: auto; max-width: none;
    box-shadow: 0 0 0 3px #000, 0 12px 44px rgba(0,0,0,.8);
  }
  .panel.drawer-open .panel-title { padding-right: 46px; }
  .drawer-close {
    position: absolute; right: 6px; top: 4px; z-index: 6;
    width: 32px; height: 26px; background: #2a1113; color: #ff9b96;
    border: 2px solid #6b2b2b; font-size: 14px; font-weight: 700; cursor: pointer;
  }
  .drawer-hint { margin: 0 0 8px; color: #9fb0c3; }

  .tb-menu-btn { display: inline-block; }
  .tb-actions {
    position: fixed; right: 8px; top: 52px; z-index: 190; display: none;
    flex-direction: column; gap: 6px; padding: 8px;
    background: #0b1119; border: 2px solid var(--border-bright);
    box-shadow: 0 10px 30px rgba(0,0,0,.8);
  }
  body.tb-menu-open .tb-actions { display: flex; }
  /* 顶栏紧凑模式里 .topbar .tb-actions .pixel-btn.tiny 被隐藏，这里要用同等权重重新点亮 */
  body.tb-menu-open .topbar .tb-actions .pixel-btn.tiny { display: block; width: 100%; }
}

/* 手机竖屏（<=640px）时 #screen-main / .topbar 都开了 overflow:hidden，
   下拉菜单若还挂在顶栏里会被裁掉；JS 会把它挪到 body 上，用这套独立样式。 */
@media (max-width: 640px) {
  body > .tb-actions-float {
    display: none;
    position: fixed; right: 8px; top: 52px; z-index: 190;
    flex-direction: column; gap: 6px; padding: 8px;
    background: #0b1119; border: 2px solid var(--border-bright);
    box-shadow: 0 10px 30px rgba(0,0,0,.8);
  }
  body.tb-menu-open > .tb-actions-float { display: flex; }
  body > .tb-actions-float .pixel-btn.tiny { display: block; width: 100%; }
}

/* 手机竖屏（<=640px）：藏 logo、压缩顶栏、按钮缩一档，保证操作键都点得到 */
@media (max-width: 640px) {
  html, body { width: 100%; max-width: 100%; overflow-x: hidden; }
  /* grid 子项的 min-width:auto 会被顶栏内容顶宽，导致整页横向溢出（手机上看就是右边被切掉） */
  #screen-main { grid-template-rows: 48px 1fr; grid-template-columns: minmax(0, 1fr); overflow: hidden; }
  .topbar { gap: 5px; padding: 0 6px; min-width: 0; overflow: hidden; }
  .topbar > * { flex-shrink: 0; }
  .topbar .brand { display: none; }
  .tb-player { min-width: 0; gap: 5px; flex-shrink: 1; }
  .tb-name { font-size: 12px; max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .rep-hex-sm { width: 26px; height: 30px; font-size: 10px; }
  .rep-hex-sm > span { font-size: 10px; }
  .tb-item { font-size: 11px; gap: 3px; white-space: nowrap; }
  .tb-item .ico { font-size: 12px; }
  .tb-item .muted { display: none; }   /* 隐藏“铜币 / 行动点”字样，只留数字 */
  .tb-spacer { flex: 1; min-width: 0; }
  .layout { min-width: 0; }
  .center-col { min-width: 0; }
  /* 手机屏幕小：按钮缩一档、隐藏副标题，5 列 × 2 行仍完整可见 */
  .action-bar { grid-template-columns: repeat(5, 1fr); gap: 4px; }
  .act-btn { padding: 5px 2px 4px; }
  .act-btn .ico { font-size: 13px; }
  .act-btn .lb { font-size: 10px; letter-spacing: 0; margin-top: 1px; }
  .act-btn .sub { display: none; }
  :root { --vp-h: clamp(150px, 52vw, 300px); }
  /* 场景角落信息在 390 宽容易挤在一起：缩小字号 + 时间不换行 */
  .viewport-top { padding: 5px 6px; }
  .loc-name { font-size: 12px; letter-spacing: 1px; }
  .loc-risk { font-size: 9px; margin-left: 5px; padding: 1px 4px; }
  .loc-desc { font-size: 10px; max-width: 210px; margin-top: 2px; }
  .viewport-time { font-size: 10px; white-space: nowrap; padding: 1px 4px; }
  /* 弹窗吃满屏宽，物品格缩一档 */
  .modal, .modal.wide, .modal.narrow, .modal.battle { width: 96vw; max-height: 92vh; }
  .item-grid { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
  .battle-actions { grid-template-columns: repeat(2, 1fr) !important; }
  .battle-hud { padding: 5px 6px; gap: 6px; }
  .bname { font-size: 11px; gap: 3px; }
  .bside.right .bname { padding-right: 2px; gap: 3px; }
  .bhp { height: 10px; margin-top: 3px; }
  .bhp .n { font-size: 9px; right: 3px; }
  .bside.right .bhp .n { left: 3px; }
  .bstatus { font-size: 9px; gap: 3px 6px; margin-top: 2px; max-height: 30px; overflow: hidden; }
  .battle-log { height: 96px; font-size: 11px; padding: 6px 8px; }
  .batk { padding: 7px 5px; }
  .batk .k { font-size: 11.5px; }
  .batk .d { font-size: 9px; }
  .log-panel .log-body { font-size: 11px; }
  /* 委托金额的“（基础 … · 魅力…）”在 390 宽会把行撑成三行；段落标题已显示魅力等级与加成 */
  .bounty-base { display: none; }
  * { -webkit-tap-highlight-color: transparent; }
}

/* ==========================================================================
   背包分类标签 / 重量 / 品质色点
   ========================================================================== */
.bag-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.bag-tab {
  font-family: var(--mono); font-size: 11px; letter-spacing: 1px; padding: 4px 8px; cursor: pointer;
  background: #0a0e14; border: 1px solid #1e2836; color: #8b96a5; box-shadow: none;
}
.bag-tab:hover { border-color: var(--accent); color: #cfd8e3; }
.bag-tab.on { border-color: var(--accent); background: #12202f; color: #fff; }
.item-tile .wkg { font-family: var(--mono); font-size: 9px; color: #8b96a5; }
.item-tile .tier-dot {
  position: absolute; left: 3px; bottom: 3px; width: 5px; height: 5px; display: block; opacity: .75;
}

/* ==========================================================================
   长线探索（海关）
   ========================================================================== */
.modal.long { width: min(860px, 96vw); }
.lx-wrap { display: block; }
.lx-body { display: flex; flex-direction: column; gap: 8px; max-height: 68vh; overflow-y: auto; padding-right: 3px; }

.lx-status { border: 1px solid #1e2836; background: #080c12; padding: 7px 9px; }
.lx-loc { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 13px; }
.lx-loc .code, .lx-nb .code, .lx-axis { font-family: var(--mono); font-size: 10px; color: #6e7885; }
.lx-loc .nm { font-size: 14px; letter-spacing: 1px; color: #fff; }
.lx-loc .tag { font-family: var(--mono); font-size: 10px; border: 1px solid #1e2836; padding: 1px 5px; }
.lx-loc .tag.phase { color: var(--gold); border-color: #4a3a16; }
.lx-bars { display: grid; gap: 4px; margin-top: 6px; }
.lx-bar { display: flex; align-items: center; gap: 6px; position: relative; }
.lx-bar span { font-size: 10px; color: #8b96a5; width: 58px; flex: none; }
.lx-bar i { display: block; height: 7px; background: #12202f; flex: 1; order: 2; }
.lx-bar b { font-size: 10px; color: #cfd8e3; width: 84px; text-align: right; flex: none; order: 3; font-weight: 400; }
.lx-meta { font-family: var(--mono); font-size: 10.5px; color: #8b96a5; margin-top: 5px; line-height: 1.5; }

.lx-mapwrap { border: 1px solid #1e2836; background: #06090d; padding: 6px; overflow-x: auto; }
.lx-map { display: grid; gap: 2px; min-width: 340px; }
.lx-axis { font-size: 9px; color: #5a6472; display: flex; align-items: center; justify-content: center; }
.lx-cell {
  aspect-ratio: 1 / 1; min-height: 20px; border: 1px solid #17202c; background: #0a0e14;
  display: flex; align-items: center; justify-content: center; font-family: var(--mono);
  font-size: 9px; color: #8b96a5; cursor: default;
}
.lx-cell.empty { border: none; background: transparent; }
.lx-cell.seen { color: #5a6472; border-color: #22303f; }
.lx-cell.nb { border-color: #2b4a6b; background: #0d1622; color: #9ecbff; }
.lx-cell.ext { box-shadow: inset 0 0 0 1px #6b5320; color: var(--gold); }
.lx-cell.cur { background: #123048; border-color: var(--accent); color: #fff; font-size: 9px; }
.lx-cell.spawn { color: #d9a441; }

.lx-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.lx-btn {
  flex: 1 1 150px; display: flex; flex-direction: column; gap: 2px; cursor: pointer;
  background: #0a0e14; border: 1px solid #1e2836; color: #cfd8e3; padding: 7px 9px; text-align: left;
  font-family: var(--mono); font-size: 12px;
}
.lx-btn:hover { border-color: var(--accent); background: #101a26; }
.lx-btn.primary { border-color: var(--accent); background: #12202f; }
.lx-btn i { font-style: normal; font-size: 10px; color: #8b96a5; }

.lx-neigh { border: 1px solid #1e2836; padding: 7px 9px; background: #080c12; }
.lx-neigh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 5px; margin-top: 5px; }
.lx-nb {
  display: flex; align-items: center; gap: 5px; cursor: pointer; padding: 5px 7px;
  background: #0a0e14; border: 1px solid #1e2836; color: #cfd8e3; text-align: left; min-width: 0;
}
.lx-nb .nm { font-size: 11.5px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lx-nb .tag { font-family: var(--mono); font-size: 9px; }
.lx-nb .star { font-family: var(--mono); font-size: 9px; color: var(--gold); flex: none; }
.lx-nb:hover:not(:disabled) { border-color: var(--accent); background: #101a26; }
.lx-nb.off { opacity: .42; cursor: not-allowed; }

.lx-pack { border: 1px solid #1e2836; padding: 7px 9px; background: #080c12; }
.lx-pack-list { display: flex; flex-direction: column; gap: 4px; margin-top: 5px; max-height: 190px; overflow-y: auto; }
.lx-pack-row { display: flex; align-items: center; gap: 6px; font-size: 11.5px; border-bottom: 1px dashed #17202c; padding-bottom: 3px; }
.lx-pack-row img { width: 22px; height: 22px; image-rendering: pixelated; object-fit: contain; flex: none; }
.lx-pack-row .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lx-pack-row .kg { font-size: 10px; color: #8b96a5; flex: none; }
.lx-pack-row .acts { display: flex; gap: 3px; flex: none; }
.lx-pack-row .acts .mini {
  font-family: var(--mono); font-size: 10px; padding: 1px 6px; cursor: pointer;
  background: #0a0e14; border: 1px solid #2b4a6b; color: #9ecbff;
}
.lx-pack-row .acts .mini.bad { border-color: #4a2020; color: #ffb4ae; }
.lx-pack-row .acts .mini:hover { background: #16202c; }

.lx-log { border: 1px solid #1e2836; background: #06090d; padding: 6px 8px; height: 140px; overflow-y: auto; font-family: var(--mono); font-size: 11px; line-height: 1.6; }
.log-line { color: #8b96a5; }
.log-line.bold { color: #cfd8e3; }
.log-line.green { color: #7ee787; }
.log-line.red { color: #ffb4ae; }
.log-line.blue { color: #9ecbff; }
.log-line.gold { color: var(--gold); }
.log-line.dim { color: #5a6472; }

.lx-result { border: 1px solid #1e2836; padding: 8px 10px; font-size: 12px; line-height: 1.6; }
.lx-result.ok { border-color: #2d5c33; background: #0b1409; color: #7ee787; }
.lx-result.bad { border-color: #6b2b2b; background: #140a0a; color: #ffb4ae; }

.lx-loadout { display: flex; flex-direction: column; gap: 3px; max-height: 42vh; overflow-y: auto; border: 1px solid #1e2836; padding: 5px 7px; background: #080c12; }
.lx-ld-row { display: flex; align-items: center; gap: 6px; font-size: 12px; padding: 2px 0; border-bottom: 1px dashed #17202c; cursor: pointer; }
.lx-ld-row input { width: 15px; height: 15px; flex: none; }
.lx-ld-row img { width: 22px; height: 22px; image-rendering: pixelated; object-fit: contain; flex: none; }
.lx-ld-row .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lx-ld-row .kg { font-family: var(--mono); font-size: 10px; color: #8b96a5; flex: none; }
.lx-ld-row .cat { font-family: var(--mono); font-size: 9px; color: #6e7885; width: 38px; text-align: right; flex: none; }
.lx-weight { font-family: var(--mono); font-size: 11px; color: #cfd8e3; margin: 6px 0; }
.lx-ld-hint { font-size: 11px; line-height: 1.55; color: #8b96a5; margin-bottom: 6px; }
.lx-ld-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.lx-ld-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.lx-ld-tab {
  display: flex; align-items: center; gap: 5px; cursor: pointer;
  background: #0a0e14; border: 1px solid #1e2836; color: #8b96a5;
  padding: 5px 8px; font-family: var(--mono); font-size: 11px;
}
.lx-ld-tab i { font-style: normal; font-size: 9px; color: #5a6472; border-left: 1px solid #1e2836; padding-left: 5px; }
.lx-ld-tab.on { border-color: var(--accent); background: #12202f; color: #fff; }
.lx-ld-tab.on i { color: #9ecbff; }
.lx-ld-tab.match { border-color: #3fb950; box-shadow: 0 0 0 1px rgba(63,185,80,.25), 0 0 8px rgba(63,185,80,.18); }
.lx-ld-grid {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px;
  max-height: 44vh; overflow-y: auto; border: 1px solid #1e2836; background: #080c12;
  padding: 6px;
}
.lx-ld-grid .lx-ld-empty { grid-column: 1 / -1; padding: 18px 8px; text-align: center; color: #6e7885; font-size: 12px; }
.lx-ld-tile {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-width: 0; min-height: 100px; padding: 18px 5px 5px; cursor: pointer;
  background: #0a0e14; border: 1px solid #1e2836;
}
.lx-ld-tile:hover { border-color: #2b4a6b; background: #0d141d; }
.lx-ld-tile.on { border-color: var(--accent); background: #101c29; box-shadow: inset 0 0 0 1px rgba(88,166,255,.18); }
.lx-ld-tile.match { border-color: #3fb950; background: #0b1a10; box-shadow: inset 0 0 0 1px rgba(63,185,80,.4), 0 0 10px rgba(63,185,80,.22); }
.lx-ld-tile.match.on { background: #0d2214; }
.lx-ld-tile input[type=checkbox] { position: absolute; left: 5px; top: 4px; width: 14px; height: 14px; accent-color: #58a6ff; }
.lx-ld-tile .lx-stack { position: absolute; right: 5px; top: 4px; font-family: var(--mono); font-size: 9px; color: var(--gold); }
.lx-ld-tile img { width: 34px; height: 34px; object-fit: contain; image-rendering: pixelated; flex: none; }
.lx-ld-tile .nm { width: 100%; font-size: 10.5px; line-height: 1.25; color: #cfd8e3; text-align: center; word-break: break-all; }
.lx-ld-tile .meta { display: flex; align-items: center; justify-content: space-between; gap: 2px; width: 100%; font-family: var(--mono); font-size: 8.5px; color: #6e7885; }
.lx-ld-tile .meta i { font-style: normal; color: #8b96a5; }
.lx-ld-tile .meta .kg { color: #8b96a5; white-space: nowrap; }
.lx-ld-tile .lx-carry { font-style: normal; color: var(--gold); white-space: nowrap; }
.lx-ld-tile .lx-qty { width: 100%; display: none; align-items: center; gap: 3px; margin-top: 2px; }
.lx-ld-tile .lx-qty span { font-family: var(--mono); font-size: 8px; color: #6e7885; flex: none; }
.lx-ld-tile .lx-qty input { flex: 1; min-width: 0; height: 12px; accent-color: #3fb950; }
.lx-ld-tile .lx-qty b { font-family: var(--mono); font-size: 9px; color: var(--gold); width: 20px; text-align: right; flex: none; }
.lx-ld-tile .lx-ammo-mark { min-height: 11px; font-family: var(--mono); font-size: 8.5px; color: #3fb950; line-height: 1.1; }
.lx-ld-tools { display: flex; gap: 5px; flex-wrap: wrap; margin: 6px 0; }
.lx-ammo-hint { font-family: var(--mono); font-size: 10.5px; line-height: 1.5; color: #3fb950; margin-top: 6px; }
@media (max-width: 700px) {
  .lx-ld-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); max-height: 40vh; }
  .lx-ld-tile { min-height: 94px; }
}

@media (max-width: 700px) {
  .modal.long { width: 96vw; }
  .lx-body { max-height: 68vh; }
  .lx-map { min-width: 300px; }
  .lx-cell { min-height: 17px; font-size: 8px; }
  .lx-bar span { width: 50px; }
  .lx-bar b { width: 70px; }
  .lx-neigh-grid { grid-template-columns: 1fr 1fr; }
  .lx-btn { flex: 1 1 100%; }
  .lx-log { height: 118px; }
  .lx-loadout { max-height: 38vh; }
}
/* 修正：flex 列默认会压缩地图块，导致 6 行只露出 2 行；地图改为固定高度行、不参与收缩 */
.lx-body > * { flex: 0 0 auto; }
.lx-cell { aspect-ratio: auto; height: 24px; min-height: 0; }
/* 长线探索入口：金色边框与图标，和普通探索区分 */
.act-btn.long { border-color: #4a3a16; }
.act-btn.long .ico { color: var(--gold); }
/* 长线探索场景条（工厂外/房屋外/房屋内/路口/野区） */
.lx-scene {
  height: 96px; border: 1px solid #1e2836; background-color: #06090d;
  background-size: cover; background-position: center; image-rendering: pixelated;
  position: relative; overflow: hidden;
}
.lx-scene::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(6,9,13,.72) 0%, rgba(6,9,13,.18) 55%, rgba(6,9,13,.62) 100%);
}
.lx-scene .scene-tag {
  position: absolute; left: 8px; bottom: 8px; z-index: 2;
  font-family: var(--mono); font-size: 12px; letter-spacing: 2px; color: #fff;
  background: rgba(6,9,13,.72); border: 1px solid #2b4a6b; padding: 2px 8px;
}
.lx-scene .scene-code {
  position: absolute; right: 8px; top: 8px; z-index: 2; font-size: 10px; color: #9ecbff;
  background: rgba(6,9,13,.7); padding: 1px 5px;
}

/* 局部视野：5×5，近处可点直达；远处名称用？？？，撤离点绿底金字 */
.lx-map.local { position: relative; min-width: 0; grid-auto-rows: 54px; }
.lx-cell.local {
  height: auto; min-height: 46px; padding: 3px 4px; gap: 2px;
  flex-direction: column; align-items: flex-start; justify-content: center; text-align: left;
}
.lx-cell.local b { font-family: var(--mono); font-size: 11px; color: #9ecbff; line-height: 1; }
.lx-cell.local span { font-size: 10.5px; line-height: 1.25; color: #cfd8e3; word-break: break-all; }
.lx-cell.local.cur b { color: #fff; font-size: 16px; text-shadow: 0 0 6px #fff, 0 0 12px rgba(255,255,255,.45); }
.lx-cell.local.cur span { color: #fff; }
.lx-cell.local.far { border-style: dashed; border-color: #1b2531; background: #070b10; }
.lx-cell.local.far b { color: #4b5868; }
.lx-cell.local.far span { color: #5a6472; }
.lx-cell.local i { font-style: normal; font-family: var(--mono); font-size: 10px; color: var(--gold); align-self: flex-end; }
.lx-cell.local.empty { border: none; background: #04070a; }
/* 撤离格：不管是不是？？？，都保持绿底金字 */
.lx-cell.local.ext {
  background: #0d2a17; border-color: #3fb950;
  box-shadow: inset 0 0 0 1px #3fb950, 0 0 9px rgba(63,185,80,.25);
  color: var(--gold);
}
.lx-cell.local.ext span, .lx-cell.local.ext b, .lx-cell.local.ext i { color: var(--gold); }
.lx-cell.local.ext.cur { background: #124122; }
.lx-cell.local.ext.cur b { color: #fff; }
/* 地图四边：撤离点方向的小绿边 */
.lx-ext-edge {
  position: absolute; z-index: 3; pointer-events: none; background: #3fb950;
  box-shadow: 0 0 8px #3fb950, 0 0 14px rgba(63,185,80,.45);
}
.lx-ext-edge.top { left: 30px; right: 6px; top: 0; height: 3px; }
.lx-ext-edge.bottom { left: 30px; right: 6px; bottom: 0; height: 3px; }
.lx-ext-edge.left { top: 26px; bottom: 6px; left: 0; width: 3px; }
.lx-ext-edge.right { top: 26px; bottom: 6px; right: 0; width: 3px; }

@media (max-width: 700px) {
  .lx-scene { height: 58px; }
  .lx-scene .scene-tag { font-size: 11px; letter-spacing: 1px; }
  .lx-map.local { min-width: 0 !important; grid-auto-rows: 34px; grid-template-columns: 20px repeat(5, minmax(0, 1fr)) !important; }
  .lx-ld-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lx-cell.local { min-height: 30px; padding: 1px 3px; }
  .lx-cell.local b { font-size: 9px; }
  .lx-cell.local span { font-size: 8.5px; line-height: 1.15; }
  .lx-cell.local.cur b { font-size: 13px; }
}
/* 局部视野空格：淡虚线勾出 5×5 窗口，避免看起来像缺块 */
.lx-cell.local.empty { border: 1px dashed #16202b !important; background: transparent !important; }
.lx-cell.local { background: #070c12; border: 1px solid #141d27; }
.lx-cell.local.cur { background: #123048; }
.lx-cell.local.nb { background: #0a121b; }
.lx-cell.local.empty { background: #0b111a !important; border: 1px dashed #24303d !important; }
/* 中途退出确认：扣罚清单 */
.lx-abandon-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; font-size: 13px; line-height: 1.5; color: #cfd8e3; }
.lx-abandon-list b { color: #f85149; }
/* 地点阶段进度条：进入前 → 进入时 → 退出后 */
.lx-phases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin: 0 0 4px; }
.lx-phase {
  border: 1px solid #1e2836; border-bottom: 3px solid #22303f; background: #070c12;
  padding: 4px 6px; display: flex; flex-direction: column; gap: 1px; min-width: 0;
}
.lx-phase .num { font-family: var(--mono); font-size: 9px; color: #5a6472; }
.lx-phase b { font-size: 12px; color: #8b96a5; letter-spacing: 0; }
.lx-phase i { font-style: normal; font-size: 9px; color: #5a6472; line-height: 1.25; }
.lx-phase.done { border-color: #1f5a33; border-bottom-color: #3fb950; background: #07120b; }
.lx-phase.done b { color: #7ee787; }
.lx-phase.cur { border-color: var(--gold); border-bottom-color: var(--gold); background: #171207; }
.lx-phase.cur b { color: #fff; }
.lx-phase.cur .num { color: var(--gold); }
.lx-phase.todo { opacity: .66; }
.lx-phase-tip { font-size: 11px; color: #8b96a5; border-left: 2px solid #2b4a6b; padding-left: 6px; margin: 0 0 8px; line-height: 1.4; }
.lx-btn.off { opacity: .45; cursor: not-allowed; }
.lx-btn.off:hover { border-color: #2a3543; background: #0a0f14; }
.lx-cell.local.go { cursor: pointer; border-color: #2b4a6b; }
.lx-cell.local.go:hover { background: #123048; border-color: var(--accent); }
.lx-cell.local.blocked { cursor: not-allowed; opacity: .72; border-style: dashed; }
@media (max-width: 700px) {
  .lx-phase b { font-size: 10px; }
  .lx-phase i { display: none; }
  .lx-phase-tip { font-size: 10px; }
}
/* 长线探索：桌面双栏（左地图行动 / 右背包日志） */
.lx-body { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(250px, .8fr); grid-auto-rows: min-content; align-items: start; }
.lx-body > .lx-scene,
.lx-body > .lx-status,
.lx-body > .lx-phases,
.lx-body > .lx-phase-tip,
.lx-body > .lx-result,
.lx-body > .lx-body-close { grid-column: 1 / -1; }
.lx-work, .lx-side { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.lx-side .lx-log { max-height: 300px; }
@media (max-width: 860px) {
  .lx-body { display: flex; flex-direction: column; }
  .lx-side .lx-log { max-height: 180px; }
}
.lx-side .lx-pack-list { max-height: 160px; }
.lx-side .lx-log { height: 150px; max-height: 150px; flex: 0 0 auto; }
.lx-phase.skipped { opacity: .7; border-style: dashed; border-bottom-width: 1px; }
.lx-phase.skipped b { color: #8b96a5; }
@media (min-width: 861px) {
  .lx-scene { height: 84px; }
  .lx-map.local { grid-auto-rows: 48px; }
  .lx-side .lx-log { height: 130px; max-height: 130px; }
}
/* 长线：常驻生存状态框（高亮） */
.lx-vitals {
  border: 1px solid #6b5320;
  background: linear-gradient(180deg, #171207, #0c0b07);
  box-shadow: inset 0 0 0 1px rgba(240, 217, 154, .08), 0 0 14px rgba(240, 200, 120, .09);
  padding: 6px 8px;
}
.lx-vitals-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.lx-vitals-head span:first-child { color: #f0d99a; font-size: 12px; letter-spacing: 1px; }
.lx-vitals-head .live { color: #8b96a5; font-size: 9px; font-family: var(--mono); }
.lx-vitals-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.lx-vital { min-width: 0; }
.lx-vital .top { display: flex; justify-content: space-between; gap: 3px; align-items: baseline; }
.lx-vital .nm { font-size: 10px; color: #c9d1d9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lx-vital b { font-size: 9px; color: #8b96a5; white-space: nowrap; }
.lx-vital .bar { height: 4px; background: #1b2430; margin-top: 2px; }
.lx-vital .bar i { display: block; height: 100%; }
.lx-vital.warn .nm, .lx-vital.warn b { color: #ffb4ae; }
.lx-vital.warn { outline: 1px solid #7a2a2a; outline-offset: 2px; }
.lx-vital-fx { margin-top: 4px; font-size: 9px; color: #a371f7; }
.lx-mobile-status-btn { display: none !important; }
.lx-body > .lx-vitals { grid-column: 1 / -1; }
@media (max-width: 900px) {
  .lx-mobile-status-btn { display: block !important; }
}
@media (max-width: 700px) {
  .lx-vitals-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 5px; }
  .lx-vitals-head span:first-child { font-size: 11px; }
  .lx-vital .nm { font-size: 9px; }
}
@media (min-width: 861px) {
  .lx-body { max-height: 72vh; }
  .lx-scene { height: 76px; }
  .lx-map.local { grid-auto-rows: 44px; }
}
/* 手机长线：5×5 地图与“撤离/进入”双按钮必须同屏；按钮并排、地图行略抬高、正文放宽到 76vh */
@media (max-width: 700px) {
  .lx-body { max-height: 80vh; }
  .lx-actions { flex-wrap: nowrap; }
  .lx-actions .lx-btn { flex: 1 1 0; min-width: 0; }
  .lx-actions .lx-btn i { font-size: 9px; line-height: 1.2; }
  .lx-map.local { grid-auto-rows: 34px; }
  .lx-cell.local { min-height: 30px; }
}
/* 桌面长线：左栏生存状态框高亮，提示“这份数据仍在实时更新” */
@media (min-width: 901px) {
  body.longexp-active .panel.left {
    border-color: #6b5320;
    box-shadow: 0 0 0 2px rgba(107, 83, 32, .35), 0 0 24px rgba(240, 200, 120, .16);
  }
  body.longexp-active .panel.left .panel-title span:first-child { color: #f0d99a; }
  body.longexp-active .panel.left .panel-title::after {
    content: "实时";
    margin-left: auto; margin-right: 8px;
    font-size: 9px; letter-spacing: 1px; color: #7ee787;
    border: 1px solid #1f5a33; padding: 1px 5px;
  }
}
/* 手机端长线“状态”弹窗 */
.lx-status-sheet { padding: 2px 2px 6px; }
.lx-status-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; }
.lx-status-grid .stat-row { min-width: 0; }
.lx-status-meta { margin-top: 10px; padding: 7px 9px; border: 1px solid #1e2836; background: #080c12; color: #8b96a5; font-size: 11px; line-height: 1.7; }
@media (max-width: 480px) {
  .lx-status-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   账号 / 账号云存档（js/account.js）
   ========================================================================== */
.modal.account { width: min(620px, 96vw); }
.ac-loading { color: #8b96a5; font-size: 12px; padding: 18px 0; text-align: center; letter-spacing: 1px; }
.ac-head { display: flex; align-items: center; gap: 8px; color: #8b96a5; font-size: 12px; margin-bottom: 10px; }
.ac-dot { width: 7px; height: 7px; background: #3fb950; box-shadow: 0 0 6px #3fb950; flex: none; }
.ac-note { border-left: 2px solid #58a6ff; background: #0d1b28; color: #a9c7e4; font-size: 12px; line-height: 1.7; padding: 8px 10px; margin: 8px 0; white-space: pre-wrap; }
.ac-note.bad { border-color: #f85149; background: #211417; color: #ffb3b3; }
.ac-pending { border: 1px solid #6e5b27; background: #1d1a10; color: #e7d39b; font-size: 12px; line-height: 1.65; padding: 9px 11px; margin-bottom: 10px; }
.ac-pending b { display: block; color: #ffd76a; margin-bottom: 3px; font-weight: 400; }
.ac-tabs { display: flex; gap: 6px; margin: 10px 0 12px; border-bottom: 1px solid #2a3a4d; padding-bottom: 7px; }
.ac-tab { background: #0d151d; border: 1px solid #2a3a4d; color: #8b96a5; padding: 7px 18px; font: 12px var(--ui-font); cursor: pointer; }
.ac-tab.active { border-color: #58a6ff; color: #dbeaff; background: #122436; }
.ac-form { display: flex; flex-direction: column; gap: 5px; }
.ac-form label { color: #7d8ea3; font-size: 11px; margin-top: 4px; }
.ac-input { width: 100%; background: #091018; color: #c9d6e4; border: 1px solid #2a3a4d; padding: 9px 10px; font: 13px/1.4 var(--ui-font); outline: none; }
.ac-input:focus { border-color: #58a6ff; box-shadow: 0 0 0 1px #58a6ff55; }
.ac-input::placeholder { color: #4d6178; }
.ac-help { color: #6f8298; font-size: 11px; line-height: 1.65; margin: 4px 0 7px; }
.ac-submit { width: 100%; margin-top: 3px; }
.ac-cool { display: none; color: #ffd76a; font-size: 11px; text-align: center; padding: 4px 0; }
.ac-msg { min-height: 18px; color: #8b96a5; font-size: 12px; line-height: 1.55; margin-top: 5px; white-space: pre-wrap; }
.ac-msg.bad { color: #f85149; }
.ac-cloud-info { border-top: 1px dashed #223040; color: #65788e; font-size: 11px; line-height: 1.6; margin-top: 14px; padding-top: 10px; }
.ac-profile { display: flex; align-items: center; gap: 10px; border: 1px solid #2a3a4d; background: linear-gradient(90deg,#101f2e,#0d151d); padding: 10px; margin-bottom: 10px; }
.ac-avatar { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid #3b5878; background: #0b1722; font-size: 19px; flex: none; }
.ac-profile-main { flex: 1; min-width: 0; }
.ac-name { color: #ffd76a; font-size: 16px; letter-spacing: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-meta { color: #7d8ea3; font-size: 11px; margin-top: 3px; }
.ac-savebox { border: 1px solid #223040; background: #0a121a; padding: 10px 11px; margin: 10px 0; }
.ac-savebox-title { color: #8b96a5; font-size: 11px; letter-spacing: 1px; margin-bottom: 5px; }
.ac-save-meta { color: #c9d6e4; font-size: 12px; line-height: 1.7; }
.ac-save-meta b { color: #ffd76a; font-weight: 400; }
.ac-history { margin-top: 8px; }
.ac-history-title { color: #8b96a5; font-size: 10.5px; letter-spacing: 1px; margin-bottom: 4px; }
.ac-history-row {
  display: flex; align-items: center; gap: 8px; padding: 3px 0;
  border-top: 1px dashed #1c2a38; font-family: var(--mono); font-size: 10.5px; color: #9fb0c2;
}
.ac-history-idx { color: #5f6f80; min-width: 42px; }
.ac-history-when { min-width: 132px; }
.ac-history-size { min-width: 58px; color: #7f8b9c; }
.ac-history-tag { color: #3fb950; }
.ac-history-row button { margin-left: auto; }
.ac-btns { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 10px; }
.ac-btns .pixel-btn { flex: 1 1 auto; min-width: 132px; }
@media (max-width: 640px) {
  .modal.account { width: 96vw; }
  .ac-profile { flex-wrap: wrap; }
  .ac-profile-main { flex: 1 1 60%; }
  .ac-btns .pixel-btn { flex: 1 1 100%; }
  .ac-tab { flex: 1; }
}

/* ==========================================================================
   藏身处（js/ui.js · 模块升级 / 被动 / 预留位）
   ========================================================================== */
.modal.ho-modal { width: min(980px, 96vw); }
.ho { display: flex; flex-direction: column; gap: 12px; position: relative; }
.ho-banner {
  position: relative; height: 154px; overflow: hidden; border: 2px solid #26303f;
  background: #070b10; flex: none;
}
.ho-banner .ho-scene {
  width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated;
  display: block; filter: brightness(.9) saturate(.95); position: absolute; inset: 0;
}
.ho-hero {
  position: absolute; left: 16px; bottom: 12px; z-index: 3;
  display: flex; align-items: flex-end; gap: 8px; padding: 7px 9px 6px;
  background: linear-gradient(180deg, rgba(7,11,16,.72), rgba(7,11,16,.94));
  border: 1px solid #3d4c60; box-shadow: 0 4px 18px rgba(0,0,0,.5);
}
.ho-hero > img {
  width: 66px; height: auto; max-height: 92px; object-fit: contain;
  image-rendering: pixelated; filter: brightness(1.12) contrast(1.05) drop-shadow(0 3px 0 rgba(0,0,0,.65));
}
.ho-hero-tag { display: flex; flex-direction: column; gap: 2px; padding-bottom: 2px; }
.ho-hero-tag b { font-size: 13px; color: #f3e7c8; letter-spacing: 1px; text-shadow: 1px 1px 0 #000; }
.ho-hero-tag span { font-family: var(--mono); font-size: 9.5px; color: #9fb4c9; }
.ho-banner::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(5,9,14,.92) 0%, rgba(5,9,14,.55) 42%, rgba(5,9,14,.12) 75%, rgba(5,9,14,.35) 100%);
}
.ho-banner-copy { position: absolute; inset: 0; z-index: 2; padding: 17px 20px 17px 196px; display: flex; flex-direction: column; justify-content: center; }
.ho-kicker { font-family: var(--mono); font-size: 10px; letter-spacing: 2px; color: #d2991d; }
.ho-banner-copy h3 { margin: 3px 0 4px; font-size: 26px; letter-spacing: 4px; color: #f3e7c8; text-shadow: 2px 2px 0 #000; }
.ho-banner-copy p { margin: 0; max-width: 560px; font-size: 11.5px; line-height: 1.7; color: #b8c2cf; }
/* 藏身处顶部快捷入口：悬浮在横幅右下空处，窄屏回落成一条整宽按钮 */
.ho-wb-fab {
  position: absolute; right: 12px; top: 96px; z-index: 6;
  display: flex; align-items: center; gap: 9px; cursor: pointer;
  padding: 7px 12px 7px 10px; text-align: left;
  border: 2px solid #58a6ff; background: linear-gradient(180deg, #12253a, #0b1725);
  color: #eaf2ff; font-family: var(--sans, inherit);
  box-shadow: inset 0 0 0 2px #060a0f, 0 5px 16px rgba(0,0,0,.62), 0 0 14px rgba(88,166,255,.22);
  transition: transform .08s, background .15s, border-color .15s;
}
.ho-wb-fab:hover { background: linear-gradient(180deg, #17304a, #0e1d2d); border-color: #8cc7ff; transform: translate(-1px,-1px); }
.ho-wb-fab:active { transform: translate(1px,1px); box-shadow: inset 0 0 0 2px #060a0f; }
.ho-wb-fab-ico { font-size: 17px; line-height: 1; filter: drop-shadow(0 0 7px rgba(88,166,255,.75)); }
.ho-wb-fab-tx { display: flex; flex-direction: column; gap: 1px; }
.ho-wb-fab-tx b { font-size: 12.5px; letter-spacing: 1px; color: #f2f8ff; text-shadow: 1px 1px 0 #000; }
.ho-wb-fab-tx em { font-style: normal; font-family: var(--mono); font-size: 9px; color: #8fb2cf; letter-spacing: 0; }
.ho-wb-fab.locked { border-color: #6b5320; background: linear-gradient(180deg, #1d1708, #120e05); box-shadow: inset 0 0 0 2px #060a0f, 0 5px 16px rgba(0,0,0,.6); }
.ho-wb-fab.locked .ho-wb-fab-tx em { color: #d2991d; }
@media (max-width: 900px) {
  .ho-wb-fab { position: static; width: 100%; justify-content: flex-start; padding: 8px 10px; }
}
.ho-nav {
  display: flex; flex-wrap: wrap; gap: 5px; margin-top: -4px;
  padding: 6px; border: 1px solid #26303f; background: #080c12;
}.ho-nav-btn {
  flex: 1 1 100px; min-width: 0; padding: 6px 8px; cursor: pointer;
  border: 1px solid #2a3b4f; background: #0d141d; color: #d8e1eb;
  font-family: var(--sans, inherit); font-size: 11px; text-align: left;
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
}
.ho-nav-btn em { font-family: var(--mono); font-style: normal; font-size: 9px; color: #d2991d; }
.ho-nav-btn:hover { border-color: #58a6ff; background: #111d2b; }
.ho-topline {
  display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 6px 9px;
  border: 1px solid #1e2836; background: #080c12; color: #8b96a5; font-size: 11.5px;
}
.ho-topline b { color: #cfd8e3; font-family: var(--mono); }
.ho-topline b.warn { color: #f0b24a; }
.ho-lock { padding: 8px 10px; border: 1px solid #6b4a18; background: #1a1208; color: #f0d99a; font-size: 11.5px; line-height: 1.6; }
.ho-zone { display: flex; flex-direction: column; gap: 7px; }
.ho-zone-head { display: flex; align-items: baseline; gap: 8px; padding-bottom: 4px; border-bottom: 1px solid #1e2836; flex-wrap: wrap; }
.ho-zone-head span { font-size: 14px; font-weight: 700; color: #e6edf3; letter-spacing: 1px; }
.ho-zone-head small { font-family: var(--mono); font-size: 9px; color: #58a6ff; letter-spacing: 1px; }
.ho-zone-head em { font-style: normal; font-size: 10.5px; color: #6f7c8d; flex: 1 1 100%; line-height: 1.5; }
.ho-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ho-card {
  border: 1px solid #26303f; background: linear-gradient(180deg, #0d141d, #090e15);
  padding: 9px; display: flex; flex-direction: column; gap: 7px; min-width: 0;
}
.ho-card-head { display: flex; gap: 8px; align-items: center; }
.ho-card-head img { width: 44px; height: 44px; object-fit: contain; image-rendering: pixelated; background: #060a0f; border: 1px solid #1c2531; flex: none; }
.ho-card-name { font-size: 13px; font-weight: 700; color: #eef4fb; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ho-card-lv { font-family: var(--mono); font-size: 10px; color: #8b96a5; margin-top: 2px; }
.ho-pips { display: inline-flex; gap: 2px; }
.ho-pips i { width: 7px; height: 7px; background: #1e2735; display: block; }
.ho-pips i.on { background: #d2991d; box-shadow: 0 0 4px rgba(210,153,29,.5); }
.ho-desc { font-size: 11px; line-height: 1.6; color: #b6c0cc; min-height: 35px; }
.ho-turret-stats { display: flex; flex-direction: column; gap: 2px; padding: 5px 6px; background: #070b10; border: 1px solid #18222e; }
.ho-stat-row { display: flex; flex-wrap: wrap; gap: 3px 8px; font-family: var(--mono); font-size: 9px; color: #7d8b9c; }
.ho-stat-row b { color: #c9d1d9; font-family: var(--sans, inherit); font-weight: 600; }
.ho-gate-note { padding: 5px 7px; background: #0a121b; border-left: 3px solid #58a6ff; font-size: 10.5px; color: #9fb4c9; }
.ho-gate-note b { color: #58a6ff; font-family: var(--mono); }
.ho-all { border: 1px solid #1e2a38; background: #070b10; }
.ho-all summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 6px 7px; color: #cfd8e3; font-size: 10.5px;
}
.ho-all summary::-webkit-details-marker { display: none; }
.ho-all summary span { color: #58a6ff; font-family: var(--mono); font-size: 9px; letter-spacing: .5px; }
.ho-all summary small { color: #6f7c8d; font-family: var(--mono); font-size: 8.5px; }
.ho-all summary::after { content: '▾'; color: #6f7c8d; font-size: 10px; }
.ho-all[open] summary::after { content: '▴'; }
.ho-all-body { display: flex; flex-direction: column; gap: 4px; padding: 0 6px 6px; }
.ho-all-lv { padding: 5px 6px; border-left: 2px solid #26303f; background: #090e15; }
.ho-all-lv.owned { border-left-color: #3fb950; }
.ho-all-lv.next { border-left-color: #d2991d; background: #100d08; }
.ho-all-head { display: flex; align-items: baseline; gap: 6px; }
.ho-all-head b { font-family: var(--mono); font-size: 9.5px; color: #d8e1eb; }
.ho-all-head em { font-style: normal; font-size: 9px; color: #6f7c8d; }
.ho-all-lv.owned .ho-all-head em { color: #7ee787; }
.ho-all-lv.next .ho-all-head em { color: #d2991d; }
.ho-all-lv p { margin: 2px 0 0; font-size: 9.8px; line-height: 1.5; color: #9aa8b8; }
.ho-all-eff { display: flex; flex-wrap: wrap; gap: 2px 4px; margin-top: 3px; }
.ho-all-eff span { font-family: var(--mono); font-size: 8px; padding: 1px 4px; border: 1px solid #1c2b3a; background: #0a121b; color: #8fb2cf; }
.ho-up-line { padding: 4px 6px; background: #0b1119; border-left: 3px solid #d2991d; font-size: 10px; color: #d2991d; font-family: var(--mono); }
.ho-next { padding: 6px 7px; background: #101a26; border: 1px dashed #2a3b4f; font-size: 10.5px; line-height: 1.5; color: #aab6c4; }
.ho-next span { color: #58a6ff; font-family: var(--mono); font-size: 9px; margin-right: 5px; }
.ho-cost { display: flex; flex-wrap: wrap; gap: 3px; }
.ho-cost span { font-family: var(--mono); font-size: 9px; padding: 2px 4px; background: #0a0f16; border: 1px solid #1c2531; color: #8b96a5; }
.ho-cost span.ok { color: #7ee787; border-color: #1f5a33; }
.ho-cost span.miss { color: #ff9b95; border-color: #6b2a2a; }
.ho-cost.pending { color: #d2991d; font-size: 10px; padding: 3px 0; }
.ho-up { width: 100%; margin-top: auto; }
.ho-max { margin-top: auto; padding: 5px; text-align: center; font-family: var(--mono); font-size: 10px; color: #d2991d; border: 1px solid #5a4618; background: #150f06; }
.ho-reserved { border-style: dashed; border-color: #2b3542; color: #6f7c8d; flex-direction: row; align-items: center; justify-content: center; min-height: 108px; background: #080c12; }
.ho-reserved-mark { font-size: 30px; color: #3a4a5d; line-height: 1; }
.ho-reserved b { font-size: 12px; color: #8b96a5; }
.ho-reserved p { margin: 3px 0 0; font-size: 10px; color: #5f6b7a; line-height: 1.5; max-width: 190px; }
.ho-note { padding: 7px 9px; border: 1px solid #1e2836; background: #080c12; font-size: 10.5px; color: #6f7c8d; line-height: 1.6; }
.ho-wait-log { margin-top: 8px; padding: 7px 9px; border: 1px solid #1e2836; background: #080c12; color: #8b96a5; font-size: 10.5px; line-height: 1.7; max-height: 170px; overflow: auto; }
@media (max-width: 760px) {
  .ho-grid { grid-template-columns: 1fr; }
  .ho-banner { height: 132px; }
  .ho-banner-copy { padding: 10px 12px 10px 170px; }
  .ho-hero { left: 9px; bottom: 9px; gap: 5px; padding: 5px 6px; }
  .ho-hero > img { width: 48px; max-height: 72px; }
  .ho-hero-tag b { font-size: 10px; }
  .ho-hero-tag span { font-size: 8px; }
  .ho-nav { gap: 4px; padding: 5px; }
  .ho-nav-btn { flex-basis: 76px; padding: 5px 6px; font-size: 10px; }
  .ho-banner-copy h3 { font-size: 20px; letter-spacing: 2px; }
  .ho-banner-copy p { font-size: 10px; max-width: 260px; }
  .ho-kicker { font-size: 8px; }
  .ho-desc { min-height: 0; }
  .ho-card-head img { width: 38px; height: 38px; }
}
.ho-gate-count { margin-left: 8px; padding: 1px 5px; border: 1px solid #26303f; color: #8b96a5; font-family: var(--mono); font-size: 9px; }
.ho-gate-btn { width: 100%; }
/* ================= 信息中心 ================= */
.ic { display: grid; gap: 9px; }
.ic-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 10px 11px; border: 1px solid #24384d;
  background: linear-gradient(135deg, #0b1a28, #0a1018 62%);
  box-shadow: inset 0 0 0 1px #060a0f, inset 0 0 30px rgba(88,166,255,.05);
}
.ic-head-copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ic-head-copy > b { font-size: 15px; color: #eaf2ff; letter-spacing: 1px; }
.ic-head-copy > span { font-size: 11px; line-height: 1.65; color: #9fb4c9; }
.ic-kicker { font-family: var(--mono); font-size: 9px; color: #58a6ff; letter-spacing: 1px; }
.ic-metrics { display: flex; flex-direction: column; gap: 3px; flex: none; text-align: right; font-family: var(--mono); font-size: 10px; color: #8b96a5; }
.ic-metrics b { color: #d8e1eb; font-size: 12px; }
.ic-warn { color: #f85149 !important; text-shadow: 0 0 8px rgba(248,81,73,.35); }
.ic-note { padding: 6px 8px; border-left: 3px solid #d2991d; background: #141005; color: #b7a477; font-size: 10.5px; line-height: 1.6; }
.ic-note.pause { border-left-color: #f85149; background: #1a0b0b; color: #e3a6a1; }
.ic-slots { display: grid; gap: 6px; }
.ic-slot {
  display: grid; grid-template-columns: 52px 42px minmax(0,1fr) auto; align-items: center; gap: 8px;
  padding: 8px; border: 1px solid #26303f; background: #090e15;
}
.ic-slot.empty { grid-template-columns: 52px minmax(0,1fr) auto; border-style: dashed; }
.ic-slot.active { border-left: 3px solid #4f9c4a; background: linear-gradient(90deg, #0a1510, #090e15 55%); }
.ic-slot.active.paused { border-left-color: #d2991d; background: linear-gradient(90deg, #171206, #090e15 55%); }
.ic-slot-no { font-family: var(--mono); font-size: 9px; color: #6f7c8d; letter-spacing: .5px; }
.ic-slot img { width: 40px; height: 40px; object-fit: contain; image-rendering: pixelated; background: #060a0f; border: 1px solid #1c2531; }
.ic-slot-tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ic-slot-tx > b { font-size: 12px; color: #eef4fb; }
.ic-slot-tx > span { font-size: 10px; color: #8b96a5; font-family: var(--mono); }
.ic-slot-tx > span b { color: #9be36d; font-weight: 600; }
.ic-slot-tx > span b.paused { color: #e8c46a; }
.ic-slot-sub { color: #6f7c8d !important; font-size: 9px !important; }
.ic-slot .pixel-btn { white-space: nowrap; }
.ic-picker { border: 1px solid #2d4260; background: #080e16; padding: 8px; display: grid; gap: 6px; }
.ic-picker-note { font-size: 10px; color: #7f8fa3; }
.ic-chip-row {
  display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 8px;
  padding: 6px; border: 1px solid #1c2a3a; background: #060b11;
}
.ic-chip-row.dim { opacity: .5; }
.ic-chip-row img { width: 36px; height: 36px; object-fit: contain; image-rendering: pixelated; background: #04070b; border: 1px solid #16202b; }
.ic-chip-tx { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ic-chip-tx b { font-size: 11.5px; color: #d8e1eb; }
.ic-chip-tx span { font-size: 9.5px; color: #8b96a5; }
.ic-chip-tx em { font-style: normal; font-size: 9px; color: #6f7c8d; line-height: 1.5; }
.ic-chip-none { font-family: var(--mono); font-size: 9px; color: #6f7c8d; }
.ic-storage { border: 1px solid #26303f; background: #080c12; padding: 8px; display: grid; gap: 6px; }
.ic-sec-head { display: flex; align-items: center; gap: 8px; }
.ic-sec-head > b { font-size: 12px; color: #eaf2ff; }
.ic-sec-head > span { font-family: var(--mono); font-size: 9.5px; color: #8b96a5; }
.ic-sec-head .pixel-btn { margin-left: auto; }
.ic-store-row {
  display: grid; grid-template-columns: 30px minmax(0,1fr) 48px auto; align-items: center; gap: 7px;
  padding: 5px 6px; border-bottom: 1px solid #141d27;
}
.ic-store-row:last-child { border-bottom: 0; }
.ic-store-row img { width: 28px; height: 28px; object-fit: contain; image-rendering: pixelated; }
.ic-store-tx { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ic-store-tx b { font-size: 11px; color: #d8e1eb; }
.ic-store-tx span { font-size: 9px; color: #6f7c8d; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ic-store-count { font-family: var(--mono); font-size: 11px; color: #d2991d; text-align: right; }
.ic-empty { padding: 14px 8px; border: 1px dashed #26303f; color: #6f7c8d; font-size: 10.5px; text-align: center; }
.ic-full { padding: 5px 7px; border-left: 3px solid #f85149; background: #1a0b0b; color: #d99a9a; font-size: 10.5px; }
.ic .pixel-btn[disabled] { opacity: .4; cursor: not-allowed; }
@media (max-width: 720px) {
  .ic-head { flex-direction: column; }
  .ic-metrics { flex-direction: row; gap: 12px; }
  .ic-slot, .ic-slot.empty { grid-template-columns: 36px minmax(0,1fr); }
  .ic-slot-no { grid-column: 1 / -1; grid-row: 1; }
  .ic-slot img { grid-column: 1; grid-row: 2; width: 34px; height: 34px; }
  .ic-slot-tx { grid-column: 2; grid-row: 2; }
  .ic-slot.empty .ic-slot-tx { grid-column: 1 / -1; grid-row: 2; }
  .ic-slot .pixel-btn { grid-column: 1 / -1; grid-row: 3; width: 100%; }
  .ic-chip-row { grid-template-columns: 34px minmax(0,1fr); }
  .ic-chip-row .pixel-btn, .ic-chip-none { grid-column: 1 / -1; width: 100%; text-align: center; }
  .ic-store-row { grid-template-columns: 28px minmax(0,1fr) 42px; }
  .ic-store-row .pixel-btn { grid-column: 1 / -1; width: 100%; }
}
/* ================= 入侵模式 / PvP ================= */
.inv { display: grid; gap: 10px; }
.inv-hint, .inv-muted { color: #8794a5; font-size: 11px; line-height: 1.7; }
.inv-error { color: #f85149; font-size: 12px; }
.inv-targets { display: grid; gap: 8px; }
.inv-target { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; border: 1px solid #273344; background: #0d141d; }
.inv-target-main { min-width: 0; }
.inv-name { font-weight: 700; color: #dce6f2; font-size: 13px; }
.inv-name small { color: #7d8ea3; font-weight: 400; margin-left: 6px; }
.inv-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 5px; font-size: 10px; color: #8b96a5; }
.inv-meta .on { color: #58a6ff; }
.inv-meta .off { color: #3fb950; }
.inv-meta .shield { color: #ffd76a; }
.inv-shield {
  margin: 0 0 8px; padding: 7px 10px; border: 1px solid #6b5a22;
  background: rgba(255, 215, 106, .08); color: #ffd76a; font-size: 11px; line-height: 1.5;
}
.inv-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding-bottom: 8px; border-bottom: 1px solid #202a37; }
.inv-head b { color: #e6edf3; font-size: 15px; }
.inv-head small { display: block; margin-top: 3px; color: #8794a5; font-size: 10px; }
.inv-gate { text-align: center; padding: 8px 0; }
.inv-big { font-family: var(--mono, monospace); font-size: 42px; line-height: 1.1; color: #ffd76a; }
.inv-big small { font-size: 14px; margin-left: 3px; color: #8b96a5; }
.inv-gate-label { color: #c9d6e4; font-size: 11px; margin: 4px 0 8px; }
.inv-bar { height: 7px; border: 1px solid #2a3a4d; background: #0b0f14; overflow: hidden; }
.inv-bar i { display: block; height: 100%; background: linear-gradient(90deg, #58a6ff, #3fb950); }
.inv-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 11px; color: #aebbc9; margin-top: 8px; }
.inv-k { color: #7d8ea3; }
.inv-loot { display: flex; flex-wrap: wrap; gap: 5px; padding: 8px 0; min-height: 26px; }
.inv-pill { border: 1px solid #2a3a4d; background: #111a24; padding: 2px 6px; font-size: 10px; color: #c9d6e4; }
.inv-pvp-head { display: flex; justify-content: space-between; color: #8b96a5; font-size: 10px; margin: 6px 0; }
.inv-red { color: #f85149; }
.inv-fighters { display: grid; grid-template-columns: 1fr 34px 1fr; align-items: center; gap: 8px; }
.inv-fighter { border: 1px solid #273344; background: #0d141d; padding: 7px; }
.inv-fighter .inv-k { font-size: 10px; }
.inv-hp { height: 9px; border: 1px solid #2a3a4d; background: #0b0f14; margin: 5px 0 4px; overflow: hidden; }
.inv-hp i { display: block; height: 100%; background: #3fb950; transition: width .25s; }
.inv-hp.foe i { background: #f85149; }
.inv-vs { text-align: center; color: #7d8ea3; font-family: var(--mono, monospace); font-size: 11px; }
.inv-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.inv-actions .pixel-btn { flex: 1 1 30%; }
.inv-waiting { color: #ffd76a; font-size: 11px; padding: 8px 0; }
.inv-log { margin-top: 8px; padding: 7px 8px; border-left: 2px solid #2a3a4d; background: #0b0f14; color: #9aa8b8; font-size: 10px; line-height: 1.75; max-height: 112px; overflow: auto; }
.inv-alarm { border: 1px solid #5a2b2b; background: #1d1010; color: #f0b3b3; padding: 8px 10px; font-size: 12px; line-height: 1.7; }
.inv-result { border: 1px solid #2a3a4d; background: #0d141d; color: #e6edf3; padding: 12px; text-align: center; font-size: 14px; }
.inv-modal.danger .modal-card, .invasion.danger .modal-card { border-color: #5a2b2b; }
@media (max-width: 640px) {
  .inv-fighters { grid-template-columns: 1fr; }
  .inv-vs { display: none; }
  .inv-actions .pixel-btn { flex: 1 1 100%; }
  .inv-big { font-size: 34px; }
}

/* ===== 混沌区页签 / 异常调查 ===== */
.chaos-tabs { display:flex; gap:6px; margin:0 0 10px; border-bottom:1px solid #30363d; padding-bottom:8px; }
.chaos-tab { font:inherit; cursor:pointer; padding:5px 12px; border:1px solid #30363d; background:#161b22; color:#8b949e; border-radius:3px; }
.chaos-tab.on { border-color:#f0883e; color:#f0883e; background:#1c1410; box-shadow:inset 0 0 0 1px rgba(240,136,62,.25); }
.an-card { display:flex; gap:10px; border:1px solid #3a3f46; background:#0f1319; cursor:pointer; margin:10px 0; overflow:hidden; }
.an-card:hover { border-color:#f0883e; }
.an-cover { width:180px; min-height:104px; background-size:cover; background-position:center; filter:grayscale(.55) brightness(.8); flex:none; }
.an-info { padding:10px 12px; display:flex; flex-direction:column; gap:6px; }
.an-title { font-weight:700; color:#e6edf3; font-size:15px; }
.an-sub { color:#8b949e; font-size:12px; }
.an-hint { color:#6e7681; font-size:11px; line-height:1.5; }
.an-medal-strip { margin-top:10px; }
.an-strip-title { color:#8b949e; font-size:12px; margin-bottom:6px; }
.an-medal-row { display:flex; gap:8px; flex-wrap:wrap; }
.an-medal { display:flex; align-items:center; gap:5px; border:1px solid #30363d; padding:3px 8px; border-radius:3px; background:#0d1117; font-size:12px; color:#8b949e; }
.an-medal b { font-size:14px; }
.an-snap { display:flex; align-items:center; gap:6px; color:#8b949e; font-size:12px; margin:8px 0; cursor:pointer; }
.an-snap input { accent-color:#f0883e; }
.an-go { margin-top:8px; color:#f0883e; font-weight:700; font-size:12px; }
.an-eq { margin-left:2px; color:#f0883e; font-size:11px; }
.an-medal.equipped { box-shadow:0 0 0 1px #f0883e inset; }
.an-mico { width:18px; height:18px; display:inline-block; vertical-align:middle; border-radius:2px; }
.an-mhead { display:flex; align-items:center; gap:5px; }
.an-medal.on { background:#111820; color:#e6edf3; }
.an-sec { margin:12px 0 6px; color:#e6edf3; font-size:13px; font-weight:700; }
.an-opts { display:flex; gap:6px; flex-wrap:wrap; }
.an-ammo { margin-top:8px; display:flex; flex-direction:column; gap:4px; }
.an-ammo-label { color:#8b949e; font-size:12px; }
.an-ammo input { width:100%; }
.an-medal-pick { display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:8px; }
.an-mpick { border:1px solid #30363d; padding:8px; cursor:pointer; background:#0d1117; }
.an-mpick.on { background:#121a22; box-shadow:inset 0 0 0 1px rgba(240,136,62,.4); }
.an-mname { font-weight:700; font-size:13px; margin-bottom:2px; }
.an-mlv { color:#8b949e; font-size:11px; }
.an-mdesc { color:#6e7681; font-size:11px; line-height:1.45; margin-top:4px; }
.an-hud { display:flex; gap:8px; flex-wrap:wrap; padding:6px 0 8px; border-bottom:1px solid #21262d; }
.an-hud-item { font-size:12px; color:#c9d1d9; background:#0d1117; border:1px solid #21262d; padding:2px 7px; border-radius:3px; }
.an-tabs { display:flex; gap:4px; margin:8px 0; }
.an-tab { font-size:11px; padding:3px 8px; border:1px solid #21262d; color:#6e7681; border-radius:2px; }
.an-tab.on { border-color:#f0883e; color:#f0883e; }
.an-tab.done { color:#3fb950; border-color:#1f4d2b; }
.an-note { color:#8b949e; font-size:12px; margin:6px 0; line-height:1.5; }
.an-card.omega .an-cover { filter:saturate(.8) brightness(.92); }
.omega-scene { height:118px; border:1px solid #2a3340; background-size:cover; background-position:center; position:relative; margin:6px 0 8px; box-shadow:0 0 16px rgba(0,0,0,.55) inset; }
.omega-scene-cap { position:absolute; left:8px; bottom:6px; font-size:11px; color:#d8e6ef; background:rgba(8,12,16,.72); border-left:2px solid #58a6ff; padding:2px 7px; letter-spacing:.5px; }
.omega-warn { color:#d2991d; font-size:12px; line-height:1.55; margin:6px 0; border-left:2px solid #d2991d; padding:4px 8px; background:#14110a; }
.omega-chip-row { display:flex; gap:6px; flex-wrap:wrap; margin:6px 0 8px; }
.omega-chip { font:inherit; cursor:pointer; color:#c9d1d9; background:#111820; border:1px solid #30363d; border-radius:4px; padding:8px 10px; font-size:12px; }
.omega-chip:hover { border-color:#58a6ff; }
.omega-chip.on { border-color:#3fb950; color:#7ee787; background:#0d1a12; box-shadow:0 0 0 1px rgba(63,185,80,.25) inset; }
.omega-effect { border:1px solid #26323d; background:#0b1218; color:#9fb0bf; font-size:12px; line-height:1.75; padding:8px 10px; margin:6px 0; }
.omega-effect b { color:#e6edf3; }
.omega-check { max-width:440px; margin:8px auto; padding:10px; border:1px solid #2f4160; background:#080d14; box-shadow:0 0 22px rgba(30,90,160,.18) inset; }
.omega-check-title { text-align:center; color:#79c0ff; font-size:12px; letter-spacing:1px; }
.omega-code { display:flex; gap:5px; justify-content:center; flex-wrap:wrap; margin:8px 0 6px; }
.omega-digit { min-width:24px; height:34px; line-height:34px; text-align:center; color:#7ee787; background:#0b1a12; border:1px solid #214d34; font-family:ui-monospace,Consolas,monospace; font-size:18px; border-radius:3px; }
.omega-timer-text { text-align:center; color:#8b949e; font-size:11px; }
.omega-timer-bar { height:4px; background:#161b22; border:1px solid #21262d; margin:4px 0 8px; overflow:hidden; }
.omega-timer-fill { height:100%; width:100%; background:#3fb950; transition:width .1s linear; }
.omega-timer-fill.danger { background:#f85149; }
.omega-input { min-height:32px; text-align:center; color:#e6edf3; font-family:ui-monospace,Consolas,monospace; font-size:17px; letter-spacing:2px; border:1px dashed #3a4656; background:#0d1117; padding:4px 6px; margin-bottom:8px; }
.omega-pad { display:grid; grid-template-columns:repeat(3,1fr); gap:6px; }
.omega-key { font:inherit; cursor:pointer; min-height:42px; border:1px solid #30363d; background:#161b22; color:#e6edf3; border-radius:4px; font-size:16px; }
.omega-key:hover { border-color:#58a6ff; }
.omega-key:active { transform:translateY(1px); }
.omega-key.submit { color:#7ee787; border-color:#238636; background:#0d2818; font-size:13px; }
.omega-result { font-size:12px; line-height:1.5; padding:5px 8px; margin:6px 0; border-left:2px solid #30363d; background:#0d1117; color:#c9d1d9; }
.omega-result.ok { border-left-color:#3fb950; color:#7ee787; }
.omega-result.bad { border-left-color:#f85149; color:#ff7b72; }
.omega-table { display:grid; grid-template-columns:1fr auto; gap:3px 12px; border:1px solid #21262d; background:#0b1017; padding:8px 10px; margin:8px 0; font-size:12px; }
.omega-tk { color:#8b949e; }
.omega-tv { color:#e6edf3; text-align:right; font-family:ui-monospace,Consolas,monospace; }
.omega-chips { border:1px solid #21262d; background:#0b1017; padding:8px 10px; margin:8px 0; }
.omega-sub { color:#79c0ff; font-size:11px; letter-spacing:.5px; margin-bottom:4px; }
.omega-chip-line { color:#6e7681; font-size:12px; line-height:1.65; }
.omega-chip-line.on { color:#7ee787; }

.an-bounty { display:flex; flex-direction:column; gap:6px; margin:6px 0 10px; }
.an-brow { border-left:2px solid #f0883e; padding:4px 8px; background:#0d1117; font-size:12px; color:#c9d1d9; }
.an-brow span { display:block; color:#6e7681; font-size:11px; margin-top:2px; }
.an-brow.done { border-left-color:#3fb950; opacity:.7; }
.an-bp { margin:6px 0; border:1px solid #30363d; background:#0d1117; padding:6px 8px; }
.an-bp-head { color:#f0883e; font-size:11px; margin-bottom:4px; }
.an-bp-row { color:#8b949e; font-size:11px; line-height:1.55; }
.an-bp-row.done { color:#3fb950; }
.an-rooms { display:flex; gap:6px; flex-wrap:wrap; margin:6px 0; }
.an-grid { display:grid; gap:2px; max-width:180px; margin:8px auto; padding:4px; border:1px solid #2f4a3d; background:#0a0f0c url("../assets/pixel/bg/an_corridor.png") center/cover no-repeat; box-shadow:0 0 18px rgba(0,0,0,.65) inset, 0 0 12px rgba(20,40,30,.35); }
.an-cell { height:26px; box-sizing:border-box; }
.an-cell { background:rgba(7,12,10,.42); border:1px solid rgba(120,150,135,.22); display:flex; align-items:center; justify-content:center; font-size:12px; color:#8b949e; }
.an-cell.me { background:rgba(18,48,28,.55); border-color:#3fb950; color:#3fb950; box-shadow:0 0 6px rgba(63,185,80,.35); }
.an-cell.foe { background:rgba(42,18,20,.62); border-color:#f85149; color:#f85149; box-shadow:0 0 6px rgba(248,81,73,.35); }
.an-cell.target { background:rgba(28,26,16,.65); border-color:#d2991d; color:#d2991d; }
.an-cell.canmove { cursor:pointer; box-shadow:inset 0 0 0 1px rgba(88,166,255,.45); }
.an-cell.canmove:hover { background:rgba(26,52,40,.72); box-shadow:inset 0 0 0 2px #58a6ff, 0 0 8px rgba(88,166,255,.35); }
.an-tok { width:22px; height:22px; display:block; image-rendering:pixelated; pointer-events:none; }
.an-tok.foe { width:23px; height:23px; filter:drop-shadow(0 0 2px rgba(248,81,73,.55)); }
.an-pads { display:flex; gap:6px; margin:6px 0; }
.an-log { margin:10px 0; border-top:1px solid #21262d; padding-top:6px; }
.an-log-line { font-size:11px; color:#6e7681; line-height:1.6; }
.an-quit { margin-top:8px; }
.an-settle-title { font-size:16px; font-weight:700; color:#e6edf3; margin-bottom:10px; }
.an-settle-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(120px,1fr)); gap:8px; }
.an-settle-grid div { background:#0d1117; border:1px solid #21262d; padding:6px 8px; }
.an-settle-grid span { display:block; color:#6e7681; font-size:11px; }
.an-settle-grid b { color:#e6edf3; font-size:13px; }
.an-settle-reward { margin-top:10px; color:#3fb950; font-size:13px; }
@media (max-width:640px) {
  .an-cover { width:110px; min-height:86px; }
  .an-grid { max-width:220px; }
  .an-hud { gap:5px; }
  .an-hud-item { font-size:11px; padding:2px 5px; }
  .omega-scene { height:96px; }
  .omega-check { max-width:100%; padding:8px; box-sizing:border-box; }
  .omega-pad { gap:4px; }
  .omega-key { min-height:38px; font-size:15px; }
}

/* ============================= 危机预演 ============================= */
.cz-head { border:1px solid #2b3949; background:linear-gradient(180deg,#131b26,#0d1219); padding:10px 12px; margin-bottom:8px; }
.cz-kicker { color:#a371f7; font-size:10px; letter-spacing:.12em; }
.cz-head h3 { margin:2px 0 4px; font-size:17px; color:#eef4fb; }
.cz-head p { margin:0; color:#9fb0c3; font-size:11px; line-height:1.6; }
.cz-locked { border:1px dashed #6b5520; background:#1c170c; color:#e3b341; padding:10px 12px; margin:8px 0; font-size:12px; }
.cz-scorebar { display:flex; gap:16px; align-items:center; padding:8px 10px; margin:6px 0; border:1px solid #2b3949; background:#0e141d; font-size:12px; flex-wrap:wrap; }
.cz-scorebar b.gold { color:#e3b341; font-size:16px; }
.cz-mods { display:flex; flex-direction:column; gap:5px; }
.cz-sub { margin:10px 0 4px; color:#d6e2f0; font-size:11px; letter-spacing:.05em; border-bottom:1px solid #26303f; padding-bottom:4px; }
.cz-mod-row { display:grid; grid-template-columns:70px minmax(150px,210px) 1fr; gap:8px; align-items:center; border:1px solid #25303f; background:#10161f; padding:6px 8px; }
.cz-mod-row.special { grid-template-columns:110px 1fr; cursor:pointer; border-style:dashed; }
.cz-mod-row.special.on { border-color:#a371f7; background:#1a1226; box-shadow:inset 0 0 0 1px #5c3d94; }
.cz-mod-name { font-weight:700; color:#e6edf5; font-size:12px; }
.cz-sp { margin-left:5px; font-size:9px; color:#a371f7; border:1px solid #4b3470; padding:0 3px; }
.cz-mod-btns { display:flex; gap:4px; }
.cz-lv { background:#0b1017; border:1px solid #34465b; color:#9fb0c3; font:inherit; font-size:10px; padding:3px 5px; cursor:pointer; }
.cz-lv span { color:#5f7c99; margin-left:3px; }
.cz-lv.on { border-color:#58a6ff; color:#eef4fb; background:#12243a; box-shadow:inset 0 0 0 1px #1d4d80; }
.cz-mod-desc { color:#8fa0b3; font-size:10.5px; line-height:1.45; }
.cz-ladder { display:flex; flex-direction:column; gap:3px; }
.cz-reward { display:grid; grid-template-columns:40px 1fr auto; gap:8px; padding:5px 8px; border:1px solid #26303f; background:#0f151d; font-size:11px; align-items:center; }
.cz-reward.done { opacity:.6; border-color:#2f4a34; background:#0e1a12; }
.cz-pt { color:#e3b341; font-weight:700; }
.cz-rw { color:#cfdae6; }
.cz-st { color:#7f91a5; font-size:10px; }
.cz-start { width:100%; margin-top:10px; }
.cz-result-top { border:1px solid #2b3949; padding:10px; margin-bottom:8px; background:#0e141d; }
.cz-result-top.win { border-color:#2f6a3c; background:#0d1a12; }
.cz-result-top.lose { border-color:#6a2f2f; background:#1a0e0e; }
.cz-result-title { font-size:16px; font-weight:700; color:#eef4fb; }
.cz-result-score { color:#e3b341; font-size:13px; margin-top:3px; }
.cz-result-sub { color:#d6e2f0; font-size:11px; margin:8px 0 4px; border-bottom:1px solid #26303f; padding-bottom:4px; }
.cz-result-row { display:flex; gap:10px; padding:4px 2px; font-size:11.5px; border-bottom:1px dashed #1d2733; }
.cz-result-row b { color:#e3b341; min-width:42px; }
.cz-result-note { margin-top:8px; color:#7f91a5; font-size:10.5px; line-height:1.5; }
.ho-blackcard { position:absolute; right:10px; top:10px; display:flex; align-items:center; gap:6px; background:#0c0d10; border:1px solid #6b5520; padding:4px 8px; color:#e3b341; font-size:10px; box-shadow:0 0 12px #000 inset; }
.ho-blackcard img { width:26px; height:26px; image-rendering:pixelated; }
@media (max-width: 760px) {
  .cz-mod-row { grid-template-columns:58px 1fr; }
  .cz-mod-desc { grid-column:1 / -1; }
  .cz-reward { grid-template-columns:34px 1fr; }
  .cz-st { grid-column:2; }
  .ho-blackcard span { display:none; }
}

/* ============================= 新手引导浮窗 ============================= */
#dzGuide {
  position: fixed;
  top: 64px;
  left: 50%;
  transform: translateX(-50%);
  width: min(370px, calc(100vw - 24px));
  z-index: 150;
  background: linear-gradient(180deg, #141b24, #0b1017);
  border: 2px solid #4c6280;
  box-shadow: inset 0 0 0 2px #05080c, 0 10px 30px rgba(0,0,0,.72);
  color: #dce7f4;
}
#dzGuide.hidden { display: none; }
#dzGuide.collapsed { width: auto; min-width: 190px; }
#dzGuide.is-summary { width: min(420px, calc(100vw - 24px)); }
#dzGuide.collapsed .dz-guide-body,
#dzGuide.collapsed .dz-guide-foot { display: none; }

.dz-guide-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 5px 7px 5px 10px;
  background: linear-gradient(90deg, #1b2a3a, #101720);
  border-bottom: 1px solid #31435a;
  cursor: grab;
  touch-action: none;
}
#dzGuide.collapsed .dz-guide-head { border-bottom: 0; }
.dz-guide-head.dragging { cursor: grabbing; }
.dz-guide-kicker {
  color: #58a6ff;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1px;
}
.dz-guide-title { font-size: 13px; font-weight: 700; letter-spacing: 1px; color: #f2f7fd; }
.dz-guide-grip { margin-left: auto; color: #6b7d92; font-family: var(--mono); font-size: 11px; letter-spacing: 2px; }
.dz-guide-toggle {
  width: 22px; height: 20px;
  padding: 0;
  border: 1px solid #47617e;
  background: #0b1219;
  color: #bad4f2;
  font: 700 12px/1 var(--mono);
  cursor: pointer;
}
.dz-guide-toggle:hover { border-color: #58a6ff; color: #fff; background: #152538; }
.dz-guide-body { padding: 3px 0; }
.dz-guide-line {
  position: relative;
  padding: 8px 12px 8px 24px;
  font-size: 12.5px;
  line-height: 1.72;
  color: #d7e2ef;
  border-bottom: 1px dashed #263443;
}
.dz-guide-line:last-child { border-bottom: 0; }
.dz-guide-line::before {
  content: "▸";
  position: absolute;
  left: 10px;
  top: 8px;
  color: #e3b341;
}
.dz-guide-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 8px;
  padding: 5px 12px 5px 10px;
  border-bottom: 1px dashed #263443;
  font-size: 11.5px;
  line-height: 1.55;
}
.dz-guide-row:last-child { border-bottom: 0; }
.dz-guide-label {
  color: #8297ad;
  font-family: var(--mono);
  letter-spacing: .04em;
}
.dz-guide-value { color: #d7e2ef; word-break: break-word; }
.dz-guide-row.ready .dz-guide-value { color: #e3b341; }
.dz-guide-actions {
  padding: 6px 9px;
  border-top: 1px solid #263443;
  background: linear-gradient(180deg, rgba(20,30,42,.6), rgba(10,16,23,.6));
}
#dzGuide.collapsed .dz-guide-actions { display: none; }
.dz-guide-bounty {
  width: 100%;
  min-height: 28px;
  padding: 5px 8px;
  border: 2px solid #6b5a24;
  background: linear-gradient(180deg, #2a2413, #171208);
  color: #f0d27a;
  font: 700 12px/1.2 var(--ui-font);
  letter-spacing: .5px;
  cursor: pointer;
}
.dz-guide-bounty:hover, .dz-guide-bounty:active {
  border-color: #e3b341;
  color: #fff3c4;
  background: linear-gradient(180deg, #3a3118, #201a0b);
}
.dz-guide-foot {
  padding: 4px 10px 6px;
  border-top: 1px solid #263443;
  color: #71859b;
  font-size: 10px;
  letter-spacing: .5px;
}
@media (max-width: 600px) {
  #dzGuide { top: 58px; left: 8px; right: 8px; width: auto; transform: none; }
  #dzGuide.collapsed { width: auto; min-width: 0; }
  .dz-guide-line { padding: 7px 10px 7px 22px; font-size: 12px; line-height: 1.65; }
}

/* ---------------------------------------------------------------- 邮件 / 管理员入口 */
#btn-mail { position: relative; display: inline-flex; align-items: center; gap: 3px; }
#btn-mail .mail-ico { font-size: 11px; line-height: 1; }
.mail-badge {
  display: none; min-width: 15px; height: 15px; padding: 0 3px; margin-left: 1px;
  border-radius: 8px; background: #c53030; color: #fff; border: 1px solid #ff8b82;
  font: 700 9px/15px var(--mono); text-align: center; vertical-align: middle;
}
.modal.mail { width: min(860px, 94vw); }
.mail-wrap { min-height: 380px; }
.mail-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 9px; }
.mail-top-title { font-size: 12px; letter-spacing: 1px; color: var(--text); }
.mail-top-hint { color: var(--text-dim); font-size: 10px; margin-left: 6px; letter-spacing: 0; }
.mail-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 9px; min-height: 340px; max-height: 58vh; }
.mail-list { border: 1px solid var(--border); background: #0a1018; overflow-y: auto; }
.mail-row { padding: 8px 9px 7px; border-bottom: 1px dashed #223040; cursor: pointer; position: relative; }
.mail-row:hover { background: #101c28; }
.mail-row.active { background: #122537; box-shadow: inset 3px 0 0 var(--accent); }
.mail-row.unread .mail-subject { color: #fff; }
.mail-row-top { display: flex; justify-content: space-between; gap: 6px; color: var(--text-dim); font-size: 10px; }
.mail-from { color: var(--gold); font-family: var(--mono); }
.mail-time { font-family: var(--mono); font-size: 9px; }
.mail-subject { font-size: 12px; margin: 2px 0; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-preview { font-size: 10px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-tags { display: flex; align-items: center; gap: 5px; margin-top: 4px; min-height: 14px; }
.mail-chip { font-size: 9px; color: var(--gold); border: 1px solid #4a3a18; padding: 0 4px; line-height: 13px; }
.mail-chip.done { color: var(--text-dim); border-color: #2a3a4d; }
.mail-dot { width: 6px; height: 6px; border-radius: 50%; background: #ff5b52; margin-left: auto; box-shadow: 0 0 6px #ff5b52; }
.mail-detail { border: 1px solid var(--border); background: #0c141d; padding: 11px 13px; overflow-y: auto; display: flex; flex-direction: column; }
.mail-detail-head { border-bottom: 1px solid #223040; padding-bottom: 8px; }
.mail-detail-subject { font-size: 15px; color: #fff; font-weight: 700; line-height: 1.4; }
.mail-detail-meta { color: var(--text-dim); font-size: 10px; margin-top: 3px; font-family: var(--mono); }
.mail-detail-body { white-space: pre-wrap; word-break: break-word; font-size: 12px; line-height: 1.75; padding: 10px 0; flex: 1; }
.mail-attach { border-top: 1px dashed #223040; padding-top: 8px; }
.mail-attach-title { font-size: 11px; color: var(--gold); margin-bottom: 4px; }
.mail-attach-row { display: flex; justify-content: space-between; font-size: 11px; padding: 3px 6px; background: #101c28; margin-bottom: 3px; }
.mail-attach-row b { color: var(--gold); font-family: var(--mono); }
.mail-noattach { color: var(--text-dim); font-size: 10px; padding-top: 8px; border-top: 1px dashed #223040; }
.mail-detail-foot { display: flex; align-items: center; gap: 8px; padding-top: 9px; border-top: 1px solid #223040; margin-top: 6px; }
.mail-claimed { color: var(--text-dim); font-size: 11px; }
.mail-empty { color: var(--text-dim); font-size: 11px; padding: 22px 12px; text-align: center; line-height: 1.8; }

.ac-admin-tag { font-size: 9px; color: #0b0f14; background: var(--gold); padding: 0 4px; border-radius: 2px; vertical-align: 1px; letter-spacing: 0; }
.ac-admin-box { display: flex; justify-content: space-between; align-items: center; gap: 8px; border: 1px solid #4a3a18; background: #1a1508; padding: 7px 9px; margin: 7px 0; }
.ac-admin-box b { color: var(--gold); font-size: 11px; }
.ac-admin-hint { color: var(--text-dim); font-size: 10px; margin-left: 6px; }

@media (max-width: 640px) {
  .mail-layout { grid-template-columns: 1fr; max-height: none; }
  .mail-list { max-height: 32vh; }
  .mail-detail { min-height: 220px; max-height: 44vh; }
  .modal.mail { width: calc(100vw - 44px); max-width: none; }
  .ac-admin-box { flex-direction: column; align-items: flex-start; }
}

/* 标榜武器洗炼词条 */
.affix-row {
  display: grid;
  grid-template-columns: minmax(92px, .9fr) minmax(0, 2fr) auto;
  gap: 10px;
  align-items: center;
  padding: 7px 9px;
  margin: 5px 0;
  border: 1px solid #26303f;
  border-left-width: 3px;
  background: #0b1119;
}
.affix-name { font-size: 12px; font-weight: 800; letter-spacing: .02em; }
.affix-text { font-size: 12px; color: #d7e2ee; line-height: 1.45; }
.affix-tier { font-size: 10px; white-space: nowrap; opacity: .95; }
.affix-meta { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
@media (max-width: 640px) {
  .affix-row { grid-template-columns: 1fr auto; gap: 4px 8px; }
  .affix-text { grid-column: 1 / -1; grid-row: 2; }
}

@media (max-width: 640px) {
  .pwdbox-modal .modal-body { padding: 10px; }
  .px-emblem { width: 38px; height: 38px; font-size: 20px; }
  .px-slot { height: 46px; font-size: 23px; }
  .px-key { height: 40px; font-size: 16px; }
  .px-key-submit { font-size: 14px; }
  .px-actions { gap: 10px; }
}


/* ---- 农业部 / 徐图 ---- */
.act-btn.agri .ico { color: #7ee787; }
.agri-kicker { font-size: 11px; letter-spacing: 1px; color: #8b96a5; margin-bottom: 8px; }
.agri-tabs { margin-bottom: 8px; }
.agri-subtabs { display: flex; gap: 6px; margin: 8px 0 10px; }
.agri-subtab { background: #0d1117; border: 1px solid #30363d; color: #8b96a5; padding: 6px 14px; font-size: 12px; cursor: pointer; }
.agri-subtab.on { color: #7ee787; border-color: #3fb950; background: #0f2417; }
.agri-summary { background: #0d1117; border: 1px solid #21262d; border-left: 3px solid #3fb950; padding: 9px 10px; margin-bottom: 10px; font-size: 12px; line-height: 1.65; }
.agri-summary b { color: #7ee787; }
.agri-plots { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin-top: 10px; }
.agri-plot { border: 1px solid #21262d; background: #0b0f14; padding: 7px; }
.agri-plot-head { display: flex; justify-content: space-between; font-size: 11px; color: #c9d1d9; margin-bottom: 5px; }
.agri-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.agri-slot { position: relative; min-height: 82px; padding: 5px 3px; border: 1px solid #30363d; background: #11161d; color: #c9d1d9; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer; overflow: hidden; font-family: inherit; }
.agri-slot:hover { border-color: #58a6ff; }
.agri-slot.empty { border-style: dashed; color: #6e7681; }
.agri-slot.empty:hover { color: #7ee787; border-color: #3fb950; }
.agri-slot.ready { border-color: #d2991d; box-shadow: inset 0 0 12px rgba(210,153,29,.12); }
.agri-slot img { width: 30px; height: 30px; image-rendering: pixelated; }
.agri-crop { font-size: 11px; font-weight: 700; color: #e6edf3; }
.agri-slot-sub { font-size: 9px; color: #8b96a5; line-height: 1.2; text-align: center; }
.agri-slot-sub.ready { color: #d2991d; }
.agri-empty { font-size: 20px; line-height: 1; color: #3fb950; }
.agri-progress { width: 86%; height: 4px; background: #21262d; margin-top: 2px; }
.agri-progress i { display: block; height: 100%; background: #3fb950; }
.agri-seed-row .lr-main { min-width: 0; }
.agri-shop-row, .agri-seed-row { flex-wrap: wrap; }
.agri-shop-row .lr-main, .agri-seed-row .lr-main { flex: 1 1 55%; }
.agri-locked { border: 1px dashed #30363d; color: #8b96a5; padding: 14px; font-size: 12px; margin: 8px 0; }
.agri-recipe, .agri-upgrade { border: 1px solid #21262d; background: #0d1117; padding: 9px 10px; margin-bottom: 8px; }
.agri-recipe.disabled { opacity: .55; }
.agri-recipe-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; flex-wrap: wrap; }
.agri-recipe-desc { color: #8b96a5; font-size: 11px; line-height: 1.55; margin: 4px 0; }
.agri-ings { display: flex; gap: 5px; flex-wrap: wrap; margin: 4px 0; }
.agri-ing, .agri-cost { font-size: 10px; border: 1px solid #30363d; padding: 2px 6px; background: #11161d; }
.agri-ing.ok, .agri-cost.ok { color: #7ee787; border-color: #238636; }
.agri-ing.bad, .agri-cost.bad { color: #f85149; border-color: #6e2a2a; }
.agri-recipe .pixel-btn, .agri-upgrade .pixel-btn { margin-top: 5px; }
.agri-merchant-head { background: #0d1117; border-left: 3px solid #3fb950; padding: 8px 10px; margin-bottom: 8px; font-size: 12px; line-height: 1.6; }
.agri-prestige-head { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.agri-milestone { display: flex; gap: 8px; align-items: flex-start; padding: 5px 0; border-bottom: 1px dashed #21262d; font-size: 11px; color: #8b96a5; }
.agri-milestone.done { color: #7ee787; }
.agri-cost { margin-right: 4px; }
@media (max-width: 640px) {
  .agri-plots { grid-template-columns: 1fr; gap: 7px; }
  .agri-slot { min-height: 68px; }
  .agri-slot img { width: 24px; height: 24px; }
  .agri-crop { font-size: 10px; }
  .agri-slot-sub { font-size: 8px; }
  .agri-recipe-head { font-size: 12px; }
  .agri-shop-row .lr-main, .agri-seed-row .lr-main { flex: 1 1 calc(100% - 48px); }
  .agri-shop-row .lr-right { order: 2; flex: 1 1 30%; justify-content: flex-start; }
  .agri-shop-row .pixel-btn { order: 2; flex: 0 0 50px; }
  .agri-seed-row .pixel-btn { flex: 1 1 42%; }
}

/* ==========================================================================
   虚空故事集
   ========================================================================== */
.void-entry {
  display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 10px;
  padding: 9px 12px; background: linear-gradient(90deg, #161129, #101722 55%, #0d141c);
  border: 1px solid #3b3158; color: #e6ddff; cursor: pointer; text-align: left;
  box-shadow: inset 0 0 22px rgba(150, 110, 255, .12), 0 0 0 1px rgba(0,0,0,.4);
  font-family: inherit;
}
.void-entry:hover { border-color: #7b64bb; background: linear-gradient(90deg, #1d1636, #14202d 55%, #0d141c); }
.void-entry-icon { font-size: 22px; color: #c3a6ff; text-shadow: 0 0 12px #8c6cff; }
.void-entry-text { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.void-entry-text b { font-size: 12px; letter-spacing: 1px; }
.void-entry-text small { font-size: 9px; color: #8c82a5; letter-spacing: .6px; }
.void-entry-arrow { color: #8c6cff; font-size: 18px; }

.void-modal .modal-body { padding: 0; }
.void-shell { padding: 14px; }
.void-hero { position: relative; overflow: hidden; padding: 16px; border: 1px solid #332b4a; background:
  radial-gradient(circle at 82% 12%, rgba(142, 100, 255, .22), transparent 38%),
  linear-gradient(135deg, #171326, #0e1822 60%, #0a1016); }
.void-hero::after { content: '◈'; position: absolute; right: 18px; bottom: -18px; font-size: 110px; color: rgba(170, 140, 255, .08); }
.void-hero-kicker { color: #9f8bc9; letter-spacing: 3px; font-size: 9px; }
.void-hero-title { margin-top: 6px; color: #f3ecff; font-size: 26px; letter-spacing: 4px; text-shadow: 0 0 18px rgba(145, 100, 255, .35); }
.void-hero-title span { margin-left: 10px; font-size: 11px; letter-spacing: 2px; color: #8778a8; }
.void-hero-desc { max-width: 680px; margin-top: 10px; color: #a9a0bc; font-size: 11px; line-height: 1.7; }
.void-floor-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.void-floor-card { padding: 8px 10px; border: 1px solid #2d2742; background: rgba(9, 13, 19, .65); }
.void-floor-card b { display: block; color: #cbbcf0; font-size: 10px; }
.void-floor-card span { display: block; margin-top: 3px; color: #eee8fa; font-size: 12px; }
.void-floor-card small { display: block; margin-top: 2px; color: #82778f; font-size: 9px; }

.void-lobby-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 10px; margin-top: 10px; }
.void-panel { padding: 11px; border: 1px solid #2a3340; background: #0e141c; }
.void-panel-title { color: #d9d2ec; font-size: 11px; letter-spacing: 1px; margin-bottom: 8px; }
.void-mode-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.void-mode { padding: 10px; border: 1px solid #303b4b; background: #111923; color: #b9c3d1; text-align: left; cursor: pointer; }
.void-mode b { display: block; font-size: 12px; color: #e6edf6; }
.void-mode small { display: block; margin-top: 3px; font-size: 9px; color: #7f8b9b; }
.void-mode.on { border-color: #7b64bb; background: linear-gradient(180deg, #1b1730, #121b27); box-shadow: inset 0 0 18px rgba(130, 100, 255, .12); }
.void-note { margin-top: 8px; color: #8994a5; font-size: 10px; line-height: 1.65; }
.void-gold { color: #e3b341; }
.void-range { width: 100%; accent-color: #8d70d8; margin: 4px 0 2px; }
.void-diff-scale { display: flex; justify-content: space-between; color: #6d7787; font-size: 9px; }
.void-notes-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding: 9px 10px; border: 1px solid #3b3050; background: linear-gradient(90deg, rgba(36, 25, 58, .72), rgba(12, 18, 26, .9)); }
.void-notes-bar b { color: #d8c9ff; font-size: 12px; }
.void-notes-bar small { display: block; margin-top: 3px; color: #8d849f; font-size: 9px; }
.void-cloud-note { margin-top: 10px; padding: 8px 10px; border-left: 2px solid #58a6ff; background: rgba(88, 166, 255, .06); color: #8eb8e8; font-size: 10px; line-height: 1.6; }
.void-start { margin-top: 12px; width: 100%; }
.void-extra { margin-top: 10px; }
.void-duo-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.void-online-list { margin-top: 6px; border-top: 1px solid #222b38; }
.void-online-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 2px; border-bottom: 1px solid #1a222d; }
.void-online-row b { font-size: 11px; color: #dce6f2; }
.void-online-row small { margin-left: 8px; color: #7e8a9b; font-size: 9px; }
.void-ok { color: #3fb950; font-size: 9px; }
.void-bad { color: #f85149; font-size: 9px; }
.void-empty { padding: 12px 2px; color: #778291; font-size: 10px; }
.void-room { margin-top: 8px; border: 1px solid #2b3444; background: #0d141d; padding: 10px; }
.void-room-head { display: flex; align-items: center; gap: 10px; font-size: 10px; color: #8b96a5; }
.void-room-head b { color: #e3b341; letter-spacing: 2px; }
.void-room-status { margin-left: auto; color: #9a8ac0; }
.void-room-body { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.void-room-body > div { padding: 8px; border: 1px solid #242e3c; background: #111923; }
.void-code-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; padding: 8px; border: 1px dashed #3a4658; background: #0b1119; }
.void-code-read { width: 112px; padding: 5px 8px; border: 1px solid #3d4b5e; background: #060a10; color: #e3b341; font-family: var(--mono, monospace); font-size: 15px; letter-spacing: 3px; text-align: center; }
.void-code-hint { flex: 1 1 180px; min-width: 140px; color: #7d8897; font-size: 9px; line-height: 1.6; }
.void-online-block { margin-top: 10px; padding-top: 8px; border-top: 1px solid #222b38; }
.void-online-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.void-online-head .void-panel-title { margin: 0; }
.void-join-panel { margin-top: 8px; padding: 10px; border: 1px solid #2b3444; background: #0c131c; }
.void-join-row { display: flex; align-items: center; gap: 8px; margin-top: 7px; flex-wrap: wrap; }
.void-code-input { flex: 1 1 150px; max-width: 220px; padding: 7px 9px; border: 1px solid #344052; background: #060a10; color: #dce6f2; font-size: 13px; letter-spacing: 3px; text-transform: uppercase; }
.void-code-input::placeholder { color: #596477; letter-spacing: 1px; }
.void-invite-card { padding: 4px 2px 2px; }
.void-invite-kicker { color: #7d8897; font-size: 9px; letter-spacing: 2px; }
.void-invite-title { margin-top: 8px; color: #e3b341; font-size: 20px; letter-spacing: 2px; }
.void-invite-line { margin-top: 10px; color: #dce6f2; font-size: 12px; line-height: 1.8; }
.void-invite-meta { display: flex; gap: 16px; margin-top: 8px; color: #9aa6b5; font-size: 11px; }
.void-invite-meta b { color: #58a6ff; letter-spacing: 2px; }
.void-invite-note { margin-top: 10px; color: #7d8897; font-size: 10px; line-height: 1.7; }
.void-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 6px; }
.void-dot.host { background: #e3b341; } .void-dot.guest { background: #58a6ff; } .void-dot.off { background: #4a5360; }
.void-room-body b { font-size: 11px; color: #e6edf5; }
.void-room-body small { margin-left: 6px; color: #7d8897; font-size: 9px; }
.void-remote-wait { padding: 18px; }

.void-run-shell { padding: 10px 12px 14px; }
.void-run-head { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid #2a3340; background: #0d141c; }
.void-run-title b { font-size: 13px; color: #efe9ff; letter-spacing: 1px; }
.void-run-title span { margin-left: 8px; color: #8b96a5; font-size: 10px; }
.void-run-meta { margin-left: auto; display: flex; gap: 12px; align-items: center; color: #8793a4; font-size: 10px; flex-wrap: wrap; }
.void-run-meta b { color: #d5c9f2; }
.void-leave-btn { border-color: #5a3030 !important; color: #e8a0a0 !important; }

.void-map { margin-top: 8px; padding: 9px 10px; border: 1px solid #242e3c; background: #0b1118; overflow-x: auto; }
.void-map-top { display: flex; align-items: baseline; gap: 10px; margin-bottom: 7px; }
.void-map-top b { color: #cfc5e8; font-size: 11px; }
.void-map-top span { color: #778393; font-size: 9px; }
.void-map-top small { margin-left: auto; color: #6f6387; font-size: 9px; white-space: nowrap; }
.void-map-line { display: flex; align-items: center; min-width: max-content; padding: 2px 0; }
.void-node { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 62px; padding: 6px 4px; border: 1px solid #2a3442; background: #111923; color: #9aa6b7; cursor: default; }
.void-node-i { font-size: 8px; color: #5f6b7b; }
.void-node-ico { font-size: 14px; line-height: 1; color: #7f8b9c; }
.void-node-label { font-size: 8px; max-width: 66px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.void-node.current { border-color: #8d70d8; background: #1b1730; box-shadow: 0 0 0 1px rgba(141, 112, 216, .3), inset 0 0 12px rgba(141, 112, 216, .14); }
.void-node.current .void-node-ico { color: #c3a6ff; }
.void-node.resolved { opacity: .55; }
.void-node.branch { border-color: #4d6b58; }
.void-node.branch .void-node-ico { color: #70c08a; }
.void-node.boss { border-color: #7a2a2a; background: #1c0e10; }
.void-node.boss .void-node-ico { color: #ff6b6b; }
.void-node.hidden { border-style: dashed; opacity: .65; }
.void-map-seg { width: 16px; height: 1px; background: #2a3442; flex: 0 0 16px; }

.void-players { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 8px; }
.void-player { padding: 8px 10px; border: 1px solid #273140; background: #0e151e; }
.void-player.me { border-color: #51437a; }
.void-player.dead { opacity: .55; border-color: #5a3030; }
.void-player-head { display: flex; align-items: baseline; gap: 8px; }
.void-player-head b { color: #e5edf7; font-size: 11px; }
.void-player-head small { color: #7f8b9b; font-size: 9px; }
.void-bar { position: relative; height: 13px; margin-top: 5px; border: 1px solid #26303f; background: #080c11; overflow: hidden; }
.void-bar i { display: block; height: 100%; background: #3b8d57; }
.void-bar span { position: absolute; inset: 0; text-align: center; font-size: 8px; line-height: 13px; color: #e9f4ec; text-shadow: 0 1px #000; }
.void-bar.st i { background: #3f6f9e; }
.void-player-sub { margin-top: 4px; color: #8995a6; font-size: 9px; }
.void-stickers { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.void-sticker { padding: 2px 5px; border: 1px solid #364252; background: #121b25; color: #c7d2e0; font-size: 8px; }
.void-sticker.q1 { border-color: #4b5563; } .void-sticker.q2 { border-color: #3f7f5d; color: #9dddba; }
.void-sticker.q3 { border-color: #4c67a6; color: #a9c6ff; } .void-sticker.q4 { border-color: #8a6b32; color: #f0d38e; }
.void-sticker.q5 { border-color: #7b4a9c; color: #d9b0ff; }
.void-bonds { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.void-bonds span { padding: 2px 5px; border-left: 2px solid #e3b341; background: rgba(227, 179, 65, .06); color: #d5bd83; font-size: 8px; }

.void-prompt, .void-event, .void-branch, .void-battle, .void-merchant, .void-reward, .void-result { margin-top: 9px; padding: 11px; border: 1px solid #293343; background: #0d141c; }
.void-section-title { display: flex; align-items: baseline; gap: 8px; color: #e3ddf5; font-size: 12px; letter-spacing: 1px; }
.void-section-title span { color: #7f8b9b; font-size: 9px; letter-spacing: .5px; }
.void-prompt-title { color: #e7e0f7; font-size: 14px; }
.void-prompt .pixel-btn { margin-top: 8px; }
.void-event-desc { margin-top: 5px; color: #98a4b4; font-size: 10px; line-height: 1.6; }
.void-choice-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; margin-top: 8px; }
.void-choice { padding: 8px; border: 1px solid #303b4a; background: #111923; color: #d8e1ee; text-align: left; cursor: pointer; }
.void-choice:hover { border-color: #7b64bb; }
.void-choice.chosen { border-color: #8d70d8; background: #1b1730; }
.void-choice b { display: block; font-size: 11px; }
.void-choice small { display: block; margin-top: 3px; color: #7f8b9b; font-size: 9px; }
.void-choice-kicker { display: block; color: #a58dd6; font-size: 8px; letter-spacing: 1px; }
.void-votes { margin-top: 7px; color: #8793a4; font-size: 9px; }

.void-enemy-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-top: 8px; }
.void-enemy-wrap { min-width: 0; cursor: pointer; }
.void-enemy { padding: 6px; border: 1px solid #313c4c; background: #101721; }
.void-enemy img { display: block; width: 100%; height: 74px; object-fit: contain; image-rendering: pixelated; background: #080c11; }
.void-enemy-name { margin-top: 3px; color: #dfe7f1; font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.void-enemy-tags { color: #8d99a9; font-size: 8px; margin-top: 2px; }
.void-enemy.elite { border-color: #8a6b32; } .void-enemy.elite .void-enemy-tags { color: #e3b341; }
.void-enemy.boss { border-color: #7a2a2a; box-shadow: inset 0 0 18px rgba(200, 30, 30, .12); } .void-enemy.boss .void-enemy-tags { color: #ff6b6b; }
.void-enemy.dead { opacity: .3; filter: grayscale(1); }
.void-enemy.target-me { border-color: #ffd34d; box-shadow: 0 0 0 1px #ffd34d, 0 0 14px rgba(255, 211, 77, .28); }
.void-enemy.target-host { border-color: #ff8b4d; }
.void-enemy.target-guest { border-color: #58a6ff; }

/* 虚空战斗场景：所有单位压在同一张古堡场景里，左侧玩家相邻站位，右侧敌群可点选 */
.void-arena { position: relative; height: 340px; margin-top: 8px; overflow: hidden; border: 1px solid #3b4757; background-color: #070b10; background-size: cover; background-position: center; image-rendering: pixelated; box-shadow: inset 0 0 0 1px rgba(255,255,255,.04), inset 0 -60px 80px rgba(0,0,0,.72); }
.void-arena::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(5,9,14,.55), rgba(5,9,14,.06) 35%, rgba(5,9,14,.06) 65%, rgba(5,9,14,.42)), linear-gradient(180deg, rgba(3,7,11,.35), transparent 34%, rgba(3,7,11,.82)); }
.void-arena::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 34%; pointer-events: none; background: linear-gradient(180deg, transparent, rgba(4,8,12,.9)); }
.void-arena-hud { position: absolute; z-index: 4; left: 9px; right: 9px; top: 7px; display: flex; gap: 14px; flex-wrap: wrap; color: #c8d4e3; font-size: 10px; letter-spacing: .04em; text-shadow: 0 1px 2px #000; }
.void-arena-hud b { color: #ffd34d; }
.void-arena-stage { position: absolute; z-index: 3; inset: 34px 12px 8px; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.void-party { display: flex; align-items: flex-end; gap: 10px; min-width: 0; }
.void-foes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 8px; align-content: end; justify-items: end; max-width: 52%; }
.void-unit { position: relative; width: 104px; padding: 5px 6px 6px; border: 1px solid #364252; background: linear-gradient(180deg, rgba(15,23,33,.92), rgba(7,11,17,.94)); color: #dbe5f1; text-align: left; box-shadow: 0 3px 0 rgba(0,0,0,.5), inset 0 0 0 1px rgba(255,255,255,.03); }
.void-unit-player { border-color: #3f5872; cursor: pointer; }
.void-unit-player.me { border-color: #6d5aa9; box-shadow: 0 0 0 1px rgba(130,105,210,.28), 0 4px 12px rgba(0,0,0,.6); }
.void-unit.dead { border-color: #603434; background: rgba(18,11,13,.94); }
.void-unit-enemy { cursor: pointer; border-color: #5d3232; }
.void-unit-enemy:hover { border-color: #9b4a4a; }
.void-unit-enemy.elite { border-color: #8a6b32; }
.void-unit.boss { width: 154px; }
.void-unit.boss .void-unit-figure { height: 126px; }
.void-unit.boss .void-unit-figure img { width: 146px; height: 146px; }
.void-unit-enemy.boss { border-color: #9a3030; box-shadow: 0 0 22px rgba(190,35,35,.18), inset 0 0 20px rgba(190,35,35,.08); }
.void-unit.target-me { outline: 2px solid #ffd34d; outline-offset: 1px; box-shadow: 0 0 18px rgba(255,211,77,.45), 0 4px 12px rgba(0,0,0,.6); animation: voidTargetPulse .9s ease-in-out infinite; }
.void-unit.is-host-target { border-color: #ff8b4d; }
.void-unit.is-guest-target { border-color: #58a6ff; }
.void-unit-head { display: flex; align-items: baseline; justify-content: space-between; gap: 5px; min-height: 13px; }
.void-unit-head b { color: #e8eff8; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.void-unit-head small { color: #8593a5; font-size: 8px; white-space: nowrap; }
.void-unit-figure { position: relative; height: 88px; margin: 2px -2px 0; display: flex; align-items: flex-end; justify-content: center; overflow: visible; }
.void-unit-figure img { width: 90px; height: 90px; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(0 5px 3px rgba(0,0,0,.75)); }
.void-unit-player .void-unit-figure img { width: 96px; height: 96px; }
.void-unit-enemy.dead { opacity: .42; filter: grayscale(.9); }
.void-corpse { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #6f3b3b; font: 700 34px/1 monospace; }
.void-tomb { position: relative; width: 54px; height: 66px; margin: 12px auto 0; border-radius: 24px 24px 4px 4px; background: linear-gradient(90deg, #5b626c, #8b929d 42%, #565d67); box-shadow: inset -5px 0 8px rgba(0,0,0,.35), 0 4px 0 #252b33, 0 7px 7px rgba(0,0,0,.6); }
.void-tomb::before { content: ''; position: absolute; left: 50%; top: 14px; width: 5px; height: 32px; margin-left: -2px; background: #323840; box-shadow: inset 1px 0 #20252c; }
.void-tomb::after { content: ''; position: absolute; left: 50%; top: 25px; width: 20px; height: 5px; margin-left: -10px; background: #323840; box-shadow: inset 0 1px #20252c; }
.void-dead-label { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; color: #ff7777; font-size: 8px; letter-spacing: .16em; background: rgba(0,0,0,.5); }
.void-unit-bars { margin-top: 3px; }
.void-unit-bars .void-bar { height: 11px; margin-top: 3px; }
.void-unit-bars .void-bar span { line-height: 11px; font-size: 7px; }
.void-unit-enemy .void-bar.hp i { background: linear-gradient(180deg, #c34a4a, #7e2626); }
.void-unit-foot { min-height: 12px; margin-top: 3px; display: flex; flex-wrap: wrap; gap: 3px; color: #8694a6; font-size: 8px; }
.void-unit-foot .void-unit-target { color: #ffd34d; }
.void-unit-foot .void-unit-action { color: #8fd7a3; }
.void-foe-tag { color: #a4afbd; }
.void-unit-enemy.elite .void-foe-tag { color: #e3b341; }
.void-unit-enemy.boss .void-foe-tag { color: #ff6b6b; }
.void-target-flag { position: absolute; z-index: 6; top: 3px; padding: 1px 4px; font-size: 8px; line-height: 1.1; border: 1px solid currentColor; background: rgba(0,0,0,.78); }
.void-target-flag.host { left: 3px; color: #ff9a57; }
.void-target-flag.guest { right: 3px; color: #6fb6ff; }
.void-target-flag.me { right: 3px; color: #ffd34d; }
.void-float { position: absolute; z-index: 7; left: 50%; top: 10%; transform: translateX(-50%); pointer-events: none; font: 800 22px/1 "Courier New", monospace; color: #ff6b6b; text-shadow: 0 2px 0 #000, 0 0 8px rgba(255,60,60,.55); animation: voidFloatUp .9s ease-out forwards; }
.void-float.crit { color: #ffd34d; font-size: 28px; text-shadow: 0 2px 0 #000, 0 0 12px rgba(255,211,77,.75); }
.void-float.burn { color: #ff9a45; }
.void-float.heal { color: #6ee7a0; text-shadow: 0 2px 0 #000, 0 0 10px rgba(80,230,140,.6); }
.void-unit-player.acting { animation: voidLungeRight .34s ease-out; }
.void-unit-enemy.acting { animation: voidLungeLeft .34s ease-out; }
.void-arena.shake { animation: voidArenaShake .3s linear; }
@keyframes voidFloatUp { 0% { opacity: 0; transform: translate(-50%, 8px) scale(.8); } 18% { opacity: 1; transform: translate(-50%, 0) scale(1.08); } 100% { opacity: 0; transform: translate(-50%, -34px) scale(1); } }
@keyframes voidTargetPulse { 0%, 100% { outline-color: #ffd34d; } 50% { outline-color: #fff3b0; } }
@keyframes voidLungeRight { 0%, 100% { transform: translateX(0); } 45% { transform: translateX(10px); } }
@keyframes voidLungeLeft { 0%, 100% { transform: translateX(0); } 45% { transform: translateX(-9px); } }
@keyframes voidArenaShake { 0%, 100% { transform: translate(0, 0); } 20% { transform: translate(-3px, 1px); } 40% { transform: translate(3px, -1px); } 60% { transform: translate(-2px, 0); } 80% { transform: translate(2px, 1px); } }
.void-weapon-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; padding: 6px; border: 1px solid #2a3342; background: #0d141d; }
.void-weapon-pick { display: flex; align-items: center; gap: 5px; min-width: 0; flex: 1 1 220px; }
.void-weapon-pick-label { color: #a992d8; font-size: 9px; letter-spacing: 1px; white-space: nowrap; }
.void-weapon-select { min-width: 0; width: 100%; padding: 5px 6px; border: 1px solid #6b5520; background: #171307; color: #f0d475; font: inherit; font-size: 10px; }
.void-weapon-select:disabled { opacity: .7; border-color: #303b4a; color: #d9e2ef; }
.void-weapon-cycle { flex: 0 0 auto; padding: 5px 9px; border: 1px solid #6b5520; background: #1c1708; color: #f0d475; font: inherit; font-size: 10px; cursor: pointer; }
.void-weapon-cycle:hover:not(:disabled) { border-color: #b8932c; background: #2a2109; }
.void-weapon-cycle:disabled { opacity: .4; cursor: not-allowed; }
.void-battle-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 6px; margin-top: 8px; }
.void-battle-log { margin-top: 7px; padding: 6px 8px; max-height: 108px; overflow-y: auto; border: 1px solid #262f3d; background: #090f16; }
.void-battle-log-row { padding: 1px 0; color: #9aa7b6; font-size: 9px; line-height: 1.45; }
.void-battle-log-row.attack, .void-battle-log-row.kill { color: #e8c56a; }
.void-battle-log-row.damage, .void-battle-log-row.burn { color: #e69090; }
.void-battle-log-row.heal { color: #86c98c; }
.void-battle-log-row.warn, .void-battle-log-row.death { color: #ef8d7b; }
.void-battle-log-row.sticker { color: #b89bdd; }
.void-act { padding: 7px; border: 1px solid #303b4a; background: #111923; color: #d9e2ef; text-align: left; cursor: pointer; }
.void-act:hover:not(:disabled) { border-color: #7b64bb; background: #171f2c; }
.void-act:disabled { opacity: .4; cursor: not-allowed; }
.void-act b { display: block; font-size: 10px; }
.void-act small { display: block; margin-top: 2px; color: #7e8a9a; font-size: 8px; }

.void-shop-list { margin-top: 7px; border-top: 1px solid #222b38; }
.void-shop-row { display: flex; align-items: center; gap: 10px; padding: 7px 2px; border-bottom: 1px solid #1b232e; }
.void-shop-row b { display: block; color: #e0e8f2; font-size: 11px; }
.void-shop-row small { display: block; margin-top: 2px; color: #7f8b9b; font-size: 9px; }
.void-shop-price { margin-left: auto; color: #e3b341; font-size: 11px; white-space: nowrap; }
.void-shop-price span { color: #7f8b9b; font-size: 8px; }
.void-shop-row.sold { opacity: .45; }

.void-sticker-card { padding: 10px; border: 1px solid #364252; background: #111923; color: #dbe5f1; text-align: left; cursor: pointer; }
.void-sticker-card:hover { border-color: #8d70d8; }
.void-sticker-card.q1 { border-color: #4b5563; } .void-sticker-card.q2 { border-color: #3f7f5d; }
.void-sticker-card.q3 { border-color: #4c67a6; } .void-sticker-card.q4 { border-color: #8a6b32; }
.void-sticker-card.q5 { border-color: #7b4a9c; }
.void-sticker-q { display: block; color: #8f9cab; font-size: 8px; letter-spacing: 1px; }
.void-sticker-card b { display: block; margin-top: 4px; font-size: 12px; }
.void-sticker-card small { display: block; margin-top: 4px; color: #94a0b0; font-size: 9px; line-height: 1.5; }

.void-result-kicker { color: #a58dd6; font-size: 9px; letter-spacing: 3px; }
.void-result-title { margin-top: 4px; color: #f0eaff; font-size: 22px; letter-spacing: 3px; }
.void-result-note { margin-top: 5px; color: #8d99a9; font-size: 10px; }
.void-result-player { margin-top: 9px; padding: 9px; border: 1px solid #2a3442; background: #101721; }
.void-result-player > b { color: #e6edf6; font-size: 11px; margin-right: 10px; }
.void-result-player > span { color: #e3b341; font-size: 11px; }
.void-result .pixel-btn { margin-top: 9px; margin-right: 6px; }

/* 结算物资：同名合并为一张卡，整卡颜色按品质，深底浅字保证可读。
   高积分时用固定高度内部滚动，避免物资卡把整个结算页撑满。 */
.void-loot-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  margin-top: 8px; padding-top: 6px; border-top: 1px dashed #2a3442;
}
.void-loot-head b { color: #cbd5e1; font-size: 10px; letter-spacing: 1px; }
.void-loot-head span { color: #8d99a9; font-size: 9px; font-family: var(--mono); }
.void-loot-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 4px; margin-top: 5px; max-height: 128px; overflow-y: auto;
  align-content: start; padding-right: 4px; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: #56657a #111a24;
}
.void-loot-grid::-webkit-scrollbar { width: 6px; }
.void-loot-grid::-webkit-scrollbar-track { background: #111a24; }
.void-loot-grid::-webkit-scrollbar-thumb { background: #46566b; border-radius: 3px; }
.void-loot-grid::-webkit-scrollbar-thumb:hover { background: #5f728c; }
.void-loot-item {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  min-width: 0; padding: 4px 6px; border: 1px solid #4b5563;
  background: #303740; color: #eef4fb; font-size: 9.5px; line-height: 1.35;
}
.void-loot-item .void-loot-name {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.void-loot-item .void-loot-count {
  flex: 0 0 auto; color: #fff; font-family: var(--mono); font-size: 10px; font-weight: 700;
}
.void-loot-item.q2 { border-color: #3fb950; background: #173f2a; color: #c5f6d5; }
.void-loot-item.q2 .void-loot-count { color: #82efa8; }
.void-loot-item.q3 { border-color: #58a6ff; background: #16304d; color: #cfe6ff; }
.void-loot-item.q3 .void-loot-count { color: #8dc6ff; }
.void-loot-item.q4 { border-color: #a371f7; background: #2b1d46; color: #e8d7ff; }
.void-loot-item.q4 .void-loot-count { color: #cba7ff; }
.void-loot-item.q5 { border-color: #e3b341; background: #3b2d0e; color: #ffe9a8; }
.void-loot-item.q5 .void-loot-count { color: #ffd35c; }
.void-loot-empty { margin-top: 5px; color: #7f8b9b; font-size: 9px; }

@media (max-width: 720px) {
  .void-loot-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); max-height: 146px; }
  .void-loot-item { font-size: 9px; padding: 4px 5px; }
}

.void-log { margin-top: 9px; max-height: 90px; overflow-y: auto; padding: 6px 8px; border-top: 1px solid #222b38; background: rgba(0,0,0,.18); }
.void-log-row { color: #7f8b9b; font-size: 9px; line-height: 1.6; }
.void-log-row.attack { color: #c8b3ff; } .void-log-row.kill, .void-log-row.boss { color: #e3b341; }
.void-log-row.damage, .void-log-row.warn { color: #e18b8b; } .void-log-row.heal { color: #7fd6a1; }
.void-log-row.sticker { color: #9fc6ff; } .void-log-row.result { color: #e3b341; }

@media (max-width: 720px) {
  .void-hero-title { font-size: 20px; }
  .void-lobby-grid, .void-room-body, .void-players { grid-template-columns: 1fr; }
  .void-floor-row { grid-template-columns: 1fr; }
  .void-choice-row, .void-battle-actions { grid-template-columns: repeat(2, 1fr); }
  .void-enemy-row { grid-template-columns: repeat(2, 1fr); }
  .void-enemy img { height: 62px; }
  .void-arena { height: 300px; }
  .void-arena-stage { inset: 28px 5px 5px; flex-direction: column; align-items: stretch; justify-content: space-between; gap: 4px; overflow-y: auto; overflow-x: hidden; }
  .void-party { order: 2; width: 100%; gap: 6px; justify-content: flex-start; align-items: flex-end; }
  .void-foes { order: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; justify-items: stretch; gap: 4px 6px; width: 100%; max-width: 100%; }
  .void-foes .void-unit { width: 100%; }
  .void-unit { flex: 0 0 auto; width: 88px; padding: 2px; }
  .void-unit.boss, .void-foes .void-unit.boss { width: 100%; }
  .void-unit-head { min-height: 10px; }
  .void-unit-head b { font-size: 7px; }
  .void-unit-head small { font-size: 5px; }
  .void-unit-figure { height: 34px; }
  .void-unit.boss .void-unit-figure { height: 44px; }
  .void-unit-figure img, .void-unit-player .void-unit-figure img { width: 36px; height: 36px; }
  .void-unit.boss .void-unit-figure img { width: 48px; height: 48px; }
  .void-tomb { width: 22px; height: 26px; margin-top: 4px; }
  .void-tomb::before { top: 5px; height: 12px; width: 3px; margin-left: -1.5px; }
  .void-tomb::after { top: 9px; width: 8px; height: 3px; margin-left: -4px; }
  .void-unit-bars .void-bar { height: 7px; }
  .void-unit-bars .void-bar span { font-size: 5px; line-height: 7px; }
  .void-unit-foot { min-height: 8px; font-size: 5px; }
  .void-float { font-size: 18px; }
  .void-float.crit { font-size: 23px; }
  .void-run-head { flex-wrap: wrap; }
  .void-map-line { flex-wrap: wrap; min-width: 0; row-gap: 5px; }
  .void-map-seg { display: none; }
  .void-node { flex: 1 1 28%; min-width: 0; }
  .void-run-meta { margin-left: 0; width: 100%; gap: 8px; }
  .void-node { min-width: 54px; }
}

.void-battle-utility { display: flex; justify-content: flex-end; margin-top: 5px; }
.void-notes-modal { width: min(820px, 96vw) !important; max-height: 94vh !important; }
.void-notes { display: flex; flex-direction: column; gap: 8px; color: #dbe5f1; }
.void-notes-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 10px; border: 1px solid #4a3a68; background: linear-gradient(180deg, #1a1228, #0d141e); }
.void-notes-head b { color: #e7dcff; font-size: 17px; letter-spacing: 1px; }
.void-notes-head span { display: block; margin-top: 3px; color: #9a8fb3; font-size: 9px; }
.void-notes-insp { text-align: right; }
.void-notes-insp span { color: #a99cc4; }
.void-notes-insp b { margin-top: 0; color: #ffd34d; font-size: 20px; }
.void-notes-tip { padding: 7px 9px; border-left: 2px solid #8d70d8; background: rgba(141, 112, 216, .08); color: #a9a0c0; font-size: 9px; line-height: 1.65; }
.void-note-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.void-note-node { min-width: 0; padding: 7px 8px; border: 1px solid #303b4b; background: linear-gradient(180deg, rgba(15, 22, 32, .96), rgba(7, 11, 17, .97)); }
.void-note-node.maxed { border-color: #4b7a55; background: linear-gradient(180deg, rgba(18, 35, 25, .92), rgba(7, 13, 10, .96)); }
.void-note-node.locked { opacity: .55; filter: grayscale(.25); }
.void-note-node-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.void-note-node-top b { color: #e6edf6; font-size: 11px; }
.void-note-node-top span { color: #9a8fb3; font-size: 10px; white-space: nowrap; }
.void-note-bar { height: 4px; margin: 6px 0; background: #1b2430; overflow: hidden; }
.void-note-bar i { display: block; height: 100%; background: linear-gradient(90deg, #7b64bb, #c7a8ff); }
.void-note-node-desc { min-height: 22px; color: #a9b6c6; font-size: 9px; line-height: 1.35; }
.void-note-node-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; padding-top: 4px; border-top: 1px solid #283241; }
.void-note-node-foot span { color: #8b96a5; font-size: 9px; }
.void-notes-mil-title { margin-top: 2px; padding-top: 4px; border-top: 1px dashed #3a334f; color: #d2c5f0; font-size: 10px; letter-spacing: 1px; }
.void-note-milestones { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.void-note-milestone { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 3px 8px; padding: 6px 8px; border: 1px solid #2c3542; background: rgba(11, 16, 23, .7); }
.void-note-milestone.active { border-color: #51704b; background: rgba(34, 55, 32, .5); }
.void-note-milestone b { color: #e3b341; font-size: 10px; }
.void-note-milestone span { color: #ded4f6; font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.void-note-milestone small { grid-column: 1 / -1; color: #9aa8b9; font-size: 9px; line-height: 1.35; }
.void-note-milestone em { color: #7f8a9a; font-size: 9px; font-style: normal; white-space: nowrap; }
.void-note-milestone.active em { color: #6fce8b; }
.void-note-badge { display: inline-block; margin-left: 5px; padding: 0 4px; border: 1px solid #5e4a86; color: #cbb8ff; font-size: 8px; line-height: 14px; }
.void-note-shield { color: #9fe3b1; font-size: 9px; }
.void-bag-modal { width: min(780px, 96vw) !important; }.void-bag { display: flex; flex-direction: column; gap: 10px; color: #dbe5f1; }
.void-bag-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid #364252; background: #0c141e; }
.void-bag-coin { font-size: 11px; color: #8998aa; }
.void-bag-coin b { margin-left: 4px; color: #ffd34d; font-size: 18px; }
.void-bag-sum { font-size: 10px; color: #9aa8b9; }
.void-bag-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.void-bag-card { min-width: 0; padding: 8px 10px; border: 1px solid #364252; background: linear-gradient(180deg, rgba(15,23,33,.95), rgba(7,11,17,.96)); }
.void-bag-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 6px; padding-bottom: 5px; border-bottom: 1px solid #2a3646; color: #e8eff8; font-size: 12px; }
.void-bag-title small { color: #7f8fa3; font-size: 9px; }
.void-bag-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px; padding: 4px 0; border-bottom: 1px dashed rgba(70,86,105,.28); }
.void-bag-name { font-size: 11px; color: #ffd98a; }
.void-bag-count { color: #ffd34d; font-size: 11px; }
.void-bag-desc { flex: 1 1 100%; color: #aebccc; font-size: 10px; line-height: 1.4; }
.void-bag-bond { margin-top: 8px; padding-top: 6px; border-top: 1px solid #2a3646; }
.void-bag-bond div { display: flex; flex-direction: column; gap: 2px; padding: 3px 0; }
.void-bag-bond b { color: #8fd3a5; font-size: 10px; }
.void-bag-bond span { color: #aebccc; font-size: 9px; line-height: 1.4; }
.void-bag-total { padding: 4px 0 6px; }
.void-bag-total-head { margin-bottom: 3px; color: #ffd34d; font-size: 10px; }
.void-bag-total div:not(.void-bag-total-head) { padding: 2px 0; color: #c8d4e2; font-size: 10px; }
.void-bag-item { padding: 3px 0; color: #c8d4e2; font-size: 10px; border-bottom: 1px dashed rgba(70,86,105,.22); }
.void-bag-empty { padding: 6px 0; color: #7f8fa3; font-size: 10px; }
@media (max-width: 720px) {
  .void-bag-modal { width: 96vw !important; }
  .void-notes-modal { width: 96vw !important; }
  .void-note-grid { grid-template-columns: 1fr; gap: 6px; }
  .void-note-node { padding: 6px 8px; }
  .void-note-node-desc { min-height: 0; }
  .void-note-milestones { grid-template-columns: 1fr; }
  .void-note-milestone { grid-template-columns: 42px minmax(0, 1fr) auto; }
  .void-notes-head b { font-size: 15px; }
  .void-bag-grid { grid-template-columns: 1fr; gap: 7px; }
  .void-bag-card { padding: 6px 8px; }
  .void-bag-coin b { font-size: 15px; }
  .void-bag-name, .void-bag-count { font-size: 10px; }
  .void-bag-desc { font-size: 9px; }
}






/* ==========================================================================
   靶场（SHOOTING RANGE）
   ========================================================================== */
.act-btn.range .ico { color: #e3b341; }
.act-btn.range { border-color: #4f4325; }

.range-entry-tab {
  width: 100%; display: flex; align-items: center; gap: 10px; text-align: left;
  padding: 10px 12px; margin: 0 0 10px; border: 1px solid #6b5520;
  background: linear-gradient(90deg, #1a1609, #0b1118 72%);
  color: var(--text); cursor: pointer;
}
.range-entry-tab:hover { border-color: #d4af37; background: linear-gradient(90deg, #221c0b, #0d151e 72%); }
.range-entry-tab .ret-ico { font-size: 22px; line-height: 1; }
.range-entry-tab .ret-tx { flex: 1; min-width: 0; }
.range-entry-tab .ret-tx b { display: block; font-size: 14px; color: #f0d475; letter-spacing: 1px; }
.range-entry-tab .ret-tx em { display: block; margin-top: 2px; font-style: normal; font-size: 10.5px; color: var(--text-dim); }
.range-entry-tab .ret-go { font-family: var(--mono); font-size: 11px; color: #d4af37; }

.range-modal .modal-body { padding-bottom: 6px; }
.range-hero {
  display: grid; grid-template-columns: 58px 1fr auto; gap: 12px; align-items: center;
  padding: 12px; border: 1px solid #3b3420;
  background: radial-gradient(circle at 12% 35%, rgba(212,175,55,0.12), transparent 42%), #0b1118;
}
.range-hero-mark { font-size: 36px; text-align: center; filter: drop-shadow(0 0 8px rgba(212,175,55,0.35)); }
.range-kicker { font-family: var(--mono); font-size: 9px; letter-spacing: 2px; color: #8b7a4a; }
.range-hero-copy h3 { margin: 2px 0 4px; font-size: 18px; letter-spacing: 3px; color: #f0d475; }
.range-hero-copy p { margin: 0; font-size: 11px; line-height: 1.6; color: var(--text-dim); }
.range-hero-tag {
  padding: 4px 8px; border: 1px solid #3b6b3b; color: #7ee787;
  font-family: var(--mono); font-size: 10px; letter-spacing: 1px; white-space: nowrap;
}
.range-last {
  margin-top: 8px; padding: 8px 10px; border-left: 2px solid #d4af37;
  background: #141307; color: #d9c77c; font-size: 11.5px;
}
.range-mirror {
  display: grid; grid-template-columns: repeat(3, auto) 1fr; gap: 8px 16px;
  align-items: center; margin: 8px 0 2px; padding: 8px 10px;
  border: 1px solid #26303f; background: #080d13; font-size: 11px; color: var(--text-dim);
}
.range-mirror b { color: #58a6ff; font-family: var(--mono); }
.range-mirror .muted { justify-self: end; font-size: 10px; }
.range-stats { margin-top: 8px; display: grid; gap: 7px; }
.range-stat {
  padding: 8px 10px; border: 1px solid #26303f; background: #0a1018;
}
.range-stat-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.range-stat-head > div:first-child { min-width: 0; }
.range-stat-head b { font-size: 12.5px; letter-spacing: 0.5px; color: #d7e2ef; }
.range-stat-head em { margin-left: 8px; font-style: normal; font-family: var(--mono); font-size: 9.5px; color: #63707f; }
.range-value { text-align: right; line-height: 1.1; white-space: nowrap; }
.range-value b { font-family: var(--mono); font-size: 16px; color: #f0d475; }
.range-value em { display: block; margin-top: 2px; font-style: normal; font-family: var(--mono); font-size: 9px; color: #8b7a4a; }
.range-control {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) 34px; gap: 7px;
  align-items: center; margin-top: 6px;
}
.range-step {
  width: 34px; height: 30px; padding: 0; cursor: pointer;
  border: 1px solid #3b4657; background: #111a24; color: #d7e2ef;
  font-size: 17px; line-height: 1; font-family: var(--mono);
}
.range-step:hover:not(:disabled) { border-color: #d4af37; color: #f0d475; background: #1b1a0d; }
.range-step:disabled { opacity: 0.3; cursor: not-allowed; }
.range-slider {
  -webkit-appearance: none; appearance: none; width: 100%; height: 26px;
  background: transparent; cursor: pointer; margin: 0;
}
.range-slider::-webkit-slider-runnable-track {
  height: 8px; border: 1px solid #3b4657;
  background: linear-gradient(90deg, #18232f, #3a3a22 62%, #6b5520);
}
.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 16px; height: 24px; margin-top: -9px;
  border: 1px solid #f0d475; background: #d4af37;
  box-shadow: 0 0 0 2px #0a1018, 0 0 8px rgba(212,175,55,0.45);
}
.range-slider::-moz-range-track {
  height: 8px; border: 1px solid #3b4657;
  background: linear-gradient(90deg, #18232f, #3a3a22 62%, #6b5520);
}
.range-slider::-moz-range-thumb {
  width: 14px; height: 22px; border-radius: 0; border: 1px solid #f0d475;
  background: #d4af37; box-shadow: 0 0 0 2px #0a1018;
}
.range-tip { margin-top: 8px; font-size: 10.5px; line-height: 1.6; color: #6e7b8b; }

.batk.range-evacuate { border-color: #3b6b3b; grid-column: 1 / -1; }
.batk.range-evacuate .k { color: #7ee787; }

/* 靶场比标准战斗多一行「撤离靶场」；桌面端略压舞台高度，避免撤离键被弹窗底边裁掉。
   窄屏已有 640/250 + 68px 日志的压缩规则，不再重复覆盖。 */
@media (min-width: 901px) {
  .modal.battle.range-battle .battle-stage canvas { aspect-ratio: 640 / 270; }
}

@media (max-width: 760px) {
  .range-hero { grid-template-columns: 38px 1fr; gap: 8px; padding: 7px 8px; }
  .range-hero-mark { font-size: 23px; }
  .range-hero-copy h3 { font-size: 15px; margin: 1px 0 2px; }
  .range-hero-copy p { font-size: 10px; line-height: 1.45; }
  .range-hero-tag { display: none; }
  .range-mirror { grid-template-columns: 1fr 1fr; gap: 3px 8px; margin-top: 6px; padding: 5px 8px; font-size: 10px; }
  .range-mirror .muted { grid-column: 1 / -1; justify-self: start; font-size: 9.5px; }
  .range-stats { margin-top: 6px; gap: 5px; }
  .range-stat { padding: 5px 7px; }
  .range-stat-head b { font-size: 11.5px; }
  .range-stat-head em { display: block; margin: 1px 0 0; font-size: 8.5px; }
  .range-value b { font-size: 14px; }
  .range-value em { font-size: 8.5px; margin-top: 1px; }
  .range-control { grid-template-columns: 36px minmax(0, 1fr) 36px; gap: 5px; margin-top: 3px; }
  .range-step { width: 36px; height: 30px; font-size: 17px; }
  .range-slider { height: 26px; }
  .range-tip { margin-top: 5px; font-size: 9.5px; line-height: 1.45; }
}
