:root {
  --bg: #FFFDF8;
  --bg-warm: #FBF7EF;
  --bg-alt: #F8FAFC;
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --primary-soft: #EFF6FF;
  --soft-blue: #DBEAFE;
  --mint: #14B8A6;
  --mint-soft: #CCFBF1;
  --amber: #F59E0B;
  --amber-soft: #FEF3C7;
  --amber-deep: #FDE68A;
  --text: #111827;
  --text-soft: #1F2937;
  --gray: #6B7280;
  --gray-light: #9CA3AF;
  --border: #E5E7EB;
  --border-warm: #EDE7DA;
  --card: #FFFFFF;
  --shadow-xs: 0 1px 2px rgba(17, 24, 39, 0.04);
  --shadow-sm: 0 2px 6px -1px rgba(17, 24, 39, 0.06);
  --shadow: 0 6px 16px -4px rgba(17, 24, 39, 0.10);
  --shadow-lg: 0 24px 50px -12px rgba(17, 24, 39, 0.20);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-warm);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  height: 100vh;
  overflow: hidden;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; }

.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* =============== TOP BAR =============== */
.top-bar {
  height: 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 22px 0 110px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 50;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark {
  width: 30px; height: 30px;
  border-radius: 9px;
  background: var(--primary-soft);
  display: inline-flex; align-items: center; justify-content: center;
}
.brand-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.brand-name { font-weight: 800; font-size: 18px; letter-spacing: -0.01em; }
.brand-tag {
  font-size: 12px; color: var(--gray);
  border-left: 1px solid var(--border);
  padding-left: 12px;
  margin-left: 4px;
  white-space: nowrap;
}
.top-right { display: flex; align-items: center; gap: 10px; }
.ghost-btn {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600;
  color: var(--text-soft);
  padding: 8px 12px;
  border-radius: 10px;
  transition: background 0.15s;
}
.ghost-btn:hover { background: var(--bg-alt); }
.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--mint), var(--primary));
  color: white;
  font-size: 12px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* =============== SPLIT =============== */
.split {
  flex: 1;
  display: flex;
  min-height: 0;
}
.left-pane {
  width: 440px;
  flex-shrink: 0;
  background: var(--card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.right-pane {
  flex: 1;
  background: #F1F5F9;
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
}

/* =============== ROUTE SUMMARY BAR =============== */
.route-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #FFFDF8 0%, #FFFFFF 100%);
  flex-shrink: 0;
}
.rs-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 3px;
}
.rs-value {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.005em;
}
.rs-toggle {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--bg-alt);
  color: var(--gray);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.rs-toggle:hover { background: var(--soft-blue); color: var(--primary); }
.rs-toggle svg { transition: transform 0.25s; }
.rs-toggle.collapsed svg { transform: rotate(180deg); }

/* =============== BUILDER =============== */
.builder {
  padding: 14px 20px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-warm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
  overflow: hidden;
  max-height: 380px;
  transition: max-height 0.3s ease, padding 0.25s ease, opacity 0.2s ease;
}
.builder.collapsed {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-bottom: none;
  opacity: 0;
}
.builder-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.builder-row-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  width: 44px;
  flex-shrink: 0;
}
.chip-scroller {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  flex: 1;
  padding: 2px 1px;
  scrollbar-width: none;
}
.chip-scroller::-webkit-scrollbar { display: none; }
.chip {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 7px 12px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.12s;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.selected {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 4px 10px -2px rgba(37, 99, 235, 0.35);
}

.build-btn {
  margin-top: 4px;
  background: var(--text);
  color: white;
  font-size: 13.5px;
  font-weight: 600;
  padding: 11px 16px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.15s;
}
.build-btn:hover { background: var(--primary); }
.build-btn:active { transform: scale(0.98); }

/* =============== RESULT =============== */
.result-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px 16px;
  position: relative;
  scrollbar-width: thin;
}
.result-wrap::-webkit-scrollbar { width: 6px; }
.result-wrap::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }

/* Loading overlay */
.loading-state {
  position: absolute;
  inset: 0;
  background: rgba(255, 253, 248, 0.96);
  backdrop-filter: blur(8px);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 5;
  text-align: center;
  padding: 24px;
}
.loading-state.active { display: flex; animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.loading-pulse {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}
.loading-pulse span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  animation: bounce 1.4s ease-in-out infinite;
}
.loading-pulse span:nth-child(2) { animation-delay: 0.2s; background: var(--mint); }
.loading-pulse span:nth-child(3) { animation-delay: 0.4s; background: var(--amber); }
@keyframes bounce {
  0%, 80%, 100% { transform: scale(0.5); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}
.loading-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.loading-step {
  font-size: 13px;
  color: var(--gray);
  min-height: 20px;
}

/* Why card */
.why-card {
  background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
  border: 1px solid var(--amber-deep);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 18px;
}
.why-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.why-icon { font-size: 16px; }
.why-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #92400E;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.why-body {
  font-size: 13.5px;
  color: #78350F;
  line-height: 1.6;
  margin-bottom: 12px;
}
.route-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(146, 64, 14, 0.25);
  font-size: 12px;
  color: #78350F;
}
.route-meta strong { font-weight: 700; }
.meta-sep {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: rgba(146, 64, 14, 0.4);
}

/* Section heads */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
  padding: 0 2px;
}
.section-head h3 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.005em;
}
.section-sub {
  font-size: 11px;
  color: var(--gray);
}

/* Timeline */
.timeline-section {
  margin-bottom: 22px;
}
.stops {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stop {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid transparent;
  position: relative;
}
.stop:hover { background: var(--bg-alt); }
.stop.active {
  background: var(--primary-soft);
  border-color: var(--primary);
}
.stop.active .stop-num {
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18);
}
.stop-num-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  padding-top: 2px;
}
.stop-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.2s;
}
.stop-line {
  width: 2px;
  flex: 1;
  background: var(--border);
  margin-top: 4px;
  min-height: 14px;
}
.stop:last-child .stop-line { display: none; }
.stop-body { flex: 1; min-width: 0; }
.stop-name { font-size: 14px; font-weight: 700; margin-bottom: 1px; }
.stop-type { font-size: 11.5px; color: var(--gray); margin-bottom: 6px; }
.stop-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 10.5px;
}
.stop-tag {
  background: var(--bg-alt);
  color: var(--gray);
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-weight: 500;
}
.stop.active .stop-tag {
  background: white;
  border-color: white;
  color: var(--primary);
  font-weight: 600;
}
.stop-walk {
  font-size: 10.5px;
  color: var(--gray);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0 2px 12px;
  margin: -2px 0;
}
.stop-walk::before {
  content: '';
  width: 2px;
  height: 14px;
  border-left: 2px dashed var(--gray-light);
  margin-right: 8px;
}

/* Refine */
.refine-section { margin-bottom: 18px; }
.refine-hint {
  font-size: 11.5px;
  color: var(--gray);
  margin: 2px 0 8px;
}
.refine-summary {
  font-size: 11.5px;
  color: var(--gray);
  margin: 8px 0 0;
  line-height: 1.45;
}
.refine-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.refine-chip {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 500;
  transition: all 0.15s;
}
.refine-chip:hover { border-color: var(--primary); color: var(--primary); }
.refine-chip.applied {
  background: var(--mint);
  color: white;
  border-color: var(--mint);
  box-shadow: 0 4px 8px -2px rgba(20, 184, 166, 0.35);
}

/* Action bar */
.action-bar {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: var(--card);
  flex-shrink: 0;
}
.act-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--card);
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  transition: all 0.15s;
  flex: 1;
}
.act-btn:hover { border-color: var(--primary); color: var(--primary); }
.act-btn.primary {
  background: var(--text);
  color: white;
  border-color: var(--text);
  flex: 1.6;
}
.act-btn.primary:hover { background: var(--primary); border-color: var(--primary); color: white; }

/* =============== MAP =============== */
.map-toolbar {
  height: 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 4;
}
.map-loc {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-alt);
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--gray);
  font-weight: 500;
}
.map-loc svg { color: var(--gray); }
.map-controls { display: flex; gap: 4px; }
.map-provider-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-right: 4px;
  padding: 2px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.map-provider-btn {
  height: 28px;
  padding: 0 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--gray);
  font-size: 11px;
  font-weight: 700;
  transition: all 0.12s;
}
.map-provider-btn:hover { color: var(--text); }
.map-provider-btn.active {
  background: var(--card);
  color: var(--primary);
  box-shadow: 0 1px 4px rgba(17, 24, 39, 0.08);
}
.map-ctrl {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  font-size: 16px;
  color: var(--gray);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.12s;
}
.map-ctrl:hover { background: var(--bg-alt); color: var(--text); }

