/* 考公农场 · 手机优先
   配色：夜色田园（深绿 + 麦黄 + 苔绿），大触控目标、安全区适配 */

:root {
  --bg: #0a130d;
  --bg-2: #0f1d14;
  --card: #14251a;
  --card-2: #1a2f20;
  --line: rgba(140, 200, 150, .16);
  --text: #EAF4EC;
  --dim: #8CA394;
  --green: #6FCF7C;
  --green-deep: #3E9B57;
  --wheat: #F2C24B;
  --water: #4FB8E8;
  --red: #FF6B6B;
  --r: 14px;
  --tab-h: 62px;
  --hud-h: 96px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* ============================================================
   主题：Industrial（按 Ilm-Alan/frontend-design 的 anchor 锁 token）
   ------------------------------------------------------------
   Surface  : 暖黑 #0B0C0A，面板 #121311
   Type     : 等宽（Latin/数字走 mono；中文会落回系统中文字重，这点如实标注）
   Signal   : 只有一个语义色 —— 绿 #00E676；红 #FF3B30 仅用于错误
   Structure: 平的；1px 描边代替阴影；圆角归零；数字 tabular-nums
   不同点   : 每张卡片自动带「§NN」角标 —— 整个界面读起来像一台仪器的面板
   ============================================================ */
[data-theme="industrial"] {
  --bg: #0B0C0A;
  --bg-2: #0E0F0D;
  --card: #121311;
  --card-2: #171814;
  --line: #2A2C27;
  --text: #E8E8E4;
  --dim: #8A8C84;
  --green: #00E676;
  --green-deep: #00B85E;
  --wheat: #FFB800;
  --water: #9AA0A6;
  --red: #FF3B30;
  --r: 0px;
  --mono: ui-monospace, "JetBrains Mono", "IBM Plex Mono", "Cascadia Mono",
    Consolas, "Courier New", monospace;
}
[data-theme="industrial"] body {
  background: #0B0C0A;
  background-image: none;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
/* 直角 + 无阴影 + 无毛玻璃：Industrial 的硬边界，一条都不能破 */
[data-theme="industrial"] *,
[data-theme="industrial"] *::before,
[data-theme="industrial"] *::after {
  border-radius: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
/* 数字一律等宽 */
[data-theme="industrial"] .hud,
[data-theme="industrial"] .suan-stat .ss-v,
[data-theme="industrial"] .suan-q,
[data-theme="industrial"] .dun-title,
[data-theme="industrial"] .wl-bar,
[data-theme="industrial"] .pg-input,
[data-theme="industrial"] .suan-input,
[data-theme="industrial"] .ci-k,
[data-theme="industrial"] .move-chip,
[data-theme="industrial"] .art-pips {
  font-variant-numeric: tabular-nums;
  font-family: var(--mono);
}
/* 卡片：1px 描边 + 自动编号角标 */
[data-theme="industrial"] .view { counter-reset: cardn; }
[data-theme="industrial"] .card {
  border: 1px solid var(--line);
  background: var(--card);
  counter-increment: cardn;
  position: relative;
}
[data-theme="industrial"] .card > h3 {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .12em;
  text-transform: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}
[data-theme="industrial"] .card::before {
  content: "§" counter(cardn, decimal-leading-zero);
  position: absolute;
  top: -1px; left: -1px;
  padding: 2px 6px;
  font: 700 10px/1.5 var(--mono);
  letter-spacing: .06em;
  color: var(--green);
  background: #0B0C0A;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  pointer-events: none;
}
/* 底部导航：等宽小字 + 顶部 1px 规则线 */
[data-theme="industrial"] .tabbar {
  background: #0B0C0A;
  border-top: 1px solid var(--line);
}
[data-theme="industrial"] .tab {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .08em;
  color: #6E706A;
}
[data-theme="industrial"] .tab.active { color: var(--green); }
[data-theme="industrial"] .tab.active span { transform: none; }
/* 顶部 HUD：细线分隔，数字等宽 */
[data-theme="industrial"] .hud {
  background: #0B0C0A;
  border-bottom: 1px solid var(--line);
}
/* 按钮：方角 + 1px，靠颜色而不是阴影表示层级 */
[data-theme="industrial"] .primary {
  background: var(--green);
  color: #06110A;
  border: 1px solid var(--green);
  font-family: var(--mono);
  letter-spacing: .06em;
}
[data-theme="industrial"] .ghost,
[data-theme="industrial"] .pg-btn,
[data-theme="industrial"] .action-btn,
[data-theme="industrial"] .filter-btn {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  font-family: var(--mono);
}

[hidden] { display: none !important; }

html, body {
  margin: 0; min-height: 100%;
  background:
    radial-gradient(700px 400px at 50% -8%, rgba(111,207,124,.13), transparent 65%),
    linear-gradient(180deg, #0b1610, var(--bg) 55%, #070f0a);
  background-attachment: fixed;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
  overscroll-behavior-y: contain;
}

body {
  padding-top: calc(var(--hud-h) + env(safe-area-inset-top));
  padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom));
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .88em; background: rgba(234,244,236,.08);
  padding: 1px 5px; border-radius: 5px;
}

/* ---------------- 顶部 HUD ---------------- */
.hud {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  padding: calc(8px + env(safe-area-inset-top)) 14px 10px;
  background: rgba(10,19,13,.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.hud-row { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.hud-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; color: var(--dim); white-space: nowrap;
  padding: 5px 10px; border-radius: 999px;
  background: rgba(234,244,236,.05); border: 1px solid var(--line);
}
.hud-chip b { color: var(--text); font-weight: 800; font-variant-numeric: tabular-nums; }
.hud-chip .ic { font-size: 12px; }
.hud-chip.coins { color: var(--wheat); border-color: rgba(242,194,75,.3); background: rgba(242,194,75,.1); }
.hud-chip.coins b { color: var(--wheat); }
.hud-chip.season { margin-left: auto; color: var(--green); border-color: rgba(111,207,124,.3); background: rgba(111,207,124,.1); }
.hud-btn {
  flex: none; width: 38px; height: 34px; border-radius: 10px;
  font-size: 16px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(234,244,236,.05);
  color: var(--text);
}
.hud-btn:active { transform: scale(.94); }

.energy-label {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 11px; color: var(--dim); letter-spacing: .8px; margin-bottom: 5px;
  font-variant-numeric: tabular-nums;
}
.energy-bar { height: 9px; border-radius: 999px; background: rgba(234,244,236,.1); overflow: hidden; }
.energy-bar > i {
  display: block; height: 100%; width: 100%; border-radius: 999px;
  transform-origin: left center;
  background: linear-gradient(90deg, var(--green), #9BE7A8);
  transition: transform .35s ease, background .35s;
}
.energy-low .energy-bar > i { background: linear-gradient(90deg, var(--wheat), #FF9F45); }
.energy-empty .energy-bar > i { background: linear-gradient(90deg, var(--red), #C2334D); }

/* ---------------- 视图 ---------------- */
.view { display: none; padding: 14px 14px 18px; max-width: 620px; margin: 0 auto; }
.view.active { display: block; animation: fadeIn .2s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.vtitle { margin: 4px 0 14px; font-size: 18px; font-weight: 800; letter-spacing: 1px; }

/* ---------------- 俯视地图 ---------------- */
.map-wrap {
  position: relative; width: 100%; border-radius: var(--r); overflow: hidden;
  border: 1px solid var(--line);
  background: #0c1a12;
  box-shadow: inset 0 0 40px rgba(0,0,0,.6), 0 16px 34px -22px rgba(0,0,0,.95);
}
#mapCanvas {
  display: block; width: 100%;
  height: calc(100dvh - var(--hud-h) - var(--tab-h)
    - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 96px);
  min-height: 300px; max-height: 560px;
  touch-action: none;
  image-rendering: auto;
}
.season-banner {
  position: absolute; top: 8px; left: 8px; right: 8px;
  padding: 7px 11px; border-radius: 10px;
  font-size: 11px; line-height: 1.5; color: #CFEBD6;
  background: rgba(10,19,13,.82); backdrop-filter: blur(8px);
  border: 1px solid rgba(111,207,124,.3);
  pointer-events: none;
}
.season-banner b { color: var(--green); }

/* 图鉴分页器 */
.codex-pager {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; flex-wrap: wrap; margin: 8px 0;
}
.pg-btn {
  padding: 7px 12px; border-radius: 10px; font-size: 12px;
  color: #EAF4EC; background: rgba(255,255,255,.07);
  border: 1px solid var(--line); cursor: pointer;
}
.pg-btn:disabled { opacity: .4; cursor: default; }
.pg-btn.ghost { background: transparent; }
.pg-jump {
  font-size: 12px; color: var(--dim);
  display: inline-flex; align-items: center; gap: 4px;
}
.pg-input {
  width: 62px; padding: 6px 8px; border-radius: 8px;
  background: rgba(255,255,255,.06); color: var(--text);
  border: 1px solid var(--line); font-size: 12px; text-align: center;
}
.rename-row { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.rename-row .pg-input { width: auto; flex: 1; text-align: left; font-size: 13px; padding: 8px 10px; }

/* ============ 速算 ============ */
.suan-stats {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px;
}
.suan-stat {
  flex: 1 1 90px; padding: 9px 10px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 2px;
}
.suan-stat .ss-k { font-size: 10.5px; color: var(--dim); }
.suan-stat .ss-v { font-size: 16px; font-weight: 800; color: var(--green); }
.suan-stat.warn .ss-v { color: var(--wheat); }
.suan-stat.bad .ss-v { color: var(--red); }

.suan-card { display: flex; flex-direction: column; gap: 10px; }
.suan-row { display: flex; gap: 8px; align-items: center; }
.suan-row .mod-select { flex: 1; }

.suan-q {
  text-align: center; font-size: 30px; font-weight: 800; letter-spacing: .04em;
  padding: 16px 8px 6px; color: var(--text); font-variant-numeric: tabular-nums;
}
.suan-window {
  text-align: center; font-size: 11.5px; color: var(--dim);
  font-variant-numeric: tabular-nums; min-height: 16px;
}
.suan-input {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  background: rgba(255,255,255,.06); border: 1px solid var(--line);
  color: var(--text); font-size: 20px; font-weight: 700;
  text-align: center; font-variant-numeric: tabular-nums;
  letter-spacing: .05em; font-family: inherit;
}
.suan-input:focus { outline: none; border-color: var(--green-deep); }
.suan-btns { display: flex; gap: 8px; }
.suan-btns .wide { flex: 1; margin: 0; }

.suan-fb {
  padding: 10px 12px; border-radius: 12px; font-size: 12.5px; line-height: 1.7;
  border: 1px solid var(--line); background: rgba(255,255,255,.04);
  font-variant-numeric: tabular-nums;
}
.suan-fb.good { border-color: rgba(111,207,124,.5); background: rgba(111,207,124,.1); }
.suan-fb.bad { border-color: rgba(255,107,107,.5); background: rgba(255,107,107,.1); }
.suan-fb b { color: var(--wheat); }

.suan-tips summary {
  cursor: pointer; font-size: 12.5px; color: var(--green);
  padding: 6px 0; user-select: none;
}
.suan-tips .tip-row {
  font-size: 12px; line-height: 1.75; color: #CFEBD6;
  padding: 5px 0; border-top: 1px dashed rgba(140,200,150,.16);
}
.suan-tips .tip-row b { color: var(--wheat); }
.suan-tips code {
  background: rgba(255,255,255,.08); padding: 1px 5px; border-radius: 5px;
  font-size: 11.5px;
}
.suan-rules { margin: 0; padding-left: 18px; font-size: 12px; line-height: 1.85; color: #CFEBD6; }
.suan-rules li { margin-bottom: 6px; }
.suan-rules b { color: var(--wheat); }
.suan-rules code {
  background: rgba(255,255,255,.08); padding: 1px 5px; border-radius: 5px;
  font-size: 11.5px;
}

/* ============ 每题限时 ============ */
.qtime {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 8px; font-size: 12px; color: var(--dim);
}
.qtime-lab { flex: none; letter-spacing: .04em; }
.qtime-sel {
  flex: 1; padding: 7px 10px; border-radius: 10px; font-size: 12px;
  background: rgba(255,255,255,.06); color: var(--text);
  border: 1px solid var(--line); font-family: inherit;
}
.qtime-num {
  flex: none; min-width: 42px; text-align: right;
  font-variant-numeric: tabular-nums; font-weight: 700; color: var(--wheat);
}
.qtime-num.warn { color: var(--red); }
/* 倒计时条：宽度按剩余时间收缩 */
.qtime-bar {
  height: 3px; margin: 0 0 10px; border-radius: 2px;
  background: rgba(255,255,255,.08); overflow: hidden;
}
.qtime-bar > i {
  display: block; height: 100%; width: 100%;
  background: var(--green);
  transform-origin: left center;
  transition: transform .1s linear, background .2s linear;
}
.qtime-bar.warn > i { background: var(--red); }
.qtime-bar[hidden] { display: none !important; }

/* ============ 面试 ============ */
.ms-prompt {
  font-size: 15px; line-height: 1.85; color: var(--text);
  padding: 4px 0 10px; white-space: pre-wrap;
}
.ms-pts { display: flex; flex-wrap: wrap; gap: 7px; padding-bottom: 8px; }
.ms-chip {
  padding: 6px 11px; border-radius: 10px; font-size: 11.5px;
  background: rgba(255,255,255,.05); border: 1px solid var(--line);
  color: var(--dim); cursor: pointer; text-align: left;
  max-width: 100%;
}
.ms-chip.on {
  background: rgba(111,207,124,.16);
  border-color: rgba(111,207,124,.55); color: var(--green);
}
.ms-ref { margin: 6px 0 10px; }
.ms-ref summary {
  cursor: pointer; font-size: 12.5px; color: var(--green); padding: 6px 0;
  user-select: none;
}
.ms-ref-body, #msRefBody {
  font-size: 12px; line-height: 1.85; color: #CFEBD6;
  border-top: 1px dashed rgba(140,200,150,.16); padding-top: 8px;
}
#msRefBody .ms-sec { margin-bottom: 10px; }
#msRefBody .ms-sec b { color: var(--wheat); }

/* ============ 阅读合集 ============ */
.rd-title {
  font-size: 16px; font-weight: 800; line-height: 1.6;
  color: var(--text); padding: 2px 0 10px;
}
.rd-body {
  font-size: 14px; line-height: 2; color: #D7E4DA;
  white-space: pre-wrap; word-break: break-word;
  max-height: 58vh; overflow-y: auto;
  border-top: 1px solid var(--line); padding-top: 10px;
}

/* ============ 冒险地图（可走动的场景） ============ */
.dungeon {
  position: fixed; inset: 0; z-index: 70;
  background: #060e08;
}
.dungeon[hidden] { display: none !important; }
#dungeonCanvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%; display: block;
  touch-action: none;
}
.dun-top {
  position: absolute; top: 0; left: 0; right: 0;
  padding: 10px 12px; display: flex; align-items: center; gap: 10px;
  background: linear-gradient(180deg, rgba(6,14,8,.85), rgba(6,14,8,0));
  pointer-events: none;
}
.dun-back {
  pointer-events: auto;
  padding: 8px 12px; border-radius: 10px; font-size: 13px;
  color: #EAF4EC; background: rgba(10,19,13,.86);
  border: 1px solid rgba(140,200,150,.3); cursor: pointer;
}
.dun-title {
  font-size: 13px; color: #FFE9A8; font-weight: 700;
  text-shadow: 0 2px 8px rgba(0,0,0,.8);
}
.dun-tip {
  position: absolute; left: 12px; right: 12px; bottom: 14px;
  padding: 8px 12px; border-radius: 10px;
  font-size: 11.5px; line-height: 1.5; color: #CFEBD6;
  background: rgba(10,19,13,.8); backdrop-filter: blur(8px);
  border: 1px solid rgba(111,207,124,.22);
  pointer-events: none;
}
.dungeon .action-btn { z-index: 3; }
.dun-enter { display: flex; flex-direction: column; gap: 8px; }
.dun-area {
  display: flex; align-items: center; gap: 10px;
  padding: 10px; border-radius: 12px; cursor: pointer;
  background: rgba(255,255,255,.05); border: 1px solid var(--line);
  color: var(--text); text-align: left; width: 100%;
}
.dun-area img {
  width: 74px; height: 40px; object-fit: cover;
  border-radius: 8px; flex: none;
}
.dun-area .da-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dun-area .da-name { font-size: 13px; font-weight: 600; }
.dun-area .da-sub { font-size: 11px; color: var(--dim); }

/* 走进新地界：中间偏上弹一下就走 */
.region-banner {
  position: absolute; left: 50%; top: 64px;
  transform: translate(-50%, -6px);
  padding: 8px 18px; border-radius: 999px;
  font-size: 13px; letter-spacing: .06em; color: #FFE9A8;
  background: rgba(10,19,13,.9); backdrop-filter: blur(8px);
  border: 1px solid rgba(242,194,75,.45);
  box-shadow: 0 6px 20px rgba(0,0,0,.45);
  white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity .28s ease, transform .28s ease;
  z-index: 6;
}
.region-banner.show { opacity: 1; transform: translate(-50%, 0); }
.region-banner b { color: #FFE9A8; font-weight: 700; }

.action-btn {
  position: absolute; right: 14px; bottom: 92px; z-index: 5;
  min-width: 106px; padding: 14px 18px; cursor: pointer;
  font-family: inherit; font-size: 14.5px; font-weight: 800; letter-spacing: .5px;
  color: #06210F; border: 0; border-radius: 999px;
  background: linear-gradient(135deg, var(--wheat), #FF9F45);
  box-shadow: 0 10px 26px -10px rgba(242,194,75,.95);
  animation: actIn .18s ease both;
}
.action-btn:active { transform: scale(.96); }
@keyframes actIn { from { opacity: 0; transform: translateY(8px) scale(.94); } to { opacity: 1; transform: none; } }

.joystick {
  position: absolute; left: 16px; bottom: 18px; z-index: 5;
  width: 106px; height: 106px; border-radius: 50%;
  background: rgba(10,19,13,.42);
  border: 1.5px solid rgba(140,200,150,.34);
  backdrop-filter: blur(4px);
  touch-action: none;
}
.joy-knob {
  position: absolute; left: 50%; top: 50%;
  width: 46px; height: 46px; margin: -23px 0 0 -23px;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 32%, #9BE7A8, #3FA85C);
  border: 1.5px solid rgba(255,255,255,.35);
  box-shadow: 0 6px 16px -6px rgba(0,0,0,.9);
  transition: transform .04s linear;
  pointer-events: none;
}
.map-hint {
  position: absolute; right: 16px; bottom: 18px; z-index: 5;
  width: 56px; height: 56px; border-radius: 50%; cursor: pointer;
  font-size: 22px; border: 1.5px solid rgba(140,200,150,.34);
  background: rgba(10,19,13,.55); backdrop-filter: blur(4px);
  color: var(--text);
}
.map-hint:active { transform: scale(.94); }

.map-legend {
  display: flex; flex-wrap: wrap; gap: 6px 14px;
  margin-top: 10px; font-size: 11px; color: var(--dim); line-height: 1.7;
}
.map-legend b { color: var(--wheat); }

@media (min-width: 620px) {
  .joystick { left: 22px; bottom: 22px; }
  .action-btn { right: 22px; bottom: 96px; }
}

/* ---------------- 田地 ---------------- */
.farm-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; margin-bottom: 16px;
}
.plot {
  position: relative; text-align: left; cursor: pointer; font-family: inherit;
  padding: 13px 13px 12px; border-radius: var(--r); min-height: 116px;
  display: flex; flex-direction: column; gap: 7px;
  border: 1px dashed rgba(140,200,150,.28);
  background: linear-gradient(180deg, rgba(111,207,124,.06), rgba(20,37,26,.7));
  color: var(--text); transition: all .16s;
}
.plot:active { transform: scale(.98); }
.plot.growing { border-style: solid; border-color: rgba(79,184,232,.42); }
.plot.ready {
  border-style: solid; border-color: var(--wheat);
  background: linear-gradient(180deg, rgba(242,194,75,.17), rgba(242,194,75,.04));
  box-shadow: 0 0 22px -8px rgba(242,194,75,.85);
  animation: readyPulse 2.2s ease-in-out infinite;
}
@keyframes readyPulse {
  0%,100% { box-shadow: 0 0 18px -10px rgba(242,194,75,.7); }
  50% { box-shadow: 0 0 30px -6px rgba(242,194,75,1); }
}
.plot-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.plot-emoji { font-size: 25px; line-height: 1; }
.plot-tag {
  font-size: 10px; font-weight: 800; letter-spacing: .5px;
  padding: 2px 7px; border-radius: 999px;
  background: rgba(234,244,236,.09); color: var(--dim);
}
.plot.ready .plot-tag { background: var(--wheat); color: #2A1D00; }
.plot.growing .plot-tag { background: rgba(79,184,232,.18); color: var(--water); }
.plot-name { font-size: 13.5px; font-weight: 800; letter-spacing: .3px; }
.plot-sub { font-size: 11px; color: var(--dim); line-height: 1.5; }
.plot-bar { height: 6px; border-radius: 4px; background: rgba(234,244,236,.1); overflow: hidden; margin-top: auto; }
.plot-bar > i {
  display: block; height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--water), #7FDCFF); transition: width .4s;
}
.plot.ready .plot-bar > i { background: linear-gradient(90deg, var(--wheat), #FF9F45); }

/* ---------------- 大按钮 ---------------- */
.big-cta {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; padding: 17px; cursor: pointer; font-family: inherit;
  font-size: 16.5px; font-weight: 800; letter-spacing: .8px;
  border: 0; border-radius: 999px; color: #06210F;
  background: linear-gradient(135deg, var(--green), #3FA85C);
  box-shadow: 0 12px 28px -12px rgba(111,207,124,.9);
  transition: transform .13s;
}
.big-cta:active { transform: scale(.98); }
.big-cta:disabled { opacity: .45; }
.cta-ic { font-size: 18px; }

.primary {
  width: 100%; padding: 14px; cursor: pointer; font-family: inherit;
  font-size: 15.5px; font-weight: 800; border: 0; border-radius: 12px;
  color: #06210F; background: linear-gradient(135deg, var(--green), #3FA85C);
  margin-top: 10px;
}
.primary:active { transform: scale(.985); }
.ghost {
  padding: 10px 14px; cursor: pointer; font-family: inherit;
  font-size: 13.5px; font-weight: 700; color: var(--dim);
  border: 1px solid var(--line); border-radius: 11px;
  background: rgba(234,244,236,.04);
}
.ghost.wide { width: 100%; margin-top: 8px; }
.ghost:active { transform: scale(.985); }

/* ---------------- 答题 ---------------- */
.quiz-top { display: flex; gap: 9px; align-items: center; margin-bottom: 13px; }
.mod-select {
  flex: 1; padding: 10px 12px; font-family: inherit; font-size: 14px;
  color: var(--text); border-radius: 11px;
  border: 1px solid var(--line); background: var(--card-2);
  -webkit-appearance: none; appearance: none;
}
.qcard {
  border-radius: 18px; border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--card), var(--bg-2));
  padding: 16px 15px 18px;
}
.qmeta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 11px; }
.chip {
  font-size: 10.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px;
  background: rgba(234,244,236,.07); color: var(--dim);
}
.chip.green { background: rgba(111,207,124,.16); color: var(--green); }
.passage {
  padding: 12px 13px; margin-bottom: 12px; border-radius: 10px;
  background: rgba(10,19,13,.7); border-left: 2px solid var(--water);
  font-size: 13px; line-height: 1.85; color: #C6DCCB;
  max-height: 190px; overflow-y: auto; white-space: pre-wrap;
}
.prompt { font-size: 15.5px; line-height: 1.9; white-space: pre-wrap; }

.options { display: flex; flex-direction: column; gap: 9px; margin-top: 15px; }
.opt {
  display: flex; align-items: flex-start; gap: 10px; text-align: left;
  padding: 13px 14px; cursor: pointer; font-family: inherit;
  font-size: 14.5px; line-height: 1.7; color: var(--text);
  border: 1px solid var(--line); border-radius: 12px;
  background: rgba(234,244,236,.03); transition: all .13s;
  min-height: 48px;
}
.opt:active:not(:disabled) { transform: scale(.985); }
.opt:disabled { cursor: default; }
.opt .k {
  flex: none; width: 22px; height: 22px; border-radius: 7px; margin-top: 1px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 800;
  background: rgba(234,244,236,.1); color: var(--dim);
}
.opt.right { border-color: var(--green); background: rgba(111,207,124,.14); }
.opt.right .k { background: var(--green); color: #06210F; }
.opt.wrong { border-color: var(--red); background: rgba(255,107,107,.13); }
.opt.wrong .k { background: var(--red); color: #fff; }
.opt.faded { opacity: .4; }

.verdict {
  margin-top: 13px; padding: 12px 13px; border-radius: 11px;
  font-size: 13px; line-height: 1.75; border: 1px solid transparent;
}
.verdict.good { background: rgba(111,207,124,.13); border-color: rgba(111,207,124,.36); color: #B6EDC2; }
.verdict.bad { background: rgba(255,107,107,.13); border-color: rgba(255,107,107,.36); color: #FFC3C3; }
.verdict b { color: #fff; }
.verdict .v-sub { display: block; margin-top: 5px; color: var(--dim); font-size: 12px; }


/* 真题题干/选项/材料里的图片与表格 */
.prompt img, .passage img, .opt .t img {
  max-width: 100% !important; height: auto !important;
  display: block; margin: 8px auto; border-radius: 8px; background: #fff;
  min-height: 20px;
}
/* 离线版没打包配图时，别让破图占一大块 */
.prompt img[data-missing], .passage img[data-missing] {
  display: inline-block; min-height: 0; width: 9em; height: 1.15em;
  background: repeating-linear-gradient(
    45deg, rgba(255,196,84,.28), rgba(255,196,84,.28) 4px,
    transparent 4px, transparent 8px);
}
.prompt table, .passage table, .opt .t table {
  border-collapse: collapse; max-width: 100%; font-size: 12.5px; margin: 8px 0;
}
.prompt td, .prompt th, .passage td, .passage th,
.opt .t td, .opt .t th { border: 1px solid rgba(234,244,236,.28); padding: 4px 7px; }
.prompt p, .passage p { margin: .45em 0; }
.opt .t p { display: inline; margin: 0; }

/* ---------------- 申论模式 ---------------- */
.essay-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 10px;
}
.essay-stat { font-size: 11px; color: var(--dim); text-align: right; line-height: 1.5; }
.essay-mat {
  border-radius: 11px; border: 1px solid var(--line);
  background: rgba(10,19,13,.7); margin-bottom: 12px;
  border-left: 2px solid var(--water);
}
.essay-mat > summary {
  padding: 10px 13px; cursor: pointer; font-size: 12.5px;
  font-weight: 700; color: #C6DCCB; list-style: none;
}
.essay-mat > summary::-webkit-details-marker { display: none; }
.essay-mat[open] > summary { border-bottom: 1px solid var(--line); }
.essay-mat-body {
  padding: 11px 13px; font-size: 13px; line-height: 1.85;
  color: #C6DCCB; white-space: pre-wrap;
  max-height: 240px; overflow-y: auto;
}
.essay-mat-body img { max-width: 100%; height: auto; border-radius: 8px; }
.essay-tip {
  margin-top: 12px; padding: 9px 11px; border-radius: 9px;
  font-size: 11.5px; line-height: 1.7; color: #FFDCA8;
  background: rgba(255,196,84,.1); border: 1px solid rgba(255,196,84,.28);
}
.essay-points { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.essay-point {
  display: flex; align-items: flex-start; gap: 10px; text-align: left;
  padding: 11px 12px; cursor: pointer; font-family: inherit;
  font-size: 14px; line-height: 1.75; color: var(--text);
  border: 1px solid var(--line); border-radius: 11px;
  background: rgba(234,244,236,.03); transition: all .13s;
}
.essay-point:active:not(:disabled) { transform: scale(.985); }
.essay-point:disabled { cursor: default; }
.essay-point .box {
  flex: none; width: 20px; height: 20px; border-radius: 6px;
  margin-top: 1px; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
  border: 1px solid rgba(234,244,236,.3); color: transparent;
  background: rgba(234,244,236,.05);
}
.essay-point.on { border-color: rgba(111,207,124,.55); background: rgba(111,207,124,.1); }
.essay-point.on .box { background: var(--green); color: #06210F; border-color: var(--green); }
.essay-point.hit { border-color: var(--green); background: rgba(111,207,124,.16); }
.essay-point.hit .box { background: var(--green); color: #06210F; border-color: var(--green); }
.essay-point.badpick { border-color: var(--red); background: rgba(255,107,107,.13); }
.essay-point.badpick .box { background: var(--red); color: #fff; border-color: var(--red); }
.essay-point.missed {
  border-color: rgba(255,196,84,.5); border-style: dashed;
  background: rgba(255,196,84,.08);
}
.essay-point.missed .box { color: #FFC454; border-color: rgba(255,196,84,.55); }
.essay-point.dimmed { opacity: .42; }
.essay-score {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin: 10px 0 4px;
}
.essay-score div {
  border-radius: 10px; padding: 8px 6px; text-align: center;
  background: rgba(234,244,236,.05); border: 1px solid var(--line);
}
.essay-score b { display: block; font-size: 17px; color: #fff; }
.essay-score span { font-size: 10.5px; color: var(--dim); }

/* ---- 点题雷达：工具行 + 信号词高亮 ---- */
.essay-tools { display: flex; gap: 8px; margin: -4px 0 12px; }
.ghost.sm {
  flex: 1; padding: 9px 10px; font-size: 12px; font-weight: 700;
  border-radius: 10px; border: 1px solid var(--line);
  background: rgba(234,244,236,.04); color: #C6DCCB;
  font-family: inherit; cursor: pointer;
}
.ghost.sm:active { transform: scale(.985); }

.essay-mat-body mark.sig {
  border-radius: 4px; padding: 0 2px; color: inherit;
  border-bottom: 2px solid currentColor; cursor: help;
}
mark.sig-relation { background: rgba(140,190,255,.2); color: #9FD3FF; }
mark.sig-key      { background: rgba(255,214,120,.22); color: #FFD678; }
mark.sig-problem  { background: rgba(255,130,130,.22); color: #FF9B9B; }
mark.sig-effect   { background: rgba(196,160,255,.22); color: #C7A8FF; }
mark.sig-plan     { background: rgba(120,225,160,.2);  color: #86E3A8; }
mark.sig-cause    { background: rgba(255,170,110,.22); color: #FFB477; }
mark.sig-view     { background: rgba(120,220,225,.2);  color: #86DDE2; }

.hint-card {
  border-radius: 12px; border: 1px solid var(--line);
  background: rgba(234,244,236,.03); padding: 12px 13px; margin-bottom: 10px;
}
.hint-card h4 { margin: 0 0 6px; font-size: 13px; font-weight: 800; color: #fff; }
.hint-card .dim { font-size: 11px; line-height: 1.7; color: var(--dim); margin: 4px 0 8px; }
.hint-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.hint-chip {
  font-size: 10.5px; padding: 3px 8px; border-radius: 999px;
  background: rgba(234,244,236,.07); color: var(--dim);
}
.hint-chip b { color: #fff; }
.hint-line { font-size: 12px; line-height: 1.8; color: #C6DCCB; margin: 6px 0 0; }
.focus-chip {
  display: inline-block; font-size: 11px; font-weight: 700; margin: 2px 4px 2px 0;
  padding: 2px 8px; border-radius: 999px;
  background: rgba(234,244,236,.06); color: var(--dim);
}
.focus-chip.has { background: rgba(111,207,124,.16); color: var(--green); }
.freq-wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.freq-chip {
  font-size: 12px; padding: 4px 9px; border-radius: 8px;
  background: rgba(140,190,255,.12); color: #B8DBFF;
  border: 1px solid rgba(140,190,255,.24);
}
.freq-chip i {
  font-style: normal; font-size: 9.5px; margin-left: 4px;
  opacity: .7;
}
.sig-legend { display: flex; flex-direction: column; gap: 4px; margin-bottom: 9px; }
.legend-item {
  display: flex; align-items: baseline; gap: 7px;
  font-size: 11px; color: #C6DCCB;
}
.legend-sign {
  flex: none; width: 16px; text-align: center; font-size: 13px; color: #FFD678;
}
.legend-item i { font-style: normal; font-size: 10px; color: var(--dim); }
.sig-toggles {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px;
}
.sig-toggle {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 8px; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(234,244,236,.03);
  font-family: inherit; font-size: 11px; color: var(--dim);
}
.sig-toggle.on { border-color: rgba(111,207,124,.4); color: #C6DCCB; }
.sig-dot {
  flex: none; width: 8px; height: 8px; border-radius: 50%;
  background: rgba(234,244,236,.2);
}
.sig-toggle.on .sig-dot.sig-relation { background: #9FD3FF; }
.sig-toggle.on .sig-dot.sig-key      { background: #FFD678; }
.sig-toggle.on .sig-dot.sig-problem  { background: #FF9B9B; }
.sig-toggle.on .sig-dot.sig-effect   { background: #C7A8FF; }
.sig-toggle.on .sig-dot.sig-plan     { background: #86E3A8; }
.sig-toggle.on .sig-dot.sig-cause    { background: #FFB477; }
.sig-toggle.on .sig-dot.sig-view     { background: #86DDE2; }
.sig-name { flex: 1; text-align: left; }
.sig-n { font-weight: 700; }
.hint-warn {
  margin-top: 9px !important; padding-top: 8px;
  border-top: 1px dashed var(--line);
}

/* ---- 漏点溯源 ---- */
.missed-trace {
  margin-top: 11px; padding-top: 10px;
  border-top: 1px dashed rgba(234,244,236,.18);
}
.missed-trace h4 {
  margin: 0 0 8px; font-size: 11.5px; font-weight: 800; color: #FFC454;
}
.mt-row { margin-bottom: 9px; }
.mt-point {
  font-size: 12px; line-height: 1.7; color: #FFD9A8;
  display: flex; align-items: baseline; gap: 6px;
}
.mt-score {
  flex: none; font-size: 10px; padding: 1px 6px; border-radius: 999px;
  background: rgba(255,196,84,.16); color: #FFC454;
}
.mt-src {
  margin-top: 3px; padding: 6px 9px; border-radius: 8px;
  font-size: 11px; line-height: 1.7; color: var(--dim);
  background: rgba(10,19,13,.6); border-left: 2px solid rgba(255,196,84,.5);
}
.mt-src b { color: #FFC454; }

/* ---------------- 冒险：装备 / 关卡 / 打龙 ---------------- */
.adv-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 12px; }
.as-cell {
  text-align: center; padding: 12px 6px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card);
}
.as-v { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.as-k { font-size: 10.5px; color: var(--dim); margin-top: 4px; }
.adv-battle-tip {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 13px; border-radius: 11px; font-size: 12.5px; line-height: 1.6;
  color: #FFE0A8; background: rgba(255,196,84,.12);
  border: 1px solid rgba(255,196,84,.32);
}
.adv-battle-tip .ghost.sm { flex: none; }
.gear-slots, .gear-shop, .stage-list {
  display: flex; flex-direction: column; gap: 8px;
}
.gear-slot, .gear-item, .stage-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 11px 12px; border-radius: 11px; text-align: left; cursor: pointer;
  font-family: inherit; color: var(--text);
  border: 1px solid var(--line); background: rgba(234,244,236,.03);
  min-height: 52px;
}
.gear-slot.on { border-color: rgba(111,207,124,.45); background: rgba(111,207,124,.08); }
.gear-slot:disabled, .stage-item:disabled { cursor: default; }
.gear-slot:disabled { opacity: .55; }
.gear-item:disabled { opacity: .5; cursor: default; }
.gear-item.owned { border-color: rgba(140,190,255,.35); }
.stage-item.locked { opacity: .55; }
.gs-emoji { flex: none; font-size: 20px; width: 24px; text-align: center; }
.gs-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.gs-name { font-size: 13.5px; font-weight: 800; }
.gs-name i { font-style: normal; font-size: 10px; font-weight: 600; color: var(--dim); }
.gs-sub { font-size: 10.5px; color: var(--dim); line-height: 1.5; }
.gs-act {
  flex: none; font-size: 11px; font-weight: 800; color: var(--green);
  padding: 3px 8px; border-radius: 7px; background: rgba(111,207,124,.14);
}
.gs-price {
  flex: none; font-size: 12px; font-weight: 800; color: var(--wheat);
  font-variant-numeric: tabular-nums;
}
.st-tag {
  font-size: 9.5px; font-weight: 800; padding: 1px 6px; border-radius: 6px;
  margin-left: 4px;
}
.st-tag.ok { color: #06210F; background: var(--green); }
.st-tag.lock { color: var(--dim); background: rgba(234,244,236,.1); }

/* 战斗条（答题页顶部） */
.battle-bar {
  margin: -4px 0 12px; padding: 11px 12px; border-radius: 12px;
  border: 1px solid rgba(255,107,107,.35);
  background: linear-gradient(180deg, rgba(60,18,18,.55), rgba(24,10,10,.55));
}
.bb-row {
  display: flex; align-items: baseline; justify-content: space-between;
  font-size: 11.5px; margin-bottom: 4px;
}
.bb-name { font-weight: 800; color: #FFD9D9; }
.bb-num { color: var(--dim); font-variant-numeric: tabular-nums; font-size: 10.5px; }
.bb-bar {
  height: 7px; border-radius: 99px; overflow: hidden; margin-bottom: 9px;
  background: rgba(0,0,0,.45);
}
.bb-bar i {
  display: block; height: 100%; border-radius: 99px;
  transform-origin: left center; transition: transform .25s ease;
}
.bb-bar.dragon i { background: linear-gradient(90deg, #FF6B6B, #B33A3A); }
.bb-bar.hero i { background: linear-gradient(90deg, #6FCF7C, #2E8B47); }
.bb-line { display: block; font-size: 11.5px; line-height: 1.7; }
.bb-line.hero { color: #86E3A8; }
.bb-line.dragon { color: #FF9B9B; }
.bb-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 8px;
}
.bb-round { font-size: 10.5px; color: var(--dim); }
.bb-foot .ghost.sm { flex: none; padding: 5px 12px; }

/* 对战出招按钮 */
.bb-skills {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px;
  padding-top: 9px; border-top: 1px dashed rgba(255,107,107,.25);
}
.bb-skill {
  flex: 1 1 45%; min-width: 0; cursor: pointer; font-family: inherit;
  display: flex; flex-direction: column; gap: 1px; align-items: flex-start;
  padding: 7px 10px; border-radius: 9px; text-align: left;
  color: #FFE9C9; border: 1px solid rgba(255,196,84,.42);
  background: rgba(255,196,84,.12);
}
.bb-skill:hover { background: rgba(255,196,84,.2); }
.bb-skill:disabled { opacity: .45; cursor: default; }
.bs-name { font-size: 12px; font-weight: 800; }
.bs-sub { font-size: 9.5px; color: var(--dim); }
.bb-skills-tip {
  display: block; width: 100%; font-size: 10px; color: var(--dim); margin-top: 2px;
  line-height: 1.6;
}

/* 设置页的特效图鉴：每个特效一个按钮 */
.fx-grid {
  display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px;
}
.fx-chip {
  font-family: inherit; font-size: 11px; font-weight: 700; cursor: pointer;
  padding: 6px 9px; border-radius: 9px; color: #DFF3E4;
  border: 1px solid var(--line); background: rgba(234,244,236,.06);
}
.fx-chip:hover { border-color: rgba(111,207,124,.55); color: #9BE7B0; }
.fx-chip:active { transform: scale(.96); }

/* 受击方反馈：被打的那一条要"缩一下 + 抖一下"，不能只有攻击方有表现 */
.bb-hit { animation: bbHit .42s cubic-bezier(.2, .9, .2, 1); }
@keyframes bbHit {
  0%   { transform: translate(0, 0) scale(1); }
  16%  { transform: translate(-6px, 2px) scale(1.05, .94); }
  36%  { transform: translate(5px, -2px) scale(.96, 1.05); }
  58%  { transform: translate(-3px, 1px) scale(1.02, .98); }
  100% { transform: translate(0, 0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .bb-hit { animation-duration: .18s; }
  @keyframes bbHit {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.03, .97); }
    100% { transform: scale(1); }
  }
}

/* ---------------- 江湖：门派 / 武学 / 打桩 / 奇遇 ---------------- */
.wulin-top { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.wl-hero {
  display: flex; align-items: center; gap: 12px; padding: 13px;
  border-radius: 13px; border: 1px solid rgba(255,196,84,.3);
  background: linear-gradient(135deg, rgba(70,52,18,.55), rgba(20,26,18,.6));
}
.wl-avatar {
  flex: none; width: 46px; height: 46px; border-radius: 13px; font-size: 26px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.3); border: 1px solid var(--line);
}
.wl-hero-main { flex: 1; min-width: 0; }
.wl-realm { font-size: 16px; font-weight: 900; color: #FFD98A; letter-spacing: .5px; }
.wl-sect { font-size: 11px; color: var(--dim); margin-top: 2px; }
.wl-bar {
  height: 6px; border-radius: 99px; overflow: hidden; margin: 7px 0 5px;
  background: rgba(0,0,0,.45);
}
.wl-bar i {
  display: block; height: 100%; border-radius: 99px; transform-origin: left center;
  background: linear-gradient(90deg, #FFC454, #FF8A3D);
  transition: transform .3s ease;
}
.wl-sub { font-size: 10.5px; color: var(--dim); }
.wl-sub b { color: var(--wheat); font-variant-numeric: tabular-nums; }

.wl-idle {
  padding: 12px 13px; border-radius: 13px; border: 1px solid var(--line);
  background: var(--card);
}
.wl-idle-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  font-size: 12.5px; font-weight: 700;
}
.wl-idle-gain { color: var(--green); font-variant-numeric: tabular-nums; font-size: 12px; }
.wl-idle-sub { font-size: 10.5px; color: var(--dim); margin-top: 5px; line-height: 1.6; }
.wl-idle-btns { display: flex; gap: 8px; margin-top: 10px; }
.wl-idle-btns .big-cta.sm { flex: 1; margin: 0; }
.wl-idle-btns .ghost.sm { flex: none; padding: 0 14px; }

.sect-list, .art-list { display: flex; flex-direction: column; gap: 8px; }
.sect-item, .art-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 11px 12px; border-radius: 11px; text-align: left; cursor: pointer;
  font-family: inherit; color: var(--text); min-height: 52px;
  border: 1px solid var(--line); background: rgba(234,244,236,.03);
}
.sect-item:disabled, .art-item:disabled { cursor: default; }
.sect-item:disabled:not(.joined) { opacity: .45; }
.sect-item.joined { border-color: rgba(255,196,84,.5); background: rgba(255,196,84,.1); }
.sect-act {
  flex: none; font-size: 11px; font-weight: 800; color: var(--wheat);
  padding: 3px 8px; border-radius: 7px; background: rgba(255,196,84,.14);
}
.art-item.learned { border-color: rgba(111,207,124,.3); }
.art-item.pondering {
  border-color: rgba(255,196,84,.6); background: rgba(255,196,84,.1);
}
.art-item:disabled:not(.pondering) { opacity: .5; }
.art-pips { display: inline-flex; gap: 2px; vertical-align: middle; margin-right: 4px; }
.art-pips i {
  width: 6px; height: 6px; border-radius: 99px; display: block;
  background: rgba(234,244,236,.18);
}
.art-pips i.on { background: var(--green); }
.art-lock { flex: none; font-size: 10px; color: var(--dim); max-width: 92px; text-align: right; line-height: 1.4; }
.art-done { flex: none; font-size: 11px; font-weight: 800; color: var(--green); }
.art-cost {
  flex: none; font-size: 11.5px; font-weight: 800; color: var(--wheat);
  font-variant-numeric: tabular-nums;
}

.wulin-log { display: flex; flex-direction: column; gap: 7px; }
.wl-log-row {
  font-size: 11.5px; line-height: 1.6; color: #CFE4D4;
  padding-left: 10px; border-left: 2px solid rgba(111,207,124,.35);
}
.wl-log-at {
  display: inline-block; min-width: 78px; color: var(--dim);
  font-variant-numeric: tabular-nums; font-size: 10px;
}

.enc-text { font-size: 13px; line-height: 1.85; color: #E8F3EA; margin: 2px 0 14px; }
.enc-choices { display: flex; flex-direction: column; gap: 9px; }
.enc-choice {
  width: 100%; padding: 13px 14px; border-radius: 11px; text-align: left;
  font-family: inherit; font-size: 13px; font-weight: 700; color: var(--text);
  cursor: pointer; border: 1px solid rgba(255,196,84,.35);
  background: rgba(255,196,84,.08);
}

/* 修炼体系：悟性 / 真气 / 修炼度 / 招式 */
.as-max { font-style: normal; font-size: 11px; color: var(--dim); font-weight: 700; }
.wl-med { margin-top: 10px; }
.wl-bar.zhenqi i { background: linear-gradient(90deg, #6FD8FF, #3D9BE0); }
.exp-bar {
  display: block; height: 4px; border-radius: 99px; overflow: hidden;
  background: rgba(0,0,0,.4); margin-top: 3px; width: 100%;
}
.exp-bar i {
  display: block; height: 100%; border-radius: 99px; transform-origin: left center;
  background: linear-gradient(90deg, #FFC454, #FF7A3D);
  transition: transform .25s ease;
}
.move-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.move-chip {
  font-size: 9.5px; line-height: 1.6; padding: 1px 6px; border-radius: 6px;
  color: var(--dim); background: rgba(234,244,236,.07);
  border: 1px solid transparent; white-space: nowrap;
}
.move-chip.on {
  color: #9BE7B0; background: rgba(111,207,124,.14);
  border-color: rgba(111,207,124,.3);
}
.art-act {
  flex: none; font-size: 10.5px; font-weight: 800; color: var(--green);
  padding: 3px 7px; border-radius: 7px; background: rgba(111,207,124,.14);
}
.art-act.muted { color: var(--dim); background: rgba(234,244,236,.08); }
.art-item.focused {
  border-color: rgba(255,196,84,.55); background: rgba(255,196,84,.08);
}

/* 江湖舆图：卡片缩略图 + 全屏查看器 */
.wm-open {
  display: block; width: 100%; padding: 0; border: 0; background: none;
  cursor: zoom-in; position: relative; border-radius: 13px; overflow: hidden;
  border: 1px solid var(--line);
}
.wm-thumb {
  display: block; width: 100%; aspect-ratio: 2 / 1; object-fit: cover;
  background: #16241C;
}
.wm-zoom {
  position: absolute; right: 10px; bottom: 10px;
  font-size: 11px; font-weight: 800; color: #06210F;
  background: rgba(111,207,124,.92); padding: 4px 9px; border-radius: 8px;
}
.map-light {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(4,10,7,.96);
  display: flex; align-items: center; justify-content: center;
}
.map-light-scroll {
  width: 100%; height: 100%; overflow: auto;
  -webkit-overflow-scrolling: touch;
  display: flex; align-items: center; justify-content: flex-start;
  padding: 42px 0;
}
.map-light-img {
  display: block; width: 1440px; max-width: none; height: auto; flex: none;
}
.map-light-close {
  position: fixed; top: 12px; right: 12px; z-index: 2;
  width: 34px; height: 34px; border-radius: 99px; cursor: pointer;
  font-size: 16px; font-weight: 700; color: var(--text);
  border: 1px solid var(--line); background: rgba(10,19,13,.9);
}
.map-light-tip {
  position: fixed; top: 16px; left: 14px; z-index: 2; margin: 0;
  font-size: 11px; color: var(--dim);
}

/* 招式特效层：透明 canvas，盖在内容上、不吃点击 */
.vfx-layer {
  position: fixed; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 45;
}

/* 江湖舆图：三张轮换 */
.wm-nav {
  display: flex; align-items: center; gap: 8px; margin: 2px 0 9px;
}
.wm-nav .ghost.sm { flex: none; padding: 4px 12px; }
.wm-name {
  flex: 1; text-align: center; font-size: 12px; font-weight: 800; color: var(--wheat);
}

/* 冒险页：按地界分组，每组一张横幅（点开看全图） */
.area-head {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 0; margin: 4px 0 -2px; border: 0; cursor: zoom-in;
  background: none; border-radius: 11px; overflow: hidden; position: relative;
  min-height: 74px;
}
.area-thumb {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: .55;
}
.area-name {
  position: relative; flex: 1; text-align: left; padding: 0 12px;
  font-size: 12.5px; font-weight: 900; color: #FFF3D6;
  text-shadow: 0 1px 4px rgba(0,0,0,.85);
}
.area-zoom {
  position: relative; margin-right: 10px; flex: none;
  font-size: 10px; font-weight: 800; color: #06210F;
  background: rgba(111,207,124,.92); padding: 3px 8px; border-radius: 7px;
}
.area-head::after {
  content: ''; position: absolute; inset: 0; border-radius: 11px;
  border: 1px solid rgba(255,196,84,.35); pointer-events: none;
}

/* ---------------- 商店 ---------------- */
.shop-list { display: flex; flex-direction: column; gap: 10px; }
.shop-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--card);
}
.shop-ic { font-size: 25px; flex: none; }
.shop-main { flex: 1; min-width: 0; }
.shop-name { font-size: 14.5px; font-weight: 800; }
.shop-desc { font-size: 11.5px; color: var(--dim); margin-top: 3px; line-height: 1.5; }
.buy-btn {
  flex: none; padding: 10px 14px; cursor: pointer; font-family: inherit;
  font-size: 13px; font-weight: 800; border-radius: 10px; border: 1px solid transparent;
  background: rgba(242,194,75,.16); color: var(--wheat);
  border-color: rgba(242,194,75,.36); font-variant-numeric: tabular-nums;
}
.buy-btn:disabled { opacity: .4; }
.buy-btn:active:not(:disabled) { transform: scale(.96); }

.hint { font-size: 11.5px; color: var(--dim); line-height: 1.8; margin: 10px 0 0; }
.hint b { color: var(--text); }

/* ---------------- 村民 ---------------- */
.npc-list { display: flex; flex-direction: column; gap: 11px; }
.npc-card {
  display: flex; gap: 12px; padding: 13px;
  border-radius: var(--r); border: 1px solid var(--line);
  background: var(--card);
}
.npc-avatar {
  flex: none; width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 27px; border: 1.5px solid var(--line);
  background: rgba(234,244,236,.05);
  position: relative; overflow: hidden;
}
/* AI 立绘：盖在 emoji 上；图挂了就自动消失露出 emoji */
.nv-emoji { line-height: 1; }
.nv-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border-radius: inherit; display: block;
}
.npc-hero {
  display: flex; align-items: center; gap: 13px;
  padding: 4px 4px 12px;
}
.npc-hero-face {
  flex: none; width: 74px; height: 74px; border-radius: 20px;
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; border: 2px solid var(--line);
  background: rgba(234,244,236,.06);
}
.npc-hero-main { flex: 1; min-width: 0; }
.npc-hero-name { font-size: 17px; font-weight: 900; margin-bottom: 3px; }
/* 村民页顶部的小镇全景 */
.town-banner {
  display: block; width: 100%; height: 122px; object-fit: cover;
  border-radius: var(--r); margin: 2px 0 12px;
  border: 1px solid var(--line); opacity: .95;
}
.npc-main { flex: 1; min-width: 0; }
.npc-top { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; }
.npc-name { font-size: 15px; font-weight: 800; }
.npc-mod {
  font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 999px;
  background: rgba(111,207,124,.14); color: var(--green);
}
.npc-title { font-size: 11px; color: var(--dim); margin-top: 3px; line-height: 1.5; }

.hearts { display: flex; gap: 2px; margin: 7px 0 5px; font-size: 13px; letter-spacing: .5px; }
.hearts .h-on { color: var(--red); }
.hearts .h-off { color: rgba(234,244,236,.18); }

.npc-bar { height: 5px; border-radius: 3px; background: rgba(234,244,236,.1); overflow: hidden; }
.npc-bar > i {
  display: block; height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, #FF6B6B, #FF9F45); transition: width .35s;
}
.npc-perks { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.perk {
  font-size: 10.5px; padding: 2px 7px; border-radius: 6px;
  background: rgba(234,244,236,.06); color: var(--dim);
}
.perk.on { background: rgba(111,207,124,.16); color: var(--green); }

.npc-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.npc-btn {
  flex: 1; min-width: 86px; padding: 9px 10px; cursor: pointer;
  font-family: inherit; font-size: 12.5px; font-weight: 800;
  border-radius: 10px; border: 1px solid var(--line);
  background: rgba(234,244,236,.05); color: var(--text);
  font-variant-numeric: tabular-nums;
}
.npc-btn:disabled { opacity: .38; cursor: not-allowed; }
.npc-btn.give {
  background: rgba(111,207,124,.16); border-color: rgba(111,207,124,.4);
  color: #B6EDC2;
}
.npc-btn.present {
  background: rgba(242,194,75,.16); border-color: rgba(242,194,75,.4);
  color: var(--wheat);
}

.inv-list { display: flex; flex-wrap: wrap; gap: 7px; }
.inv-item {
  font-size: 12px; padding: 6px 11px; border-radius: 9px;
  border: 1px solid var(--line); background: rgba(234,244,236,.04);
  color: var(--dim);
}
.inv-item b { color: var(--text); font-variant-numeric: tabular-nums; margin-left: 4px; }
.inv-item.fav { border-color: rgba(111,207,124,.4); color: #B6EDC2; }


/* 村民名册工具条 */
.npc-tools { display: flex; flex-direction: column; gap: 9px; margin-bottom: 10px; }
.npc-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.npc-filters .filter-btn { font-size: 11.5px; padding: 6px 11px; }
.npc-card.on-duty {
  border-color: rgba(111,207,124,.55);
  background: linear-gradient(100deg, rgba(111,207,124,.1), rgba(20,37,26,.9));
  box-shadow: 0 0 20px -12px rgba(111,207,124,.9);
}
.npc-duty {
  font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 999px;
  background: var(--green); color: #06210F;
}
.npc-avatar { font-size: 25px; }

/* ---------------- 图鉴 ---------------- */
.codex-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 13px; }
.cs-cell {
  text-align: center; padding: 12px 6px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card);
}
.cs-v { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.cs-k { font-size: 10.5px; color: var(--dim); margin-top: 4px; }
.codex-tools { display: flex; gap: 8px; margin-bottom: 12px; }
.search {
  flex: 2; padding: 11px 13px; font-family: inherit; font-size: 14px;
  color: var(--text); border-radius: 11px;
  border: 1px solid var(--line); background: var(--card-2);
}
.search::placeholder { color: #5A6E62; }
.codex-list { display: flex; flex-direction: column; gap: 8px; }
.codex-row {
  padding: 11px 12px; border-radius: 11px; font-size: 12.5px; line-height: 1.65;
  border: 1px solid var(--line); background: rgba(234,244,236,.025); color: var(--dim);
}
.codex-row .cr-mod { font-size: 10px; letter-spacing: .6px; opacity: .75; display: block; margin-bottom: 3px; }

/* ---- 图鉴：可展开的题目卡片 ---- */
.codex-item {
  border-radius: 12px; border: 1px solid var(--line);
  background: rgba(234,244,236,.025);
  overflow: hidden; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.codex-item:active { transform: scale(.995); }
.codex-item.open {
  border-color: rgba(111,207,124,.38);
  background: rgba(111,207,124,.05);
}
.ci-head {
  display: flex; align-items: flex-start; gap: 7px;
  padding: 11px 12px; font-size: 12.5px; line-height: 1.6; color: #C6DCCB;
}
.ci-head .cr-mod {
  flex: none; font-size: 9.5px; font-weight: 700; letter-spacing: .4px;
  padding: 2px 6px; border-radius: 6px; margin-top: 2px;
  background: rgba(111,207,124,.14); color: var(--green);
  max-width: 5.2em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ci-prompt {
  flex: 1; min-width: 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
.codex-item.open .ci-prompt { -webkit-line-clamp: unset; display: block; }
.ci-seen {
  flex: none; font-size: 9.5px; color: var(--wheat);
  padding: 2px 6px; border-radius: 6px; background: rgba(255,211,122,.12);
  margin-top: 2px; white-space: nowrap;
}
.ci-arrow {
  flex: none; color: var(--dim); font-size: 11px; margin-top: 2px;
  transition: transform .18s;
}
.codex-item.open .ci-arrow { transform: rotate(180deg); }
.ci-body {
  padding: 2px 12px 13px;
  border-top: 1px dashed rgba(234,244,236,.14);
  margin-top: 2px; padding-top: 10px;
  cursor: default;
}
.ci-label {
  font-size: 10px; font-weight: 800; letter-spacing: 1.2px;
  color: var(--dim); margin: 9px 0 5px;
}
.ci-label:first-child { margin-top: 0; }
.ci-passage {
  font-size: 12px; line-height: 1.8; color: #A9C4B2;
  background: rgba(10,19,13,.6); border-left: 2px solid var(--water);
  border-radius: 8px; padding: 9px 11px; white-space: pre-wrap;
}
.ci-opts { display: flex; flex-direction: column; gap: 6px; }
.ci-opt {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 7px 9px; border-radius: 9px; font-size: 12.5px; line-height: 1.65;
  border: 1px solid var(--line); color: #C6DCCB;
}
.ci-opt .ci-k {
  flex: none; width: 18px; height: 18px; border-radius: 5px; margin-top: 1px;
  display: flex; align-items: center; justify-content: center;
  font-size: 10.5px; font-weight: 800;
  background: rgba(234,244,236,.1); color: var(--dim);
}
.ci-opt .ci-t { flex: 1; min-width: 0; }
.ci-opt.right {
  border-color: var(--green); background: rgba(111,207,124,.12);
  color: #DDF6E3;
}
.ci-opt.right .ci-k { background: var(--green); color: #06210F; }
.ci-right {
  flex: none; font-size: 9.5px; font-weight: 800; color: var(--green);
  align-self: center;
}
.ci-exp {
  font-size: 12px; line-height: 1.85; color: #A9C4B2;
  background: rgba(10,19,13,.45); border-radius: 8px; padding: 9px 11px;
  white-space: pre-wrap;
}
.ci-exp.dim { color: var(--dim); font-style: normal; }
.ci-passage img, .ci-exp img, .ci-opt img, .ci-prompt img {
  max-width: 100%; height: auto; display: block; margin: 6px 0;
  border-radius: 6px; background: #fff;
}

/* ---------------- 设置卡片 ---------------- */
.card {
  border-radius: var(--r); border: 1px solid var(--line);
  background: var(--card); padding: 15px; margin-bottom: 13px;
}
.card h3 { margin: 0 0 9px; font-size: 14.5px; font-weight: 800; letter-spacing: .5px; }
.ta {
  width: 100%; padding: 11px 12px; margin-top: 9px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px;
  color: var(--text); border-radius: 10px; resize: vertical;
  border: 1px solid var(--line); background: rgba(10,19,13,.75);
}
.file {
  width: 100%; margin-top: 9px; font-size: 12.5px; color: var(--dim);
}
.import-result {
  margin-top: 11px; padding: 11px 12px; border-radius: 10px;
  font-size: 12.5px; line-height: 1.8;
  background: rgba(111,207,124,.1); border: 1px solid rgba(111,207,124,.3); color: #B6EDC2;
}
.import-result.err { background: rgba(255,107,107,.1); border-color: rgba(255,107,107,.3); color: #FFC3C3; }

/* ---------------- 底部导航 ---------------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: rgba(10,19,13,.96); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; height: var(--tab-h); cursor: pointer; font-family: inherit;
  font-size: 10.5px; font-weight: 700; color: var(--dim);
  background: none; border: 0; padding: 0; min-width: 0;
}
.tab span { font-size: 18px; line-height: 1; }
.tab.active { color: var(--green); }
.tab.active span { transform: translateY(-1px); }

/* ---------------- 底部选择器 ---------------- */
.sheet-mask {
  position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end;
  background: rgba(4,10,7,.7); backdrop-filter: blur(4px);
}
.sheet {
  width: 100%; max-width: 620px; margin: 0 auto;
  border-radius: 18px 18px 0 0; background: var(--card);
  border-top: 1px solid var(--line);
  padding-bottom: calc(14px + env(safe-area-inset-bottom));
  animation: sheetUp .22s cubic-bezier(.2,1,.4,1) both;
  max-height: 76vh; display: flex; flex-direction: column;
}
@keyframes sheetUp { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 16px 10px; font-size: 15px; font-weight: 800;
}
.sheet-close {
  width: 30px; height: 30px; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(234,244,236,.06);
  color: var(--dim); font-size: 13px;
}
.sheet-body { padding: 0 14px 8px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.pick-item {
  display: flex; align-items: center; gap: 11px; text-align: left;
  padding: 13px 14px; cursor: pointer; font-family: inherit;
  border: 1px solid var(--line); border-radius: 11px;
  background: rgba(234,244,236,.03); color: var(--text); min-height: 50px;
}
.pick-item:active { transform: scale(.985); }
.pick-main { flex: 1; min-width: 0; }
.pick-name { font-size: 14px; font-weight: 800; }
.pick-sub { font-size: 11px; color: var(--dim); margin-top: 3px; }
.pick-price { font-size: 13px; font-weight: 800; color: var(--wheat); font-variant-numeric: tabular-nums; }
.pick-item:disabled { opacity: .45; }

/* ---------------- toast ---------------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom) + 16px);
  transform: translateX(-50%); z-index: 80;
  padding: 11px 18px; border-radius: 12px; font-size: 13.5px; font-weight: 700;
  background: rgba(111,207,124,.96); color: #06210F;
  box-shadow: 0 12px 30px -12px rgba(0,0,0,.9);
  max-width: 88vw; text-align: center;
  animation: toastIn .2s ease both;
}
.toast.bad { background: rgba(255,107,107,.96); color: #fff; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------------- 启动遮罩（离线版首次要把题库写进本机存档） ---------------- */
.boot {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 32%, #16281c 0%, #08120c 72%);
  transition: opacity .4s ease, visibility .4s ease;
}
.boot.gone { opacity: 0; visibility: hidden; }
.boot-inner { text-align: center; padding: 0 34px; max-width: 420px; }
.boot-logo {
  font-size: 56px; line-height: 1;
  animation: bootBounce 1.6s ease-in-out infinite;
}
@keyframes bootBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
.boot h1 {
  margin: 14px 0 6px; font-size: 23px; letter-spacing: 3px;
  color: var(--text); font-weight: 800;
}
.boot-sub { font-size: 13px; color: #9FD9AE; margin: 0 0 16px; min-height: 1.4em; }
.boot-bar {
  height: 5px; border-radius: 99px; overflow: hidden;
  background: rgba(234,244,236,.1); margin: 0 auto 16px; max-width: 240px;
}
.boot-bar i {
  display: block; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--green), var(--water));
  transform-origin: left center; transform: scaleX(.04);
  transition: transform .3s ease;
}
.boot-note { font-size: 11px; line-height: 1.85; color: var(--dim); margin: 0; }
/* 启动画面背景：AI 画的小镇全景，淡淡铺一层 */
.boot-art {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: .28; filter: saturate(.9) blur(.3px);
  pointer-events: none;
}
.boot { overflow: hidden; }
.boot-inner { position: relative; z-index: 1; }

/* 存档卡片里的两个按钮 */
.save-btns { display: flex; gap: 9px; margin: 10px 0; }
.save-btns .ghost { flex: 1; }
.ghost.danger {
  color: #FFC3C3; border-color: rgba(255,107,107,.34);
  background: rgba(255,107,107,.08); margin-top: 4px;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-thumb { background: rgba(111,207,124,.28); border-radius: 6px; }

@media (min-width: 620px) {
  .farm-grid { grid-template-columns: repeat(3, 1fr); }
  body { font-size: 15.5px; }
}
