/* ==========================================================================
   여정 (YEOJEONG) — Modern Editorial Travel App Design System
   Mood: Clean White, Warm Gray, Terracotta Coral & Deep Teal (No AI Neon)
   ========================================================================== */

:root {
  --bg-page: #F7F7F5;
  --bg-surface: #FFFFFF;
  --bg-subtle: #F1F1EE;
  --bg-warm-tint: #FFF8F6;

  --text-primary: #171717;
  --text-secondary: #57585E;
  --text-muted: #8E9099;

  --border-light: #E8E8E3;
  --border-strong: #D4D4CE;

  /* Brand & Day Route Colors */
  --accent-coral: #F04E30;
  --accent-coral-hover: #D93F22;
  --accent-coral-soft: #FFF1EE;

  --accent-teal: #0D7A6F;
  --accent-teal-soft: #EBF7F5;

  --accent-amber: #D97706;
  --accent-amber-soft: #FEF3C7;

  /* Platform Badges */
  --naver-green: #03B351;
  --naver-bg: #EBF9F1;
  --google-blue: #2563EB;
  --google-bg: #EFF6FF;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-pill: 9999px;

  --shadow-xs: 0 1px 2px rgba(20, 20, 20, 0.04);
  --shadow-sm: 0 4px 12px rgba(20, 20, 20, 0.05);
  --shadow-md: 0 10px 25px rgba(20, 20, 20, 0.08);
  --shadow-lg: 0 24px 48px rgba(20, 20, 20, 0.14);

  --header-height: 66px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.015em;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* ==========================================================================
   Top Header
   ========================================================================== */

.top-header {
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1000;
  gap: 16px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
  overflow-x: auto;
}

.brand-logo {
  display: flex;
  align-items: baseline;
  gap: 7px;
  text-decoration: none;
  color: var(--text-primary);
  flex-shrink: 0;
}

.brand-symbol {
  color: var(--accent-coral);
  font-size: 16px;
}

.brand-name {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-sub {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-left: 2px;
}

.region-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-subtle);
  padding: 4px;
  border-radius: var(--radius-pill);
}

.region-tab {
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.16s ease;
  white-space: nowrap;
}

.region-tab:hover {
  color: var(--text-primary);
}

.region-tab.active {
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: var(--shadow-xs);
  font-weight: 700;
}

.btn-ai-region {
  padding: 7px 13px;
  border-radius: var(--radius-pill);
  border: 1px dashed var(--border-strong);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-surface);
  transition: all 0.16s ease;
  white-space: nowrap;
}

.btn-ai-region:hover {
  border-color: var(--accent-coral);
  color: var(--accent-coral);
  background: var(--accent-coral-soft);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-ghost {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  transition: all 0.15s ease;
}

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

.btn-primary {
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 700;
  color: #FFFFFF;
  background: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
}

.btn-primary:hover {
  background: var(--accent-coral);
}

.schedule-count-badge {
  background: var(--accent-coral);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
}

.btn-primary:hover .schedule-count-badge {
  background: #FFFFFF;
  color: var(--accent-coral);
}

/* ==========================================================================
   Main Split Workspace (Left Curation / Right Map + Itinerary)
   ========================================================================== */

.split-workspace {
  display: grid;
  grid-template-columns: minmax(540px, 1.25fr) minmax(420px, 0.95fr);
  height: calc(100vh - var(--header-height));
  overflow: hidden;
}

.curation-pane {
  height: 100%;
  overflow-y: auto;
  padding: 24px 28px 60px;
}

.planner-pane {
  height: 100%;
  border-left: 1px solid var(--border-light);
  background: var(--bg-surface);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ==========================================================================
   1. Region Hero Card
   ========================================================================== */

.region-hero {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #1C1C1E;
  color: #FFFFFF;
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 26px 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.region-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.58;
  transition: transform 0.5s ease;
}

.region-hero:hover .region-hero-bg {
  transform: scale(1.02);
}

.region-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 15, 15, 0.15) 0%, rgba(15, 15, 15, 0.85) 100%);
}

.region-hero-content {
  position: relative;
  z-index: 2;
}

.region-tag-pill {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(6px);
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  margin-bottom: 10px;
}

.region-hero-title {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}

