:root {
  --bg: #eef2f0;
  --panel: rgba(253, 251, 246, 0.93);
  --panel-solid: #fdfbf6;
  --line: rgba(96, 88, 74, 0.16);
  --line-soft: rgba(96, 88, 74, 0.09);
  --ink: #33302a;
  --ink-2: #6a6459;
  --ink-3: #948c7d;
  --amber: #c1833c;
  --amber-d: #a66c2b;
  --green: #4f8f52;
  --blue: #3f7fa8;
  --red: #c0553f;
  --shadow: 0 2px 4px rgba(60, 50, 35, .07), 0 10px 26px rgba(60, 50, 35, .13);
  --font: "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

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

html, body {
  height: 100%;
  overflow: hidden;
  background: #b9cdd8;
  font-family: var(--font);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

#view { position: fixed; inset: 0; width: 100%; height: 100%; display: block; cursor: crosshair; }

/* ---------------- 顶栏 ---------------- */
#hud {
  position: fixed; top: 0; left: 0; right: 0; height: 58px;
  display: flex; align-items: center; gap: 18px;
  padding: 0 16px;
  background: linear-gradient(180deg, rgba(253,251,246,.97), rgba(253,251,246,.86));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  z-index: 20;
}

.hud-left { display: flex; align-items: center; min-width: 168px; }
.city-name {
  font-size: 16px; font-weight: 700; letter-spacing: .06em;
  display: flex; flex-direction: column; line-height: 1.25;
}
.city-name .sub { font-size: 10.5px; font-weight: 400; color: var(--ink-3); letter-spacing: .1em; }

.hud-stats { display: flex; align-items: center; gap: 4px; flex: 1; }
.stat {
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 4px 12px; border-radius: 8px; min-width: 74px;
  transition: background .18s;
}
.stat b { font-size: 15px; font-weight: 700; letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 10px; color: var(--ink-3); letter-spacing: .12em; }
.stat.money b { color: var(--amber-d); }
.stat.flash { background: rgba(193,131,60,.16); }
.stat.neg b { color: var(--red); }
.stat.pos b { color: var(--green); }

.hud-right { display: flex; align-items: center; gap: 8px; }

.speed { display: flex; background: rgba(96,88,74,.08); border-radius: 8px; padding: 2px; }
.speed button {
  border: 0; background: transparent; cursor: pointer;
  font-size: 11px; color: var(--ink-2);
  padding: 5px 9px; border-radius: 6px; font-family: var(--font);
  transition: all .15s;
}
.speed button:hover { background: rgba(255,255,255,.7); }
.speed button.on { background: #fff; color: var(--amber-d); box-shadow: 0 1px 3px rgba(0,0,0,.12); font-weight: 700; }

.iconbtn {
  width: 30px; height: 30px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(255,255,255,.6);
  font-size: 13px; color: var(--ink-2); font-family: var(--font);
  transition: all .15s;
}
.iconbtn:hover { background: #fff; border-color: var(--amber); color: var(--amber-d); }

/* ---------------- 工具栏 ---------------- */
#tools {
  position: fixed; left: 14px; top: 72px; width: 132px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); backdrop-filter: blur(10px);
  padding: 8px; z-index: 18;
  max-height: calc(100vh - 200px); overflow-y: auto;
}
#tools::-webkit-scrollbar { width: 5px; }
#tools::-webkit-scrollbar-thumb { background: rgba(96,88,74,.2); border-radius: 3px; }

.tool-group + .tool-group { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line-soft); }
.tool-title {
  font-size: 9.5px; letter-spacing: .2em; color: var(--ink-3);
  padding: 2px 6px 5px; text-transform: uppercase;
}

