@font-face {
  font-family: "Waze Boing";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/WazeBoing-RegularWEB-24901c6478066fd1c5af9a84dd59b420.woff2") format("woff2");
}
@font-face {
  font-family: "Waze Boing";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/boing-500-56c7f31d04e9047df2c76dca027faf5b.woff2") format("woff2");
}
@font-face {
  font-family: "Waze Boing";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/WazeBoing-SemiBoldWEB-528de5d29d03dee21d3d872dcc9ccd8f.woff2") format("woff2");
}

:root {
  --wz-blue: #0099ff;
  --wz-blue-deep: #0077cc;
  --wz-green: #07b161;
  --wz-ink: #202124;
  --wz-muted: #5f6368;
  --wz-line: #e8eaed;
  --wz-card: #ffffff;
  --wz-soft: #f5f7fa;
  --wz-danger: #e53935;
  --wz-page: #dfe7ef;
  --wz-glass: rgba(255, 255, 255, 0.92);
  --shadow: 0 2px 8px rgba(32, 33, 36, 0.12), 0 8px 24px rgba(32, 33, 36, 0.1);
  --radius: 16px;
  --font-ui: "Rubik", "Waze Boing", system-ui, sans-serif;
  --font-brand: "Waze Boing", "Rubik", system-ui, sans-serif;
}

html[data-theme="dark"] {
  --wz-blue: #3db4ff;
  --wz-blue-deep: #7ec9ff;
  --wz-green: #2ecc8a;
  --wz-ink: #e8eaed;
  --wz-muted: #9aa0a6;
  --wz-line: #2c3138;
  --wz-card: #1b1f26;
  --wz-soft: #242933;
  --wz-danger: #ff6b63;
  --wz-page: #101318;
  --wz-glass: rgba(27, 31, 38, 0.94);
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  font-family: var(--font-ui);
  color: var(--wz-ink);
  background: var(--wz-page);
  -webkit-tap-highlight-color: transparent;
}

.insecure-banner {
  position: absolute;
  z-index: 12000;
  left: 12px;
  right: 12px;
  top: max(12px, env(safe-area-inset-top));
  padding: 14px 16px;
  border-radius: 18px;
  background: #1c2a4a;
  color: #fff;
  box-shadow: var(--shadow);
  font-size: 0.92rem;
  line-height: 1.35;
}
.insecure-banner p {
  margin: 0 0 8px;
}
.insecure-banner a {
  color: #7ec9ff;
  font-weight: 700;
  word-break: break-all;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 20000;
  padding: 0.5rem 1rem;
  background: var(--wz-blue);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
}
.skip-link:focus {
  left: 8px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.atlas-app {
  position: relative;
  width: 100%;
  height: 100dvh;
  height: 100vh;
  overflow: hidden;
}

.map-wrap,
#map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.leaflet-container {
  font: inherit;
  background: #c9d6e2;
}

/* —— Route card (Waze-style) —— */
.sheet-handle {
  position: relative;
  width: 44px;
  height: 5px;
  border-radius: 999px;
  background: #c5cad1;
  margin: 10px auto 2px;
  flex-shrink: 0;
  cursor: grab;
  touch-action: none;
  pointer-events: auto;
}
.sheet-handle::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 140px;
  height: 40px;
  transform: translate(-50%, -50%);
}
html[data-theme="dark"] .sheet-handle {
  background: #4a5160;
}

.route-card {
  position: absolute;
  z-index: 5000;
  top: auto;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0 auto;
  width: min(460px, 100%);
  height: min(92dvh, 820px);
  max-height: min(92dvh, 820px);
  display: flex;
  flex-direction: column;
  background: var(--wz-glass);
  border: 1px solid var(--wz-line);
  border-bottom: 0;
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -8px 32px rgba(32, 33, 36, 0.16);
  overflow: hidden;
  backdrop-filter: blur(18px);
  --sheet-shift: calc(min(92dvh, 820px) - min(52dvh, 480px));
  transform: translate3d(0, var(--sheet-shift), 0);
  transition: transform 0.34s cubic-bezier(0.32, 0.72, 0, 1);
  touch-action: pan-y;
}
.route-card.is-sheet-dragging,
.settings-win.is-sheet-dragging,
.cop-panel-card.is-sheet-dragging {
  transition: none;
  touch-action: none;
}

.route-card.is-collapsed .route-card__body {
  overflow: hidden;
}

.route-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 8px 18px 10px;
  border-bottom: 1px solid var(--wz-line);
  cursor: grab;
  touch-action: none;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #5ec8ff, var(--wz-blue) 55%, var(--wz-blue-deep));
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}

.brand-name {
  margin: 0;
  font-family: var(--font-brand);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--wz-ink);
}

.brand-tag {
  margin: 2px 0 0;
  font-size: 0.8rem;
  color: var(--wz-muted);
}

.route-card__body {
  padding: 12px 18px calc(18px + env(safe-area-inset-bottom));
  overflow: auto;
  overscroll-behavior: contain;
  flex: 1;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}

.hint {
  margin: 0.35rem 0 0.75rem;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--wz-muted);
}
.hint.muted {
  margin-top: 0;
}

.tool-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.tool-row.wrap {
  flex-wrap: wrap;
}

.btn,
.icon-btn,
.link-btn {
  font-family: inherit;
  cursor: pointer;
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.2;
  transition: transform 0.12s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.btn:active {
  transform: scale(0.98);
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--wz-blue);
  color: #fff;
  box-shadow: 0 2px 0 var(--wz-blue-deep);
}
.btn-primary:hover:not(:disabled) {
  background: #1aa3ff;
}

.btn-go {
  background: var(--wz-green);
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  min-width: 72px;
  box-shadow: 0 2px 0 #05914f;
}
.btn-go.btn-block {
  min-width: 0;
  margin-top: 8px;
}
.btn-stop {
  background: #e53935;
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  min-width: 72px;
  box-shadow: 0 2px 0 #b71c1c;
}
.btn-stop:hover:not(:disabled) {
  background: #f44336;
}
.btn-stop.is-stopping {
  opacity: 0.85;
  pointer-events: none;
}

#map.atlas-map-spin {
  animation: atlasMapSpin 1.45s cubic-bezier(0.18, 0.72, 0.22, 1);
  transform-origin: 50% 50%;
  will-change: transform;
}
@keyframes atlasMapSpin {
  0% { transform: rotate(0deg) scale(1); }
  35% { transform: rotate(210deg) scale(0.86); }
  68% { transform: rotate(330deg) scale(1.05); }
  100% { transform: rotate(360deg) scale(1); }
}

.btn-secondary {
  background: var(--wz-soft);
  color: var(--wz-ink);
  border: 1px solid var(--wz-line);
}

.btn-idiot {
  background: #ff6a00;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 0 #d45500;
}
.btn-idiot:hover:not(:disabled) {
  background: #ff7d1f;
}
.btn-idiot--compact {
  min-width: 0;
  margin-top: 0;
  padding: 0.4rem 0.7rem;
  font-size: 0.78rem;
}