.map-stage {
  flex: 1 1 0;
  min-height: 320px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.kakao-map {
  position: relative;
  z-index: 0;
  width: 100%;
  height: 100%;
  min-height: inherit;
  background: #F1F5F9;
}

.map-status {
  position: absolute;
  top: 16px;
  right: 16px;
  width: min(360px, calc(100% - 32px));
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  box-shadow: var(--shadow);
  z-index: 7;
}
.map-status[hidden] {
  display: none;
}
.map-status[data-mode="warning"] {
  border-color: var(--amber-deep);
  color: #78350F;
  background: rgba(255, 251, 235, 0.96);
}
.map-status[data-mode="error"] {
  border-color: #FCA5A5;
  color: #991B1B;
  background: rgba(254, 242, 242, 0.96);
}

.kakao-route-marker {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: 3px solid white;
  box-shadow: 0 8px 16px -6px rgba(37, 99, 235, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}
.kakao-route-marker:hover {
  transform: scale(1.08);
}
.kakao-route-marker.active {
  background: var(--mint);
  transform: scale(1.1);
  box-shadow:
    0 0 0 8px rgba(20, 184, 166, 0.22),
    0 10px 18px -6px rgba(20, 184, 166, 0.5);
}

/* Floating place card */
.float-card {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px 14px 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: var(--shadow-lg);
  width: min(420px, calc(100% - 40px));
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.4, 1);
}
.float-card.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.fc-num {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--mint);
  color: white;
  font-size: 13px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 10px -2px rgba(20, 184, 166, 0.4);
}
.fc-body { flex: 1; min-width: 0; }
.fc-name { font-size: 14.5px; font-weight: 700; margin-bottom: 1px; }
.fc-type { font-size: 11.5px; color: var(--gray); margin-bottom: 6px; }
.fc-meta { display: flex; gap: 10px; font-size: 11px; color: var(--gray); margin-bottom: 6px; }
.fc-why { font-size: 12px; color: var(--text-soft); line-height: 1.5; }
.fc-close {
  width: 24px; height: 24px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray);
  flex-shrink: 0;
  transition: all 0.12s;
}
.fc-close:hover { background: var(--bg-alt); color: var(--text); }

/* Map legend */
.map-legend {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-soft);
  box-shadow: var(--shadow-sm);
  z-index: 6;
  pointer-events: none;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
}
.legend-line {
  width: 18px; height: 3px;
  border-radius: 2px;
  flex-shrink: 0;
}
.legend-line-walk {
  background: #10B981;
}
.legend-line-taxi {
  background: #FF3B86;
  height: 4px;
}
.legend-line-estimated {
  background: repeating-linear-gradient(90deg, #9CA3AF 0 4px, transparent 4px 7px);
}

/* Ask Miro FAB */
.ask-fab {
  position: absolute;
  bottom: 22px;
  right: 22px;
  background: var(--text);
  color: white;
  padding: 10px 16px 10px 10px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 12px 24px -8px rgba(17, 24, 39, 0.35);
  transition: transform 0.15s, box-shadow 0.15s;
  z-index: 6;
}
.ask-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -8px rgba(17, 24, 39, 0.4);
}
.ask-ava {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--mint), var(--primary));
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
}
.ask-text { padding-right: 4px; }

/* =============== ASK DRAWER =============== */
.ask-drawer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
}
.ask-drawer.open { display: block; }
.ask-overlay {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.4);
  animation: fadeIn 0.2s ease;
}
.ask-panel {
  position: absolute;
  top: 0; right: 0;
  bottom: 0;
  width: min(420px, 100%);
  background: var(--card);
  display: flex;
  flex-direction: column;
  box-shadow: -20px 0 60px -12px rgba(17, 24, 39, 0.25);
  animation: slideRight 0.3s cubic-bezier(0.2, 0.8, 0.4, 1);
}
@keyframes slideRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
.ask-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.ask-id { display: flex; align-items: center; gap: 12px; }
.ask-ava-lg {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--mint), var(--primary));
  color: white;
  font-size: 16px;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.ask-ava-lg::after {
  content: '';
  position: absolute;
  bottom: 0; right: 0;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: #10B981;
  border: 2px solid white;
}
.ask-name { font-size: 15px; font-weight: 700; }
.ask-bio { font-size: 11.5px; color: var(--gray); }
.ask-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg-alt);
  color: var(--gray);
  display: flex; align-items: center; justify-content: center;
}
.ask-close:hover { background: var(--border); color: var(--text); }

.ask-thread {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}
.ask-msg { max-width: 90%; animation: msgIn 0.3s ease; }
@keyframes msgIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.ask-msg.from-miro { align-self: flex-start; }
.ask-msg.from-user { align-self: flex-end; }
.ask-bubble {
  padding: 11px 15px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.5;
}
.from-miro .ask-bubble {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text);
  border-bottom-left-radius: 5px;
}
.from-user .ask-bubble {
  background: var(--primary);
  color: white;
  border-bottom-right-radius: 5px;
}

.ask-typing {
  display: flex; gap: 4px;
  padding: 12px 16px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 16px 16px 16px 5px;
  align-self: flex-start;
  align-items: center;
}
.ask-typing span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gray-light);
  animation: typingBounce 1.4s ease-in-out infinite;
}
.ask-typing span:nth-child(2) { animation-delay: 0.2s; }
.ask-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40% { transform: translateY(-3px); opacity: 1; }
}

.ask-suggest-head {
  font-size: 11px;
  font-weight: 700;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 6px;
  margin-bottom: 2px;
}
.ask-suggestions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}
.ask-suggest {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  transition: all 0.15s;
}
.ask-suggest:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateX(2px);
}

.ask-composer {
  display: flex;
  gap: 8px;
  padding: 14px 20px 18px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--card);
}
#ask-input {
  flex: 1;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 13.5px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
#ask-input:focus {
  background: var(--card);
  border-color: var(--primary);
}
#ask-input::placeholder { color: var(--gray-light); }
.ask-send {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: transform 0.1s;
}
.ask-send:hover { transform: scale(1.05); }

/* =============== TOAST =============== */
.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: white;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s;
  z-index: 200;
  box-shadow: var(--shadow-lg);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* =============== MOBILE =============== */
@media (max-width: 880px) {
  html, body { overflow: auto; height: auto; }
  .app { height: auto; min-height: 100vh; }

  .top-bar {
    padding: 10px 14px 10px 100px;
    height: auto;
    flex-wrap: wrap;
    gap: 6px;
  }
  .brand-tag { display: none; }
  .ghost-btn span { display: none; }

  .split { flex-direction: column; }

  /* Map first on mobile */
  .right-pane {
    order: 1;
    height: 56vh;
    min-height: 360px;
  }
  .left-pane {
    order: 2;
    width: 100%;
    border-right: none;
    border-top: 1px solid var(--border);
  }

  .map-stage { min-height: 280px; }
  .ask-fab { bottom: 14px; right: 14px; padding: 8px 14px 8px 8px; font-size: 12px; }
  .ask-ava { width: 24px; height: 24px; font-size: 11px; }
  .map-legend { font-size: 10px; padding: 6px 10px; top: 10px; left: 10px; }

  .float-card { width: calc(100% - 28px); padding: 12px; }

  .result-wrap { padding: 16px; }
  .builder { padding: 12px 16px 14px; }
  .route-summary-bar { padding: 14px 16px; }
  .action-bar { padding: 10px 16px; position: sticky; bottom: 0; }

  .ask-panel { width: 100%; }
}

@media (max-width: 480px) {
  .left-pane .builder-row-label { width: 38px; font-size: 10px; }
}

/* =================================================================
   ONBOARDING (3-step first-use flow)
   ================================================================= */

.app.hidden {
  display: none !important;
}

.onboarding {
  position: fixed;
  inset: 0;
  background: var(--bg-warm);
  background-image:
    radial-gradient(circle at 90% 10%, rgba(245, 158, 11, 0.08), transparent 50%),
    radial-gradient(circle at 10% 90%, rgba(37, 99, 235, 0.06), transparent 50%);
  z-index: 90;
  display: none;
  flex-direction: column;
  overflow-y: auto;
}
.onboarding.active {
  display: flex;
  animation: obFadeIn 0.35s ease;
}
@keyframes obFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.ob-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 32px 12px;
  flex-shrink: 0;
}
.ob-brand { display: flex; align-items: center; gap: 10px; }
.ob-brand-mark {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: var(--primary-soft);
  display: inline-flex; align-items: center; justify-content: center;
}
.ob-brand-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--primary); }
.ob-brand-name { font-weight: 800; font-size: 18px; letter-spacing: -0.01em; }

