/* ═══════════════════════════════════════════
   7to6 — app.css  (v2: 다국어 + 지도 + 경로분석)
   ═══════════════════════════════════════════ */

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0a0a0f;
  --surface:   #141419;
  --surface2:  #1c1c24;
  --border:    #2a2a35;
  --text:      #e8e8e8;
  --muted:     #888;
  --accent:    #6aa6ff;
  --accent2:   #4ecdc4;
  --danger:    #ff6a6a;
  --warn:      #f0c040;
  --radius:    12px;
  --max-w:     900px;
  --topbar-h:  56px;
  --font:      -apple-system, BlinkMacSystemFont, "Pretendard", "Segoe UI", "Noto Sans KR", Roboto, "Hiragino Sans", "MS Gothic", sans-serif;
}

html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
img { max-width: 100%; display: block; }

/* ═══════════════════════════════════════
   HOME (Language Selection)
   ═══════════════════════════════════════ */
.home {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.home-inner {
  max-width: 540px;
  width: 100%;
  text-align: center;
}

.home-logo {
  margin-bottom: 24px;
}
.logo-text {
  font-size: 2.2rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.logo-sub {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 2px;
  letter-spacing: 0.08em;
}

.home-hero-img {
  margin: 0 auto 32px;
  max-width: 480px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(106,166,255,.12);
}
.hero-photo {
  width: 100%;
  height: auto;
  display: block;
}

.lang-section { margin-top: 8px; }
.lang-prompt {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 20px;
}

.lang-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.lang-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .2s;
  color: var(--text);
  font-size: 0.9rem;
}
.lang-btn:hover {
  border-color: var(--accent);
  background: var(--surface2);
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(106,166,255,.15);
}
.lang-flag { font-size: 1.8rem; }
.lang-label { font-weight: 600; }

/* ═══════════════════════════════════════
   TOPBAR
   ═══════════════════════════════════════ */
.topbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  height: var(--topbar-h);
  padding: 0 clamp(12px, 3vw, 32px);
  background: rgba(10, 10, 15, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.brand-link {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.logo {
  font-size: 1.25rem; font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.brand-title { font-size: 0.82rem; font-weight: 600; color: var(--text); }
.brand-sub   { font-size: 0.62rem; color: var(--muted); }

.stepper { display: flex; align-items: center; gap: 8px; font-size: 0.78rem; }
.step { color: var(--muted); padding: 4px 8px; border-radius: 6px; text-decoration: none; }
.step.active { color: var(--text); background: var(--surface); font-weight: 600; }
.sep { color: var(--muted); font-size: 0.7rem; }

/* ═══════════════════════════════════════
   PAGE (Input 공통)
   ═══════════════════════════════════════ */
.page {
  max-width: 580px;
  margin: 0 auto;
  padding: clamp(28px, 5vh, 60px) clamp(16px, 4vw, 32px);
}

.page-title {
  font-size: 1.45rem; font-weight: 800;
  margin-bottom: 6px;
}

.page-desc {
  font-size: 0.88rem; color: var(--muted);
  margin-bottom: 28px;
}

/* ── Form ── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block; font-size: 0.8rem;
  font-weight: 600; margin-bottom: 5px;
  color: var(--muted);
}
.form-input, .form-select {
  width: 100%; padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text); font-size: 0.92rem;
  outline: none; transition: border-color .2s;
}
.form-input:focus, .form-select:focus { border-color: var(--accent); }
.form-select { appearance: none; cursor: pointer; }

.form-divider {
  margin: 20px 0 8px;
  padding-bottom: 4px;
  border-bottom: 1px dashed var(--border);
}
.divider-label {
  font-size: 0.78rem; color: var(--muted); font-weight: 500;
}

.form-actions { margin-top: 24px; display: flex; gap: 12px; }

/* ═══════════════════════════════════════
   INPUT PAGE — 2-Column Layout (Map + Search)
   ═══════════════════════════════════════ */
.input-main {
  display: grid;
  grid-template-columns: 420px 1fr;
  min-height: calc(100vh - var(--topbar-h));
  padding-top: var(--topbar-h);
}

.input-panel {
  padding: 24px 22px 32px;
  overflow-y: auto;
  max-height: calc(100vh - var(--topbar-h));
  background: var(--bg);
  border-right: 1px solid var(--border);
}

.input-map-panel {
  position: relative;
  display: flex;
  flex-direction: column;
}

.input-map-container {
  flex: 1;
  min-height: 400px;
}

.input-map-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.input-map-hint {
  padding: 8px 16px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  background: var(--surface);
  border-top: 1px solid var(--border);
}

/* ── Search Input Wrap ── */
.search-group { position: relative; }
.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.search-icon {
  position: absolute;
  left: 12px; top: 50%; transform: translateY(-50%);
  font-size: 0.9rem; pointer-events: none; z-index: 1;
}
.search-input {
  padding-left: 38px !important;
  padding-right: 34px !important;
}
.input-clear-btn {
  position: absolute;
  right: 8px; top: 50%; transform: translateY(-50%);
  width: 24px; height: 24px;
  border: none; background: transparent;
  color: var(--muted); font-size: 1.2rem;
  cursor: pointer; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
}
.input-clear-btn:hover {
  background: var(--surface2); color: var(--danger);
}

/* ── Autocomplete Dropdown ── */
.autocomplete-list {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  z-index: 100;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  max-height: 260px;
  overflow-y: auto;
  list-style: none;
  display: none;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}
.autocomplete-list.visible { display: block; }

.ac-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background .12s;
  border-bottom: 1px solid var(--border);
}
.ac-item:last-child { border-bottom: none; }
.ac-item:hover, .ac-item.active {
  background: var(--surface2);
}
.ac-icon {
  font-size: 1rem;
  flex-shrink: 0;
  width: 24px; text-align: center;
}
.ac-text { flex: 1; min-width: 0; }
.ac-main {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ac-sub {
  font-size: 0.74rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}
.ac-empty {
  padding: 14px;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
}

/* ── Waypoint Toggle ── */
.waypoint-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 0;
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s;
}
.waypoint-toggle:hover { opacity: .8; }
.toggle-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  font-size: 0.9rem;
  line-height: 1;
}

/* ── Selected Places Summary ── */
.selected-places {
  margin-top: 16px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.selected-title {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.route-point {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
}
.route-icon { font-size: 0.9rem; flex-shrink: 0; }
.route-info { flex: 1; }
.route-name {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text);
}
.route-type {
  font-size: 0.7rem;
  color: var(--muted);
  margin-left: 6px;
}
.route-line {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  padding: 2px 0;
  margin-left: 4px;
}

/* ── Mobile: Stack layout ── */
@media (max-width: 768px) {
  .input-main {
    grid-template-columns: 1fr;
    grid-template-rows: auto 300px;
  }
  .input-panel {
    max-height: none;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .input-map-container {
    min-height: 300px;
  }
}

/* ── Buttons ── */
.primary {
  padding: 13px 28px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #000; font-weight: 700; font-size: 0.92rem;
  border: none; border-radius: var(--radius);
  cursor: pointer; transition: transform .15s, box-shadow .2s;
}
.primary:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(106,166,255,.25); }
.primary:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.secondary, .btn-link {
  padding: 13px 28px;
  background: transparent;
  border: 1px solid var(--border); color: var(--text);
  font-weight: 600; font-size: 0.92rem;
  border-radius: var(--radius);
  cursor: pointer; transition: border-color .2s;
  text-align: center;
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none;
}
.secondary:hover, .btn-link:hover { border-color: var(--accent); color: var(--accent); }

/* ═══════════════════════════════════════
   RESULT PAGE
   ═══════════════════════════════════════ */
.result-page {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(20px, 4vh, 48px) clamp(12px, 3vw, 32px);
}

.result-header { margin-bottom: 20px; }

/* ── Summary ── */
.summary {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px; margin-bottom: 20px;
  padding: 14px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.summary-item { font-size: 0.85rem; }
.summary-item strong { color: var(--accent); }

/* ── Map ── */
.map-wrap {
  margin-bottom: 24px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  position: relative;
}
.map-container {
  width: 100%;
  height: 400px;
  background: var(--surface);
}
.map-iframe {
  width: 100%;
  height: 400px;
  border: none;
}
.map-external-link {
  display: block;
  text-align: center;
  padding: 10px;
  background: var(--surface2);
  font-size: 0.82rem;
  color: var(--accent);
  border-top: 1px solid var(--border);
}
.map-external-link:hover { background: var(--surface); }
.map-fallback {
  display: flex; align-items: center; justify-content: center;
  height: 200px; background: var(--surface); color: var(--muted);
  font-size: 0.9rem;
}

/* ── Loading ── */
.loading-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 16px;
  background: var(--surface);
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 0.88rem;
  color: var(--muted);
}
.loading-spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Route Analysis ── */
.route-analysis {
  display: flex; flex-direction: column; gap: 16px;
  margin-bottom: 24px;
}

.segment-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.segment-header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}
.segment-num {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent);
  color: #000; font-weight: 800; font-size: 0.82rem;
  border-radius: 50%;
  flex-shrink: 0;
}
.segment-route { font-weight: 600; font-size: 0.92rem; }

.segment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--border);
}
.segment-cell {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  background: var(--surface);
  font-size: 0.84rem;
}
.cell-icon { font-size: 1.1rem; }
.cell-val { color: var(--text); }

