/* WebNavi — 어두운 글래스 UI. 흰 글씨, 가는 서체, 강조색은 파랑 하나. */
:root {
  --glass: rgba(18, 20, 24, .88);
  --glass-solid: #16181d;
  --line: rgba(255, 255, 255, .10);
  --fg: #f3f4f6;
  --mut: #9aa1ab;
  --accent: #3e6ae1;
  --warn: #f5a623;
  --red: #e5322d;
  --ok: #2ea44f;
  --r: 16px;
  --ui: 1;               /* 화면 크기에 맞춘 UI 배율 (app.js가 설정) */
  --bar: 64px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #cfd3d8; color: var(--fg);
  font: 400 20px/1.25 "Pretendard", "Inter", "Segoe UI", "Malgun Gothic", system-ui, sans-serif; letter-spacing: -.01em; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
svg.i { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* 배율 적용 대상 */
#hud > *, #warn, #zoom, #recenter, #side, #bar, #memoPop, .panel, #toast, #gpsweak, #topbar, #err { zoom: var(--ui); }

/* 지도: SDK가 컨테이너 position을 덮어쓰므로 크기는 바깥 래퍼가 가지고, 안쪽 z-index가 HUD를 덮지 않게 격리한다 */
#mapwrap { position: absolute; inset: 0 0 calc(var(--bar) * var(--ui)) 0; }
#map { width: 100%; height: 100%; position: relative; z-index: 0; isolation: isolate; }
#car { position: absolute; left: 50%; top: var(--car-y, 50%); width: 44px; height: 44px; margin: -22px 0 0 -22px; z-index: 30; pointer-events: none; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .45)); }

#flash { position: absolute; inset: 0; z-index: 90; pointer-events: none; }
#flash.on { box-shadow: inset 0 0 70px 24px rgba(229, 50, 45, .75); animation: blink 1s steps(2) infinite; }
#flash.on.steady { animation: none; }
/* 과속 점멸 폭(설정 "과속 점멸 폭"): 1 좁게 / 2 보통(기본, 이전 값) / 3 넓게 — 차량 큰 화면에서 눈에 띄는 정도를 사용자가 골라 정한다 */
:root[data-flashw="1"] #flash.on { box-shadow: inset 0 0 40px 10px rgba(229, 50, 45, .75); }
:root[data-flashw="3"] #flash.on { box-shadow: inset 0 0 160px 70px rgba(229, 50, 45, .8); }
@keyframes blink { 50% { opacity: .15; } }

/* ---- 안내 카드 ---- */
#hud > * { position: absolute; z-index: 40; }
.glass, #turn, #sub, #bigTurn, #toll, #lanes, .fc, #facList, #topbar > *, .al, #speed, #toast, #gpsweak { background: var(--glass); backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0, 0, 0, .32); }

#turn { left: 14px; top: 14px; width: 290px; min-height: 96px; padding: 12px 18px 12px 14px; border-radius: var(--r); display: flex; align-items: center; gap: 14px; }
#turnIcon { width: 56px; flex: none; display: flex; justify-content: center; color: var(--fg); }
#turnIcon svg.i { width: 54px; height: 54px; stroke-width: 1.6; }
#turnIcon.tag { display: block; font-size: 22px; font-weight: 600; border: 2px solid var(--fg); border-radius: 8px; padding: 6px 0; width: 56px; letter-spacing: .02em; }
#turn .meta { display: flex; flex-direction: column; min-width: 0; }
#turn .meta b { font-size: 46px; font-weight: 300; line-height: 1; letter-spacing: -.02em; }
#turn .meta b small { font-size: 20px; font-weight: 400; margin-left: 3px; color: var(--mut); }
#turn .meta small.nm { font-size: 17px; color: var(--mut); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 170px; }
#sub { left: 14px; top: calc(var(--turn-b, 110px) + 12px); padding: 8px 16px; border-radius: 999px; display: flex; align-items: center; gap: 10px; font-size: 20px;
}
#subIcon { display: flex; color: var(--mut); } #subIcon svg.i { width: 26px; height: 26px; } #subIcon.tag { font-size: 13px; font-weight: 600; border: 1.5px solid var(--mut); border-radius: 6px; padding: 1px 6px; }
#sub b { font-weight: 500; } #sub b small { color: var(--mut); font-weight: 400; margin-left: 2px; }
#bigTurn { left: 50%; top: 22px; transform: translateX(-50%); display: flex; align-items: center; gap: 16px; padding: 8px 26px; border-radius: 999px;
  background: var(--glass); backdrop-filter: blur(16px); border: 1px solid var(--line); font-size: 40px; font-weight: 300; }
#bigIcon { display: flex; } #bigIcon svg.i { width: 56px; height: 56px; stroke-width: 1.6; }
#toll { left: 50%; top: 22px; transform: translateX(-50%); padding: 8px 24px; border-radius: 999px; font-size: 24px; font-weight: 500;
  background: var(--glass); backdrop-filter: blur(16px); border: 1px solid var(--line); }
#toll::before { content: "TG"; border: 1.5px solid var(--mut); color: var(--mut); border-radius: 5px; font-size: 13px; padding: 1px 5px; margin-right: 10px; vertical-align: 3px; }
#lanes { left: 50%; bottom: calc(76px + var(--ad-total, 0px)); transform: translateX(-50%); display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 12px;
  background: var(--glass); backdrop-filter: blur(16px); border: 1px solid var(--line); }
#lanes span { font-size: 13px; letter-spacing: .08em; color: var(--mut); margin: 0 8px 0 6px; text-transform: uppercase; }
#lanes i { font-style: normal; min-width: 40px; text-align: center; padding: 8px 0; border-radius: 8px; background: rgba(62, 106, 225, .9); }
#lanes i.dim { background: rgba(255, 255, 255, .12); }

