/* ==========================================================================
   SIGHTDECK - NOVAPAY RADAR & WORLD MAP
   Theme: Dark Slate Map Frame with Sky-Blue Radar Pulses
   ========================================================================== */

.sq-map-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: row;
  overflow: hidden;
  background: var(--bg);
}

.sq-map-canvas-wrap {
  position: relative;
  flex: 1;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: flex;
  overflow: hidden;
}

.sq-leaflet-map {
  flex: 1;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  background: var(--map-bg);
}

/* ==========================================================================
   INITIAL MAP & GPS LOADING OVERLAY WITH PROGRESS BAR
   ========================================================================== */
.sq-map-initial-loader {
  position: absolute;
  inset: 0;
  z-index: 1300;
  background: radial-gradient(circle at center, rgba(var(--bg-panel-rgb), 0.98) 0%, rgba(var(--bg-rgb), 1) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.45s ease;
}

.sq-map-initial-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.sq-map-loader-card {
  max-width: 360px;
  width: 90%;
  background: rgba(var(--bg-rgb), 0.92);
  border: 1px solid rgba(var(--accent-vivid-rgb), 0.3);
  border-radius: 18px;
  padding: 28px 24px 22px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 24px rgba(var(--accent-vivid-rgb), 0.18);
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: sqLoaderCardPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes sqLoaderCardPop {
  0% {
    transform: scale(0.94);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.sq-map-loader-radar-pulse {
  position: relative;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.sq-map-loader-radar-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--accent-vivid-rgb), 0.25) 0%, rgba(var(--accent-deep-rgb), 0.08) 100%);
  border: 1px solid rgba(var(--accent-vivid-rgb), 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-vivid);
  box-shadow: 0 0 18px rgba(var(--accent-vivid-rgb), 0.4);
  z-index: 2;
}

.sq-map-loader-radar-icon i,
.sq-map-loader-radar-icon svg {
  width: 26px;
  height: 26px;
}

.sq-map-loader-radar-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(var(--accent-vivid-rgb), 0.6);
  opacity: 0;
  pointer-events: none;
}

.sq-map-loader-radar-ring.ring-1 {
  animation: sqRadarRing 2.2s cubic-bezier(0.1, 0.8, 0.3, 1) infinite;
}

.sq-map-loader-radar-ring.ring-2 {
  animation: sqRadarRing 2.2s cubic-bezier(0.1, 0.8, 0.3, 1) infinite 0.75s;
}

@keyframes sqRadarRing {
  0% {
    transform: scale(0.65);
    opacity: 0.9;
  }

  100% {
    transform: scale(1.65);
    opacity: 0;
  }
}

.sq-map-loader-title {
  font-family: var(--font-display, "Outfit", sans-serif);
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--text-bright);
  margin: 0 0 6px 0;
  letter-spacing: -0.01em;
}

.sq-map-loader-sub {
  font-size: 0.82rem;
  color: var(--text2);
  margin: 0 0 18px 0;
  line-height: 1.35;
  min-height: 2.2em;
}

.sq-map-loader-progress-track {
  width: 100%;
  height: 8px;
  background: rgba(var(--bg-panel-rgb), 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6);
}

.sq-map-loader-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-deep) 0%, var(--accent-vivid) 65%, var(--sky2) 100%);
  border-radius: 5px;
  transition: width 0.28s ease-out;
  box-shadow: 0 0 12px rgba(var(--accent-vivid-rgb), 0.6);
}

.sq-map-loader-meta {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  font-family: var(--font-mono, monospace);
  color: var(--text3);
  margin-top: 8px;
}

#map-loader-percent {
  color: var(--accent-vivid);
  font-weight: 700;
}

/* Dark Mode Filter for OpenStreetMap Tiles - tuned per UI theme */
.leaflet-tile-pane {
  filter: var(--map-tile-filter);
}

.leaflet-control-attribution {
  background: var(--bg-header) !important;
  color: var(--text3) !important;
  font-size: 0.65rem !important;
  border-top-left-radius: 6px;
  border: 1px solid var(--border);
}

.leaflet-control-attribution a {
  color: var(--text2) !important;
}

/* Custom Glowing POI Markers */
.sq-poi-div-icon {
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  display: block;
  background: transparent;
  border: none;
}

.sq-poi-marker {
  width: 36px;
  height: 36px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  border: 2px solid #fff;
  transition: transform 0.14s var(--silk);
  position: relative;
  touch-action: manipulation;
}

.sq-marker-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.sq-marker-icon svg,
.sq-marker-icon .lucide {
  width: 18px;
  height: 18px;
  stroke: #ffffff;
  display: block;
}

.sq-poi-div-icon:hover {
  z-index: 25000 !important;
}

.sq-poi-marker:hover {
  transform: scale(1.25);
  z-index: 900 !important;
}

