@media (pointer:coarse){
  #map-embed .maplibregl-canvas-container.maplibregl-interactive,
  #map-embed .maplibregl-canvas-container .maplibregl-canvas{touch-action:pan-y}
}
/* 루타비 지도 조작부 시안: 공통 선 아이콘 + 글자 버튼 (이 iframe 범위 한정) */
#map-embed .ms-toolbar{
  --rt-ink:#1f2933;--rt-muted:#4f5866;--rt-line:#d6d0c5;--rt-accent:#a3243b;--rt-accent-bg:#fbf1f1;--rt-hover:#f4f0e9;
  --i-all:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 4l4-1.5 5 1.5 4-1.5v13l-3 1.1'/%3E%3Cpath d='M3 8l4-1.5 5 1.5 4-1.5V20l-4 1.5L7 20l-4 1.5Z'/%3E%3Cpath d='M7 6.5V20M12 8v13.5'/%3E%3C/svg%3E");
  --i-temple:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2v3M9 8.5 12 5l3 3.5M5 13l7-6 7 6M3 15 5 13M21 15l-2-2M6 13v8M18 13v8M3 21h18M10 21v-3.5a2 2 0 0 1 4 0V21'/%3E%3C/svg%3E");
  --i-view:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21h18M5 21v-8h4M9 21V9h7v12M16 21v-6h3v6M8 9h9M12.5 9V6M10.5 6h4M12 12.5h1M12 16h1'/%3E%3C/svg%3E");
  --i-lantern:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2.5v2M9 4.5h6M8 4.5C6 7 6 13 8 15.5h8c2-2.5 2-8.5 0-11Z'/%3E%3Cpath d='M12 4.5v11M10 15.5v2h4v-2M12 17.5V21'/%3E%3C/svg%3E");
  --i-search:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.5 11a6.5 6.5 0 1 1-13 0 6.5 6.5 0 0 1 13 0ZM16 16l4.5 4.5'/%3E%3C/svg%3E");
  --i-fit:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 9V5a1 1 0 0 1 1-1h4M15 4h4a1 1 0 0 1 1 1v4M20 15v4a1 1 0 0 1-1 1h-4M9 20H5a1 1 0 0 1-1-1v-4'/%3E%3Cpath d='M12 15.5s3-2.8 3-5.2a3 3 0 0 0-6 0c0 2.4 3 5.2 3 5.2Z'/%3E%3C/svg%3E");
  display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center!important;justify-content:flex-start!important;
  gap:12px!important;padding:12px 16px!important;min-height:0!important;height:auto!important;max-width:100%!important;box-sizing:border-box!important;
  grid-template-columns:none!important;
}
#map-embed .ms-toolbar *,#map-embed .ms-toolbar *::before,#map-embed .ms-toolbar *::after{box-sizing:border-box}

/* 검색 */
#map-embed .ms-toolbar .ms-search{position:relative!important;flex:0 1 280px!important;min-width:180px!important;width:auto!important;max-width:none!important;margin:0!important;padding:0!important;border:0!important;background:none!important;display:block!important}
#map-embed .ms-toolbar .ms-search>span[aria-hidden="true"]{position:absolute!important;left:12px!important;top:50%!important;width:18px!important;height:18px!important;margin:-9px 0 0!important;font-size:0!important;line-height:0!important;color:var(--rt-muted)!important;background:currentColor!important;-webkit-mask:var(--i-search) center/18px 18px no-repeat;mask:var(--i-search) center/18px 18px no-repeat;pointer-events:none;z-index:1}
#map-embed .ms-toolbar .ms-search input{display:block!important;width:100%!important;height:40px!important;margin:0!important;padding:0 12px 0 38px!important;border:1px solid var(--rt-line)!important;border-radius:8px!important;background:#fff!important;color:var(--rt-ink)!important;font:inherit;font-size:14px!important;line-height:1.2!important;box-shadow:none!important}
#map-embed .ms-toolbar .ms-search input::placeholder{color:#7b8390;opacity:1}
#map-embed .ms-toolbar .ms-search input:focus{outline:none!important}
#map-embed .ms-toolbar .ms-search input:focus-visible{outline:2px solid var(--rt-ink)!important;outline-offset:1px!important;border-color:var(--rt-ink)!important}

