:root {
  --bg: #04060a;
  --panel: #0a0d14;
  --panel-2: #0e1320;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.14);
  --fg: #e8edf5;
  --muted: #6b768a;
  --muted-2: #8e98ac;
  --accent: #7dd3d3;
  --accent-glow: rgba(125, 211, 211, 0.45);
  --accent-soft: rgba(125, 211, 211, 0.10);
  --warn: #f0b46a;
  --crit: #ff5e57;
  --crit-soft: rgba(255, 94, 87, 0.10);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  background:
    radial-gradient(ellipse 600px 400px at 50% -10%, rgba(125, 211, 211, 0.06), transparent 60%),
    var(--bg);
  color: var(--fg);
  font-family: "Inter", -apple-system, "Segoe UI", "Malgun Gothic", "맑은 고딕", system-ui, sans-serif;
  letter-spacing: -0.1px;
  font-feature-settings: "tnum", "ss01";
  overscroll-behavior-y: none;
}
button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }

.app {
  max-width: 440px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 14px 16px 100px;
  position: relative;
}
.app-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 0 12px;
}
.brand { font-size: 13px; font-weight: 600; }
.brand .dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent); margin-right: 8px; box-shadow: 0 0 10px var(--accent-glow); vertical-align: middle; }
.brand small { color: var(--muted); margin-left: 6px; font-weight: 400; font-size: 10px; text-transform: uppercase; letter-spacing: 1.2px; }
.back-btn {
  background: none; border: none; color: var(--muted); font-size: 13px;
  padding: 6px 8px;
}
.back-btn:hover { color: var(--fg); }

/* 차량 토글 탭 */
.tabs {
  display: flex; gap: 6px;
  background: var(--panel); padding: 4px;
  border-radius: 14px;
  margin: 6px 0 14px;
  border: 1px solid var(--line);
}
.tab {
  flex: 1; padding: 11px 10px; text-align: center;
  background: transparent; border: none; color: var(--muted);
  font-size: 13px; font-weight: 500;
  border-radius: 10px;
  transition: all 0.18s ease;
}
.tab.active {
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(125,211,211,0.25);
}

/* 컨텍스트 (역/시각) */
.context {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 10px 4px 18px;
}
.context .station { font-size: 18px; font-weight: 500; letter-spacing: -0.3px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; cursor: pointer; padding: 4px 8px; border-radius: 8px; transition: background 0.15s; }
.context .station:hover { background: rgba(125,211,211,0.08); }
.context .station:focus { outline: 1px solid var(--accent); outline-offset: 2px; }
.context .station .picker-arrow { color: var(--muted); font-size: 11px; margin-left: 2px; }

