/* 紹介してきた大分マップ（map.html）だけで使う形 */

.page-map main { padding-bottom: 40px; }

/* ---------- はじめの説明 ---------- */
.map-intro { padding-top: 36px; }
.crumb { font-size: 13px; color: var(--muted); }
.crumb a { color: var(--ink); font-weight: 700; }
.crumb span { margin-inline: 6px; }
.map-intro h1 {
  margin-top: 10px;
  font-family: var(--display); font-weight: 400;
  font-size: clamp(30px, 5vw, 54px); line-height: 1.25; letter-spacing: 0.02em;
}
.map-lede { margin-top: 16px; max-width: 38em; font-size: clamp(15px, 1.6vw, 17px); }
.map-stats { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; list-style: none; }
.map-stats li {
  display: flex; align-items: baseline; gap: 6px;
  padding: 8px 18px 8px 16px;
  border: 2px solid var(--ink); border-radius: 999px;
  font-weight: 700;
}
.map-stats b { font-family: var(--display); font-weight: 400; font-size: 26px; line-height: 1.2; }
.stat-sora { background: var(--sora); }
.stat-kiiro { background: var(--kiiro); }
.stat-momo { background: var(--momo); }
.map-asof { margin-top: 14px; font-size: 13px; color: var(--muted); max-width: 46em; }
.map-intro .memo { margin-top: 24px; }

/* ---------- 地図と一覧 ---------- */
.map-app {
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: 32px; align-items: start;
  margin-top: 36px;
}
.map-pane { position: sticky; top: calc(var(--head-h) + 16px); }
.map-frame {
  position: relative;
  border: 2px solid var(--ink); border-radius: 22px;
  background: var(--sora-pale);
  box-shadow: 8px 8px 0 var(--kiiro);
  overflow: hidden;
}
.oita-map { display: block; width: 100%; height: auto; max-height: calc(100svh - var(--head-h) - 150px); touch-action: manipulation; }
.m-city { stroke: var(--ink); stroke-linejoin: round; cursor: pointer; transition: opacity 0.2s, filter 0.2s; }
.m-city.c-sora { fill: var(--sora); }
.m-city.c-kiiro { fill: var(--kiiro); }
.m-city.c-momo { fill: var(--momo); }
.m-city.c-mint { fill: var(--mint); }
.m-city.c-daidai { fill: var(--daidai); }
.m-city.c-fuji { fill: var(--fuji); }
.m-city:hover { filter: brightness(1.06); }
.oita-map.is-zoomed .m-city:not(.is-on) { opacity: 0.38; }
.m-label {
  font-family: var(--body); font-weight: 900; fill: var(--ink);
  paint-order: stroke; stroke: #fff; stroke-linejoin: round;
  pointer-events: none; text-anchor: middle; dominant-baseline: middle;
}
.oita-map.is-zoomed .m-label { display: none; }
.m-pin { stroke: #fff; pointer-events: none; }
.m-pin.p-ink { fill: var(--ink); }
.m-pin.p-kiiro { fill: var(--kiiro); stroke: var(--ink); }
.m-pin.p-momo { fill: var(--momo); stroke: var(--ink); }
.oita-map.is-zoomed .m-pin.in-city { pointer-events: all; cursor: pointer; }
.oita-map.is-zoomed .m-pin:not(.in-city) { opacity: 0.25; }
.m-pin.is-on { fill: var(--ink); stroke: var(--kiiro); }
.m-pin:hover { filter: brightness(1.15); }

.map-reset {
  position: absolute; top: 12px; left: 12px;
  min-height: 40px; padding: 6px 16px;
  border: 2px solid var(--ink); border-radius: 999px; background: #fff;
  font: inherit; font-size: 14px; font-weight: 700; color: var(--ink); cursor: pointer;
}
.map-reset:hover { background: var(--kiiro); }
.map-hint {
  position: absolute; right: 12px; bottom: 10px;
  padding: 2px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.92); border: 1.5px solid var(--ink);
  font-size: 13px; font-weight: 700; pointer-events: none;
}
.map-legend { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 16px; list-style: none; font-size: 13px; font-weight: 700; }
.map-legend li { display: flex; align-items: center; gap: 6px; }
.dot { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--ink); }
.dot-ink { background: var(--ink); }
.dot-kiiro { background: var(--kiiro); }
.dot-momo { background: var(--momo); }
.map-note { margin-top: 6px; font-size: 13px; color: var(--muted); }

/* ---------- しぼりこみ ---------- */
.map-controls {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 12px 14px;
  padding: 18px; border: 2px solid var(--ink); border-radius: 18px; background: #fff;
}
.ctl { display: grid; gap: 4px; font-size: 13px; font-weight: 700; }
.ctl select, .ctl input {
  width: 100%; min-height: 46px; padding: 8px 12px;
  border: 1.5px solid var(--ink); border-radius: 12px; background: #fff;
  font: inherit; font-size: 16px; font-weight: 500; color: var(--ink);
}
.ctl-check { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 14px; font-weight: 700; cursor: pointer; }
.ctl-check input { width: 22px; height: 22px; accent-color: var(--ink); }

