/* =======================================
   Astracel – View Map
   ======================================= */

:root{
  --bg: #0e1013;
  --panel: rgba(255,255,255,0.06);
  --panel-hover: rgba(255,255,255,0.10);
  --panel-border: rgba(255,255,255,0.14);
  --text: #eef2f6;
  --muted: #a9b1ba;
  --accent: var(--map-accent, #1bdf91);
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.03);
  --shadow-soft: 0 8px 24px rgba(0,0,0,0.28);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { min-height: 100%; background: var(--bg); }

body{
  min-height: 100%;
  margin: 0;
  padding: 0 0 32px 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 800px at 10% -10%, color-mix(in srgb, var(--accent) 35%, transparent), transparent 60%),
    radial-gradient(1000px 700px at 100% 0%, rgba(86,98,246,0.06), transparent 60%),
    var(--bg);
  background-repeat: no-repeat;
  background-attachment: fixed, fixed, scroll;
}

/* Scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--accent) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 60%, transparent));
  border-radius: 20px;
}
*::-webkit-scrollbar-track { background: transparent; }

/* Layout */
.vm-container{
  width: min(1500px, 94vw);
  margin: 24px auto 0;
}

.vm-breadcrumbs{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--muted);
}
.vm-breadcrumbs a{
  color: var(--text);
  text-decoration: none;
  padding: 4px 6px;
  border-radius: 8px;
  transition: background .16s ease, color .16s ease, text-shadow .16s ease;
}
.vm-breadcrumbs a:hover{
  background: var(--panel-hover);
  color: var(--accent);
  text-shadow: 0 0 10px color-mix(in srgb, var(--accent) 40%, transparent);
}
.vm-breadcrumbs .sep{
  opacity: .6;
}

.vm-header{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 16px;
}
.vm-header-main{
  min-width: 0;
}
.vm-kicker{
  margin: 0 0 6px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 12px;
}
.vm-title{
  margin: 0;
  font-family: "CopperplateGothicBold", ui-sans-serif, system-ui, Arial, sans-serif;
  font-size: clamp(18px, 2.2vw, 28px);
  letter-spacing: .4px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

/* Main layout */
.vm-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
}