.ob-progress-wrap { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.ob-progress {
  display: flex;
  gap: 6px;
  width: 180px;
}
.ob-step {
  flex: 1;
  height: 5px;
  background: var(--border);
  border-radius: 999px;
  transition: background 0.3s ease;
}
.ob-step.done { background: var(--primary); }
.ob-step.active {
  background: var(--primary);
  box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4);
  animation: stepPulse 1.6s ease-in-out infinite;
}
@keyframes stepPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4); }
  50% { box-shadow: 0 0 0 4px rgba(37, 99, 235, 0); }
}
.ob-progress-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray);
  letter-spacing: 0.04em;
}

.ob-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px 56px;
}

.ob-screen {
  display: none;
  max-width: 640px;
  width: 100%;
  text-align: center;
}
.ob-screen.active {
  display: block;
  animation: obSlideUp 0.4s cubic-bezier(0.2, 0.8, 0.4, 1);
}
@keyframes obSlideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.ob-q-h1 {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 12px;
  color: var(--text);
}
.ob-q-sub {
  font-size: 16px;
  color: var(--gray);
  margin-bottom: 36px;
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
}

.ob-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-bottom: 32px;
}
.ob-options-time {
  grid-template-columns: repeat(4, 1fr);
}
.ob-options-area {
  grid-template-columns: repeat(3, 1fr);
}
.ob-options-mood {
  grid-template-columns: repeat(3, 1fr);
}
.ob-option-wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 14px;
  row-gap: 2px;
  align-items: center;
  padding: 14px 18px;
}
.ob-option-wide .ob-emoji {
  grid-row: 1 / span 2;
  align-self: center;
  margin-bottom: 0;
  font-size: 24px;
}
.ob-option-wide .ob-option-label {
  grid-column: 2;
  align-self: end;
}
.ob-option-wide .ob-option-sub {
  grid-column: 2;
  align-self: start;
}

.ob-option {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 18px 14px 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  box-shadow: var(--shadow-xs);
}
.ob-option:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px -6px rgba(37, 99, 235, 0.15);
}
.ob-option.selected {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: 0 8px 20px -6px rgba(37, 99, 235, 0.25);
}
.ob-option.selected::after {
  content: '✓';
  position: absolute;
  top: 12px;
  right: 12px;
  width: 22px;
  height: 22px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: checkPop 0.25s cubic-bezier(0.2, 1.6, 0.4, 1);
}
@keyframes checkPop {
  from { transform: scale(0); }
  to { transform: scale(1); }
}
.ob-emoji {
  font-size: 26px;
  line-height: 1;
  margin-bottom: 6px;
}
.ob-option-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.005em;
}
.ob-option-sub {
  font-size: 12px;
  color: var(--gray);
  line-height: 1.4;
}

.ob-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.ob-back, .ob-next {
  padding: 13px 22px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.15s ease;
}
.ob-back {
  background: transparent;
  color: var(--gray);
  border: 1px solid var(--border);
  min-width: 90px;
}
.ob-back:hover:not(:disabled) {
  color: var(--text);
  border-color: var(--gray-light);
  background: var(--card);
}
.ob-back:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.ob-next {
  background: var(--text);
  color: white;
  min-width: 220px;
  margin-left: auto;
  box-shadow: 0 8px 18px -6px rgba(17, 24, 39, 0.3);
}
.ob-next:hover:not(:disabled) {
  background: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -6px rgba(37, 99, 235, 0.4);
}
.ob-next:disabled {
  background: var(--border);
  color: var(--gray);
  cursor: not-allowed;
  box-shadow: none;
}

/* Full-page loading (between onboarding and result) */
.ob-loading {
  position: fixed;
  inset: 0;
  background: var(--bg-warm);
  background-image:
    radial-gradient(circle at 50% 40%, rgba(37, 99, 235, 0.06), transparent 50%);
  z-index: 95;
  display: none;
  align-items: center;
  justify-content: center;
}
.ob-loading.active {
  display: flex;
  animation: obFadeIn 0.3s ease;
}
.ob-loading-content {
  text-align: center;
  padding: 24px;
}
.ob-loading-pulse {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
}
.ob-loading-pulse span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  animation: bounce 1.4s ease-in-out infinite;
}
.ob-loading-pulse span:nth-child(2) { animation-delay: 0.2s; background: var(--mint); }
.ob-loading-pulse span:nth-child(3) { animation-delay: 0.4s; background: var(--amber); }
.ob-loading-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.ob-loading-step {
  font-size: 14px;
  color: var(--gray);
  min-height: 20px;
}

/* "+ New" accent button in top bar */
.ghost-btn-accent {
  color: var(--primary);
  background: var(--primary-soft);
}
.ghost-btn-accent:hover {
  background: var(--soft-blue);
}

/* rs-toggle with label */
.rs-toggle {
  width: auto;
  padding: 0 12px;
  height: 32px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.rs-toggle-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}
.rs-toggle:hover .rs-toggle-label { color: var(--primary); }

/* =================================================================
   ONBOARDING — Mobile
   ================================================================= */
@media (max-width: 720px) {
  .ob-header { padding: 16px 18px 8px; }
  .ob-progress { width: 130px; }
  .ob-progress-label { font-size: 10px; }
  .ob-stage { padding: 18px 18px 36px; }
  .ob-q-h1 { font-size: 26px; }
  .ob-q-sub { font-size: 14px; margin-bottom: 24px; }
  .ob-options {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 24px;
  }
  .ob-options-time {
    grid-template-columns: 1fr 1fr;
  }
  .ob-option { padding: 14px 12px 12px; }
  .ob-emoji { font-size: 22px; }
  .ob-option-label { font-size: 14px; }
  .ob-option-sub { font-size: 11px; }
  .ob-back { min-width: 72px; padding: 11px 16px; font-size: 13px; }
  .ob-next { min-width: 0; padding: 11px 16px; font-size: 13px; flex: 1; }
  .ob-loading-title { font-size: 18px; }
}
@media (max-width: 380px) {
  .ob-options { grid-template-columns: 1fr; }
}

/* =================================================================
   KANDID SPOT — first-screen hero (onboarding step 1 only)
   Scoped via .ob-screen-intro / .ks-* classes so steps 2/3, the
   loading screen, and the post-onboarding app are unaffected.
   ================================================================= */
.ob-screen-intro { text-align: center; }

.ks-hero {
  margin: 0 auto 20px;
  max-width: 560px;
  padding: 4px 8px 0;
}

.ks-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-soft);
  background: var(--card);
  border: 1px solid var(--border);
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  box-shadow: var(--shadow-xs);
}
.ks-eyebrow-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px var(--mint-soft);
}

.ks-headline {
  margin: 18px 0 0;
  font-size: 40px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text);
}
.ks-headline-accent {
  background: linear-gradient(120deg, var(--primary) 0%, var(--mint) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.ks-lead {
  margin: 14px auto 0;
  max-width: 480px;
  font-size: 15.5px;
  color: var(--gray);
  line-height: 1.55;
}

.ks-flow {
  list-style: none;
  margin: 22px auto 0;
  padding: 10px 12px;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-xs);
}
.ks-flow li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-soft);
  padding: 2px 4px;
}
.ks-flow-num {
  width: 20px; height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.ks-flow-arrow {
  color: var(--gray-light);
  font-size: 13px;
}
.ks-flow-result .ks-flow-label {
  color: var(--mint);
  font-weight: 700;
}

.ks-step-label {
  margin: 28px auto 14px;
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray);
}

@media (max-width: 720px) {
  .ks-hero { margin-bottom: 14px; }
  .ks-headline { font-size: 30px; }
  .ks-lead { font-size: 14.5px; }
  .ks-flow { padding: 8px 10px; }
  .ks-flow li { font-size: 12px; }
  .ks-step-label { margin-top: 20px; margin-bottom: 10px; }
}

@media (max-width: 380px) {
  .ks-flow {
    flex-wrap: wrap;
    gap: 4px;
  }
}

/* =================================================================
   KANDID SPOT — result-screen UX additions
   Scoped to .ks-* so existing rules (.stop, .why-card, .timeline-*,
   .ask-*, .ob-*) are untouched.
   ================================================================= */

/* Route-summary strapline */
.rs-strap {
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--gray);
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
}

/* Why-card structured bullets */
.ks-why-list {
  list-style: none;
  margin: 8px 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ks-why-list li {
  position: relative;
  padding-left: 18px;
  font-size: 12.5px;
  color: #78350F;
  line-height: 1.5;
}
.ks-why-list li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #92400E;
  opacity: 0.65;
}

