.jp-mobile{
	display:none;
}
.map-centers-wrap{
  height: calc(100vh - 70px);
  overflow: hidden; /* 유지 OK */
  min-height: 0;    /* ⭐ flex/grid 내부 스크롤 필수 */
}

.map-grid{
  display: grid;
  grid-template-columns: 340px 1fr;
}

.map-sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: calc(100vh - 69px);
}

.map-main { min-width: 0;}

.panel{
  background: #fff;
  border: 1px solid #e8eef5;
  border-top:none;
  border-radius: 0;
  padding: 14px;
  box-shadow: 0 6px 18px rgba(17,24,39,.05);
}

.panel-title{
  font-weight: 800;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.badge{
  margin-left: auto;
  font-size: 12px;
  background: #111827;
  color: #fff;
  padding: 2px 8px;
  border-radius: 999px;
}

.field{ margin-bottom: 10px; }
.field label{ display:block; font-size: 12px; font-weight: 700; color:#374151; margin-bottom: 6px; }

.input{
  width: 100%;
  height: 40px;
  border-radius: 10px;
  border: 1px solid #d9e3f0;
  padding: 0 12px;
  outline: none;
}
.input:focus{ border-color:#111827; box-shadow: 0 0 0 3px rgba(17,24,39,.12); }

.row{ display:flex; gap: 8px; }

.list-panel{
  padding: 0;
  overflow: hidden;

  flex: 1;          /* ⭐ 남은 영역 전부 차지 */
  min-height: 0;    /* ⭐ flex overflow 필수 */
  display: flex;
  flex-direction: column;
}
.list-panel .panel-title{ padding: 14px; margin: 0; border-bottom: 1px solid #ccc; }
.list{
  flex: 1;          /* ⭐ 패널 내부 남은 영역 */
  overflow-y: auto; /* ⭐ 여기서만 스크롤 */
  padding: 10px;
}

.empty{ padding: 16px; color:#6b7280; }

.item{
  width:100%;
  text-align:left;
  border: 1px solid #eef2f7;
  background:#fff;
  border-radius: 12px;
  padding: 10px;
  cursor: pointer;
  margin-bottom: 8px;
}
.item:hover{ background:#f9fafb; border-color:#dbe7f7; }
.item.active{ border-color:#111827; box-shadow: 0 0 0 3px rgba(17,24,39,.12); }

.name{ font-weight: 900; color:#111827; font-size: 14px; line-height: 1.25; }
.meta{ margin-top: 6px; display:flex; flex-direction:column; gap: 8px; flex-wrap: wrap; align-items:flex-start; }
.tag{font-size: 11px; padding: 2px 8px; background:#111827; color:#fff; border-radius:999px; }
.addr{ font-size: 12px; color:#4b5563; }
.muted{ color:#6b7280; }

.map-box{
  position: relative;
  border-radius: 0px;
  overflow: hidden;
  border: 1px solid #e8eef5;
  border-right:none;
  background:#fff;
  box-shadow: 0 6px 18px rgba(17,24,39,.05);
  z-index: 1;    
}
.map-canvas{ width: 100%; height: calc(100vh - 60px); /* 헤더 높이 */ min-height: 520px; }

.detail-panel{
  position: absolute;
  left: 14px;
  top: 14px;
  width: 340px;
  max-width: calc(100% - 28px);
  background:#fff;
  border: 1px solid #e8eef5;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(17,24,39,.12);
  transform: translateY(-6px);
  opacity: 0;
  pointer-events: none;
  transition: all .18s ease;
  z-index: 1000;
}
.detail-panel.open{
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.detail-head{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 12px 12px 10px;
  border-bottom: 1px solid #eef2f7;
}
.detail-title{ font-weight: 900; color:#111827; font-size: 14px; flex:1; }
.icon-btn{
  width: 34px; height: 34px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background:#fff;
  cursor:pointer;
  font-size: 18px;
  line-height: 1;
}
.icon-btn:hover{ background:#f3f4f6; }

.detail-body{ padding: 12px; max-height: calc(100vh - 240px); overflow:auto; }
.kv{ display:grid; grid-template-columns: 70px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #eef2f7; }
.k{ font-size: 12px; color:#6b7280; font-weight: 500; }
.v{ font-size: 13px; color:#111827; font-weight: 600; }
.actions{ padding-top: 10px; }
.warn{
  margin-top: 10px;
  background:#fff7ed;
  border: 1px solid #fed7aa;
  color:#9a3412;
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 700;
}

@media (max-width: 1024px){
    .map-centers-wrap{
	    height: calc(100vh - 60px);
    }
}
@media (max-width: 768px){
	.field{
		display:flex;
		flex-direction:row;
	}
	.field label{
		width:20%;
		margin:0;
		height:40px;
		line-height:40px;
		text-align:center;
	}
	.panel-title{
		display:none;
	}
	.map-grid{ grid-template-columns: 1fr; }
	.map-main {
		height: calc(100dvh - 60px); /* ⭐ dynamic viewport */
		min-height: 0;
	}
	.button_center{
		justify-content:center;
	}
	.map-sidebar{
		position: fixed;
		left: 0;
		bottom: 0;
		width: 100%;
		height: 85dvh;              /* 🔥 최대 크기만 정의 */
		/* ✅ 닫힘 상태: 핸들만 노출 */
		transform: translateY(calc(85dvh - 40px));
		background: #fff;
		z-index: 2000;
		border-radius: 20px 20px 0 0;
		transition: transform .28s ease;
		box-shadow: 0 -10px 30px rgba(0,0,0,.15);
		display: flex;
		flex-direction: column;
		gap:8px;
	}

	.map-sidebar.open{
		transform: translateY(0);   /* 🔥 전체 열림 */
	}

	.map-box,
	  .map-canvas{
		min-height: 0;   /* ⭐ 이것이 핵심 */
		height: 100%;
	  }

	.mobile-handle{
	  width: 40px;
	  height: 5px;
	  border-radius: 999px;
	  background: #d1d5db;
	  margin: 8px auto 10px;
	  
	}
	.sidebar-handle {
		display: flex;
		justify-content: center;
		align-items: center;
		height: 38px;
		cursor: grab;
		touch-action: pan-y;
		flex-direction: column;
	}

	.sidebar-handle span {
		width: 42px;
		height: 6px;
		border-radius: 999px;
		background: #d1d5db;
	}

	/* 패널 열려있을 때 살짝 강조 */
	.map-sidebar.open .sidebar-handle span {
		background: #9ca3af;
	}
}

.handle-text{
  font-size: 11px;
  color: #9ca3af;
  margin-left: 6px;
}
@media (min-width: 769px){
  .sidebar-handle {
    display: none;
  }
}
.marker-label {
  background: rgba(0,0,0,0.75);
  color: #fff;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  transform: translateY(-4px);
  pointer-events: none; /* 클릭 방해 방지 */
}
.marker-label.active {
  background: #2563eb;
}
#center_list .item.active {
  background: #eef4ff;
  border-left: 4px solid #2563eb;
}

#center_list .item.active .name {
  font-weight: 700;
  color: #1e40af;
}
.detail-actions {
  margin-top: 16px;
  display: flex;
  justify-content: center;
}

.btn-kakao-map {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fae100;
  color: #000;
  font-weight: 700;
  text-decoration: none;
}

.btn-kakao-map:hover {
  background: #fada00;
}