/* ---------- 選んだ場所 ---------- */
.spot-card {
  margin-top: 16px; padding: 18px 20px;
  border: 2px solid var(--ink); border-radius: 18px;
  background: var(--kiiro);
}
.spot-card:focus { outline: none; }
.spot-card:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.spot-city { font-size: 13px; font-weight: 700; }
.spot-name { margin-top: 2px; font-size: clamp(20px, 2.2vw, 24px); font-weight: 900; line-height: 1.45; }
.spot-addr { margin-top: 4px; font-size: 14px; }
.spot-addr:empty { display: none; }
.spot-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-top: 12px; }
.spot-links a { font-weight: 700; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.spot-links a::after { content: "↗"; margin-left: 4px; text-decoration: none; display: inline-block; }
.spot-clear {
  min-height: 40px; padding: 4px 14px;
  border: 1.5px solid var(--ink); border-radius: 999px; background: #fff;
  font: inherit; font-size: 13px; font-weight: 700; color: var(--ink); cursor: pointer;
}

/* ---------- 市町村の場所の一覧 ---------- */
.city-spots { margin-top: 16px; }
.city-spots-title { font-size: 14px; font-weight: 900; }
.city-spots ul {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; list-style: none;
  max-height: 168px; overflow: auto; padding: 2px 2px 6px;
  overscroll-behavior: contain;
}
.city-spots button {
  min-height: 36px; padding: 4px 12px;
  border: 1.5px solid var(--ink); border-radius: 999px; background: #fff;
  font: inherit; font-size: 13px; font-weight: 700; color: var(--ink); cursor: pointer;
  text-align: left; line-height: 1.4;
}
.city-spots button small { margin-left: 4px; font-weight: 500; color: var(--muted); }
.city-spots button.is-pr { background: var(--kiiro); }
.city-spots button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.city-spots button[aria-pressed="true"] small { color: #fff; }

/* ---------- 投稿の一覧 ---------- */
.result-count { margin-top: 22px; font-weight: 900; font-size: 15px; }
.video-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px 14px; margin-top: 12px; list-style: none;
}
.vcard a { display: block; text-decoration: none; color: var(--ink); }
.vcover {
  position: relative; display: block; aspect-ratio: 9 / 16; overflow: hidden;
  border: 2px solid var(--ink); border-radius: 14px; background: var(--sora-pale);
}
.vpic { position: absolute; inset: 0; background-repeat: no-repeat; }
.vcard:nth-child(5n+1) .vcover { box-shadow: 4px 4px 0 var(--sora); }
.vcard:nth-child(5n+2) .vcover { box-shadow: 4px 4px 0 var(--kiiro); }
.vcard:nth-child(5n+3) .vcover { box-shadow: 4px 4px 0 var(--momo); }
.vcard:nth-child(5n+4) .vcover { box-shadow: 4px 4px 0 var(--mint); }
.vcard:nth-child(5n+5) .vcover { box-shadow: 4px 4px 0 var(--daidai); }
.vcover-text { display: grid; place-items: center; padding: 14px; text-align: center; }
.vcover-text span { font-weight: 900; font-size: 14px; line-height: 1.6; }
.vcover-text.t-sora { background: var(--sora); }
.vcover-text.t-kiiro { background: var(--kiiro); }
.vcover-text.t-momo { background: var(--momo); }
.vcover-text.t-mint { background: var(--mint); }
.vbadge {
  position: absolute; left: 8px; top: 8px;
  padding: 0 8px; border-radius: 999px;
  background: var(--ink); color: #fff; font-size: 11px; font-weight: 700; line-height: 1.8;
}
.vcard a:hover .vcover { transform: translateY(-2px); }
.vcard a:hover .vtitle { text-decoration: underline; text-underline-offset: 4px; }
.vtitle { display: block; margin-top: 10px; font-size: 14px; font-weight: 700; line-height: 1.55; }
.vmeta { display: flex; flex-wrap: wrap; gap: 2px 10px; margin-top: 4px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.empty-note { grid-column: 1 / -1; padding: 24px; border: 2px dashed var(--line); border-radius: 14px; }
.empty-note button { margin-top: 10px; }
.more-wrap { margin-top: 28px; text-align: center; }

/* ---------- 相談 ---------- */
.map-cta {
  margin-top: 80px; padding: clamp(28px, 4vw, 44px);
  border: 2px solid var(--ink); border-radius: 22px;
  background: var(--mint-pale);
}
.map-cta h2 { font-family: var(--display); font-weight: 400; font-size: clamp(24px, 3vw, 34px); line-height: 1.35; }
.map-cta p { margin-top: 12px; }
.map-cta-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px !important; }
.page-map .site-foot { margin-top: 64px; }

@media (prefers-reduced-motion: no-preference) {
  .vcover { transition: transform 0.15s ease; }
}

@media (max-width: 1100px) {
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .map-app { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .map-pane { position: static; }
  .oita-map { max-height: none; }
  .video-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .map-controls { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .map-hint { font-size: 12px; }
  .map-stats li { padding: 6px 14px; }
  .map-stats b { font-size: 22px; }
}