.btn-ghost {
  background: transparent;
  color: var(--wz-blue-deep);
  border: 1px solid var(--wz-line);
  padding: 0.45rem 0.75rem;
  font-size: 0.82rem;
}

.btn-block {
  width: 100%;
  margin-top: 8px;
}

[hidden] {
  display: none !important;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--wz-soft);
  color: var(--wz-ink);
  font-size: 1.25rem;
  line-height: 1;
}

.link-btn {
  border: 0;
  background: none;
  color: var(--wz-blue);
  font-weight: 500;
  font-size: 0.88rem;
  padding: 6px 0 10px;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--wz-ink);
  margin: 0 0 6px;
}
.check input {
  margin-top: 2px;
}

.opts {
  padding: 8px 0 10px;
  border-top: 1px solid var(--wz-line);
  border-bottom: 1px solid var(--wz-line);
  margin-bottom: 10px;
}

.route-plan {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 0 8px;
}
.route-plan > .hint,
.route-plan > .nav-county-box {
  margin: 0;
}
.route-plan > [hidden] {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.nav-chain-mount {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 0;
  position: relative;
  z-index: 1;
}

.nav-chain-row {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: 8px;
  align-items: start;
}
.nav-chain-row[hidden],
.nav-chain-order[hidden],
.nav-chain-reorder[hidden],
#btnNavChainAdd[hidden],
#btnNavChainClear[hidden] {
  display: none !important;
}
html[data-extra-stops="off"] .nav-chain-reorder,
html[data-extra-stops="off"] .nav-chain-order,
html[data-extra-stops="off"] .nav-chain-row[data-chain-i="2"],
html[data-extra-stops="off"] .nav-chain-row[data-chain-i="3"],
html[data-extra-stops="off"] .nav-chain-row[data-chain-i="4"] {
  display: none !important;
}

.nav-chain-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin: 6px 0 0;
}
.nav-chain-add,
.nav-chain-clear {
  display: inline-block;
  width: auto;
  margin: 0;
  padding: 0;
  text-align: left;
}
.nav-chain-clear {
  color: var(--wz-danger);
}

.pin {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-top: 14px;
  justify-self: center;
  box-shadow: 0 0 0 3px rgba(0, 153, 255, 0.15);
}
.pin--a {
  background: var(--wz-blue);
}
.pin--b {
  background: var(--wz-green);
  box-shadow: 0 0 0 3px rgba(7, 177, 97, 0.18);
}
.pin--stop {
  background: #9aa0a6;
  box-shadow: none;
}

.nav-addr-wrap {
  position: relative;
}

.nav-chain-addr input[type="search"] {
  width: 100%;
  border: 0;
  border-radius: 18px;
  padding: 0.95rem 1.05rem;
  font: inherit;
  font-size: 1.02rem;
  background: var(--wz-soft);
  color: var(--wz-ink);
  outline: none;
}
.nav-chain-addr input[type="search"]:focus {
  border-color: var(--wz-blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 153, 255, 0.18);
}

.nav-addr-suggestions {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  margin: 0;
  padding: 4px 0;
  list-style: none;
  background: #fff;
  border: 1px solid var(--wz-line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  max-height: 220px;
  overflow: auto;
}
.nav-addr-suggestions li {
  padding: 0.65rem 0.85rem;
  font-size: 0.88rem;
  cursor: pointer;
}
.nav-addr-suggestions li:hover,
.nav-addr-suggestions li[aria-selected="true"] {
  background: rgba(0, 153, 255, 0.08);
}

.nav-chain-reorder {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-chain-reorder .btn {
  padding: 0.2rem 0.4rem;
  min-width: 28px;
}

.nav-chain-order {
  margin: 4px 0 8px;
}
.nav-hud-more-stops {
  display: block;
  width: 100%;
  text-align: left;
  padding: 4px 0 8px;
}
.nav-hud-stops {
  margin: 0 0 8px;
  padding-left: 1.15rem;
  font-size: 0.82rem;
  color: var(--wz-muted);
}
.nav-hud-stops li {
  margin: 0 0 4px;
}
.nav-hud-stops li.is-next {
  color: var(--wz-ink);
  font-weight: 600;
}

.flock-alert {
  position: absolute;
  z-index: 4600;
  left: 50%;
  top: 18px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: min(280px, calc(100vw - 24px));
  padding: 10px 14px;
  border-radius: 14px;
  background: #8b1e1a;
  color: #fff;
  box-shadow: 0 8px 28px rgba(139, 30, 26, 0.35);
  animation: flock-pop 0.45s cubic-bezier(0.2, 0.9, 0.2, 1);
}
.flock-alert[hidden] {
  display: none;
}
.flock-alert-pulse {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffd2cf;
  box-shadow: 0 0 0 0 rgba(255, 210, 207, 0.7);
  animation: flock-pulse 1.1s ease-out infinite;
}
.flock-alert-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.82rem;
  line-height: 1.25;
}
.flock-alert-copy strong {
  font-family: var(--font-brand);
  font-size: 0.95rem;
}
@keyframes flock-pop {
  0% { transform: translateX(-50%) translateY(-12px) scale(0.92); opacity: 0; }
  100% { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; }
}
@keyframes flock-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 210, 207, 0.7); }
  70% { box-shadow: 0 0 0 12px rgba(255, 210, 207, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 210, 207, 0); }
}

.eta-wrap {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 153, 255, 0.08), rgba(7, 177, 97, 0.08));
}
.eta-main {
  margin: 0;
  font-family: var(--font-brand);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--wz-ink);
}

.nav-live-banner {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--wz-ink);
  color: #fff;
}
.nav-live-instruction {
  margin: 0;
  font-weight: 500;
}
.nav-live-eta {
  margin: 4px 0 0;
  font-size: 0.85rem;
  opacity: 0.85;
}

.advanced {
  margin-top: 12px;
  border-top: 1px solid var(--wz-line);
  padding-top: 8px;
}
.advanced summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--wz-muted);
  font-size: 0.88rem;
}
.advanced-inner {
  padding-top: 10px;
}
.coord-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 8px 0;
}
.coord-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.72rem;
  color: var(--wz-muted);
}
.coord-grid input,
.coord-grid select,
.plate-lookup input,
.plate-lookup select {
  border: 1px solid var(--wz-line);
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
  font: inherit;
  font-size: 0.85rem;
  background: #fff;
  color: inherit;
}
.plate-lookup {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--wz-line);
}
.plate-lookup-row {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr;
  gap: 8px;
  margin: 8px 0;
}
.plate-lookup-row label,
.plate-lookup-name {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.72rem;
  color: var(--wz-muted);
}
.plate-lookup-name {
  margin: 0 0 8px;
}
.plate-lookup-out {
  margin-top: 10px;
  font-size: 0.8rem;
  line-height: 1.4;
}
.plate-lookup-out h4 {
  margin: 12px 0 6px;
  font-size: 0.82rem;
}
.plate-lookup-out ul {
  margin: 0;
  padding-left: 1.1rem;
}
.plate-lookup-out li {
  margin: 0 0 8px;
}
.plate-lookup-out a {
  color: var(--wz-blue-deep);
}
.plate-lookup-note {
  margin: 0 0 8px;
  color: var(--wz-muted);
}
.plate-lookup-empty {
  margin: 8px 0;
}

