/* =========================================================
 * travelmap 스킨 스타일 (자체 변수 · 테마 비의존 · 모바일 우선)
 * 모든 클래스 tm- 접두사로 테마 CSS와 충돌 방지
 * ========================================================= */
.tm-wrap{
  --tm-primary:#2f6df0; --tm-primary-dark:#2356c6;
  --tm-ink:#1f2937; --tm-sub:#6b7280; --tm-line:#e5e7eb; --tm-line2:#eef1f5;
  --tm-bg:#ffffff; --tm-soft:#f7f9fc; --tm-soft2:#eef3fb;
  --tm-radius:14px; --tm-radius-s:9px;
  --tm-badge:#eaf1ff; --tm-badge-ink:#2356c6;
  color:var(--tm-ink); font-size:15px; line-height:1.6;
  -webkit-text-size-adjust:100%;
}
.tm-wrap *{box-sizing:border-box;}
.tm-wrap a{color:inherit; text-decoration:none;}
.tm-wrap h1,.tm-wrap h2,.tm-wrap h3,.tm-wrap h4{margin:0; font-weight:700; line-height:1.35;}
.tm-wrap img{max-width:100%;}

/* ---------- 공통 버튼 ---------- */
.tm-btn{display:inline-flex; align-items:center; gap:6px; justify-content:center;
  padding:9px 14px; border-radius:var(--tm-radius-s); border:1px solid var(--tm-line);
  background:#fff; color:var(--tm-ink); font-size:14px; cursor:pointer; transition:.15s; white-space:nowrap;}
.tm-btn:hover{background:var(--tm-soft);}
.tm-btn.is-primary{background:var(--tm-primary); border-color:var(--tm-primary); color:#fff;}
.tm-btn.is-primary:hover{background:var(--tm-primary-dark);}
.tm-btn.is-danger{color:#d6453d; border-color:#f1c7c4;}
.tm-btn.is-sm{padding:6px 10px; font-size:13px;}

/* ---------- 배지 / 칩 ---------- */
.tm-badge{display:inline-flex; align-items:center; gap:4px; padding:3px 9px; border-radius:999px;
  background:var(--tm-badge); color:var(--tm-badge-ink); font-size:12.5px; font-weight:600;}
.tm-badge.is-heritage{background:#fef3e2; color:#b6711a;}
.tm-chip{display:inline-flex; align-items:center; padding:4px 11px; border-radius:999px;
  background:var(--tm-soft2); color:#3a4a63; font-size:13px; margin:0 6px 6px 0;}

/* =========================================================
 * 목록 (list)
 * ========================================================= */
.tm-toolbar{display:flex; flex-wrap:wrap; gap:10px; align-items:center; justify-content:space-between; margin:0 0 14px;}
.tm-toolbar .tm-total{color:var(--tm-sub); font-size:14px;}
.tm-toolbar .tm-total b{color:var(--tm-ink);}
.tm-toolbar .tm-acts{display:flex; gap:8px; flex-wrap:wrap;}

.tm-filter{background:var(--tm-soft); border:1px solid var(--tm-line); border-radius:var(--tm-radius);
  padding:14px; margin:0 0 16px;}
.tm-filter form{display:block;}
.tm-f-bar{display:flex; gap:10px; align-items:center;}
.tm-filter .tm-f-search{flex:1; display:flex; gap:8px; min-width:0;}
.tm-filter .tm-f-search input{flex:1; min-width:0;}
.tm-f-toggle{flex:0 0 auto; display:inline-flex; align-items:center; gap:8px; padding:9px 15px; border:1px solid var(--tm-line); border-radius:var(--tm-radius-s); background:#fff; color:var(--tm-ink); font-size:14px; font-weight:600; cursor:pointer; font-family:inherit; white-space:nowrap;}
.tm-f-toggle:hover{border-color:var(--tm-primary); color:var(--tm-primary);}
.tm-f-toggle.on{border-color:var(--tm-primary); color:var(--tm-primary); background:#f3f7ff;}
.tm-f-count{display:inline-block; min-width:18px; height:18px; line-height:18px; text-align:center; background:var(--tm-primary); color:#fff; border-radius:9px; font-size:11.5px; padding:0 5px;}
.tm-f-caret{font-size:11px; color:var(--tm-sub); transition:transform .18s;}
.tm-f-toggle.on .tm-f-caret{transform:rotate(180deg); color:var(--tm-primary);}
.tm-f-panel{display:none; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:10px; margin-top:12px; padding-top:12px; border-top:1px dashed var(--tm-line);}
.tm-f-panel.on{display:grid;}
.tm-field label{display:block; font-size:12px; color:var(--tm-sub); margin:0 0 4px;}
.tm-wrap select, .tm-wrap input[type=text], .tm-wrap input[type=tel], .tm-wrap input[type=date], .tm-wrap textarea{
  width:100%; padding:9px 10px; border:1px solid var(--tm-line); border-radius:var(--tm-radius-s);
  background:#fff; font-size:14px; color:var(--tm-ink); font-family:inherit;}
.tm-wrap select:focus, .tm-wrap input:focus, .tm-wrap textarea:focus{outline:none; border-color:var(--tm-primary); box-shadow:0 0 0 3px rgba(47,109,240,.12);}

.tm-cards{display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:16px;}
.tm-card{border:1px solid var(--tm-line); border-radius:var(--tm-radius); overflow:hidden; background:#fff;
  transition:.18s; display:flex; flex-direction:column;}
.tm-card:hover{box-shadow:0 8px 24px rgba(20,40,80,.10); transform:translateY(-2px);}
.tm-card .tm-thumb{position:relative; display:block; aspect-ratio:16/10; background:var(--tm-soft2); overflow:hidden;}
.tm-card .tm-thumb img{width:100%; height:100%; object-fit:cover;}
.tm-card .tm-thumb .tm-noimg{position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:46px; opacity:.55;}
.tm-card .tm-thumb .tm-cat{position:absolute; left:10px; top:10px;}
.tm-card .tm-body{padding:13px 14px 15px; display:flex; flex-direction:column; gap:7px;}
.tm-card .tm-name{font-size:16.5px; font-weight:700;}
.tm-card .tm-loc{color:var(--tm-sub); font-size:13px;}
.tm-card .tm-tags{margin-top:2px;}
.tm-card .tm-meta{display:flex; gap:12px; color:var(--tm-sub); font-size:12.5px; margin-top:auto; padding-top:6px;}

.tm-empty{padding:50px 20px; text-align:center; color:var(--tm-sub); border:1px dashed var(--tm-line); border-radius:var(--tm-radius);}

/* 관리자 도구(내보내기/가져오기) */
.tm-admin{margin:16px 0 0; padding:14px; border:1px dashed #c9d6ea; border-radius:var(--tm-radius); background:#fbfdff;}
.tm-admin h4{font-size:13px; color:var(--tm-sub); margin-bottom:10px; font-weight:600;}
.tm-admin .tm-row{display:flex; flex-wrap:wrap; gap:10px; align-items:center;}
.tm-admin form{display:flex; flex-wrap:wrap; gap:8px; align-items:center;}

/* 페이지네이션 */
.tm-paging{display:flex; gap:6px; justify-content:center; margin:22px 0 6px; flex-wrap:wrap;}
.tm-paging a, .tm-paging span{min-width:36px; height:36px; display:inline-flex; align-items:center; justify-content:center;
  padding:0 10px; border:1px solid var(--tm-line); border-radius:var(--tm-radius-s); font-size:14px; background:#fff;}
.tm-paging .is-cur{background:var(--tm-primary); border-color:var(--tm-primary); color:#fff; font-weight:700;}
.tm-paging a:hover{background:var(--tm-soft);}

/* =========================================================
 * 상세보기 (view)
 * ========================================================= */
.tm-view{border:1px solid var(--tm-line); border-radius:var(--tm-radius); overflow:hidden; background:#fff;}
.tm-view-head{padding:20px 22px; border-bottom:1px solid var(--tm-line2);}
.tm-view-head .tm-badges{display:flex; gap:6px; flex-wrap:wrap; margin-bottom:8px;}
.tm-view-head h1{font-size:24px;}
.tm-view-head .tm-addr{color:var(--tm-sub); margin-top:7px; font-size:14.5px; display:flex; align-items:flex-start; gap:6px;}

.tm-view-grid{display:grid; grid-template-columns:1.35fr 1fr; gap:0;}
.tm-view-grid .tm-col{padding:20px 22px;}
.tm-view-grid .tm-col.tm-side{border-left:1px solid var(--tm-line2); background:#fcfdff;}

.tm-sec{margin:0 0 22px;}
.tm-sec:last-child{margin-bottom:0;}
.tm-sec h3{font-size:15px; color:var(--tm-primary); margin:0 0 12px; padding-bottom:8px; border-bottom:1px solid var(--tm-line2);}

/* 정보 표 */
.tm-info{display:grid; grid-template-columns:auto 1fr; gap:9px 14px; font-size:14.5px;}
.tm-info dt{color:var(--tm-sub); white-space:nowrap;}
.tm-info dd{margin:0; word-break:break-word;}

.tm-map{width:100%; height:300px; border-radius:var(--tm-radius-s); overflow:hidden; border:1px solid var(--tm-line); background:var(--tm-soft2);}
.tm-map-empty{display:flex; align-items:center; justify-content:center; height:300px; color:var(--tm-sub); background:var(--tm-soft); border-radius:var(--tm-radius-s); text-align:center;}

/* 길찾기 버튼 */
.tm-nav{display:flex; gap:8px; flex-wrap:wrap; margin-top:12px;}
.tm-nav .tm-btn{flex:1; min-width:90px;}
.tm-nav .k{border-color:#fbe44d; background:#fee500; color:#3a1d1d;}
.tm-nav .n{border-color:#03c75a; background:#03c75a; color:#fff;}
.tm-nav .g{border-color:#dadce0;}

/* 첨부 / 갤러리 */
.tm-files{list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:8px;}
.tm-files li{display:flex; align-items:center; gap:8px; padding:10px 12px; border:1px solid var(--tm-line); border-radius:var(--tm-radius-s); font-size:14px;}
.tm-files .tm-fsize{color:var(--tm-sub); font-size:12px;}
.tm-gallery{display:grid; grid-template-columns:repeat(auto-fill,minmax(120px,1fr)); gap:8px;}
.tm-gallery a img{width:100%; aspect-ratio:1; object-fit:cover; border-radius:var(--tm-radius-s); border:1px solid var(--tm-line);}
.tm-swiper{width:100%; border-radius:var(--tm-radius-s); overflow:hidden; border:1px solid var(--tm-line);}
.tm-swiper .swiper-slide{aspect-ratio:16/10; background:var(--tm-soft2);}
.tm-swiper .swiper-slide img{width:100%; height:100%; object-fit:cover; display:block;}
.tm-swiper .swiper-button-prev, .tm-swiper .swiper-button-next{color:#fff; transform:scale(.7);}
.tm-swiper .swiper-pagination-bullet-active{background:#fff;}

.tm-content{font-size:15.5px; line-height:1.8; padding-top:6px; overflow-wrap:anywhere; word-break:break-word;}
.tm-addr span, .tm-loc{overflow-wrap:anywhere; min-width:0;}
.tm-content img{height:auto; border-radius:6px;}

.tm-view-foot{display:flex; justify-content:space-between; gap:10px; flex-wrap:wrap; padding:16px 22px; border-top:1px solid var(--tm-line2); background:var(--tm-soft);}
.tm-view-foot .tm-acts{display:flex; gap:8px; flex-wrap:wrap;}
.tm-nextprev{border-top:1px solid var(--tm-line2);}
.tm-nextprev a{display:flex; gap:10px; padding:13px 22px; border-bottom:1px solid var(--tm-line2); font-size:14px;}
.tm-nextprev a:hover{background:var(--tm-soft);}
.tm-nextprev .tm-np{color:var(--tm-sub); white-space:nowrap;}

/* =========================================================
 * 작성 폼 (write)
 * ========================================================= */
.tm-form .tm-group{border:1px solid var(--tm-line); border-radius:var(--tm-radius); padding:18px 18px 6px; margin:0 0 16px; background:#fff;}
.tm-form .tm-group > h3{font-size:15px; margin:0 0 16px; color:var(--tm-ink); display:flex; align-items:center; gap:7px;}
.tm-form .tm-group > h3 .num{display:inline-flex; width:22px; height:22px; border-radius:6px; background:var(--tm-primary); color:#fff; font-size:12.5px; align-items:center; justify-content:center;}
.tm-grid{display:grid; grid-template-columns:1fr 1fr; gap:14px;}
.tm-grid.c3{grid-template-columns:1fr 1fr 1fr;}
.tm-item{margin:0 0 14px;}
.tm-item.full{grid-column:1 / -1;}
.tm-item > label{display:block; font-size:13.5px; font-weight:600; margin:0 0 6px;}
.tm-item .req{color:#e0483f;}
.tm-help{font-size:12px; color:var(--tm-sub); margin-top:5px;}
.tm-addr-row{display:flex; gap:8px;}
.tm-addr-row input{flex:1;}

/* 체크박스 그룹(다중선택) */
.tm-checks{display:flex; flex-wrap:wrap; gap:8px;}
.tm-checks label{display:inline-flex; align-items:center; gap:6px; padding:7px 12px; border:1px solid var(--tm-line);
  border-radius:999px; font-size:13.5px; cursor:pointer; user-select:none; background:#fff;}
.tm-checks input{display:none;}
.tm-checks input:checked + span{font-weight:700;}
.tm-checks label:has(input:checked){border-color:var(--tm-primary); background:var(--tm-soft2); color:var(--tm-primary-dark);}
.tm-radios{display:flex; gap:8px; flex-wrap:wrap;}
.tm-radios label{flex:1; min-width:80px; text-align:center; padding:9px; border:1px solid var(--tm-line); border-radius:var(--tm-radius-s); cursor:pointer;}
.tm-radios input{display:none;}
.tm-radios label:has(input:checked){border-color:var(--tm-primary); background:var(--tm-primary); color:#fff; font-weight:700;}

.tm-form .tm-submit{display:flex; gap:10px; justify-content:center; margin:22px 0 8px;}
.tm-form .tm-submit .tm-btn{min-width:130px; padding:12px 18px;}

/* =========================================================
 * 지도 모드 (map)
 * ========================================================= */
.tm-mapmode .tm-mapmode-head{display:flex; align-items:center; justify-content:space-between; gap:10px; margin:0 0 12px; flex-wrap:wrap;}
.tm-mapmode-acts{display:flex; align-items:center; gap:8px; flex-wrap:wrap;}
.tm-map-fpanel{margin-top:0; margin-bottom:14px;}
.tm-mapmode #tmFullMap{width:100%; height:72vh; min-height:460px; border:1px solid var(--tm-line); border-radius:var(--tm-radius); overflow:hidden;}
/* 지도 정보 팝업 (CustomOverlay) — 고정 너비 + box-sizing 으로 내용이 박스를 벗어나지 않음 */
.tm-pop{position:relative; box-sizing:border-box; width:244px; transform:translateY(-50px); background:#fff; border:1px solid #cfd6e2; border-radius:12px; box-shadow:0 6px 20px rgba(0,0,0,.18); padding:13px 15px 12px; font-size:13px; line-height:1.5; color:#1f2937; text-align:left;}
.tm-pop:after{content:''; position:absolute; left:50%; bottom:-9px; margin-left:-9px; border:9px solid transparent; border-top-color:#fff;}
.tm-pop:before{content:''; position:absolute; left:50%; bottom:-11px; margin-left:-10px; border:10px solid transparent; border-top-color:#cfd6e2;}
.tm-pop-x{position:absolute; top:6px; right:8px; width:22px; height:22px; text-align:center; line-height:20px; font-size:18px; color:#9aa3b2; cursor:pointer; border-radius:50%;}
.tm-pop-x:hover{background:#f0f2f6; color:#5b6472;}
.tm-pop-name{display:block; font-weight:700; font-size:14.5px; line-height:1.35; margin:0 24px 7px 0; word-break:keep-all; overflow-wrap:anywhere;}
.tm-pop-cat{display:inline-block; font-size:11.5px; color:#5b6472; background:#eef1f6; padding:2px 8px; border-radius:10px;}
.tm-pop-acts{display:flex; flex-wrap:wrap; gap:7px; margin-top:11px;}
.tm-pop-link{display:inline-block; padding:6px 11px; border-radius:8px; font-weight:600; font-size:12.5px; text-decoration:none; white-space:nowrap; background:#eef3ff; color:var(--tm-primary);}
.tm-pop-link.nav{background:#e9f8ef; color:#1a9b54;}
.tm-pop-link:hover{filter:brightness(.96);}
/* 한 위치에 여러 유산 — 목록 팝업 */
.tm-pop-list{margin:9px 0 0; padding:0; list-style:none; max-height:208px; overflow-y:auto;}
.tm-pop-list li{padding:7px 2px;}
.tm-pop-list li + li{border-top:1px solid #eef1f5;}
.tm-pop-list li a{color:#2356c6; font-weight:600; text-decoration:none; word-break:keep-all; overflow-wrap:anywhere;}
.tm-pop-list li a:hover{text-decoration:underline;}
.tm-pop-list li small{color:#8a93a3; font-weight:400; margin-left:4px;}
/* 마커 위 명칭 라벨 (지도모드, 확대 시) */
/* yAnchor:1(라벨 하단을 마커 위치에 고정) 후, 핀 높이(약 40px)만큼 위로 올려 핀이 가려지지 않게 함 */
.tm-mk-label{display:inline-block; padding:4px 9px; background:rgba(255,255,255,.95); border:1px solid #d0d7e2; border-radius:7px; font-size:11.5px; font-weight:700; color:#1f2937; white-space:nowrap; box-shadow:0 1px 3px rgba(0,0,0,.2); pointer-events:auto; cursor:pointer; transition:.12s; transform:translateY(-44px);}
.tm-mk-label:hover{background:#fff; border-color:var(--tm-primary); color:var(--tm-primary); box-shadow:0 2px 7px rgba(47,109,240,.3);}
/* 내 위치 점(지도모드) */
.tm-myloc{width:16px; height:16px; background:#2f6df0; border:3px solid #fff; border-radius:50%; box-shadow:0 0 0 5px rgba(47,109,240,.25), 0 1px 5px rgba(0,0,0,.4);}
/* 내 위치 플로팅 버튼 (애플맵 스타일 화살표, 지도 우하단) */
.tm-map-box{position:relative;}
/* 지도 검색창 (좌상단 오버레이) */
.tm-map-search{position:absolute; top:12px; left:12px; z-index:11; width:330px; max-width:calc(100% - 24px);}
.tm-ms-bar{display:flex; align-items:center; gap:6px; background:#fff; border:1px solid #cfd6e2; border-radius:10px; box-shadow:0 2px 10px rgba(0,0,0,.15); padding:0 8px 0 12px; height:46px;}
.tm-ms-ico{font-size:15px; opacity:.7;}
.tm-ms-bar input{flex:1; min-width:0; border:none; outline:none; background:transparent; font-size:15px; color:var(--tm-ink); height:100%; padding:0; font-family:inherit;}
.tm-ms-x{flex:0 0 auto; width:26px; height:26px; border:none; background:#eef1f6; color:#69707c; border-radius:50%; font-size:17px; line-height:1; cursor:pointer;}
.tm-ms-x:hover{background:#e2e6ee;}
.tm-ms-results{display:none; margin-top:6px; background:#fff; border:1px solid #cfd6e2; border-radius:10px; box-shadow:0 6px 20px rgba(0,0,0,.16); max-height:60vh; overflow-y:auto;}
.tm-ms-results.on{display:block;}
.tm-ms-head{padding:9px 14px 4px; font-size:12px; font-weight:700; color:var(--tm-sub);}
.tm-ms-empty{padding:16px 14px; font-size:13px; color:var(--tm-sub); line-height:1.5;}
.tm-ms-item{padding:9px 14px; cursor:pointer; border-top:1px solid #f0f2f6;}
.tm-ms-item:first-child{border-top:none;}
.tm-ms-item:hover{background:#f5f8ff;}
.tm-ms-name{font-size:14.5px; font-weight:700; color:#1f2937; display:flex; justify-content:space-between; align-items:baseline; gap:8px; word-break:keep-all;}
.tm-ms-dist{flex:0 0 auto; font-size:12.5px; font-weight:700; color:var(--tm-primary);}
.tm-ms-addr{margin-top:2px; font-size:12.5px; color:#6b7280; word-break:keep-all;}
@media (max-width: 520px){
  .tm-map-search{width:auto; left:10px; right:64px; top:10px; max-width:none;}
}
.tm-geo-btn{position:absolute; right:14px; bottom:14px; z-index:10; width:46px; height:46px; padding:0; border-radius:50%; background:var(--tm-primary); border:none; box-shadow:0 2px 8px rgba(0,0,0,.3); display:flex; align-items:center; justify-content:center; cursor:pointer; color:#fff; transition:.15s;}
.tm-geo-btn:hover{background:var(--tm-primary-dark);}
.tm-geo-btn:active{transform:scale(.94);}
.tm-geo-btn svg{width:24px; height:24px; fill:currentColor;}
/* 서버 viewport 클러스터 원 (지도모드) */
.tm-cluster{text-align:center; border-radius:50%; background:rgba(47,109,240,.88); color:#fff; font-weight:700; font-size:13px; border:2px solid #fff; box-shadow:0 1px 5px rgba(0,0,0,.35); cursor:pointer;}

/* =========================================================
 * 반응형
 * ========================================================= */
@media (max-width: 860px){
  .tm-view-grid{grid-template-columns:1fr;}
  .tm-view-grid .tm-col.tm-side{border-left:none; border-top:1px solid var(--tm-line2);}
  .tm-f-panel{grid-template-columns:1fr 1fr;}
  .tm-grid, .tm-grid.c3{grid-template-columns:1fr;}
}
@media (max-width: 520px){
  .tm-wrap{font-size:14.5px;}
  .tm-f-bar{flex-wrap:wrap;}
  .tm-filter .tm-f-search{flex:1 1 100%;}
  .tm-f-toggle{flex:1 1 100%; justify-content:center;}
  .tm-f-panel{grid-template-columns:1fr 1fr;}
  .tm-view-head h1{font-size:20px;}
  .tm-cards{grid-template-columns:1fr 1fr;}
  .tm-card .tm-name{font-size:15px;}
  .tm-btn{min-height:42px;} /* 터치 영역 */
}

/* =========================================================
 * 국가유산청 API 보강 (문화해설 · 사진 · 동영상)
 * ========================================================= */
.tm-hdesc{font-size:15.5px; line-height:1.85; color:#2b3340; white-space:normal;}
.tm-hdesc p{margin:0 0 .7em; text-indent:1em;}   /* 문단 첫 글자 들여쓰기 */
.tm-hdesc p:last-child{margin-bottom:0;}
.tm-source{margin:14px 0 0; font-size:12.5px; color:#9aa3b2;}
/* 사진 갤러리 */
.tm-api-gallery{display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:12px;}
.tm-api-gallery figure{margin:0; border:1px solid var(--tm-line2); border-radius:10px; overflow:hidden; background:#f6f8fb;}
.tm-api-gallery img{display:block; width:100%; height:130px; object-fit:cover; cursor:zoom-in; transition:.15s;}
.tm-api-gallery img:hover{opacity:.9;}
.tm-api-gallery figcaption{padding:7px 9px; font-size:12px; color:#5b6472; line-height:1.4; border-top:1px solid var(--tm-line2); background:#fff;}
/* 동영상 */
.tm-video-box{margin-bottom:14px;}
.tm-video{width:100%; max-width:720px; border-radius:10px; background:#000; display:block;}
/* 지도 / 로드뷰 전환 탭 */
.tm-rv-tabs{display:flex; gap:6px; margin-bottom:8px;}
.tm-rv-tab{flex:1; padding:8px 6px; border:1px solid var(--tm-line); background:#fff; border-radius:8px; font-size:13px; font-weight:700; color:var(--tm-sub); cursor:pointer; font-family:inherit;}
.tm-rv-tab.is-on{background:var(--tm-primary); color:#fff; border-color:var(--tm-primary);}
/* 지도/로드뷰 전체화면 */
.tm-map-wrap{position:relative;}
.tm-fs-btn-tab{flex:0 0 auto; padding:8px 12px; border:1px solid var(--tm-line); background:#fff; border-radius:8px; font-size:13px; font-weight:700; color:var(--tm-sub); cursor:pointer; font-family:inherit; white-space:nowrap;}
.tm-fs-btn-tab:hover{border-color:var(--tm-primary); color:var(--tm-primary);}
.tm-map-wrap:fullscreen, .tm-map-wrap:-webkit-full-screen{display:flex; flex-direction:column; gap:8px; background:#fff; padding:12px;}
.tm-map-wrap:fullscreen .tm-map, .tm-map-wrap:-webkit-full-screen .tm-map{height:auto !important; flex:1 1 auto;}
.tm-map-wrap:fullscreen .tm-rv-tabs, .tm-map-wrap:-webkit-full-screen .tm-rv-tabs{flex:0 0 auto; margin-bottom:0;}
/* 공유 버튼 */
.tm-share{display:flex; flex-wrap:wrap; gap:8px; margin-top:14px;}
.tm-share-btn{display:inline-flex; align-items:center; gap:5px; padding:8px 14px; border:1px solid var(--tm-line); background:#fff; border-radius:20px; font-size:13px; font-weight:600; color:var(--tm-ink); cursor:pointer; font-family:inherit; transition:.12s;}
.tm-share-btn:hover{border-color:var(--tm-primary); color:var(--tm-primary);}
.tm-share-btn.k{background:#fee500; border-color:#fee500; color:#3c1e1e;}
.tm-share-btn.k:hover{filter:brightness(.96); color:#3c1e1e;}
.tm-share-btn.tm-course-btn.on{background:#e9f8ef; border-color:#1a9b54; color:#1a9b54;}

/* =========================================================
 * 답사 코스 / 즐겨찾기 (플로팅 위젯 + 담기 버튼 + 번호 마커)
 * ========================================================= */
.tm-course-fab{position:fixed; right:18px; bottom:18px; z-index:900; border:none; border-radius:24px; padding:11px 18px; background:var(--tm-primary); color:#fff; font-size:14px; font-weight:700; box-shadow:0 3px 12px rgba(0,0,0,.28); cursor:pointer; font-family:inherit;}
.tm-course-fab b{margin-left:3px;}
.tm-course-fab:hover{filter:brightness(.95);}
.tm-course-fab.tm-on-map{bottom:74px;}   /* 지도모드: 내 위치 버튼 위로 */
.tm-course-panel{position:fixed; right:18px; bottom:66px; z-index:901; width:300px; max-width:calc(100vw - 36px); max-height:70vh; overflow:auto; display:none; background:#fff; border:1px solid #cfd6e2; border-radius:12px; box-shadow:0 8px 28px rgba(0,0,0,.22); padding:14px;}
.tm-course-panel.on{display:block;}
.tm-course-panel.tm-on-map{bottom:122px;}
.tm-cp-head{font-size:15px; font-weight:800; margin-bottom:10px;}
.tm-cp-head span{color:var(--tm-primary);}
.tm-cp-empty{color:var(--tm-sub); font-size:13px; line-height:1.6; padding:12px 2px;}
.tm-cp-list{list-style:none; margin:0 0 12px; padding:0; counter-reset:cp;}
.tm-cp-list li{display:flex; align-items:center; gap:8px; padding:7px 0; border-top:1px solid #eef1f5;}
.tm-cp-list li:first-child{border-top:none;}
.tm-cp-list li::before{counter-increment:cp; content:counter(cp); flex:0 0 auto; width:20px; height:20px; background:var(--tm-primary); color:#fff; border-radius:50%; font-size:11px; font-weight:700; display:flex; align-items:center; justify-content:center;}
.tm-cp-list li a{flex:1; color:#1f2937; text-decoration:none; font-size:13.5px; word-break:keep-all;}
.tm-cp-list li a:hover{color:var(--tm-primary);}
.tm-cp-del{flex:0 0 auto; border:none; background:#f0f2f6; color:#69707c; width:24px; height:24px; border-radius:50%; cursor:pointer; font-size:13px;}
.tm-cp-del:hover{background:#e2e6ee;}
.tm-cp-acts{display:flex; flex-direction:column; gap:7px;}
.tm-cp-acts .tm-btn{width:100%; box-sizing:border-box; text-align:center;}
/* 목록 카드 담기 버튼 */
.tm-card-course{margin-left:auto; border:1px solid var(--tm-line); background:#fff; color:var(--tm-sub); border-radius:14px; padding:3px 10px; font-size:12px; font-weight:700; cursor:pointer; font-family:inherit; white-space:nowrap;}
.tm-card-course:hover{border-color:var(--tm-primary); color:var(--tm-primary);}
.tm-card-course.on{background:#e9f8ef; border-color:#1a9b54; color:#1a9b54;}
/* 지도 코스 번호 마커 */
.tm-course-pin{width:28px; height:28px; background:var(--tm-primary); color:#fff; border:2px solid #fff; border-radius:50%; font-size:14px; font-weight:800; display:flex; align-items:center; justify-content:center; box-shadow:0 2px 6px rgba(0,0,0,.4); cursor:pointer;}
/* 라이트박스 */
.tm-lb{position:fixed; inset:0; z-index:9999; display:none; align-items:center; justify-content:center; flex-direction:column; background:rgba(0,0,0,.88); padding:30px; cursor:zoom-out;}
.tm-lb.on{display:flex;}
.tm-lb img{max-width:94vw; max-height:82vh; object-fit:contain; border-radius:6px; box-shadow:0 8px 40px rgba(0,0,0,.5);}
.tm-lb-cap{color:#eaeef5; margin-top:14px; font-size:14px; text-align:center; max-width:90vw;}
.tm-lb-x{position:absolute; top:18px; right:26px; color:#fff; font-size:38px; line-height:1; cursor:pointer; opacity:.85;}
.tm-lb-x:hover{opacity:1;}
/* QR 코드 모달 */
.tm-qr-modal{position:fixed; inset:0; z-index:9999; display:none; align-items:center; justify-content:center; background:rgba(0,0,0,.6); padding:20px;}
.tm-qr-modal.on{display:flex;}
.tm-qr-card{position:relative; background:#fff; border-radius:16px; padding:22px 24px 20px; width:300px; max-width:100%; text-align:center; box-shadow:0 12px 40px rgba(0,0,0,.3);}
.tm-qr-card h3{margin:0 0 14px; font-size:16px;}
.tm-qr-x{position:absolute; top:10px; right:12px; border:none; background:none; font-size:24px; line-height:1; color:#9aa3b2; cursor:pointer;}
.tm-qr-box{display:flex; justify-content:center; padding:6px; background:#fff;}
.tm-qr-box img, .tm-qr-box canvas{display:block;}
.tm-qr-name{margin:12px 0 4px; font-size:15px; font-weight:700; color:#1f2937; word-break:keep-all;}
.tm-qr-acts{display:flex; gap:8px; justify-content:center; margin-top:12px;}
.tm-qr-acts .tm-btn{padding:8px 14px; font-size:13px;}
.tm-qr-hint{margin:12px 0 0; font-size:12px; color:#9aa3b2;}
@media (max-width: 520px){
  .tm-api-gallery{grid-template-columns:1fr 1fr; gap:8px;}
  .tm-api-gallery img{height:110px;}
}

/* =========================================================
 * 별점 (회원 평가) — 상세보기 위젯 + 지도 팝업 표시
 * ========================================================= */
.tm-rate{display:flex; align-items:center; flex-wrap:wrap; gap:14px 18px; padding:13px 16px; margin:2px 0 6px; background:var(--tm-soft); border:1px solid var(--tm-line); border-radius:var(--tm-radius);}
.tm-rate-score{display:flex; align-items:baseline; gap:6px;}
.tm-rate-avg{font-size:18px; font-weight:800; color:#1f2937;}
.tm-rate-cnt{font-size:13px; color:var(--tm-sub);}
.tm-rate-input{display:flex; align-items:center; gap:10px;}
.tm-rate-stars{display:inline-flex; font-size:26px; line-height:1; cursor:pointer; user-select:none;}
.tm-rate-stars .tm-star{color:#d9dee7; transition:.1s; padding:0 1px;}
.tm-rate-stars .tm-star.on{color:#f5a623;}
.tm-rate-msg, .tm-rate-login{font-size:13px; color:var(--tm-sub);}
/* 지도 팝업 안의 별점 */
.tm-pop-rate{display:inline-block; margin-left:6px; font-size:12.5px; font-weight:700; color:#b9791f; white-space:nowrap;}
.tm-pop-course{display:inline-block; padding:6px 11px; border:1px solid #1a9b54; background:#fff; color:#1a9b54; border-radius:8px; font-size:12px; font-weight:700; cursor:pointer; font-family:inherit; white-space:nowrap;}
.tm-pop-course.on{background:#e9f8ef;}
.tm-pop-list .tm-pop-course{padding:2px 8px; font-size:11px; margin-left:4px;}
.tm-pop-rate small{color:#b9a07a; font-weight:400;}
