/* Creature Codex - "Where to Find" planet map */
.detail-card.map-card { margin-top: 18px; }
.detail-card.map-card h2 { color: #F2C14E; }
.detail-card.map-card h2::after { background: #F2C14E; }

.cmap { position: relative; }
.cmap-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.cmap-tab {
  appearance: none; cursor: pointer; font: inherit; font-size: 14px;
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12); background: rgba(22,31,42,.82); color: #c9d4de;
}
.cmap-tab:hover { border-color: rgba(242,193,78,.5); color: #fff; }
.cmap-tab.is-active { background: rgba(242,193,78,.16); border-color: #F2C14E; color: #fff; }
.cmap-count {
  display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 999px;
  background: #F2C14E; color: #101418; font-size: 12px; font-weight: 700; text-align: center;
}

.cmap-panel { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 20px; align-items: start; }
.cmap-panel[hidden] { display: none; }
@media (max-width: 760px) { .cmap-panel { grid-template-columns: 1fr; } }

.cmap-frame {
  position: relative; width: 100%; aspect-ratio: 1 / 1; overflow: hidden;
  border-radius: 12px; border: 1px solid rgba(255,255,255,.08); background: #0b0f14;
}
.cmap-img { display: block; width: 100%; height: 100%; object-fit: cover; }

.cmap-pin {
  position: absolute; transform: translate(-50%, -50%);
  width: 22px; height: 22px; padding: 0; border-radius: 50%;
  border: 2px solid #101418; background: #F2C14E; color: #101418;
  font: 700 12px/20px system-ui, sans-serif; text-align: center; cursor: pointer;
  box-shadow: 0 0 0 3px rgba(242,193,78,.35), 0 2px 6px rgba(0,0,0,.6);
  transition: transform .12s ease, box-shadow .12s ease;
}
.cmap-pin:hover, .cmap-pin.is-hot, .cmap-pin:focus-visible {
  transform: translate(-50%, -50%) scale(1.25); outline: none;
  box-shadow: 0 0 0 5px rgba(242,193,78,.45), 0 2px 8px rgba(0,0,0,.7);
}

.cmap-subhead { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: #8a97a3; margin: 0 0 8px; }
.cmap-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 6px; }
.cmap-item {
  display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center;
  padding: 8px 10px; border-radius: 10px; background: rgba(22,31,42,.6); border: 1px solid transparent;
}
.cmap-item.is-hot { border-color: rgba(242,193,78,.6); }
.cmap-num {
  width: 22px; height: 22px; border-radius: 50%; background: #F2C14E; color: #101418;
  font-weight: 700; font-size: 12px; display: grid; place-items: center;
}
.cmap-label { color: #dbe4ec; font-size: 14px; line-height: 1.35; }
.cmap-copy {
  appearance: none; cursor: pointer; font: 600 12px/1 ui-monospace, Menlo, Consolas, monospace;
  padding: 6px 8px; border-radius: 8px; white-space: nowrap;
  border: 1px solid rgba(255,255,255,.12); background: #0d1116; color: #F2C14E;
}
.cmap-copy:hover { border-color: #F2C14E; }

.cmap-lairs { margin-top: 4px; }
.cmap-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cmap-chip {
  font-size: 13px; padding: 4px 9px; border-radius: 999px;
  background: rgba(88,196,221,.10); border: 1px solid rgba(88,196,221,.25); color: #cfeef6;
}
.cmap-empty, .cmap-note { color: #8a97a3; font-size: 13px; margin: 0 0 12px; }

.cmap-toast {
  position: absolute; right: 0; top: 0; padding: 6px 10px; border-radius: 8px;
  background: #F2C14E; color: #101418; font-size: 13px; font-weight: 600;
}

.detail-card.map-card[hidden] { display: none !important; }

/* Spawn regions (creature-spawns.js) */
.cmap-areas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.cmap-area {
  fill: rgba(88,196,221,.20); stroke: rgba(139,233,253,.85); stroke-width: 40;
  vector-effect: non-scaling-stroke; pointer-events: auto; cursor: default;
  transition: fill .12s ease;
}
.cmap-area { stroke-width: 1.5px; }
.cmap-area.is-hot { fill: rgba(242,193,78,.38); stroke: #F2C14E; }
.cmap-regions { margin-bottom: 14px; }
.cmap-region-list { max-height: 260px; overflow: auto; padding-right: 4px; }
.cmap-region {
  display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start;
  padding: 7px 10px; border-radius: 10px; background: rgba(22,31,42,.6); border: 1px solid transparent; outline: none;
}
.cmap-region.is-hot, .cmap-region:focus-visible { border-color: rgba(242,193,78,.6); }
.cmap-region small { display: block; color: #8a97a3; font-size: 12px; margin-top: 2px; }
.cmap-swatch { width: 14px; height: 14px; margin-top: 3px; border-radius: 3px; background: rgba(88,196,221,.35); border: 1.5px solid rgba(139,233,253,.85); }
.cmap-wide { color: #cfeef6; font-size: 13px; margin: 0 0 8px; }

/* v4: waypoints vs hotspots vs areas */
.cmap-section { margin-bottom: 16px; }
.cmap-section .cmap-list { margin-bottom: 0; }
.cmap-hot {
  position: absolute; transform: translate(-50%, -50%);
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid #8BE9FD; background: rgba(13,17,22,.85); color: #8BE9FD;
  font: 700 11px/16px system-ui, sans-serif; text-align: center; cursor: default;
  box-shadow: 0 1px 4px rgba(0,0,0,.6);
}
.cmap-hot.is-hot { background: #8BE9FD; color: #101418; transform: translate(-50%, -50%) scale(1.2); }
.cmap-hot-badge {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid #8BE9FD; color: #8BE9FD; font-weight: 700; font-size: 11px; box-sizing: border-box;
}
.cmap-hot-item.is-hot { border-color: rgba(139,233,253,.6); }
.cmap-item small { display: block; color: #8a97a3; font-size: 12px; margin-top: 2px; }
.cmap-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; font-size: 12px; color: #a9b6c2; }
.cmap-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cmap-legend i { display: inline-block; width: 12px; height: 12px; }
.cmap-legend .lg-pin { border-radius: 50%; background: #F2C14E; border: 2px solid #101418; box-shadow: 0 0 0 2px rgba(242,193,78,.35); }
.cmap-legend .lg-hot { border-radius: 50%; border: 2px solid #8BE9FD; box-sizing: border-box; }
.cmap-legend .lg-area { border-radius: 2px; background: rgba(88,196,221,.35); border: 1.5px solid rgba(139,233,253,.85); box-sizing: border-box; }

.cmap-swatch-zone { background: transparent; border: 1.5px dashed rgba(139,233,253,.75); }
.cmap-zone { cursor: default; }

.cmap-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  text-align: center; padding: 16px; background: rgba(8,12,16,.45); pointer-events: none; }
.cmap-overlay span { font-weight: 700; font-size: 1.05rem; color: #e9f7fb; background: rgba(10,16,22,.82); border: 1px solid rgba(139,233,253,.55);
  border-radius: 999px; padding: 6px 14px; }
.cmap-overlay small { color: #c7d3da; background: rgba(10,16,22,.7); border-radius: 6px; padding: 2px 8px; font-size: .8rem; }
.cmap-overlay-wide { background: rgba(88,196,221,.16); box-shadow: inset 0 0 0 2px rgba(139,233,253,.55); }

/* Wild creatures page */
.wild-map-card { margin: 0 0 18px; }
.wild-map-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.wild-map-head h2 { margin: 0; }
.wild-map-hint { margin: 8px 0 12px; opacity: .8; font-size: .9rem; }
.wild-planets { margin-top: 6px; font-size: .82rem; color: #8be9fd; }
.wild-detail-map { max-width: 980px; margin: 14px 0 4px; padding-left: 15px; border-left: 3px solid rgba(88,196,221,.32); }
.wild-detail-map:empty { display: none; }
.wild-detail-map-title { color: #9B6BFF; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }
.cmap-toast[hidden] { display: none; }
