@charset "UTF-8";

/* ==========================================================================
   KoreaTrip - Airbnb 스타일 전국 지도 기반 여행 탐색 플랫폼 디자인 시스템
   ========================================================================== */

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-glow: rgba(37, 99, 235, 0.15);
  
  --secondary: #0ea5e9;
  --accent: #f59e0b;
  --success: #10b981;
  --danger: #ef4444;

  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-elevated: #ffffff;

  --text-main: #0f172a;
  --text-sub: #334155;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  --border-light: #e2e8f0;
  --border-focus: #93c5fd;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08), 0 4px 10px rgba(0, 0, 0, 0.04);
  --shadow-float: 0 14px 35px rgba(15, 23, 42, 0.12);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --header-height: 68px;
  --sidebar-width: 440px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

html, body {
  height: 100%;
  width: 100%;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Noto Sans KR', sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  overflow-x: hidden;
}

body {
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Header Component
   ========================================================================== */
.site-header {
  height: var(--header-height);
  background: #ffffff;
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.header-inner {
  width: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.site-logo {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  letter-spacing: -0.5px;
}

.site-logo i {
  font-size: 24px;
}

.site-logo span.tag {
  font-size: 11px;
  font-weight: 700;
  background: var(--primary-light);
  color: var(--primary);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  margin-left: 4px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-link {
  text-decoration: none;
  color: var(--text-sub);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-link:hover {
  background: var(--bg-subtle);
  color: var(--primary);
}

.nav-link.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-sidebar-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-sidebar-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

/* ==========================================================================
   Full Interactive Map Viewport (PC Layout)
   ========================================================================== */
.map-app-viewport {
  flex: 1;
  position: relative;
  display: flex;
  width: 100%;
  height: calc(100vh - var(--header-height));
  overflow: hidden;
}

/* Floating Search Bar (Airbnb Style) */
.map-search-bar {
  position: absolute;
  top: 16px;
  left: calc(var(--sidebar-width) + 20px);
  z-index: 1200;
  width: 460px;
  max-width: calc(100vw - var(--sidebar-width) - 40px);
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-collapsed .map-search-bar {
  left: 20px;
}

.search-capsule {
  background: #ffffff;
  border-radius: var(--radius-full);
  padding: 6px 12px 6px 18px;
  display: flex;
  align-items: center;
  box-shadow: var(--shadow-float);
  border: 1px solid rgba(0, 0, 0, 0.08);
  transition: var(--transition);
}

.search-capsule:focus-within {
  border-color: var(--primary);
  box-shadow: 0 8px 30px rgba(37, 99, 235, 0.2);
}

.search-capsule i.fa-magnifying-glass {
  color: var(--text-muted);
  font-size: 16px;
  margin-right: 12px;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-main);
  font-weight: 500;
}

.search-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.btn-clear-search {
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 6px;
  display: none;
}

.btn-clear-search:hover {
  color: var(--text-main);
}

/* Autocomplete Popup */
.search-autocomplete-box {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #ffffff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
  max-height: 380px;
  overflow-y: auto;
  display: none;
  z-index: 1300;
}

.search-autocomplete-box.active {
  display: block;
}

.ac-group-title {
  padding: 10px 18px 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ac-item {
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  border-bottom: 1px solid var(--bg-subtle);
  transition: background 0.15s;
}

.ac-item:last-child {
  border-bottom: none;
}

.ac-item:hover, .ac-item.focused {
  background: var(--primary-light);
}

.ac-item-content {
  display: flex;
  flex-direction: column;
}

.ac-item-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.ac-item-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.ac-item-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  color: var(--text-sub);
}

.ac-item-badge.region {
  background: #e0f2fe;
  color: #0369a1;
}

.ac-item-badge.place {
  background: #dcfce7;
  color: #15803d;
}

/* ==========================================================================
   Sidebar: Multi-level Region Explorer & Place List
   ========================================================================== */
.map-sidebar {
  width: var(--sidebar-width);
  height: 100%;
  background: #ffffff;
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1100;
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.03);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.sidebar-collapsed .map-sidebar {
  transform: translateX(-100%);
  position: absolute;
}

/* Sidebar Header & Breadcrumb */
.sidebar-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  background: #ffffff;
}

.breadcrumb-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.breadcrumb-item {
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s;
}

.breadcrumb-item:hover {
  color: var(--primary);
  text-decoration: underline;
}

.breadcrumb-item.current {
  color: var(--primary);
  font-weight: 700;
  cursor: default;
  text-decoration: none;
}

.breadcrumb-separator {
  color: var(--text-light);
  font-size: 10px;
}

.sidebar-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-title-row h2 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.places-count-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

/* Region Hierarchy Drilldown Pills */
.hierarchy-filter-section {
  padding: 12px 20px;
  background: #fafafa;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filter-row-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.filter-row-label span.reset-btn {
  color: var(--primary);
  cursor: pointer;
  font-weight: 600;
}

.filter-row-label span.reset-btn:hover {
  text-decoration: underline;
}

.chip-scroll-container {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.chip-scroll-container::-webkit-scrollbar {
  height: 4px;
}
.chip-scroll-container::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.filter-chip {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
  background: #ffffff;
  color: var(--text-sub);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.filter-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-chip.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.filter-chip .chip-count {
  font-size: 10px;
  opacity: 0.8;
  background: rgba(0, 0, 0, 0.08);
  padding: 1px 5px;
  border-radius: var(--radius-full);
}

.filter-chip.active .chip-count {
  background: rgba(255, 255, 255, 0.25);
}

/* Category Filter Bar */
.category-filter-bar {
  display: flex;
  gap: 6px;
  padding: 10px 20px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-light);
  overflow-x: auto;
}

.category-btn {
  background: none;
  border: 1px solid transparent;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.category-btn:hover {
  color: var(--text-main);
  background: var(--bg-subtle);
}

.category-btn.active {
  background: var(--text-main);
  color: #ffffff;
}

/* Sidebar Place Cards List */
.sidebar-places-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Airbnb Style Place Card */
.place-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
}

.place-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.place-card.highlighted {
  border: 2px solid var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.place-card-img-wrap {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
  background-color: var(--bg-subtle);
}

.place-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.place-card:hover .place-card-img-wrap img {
  transform: scale(1.05);
}

.place-badge-category {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.place-badge-guide {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(22, 101, 52, 0.9);
  color: #ffffff;
  padding: 4px 9px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.place-card-body {
  padding: 14px 16px 16px;
}

.place-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.place-card-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.3;
}

.place-card-rating {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.place-card-rating i {
  color: #f59e0b;
  font-size: 11px;
}

.place-card-location {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.place-card-desc {
  font-size: 13px;
  color: var(--text-sub);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
  line-height: 1.45;
}

.place-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--bg-subtle);
  padding-top: 10px;
  font-size: 11px;
  color: var(--text-muted);
}

.place-card-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.place-tag {
  background: var(--bg-subtle);
  color: var(--text-muted);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
}

.btn-card-detail {
  background: var(--primary-light);
  color: var(--primary);
  border: none;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.btn-card-detail:hover {
  background: var(--primary);
  color: #ffffff;
}

/* Empty State */
.places-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.places-empty-state i {
  font-size: 42px;
  color: var(--text-light);
  margin-bottom: 14px;
}

.places-empty-state h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.places-empty-state p {
  font-size: 13px;
}

/* ==========================================================================
   Map Container & Leaflet Styling
   ========================================================================== */
.map-canvas-container {
  flex: 1;
  height: 100%;
  position: relative;
  background-color: #e5e7eb;
}

#map {
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Map Status / Tile Indicator (Real Map Notice) */
.map-tile-indicator {
  position: absolute;
  bottom: 24px;
  left: 20px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-sub);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}

.map-tile-indicator .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

/* Custom Marker Styling */
.custom-korea-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #ffffff;
  border: 2.5px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
  font-size: 13px;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.custom-korea-marker:hover {
  transform: scale(1.18);
  background: #1d4ed8;
  z-index: 9999 !important;
}

/* Marker Cluster Custom Style */
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
  background-color: rgba(37, 99, 235, 0.25) !important;
  border-radius: 50%;
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
  background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  font-family: inherit !important;
  font-size: 12px !important;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3) !important;
  border-radius: 50%;
}

/* Leaflet Popup Airbnb Style */
.leaflet-popup-content-wrapper {
  padding: 0 !important;
  border-radius: var(--radius-md) !important;
  overflow: hidden;
  box-shadow: var(--shadow-lg) !important;
  border: 1px solid var(--border-light);
}

.leaflet-popup-content {
  margin: 0 !important;
  line-height: 1.4 !important;
}

.popup-airbnb-card {
  width: 250px;
}

.popup-airbnb-card img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
}

.popup-card-content {
  padding: 12px 14px;
}

.popup-card-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 2px 7px;
  border-radius: 4px;
}

.popup-card-title {
  font-size: 14px;
  font-weight: 800;
  margin: 4px 0 2px;
  color: var(--text-main);
}

.popup-card-location {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.popup-card-btn {
  width: 100%;
  padding: 7px;
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition);
}

.popup-card-btn:hover {
  background: var(--primary-hover);
}

/* ==========================================================================
   Place Detail Modal (Airbnb Style)
   ========================================================================== */
.place-detail-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 5000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.place-detail-modal-overlay.active {
  display: flex;
}

.place-detail-modal {
  background: #ffffff;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  position: relative;
  animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.5);
  color: #ffffff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 16px;
}

.modal-close-btn:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: rotate(90deg);
}

.modal-hero-img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  background: var(--bg-subtle);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
}