.region-hero-subtitle {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 14px;
}

.region-tip-box {
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.45;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tip-badge {
  background: var(--accent-coral);
  color: #FFF;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  flex-shrink: 0;
}

/* ==========================================================================
   2. Local Must-Haves (꼭 먹어야 할 것 & 사야 할 명물)
   ========================================================================== */

.must-have-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  margin-bottom: 24px;
}

.section-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 12px;
}

.section-eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--accent-coral);
  margin-bottom: 3px;
}

.section-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-hint {
  font-size: 12.5px;
  color: var(--text-muted);
}

.must-have-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 12px;
}

.must-card {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 15px;
  background: var(--bg-page);
  cursor: pointer;
  transition: all 0.16s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.must-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-surface);
  box-shadow: var(--shadow-xs);
}

.must-card.checked {
  border-color: var(--accent-teal);
  background: var(--accent-teal-soft);
}

.must-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.must-type-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 5px;
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}

.must-type-tag.eat {
  color: var(--accent-coral);
  background: var(--accent-coral-soft);
  border-color: transparent;
}

.must-type-tag.buy {
  color: var(--accent-teal);
  background: var(--accent-teal-soft);
  border-color: transparent;
}

.must-check-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: transparent;
  background: var(--bg-surface);
}

.must-card.checked .must-check-circle {
  background: var(--accent-teal);
  border-color: var(--accent-teal);
  color: #FFFFFF;
}

.must-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 5px;
}

.must-desc {
  font-size: 12.8px;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 10px;
}

.must-spot-hint {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 600;
}

/* ==========================================================================
   3. Category Filter Bar & Places Grid
   ========================================================================== */

.filter-sticky-bar {
  position: sticky;
  top: -24px;
  z-index: 30;
  background: rgba(247, 247, 245, 0.95);
  backdrop-filter: blur(8px);
  padding: 12px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 14px;
}

.category-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.cat-tab {
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  transition: all 0.15s ease;
}

.cat-tab:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
}

.cat-tab.active {
  background: var(--text-primary);
  color: #FFFFFF;
  border-color: var(--text-primary);
}

.filter-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-input-wrap input {
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  font-size: 13px;
  width: 210px;
}

.search-input-wrap input:focus,
#sortSelect:focus {
  outline: none;
  border-color: var(--text-primary);
}

#sortSelect {
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  font-size: 13px;
  font-weight: 500;
}

.rating-guide-bar {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12.8px;
  color: var(--text-secondary);
}

.rating-guide-left {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.badge-naver {
  background: var(--naver-bg);
  color: var(--naver-green);
  font-weight: 800;
  font-size: 11.5px;
  padding: 2px 7px;
  border-radius: 4px;
}

.badge-google {
  background: var(--google-bg);
  color: var(--google-blue);
  font-weight: 800;
  font-size: 11.5px;
  padding: 2px 7px;
  border-radius: 4px;
}

.btn-text-action {
  font-size: 12.8px;
  font-weight: 700;
  color: var(--accent-coral);
}

.btn-text-action:hover {
  text-decoration: underline;
}

/* Place Cards Grid */
.places-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(295px, 1fr));
  gap: 18px;
}

.place-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

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

.place-card.in-itinerary {
  border: 1.5px solid var(--accent-coral);
}

.place-thumb-wrap {
  position: relative;
  height: 176px;
  background: #E5E5E0;
  overflow: hidden;
  cursor: pointer;
}

.place-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.place-card:hover .place-thumb {
  transform: scale(1.04);
}

.place-cat-chip {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(23, 23, 23, 0.82);
  backdrop-filter: blur(6px);
  color: #FFFFFF;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.place-cat-chip.drive {
  background: var(--accent-teal);
}

.place-cat-chip.food {
  background: var(--accent-coral);
}

.place-cat-chip.stay {
  background: #1E293B;
}

.place-duration-chip {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-primary);
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}

.place-body {
  padding: 16px 18px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

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

.place-title {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.3;
  cursor: pointer;
}

.place-title:hover {
  color: var(--accent-coral);
}

.place-subcat {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 2px;
}

/* Dual Rating Block (Naver + Google) */
.ratings-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.rating-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
}