/* === 역 선택 모달 === */
.station-modal {
  position: fixed; inset: 0; z-index: 99998;
  display: flex; align-items: flex-end; justify-content: center;
  animation: modalIn 0.2s ease-out;
}
@keyframes modalIn { from { opacity: 0; } to { opacity: 1; } }
.station-modal[hidden] { display: none; }
.station-modal .modal-bg {
  position: absolute; inset: 0; background: rgba(0,0,0,0.55); backdrop-filter: blur(4px);
}
.station-modal .modal-panel {
  position: relative; width: 100%; max-width: 480px;
  background: var(--panel); border-top: 2px solid var(--accent);
  border-radius: 18px 18px 0 0; padding: 16px 18px;
  max-height: 70vh; display: flex; flex-direction: column;
  animation: modalSlide 0.25s cubic-bezier(0.2, 0.8, 0.4, 1);
}
@keyframes modalSlide { from { transform: translateY(100%); } to { transform: translateY(0); } }
.station-modal .modal-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 14px; font-weight: 600; color: var(--fg); margin-bottom: 10px;
}
.station-modal .modal-close {
  background: transparent; border: none; color: var(--muted); font-size: 22px; cursor: pointer; padding: 0; line-height: 1;
}
.station-modal .modal-close:hover { color: var(--fg); }
.station-modal .modal-search {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--fg);
  padding: 9px 12px; border-radius: 10px; font-size: 13px;
  font-family: inherit; outline: none;
}
.station-modal .modal-search:focus { border-color: var(--accent); }
.station-modal .modal-list { overflow-y: auto; margin: 10px 0; flex: 1; }
.station-modal .modal-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 12px; border-radius: 8px; cursor: pointer;
  transition: background 0.1s; font-size: 14px;
}
.station-modal .modal-row:hover { background: rgba(255,255,255,0.04); }
.station-modal .modal-row.current { background: rgba(125,211,211,0.10); color: var(--accent); }
.station-modal .modal-row .name { font-weight: 500; }
.station-modal .modal-row .name b { font-weight: 600; }
.station-modal .modal-row .meta { color: var(--muted); font-size: 11px; margin-left: 6px; }
.station-modal .modal-row .km { color: var(--accent); font-size: 11px; font-feature-settings: 'tnum'; }
.station-modal .modal-row .hot { font-size: 12px; margin-left: 4px; filter: drop-shadow(0 0 4px rgba(255,94,87,0.5)); }
.station-modal .modal-foot {
  border-top: 1px solid var(--line); padding-top: 10px;
}
.station-modal .modal-foot button {
  background: var(--accent-soft); border: 1px solid rgba(125,211,211,0.30);
  color: var(--accent); padding: 8px 14px; border-radius: 8px;
  font-size: 12px; cursor: pointer; font-family: inherit; width: 100%;
}
.station-modal .modal-foot button:hover { background: rgba(125,211,211,0.18); }
.context .station small { color: var(--muted); font-weight: 400; font-size: 13px; margin-left: 6px; }
.context .station .gps-pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 10px var(--accent); animation: gps-pulse 1.8s ease-in-out infinite;
  flex-shrink: 0; cursor: help;
}
.context .station .gps-pulse.searching { background: var(--warn); box-shadow: 0 0 10px var(--warn); }
.context .station .gps-pulse.error { background: var(--crit); box-shadow: 0 0 10px var(--crit); animation: none; opacity: 0.5; }
.context .station .gps-pulse.locked { animation: none; opacity: 1; }
@keyframes gps-pulse { 0%, 100% { opacity: 0.4; transform: scale(1); } 50% { opacity: 1; transform: scale(1.15); } }
.context .time { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }

/* 메인 결정 카드 */
.decision {
  background: linear-gradient(160deg, rgba(125, 211, 211, 0.08), rgba(125, 211, 211, 0.02));
  border: 1px solid rgba(125, 211, 211, 0.28);
  border-radius: 22px;
  padding: 22px;
  position: relative;
  overflow: hidden;
}
.decision::before {
  content: ''; position: absolute; top: -50%; right: -30%;
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(125, 211, 211, 0.18), transparent 70%);
  pointer-events: none;
}
.decision .label {
  color: var(--accent); font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 1.4px; margin-bottom: 10px;
}
.decision .pct {
  font-size: 56px; font-weight: 200; letter-spacing: -2px;
  font-variant-numeric: tabular-nums;
  display: flex; align-items: baseline; gap: 6px;
}
.decision .pct .car {
  font-size: 22px; font-weight: 500; color: var(--fg); margin-right: 6px;
}
.decision .pct .unit { font-size: 22px; color: var(--muted); font-weight: 300; }
.decision .why { color: var(--muted-2); font-size: 13px; margin-top: 10px; line-height: 1.5; }
.decision .why b { color: var(--accent); font-weight: 500; }

/* === 칸 인원/밀집도 강조 (사용자 명수 직관 표시) === */
.decision .people-row {
  display: flex; justify-content: space-between; align-items: baseline;
  margin: 10px 0 0; padding: 10px 12px;
  background: rgba(125,211,211,0.06); border: 1px solid rgba(125,211,211,0.18);
  border-radius: 10px;
}
.decision .people-stat .people-num {
  font-size: 28px; font-weight: 700; color: var(--accent);
  font-variant-numeric: tabular-nums; letter-spacing: -0.6px;
}
.decision .people-stat .people-unit { font-size: 14px; color: var(--accent); margin-left: 2px; font-weight: 500; }
.decision .people-stat .people-cap {
  font-size: 12px; color: var(--muted-2); margin-left: 8px; font-feature-settings: 'tnum';
}
.decision .people-density {
  font-size: 12px; color: var(--muted-2); display: flex; align-items: baseline; gap: 4px;
}
.decision .people-density #d-density {
  font-size: 18px; font-weight: 600; color: var(--fg);
  font-variant-numeric: tabular-nums;
}
.decision .people-density .density-unit { color: var(--muted); margin-right: 6px; font-size: 11px; }
.decision .people-density .density-label {
  font-size: 10px; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; font-weight: 600;
  padding-left: 6px; border-left: 1px solid rgba(255,255,255,0.10);
}