/* Confidence card */
.ks-confidence {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px 12px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-xs);
}
.ks-conf-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.ks-conf-title {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
}
.ks-conf-sub {
  font-size: 11px;
  color: var(--gray);
}
.ks-conf-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
}
.ks-conf-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-soft);
}
.ks-conf-check {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--mint-soft);
  color: var(--mint);
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

/* Stop role pill + per-stop actions (rendered by app.js) */
.ks-stop-role {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.ks-stop-why {
  font-size: 12px;
  color: var(--gray);
  line-height: 1.45;
  margin-top: 6px;
}
.ks-stop-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}
.ks-stop-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-soft);
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.ks-stop-link:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.ks-stop-link.is-disabled {
  color: var(--gray-light);
  background: var(--bg-alt);
  cursor: not-allowed;
  pointer-events: none;
}
.ks-stop-link .ks-link-mark {
  width: 16px; height: 16px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9.5px;
  font-weight: 800;
  color: white;
}
.ks-stop-link[data-source="naver"] .ks-link-mark { background: #03C75A; }
.ks-stop-link[data-source="kakao"] .ks-link-mark { background: #FAE100; color: #111; }

/* Import teaser card */
.ks-import {
  background: linear-gradient(135deg, #F0FDFA 0%, #FFFFFF 100%);
  border: 1px solid var(--mint-soft);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 22px;
}
.ks-import-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.ks-import-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--mint-soft);
  border-radius: 9px;
  font-size: 16px;
}
.ks-import-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.005em;
}
.ks-import-sub {
  font-size: 11.5px;
  color: var(--gray);
  margin-top: 1px;
}
.ks-import-soon {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mint);
  background: var(--mint-soft);
  padding: 4px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.ks-import-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.ks-import-opt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  text-align: left;
  cursor: not-allowed;
  opacity: 0.7;
}
.ks-import-opt-mark {
  width: 22px; height: 22px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
}
.ks-import-opt-mark[data-source="naver"] { background: #03C75A; }
.ks-import-opt-mark[data-source="kakao"] { background: #FAE100; color: #111; }
.ks-import-opt-mark[data-source="instagram"] {
  background: linear-gradient(135deg, #F58529, #DD2A7B 50%, #515BD4);
}
.ks-import-opt-mark[data-source="google"] {
  background: linear-gradient(135deg, #4285F4, #34A853);
}

@media (max-width: 720px) {
  .ks-conf-list { grid-template-columns: 1fr 1fr; }
  .ks-import-options { grid-template-columns: 1fr; }
}
@media (max-width: 380px) {
  .ks-conf-list { grid-template-columns: 1fr; }
}

/* =================================================================
   KANDID SPOT — Hybrid onboarding flow (required 3 + optional 2)
   ================================================================= */

/* Desktop-only floating ambient emoji "photo" accents on landing.
   Hidden completely on touch / mobile per UX spec. */
.ks-floats {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.ks-float {
  position: absolute;
  font-size: 30px;
  opacity: 0;
  filter: drop-shadow(0 8px 18px rgba(17, 24, 39, 0.12));
  animation: ksFloatFade 9s ease-in-out infinite;
}
.ks-float-1 { top: 14%; left: 8%; animation-delay: 0s; }
.ks-float-2 { top: 22%; right: 10%; animation-delay: 1.2s; font-size: 26px; }
.ks-float-3 { bottom: 26%; left: 12%; animation-delay: 2.6s; font-size: 28px; }
.ks-float-4 { bottom: 18%; right: 14%; animation-delay: 4.0s; }
.ks-float-5 { top: 50%; left: 4%; animation-delay: 5.4s; font-size: 24px; }

@keyframes ksFloatFade {
  0%, 100% { opacity: 0; transform: translateY(0); }
  20%, 80% { opacity: 0.55; transform: translateY(-8px); }
  50%      { opacity: 0.75; transform: translateY(-14px); }
}

/* Hide ambient floats on touch / small screens entirely */
@media (hover: none), (pointer: coarse), (max-width: 720px) {
  .ks-floats { display: none; }
}

/* Ensure stage / header sit above the ambient floats */
.ob-stage { position: relative; z-index: 1; }
.ob-header { position: relative; z-index: 2; }

/* Step helper text (editorial subtitle under step label) */
.ks-step-helper {
  display: block;
  margin: 0 auto 18px;
  max-width: 460px;
  font-size: 13.5px;
  color: var(--gray);
  text-align: center;
}

/* Optional context note input (Step 1) */
.ob-context-field {
  display: block;
  max-width: 480px;
  margin: -8px auto 24px;
  text-align: left;
}
.ob-context-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 6px;
}
.ob-context-label em {
  font-style: normal;
  font-weight: 500;
  color: var(--gray-light);
  text-transform: none;
  letter-spacing: 0;
  margin-left: 4px;
}
.ob-context-field input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  font-size: 14px;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.ob-context-field input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}
.ob-context-hint {
  display: block;
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--gray-light);
}

/* Dual-CTA action row (Step 3, Step 4, Step 5) */
.ob-actions-dual {
  flex-wrap: wrap;
  row-gap: 10px;
}
.ob-actions-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-wrap: wrap;
}
.ob-actions-note {
  margin-top: 10px;
  font-size: 12px;
  color: var(--gray-light);
  text-align: right;
}

/* Secondary "Customize more" — quiet outline button */
.ob-customize-more {
  padding: 13px 18px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 600;
  background: var(--card);
  color: var(--text-soft);
  border: 1px solid var(--border);
  transition: all 0.15s ease;
}
.ob-customize-more:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}
.ob-customize-more:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* "Show my route" — uses .ob-next styling already; just emphasize on Step 3 */
.ob-show-route { min-width: 200px; }

/* Skip — soft, never blocking */
.ob-skip {
  padding: 13px 16px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 600;
  background: transparent;
  color: var(--gray);
  border: 1px dashed var(--border);
  transition: all 0.15s ease;
}
.ob-skip:hover {
  color: var(--text-soft);
  border-color: var(--gray-light);
  background: var(--bg-warm);
}

/* Optional-step tag pill above the headline */
.ks-optional-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mint);
  background: var(--mint-soft);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

/* Optional screens — slightly different background tint to feel "extra" */
.ob-screen-optional .ob-q-h1 {
  margin-bottom: 8px;
}

/* =========================
   Step 4 — Itinerary shapes
   ========================= */
.ob-shapes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  max-width: 560px;
  margin: 0 auto 28px;
  text-align: left;
}
.ob-shape {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-xs);
  text-align: left;
  position: relative;
}
.ob-shape:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px -6px rgba(37, 99, 235, 0.15);
}
.ob-shape.selected {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: 0 8px 20px -6px rgba(37, 99, 235, 0.25);
}
.ob-shape.selected::after {
  content: '✓';
  position: absolute;
  top: 14px;
  right: 14px;
  width: 22px;
  height: 22px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ob-shape-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.ob-shape-seq {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-dark);
  letter-spacing: 0.005em;
}
.ob-shape-desc {
  font-size: 13px;
  color: var(--gray);
  line-height: 1.5;
}

/* =========================
   Step 5 — Place refinement
   ========================= */
.ob-refine-anchors {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 560px;
  margin: 0 auto 16px;
  padding: 0;
}
.ob-refine-anchor {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  box-shadow: var(--shadow-xs);
}
.ob-refine-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.ob-refine-role {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.005em;
}
.ob-refine-hint {
  font-size: 12px;
  color: var(--gray);
}
.ob-refine-prefs {
  display: inline-flex;
  background: var(--bg-warm);
  border: 1px solid var(--border-warm);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
  flex-shrink: 0;
}
.ob-pref {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray);
  background: transparent;
  border: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.ob-pref:hover { color: var(--text-soft); }
.ob-pref.active {
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow-xs);
}
.ob-pref[data-pref="heart"].active {
  color: #BE123C;
}
.ob-pref[data-pref="pin"].active {
  color: var(--primary);
}
.ob-refine-foot {
  max-width: 560px;
  margin: 0 auto 24px;
  text-align: center;
  font-size: 12px;
  color: var(--gray-light);
  line-height: 1.5;
}

/* =========================
   Onboarding — Mobile / touch refinements
   ========================= */