.tool {
  width: 100%; display: flex; align-items: center; gap: 7px;
  padding: 6px 7px; border-radius: 8px; cursor: pointer;
  border: 1px solid transparent; background: transparent;
  font-family: var(--font); font-size: 12px; color: var(--ink);
  text-align: left; transition: all .14s; position: relative;
}
.tool:hover { background: rgba(193,131,60,.1); }
.tool.on { background: rgba(193,131,60,.17); border-color: rgba(193,131,60,.5); box-shadow: inset 0 0 0 1px rgba(255,255,255,.5); }
.tool .lbl { flex: 1; }
.tool .cost { font-size: 9.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tool.on .cost { color: var(--amber-d); }
.tool.danger:hover { background: rgba(192,85,63,.12); }
.tool.danger.on { background: rgba(192,85,63,.18); border-color: rgba(192,85,63,.45); }
.tool[disabled] { opacity: .38; cursor: not-allowed; }
.tool[disabled]:hover { background: transparent; }
.tool .lock { font-size: 9px; color: var(--ink-3); }

.ico { width: 16px; height: 16px; border-radius: 4px; flex: 0 0 auto; position: relative; }
.ico.road { background: repeating-linear-gradient(90deg, #5a5f66 0 4px, #6d737b 4px 8px); }
.ico.pipe { background: linear-gradient(90deg, #5fb3d9 0 50%, #cfd8dd 50% 100%); }
.ico.pipe::after {
  content: ''; position: absolute; left: 50%; top: 2px; bottom: 2px; width: 2px;
  transform: translateX(-1px); background: #2b333d; border-radius: 1px;
}
.ico.zr { background: #75bb7a; }
.ico.zc { background: #5f9bd0; }
.ico.zi { background: #d8a33c; }
.ico.tree { background: radial-gradient(circle at 50% 65%, #4f8f52 0 45%, transparent 46%), #cfe3c8; }
.ico.bull { background: repeating-linear-gradient(45deg, #c0553f 0 3px, #e9d9c8 3px 6px); }
.ico.svc {
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 9px; color: #fff; font-weight: 700; line-height: 1;
}

/* ---------------- 需求条 ---------------- */
#rci {
  position: fixed; left: 158px; bottom: 16px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 11px;
  box-shadow: var(--shadow); padding: 8px 10px 7px; z-index: 18;
  display: flex; align-items: center; gap: 10px; backdrop-filter: blur(10px);
}
.rci-title { font-size: 9.5px; letter-spacing: .18em; color: var(--ink-3); writing-mode: vertical-rl; }
.rci-bars { display: flex; gap: 7px; align-items: flex-end; }
.rci-col { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.rci-bar {
  width: 13px; height: 62px; background: rgba(96,88,74,.11);
  border-radius: 4px; position: relative; overflow: hidden;
}
.rci-bar i {
  position: absolute; left: 0; right: 0; bottom: 0; height: 0;
  background: var(--green); border-radius: 4px;
  transition: height .45s cubic-bezier(.3,1.2,.4,1), background .3s;
}
.rci-col:nth-child(2) .rci-bar i { background: var(--blue); }
.rci-col:nth-child(3) .rci-bar i { background: #cf9d3c; }
.rci-col span { font-size: 9.5px; color: var(--ink-3); }

/* ---------------- 视图切换 ---------------- */
#overlays {
  position: fixed; right: 14px; bottom: 16px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 11px;
  box-shadow: var(--shadow); padding: 7px; z-index: 18;
  display: flex; flex-direction: column; gap: 2px; backdrop-filter: blur(10px);
}
.ov-title { font-size: 9.5px; letter-spacing: .18em; color: var(--ink-3); padding: 2px 6px 4px; text-align: center; }
.ov {
  border: 0; background: transparent; cursor: pointer; font-family: var(--font);
  font-size: 11px; color: var(--ink-2); padding: 4px 12px; border-radius: 7px;
  text-align: left; transition: all .14s;
}
.ov:hover { background: rgba(193,131,60,.1); }
.ov.on { background: rgba(193,131,60,.2); color: var(--amber-d); font-weight: 600; }

/* ---------------- 悬停信息 ---------------- */
#tip {
  position: fixed; z-index: 30; pointer-events: none;
  background: var(--panel-solid); border: 1px solid var(--line);
  border-radius: 9px; box-shadow: var(--shadow);
  padding: 8px 11px; font-size: 11.5px; min-width: 132px;
  transform: translate(14px, 14px); transition: opacity .14s;
}
#tip.hidden { opacity: 0; }
.tip-title { font-weight: 700; font-size: 12px; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.tip-title .dot { width: 8px; height: 8px; border-radius: 2px; }
.tip-body { color: var(--ink-2); line-height: 1.65; }
.tip-body .row { display: flex; justify-content: space-between; gap: 12px; }
.tip-body .row b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.tip-body .warn { color: var(--red); }

/* ---------------- 提示 ---------------- */
#toasts {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 6px; align-items: center;
  z-index: 40; pointer-events: none;
}
.toast {
  background: rgba(46,42,36,.93); color: #f6efe2;
  font-size: 12px; padding: 7px 15px; border-radius: 20px;
  box-shadow: 0 6px 20px rgba(0,0,0,.28); letter-spacing: .02em;
  animation: toastIn .26s cubic-bezier(.2,1.3,.5,1);
  display: flex; align-items: center; gap: 7px;
}
.toast.bad { background: rgba(150,56,42,.95); }
.toast.good { background: rgba(58,110,62,.95); }
.toast.out { animation: toastOut .3s forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(.94); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-8px); } }

/* ---------------- 载入 / 开场 ---------------- */
#loading {
  position: fixed; inset: 0; z-index: 90;
  background: linear-gradient(160deg, #e8eee9, #cfdcd8);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .5s;
}
#loading.done { opacity: 0; pointer-events: none; }
.load-inner { text-align: center; }
.load-logo { font-size: 27px; font-weight: 800; letter-spacing: .34em; color: #3c4a42; }
.load-sub { font-size: 11.5px; color: #7b8a80; margin-top: 8px; letter-spacing: .12em; }
.load-bar {
  width: 236px; height: 3px; background: rgba(60,74,66,.14);
  border-radius: 2px; margin: 22px auto 8px; overflow: hidden;
}
.load-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #8fae74, #c1833c); transition: width .25s; }
.load-pct { font-size: 10.5px; color: #8b9a90; font-variant-numeric: tabular-nums; }

#intro, #help {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(30,38,34,.42); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .28s;
}
#intro.hidden, #help.hidden { opacity: 0; pointer-events: none; }

.intro-card, .help-card {
  background: var(--panel-solid); border-radius: 16px;
  box-shadow: 0 20px 70px rgba(30,30,25,.3);
  padding: 30px 34px; width: min(660px, 92vw);
  max-height: 88vh; overflow-y: auto;
}
.intro-card h1 { font-size: 27px; letter-spacing: .16em; font-weight: 800; }
.intro-card .lead { font-size: 13px; color: var(--ink-2); margin: 8px 0 22px; line-height: 1.7; }

.steps { display: grid; gap: 12px; margin-bottom: 22px; }
.step { display: flex; gap: 12px; align-items: flex-start; font-size: 12.5px; color: var(--ink-2); line-height: 1.65; }
.step > b {
  flex: 0 0 auto; width: 21px; height: 21px; border-radius: 50%;
  background: rgba(193,131,60,.16); color: var(--amber-d);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; margin-top: 1px;
}
.step em { font-style: normal; color: var(--amber-d); font-weight: 600; }
.step strong { color: var(--ink); margin-right: 3px; }

.keys { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 11px; color: var(--ink-3); margin-bottom: 24px; }
kbd {
  background: rgba(96,88,74,.09); border-radius: 4px; padding: 2px 6px;
  font-family: var(--font); font-size: 10.5px; color: var(--ink-2); margin-right: 4px;
}

.intro-card button, .help-card button {
  background: linear-gradient(180deg, #c98b45, #b3752f); color: #fff;
  border: 0; border-radius: 9px; padding: 10px 30px; cursor: pointer;
  font-family: var(--font); font-size: 13px; font-weight: 600; letter-spacing: .1em;
  box-shadow: 0 4px 14px rgba(179,117,47,.32); transition: all .16s;
}
.intro-card button:hover, .help-card button:hover { transform: translateY(-1px); box-shadow: 0 7px 20px rgba(179,117,47,.4); }

.intro-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.intro-card button.ghost {
  background: transparent; color: var(--ink-2);
  border: 1px solid rgba(96,88,74,.24); box-shadow: none;
  letter-spacing: .04em;
}
.intro-card button.ghost:hover { background: rgba(96,88,74,.06); box-shadow: none; }

.help-card h2 { font-size: 18px; letter-spacing: .1em; margin-bottom: 16px; }
.help-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.hc { background: rgba(96,88,74,.05); border-radius: 9px; padding: 11px 13px; }
.hc b { font-size: 12px; color: var(--amber-d); }
.hc p { font-size: 11.5px; color: var(--ink-2); line-height: 1.7; margin-top: 4px; }

/* ---------------- 环境条：风向 / 对外交通 ---------------- */
#env {
  position: fixed; left: 158px; top: 68px; z-index: 19;
  display: flex; gap: 6px;
}
.envchip {
  display: flex; align-items: center; gap: 7px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 9px;
  box-shadow: var(--shadow); backdrop-filter: blur(10px);
  padding: 5px 9px; cursor: pointer; font-family: var(--font);
  transition: border-color .16s, transform .16s;
}
.envchip:hover { border-color: rgba(193,131,60,.5); transform: translateY(-1px); }
.envchip.warn { border-color: rgba(192,85,63,.55); background: rgba(253,244,240,.95); }
.earrow {
  width: 20px; height: 20px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: #4b6c86;
  border-radius: 50%; background: rgba(90,130,160,.12);
  transition: transform .5s cubic-bezier(.3,1.2,.4,1);
}
.etext { display: flex; flex-direction: column; line-height: 1.2; text-align: left; }
.etext b { font-size: 11px; font-weight: 600; color: var(--ink); }
.etext i { font-size: 9px; font-style: normal; color: var(--ink-3); }
.edot {
  width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto;
  background: var(--red);
}
.edot.ok { background: var(--green); box-shadow: 0 0 0 3px rgba(79,143,82,.16); }
.edot.build { background: #d8a33c; animation: sitePulse 1.4s ease-in-out infinite; }
@keyframes sitePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(216,163,60,.45); }
  50% { box-shadow: 0 0 0 4px rgba(216,163,60,0); }
}
.envchip.hidden { display: none; }

/* ---------------- 上手目标 ---------------- */
#goals {
  position: fixed; right: 14px; top: 68px; width: 210px; z-index: 18;
  background: var(--panel); border: 1px solid var(--line); border-radius: 11px;
  box-shadow: var(--shadow); backdrop-filter: blur(10px);
  padding: 9px 11px 10px;
  max-height: calc(100vh - 330px); display: flex; flex-direction: column;
  transition: box-shadow .3s, border-color .3s;
}
#goals.ping { border-color: rgba(79,143,82,.6); box-shadow: 0 0 0 3px rgba(79,143,82,.14), var(--shadow); }
#goals.min { max-height: 40px; }
.ph-head {
  display: flex; align-items: center; gap: 6px;
  cursor: pointer; user-select: none; padding-bottom: 6px;
  border-bottom: 1px solid var(--line-soft);
}
.ph-title { font-size: 10px; letter-spacing: .18em; color: var(--ink-3); flex: 1; }
.ph-count { font-size: 10px; color: var(--amber-d); font-variant-numeric: tabular-nums; }
.ph-toggle { font-size: 10px; color: var(--ink-3); width: 12px; text-align: center; }
.goals-list {
  list-style: none; overflow-y: auto; margin-top: 7px;
  display: flex; flex-direction: column; gap: 7px;
}
.goals-list::-webkit-scrollbar { width: 4px; }
.goals-list::-webkit-scrollbar-thumb { background: rgba(96,88,74,.2); border-radius: 2px; }
.goal { display: flex; gap: 7px; align-items: flex-start; opacity: .72; transition: opacity .2s; }
.goal.active { opacity: 1; }
.gmark {
  width: 12px; height: 12px; margin-top: 2px; flex: 0 0 auto;
  border-radius: 50%; border: 1.5px solid rgba(96,88,74,.32);
  position: relative;
}
.goal.done .gmark { background: var(--green); border-color: var(--green); }
.goal.done .gmark::after {
  content: ''; position: absolute; left: 3px; top: 1px;
  width: 3px; height: 6px; border: solid #fff; border-width: 0 1.5px 1.5px 0;
  transform: rotate(42deg);
}
.goal.done .gtext { color: var(--ink-3); text-decoration: line-through; text-decoration-color: rgba(96,88,74,.3); }
.gtext { font-size: 11px; line-height: 1.45; color: var(--ink); }
.ghint { display: none; font-size: 9.5px; line-height: 1.5; color: var(--ink-3); margin-top: 2px; }
.goal.active .ghint { display: block; }
.goals-all { font-size: 10.5px; line-height: 1.6; color: var(--green); margin-top: 6px; }

/* ---------------- 工具栏说明卡 ---------------- */
#modtip {
  position: fixed; z-index: 36; width: 246px; pointer-events: none;
  background: var(--panel-solid); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: var(--shadow); padding: 10px 12px;
  transition: opacity .14s;
}
#modtip.hidden { opacity: 0; }
.mt-head { display: flex; align-items: center; gap: 7px; }
.mt-head b { font-size: 12.5px; flex: 1; }
.mt-cost { font-size: 10px; color: var(--amber-d); font-variant-numeric: tabular-nums; }
.mt-meta { display: flex; flex-wrap: wrap; gap: 4px; margin: 5px 0 6px; }
.mt-meta span {
  font-size: 9px; color: var(--ink-2); background: rgba(96,88,74,.07);
  border-radius: 4px; padding: 1px 5px;
}
.mt-meta .mod-lock { color: var(--red); background: rgba(192,85,63,.1); }
.mt-role { font-size: 10.5px; color: var(--amber-d); font-weight: 600; margin-bottom: 4px; }
.mt-line { font-size: 10.5px; line-height: 1.65; color: var(--ink-2); }
.mt-line em {
  font-style: normal; color: var(--ink); font-weight: 600; margin-right: 3px;
}
.mt-tip {
  font-size: 10px; line-height: 1.6; color: var(--ink-2);
  border-left: 2px solid rgba(193,131,60,.45); padding-left: 6px; margin-top: 6px;
}
.mt-foot { font-size: 9px; color: var(--ink-3); margin-top: 7px; letter-spacing: .04em; }

/* ---------------- 视图说明条 ---------------- */
#ovhint {
  position: fixed; right: 148px; bottom: 16px; width: 258px; z-index: 19;
  background: var(--panel); border: 1px solid var(--line); border-radius: 11px;
  box-shadow: var(--shadow); backdrop-filter: blur(10px); padding: 9px 12px 10px;
  transition: opacity .2s;
}
#ovhint.hidden { opacity: 0; pointer-events: none; }
.oh-head { display: flex; align-items: center; gap: 8px; }
.oh-head b { font-size: 12px; flex: 1; }
.oh-x {
  border: 0; background: transparent; cursor: pointer; color: var(--ink-3);
  font-size: 14px; line-height: 1; padding: 0 2px; font-family: var(--font);
}
.oh-x:hover { color: var(--red); }
.oh-what { font-size: 10.5px; line-height: 1.65; color: var(--ink-2); margin-top: 5px; }
.oh-legend { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 6px; }
.oh-legend span { font-size: 9.5px; color: var(--ink-2); display: flex; align-items: center; gap: 4px; }
.oh-legend i { width: 9px; height: 9px; border-radius: 2px; display: block; }
.oh-read {
  font-size: 10px; line-height: 1.6; color: var(--ink-3);
  margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line-soft);
}
.oh-read em {
  font-style: normal; color: var(--amber-d); font-weight: 600; margin-right: 4px;
}

/* ---------------- 顶栏数值提示 ---------------- */
#stathint {
  position: fixed; z-index: 36; width: 232px; pointer-events: none;
  background: var(--panel-solid); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: var(--shadow); padding: 10px 12px;
  transition: opacity .14s;
}
#stathint.hidden { opacity: 0; }
.sh-head b { font-size: 12px; letter-spacing: .04em; }
.sh-what { font-size: 10.5px; line-height: 1.65; color: var(--ink-2); margin-top: 4px; }
.sh-rows { margin-top: 7px; padding-top: 6px; border-top: 1px solid var(--line-soft); }
.sh-rows div { display: flex; justify-content: space-between; gap: 10px; font-size: 10.5px; line-height: 1.85; }
.sh-rows span { color: var(--ink-3); }
.sh-rows b { font-weight: 600; font-variant-numeric: tabular-nums; }
.sh-rows .sep { border-top: 1px dashed var(--line-soft); margin-top: 3px; padding-top: 3px; }
.sh-rows b.pos { color: var(--green); }
.sh-rows b.neg { color: var(--red); }
.sh-more { font-size: 9.5px; line-height: 1.6; color: var(--ink-3); margin-top: 7px; }
.stat.explainable { cursor: help; }
.stat.explainable:hover { background: rgba(96,88,74,.06); }

/* ---------------- 手册（多标签） ---------------- */
.help-card { width: min(880px, 94vw); padding: 0; display: flex; flex-direction: column; max-height: 88vh; }
.help-head {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 22px 26px 14px;
}
.help-head h2 { font-size: 18px; letter-spacing: .1em; }
.help-sub { font-size: 11px; color: var(--ink-3); margin-top: 4px; line-height: 1.6; }
.xbtn {
  margin-left: auto; border: 0; background: transparent; cursor: pointer;
  font-size: 20px; line-height: 1; color: var(--ink-3); padding: 0 2px;
  font-family: var(--font);
}
.xbtn:hover { color: var(--red); }
.help-tabs {
  display: flex; gap: 2px; padding: 0 26px;
  border-bottom: 1px solid var(--line-soft);
}
.hp-tab {
  border: 0; background: transparent; cursor: pointer; font-family: var(--font);
  font-size: 12px; color: var(--ink-2); padding: 8px 14px 9px;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .15s, border-color .15s;
}
.hp-tab:hover { color: var(--amber-d); }
.hp-tab.on { color: var(--amber-d); border-bottom-color: var(--amber); font-weight: 600; }
.help-scroll { overflow-y: auto; padding: 4px 26px 8px; flex: 1; }
.help-scroll::-webkit-scrollbar { width: 5px; }
.help-scroll::-webkit-scrollbar-thumb { background: rgba(96,88,74,.22); border-radius: 3px; }
.help-foot {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 26px 16px; border-top: 1px solid var(--line-soft);
}
.help-foot span { font-size: 10px; color: var(--ink-3); flex: 1; line-height: 1.5; }
.help-foot button { padding: 8px 22px; font-size: 12px; }

.hp-pane { display: none; padding-top: 14px; }
.hp-pane.on { display: block; }
.hp-sec { margin-bottom: 20px; }
.hp-sec h3 {
  font-size: 12.5px; letter-spacing: .06em; color: var(--ink);
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  margin-bottom: 9px;
}
.hp-note { font-size: 10px; font-weight: 400; color: var(--ink-3); letter-spacing: 0; }
.hp-lead {
  background: linear-gradient(180deg, rgba(193,131,60,.1), rgba(193,131,60,.04));
  border-radius: 10px; padding: 12px 14px; margin-bottom: 18px;
}
.hp-lead span { font-size: 9.5px; letter-spacing: .2em; color: var(--amber-d); }
.hp-lead p { font-size: 12.5px; line-height: 1.7; color: var(--ink); margin-top: 3px; }
.hp-loop { display: grid; gap: 9px; }
.lp { display: flex; gap: 11px; align-items: flex-start; }
.lp b {
  flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%;
  background: rgba(193,131,60,.16); color: var(--amber-d);
  display: flex; align-items: center; justify-content: center;
  font-size: 10.5px; font-weight: 700; margin-top: 1px;
}
.lp strong { font-size: 11.5px; margin-right: 4px; }
.lp p { font-size: 11px; line-height: 1.7; color: var(--ink-2); display: inline; }
.lp > div { flex: 1; }
.hp-list { list-style: none; display: grid; gap: 6px; }
.hp-list li {
  font-size: 11px; line-height: 1.7; color: var(--ink-2);
  padding-left: 12px; position: relative;
}
.hp-list li::before {
  content: ''; position: absolute; left: 0; top: 8px;
  width: 4px; height: 4px; border-radius: 50%; background: rgba(193,131,60,.6);
}

.hp-tablewrap { overflow-x: auto; }
.hp-table { width: 100%; border-collapse: collapse; font-size: 10.5px; }
.hp-table th {
  text-align: left; font-weight: 600; color: var(--ink-3);
  font-size: 9.5px; letter-spacing: .1em;
  padding: 5px 8px; border-bottom: 1px solid var(--line);
}
.hp-table td { padding: 6px 8px; border-bottom: 1px solid var(--line-soft); color: var(--ink-2); line-height: 1.6; vertical-align: top; }
.hp-table tr:last-child td { border-bottom: 0; }
.hp-table .sym { color: var(--ink); font-weight: 600; width: 30%; }
.hp-table .why { color: var(--amber-d); width: 28%; }
.hp-table.levels td:first-child, .hp-table.miles td:first-child { font-weight: 600; color: var(--ink); }

.mod-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mod {
  background: rgba(96,88,74,.045); border: 1px solid var(--line-soft);
  border-radius: 10px; padding: 11px 13px;
}
.mod-head { display: flex; align-items: center; gap: 7px; }
.mod-head b { font-size: 12px; flex: 1; }
.mod-cost { font-size: 9.5px; color: var(--amber-d); font-variant-numeric: tabular-nums; }
.mod-badge { width: 17px; height: 17px; border-radius: 4px; flex: 0 0 auto; display: block; }
.mod-badge.txt {
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 9px; font-weight: 700; line-height: 1;
}
.mod-meta { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 7px; }
.mod-meta span {
  font-size: 9px; color: var(--ink-2); background: rgba(255,255,255,.66);
  border-radius: 4px; padding: 1px 5px;
}
.mod-meta .mod-lock { color: var(--red); background: rgba(192,85,63,.1); }
.mod-role { font-size: 10px; color: var(--amber-d); font-weight: 600; margin-bottom: 5px; }
.mod-line { font-size: 10.5px; line-height: 1.7; color: var(--ink-2); }
.mod-line em, .vr-read em {
  font-style: normal; font-weight: 600; color: var(--ink); margin-right: 4px;
}
.mod-tips { list-style: none; margin-top: 6px; display: grid; gap: 3px; }
.mod-tips li {
  font-size: 9.5px; line-height: 1.6; color: var(--ink-3);
  padding-left: 9px; position: relative;
}
.mod-tips li::before { content: '·'; position: absolute; left: 2px; color: var(--amber); font-weight: 700; }

.vr-list { display: grid; gap: 8px; }
.viewrow {
  background: rgba(96,88,74,.045); border-radius: 9px; padding: 10px 13px;
}
.viewrow.plain { background: transparent; border: 1px dashed var(--line); }
.vr-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vr-head b { font-size: 11.5px; }
.vr-legend { display: flex; flex-wrap: wrap; gap: 4px 9px; }
.vr-legend span { font-size: 9px; color: var(--ink-2); display: flex; align-items: center; gap: 3px; }
.vr-legend i { width: 8px; height: 8px; border-radius: 2px; display: block; }
.vr-what { font-size: 10.5px; line-height: 1.65; color: var(--ink-2); margin-top: 5px; }
.vr-read { font-size: 10px; line-height: 1.6; color: var(--ink-3); margin-top: 4px; }

.numgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.numc { background: rgba(96,88,74,.045); border-radius: 9px; padding: 10px 12px; }
.numc b { font-size: 11.5px; color: var(--amber-d); }
.numc p { font-size: 10.5px; line-height: 1.65; color: var(--ink-2); margin-top: 3px; }
.numc .more { font-size: 9.5px; color: var(--ink-3); }

.intro-note {
  font-size: 10.5px; line-height: 1.7; color: var(--ink-3);
  background: rgba(193,131,60,.08); border-radius: 8px;
  padding: 9px 12px; margin: -6px 0 18px;
}

@media (max-width: 1100px) {
  .help-grid, .mod-grid, .numgrid { grid-template-columns: 1fr; }
  #tools { width: 116px; }
  .hud-stats .stat { min-width: 62px; padding: 4px 8px; }
  .city-name { font-size: 14px; }
  #goals { width: 186px; }
  #ovhint { width: 226px; right: 140px; }
}

/* ---------------- 操作手感：角标 / 拖拽条 / 底部提示 ---------------- */
.iconbtn:disabled { opacity: .3; cursor: default; }
.iconbtn:disabled:hover { background: rgba(255,255,255,.6); border-color: var(--line); color: var(--ink-2); }

.tool .kbd {
  flex: 0 0 auto; width: 13px; height: 13px; border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; line-height: 1; color: var(--ink-3);
  background: rgba(96,88,74,.09); font-variant-numeric: tabular-nums;
  transition: all .14s;
}
.tool.on .kbd { background: rgba(193,131,60,.28); color: var(--amber-d); }
.tool[disabled] .kbd { opacity: .5; }

#dragChip {
  position: fixed; z-index: 31; pointer-events: none;
  display: flex; align-items: center; gap: 8px;
  padding: 4px 9px; border-radius: 7px;
  background: rgba(46,42,36,.88); color: #f6efe2;
  font-size: 11.5px; font-variant-numeric: tabular-nums;
  box-shadow: 0 4px 14px rgba(0,0,0,.24);
  transition: opacity .1s;
}
#dragChip.hidden { display: none; }
#dragChip b { font-weight: 700; letter-spacing: .02em; }
#dragChip span { color: #e8c06a; }
#dragChip span.poor { color: #f0a08e; }
#dragChip.bad { background: rgba(150,56,42,.92); }
#dragChip.bad span { color: #ffd9cf; }

#hintbar {
  position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 9px;
  padding: 7px 15px; border-radius: 20px;
  background: rgba(253,251,246,.9); border: 1px solid var(--line);
  box-shadow: var(--shadow); backdrop-filter: blur(8px);
  font-size: 11.5px; color: var(--ink-2); z-index: 16;
  pointer-events: none; white-space: nowrap;
  max-width: calc(100vw - 40px);
  transition: opacity .2s;
}
#hintbar b { color: var(--ink); font-weight: 700; }
#hintbar b::after { content: ''; }
#hintbar span { color: var(--ink-2); }
#hintbar i {
  font-style: normal; color: var(--ink-3); font-size: 10.5px;
  border-left: 1px solid var(--line); padding-left: 9px;
}

@media (max-width: 1180px) {
  #hintbar i { display: none; }
}
@media (max-width: 860px) {
  #hintbar { font-size: 11px; padding: 6px 12px; }
  #hintbar span { display: none; }
}
.tip-body .row b.mute { color: var(--ink-3); font-weight: 500; }

/* 手册里的操作表 */
.keygrid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 16px; }
.kg {
  display: flex; align-items: baseline; gap: 9px;
  font-size: 11px; color: var(--ink-2); padding: 5px 0;
  border-bottom: 1px dashed var(--line-soft);
}
.kg kbd {
  flex: 0 0 auto; min-width: 86px; text-align: center;
  background: rgba(96,88,74,.1); color: var(--ink);
  margin: 0; padding: 3px 7px; font-size: 10px; letter-spacing: .02em;
}
.kg span { line-height: 1.55; }
@media (max-width: 900px) { .keygrid { grid-template-columns: 1fr; } }
