/* ============================================================
   충주여지도 — 미니멀 라이트 디자인
   · 색은 거의 쓰지 않고, 흰 카드를 띄워서(그림자) 구분
   · 강조는 색이 아니라 잉크색 반전으로
   · 등장은 스르륵 (fade + rise)
   ============================================================ */

:root {
  --bg: #F2F4F7;
  --surface: #FFFFFF;
  --surface-2: #F7F8FA;

  --ink: #191F28;
  --ink-2: #4E5968;
  --ink-3: #8B95A1;

  --line: #EAEDF0;
  --accent: #3182F6;

  --lift-1: 0 1px 2px rgba(25,31,40,0.04), 0 2px 8px rgba(25,31,40,0.05);
  --lift-2: 0 2px 6px rgba(25,31,40,0.06), 0 12px 28px rgba(25,31,40,0.08);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}
/* dark */
  html[data-theme="dark"] {
    --bg: #14161A;
    --surface: #1C1F25;
    --surface-2: #23272E;
    --ink: #EDF0F3;
    --ink-2: #A7B0BC;
    --ink-3: #78818E;
    --line: #2A2F37;
    --accent: #5B9DFF;
    --lift-1: 0 1px 2px rgba(0,0,0,0.3), 0 2px 8px rgba(0,0,0,0.25);
    --lift-2: 0 2px 6px rgba(0,0,0,0.35), 0 12px 28px rgba(0,0,0,0.4);
  }


* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 14.5px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 등장 모션 ---------- */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.rise { animation: riseIn 0.5s var(--ease) both; }
.rise-1 { animation-delay: 0.05s; }
.rise-2 { animation-delay: 0.12s; }
.rise-3 { animation-delay: 0.19s; }

@media (prefers-reduced-motion: reduce) {
  .rise { animation: none !important; }
  .panel { scroll-behavior: auto; }
}

.app {
  display: grid;
  grid-template-columns: 244px 1fr;
  height: 100vh;
}

/* ============================================================
   사이드바 — 흰 바탕, 선 대신 여백으로 구분
   ============================================================ */
.side {
  background: var(--surface);
  display: flex; flex-direction: column;
  overflow-y: auto;
  padding: 26px 18px 18px;
  gap: 22px;
}
.side-brand { padding: 0 6px; }
.side-logo {
  font-size: 20px; font-weight: 700; color: var(--ink);
  letter-spacing: -0.03em;
}
.side-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }

.side-label {
  font-size: 11.5px; font-weight: 600;
  color: var(--ink-3);
  padding: 0 6px 8px;
}