@media (max-width: 720px) {
  .ob-screen-intro { text-align: center; }
  .ks-step-helper { font-size: 13px; margin-bottom: 14px; }
  .ob-context-field { margin: -4px auto 18px; }
  .ob-actions-dual { flex-direction: column; align-items: stretch; }
  .ob-actions-dual .ob-back { width: 100%; min-width: 0; }
  .ob-actions-right { width: 100%; }
  .ob-actions-right .ob-customize-more,
  .ob-actions-right .ob-skip,
  .ob-actions-right .ob-next { flex: 1; min-width: 0; padding: 12px 14px; font-size: 13px; }
  .ob-actions-note { text-align: center; }
  .ob-shape { padding: 14px 16px; }
  .ob-shape-name { font-size: 15px; }
  .ob-refine-anchor {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .ob-refine-prefs { align-self: flex-start; }
  .ks-optional-tag { font-size: 10px; padding: 4px 10px; }
}

/* =================================================================
   Kandid Spot editorial collage migration
   Visual-only override layer based on Kandid_Spot_Claude_Design.
   ================================================================= */
:root {
  --bg: #F4F1EA;
  --bg-warm: #F4F1EA;
  --bg-alt: #F7F5EF;
  --primary: #1B3FE0;
  --primary-dark: #1732B8;
  --primary-soft: #EEF0FF;
  --soft-blue: #DDE4FF;
  --mint: #35CFA1;
  --mint-soft: #DFF9EF;
  --amber: #FFD23D;
  --amber-soft: #FFF4BD;
  --amber-deep: #FFD23D;
  --pink: #FF3B86;
  --text: #0E0E0C;
  --text-soft: #3C3A35;
  --gray: #6B6962;
  --gray-light: #9B9890;
  --border: #1A1A18;
  --border-warm: #1A1A18;
  --card: #FFFFFF;
  --ks-bg: #F4F1EA;
  --ks-paper: #FFFFFF;
  --ks-ink: #0E0E0C;
  --ks-ink-soft: #6B6962;
  --ks-rule: #1A1A18;
  --ks-blue: #1B3FE0;
  --ks-pink: #FF3B86;
  --ks-yellow: #FFD23D;
  --ks-mint: #6CE6BA;
  --ks-red: #E63A33;
  --ks-sans: "Space Grotesk", "Helvetica Neue", Helvetica, Arial, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --ks-display: "Space Grotesk", "Helvetica Neue", Helvetica, Arial, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --ks-serif: "Instrument Serif", "Times New Roman", serif;
  --ks-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  --shadow-xs: none;
  --shadow-sm: 3px 3px 0 var(--ks-rule);
  --shadow: 5px 5px 0 var(--ks-rule);
  --shadow-lg: 8px 8px 0 rgba(26, 26, 24, 0.98);
}

html,
body {
  background: var(--ks-bg);
  color: var(--ks-ink);
  font-family: var(--ks-sans);
  letter-spacing: 0;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid var(--ks-blue);
  outline-offset: 3px;
}

.app {
  position: relative;
  height: calc(100vh - 48px);
  max-width: 1380px;
  margin: 24px auto;
  background: var(--ks-paper);
  border: 1.5px solid var(--ks-rule);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.28);
}

.top-bar {
  height: 72px;
  padding: 0 28px;
  background: var(--ks-paper);
  border-bottom: 1.5px solid var(--ks-rule);
}

.brand-mark,
.ob-brand-mark {
  display: none;
}

.brand-name,
.ob-brand-name {
  font-family: var(--ks-display);
  font-size: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ks-blue);
}

.brand-name::before,
.ob-brand-name::before {
  content: "[kandid.spot]";
  font-size: 22px;
}

.brand-tag {
  margin-left: 8px;
  padding: 5px 9px;
  border: 1.5px solid var(--ks-rule);
  border-radius: 7px;
  background: var(--ks-yellow);
  color: var(--ks-ink);
  font-family: var(--ks-mono);
  font-size: 0;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brand-tag::before {
  content: "SEOUL \00B7  V2026";
  font-size: 11px;
}

.ghost-btn,
.act-btn,
.rs-toggle,
.map-ctrl,
.map-provider-btn,
.ask-close,
.ask-send,
.fc-close {
  border: 1.5px solid var(--ks-rule);
}

.ghost-btn {
  border-radius: 999px;
  padding: 8px 14px;
  background: var(--ks-paper);
  color: var(--ks-ink);
  font-family: var(--ks-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: lowercase;
}

.ghost-btn:hover,
.ghost-btn-accent:hover {
  background: var(--ks-yellow);
  color: var(--ks-ink);
}

.ghost-btn-accent {
  background: var(--ks-ink);
  color: var(--ks-paper);
  border-color: var(--ks-ink);
}

.early-access-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 15px;
  border: 1.5px solid var(--ks-rule);
  border-radius: 999px;
  background: var(--ks-blue);
  color: var(--ks-paper);
  font-family: var(--ks-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1;
  text-transform: lowercase;
  box-shadow: 3px 3px 0 var(--ks-rule);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  white-space: nowrap;
}

.early-access-btn:hover {
  background: var(--ks-yellow);
  color: var(--ks-ink);
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ks-rule);
}

.early-access-btn:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--ks-rule);
}

.early-access-modal {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: none;
}

.early-access-modal.open {
  display: block;
}

.early-access-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 24, 0.52);
  backdrop-filter: blur(5px);
}

.early-access-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(640px, calc(100% - 32px));
  max-height: min(820px, calc(100vh - 32px));
  overflow-y: auto;
  transform: translate(-50%, -50%);
  padding: 44px 44px 40px;
  background: var(--ks-paper);
  border: 1.5px solid var(--ks-rule);
  border-radius: 26px;
  box-shadow: 10px 10px 0 var(--ks-rule);
}

.early-access-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--ks-rule);
  border-radius: 999px;
  background: var(--ks-paper);
  color: var(--ks-ink);
  transition: background 0.12s ease, transform 0.12s ease;
}

.early-access-close:hover {
  background: var(--ks-yellow);
  transform: translate(-1px, -1px);
}

.early-access-copy {
  max-width: 520px;
  padding-right: 32px;
  margin-bottom: 32px;
}

.early-access-kicker {
  display: inline-flex;
  align-items: center;
  width: max-content;
  margin-bottom: 16px;
  padding: 6px 11px;
  border: 1.5px solid var(--ks-rule);
  border-radius: 999px;
  background: var(--ks-yellow);
  color: var(--ks-ink);
  font-family: var(--ks-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
}

.early-access-copy h2,
.early-access-success h3 {
  margin: 0 0 14px;
  color: var(--ks-ink);
  font-family: var(--ks-display);
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.0;
}

.early-access-copy p {
  margin: 0;
  max-width: 480px;
  color: rgba(26, 26, 24, 0.78);
  font-size: 15px;
  line-height: 1.6;
}

.early-access-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  row-gap: 22px;
  column-gap: 18px;
}

.early-access-field {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
}

.early-access-field-wide,
.early-access-consent,
.early-access-error,
.early-access-submit {
  grid-column: 1 / -1;
}

.early-access-field span,
.early-access-consent {
  color: var(--ks-ink);
  font-family: var(--ks-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.early-access-field strong {
  color: var(--ks-red);
  margin-left: 2px;
}

.early-access-field input,
.early-access-field select,
.early-access-field textarea {
  width: 100%;
  border: 1.5px solid var(--ks-rule);
  border-radius: 12px;
  background: #fff;
  color: var(--ks-ink);
  font: 500 15px/1.4 var(--ks-sans);
  letter-spacing: 0;
  outline: none;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.early-access-field input::placeholder,
.early-access-field textarea::placeholder {
  color: rgba(26, 26, 24, 0.42);
}

.early-access-field input,
.early-access-field select {
  min-height: 50px;
  padding: 0 14px;
}

.early-access-field textarea {
  min-height: 132px;
  resize: vertical;
  padding: 14px;
  line-height: 1.5;
}

.early-access-field input:focus,
.early-access-field select:focus,
.early-access-field textarea:focus {
  border-color: var(--ks-blue);
  box-shadow: 0 0 0 4px rgba(47, 107, 255, 0.16);
}

.early-access-consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  margin-top: 4px;
  border: 1.5px solid var(--ks-rule);
  border-radius: 14px;
  background: rgba(255, 224, 74, 0.28);
  font-size: 12px;
  line-height: 1.55;
  text-transform: none;
}

.early-access-consent input {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  accent-color: var(--ks-blue);
  flex: 0 0 auto;
}

.early-access-error {
  padding: 12px 14px;
  border: 1.5px solid var(--ks-red);
  border-radius: 12px;
  background: rgba(230, 58, 51, 0.08);
  color: var(--ks-red);
  font-family: var(--ks-mono);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.45;
}

.early-access-submit,
.early-access-done {
  min-height: 52px;
  padding: 0 22px;
  border: 1.5px solid var(--ks-rule);
  border-radius: 999px;
  background: var(--ks-ink);
  color: var(--ks-paper);
  font-family: var(--ks-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  box-shadow: 4px 4px 0 var(--ks-rule);
  transition: background 0.12s ease, transform 0.12s ease, box-shadow 0.12s ease;
}

.early-access-submit {
  margin-top: 6px;
}

.early-access-submit:hover,
.early-access-done:hover {
  background: var(--ks-blue);
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--ks-rule);
}

.early-access-submit:active,
.early-access-done:active {
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 var(--ks-rule);
}

.early-access-submit:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
  box-shadow: 4px 4px 0 var(--ks-rule);
}

.early-access-success {
  max-width: 520px;
  margin-top: 24px;
}

.early-access-success .early-access-kicker {
  margin-bottom: 20px;
}

.early-access-success h3 {
  margin: 0 0 28px;
}

.early-access-done {
  display: inline-flex;
  align-items: center;
  margin-top: 4px;
}

.early-access-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 720px) {
  .early-access-btn {
    min-height: 32px;
    padding: 8px 11px;
    font-size: 11px;
  }

  .early-access-panel {
    width: calc(100% - 18px);
    max-height: calc(100vh - 18px);
    padding: 30px 22px 28px;
    border-radius: 22px;
    box-shadow: 5px 5px 0 var(--ks-rule);
  }

  .early-access-close {
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
  }

  .early-access-copy {
    padding-right: 46px;
    margin-bottom: 26px;
  }

  .early-access-copy h2,
  .early-access-success h3 {
    font-size: 34px;
    line-height: 1.05;
  }

  .early-access-copy p {
    font-size: 14.5px;
  }

  .early-access-form {
    grid-template-columns: 1fr;
    row-gap: 18px;
  }
}

