:root {
  --bg: #0f1720; --panel: #17212b; --line: #2a3744; --fg: #eef3f7; --muted: #8fa1b3;
  --accent: #19c37d; --warn: #ffb020; --danger: #ff4d4d; --route: #2f8cff;
  --font: -apple-system, "PingFang TC", "Noto Sans TC", "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--fg); font-family: var(--font); overflow: hidden; }
#map { position: fixed; inset: 0; background: #dfe6ec; }
button { font: inherit; color: inherit; border: 0; cursor: pointer; }
input, textarea { font: inherit; color: var(--fg); background: #0b1118; border: 1px solid var(--line); border-radius: 10px; padding: 12px; width: 100%; }
.muted { color: var(--muted); font-size: 14px; }
[hidden] { display: none !important; }

.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000; background: var(--panel);
  border-radius: 18px 18px 0 0; padding: 18px max(16px, env(safe-area-inset-left)) calc(18px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-right));
  max-height: 88vh; overflow-y: auto; box-shadow: 0 -8px 30px rgba(0,0,0,.4);
}
.sheet h1 { font-size: 20px; margin: 0 0 12px; }
.sheet h2 { font-size: 18px; margin: 0 0 4px; }
.row { margin-bottom: 12px; position: relative; }
.lbl { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.seg { display: flex; gap: 6px; }
.seg button { flex: 1; padding: 11px 6px; background: #0b1118; border: 1px solid var(--line); border-radius: 10px; font-size: 15px; }
.seg button.on { background: var(--accent); color: #04140c; border-color: var(--accent); font-weight: 700; }
#results { list-style: none; margin: 6px 0 0; padding: 0; max-height: 38vh; overflow-y: auto; }
#results li { padding: 10px 6px; border-bottom: 1px solid var(--line); }
#results li b { display: block; font-weight: 600; }
#results li small { color: var(--muted); }
#destPicked { margin-top: 8px; padding: 10px; border-radius: 10px; background: #0b1118; border: 1px solid var(--accent); }
.chk { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); margin: 6px 0 14px; }
.chk input { width: auto; }
.primary { width: 100%; padding: 15px; border-radius: 12px; background: var(--accent); color: #04140c; font-weight: 800; font-size: 17px; }
.primary:disabled { opacity: .4; }

#hud { position: fixed; inset: 0; z-index: 900; pointer-events: none; }
#hud > * { pointer-events: auto; }
#maneuver {
  position: absolute; top: calc(10px + env(safe-area-inset-top)); left: max(10px, env(safe-area-inset-left)); right: max(10px, env(safe-area-inset-right));
  display: flex; gap: 14px; align-items: center; background: #0d3b2a; border-radius: 16px; padding: 12px 16px; box-shadow: 0 6px 20px rgba(0,0,0,.35);
}
#arrow { font-size: 58px; line-height: 1; width: 64px; text-align: center; font-weight: 800; }
.mtext { min-width: 0; flex: 1; }
#mdist { font-size: 34px; font-weight: 800; font-variant-numeric: tabular-nums; }
#minstr { font-size: 18px; font-weight: 600; line-height: 1.25; }
#mroad { font-size: 15px; color: #b9f5d8; margin-top: 2px; }
#mthen { margin-top: 6px; font-size: 14px; background: rgba(0,0,0,.25); border-radius: 8px; padding: 4px 8px; display: inline-block; }
#banner {
  position: absolute; top: calc(150px + env(safe-area-inset-top)); left: 12px; right: 12px; background: var(--warn); color: #241600;
  font-weight: 800; font-size: 18px; border-radius: 12px; padding: 10px 14px; text-align: center;
}
#banner.cam { background: var(--danger); color: #fff; }
#badges { position: absolute; top: calc(150px + env(safe-area-inset-top)); right: 12px; display: flex; flex-direction: column; gap: 6px; }
.badge { background: rgba(15,23,32,.85); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-size: 13px; }
#bottom {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 10px;
  padding: 10px max(12px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  background: var(--panel); border-top: 1px solid var(--line);
}
#eta { flex: 1; min-width: 0; text-align: center; }
#etaT { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--accent); }
#remain { font-size: 14px; }
#stop, #mute, #flag { width: 48px; height: 48px; border-radius: 12px; font-size: 20px; background: #2a3744; flex: none; }
#stop { background: #3a2026; color: #ff8a8a; }
#mute.on { background: var(--warn); }
#flag { background: #3a3220; color: var(--warn); }
#speedWrap { position: absolute; left: max(12px, env(safe-area-inset-left)); bottom: calc(86px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; gap: 8px; }
#speedBox { width: 64px; height: 64px; border-radius: 50%; background: rgba(23,33,43,.94); border: 2px solid var(--line); display: grid; place-content: center; text-align: center; box-shadow: 0 4px 14px rgba(0,0,0,.35); }
#speed { font-size: 24px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
#speedBox .u { font-size: 10px; }
#speedBox.over { background: var(--danger); border-color: #fff; }
#speedBox.over #speed { color: #fff; }
.u { font-size: 12px; color: var(--muted); }
#limit { width: 56px; height: 56px; border-radius: 50%; border: 6px solid var(--danger); background: #fff; color: #111; display: grid; place-items: center; font-weight: 900; font-size: 20px; box-shadow: 0 4px 14px rgba(0,0,0,.35); }
#msign { display: inline-block; margin-top: 6px; background: #0a6b3a; border: 2px solid #e8fff2; color: #fff; border-radius: 6px; padding: 2px 8px; font-size: 14px; font-weight: 700; }
#mthen .mini svg { width: 20px; height: 20px; vertical-align: -4px; }
#arrow { width: 72px; height: 72px; display: grid; place-items: center; flex: none; }
#arrow .camicon { font-size: 44px; }
#mroad { font-size: 20px; font-weight: 700; color: #fff; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#minstr { font-size: 16px; font-weight: 600; color: #b9f5d8; }

/* preview */
#preview { max-height: 62vh; }
.pv-dest b { display: block; font-size: 19px; }
.pv-dest small { color: var(--muted); }
.pv-dest { margin-bottom: 12px; }
#pvRoutes { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
#pvRoutes li { padding: 12px 14px; border-radius: 12px; background: #0b1118; border: 2px solid var(--line); cursor: pointer; }
#pvRoutes li.on { border-color: var(--route); background: #0d2340; }
#pvRoutes li b { font-size: 20px; margin-right: 8px; }
#pvRoutes li small { color: var(--muted); font-size: 14px; }
.pv-row { display: flex; gap: 6px; }
.ghost.sm { font-size: 13px; padding: 10px 4px; margin-top: 8px; border: 1px solid var(--line); }
.favs { display: flex; gap: 8px; }
.fav { flex: 1; padding: 11px; border-radius: 12px; background: #0b1118; border: 1px dashed var(--line); color: var(--muted); font-size: 15px; }
.fav.set { border-style: solid; border-color: var(--accent); color: var(--fg); }

/* speed camera markers */
/* note: no position/transform here — MapLibre positions the marker with them */
.cam-mk { width: 34px; height: 34px; border-radius: 50%; background: #fff; border: 4px solid var(--danger); display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.cam-mk b { color: #111; font-size: 13px; font-weight: 900; }
.cam-mk i { position: absolute; right: -10px; top: -10px; font-style: normal; font-size: 14px; background: #222; border-radius: 50%; width: 20px; height: 20px; display: grid; place-items: center; }
.cam-mk u { position: absolute; left: -9px; bottom: -9px; text-decoration: none; font-size: 11px; color: var(--danger); background: #fff; border-radius: 50%; width: 16px; height: 16px; display: grid; place-items: center; }
.cam-mk:not(.on-route) { opacity: .6; }

#fb .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
#fb .grid button { padding: 14px 8px; border-radius: 12px; background: #0b1118; border: 1px solid var(--line); font-size: 15px; }
#fb .grid button.on { background: var(--warn); color: #241600; border-color: var(--warn); font-weight: 700; }
#fb textarea { margin-bottom: 10px; }

.me { width: 22px; height: 22px; border-radius: 50%; background: var(--route); border: 4px solid #fff; box-shadow: 0 0 0 6px rgba(47,140,255,.25); }
.camdot { width: 14px; height: 14px; border-radius: 50%; background: var(--danger); border: 2px solid #fff; }
.toast { position: fixed; left: 50%; bottom: 110px; transform: translateX(-50%); z-index: 2000; background: #000c; padding: 10px 16px; border-radius: 999px; font-size: 14px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

.toprow { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.toprow h1 { margin: 0; }
.chip { background: #0b1118; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 14px; color: var(--muted); }
.ghost { width: 100%; padding: 13px; margin-top: 8px; border-radius: 12px; background: transparent; color: var(--muted); font-size: 15px; }
.appicon { width: 72px; height: 72px; border-radius: 16px; display: block; margin: 4px auto 10px; }
#install h1 { text-align: center; }
.steps { font-size: 17px; line-height: 1.6; padding-left: 22px; margin: 8px 0 16px; }
#recent { list-style: none; margin: 0; padding: 0; }
#recent li { display: flex; align-items: center; gap: 10px; padding: 12px 6px; border-bottom: 1px solid var(--line); }
#recent li b { font-weight: 600; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#recent li span { color: var(--muted); font-size: 13px; }
.more { margin-top: 12px; color: var(--muted); font-size: 14px; }
.more summary { padding: 8px 0; cursor: pointer; }
.more .seg { margin-top: 8px; }
#rate .stars { display: flex; justify-content: center; gap: 6px; margin: 10px 0 4px; }
#rate .stars button { font-size: 40px; background: none; color: #3a4a5a; padding: 0 4px; }
#rate .stars button.on { color: var(--warn); }
#rate .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
#rate .grid button { padding: 12px 8px; border-radius: 12px; background: #0b1118; border: 1px solid var(--line); font-size: 15px; }
#rate .grid button.on { background: var(--accent); color: #04140c; border-color: var(--accent); font-weight: 700; }
#rate textarea { margin-bottom: 10px; }

#banner.flash { animation: camflash .6s steps(2) infinite; }
@keyframes camflash { 50% { background: #fff; color: var(--danger); } }
.secondary { width: 100%; padding: 14px; margin-top: 8px; border-radius: 12px; background: #0b1118; border: 1px solid var(--accent); color: var(--accent); font-weight: 700; font-size: 16px; }

/* map controls (driving) */
.maplibregl-ctrl-attrib { font-size: 10px; }
#mapBtns { position: absolute; right: max(12px, env(safe-area-inset-right)); bottom: calc(96px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; }
#mapBtns button { width: 48px; height: 48px; border-radius: 50%; background: rgba(23,33,43,.92); border: 1px solid var(--line); font-size: 22px; box-shadow: 0 4px 14px rgba(0,0,0,.35); display: grid; place-items: center; }
#mapBtns button.on { background: var(--route); border-color: var(--route); }
#compass i { font-style: normal; color: var(--danger); font-size: 18px; display: inline-block; transition: transform .2s; }
#compass.on i { color: #fff; }
#recenter { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(96px + env(safe-area-inset-bottom)); background: var(--route); color: #fff; font-weight: 800; font-size: 16px; padding: 12px 20px; border-radius: 999px; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.puck { width: 48px; height: 48px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.35)); }

/* ===== v7: TMAP-style layout (overrides earlier rules) ===== */
#map { background: #2b3038; }
#maneuver {
  left: 0; right: auto; top: calc(8px + env(safe-area-inset-top)); max-width: min(78vw, 420px);
  background: #12603d; border-radius: 0 14px 14px 0; padding: 12px 18px 12px max(14px, env(safe-area-inset-left)); gap: 12px;
}
#arrow { width: 78px; height: 78px; }
#arrow svg { width: 78px; height: 78px; }
#mdist { font-size: 52px; line-height: 1; letter-spacing: -1px; }
.mline { margin-top: 4px; font-size: 15px; color: #c9f2dc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 52vw; }
#minstr { font-size: 15px; font-weight: 700; color: #fff; }
#mroad { font-size: 15px; font-weight: 600; color: #c9f2dc; display: inline; margin: 0; }
#mthen {
  position: absolute; left: 0; top: calc(var(--mh, 104px) + 8px + env(safe-area-inset-top));
  background: #0f3d29; border-radius: 0 12px 12px 0; padding: 8px 14px 8px max(12px, env(safe-area-inset-left));
  display: flex; align-items: center; gap: 8px; margin: 0; font-size: 26px; box-shadow: 0 4px 12px rgba(0,0,0,.3);
}
#mthen .mini svg { width: 34px; height: 34px; vertical-align: middle; }
#mthen b { font-size: 28px; font-variant-numeric: tabular-nums; }
#banner { left: auto; right: 56px; width: min(64vw, 280px); padding: 10px 12px; border-radius: 14px; display: flex; align-items: center; gap: 10px; position: absolute; overflow: hidden; }
#banner.cam { background: #fff; color: #111; border: 3px solid var(--danger); }
#banner.flash { animation: camflash2 .6s steps(2) infinite; }
@keyframes camflash2 { 50% { background: var(--danger); color: #fff; } }
.clim { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 5px solid var(--danger); background: #fff; color: #111; display: grid; place-items: center; font-weight: 900; font-size: 17px; }
.ctxt { display: flex; flex-direction: column; text-align: left; }
.ctxt b { font-size: 15px; } .ctxt span { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.cbar { position: absolute; left: 0; bottom: 0; height: 5px; background: var(--danger); transition: width .8s linear; }
#prog { position: absolute; right: max(10px, env(safe-area-inset-right)); top: calc(160px + env(safe-area-inset-top)); bottom: calc(190px + env(safe-area-inset-bottom)); width: 12px; }
#progBar { position: absolute; inset: 0; border-radius: 6px; border: 2px solid rgba(255,255,255,.9); background: #22c55e; }
#progCar { position: absolute; left: 50%; transform: translate(-50%, 50%); width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 3px solid #1e90ff; bottom: 0; }
#progCar::after { content: ""; position: absolute; left: 50%; top: 45%; transform: translate(-50%,-50%); border: 6px solid transparent; border-bottom: 9px solid #1e90ff; border-top: 0; }
#leftBtns { position: absolute; left: max(12px, env(safe-area-inset-left)); bottom: calc(190px + env(safe-area-inset-bottom)); }
#flag { width: 56px; height: 56px; border-radius: 50%; background: rgba(60,66,76,.92); color: #fff; font-size: 22px; font-weight: 900; position: relative; padding: 0; }
#flag b { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: #ff5a4f; color: #fff; font-size: 11px; padding: 2px 6px; border-radius: 999px; white-space: nowrap; }
#mapBtns { bottom: calc(110px + env(safe-area-inset-bottom)); }
#speedWrap { bottom: calc(110px + env(safe-area-inset-bottom)); }
#recenter { bottom: calc(110px + env(safe-area-inset-bottom)); }
#bottom { margin: 0 10px calc(8px + env(safe-area-inset-bottom)); left: 0; right: 0; border-radius: 18px; background: #23272e; border: 0; padding: 10px 14px; box-shadow: 0 6px 20px rgba(0,0,0,.4); }
#reroute, #menuBtn { width: 48px; height: 48px; background: transparent; color: #fff; font-size: 28px; flex: none; }
#eta { text-align: center; }
#destLine { font-size: 14px; color: #aab3bf; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.etarow { display: flex; justify-content: center; align-items: baseline; gap: 16px; }
#etaT { font-size: 30px; font-weight: 800; color: #fff; }
#remain { font-size: 30px; font-weight: 800; color: #fff; }
#menu { position: absolute; left: 10px; right: 10px; bottom: calc(96px + env(safe-area-inset-bottom)); background: #23272e; border-radius: 16px; padding: 8px; display: grid; gap: 6px; box-shadow: 0 8px 28px rgba(0,0,0,.5); }
#menu button { padding: 15px; border-radius: 12px; background: #2f343c; font-size: 17px; font-weight: 700; text-align: left; width: 100%; height: auto; }
#menu .danger { background: #4a1f24; color: #ff9a9a; }
#mute { width: auto; }

/* preview */
#pvTop { position: fixed; z-index: 1001; left: 0; right: 0; top: 0; padding: calc(8px + env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) 10px max(10px, env(safe-area-inset-left)); background: #fff; color: #111; display: flex; align-items: center; gap: 8px; border-radius: 0 0 18px 18px; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
#pvTop button { background: none; color: #111; font-size: 28px; width: 40px; height: 40px; }
.pv-od { flex: 1; min-width: 0; border: 1px solid #ddd; border-radius: 12px; padding: 10px 12px; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#pvStarMenu { position: fixed; z-index: 1002; right: 10px; top: calc(68px + env(safe-area-inset-top)); background: #fff; border-radius: 12px; box-shadow: 0 6px 18px rgba(0,0,0,.3); display: grid; overflow: hidden; }
#pvStarMenu button { color: #111; padding: 14px 18px; text-align: left; background: #fff; border-bottom: 1px solid #eee; font-size: 15px; }
#preview { position: fixed; z-index: 1000; left: 0; right: 0; bottom: 0; padding: 0 0 calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(to top, rgba(20,22,26,.85) 60%, transparent); }
#pvMode { margin: 0 12px 8px; max-width: 260px; }
#pvRoutes { list-style: none; display: flex; flex-direction: row; gap: 10px; overflow-x: auto; padding: 0 12px 10px; margin: 0; scroll-snap-type: x mandatory; }
#pvRoutes li { flex: 0 0 min(62vw, 230px); scroll-snap-align: start; background: #fff; color: #111; border: 3px solid transparent; border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
#pvRoutes li.on { border-color: #1e6fff; background: #fff; }
#pvRoutes li i { font-style: normal; font-weight: 800; color: #555; font-size: 15px; }
#pvRoutes li.on i { color: #1e6fff; }
#pvRoutes li b { font-size: 30px; margin: 2px 0; }
#pvRoutes li small { color: #333; font-size: 14px; }
.pv-row { display: flex; gap: 10px; padding: 0 12px; }
.pv-cancel { flex: 0 0 34%; padding: 16px; border-radius: 14px; background: #8a9099; color: #fff; font-size: 17px; font-weight: 700; }
.pv-go { flex: 1; padding: 16px; border-radius: 14px; background: #1e6fff; color: #fff; font-size: 19px; font-weight: 800; display: flex; justify-content: center; align-items: center; gap: 10px; }
#pvCount:not(:empty) { width: 32px; height: 32px; border-radius: 50%; border: 2px solid #fff; display: inline-grid; place-items: center; font-size: 15px; }
#pvStatus { margin: 0 12px 6px; color: #fff; }
#etaT, #remain { white-space: nowrap; font-size: 26px; }
.etarow { gap: 12px; flex-wrap: nowrap; }
#eta { min-width: 0; }
#leftBtns { bottom: calc(300px + env(safe-area-inset-bottom)); }
#prog { bottom: calc(290px + env(safe-area-inset-bottom)); }

/* ===== v8: Google-Maps style home ===== */
#topBar { position: fixed; z-index: 1001; left: 0; right: 0; top: 0; padding: calc(10px + env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left)); pointer-events: none; }
#topBar > * { pointer-events: auto; }
.searchPill { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 999px; padding: 4px 8px 4px 16px; box-shadow: 0 2px 10px rgba(0,0,0,.25); }
.searchPill input { border: 0; background: transparent; color: #202124; padding: 12px 0; font-size: 17px; flex: 1; min-width: 0; outline: none; }
.sicon { color: #5f6368; font-size: 22px; }
#qClear { background: none; color: #5f6368; font-size: 18px; width: 36px; height: 36px; }
#results { margin: 8px 0 0; background: #fff; border-radius: 16px; box-shadow: 0 4px 16px rgba(0,0,0,.25); max-height: 55vh; overflow-y: auto; padding: 0 6px; }
#results:empty { display: none; }
#results li { color: #202124; border-bottom: 1px solid #eee; padding: 12px 8px; }
#results li small { color: #5f6368; }
.fab { position: fixed; z-index: 999; right: max(14px, env(safe-area-inset-right)); bottom: calc(150px + env(safe-area-inset-bottom)); width: 54px; height: 54px; border-radius: 50%; background: #fff; color: #1a73e8; font-size: 26px; box-shadow: 0 2px 10px rgba(0,0,0,.3); }
.bsheet { position: fixed; z-index: 1000; left: 0; right: 0; bottom: 0; height: 86vh; background: #fff; color: #202124; border-radius: 20px 20px 0 0; box-shadow: 0 -4px 20px rgba(0,0,0,.2); transition: transform .25s ease; touch-action: none; padding: 0 max(16px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(16px, env(safe-area-inset-left)); display: flex; flex-direction: column; }
#grab { padding: 10px 0 12px; display: grid; place-items: center; cursor: grab; }
#grab i { width: 44px; height: 5px; border-radius: 3px; background: #c7c9cc; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 12px; }
.bsheet .fav { flex: 0 0 auto; padding: 10px 14px; border-radius: 999px; background: #f1f3f4; border: 0; color: #202124; font-size: 15px; white-space: nowrap; }
.bsheet .fav em { font-style: normal; color: #1a73e8; font-weight: 700; margin-left: 4px; }
.bsheet .fav.set { border: 0; }
.sbody { overflow-y: auto; flex: 1; touch-action: pan-y; }
.bsheet .lbl { color: #5f6368; }
.grid2 { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.grid2 li { background: #f8f9fa; border-radius: 12px; padding: 14px 12px; color: #202124; min-width: 0; }
.grid2 li b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grid2 li span { display: none; }
.bsheet .hint { color: #5f6368; margin: 12px 0; }
.bsheet .more { color: #5f6368; }
.bsheet input { background: #f1f3f4; color: #202124; border-color: #ddd; }
.bsheet .seg button { background: #f1f3f4; color: #202124; border-color: #ddd; }
.bsheet .seg button.on { background: #1a73e8; color: #fff; border-color: #1a73e8; }
#place { position: fixed; z-index: 1000; left: 0; right: 0; bottom: 0; background: #fff; color: #202124; border-radius: 20px 20px 0 0; box-shadow: 0 -4px 20px rgba(0,0,0,.2); padding: 18px max(16px, env(safe-area-inset-right)) calc(16px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
.ptop { display: flex; gap: 10px; align-items: flex-start; }
.pinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pinfo b { font-size: 21px; }
.pinfo small { color: #5f6368; font-size: 14px; }
#plClose { background: #f1f3f4; color: #5f6368; width: 36px; height: 36px; border-radius: 50%; font-size: 16px; }
.pbtns { display: flex; gap: 10px; margin-top: 14px; }
#plGo { flex: 1; background: #1a73e8; }
.pl-save { width: 58px; border-radius: 14px; background: #f1f3f4; color: #5f6368; font-size: 26px; }
.pl-save.on { color: #f9ab00; }
.star-mk { width: 30px; height: 30px; border-radius: 50%; background: #f9ab00; color: #fff; display: grid; place-items: center; font-size: 17px; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); cursor: pointer; }
.puck svg { width: 64px; height: 64px; }
.puck { width: 64px; height: 64px; }

/* v9 lane guidance (TMAP-style lane bar) */
#lanes { margin-top: 6px; display: inline-flex; flex-direction: column; gap: 4px; background: #10161f; border-radius: 10px; padding: 6px 8px; box-shadow: 0 4px 14px rgba(0,0,0,.35); max-width: calc(100vw - 24px); }
#lanes .lrow { display: flex; gap: 0; }
#lanes .ln { width: 38px; height: 40px; display: flex; align-items: center; justify-content: center; color: #6b7685; border-right: 2px dashed #3a4452; }
#lanes .ln:last-child { border-right: 0; }
#lanes .ln.on { color: #fff; background: #1e90ff; border-radius: 6px; }
#lanes .lnote { color: #ffd54a; font-size: 13px; font-weight: 700; max-width: 220px; }
@media (max-width: 400px) { #lanes .ln { width: 32px; } }
#lanes { position: absolute; right: calc(36px + env(safe-area-inset-right)); top: calc(var(--mh, 104px) + 8px + env(safe-area-inset-top)); margin: 0; z-index: 3; }

/* v10: TMAP-style approach countdown bar on the maneuver card */
#maneuver { overflow: hidden; }
#maneuver::after { content: ""; position: absolute; left: 0; bottom: 0; height: 6px; width: calc(var(--near, 0) * 100%); background: #7dff9b; transition: width .9s linear; }
#maneuver.near #mdist { color: #fff27a; }

/* v10: highway mode list (next exits) */
#hwy { position: absolute; right: calc(36px + env(safe-area-inset-right)); top: 42%; display: flex; flex-direction: column; gap: 4px; max-width: 46vw; z-index: 2; pointer-events: none; }
#hwy .hr { background: rgba(16,22,31,.92); border-radius: 10px; padding: 6px 10px; display: flex; flex-direction: column; box-shadow: 0 3px 10px rgba(0,0,0,.3); }
#hwy .hr b { color: #fff; font-size: 20px; font-weight: 800; line-height: 1.1; }
#hwy .hr span { color: #cfe3ff; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#hwy .hr i { font-style: normal; background: #0a6b3a; color: #fff; border-radius: 4px; padding: 0 5px; margin-right: 4px; font-weight: 700; }
#hwy .hr.arr b { color: #ffd54a; }

#drBadge { pointer-events: none; position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(190px + env(safe-area-inset-bottom)); background: #3b3f46; color: #ffd54a; font-weight: 700; font-size: 14px; padding: 6px 12px; border-radius: 16px; z-index: 3; box-shadow: 0 3px 10px rgba(0,0,0,.3); }