/* 분류: 글자 버튼 + 20px 선 아이콘 */
#map-embed .ms-toolbar .ms-categories{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;align-items:center!important;gap:2px!important;flex:0 1 auto!important;min-width:0!important;width:auto!important;
  margin:-4px!important;padding:4px!important;overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:none;grid-template-columns:none!important;border:0!important;background:none!important}
#map-embed .ms-toolbar .ms-categories::-webkit-scrollbar{display:none}
#map-embed .ms-toolbar .ms-categories>button{position:relative!important;display:inline-flex!important;flex-direction:row!important;align-items:center!important;justify-content:center!important;gap:6px!important;flex:none!important;
  width:auto!important;min-width:0!important;height:40px!important;min-height:40px!important;margin:0!important;padding:0 12px!important;border:0!important;border-radius:8px!important;
  background:transparent!important;color:var(--rt-muted)!important;font:inherit;font-size:14px!important;font-weight:500!important;line-height:1!important;letter-spacing:0!important;white-space:nowrap!important;cursor:pointer;box-shadow:none!important;transition:background-color .15s,color .15s}
#map-embed .ms-toolbar .ms-categories>button .ms-category-art{display:none!important}
#map-embed .ms-toolbar .ms-categories>button .ms-category-icon{display:block!important;flex:none!important;width:20px!important;height:20px!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;
  background:currentColor!important;-webkit-mask:var(--rt-i) center/20px 20px no-repeat;mask:var(--rt-i) center/20px 20px no-repeat}
#map-embed .ms-toolbar .ms-categories>button .ms-category-label{display:inline!important;margin:0!important;padding:0!important;font:inherit!important;color:inherit!important;white-space:nowrap!important;text-align:left!important}
#map-embed .ms-toolbar button[data-ms-category="all"]{--rt-i:var(--i-all)}
#map-embed .ms-toolbar button[data-ms-category="attractions"]{--rt-i:var(--i-temple)}
#map-embed .ms-toolbar button[data-ms-category="rooftops"]{--rt-i:var(--i-view)}
#map-embed .ms-toolbar button[data-ms-category="festivals"]{--rt-i:var(--i-lantern)}
/* 선택: 색 + 굵기 + 정류장 점 */
#map-embed .ms-toolbar .ms-categories>button::before{content:none!important}
#map-embed .ms-toolbar .ms-categories>button::after{content:""!important;position:absolute!important;left:50%!important;right:auto!important;top:auto!important;bottom:2px!important;width:7px!important;height:7px!important;margin:0 0 0 -3.5px!important;
  border:2px solid currentColor!important;border-radius:50%!important;background:#fff!important;opacity:0;transform:scale(.4);transition:opacity .15s,transform .15s}
