/* ── 공통 네비게이션 ── */
#main-header {
  height: 56px; flex-shrink: 0;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  display: flex; align-items: center;
  gap: 8px; padding: 0 20px;
  position: sticky; top: 0; z-index: 400;
}
#mh-logo {
  font-size: 20px; font-weight: 800;
  color: #16a34a; text-decoration: none;
  white-space: nowrap; flex-shrink: 0;
  padding: 5px 8px; border-radius: 6px;
  transition: background 0.15s;
  display: inline-flex; align-items: center; gap: 6px;
}
#mh-logo:hover { background: #f0fdf4; }
.mh-logo-icon { width: 22px; height: 22px; border-radius: 5px; flex-shrink: 0; }
.mh-nav { display: flex; gap: 2px; flex-shrink: 0; margin-left: auto; }
.mh-link {
  padding: 6px 12px;
  color: #4b5563; font-size: 14px; font-weight: 500;
  text-decoration: none; border-radius: 6px; white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.mh-link:hover { background: #f3f4f6; color: #111827; }
.mh-link.active { color: #16a34a; background: #f0fdf4; }
.mh-page-title {
  font-size: 16px; font-weight: 700; color: #111827;
  margin-left: 8px; white-space: nowrap;
}

/* 메인 페이지 검색바 */
.mh-search-wrap {
  flex: 1; max-width: 360px; margin-left: 8px; position: relative;
}
.map-search-inner {
  display: flex; align-items: center; gap: 8px;
  background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px;
  padding: 0 12px; height: 38px;
}
.map-search-icon { font-size: 15px; flex-shrink: 0; color: #9ca3af; }
#map-search-input {
  flex: 1; border: none; outline: none;
  font-size: 14px; color: #111827; background: transparent;
}
#map-search-input::placeholder { color: #9ca3af; }
.map-search-clear {
  background: none; border: none; cursor: pointer;
  color: #9ca3af; font-size: 16px; padding: 0;
  display: flex; align-items: center;
}
.map-search-clear:hover { color: #374151; }
.map-search-results {
  position: absolute;
  top: calc(100% + 6px); left: 0; right: 0; z-index: 300;
  background: white; border-radius: 10px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  overflow: hidden;
}
.msr-item {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 14px; cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
}
.msr-item:last-child { border-bottom: none; }
.msr-item:hover { background: #f8fafc; }
.msr-course-item { background: #f0fdf4; }
.msr-course-item:hover { background: #dcfce7; }
.msr-name { font-size: 13px; font-weight: 600; color: #0f172a; }
.msr-addr { font-size: 11px; color: #94a3b8; }

/* ── 공통 페이지 푸터 ── */
.page-footer {
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px;
}
.mf-copy { font-size: 12px; color: #9ca3af; }
.mf-links { display: flex; gap: 16px; flex-wrap: wrap; }
.mf-link { font-size: 12px; color: #6b7280; text-decoration: none; transition: color 0.15s; }
.mf-link:hover { color: #111827; }

@media (max-width: 640px) {
  #main-header { padding: 0 14px; }
  .mh-nav { display: flex; }
  .mh-link { font-size: 13px; padding: 4px 10px; }
  .mh-search-wrap { max-width: none; }
  .page-footer { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* ── 공통 바텀 네비게이션 ── */
body { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }

#bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 56px; z-index: 3000;
  background: #ffffff; border-top: 1px solid #e5e7eb;
  display: flex; align-items: stretch;
  padding-bottom: env(safe-area-inset-bottom);
}
.bn-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  text-decoration: none; color: #6b7280;
  font-size: 10px; font-weight: 500;
  background: none; border: none; padding: 0; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s;
}
.bn-item:hover, .bn-item.active { color: #16a34a; }
.bn-icon { font-size: 20px; line-height: 1; }
