.yw2-map-intro,
.yw2-map-filter,
.yw2-map-era-switch,
.yw2-map-railway,
.yw2-map-section,
.yw2-map-figure,
.yw2-map-parent-row {
  box-sizing: border-box;
}
.yw2-map-intro {
  margin: 12px 0 16px;
  padding: 14px 16px;
  border: 1px solid #cfe1dc;
  border-left: 5px solid #168578;
  border-radius: 12px;
  background: #f6fbf9;
  color: #263f46;
  font-size: 14px;
  line-height: 1.75;
}
.yw2-map-intro strong { color: #0b5e55; }
.yw2-map-filter {
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid #c7d8d3;
  border-radius: 12px;
  background: #fff;
}
.yw2-map-filter[hidden] { display: none !important; }
.yw2-map-filter label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
  color: #173d48;
}
.yw2-map-filter-row { display: flex; gap: 8px; align-items: center; }
.yw2-map-filter input {
  flex: 1 1 auto;
  min-width: 0;
  box-sizing: border-box;
  height: 42px;
  padding: 8px 11px;
  border: 1px solid #9dbbb3;
  border-radius: 8px;
  background: #fff;
  font-size: 16px;
}
.yw2-map-filter button {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid #9dbbb3;
  border-radius: 8px;
  background: #eef7f4;
  color: #145e54;
  font-weight: 700;
  cursor: pointer;
}
.yw2-map-filter-count { margin: 7px 0 0; color: #4c656d; font-size: 12px; }
.yw2-map-railway {
  margin: 0 0 18px;
  border: 1px solid #d4dedb;
  border-radius: 10px;
  background: #fff;
}
.yw2-map-railway > summary {
  cursor: pointer;
  list-style: none;
  padding: 11px 14px;
  font-weight: 700;
  color: #174956;
}
.yw2-map-railway > summary::-webkit-details-marker { display: none; }
.yw2-map-railway > summary::before { content: "\25B6"; display: inline-block; margin-right: 7px; font-size: 10px; }
.yw2-map-railway[open] > summary::before { transform: rotate(90deg); }
.yw2-map-railway-body { padding: 0 10px 12px; overflow-x: auto; text-align: center; }
.yw2-map-section { margin: 0 0 22px; }
.yw2-map-section-head {
  margin: 0 0 12px;
  padding: 9px 12px;
  border-radius: 10px;
  background: #214f5c;
  color: #fff;
  font-size: 20px;
  line-height: 1.4;
}
.yw2-map-section--past .yw2-map-section-head { background: #496844; }
.yw2-map-section--special .yw2-map-section-head { background: #745045; }
.yw2-map-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}
.yw2-map-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #cfdcda;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(27,54,61,.07);
}
.yw2-map-card[hidden] { display: none !important; }
.yw2-map-card-main {
  display: flex;
  gap: 12px;
  align-items: stretch;
  padding: 12px;
}
.yw2-map-card-thumb {
  flex: 0 0 128px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e1e9e7;
  border-radius: 9px;
  background: #f9fbfa;
  overflow: hidden;
}
.yw2-map-card-thumb img {
  display: block;
  width: 100%;
  height: 104px;
  object-fit: contain;
  background: #fff;
}
.yw2-map-card-info { min-width: 0; flex: 1 1 auto; }
.yw2-map-card-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
.yw2-map-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #eaf5f2;
  color: #1b6259;
  font-size: 11px;
  font-weight: 700;
}
.yw2-map-badge--past { background: #edf3e9; color: #4b6941; }
.yw2-map-badge--special { background: #f7ece8; color: #7b4d40; }
.yw2-map-card-title { margin: 0 0 5px; font-size: 18px; line-height: 1.45; }
.yw2-map-card-title a {
  color: #075d85;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.yw2-map-card-station { margin: 0 0 8px; color: #607278; font-size: 12px; }
.yw2-map-card-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.yw2-map-card-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 8px;
  border-radius: 7px;
  background: #f1f5f4;
  color: #31525c;
  font-size: 12px;
  text-decoration: none;
}
.yw2-map-card-actions .yw2-map-primary {
  background: #0c756b;
  color: #fff;
  font-weight: 700;
}
.yw2-map-card-actions .yw2-map-primary::after { content: "\203A"; margin-left: 5px; font-size: 16px; line-height: 1; }
.yw2-map-spots { border-top: 1px solid #e2e9e7; }
.yw2-map-spots > summary {
  cursor: pointer;
  padding: 9px 12px;
  background: #f8faf9;
  color: #2d5059;
  font-size: 13px;
  font-weight: 700;
}
.yw2-map-spots-list {
  list-style: none;
  margin: 0;
  padding: 8px 10px 11px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 6px;
}
.yw2-map-spots-list li { min-width: 0; }
.yw2-map-spots-list a {
  display: block;
  padding: 7px 8px;
  border: 1px solid #e0e8e6;
  border-radius: 7px;
  background: #fff;
  color: #245263;
  font-size: 12px;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.yw2-map-spot-dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #74858a; }
.yw2-map-spot-dot--shop { background: #2a9966; }
.yw2-map-spot-dot--dungeon { background: #b75650; }
.yw2-map-spot-dot--facility { background: #547fc1; }
.yw2-map-empty { margin: 10px 0 18px; padding: 12px; border: 1px dashed #becdca; border-radius: 10px; color: #617178; }
.yw2-map-era-switch {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid #cfded9;
  border-radius: 10px;
  background: #f7fbf9;
  font-size: 13px;
}
.yw2-map-era-switch-title { font-weight: 700; color: #31545c; }
.yw2-map-era-switch a,
.yw2-map-era-current {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 9px;
  border-radius: 999px;
}
.yw2-map-era-switch a { background: #fff; border: 1px solid #9fbdb6; color: #075d85; }
.yw2-map-era-current { background: #196f65; color: #fff; font-weight: 700; }
.yw2-map-figure {
  margin: 8px auto;
  padding: 10px;
  max-width: 760px;
  border: 1px solid #d1dedb;
  border-radius: 12px;
  background: #fff;
}
.yw2-map-image-link { display: block; text-align: center; }
.yw2-map-image-link img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  margin: 0 auto;
}
.yw2-map-figure figcaption {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  justify-content: center;
  margin-top: 9px;
  color: #607177;
  font-size: 12px;
}
.yw2-map-expand {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 5px 11px;
  border-radius: 8px;
  background: #0c756b;
  color: #fff !important;
  font-weight: 700;
  text-decoration: none !important;
}
.yw2-map-expand::after { content: "\2197"; margin-left: 6px; }
.yw2-map-parent-row { padding: 8px !important; background: #f5faf8 !important; }
.yw2-map-parent-link {
  display: block;
  padding: 9px 11px;
  border: 1px solid #a7c6bd;
  border-radius: 8px;
  background: #fff;
  color: #075d85 !important;
  font-weight: 700;
  text-decoration: underline !important;
  text-underline-offset: 3px;
}
@media (max-width: 620px) {
  .yw2-map-grid { grid-template-columns: minmax(0,1fr); gap: 10px; }
  .yw2-map-card-main { padding: 10px; gap: 10px; }
  .yw2-map-card-thumb { flex-basis: 108px; }
  .yw2-map-card-thumb img { height: 94px; }
  .yw2-map-card-title { font-size: 16px; }
  .yw2-map-spots-list { grid-template-columns: minmax(0,1fr); }
  .yw2-map-filter-row { align-items: stretch; }
  .yw2-map-filter button { padding-left: 10px; padding-right: 10px; }
}
@media (max-width: 340px) {
  .yw2-map-card-thumb { flex-basis: 88px; }
  .yw2-map-card-thumb img { height: 82px; }
  .yw2-map-card-actions a { width: 100%; box-sizing: border-box; }
}

/* Stage 9A5.40 mugenjigoku desktop side-icon/overflow fix V2
   The small illustrated icon is the desktop side-menu map icon, not part of
   mugenjigoku.webp. Hide only that pseudo icon on this one page and force
   the very tall region map to stay inside its own figure box. */
body[data-yw2-town="mugenjigoku"] #side h3.yw2-icon-map::before {
  content: none !important;
  display: none !important;
}

body[data-yw2-town="mugenjigoku"] .yw2-map-figure {
  box-sizing: border-box !important;
  width: auto !important;
  max-width: calc(100% - 12px) !important;
  overflow: hidden !important;
}

body[data-yw2-town="mugenjigoku"] .yw2-map-image-link {
  display: block !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
}

body[data-yw2-town="mugenjigoku"] .yw2-map-image-link img {
  display: block !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  margin-left: auto !important;
  margin-right: auto !important;
  object-fit: contain;
}
