/* map.css —— 帕鲁地图独立页(map.html,自包含变量,不依赖其他样式) */
html, body { margin: 0; padding: 0; background: #0d1712; }
.map-page {
  --bg: #0d1712; --panel: #16281f; --line: #274435; --text: #d8e6dc; --muted: #9db8a6; --accent: #ffd257;
  display: flex; flex-direction: column;
  height: 100vh; margin: 0; padding: 14px 16px 10px; box-sizing: border-box;
  background: var(--bg); color: var(--text);
  font: 14px/1.5 system-ui, "Microsoft YaHei", sans-serif;
}
.map-page * { box-sizing: border-box; }
.map-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 10px; }
.map-head h1 { font-size: 19px; margin: 0; }
.map-back {
  color: var(--muted); text-decoration: none; font-size: 13px;
  border: 1px solid var(--line); border-radius: 7px; padding: 3px 10px;
}
.map-back:hover { color: var(--accent); border-color: var(--accent); }
.map-bar { display: flex; gap: 8px; margin-bottom: 8px; position: relative; }
.map-bar input {
  flex: 1; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--panel); color: var(--text); outline: none; font-size: 13px;
}
.map-bar input:focus { border-color: var(--accent); }
.map-sug {
  position: absolute; left: 0; right: 78px; top: 40px; z-index: 30;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  max-height: 300px; overflow-y: auto; box-shadow: 0 10px 24px rgba(0, 0, 0, .4);
}
.ms-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 12px; cursor: pointer; }
.ms-item:hover { background: rgba(255, 210, 87, .1); }
.ms-item b { font-weight: 500; font-size: 13px; }
.ms-item em { font-style: normal; color: var(--muted); font-size: 11px; flex: none; }
.map-btn {
  padding: 6px 14px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--panel); color: var(--text); font-size: 13px; cursor: pointer;
}
.map-btn:hover { border-color: var(--accent); color: var(--accent); }
.map-legend {
  min-height: 24px; margin-bottom: 6px; font-size: 12.5px;
  display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center;
}
.ml-item { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; padding: 2px 8px; border-radius: 6px; border: 1px solid transparent; }
.ml-item:hover { border-color: var(--line); }
.ml-item i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.ml-item em { font-style: normal; color: var(--muted); font-size: 11px; }
.ml-flags { color: var(--muted); font-size: 11.5px; }
.map-wrap { flex: 1; min-height: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #0c1512; position: relative; }
.map-wrap canvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.map-wrap canvas:active { cursor: grabbing; }
/* 右下角鼠标位置实时坐标(游戏内同款读数,带小数) */
.map-pos {
  position: absolute; right: 10px; bottom: 10px; z-index: 15;
  background: rgba(16, 30, 23, .9); border: 1px solid var(--line); border-radius: 7px;
  padding: 3px 10px; font-size: 12px; color: var(--accent);
  font-family: ui-monospace, Consolas, monospace; pointer-events: none; white-space: nowrap;
}
/* 点击标记弹的信息卡(不跳转;坐标为游戏世界坐标) */
.map-card {
  position: absolute; top: 12px; right: 12px; z-index: 20;
  width: min(300px, calc(100% - 24px));
  background: rgba(16, 30, 23, .96); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; box-shadow: 0 12px 28px rgba(0, 0, 0, .5);
}
.map-card .mc-head { display: flex; align-items: center; gap: 8px; }
.map-card img { width: 44px; height: 44px; object-fit: contain; flex: none; }
.map-card .mc-name { font-size: 15px; font-weight: 600; }
.map-card .mc-en { font-size: 11px; color: var(--muted); }
.map-card .mc-row { font-size: 12.5px; margin-top: 6px; color: var(--text); }
.map-card .mc-coord { font-size: 12px; color: var(--accent); font-family: ui-monospace, Consolas, monospace; }
.map-card .mc-link { display: inline-block; margin-top: 8px; font-size: 12.5px; color: var(--accent); }
.map-card .mc-close {
  position: absolute; top: 6px; right: 8px; border: none; background: none;
  color: var(--muted); font-size: 13px; cursor: pointer; padding: 2px 4px;
}
.map-card .mc-close:hover { color: var(--text); }
.map-foot { margin-top: 8px; font-size: 11px; color: var(--muted); }
@media (max-width: 640px) {
  .map-page { padding: 10px 10px 8px; }
  .map-head { gap: 10px; }
  .map-head h1 { font-size: 17px; }
  .ml-flags { display: none; }
  .map-foot { font-size: 10px; }
}
