* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  overflow: hidden; background: #fff;
}

/* ── 헤더 ── */
#course-header {
  height: 56px;
  background: #fff; border-bottom: 1px solid #e5e7eb;
  display: flex; align-items: center; gap: 4px; padding: 0 8px;
  position: relative; z-index: 100;
}

/* ── 지도+스크롤 영역을 묶는 컨테이너 ── */
#course-content {
  display: flex; flex-direction: column;
  height: calc(100% - 112px);
  
}
@media (max-width: 767px) {
  #course-content {
    padding-bottom: calc(56px + env(safe-area-inset-bottom)); 
  }
}
#ch-back, #ch-share {
  width: 40px; height: 40px; border: none; background: none;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  border-radius: 8px; color: #374151; flex-shrink: 0;
}
#ch-back:hover, #ch-share:hover { background: #f3f4f6; }
#ch-back svg, #ch-share svg { width: 22px; height: 22px; }
#ch-title {
  flex: 1; font-size: 16px; font-weight: 700; color: #111;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 0 4px;
}

/* ── 지도 ── */
#course-map-wrap {
  flex: 1; position: relative;
  /* height: 44vh; min-height: 180px; max-height: 360px; */
}
#course-map { width: 100%; height: 100%; }

/* ── 스크롤 영역 ── */
#course-scroll {
  flex:1;overflow-y: auto; display: flex; flex-direction: column;
  -webkit-overflow-scrolling: touch;
}
#course-scroll::-webkit-scrollbar { width: 4px; }
#course-scroll::-webkit-scrollbar-thumb { background: #e5e7eb; border-radius: 2px; }
#title-wrap{position:sticky;top:0;background:#fff;padding:16px 0 10px;}

/* ── 편의시설 토글 ── */
#amenity-toggles {
  position: absolute; bottom: 10px; left: 10px;
  display: flex; gap: 6px; z-index: 10;
}
.am-toggle {
  padding: 5px 10px; border-radius: 20px; border: none;
  font-size: 12px; font-weight: 600; cursor: pointer;
  background: white; color: #6b7280;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
  opacity: 0.6; transition: opacity 0.15s, background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.am-toggle.on { background: white; color: #111; opacity: 1; }

/* ── 코스 바디 ── */
#course-body {
  padding: 0 16px 16px;
  display: flex; flex-direction: column;
}

.c-badge {
  display: inline-block; padding: 2px 8px; border-radius: 99px;
  font-size: 11px; font-weight: 700; margin-bottom: 6px;
}
.c-stat {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 10px; background: #f9fafb; border-radius: 8px;
  font-size: 13px; color: #374151; font-weight: 500;
}
.c-stat span:first-child { font-size: 15px; }

.c-info-item {
  background: #f9fafb; border-radius: 8px; padding: 10px 12px;
  display: flex; flex-direction: column; gap: 4px;
}
.c-info-label { font-size: 11px; color: #9ca3af; font-weight: 500; }
.c-info-item span:last-child { font-size: 15px; font-weight: 700; color: #111; }

/* ── 액션 버튼 ── */
.c-btn {
  flex: 1; min-width: 120px; padding: 10px 8px;
  border: 1.5px solid #e5e7eb; border-radius: 8px;
  background: #fff; color: #374151; font-size: 13px; font-weight: 600;
  cursor: pointer; text-align: center; white-space: nowrap;
  transition: background 0.15s;
}
.c-btn:hover { background: #f3f4f6; }
.c-btn-edit { border-color: #2563eb; color: #2563eb; }
.c-btn-edit:hover { background: #eff6ff; }
.c-btn-del { border-color: #dc2626; color: #dc2626; }
.c-btn-del:hover { background: #fef2f2; }