/* ── Carrier Info ── */
.segment-carrier {
  padding: 14px 16px;
  background: rgba(106,166,255,.05);
  border-top: 1px solid var(--border);
}
.carrier-title {
  font-weight: 700; font-size: 0.88rem;
  margin-bottom: 10px; color: var(--accent);
}
.carrier-stop {
  margin-bottom: 10px;
  padding: 10px;
  background: var(--surface2);
  border-radius: 8px;
  font-size: 0.82rem;
}
.carrier-stop strong { color: var(--text); }
.carrier-detail {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-top: 6px; color: var(--muted);
}
.carrier-tip {
  margin-top: 6px;
  padding: 6px 10px;
  background: rgba(106,166,255,.08);
  border-radius: 6px;
  font-size: 0.8rem;
  color: var(--accent);
}

.result-actions {
  margin-top: 28px;
  display: flex; gap: 12px;
}

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 600px) {
  .lang-buttons {
    grid-template-columns: repeat(2, 1fr);
  }
  .lang-btn { padding: 16px 8px; }

  .topbar {
    flex-direction: column;
    height: auto; padding: 8px 12px; gap: 4px;
  }
  .stepper { flex-wrap: wrap; justify-content: center; }

  .map-container, .map-iframe { height: 280px; }

  .segment-grid { grid-template-columns: 1fr 1fr; }
  .subway-arrival-row { font-size: 0.78rem; gap: 6px; }
  .subway-direction { min-width: 80px; }
  /* 설문 반영(45%): 모바일 폰트 크기 증가 */
  html { font-size: 17px; }
  .course-tabs { grid-template-columns: 1fr; gap: 8px; }
  .course-tab { flex-direction: row; padding: 12px 16px; gap: 10px; }
  .course-tab-icon { font-size: 1.2rem; }
  .compare-header, .compare-row { grid-template-columns: 80px repeat(3, 1fr); }
  .compare-label { padding: 8px; font-size: 0.72rem; }
  .compare-val { font-size: 0.76rem; padding: 8px 4px; }
  .course-proscons { grid-template-columns: 1fr; }
  .acc-summary-grid { grid-template-columns: repeat(3, 1fr); }
  .acc-detail-item { font-size: 0.74rem; }

  .result-actions { flex-direction: column; }
  .primary, .secondary, .btn-link { width: 100%; }
}