/* MiniBEV 헤더에 검출 인원 표시 */
.minibev .bev-people {
  margin-left: auto; margin-right: 10px;
  font-size: 12px; color: var(--muted-2); font-feature-settings: 'tnum';
}
.minibev .bev-people b { color: var(--accent); font-weight: 700; font-size: 14px; }

/* 접근 안내 */
.approach {
  margin-top: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
  display: flex; gap: 14px; align-items: center;
}
.approach .icon {
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-size: 20px;
  flex-shrink: 0;
}
.approach .body { flex: 1; }
.approach .head { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; margin-bottom: 4px; }
.approach .text { font-size: 14px; }
.approach .text b { color: var(--fg); font-weight: 500; }

/* ETA 큰 숫자 */
.eta {
  margin-top: 10px;
  display: flex; gap: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 18px;
  align-items: baseline;
}
.eta .label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; }
.eta .num {
  font-size: 28px; font-weight: 300; font-variant-numeric: tabular-nums;
  letter-spacing: -0.5px; margin-left: auto;
}
.eta .unit { color: var(--muted); font-size: 14px; margin-left: 2px; }

/* === 편성 strip (onboard) === */
.train-bar {
  margin-top: 12px; padding: 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
}
.train-bar .tb-head {
  display: flex; justify-content: space-between; align-items: baseline;
  color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px;
  margin-bottom: 10px;
}
.train-bar .tb-head .tb-meta {
  color: var(--fg); font-weight: 500; letter-spacing: 0; text-transform: none;
  font-size: 12px; font-feature-settings: 'tnum';
}
.train-bar .train-strip-canvas {
  width: 100%; height: 80px; display: block;
}
.train-bar .tb-foot {
  margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
}
.train-bar .tb-tip {
  font-size: 13px; color: var(--fg); line-height: 1.5;
}
.train-bar .tb-tip b { color: var(--accent); font-weight: 600; }
.train-bar .tb-tip em { color: var(--warn); font-style: normal; font-weight: 600; }

/* 미니 BEV */
.minibev {
  margin-top: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  position: relative;
}
.minibev .head {
  display: flex; justify-content: space-between; align-items: center;
  color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px;
  margin-bottom: 8px;
}
.minibev .head .live {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--accent); font-weight: 500;
}
.minibev .head .live::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 8px var(--accent-glow);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
#bev { width: 100%; aspect-ratio: 5 / 1.05; display: block; }
#bev.bus { aspect-ratio: 5 / 1.5; }
#bev.large { aspect-ratio: 5 / 1.6; }

/* 비교 */
.compare {
  margin-top: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 18px;
}
.compare .head { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; margin-bottom: 10px; }
.compare-row {
  display: grid; grid-template-columns: 60px 1fr 60px 60px;
  gap: 10px; align-items: center;
  padding: 8px 0; font-size: 13px; font-variant-numeric: tabular-nums;
  border-top: 1px solid var(--line);
}
.compare-row:first-of-type { border-top: none; }
.compare-row .when { color: var(--muted); }
.compare-row .bar { height: 4px; background: rgba(255,255,255,0.06); border-radius: 999px; overflow: hidden; }
.compare-row .bar > div { height: 100%; background: var(--fg); transition: width 0.3s; }
.compare-row .bar.warn > div { background: var(--warn); }
.compare-row .bar.crit > div { background: var(--crit); }
.compare-row .pct { text-align: right; }
.compare-row .verdict { color: var(--muted); font-size: 11px; text-align: right; }
.compare-row .verdict.go { color: var(--accent); }
.compare-row .verdict.no { color: var(--crit); }

/* 알림 카드 */
.alert {
  margin-top: 14px;
  background: var(--crit-soft);
  border: 1px solid rgba(255, 94, 87, 0.32);
  border-radius: 16px;
  padding: 14px 16px;
  color: var(--crit);
  font-size: 13px;
  display: flex; gap: 10px; align-items: center;
  opacity: 0; transform: translateY(4px); transition: all 0.25s ease;
  pointer-events: none; height: 0; padding-top: 0; padding-bottom: 0; margin-top: 0; border-width: 0;
}
.alert.show {
  opacity: 1; transform: translateY(0);
  height: auto; padding-top: 14px; padding-bottom: 14px; margin-top: 14px; border-width: 1px;
}
.alert::before { content: '⚠'; font-size: 16px; }

