.instmap-section {
  position: relative;
  overflow-x: clip;
  padding-block: clamp(2.25rem, 3.8vw, 3.5rem);
  background:
    radial-gradient(circle at 16% 24%, rgba(242, 101, 39, 0.085), transparent 44%),
    radial-gradient(circle at 86% 82%, rgba(217, 92, 38, 0.06), transparent 40%),
    #15191f;
  color: #ffffff;
}

.instmap-head {
  max-width: 72ch;
  margin-bottom: clamp(1.2rem, 2.2vw, 1.8rem);
}

.instmap-head .kicker {
  display: block;
  margin-bottom: 0.75rem;
  color: #ff8e5e;
}

.instmap-head .lead {
  color: #dce3ec;
  margin-top: 0.85rem;
}

.instmap-grid {
  display: grid;
  grid-template-columns: minmax(0, 52fr) minmax(0, 48fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
}

.instmap-map-col,
.instmap-panel-col {
  min-width: 0;
}

.instmap-stage {
  background: linear-gradient(180deg, #181d24 0%, #12161c 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: clamp(0.75rem, 1.5vw, 1.25rem);
  position: relative;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.34);
}

.instmap-stage-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-bottom: 0.7rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  font-family: var(--font-mono-like);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b7c2d0;
}

.instmap-stage-coord {
  color: #ff9f76;
  font-weight: 700;
}

.instmap-wrap {
  position: relative;
  width: min(100%, 455px);
  aspect-ratio: 640 / 840;
  margin-inline: auto;
  overflow: visible;
}

.instmap-wrap > img,
.instmap-wrap > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.instmap-wrap svg .land {
  transition: fill 0.18s ease, stroke 0.18s ease, stroke-width 0.18s ease;
}

.instmap-wrap svg .land.vn-other {
  fill: #232931;
  stroke: #323b47;
  stroke-width: 0.6;
  cursor: default;
}

.instmap-wrap svg .land.vn-other:hover {
  fill: #2a323c;
  stroke: #495668;
}

.instmap-wrap svg .land.lit {
  fill: #2d3642;
  stroke: #475569;
  stroke-width: 0.75;
  cursor: pointer;
}

.instmap-wrap svg .land.lit:hover {
  fill: #d95c26;
  stroke: #ff9f76;
}

.instmap-wrap svg .land.lit.hot {
  fill: #d95c26;
  stroke: #ff9f76;
  stroke-width: 1.1;
}

.instmap-wrap svg .land.lit.hot:hover,
.instmap-wrap svg .land.lit.is-hover {
  fill: #f26527;
  stroke: #ffc2a8;
}

.instmap-wrap svg .lake {
  fill: var(--color-nav-bg);
  stroke: var(--color-nav-bg);
  stroke-width: 1;
}

.instmap-wrap svg .ocean {
  fill: none;
}

.instmap-dot {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: #ffffff;
  border: 2.5px solid #f26527;
  padding: 0;
  cursor: pointer;
  z-index: 3;
  box-shadow: 0 0 0 2px rgba(18, 22, 28, 0.85);
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.instmap-dot::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
}

.instmap-dot:hover,
.instmap-dot:focus-visible,
.instmap-dot.is-active {
  transform: translate(-50%, -50%) scale(1.24);
  background: #f26527;
  border-color: #ffffff;
  box-shadow: 0 0 0 4px rgba(242, 101, 39, 0.3);
  z-index: 5;
}

.instmap-dot:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

.instmap-dot.is-hq {
  width: 14px;
  height: 14px;
  background: #f26527;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 3px rgba(242, 101, 39, 0.32);
  z-index: 4;
}

.instmap-dot.is-hq::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid rgba(242, 101, 39, 0.78);
  pointer-events: none;
  animation: instmap-hq-pulse 2.2s cubic-bezier(0.22, 0.61, 0.36, 1) infinite;
}

@keyframes instmap-hq-pulse {
  0% {
    transform: scale(0.9);
    opacity: 0.9;
  }
  75%,
  100% {
    transform: scale(2.15);
    opacity: 0;
  }
}

.instmap-tip {
  position: absolute;
  transform: translate(-50%, calc(-100% - 14px));
  max-width: min(260px, calc(100% - 16px));
  background: #0d1015;
  color: #ffffff;
  border: 1px solid rgba(242, 101, 39, 0.65);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5);
  font-family: var(--font-heading);
  font-size: 0.76rem;
  line-height: 1.35;
  padding: 0.45rem 0.7rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.14s ease;
  z-index: 7;
}

.instmap-tip.is-below {
  transform: translate(-50%, 16px);
}

.instmap-tip b {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
}

.instmap-tip span {
  display: block;
  margin-top: 0.15rem;
  color: #ff9f76;
  font-family: var(--font-mono-like);
  text-transform: uppercase;
  font-size: 0.64rem;
  letter-spacing: 0.06em;
}

.instmap-tip.on {
  opacity: 1;
}

.instmap-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.35rem;
  margin-top: 1rem;
  padding: 0.75rem 0.9rem;
  background: rgba(24, 29, 36, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.instmap-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono-like);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: #dce3ec;
}

.instmap-legend i {
  display: inline-block;
  flex-shrink: 0;
}