/* Square, half-sized playground marker for item locations (18x18px) - displayed in green */
.sq-poi-marker.sq-playground-marker {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: linear-gradient(135deg, #0e2419 0%, #081710 100%);
  border: 1.5px solid var(--green);
  box-shadow: 0 0 8px rgba(61, 204, 142, 0.55);
}

.sq-poi-marker.sq-playground-marker .sq-marker-icon svg,
.sq-poi-marker.sq-playground-marker .sq-marker-icon .lucide {
  width: 10px;
  height: 10px;
  stroke: var(--green);
}

.sq-poi-marker.sq-playground-marker:hover {
  transform: scale(1.4);
  border-color: #5ef5b8;
  box-shadow: 0 0 14px rgba(61, 204, 142, 0.85);
}

/* POIs or Playgrounds on Cooldown: Warm Cooldown Orange outline/glow */
.sq-poi-marker.has-cooldown {
  border-color: #F5B041 !important;
  box-shadow: 0 0 0 1px rgba(245, 176, 65, 0.55), 0 0 12px rgba(245, 176, 65, 0.8) !important;
}

.sq-poi-marker.has-cooldown:hover {
  border-color: #FAD7A0 !important;
  box-shadow: 0 0 0 1.5px rgba(245, 176, 65, 0.7), 0 0 16px rgba(245, 176, 65, 0.95) !important;
}

.sq-poi-marker.sq-playground-marker.has-cooldown {
  border-color: #F5B041 !important;
  box-shadow: 0 0 0 1px rgba(245, 176, 65, 0.55), 0 0 10px rgba(245, 176, 65, 0.8) !important;
}

.sq-poi-marker.sq-playground-marker.has-cooldown:hover {
  border-color: #FAD7A0 !important;
  box-shadow: 0 0 0 1.5px rgba(245, 176, 65, 0.7), 0 0 14px rgba(245, 176, 65, 0.95) !important;
}

.sq-playground-svg {
  stroke: var(--green);
}

/* Square, compact transit-stop marker (18x18px) - displayed in indigo/violet */
.sq-poi-marker.sq-transit-stop-marker {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: linear-gradient(135deg, #1b1d3d 0%, #101228 100%);
  border: 1.5px solid #818cf8;
  box-shadow: 0 0 8px rgba(129, 140, 248, 0.55);
}

.sq-poi-marker.sq-transit-stop-marker .sq-marker-icon svg,
.sq-poi-marker.sq-transit-stop-marker .sq-marker-icon .lucide {
  width: 10px;
  height: 10px;
  stroke: #a5b4fc;
}

.sq-poi-marker.sq-transit-stop-marker:hover {
  transform: scale(1.4);
  border-color: #a5b4fc;
  box-shadow: 0 0 14px rgba(129, 140, 248, 0.85);
}

.sq-poi-marker.sq-transit-stop-marker.has-cooldown {
  border-color: #F5B041 !important;
  box-shadow: 0 0 0 1px rgba(245, 176, 65, 0.55), 0 0 10px rgba(245, 176, 65, 0.8) !important;
}

.sq-poi-marker.sq-transit-stop-marker.has-cooldown:hover {
  border-color: #FAD7A0 !important;
  box-shadow: 0 0 0 1.5px rgba(245, 176, 65, 0.7), 0 0 14px rgba(245, 176, 65, 0.95) !important;
}

.sq-transit-stop-svg {
  stroke: #a5b4fc;
}

/* Supermarket shop marker (22x22px) in vibrant cyan */
.sq-poi-marker.sq-supermarket-marker {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(135deg, #082f49 0%, #0c1e2e 100%);
  border: 1.5px solid #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.65);
}

.sq-poi-marker.sq-supermarket-marker .sq-marker-icon svg,
.sq-poi-marker.sq-supermarket-marker .sq-marker-icon .lucide {
  width: 13px;
  height: 13px;
  stroke: #38bdf8;
}

.sq-poi-marker.sq-supermarket-marker:hover {
  transform: scale(1.35);
  border-color: #7dd3fc;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.95);
}

/* Supermarkets do not have blocking cooldowns */

.sq-poi-marker.sq-supermarket-marker.sq-shop-sold-out {
  border: 2.2px solid #f97316 !important;
  box-shadow: 0 0 0 1.5px rgba(249, 115, 22, 0.7), 0 0 14px rgba(249, 115, 22, 0.85) !important;
}

.sq-poi-marker.sq-supermarket-marker.sq-shop-sold-out .sq-marker-icon svg,
.sq-poi-marker.sq-supermarket-marker.sq-shop-sold-out .sq-marker-icon .lucide {
  stroke: #fb923c !important;
}

.sq-supermarket-svg {
  stroke: #38bdf8;
}

.sq-poi-marker.rarity-gewoehnlich {
  background: var(--bg3);
  border-color: var(--text2);
  box-shadow: 0 0 12px rgba(138, 174, 200, 0.4);
}

.sq-poi-marker.rarity-selten {
  background: var(--rarity-selten-deep);
  border-color: var(--rarity-selten);
  box-shadow: 0 0 16px rgba(var(--rarity-selten-rgb), 0.75);
}

.sq-poi-marker.rarity-episch {
  background: #7D3C98;
  border-color: #D7BDE2;
  box-shadow: 0 0 20px rgba(165, 105, 189, 0.85);
}

.sq-poi-marker.rarity-legendaer {
  background: linear-gradient(135deg, #B7950B, var(--gold));
  border-color: #FCF3CF;
  box-shadow: 0 0 24px rgba(245, 176, 65, 0.9);
}

.sq-poi-marker.rarity-einzigartig {
  background: linear-gradient(135deg, var(--red), var(--rarity-selten));
  border-color: #ffffff;
  box-shadow: 0 0 28px rgba(var(--rarity-selten-rgb), 0.95);
  animation: markerPulse 2.2s infinite alternate var(--silk);
}

.sq-marker-collected-check {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--green);
  color: var(--text-on-accent);
  font-size: 0.65rem;
  font-weight: 900;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--bg);
}

.sq-marker-collected-check svg,
.sq-marker-collected-check .lucide {
  width: 10px;
  height: 10px;
  stroke: var(--text-on-accent);
}

@keyframes markerPulse {
  from {
    transform: scale(1);
  }

  to {
    transform: scale(1.15);
  }
}

/* Player Avatar Marker */
.sq-player-div-icon,
.sq-friend-div-icon {
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  display: block;
  background: transparent;
  border: none;
}

.sq-player-marker {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sky3), var(--sky));
  border: 2.5px solid #ffffff;
  box-shadow: 0 0 16px rgba(var(--accent-rgb), 0.9);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.sq-marker-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.sq-marker-avatar-initial {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text-on-accent);
  text-transform: uppercase;
  line-height: 1;
}

.sq-player-marker::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid rgba(var(--accent-rgb), 0.7);
  animation: radarRipple 2.2s infinite ease-out;
  pointer-events: none;
}

@keyframes radarRipple {
  0% {
    transform: scale(0.6);
    opacity: 1;
  }

  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

/* Movement Mode Footprints Indicator (Bottom-Left of Player Marker) */
.sq-player-movement-badge {
  position: absolute;
  bottom: -5px;
  left: -6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #0b1528;
  border: 1.5px solid #38bdf8;
  color: #38bdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.9), 0 2px 4px rgba(0, 0, 0, 0.7);
  z-index: 8;
  pointer-events: none;
  animation: sqMovementFootprintsPulse 1.8s infinite ease-in-out;
}

.sq-player-movement-badge svg,
.sq-player-movement-badge .lucide {
  width: 11px;
  height: 11px;
  stroke: #38bdf8;
  stroke-width: 2.3;
}

@keyframes sqMovementFootprintsPulse {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 6px rgba(56, 189, 248, 0.75), 0 2px 4px rgba(0, 0, 0, 0.7);
  }

  50% {
    transform: scale(1.14);
    box-shadow: 0 0 12px rgba(56, 189, 248, 1), 0 2px 4px rgba(0, 0, 0, 0.7);
  }
}

/* Friend Avatar Marker (same as player marker, but in emerald green) */
.sq-friend-marker {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1b8754, var(--green));
  border: 2.5px solid #ffffff;
  box-shadow: 0 0 16px rgba(61, 204, 142, 0.9);
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.sq-friend-marker::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid rgba(61, 204, 142, 0.7);
  animation: radarRipple 2.2s infinite ease-out;
  pointer-events: none;
}