/* —— County / HUD —— */
.nav-county-box {
  margin: 8px 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff8e6;
  border: 1px solid #ffe0a3;
  font-size: 0.78rem;
  line-height: 1.35;
}
.nav-county-kicker {
  margin: 0 0 4px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.68rem;
  color: #a66b00;
}
.nav-county-name {
  margin: 0 0 4px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--wz-ink);
}
.nav-county-box p {
  margin: 0 0 3px;
}
.nav-county-box--hud {
  background: rgba(255, 248, 230, 0.95);
}

.nav-risk-scores {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.nav-risk-scores li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.84rem;
}
.nav-risk-scores strong {
  font-family: var(--font-brand);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--wz-ink);
  line-height: 1;
}
.nav-risk-scores strong[data-band="low"] { color: var(--wz-green); }
.nav-risk-scores strong[data-band="moderate"] { color: #c48a00; }
.nav-risk-scores strong[data-band="elevated"] { color: #e67a00; }
.nav-risk-scores strong[data-band="high"] { color: var(--wz-danger); }
.nav-risk-denom {
  margin-left: 2px;
  font-size: 0.78rem;
  color: var(--wz-muted);
  font-weight: 500;
}
.nav-risk-scores li span:first-child {
  color: var(--wz-ink);
  font-weight: 500;
}

.nav-advanced-data {
  margin-top: 10px;
  border-top: 1px solid #ffe0a3;
  padding-top: 6px;
}
.nav-advanced-data summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--wz-blue-deep);
  list-style: none;
}
.nav-advanced-data summary::-webkit-details-marker {
  display: none;
}
.nav-advanced-data summary::before {
  content: "▸ ";
  color: var(--wz-muted);
}
.nav-advanced-data[open] summary::before {
  content: "▾ ";
}
.nav-advanced-data-body {
  margin-top: 8px;
  font-size: 0.74rem;
  line-height: 1.35;
  color: var(--wz-muted);
}
.nav-advanced-data-body p {
  margin: 0 0 6px;
}

.nav-hud {
  position: absolute;
  z-index: 5100;
  left: 0;
  right: 0;
  top: auto;
  bottom: 0;
  margin: 0 auto;
  width: min(460px, 100%);
  height: min(72dvh, 580px);
  max-height: min(72dvh, 580px);
  overflow: hidden;
  padding: 0;
  border-radius: 28px 28px 0 0;
  background: var(--wz-glass);
  border: 1px solid var(--wz-line);
  border-bottom: 0;
  box-shadow: 0 -8px 32px rgba(32, 33, 36, 0.16);
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  --sheet-shift: calc(min(72dvh, 580px) - 148px);
  transform: translate3d(0, var(--sheet-shift), 0);
  transition: transform 0.34s cubic-bezier(0.32, 0.72, 0, 1);
  touch-action: pan-y;
}
.nav-hud.is-sheet-dragging {
  transition: none;
  touch-action: none;
}
.trip-sheet__chrome {
  flex-shrink: 0;
}
.trip-sheet__peek {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr) auto;
  gap: 10px;
  align-items: center;
  padding: 2px 16px 12px;
}
.nav-hud.is-collapsed .trip-sheet__peek {
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
}
.trip-sheet__drag {
  cursor: grab;
  touch-action: none;
  min-width: 0;
}
.trip-sheet__arrive .arrive-card__kicker {
  margin: 0;
}
.trip-sheet__arrive .arrive-card__time {
  margin: 0;
  font-size: 1.7rem;
}
.trip-sheet__arrive .arrive-card__meta {
  margin: 2px 0 0;
  font-size: 0.75rem;
  align-items: flex-start;
}
.trip-sheet__arrive .arrive-card__dest {
  margin: 0;
  max-width: 100%;
}
.trip-sheet__trip .nav-hud-timer-wrap {
  margin: 0;
}
.trip-sheet__trip .nav-hud-timer {
  font-size: 1.35rem;
}
.trip-sheet__peek #navHudGo {
  min-width: 76px;
  padding: 0.7rem 1rem;
}
.trip-sheet__body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0 16px calc(16px + env(safe-area-inset-bottom));
}
.trip-sheet__actions {
  display: flex;
  gap: 8px;
  margin: 8px 0 10px;
}
.trip-sheet__actions .btn {
  flex: 1;
}
html.atlas-driving .route-card {
  display: none !important;
}
.nav-hud-mph-line {
  display: none;
}
.nav-hud-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.nav-hud-timer-wrap {
  font-size: 0.85rem;
  color: var(--wz-muted);
}
.nav-hud-timer {
  display: block;
  font-family: var(--font-brand);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--wz-ink);
}
.nav-hud-deck-label {
  margin: 0 0 4px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--wz-muted);
  font-weight: 600;
}
.nav-hud-nextdist {
  font-weight: 600;
  margin-bottom: 8px;
}

html.atlas-county-off .nav-county-box,
html[data-ticket-likelihood="off"] .nav-county-box,
html[data-ticket-likelihood="off"] #navHudTicketWrap,
html[data-ticket-likelihood="off"] #navHudTicketStatus,
.nav-county-box.is-settings-off,
#navHudTicketWrap[hidden],
.nav-hud-limit-line.is-ticket-off #navHudTicketWrap {
  display: none !important;
}
.nav-hud-ticket-status {
  margin: 4px 0 6px;
  font-size: 0.75rem;
  font-weight: 700;
}
.nav-hud-ticket-status.is-warn {
  color: #c48a00;
}
.nav-hud-ticket-status.is-hot {
  color: var(--wz-danger);
}