/* 탑승 중 화면: 다음 정거장 예측 카드 */
.predict {
  margin-top: 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
}
.predict .head { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; margin-bottom: 10px; }
.predict .flow {
  display: flex; align-items: baseline; gap: 8px;
  font-variant-numeric: tabular-nums;
}
.predict .now { font-size: 32px; font-weight: 200; color: var(--fg); }
.predict .arrow { color: var(--muted); font-size: 18px; }
.predict .next { font-size: 32px; font-weight: 200; color: var(--accent); }
.predict .delta { color: var(--muted); font-size: 13px; margin-left: auto; }
.predict .station { color: var(--muted-2); font-size: 12px; margin-top: 8px; }

/* 환승 안내 */
.transfer {
  margin-top: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 18px;
  display: flex; gap: 14px; align-items: center;
}
.transfer .icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-size: 16px;
  flex-shrink: 0;
}
.transfer .body { flex: 1; }
.transfer .head { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; margin-bottom: 3px; }
.transfer .text { font-size: 14px; }
.transfer .text b { color: var(--accent); font-weight: 500; }

/* 시간 데모 슬라이더 */
.demo-time {
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--panel);
  border: 1px dashed var(--line-2);
  border-radius: 12px;
  display: flex; align-items: center; gap: 10px;
}
.demo-time label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; flex-shrink: 0; }
.demo-time input[type="range"] {
  appearance: none; flex: 1; background: transparent; height: 18px;
}
.demo-time input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: var(--line-2); border-radius: 2px; }
.demo-time input[type="range"]::-webkit-slider-thumb {
  appearance: none; width: 14px; height: 14px; border-radius: 50%;
  background: var(--fg); margin-top: -6px; cursor: pointer;
  box-shadow: 0 0 0 4px rgba(232, 237, 245, 0.10);
}
.demo-time output { font-size: 13px; min-width: 36px; color: var(--fg); font-variant-numeric: tabular-nums; }

/* CTA (Sticky) */
.cta {
  position: fixed; bottom: 14px; left: 50%; transform: translateX(-50%);
  width: calc(100% - 32px); max-width: 408px;
  padding: 16px 20px;
  background: var(--accent); color: #04060a;
  border: none; border-radius: 999px;
  font-size: 15px; font-weight: 600; letter-spacing: -0.2px;
  box-shadow: 0 8px 24px rgba(125, 211, 211, 0.25), 0 2px 6px rgba(0,0,0,0.3);
  z-index: 10;
  transition: transform 0.15s, box-shadow 0.15s;
}
.cta:active { transform: translateX(-50%) scale(0.98); box-shadow: 0 4px 12px rgba(125, 211, 211, 0.2); }
.cta .arrow { margin-left: 6px; }

/* Onboard top bar */
.topbar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 4px 14px;
}
.topbar .title { font-size: 16px; font-weight: 500; flex: 1; }
.topbar .title small { color: var(--muted); font-weight: 400; margin-left: 6px; font-size: 12px; }