/* Floating Action Buttons on Map (NovaPay Glass Controls) */
.sq-map-top-left-group {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 650;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: opacity 0.22s var(--silk), visibility 0.22s var(--silk), transform 0.22s var(--silk);
}

.sq-map-canvas-wrap.has-popup .sq-map-top-left-group,
.sq-map-canvas-wrap.has-menu .sq-map-top-left-group {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: scale(0.92);
}

.sq-fab-admin {
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 0;
  border-radius: 12px;
  background: rgba(var(--bg-panel-rgb), 0.95);
  border: 1px solid rgba(var(--accent-vivid-rgb), 0.45);
  color: var(--accent-vivid);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 12px rgba(var(--accent-vivid-rgb), 0.2);
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 0.15s var(--silk), border-color 0.15s var(--silk), transform 0.15s var(--silk), box-shadow 0.15s var(--silk);
}

.sq-fab-admin svg,
.sq-fab-admin .lucide {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  transition: transform 0.25s var(--silk);
}

.sq-fab-admin:hover svg,
.sq-fab-admin .lucide:hover {
  transform: scale(1.12);
}

.sq-fab-admin:hover {
  background: rgba(var(--bg-elevated-rgb), 0.98);
  border-color: rgba(var(--accent-vivid-rgb), 0.7);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5), 0 0 18px rgba(var(--accent-vivid-rgb), 0.35);
  transform: translateY(-2px);
}

/* Map Category Filter Dropdown (Top-Left) */
.sq-map-filter-dropdown-wrap {
  position: relative;
  display: inline-flex;
}

.sq-fab-filter {
  position: relative;
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 0;
  border-radius: 12px;
  background: rgba(var(--bg-panel-rgb), 0.95);
  border: 1px solid rgba(var(--accent-vivid-rgb), 0.4);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 12px rgba(var(--accent-vivid-rgb), 0.15);
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 0.15s var(--silk), border-color 0.15s var(--silk), color 0.15s var(--silk), transform 0.15s var(--silk), box-shadow 0.15s var(--silk);
  user-select: none;
}

.sq-fab-filter svg,
.sq-fab-filter .lucide {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  transition: transform 0.25s var(--silk);
}

.sq-fab-filter:hover svg,
.sq-fab-filter .lucide:hover {
  transform: scale(1.12);
}

.sq-fab-filter:hover {
  background: rgba(var(--bg-elevated-rgb), 0.98);
  border-color: rgba(var(--accent-vivid-rgb), 0.75);
  color: var(--accent-vivid);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5), 0 0 18px rgba(var(--accent-vivid-rgb), 0.3);
  transform: translateY(-2px);
}

.sq-fab-filter.is-open {
  background: rgba(var(--bg-elevated-rgb), 0.98);
  border-color: var(--accent-vivid);
  color: var(--accent-vivid);
  box-shadow: 0 0 20px rgba(var(--accent-vivid-rgb), 0.35);
}

.sq-fab-filter.has-active-filter {
  border-color: var(--accent-vivid);
  color: var(--accent-vivid);
  background: rgba(var(--accent-deep-rgb), 0.16);
  box-shadow: 0 0 16px rgba(var(--accent-vivid-rgb), 0.3);
}

.sq-fab-spy {
  position: relative;
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 0;
  border-radius: 12px;
  background: rgba(var(--bg-panel-rgb), 0.95);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 0.15s var(--silk), border-color 0.15s var(--silk), color 0.15s var(--silk), transform 0.15s var(--silk), box-shadow 0.15s var(--silk);
  user-select: none;
}

.sq-fab-spy svg,
.sq-fab-spy .lucide {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  transition: transform 0.25s var(--silk);
}

.sq-fab-spy:hover svg,
.sq-fab-spy .lucide:hover {
  transform: scale(1.12);
}

.sq-fab-spy:hover {
  background: rgba(var(--bg-elevated-rgb), 0.98);
  border-color: rgba(var(--accent-vivid-rgb), 0.75);
  color: var(--accent-vivid);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5), 0 0 18px rgba(var(--accent-vivid-rgb), 0.3);
  transform: translateY(-2px);
}

.sq-fab-spy.active,
.sq-fab-spy[aria-pressed="true"] {
  background: rgba(var(--accent-deep-rgb), 0.22) !important;
  border-color: var(--accent-vivid) !important;
  color: var(--accent-vivid) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 18px rgba(var(--accent-vivid-rgb), 0.45) !important;
}

.sq-leaflet-map.is-spying {
  cursor: crosshair !important;
}

.sq-leaflet-map.is-spying .leaflet-grab {
  cursor: crosshair !important;
}

.sq-spy-pin {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-vivid) 0%, var(--accent-deep) 100%);
  border: 2px solid #ffffff;
  box-shadow: 0 0 18px rgba(var(--accent-vivid-rgb), 0.8), 0 4px 12px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  animation: sq-spy-pulse 2s infinite ease-in-out;
}

.sq-spy-pin.is-loading {
  background: radial-gradient(circle, var(--sky2) 0%, var(--accent-deep) 100%);
  animation: sq-spy-pulse-fast 0.8s infinite ease-in-out;
}

.sq-spy-pin svg,
.sq-spy-pin .lucide {
  width: 18px;
  height: 18px;
  stroke: #ffffff;
  transition: transform 0.2s ease;
}

.sq-spy-pin.is-loading svg,
.sq-spy-pin.is-loading .lucide {
  animation: sq-spy-spin 1.2s linear infinite;
}

@keyframes sq-spy-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes sq-spy-pulse-fast {
  0% {
    box-shadow: 0 0 0 0 rgba(var(--accent-vivid-rgb), 0.9);
  }

  70% {
    box-shadow: 0 0 0 16px rgba(var(--accent-vivid-rgb), 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(var(--accent-vivid-rgb), 0);
  }
}

@keyframes sq-spy-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(var(--accent-vivid-rgb), 0.7);
  }

  70% {
    box-shadow: 0 0 0 14px rgba(var(--accent-vivid-rgb), 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(var(--accent-vivid-rgb), 0);
  }
}

.sq-filter-indicator {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 800;
  background: var(--accent-vivid);
  color: var(--text-on-accent);
  border: 2px solid var(--bg3);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  pointer-events: none;
  z-index: 2;
}

.sq-map-filter-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 290px;
  max-width: calc(100vw - 28px);
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: rgba(var(--bg-panel-rgb), 0.98);
  border: 1px solid rgba(var(--accent-vivid-rgb), 0.35);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75), 0 0 24px rgba(var(--accent-vivid-rgb), 0.2);
  padding: 12px;
  z-index: 700;
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: filterPopoverFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes filterPopoverFadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.sq-map-filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(var(--text-muted-rgb), 0.15);
}