.arrive-card__kicker {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--wz-muted);
  font-weight: 700;
}
.arrive-card__time {
  margin: 2px 0 0;
  font-family: var(--font-brand);
  font-size: 2.05rem;
  font-weight: 600;
  line-height: 1.05;
  color: var(--wz-ink);
}
.arrive-card__meta {
  margin: 6px 0 0;
  font-size: 0.82rem;
  color: var(--wz-muted);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.arrive-card__dest {
  font-weight: 500;
  color: var(--wz-ink);
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 0 auto;
}

.turn-banner-wrap {
  position: absolute;
  z-index: 4800;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-start;
  pointer-events: none;
  max-width: calc(100vw - 16px);
  overflow: visible;
}
.turn-banner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: min(280px, calc(100vw - 28px));
  max-width: min(420px, calc(100vw - 140px));
  padding: 12px 16px 12px 12px;
  border-radius: 22px;
  background: linear-gradient(180deg, #0b6fd6 0%, #095bb0 100%);
  color: #fff;
  box-shadow: 0 10px 28px rgba(9, 91, 176, 0.35), 0 2px 8px rgba(0, 0, 0, 0.18);
  pointer-events: none;
  animation: turnBannerIn 0.28s ease-out;
}
.turn-banner[hidden] {
  display: none !important;
}
.turn-banner.is-now {
  background: linear-gradient(180deg, #07b161 0%, #05914d 100%);
  box-shadow: 0 10px 28px rgba(7, 177, 97, 0.32), 0 2px 8px rgba(0, 0, 0, 0.18);
}
.turn-banner.is-cleared {
  background: linear-gradient(180deg, #334155 0%, #1e293b 100%);
  animation: turnBannerOut 0.45s ease-in forwards;
}
.turn-banner__arrow {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.16);
  position: relative;
}
.turn-banner__arrow::before,
.turn-banner__arrow::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: #fff;
}
.turn-banner__arrow[data-dir="right"]::before,
.turn-banner__arrow[data-dir="slight-right"]::before,
.turn-banner__arrow[data-dir="sharp-right"]::before {
  width: 22px;
  height: 6px;
  border-radius: 3px;
  transform: translate(-70%, -50%);
}
.turn-banner__arrow[data-dir="right"]::after,
.turn-banner__arrow[data-dir="slight-right"]::after,
.turn-banner__arrow[data-dir="sharp-right"]::after {
  width: 16px;
  height: 16px;
  background: transparent;
  border-top: 6px solid #fff;
  border-right: 6px solid #fff;
  transform: translate(-20%, -50%) rotate(45deg);
}
.turn-banner__arrow[data-dir="slight-right"]::after {
  transform: translate(-28%, -62%) rotate(28deg);
}
.turn-banner__arrow[data-dir="sharp-right"]::after {
  transform: translate(-12%, -28%) rotate(70deg);
}
.turn-banner__arrow[data-dir="left"]::before,
.turn-banner__arrow[data-dir="slight-left"]::before,
.turn-banner__arrow[data-dir="sharp-left"]::before {
  width: 22px;
  height: 6px;
  border-radius: 3px;
  transform: translate(-30%, -50%);
}
.turn-banner__arrow[data-dir="left"]::after,
.turn-banner__arrow[data-dir="slight-left"]::after,
.turn-banner__arrow[data-dir="sharp-left"]::after {
  width: 16px;
  height: 16px;
  background: transparent;
  border-top: 6px solid #fff;
  border-left: 6px solid #fff;
  transform: translate(-80%, -50%) rotate(-45deg);
}
.turn-banner__arrow[data-dir="slight-left"]::after {
  transform: translate(-72%, -62%) rotate(-28deg);
}
.turn-banner__arrow[data-dir="sharp-left"]::after {
  transform: translate(-88%, -28%) rotate(-70deg);
}
.turn-banner__arrow[data-dir="straight"]::before,
.turn-banner__arrow[data-dir="depart"]::before,
.turn-banner__arrow[data-dir="merge"]::before {
  width: 6px;
  height: 22px;
  border-radius: 3px;
  transform: translate(-50%, -35%);
}
.turn-banner__arrow[data-dir="straight"]::after,
.turn-banner__arrow[data-dir="depart"]::after,
.turn-banner__arrow[data-dir="merge"]::after {
  width: 16px;
  height: 16px;
  background: transparent;
  border-top: 6px solid #fff;
  border-right: 6px solid #fff;
  transform: translate(-50%, -72%) rotate(-45deg);
}
.turn-banner__arrow[data-dir="uturn"]::before {
  width: 20px;
  height: 20px;
  background: transparent;
  border: 6px solid #fff;
  border-bottom-color: transparent;
  border-radius: 50%;
  transform: translate(-62%, -58%);
}
.turn-banner__arrow[data-dir="uturn"]::after {
  width: 12px;
  height: 12px;
  background: transparent;
  border-top: 5px solid #fff;
  border-right: 5px solid #fff;
  transform: translate(10%, -10%) rotate(80deg);
}
.turn-banner__arrow[data-dir="roundabout"]::before {
  width: 22px;
  height: 22px;
  background: transparent;
  border: 5px solid #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.turn-banner__arrow[data-dir="roundabout"]::after {
  width: 10px;
  height: 10px;
  background: transparent;
  border-top: 4px solid #fff;
  border-right: 4px solid #fff;
  transform: translate(10%, -70%) rotate(45deg);
}
.turn-banner__arrow[data-dir="arrive"]::before {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.turn-banner__arrow[data-dir="arrive"]::after {
  width: 22px;
  height: 22px;
  background: transparent;
  border: 3px solid #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.turn-banner__copy {
  min-width: 0;
}
.turn-banner__dist {
  margin: 0;
  font-family: var(--font-brand);
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1;
}
.turn-banner__text {
  margin: 4px 0 0;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.2;
}
.turn-banner__then {
  margin: 4px 0 0;
  font-size: 0.78rem;
  opacity: 0.85;
  font-weight: 500;
}
@keyframes turnBannerIn {
  from { opacity: 0; transform: translateY(-10px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes turnBannerOut {
  to { opacity: 0; transform: translateY(-12px) scale(0.96); }
}
html[data-theme="dark"] .turn-banner {
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}
.nav-hud-spd {
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--wz-soft);
  font-size: 0.8rem;
  margin-bottom: 8px;
}
.nav-hud-mph {
  font-family: var(--font-brand);
  font-size: 1.25rem;
  font-weight: 600;
}
.nav-hud-mph--over {
  color: var(--wz-danger);
}
.nav-hud-foot {
  margin: 8px 0 0;
  font-size: 0.7rem;
  color: var(--wz-muted);
}

.nav-accuracy {
  color: var(--wz-blue-deep);
}
.nav-accuracy--offroad {
  color: #c48a00;
  font-weight: 600;
}

.nav-offroad-pill {
  margin-top: 8px;
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff3d6;
  color: #8a5a00;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.nav-offroad-overlay {
  position: absolute;
  z-index: 4000;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  pointer-events: none;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 243, 214, 0.96);
  color: #8a5a00;
  font-family: var(--font-brand);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: var(--shadow);
}
.atlas-follow-marker--offroad .atlas-follow-arrow {
  border-bottom-color: #e67a00;
}

.toast {
  position: absolute;
  z-index: 9000;
  left: 50%;
  bottom: calc(var(--route-sheet-visible, 52dvh) + 16px);
  transform: translateX(-50%);
  max-width: min(420px, calc(100vw - 32px));
  padding: 0.75rem 1.15rem;
  border-radius: 999px;
  background: var(--wz-ink);
  color: #fff;
  font-size: 0.88rem;
  box-shadow: var(--shadow);
}
.toast--error {
  background: var(--wz-danger);
}

.atlas-follow-arrow {
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 22px solid var(--wz-blue);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
  transform-origin: 50% 70%;
}

.atlas-cam-marker.leaflet-div-icon,
.atlas-cam-marker {
  background: transparent !important;
  border: none !important;
}
.atlas-cam-pin {
  width: 36px;
  height: 47px;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4));
  pointer-events: auto;
}
.atlas-cam-pin-body {
  stroke: #fff;
  stroke-width: 2;
}
.atlas-cam-pin--speed .atlas-cam-pin-body { fill: #e67a00; }
.atlas-cam-pin--alpr .atlas-cam-pin-body { fill: var(--wz-danger); }
.atlas-cam-pin-face { fill: #fff; }
.atlas-cam-pin--speed .atlas-cam-body,
.atlas-cam-pin--speed .atlas-cam-flash,
.atlas-cam-pin--speed .atlas-cam-lens,
.atlas-cam-pin--speed .atlas-cam-radar { fill: #e67a00; stroke: #e67a00; }
.atlas-cam-pin--alpr .atlas-cam-body,
.atlas-cam-pin--alpr .atlas-cam-flash,
.atlas-cam-pin--alpr .atlas-cam-lens,
.atlas-cam-pin--alpr .atlas-cam-plate { fill: var(--wz-danger); }
.atlas-cam-lens-ring { fill: #fff; }
.atlas-cam-radar {
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
}
.atlas-cam-plate-bars {
  fill: none;
  stroke: #fff;
  stroke-width: 1.2;
  stroke-linecap: round;
}

.leaflet-top.leaflet-left {
  top: max(16px, env(safe-area-inset-top));
  left: max(16px, env(safe-area-inset-left));
}
.leaflet-control-zoom {
  border: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
}
.leaflet-control-zoom a {
  width: 52px !important;
  height: 52px !important;
  line-height: 52px !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: #fff !important;
  color: var(--wz-ink) !important;
  box-shadow: 0 4px 16px rgba(32, 33, 36, 0.18);
  margin-bottom: 10px !important;
  font-size: 20px !important;
}
.leaflet-control-zoom a:hover {
  background: #f5f7fa !important;
}
.leaflet-bottom.leaflet-right {
  bottom: calc(var(--route-sheet-visible, 52dvh) + 8px);
  right: max(16px, env(safe-area-inset-right));
  margin: 0;
}
.leaflet-control-attribution {
  border-radius: 10px 0 0 0;
  background: rgba(255, 255, 255, 0.72) !important;
}
html.atlas-driving .leaflet-control-zoom,
html.atlas-driving .leaflet-control-scale {
  display: none;
}
html[data-theme="dark"] .leaflet-control-zoom a {
  background: #2a3038 !important;
  color: #e8eaed !important;
}

.btn-police {
  background: #1c2a4a;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 0 #0e1628;
}
#btnPoliceBehind {
  display: block;
  margin: 0;
  flex-shrink: 0;
  position: relative;
  z-index: 0;
}
.btn-police:hover:not(:disabled) {
  background: #24365c;
}
.btn-police--compact {
  min-width: 0;
  padding: 0.4rem 0.7rem;
  font-size: 0.78rem;
}

.cop-fab {
  position: absolute;
  z-index: 4500;
  right: max(16px, env(safe-area-inset-right));
  top: calc(max(16px, env(safe-area-inset-top)) + 196px);
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #1c2a4a;
  color: #fff;
  box-shadow: 0 4px 16px rgba(32, 33, 36, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cop-fab:active {
  transform: scale(0.98);
}

.cop-panel {
  position: absolute;
  inset: 0;
  z-index: 8000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
  background: rgba(16, 20, 28, 0.45);
}
.cop-panel[hidden] {
  display: none;
}
.cop-panel-card {
  width: min(520px, 100%);
  height: min(92dvh, 780px);
  max-height: min(92dvh, 780px);
  overflow: auto;
  background: #fff;
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -8px 32px rgba(32, 33, 36, 0.18);
  padding: 0 16px 18px;
  --sheet-shift: calc(min(92dvh, 780px) - min(72dvh, 640px));
  transform: translate3d(0, var(--sheet-shift), 0);
  transition: transform 0.34s cubic-bezier(0.32, 0.72, 0, 1);
  touch-action: pan-y;
}
.cop-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.cop-kicker,
.cop-detail-kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--wz-muted);
}
.cop-title {
  margin: 8px 0 6px;
  font-family: var(--font-brand);
  font-size: 1.45rem;
  font-weight: 600;
}
.cop-sub {
  margin: 0 0 14px;
  color: var(--wz-muted);
  font-size: 0.92rem;
}
.cop-choice {
  min-height: 52px;
  font-size: 1.05rem;
  font-weight: 700;
  margin-top: 10px;
}
.cop-choice--warn {
  background: #fff3d6;
  color: #8a5a00;
  box-shadow: 0 2px 0 #e0c48a;
}
.cop-disclaimer {
  margin: 14px 0 0;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--wz-muted);
}
.cop-audio-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 6px;
}
.cop-audio-live {
  margin: 0 0 10px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--wz-blue-deep);
}
.cop-detail-body {
  font-size: 0.92rem;
  line-height: 1.4;
}
.cop-detail-body h3 {
  margin: 14px 0 6px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--wz-muted);
}
.cop-detail-body ol,
.cop-detail-body ul {
  margin: 0;
  padding-left: 1.15rem;
}
.cop-detail-body li {
  margin: 0 0 8px;
}
.cop-lead {
  margin: 0 0 8px;
  font-weight: 500;
}
.cop-lead--warn {
  background: #fff3d6;
  border-radius: 12px;
  padding: 10px 12px;
  color: #5c3d00;
}
.cop-dont {
  color: #8a1f1a;
}

