/* 折页地图使用深色墨框、陈年纸和同一套钓场色标。 */
.water-atlas-dialog {
  --atlas-paper:#efe0bb;
  --atlas-ink:#312b20;
  --atlas-rule:#aa8b58;
  width:min(640px,calc(100vw - 20px));
  max-height:calc(100dvh - 22px);
  padding:0;
  overflow:auto;
  overscroll-behavior:contain;
  border:2px solid #231e17;
  border-radius:12px;
  background:var(--atlas-paper);
  color:var(--atlas-ink);
  box-shadow:0 18px 58px #18201ec4, inset 0 0 0 2px #b99b62;
}
.water-atlas-dialog::backdrop { background:#192821bf; backdrop-filter:blur(3px); }
.atlas-heading {
  position:sticky;
  top:0;
  z-index:2;
  display:flex;
  align-items:center;
  gap:9px;
  padding:7px 9px 7px 12px;
  border-bottom:1px solid #9f8156;
  background:#354636;
  color:#fcecc8;
}
.atlas-heading > h2 { flex:1; color:inherit; font-size:clamp(15px,4.8vw,23px); letter-spacing:.05em; }
.atlas-back {
  min-height:36px;
  padding:2px 8px;
  border:1px solid #bda978;
  border-radius:4px;
  background:#efe1bd;
  color:#372d1f;
  white-space:nowrap;
  font-size:11px;
  font-weight:700;
}
.atlas-body { padding:8px; }
.atlas-regions { display:flex; gap:8px; margin:0 auto 9px; width:min(100%,510px); }
.atlas-regions button { flex:1; }
.atlas-regions button[aria-pressed="true"] { background:#314a3c; color:#fff0c9; }
.atlas-overview-art,.atlas-water-art {
  position:relative;
  overflow:hidden;
  border:1px solid #5e4a2d;
  border-radius:6px;
  background:#43534c;
  box-shadow:0 0 0 1px #c3aa77;
}
.atlas-overview-art { width:min(100%,510px,64dvh); margin:auto; aspect-ratio:1; }
.atlas-overview-art > img,.atlas-water-art > img { display:block; width:100%; height:100%; object-fit:cover; }
.atlas-water-pin,.atlas-water-art {
  --water-ink:#2e4831;
  --water-fill:#657962;
}
[data-atlas-water="stone"],.atlas-body[data-water="stone"] .atlas-water-art,.atlas-body[data-water="stone"] .atlas-plot { --water-ink:#293f4d; --water-fill:#557382; }
[data-atlas-water="pine"],.atlas-body[data-water="pine"] .atlas-water-art,.atlas-body[data-water="pine"] .atlas-plot { --water-ink:#42364a; --water-fill:#6d5c75; }
[data-atlas-water="sea"],.atlas-body[data-water="sea"] .atlas-water-art,.atlas-body[data-water="sea"] .atlas-plot { --water-ink:#233e55; --water-fill:#426981; }
[data-atlas-water="stream"],.atlas-body[data-water="stream"] .atlas-water-art,.atlas-body[data-water="stream"] .atlas-plot { --water-ink:#25483c; --water-fill:#507963; }
[data-atlas-water="river"],.atlas-body[data-water="river"] .atlas-water-art,.atlas-body[data-water="river"] .atlas-plot { --water-ink:#5e3928; --water-fill:#887245; }
[data-atlas-water="estuary"],.atlas-body[data-water="estuary"] .atlas-water-art,.atlas-body[data-water="estuary"] .atlas-plot { --water-ink:#235658; --water-fill:#51858b; }
[data-atlas-water="reef"],.atlas-body[data-water="reef"] .atlas-water-art,.atlas-body[data-water="reef"] .atlas-plot { --water-ink:#304158; --water-fill:#4f6382; }
/* 水域铭牌与人物标记共享锚点，标题和人物均有独立的点击区域。 */
.atlas-pin {
  position:absolute;
  left:clamp(58px,var(--mobile-pin-x,var(--pin-x)),calc(100% - 58px));
  top:clamp(22px,var(--mobile-pin-y,var(--pin-y)),calc(100% - 70px));
  transform:translate(-50%,-22px);
  width:clamp(98px,33vw,138px);
  display:grid;
  justify-items:center;
  gap:3px;
}
.atlas-pin:focus-within { z-index:1; }
.atlas-water-pin {
  position:relative;
  display:grid;
  min-width:min(100%,100px);
  min-height:44px;
  padding:3px 6px;
  border:1px solid #e4c58e;
  border-radius:5px;
  background:var(--water-ink);
  box-shadow:inset 0 0 0 2px #24282164,0 2px 5px #211b14b5;
  color:#fff0c8;
  font-weight:700;
  line-height:1.3;
}
.atlas-water-pin:hover,.atlas-water-pin[aria-expanded="true"] { background:#202f25; }
.atlas-water-pin[aria-current]::after {
  content:"";
  position:absolute;
  inset:-5px -5px auto auto;
}
.atlas-water-pin[aria-current]::after,.atlas-current::before {
  width:10px;
  height:10px;
  border:2px solid #fff4d7;
  border-radius:50%;
  background:#318ba4;
  box-shadow:0 0 0 1px #214e63;
}
.atlas-water-pin:focus-visible,.atlas-pin-npcs button:focus-visible { outline:2px solid #ffdf8e; outline-offset:2px; }
.atlas-water-pin span { font:700 clamp(13px,4vw,19px)/1.15 LocalSerif,"Songti SC",serif; }
.atlas-water-pin small { font-size:10px; font-weight:400; white-space:nowrap; }
.atlas-pin-npcs { display:flex; gap:3px; }
.atlas-pin-npcs:empty { display:none; }
.atlas-pin-npcs button,.atlas-local {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:4px;
  padding:3px 5px;
  min-height:40px;
  border:1px solid #644d2e;
  border-radius:4px;
  background:#f3e0ac;
  color:#392b1e;
  font-size:11px;
  font-weight:700;
  line-height:1.15;
}
.atlas-pin-npcs button { display:grid; align-content:center; gap:3px; min-width:46px; min-height:44px; box-shadow:0 1px 4px #302b20a0; }
.atlas-pin-npcs button > span { display:flex; align-items:center; justify-content:center; gap:4px; }
.atlas-pin-npcs small { color:#5b472e; font-size:10px; white-space:nowrap; }
@media (max-width:400px) {
  /* 窄屏错开海堤、石塘与松湖，保证每个铭牌和服务标签都能点到。 */
  .atlas-pin[data-pin="sea"] { --mobile-pin-x:69%; --mobile-pin-y:8%; }
  .atlas-pin[data-pin="pine"] { --mobile-pin-x:34%; }
}
.atlas-pin-npcs button:hover,.atlas-pin-npcs button[aria-expanded="true"],.atlas-local:hover { background:#ffedbf; }
.atlas-person-mark { display:grid; flex:none; justify-items:center; align-content:center; gap:1px; width:10px; color:#52654a; }
.atlas-person-mark::before { content:""; width:5px; height:5px; border-radius:50%; background:currentColor; }
.atlas-person-mark::after { content:""; width:9px; height:5px; border-radius:4px 4px 1px 1px; background:currentColor; }
[data-atlas-npc][data-ready] .atlas-person-mark { color:#a45a1e; filter:drop-shadow(0 0 2px #ffc14d); }
.atlas-current,.atlas-instruction { margin:0 auto 8px; text-align:center; color:#514129; font-size:12px; }
.atlas-current { display:flex; justify-content:center; align-items:center; gap:7px; }
.atlas-current::before { content:""; flex:none; }
.atlas-instruction { margin:7px auto 1px; }
.atlas-place-menu {
  display:grid;
  gap:8px;
  width:min(100%,510px);
  margin:9px auto 1px;
  padding:9px;
  border:1px solid #8b6e45;
  border-top:3px solid #465743;
  border-radius:5px;
  background:#f6e8c6;
  box-shadow:inset 0 0 0 1px #d5bc86;
}
.atlas-place-head { display:grid; grid-template-columns:66px minmax(0,1fr); align-items:center; gap:9px; }
.atlas-place-head img { width:66px; height:66px; object-fit:cover; object-position:center 24%; border:1px solid #9d8051; border-radius:4px; }
.atlas-place-head img.atlas-place-portrait { object-position:center; }
.atlas-place-head p,.atlas-place-locals > span,.atlas-detail-locals > span { color:#5b472e; font-size:11px; }
.atlas-place-head h3 { font:700 23px/1.25 LocalSerif,"Songti SC",serif; }
.atlas-place-head h3:focus { outline:none; }
.atlas-place-head .atlas-npc-ready { color:#86471b; font-weight:700; }
.atlas-place-actions { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,128px),1fr)); gap:6px; }
.atlas-place-actions button,.atlas-you-are-here { min-height:44px; }
.atlas-you-are-here { display:grid; place-items:center; border:1px dashed #9d865e; border-radius:4px; color:#385849; font-size:12px; font-weight:700; }
.atlas-place-locals,.atlas-detail-locals { display:flex; flex-wrap:wrap; align-items:center; gap:4px 8px; }
.atlas-place-locals > div,.atlas-detail-locals > div { display:flex; flex-wrap:wrap; gap:5px; }
.atlas-detail-locals { margin-top:8px; }
.atlas-local { padding:4px 7px; text-align:left; }
.atlas-local small { display:block; margin-top:3px; color:#5b472e; font-size:10px; font-weight:400; }
.atlas-water-art { height:clamp(124px,28vw,200px); isolation:isolate; }
.atlas-water-art > img { position:absolute; z-index:-2; object-position:center 8%; }
.atlas-body[data-water="pine"] .atlas-water-art > img { object-position:center 13%; }
.atlas-water-art::after { content:""; position:absolute; z-index:-1; inset:0; background:linear-gradient(90deg,#1f251cf2,#24261c63 55%,transparent 90%); }
.atlas-water-art > div { position:absolute; inset:auto 10px 8px; color:#fff1cc; text-shadow:0 1px 3px #121b17; }
.atlas-water-art span { display:inline-block; padding:2px 6px; border:1px solid #e0c395; border-radius:3px; background:var(--water-ink); font-size:11px; }
.atlas-water-art h3 { font:700 clamp(25px,7vw,35px)/1.18 LocalSerif,"Songti SC",serif; margin:3px 0 0; }
.atlas-water-art p { font-size:11px; }
.atlas-guide {
  display:grid;
  grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);
  gap:8px;
  margin-block:10px;
}
.atlas-detail-locals + .atlas-spots { margin-top:8px; }
.atlas-guide section,.atlas-baits,.atlas-spots {
  min-width:0;
  margin:0;
  padding:7px 8px;
  border:1px solid var(--atlas-rule);
  border-radius:5px;
  background:#f7ebce;
}
.atlas-guide h3,.atlas-baits legend,.atlas-spots h3 {
  color:#382e20;
  font:700 15px/1.4 LocalSerif,"Songti SC",serif;
}
.atlas-baits legend { padding-inline:4px; }
.atlas-fish { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px; list-style:none; margin:6px 0 0; padding:0; }
.atlas-fish li {
  padding:3px 4px;
  border:1px solid #b6a47b;
  border-left:3px solid #5b7350;
  border-radius:3px;
  background:#f0dfb6;
  font-size:11px;
  line-height:1.35;
}
.atlas-fish [data-rarity="较少见"] { border-left-color:#4b7887; }
.atlas-fish [data-rarity="稀有"] { border-left-color:#9d6336; }
.atlas-fish li:nth-child(odd):last-child { grid-column:1 / -1; }
.atlas-fish small { display:block; color:#684932; font-size:9px; }
.atlas-fish-bait { margin-top:2px; color:#624c31; font-size:10px; line-height:1.3; }
.atlas-fish li[data-available="false"] { color:#625746; background:#eee3cc; border-left-color:#b9aa91; }
#atlas-baits { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px; }
#atlas-baits label {
  position:relative;
  display:grid;
  align-content:center;
  min-height:44px;
  padding:3px 4px;
  border:1px solid #aa8f60;
  border-radius:3px;
  background:#efe1bc;
  font-size:11px;
  cursor:pointer;
}
#atlas-baits input { position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:inherit; }
#atlas-baits label:has(:checked) { background:#354c38; color:#fff1cf; }
#atlas-baits label:has(:disabled) { background:#ece3d0; color:#615a4a; cursor:not-allowed; }
#atlas-baits label:has(:focus-visible) { outline:2px solid #a75b31; outline-offset:2px; }
#atlas-baits strong,#atlas-baits small { display:block; line-height:1.25; }
#atlas-baits small { margin-top:2px; font-size:9px; }
#atlas-bait-note,.atlas-spots > p { margin-top:4px; color:#56452c; font-size:11px; line-height:1.45; }
.atlas-plot {
  --water-ink:#2e4831;
  --water-fill:#657962;
  margin-top:6px;
  overflow:hidden;
  border:1px solid #947743;
  border-radius:4px;
  background:repeating-linear-gradient(159deg,#e2cfa3 0 2px,#ecdbb6 2px 6px);
  cursor:crosshair;
}
.atlas-plot svg { display:block; width:100%; height:clamp(83px,26vw,126px); }
.atlas-water-shape { fill:var(--water-fill); stroke:var(--water-ink); stroke-width:2px; vector-effect:non-scaling-stroke; }
.atlas-dot { fill:#ead6a8; stroke:#36291e; stroke-width:1.2px; }
.atlas-occupied-dot { fill:#f4b457; stroke:#54341f; }
.atlas-selected-dot { fill:#feda8d; stroke:#613b27; stroke-width:2px; }
.atlas-spot-buttons,#point-list { display:flex; flex-wrap:wrap; gap:4px; margin-top:5px; }
.atlas-spot-buttons button,#point-list button {
  min-height:35px;
  padding:3px 6px;
  border:1px solid #a58959;
  border-radius:3px;
  background:#efdcb0;
  color:#442f1c;
  font-size:11px;
}
.atlas-spot-buttons button[aria-pressed="true"],#point-list button[aria-pressed="true"] { background:#3d5440; color:#fff1ce; }
.atlas-spot-buttons button.atlas-zone-match:not([aria-pressed="true"]) { box-shadow:inset 0 -2px #687c51; }
.atlas-spot-metrics {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  margin:6px 0 0;
  border:1px solid #9c875d;
  border-radius:3px;
  background:#354636;
  color:#fff0cf;
  text-align:center;
}
.atlas-spot-metrics div { padding:3px 2px; }
.atlas-spot-metrics div + div { border-inline-start:1px solid #a18e62; }
.atlas-spot-metrics dt { color:#f0d9a6; font-size:10px; }
.atlas-spot-metrics dd { margin:0; font-size:12px; font-weight:700; font-variant-numeric:tabular-nums; }
.atlas-spot-metrics #atlas-large-fish { color:#ffdf91; }
.atlas-spot-difficulty { margin:8px 0 4px; font-size:12px; color:#4d432d; }
#point-list:empty { display:none; }
.atlas-fold { margin-top:6px; border-top:1px solid #b8a17a; }
.atlas-fold summary { padding-block:6px; cursor:pointer; color:#4d3a23; font-size:11px; font-weight:700; }
.atlas-fold .mini-form { margin-top:3px; background:#f7e9c5; }
.atlas-fold .mini-form > label { color:#51442d; }
.atlas-actions {
  position:sticky;
  bottom:0;
  display:flex;
  gap:7px;
  padding:6px 1px;
  background:var(--atlas-paper);
  box-shadow:0 -4px 5px #efe0bb;
}
.atlas-actions button { flex:1; }
@media (max-width:365px) {
  .atlas-guide { grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr); gap:5px; }
  .atlas-fish { grid-template-columns:1fr; }
  .atlas-spot-buttons button { min-height:40px; }
}