.sq-map-filter-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}

.sq-map-filter-title svg,
.sq-map-filter-title .lucide {
  width: 16px;
  height: 16px;
  color: var(--accent-vivid);
}

.sq-map-filter-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sq-filter-text-btn {
  background: rgba(var(--accent-vivid-rgb), 0.1);
  border: 1px solid rgba(var(--accent-vivid-rgb), 0.28);
  color: var(--accent-vivid);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.sq-filter-text-btn:hover {
  background: rgba(var(--accent-vivid-rgb), 0.25);
  border-color: var(--accent-vivid);
  color: #ffffff;
}

.sq-map-filter-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sq-map-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 9px;
  background: rgba(var(--bg-elevated-rgb), 0.5);
  border: 1px solid rgba(var(--text-muted-rgb), 0.1);
  transition: background 0.18s ease, border-color 0.18s ease;
}

.sq-map-filter-row:hover {
  background: rgba(var(--bg-elevated-rgb), 0.9);
  border-color: rgba(var(--accent-vivid-rgb), 0.3);
}

.sq-filter-label {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  user-select: none;
  flex: 1;
  min-width: 0;
}

.sq-filter-label input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid rgba(var(--text-muted-rgb), 0.45);
  background: rgba(var(--bg-panel-rgb), 0.7);
  cursor: pointer;
  outline: none;
  position: relative;
  flex-shrink: 0;
  transition: all 0.18s ease;
}

.sq-filter-label input[type="checkbox"]:checked {
  background: var(--accent-vivid);
  border-color: var(--accent-vivid);
}

.sq-filter-label input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid var(--text-on-accent);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.sq-filter-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  flex-shrink: 0;
}

.sq-filter-icon-badge svg,
.sq-filter-icon-badge .lucide {
  width: 14px;
  height: 14px;
}

.filter-badge-sights {
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fbbf24;
}

.filter-badge-creatures {
  background: rgba(168, 85, 247, 0.18);
  border: 1px solid rgba(168, 85, 247, 0.45);
  color: #c084fc;
}

.filter-badge-shops {
  background: rgba(56, 189, 248, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #38bdf8;
}

.filter-badge-offices {
  background: rgba(234, 179, 8, 0.18);
  border: 1px solid rgba(234, 179, 8, 0.45);
  color: #facc15;
}

.filter-badge-playgrounds {
  background: rgba(52, 211, 153, 0.18);
  border: 1px solid rgba(52, 211, 153, 0.45);
  color: #34d399;
}

.filter-badge-transit_stops {
  background: rgba(129, 140, 248, 0.18);
  border: 1px solid rgba(129, 140, 248, 0.45);
  color: #a5b4fc;
}

.filter-badge-gas_stations {
  background: rgba(249, 115, 22, 0.18);
  border: 1px solid rgba(249, 115, 22, 0.45);
  color: #fb923c;
}

.sq-filter-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sq-filter-count {
  font-size: 0.72rem;
  color: var(--text2);
  font-weight: 700;
  background: rgba(var(--bg-panel-rgb), 0.75);
  padding: 1px 7px;
  border-radius: 6px;
  margin-right: 4px;
  flex-shrink: 0;
  border: 1px solid rgba(var(--text-muted-rgb), 0.15);
}

.sq-filter-solo-btn {
  background: transparent;
  border: 1px solid rgba(var(--text-muted-rgb), 0.3);
  color: var(--text2);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.18s ease;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sq-filter-solo-btn:hover {
  background: rgba(var(--accent-vivid-rgb), 0.22);
  border-color: var(--accent-vivid);
  color: var(--accent-vivid);
}

@media (max-width: 480px) {
  .sq-map-top-left-group {
    top: 12px;
    left: 12px;
    gap: 8px;
  }

  .sq-fab-admin,
  .sq-fab-spy,
  .sq-fab-filter {
    width: 38px;
    height: 38px;
    min-width: 38px;
    padding: 0;
    border-radius: 10px;
  }

  .sq-fab-admin svg,
  .sq-fab-admin .lucide,
  .sq-fab-spy svg,
  .sq-fab-spy .lucide,
  .sq-fab-filter svg,
  .sq-fab-filter .lucide {
    width: 18px;
    height: 18px;
  }

  .sq-map-filter-popover {
    width: 275px;
    max-width: calc(100vw - 24px);
    padding: 10px;
  }
}

.sq-map-fab-group {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 650;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: opacity 0.22s var(--silk), visibility 0.22s var(--silk), transform 0.22s var(--silk);
}

.sq-map-canvas-wrap.has-popup .sq-map-fab-group,
.sq-map-canvas-wrap.has-menu .sq-map-fab-group {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: scale(0.92);
}

.sq-map-canvas-wrap.has-popup .sq-gps-prompt-banner,
.sq-map-canvas-wrap.has-menu .sq-gps-prompt-banner {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translateX(-50%) scale(0.92);
}

.sq-fab {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(20, 25, 32, 0.95);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: border-color 0.16s var(--silk), color 0.16s var(--silk), transform 0.16s var(--silk), box-shadow 0.16s var(--silk);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sq-fab svg,
.sq-fab .lucide {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  transition: transform 0.25s var(--silk);
}

.sq-fab:hover svg,
.sq-fab:hover .lucide,
.sq-fab:active svg,
.sq-fab:active .lucide,
.sq-fab.active svg,
.sq-fab.active .lucide {
  transform: scale(1.12);
}

.sq-fab:hover,
.sq-fab:active,
.sq-fab.active {
  border-color: var(--sky);
  color: var(--sky);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(var(--accent-rgb), 0.25);
}

/* Nearby POI Drawer / Sidebar (Always docked to right side of map) */
.sq-poi-drawer {
  width: 380px;
  max-width: 85vw;
  height: 100%;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border-left: 1px solid var(--border);
  z-index: 1100;
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.4);
  position: relative;
  flex-shrink: 0;
  transition: margin-right 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: visible;
}

.sq-poi-drawer.is-collapsed {
  margin-right: -380px;
}

/* ==========================================================================
   SMARTPHONEMODUS (<= 768px)
   Radar im Umkreis komplett ausgeblendet und nicht einblendbar
   ========================================================================== */
@media (max-width: 768px) {

  .sq-poi-drawer,
  #poi-drawer {
    display: none !important;
  }

  .sq-drawer-collapse-btn,
  #btn-toggle-poi-drawer {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

/* Sidebar Toggle Arrow Button on Drawer Border */
.sq-drawer-collapse-btn {
  position: absolute;
  top: 50%;
  left: -32px;
  transform: translateY(-50%);
  width: 32px;
  height: 64px;
  border-radius: 9px 0 0 9px;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-right: none;
  color: var(--sky);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: -5px 0 16px rgba(0, 0, 0, 0.5);
  z-index: 1200;
  transition: all 0.25s var(--silk);
  padding: 0;
}

.sq-drawer-collapse-btn:hover {
  background: rgba(var(--accent-rgb), 0.18);
  color: #ffffff;
  border-color: var(--sky);
}

.sq-drawer-collapse-btn svg,
.sq-drawer-collapse-btn .lucide {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  transition: transform 0.25s var(--silk);
}

.sq-drawer-handle {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sq-drawer-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sq-drawer-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

.sq-drawer-subtitle {
  font-size: 0.78rem;
  color: var(--text2);
  margin-top: 2px;
}

.sq-poi-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--border2) transparent;
}

.sq-poi-list::-webkit-scrollbar {
  width: 6px;
}

.sq-poi-list::-webkit-scrollbar-track {
  background: rgba(var(--bg-rgb), 0.4);
  border-radius: 4px;
}

.sq-poi-list::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 4px;
  border: 1px solid rgba(var(--accent-rgb), 0.15);
}

