.map-card {
  position: relative; /* 让绝对定位 loader 以它为参照 */
  max-width: 1200px;
  margin: 1rem auto;
  padding: 0.75rem;
  background: #ffffff;
  border: 1px solid #e6e7ea;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(18, 26, 36, 0.06);
  overflow: hidden;
}

.map-loader {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.75);
  transition: opacity .35s ease, visibility .35s ease;
}

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

#mapFrame {
  width: 100%;
  height: 360px;
  border: none;
  display: block;
  border-radius: 6px;
  opacity: 0;
  transition: opacity .35s ease;
}

#mapFrame.loaded {
  opacity: 1;
}

.map-card.aspect-16-9 {
  padding: 0;
}

.map-card.aspect-16-9 .map-ratio {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
}

.map-card.aspect-16-9 .map-ratio iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 6px;
  display: block;
}

@media (max-width: 640px) {
  .map-card { 
    padding: 0.5rem; 
  }
}
