:root {
  color-scheme: light only;
  --blue: #0b5cff;
  --blue-dark: #0847c7;
  --ink: #14202b;
  --muted: #657583;
  --panel: rgba(255, 255, 255, 0.97);
  --border: rgba(20, 32, 43, 0.12);
  --shadow: 0 12px 34px rgba(20, 32, 43, 0.2);
  --green: #16845b;
  --orange: #e36b18;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: #dce8ef; }
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible { outline: 3px solid rgba(11, 92, 255, 0.24); outline-offset: 2px; }

.app-shell { position: relative; width: 100%; height: 100vh; height: 100dvh; min-height: -webkit-fill-available; min-height: 520px; overflow: hidden; background: #dce8ef; }
.map { position: absolute; inset: 0; overflow: hidden; touch-action: none; background: #e9f1f5; user-select: none; }
.tile-pane, .route-svg, .marker-pane { position: absolute; inset: 0; width: 100%; height: 100%; }
.tile-pane { overflow: hidden; }
.map.navigating.heading-up .tile-pane { overflow: visible; }
.map.navigating.heading-up .route-svg { overflow: visible; }
.map-tile { position: absolute; width: 256px; height: 256px; max-width: none; user-select: none; pointer-events: none; }
.route-svg { overflow: visible; pointer-events: none; }
.marker-pane { pointer-events: none; }
.map-marker { position: absolute; transform: translate(-50%, -50%); display: grid; place-items: center; pointer-events: auto; }
.endpoint-marker { width: 32px; height: 32px; border-radius: 50%; color: white; font-size: 13px; font-weight: 900; box-shadow: 0 4px 12px rgba(0,0,0,.25); border: 3px solid white; }
.endpoint-marker.origin { background: #273746; }
.endpoint-marker.destination { background: #d33b42; }
.shape-marker { width: 20px; height: 20px; border: 4px solid white; border-radius: 50%; background: var(--blue); box-shadow: 0 2px 8px rgba(0,0,0,.28); }
.shape-marker.official { background: var(--green); }
.truck-marker { width: 38px; height: 38px; border-radius: 50%; background: white; border: 3px solid var(--blue); box-shadow: 0 4px 16px rgba(0,0,0,.25); font-size: 20px; }

.user-location-accuracy {
  position: absolute;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(11, 92, 255, 0.14);
  border: 1px solid rgba(11, 92, 255, 0.28);
  pointer-events: none;
}
.user-location-dot {
  position: absolute;
  width: 18px;
  height: 18px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--blue);
  border: 3px solid white;
  box-shadow: 0 2px 10px rgba(11, 92, 255, 0.45);
  pointer-events: none;
}
.user-location-dot.has-heading::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -7px;
  width: 0;
  height: 0;
  transform: translateX(-50%) rotate(var(--heading, 0deg));
  transform-origin: 50% 16px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 9px solid var(--blue);
}

.tile-pane, .route-svg, .marker-pane { pointer-events: none; }

.route-line { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.route-shadow { stroke: rgba(255,255,255,.96); stroke-width: 13; }
.route-main { stroke: var(--blue); stroke-width: 7; }
.route-main.override { stroke: var(--orange); }
.route-alt { stroke: rgba(52,72,88,.5); stroke-width: 5; }
.route-preview-shadow { stroke: white; stroke-width: 15; opacity: .92; }
.route-preview { stroke: #7757ff; stroke-width: 8; stroke-dasharray: 12 9; }
.route-hit { stroke: transparent; stroke-width: 44; pointer-events: stroke; }
.nyc-truck-route { stroke: rgba(22,132,91,.65); stroke-width: 5; stroke-dasharray: 10 7; }
.editing .route-main { stroke-width: 9; filter: drop-shadow(0 0 5px rgba(11,92,255,.4)); }

.map.navigating .truck-marker {
  width: 42px;
  height: 42px;
  font-size: 22px;
  border-width: 4px;
  box-shadow: 0 4px 18px rgba(11, 92, 255, 0.45);
}
.map.navigating .truck-marker.has-heading {
  transform: translate(-50%, -50%) rotate(var(--heading, 0deg));
}
.map.navigating .truck-marker.heading-up-marker,
.map.navigating .truck-marker.heading-up-marker.has-heading {
  transform: translate(-50%, -50%);
}
.map.navigating .truck-marker.has-heading::after,
.map.navigating .truck-marker.heading-up-marker::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -10px;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 12px solid var(--blue);
}

.turn-hint-marker {
  width: 30px;
  height: 30px;
  border: 3px solid white;
  border-radius: 50%;
  background: #ffb020;
  color: white;
  box-shadow: 0 0 0 0 rgba(255,176,32,.55);
  font-size: 14px;
  font-weight: 900;
  animation: turn-hint-pulse 1.8s ease infinite;
  cursor: pointer;
  pointer-events: auto;
}
.turn-hint-marker.selected {
  background: var(--blue);
  animation: turn-anchor-pulse 1.4s ease infinite;
  box-shadow: 0 0 0 4px rgba(11,92,255,.28);
}
.turn-anchor-marker {
  width: 22px;
  height: 22px;
  border: 4px solid white;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 6px rgba(11,92,255,.28);
  pointer-events: none;
  animation: turn-anchor-pulse 1.4s ease infinite;
}
@keyframes turn-anchor-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(11,92,255,.35); }
  50% { box-shadow: 0 0 0 10px rgba(11,92,255,0); }
}
@keyframes turn-hint-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,176,32,.55); transform: translate(-50%, -50%) scale(1); }
  50% { box-shadow: 0 0 0 10px rgba(255,176,32,0); transform: translate(-50%, -50%) scale(1.06); }
}