.modal-category-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 8px;
}

.modal-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 8px;
}

.modal-address {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
}

.modal-desc {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.7;
  margin-bottom: 20px;
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 24px;
}

.modal-actions {
  display: flex;
  gap: 12px;
}

.btn-modal-guide {
  flex: 1;
  padding: 12px 20px;
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-modal-guide:hover {
  background: var(--primary-hover);
}

.btn-modal-focus {
  padding: 12px 18px;
  background: var(--bg-subtle);
  color: var(--text-main);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-modal-focus:hover {
  background: #e2e8f0;
}

/* ==========================================================================
   Mobile Bottom Sheet (Airbnb Sliding Panel)
   ========================================================================== */
@media (max-width: 900px) {
  .site-header {
    height: 60px;
  }
  .map-app-viewport {
    height: calc(100vh - 60px);
    flex-direction: column;
  }

  .btn-sidebar-toggle {
    display: none;
  }

  /* Floating Search on Mobile */
  .map-search-bar {
    top: 10px;
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
  }

  .search-capsule {
    padding: 8px 14px;
  }

  /* Mobile Map occupies full screen */
  .map-canvas-container {
    width: 100%;
    height: 100%;
  }

  /* Sidebar transforms into Bottom Sheet */
  .map-sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 85vh;
    border-radius: 24px 24px 0 0;
    border-right: none;
    border-top: 1px solid var(--border-light);
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.15);
    z-index: 1500;
    transform: translateY(calc(100% - 75px)); /* Peek State */
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  }

  /* Bottom Sheet Heights */
  .map-sidebar.sheet-peek {
    transform: translateY(calc(100% - 75px));
  }
  .map-sidebar.sheet-half {
    transform: translateY(45%);
  }
  .map-sidebar.sheet-full {
    transform: translateY(0);
  }

  /* Drag Handle */
  .bottom-sheet-handle {
    width: 48px;
    height: 5px;
    background: #cbd5e1;
    border-radius: var(--radius-full);
    margin: 8px auto 6px;
    cursor: grab;
  }

  .sidebar-header {
    cursor: pointer;
    padding: 8px 20px 14px;
  }

  .map-tile-indicator {
    bottom: 85px;
    left: 12px;
  }
}