.sq-poi-list::-webkit-scrollbar-thumb:hover {
  background: var(--sky);
  box-shadow: 0 0 6px rgba(var(--accent-rgb), 0.4);
}

.sq-poi-item {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0;
  transition: border-color 0.25s var(--silk), box-shadow 0.25s var(--silk);
  position: relative;
  max-width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
  overflow: hidden;
}

.sq-poi-item:hover {
  border-color: var(--sky);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.sq-poi-item.in-range {
  border-color: rgba(61, 204, 142, 0.5);
  box-shadow: 0 0 14px rgba(61, 204, 142, 0.12);
}

.sq-poi-item.has-cooldown {
  border-color: rgba(245, 176, 65, 0.75);
  box-shadow: 0 0 10px rgba(245, 176, 65, 0.12);
}

.sq-poi-item.has-cooldown:hover {
  border-color: #F5B041;
  box-shadow: 0 4px 16px rgba(245, 176, 65, 0.25);
}

.sq-poi-item.has-cooldown.expanded {
  border-color: #F5B041;
  box-shadow: 0 6px 20px rgba(245, 176, 65, 0.25);
}

/* Supermarket in Radar */
.sq-poi-item.sq-poi-item-supermarket {
  border-color: rgba(56, 189, 248, 0.25);
}

.sq-poi-item.sq-poi-item-supermarket:hover,
.sq-poi-item.sq-poi-item-supermarket.expanded {
  border-color: var(--sky);
}

.sq-poi-item.sq-poi-item-supermarket.in-range {
  border-color: rgba(61, 204, 142, 0.5);
  box-shadow: 0 0 14px rgba(61, 204, 142, 0.12);
}

/* Supermarket in Radar when at least 1 item is sold out: ORANGE BORDER */
.sq-poi-item.sq-shop-sold-out {
  border-color: #f97316 !important;
  box-shadow: 0 0 12px rgba(249, 115, 22, 0.25) !important;
}

.sq-poi-item.sq-shop-sold-out:hover,
.sq-poi-item.sq-shop-sold-out.expanded {
  border-color: #fb923c !important;
  box-shadow: 0 4px 16px rgba(249, 115, 22, 0.4) !important;
}

.sq-poi-item.sq-shop-sold-out .sq-poi-item-icon {
  color: #fb923c;
}

.sq-poi-item.expanded {
  border-color: var(--sky);
  background: var(--bg3);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

/* POI Compact Button Header (Collapsed State) */
.sq-poi-item-header {
  width: 100%;
  background: transparent;
  border: none;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
  outline: none;
  border-radius: 12px;
  transition: background 0.2s ease;
  user-select: none;
}

.sq-poi-item-header:hover {
  background: rgba(var(--accent-rgb), 0.08);
}

.sq-poi-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.sq-poi-item-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--sky);
}

.sq-item-collected-check {
  position: absolute;
  top: -4px;
  right: -5px;
  background: var(--green);
  color: var(--text-on-accent);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--bg3);
  box-shadow: 0 0 5px rgba(61, 204, 142, 0.6);
  z-index: 2;
  pointer-events: none;
}

.sq-item-collected-check svg,
.sq-item-collected-check .lucide {
  width: 7px;
  height: 7px;
  stroke: var(--text-on-accent);
  stroke-width: 3.5;
}

.sq-poi-item-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.94rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sq-poi-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.sq-poi-expand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text2);
  transition: transform 0.25s var(--silk);
}

.sq-poi-item.expanded .sq-poi-expand-icon {
  transform: rotate(180deg);
  color: var(--sky);
}

/* POI Collapsible Details Body (Expanded State) */
.sq-poi-item-body {
  padding: 10px 14px 14px 14px;
  border-top: 1px solid rgba(42, 64, 96, 0.4);
  transition: all 0.25s var(--silk);
}

.sq-poi-item-body.collapsed {
  display: none;
}

.sq-poi-item-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text2);
  margin-bottom: 12px;
}

.sq-poi-item-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  max-width: 100%;
  box-sizing: border-box;
}

.sq-dist-tag {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text2);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  line-height: 1.3;
}

.sq-dist-tag.ready {
  background: rgba(61, 204, 142, 0.14);
  color: var(--green);
  border-color: rgba(61, 204, 142, 0.4);
}

.sq-dist-tag.cooldown {
  background: rgba(250, 204, 21, 0.12);
  color: var(--gold);
  border-color: rgba(250, 204, 21, 0.35);
}

.poi-row-btns {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-left: auto;
  max-width: 100%;
}

.poi-row-btns .sq-btn {
  white-space: nowrap;
}

/* Leaflet Dark Popup & Layering above FAB controls */
.leaflet-popup-pane,
.leaflet-popup {
  z-index: 1200 !important;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: var(--bg2) !important;
  color: var(--text) !important;
  border: 1px solid var(--border2);
  border-radius: 12px !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6) !important;
}

.leaflet-popup-content {
  margin: 14px 16px !important;
  line-height: 1.5 !important;
}


