/* =====================================================================
   SUB/map_total — 지도 세트
   .mp_wrap 클래스 : mp_tab_{dep3|side|list|none} mp_lay_{info_top|map_top|map_left|info_left|overlay} mp_info_{split|stack|center|sns} mp_ov_{left|right|bottom} (mp_sticky)
   변수 : --mp-h 지도 높이 · --mp-hm 모바일 지도 높이 · --mp-ovbg 반투명 레이어 색
   ===================================================================== */
.map_total{width:100%; float:left; position:relative;}
.map_total.mp_inner_off > .contents-container{width:100% !important; max-width:100% !important; padding-left:0 !important; padding-right:0 !important;}
.map_total .mp_wrap{--mp-gap:clamp(20px, calc(1.56vw + 15px), 40px); width:100%; float:left; position:relative; box-sizing:border-box;}

/* ---------- 탭 ---------- */
/* 3뎁스 탭 : 모양은 공용 3뎁스/탭 CSS(.hayan_tab_st1) 가 그림 — 여기선 자리만 */
.map_total .mp_tabs.hayan_tab_st1{width:100%; float:left; position:relative;}
.map_total .mp_tabs.hayan_tab_st1 .ht_list{margin-bottom:var(--mp-gap);}
/* 왼쪽 세로 탭 */
.map_total .mp_tab_side{display:grid; grid-template-columns:clamp(180px, calc(6.25vw + 160px), 260px) minmax(0, 1fr); gap:var(--mp-gap); align-items:start;}
.map_total .mp_side_tabs{position:sticky; top:100px;}
.map_total .mp_side_tabs .ht_list{display:flex; flex-direction:column; gap:6px;}
.map_total .mp_side_tabs .ht_btn{display:block; width:100%; text-align:left; padding:14px 18px; border:1px solid #e5e7eb; border-radius:10px; background:#fff; color:#374151; font-size:calc(var(--tx-sm-size, 15px) * 1.02); font-weight:600; cursor:pointer; transition:all .2s;}
.map_total .mp_side_tabs .ht_btn:hover{border-color:var(--primary, #2563eb); color:var(--primary, #2563eb);}
.map_total .mp_side_tabs .ht_btn.on{background:var(--primary, #2563eb); border-color:var(--primary, #2563eb); color:#fff;}

/* ---------- 패널 : 숨긴 탭도 화면 밖에 그려 둠 (지도는 보이지 않는 칸에서 크기를 못 잡아 깨짐) ---------- */
.map_total .mp_panels{width:100%; float:left; position:relative; min-width:0;}
.map_total .mp_tab_dep3 .mp_panel:not(.on), .map_total .mp_tab_side .mp_panel:not(.on){position:absolute; left:-200vw; top:0; width:100%; visibility:hidden; pointer-events:none;}
.map_total .mp_tab_list .mp_panel + .mp_panel, .map_total .mp_tab_none .mp_panel + .mp_panel{margin-top:calc(var(--mp-gap) * 1.5); padding-top:calc(var(--mp-gap) * 1.5); border-top:1px solid #eee;}
.map_total .mp_panel{width:100%; display:flex; flex-direction:column; gap:var(--mp-gap); box-sizing:border-box;}

/* ---------- 지도 ---------- */
.map_total .mp_map{position:relative; width:100%; height:var(--mp-h, 500px); border-radius:clamp(10px, calc(0.63vw + 8px), 18px); overflow:hidden; background:#f1f5f9; border:1px solid #e5e7eb; box-sizing:border-box;}
.map_total .mp_map iframe{display:block; width:100% !important; height:100% !important; border:0;}
/* 카카오 지도 퍼가기(roughmap) 등 : 칸을 꽉 채우게 */
.map_total .mp_map .root_daum_roughmap, .map_total .mp_map > div{width:100% !important; height:100% !important;}
.map_total .mp_map .root_daum_roughmap .wrap_map{height:100% !important;}
.map_total .mp_map .root_daum_roughmap .cont{display:none;}
.map_total .mp_jsmap{position:absolute; inset:0;}
.map_total .mp_map_note{position:absolute; left:10px; top:10px; z-index:3; padding:4px 10px; border-radius:6px; background:rgba(124,58,237,.9); color:#fff; font-size:12px;}
.map_total .mp_map_msg{position:absolute; inset:0; display:flex; align-items:center; justify-content:center; padding:20px; text-align:center; color:#64748b; font-size:13px; background:#f8fafc;}
.map_total .mp_map_empty{position:absolute; inset:0; display:flex; align-items:center; justify-content:center; color:#94a3b8; font-size:14px;}

/* ---------- 정보 ---------- */
.map_total .mp_info{display:flex; gap:20px; align-items:flex-start; justify-content:space-between; box-sizing:border-box;}
.map_total .mp_main{flex:1; min-width:0;}
.map_total .mp_name{font-size:calc(var(--tit-mds-size, 26px) * 1.1); font-weight:800; color:#111; line-height:1.3; margin-bottom:clamp(14px, calc(0.94vw + 11px), 26px); letter-spacing:-.02em;}
.map_total .mp_rows{display:flex; flex-direction:column; gap:8px;}
.map_total .mp_contact{display:flex; flex-wrap:wrap; gap:6px 24px;}
.map_total .mp_row{display:flex; gap:10px; margin:0; font-size:calc(var(--tx-sm-size, 15px) * 1.05); line-height:1.5;}
.map_total .mp_row dt{font-weight:700; color:#111; flex-shrink:0;}
.map_total .mp_row dd{margin:0; color:#555; word-break:keep-all;}
.map_total .mp_etc{font-size:var(--tx-sm-size, 15px); color:#555; line-height:1.6;}
.map_total .mp_sns{display:flex; gap:8px; flex-shrink:0;}
.map_total .mp_sns a{width:42px; height:42px; border-radius:50%; display:flex; align-items:center; justify-content:center; background:#f3f4f6; color:#333; font-size:20px; text-decoration:none; transition:all .2s;}
.map_total .mp_sns a:hover{background:var(--primary, #2563eb); color:#fff;}

/* 정보 모양 : split 제목 한 줄 · 아래 주소 왼쪽 / 연락처 오른쪽 (캡처 모양) */
.map_total .mp_info_split .mp_rows{flex-direction:row; flex-wrap:wrap; justify-content:space-between; align-items:baseline; gap:8px 30px;}
.map_total .mp_info_split .mp_contact{gap:6px 30px;}
/* stack 왼쪽 정렬 목록 */
.map_total .mp_info_stack .mp_contact{flex-direction:column; gap:8px;}
/* center 가운데 */
.map_total .mp_info_center .mp_info{justify-content:center; text-align:center;}
.map_total .mp_info_center .mp_rows, .map_total .mp_info_center .mp_contact, .map_total .mp_info_center .mp_row{justify-content:center; align-items:center;}
/* sns 정보 + 오른쪽 SNS 아이콘 (stack 정렬) */
.map_total .mp_info_sns .mp_contact{flex-direction:column; gap:8px;}
.map_total .mp_info_sns .mp_info{align-items:center;}

/* ---------- 배치 ---------- */
.map_total .mp_lay_map_top .mp_map{order:-1;}
/* 지도 왼쪽 · 정보 오른쪽 (정보 따라다님 선택) / 정보 왼쪽 · 지도 오른쪽 */
.map_total .mp_lay_map_left .mp_panel, .map_total .mp_lay_info_left .mp_panel{display:grid; grid-template-columns:minmax(0, 1.7fr) minmax(260px, 1fr); align-items:start;}
.map_total .mp_lay_map_left .mp_map{order:-1;}
.map_total .mp_lay_info_left .mp_panel{grid-template-columns:minmax(260px, 1fr) minmax(0, 1.7fr);}
.map_total .mp_lay_map_left .mp_info, .map_total .mp_lay_info_left .mp_info{flex-direction:column; padding:clamp(20px, calc(1.56vw + 15px), 40px); background:#fafafa; border-radius:clamp(10px, calc(0.63vw + 8px), 18px);}
.map_total .mp_lay_map_left .mp_rows, .map_total .mp_lay_info_left .mp_rows{flex-direction:column; align-items:flex-start;}
.map_total .mp_lay_map_left .mp_contact, .map_total .mp_lay_info_left .mp_contact{flex-direction:column; gap:8px;}
.map_total .mp_sticky.mp_lay_map_left .mp_info, .map_total .mp_sticky.mp_lay_info_left .mp_info{position:sticky; top:100px;}
/* 지도 위 반투명 정보 */
.map_total .mp_lay_overlay .mp_panel{display:block; position:relative;}
.map_total .mp_lay_overlay .mp_info{position:absolute; z-index:2; top:clamp(16px, calc(1.25vw + 12px), 32px); bottom:clamp(16px, calc(1.25vw + 12px), 32px); left:clamp(16px, calc(1.25vw + 12px), 32px); width:min(420px, 45%); flex-direction:column; justify-content:center; padding:clamp(22px, calc(1.56vw + 17px), 40px); background:var(--mp-ovbg, rgba(17,24,39,.72)); color:#fff; border-radius:clamp(10px, calc(0.63vw + 8px), 18px); -webkit-backdrop-filter:blur(4px); backdrop-filter:blur(4px); box-sizing:border-box;}
.map_total .mp_lay_overlay.mp_ov_right .mp_info{left:auto; right:clamp(16px, calc(1.25vw + 12px), 32px);}
.map_total .mp_lay_overlay.mp_ov_bottom .mp_info{top:auto; left:clamp(16px, calc(1.25vw + 12px), 32px); right:clamp(16px, calc(1.25vw + 12px), 32px); width:auto;}
.map_total .mp_lay_overlay .mp_name, .map_total .mp_lay_overlay .mp_row dt, .map_total .mp_lay_overlay .mp_row dd, .map_total .mp_lay_overlay .mp_etc{color:#fff;}
.map_total .mp_lay_overlay .mp_row dd{opacity:.88;}
.map_total .mp_lay_overlay .mp_rows{flex-direction:column; align-items:flex-start;}
.map_total .mp_lay_overlay .mp_contact{flex-direction:column; gap:6px;}
.map_total .mp_lay_overlay .mp_sns a{background:rgba(255,255,255,.16); color:#fff;}

/* ---------- 관리자 : 지도 설정 버튼 ---------- */
.map_total .mp_set_btn{display:table; margin:0 0 10px auto; position:relative; z-index:40; padding:7px 14px; border:0; border-radius:6px; cursor:pointer; background:#7c3aed; color:#fff; font-size:13px; font-weight:600; box-shadow:0 2px 8px rgba(0,0,0,.25);}
.map_total.admin_div .grid_layout_badge{z-index:30;}
.map_total .empty_li{width:100%; padding:30px; text-align:center; color:#888; border:1px dashed #ccc; border-radius:10px;}

/* ---------- 태블릿 · 모바일 ---------- */
@media screen and (max-width:1024px){
  .map_total .mp_lay_map_left .mp_panel, .map_total .mp_lay_info_left .mp_panel{grid-template-columns:minmax(0, 1fr);}
  .map_total .mp_lay_info_left .mp_info{order:-1;}
  .map_total .mp_sticky .mp_info{position:static !important;}
  .map_total .mp_tab_side{grid-template-columns:minmax(0, 1fr);}
  .map_total .mp_side_tabs{position:static;}
  .map_total .mp_side_tabs .ht_list{flex-direction:row; flex-wrap:wrap;}
  .map_total .mp_side_tabs .ht_btn{width:auto;}
}
@media screen and (max-width:767px){
  .map_total .mp_map{height:var(--mp-hm, 320px);}
  .map_total .mp_info{flex-direction:column;}
  .map_total .mp_info_split .mp_rows{flex-direction:column; align-items:flex-start;}
  .map_total .mp_contact{flex-direction:column; gap:6px;}
  /* 반투명 정보 : 모바일은 지도 아래로 (색은 그대로) */
  .map_total .mp_lay_overlay .mp_info{position:static; width:auto; margin-top:12px; -webkit-backdrop-filter:none; backdrop-filter:none;}
}

/* =====================================================================
   설정창 [지도 설정] (map_total.js) — 갤러리·버튼 설정창과 같은 모양
   ===================================================================== */
.mpset{position:fixed; inset:0; z-index:2147483600; font-family:inherit;}
.mpset_bg{position:absolute; inset:0; background:transparent;}
.mpset_box{position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); width:min(920px, calc(100vw - 30px)); max-height:calc(100vh - 40px); display:flex; flex-direction:column; background:#fff; color:#222; border-radius:14px; box-shadow:0 20px 60px rgba(0,0,0,.35); border:1px solid #e5e7eb;}
.mpset_head{display:flex; align-items:center; justify-content:space-between; padding:14px 18px; background:linear-gradient(135deg, #7c3aed, #6366f1); color:#fff; cursor:move; user-select:none; touch-action:none; border-radius:14px 14px 0 0;}
.mpset_head b{font-size:15px;}
.mpset_head button{border:0; background:rgba(255,255,255,.2); color:#fff; width:30px; height:30px; border-radius:50%; cursor:pointer; font-size:16px;}
.mpset_tabs{display:flex; gap:4px; padding:10px 18px 0; border-bottom:1px solid #e5e7eb; background:#fafafa;}
.mpset_tabs button{padding:9px 14px; border:1px solid transparent; border-bottom:0; border-radius:8px 8px 0 0; background:none; color:#6b7280; font-size:13px; font-weight:600; cursor:pointer; margin-bottom:-1px;}
.mpset_tabs button.on{background:#fff; border-color:#e5e7eb; color:#7c3aed;}
.mpset_body{padding:18px; overflow:auto; flex:1;}
.mpset_lb{font-size:13px; font-weight:700; color:#374151; margin:6px 0 10px;}
.mpset_lb small{font-weight:400; color:#9ca3af; margin-left:6px;}
.mpset_grid{display:grid; grid-template-columns:repeat(auto-fill, minmax(132px, 1fr)); gap:10px; margin-bottom:18px;}
.mpset_card{border:2px solid #e5e7eb; border-radius:10px; padding:10px 8px 8px; background:#fafafa; cursor:pointer; display:flex; flex-direction:column; align-items:stretch; gap:6px; transition:border-color .2s, background .2s; text-align:left;}
.mpset_card:hover{border-color:#a78bfa;}
.mpset_card.on{border-color:#7c3aed; background:#f5f3ff;}
.mpset_card > span{font-size:12px; color:#374151; font-weight:700;}
.mpset_card > small{font-size:11px; color:#9ca3af; line-height:1.35;}
/* 미니 그림 : t=탭 · i=정보 · m=지도 */
.mpset_mini{height:62px; display:grid; gap:3px; padding:4px; background:#fff; border:1px solid #eee; border-radius:6px;}
.mpset_mini b{display:block; border-radius:3px;}
.mpset_mini .t{background:#c4b5fd;} .mpset_mini .i{background:#e5e7eb;} .mpset_mini .m{background:#a7d3f5;}
.mpset_mini .ov{background:rgba(17,24,39,.65);}
.mpset_card.on .mpset_mini .t{background:#7c3aed;}
.mpset_row{display:flex; flex-wrap:wrap; align-items:center; gap:10px 16px; margin-bottom:14px; font-size:13px;}
.mpset_row label{display:inline-flex; align-items:center; gap:5px; cursor:pointer;}
.mpset_row input[type=range]{width:150px;}
.mpset_row b.v{min-width:46px; color:#7c3aed; font-weight:700;}
.mpset_row input[type=color]{width:34px; height:28px; padding:0; border:1px solid #d1d5db; border-radius:6px; background:#fff; cursor:pointer;}
.mpset_seg{display:inline-flex; border:1px solid #d1d5db; border-radius:8px; overflow:hidden;}
.mpset_seg button{padding:6px 12px; border:0; border-right:1px solid #e5e7eb; background:#fff; font-size:12px; cursor:pointer; color:#374151;}
.mpset_seg button:last-child{border-right:0;}
.mpset_seg button.on{background:#7c3aed; color:#fff;}
.mpset_sec{border-top:1px solid #f1f1f1; padding-top:12px; margin-top:4px;}
.mpset_inner{display:flex; align-items:center; gap:10px; flex-wrap:wrap; padding:10px 12px; margin-bottom:16px; background:#f5f3ff; border:1px solid #ddd6fe; border-radius:10px; font-size:13px;}
.mpset_inner label{display:inline-flex; align-items:center; gap:6px; font-weight:700; cursor:pointer;}
.mpset_inner span{color:#6b7280; font-size:12px;}
.mpset_foot{display:flex; justify-content:flex-end; gap:8px; padding:12px 18px; border-top:1px solid #eee;}
.mpset_foot button{padding:9px 18px; border-radius:8px; border:1px solid #d1d5db; background:#fff; cursor:pointer; font-size:13px;}
.mpset_foot .mpset_save{background:#7c3aed; border-color:#7c3aed; color:#fff; font-weight:700;}
.mpset_msg{font-size:12px; color:#6b7280; margin-right:auto; align-self:center;}
/* 장소 목록 */
.mi_bar{display:flex; align-items:center; gap:10px; margin-bottom:12px;}
.mi_bar button{padding:7px 14px; border:1px solid #7c3aed; background:#fff; color:#7c3aed; border-radius:8px; font-weight:700; font-size:13px; cursor:pointer;}
.mi_bar .mi_cnt{margin-left:auto; font-size:12px; color:#6b7280;}
.mi_row{border:1px solid #e5e7eb; border-radius:12px; padding:12px; margin-bottom:10px; background:#fff;}
.mi_row.mi_drag{opacity:.4;} .mi_row.mi_over{border-color:#7c3aed; box-shadow:0 0 0 2px #ddd6fe;}
.mi_hd{display:flex; align-items:center; gap:8px; margin-bottom:8px;}
.mi_hd .mi_handle{cursor:grab; color:#9ca3af; user-select:none;}
.mi_hd b{color:#7c3aed;}
.mi_hd .mi_btns{margin-left:auto; display:flex; gap:4px;}
.mi_hd .mi_btns button{min-width:30px; height:28px; border:1px solid #e5e7eb; background:#fff; border-radius:6px; cursor:pointer; font-size:12px;}
.mi_hd .mi_btns button:disabled{opacity:.35; cursor:default;}
.mi_hd .mi_btns .mi_del{color:#dc2626; padding:0 10px;}
.mi_f{display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:6px 10px;}
.mi_f label{display:flex; flex-direction:column; gap:3px; font-size:11.5px; color:#6b7280; font-weight:600;}
.mi_f label.full{grid-column:1 / -1;}
.mi_in{width:100%; padding:8px 10px; border:1px solid #d1d5db; border-radius:6px; font-size:13px; box-sizing:border-box; font-family:inherit; color:#111;}
textarea.mi_in{min-height:60px; resize:vertical; font-family:inherit;}
textarea.mi_in.code{font-family:monospace; font-size:12px; min-height:70px; background:#fffbeb; border-color:#fcd34d;}
.mi_in:focus{outline:none; border-color:#7c3aed; box-shadow:0 0 0 3px #ede9fe;}
.mi_hint{font-weight:400; color:#9ca3af;}
/* 장소마다 보일 섹션 (admin 전용으로 가려 둔 섹션 칩) */
.mi_secs_wrap{margin-top:10px; padding-top:10px; border-top:1px dashed #e5e7eb; display:flex; flex-direction:column; gap:6px; font-size:12px;}
.mi_lb{font-weight:700; color:#374151; font-size:12px;}
.mi_lb small{font-weight:400; color:#9ca3af; margin-left:4px;}
.mi_secs{display:flex; flex-wrap:wrap; gap:6px;}
.mi_sb{display:inline-flex; align-items:center; gap:4px; padding:5px 10px; border:1px solid #d1d5db; border-radius:999px; background:#fff; color:#374151; font-size:12px; cursor:pointer;}
.mi_sb i{font-size:14px; color:#6b7280;}
.mi_sb.hid{border-style:dashed; color:#6b7280;}
.mi_sb em{font-style:normal; font-size:10px; font-weight:700; color:#fff; background:#dc2626; border-radius:4px; padding:1px 5px;}
.mi_sb.on{background:#0f766e; border-color:#0f766e; color:#fff;}
.mi_sb.on i{color:#fff;}
.mi_gone{color:#9ca3af;}
.mi_gone button{border:0; background:none; color:#ef4444; cursor:pointer; font-size:12px; text-decoration:underline;}
.mi_note{color:#9ca3af; font-size:11px; line-height:1.5;}
.mpset .bi_empty{padding:30px; text-align:center; color:#9ca3af; border:1px dashed #e5e7eb; border-radius:10px;}
@media screen and (max-width:640px){ .mi_f{grid-template-columns:minmax(0, 1fr);} }