/* ==========================================================================
   Detailed City View (Mokpo, Gwangju, Naju Legacy & Integration)
   ========================================================================== */
.city-detail-view {
  display: none;
}
.city-detail-view.active {
  display: block;
}

.hero {
  height: 380px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #fff;
  text-align: center;
  padding: 0 20px;
}
.hero.mokpo {
  background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('https://images.unsplash.com/photo-1519501025264-65ba15a82390?w=1280&q=80') center/cover;
}
.hero.gwangju {
  background: linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.45)), url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?w=1280&q=80') center/cover;
}
.hero.naju {
  background: linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.45)), url('https://images.unsplash.com/photo-1470071459604-3b5ec3a7fe05?w=1280&q=80') center/cover;
}
.hero h1 {
  font-size: clamp(28px, 4vw, 44px);
  margin-bottom: 10px;
  font-weight: 900;
}
.hero p {
  font-size: 15px;
  max-width: 600px;
  opacity: 0.95;
}

.city-detail-main {
  max-width: 1000px;
  margin: -40px auto 60px;
  padding: 0 20px;
  position: relative;
  z-index: 10;
}

.btn-back-to-map {
  margin-bottom: 20px;
  padding: 10px 22px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.btn-back-to-map:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

.plan-tabs {
  display: flex;
  gap: 12px;
  margin: 24px 0;
  background: #fff;
  padding: 8px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.tab-btn {
  flex: 1;
  padding: 12px;
  border: none;
  background: none;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 10px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.tab-btn.active {
  background: var(--primary);
  color: #fff;
}

.tab-btn span {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.85;
}

.course-card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  display: none;
  margin-bottom: 35px;
}
.course-card.active {
  display: block;
}

.course-header {
  padding: 30px;
  border-bottom: 1px solid var(--border-light);
}

.course-tag {
  display: inline-block;
  padding: 5px 12px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 10px;
}

.course-body {
  padding: 30px;
}

.timeline {
  position: relative;
  padding-left: 28px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-light);
}

.step {
  position: relative;
  margin-bottom: 30px;
}
.step::before {
  content: '';
  position: absolute;
  left: -33px;
  top: 5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--primary);
}