/* 우측: 다음 JC/IC·휴게소 카드, 앞으로의 시설 목록 */
#rightCards { right: 34px; top: 76px; width: 320px; display: flex; flex-direction: column; gap: 8px; }
#hud #cardJc, #hud #cardRest { position: static; }
.fc { padding: 12px 16px; border-radius: var(--r); display: flex; flex-direction: column; gap: 4px; }
.fc .top { display: flex; align-items: center; gap: 10px; color: var(--mut); font-size: 17px; min-width: 0; }
.fc .top .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg); font-size: 19px; }
.fc .d { font-size: 38px; font-weight: 300; line-height: 1.05; letter-spacing: -.02em; }
.fc .d small { font-size: 18px; color: var(--mut); margin-left: 3px; font-weight: 400; }
#facList { margin: 0; padding: 4px 14px; list-style: none; border-radius: var(--r); font-size: 18px; }
#facList li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
#facList li:nth-child(n+5) { display: none; } /* 4행까지만: 아래 버튼열과 겹치지 않게 */
#facList li:last-child { border: 0; }
#facList .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#facList .meta2 { display: flex; align-items: baseline; gap: 10px; white-space: nowrap; }
#facList .fare { color: var(--mut); font-size: 15px; }
#facList b { font-weight: 500; white-space: nowrap; } #facList b small { color: var(--mut); font-weight: 400; font-size: 14px; margin-left: 2px; }
.bd { flex: none; font-style: normal; font-size: 12px; font-weight: 600; letter-spacing: .02em; min-width: 34px; text-align: center; padding: 2px 5px; border: 1.5px solid var(--mut); color: var(--mut); border-radius: 6px; }
.bd-ic, .bd-jc { border-color: #7fa2ff; color: #9db8ff; }
.bd-tg { border-color: #cfd3da; color: #e5e7eb; }
.bd-rest { border-color: #7a828e; color: #c3c8d0; }
.bd-jc { background: rgba(62, 106, 225, .22); }

/* 하단 가로 진행바(카카오식): 교통 색 구간 + 현위치 점. 지나온 구간은 어둡게 */
#prog { position: absolute; left: 0; right: 0; top: -1px; height: 8px; background: #7a7f87; pointer-events: none; }
#pgpass { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(22, 24, 29, .82); }
#pgcar { position: absolute; top: 50%; left: 0; width: 22px; height: 22px; margin: -11px 0 0 -11px; background: var(--fg); border: 4px solid var(--accent); border-radius: 50%; box-shadow: 0 1px 4px rgba(0,0,0,.5); }

/* 좌측: 경고 + 속도 */
#warn { position: absolute; left: 14px; bottom: calc(var(--bar) + 16px); z-index: 40; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; pointer-events: none; }
#alerts { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
#safeInfo { max-width: min(420px, 55vw); padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--glass-solid); font-size: 16px; }
#safeInfo b, #safeInfo small { display: block; }
#safeInfo small { color: var(--mut); margin-top: 4px; }
#safeStatus:empty { display: none; }
.safeCamera { display: grid; grid-template-columns: 1fr 44px auto; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
.safeCamera .nm { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.safeCamera .lm:not(:empty) { justify-self: center; min-width: 36px; padding: 1px 0; text-align: center; font-weight: 700; border: 3px solid #e5322d; border-radius: 50%; line-height: 1.1; background: #fff; color: #111; font-size: 15px; }
.safeCamera .ds { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.safeCamera .ex { grid-column: 1 / -1; color: var(--mut); font-size: 13px; }
.safeMore { padding-top: 6px; color: var(--mut); font-size: 14px; }
#bar #startSafe { background: rgba(255, 255, 255, .10); color: var(--fg); border: 1px solid var(--line); border-radius: 999px; padding: 0 16px; font-size: 17px; white-space: nowrap; }
.al { display: flex; align-items: center; gap: 12px; padding: 8px 18px 8px 8px; border-radius: 999px; }
.al .sign { width: 54px; height: 54px; border-radius: 50%; border: 6px solid var(--red); background: #fff; color: #111; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 21px; }
.al .sign.acc { border: 2px solid var(--warn); background: none; color: var(--warn); } .al .sign svg.i { width: 28px; height: 28px; }
.al .lbl { font-size: 36px; font-weight: 600; line-height: 1; letter-spacing: -.01em; font-variant-numeric: tabular-nums; min-width: 96px; } .al .lbl small { font-size: 20px; font-weight: 400; color: var(--mut); margin-left: 3px; letter-spacing: 0; }
.al .lbl .tag { display: block; font-size: 15px; font-weight: 500; color: var(--warn); margin-bottom: 3px; letter-spacing: 0; }
#speed { min-width: 112px; padding: 4px 22px 6px; border-radius: 20px; text-align: center; font-size: 60px; font-weight: 300; line-height: 1.05; letter-spacing: -.03em;
}
#speed::after { content: "km/h"; display: block; font-size: 13px; color: var(--mut); letter-spacing: .08em; margin-top: -4px; }
#speed.over { color: #ff6b66; border-color: rgba(229, 50, 45, .7); }

#gpsweak { position: absolute; top: 84px; left: 50%; transform: translateX(-50%); z-index: 60; padding: 6px 18px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); font-size: 16px; }
#toast { position: absolute; top: 134px; left: 50%; transform: translateX(-50%); z-index: 70; max-width: calc(80vw / var(--ui)); padding: 12px 24px; border-radius: 999px; background: var(--glass); backdrop-filter: blur(16px); border: 1px solid var(--line); font-size: 18px; }
#err { position: absolute; top: 0; left: 0; right: 0; z-index: 95; background: var(--red); color: #fff; padding: 8px 14px; display: none; font-size: 17px; }

/* 둥근 버튼들 */
.round, #side button, #zoom button { width: 52px; height: 52px; min-height: 0; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: var(--glass);
  backdrop-filter: blur(16px); color: var(--fg); display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(0, 0, 0, .32); }
#side { position: absolute; right: 34px; bottom: calc(var(--bar) + 12px); z-index: 40; display: flex; flex-direction: column; gap: 10px; }
#zoom { position: absolute; right: 94px; bottom: calc(var(--bar) + 12px); z-index: 40; display: flex; flex-direction: column; gap: 10px; }
#zoom button { font-size: 26px; font-weight: 300; }
#recenter { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(var(--bar) + 16px + var(--ad-total, 0px)); z-index: 40; padding: 12px 26px; border-radius: 999px; border: 1px solid var(--line); background: var(--accent); color: #fff; font-size: 19px; box-shadow: 0 8px 24px rgba(0, 0, 0, .32); }

/* 하단 바 */
#bar { position: absolute; left: 0; right: 0; bottom: 0; height: var(--bar); z-index: 45; background: var(--glass-solid); border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 18px; padding: 0 12px; font-size: 19px; }
#bar button { min-height: 40px; min-width: 40px; border: 0; background: none; padding: 0 8px; display: flex; align-items: center; justify-content: center; color: var(--mut); border-radius: 10px; }
@media (hover: hover) { #bar button:hover { color: var(--fg); background: rgba(255, 255, 255, .07); } }
#eta { white-space: nowrap; color: var(--mut); }
#eta b { color: var(--fg); font-weight: 500; font-size: 24px; margin: 0 2px; }
#road { flex: 1; text-align: center; color: var(--mut); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#bar #stopNav { background: rgba(255, 255, 255, .10); color: var(--fg); border: 1px solid var(--line); border-radius: 999px; padding: 0 24px; font-size: 17px; }
#bar #stopNav:active { background: var(--red); border-color: var(--red); }

/* 패널(검색·경로 비교·설정) */
.panel { position: absolute; z-index: 80; background: var(--glass); backdrop-filter: blur(20px) saturate(1.2); -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border: 1px solid var(--line); box-shadow: 0 16px 48px rgba(0, 0, 0, .45); border-radius: 20px; padding: 16px; color: var(--fg); }
.panel .row { display: flex; gap: 8px; margin-bottom: 10px; align-items: center; }
.panel hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.panel label { display: flex; align-items: center; gap: 10px; margin: 10px 0; font-size: 17px; color: var(--fg); }
.panel select, .panel button.plain { font-size: 16px; min-height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .08); color: var(--fg); }
.panel select option { color: #111; }
.panel input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); }
.panel button { border: 1px solid var(--line); background: rgba(255, 255, 255, .08); border-radius: 12px; min-height: 44px; padding: 0 16px; }
@media (hover: hover) { .panel button:hover { background: rgba(255, 255, 255, .14); } }
.primary, .panel button.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 500; }
.panel button.primary:hover { background: #5479e6; }

/* 검색 시트 */
#places { left: 14px; top: 14px; width: 420px; max-height: calc(100vh / var(--ui) - var(--bar) - 40px); overflow: auto; }
.sheet-head { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; }
.search { flex: 1; display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 14px; border-radius: 14px; background: rgba(255, 255, 255, .09); border: 1px solid var(--line); margin: 0 !important; }
.search .mag { font-size: 24px; color: var(--mut); line-height: 1; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--fg); font: inherit; font-size: 19px; }
.search input::placeholder { color: var(--mut); }
.search:focus-within { border-color: var(--accent); }
.sheet-head .go { white-space: nowrap; background: var(--accent); border-color: var(--accent); min-width: 64px; }
.sheet-head .x { width: 44px; padding: 0; border-radius: 50%; color: var(--mut); }
.chips { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.chip { display: flex; align-items: center; gap: 12px; text-align: left; padding: 10px 14px !important; border-radius: 14px !important; min-height: 60px !important; }
.chip .ci { width: 38px; height: 38px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .10); color: var(--mut); font-size: 22px; line-height: 1; }
.chip.set .ci { background: rgba(62, 106, 225, .25); color: #9db8ff; }
.chip .ct { display: flex; flex-direction: column; min-width: 0; }
.chip .ct b { font-weight: 500; font-size: 18px; }
.chip .ct small { color: var(--mut); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#destBar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; margin-bottom: 12px; border-radius: 12px; background: rgba(62, 106, 225, .16); border: 1px solid rgba(62, 106, 225, .35); }
#dest { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.link { min-height: 34px !important; padding: 0 12px !important; font-size: 14px; border-radius: 999px !important; }
#places h5 { margin: 4px 4px 6px; font-size: 13px; font-weight: 500; letter-spacing: .06em; color: var(--mut); }
#list { margin: 0; padding: 0; list-style: none; }
#list li { display: flex; align-items: center; gap: 12px; padding: 12px 6px; border-top: 1px solid var(--line); cursor: pointer; border-radius: 10px; }
#list li:hover { background: rgba(255, 255, 255, .06); }
#list li.empty { color: var(--mut); justify-content: center; cursor: default; }
#list .pin { width: 34px; text-align: center; font-size: 22px; color: var(--mut); }
#list .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
#list .tx b { font-weight: 500; font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#list .tx small { color: var(--mut); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#list .when { color: var(--mut); font-size: 14px; }
#list .del { width: 36px; min-height: 36px !important; padding: 0 !important; border: 0 !important; background: none !important; color: var(--mut); border-radius: 50% !important; }
#list .del:hover { color: var(--fg); background: rgba(255, 255, 255, .1) !important; }

/* 경로 비교 */
#compare { left: 50%; bottom: calc(var(--bar) + 14px); transform: translateX(-50%); width: 900px; max-width: calc(94vw / var(--ui)); }
#cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
#cards .opt { border: 1.5px solid var(--line); border-radius: 16px; padding: 12px 14px; cursor: pointer; background: rgba(255, 255, 255, .05); }
#cards .opt.sel { border-color: var(--accent); background: rgba(62, 106, 225, .16); }
#cards .opt h4 { margin: 0 0 2px; font-size: 16px; font-weight: 500; color: var(--mut); }
#cards .opt.sel h4 { color: #9db8ff; }
#cards .opt b { display: block; font-size: 40px; font-weight: 300; letter-spacing: -.02em; line-height: 1.1; }
#cards .opt small { font-size: 15px; color: var(--mut); line-height: 1.5; }
#compare .row { margin: 0; justify-content: flex-end; }
#compare .primary { min-width: 160px; min-height: 52px; font-size: 19px; border-radius: 14px; }

#resume { left: 50%; top: 50%; transform: translate(-50%, -50%); width: 520px; text-align: center; font-size: 20px; }
#settings { right: 14px; bottom: calc(var(--bar) + 14px); width: 400px; max-height: calc(100vh / var(--ui) - var(--bar) - 40px); overflow: auto; }
#settings .row.head { justify-content: space-between; font-size: 20px; }

/* 상단 우측: 시계 + 엔진 선택 */
#topbar { position: absolute; right: 34px; top: 14px; z-index: 42; display: flex; align-items: center; gap: 10px; }
#clock { padding: 0 20px; height: 48px; display: flex; align-items: center; border-radius: 999px; font-size: 24px; font-weight: 300; white-space: nowrap; }
#seg { display: flex; padding: 3px; height: 48px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); }
#seg button { min-width: 72px; border: 0; background: none; color: var(--mut); border-radius: 999px; padding: 0 14px; font-size: 17px; }
#seg button.on { background: var(--accent); color: #fff; }
.panel .x { width: 44px; padding: 0; border-radius: 50%; color: var(--mut); display: flex; align-items: center; justify-content: center; }
.panel .row.head { justify-content: space-between; font-size: 20px; }
.panel .row.wrap { flex-wrap: wrap; }
.panel .sec { font-size: 13px; font-weight: 500; letter-spacing: .06em; color: var(--mut); }
.search { min-width: 0; } .search input { width: 100%; }
.search svg.i { color: var(--mut); flex: none; } .chip .ci svg.i { width: 22px; height: 22px; }
#list .pin { display: flex; justify-content: center; } #list .pin svg.i { width: 22px; height: 22px; }
#list .del svg.i { width: 18px; height: 18px; margin: auto; }
#cards .opt b small.u { display: inline; font-size: 18px; margin-left: 3px; }
#cards .opt small { display: block; }
.round svg.i, #side svg.i, #zoom svg.i { width: 26px; height: 26px; }

/* 시설 아이콘(레퍼런스 앱 형태: TG 사각 윤곽, IC 출구 방패, JC 원, 휴게소 수저)과 분기 그림 */
.fi { width: 28px; height: 28px; display: block; color: var(--fg); }
.fic { display: flex; flex: none; }
#facList .fic .fi { width: 26px; height: 26px; }
.fc .top .fic .fi { width: 24px; height: 24px; }
#turnIcon.fac, #subIcon.fac { display: flex; align-items: center; justify-content: center; border: 0; padding: 0; width: 56px; height: 56px; }
#turnIcon.fac .fi { width: 52px; height: 52px; }
#subIcon.fac { width: 28px; height: 28px; }
#subIcon.fac .fi { width: 28px; height: 28px; }
.forkwrap { margin-left: auto; display: flex; align-items: center; }
.fork { width: 66px; height: 84px; display: block; }
.fc { position: relative; }
.fc .forkwrap { position: absolute; right: 14px; bottom: 12px; }
#turn .forkwrap { padding-left: 6px; }

/* 지도 방향 대체 회전: 컨테이너를 대각선 크기로 키워 가운데 두고 통째로 돌린다(모서리가 비지 않게) */
#mapwrap { overflow: hidden; }
#mapwrap.spin #map { position: absolute; left: 50%; top: 50%; width: var(--md); height: var(--md); margin: calc(var(--md) / -2) 0 0 calc(var(--md) / -2); transition: transform .9s linear; }
#attr { position: absolute; left: 12px; bottom: calc(var(--bar) * var(--ui) + 4px); z-index: 35; font-size: 11px; color: #444; background: rgba(255, 255, 255, .75); padding: 1px 6px; border-radius: 4px; pointer-events: none; zoom: var(--ui); }

/* 야간 지도(A-38): 지도 로딩 전 바탕과 출처 표기를 어둡게 */
body.night, body.night html { background: #1d2026; }
html:has(body.night) { background: #1d2026; }
body.night #attr { color: #c3c8d0; background: rgba(20, 22, 26, .75); }
body.night { --glass: rgba(34, 38, 46, .9); --line: rgba(255, 255, 255, .16); }

/* 지도 방향: 나침반 하나가 방향 표시이자 2D/N 모드 버튼 */
#vmPop { position: absolute; right: 64px; top: 0; display: flex; gap: 4px; padding: 4px; border-radius: 999px; }
#zoom #vmPop button { min-width: 84px; height: 52px; border: 0; border-radius: 999px; background: none; color: var(--fg); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 12px; color: var(--mut); line-height: 1.1; padding: 0 10px; box-shadow: none; }
#vmPop button span { white-space: nowrap; }
#vmPop button.on span { color: #dbe4ff; }
#zoom #vmPop #vmClose { min-width: 44px; padding: 0; }
#vmPop button b { font-size: 20px; }
#zoom #vmPop button.on { background: var(--accent); color: #fff; }
#vmPop button b { font-weight: 600; }
/* 시설 카드·목록의 교통 색 막대(티맵·네이버 공통): 해당 시설까지 구간의 교통 상태(최악값) */
[data-tr]::after { content: ""; position: absolute; right: 8px; top: 16%; bottom: 16%; width: 5px; border-radius: 3px; background: var(--trc, transparent); }
[data-tr="1"] { --trc: #2ea44f; } [data-tr="2"] { --trc: #f5a623; } [data-tr="3"] { --trc: #e5322d; }
#facList li { position: relative; padding-right: 14px; }
#facList li[data-tr]::after { right: 0; top: 22%; bottom: 22%; width: 4px; }

/* 우측 하단 컨트롤: 원형 버튼 6개 대신 캡슐 2개(지도 조작 / 동작)로 묶는다 */
.capsule { position: absolute; bottom: calc(var(--bar) + 12px); z-index: 40; display: flex; flex-direction: column; border-radius: 28px; background: var(--glass); backdrop-filter: blur(16px); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0, 0, 0, .32); }
#side.capsule { right: 34px; } #zoom.capsule { right: 102px; gap: 0; }
#side.capsule > button, #zoom.capsule > button { width: 56px; min-height: 0; padding: 0; height: 56px; border: 0; border-radius: 0; background: none; box-shadow: none; backdrop-filter: none; }
#zoom.capsule > button + button, #side.capsule > button + button { border-top: 1px solid var(--line); }
#zoom.capsule > button:first-of-type, #side.capsule > button:first-of-type { border-radius: 28px 28px 0 0; } #zoom.capsule > button:last-child, #side.capsule > button:last-child { border-radius: 0 0 28px 28px; }
#zoom #viewmode { flex-direction: column; gap: 2px; font-size: 12px; font-weight: 600; color: var(--mut); line-height: 1; }
#viewmode #compassIcon { width: 28px; height: 28px; transition: transform .9s linear; }
#vmLabel { letter-spacing: .04em; }
#viewmode:active, #zoomIn:active, #zoomOut:active { background: rgba(255,255,255,.1); }
/* 카드 오른쪽: 교통 색 막대는 가장자리, 분기 그림은 그 안쪽 */
.fc[data-tr]::after { right: 6px; width: 4px; }
.fc .forkwrap { right: 22px; }
.fc[data-tr] { padding-right: 24px; }

/* ===== 터치 UX (차량 중앙 화면, 주행 중) ===== */
html, body { -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation; overscroll-behavior: none; }
input { -webkit-user-select: text; user-select: text; }
/* HUD는 지도 제스처(이동·핀치)를 가로채지 않는다. 눌러야 하는 것만 pointer-events를 켠다 */
#hud, #hud > *, #warn, #toast, #gpsweak, #flash, #topbar, #clock { pointer-events: none; }
#seg, #seg button { pointer-events: auto; }
button:active, #seg button:active, .opt:active, #list li:active { filter: brightness(1.35); transform: scale(.97); }
#bar button:active { background: rgba(255, 255, 255, .16); }
.panel { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-y; }
.panel button, .panel select { transition: filter .08s; }

/* 터치 목표: 최소 48, 기본 56 */
#bar button { min-height: 56px; min-width: 56px; }
#bar #stopNav { height: 52px; min-width: 120px; font-size: 20px; }
#bar { gap: 14px; padding: 0 14px; }
.panel button { min-height: 56px; font-size: 19px; }
.panel select { min-height: 52px; font-size: 19px; }
.panel label { min-height: 56px; font-size: 20px; margin: 4px 0; }
.panel input[type=checkbox] { width: 30px; height: 30px; flex: none; }
.panel .x, #list .del { width: 52px; min-height: 52px !important; height: 52px; }
.link { min-height: 52px !important; font-size: 17px !important; }
.search { height: 56px; }
.search input { font-size: 21px; }
.chip { min-height: 64px !important; }
#seg { height: 52px; } #seg button { min-width: 80px; font-size: 20px; min-height: 0; }
#clock { height: 52px; }
#list li { min-height: 64px; }
.row { gap: 10px; }

/* 읽는 글자 키우기 */
#turn .meta small.nm { font-size: 22px; max-width: 300px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.15; word-break: keep-all; overflow-wrap: anywhere; }   /* 방면 이름은 두 줄까지 전부 보여 준다 */
#sub { font-size: 24px; } #sub b small { font-size: 18px; }
.fc .top .t { font-size: 22px; } .fc .top { font-size: 20px; }
#facList { font-size: 22px; } #facList .fare { font-size: 18px; } #facList b small { font-size: 16px; }
#rightCards { width: 340px; }
#speed::after { font-size: 16px; }
#road { font-size: 24px; } #eta { font-size: 21px; } #eta b { font-size: 28px; }
#toast { font-size: 22px; } #gpsweak { font-size: 20px; }
#list .tx b { font-size: 21px; } #list .tx small, #list .when { font-size: 16px; }
.chip .ct b { font-size: 21px; } .chip .ct small { font-size: 16px; }
#cards .opt h4 { font-size: 19px; } #cards .opt small { font-size: 17px; }

/* 왼쪽(운전자 쪽)에 지도 조작을 모으고, 오른쪽에는 검색·경로·신고만 둔다 */
/* 나침반·줌 캡슐은 오른쪽 아래(검색 캡슐 옆)에 고정한다. 분기 장면·다음 안내·단속 알림이 왼쪽에 생겨도 움직이지 않는다(A-37). */
#zoom.capsule { left: auto; right: 102px; top: auto; bottom: calc(var(--bar) + 12px); }
#zoom #vmPop { left: auto; right: 68px; }
#viewmode #compassIcon { width: 30px; height: 30px; }
#viewmode { font-size: 14px; }
#recenter { height: 56px; font-size: 21px; }

.panel button.danger { background: var(--red); border-color: var(--red); color: #fff; font-weight: 500; }
#confirmEnd, #resume { left: 50%; top: 50%; transform: translate(-50%, -50%); width: 560px; text-align: center; }
#confirmEnd p { font-size: 28px; font-weight: 300; margin: 8px 0 20px; }
#confirmEnd .row { justify-content: center; margin: 0; } #confirmEnd .row button { flex: 1; min-height: 72px; font-size: 24px; }
#seg { height: 56px; } #clock { height: 56px; }
.driving #search { display: none; }

/* 터치 목표: 검색시트 닫기가 긴 입력창에 밀려 좁아지지 않게 고정 크기 */
.sheet-head .x { flex: none; width: 52px; min-width: 52px; height: 52px; }
.panel label { min-height: 52px; } /* 체크박스는 30px지만 줄 전체가 눌리도록 52px 보장 */
#turn { min-width: 330px; width: auto; max-width: 460px; } /* 분기 그림이 커져도 시설명이 잘리지 않게 */

/* 차로 줄(NAV-06): 직진 차로 + 갈 쪽 차로(갈 쪽은 방향과 상관없이 초록, A-123) */
#laneBar { position: fixed; left: 50%; bottom: calc(84px + var(--ad-total, 0px)); transform: translateX(-50%); display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 14px; background: var(--glass); backdrop-filter: blur(16px); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0, 0, 0, .32); z-index: 5; }
#laneBar svg { width: 38px; height: 38px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
#laneBar i { align-self: stretch; border-left: 2px dashed rgba(255, 255, 255, .35); margin: 0 4px; }
#laneBar b { margin-left: 10px; font-size: 22px; font-weight: 600; }
#laneBar[hidden] { display: none; }

/* 다음 안내(주 카드 아래) + 분기 장면(NAV-06) */
#nextTurn { left: 14px; top: calc(var(--turn-b, 110px) + 12px); padding: 6px 16px 6px 12px; border-radius: 999px; display: flex; align-items: center; gap: 8px; font-size: 22px; background: var(--glass); backdrop-filter: blur(16px); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0, 0, 0, .32); }
#nextIcon { display: flex; } #nextIcon svg.i { width: 28px; height: 28px; stroke-width: 2.4; }
#nextTurn b { font-weight: 500; } #nextTurn b small { color: var(--mut); font-weight: 400; margin-left: 2px; }
body.next-on #sub { top: calc(var(--turn-b, 110px) + 62px); }
#scene { left: 14px; top: calc(var(--turn-b, 110px) + 62px); width: 250px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0, 0, 0, .4); }
body.next-on #scene { top: calc(var(--turn-b, 110px) + 62px); }
.scene-svg { display: block; width: 100%; height: auto; }

/* 차로 줄 생략 표시: 차로 수를 단정하지 않는다 */
#laneBar em { font-style: normal; font-size: 26px; letter-spacing: 2px; color: var(--mut); line-height: 1; }
#eta { font-size: 21px; } #eta b { font-size: 28px; }

/* 구간단속 표지: 주황 테두리 + "구간 N m" 라벨 (SPD-04) */
.al .sign.sec { border-color: #f5a623; }
.al .sign { font-size: 22px; font-weight: 700; }
.al .sign { box-shadow: 0 0 0 2px rgba(0, 0, 0, .35); }
/* 제한속도 없는 단속: 이름 표지 = 둥근 사각 판(원형 속도 표지와 모양으로 구분), 종류별 테두리 색, 3글자까지 한 줄·4글자는 2줄 */
.al .sign.etc { --c: #5b6573; width: auto; min-width: 66px; height: 66px; padding: 0 7px; border-radius: 16px; border: 6px solid var(--c); font-size: 22px; letter-spacing: -.04em; line-height: 1.05; text-align: center; white-space: nowrap; box-sizing: border-box; }
.al .sign.etc.long { font-size: 21px; width: 66px; padding: 0; white-space: normal; word-break: keep-all; }
.al .sign.etc.long { flex-direction: column; } .al .sign.etc.long span { display: block; line-height: 1.1; }
.al .sign.t-gp3 { --c: #d6336c; } .al .sign.t-gp4 { --c: #1f9d6b; } .al .sign.t-gp5 { --c: #7a5af8; } .al .sign.t-gp8 { --c: #2f6fe0; }
.al .sign.t-gp9 { --c: #9a6b2f; } .al .sign.t-gp10 { --c: #0e9fb8; }

/* 구간 안 구간단속 표시: 표지 + 구간평균·남은 구간·남은 시간 (SPD-04) */
.al.sec-in { border-radius: 22px; padding: 8px 18px 8px 8px; align-items: stretch; }
.al.sec-in .sign { align-self: center; flex: none; }
.al .stats { display: flex; flex-direction: column; gap: 2px; min-width: 190px; }
.al .stats .r { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; font-size: 20px; }
.al .stats .k { color: var(--mut); font-size: 17px; } .al .stats b { font-weight: 600; }
.al .stats .avg b { color: #f5c542; font-size: 30px; } .al .stats .over b { color: var(--red); font-size: 30px; }

/* 경로 비교(RTE-09): 엔진별 고유 옵션 카드 4개, "다른 엔진 비교"는 3열 보드 */
#cards { grid-template-columns: repeat(4, 1fr); }
#cards .grp { display: contents; }
#compare #moreEngines { margin-right: auto; min-height: 52px; font-size: 18px; color: #9db8ff; background: none; border: 1px solid var(--line); border-radius: 14px; padding: 0 18px; }
#cards h4 .bd { font-style: normal; font-size: 12px; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: rgba(62, 106, 225, .35); color: #cfe0ff; vertical-align: 2px; }
#cards h4 .bd.free { background: rgba(46, 164, 79, .35); color: #c7f0d1; }
#cards .opt.na { opacity: .5; }
#compare.wide { width: 1020px; max-width: calc(96vw / var(--ui)); }
#cards.board { grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: start; }
#cards.board .grp { display: flex; flex-direction: column; gap: 8px; }
#cards.board .grp h3 { margin: 0 0 2px; font-size: 18px; font-weight: 600; color: var(--mut); } #cards.board .grp h3.cur { color: #9db8ff; }
#cards .opt.mini { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; align-items: center; padding: 8px 14px; min-height: 64px; }
#cards .opt.mini h4 { grid-column: 1; font-size: 17px; margin: 0; } #cards .opt.mini b { grid-column: 2; grid-row: 1 / span 2; font-size: 30px; }
#cards .opt.mini small { grid-column: 1; font-size: 14px; line-height: 1.3; }
#cards .opt.mini small.toll2 { display: none; }

#cards .opt { position: relative; }
#cards .opt:not(.mini) h4 .bd { position: absolute; top: 12px; right: 12px; margin: 0; }
#cards .opt:not(.mini) h4 { padding-right: 46px; }

/* 지도에서 찍은 위치 카드·경유지 칩 (RTE-12) */
#pick { left: 50%; bottom: calc(var(--bar) + 14px); transform: translateX(-50%); width: 680px; max-width: calc(94vw / var(--ui)); display: flex; align-items: center; gap: 16px; z-index: 60; }
#pick .pk { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
#pick .pk b { font-size: 22px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#pick .pk small { font-size: 15px; color: var(--mut); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#pick .row { margin: 0; flex: none; }
#pick .primary, #pick #pickVia { min-height: 52px; font-size: 18px; border-radius: 14px; padding: 0 18px; }
#viaList { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
#viaList[hidden] { display: none; }
#viaList .via { min-height: 52px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: rgba(62, 106, 225, .18); color: #cfe0ff; font-size: 17px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#viaList .via .x { margin-left: 10px; color: var(--mut); }
#viaList .via { display: inline-flex; align-items: center; gap: 10px; }
#viaList .via .x { margin-left: 0; flex: none; }

/* 검색 결과·최근 장소의 [경유] 버튼, 검색 화면의 경유지 칩 (RTE-13) */
#list .viaadd { flex: none; min-height: 52px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line); background: rgba(62, 106, 225, .18); color: #cfe0ff; font-size: 17px; }
.viaList { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.viaList[hidden] { display: none; }
#viaList2 .via { min-height: 52px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: rgba(62, 106, 225, .18); color: #cfe0ff; font-size: 17px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-flex; align-items: center; gap: 10px; }
#viaList2 .via .x { color: var(--mut); flex: none; }

/* 전기차 충전소 핀·팝오버 (EV-01~03) */
#evlayer, #pklayer, #campins { position: absolute; inset: 0 0 calc(var(--bar) * var(--ui)) 0; z-index: 22; pointer-events: none; overflow: hidden; }
.evpin { position: absolute; left: 0; top: 0; pointer-events: auto; display: flex; align-items: center; gap: 2px; min-width: 52px; height: 52px; padding: 0 10px; border-radius: 26px; border: 2px solid #fff; color: #fff; background: #238a43; box-shadow: 0 4px 12px rgba(0, 0, 0, .45); font-size: 18px; font-weight: 700; will-change: transform; justify-content: center; }
.evpin svg.i { width: 22px; height: 22px; fill: currentColor; stroke: none; }
.evpin.none { background: #6b7480; }
.evpin i { position: absolute; right: -6px; top: -8px; width: 22px; height: 22px; border-radius: 50%; background: #3e6ae1; border: 2px solid #fff; font-style: normal; font-size: 12px; line-height: 18px; text-align: center; }
.evpin.sel { transform-origin: center; outline: 4px solid rgba(62, 106, 225, .8); z-index: 5; }
#btnEv.on { color: #7bd88f; }
/* 주차장 핀(PRK-01): 파랑 = 여유, 주황 = 조금 남음, 빨강 = 만차, 회색 = 잔여 정보 없음 */
#pklayer { z-index: 21; }
/* 지도 위 단속카메라 핀(CAM-01): 흰 원 + 빨간 테두리 + 제한속도(카카오내비 카메라 아이콘처럼). 구간단속은 파란 테두리. 누르는 대상이 아니라 입력은 지도로 통과한다 */
#campins { z-index: 20; }
.campin { position: absolute; left: 0; top: 0; width: 36px; height: 36px; box-sizing: border-box; border-radius: 50%; border: 4px solid #e5322d; background: #fff; color: #111; display: flex; align-items: center; justify-content: center; pointer-events: none; box-shadow: 0 2px 8px rgba(0, 0, 0, .45); will-change: transform; }
.campin b { font-size: 14px; font-weight: 800; line-height: 1; letter-spacing: -.5px; }
.campin.sect { border-color: #2f6fe0; }
.campin.sect b { font-size: 11px; }
.pkpin { position: absolute; left: 0; top: 0; pointer-events: auto; display: flex; align-items: center; gap: 4px; min-width: 46px; height: 46px; padding: 0 10px; border-radius: 23px; border: 2px solid #fff; color: #fff; background: #2f6fe0; box-shadow: 0 4px 12px rgba(0, 0, 0, .45); font-size: 17px; font-weight: 700; will-change: transform; justify-content: center; }
.pkpin b { font-size: 19px; }
.pkpin.few { background: #d98a14; } .pkpin.full { background: #b3342f; } .pkpin.unknown { background: #6b7480; }
.pkpin.sel { outline: 4px solid rgba(62, 106, 225, .8); z-index: 5; }
#evPop .pkHead { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
#evPop #pkOnOff.on { background: rgba(62, 106, 225, .35); border-color: #5b86f0; color: #fff; }
#side #evPop { position: absolute; right: 68px; bottom: 0; width: 250px; padding: 12px; border-radius: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 50; }
#evPop .t { font-size: 18px; color: var(--mut); padding-left: 4px; }
#evPop .chip { min-height: 52px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .06); color: var(--fg); font-size: 17px; text-align: left; padding: 0 14px; }
#evPop .chip.on { background: rgba(62, 106, 225, .35); border-color: #5b86f0; color: #fff; }
#evPop small { color: var(--mut); font-size: 15px; line-height: 1.35; }
#pick.ev .pk small { white-space: pre-line; }
#side #evPop .chip { width: 100%; height: auto; min-height: 52px; border-radius: 14px; border: 1px solid var(--line); box-shadow: none; display: block; line-height: 1.2; white-space: normal; }
#side #evPop .chip.on { background: rgba(62, 106, 225, .35); border-color: #5b86f0; }
/* 충전소 창 압축 배치(UX 점검, 1280×720): 2열 칩 + 체크박스 + 작은 안내. 세로가 길어져 위쪽 지도 엔진 막대를 덮던 문제 방지 */
#side #evPop { width: 310px; max-height: calc(100vh - 170px); overflow-y: auto; }
#evPop .evHead { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
#side #evPop .evHead .chip { width: auto; min-width: 150px; text-align: center; }
#evPop .evGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#side #evPop .evGrid .chip { padding: 0 12px; font-size: 16px; display: flex; flex-direction: column; justify-content: center; }
#evPop .chip .sub { display: block; font-size: 13px; color: var(--mut); margin-top: 2px; }
#evPop .chip.on .sub { color: #cfe0ff; }
#evPop .chk { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 6px; font-size: 17px; color: var(--fg); }
#evPop .chk input { width: 26px; height: 26px; accent-color: #5b86f0; flex: none; }
#evPop small { font-size: 13px; }

/* 충전소 클러스터 핀 */
.evpin.cl { min-width: 60px; height: 60px; border-radius: 30px; font-size: 22px; }
.evpin.cl.ok { background: #1f7a3a; }
/* 지도 끌기 중 자차 아이콘은 지도 위 실제 위치에 놓는다 */
#car { transition: none; }

/* 테슬라 슈퍼차저 핀(Open Charge Map): 빨강, 숫자는 스톨 수(빈 자리 아님) */
.evpin.sc { background: #cc2f2a; }
.evpin.sc i { background: #fff; color: #cc2f2a; border-color: #cc2f2a; font-weight: 800; }
.evpin.cl.sc { background: #a82622; }
#list .goadd { flex: none; min-height: 52px; padding: 0 18px; border-radius: 12px; border: 0; background: var(--accent, #3e6ae1); color: #fff; font-size: 17px; font-weight: 600; }
#list .viaadd { margin-left: auto; }

/* 목적지·경유지 핀 (MAP-12) */
#marks { position: absolute; inset: 0 0 calc(var(--bar) * var(--ui)) 0; z-index: 21; pointer-events: none; overflow: hidden; }
.mk { position: absolute; left: 0; top: 0; will-change: transform; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .5)); }
.mk span { display: block; min-width: 40px; padding: 6px 12px; border-radius: 10px 10px 10px 2px; font-weight: 700; font-size: 18px; color: #fff; text-align: center; border: 2px solid #fff; }
.mk.dest span { background: #e5322d; }
.mk.via span { background: #3e6ae1; border-radius: 50%; min-width: 40px; height: 40px; padding: 0; line-height: 36px; }
.mk::after { content: ""; position: absolute; left: 8px; bottom: -9px; border: 8px solid transparent; border-top-color: #fff; border-bottom: 0; }
.mk.via::after { left: 12px; }
.mk.dest::after { border-top-color: #e5322d; }

/* 검색 시트 고정 크기 + 긴 글자 두 줄 표시 (디자이너 검토 2026-11-05)
   크기: 결과 개수에 따라 시트가 늘었다 줄어 지도가 흔들리고 버튼 위치가 바뀌므로 높이를 고정하고 목록만 안에서 스크롤한다.
   글자: 한 줄 말줄임(…)으로 지명·주소가 잘리던 것을 두 줄까지 보이게 하고, 글자는 17/13 px로 조금만 줄인다(차량 화면 가독성 때문에 더 줄이지 않는다).
   버튼: 경유·도착 버튼 폭을 줄여 글자 칸을 넓힌다. */
#places { width: 460px; height: calc(100vh / var(--ui) - var(--bar) - 40px); max-height: none; display: flex; flex-direction: column; overflow: hidden; }
#places > * { flex: none; }
#places #list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
#list .tx b { font-size: 17px; line-height: 1.25; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: keep-all; overflow-wrap: anywhere; }
#list .tx small { font-size: 13px; line-height: 1.3; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
#list .viaadd, #list .goadd { min-height: 48px; padding: 0 12px; font-size: 16px; }
#list li { gap: 10px; }
#list .pin { width: 28px; }

/* 충전소 카드 고정 크기 (디자이너 검토 2026-11-05)
   충전소마다 설명 줄 수(2~4줄)가 달라 카드 높이가 101~139 px로 바뀌고 아래 기준이라 위로 늘었다 줄어 핀을 가렸다.
   높이를 고정하고 설명은 4줄까지만(넘치면 …), 제목은 한 줄 말줄임. 폭은 이미 고정(680 px). */
#pick.ev { height: 148px; box-sizing: border-box; }
#pick.ev .pk { height: 100%; justify-content: center; overflow: hidden; }
#pick.ev .pk b { flex: none; }
#pick.ev .pk small { white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 4; line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; }

/* 설정 메뉴 2열 배치 (디자이너 검토 2026-11-05): 항목이 늘어 세로로 길어져 아래 항목이 안 보이던 것을 폭을 넓혀 2열로 모은다. */
#settings { width: 600px; max-width: calc(94vw / var(--ui)); }
#settings .sgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; }
#settings .sgrid label { flex-direction: column; align-items: stretch; gap: 4px; margin: 6px 0; font-size: 15px; color: var(--mut); }
#settings .sgrid label select { width: 100%; min-height: 44px; font-size: 17px; color: var(--fg); }
#settings .sgrid label:has(input[type=checkbox]) { flex-direction: row; align-items: center; gap: 10px; font-size: 17px; color: var(--fg); min-height: 44px; }
#settings .pair { display: flex; gap: 6px; }
#settings .pair select { flex: 1; min-width: 0; }
#settings .pair button { min-height: 44px; padding: 0 12px; font-size: 15px; flex: none; }
#settings a { color: #9db8ff; }
/* 광고 자리(ADS-01): 구글 애드센스를 넣을 위치만 보여 주는 반투명 점선 틀. 하단 중앙(차선 안내·현위치 버튼은 광고 높이만큼 위로), 입력은 통과시킨다.
   하단 시트·검색·설정 등 큰 창이 열리면 숨긴다. 크기는 468x60(애드센스 배너), 1100px 이하 화면은 320x50. */
:root { --ad-w: 468px; --ad-h: 60px; --ad-gap: 10px; --ad-total: 0px; }
@media (max-width: 1100px) { :root { --ad-w: 320px; --ad-h: 50px; } }
body.promo-on { --ad-total: calc(var(--ad-h) + var(--ad-gap)); }
#adslot { position: absolute; left: 50%; bottom: calc(var(--bar) + var(--ad-gap)); transform: translateX(-50%); width: var(--ad-w); height: var(--ad-h); z-index: 38; zoom: var(--ui);
  display: flex; align-items: center; justify-content: center; box-sizing: border-box; border-radius: 10px; border: 2px dashed rgba(255, 255, 255, .9); background: rgba(22, 24, 29, .38); box-shadow: 0 0 0 1px rgba(22, 24, 29, .35);
  color: rgba(255, 255, 255, .92); font-size: 14px; letter-spacing: .02em; text-shadow: 0 1px 2px rgba(0, 0, 0, .65); pointer-events: none; }
#adslot[hidden] { display: none; }
body.promo-on:has(#compare:not([hidden]), #pick:not([hidden]), #places:not([hidden]), #confirmEnd:not([hidden]), #resume:not([hidden]), #settings:not([hidden]), #memoPop:not([hidden]), #teslaPop:not([hidden]), #evPop:not([hidden])) { --ad-total: 0px; }
body:has(#compare:not([hidden]), #pick:not([hidden]), #places:not([hidden]), #confirmEnd:not([hidden]), #resume:not([hidden]), #settings:not([hidden]), #memoPop:not([hidden]), #teslaPop:not([hidden]), #evPop:not([hidden])) #adslot { visibility: hidden; }
/* 멈추면(ad-stop) 광고를 상단 중앙으로 옮기고, 차선 안내·현위치 버튼은 제자리로 돌린다. 큰 회전·요금소 알약이 떠 있으면 그 동안 숨긴다. */
body.promo-on.ad-stop { --ad-total: 0px; }
/* 상단에서는 오른쪽 위 시계·엔진 막대(약 470 px)와 왼쪽 위 회전 카드(약 360 px) 사이에 맞춰 옮긴다: 1306×816에서 광고가 시계에 40 px 겹치던 문제(ADS-01) */
body.ad-stop #adslot { bottom: auto; top: 14px; left: max(calc(360px + var(--ad-w) / 2), min(50%, calc(100% - 470px - var(--ad-w) / 2))); }
body.ad-stop:has(#bigTurn:not([hidden]), #toll:not([hidden]), #gpsweak:not([hidden]), #toast:not([hidden])) #adslot { visibility: hidden; }

/* 한도 초과(QUO-01): 엔진 버튼 회색 + 작은 "한도 초과" 라벨 */
#seg button.quota { position: relative; opacity: .55; filter: grayscale(1); padding-bottom: 12px; }
#seg button.quota::after { content: '한도 초과'; position: absolute; left: 0; right: 0; bottom: 3px; font-size: 10px; line-height: 1; color: #ffb4a8; filter: none; }

/* 터치 표시(TCH-01): 누른 자리에 원이 퍼지며 사라진다. 맨 위 레이어, 터치는 통과 */
.tap-ripple { position: fixed; z-index: 2147483000; width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 50%; pointer-events: none;
  background: rgba(255, 255, 255, .45); border: 3px solid rgba(255, 255, 255, .9); box-shadow: 0 0 0 1px rgba(0, 0, 0, .35), 0 0 14px rgba(255, 255, 255, .5);
  animation: tap-ripple 450ms ease-out forwards; }
.tap-ripple.mouse { width: 18px; height: 18px; margin: -9px 0 0 -9px; border-width: 2px; }
@keyframes tap-ripple { from { transform: scale(.6); opacity: 1; } to { transform: scale(2.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .tap-ripple { animation-duration: 1ms; } }

/* Tesla 연동(TSL-05) */
#side #teslaPop { position: absolute; right: 68px; bottom: 0; width: 300px; padding: 14px; border-radius: 18px; z-index: 50; }
#teslaPop .t { font-size: 18px; color: var(--mut); }
#teslaBody { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; font-size: 18px; }
#teslaBody .code { font-size: 44px; font-weight: 300; letter-spacing: .12em; text-align: center; }
#teslaBody small { color: var(--mut); font-size: 15px; line-height: 1.4; white-space: normal; }
#teslaBody .dest { font-size: 22px; font-weight: 500; }
#teslaBody button { min-height: 52px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .06); color: inherit; font-size: 18px; }
#teslaBody button.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
#teslaBody button:disabled { opacity: .45; }
#btnTesla.on { color: #7bd88f; }

/* UX 점검(2026-11-06): 주 카드가 두 줄이 되어도 그 아래 알약·장면이 겹치지 않게 --turn-b(주 카드 아래 끝, JS가 갱신)를 따른다.
   Tesla·충전소 창은 줌 캡슐(오른쪽 102px, 폭 58px) 왼쪽에 두어 +/− 버튼을 가리지 않는다. Tesla 창 버튼은 칸 전체 폭. 설정 글은 단어 중간에서 줄바꿈하지 않는다. */
#side #teslaPop, #side #evPop { right: 134px; }
#teslaBody button { width: 100%; height: auto; min-height: 52px; padding: 10px 14px; white-space: normal; line-height: 1.25; word-break: keep-all; }
.panel label { word-break: keep-all; overflow-wrap: break-word; }
#teslaBody .dest { word-break: keep-all; overflow-wrap: break-word; }

/* About: 설정 맨 위 줄의 작은 버튼 → 설정 목록 위에 떠 있는 카드(세로 공간을 쓰지 않아 주요 설정이 스크롤 없이 보이는 규칙을 지킨다) */
#settings .ttl { display: flex; align-items: center; gap: 12px; }
#aboutBtn { height: 34px; padding: 0 14px; border-radius: 17px; border: 1px solid #5b86f0; background: rgba(62, 106, 225, .22); color: #cfe0ff; font-size: 15px; font-weight: 600; }
#aboutBtn[aria-expanded="true"] { background: rgba(62, 106, 225, .5); color: #fff; }
#aboutCard { position: absolute; left: 12px; right: 12px; top: 78px; z-index: 5; padding: 14px 16px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, .45); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
#aboutCard[hidden] { display: none; }
#aboutCard .tag { margin: 0 0 10px; font-size: 16px; font-weight: 700; }
#aboutCard ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
#aboutCard li { font-size: 16px; line-height: 1.35; }
#aboutCard li b { display: inline-block; min-width: 76px; color: var(--mut); font-weight: 600; }
#aboutCard li small { display: block; color: var(--mut); font-size: 14px; margin-top: 1px; }
#aboutCard .fine { margin: 12px 0 0; font-size: 14px; color: var(--mut); }

/* 충전소 창 안내 칸: 내용이 있든 없든 같은 높이(4줄)로 고정해 지도 표시를 켜고 끌 때 창이 커졌다 줄어들지 않게 한다 */
#evPop #evNote { display: block; height: 72px; overflow-y: auto; }

/* 음성 메모 메일(MEM-01~05): 버튼은 하단 바 왼쪽(재탐색 옆), 창은 그 위로 연다. 왼쪽 아래 속도·경고(폭 약 205 px) 오른쪽, 줌 캡슐 왼쪽에 두어 둘 다 가리지 않는다(A-114) */
#memoPop { position: absolute; left: 216px; bottom: calc(var(--bar) + 12px); width: 320px; padding: 14px; border-radius: 18px; z-index: 50; }
#memoPop .t { font-size: 18px; color: var(--mut); }
#memoBody { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; font-size: 18px; }
#memoBody small { color: var(--mut); font-size: 15px; line-height: 1.4; white-space: normal; word-break: keep-all; overflow-wrap: break-word; }
#memoBody small.err { color: #ff8a80; }
#memoBody input { width: 100%; min-height: 52px; padding: 8px 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .06); color: inherit; font-size: 18px; box-sizing: border-box; }
#memoBody .time { font-size: 40px; font-weight: 300; text-align: center; }
#memoBody audio { width: 100%; }
#memoBody button { width: 100%; height: auto; min-height: 52px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .06); color: inherit; font-size: 18px; white-space: normal; line-height: 1.25; word-break: keep-all; }
#memoBody button.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
#memoBody button.rec { background: var(--red); border-color: var(--red); color: #fff; font-weight: 600; }
#memoBody button:disabled { opacity: .45; }
/* 녹음 중: 버튼이 "● 0:12" 알약이 되어 누르면 중지한다. 떠 있는 창을 열어 두지 않으므로 속도·차선 안내가 가려지지 않는다 */
#btnMemo svg.i { width: 30px; height: 30px; }   /* 메모지+마이크: 26 px 이하에서는 마이크가 뭉개져 30 px */
#btnMemo .mt { display: none; font-size: 22px; font-variant-numeric: tabular-nums; white-space: nowrap; }
#bar #btnMemo.on { gap: 8px; padding: 0 18px; border-radius: 999px; background: var(--red); color: #fff; }
#btnMemo.on .mt { display: inline; }
#btnMemo.on .mt::before { content: "● "; }
/* 접수한 메모를 서버가 변환·발송 중이면 버튼 모서리에 파란 점이 깜박인다(결과는 알림으로) */
#bar #btnMemo { position: relative; }
#btnMemo.sending::after { content: ""; position: absolute; top: 8px; right: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: 2px solid var(--glass-solid); animation: memo-sending 1s ease-in-out infinite; }
@keyframes memo-sending { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { #btnMemo.sending::after { animation: none; } }
#btnMemo.on svg.i { display: none; }

/* ===== 804x638 단일 기준 (A-114, UX 점검 2026-11-08) =====
   Tesla 브라우저는 주행 중 전체 화면을 지원하지 않아 앱 viewport가 804x638 하나뿐이다. 배율은 1(ui-scale.js).
   위쪽 규칙은 1280 폭을 가정하고 만들어서, 여기서 한 번에 804 폭에 맞춘다. 터치 목표 ≥ 48 px, 보조 글자 ≥ 14 px. */
:root { --ad-w: 320px; --ad-h: 50px; --ad-gap: 10px; }

/* 상단 막대: 폭 300 px 안팎(엔진 3개 + 시계). 주 카드와 가운데 알약이 들어갈 자리를 남긴다 */
#seg button { min-width: 64px; font-size: 18px; padding: 0 10px; }
#clock { padding: 0 14px; font-size: 22px; }
/* 주 카드: 오른쪽 끝 ≤ 334. 방면 이름은 두 줄까지 */
#turn { min-width: 0; max-width: 350px; }
#turn .meta small.nm { max-width: 240px; font-size: 18px; }
/* 가운데 위 알약(큰 회전·요금): 주 카드(≤334)와 오른쪽 시설 카드(≥490) 사이 156 px에 맞춰 상단 막대 아래에 쌓는다(U-03) */
#bigTurn { left: 412px; top: 76px; gap: 8px; padding: 6px 14px; font-size: 30px; }
#bigIcon svg.i { width: 40px; height: 40px; }
#toll { left: 412px; top: 76px; padding: 6px 12px; font-size: 20px; white-space: nowrap; }
#toll::before { display: none; }
body:has(#bigTurn:not([hidden])) #toll { top: 148px; }
#gpsweak { top: 20px; left: 402px; }
/* 오른쪽 시설 카드·목록: 폭 280, 목록은 1행. 버튼 열(4개) 위 끝보다 위에서 끝난다(U-01) */
#rightCards { width: 280px; top: 72px; gap: 6px; }
.fc { padding: 8px 14px; gap: 2px; }
.fc .d { font-size: 34px; }
#facList { padding: 2px 12px; }
#facList li { padding: 6px 0; }
#facList li:nth-child(n+2) { display: none; }
/* 광고 자리: 정차해도 하단 그대로(상단에 빈 띠가 없다, U-04) */
body.promo-on.ad-stop { --ad-total: calc(var(--ad-h) + var(--ad-gap)); }
body.ad-stop #adslot { top: auto; bottom: calc(var(--bar) + var(--ad-gap)); left: 50%; }
/* 검색 시트: 폭 380, 왼쪽 아래 속도·경고(y 495 아래)를 덮지 않는다(U-06) */
#places { width: 380px; height: calc(100vh / var(--ui) - var(--bar) - 126px); }
/* 설정: 터치 목표 48 이상(U-02) */
#settings .sgrid label select { min-height: 48px; }
#settings .sgrid label:has(input[type=checkbox]) { min-height: 48px; }
#settings .pair button { min-height: 48px; }
#aboutBtn { height: 48px; border-radius: 24px; }
/* 보조 글자 ≥ 14 px(U-05) */
.safeCamera .ex, #lanes span, #evPop small, #evPop .chip .sub, #list .tx small, #places h5, .panel .sec, .bd, #speed::after { font-size: 14px; }
#zoom #viewmode, #vmLabel { font-size: 14px; }
#bar #btnMemo { min-width: 56px; }
#vmPop button span, #safeNote, #cards h4 .bd, #cards .opt.mini small { font-size: 14px; }
#settings a { display: inline-flex; align-items: center; min-height: 48px; }
