/* =========================================================
   操作できる地図（rich-map.js）
   [data-richmap] 自身が Leaflet のコンテナ。
   ========================================================= */

.rm-map{
  height:min(62vh,520px);
  min-height:320px;
  border:1px solid var(--line,#cfc7b8);
  background:#f3f0e8;
  font-family:var(--sans,"Helvetica Neue","Hiragino Sans",sans-serif);
  overflow:hidden;
}

.rm-status{
  display:flex;
  align-items:center;
  justify-content:center;
  height:100%;
  margin:0;
  padding:1.5rem;
  font-family:var(--sans,"Helvetica Neue","Hiragino Sans",sans-serif);
  font-size:12.5px;
  line-height:1.9;
  letter-spacing:.02em;
  color:var(--ink-soft,#5a5b52);
  text-align:center;
}
.rm-status-failed{
  flex-direction:column;
  gap:.7rem;
}
.rm-static-link{
  display:inline-block;
  padding:.35rem .8rem;
  border:1px solid var(--gold-ink,#86653c);
  color:var(--gold-ink,#86653c);
  font-size:11px;
  letter-spacing:.08em;
  text-decoration:none;
}
.rm-static-link:hover{background:#fffdf6}

.rm-note{
  margin:.6rem 0 0;
  font-family:var(--sans,"Helvetica Neue","Hiragino Sans",sans-serif);
  font-size:11px;
  line-height:1.8;
  letter-spacing:.02em;
  color:var(--ink-soft,#5a5b52);
}
.rm-note a{
  color:inherit;
  text-decoration:underline;
  text-underline-offset:2px;
}

/* ---------- custom markers ---------- */

.rm-icon{
  border:0;
  background:none;
}

.rm-dot{
  display:block;
  width:12px;
  height:12px;
  box-sizing:border-box;
  border:2px solid #fffdf6;
  border-radius:50%;
  box-shadow:0 1px 4px rgba(21,22,15,.45);
}
.rm-start{background:#1f5c3e}
.rm-end{background:#15160f}
.rm-summit{background:#bd9a68}

.rm-km{
  display:block;
  width:7px;
  height:7px;
  box-sizing:border-box;
  border:1px solid #8b877b;
  border-radius:50%;
  background:#fffdf6;
}

.rm-poi{
  display:flex;
  align-items:center;
  justify-content:center;
  width:24px;
  height:24px;
  box-sizing:border-box;
  border:2px solid #fffdf6;
  border-radius:50%;
  box-shadow:0 1px 4px rgba(21,22,15,.4);
  color:#fffdf6;
  overflow:hidden;
}
.rm-poi svg{
  display:block;
  width:15px;
  height:15px;
  fill:currentColor;
}
.rm-poi text{fill:currentColor}

.rm-legend{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:.4rem 1rem;
  margin:.55rem 0 0;
  font-family:var(--sans,"Helvetica Neue","Hiragino Sans",sans-serif);
  font-size:10.5px;
  line-height:1.6;
  letter-spacing:.02em;
  color:var(--ink-soft,#5a5b52);
}
.rm-legend-item{display:inline-flex;align-items:center;gap:.3rem}
.rm-legend .rm-poi{
  width:18px;
  height:18px;
  border-width:1.5px;
  box-shadow:none;
}
.rm-legend .rm-poi svg{width:11px;height:11px}
.rm-legend-label{font-style:normal}
.rm-peak{background:#6b4a2f}
.rm-pass{background:#7a6a4f}
.rm-hut{background:#7b3f2a}
.rm-shelter{background:#8a5a3a}
.rm-water{background:#2d6f8e}
.rm-toilet{background:#5c6470}
.rm-bus{background:#1f5c3e}
.rm-viewpoint{background:#bd9a68}
.rm-parking{background:#5c6470}
.rm-other{background:#5c6470}

/* ---------- Leaflet chrome ---------- */

.leaflet-container{
  background:#f3f0e8;
  font-family:var(--sans,"Helvetica Neue","Hiragino Sans",sans-serif);
  font-size:12px;
}

.leaflet-control-attribution,
.leaflet-control-scale-line,
.leaflet-control-layers{
  font-family:var(--sans,"Helvetica Neue","Hiragino Sans",sans-serif);
  font-size:10.5px;
}
.leaflet-control-attribution{
  line-height:1.5;
  background:rgba(241,237,228,.9);
  color:var(--ink-soft,#5a5b52);
}
.leaflet-control-attribution a{
  color:var(--gold-ink,#86653c);
  text-decoration:underline;
  text-underline-offset:2px;
}
.leaflet-control-scale-line{
  background:rgba(241,237,228,.9);
  border-color:var(--ink-soft,#5a5b52);
  color:var(--ink,#15160f);
}
.leaflet-bar a{
  color:var(--ink,#15160f);
  background:#f1ede4;
}
.leaflet-bar a:hover{background:#fffdf6}
.leaflet-control-layers{
  background:rgba(241,237,228,.94);
  color:var(--ink,#15160f);
}
.leaflet-control-layers-toggle{
  background-color:rgba(241,237,228,.94);
}

/* ---------- popups ---------- */

.rm-popup .leaflet-popup-content-wrapper{
  border-radius:2px;
  background:#fffdf6;
  color:var(--ink,#15160f);
  box-shadow:0 2px 14px rgba(21,22,15,.24);
}
.rm-popup .leaflet-popup-content{
  margin:.55rem .75rem;
  line-height:1.7;
}
.rm-popup .leaflet-popup-tip{background:#fffdf6}

.rm-pop{
  margin:0;
  font-family:var(--sans,"Helvetica Neue","Hiragino Sans",sans-serif);
}
.rm-pop p{
  margin:0;
  font-size:12px;
  line-height:1.7;
  letter-spacing:.02em;
}
.rm-pop p + p{margin-top:.15rem}
.rm-pop-name{
  font-family:var(--serif,"Hiragino Mincho ProN","Yu Mincho",serif);
  font-size:13px;
  font-weight:600;
  line-height:1.55;
}

/* ---------- small screens ---------- */

@media (max-width:640px){
  .rm-map{height:min(56vh,440px)}
}