.avatar {
  width: 34px;
  height: 34px;
  background: var(--ks-ink);
  border: 1.5px solid var(--ks-rule);
  color: var(--ks-paper);
  font-family: var(--ks-mono);
  font-size: 12px;
  text-transform: lowercase;
}

.split {
  background: var(--ks-paper);
}

.left-pane {
  width: min(530px, 45vw);
  background: var(--ks-paper);
  border-right: 1.5px solid var(--ks-rule);
}

.right-pane {
  padding: 36px;
  background: var(--ks-paper);
}

.route-summary-bar {
  margin: 36px 36px 0;
  padding: 18px 20px;
  background: var(--ks-paper);
  border: 1.5px solid var(--ks-rule);
  border-radius: 18px;
}

.rs-current {
  position: relative;
  min-height: 52px;
  padding-left: 66px;
}

.rs-current::before {
  content: "04";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ks-blue);
  font-family: var(--ks-display);
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}

.rs-label,
.section-sub,
.rs-strap,
.route-meta,
.stop-type,
.stop-tag,
.stop-walk,
.ks-stop-role,
.ks-stop-why,
.ks-stop-link,
.map-loc,
.map-provider-btn,
.map-legend,
.fc-type,
.fc-meta,
.fc-why {
  font-family: var(--ks-mono);
}