.float-win.is-dragging {
  user-select: none;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}
.float-win__head {
  cursor: default;
}
.nav-hud .float-win__head {
  cursor: grab;
}
.float-win__title {
  margin: 0;
  font-family: var(--font-brand);
  font-size: 1.15rem;
  font-weight: 600;
}

.speed-ticker {
  position: absolute;
  z-index: 4600;
  left: max(16px, env(safe-area-inset-left));
  bottom: calc(min(58dvh, 560px) + 16px);
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: #2b3038;
  color: #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  border: 3px solid rgba(255, 255, 255, 0.08);
}
.speed-ticker__value {
  font-family: var(--font-brand);
  font-size: 2.15rem;
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.03em;
}
.speed-ticker__unit {
  margin-top: 2px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  opacity: 0.72;
}
.speed-ticker.is-warn {
  background: #c48a00;
}
.speed-ticker.is-over {
  background: #c62828;
}
@media (min-width: 721px) {
  .speed-ticker {
    bottom: max(28px, env(safe-area-inset-bottom));
    left: max(20px, calc(50vw - 338px));
  }
}
html.atlas-driving .speed-ticker {
  bottom: calc(var(--route-sheet-visible, 148px) + 12px);
  left: max(16px, env(safe-area-inset-left));
}
html.atlas-driving .toast {
  bottom: calc(var(--route-sheet-visible, 148px) + 16px);
}