.search-card { position: absolute; z-index: 20; top: max(12px, env(safe-area-inset-top)); left: 12px; right: 12px; max-width: 440px; padding: 12px; background: var(--panel); border: 1px solid rgba(255,255,255,.7); border-radius: 20px; box-shadow: var(--shadow); backdrop-filter: blur(16px); }
.brand-row { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; background: var(--blue); color: white; font-weight: 900; letter-spacing: -.03em; }
.brand-copy { min-width: 0; display: flex; flex-direction: column; line-height: 1.1; }
.brand-copy strong { font-size: 17px; }
.brand-copy span { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 3px; color: var(--muted); font-size: 11px; }
.truck-chip { margin-left: auto; min-height: 36px; border: 0; border-radius: 12px; padding: 0 10px; background: #eef4ff; color: var(--blue-dark); font-size: 12px; font-weight: 800; }

.address-stack { position: relative; border: 1px solid var(--border); border-radius: 14px; background: white; }
.address-row { position: relative; display: flex; align-items: center; min-height: 46px; padding: 0 11px; }
.address-row input { width: 100%; min-width: 0; border: 0; background: transparent; color: var(--ink); font-size: 15px; font-weight: 650; outline: 0; }
.address-row input::placeholder { color: #8c99a5; font-weight: 550; }
.address-dot { width: 11px; height: 11px; flex: 0 0 auto; margin-right: 11px; border-radius: 50%; border: 3px solid white; box-shadow: 0 0 0 2px currentColor; }
.address-dot.pickup { color: #273746; background: #273746; }
.address-dot.destination { color: #d33b42; background: #d33b42; }
.address-divider { height: 1px; margin: 0 12px 0 34px; background: var(--border); }
.suggestions { position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 5px); max-height: 230px; overflow-y: auto; padding: 6px; border: 1px solid var(--border); border-radius: 14px; background: white; box-shadow: var(--shadow); }
.suggestion { width: 100%; display: block; border: 0; background: transparent; padding: 10px; border-radius: 10px; text-align: left; color: var(--ink); }
.suggestion:hover, .suggestion:active { background: #eef4ff; }
.suggestion strong, .suggestion span { display: block; }
.suggestion span { margin-top: 2px; color: var(--muted); font-size: 11px; }
.search-actions { display: grid; grid-template-columns: 90px 1fr; gap: 8px; margin-top: 10px; }

.primary, .light-button, .action-button, .danger-button, .close-sheet { border: 0; border-radius: 13px; min-height: 44px; padding: 0 15px; font-weight: 850; cursor: pointer; }
.primary { background: var(--blue); color: white; box-shadow: 0 5px 14px rgba(11,92,255,.24); }
.primary:active { background: var(--blue-dark); transform: translateY(1px); }
.primary.compact, .light-button.compact { min-height: 38px; padding: 0 13px; }
.light-button { background: #edf1f4; color: var(--ink); }
.light-button:disabled { opacity: .45; }
.action-button { background: white; color: var(--ink); border: 1px solid var(--border); }
.danger-button { background: #9b2c35; color: white; }
.full { width: 100%; }

.route-card { position: absolute; z-index: 22; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); max-width: 430px; padding: 8px 14px 14px; border-radius: 22px; background: var(--panel); border: 1px solid rgba(255,255,255,.72); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.sheet-handle { width: 44px; height: 5px; margin: 0 auto 9px; border-radius: 999px; background: #c8d0d6; }
.route-headline { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.route-corridor { font-size: 13px; font-weight: 800; letter-spacing: -.01em; color: var(--blue-dark); margin-bottom: 2px; }
.route-time { color: var(--ink); font-size: 27px; line-height: 1; font-weight: 950; letter-spacing: -.03em; }
.route-distance { margin-top: 4px; color: var(--muted); font-size: 13px; font-weight: 650; }
.mode-badge { max-width: 150px; padding: 7px 10px; border-radius: 999px; background: #e9f2ff; color: var(--blue-dark); font-size: 11px; font-weight: 850; text-align: center; }
.mode-badge.override { background: #fff0e5; color: #a34708; }
.corridor-options-title { margin-top: 12px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.corridor-options { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.corridor-options::-webkit-scrollbar { display: none; }
.corridor-option { flex: 0 0 auto; min-width: 148px; max-width: 210px; min-height: 58px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 16px; background: white; color: var(--ink); text-align: left; display: grid; gap: 3px; }
.corridor-option strong { font-size: 13px; line-height: 1.25; font-weight: 800; color: var(--ink); }
.corridor-option span { font-size: 12px; color: var(--muted); font-weight: 650; }
.corridor-option.selected { border-color: var(--blue); background: #edf4ff; box-shadow: inset 0 0 0 1px rgba(11,92,255,.08); }
.corridor-option.selected strong { color: var(--blue-dark); }
.alternative-routes { display: flex; gap: 7px; margin-top: 11px; overflow-x: auto; scrollbar-width: none; }
.alternative-routes::-webkit-scrollbar { display: none; }
.alt-route { flex: 0 0 auto; min-height: 34px; padding: 0 11px; border: 1px solid var(--border); border-radius: 999px; background: white; color: var(--ink); font-size: 12px; font-weight: 750; }
.alt-route.selected { border-color: var(--blue); background: #edf4ff; color: var(--blue-dark); }
.main-actions { display: grid; grid-template-columns: 1.35fr 1fr .8fr; gap: 8px; margin-top: 12px; }
.start-button { min-height: 50px; font-size: 17px; }

.map-buttons { position: absolute; z-index: 15; right: 12px; top: calc(max(12px, env(safe-area-inset-top)) + 185px); display: grid; gap: 8px; touch-action: auto; pointer-events: auto; }
.round-button { width: 42px; height: 42px; border: 0; border-radius: 50%; background: rgba(255,255,255,.96); color: var(--ink); font-size: 22px; font-weight: 850; box-shadow: 0 5px 16px rgba(20,32,43,.18); }

.edit-hud { position: absolute; z-index: 30; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); max-width: 440px; padding: 14px; border-radius: 22px; background: rgba(255,255,255,.97); color: var(--ink); border: 1px solid rgba(255,255,255,.85); box-shadow: var(--shadow); backdrop-filter: blur(18px); touch-action: auto; pointer-events: auto; }
.edit-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.edit-head strong { display: block; font-size: 18px; line-height: 1.1; }
.edit-status { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.edit-done { flex: 0 0 auto; min-width: 72px; }
.edit-steps { display: grid; gap: 8px; margin-bottom: 10px; }
.edit-step { display: grid; grid-template-columns: 34px 1fr; gap: 10px; align-items: center; padding: 10px 11px; border: 1px solid var(--border); border-radius: 14px; background: #f8fbfd; opacity: .72; transition: opacity .2s, border-color .2s, background .2s; }
.edit-step.active { opacity: 1; border-color: rgba(11,92,255,.35); background: #edf4ff; }
.edit-step.done { opacity: 1; border-color: rgba(22,132,91,.35); background: #eefaf3; }
.edit-step-num { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: white; color: var(--blue-dark); font-size: 14px; font-weight: 900; box-shadow: inset 0 0 0 2px rgba(11,92,255,.18); }
.edit-step.done .edit-step-num { color: #137d58; box-shadow: inset 0 0 0 2px rgba(19,125,88,.25); }
.edit-step strong { display: block; font-size: 13px; line-height: 1.2; }
.edit-step span { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.edit-shortcut { margin: 0 0 12px; padding: 9px 11px; border-radius: 12px; background: #eef4ff; color: #234a86; font-size: 11px; line-height: 1.35; }
.street-choices { display: grid; gap: 8px; margin-bottom: 12px; max-height: 220px; overflow-y: auto; }
.street-choice {
  width: 100%;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: white;
  text-align: left;
  cursor: pointer;
}
.street-choice:active { transform: translateY(1px); }
.street-choice .choice-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 900;
}
.street-choice.truck .choice-icon { background: #e7f7ef; color: #137d58; }
.street-choice.route .choice-icon { background: #eef4ff; color: var(--blue-dark); }
.street-choice strong { display: block; font-size: 14px; line-height: 1.25; color: var(--ink); }
.street-choice span { display: block; margin-top: 2px; font-size: 11px; line-height: 1.3; color: var(--muted); }
.street-choice em { font-style: normal; font-size: 11px; font-weight: 800; color: var(--muted); white-space: nowrap; }
.map.editing.pick-street { cursor: default; }
.edit-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.edit-coach { position: absolute; z-index: 29; top: max(12px, env(safe-area-inset-top)); left: 12px; right: 12px; max-width: 440px; padding: 12px 14px; border-radius: 18px; background: rgba(18, 62, 125, .94); color: white; box-shadow: var(--shadow); backdrop-filter: blur(12px); animation: coach-in .35s ease; touch-action: auto; pointer-events: auto; }
.edit-coach-title { font-size: 15px; font-weight: 900; margin-bottom: 6px; }
.edit-coach-steps { display: grid; gap: 4px; color: rgba(255,255,255,.86); font-size: 12px; line-height: 1.35; }
.edit-coach-step { display: flex; align-items: flex-start; gap: 8px; }
.edit-coach-step i { flex: 0 0 auto; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.18); font-style: normal; font-size: 10px; font-weight: 900; }
@keyframes coach-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.editing::after { content: ''; position: absolute; inset: 0; background: rgba(15,28,40,.08); pointer-events: none; z-index: 4; }

.navigation-banner { position: absolute; z-index: 28; top: max(12px, env(safe-area-inset-top)); left: 12px; right: 12px; max-width: 440px; display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 18px; background: #123e7d; color: white; box-shadow: var(--shadow); }
.next-instruction { flex: 1; font-size: 17px; font-weight: 850; }

.toast { position: absolute; z-index: 70; left: 50%; bottom: calc(max(12px, env(safe-area-inset-bottom)) + 175px); transform: translateX(-50%); width: min(90%, 390px); padding: 11px 14px; border-radius: 14px; background: rgba(20,32,43,.94); color: white; font-size: 13px; font-weight: 650; text-align: center; box-shadow: var(--shadow); white-space: pre-line; }
.map-attribution { position: absolute; z-index: 8; right: 5px; bottom: 4px; padding: 2px 4px; background: rgba(255,255,255,.75); color: #5d6b75; font-size: 8px; pointer-events: none; }

.boot-error {
  position: absolute;
  z-index: 60;
  left: 12px;
  right: 12px;
  top: calc(max(12px, env(safe-area-inset-top)) + 120px);
  max-width: 440px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(125, 24, 24, 0.94);
  color: white;
  box-shadow: var(--shadow);
  display: grid;
  gap: 8px;
  font-size: 13px;
}
.boot-error button {
  justify-self: start;
  border: 0;
  border-radius: 10px;
  padding: 8px 12px;
  background: white;
  color: #7d1818;
  font-weight: 700;
  cursor: pointer;
}

.busy-overlay { position: absolute; z-index: 100; inset: 0; display: grid; place-content: center; justify-items: center; gap: 9px; padding: 30px; background: rgba(245,249,252,.86); backdrop-filter: blur(6px); color: var(--ink); text-align: center; }
.busy-overlay span { color: var(--muted); font-size: 13px; }
.spinner { width: 42px; height: 42px; border-radius: 50%; border: 4px solid #d5e3f5; border-top-color: var(--blue); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.sheet-backdrop { position: absolute; z-index: 80; inset: 0; background: rgba(10,20,28,.38); backdrop-filter: blur(2px); }
.bottom-sheet { position: absolute; z-index: 90; left: 0; right: 0; bottom: 0; max-height: min(82dvh, 720px); overflow-y: auto; padding: 9px 18px calc(20px + env(safe-area-inset-bottom)); border-radius: 24px 24px 0 0; background: white; box-shadow: 0 -14px 40px rgba(20,32,43,.25); }
.sheet-title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sheet-title-row h2 { margin: 0; font-size: 22px; }
.close-sheet { min-height: 38px; background: #edf1f4; color: var(--ink); }
.sheet-help { margin: 10px 0 16px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.truck-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.truck-grid > label { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid var(--border); border-radius: 14px; }
.truck-grid > label > span { color: var(--muted); font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.unit-pair { display: flex; align-items: center; gap: 5px; }
.unit-pair input { min-width: 0; width: 100%; height: 40px; border: 0; border-radius: 9px; background: #f2f5f7; color: var(--ink); font-weight: 800; text-align: center; }
.unit-pair small { color: var(--muted); }
.toggle-row { display: flex; align-items: center; gap: 10px; margin: 14px 0; padding: 12px; border: 1px solid var(--border); border-radius: 14px; font-weight: 750; }
.toggle-row input { width: 20px; height: 20px; }
.steps-list { display: grid; gap: 8px; margin-top: 12px; }
.step-row { display: grid; grid-template-columns: 38px 1fr; gap: 10px; align-items: start; padding: 10px; border: 1px solid var(--border); border-radius: 14px; background: white; text-align: left; }
.step-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: #eef4ff; color: var(--blue-dark); font-weight: 900; }
.step-copy strong { display: block; color: var(--ink); font-size: 14px; line-height: 1.3; }
.step-copy span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.decision-warning { margin: 12px 0; padding: 12px; border-radius: 14px; background: #fff0e5; color: #823c0c; font-size: 13px; line-height: 1.4; font-weight: 650; }
.decision-sheet button + button { margin-top: 9px; }

[hidden] { display: none !important; }

@media (max-width: 699px) {
  .search-card {
    left: 0;
    right: 0;
    max-width: none;
    border-radius: 0 0 18px 18px;
    top: 0;
    padding-top: max(10px, env(safe-area-inset-top));
  }
  .brand-copy span { display: none; }
  .map-buttons {
    top: auto;
    bottom: max(22px, env(safe-area-inset-bottom));
    right: 12px;
    z-index: 18;
  }
}

@media (min-width: 700px) {
  .search-card { left: 18px; top: 18px; }
  .route-card, .edit-hud, .edit-coach, .navigation-banner { left: 18px; right: auto; width: 430px; }
  .route-card, .edit-hud { bottom: 18px; }
  .map-buttons { right: 18px; top: 18px; }
  .bottom-sheet { left: 50%; right: auto; width: 460px; transform: translateX(-50%); border-radius: 24px 24px 0 0; }
  .toast { bottom: 200px; }
}

@media (max-height: 690px) and (max-width: 699px) {
  .brand-row { margin-bottom: 7px; }
  .search-card { padding: 9px; }
  .address-row { min-height: 41px; }
  .search-actions { margin-top: 7px; }
  .route-card { padding-bottom: 10px; }
  .main-actions { margin-top: 8px; }
}

/* v3.1: route bends are directional handles, never stop pins. */
.turn-marker {
  width: 24px;
  height: 24px;
  border: 3px solid white;
  border-radius: 50%;
  background: var(--blue);
  color: white;
  box-shadow: 0 3px 10px rgba(0,0,0,.28);
  font-size: 12px;
  font-weight: 900;
  transform: translate(-50%, -50%) rotate(var(--turn-course, 0deg));
}
.turn-marker.official { background: var(--green); }

/* Belt-and-suspenders rule: bend handles are editor-only and never appear
   like intermediate stops during normal navigation. */
.map:not(.editing) .turn-marker { display: none !important; }

.nyc-truck-through {
  stroke: rgba(18, 151, 92, .74);
  stroke-width: 5.5;
}
.nyc-truck-local {
  stroke: rgba(18, 151, 92, .72);
  stroke-width: 5;
  stroke-dasharray: 10 7;
}
.nyc-truck-designated {
  stroke: rgba(18, 151, 92, .62);
  stroke-width: 4.5;
  stroke-dasharray: 3 6;
}
.nyc-truck-through.highlighted,
.nyc-truck-local.highlighted,
.nyc-truck-designated.highlighted {
  stroke: #0fbf72;
  stroke-width: 8;
  opacity: 1;
  filter: drop-shadow(0 0 4px rgba(15,191,114,.85));
}
.nyc-truck-hit {
  stroke: transparent;
  stroke-width: 28;
  pointer-events: stroke;
  cursor: pointer;
}
.editing .nyc-truck-through,
.editing .nyc-truck-local,
.editing .nyc-truck-designated {
  opacity: .95;
  filter: drop-shadow(0 0 2px rgba(255,255,255,.9));
}
.editing .nyc-truck-local { stroke-width: 6; }

.round-button.active,
.truck-roads-button.active {
  background: #137d58;
  color: white;
  box-shadow: 0 6px 18px rgba(19,125,88,.32);
}
.truck-roads-button { font-size: 10px; letter-spacing: .03em; }

.truck-network-legend {
  position: absolute;
  z-index: 14;
  top: calc(max(12px, env(safe-area-inset-top)) + 365px);
  right: 12px;
  width: 156px;
  padding: 9px 10px;
  border: 1px solid rgba(255,255,255,.76);
  border-radius: 13px;
  background: rgba(255,255,255,.94);
  color: var(--ink);
  box-shadow: 0 5px 18px rgba(20,32,43,.16);
  backdrop-filter: blur(12px);
  pointer-events: none;
}
.truck-network-title {
  margin-bottom: 6px;
  font-size: 10px;
  line-height: 1.25;
  font-weight: 850;
}
.truck-network-key {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}
.truck-network-key i { display: inline-block; flex: 0 0 auto; }
.truck-network-key i.through { width: 20px; border-top: 4px solid #12975c; }
.truck-network-key i.local { width: 20px; border-top: 4px dashed #12975c; }
.truck-network-key i.blocked,
.truck-network-key i.close { width: 10px; height: 10px; border-radius: 50%; }
.truck-network-key i.blocked { background: #c92732; }
.truck-network-key i.close { background: #e79a17; }

.low-bridge-marker {
  width: 27px;
  height: 27px;
  border: 3px solid white;
  border-radius: 50%;
  color: white;
  font-size: 15px;
  font-weight: 950;
  box-shadow: 0 4px 13px rgba(0,0,0,.28);
  cursor: pointer;
}
.low-bridge-marker.blocked { background: #c92732; }
.low-bridge-marker.close { background: #e79a17; }

.nyc-legend { flex-wrap: wrap; }
.nyc-legend span.through { width: 25px; border-top: 4px solid #40c88f; }
.nyc-legend span.local { width: 25px; border-top: 4px dashed #40c88f; }

@media (max-width: 699px) {
  .truck-network-legend {
    top: auto;
    right: 12px;
    bottom: calc(max(12px, env(safe-area-inset-bottom)) + 172px);
    width: 152px;
  }
  .editing .truck-network-legend { bottom: calc(max(12px, env(safe-area-inset-bottom)) + 210px); }
}
