/* Leonida Waypoint — interactive map styles (map.html only).
   Carried over from the approved preview build, including the phone
   scroll-off behaviour shipped at the user's direction. */
.map-shell {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 0;
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  box-shadow: var(--shadow); background: var(--bg-2);
}
.map-stage { position: relative; min-width: 0; }
#leonida-map { height: 560px; width: 100%; background: #2e7d8c; z-index: 0; }
/* Locked (default on touch): a one-finger swipe starting on the map
   scrolls the page as normal, so you can always scroll off the map
   to get the detail card in picture. Unlock to pan / pinch the map. */
#leonida-map.is-locked { touch-action: pan-y !important; }
#leonida-map.is-locked .leaflet-pane,
#leonida-map.is-locked .leaflet-map-pane,
#leonida-map.is-locked .leaflet-marker-icon { touch-action: pan-y !important; }
#leonida-map.is-unlocked { touch-action: none; }
.map-move-btn {
  position: absolute; right: 12px; bottom: 12px; z-index: 650;
  font: inherit; font-weight: 700; font-size: 14px; cursor: pointer;
  background: var(--pink); color: #fff; border: 2px solid #fff;
  padding: 10px 16px; border-radius: 999px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.4); min-height: 44px;
}
.map-move-btn[aria-pressed="true"] { background: var(--teal); }
.map-hint {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 12px; z-index: 640;
  background: rgba(22,10,36,0.9); color: #fdf0e9; font-size: 13px; font-weight: 600;
  padding: 7px 12px; border-radius: 999px; pointer-events: none; white-space: nowrap;
  max-width: calc(100% - 180px); overflow: hidden; text-overflow: ellipsis;
}
.map-hint[hidden] { display: none; }
.map-badge {
  position: absolute; top: 12px; right: 12px; z-index: 600;
  background: var(--gold); color: #2a1503; font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; padding: 5px 10px; border-radius: 3px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3); pointer-events: none;
}
.map-legend {
  position: absolute; left: 12px; bottom: 12px; z-index: 600;
  background: rgba(22,10,36,0.88); color: #fdf0e9; border-radius: 6px;
  padding: 8px 12px; font-size: 12.5px; line-height: 1.5; pointer-events: none;
}
.map-legend .dot { margin-right: 6px; }
.dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid #fff; vertical-align: -1px; flex: none;
}
.dot-collectible { background: #0e7d86; }
.dot-stunt { background: #e8316f; }
.dot-package { background: #f26d21; }
.dot-store { background: #ffb43a; }
.dot-activity { background: #7a4fd0; }
.pin-marker { background: none; border: none; }
.pin {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50% 50% 50% 4px;
  transform: rotate(-45deg); border: 2px solid #fff; color: #fff;
  box-shadow: 0 3px 8px rgba(0,0,0,0.45); cursor: pointer;
}
.pin svg { transform: rotate(45deg); width: 14px; height: 14px; }
.pin-collectible { background: #0e7d86; }
.pin-stunt { background: #e8316f; }
.pin-package { background: #f26d21; }
.pin-store { background: #ffb43a; color: #2a1503; }
.pin-activity { background: #7a4fd0; }
.pin.is-found { background: #4c4453; opacity: 0.55; }
.pin.is-selected { box-shadow: 0 0 0 3px #ffb43a, 0 3px 8px rgba(0,0,0,0.45); }
.pin-detail {
  border: 1.5px solid var(--teal); border-radius: 8px; padding: 14px 16px;
  background: var(--teal-soft); scroll-margin-top: 84px;
}
.pin-detail[hidden] { display: none; }
.pop-cat { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--pink-deep); }
.pop-title { font-family: "Barlow Condensed", sans-serif; font-size: 24px; font-weight: 700; line-height: 1.05; margin: 2px 0 4px; color: var(--ink); text-transform: uppercase; }
.pop-area { font-size: 13px; font-weight: 700; color: var(--teal); margin-bottom: 5px; }
.pop-desc { font-size: 14.5px; color: var(--ink-soft); margin: 0 0 12px; }
.pop-found {
  font: inherit; font-weight: 700; font-size: 14px; cursor: pointer;
  background: var(--pink); color: #fff; border: none; border-radius: 5px; padding: 9px 14px; width: 100%; min-height: 44px;
}
.pop-found[aria-pressed="true"] { background: var(--teal); }
.pd-guide {
  display: block; font-weight: 700; font-size: 14.5px; margin: 0 0 12px;
  color: var(--teal);
}
.pd-guide[hidden] { display: none; }
.map-side { padding: 20px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.map-progress-num { font-family: "Barlow Condensed", sans-serif; font-size: 44px; font-weight: 700; line-height: 1; color: var(--pink); }
.map-progress-num small { font-size: 20px; color: var(--ink-soft); }
.map-search {
  width: 100%; font: inherit; font-size: 15px; padding: 10px 12px;
  border: 1.5px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink);
}
.map-search:focus { outline: 2px solid var(--teal); outline-offset: 1px; }
.map-cats { display: flex; flex-direction: column; gap: 6px; }
.cat-row {
  display: flex; align-items: center; gap: 9px; width: 100%; font: inherit; text-align: left;
  background: none; border: 1px solid var(--line); border-radius: 6px; padding: 8px 11px; cursor: pointer; color: var(--ink); min-height: 44px;
}
.cat-row .cat-name { font-weight: 600; font-size: 15px; }
.cat-row .cat-count { margin-left: auto; font-size: 13.5px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.cat-row[aria-pressed="false"] { opacity: 0.45; }
.cat-row[aria-pressed="false"] .cat-name { text-decoration: line-through; }
.map-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.tool-btn {
  font: inherit; font-weight: 600; font-size: 13.5px; cursor: pointer;
  background: var(--bg-2); color: var(--ink); border: 1.5px solid var(--line);
  padding: 6px 12px; border-radius: 999px; min-height: 38px;
}
.tool-btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pin-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; max-height: 300px; border-top: 1px solid var(--line); }
.pin-list li { border-bottom: 1px solid var(--line); }
.pin-row {
  display: flex; align-items: center; gap: 9px; width: 100%; font: inherit; text-align: left;
  background: none; border: none; padding: 9px 4px; cursor: pointer; color: var(--ink); min-height: 44px;
}
.pin-row .pin-name { font-weight: 600; font-size: 14.5px; line-height: 1.25; }
.pin-row .pin-area { display: block; font-weight: 400; font-size: 12.5px; color: var(--ink-soft); }
.pin-row .pin-state { margin-left: auto; flex: none; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--teal); }
.pin-row.is-found .pin-name { color: var(--ink-soft); text-decoration: line-through; }
.pin-list-empty { padding: 14px 4px; font-size: 14px; color: var(--ink-soft); }
.map-note { font-size: 14px; color: var(--ink-soft); margin-top: 14px; max-width: 62em; }
.map-note b { color: var(--ink); }
@media (max-width: 860px) {
  .map-shell { grid-template-columns: 1fr; }
  #leonida-map { height: 480px; }
  .pin-list { max-height: 260px; }
  .map-hint { display: none !important; }
  .map-move-btn { bottom: 10px; right: 10px; }
}
@media (max-width: 560px) {
  #leonida-map { height: 400px; }
  .map-legend { display: none; }
}