.rs-label {
  color: var(--ks-ink-soft);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.rs-value {
  color: var(--ks-ink);
  font-family: var(--ks-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.rs-strap {
  color: var(--ks-ink-soft);
  font-size: 11px;
}

.rs-toggle {
  height: 34px;
  background: var(--ks-paper);
  border-radius: 999px;
  color: var(--ks-ink);
  font-family: var(--ks-mono);
  text-transform: lowercase;
}

.rs-toggle:hover {
  background: var(--ks-yellow);
  color: var(--ks-ink);
}

.builder {
  margin: 14px 36px 0;
  padding: 16px;
  background: var(--ks-bg);
  border: 1.5px solid var(--ks-rule);
  border-radius: 18px;
}

.builder.collapsed {
  margin-top: 0;
  border: 0;
}

.builder-row-label {
  color: var(--ks-ink-soft);
  font-family: var(--ks-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.chip,
.refine-chip,
.ks-import-opt,
.ob-pref {
  background: var(--ks-paper);
  border: 1.5px solid var(--ks-rule);
  border-radius: 999px;
  color: var(--ks-ink);
  font-family: var(--ks-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
}

.chip:hover,
.refine-chip:hover,
.ks-stop-link:hover {
  background: var(--ks-mint);
  border-color: var(--ks-rule);
  color: var(--ks-ink);
}

.chip.selected,
.refine-chip.applied,
.ob-pref.active {
  background: var(--ks-blue);
  border-color: var(--ks-rule);
  color: var(--ks-paper);
  box-shadow: none;
}

.build-btn,
.ob-next,
.act-btn.primary {
  background: var(--ks-ink);
  border: 1.5px solid var(--ks-rule);
  border-radius: 999px;
  color: var(--ks-paper);
  font-family: var(--ks-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: lowercase;
  box-shadow: none;
}

.build-btn:hover,
.ob-next:hover:not(:disabled),
.act-btn.primary:hover {
  background: var(--ks-blue);
  border-color: var(--ks-rule);
  color: var(--ks-paper);
  transform: translateY(-1px);
}

.result-wrap {
  padding: 20px 36px 32px;
}

.why-card {
  position: relative;
  margin-top: 10px;
  margin-bottom: 24px;
  padding: 22px 20px 18px;
  background: var(--ks-yellow);
  border: 1.5px solid var(--ks-rule);
  border-radius: 18px;
}

.why-head {
  position: absolute;
  top: -11px;
  left: 16px;
  margin: 0;
}

.why-icon {
  display: none;
}

.why-title {
  display: inline-flex;
  padding: 3px 9px;
  border-radius: 4px;
  background: var(--ks-ink);
  color: var(--ks-paper);
  font-family: var(--ks-mono);
  font-size: 0;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.why-title::before {
  content: "why this";
  font-size: 10px;
}

.why-body {
  color: var(--ks-ink);
  font-family: var(--ks-mono);
  font-size: 12px;
  line-height: 1.6;
}

.ks-why-list li {
  color: var(--ks-ink);
  font-family: var(--ks-mono);
  font-size: 11px;
}

.ks-why-list li::before {
  background: var(--ks-ink);
}

.route-meta {
  border-top: 1.5px dashed rgba(26, 26, 24, 0.55);
  color: var(--ks-ink);
  font-size: 11px;
}

.meta-sep {
  background: var(--ks-rule);
}

.ks-confidence,
.ks-import {
  background: var(--ks-paper);
  border: 1.5px solid var(--ks-rule);
  border-radius: 18px;
  box-shadow: none;
}

.ks-conf-title,
.ks-import-title,
.section-head h3 {
  color: var(--ks-ink);
  font-family: var(--ks-display);
}

.ks-conf-title {
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: none;
}

.ks-conf-check,
.ks-import-icon {
  background: var(--ks-mint);
  color: var(--ks-ink);
  border: 1.5px solid var(--ks-rule);
}

.ks-import {
  background: var(--ks-bg);
}

.ks-import-soon {
  background: var(--ks-yellow);
  border: 1.5px solid var(--ks-rule);
  color: var(--ks-ink);
}

.section-head {
  margin-bottom: 14px;
}

.section-head h3 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.timeline-section .section-head h3 {
  font-size: 0;
}

.timeline-section .section-head h3::before {
  content: "one ";
  color: var(--ks-ink);
  font-size: 28px;
}

.timeline-section .section-head h3::after {
  content: "candid route";
  color: var(--ks-blue);
  font-family: var(--ks-serif);
  font-size: 32px;
  font-style: italic;
  font-weight: 400;
}

.stops {
  gap: 12px;
}

.stop {
  gap: 14px;
  padding: 14px 16px;
  background: var(--ks-paper);
  border: 1.5px solid var(--ks-rule);
  border-radius: 18px;
}

.stop:hover {
  background: var(--ks-paper);
  box-shadow: 4px 4px 0 var(--ks-rule);
  transform: translate(-2px, -2px);
}

.stop.active {
  background: var(--ks-blue);
  border-color: var(--ks-rule);
  color: var(--ks-paper);
}

.stop.active .stop-type,
.stop.active .ks-stop-why,
.stop.active .ks-stop-role,
.stop.active .stop-tag {
  color: rgba(255, 255, 255, 0.82);
}

.stop-num {
  width: 30px;
  height: 30px;
  background: var(--ks-pink);
  border: 1.5px solid var(--ks-rule);
  color: var(--ks-paper);
  font-family: var(--ks-display);
  font-size: 14px;
  box-shadow: none;
}

.stop.active .stop-num {
  background: var(--ks-yellow);
  color: var(--ks-ink);
  box-shadow: none;
}

.stop-line {
  background: transparent;
  border-left: 1.5px dashed var(--ks-rule);
}

.stop-name {
  color: inherit;
  font-family: var(--ks-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.15;
}

.stop-type,
.ks-stop-why,
.stop-tag {
  color: var(--ks-ink-soft);
}

.ks-stop-role {
  margin-bottom: 5px;
  padding: 2px 8px;
  background: var(--ks-bg);
  border: 1.5px solid var(--ks-rule);
  border-radius: 999px;
  color: var(--ks-ink);
  font-size: 10px;
}

.stop-tag {
  background: var(--ks-paper);
  border: 1.5px solid var(--ks-rule);
}

.stop.active .stop-tag,
.stop.active .ks-stop-role {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.5);
}

.ks-stop-actions {
  border-top: 1.5px dashed currentColor;
}

.ks-stop-link {
  border: 1.5px solid var(--ks-rule);
  border-radius: 999px;
}

.stop-walk {
  margin-left: 46px;
  color: var(--ks-ink-soft);
  letter-spacing: 0.05em;
}

.stop-walk::before {
  height: 0;
  width: 32px;
  border-left: 0;
  border-top: 1.5px dashed var(--ks-rule);
}

.refine-section {
  padding-top: 22px;
  border-top: 1.5px dashed var(--ks-rule);
}

.action-bar {
  padding: 14px 20px;
  background: var(--ks-paper);
  border-top: 1.5px solid var(--ks-rule);
}

.act-btn {
  border-radius: 999px;
  font-family: var(--ks-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  text-transform: lowercase;
}

.act-btn:hover {
  background: var(--ks-yellow);
  border-color: var(--ks-rule);
  color: var(--ks-ink);
}

.map-toolbar {
  height: auto;
  margin-bottom: 12px;
  padding: 0;
  background: transparent;
  border: 0;
}

.map-loc,
.map-provider-switch,
.map-ctrl {
  background: var(--ks-paper);
  border: 1.5px solid var(--ks-rule);
  color: var(--ks-ink);
}

.map-loc,
.map-provider-switch {
  border-radius: 999px;
}

.map-loc {
  font-size: 11px;
}

.map-provider-switch {
  gap: 0;
  padding: 2px;
}

.map-provider-btn {
  height: 28px;
  border: 0;
  border-radius: 999px;
}

.map-provider-btn.active {
  background: var(--ks-yellow);
  color: var(--ks-ink);
  box-shadow: none;
}

.map-provider-btn.active[data-map-provider="naver"] {
  background: #03C75A;
}

.map-ctrl {
  border-radius: 50%;
  font-family: var(--ks-mono);
}

.map-ctrl:hover {
  background: var(--ks-yellow);
}

.map-stage {
  border: 1.5px solid var(--ks-rule);
  border-radius: 22px;
  background: var(--ks-paper);
  overflow: hidden;
}

.kakao-map {
  background:
    linear-gradient(90deg, rgba(27, 63, 224, 0.05) 1px, transparent 1px),
    linear-gradient(0deg, rgba(27, 63, 224, 0.05) 1px, transparent 1px),
    #F8F7F2;
  background-size: 32px 32px;
}

.map-status,
.map-legend,
.float-card {
  border: 1.5px solid var(--ks-rule);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 4px 4px 0 var(--ks-rule);
}

.kakao-route-marker {
  background: var(--ks-pink);
  border: 1.5px solid var(--ks-rule);
  color: var(--ks-paper);
  box-shadow: 3px 3px 0 var(--ks-rule);
}

.kakao-route-marker.active {
  background: var(--ks-mint);
  color: var(--ks-ink);
  box-shadow: 0 0 0 8px rgba(108, 230, 186, 0.3), 3px 3px 0 var(--ks-rule);
}

.float-card {
  left: 24px;
  right: 24px;
  bottom: 24px;
  width: auto;
  transform: translateY(20px);
}

.float-card.show {
  transform: translateY(0);
}

.fc-num {
  background: var(--ks-pink);
  border: 1.5px solid var(--ks-rule);
  color: var(--ks-paper);
  box-shadow: none;
}

.fc-name {
  font-family: var(--ks-display);
}

.ask-fab {
  right: 28px;
  bottom: 28px;
  background: var(--ks-ink);
  border: 1.5px solid var(--ks-rule);
  box-shadow: 4px 4px 0 var(--ks-rule);
  font-family: var(--ks-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  text-transform: lowercase;
}

.ask-fab:hover {
  background: var(--ks-blue);
}

.ask-ava,
.ask-ava-lg {
  background: var(--ks-mint);
  border: 1.5px solid var(--ks-rule);
  color: var(--ks-ink);
}

.ask-panel,
.ask-bubble,
.ask-composer input,
.toast {
  border: 1.5px solid var(--ks-rule);
}

.ask-panel {
  background: var(--ks-paper);
}

.toast {
  background: var(--ks-ink);
  color: var(--ks-paper);
  font-family: var(--ks-mono);
  border-radius: 999px;
}

/* Onboarding */
.onboarding,
.ob-loading {
  background: var(--ks-bg);
  background-image: none;
}

.onboarding {
  padding: 24px;
}

.ob-header,
.ob-stage {
  width: min(1380px, 100%);
  margin-left: auto;
  margin-right: auto;
  background: var(--ks-paper);
  border-left: 1.5px solid var(--ks-rule);
  border-right: 1.5px solid var(--ks-rule);
}

.ob-header {
  padding: 18px 28px;
  border-top: 1.5px solid var(--ks-rule);
  border-bottom: 1.5px solid var(--ks-rule);
  border-radius: 28px 28px 0 0;
}

.ob-stage {
  align-items: flex-start;
  justify-content: center;
  padding: 42px 60px 64px;
  border-bottom: 1.5px solid var(--ks-rule);
  border-radius: 0 0 28px 28px;
}

.ob-progress {
  gap: 8px;
}

.ob-step {
  height: 4px;
  background: #ECECE8;
  border-radius: 0;
}

.ob-step.done,
.ob-step.active {
  background: var(--ks-blue);
  box-shadow: none;
  animation: none;
}

.ob-progress-label {
  color: var(--ks-ink-soft);
  font-family: var(--ks-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ob-screen {
  max-width: 1120px;
  text-align: left;
}

.ob-screen.active {
  animation: obSlideUp 0.25s ease;
}

.ks-hero {
  max-width: 920px;
  margin: 0 0 34px;
  padding: 0;
  text-align: left;
}

.ks-eyebrow {
  margin-bottom: 22px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  color: var(--ks-ink-soft);
  font-family: var(--ks-mono);
  font-size: 11px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.ks-eyebrow-dot {
  width: 42px;
  height: 0;
  border-radius: 0;
  background: transparent;
  border-top: 1.5px solid var(--ks-rule);
  box-shadow: none;
}

.ks-headline,
.ob-q-h1 {
  color: var(--ks-ink);
  font-family: var(--ks-display);
  font-size: clamp(44px, 6.8vw, 72px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.98;
  text-transform: lowercase;
}

.ks-serif-word,
.ks-headline .italic,
.ob-q-h1 em {
  color: var(--ks-blue);
  font-family: var(--ks-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.ks-headline-accent {
  color: var(--ks-blue);
}

.ks-lead,
.ob-q-sub,
.ks-step-helper,
.ob-context-hint,
.ob-actions-note,
.ob-refine-foot {
  color: var(--ks-ink-soft);
  font-family: var(--ks-mono);
  letter-spacing: 0.02em;
}

.ks-lead {
  max-width: 640px;
  margin-top: 18px;
  font-size: 13px;
  line-height: 1.7;
  text-transform: lowercase;
}

.ks-flow {
  justify-content: flex-start;
  margin-top: 24px;
  font-family: var(--ks-mono);
}

.ks-flow li,
.ks-flow-result {
  border: 1.5px solid var(--ks-rule);
  background: var(--ks-paper);
}

.ks-flow-num {
  background: var(--ks-blue);
}

.ks-step-label,
.ks-optional-tag {
  display: inline-flex;
  width: auto;
  margin: 0 0 10px;
  padding: 4px 10px;
  border: 1.5px solid var(--ks-rule);
  border-radius: 4px;
  background: var(--ks-blue);
  color: var(--ks-paper);
  font-family: var(--ks-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ks-step-helper {
  max-width: none;
  margin: 0 0 28px;
  text-align: left;
  text-transform: lowercase;
}

.ob-q-sub {
  max-width: 560px;
  margin-left: 0;
  margin-bottom: 36px;
  font-size: 13px;
  line-height: 1.7;
  text-transform: lowercase;
}

.ob-options,
.ob-options-area,
.ob-options-time,
.ob-options-mood {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
  margin-bottom: 28px;
}

.ob-option,
.ob-shape,
.ob-refine-anchor {
  min-height: 166px;
  padding: 72px 20px 20px;
  background: var(--ks-paper);
  border: 1.5px solid var(--ks-rule);
  border-radius: 18px;
  box-shadow: none;
  overflow: hidden;
}

.ob-option-wide {
  grid-column: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.ob-option:hover,
.ob-shape:hover {
  border-color: var(--ks-rule);
  box-shadow: 4px 4px 0 var(--ks-rule);
  transform: translate(-2px, -2px);
}

.ob-option.selected,
.ob-shape.selected {
  background: var(--ks-blue);
  border-color: var(--ks-rule);
  color: var(--ks-paper);
  box-shadow: 4px 4px 0 var(--ks-rule);
}

.ob-options {
  counter-reset: ks-option;
}

.ob-option {
  counter-increment: ks-option;
}

.ob-option::before {
  content: counter(ks-option, decimal-leading-zero);
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 1;
  color: var(--ks-ink-soft);
  font-family: var(--ks-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.ob-option.selected::before {
  color: rgba(255, 255, 255, 0.82);
}

.ob-option.selected::after,
.ob-shape.selected::after {
  top: 18px;
  right: 18px;
  background: var(--ks-yellow);
  border: 1.5px solid var(--ks-rule);
  color: var(--ks-ink);
}

.ob-emoji {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 66px;
  height: 66px;
  margin: 0;
  border: 0;
  border-radius: 14px;
  color: transparent;
  font-size: 0;
  background:
    repeating-linear-gradient(
      45deg,
      rgba(255, 59, 134, 0.18) 0 7px,
      rgba(255, 59, 134, 0.38) 7px 14px
    );
}

.ob-option:nth-child(2n) .ob-emoji {
  background:
    repeating-linear-gradient(
      45deg,
      rgba(27, 63, 224, 0.14) 0 7px,
      rgba(27, 63, 224, 0.28) 7px 14px
    );
}

.ob-option:nth-child(3n) .ob-emoji {
  background:
    repeating-linear-gradient(
      45deg,
      rgba(255, 210, 61, 0.36) 0 7px,
      rgba(255, 210, 61, 0.62) 7px 14px
    );
}

.ob-option:nth-child(4n) .ob-emoji {
  background:
    repeating-linear-gradient(
      45deg,
      rgba(108, 230, 186, 0.24) 0 7px,
      rgba(108, 230, 186, 0.46) 7px 14px
    );
}

.ob-option-label,
.ob-shape-name,
.ob-refine-role {
  color: inherit;
  font-family: var(--ks-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.ob-option-sub,
.ob-shape-desc,
.ob-shape-seq,
.ob-refine-hint {
  color: var(--ks-ink-soft);
  font-family: var(--ks-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  line-height: 1.45;
  text-transform: lowercase;
}

.ob-option.selected .ob-option-sub,
.ob-shape.selected .ob-shape-desc,
.ob-shape.selected .ob-shape-seq {
  color: rgba(255, 255, 255, 0.82);
}

.ob-context-field {
  max-width: 620px;
  margin: 2px 0 28px;
}

.ob-context-label {
  color: var(--ks-ink-soft);
  font-family: var(--ks-mono);
}

.ob-context-field input {
  border: 1.5px solid var(--ks-rule);
  border-radius: 999px;
  background: var(--ks-paper);
}

.ob-context-field input:focus {
  border-color: var(--ks-blue);
  box-shadow: 0 0 0 4px rgba(27, 63, 224, 0.14);
}

.ob-actions {
  justify-content: flex-start;
}

.ob-back,
.ob-customize-more,
.ob-skip {
  border: 1.5px solid var(--ks-rule);
  border-radius: 999px;
  background: var(--ks-paper);
  color: var(--ks-ink);
  font-family: var(--ks-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  text-transform: lowercase;
}

.ob-back:hover:not(:disabled),
.ob-customize-more:hover:not(:disabled),
.ob-skip:hover {
  background: var(--ks-yellow);
  border-color: var(--ks-rule);
}

.ob-back:disabled,
.ob-next:disabled,
.ob-customize-more:disabled {
  border-color: #D8D6CE;
  background: #ECEAE3;
  color: #A4A197;
}

.ob-shapes,
.ob-refine-anchors,
.ob-refine-foot {
  max-width: 760px;
  margin-left: 0;
}

.ob-shape {
  min-height: 0;
  padding: 20px;
}

.ob-refine-anchor {
  min-height: 0;
  padding: 18px 20px;
}

.ob-refine-prefs {
  border: 1.5px solid var(--ks-rule);
  background: var(--ks-bg);
}

.loading-state,
.ob-loading {
  background: rgba(244, 241, 234, 0.94);
}

.loading-pulse span,
.ob-loading-pulse span {
  background: var(--ks-blue);
}

.loading-pulse span:nth-child(2),
.ob-loading-pulse span:nth-child(2) {
  background: var(--ks-pink);
}

.loading-pulse span:nth-child(3),
.ob-loading-pulse span:nth-child(3) {
  background: var(--ks-yellow);
}

.loading-title,
.ob-loading-title {
  color: var(--ks-ink);
  font-family: var(--ks-display);
  font-size: 28px;
}

.loading-step,
.ob-loading-step {
  color: var(--ks-ink-soft);
  font-family: var(--ks-mono);
  text-transform: lowercase;
}

@media (max-width: 1100px) {
  .left-pane {
    width: min(500px, 48vw);
  }

  .right-pane {
    padding: 28px;
  }

  .route-summary-bar,
  .builder {
    margin-left: 24px;
    margin-right: 24px;
  }

  .result-wrap {
    padding-left: 24px;
    padding-right: 24px;
  }
}

@media (max-width: 980px) {
  .app {
    height: auto;
    min-height: calc(100vh - 32px);
    margin: 16px;
  }

  .split {
    flex-direction: column;
  }

  .left-pane {
    width: 100%;
    border-right: 0;
    border-top: 1.5px solid var(--ks-rule);
  }

  .right-pane {
    order: -1;
    min-height: 460px;
    border-bottom: 0;
  }

  .map-stage {
    min-height: 360px;
  }
}

@media (max-width: 720px) {
  html,
  body {
    height: auto;
    min-height: 100%;
    overflow: auto;
    overflow-x: hidden;
  }

  .app {
    min-height: 100vh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .top-bar {
    height: 64px;
    padding: 0 16px;
  }

  .brand-name::before,
  .ob-brand-name::before {
    font-size: 18px;
  }

  .brand-tag {
    display: none;
  }

  .ghost-btn {
    padding: 8px 10px;
  }

  .right-pane {
    padding: 16px;
    min-height: 390px;
  }

  .map-toolbar {
    align-items: flex-start;
    gap: 8px;
  }

  .map-loc {
    max-width: 100%;
    white-space: normal;
  }

  .route-summary-bar {
    margin: 20px 16px 0;
    padding: 16px;
  }

  .rs-current {
    padding-left: 50px;
  }

  .rs-current::before {
    font-size: 34px;
  }

  .builder {
    margin-left: 16px;
    margin-right: 16px;
  }

  .result-wrap {
    padding: 18px 16px 24px;
  }

  .section-head h3,
  .timeline-section .section-head h3::before {
    font-size: 23px;
  }

  .timeline-section .section-head h3::after {
    font-size: 27px;
  }

  .stop {
    padding: 13px;
  }

  .stop-name {
    font-size: 16px;
  }

  .action-bar {
    padding: 12px 16px;
  }

  .onboarding {
    padding: 0;
  }

  .ob-header,
  .ob-stage {
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }

  .ob-header {
    padding: 16px;
    border-top: 0;
  }

  .ob-stage {
    padding: 28px 18px 44px;
    border-bottom: 0;
    overflow-x: hidden;
  }

  .ob-screen,
  .ks-hero,
  .ob-options,
  .ob-option {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .ks-headline,
  .ob-q-h1 {
    font-size: clamp(38px, 12vw, 54px);
  }

  .ks-flow {
    display: none;
  }

  .ks-lead,
  .ks-step-helper,
  .ob-q-sub {
    overflow-wrap: anywhere;
  }

  .ob-options,
  .ob-options-area,
  .ob-options-time,
  .ob-options-mood {
    grid-template-columns: 1fr;
  }

  .ob-option {
    min-height: 140px;
  }

  .ob-option-label {
    font-size: 19px;
  }

  .ob-actions,
  .ob-actions-right {
    align-items: stretch;
  }
}