.recenter-fab {
  position: absolute;
  z-index: 4500;
  right: max(16px, env(safe-area-inset-right));
  top: calc(max(16px, env(safe-area-inset-top)) + 136px);
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--wz-ink);
  box-shadow: 0 4px 16px rgba(32, 33, 36, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.recenter-fab:active {
  transform: scale(0.96);
}
.recenter-fab.is-away {
  background: var(--wz-blue);
  color: #fff;
  box-shadow: 0 0 0 6px rgba(0, 153, 255, 0.18), var(--shadow);
}
.recenter-fab.is-locking {
  animation: recenterPulse 1.1s ease-in-out infinite;
}
@keyframes recenterPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 153, 255, 0.35), var(--shadow); }
  50% { box-shadow: 0 0 0 10px rgba(0, 153, 255, 0), var(--shadow); }
}

.settings-fab {
  position: absolute;
  z-index: 4500;
  right: max(16px, env(safe-area-inset-right));
  top: calc(max(16px, env(safe-area-inset-top)) + 76px);
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--wz-ink);
  box-shadow: 0 4px 16px rgba(32, 33, 36, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
}
.settings-win {
  position: absolute;
  z-index: 7000;
  top: auto;
  right: 0;
  left: 0;
  bottom: 0;
  margin: 0 auto;
  width: min(440px, 100%);
  height: min(92dvh, 780px);
  max-height: min(92dvh, 780px);
  display: flex;
  flex-direction: column;
  background: var(--wz-glass);
  border: 1px solid var(--wz-line);
  border-bottom: 0;
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -8px 32px rgba(32, 33, 36, 0.18);
  overflow: hidden;
  backdrop-filter: blur(18px);
  --sheet-shift: calc(min(92dvh, 780px) - min(72dvh, 620px));
  transform: translate3d(0, var(--sheet-shift), 0);
  transition: transform 0.34s cubic-bezier(0.32, 0.72, 0, 1);
  touch-action: pan-y;
}
.settings-win[hidden] {
  display: none;
}
.settings-win .float-win__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px 12px;
  border-bottom: 1px solid var(--wz-line);
  cursor: grab;
  touch-action: none;
}
.settings-win .float-win__body {
  padding: 12px 14px calc(16px + env(safe-area-inset-bottom));
  overflow: auto;
  overscroll-behavior: contain;
  flex: 1;
  min-height: 0;
}
.settings-sec {
  margin: 0 0 14px;
}
.settings-sec h3 {
  margin: 0 0 8px;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--wz-muted);
}

.knob {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 10px;
  cursor: pointer;
  user-select: none;
}
.knob-copy {
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--wz-ink);
}
.knob-switch {
  position: relative;
  flex-shrink: 0;
}
.knob-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.knob-ui {
  display: block;
  width: 50px;
  height: 30px;
  border-radius: 999px;
  background: #c8ced6;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.12);
  transition: background 0.28s ease, box-shadow 0.28s ease;
  position: relative;
}
.knob-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(0, 0, 0, 0.04);
  transition: transform 0.34s cubic-bezier(0.34, 1.45, 0.64, 1);
}
.knob-input:checked + .knob-ui {
  background: var(--wz-blue);
  box-shadow: inset 0 1px 3px rgba(0, 80, 140, 0.18), 0 0 0 4px rgba(0, 153, 255, 0.14);
}
.knob-input:checked + .knob-ui .knob-thumb {
  transform: translateX(20px);
}
.knob-input:active + .knob-ui .knob-thumb {
  transform: scale(0.92);
}
.knob-input:checked:active + .knob-ui .knob-thumb {
  transform: translateX(20px) scale(0.92);
}
.knob-input:focus-visible + .knob-ui {
  outline: 2px solid var(--wz-blue);
  outline-offset: 3px;
}
html[data-theme="dark"] .knob-ui {
  background: #3a414c;
}

.settings-slider {
  margin: 10px 0 14px;
  padding: 10px 12px 12px;
  border-radius: 14px;
  background: var(--wz-soft);
}
.settings-slider-title {
  display: block;
  font-size: 0.88rem;
  font-weight: 500;
  margin: 0 0 10px;
}
.settings-slider input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  margin: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--wz-blue) var(--avoid-pct, 0%), var(--wz-line) var(--avoid-pct, 0%));
  outline: none;
  cursor: pointer;
}
.settings-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--wz-blue);
  box-shadow: 0 2px 8px rgba(0, 153, 255, 0.35);
  transition: transform 0.18s cubic-bezier(0.34, 1.4, 0.64, 1), box-shadow 0.18s ease;
}
.settings-slider input[type="range"]::-webkit-slider-thumb:hover,
.settings-slider input[type="range"]::-webkit-slider-thumb:active {
  transform: scale(1.12);
  box-shadow: 0 0 0 6px rgba(0, 153, 255, 0.16), 0 2px 8px rgba(0, 153, 255, 0.4);
}
.settings-slider input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--wz-blue);
  box-shadow: 0 2px 8px rgba(0, 153, 255, 0.35);
}
.settings-slider-ticks {
  display: flex;
  justify-content: space-between;
  margin: 4px 0 0;
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--wz-muted);
  gap: 2px;
}
.settings-slider-ticks span:last-child {
  color: #ff6a00;
}
.settings-slider input[type="range"].is-insanity {
  background: linear-gradient(90deg, #ff6a00 var(--avoid-pct, 0%), var(--wz-line) var(--avoid-pct, 0%));
}
.settings-slider input[type="range"].is-insanity::-webkit-slider-thumb {
  border-color: #ff6a00;
  box-shadow: 0 2px 8px rgba(255, 106, 0, 0.35);
}
.settings-slider input[type="range"].is-insanity::-moz-range-thumb {
  border-color: #ff6a00;
}
.settings-slider-hint {
  margin: 6px 0 0;
}
.settings-slider--plain .settings-slider-ticks span:last-child {
  color: var(--wz-muted);
}

.alert-stack {
  position: absolute;
  z-index: 4600;
  left: 50%;
  top: 16px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(340px, calc(100vw - 24px));
  pointer-events: none;
}
.alert-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  background: #8b1e1a;
  color: #fff;
  box-shadow: 0 8px 28px rgba(139, 30, 26, 0.35);
  animation: flock-pop 0.45s cubic-bezier(0.2, 0.9, 0.2, 1);
}
.alert-card-pulse {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffd2cf;
  animation: flock-pulse 1.1s ease-out infinite;
  flex-shrink: 0;
}
.alert-card-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.82rem;
  line-height: 1.25;
}
.alert-card-copy strong {
  font-family: var(--font-brand);
  font-size: 0.95rem;
}