/* 약자 모드 토글 */
.a11y-toggle {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-top: 10px;
  font-size: 13px;
}
.a11y-toggle .label { color: var(--muted-2); }
.a11y-toggle .switch {
  width: 44px; height: 24px; background: var(--line-2); border-radius: 999px;
  position: relative; transition: all 0.2s; flex-shrink: 0;
  border: none; cursor: pointer; padding: 0;
}
.a11y-toggle .switch::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; background: #e8edf5; border-radius: 50%;
  transition: all 0.2s;
}
.a11y-toggle .switch.on { background: var(--accent); }
.a11y-toggle .switch.on::after { left: 23px; background: #04060a; }

/* 약자 모드 적용 — 큰 글씨, 단순화 */
.app.a11y { font-size: 17px; }
.app.a11y .decision .pct { font-size: 64px; }
.app.a11y .decision .pct .car { font-size: 26px; }
.app.a11y .decision .why { font-size: 15px; }
.app.a11y .approach .text,
.app.a11y .transfer .text,
.app.a11y .predict .station { font-size: 16px; }
.app.a11y .compare-row { font-size: 15px; padding: 12px 0; }
.app.a11y .cta { font-size: 17px; padding: 18px 22px; }
.app.a11y .context .station { font-size: 22px; }
.app.a11y .eta .num { font-size: 32px; }

/* ========== LLM 어시스턴트 (시민 앱 인라인) ========== */
.assist {
  margin-top: 14px;
  background: linear-gradient(160deg, rgba(125, 211, 211, 0.06), rgba(125, 211, 211, 0.01));
  border: 1px solid rgba(125, 211, 211, 0.2);
  border-radius: 18px;
  padding: 16px;
}
.assist .head {
  color: var(--accent); font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 1.2px;
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.assist .head::before {
  content: '✨';
}
.assist .input-row {
  display: flex; gap: 6px; margin-bottom: 10px;
}
.assist input {
  flex: 1; background: rgba(0,0,0,0.3); border: 1px solid var(--line-2);
  color: var(--fg); padding: 10px 14px; border-radius: 10px;
  font-family: inherit; font-size: 14px; outline: none;
}
.assist input:focus { border-color: rgba(125, 211, 211, 0.4); }
.assist .mic {
  background: rgba(125, 211, 211, 0.10); color: var(--accent);
  border: 1px solid rgba(125, 211, 211, 0.3);
  padding: 0 14px; border-radius: 10px; font-size: 16px;
}
.assist .mic.listening {
  background: rgba(255, 94, 87, 0.15); color: var(--crit);
  border-color: rgba(255, 94, 87, 0.4);
  animation: pulse 1s infinite;
}
.assist .send {
  background: var(--accent); color: #04060a; border: none;
  padding: 0 16px; border-radius: 10px; font-weight: 500; font-size: 13px;
}
.assist .chips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.assist .chips .c {
  font-size: 11px; padding: 6px 10px; border-radius: 999px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--line-2);
  color: var(--muted-2); cursor: pointer;
}
.assist .chips .c:active { background: rgba(125, 211, 211, 0.08); color: var(--accent); }
.assist .answer {
  font-size: 13px; line-height: 1.6;
  background: rgba(0,0,0,0.25); border-radius: 10px;
  padding: 12px 14px; white-space: pre-wrap;
  min-height: 0; max-height: 240px; overflow-y: auto;
  color: var(--fg);
  transition: all 0.2s;
}
.assist .answer:empty { display: none; }

/* 사용자 위치 표시 (BEV 위) */
.you-here-tag {
  position: absolute; top: 22px; right: 22px;
  font-size: 10px; color: var(--accent);
  text-transform: uppercase; letter-spacing: 1.2px;
  font-weight: 500;
  display: flex; align-items: center; gap: 5px;
}
.you-here-tag::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 10px var(--accent);
}

/* ====== 라이브 백엔드 연결 표시 (헤더) ====== */
.live-badge {
  display: inline-flex; align-items: center; gap: 6px;
  margin-left: 10px; font-size: 10px; color: var(--muted);
  letter-spacing: 1.2px; font-feature-settings: "tnum";
}
.live-badge .led {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--muted);
  transition: all 0.3s ease;
}
.live-badge.connected .led { background: var(--accent); box-shadow: 0 0 10px var(--accent-glow); }
.live-badge.connected { color: var(--accent); }
.live-badge.connecting .led { background: var(--warn); }
.live-badge.connecting { color: var(--warn); }
.live-badge.error .led { background: var(--crit); }
.live-badge.error { color: var(--crit); }

/* ====== 역세권 인구 chip (서울 실시간 도시데이터) ====== */
.ppltn-strip {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; margin-top: -10px; margin-bottom: 10px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; font-size: 11px;
  transition: all 0.3s;
}
/* 붐빔(인파 폭증) — 빨간 펄스 + 트렌드 화살표 */
.ppltn-strip.crowd-surge {
  background: linear-gradient(90deg, rgba(255,94,87,0.12), var(--panel));
  border-color: rgba(255,94,87,0.4);
  box-shadow: 0 0 16px rgba(255,94,87,0.18);
  animation: surge-pulse 2.4s ease-in-out infinite;
}
@keyframes surge-pulse {
  0%, 100% { box-shadow: 0 0 12px rgba(255,94,87,0.18); }
  50%      { box-shadow: 0 0 22px rgba(255,94,87,0.40); }
}
.ppltn-strip .trend {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums;
  margin-left: 4px;
}
.ppltn-strip .trend.up   { color: var(--crit); }
.ppltn-strip .trend.down { color: var(--accent); }
.ppltn-strip .trend.flat { color: var(--muted-2); }
.ppltn-strip .icon { color: var(--accent); }
.ppltn-strip .area { color: var(--muted); }
.ppltn-strip .num {
  color: var(--fg); font-weight: 500; font-size: 12px;
  font-feature-settings: "tnum";
}
.ppltn-strip .lvl {
  padding: 1px 6px; border-radius: 4px;
  font-size: 10px; font-weight: 500;
}
.ppltn-strip .lvl.relax { color: var(--accent); background: var(--accent-soft); }
.ppltn-strip .lvl.normal { color: var(--accent); background: var(--accent-soft); }
.ppltn-strip .lvl.bit-busy { color: var(--warn); background: rgba(240, 180, 106, 0.15); }
.ppltn-strip .lvl.busy { color: var(--crit); background: var(--crit-soft); }
.ppltn-strip .source {
  margin-left: auto;
  padding: 2px 6px; border-radius: 4px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 9px; letter-spacing: 0.8px; font-weight: 500;
}