.update-list { display: flex; flex-direction: column; gap: 8px; }
.update-row {
  background: var(--surface-2);
  border-radius: 12px;
  padding: 12px 14px;
}
.update-row .u-top { display: flex; align-items: baseline; justify-content: space-between; }
.update-row .u-top b { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.update-row .u-cnt { font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.update-row .u-date {
  font-size: 16px; font-weight: 700; color: var(--ink);
  font-variant-numeric: tabular-nums; line-height: 1.45;
  letter-spacing: -0.02em;
}
.update-row .u-label { font-size: 11px; color: var(--ink-3); }

.side-foot {
  margin-top: auto;
  padding: 12px 6px 0;
  font-size: 11.5px;
  color: var(--ink-3);
}

/* ============================================================
   메인
   ============================================================ */
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }

.topbar {
  display: flex; align-items: stretch; justify-content: space-between;
  padding: 0 26px;
  flex: none;
  background: var(--bg);
}
.tabs { display: flex; gap: 22px; }
.tab {
  appearance: none; border: none; background: none;
  font: inherit; font-size: 15px; color: var(--ink-3);
  padding: 20px 2px 15px;
  font-weight: 600; cursor: pointer;
  border-bottom: 2px solid transparent;
  letter-spacing: -0.02em;
  transition: color 0.15s var(--ease);
}
.tab:hover { color: var(--ink-2); }
.tab.on { color: var(--ink); border-bottom-color: var(--ink); }
.data-note { align-self: center; font-size: 12px; color: var(--ink-3); margin-left: auto; }

/* 밝게/어둡게 전환 */
.theme-toggle {
  align-self: center; margin-left: 14px;
  display: inline-flex; align-items: center; gap: 6px;
  font: inherit; font-size: 12px; font-weight: 600; color: var(--ink-2);
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 11px 4px 9px; cursor: pointer;
  transition: color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.theme-toggle:hover { color: var(--ink); box-shadow: var(--lift-1); }
.theme-toggle svg { width: 14px; height: 14px; }

.content {
  flex: 1; min-height: 0;
  padding: 4px 26px 26px;
  display: flex;
}

/* ---------- 카드: 선 없이 띄워서 구분 ---------- */
.card {
  flex: 1; min-height: 0; min-width: 0;
  background: var(--surface);
  border-radius: 18px;
  box-shadow: var(--lift-1);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.card-head {
  padding: 18px 22px 14px;
  flex: none;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.card-head h2 {
  margin: 0; font-size: 17px; font-weight: 700;
  white-space: nowrap; letter-spacing: -0.03em;
}

/* ---------- 검색 ---------- */
.search-box {
  position: relative;
  display: flex; align-items: center;
  flex: 0 1 330px;
}
.search-box .s-icon {
  position: absolute; left: 13px;
  width: 15px; height: 15px; color: var(--ink-3); pointer-events: none;
}
.search-box input {
  width: 100%;
  font: inherit; font-size: 13.5px;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 9px 32px 9px 35px;
  outline: none;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.search-box input::placeholder { color: var(--ink-3); }
.search-box input:focus {
  border-color: var(--accent);
  background: var(--surface);
}
.search-box input::-webkit-search-cancel-button { display: none; }
.search-box .s-clear {
  position: absolute; right: 10px;
  appearance: none; border: none; background: none;
  color: var(--ink-3); cursor: pointer;
  font-size: 12px; line-height: 1; padding: 4px;
}
.search-box .s-clear:hover { color: var(--ink); }

/* ---------- 필터 ---------- */
.filter-zone {
  padding: 0 22px 16px;
  display: flex; flex-direction: column; gap: 9px;
  flex: none;
}
.filter-row { display: flex; align-items: center; gap: 12px; }
.filter-label {
  flex: none; width: 48px;
  font-size: 11.5px; font-weight: 600;
  color: var(--ink-3);
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.f-chip {
  appearance: none; font: inherit; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2);
  border-radius: 999px; padding: 6px 13px;
  font-size: 12.5px; font-weight: 500;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease),
              color 0.15s var(--ease);
}
.f-chip:hover { background: var(--surface-2); }
.f-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.f-chip .fdot { width: 6px; height: 6px; border-radius: 50%; flex: none; opacity: 0.85; }
.f-chip .cnt { font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
/* 켜짐: 색을 더하지 않고 잉크색 반전으로 */
.f-chip.on {
  background: var(--ink);
  border-color: var(--ink);
  color: #FFFFFF;
  font-weight: 600;
}
.f-chip.on .cnt { color: rgba(255,255,255,0.62); }
.f-chip.on .fdot { opacity: 1; }
/* dark */
  html[data-theme="dark"] .f-chip.on { color: #14161A; }
  html[data-theme="dark"] .f-chip.on .cnt { color: rgba(20,22,26,0.55); }


/* ---------- 본문: 지도 + 패널 ---------- */
.card-body {
  flex: 1; min-height: 0;
  display: grid;
  grid-template-columns: 1fr 352px;
}
.map-wrap { position: relative; overflow: hidden; background: var(--surface-2); min-height: 0; }
#map { width: 100%; height: 100%; }

/* 날씨 위젯 */
.weather-widget {
  position: absolute; top: 12px; right: 12px; z-index: 800;
  background: var(--surface); color: var(--ink);
  border-radius: 14px; box-shadow: var(--lift-2);
  min-width: 190px; max-width: calc(100% - 24px);
  font-size: 12.5px;
}
.weather-widget[hidden] { display: none; }
.wx-main {
  all: unset; box-sizing: border-box; width: 100%; cursor: pointer;
  display: flex; align-items: center; gap: 8px; padding: 9px 13px;
}
.wx-main:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 14px; }
.wx-icon { font-size: 22px; line-height: 1; }
.wx-temp { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.wx-desc { display: flex; flex-direction: column; line-height: 1.3; }
.wx-desc b { font-weight: 600; }
.wx-desc small { color: var(--ink-3); font-size: 11px; }
.wx-more { border-top: 1px solid var(--line); padding: 8px 12px 10px; }
.wx-hourly { list-style: none; margin: 0 0 6px; padding: 0; display: flex; gap: 4px; }
.wx-hourly li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.wx-h { color: var(--ink-3); font-size: 11px; }
.wx-i { font-size: 16px; }
.wx-t { font-weight: 600; }
.wx-p { color: var(--accent); font-size: 10.5px; }
.wx-foot { margin: 0; color: var(--ink-3); font-size: 10.5px; }
@media (max-width: 720px) { .weather-widget { top: 8px; right: 8px; } }

.panel {
  border-left: 1px solid var(--line);
  overflow-y: auto;
  padding: 16px 18px 22px;
  min-height: 0;
  background: var(--surface);
  scroll-behavior: smooth;
}

/* 안내 카드 */
.intro-card {
  background: var(--surface-2);
  border-radius: 14px;
  padding: 15px 16px;
  margin-bottom: 16px;
}
.intro-card h2 { font-size: 13.5px; margin: 0 0 5px; color: var(--ink); font-weight: 700; }
.intro-card p { margin: 0; font-size: 12.5px; color: var(--ink-2); }
.intro-card b { color: var(--ink); font-weight: 600; }

/* 인증 설명 */
.cert-explainer {
  position: relative;
  background: var(--surface);
  border-radius: 14px;
  box-shadow: var(--lift-1);
  padding: 16px 17px;
  margin-bottom: 16px;
}
.cert-explainer h4 {
  margin: 0 0 3px; font-size: 14.5px; font-weight: 700;
  display: flex; align-items: center; gap: 7px; padding-right: 20px;
}
.cert-explainer h4 .cdot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.cert-explainer h4 .cnt { font-size: 12px; color: var(--ink-3); font-weight: 400; }
.cert-explainer .org { font-size: 12px; color: var(--ink-3); margin-bottom: 8px; }
.cert-explainer .crit { font-size: 12.5px; margin: 0 0 8px; line-height: 1.7; color: var(--ink-2); }
.cert-explainer .note {
  font-size: 11.5px; color: var(--ink-3); margin: 0;
  padding-top: 8px; border-top: 1px solid var(--line);
}
.cert-explainer .close-x {
  position: absolute; top: 10px; right: 10px;
  appearance: none; border: none; background: none;
  font-size: 13px; color: var(--ink-3); cursor: pointer; padding: 4px; line-height: 1;
}
.cert-explainer .close-x:hover { color: var(--ink); }

.panel h3 {
  font-size: 11.5px; font-weight: 600; color: var(--ink-3);
  margin: 0 0 8px;
}

/* 목록 */
.place-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 10px;
  border-radius: 11px;
  cursor: pointer;
  transition: background 0.15s var(--ease);
}
.place-row:hover { background: var(--surface-2); }
.place-row .dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.place-row .nm {
  font-weight: 500; font-size: 13.5px; flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.place-row .nm small { color: var(--ink-3); font-weight: 400; margin-left: 6px; font-size: 11.5px; }
.mini-badges { display: flex; gap: 3px; flex: none; }
.mini-badge { width: 5px; height: 5px; border-radius: 50%; }
.empty-note { font-size: 13px; color: var(--ink-3); padding: 14px 8px; }

/* 상세 */
.back-btn {
  appearance: none; border: none; background: none; font: inherit;
  color: var(--ink-3); cursor: pointer; padding: 0; margin-bottom: 12px; font-size: 12.5px;
}
.back-btn:hover { color: var(--ink); }
.detail h2 { font-size: 21px; font-weight: 700; margin: 0 0 3px; letter-spacing: -0.03em; }
.detail .sub { font-size: 12.5px; color: var(--ink-3); margin-bottom: 13px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.badge {
  font-size: 12px; font-weight: 600; padding: 7px 11px; border-radius: 9px;
  background: var(--surface-2); color: var(--ink-2);
  display: flex; align-items: center; gap: 6px;
}
.badge .bdot { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.badge small { display: block; font-weight: 400; font-size: 11px; color: var(--ink-3); }
.info-box { background: var(--surface-2); border-radius: 12px; padding: 13px 15px; margin-bottom: 13px; }
.info-row { display: grid; grid-template-columns: 52px 1fr; gap: 8px; font-size: 12.5px; padding: 2px 0; }
.info-row .k { color: var(--ink-3); }
.menu-table { width: 100%; border-collapse: collapse; margin-bottom: 13px; }
.menu-table caption {
  text-align: left; font-size: 11.5px; color: var(--ink-3);
  font-weight: 600; padding-bottom: 6px;
}
.menu-table td { font-size: 12.5px; padding: 7px 4px; border-bottom: 1px solid var(--line); }
.menu-table tr:last-child td { border-bottom: none; }
.menu-table td.price { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.comment {
  background: var(--surface-2);
  border-radius: 12px;
  padding: 13px 15px;
  font-size: 13px; margin-bottom: 14px; color: var(--ink-2);
}
.comment .who { display: block; font-size: 11.5px; color: var(--ink-3); margin-top: 5px; }
.src-note { font-size: 11.5px; color: var(--ink-3); margin-top: 10px; }

/* 리뷰 바로가기 */
.rv-title { margin: 20px 0 3px !important; }
.rv-desc { margin: 0 0 10px; font-size: 11.5px; color: var(--ink-3); }
.rv-links { display: flex; flex-direction: column; gap: 7px; }
.rv-link {
  display: flex; align-items: center; gap: 9px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 13px; font-weight: 600;
  text-decoration: none;
  transition: box-shadow 0.18s var(--ease), transform 0.18s var(--ease);
}
.rv-link:hover { box-shadow: var(--lift-1); transform: translateY(-1px); }
.rv-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rv-link .rv-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.rv-link .rv-name { flex: 1; }
.rv-link .rv-go { font-size: 11.5px; font-weight: 500; color: var(--ink-3); }

/* 코스 */
.theme-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.theme-chip {
  appearance: none; font: inherit; cursor: pointer;
  border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2);
  border-radius: 999px; padding: 6px 13px; font-size: 12.5px;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease);
}
.theme-chip:hover { background: var(--surface-2); }
.theme-chip.on { background: var(--ink); border-color: var(--ink); color: #FFF; font-weight: 600; }
/* dark */ html[data-theme="dark"] .theme-chip.on { color: #14161A; }


.course-card {
  border-radius: 14px;
  padding: 15px 16px; margin-bottom: 9px;
  cursor: pointer;
  background: var(--surface-2);
  transition: box-shadow 0.18s var(--ease), transform 0.18s var(--ease);
}
.course-card:hover { box-shadow: var(--lift-1); transform: translateY(-1px); }
.course-card.on { background: var(--surface); box-shadow: var(--lift-2); }
.course-card h4 { margin: 0 0 3px; font-size: 14.5px; font-weight: 700; letter-spacing: -0.02em; }
.course-card .meta { font-size: 11.5px; color: var(--ink-3); margin-bottom: 5px; }
.course-card p { margin: 0; font-size: 12.5px; color: var(--ink-2); }
.stop-list { margin: 13px 0 0; padding: 0; list-style: none; }
.stop-list li {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 8px 4px; cursor: pointer; border-radius: 9px;
  transition: background 0.15s var(--ease);
}
.stop-list li:hover { background: var(--bg); }
.stop-num {
  flex: none; width: 21px; height: 21px; border-radius: 50%;
  background: var(--ink); color: var(--surface);
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; margin-top: 2px;
}
.stop-list b { font-size: 13px; display: block; font-weight: 600; }
.stop-list span { font-size: 12px; color: var(--ink-3); }

/* 지도 폴백 */
.map-fallback { display: none; }
.map-fallback.on {
  display: flex;
  position: absolute; inset: 0;
  align-items: center; justify-content: center;
  background: var(--surface-2);
  z-index: 600;
  padding: 24px;
}
.fallback-card {
  max-width: 440px;
  background: var(--surface);
  border-radius: 16px;
  padding: 26px 28px;
  box-shadow: var(--lift-2);
}
.fallback-card h2 { font-size: 17px; font-weight: 700; margin: 0 0 10px; }
.fallback-card p { font-size: 13.5px; margin: 0 0 10px; color: var(--ink-2); }
.fallback-card .dim { color: var(--ink-3); font-size: 12.5px; margin: 0; }

.engine-note {
  position: absolute; bottom: 12px; left: 12px;
  font-size: 11px; color: var(--ink-3);
  background: var(--surface); padding: 5px 11px; border-radius: 999px;
  box-shadow: var(--lift-1); z-index: 500;
  pointer-events: none;
}
.engine-note:empty { display: none; }


/* 배경지도 톤 정리 — 원색을 눌러 핀과 코스가 도드라지게 */
.leaflet-tile-pane { filter: saturate(0.8) contrast(1.02); }
/* dark */
  /* 다크에서는 반전으로 어두운 지도를 만든다 (마커는 다른 pane 이라 영향 없음). 길·글자가 읽히게 너무 누르지 않는다 */
  html[data-theme="dark"] .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) saturate(0.5) brightness(1.08) contrast(0.92); }


/* Leaflet 톤 정리 */
.leaflet-control-zoom a {
  border-radius: 8px !important;
  color: var(--ink) !important;
  border: none !important;
  box-shadow: var(--lift-1);
}
.leaflet-control-attribution { font-size: 10px !important; }

/* ---------- 반응형 ---------- */
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .side { display: none; }
  .card-body { grid-template-columns: 1fr; grid-template-rows: minmax(240px, 42vh) 1fr; }
  .panel { border-left: none; border-top: 1px solid var(--line); }
  .content { padding: 0 10px 10px; }
  .topbar { padding: 0 14px; }
  .data-note { display: none; }
  .card { border-radius: 14px; }
  .card-head { flex-wrap: wrap; gap: 8px; padding: 14px 16px 12px; }
  .search-box { flex: 1 1 100%; }
  .filter-zone { padding: 0 16px 12px; }
}

/* ---------- 모바일: 화면 높이를 나눠 쓰지 않고 페이지 전체가 스크롤된다 ----------
   (고정 높이 레이아웃이면 필터·지도에 밀려 목록이 50px 남짓으로 찌그러진다) */
@media (max-width: 720px) {
  .app { height: auto; min-height: 100vh; }
  .topbar { position: sticky; top: 0; z-index: 1000; }
  .content { display: block; padding: 0 8px 12px; }
  .card { overflow: visible; }
  .card-body { display: block; }
  .map-wrap { height: 50vh; min-height: 280px; max-height: 460px; scroll-margin-top: 61px; /* 붙어 있는 상단 탭 높이 */ }
  .back-btn { min-height: 40px; padding: 8px 12px 8px 0; margin-bottom: 4px; }
  .panel { overflow: visible; border-radius: 0 0 14px 14px; }
  /* 칩은 한 줄로 두고 옆으로 민다 → 필터가 화면 절반을 먹지 않게 */
  .filter-zone { gap: 7px; }
  .filter-row { min-width: 0; }
  .filter-label { width: auto; min-width: 40px; white-space: nowrap; }
  .chips { flex-wrap: nowrap; overflow-x: auto; min-width: 0; padding-bottom: 2px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .f-chip { flex: none; }
  /* 날씨는 지도를 덜 가리게 작게 */
  .weather-widget { min-width: 0; font-size: 11.5px; }
  .wx-main { padding: 6px 10px; gap: 6px; }
  .wx-icon, .wx-temp { font-size: 17px; }
}

/* ============================================================
   코스 — 시간 축 (v18)
   ============================================================ */
.cc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cc-top h2, .cc-top h4 { margin: 0; }
.course-card .cc-top { margin-bottom: 3px; }
.course-card.disabled { opacity: 0.55; cursor: default; }
.course-card.disabled:hover { box-shadow: none; transform: none; }
.status {
  flex: none; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink-3); white-space: nowrap;
}
.status.ok { background: #E8F6EE; color: #1E7A4C; }
.status.warn { background: #FFF4E0; color: #9A5B00; }
/* dark */
  html[data-theme="dark"] .status.ok { background: #16352A; color: #7FD7A8; }
  html[data-theme="dark"] .status.warn { background: #3A2C12; color: #F2C26B; }

.course-detail .scene { font-size: 13px; color: var(--ink-2); margin: 0 0 14px; }

.tl-controls {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  padding: 10px 12px; border-radius: 12px; background: var(--surface-2); margin-bottom: 14px;
}
.tl-controls label { font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.tl-controls input {
  font: inherit; font-size: 13px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px;
}
.tl-controls input[type="time"] { font-weight: 700; }
.tl-total { font-size: 12.5px; font-weight: 600; color: var(--ink); margin-left: auto; }

.timeline { list-style: none; margin: 0 0 14px; padding: 0; }
.tl-stop { display: grid; grid-template-columns: 46px 24px 1fr; gap: 0 10px; align-items: start; }
.tl-time { text-align: right; line-height: 1.25; padding-top: 2px; }
.tl-time b { display: block; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.tl-time span { font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tl-dot {
  width: 24px; height: 24px; border-radius: 50%; background: #3B97D3; color: #fff;
  font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.tl-stop.slot .tl-dot { background: var(--surface); color: #3B97D3; border: 2px dashed #3B97D3; }
.tl-body { padding: 0 0 4px; min-width: 0; }
.tl-stop.slot .tl-body { border: 1px dashed var(--line); border-radius: 10px; padding: 6px 10px 8px; }
.tl-name { display: flex; align-items: baseline; gap: 8px; font-weight: 700; font-size: 14px; }
.tl-name a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.tl-name a:hover { border-color: var(--ink); }
.tl-opt { font-size: 10.5px; font-weight: 600; color: var(--ink-2); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; white-space: nowrap; }
.tl-optbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 10px 0 4px; padding: 9px 12px;
  border: 1px dashed var(--line); border-radius: 10px; font-size: 12.5px; color: var(--ink-2); }
.tl-skipopt { font: inherit; font-size: 12px; font-weight: 600; color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; cursor: pointer; }
.tl-skipopt:hover { border-color: var(--ink); }
.tl-stay { font-size: 11.5px; font-weight: 500; color: var(--ink-3); white-space: nowrap; }
.tl-note { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.tl-cands { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 6px; font-size: 11.5px; color: var(--ink-3); }
.tl-cands .cand {
  font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--surface-2);
  color: var(--ink-2); text-decoration: none;
}
.tl-cands a.cand:hover { color: var(--ink); }
.tl-warn { font-size: 12px; margin-top: 5px; padding: 4px 8px; border-radius: 8px; background: var(--surface-2); color: var(--ink-2); }
.tl-warn.info { background: transparent; padding: 0; color: var(--ink-3); }
.tl-warn.info::before { content: "· "; }
.tl-warn.ok { background: #E8F6EE; color: #1E7A4C; }
.tl-warn.warn { background: #FFF4E0; color: #8A5200; }
.tl-warn.bad { background: #FDECEC; color: #B42318; }
/* dark */
  html[data-theme="dark"] .tl-warn.ok { background: #16352A; color: #7FD7A8; }
  html[data-theme="dark"] .tl-warn.warn { background: #3A2C12; color: #F2C26B; }
  html[data-theme="dark"] .tl-warn.bad { background: #3D1A1A; color: #F59E9E; }

.tl-fix {
  font: inherit; font-size: 11.5px; font-weight: 600; margin-left: 4px; cursor: pointer;
  border: none; border-radius: 6px; padding: 1px 7px; background: rgba(0,0,0,0.08); color: inherit;
}
.tl-remove {
  font: inherit; font-size: 11px; color: var(--ink-3); background: none; border: none;
  padding: 2px 0; margin-top: 3px; cursor: pointer;
}
.tl-remove:hover { color: #B42318; }
.tl-move {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px;
  margin: 0 0 0 67px; padding: 8px 0 8px 14px; border-left: 2px dotted #9CC9E8;
  font-size: 11.5px; color: var(--ink-3);
}
.mv-mode { font-weight: 600; color: var(--ink-2); }
.mv-src { padding: 0 6px; border-radius: 999px; background: var(--surface-2); }
.mv-link { margin-left: auto; color: var(--accent); text-decoration: none; }
.mv-link:hover { text-decoration: underline; }

.tl-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.btn-primary, .btn-ghost {
  font: inherit; font-size: 13px; font-weight: 600; border-radius: 10px; padding: 8px 14px; cursor: pointer;
}
.btn-primary { background: var(--ink); color: var(--surface); border: none; }
.btn-ghost { background: none; color: var(--ink-2); border: 1px solid var(--line); }

@media (max-width: 960px) {
  .tl-total { margin-left: 0; flex-basis: 100%; }
}
.filter-zone[hidden] { display: none !important; }

/* 정차지 실용 정보 + 혜택 (v20) */
.tl-info {
  display: grid; grid-template-columns: auto 1fr; gap: 1px 10px;
  margin: 6px 0 0; padding: 6px 9px; border-radius: 8px; background: var(--surface-2); font-size: 11.5px;
}
.tl-info dt { color: var(--ink-3); }
.tl-info dd { margin: 0; color: var(--ink-2); }
.tl-info .tl-info-src { grid-column: 1 / -1; color: var(--ink-3); font-size: 10.5px; }
.tl-benefit {
  display: inline-block; margin-top: 5px; font-size: 11.5px; font-weight: 600;
  padding: 2px 8px; border-radius: 6px; background: #EEF4FF; color: #2C5FC4;
}
/* dark */ html[data-theme="dark"] .tl-benefit { background: #1B2A44; color: #8DB5FF; }

.tl-time .tl-wait { display: block; font-size: 10.5px; color: #9A5B00; }

/* 주차: 정차지 카드의 P 블록, 이동 줄의 주차 구간, 도보 코스의 "차로 오시나요?" */
.tl-park {
  display: flex; align-items: flex-start; gap: 8px;
  margin-top: 6px; padding: 7px 9px; border-radius: 8px; background: var(--surface-2); font-size: 12px; color: var(--ink-2);
}
.tl-park > b {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px;
  border-radius: 4px; background: #2F5D8C; color: #fff; font-size: 11px; font-weight: 700;
}
.tl-park-body { min-width: 0; display: grid; gap: 2px; }
.tl-park-name { font-weight: 600; color: var(--ink); }
.tl-park-name .tl-cand { margin-left: 4px; }
.tl-park small, .tl-car li small { display: block; font-size: 10.5px; color: var(--ink-3); }
.tl-cand {
  font-size: 10.5px; font-weight: 600; padding: 0 6px; border-radius: 999px;
  background: #FFF4E0; color: #8A5200; white-space: nowrap;
}
/* dark */ html[data-theme="dark"] .tl-cand { background: #3A2C12; color: #F2C26B; }
.mv-leg { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--ink-2); }
.mv-leg small { font-weight: 400; color: var(--ink-3); }
.tl-end-back {
  margin: 0 0 12px 67px; padding: 0 0 0 14px; font-size: 12px; color: var(--ink-2);
}
.tl-end-back small { color: var(--ink-3); }
.tl-car { margin: 0 0 12px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 12.5px; color: var(--ink-2); }
.tl-car summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.tl-car ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.tl-car li { display: flex; align-items: flex-start; gap: 8px; }
.tl-car li > b {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px;
  border-radius: 4px; background: #2F5D8C; color: #fff; font-size: 11px; font-weight: 700;
}
.tl-car .src-note { margin: 8px 0 0; }

/* 6축 점수 (v22) */
.radar { display: block; width: 100%; max-width: 340px; margin: 4px auto 0; }
.score-total { font-size: 12.5px; font-weight: 600; color: var(--ink-3); margin-left: 6px; }
.score-meta { text-align: center; margin-top: 2px; }
.tl-score {
  font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px;
  background: var(--ink); color: var(--surface); white-space: nowrap;
}
.tl-cands .cand.selected { background: var(--ink); color: var(--surface); font-weight: 600; }
.tl-swap {
  font: inherit; font-size: 11px; font-weight: 600; color: var(--accent); background: none;
  border: none; padding: 2px 10px 0 0; margin-top: 3px; cursor: pointer;
}

/* 장소 단위 체크리스트 (가이드 7번) */
.place-info .pending { color: var(--ink-3); font-style: italic; }
.place-info .caution { color: #C4552D; }
.place-info .stale { color: #C4552D; font-weight: 600; }
.visited-chip { display: inline-block; margin: 6px 0 2px; padding: 3px 10px; border-radius: 999px;
  background: #EEF6FC; color: #2B7BB5; font-size: 12px; font-weight: 600; }
html[data-theme="dark"] .visited-chip { background: #1E3040; color: #7FC0EC; }


/* 임시휴무(긴급휴무) 표시 */
.cl-tag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 9px; font-size: 11px; font-weight: 600; background: #FDECEC; color: #C4262B; }
.cl-tag.late { background: #FFF4DB; color: #8A5A0B; }
.cl-tag.maybe { background: var(--surface-2); color: var(--ink-2); }
.cl-banner { border-radius: 12px; padding: 12px 14px; margin: 0 0 13px; background: #FDECEC; color: #C4262B; font-size: 14px; }
.cl-banner.late { background: #FFF4DB; color: #8A5A0B; }
.cl-banner.maybe { background: var(--surface-2); color: var(--ink-2); }
.cl-banner strong { display: block; font-size: 15px; }
.cl-banner .cl-note { display: block; margin-top: 3px; }
.cl-banner .cl-who { display: block; margin-top: 4px; font-size: 11.5px; opacity: .85; }
.cl-report { appearance: none; font: inherit; font-size: 12.5px; cursor: pointer; margin: 22px 0 13px; padding: 8px 12px; min-height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); }
.cl-report:hover:not(:disabled) { background: var(--surface-2); }
.cl-report:disabled { opacity: .6; cursor: default; }
.cl-report:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cl-tag, :root:not([data-theme="light"]) .cl-banner { background: #3A2224; color: #FF9B9E; }
  :root:not([data-theme="light"]) .cl-tag.late, :root:not([data-theme="light"]) .cl-banner.late { background: #3A3220; color: #F2C063; }
  :root:not([data-theme="light"]) .cl-tag.maybe, :root:not([data-theme="light"]) .cl-banner.maybe { background: var(--surface-2); color: var(--ink-2); }
}
:root[data-theme="dark"] .cl-tag, :root[data-theme="dark"] .cl-banner { background: #3A2224; color: #FF9B9E; }
:root[data-theme="dark"] .cl-tag.late, :root[data-theme="dark"] .cl-banner.late { background: #3A3220; color: #F2C063; }
:root[data-theme="dark"] .cl-tag.maybe, :root[data-theme="dark"] .cl-banner.maybe { background: var(--surface-2); color: var(--ink-2); }

/* 지금 영업 상태 (게시 영업시간 기준) */
.op-tag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 9px; font-size: 11px; font-weight: 600; background: var(--surface-2); color: var(--ink-2); }
.op-tag.open { background: #E7F4EA; color: #1E6E38; }
.op-tag.break, .op-tag.lastorder { background: #FFF4DB; color: #8A5A0B; }
.place-info .op-tag { margin-left: 0; margin-top: 4px; }
.place-info .op-tag::before { content: ""; display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .op-tag.open { background: #1F3326; color: #8FD3A4; }
  :root:not([data-theme="light"]) .op-tag.break, :root:not([data-theme="light"]) .op-tag.lastorder { background: #3A3220; color: #F2C063; }
}
:root[data-theme="dark"] .op-tag.open { background: #1F3326; color: #8FD3A4; }
:root[data-theme="dark"] .op-tag.break, :root[data-theme="dark"] .op-tag.lastorder { background: #3A3220; color: #F2C063; }

/* 도보 구간 횡단보도·계단 (답사 실측) */
.mv-walk { color: var(--ink-2); }
.mv-walk.has-stairs { color: #8A5A0B; font-weight: 600; }
.mv-walk small { font-weight: 400; color: var(--ink-3); }
.walk-sum { margin: 4px 0 12px; font-size: 12.5px; color: var(--ink-2); }
.walk-sum small { color: var(--ink-3); }
.walk-sum.pending { color: var(--ink-2); font-style: italic; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .mv-walk.has-stairs { color: #F2C063; }
}
:root[data-theme="dark"] .mv-walk.has-stairs { color: #F2C063; }

/* 날씨 기반 코스 추천 */
.wx-pick { cursor: pointer; display: flex; flex-direction: column; gap: 2px; padding: 11px 14px; margin-bottom: 14px;
  border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.wx-pick small { color: var(--ink-3); font-size: 11px; }
.wx-pick b { font-size: 14.5px; letter-spacing: -0.02em; }
.wx-pick span { font-size: 12px; color: var(--ink-2); }
.wx-pick:hover { box-shadow: var(--lift-1); }
.wx-badge { font-size: 11.5px; color: var(--ink-2); margin: 2px 0 4px; }
.wx-badge b { display: inline-block; padding: 1px 7px; border-radius: 999px; font-weight: 600; margin-right: 3px; }
.wx-badge.good b { background: #E8F6EE; color: #1E7A4C; }
.wx-badge.ok b { background: var(--surface-2); color: var(--ink-2); }
.wx-badge.bad b { background: #FFF4E0; color: #9A5B00; }
html[data-theme="dark"] .wx-badge.good b { background: #16352A; color: #7FD7A8; }
html[data-theme="dark"] .wx-badge.bad b { background: #3A2C12; color: #F2C26B; }

/* ---------- 선택한 핀 ----------
   바깥 상자는 일반 핀과 같은 크기로 두고 안쪽만 키운다 (지도 기준점 유지) */
.pin-sel { position: relative; width: 14px; height: 14px; }
.pin-sel-dot { position: relative; z-index: 2; transform: scale(1.6); transform-origin: 7px 7px; }
.pin-sel-dot > div { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink), 0 3px 10px rgba(0,0,0,.35) !important; }
.pin-halo {
  position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px;
  border-radius: 50%; opacity: .45; z-index: 1; pointer-events: none;
  animation: pinPulse 1.8s var(--ease) infinite;
}
@keyframes pinPulse {
  from { transform: scale(1); opacity: .5; }
  to   { transform: scale(4); opacity: 0; }
}
.pin-label {
  position: absolute; left: 50%; top: 22px; transform: translateX(-50%); z-index: 3;
  white-space: nowrap; pointer-events: none;
  font: 700 12px/1 "IBM Plex Sans KR", "Malgun Gothic", sans-serif; letter-spacing: -0.02em;
  color: var(--surface); background: var(--ink);
  padding: 5px 8px; border-radius: 7px; box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
@media (prefers-reduced-motion: reduce) { .pin-halo { animation: none; opacity: .3; transform: scale(2.4); } }

/* 위젯 안 추천 코스 */
.wx-course { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 8px; padding: 9px 11px; border-radius: 10px;
  background: var(--surface-2); color: var(--ink); text-decoration: none; cursor: pointer; }
.wx-course:hover { box-shadow: var(--lift-1); }
.wx-course small { color: var(--ink-3); font-size: 10.5px; }
.wx-course b { font-size: 13px; letter-spacing: -0.02em; }
.wx-cdesc { font-size: 11.5px; color: var(--ink-2); line-height: 1.4; }
.wx-cwhy { font-size: 11px; color: var(--accent); }
.wx-cmeta { font-size: 10.5px; color: var(--ink-3); margin-top: 2px; }
.weather-widget .wx-more { width: 280px; max-width: 100%; box-sizing: border-box; }
.wx-course.bad { background: #FFF4E0; }
.wx-course.bad .wx-cwarn { font-size: 11.5px; color: #9A5B00; line-height: 1.4; }
html[data-theme="dark"] .wx-course.bad { background: #3A2C12; }
html[data-theme="dark"] .wx-course.bad .wx-cwarn { color: #F2C26B; }
.wx-pick.bad { background: #FFF4E0; }
html[data-theme="dark"] .wx-pick.bad { background: #3A2C12; }
.wx-course.bad small, .wx-course.bad .wx-cmeta { color: var(--ink-2); }
/* 이름표 자리: 코스 번호 핀과 겹치면 app.js placePinLabel()이 data-pos를 바꾼다 */
.pin-label[data-pos="right"] { left: 24px; top: 50%; transform: translateY(-50%); }
.pin-label[data-pos="left"]  { left: auto; right: 24px; top: 50%; transform: translateY(-50%); }
.pin-label[data-pos="above"] { top: auto; bottom: 22px; }
