/* 別版のイラスト地図。案内パネルの構成と寸法は既存のスタイルを継承する。 */
#mapWrap {
  background: #171519;
  border-color: #49383f;
}

#mapWrap #city { display: none; }

.illustrated-map-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: none;
  overscroll-behavior: contain;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  cursor: grab;
  background: radial-gradient(ellipse at center, #33242a, #171519 75%);
}

.illustrated-map-viewport.is-dragging,
.illustrated-map-viewport:active { cursor: grabbing; }

.illustrated-map-world {
  position: absolute;
  left: 0;
  top: 0;
  width: 1536px;
  height: 1024px;
  transform-origin: 0 0;
  will-change: transform;
}

.town-art {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  pointer-events: none;
  -webkit-user-drag: none;
}

.town-hotspots {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.map-hotspot {
  fill: transparent;
  stroke: transparent;
  stroke-width: 2.5px;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  cursor: pointer;
  outline: none;
  transition: fill 120ms ease, stroke 120ms ease;
}

.map-hotspot.is-hover {
  fill: #fff2df18;
  stroke: #ffe1b8;
}

.map-hotspot.is-selected {
  fill: #f5a7cc1c;
  stroke: #ffd1e5;
  stroke-width: 3px;
  filter: drop-shadow(0 0 3px #3a142d);
}

.map-hotspot:focus-visible,
.map-hotspot.is-focused,
.map-hotspot.is-focus {
  fill: #b8f7ff26;
  stroke: #b8f7ff;
  stroke-width: 4px;
  filter: drop-shadow(0 0 3px #071b21);
  outline: none;
}

@media (hover: hover) {
  .map-hotspot:hover { fill: #fff2df18; stroke: #ffe1b8; }
  .map-hotspot.is-selected:hover { fill: #f5a7cc26; stroke: #ffd1e5; }
}

.map-hotspot:focus-visible,
.map-hotspot.is-focused,
.map-hotspot.is-focus {
  fill: #b8f7ff26;
  stroke: #b8f7ff;
  stroke-width: 4px;
}

#mapWrap .labels { z-index: 2; }

#mapWrap .map-label {
  min-height: 36px;
  max-width: min(190px, 52vw);
  padding: 6px 10px;
  border: 1px solid #a88c9b;
  border-radius: 10px;
  background: #221c25f2;
  color: #fff7ec;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: anywhere;
  box-shadow: 0 3px 10px #100b174d;
}

#mapWrap .map-label::after {
  width: 7px;
  height: 7px;
  bottom: -5px;
  background: #221c25;
  border-color: #a88c9b;
}

#mapWrap .map-label-count { font-size: 10px; color: #ddcad5; }
#mapWrap .map-label.is-lite .map-label-count { display: none; }
#mapWrap .map-label.is-spot { min-height: 0; font-size: 11px; border-style: dashed; }

#mapWrap .map-label:hover,
#mapWrap .map-label.is-selected {
  background: #f4c2d4;
  border-color: #ffdeea;
  color: #3e2536;
}

#mapWrap .map-label:hover::after,
#mapWrap .map-label.is-selected::after {
  background: #f4c2d4;
  border-color: #ffdeea;
}

#mapWrap .map-label:hover .map-label-count,
#mapWrap .map-label.is-selected .map-label-count { color: #664457; }

#mapWrap .map-label:focus-visible,
#mapWrap .map-tools button:focus-visible {
  outline: 3px solid #b8f7ff;
  outline-offset: 3px;
}

#mapWrap .map-tools {
  top: 14px;
  right: 14px;
  left: auto;
  z-index: 5;
  max-width: calc(100% - 28px);
  display: flex;
  align-items: center;
  gap: 6px;
}

#mapWrap .map-tools .chip-btn {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #a38a9a;
  border-radius: 12px;
  background: #241d29f5;
  color: #fff5ed;
  font-size: 12px;
  line-height: 1.3;
  box-shadow: 0 2px 8px #100b1733;
}

#mapWrap .map-tools .chip-btn:hover { background: #3a2c3c; border-color: #efd1e1; }
#mapWrap .map-tools .chip-btn[aria-pressed="true"] { background: #f4c2d4; border-color: #ffdeea; color: #3e2536; }
#mapWrap .map-tools .chip-btn:disabled { opacity: .46; cursor: default; }

.map-zoom-controls { display: flex; gap: 0; }
#mapWrap .map-tools .map-zoom-btn { min-width: 44px; width: 44px; padding: 0; font-size: 22px; }
#mapWrap .map-zoom-controls .map-zoom-btn:first-child { border-radius: 12px 0 0 12px; }
#mapWrap .map-zoom-controls .map-zoom-btn:last-child { border-radius: 0 12px 12px 0; margin-left: -1px; }

#mapWrap .map-hint {
  left: 14px;
  bottom: 14px;
  max-width: calc(100% - 28px);
  padding: 8px 12px;
  border: 1px solid #8c718466;
  border-radius: 12px;
  background: #211b25eb;
  color: #f1dfe8;
  font-size: 12px;
  line-height: 1.65;
  pointer-events: none;
}

#mapWrap .map-fallback { z-index: 4; background: #211b25; }
body.no-map #mapWrap .map-tools { display: none; }

#mapWrap .map-callout-content {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

#mapWrap .map-callout-head,
#mapWrap .map-callout-actions { flex: 0 0 auto; }

#mapWrap .map-callout-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #d6c4d4 transparent;
  padding: 2px 2px 8px;
}

#mapWrap .map-callout-body .guide-say { flex: none; overflow: visible; }
#mapWrap .map-callout-actions { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; }
#mapWrap .map-callout-actions .row { display: flex; flex-wrap: wrap; gap: 8px; }
#mapWrap .map-callout-actions .row .btn { flex: 1 1 120px; min-height: 44px; }
#mapWrap .map-callout-actions .btn { line-height: 1.5; }
#mapWrap .map-callout-actions .btn-go { background: #98506f; border-color: #98506f; color: #fff; }

@media (max-width: 1100px) and (min-width: 821px) {
  #mapWrap .map-tools { top: 10px; right: 10px; max-width: calc(100% - 20px); }
  #mapWrap .map-tools .chip-btn { padding: 0 9px; }
}

@media (max-width: 820px) {
  #mapWrap .map-tools { top: 12px; right: 12px; max-width: calc(100% - 24px); }
  #mapWrap .map-tools .chip-btn { min-height: 44px; padding: 0 10px; }
  #mapWrap .map-tools .map-zoom-btn { padding: 0; }
  #mapWrap .map-label { min-height: 44px; max-width: min(176px, 52vw); padding: 6px 9px; font-size: 12px; }
  #mapWrap .map-label.is-spot { min-height: 0; font-size: 11px; }
  body.mobile-map #mapWrap .map-hint { left: 12px; bottom: 12px; max-width: calc(100% - 24px); font-size: 11px; }
  #mapWrap .map-callout { border-radius: 20px; }
  #mapWrap .map-callout-content { border-radius: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  .map-hotspot { transition: none; }
}