/* ═══════════════════════════════════════
   WEATHER PANEL (기상청 실시간)
   ═══════════════════════════════════════ */
.weather-panel {
  margin-bottom: 24px;
}
.weather-title {
  font-size: 0.95rem; font-weight: 700;
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.weather-source {
  font-size: 0.7rem; font-weight: 400;
  color: var(--muted); opacity: 0.7;
}
.weather-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}
.weather-card {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  transition: border-color .2s;
}
.weather-card:hover { border-color: var(--accent); }
.weather-place {
  font-size: 0.82rem; font-weight: 600;
  color: var(--muted); margin-bottom: 8px;
}
.weather-icon { font-size: 2rem; margin-bottom: 4px; }
.weather-temp {
  font-size: 1.4rem; font-weight: 800;
  color: var(--text); margin-bottom: 2px;
}
.weather-cond {
  font-size: 0.8rem; color: var(--muted);
  margin-bottom: 8px;
}
.weather-details {
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: center;
  font-size: 0.72rem; color: var(--muted);
}
.weather-rain { color: var(--accent); font-weight: 600; }

/* ═══════════════════════════════════════
   SUBWAY PANEL (서울시 실시간 도착)
   ═══════════════════════════════════════ */
.subway-panel {
  margin-bottom: 24px;
}
.subway-title {
  font-size: 0.95rem; font-weight: 700;
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.subway-source {
  font-size: 0.7rem; font-weight: 400;
  color: var(--muted); opacity: 0.7;
}
.subway-station {
  margin-bottom: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.subway-station-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap; gap: 8px;
}
.subway-station-name {
  font-weight: 700; font-size: 0.92rem;
}
.subway-congestion {
  font-size: 0.78rem; color: var(--muted);
}
.subway-arrivals {
  display: flex; flex-direction: column;
}
.subway-arrival-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.84rem;
  flex-wrap: wrap;
}
.subway-arrival-row:last-child { border-bottom: none; }
.subway-line-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  color: #fff; font-weight: 700;
  font-size: 0.72rem;
  white-space: nowrap;
  flex-shrink: 0;
}
.subway-direction {
  flex: 1; min-width: 100px;
  color: var(--text); font-size: 0.82rem;
}
.subway-msg {
  color: var(--muted); font-size: 0.8rem;
  white-space: nowrap;
}
.subway-eta {
  font-weight: 700; color: var(--accent);
  font-size: 0.85rem; white-space: nowrap;
}
.subway-no-service {
  padding: 12px 16px;
  font-size: 0.82rem; color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  text-align: center;
}
.subway-refresh {
  text-align: center;
  margin-top: 8px;
}
.subway-refresh-btn {
  padding: 8px 20px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--accent);
  font-size: 0.8rem; font-weight: 600;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.subway-refresh-btn:hover {
  border-color: var(--accent);
  background: var(--surface);
}
.subway-refresh-btn:disabled {
  opacity: 0.5; cursor: not-allowed;
}