/* License Office marker (Rathaus / Landratsamt) in lighter yellow (#fde047) */
.sq-poi-marker.sq-license-office-marker {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: linear-gradient(135deg, #fde047 0%, #facc15 100%);
  border: 1.8px solid #fef9c3;
  box-shadow: 0 0 12px rgba(253, 224, 71, 0.78);
  color: #422006;
}

.sq-poi-marker.sq-license-office-marker .sq-marker-icon svg,
.sq-poi-marker.sq-license-office-marker .sq-marker-icon .lucide {
  width: 14px;
  height: 14px;
  stroke: #422006;
  stroke-width: 2.3;
}

.sq-poi-marker.sq-license-office-marker:hover {
  transform: scale(1.35);
  border-color: #ffffff;
  box-shadow: 0 0 18px rgba(254, 240, 138, 0.98);
}

/* Gas Station / EV Charging Station marker in bright, friendly red (#fb7185) */
.sq-poi-marker.sq-gas-station-marker {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(135deg, #fb7185 0%, #f43f5e 100%);
  border: 1.8px solid #ffe4e6;
  box-shadow: 0 0 12px rgba(251, 113, 133, 0.8);
  color: #ffffff;
}

.sq-poi-marker.sq-gas-station-marker .sq-marker-icon svg,
.sq-poi-marker.sq-gas-station-marker .sq-marker-icon .lucide {
  width: 13px;
  height: 13px;
  stroke: #ffffff;
  stroke-width: 2.2;
}

.sq-poi-marker.sq-gas-station-marker:hover {
  transform: scale(1.35);
  border-color: #ffffff;
  box-shadow: 0 0 18px rgba(251, 113, 133, 0.98);
}

/* School / Education marker (Schule / Kita / Uni) in cyan / sky blue (#38bdf8) */
.sq-poi-marker.sq-school-marker {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
  border: 1.8px solid #e0f2fe;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.8);
  color: #ffffff;
}

.sq-poi-marker.sq-school-marker .sq-marker-icon svg,
.sq-poi-marker.sq-school-marker .sq-marker-icon .lucide {
  width: 14px;
  height: 14px;
  stroke: #ffffff;
  stroke-width: 2.2;
}

.sq-poi-marker.sq-school-marker:hover {
  transform: scale(1.35);
  border-color: #ffffff;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.98);
}

/* Bank & Exchange marker in rich golden/amber (#f59e0b) */
.sq-poi-marker.sq-bank-marker {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
  border: 1.8px solid #fef3c7;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.85);
  color: #ffffff;
}

.sq-poi-marker.sq-bank-marker .sq-marker-icon svg,
.sq-poi-marker.sq-bank-marker .sq-marker-icon .lucide {
  width: 14px;
  height: 14px;
  stroke: #ffffff;
  stroke-width: 2.2;
}

.sq-poi-marker.sq-bank-marker:hover {
  transform: scale(1.35);
  border-color: #ffffff;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.98);
}

/* Altar marker (Sakrale Opferstätte) in mystical purple/crimson (#a855f7 -> #7e22ce) */
.sq-poi-marker.sq-altar-marker {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: linear-gradient(135deg, #c084fc 0%, #7e22ce 100%);
  border: 1.8px solid #f3e8ff;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.85);
  color: #ffffff;
}

.sq-poi-marker.sq-altar-marker .sq-marker-icon svg,
.sq-poi-marker.sq-altar-marker .sq-marker-icon .lucide {
  width: 14px;
  height: 14px;
  stroke: #ffffff;
  stroke-width: 2.2;
}

.sq-poi-marker.sq-altar-marker:hover {
  transform: scale(1.35);
  border-color: #ffffff;
  box-shadow: 0 0 18px rgba(192, 132, 252, 0.98);
}

/* Creature Spawn Marker (circular image badge on map) */
.sq-creature-div-icon {
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  display: block;
  background: transparent;
  border: none;
  overflow: visible !important;
}

.sq-creature-marker {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  border-radius: 50%;
  background: var(--bg3);
  border: 2px solid var(--text-soft);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  transform: scale(var(--creature-scale, 1));
  transform-origin: center center;
  transition: transform 0.12s ease-out;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: visible;
}

.leaflet-zoom-anim .sq-creature-marker,
.leaflet-zooming .sq-creature-marker {
  transition: none !important;
}

.sq-creature-marker:hover {
  transform: scale(calc(var(--creature-scale, 1) * 1.18));
  z-index: 12500 !important;
}

/* Ensure cropper viewport inside creature marker is strictly circular and clips overflowing card art */
.sq-cropper-viewport.sq-creature-marker {
  width: 108px !important;
  height: 108px !important;
  min-width: 108px !important;
  min-height: 108px !important;
  max-width: 108px !important;
  max-height: 108px !important;
  overflow: hidden !important;
  border-radius: 50% !important;
  transform: none !important;
  transition: none !important;
  isolation: isolate;
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  mask-image: radial-gradient(white, black);
}

.sq-cropper-viewport.sq-creature-marker:hover {
  transform: none !important;
}

.sq-creature-marker-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.sq-creature-marker.rarity-gewoehnlich {
  border-color: #cbd5e1;
  box-shadow: 0 0 8px rgba(203, 213, 225, 0.55);
}

.sq-creature-marker.rarity-selten {
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.85);
}

.sq-creature-marker.rarity-episch {
  border-color: #c084fc;
  box-shadow: 0 0 12px rgba(192, 132, 252, 0.9);
}

.sq-creature-marker.rarity-legendaer {
  border-color: #fbbf24;
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.95);
}

.sq-creature-marker.rarity-einzigartig {
  border-color: #f43f5e;
  box-shadow: 0 0 16px rgba(244, 63, 94, 0.98);
}

/* Dedicated hardware-accelerated pseudo-element pulse aura (no repaint flicker) */
.sq-creature-marker.rarity-episch::before,
.sq-creature-marker.rarity-legendaer::before,
.sq-creature-marker.rarity-einzigartig::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.sq-creature-marker.rarity-episch::before {
  border: 2px solid rgba(192, 132, 252, 0.85);
  box-shadow: 0 0 8px rgba(192, 132, 252, 0.8);
  animation: creaturePulseEpisch 2.4s infinite ease-out;
}

.sq-creature-marker.rarity-legendaer::before {
  border: 2.5px solid rgba(251, 191, 36, 0.9);
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.85);
  animation: creaturePulseLegendaer 2.1s infinite ease-out;
}

.sq-creature-marker.rarity-einzigartig::before {
  border: 3px solid rgba(244, 63, 94, 0.95);
  box-shadow: 0 0 16px rgba(244, 63, 94, 0.9);
  animation: creaturePulseEinzigartig 1.8s infinite ease-out;
}