/* ====== 환승·환경 chip 행 (날씨/따릉이/주차) ====== */
.context-chips {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin: -6px 0 12px;
}
.context-chips .chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 9px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line);
  font-size: 11px; color: var(--muted-2);
  font-feature-settings: "tnum";
}
.context-chips .chip b { color: var(--fg); font-weight: 500; }
.context-chips .chip .ico { color: var(--accent); font-size: 12px; }
.context-chips .chip.warm { border-color: rgba(240,180,106,0.3); }
.context-chips .chip.warm .ico { color: var(--warn); }
.context-chips .chip.cold { border-color: rgba(125,211,211,0.3); }
.context-chips .chip.air-good { border-color: rgba(125,211,211,0.4); color: var(--accent); }
.context-chips .chip.air-mid { border-color: rgba(240,180,106,0.4); color: var(--warn); }
.context-chips .chip.air-bad { border-color: rgba(255,94,87,0.4); color: var(--crit); }
.context-chips .chip.uv-high { border-color: rgba(240,180,106,0.4); color: var(--warn); }
.context-chips .chip.uv-veryhigh { border-color: rgba(255,94,87,0.4); color: var(--crit); }
/* 부가 chip — 약자 모드 또는 데이터 풍부할 때만 표시. 기본은 숨김 */
.context-chips .more-chip { display: none; }
.app.a11y .context-chips .more-chip:not([hidden]) { display: inline-flex; }
@media (min-width: 600px) { .context-chips .more-chip:not([hidden]) { display: inline-flex; } }

/* 강수 예보 배너 — 향후 N시간 내 비/눈 시작 알림 */
.rain-banner {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; margin: -4px 0 12px;
  background: linear-gradient(90deg, rgba(125,211,211,0.06), rgba(125,211,211,0.02));
  border: 1px solid rgba(125,211,211,0.25);
  border-radius: 12px;
  font-size: 12px; color: var(--fg);
}
.rain-banner .ico { font-size: 16px; color: var(--accent); }
.rain-banner b { color: var(--accent); font-weight: 500; }

/* 주변 행사 카드 — 인구 영향 신호 */
.events-strip {
  margin: 0 0 12px;
  padding: 12px 14px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px;
}
.events-strip .events-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; color: var(--muted); letter-spacing: 1.2px;
  margin-bottom: 8px;
}
.events-strip .events-head .ico { color: var(--accent); font-size: 14px; }
.events-strip .events-head .src {
  margin-left: auto; padding: 2px 6px; border-radius: 4px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 9px; letter-spacing: 0.6px;
}
.events-strip .ev-row {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 0; font-size: 12px;
  border-top: 1px solid var(--line);
}
.events-strip .ev-row:first-of-type { border-top: 0; }
.events-strip .ev-row .name { color: var(--fg); flex: 1; }
.events-strip .ev-row .cap { color: var(--accent); font-weight: 500; font-feature-settings: 'tnum'; }
.events-strip .ev-row .dist { color: var(--muted-2); font-size: 10px; min-width: 38px; text-align: right; font-feature-settings: 'tnum'; }
.events-strip .events-summary {
  font-size: 11px; color: var(--muted-2);
  margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line);
}
.events-strip .events-summary b { color: var(--warn); font-weight: 500; }