/* ═══════════════════════════════════════
   WEATHER ALERT BANNER (설문 68%)
   ═══════════════════════════════════════ */
.weather-alert-banner {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(240,192,64,.12), rgba(255,106,106,.08));
  border: 1px solid var(--warn);
  border-radius: var(--radius);
  animation: alertPulse 2s ease-in-out 3;
}
@keyframes alertPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}
.wa-icon { font-size: 1.4rem; flex-shrink: 0; }
.wa-text { font-size: 0.9rem; font-weight: 600; color: var(--warn); line-height: 1.4; }

/* ═══════════════════════════════════════
   3-COURSE COMPARISON (코스 비교)
   ═══════════════════════════════════════ */
.course-comparison { margin-bottom: 24px; }

/* ── 탭 ── */
.course-tabs {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; margin-bottom: 16px;
}
.course-tab {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px; padding: 16px 10px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer; transition: all .2s;
  color: var(--muted); font-size: 0.85rem;
}
.course-tab:hover {
  border-color: var(--accent); color: var(--text);
  transform: translateY(-2px); box-shadow: 0 4px 16px rgba(106,166,255,.1);
}
.course-tab.active {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(106,166,255,.08), rgba(78,205,196,.06));
  color: var(--text);
}
.course-tab-icon { font-size: 1.6rem; }
.course-tab-name { font-weight: 700; font-size: 0.82rem; text-align: center; }
.course-tab-tag {
  display: inline-block;
  padding: 2px 8px; border-radius: 6px;
  font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.03em;
}
.tag-cheapest { background: rgba(78,205,196,.15); color: var(--accent2); }
.tag-fastest { background: rgba(106,166,255,.15); color: var(--accent); }
.tag-comfortable { background: rgba(153,108,172,.15); color: #c49cdb; }
.tag-weather_safe { background: rgba(240,192,64,.15); color: var(--warn); }
.tag-recommended { background: linear-gradient(135deg, rgba(106,166,255,.2), rgba(78,205,196,.2)); color: var(--accent); }

/* ── 비교 테이블 ── */
.course-compare-bar {
  margin-bottom: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.compare-grid {
  display: flex; flex-direction: column;
}
.compare-header {
  display: grid; grid-template-columns: 120px repeat(3, 1fr);
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}
.compare-header > span {
  text-align: center; font-size: 0.78rem; font-weight: 700;
  padding: 0 6px;
}
.compare-head-name {
  color: var(--text);
}
.compare-row {
  display: grid; grid-template-columns: 120px repeat(3, 1fr);
  border-bottom: 1px solid var(--border);
}
.compare-row:last-child { border-bottom: none; }
.compare-label {
  display: flex; align-items: center;
  padding: 10px 12px; font-size: 0.78rem;
  font-weight: 600; color: var(--muted);
  background: var(--surface);
}
.compare-val {
  display: flex; align-items: center; justify-content: center;
  padding: 10px 6px; font-size: 0.82rem;
  text-align: center; color: var(--text);
}
.compare-best {
  color: var(--accent2); font-weight: 800;
}

/* ── 코스 디테일 ── */
.course-detail { margin-bottom: 16px; }
.course-detail-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(106,166,255,.06), rgba(78,205,196,.04));
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  margin-bottom: 12px;
}
.course-detail-name { font-size: 1.05rem; font-weight: 800; }
.course-detail-stats {
  font-size: 0.88rem; font-weight: 600;
  color: var(--accent);
}
.course-weather-tip {
  padding: 10px 14px; margin-bottom: 12px;
  background: rgba(240,192,64,.08);
  border: 1px solid rgba(240,192,64,.2);
  border-radius: 8px;
  font-size: 0.82rem; color: var(--warn);
}