#map-embed .ms-toolbar .ms-categories>button[aria-pressed="true"]{color:var(--rt-accent)!important;font-weight:700!important;background:var(--rt-accent-bg)!important}
#map-embed .ms-toolbar .ms-categories>button[aria-pressed="true"]::after{opacity:1;transform:none}
@media (hover:hover){#map-embed .ms-toolbar .ms-categories>button:not([aria-pressed="true"]):hover{background:var(--rt-hover)!important;color:var(--rt-ink)!important}}

/* 전체 위치 */
#map-embed .ms-toolbar .ms-reset{display:inline-flex!important;align-items:center!important;gap:6px!important;flex:none!important;margin:0 0 0 auto!important;width:auto!important;height:40px!important;min-height:40px!important;padding:0 12px 0 10px!important;
  border:1px solid var(--rt-line)!important;border-radius:8px!important;background:#fff!important;color:var(--rt-ink)!important;font:inherit;font-size:14px!important;font-weight:500!important;line-height:1!important;white-space:nowrap!important;cursor:pointer;box-shadow:none!important}
#map-embed .ms-toolbar .ms-reset::before{content:""!important;display:block!important;flex:none;width:18px;height:18px;background:currentColor;-webkit-mask:var(--i-fit) center/18px 18px no-repeat;mask:var(--i-fit) center/18px 18px no-repeat}
@media (hover:hover){#map-embed .ms-toolbar .ms-reset:hover{background:var(--rt-hover)!important}}

/* 키보드 포커스 */
#map-embed .ms-toolbar button:focus{outline:none!important}
#map-embed .ms-toolbar button:focus-visible{outline:2px solid var(--rt-ink)!important;outline-offset:2px!important}

/* 모바일: 1줄 검색+전체 위치, 2줄 가로 스크롤 분류 */
@media (max-width:760px){
  #map-embed .ms-toolbar{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;grid-template-rows:auto auto!important;gap:8px!important;padding:12px!important}
  #map-embed .ms-toolbar .ms-search{grid-column:1!important;grid-row:1!important;min-width:0!important;flex:none!important}
  #map-embed .ms-toolbar .ms-search input{height:44px!important;font-size:16px!important}
  #map-embed .ms-toolbar .ms-reset{grid-column:2!important;grid-row:1!important;height:44px!important;min-height:44px!important;margin:0!important;padding:0 12px 0 10px!important}
  #map-embed .ms-toolbar .ms-categories{grid-column:1/-1!important;grid-row:2!important;min-width:0!important;margin:0 0 -4px!important;padding:3px 3px 4px!important;justify-content:flex-start!important;
    scroll-snap-type:none!important;scroll-padding-inline:0;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain}
  #map-embed .ms-toolbar .ms-categories>button{height:44px!important;min-height:44px!important;scroll-snap-align:none!important}
}
@media (max-width:340px){
  #map-embed .ms-toolbar .ms-reset{padding:0 10px 0 8px!important;font-size:13px!important;gap:4px!important}
}
@media (prefers-reduced-motion:reduce){#map-embed .ms-toolbar *{transition:none!important}}

/* ===== 오버라이드: 글자만 쓰는 버튼형 조작부 ===== */
#map-embed .ms-toolbar{--rt-font:"Pretendard Variable",Pretendard,-apple-system,"system-ui","Apple SD Gothic Neo","Noto Sans KR","Malgun Gothic",sans-serif;font-family:var(--rt-font)!important;flex-wrap:wrap!important;row-gap:10px!important}
#map-embed .ms-toolbar,#map-embed .ms-toolbar input,#map-embed .ms-toolbar button,#map-embed .ms-toolbar span{font-family:var(--rt-font)!important}
/* 아이콘·점 제거 */
#map-embed .ms-toolbar .ms-categories>button .ms-category-icon,
#map-embed .ms-toolbar .ms-categories>button .ms-category-art{display:none!important}
#map-embed .ms-toolbar .ms-categories>button::after,#map-embed .ms-toolbar .ms-reset::before{content:none!important;display:none!important}
/* 분류: 통일된 테두리 버튼, 선택은 채움 */
#map-embed .ms-toolbar .ms-categories{flex-wrap:wrap!important;overflow:visible!important;gap:6px!important;margin:0!important;padding:0!important}
#map-embed .ms-toolbar .ms-categories>button{gap:0!important;padding:0 14px!important;border:1px solid var(--rt-line)!important;border-radius:999px!important;background:#fff!important;color:var(--rt-ink)!important;font-size:14px!important;font-weight:500!important;line-height:1.25!important;white-space:normal!important;text-align:center!important;word-break:keep-all!important}
#map-embed .ms-toolbar .ms-categories>button .ms-category-label{height:auto!important;min-height:0!important;line-height:1.25!important;white-space:normal!important;text-align:center!important;word-break:keep-all!important}
#map-embed .ms-toolbar .ms-categories>button[aria-pressed="true"]{background:var(--ms-accent,#bd2444)!important;border-color:var(--ms-accent,#bd2444)!important;color:#fff!important;font-weight:700!important}
@media (hover:hover){#map-embed .ms-toolbar .ms-categories>button:not([aria-pressed="true"]):hover{background:var(--rt-hover)!important;border-color:#bfb7aa!important}}
/* 검색: 돋보기 표시는 유지(입력칸 역할), 전체 위치: 글자 버튼 */
#map-embed .ms-toolbar .ms-reset{gap:0!important;padding:0 14px!important;border-radius:8px!important;font-weight:600!important;border-color:#bfb7aa!important}
@media (max-width:760px){
  #map-embed .ms-toolbar .ms-categories{display:grid!important;grid-template-columns:auto auto minmax(0,1.4fr) auto!important;gap:6px!important;margin:0!important;padding:0!important}
  #map-embed .ms-toolbar .ms-categories>button{min-width:0!important;width:100%!important;height:auto!important;min-height:44px!important;padding:4px 10px!important}
  #map-embed .ms-toolbar .ms-reset{padding:0 12px!important}
}
@media (max-width:360px){
  #map-embed .ms-toolbar .ms-categories{display:flex!important;flex-wrap:wrap!important}
  #map-embed .ms-toolbar .ms-categories>button{width:auto!important;flex:0 1 auto!important;max-width:100%!important}
  #map-embed .ms-toolbar .ms-reset{padding:0 10px!important;font-size:14px!important}
}

/* ===== 상세 페이지 공통 확정 지도 정규화 (왓포·루프탑·축제·국립공원·사원 동일 기준) ===== */
#map-embed .ms-map .maplibregl-ctrl-top-right .maplibregl-ctrl-group button{
  width:29px!important;height:29px!important;min-width:29px!important;min-height:29px!important;
  padding:0!important;border-radius:0!important;
}
#map-embed .ms-map-stage>.map-credit-line{
  margin:0!important;padding:6px 10px!important;border:0!important;border-radius:0!important;
  background:#fff!important;color:#55616d!important;font-size:10px!important;line-height:1.6!important;min-height:28px!important;
}
#map-embed .ms-map-stage>.map-credit-line .maplibregl-ctrl-attrib{
  margin:0!important;padding:0!important;border:0!important;border-radius:0!important;
  background:transparent!important;box-shadow:none!important;
}
#map-embed .ms-map-stage>.map-credit-line a{
  color:var(--accent-ink,var(--rutabi-country-accent-ink,#853d25))!important;font-weight:400!important;
}
#map-embed .rutabi-place-map-frame:not([data-destination-map="beach"])>.rutabi-place-map-actions{
  display:flex!important;justify-content:flex-end!important;margin:12px 0 0!important;
}
#map-embed .rutabi-place-map-location{
  display:inline-flex!important;align-items:center!important;min-height:44px!important;padding:8px 14px!important;
  border:1px solid var(--line,#e6e0d6)!important;border-radius:7px!important;background:var(--surface,#fff)!important;
  color:var(--accent-ink,var(--rutabi-country-accent-ink,#853d25))!important;
  font:650 14px/1.4 "Pretendard Variable",Pretendard,-apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo","Noto Sans KR",sans-serif!important;
  text-decoration:none!important;cursor:pointer;
}
#map-embed .rutabi-place-map-location:hover{
  background:var(--accent-soft,var(--rutabi-country-accent-soft,#f8ede5))!important;
  border-color:var(--accent,var(--rutabi-country-accent,#a85835))!important;
}
#map-embed .ms-city-map-note{
  margin:12px 0 0!important;color:#64717a!important;font-size:12px!important;line-height:1.8!important;
}