/* Cards */
.card{
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.card:hover{
  background: var(--panel-hover);
  border-color: color-mix(in srgb, var(--panel-border) 60%, #fff 40%);
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

/* Map shell */
.vm-map-shell{
  padding: 14px;
}

.vm-map-card{
  display: block;
  width: 100%;
}

/* Map stage */
.vm-map-stage{
  width: 100%;
  min-width: 0;
  height: clamp(420px, 68vh, 720px);
  overflow: hidden;
  border-radius: calc(var(--radius) - 4px);
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.16);
}

.vm-map-stack{
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.vm-map-pane{
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 12px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 1s ease, visibility 1s ease;
  overflow: hidden;
}

.vm-map-pane.is-active{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 2;
}

.vm-map-pane img{
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  object-position: center;
  border-radius: 12px;
  user-select: none;
}

.vm-placeholder{
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  border: 1px dashed rgba(255,255,255,0.16);
  border-radius: 12px;
  padding: 18px;
}

/* Layer footer */
.vm-layer-footer{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.10);
}

.vm-layer-meta{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.vm-layer-meta-kicker{
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .14em;
}
.vm-layer-meta-name{
  font-weight: 700;
}
.vm-layer-meta-height{
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.16);
  font-size: 12px;
  color: var(--accent);
  font-weight: 800;
}

/* Layer buttons */
.vm-layer-rail{
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-width: 0;
  max-width: 100%;
}

.vm-layer-track{
  position: relative;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 2px 4px;
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  scrollbar-width: none;
}

.vm-layer-track::-webkit-scrollbar{
  display: none;
}

.vm-layer-track::before{
  content: "";
  position: absolute;
  top: 50%;
  left: 8px;
  right: 8px;
  height: 2px;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.285);
  border-radius: 999px;
}

.vm-layer-dot{
  position: relative;
  z-index: 2;
  appearance: none;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  transition: border-color .16s ease, color .16s ease, background .16s ease, box-shadow .16s ease;
}

.vm-layer-dot:hover,
.vm-layer-dot:focus{
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 70%, #fff 20%);
  color: var(--accent);
  background: rgba(255,255,255,0.10);
}

.vm-layer-dot.is-active{
  color: #fff;
  border-color: color-mix(in srgb, var(--accent) 75%, #fff 10%);
  background: color-mix(in srgb, var(--accent) 16%, rgba(255,255,255,0.08));
  box-shadow: 0 0 0 1px rgba(255,255,255,0.04), 0 8px 24px rgba(0,0,0,0.22);
}

/* Bottom content boxes */
.vm-side{
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}

.vm-detail-top{
  display: grid;
  gap: 16px;
  align-items: stretch;
}

.vm-detail-top.has-two{
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.vm-detail-top.has-one{
  grid-template-columns: 1fr;
}

.vm-related-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  align-items: start;
}

/* Content blocks */
.vm-dimensions,
.vm-info,
.vm-climate,
.vm-list{
  padding: 14px 16px;
}

.vm-dimensions h2,
.vm-info h2,
.vm-climate h2,
.vm-list h2{
  margin: 0 0 10px;
  font-size: 16px;
  opacity: .94;
}

/* Dimensions */
.vm-dimension-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.vm-dimension-grid.has-depth{
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.vm-dimension-box{
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  min-width: 0;
}

.vm-dimension-box-depth{
  grid-column: 1 / -1;
}

.vm-dimension-label{
  margin-bottom: 6px;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.vm-dimension-value{
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--text);
  overflow-wrap: anywhere;
}

/* Info text */
.vm-info-body p{
  margin: 0 0 10px;
  line-height: 1.45;
}
.vm-info-body p:last-child{
  margin-bottom: 0;
}

.vm-muted{
  color: var(--muted);
  margin: 6px 0 0;
  overflow-wrap: anywhere;
}

.vm-list-items{
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.vm-list-items li a{
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
  transition: color .16s ease, text-decoration-color .16s ease, text-shadow .16s ease;
}
.vm-list-items li a:hover{
  color: var(--accent);
  text-decoration-color: #fff;
  text-shadow: 0 0 10px color-mix(in srgb, var(--accent) 40%, transparent);
}

/* Click-to-play */
.speakable,
.speakable *{
  text-decoration: none !important;
}
.speakable{
  cursor: pointer;
  color: inherit;
  transition: color .18s ease, text-shadow .18s ease, transform .18s ease;
}
.speakable:hover,
.speakable:focus{
  outline: none;
  color: var(--accent);
  text-shadow: 0 0 10px color-mix(in srgb, var(--accent) 40%, transparent);
  transform: translateY(-1px);
}
.speakable .speakable-label{
  position: relative;
  display: inline-block;
}
.speakable .speakable-label::after{
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s ease;
}
.speakable:hover .speakable-label::after,
.speakable:focus .speakable-label::after{
  transform: scaleX(1);
}

/* Hidden audio */
.visually-hidden{
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* Medium screens */
@media (max-width: 980px){
  .vm-container{
    width: min(1280px, 94vw);
  }

  .vm-map-stage{
    height: clamp(380px, 62vh, 600px);
  }

  .vm-detail-top.has-two{
    grid-template-columns: 1fr;
  }
}

/* Small screens */
@media (max-width: 720px){
  .vm-layer-footer{
    align-items: stretch;
  }

  .vm-layer-meta{
    width: 100%;
  }

  .vm-layer-rail{
    width: 100%;
    justify-content: flex-start;
  }

  .vm-layer-track{
    width: 100%;
    padding: 2px 4px 4px;
  }

  .vm-map-stage{
    height: 420px;
  }

  .vm-related-grid{
    grid-template-columns: 1fr;
  }

  .vm-dimension-grid,
  .vm-dimension-grid.has-depth{
    grid-template-columns: 1fr;
  }

  .vm-dimension-box-depth{
    grid-column: auto;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .card,
  .vm-layer-dot,
  .vm-map-pane,
  .speakable{
    transition: none !important;
  }
}