/* ── 추천 ── */
.course-recommendation { margin-bottom: 8px; }
.rec-box {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 16px;
  background: linear-gradient(135deg, rgba(106,166,255,.06), rgba(78,205,196,.04));
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  font-size: 0.92rem; font-weight: 600;
  line-height: 1.5;
}
.rec-icon { font-size: 1.3rem; flex-shrink: 0; }

/* ── 장단점 (설문 63%) ── */
.course-proscons {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px; margin-bottom: 14px;
}
.proscons-col {
  padding: 12px; border-radius: 8px;
  font-size: 0.82rem;
}
.proscons-col.pros {
  background: rgba(78,205,196,.06);
  border: 1px solid rgba(78,205,196,.2);
}
.proscons-col.cons {
  background: rgba(255,106,106,.05);
  border: 1px solid rgba(255,106,106,.15);
}
.proscons-title {
  font-size: 0.78rem; font-weight: 700;
  margin-bottom: 6px;
}
.proscons-item {
  padding: 3px 0; color: var(--muted);
  font-size: 0.78rem; line-height: 1.4;
}

/* ═══════════════════════════════════════
   ACCESSIBILITY PANEL (교통약자 편의시설)
   ═══════════════════════════════════════ */
.accessibility-panel {
  margin-bottom: 24px;
}
.acc-title {
  font-size: 0.95rem; font-weight: 700;
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.acc-source {
  font-size: 0.7rem; font-weight: 400;
  color: var(--muted); opacity: 0.7;
}
.acc-station {
  margin-bottom: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.acc-station-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap; gap: 8px;
}
.acc-station-name { font-weight: 700; font-size: 0.92rem; }
.acc-issue-badge {
  font-size: 0.72rem; font-weight: 600;
  color: var(--warn); background: rgba(240,192,64,.12);
  padding: 2px 8px; border-radius: 6px;
}
.acc-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1px; background: var(--border);
}
.acc-count {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px; padding: 14px 10px;
  background: var(--surface);
}
.acc-count-icon { font-size: 1.3rem; }
.acc-count-label { font-size: 0.72rem; color: var(--muted); }
.acc-count-val { font-size: 1rem; font-weight: 800; }
.acc-count-ok .acc-count-val { color: var(--accent2); }
.acc-count-warn .acc-count-val { color: var(--warn); }