@keyframes creaturePulseEpisch {
  0% {
    transform: scale(1);
    opacity: 0.9;
  }

  65% {
    transform: scale(1.35);
    opacity: 0;
  }

  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

@keyframes creaturePulseLegendaer {
  0% {
    transform: scale(1);
    opacity: 0.95;
  }

  65% {
    transform: scale(1.65);
    opacity: 0;
  }

  100% {
    transform: scale(1.65);
    opacity: 0;
  }
}

@keyframes creaturePulseEinzigartig {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  65% {
    transform: scale(2.0);
    opacity: 0;
  }

  100% {
    transform: scale(2.0);
    opacity: 0;
  }
}

.sq-creature-timer-pill {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(245, 158, 11, 0.95);
  color: #0f172a;
  font-family: var(--font-mono);
  font-size: 0.48rem;
  font-weight: 800;
  padding: 0 3px;
  line-height: 1.15;
  border-radius: 999px;
  border: 1px solid #fef08a;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

/* Uncaught Creature Map Marker Attention Badge */
.sq-creature-uncaught-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid var(--bg3);
  box-shadow: 0 0 5px rgba(34, 197, 94, 0.9), 0 1px 3px rgba(0, 0, 0, 0.6);
  z-index: 6;
  pointer-events: none;
  animation: sqUncaughtPulse 2s infinite ease-in-out;
}

@keyframes sqUncaughtPulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.16);
    opacity: 0.88;
  }
}

/* Startled Creature ("Aufgeschreckt") Map Marker Footprints Badge */
.sq-creature-startled-badge {
  position: absolute;
  bottom: -4px;
  left: -5px;
  background: #0b1528;
  color: #38bdf8;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.9), 0 2px 4px rgba(0, 0, 0, 0.65);
  z-index: 6;
  pointer-events: none;
  animation: sqMovementFootprintsPulse 1.8s infinite ease-in-out;
}

.sq-creature-startled-badge svg,
.sq-creature-startled-badge .lucide {
  width: 10px;
  height: 10px;
  stroke: #38bdf8;
  stroke-width: 2.3;
}

/* Uncaught Creature Radar Drawer Badge */
.sq-item-uncaught-badge {
  position: absolute;
  top: -4px;
  right: -5px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #ffffff;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--bg3, #0f172a);
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.85);
  z-index: 2;
  pointer-events: none;
}

.sq-item-uncaught-badge svg,
.sq-item-uncaught-badge .lucide {
  width: 9px;
  height: 9px;
  stroke: #ffffff;
  stroke-width: 2.2;
}

.sq-radar-tabs {
  margin-top: 10px;
  width: 100%;
  display: flex;
}

.sq-radar-tabs .sq-seg-tab {
  flex: 1;
  justify-content: center;
}


/* Admin Tile Grid (Boundary lines) */
.sq-fab-admin.active,
.sq-fab-admin[aria-pressed="true"] {
  background: rgba(239, 68, 68, 0.22) !important;
  border-color: #ef4444 !important;
  color: #f87171 !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 16px rgba(239, 68, 68, 0.45) !important;
}

.sq-fab-admin.active:hover,
.sq-fab-admin[aria-pressed="true"]:hover {
  background: rgba(239, 68, 68, 0.32) !important;
  border-color: #f87171 !important;
  color: #fecaca !important;
}

.sq-tile-label-marker {
  background: transparent !important;
  border: none !important;
}

.sq-tile-badge {
  display: inline-block;
  background: rgba(var(--bg-panel-rgb), 0.88);
  color: #f87171;
  border: 1px dashed rgba(239, 68, 68, 0.7);
  border-radius: 4px;
  font-size: 10px;
  font-family: var(--font-mono, monospace);
  font-weight: 700;
  padding: 1px 5px;
  letter-spacing: 0.02em;
  pointer-events: none;
  white-space: nowrap;
  user-select: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* =====================================================================
   PHEROMONE BOMB MAP FOG & HUD INDICATOR
   ===================================================================== */
.sq-pheromone-fog-svg {
  overflow: visible;
  pointer-events: none !important;
}

.sq-fog-base-pulse {
  transform-origin: 200px 200px;
  animation: sqFogPulse 4.6s ease-in-out infinite;
}

.sq-fog-wisp {
  transform-origin: 200px 200px;
}

.sq-fog-wisp-1 {
  animation: sqFogDriftA 11s ease-in-out infinite;
}

.sq-fog-wisp-2 {
  animation: sqFogDriftB 13s ease-in-out infinite;
}

.sq-fog-wisp-3 {
  animation: sqFogDriftB 15s ease-in-out infinite reverse;
}

.sq-fog-wisp-4 {
  animation: sqFogDriftA 9.5s ease-in-out infinite reverse;
}

@keyframes sqFogPulse {

  0%,
  100% {
    opacity: 0.78;
    transform: scale(0.97);
  }

  50% {
    opacity: 1;
    transform: scale(1.02);
  }
}

@keyframes sqFogDriftA {

  0%,
  100% {
    transform: translate(0px, 0px) rotate(0deg) scale(1);
  }

  50% {
    transform: translate(16px, -12px) rotate(12deg) scale(1.07);
  }
}

@keyframes sqFogDriftB {

  0%,
  100% {
    transform: translate(0px, 0px) rotate(0deg) scale(1.04);
  }

  50% {
    transform: translate(-18px, 14px) rotate(-14deg) scale(0.95);
  }
}

.sq-pheromone-hud-pill {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 900;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(var(--bg-panel-rgb), 0.95);
  border: 1px solid rgba(var(--text-muted-rgb), 0.45);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  color: var(--text-bright);
  font-size: 0.76rem;
  font-weight: 600;
  pointer-events: none;
  white-space: nowrap;
}

.sq-pheromone-hud-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--text-soft);
  box-shadow: 0 0 8px currentColor;
  animation: sqFogPulse 2s ease-in-out infinite;
}

.sq-pheromone-hud-timer {
  font-family: var(--font-mono, monospace);
  font-weight: 700;
  color: var(--text);
  padding-left: 4px;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
}

.sq-pheromone-hud-pill.rarity-gewoehnlich {
  border-color: rgba(203, 213, 225, 0.5);
}

.sq-pheromone-hud-pill.rarity-gewoehnlich .sq-pheromone-hud-dot {
  background: #cbd5e1;
  color: #cbd5e1;
}

.sq-pheromone-hud-pill.rarity-selten {
  border-color: rgba(56, 189, 248, 0.65);
}

.sq-pheromone-hud-pill.rarity-selten .sq-pheromone-hud-dot {
  background: #38bdf8;
  color: #38bdf8;
}