.atlas-hazard-canvas {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
}
.hazard-approach-stack {
  position: absolute;
  left: 100%;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  z-index: 0;
  pointer-events: none;
}
.hazard-approach {
  position: relative;
  left: auto;
  top: auto;
  bottom: auto;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 108px;
  max-width: min(148px, 34vw);
  padding: 8px 12px 8px 16px;
  border-radius: 0 16px 16px 0;
  background: var(--wz-glass);
  border: 1px solid var(--wz-line);
  border-left: none;
  box-shadow: 8px 6px 20px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(14px);
  text-align: left;
  pointer-events: none;
  transform: translateX(-16px);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.36s cubic-bezier(0.22, 1, 0.32, 1), opacity 0.28s ease, visibility 0.36s;
}
.hazard-approach.is-out {
  transform: translateX(8px);
  opacity: 1;
  visibility: visible;
}
.hazard-approach[hidden] {
  display: none !important;
}
.hazard-approach[data-kind="alpr"] {
  background: rgba(255, 236, 234, 0.96);
  border-color: #ffb3ad;
}
.hazard-approach[data-kind="trap"] {
  background: rgba(255, 248, 220, 0.96);
}
.hazard-approach[data-kind="light"] {
  background: rgba(232, 245, 255, 0.96);
}
.hazard-approach[data-kind="stop"] {
  background: rgba(255, 236, 236, 0.96);
}
.hazard-approach__kind {
  margin: 0;
  font-weight: 700;
  font-size: 0.78rem;
  line-height: 1.15;
}
.hazard-approach__dist {
  margin: 2px 0 0;
  font-size: 0.72rem;
  color: var(--wz-muted);
}
.atlas-hazard-popup .leaflet-popup-content-wrapper {
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.atlas-hazard-pop strong {
  font-size: 0.95rem;
}
.atlas-ctrl-marker.leaflet-div-icon {
  background: transparent !important;
  border: none !important;
  pointer-events: auto !important;
}
.atlas-light-icon,
.atlas-stop-icon {
  width: 18px;
  height: 28px;
  border-radius: 5px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}
.atlas-light-icon {
  background: #1b1f24;
  padding: 3px 4px;
}
.atlas-light-icon::before {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  margin: 2px auto 0;
  border-radius: 50%;
  background: #ff4d4d;
  box-shadow: 0 8px 0 #ffd166, 0 16px 0 #2ecc71;
}
.atlas-stop-icon {
  width: 22px;
  height: 22px;
  background: #d32f2f;
  color: #fff;
  clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  justify-content: center;
}
.atlas-trap-marker.leaflet-div-icon {
  background: transparent !important;
  border: none !important;
}
.atlas-trap-icon {
  width: 28px;
  height: 28px;
  background: #f5c400;
  color: #1a1200;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}
.atlas-trap-icon__badge {
  font-size: 7px;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
}

html[data-theme="dark"] .nav-hud,
html[data-theme="dark"] .cop-panel-card,
html[data-theme="dark"] .nav-county-box {
  background: var(--wz-glass);
  color: var(--wz-ink);
}
html[data-theme="dark"] .nav-risk-scores li {
  background: rgba(255, 255, 255, 0.06);
}
html[data-theme="dark"] .cop-choice--warn,
html[data-theme="dark"] .cop-lead--warn {
  background: #3a2d12;
  color: #f3d59a;
}
html[data-theme="dark"] input,
html[data-theme="dark"] .nav-addr-suggestions {
  background: var(--wz-soft);
  color: var(--wz-ink);
  border-color: var(--wz-line);
}

@media (max-width: 720px) {
  .turn-banner {
    min-width: min(220px, calc(100vw - 132px));
    max-width: min(300px, calc(100vw - 132px));
  }
  .hazard-approach {
    max-width: min(120px, 30vw);
    transform: translateX(-14px);
  }
  .hazard-approach.is-out {
    transform: translateX(6px);
  }
  .hazard-approach-stack {
    gap: 8px;
  }
  .nav-hud {
    width: 100%;
  }
  .route-card,
  .settings-win {
    width: 100%;
  }
  .speed-ticker {
    left: max(16px, env(safe-area-inset-left));
    bottom: calc(var(--route-sheet-visible, 52dvh) + 12px);
  }
  .toast {
    bottom: calc(var(--route-sheet-visible, 52dvh) + 16px);
  }
  .cop-panel {
    align-items: flex-end;
    padding: 0;
  }
  .cop-panel-card {
    max-height: 92dvh;
    border-radius: 28px 28px 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .turn-banner {
    animation: none;
  }
  .hazard-approach {
    transition: opacity 0.01s linear, visibility 0.01s linear;
  }
}

.idiot-fab {
  display: none;
  position: absolute;
  z-index: 4500;
  right: max(16px, env(safe-area-inset-right));
  top: calc(max(16px, env(safe-area-inset-top)) + 256px);
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #ff6a00;
  color: #fff;
  box-shadow: 0 4px 16px rgba(32, 33, 36, 0.22);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.idiot-fab:active {
  transform: scale(0.96);
}
html.atlas-driving .idiot-fab {
  display: flex;
}

html[data-theme="dark"] .recenter-fab,
html[data-theme="dark"] .settings-fab,
html[data-theme="dark"] .account-fab {
  background: #2a3038;
  color: #e8eaed;
}
html[data-theme="dark"] .coord-grid input,
html[data-theme="dark"] .coord-grid select,
html[data-theme="dark"] .plate-lookup input,
html[data-theme="dark"] .plate-lookup select,
html[data-theme="dark"] .idiot-win input,
html[data-theme="dark"] .idiot-win select,
html[data-theme="dark"] .idiot-win textarea {
  background: #1c2128;
  border-color: #3d4450;
  color: #e8eaed;
}

.idiot-win .float-win__head {
  align-items: flex-start;
}
.idiot-win input[type="text"],
.idiot-win select,
.idiot-win textarea {
  border: 1px solid var(--wz-line);
  border-radius: 12px;
  padding: 0.5rem 0.7rem;
  font: inherit;
  font-size: 0.9rem;
  background: #fff;
  color: inherit;
  width: 100%;
  box-sizing: border-box;
}
.idiot-kicker {
  margin: 0 0 2px;
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--wz-muted);
  font-weight: 700;
}
.idiot-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin: 0 0 14px;
  border-radius: 999px;
  background: var(--wz-soft);
  border: 1px solid var(--wz-line);
}
.idiot-tab {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 0.8rem;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--wz-muted);
  background: transparent;
  cursor: pointer;
}
.idiot-tab.is-on {
  background: #fff;
  color: var(--wz-ink);
  box-shadow: 0 2px 8px rgba(32, 33, 36, 0.12);
}
.idiot-car-grid {
  grid-template-columns: 1fr 1fr 1fr;
}
.idiot-win textarea {
  border: 1px solid var(--wz-line);
  border-radius: 12px;
  padding: 0.55rem 0.7rem;
  font: inherit;
  font-size: 0.9rem;
  background: #fff;
  color: inherit;
  min-height: 96px;
  resize: vertical;
}
.idiot-win .plate-lookup-name input,
.idiot-win .plate-lookup-row input,
.idiot-win .plate-lookup-row select,
.idiot-win .coord-grid input {
  min-height: 42px;
  border-radius: 12px;
  font-size: 0.9rem;
}
.idiot-photo-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-top: 10px;
}
.idiot-photo-btn input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.idiot-thumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0 4px;
}
.idiot-thumbs img,
.idiot-review__photos img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--wz-line);
  background: var(--wz-soft);
}
.idiot-board {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 12px;
}
.idiot-sec-label {
  margin: 6px 2px 0;
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--wz-muted);
  font-weight: 700;
}
.idiot-empty {
  margin: 18px 4px;
  color: var(--wz-muted);
  font-size: 0.9rem;
}
.idiot-card {
  border: 1px solid var(--wz-line);
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(32, 33, 36, 0.06);
}
.idiot-card__hit {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 12px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.idiot-card.is-open .idiot-card__hit {
  border-bottom: 1px solid var(--wz-line);
}
.idiot-rank {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: 0.82rem;
  background: var(--wz-soft);
  color: var(--wz-muted);
}
.idiot-rank--1 {
  background: #ffd54a;
  color: #5a3b00;
}
.idiot-rank--2 {
  background: #d7dde5;
  color: #2b3138;
}
.idiot-rank--3 {
  background: #e0b08a;
  color: #4a2a12;
}
.idiot-tagwrap {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  flex: 0 0 auto;
}
.idiot-tag {
  flex: 0 0 auto;
  min-width: 5.6rem;
  padding: 5px 8px 4px;
  border: 2px solid #1c2a4a;
  border-radius: 7px;
  background: linear-gradient(#f7f3e8, #efe6c9);
  color: #1c2a4a;
  font-family: var(--font-brand);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  line-height: 1.05;
}
.idiot-tag small {
  display: block;
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  opacity: 0.72;
}
.idiot-card__meta {
  min-width: 0;
  flex: 1;
}
.idiot-card__meta strong {
  display: block;
  font-size: 0.92rem;
  line-height: 1.2;
}
.idiot-card__meta span {
  display: block;
  margin-top: 2px;
  color: var(--wz-muted);
  font-size: 0.78rem;
}
.idiot-count {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 0.28rem 0.55rem;
  background: rgba(0, 153, 255, 0.14);
  color: var(--wz-blue-deep);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}
.idiot-count.is-hot {
  background: #ff6a00;
  color: #fff;
}
.idiot-temp {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #ffd54a;
  color: #5a3b00;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  vertical-align: middle;
}
.idiot-thumb {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--wz-line);
}
.idiot-reviews {
  display: none;
  padding: 4px 12px 12px;
}
.idiot-card.is-open .idiot-reviews {
  display: block;
}
.idiot-review {
  padding: 10px 0;
  border-top: 1px solid var(--wz-line);
}
.idiot-review:first-child {
  border-top: 0;
}
.idiot-review time {
  display: block;
  font-size: 0.68rem;
  color: var(--wz-muted);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.idiot-review p {
  margin: 0 0 6px;
  font-size: 0.88rem;
  line-height: 1.35;
}
.idiot-review__car {
  margin: 0 0 6px;
  color: var(--wz-muted);
  font-size: 0.78rem;
}
.idiot-review__photos {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

html[data-theme="dark"] .idiot-tab.is-on,
html[data-theme="dark"] .idiot-card {
  background: #2a3038;
  color: #e8eaed;
}
html[data-theme="dark"] .idiot-tag {
  background: linear-gradient(#efe6c9, #d9cc9a);
  color: #1c2a4a;
}
html[data-theme="dark"] .idiot-win textarea {
  background: #1c2128;
}

@media (max-width: 420px) {
  .idiot-car-grid {
    grid-template-columns: 1fr;
  }
}

.account-fab {
  position: absolute;
  z-index: 4500;
  right: max(16px, env(safe-area-inset-right));
  top: max(16px, env(safe-area-inset-top));
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--wz-ink);
  box-shadow: 0 4px 16px rgba(32, 33, 36, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
}
.account-fab:active {
  transform: scale(0.96);
}
.account-fab__face,
.account-fab__face img {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  object-fit: cover;
}
.account-fab.is-on {
  box-shadow: 0 0 0 3px rgba(0, 153, 255, 0.35), 0 4px 16px rgba(32, 33, 36, 0.18);
}

.account-win label {
  display: block;
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--wz-muted);
}
.account-win input[type="text"],
.account-win input[type="password"],
.account-win textarea,
.account-modal input[type="text"],
.account-modal textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  border: 1px solid var(--wz-line);
  border-radius: 12px;
  padding: 0.62rem 0.75rem;
  font: inherit;
  font-size: 1rem;
  background: #fff;
  color: inherit;
  box-sizing: border-box;
}
.btn-oauth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 700;
  margin-bottom: 8px;
}
.btn-oauth--google {
  background: #fff;
  color: #202124;
  border: 1px solid #dadce0;
}
.btn-oauth--google:hover:not(:disabled) {
  background: #f8f9fa;
}
.btn-oauth--apple {
  background: #111;
  color: #fff;
}
.btn-oauth--apple:hover:not(:disabled) {
  background: #222;
}
.account-or {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 12px;
  color: var(--wz-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.account-or::before,
.account-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--wz-line);
}
.account-actions {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}
.account-me {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 0 0 14px;
}
.account-me__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  background: #e8eaed;
}
.account-me__name {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
}
.account-gate {
  padding: 8px 2px 16px;
}
.account-gate__title {
  margin: 0 0 6px;
  font-size: 1.15rem;
  font-weight: 800;
}
.account-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(20, 24, 28, 0.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
}
.account-modal[hidden] {
  display: none;
}
.account-modal__card {
  width: min(420px, 100%);
  background: var(--wz-glass, #fff);
  border-radius: 24px;
  padding: 22px 18px 18px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}
.account-modal__card h2 {
  margin: 0 0 6px;
  font-size: 1.35rem;
}
.account-modal label {
  display: block;
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--wz-muted);
}
.account-avatar-pick {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.account-avatar-pick input {
  display: none;
}
.account-avatar-pick__preview {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #e8eaed;
  color: var(--wz-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
}
.account-avatar-pick__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.idiot-author {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  font-size: 0.82rem;
  font-weight: 800;
}
.idiot-author img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}
.idiot-replies {
  margin: 8px 0 0;
  padding: 8px 0 0;
  border-top: 1px solid var(--wz-line);
}
.idiot-reply {
  margin: 0 0 8px;
}
.idiot-reply p {
  margin: 2px 0 0;
  font-size: 0.86rem;
}
.idiot-reply-form {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}
.idiot-reply-form textarea {
  min-height: 64px;
}
html[data-theme="dark"] .account-win input,
html[data-theme="dark"] .account-win textarea,
html[data-theme="dark"] .account-modal input,
html[data-theme="dark"] .account-modal textarea {
  background: #1c2128;
  border-color: #3d4450;
  color: #e8eaed;
}
html[data-theme="dark"] .account-modal__card {
  background: #1a1f26;
}
html[data-theme="dark"] .btn-oauth--google {
  background: #2a3038;
  color: #e8eaed;
  border-color: #3d4450;
}
@media (min-width: 720px) {
  .account-modal {
    align-items: center;
  }
}