/* ── details 토글 ── */
.acc-details {
  border-top: 1px solid var(--border);
}
.acc-details-toggle {
  display: block; padding: 10px 16px;
  font-size: 0.82rem; font-weight: 600;
  color: var(--accent); cursor: pointer;
  list-style: none; user-select: none;
}
.acc-details-toggle::-webkit-details-marker { display: none; }
.acc-details-toggle::before {
  content: "▸ "; transition: transform .2s;
}
.acc-details[open] .acc-details-toggle::before {
  content: "▾ ";
}
.acc-detail-list {
  padding: 0 16px 12px;
}
.acc-detail-item {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.78rem;
}
.acc-detail-item:last-child { border-bottom: none; }
.acc-detail-loc {
  flex: 1; min-width: 120px;
  color: var(--text);
}
.acc-detail-exit { color: var(--muted); }
.acc-detail-floor { color: var(--muted); font-size: 0.72rem; }
.acc-detail-dir { color: var(--muted); font-size: 0.72rem; }
.acc-status-ok {
  font-size: 0.72rem; font-weight: 600;
  color: var(--accent2);
  padding: 1px 6px; border-radius: 4px;
  background: rgba(78,205,196,.1);
}
.acc-status-warn {
  font-size: 0.72rem; font-weight: 600;
  color: var(--warn);
  padding: 1px 6px; border-radius: 4px;
  background: rgba(240,192,64,.1);
}

/* ── 캐리어 출구 칩 ── */
.acc-carrier-tip {
  padding: 12px 16px;
  background: rgba(106,166,255,.04);
  border-top: 1px solid var(--border);
}
.acc-carrier-title {
  font-weight: 700; font-size: 0.85rem;
  color: var(--accent); margin-bottom: 8px;
}
.acc-exit-list {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.acc-exit-chip {
  padding: 5px 10px; border-radius: 8px;
  font-size: 0.76rem; font-weight: 600;
}
.acc-exit-active {
  background: rgba(78,205,196,.12);
  color: var(--accent2); border: 1px solid rgba(78,205,196,.3);
}
.acc-exit-inactive {
  background: rgba(255,106,106,.08);
  color: var(--danger); border: 1px solid rgba(255,106,106,.2);
}
.acc-update-note {
  text-align: right;
  font-size: 0.68rem; color: var(--muted);
  opacity: 0.6; padding: 4px 0;
}

/* ── LIVE 뱃지 (구간 카드 내) ── */
.carrier-live-badge {
  display: inline-block;
  padding: 1px 5px; margin-left: 6px;
  background: var(--accent2); color: #000;
  font-size: 0.58rem; font-weight: 800;
  border-radius: 3px; vertical-align: middle;
  letter-spacing: 0.05em;
}
.carrier-issue {
  color: var(--warn); font-weight: 600;
}

/* ═══════════════════════════════════════
   AI ANALYSIS
   ═══════════════════════════════════════ */
.ai-analysis {
  display: flex; flex-direction: column; gap: 16px;
  margin-bottom: 24px;
}

.ai-summary {
  padding: 16px;
  background: linear-gradient(135deg, rgba(106,166,255,.08), rgba(78,205,196,.06));
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  font-size: 0.95rem; font-weight: 600;
  line-height: 1.5;
}
.ai-badge {
  display: inline-block;
  padding: 2px 8px; margin-right: 8px;
  background: var(--accent); color: #000;
  font-size: 0.7rem; font-weight: 800;
  border-radius: 4px; vertical-align: middle;
  letter-spacing: 0.05em;
}

.ai-totals {
  display: flex; gap: 16px; flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.total-item {
  font-size: 1.1rem; font-weight: 700;
  color: var(--accent);
}

.carrier-warning {
  padding: 14px 16px;
  background: rgba(255,106,106,.08);
  border: 1px solid var(--danger);
  border-radius: var(--radius);
  font-size: 0.88rem;
  color: var(--danger);
}

.ai-usage {
  text-align: right;
  font-size: 0.7rem;
  color: var(--muted);
  opacity: 0.6;
  padding: 4px 0;
}

/* ── 모션 감소 ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