/* === 24h 폭증 예측 카드 === */
.forecast-card {
  background: linear-gradient(135deg, rgba(167,139,250,0.10), rgba(125,211,211,0.04));
  border: 1px solid rgba(167,139,250,0.30);
  border-radius: 14px;
  padding: 12px 14px;
  margin: 0 0 10px;
}
.forecast-card .fc-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 6px;
}
.forecast-card .fc-tag {
  font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase;
  color: #a78bfa; padding: 3px 8px; background: rgba(167,139,250,0.15);
  border: 1px solid rgba(167,139,250,0.4); border-radius: 999px; font-weight: 700;
}
.forecast-card .fc-source { margin-left: auto; font-size: 9px; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; font-weight: 500; }
.forecast-card .fc-summary { font-size: 13px; color: var(--fg); font-weight: 500; line-height: 1.5; padding: 4px 0; }
.forecast-card .fc-peaks { display: flex; gap: 6px; flex-wrap: wrap; padding-top: 6px; border-top: 1px solid rgba(255,255,255,0.06); }
.forecast-card .fc-peak {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 999px; font-size: 11px;
  background: rgba(255,94,87,0.12); border: 1px solid rgba(255,94,87,0.3);
  color: #ff8a82; font-feature-settings: 'tnum';
}
.forecast-card .fc-peak b { color: #fff; font-weight: 600; }

/* === 인파 폭증 컨텍스트 카드 (네이버 뉴스 + LLM) === */
.context-card {
  background: linear-gradient(135deg, rgba(255,94,87,0.12), rgba(240,180,106,0.06));
  border: 1px solid rgba(255,94,87,0.35);
  border-radius: 14px;
  padding: 12px 14px;
  margin: 0 0 10px;
  animation: ctx-flash 0.5s ease-out;
}
@keyframes ctx-flash {
  0% { transform: translateY(-4px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
.context-card .ctx-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 6px;
}
.context-card .ctx-tag {
  font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--crit); padding: 3px 8px; background: rgba(255,94,87,0.15);
  border: 1px solid rgba(255,94,87,0.4); border-radius: 999px; font-weight: 700;
}
.context-card .ctx-source {
  margin-left: auto; font-size: 9px; color: var(--muted); letter-spacing: 1px;
  text-transform: uppercase; font-weight: 500;
}
.context-card .ctx-summary {
  font-size: 14px; color: var(--fg); font-weight: 500; line-height: 1.55;
  padding: 4px 0 8px;
}
.context-card .ctx-news {
  display: flex; flex-direction: column; gap: 4px;
  padding-top: 8px; border-top: 1px solid rgba(255,255,255,0.06);
}
.context-card .ctx-news a {
  font-size: 11px; color: var(--muted-2); text-decoration: none;
  padding: 3px 0; display: block; line-height: 1.45;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.context-card .ctx-news a:hover { color: var(--accent); }
.context-card .ctx-news .pub { color: var(--muted); font-size: 9px; margin-left: 4px; }

/* IDEA-5 분산 운임 인센티브 배너 */
.incentive-banner {
  background: linear-gradient(135deg, rgba(125,211,211,0.10), rgba(240,180,106,0.08));
  border: 1px solid rgba(125,211,211,0.30);
  border-radius: 14px;
  padding: 12px 14px;
  margin: 0 0 10px;
}
.incentive-banner .ic-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.incentive-banner .ic-tag {
  font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--accent); padding: 3px 8px; border: 1px solid rgba(125,211,211,0.4);
  border-radius: 999px; font-weight: 500;
}
.incentive-banner .ic-saved {
  margin-left: auto; font-size: 18px; font-weight: 300; color: var(--accent);
  font-feature-settings: 'tnum';
}
.incentive-banner .ic-body { font-size: 13px; color: var(--fg); display: flex; gap: 8px; align-items: baseline; }
.incentive-banner .ic-body #ic-window { font-feature-settings: 'tnum'; color: var(--accent); font-weight: 500; }
.incentive-banner .ic-sep { color: var(--muted); }
.incentive-banner .ic-foot { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 10px; color: var(--muted); }
.incentive-banner .ic-bar { flex: 1; height: 4px; background: rgba(255,255,255,0.06); border-radius: 999px; overflow: hidden; }
.incentive-banner .ic-fill { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--warn)); transition: width 0.5s; }

/* 안전 알림 배너 — 사고/통제 등 */
.safety-banner {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; margin: 0 0 10px;
  background: var(--crit-soft);
  border: 1px solid rgba(255,94,87,0.3);
  border-radius: 12px;
  font-size: 12px; color: var(--crit);
  font-weight: 500;
}