.rating-pill.naver {
  background: var(--naver-bg);
  color: #028A3E;
}

.rating-pill.google {
  background: var(--google-bg);
  color: #1D4ED8;
}

.review-count-label {
  font-size: 11.5px;
  color: var(--text-muted);
}

.place-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 10px;
}

/* Drive Route Checkpoints */
.drive-checkpoints {
  background: var(--accent-teal-soft);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--accent-teal);
  font-weight: 600;
  line-height: 1.45;
}

/* Review Highlight Quote */
.review-quote {
  background: var(--bg-page);
  border-left: 3px solid var(--border-strong);
  padding: 8px 11px;
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.45;
  border-radius: 0 6px 6px 0;
  margin-bottom: 10px;
}

.editor-tip-line {
  font-size: 12px;
  color: var(--text-primary);
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  padding: 7px 10px;
  border-radius: 6px;
  margin-bottom: 12px;
  line-height: 1.4;
}

.place-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: auto;
}

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

.place-footer {
  padding: 11px 18px;
  border-top: 1px solid var(--border-light);
  background: #FAFAFA;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.btn-focus-map {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.btn-focus-map:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

.day-add-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-add-day {
  padding: 6px 11px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  transition: all 0.14s ease;
}

.btn-add-day:hover {
  border-color: var(--accent-coral);
  color: var(--accent-coral);
}

.btn-add-day.added-day1 {
  background: var(--accent-coral);
  border-color: var(--accent-coral);
  color: #FFFFFF;
}

.btn-add-day.added-day2 {
  background: var(--accent-teal);
  border-color: var(--accent-teal);
  color: #FFFFFF;
}

.btn-add-day.added-day3 {
  background: var(--accent-amber);
  border-color: var(--accent-amber);
  color: #FFFFFF;
}

/* ==========================================================================
   Right Pane: Interactive Map + 1N2D Itinerary Timeline
   ========================================================================== */

.map-container-wrap {
  position: relative;
  height: 46%;
  min-height: 290px;
  width: 100%;
  border-bottom: 1px solid var(--border-light);
}

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

.map-floating-bar {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}

.map-day-filters,
.map-actions {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  padding: 4px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.map-filter-chip {
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

.map-filter-chip.active {
  background: var(--text-primary);
  color: #FFFFFF;
}

.map-filter-chip.day1-chip.active {
  background: var(--accent-coral);
}

.map-filter-chip.day2-chip.active {
  background: var(--accent-teal);
}

.btn-google-route {
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  color: var(--google-blue);
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-google-route:hover {
  background: var(--google-bg);
}

/* Custom Leaflet Numbered Markers */
.custom-map-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #18181B;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 13px;
  border: 2.5px solid #FFFFFF;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.28);
  transition: transform 0.15s ease;
}

.custom-map-pin.day-1 {
  background: var(--accent-coral);
}

.custom-map-pin.day-2 {
  background: var(--accent-teal);
}

.custom-map-pin.day-3 {
  background: var(--accent-amber);
}

.custom-map-pin.unselected {
  width: 24px;
  height: 24px;
  background: #52525B;
  font-size: 11px;
  opacity: 0.85;
}

/* Bottom Itinerary Builder */
.itinerary-builder {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-surface);
}

.itinerary-header {
  padding: 14px 18px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--border-light);
}

.itinerary-title-group h3 {
  font-size: 16px;
  font-weight: 800;
}

.itinerary-meta {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.itinerary-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-xs-outline {
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  background: var(--bg-surface);
}

.btn-xs-outline:hover {
  border-color: var(--accent-coral);
  color: var(--accent-coral);
}

.btn-xs-ghost {
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.btn-xs-ghost:hover {
  color: var(--text-primary);
  background: var(--bg-subtle);
}

/* Day Switcher Tabs */
.day-tabs-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: var(--bg-page);
  border-bottom: 1px solid var(--border-light);
  overflow-x: auto;
}

.day-tab-btn {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.day-tab-btn.active[data-day="1"] {
  background: var(--accent-coral);
  border-color: var(--accent-coral);
  color: #FFFFFF;
}

.day-tab-btn.active[data-day="2"] {
  background: var(--accent-teal);
  border-color: var(--accent-teal);
  color: #FFFFFF;
}

.day-tab-btn.active[data-day="3"] {
  background: var(--accent-amber);
  border-color: var(--accent-amber);
  color: #FFFFFF;
}

.btn-add-day-tab {
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px dashed var(--border-strong);
}

.btn-add-day-tab:hover {
  color: var(--text-primary);
  border-color: var(--text-primary);
}

/* Timeline Scroll List */
.timeline-scroll-area {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px 28px;
}

.empty-itinerary-box {
  text-align: center;
  padding: 36px 20px;
  border: 1.5px dashed var(--border-light);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
}

.empty-itinerary-box h4 {
  font-size: 15px;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.empty-itinerary-box p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.timeline-item-wrap {
  position: relative;
}

.timeline-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  box-shadow: var(--shadow-xs);
}

.timeline-card-left {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.timeline-step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-coral);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.timeline-step-num.day-2 {
  background: var(--accent-teal);
}

.timeline-step-num.day-3 {
  background: var(--accent-amber);
}

.timeline-place-info {
  min-width: 0;
}

.timeline-place-name {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.timeline-place-name:hover {
  color: var(--accent-coral);
}

.timeline-place-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.timeline-card-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.btn-icon-sm {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-icon-sm:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

/* Route Leg Connector (이동 거리 & 시간 & 구글 길찾기) */
.route-connector {
  margin: 6px 0 6px 12px;
  padding: 6px 0 6px 18px;
  border-left: 2px dashed var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
}

.route-leg-badge {
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-weight: 600;
}

.route-leg-link {
  color: var(--google-blue);
  text-decoration: none;
  font-weight: 600;
  font-size: 11.5px;
}

.route-leg-link:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Modals & Schedule Report Sheet
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(15, 15, 15, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-backdrop.hidden,
.hidden {
  display: none !important;
}

.modal-card {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.modal-card.modal-large {
  max-width: 920px;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-header h2 {
  font-size: 20px;
  font-weight: 800;
}

.modal-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-subtle);
  font-size: 15px;
  font-weight: 700;
}

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

.modal-footer {
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Forms */
.form-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.label-sub {
  font-weight: 500;
  color: var(--text-muted);
  font-size: 11.5px;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  font-size: 14px;
}

.field-help {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.modal-lead {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.quick-preset-cities {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: var(--bg-page);
  padding: 12px;
  border-radius: var(--radius-sm);
}

.quick-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-secondary);
}

.chip-btn {
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  font-size: 12.5px;
  font-weight: 700;
}

.chip-btn:hover {
  border-color: var(--accent-coral);
  color: var(--accent-coral);
}

.config-status-card {
  background: var(--accent-teal-soft);
  border: 1px solid #99F6E4;
  padding: 14px 16px;
  border-radius: var(--radius-md);
}

.config-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  background: var(--accent-teal);
  color: #FFF;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
}

.config-status-card h4 {
  font-size: 14.5px;
  margin-bottom: 4px;
}

.config-status-card p {
  font-size: 12.8px;
  color: var(--text-secondary);
}

.status-box {
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-page);
  font-size: 13px;
  font-weight: 600;
}

/* Printable Schedule Sheet Styling */
.sheet-banner {
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.sheet-days-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.sheet-day-column {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  background: var(--bg-surface);
}

.sheet-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 2px solid var(--text-primary);
}

.sheet-step-row {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border-light);
}

.sheet-step-row:last-child {
  border-bottom: none;
}

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast-msg {
  background: #18181B;
  color: #FFFFFF;
  padding: 11px 18px;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  animation: fadeUp 0.2s ease;
}

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

/* Responsive & Print */
@media (max-width: 1080px) {
  .split-workspace {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }
  .curation-pane {
    height: auto;
    overflow: visible;
  }
  .planner-pane {
    height: 760px;
    border-left: none;
    border-top: 2px solid var(--border-light);
  }
}

@media print {
  .top-header,
  .split-workspace,
  .modal-header-actions,
  .btn-close {
    display: none !important;
  }
  .modal-backdrop {
    position: static;
    background: none;
    padding: 0;
  }
  .modal-card,
  .modal-card.modal-large {
    max-width: 100%;
    max-height: none;
    box-shadow: none;
  }
}
