:root {
  --fg: #1d1d1f;
  --muted: #6b6b70;
  --bg: #f6f7f9;
  --card: #fff;
  --line: #e2e4e8;
  --accent: #1e6eff;
  --warn: #e8590c;
  --ok: #13a35a;
  --bad: #d6336c;
  font-family: system-ui, -apple-system, "Segoe UI", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  color: var(--fg);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; }
header.top {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; background: var(--card); border-bottom: 1px solid var(--line);
}
header.top a.brand { font-weight: 700; color: var(--fg); text-decoration: none; font-size: 18px; }
header.top .tag { font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 2px 8px; }
main { max-width: 1000px; margin: 0 auto; padding: 20px; }
h1 { font-size: 26px; margin: 8px 0 4px; }
h2 { font-size: 18px; margin: 0 0 12px; }
p.lead { color: var(--muted); margin: 0 0 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin-bottom: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line); background: var(--card); color: var(--fg);
  padding: 9px 14px; border-radius: 8px; font-size: 15px; cursor: pointer; text-decoration: none;
}
.btn:hover { border-color: #c5c8ce; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.warn { background: var(--warn); border-color: var(--warn); color: #fff; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.active { outline: 2px solid var(--accent); outline-offset: 1px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 14px; }
.mapwrap { position: relative; width: 100%; background: #ddd; border-radius: 8px; overflow: hidden; }
.mapwrap canvas { display: block; touch-action: none; }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { padding: 4px 0; }
.checks li.ok::before { content: "✔ "; color: var(--ok); }
.checks li.bad::before { content: "✖ "; color: var(--bad); }
.notice { border-radius: 8px; padding: 10px 14px; margin-bottom: 12px; font-size: 14px; }
.notice.warn { background: #fff4e6; border: 1px solid #ffd8a8; }
.notice.bad { background: #fff0f6; border: 1px solid #fcc2d7; }
.notice.ok { background: #ebfbee; border: 1px solid #b2f2bb; }
progress { width: 100%; }
input[type=text] { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 15px; min-width: 240px; }
.steps { display: flex; gap: 8px; margin-bottom: 16px; font-size: 13px; color: var(--muted); }
.steps span.on { color: var(--accent); font-weight: 700; }
.anchor-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.dpad { display: grid; grid-template-columns: repeat(3, 48px); grid-template-rows: repeat(3, 48px); gap: 4px; }
.dpad .btn { padding: 0; font-size: 20px; }
.hud { display: flex; flex-wrap: wrap; gap: 16px; font-size: 14px; }
.hud b { font-variant-numeric: tabular-nums; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: #222; color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 14px;
  opacity: 0; transition: opacity .2s; pointer-events: none; max-width: 90vw; z-index: 10;
}
.toast.show { opacity: .95; }
footer { text-align: center; color: var(--muted); font-size: 12px; padding: 24px; }