.instmap-legend .sw-hq {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #f26527;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 2px rgba(242, 101, 39, 0.35);
}

.instmap-legend .sw-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #f26527;
}

.instmap-legend .sw-lit {
  width: 14px;
  height: 10px;
  background: #d95c26;
  border: 1px solid #ff9f76;
}

.instmap-legend .sw-base {
  width: 14px;
  height: 10px;
  background: #232931;
  border: 1px solid #475569;
}

.instmap-panel {
  background: #181d24;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: clamp(0.85rem, 1.4vw, 1.15rem);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.instmap-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  flex-wrap: wrap;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.instmap-panel-kicker {
  font-family: var(--font-mono-like);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #ff9f76;
}

.instmap-panel-hint {
  font-size: 0.82rem;
  color: #b7c2d0;
}

.instmap-region-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.5rem;
}

.instmap-region-btn {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 40px;
  padding: 0.48rem 0.75rem;
  background: #1e242d;
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #ffffff;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease;
}

.instmap-region-btn:hover {
  background: rgba(242, 101, 39, 0.14);
  border-color: rgba(242, 101, 39, 0.65);
}

.instmap-region-btn:focus-visible {
  outline: 2px solid #ff9f76;
  outline-offset: 2px;
}

.instmap-region-btn.is-active {
  background: linear-gradient(90deg, rgba(242, 101, 39, 0.22) 0%, rgba(217, 92, 38, 0.08) 100%);
  border-color: #f26527;
}

.instmap-region-idx {
  font-family: var(--font-mono-like);
  font-size: 0.72rem;
  font-weight: 700;
  color: #ff9f76;
  padding: 0.18rem 0.42rem;
  background: rgba(242, 101, 39, 0.12);
  border: 1px solid rgba(242, 101, 39, 0.35);
}

.instmap-region-btn.is-active .instmap-region-idx {
  background: #f26527;
  color: #14181e;
  border-color: #f26527;
}

.instmap-region-name {
  font-family: var(--font-heading);
  font-size: 0.94rem;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.35;
}

.instmap-region-meta {
  font-family: var(--font-mono-like);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #b8c4d4;
  white-space: nowrap;
}

.instmap-region-btn.is-active .instmap-region-meta {
  color: #ff9f76;
}

.instmap-detail-card {
  background: #12161c;
  border: 1px solid rgba(242, 101, 39, 0.38);
  border-left: 3px solid #f26527;
  padding: clamp(0.85rem, 1.4vw, 1.1rem);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.instmap-detail-top {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.instmap-detail-badge {
  align-self: flex-start;
  font-family: var(--font-mono-like);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #14181e;
  background: #ff9f76;
  padding: 0.2rem 0.5rem;
}

.instmap-detail-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(1.12rem, 1.5vw, 1.35rem);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
}

.instmap-detail-provinces {
  margin: 0;
  font-size: 0.84rem;
  color: #ff9f76;
  line-height: 1.45;
}

.instmap-detail-summary {
  margin: 0;
  font-size: 0.92rem;
  color: #dce3ec;
  line-height: 1.55;
}

.instmap-detail-apps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.instmap-detail-apps li {
  position: relative;
  padding-left: 1.05rem;
  font-size: 0.88rem;
  color: #dce3ec;
  line-height: 1.48;
}

.instmap-detail-apps li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.52em;
  width: 6px;
  height: 6px;
  background: #f26527;
}

.instmap-detail-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-top: 0.25rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.instmap-cta {
  background-color: #c94b14;
  color: #ffffff;
  min-height: 44px;
  padding: 0.65rem 1.3rem;
  font-size: 0.92rem;
  font-weight: 700;
}

.instmap-cta:hover,
.instmap-cta:focus-visible {
  background-color: #b84310;
  color: #ffffff;
}

.instmap-cta-note {
  font-size: 0.8rem;
  color: #b8c4d4;
}

@media (prefers-reduced-motion: no-preference) {
  .instmap-wrap.anim-ready .instmap-dot {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.4);
  }
  .instmap-wrap.in-view .instmap-dot {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    transition: opacity 0.38s ease, transform 0.38s cubic-bezier(0.2, 0.9, 0.3, 1.4);
  }
  .instmap-wrap.in-view .instmap-dot.is-active {
    transform: translate(-50%, -50%) scale(1.24);
  }
}

@media (prefers-reduced-motion: reduce) {
  .instmap-dot.is-hq::after {
    animation: none;
  }
  .instmap-wrap svg .land,
  .instmap-dot,
  .instmap-region-btn,
  .instmap-tip {
    transition: none;
  }
}

@media (max-width: 959px) {
  .instmap-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }

  .instmap-wrap {
    width: 100%;
    max-width: 520px;
  }
}

@media (max-width: 520px) {
  .instmap-section .container {
    padding-inline: 1rem;
  }

  .instmap-stage,
  .instmap-panel,
  .instmap-detail-card {
    padding: 0.85rem;
  }

  .instmap-region-btn {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.3rem 0.65rem;
    padding: 0.6rem 0.75rem;
  }

  .instmap-region-meta {
    grid-column: 2;
    white-space: normal;
  }

  .instmap-legend {
    gap: 0.6rem 1rem;
    padding: 0.65rem 0.75rem;
  }
}