.sq-pheromone-hud-pill.rarity-episch {
  border-color: rgba(192, 132, 252, 0.7);
}

.sq-pheromone-hud-pill.rarity-episch .sq-pheromone-hud-dot {
  background: #c084fc;
  color: #c084fc;
}

.sq-pheromone-hud-pill.rarity-legendaer {
  border-color: rgba(251, 191, 36, 0.75);
}

.sq-pheromone-hud-pill.rarity-legendaer .sq-pheromone-hud-dot {
  background: #fde047;
  color: #f59e0b;
}

.sq-pheromone-hud-pill.rarity-einzigartig {
  border-color: rgba(244, 63, 94, 0.78);
}

.sq-pheromone-hud-pill.rarity-einzigartig .sq-pheromone-hud-dot {
  background: linear-gradient(135deg, #f43f5e, #38bdf8);
  color: #f43f5e;
}

.sq-creature-marker.is-pheromone-spawn {
  box-shadow: 0 0 14px rgba(192, 132, 252, 0.75), 0 0 24px rgba(56, 189, 248, 0.45);
}

/* =====================================================================
   PRIVATE MUSIC BOX MAP MARKER (#f43f5e rounded-square frame + cover)
   ===================================================================== */
.sq-musicbox-div-icon {
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  display: block;
  background: transparent;
  border: none;
}

.sq-musicbox-marker {
  position: relative;
  width: 42px;
  height: 42px;
  box-sizing: border-box;
  border-radius: 10px;
  border: 2.5px solid #f43f5e;
  background: #1f0a12;
  box-shadow: 0 0 16px rgba(244, 63, 94, 0.98), 0 4px 12px rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.14s ease-out;
  overflow: visible;
}

.sq-musicbox-marker:hover {
  transform: scale(1.16);
  z-index: 12800 !important;
}

.sq-musicbox-marker::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 12px;
  border: 2.5px solid rgba(244, 63, 94, 0.92);
  box-shadow: 0 0 14px rgba(244, 63, 94, 0.85);
  pointer-events: none;
  z-index: -1;
  animation: musicBoxPulse 2.0s infinite ease-out;
}

@keyframes musicBoxPulse {
  0% {
    transform: scale(1);
    opacity: 0.95;
  }
  65% {
    transform: scale(1.48);
    opacity: 0;
  }
  100% {
    transform: scale(1.48);
    opacity: 0;
  }
}

.sq-musicbox-marker-img {
  width: 100%;
  height: 100%;
  border-radius: 7px;
  object-fit: cover;
  display: block;
}

.sq-musicbox-note-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: linear-gradient(135deg, #f43f5e, #be123c);
  border: 1.5px solid #ffe4e6;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 8px rgba(244, 63, 94, 0.9), 0 2px 4px rgba(0, 0, 0, 0.7);
  z-index: 6;
  pointer-events: none;
}

.sq-musicbox-note-badge svg,
.sq-musicbox-note-badge .lucide {
  width: 10px;
  height: 10px;
  stroke: #ffffff;
  stroke-width: 2.4;
}

.sq-musicbox-popup-cover {
  width: 74px;
  height: 74px;
  border-radius: 12px;
  border: 2.5px solid #f43f5e;
  box-shadow: 0 0 14px rgba(244, 63, 94, 0.65), 0 4px 10px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  flex-shrink: 0;
  background: #1f0a12;
}

.sq-musicbox-popup-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (hover: none),
(pointer: coarse) {

  .sq-poi-marker,
  .sq-creature-marker,
  .sq-fab,
  .sq-fab-admin,
  .sq-fab-filter,
  .sq-fab-spy {
    transition-duration: 0.1s;
  }

  .sq-poi-marker:hover,
  .sq-poi-marker.sq-playground-marker:hover,
  .sq-poi-marker.sq-transit-stop-marker:hover,
  .sq-poi-marker.sq-supermarket-marker:hover,
  .sq-poi-marker.sq-license-office-marker:hover,
  .sq-poi-marker.sq-gas-station-marker:hover,
  .sq-poi-marker.sq-school-marker:hover,
  .sq-poi-marker.sq-bank-marker:hover,
  .sq-poi-marker.sq-altar-marker:hover {
    transform: none;
  }

  .sq-creature-marker:hover {
    transform: scale(var(--creature-scale, 1));
  }

  .sq-fab:hover,
  .sq-fab-admin:hover,
  .sq-fab-filter:hover,
  .sq-fab-spy:hover,
  .sq-fab:hover svg,
  .sq-fab-admin:hover svg,
  .sq-fab-filter:hover svg,
  .sq-fab-spy:hover svg {
    transform: none;
  }

  .sq-poi-drawer,
  .sq-drawer-collapse-btn {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* =====================================================================
   INTERACTIVE GPS ACTIVATION / RETRY BANNER (iOS / WebKit User Gesture)
   ===================================================================== */
.sq-gps-prompt-banner {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 910;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(460px, calc(100% - 28px));
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(var(--bg-panel-rgb), 0.96);
  border: 1px solid rgba(245, 158, 11, 0.55);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
  color: var(--text-bright);
  transition: opacity 0.2s var(--silk), visibility 0.2s var(--silk), transform 0.2s var(--silk);
}

.sq-gps-prompt-banner.hidden {
  display: none !important;
}

.sq-gps-prompt-icon {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.sq-gps-prompt-icon svg,
.sq-gps-prompt-icon .lucide {
  width: 17px;
  height: 17px;
}

.sq-gps-prompt-copy {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sq-gps-prompt-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-bright);
  line-height: 1.2;
}

.sq-gps-prompt-sub {
  font-size: 0.72rem;
  color: var(--text2);
  line-height: 1.3;
}

.sq-gps-prompt-btn {
  flex: 0 0 auto;
  border: 1px solid rgba(var(--accent-vivid-rgb), 0.7);
  background: linear-gradient(135deg, rgba(var(--accent-deep-rgb), 0.95), rgba(var(--accent-vivid-rgb), 0.95));
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  touch-action: manipulation;
  box-shadow: 0 4px 14px rgba(var(--accent-vivid-rgb), 0.28);
}

.sq-gps-prompt-btn:active {
  transform: scale(0.97);
}

.sq-gps-prompt-close {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text2);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

@media (max-width: 640px) {
  .sq-gps-prompt-banner {
    bottom: 14px;
    max-width: calc(100% - 20px);
    padding: 9px 10px;
    gap: 8px;
  }

  .sq-gps-prompt-icon {
    width: 28px;
    height: 28px;
  }

  .sq-gps-prompt-btn {
    padding: 7px 10px;
    font-size: 0.74rem;
  }
}