.step-time {
  color: var(--primary);
  font-weight: 700;
  font-size: 12px;
  margin-bottom: 4px;
  display: block;
}

.step-title {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 10px;
}

.step-img {
  width: 100%;
  height: 220px;
  border-radius: var(--radius-md);
  object-fit: cover;
  margin-bottom: 10px;
  background-color: var(--bg-subtle);
}

.step-desc {
  color: var(--text-sub);
  font-size: 14px;
}

.pro-tip {
  background: #fff7ed;
  border-left: 4px solid var(--accent);
  padding: 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-top: 20px;
  font-size: 13px;
}
.pro-tip b {
  color: #9a3412;
}

.social-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 25px;
  padding: 16px 20px;
  background: #fff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.like-btn {
  background: none;
  border: 1px solid var(--border-light);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  transition: var(--transition);
}

.like-btn.liked {
  background: #fee2e2;
  color: var(--danger);
  border-color: #fca5a5;
}

.comments-section {
  margin-top: 30px;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 30px;
  border: 1px solid var(--border-light);
}

.comment-form {
  background: var(--bg-page);
  padding: 20px;
  border-radius: var(--radius-md);
  margin-bottom: 25px;
}

.form-group {
  margin-bottom: 14px;
}
.form-group label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
  font-size: 13px;
}
.comment-form input,
.comment-form textarea,
.comment-form select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  font-family: inherit;
}
.comment-form textarea {
  height: 90px;
  resize: none;
}

.smart-guard {
  background: #f1f5f9;
  padding: 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  border: 1px dashed #cbd5e1;
}
.quiz-title {
  font-size: 12px;
  color: #475569;
  margin-bottom: 8px;
  display: block;
}
.quiz-box {
  display: flex;
  align-items: center;
  gap: 10px;
}
.quiz-question {
  font-weight: 700;
  color: var(--primary);
}
.quiz-input {
  width: 120px !important;
}

.submit-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  transition: var(--transition);
}
.submit-btn:hover {
  background: var(--primary-hover);
}

.comment-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--border-light);
}
.comment-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}
.comment-author {
  font-weight: 800;
  font-size: 14px;
}
.comment-tag {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 700;
}
.tag-visited { background: #dcfce7; color: #166534; }
.tag-info { background: #dbeafe; color: #1e40af; }
.tag-curious { background: #fef3c7; color: #b45309; }
.comment-content {
  color: #334155;
  font-size: 14px;
}
.comment-date {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 6px;
  display: block;
}
.comment-gallery {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.comment-gallery img {
  width: 75px;
  height: 75px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border-light);
  cursor: pointer;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1e293b;
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  transform: translateY(100px);
  opacity: 0;
  transition: var(--transition);
  z-index: 6000;
  font-size: 13px;
  font-weight: 600;
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Keyframe Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
