:root {
  color-scheme: light;
  --ink: #172d2a;
  --muted: #72807c;
  --line: #e4e9e3;
  --paper: #fbfcf8;
  --green: #16483e;
  --green-deep: #103a32;
  --lime: #d5f06a;
  --coral: #d9765b;
  --soft-green: #eff4e9;
  font-family: "DM Sans", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { color: var(--ink); background: #e8eee6; }
button, input, select { font: inherit; }
button { color: inherit; }
.app-shell { display: grid; grid-template-columns: minmax(0, 1fr) 420px; width: 100%; height: 100dvh; min-height: 520px; }
.map-stage { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: #dfe9dc; }
#map { position: absolute; inset: 0; background: #e3ebdf; }
.map-topline { position: absolute; top: 22px; left: 24px; right: 24px; z-index: 2; display: flex; justify-content: space-between; align-items: center; pointer-events: none; }
.map-status { display: flex; align-items: center; gap: 9px; min-height: 38px; padding: 0 14px; border: 1px solid rgba(25, 53, 45, .09); border-radius: 5px; background: rgba(251, 252, 248, .94); box-shadow: 0 3px 12px rgba(26, 53, 44, .08); color: #42534e; font-size: 12px; font-weight: 600; pointer-events: auto; backdrop-filter: blur(8px); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #83a64a; box-shadow: 0 0 0 3px #e6efd7; }
.icon-button { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 1px solid rgba(25, 53, 45, .09); border-radius: 5px; background: var(--paper); box-shadow: 0 3px 12px rgba(26, 53, 44, .08); cursor: pointer; pointer-events: auto; }
.icon-button:hover { background: white; }
.target-icon { position: relative; width: 15px; height: 15px; border: 1.7px solid var(--green); border-radius: 50%; }
.target-icon::before, .target-icon::after { position: absolute; content: ""; background: var(--green); }
.target-icon::before { width: 3px; height: 3px; top: 4.5px; left: 4.5px; border-radius: 50%; }
.target-icon::after { width: 1px; height: 21px; top: -4.7px; left: 6px; box-shadow: -4.7px 9.8px 0 -0.2px var(--green); transform: rotate(90deg); }
.map-attribution { position: absolute; bottom: 7px; right: 8px; z-index: 1; padding: 3px 6px; color: #53625c; border-radius: 2px; background: rgba(251,252,248,.8); font-size: 10px; }
.planner { position: relative; z-index: 4; display: flex; flex-direction: column; min-height: 0; padding: 0 28px; background: var(--paper); border-left: 1px solid rgba(22,72,62,.08); box-shadow: -8px 0 24px rgba(36, 53, 44, .035); }
.brand-row { display: flex; align-items: center; justify-content: space-between; height: 72px; flex: 0 0 auto; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand-mark { display: flex; align-items: flex-end; gap: 2px; height: 20px; width: 22px; padding: 2px 3px; overflow: hidden; border-radius: 3px; background: var(--green); transform: skew(-10deg); }
.brand-mark span { display: block; width: 4px; border-radius: 2px 2px 0 0; background: var(--lime); }
.brand-mark span:nth-child(1) { height: 8px; }.brand-mark span:nth-child(2) { height: 14px; }.brand-mark span:nth-child(3) { height: 10px; }
.brand-name { font: 800 19px/1 "Manrope", sans-serif; letter-spacing: 0; }
.edition { color: #7d8882; font-size: 9px; font-weight: 700; letter-spacing: 1.1px; }
.edition span { color: #b0b9b1; padding: 0 3px; }
.planner-scroll { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #dce3db transparent; }
.intro { padding: 27px 0 18px; }
.eyebrow { margin: 0 0 7px; color: #84918a; font-size: 9px; font-weight: 700; letter-spacing: 1.25px; }
h1 { margin: 0; font: 800 28px/1.2 "Manrope", sans-serif; letter-spacing: 0; }
.route-form { margin: 0; }
.location-stack { position: relative; padding: 6px 0; border: 1px solid #e5e9e3; border-radius: 5px; background: #fff; }
.location-row { position: relative; display: flex; align-items: center; min-height: 62px; padding: 0 13px; gap: 12px; }
.route-node { position: relative; z-index: 1; flex: 0 0 auto; width: 10px; height: 10px; }
.origin-node { border: 2px solid #49806e; border-radius: 50%; background: #fff; }
.destination-node { border: 2px solid var(--coral); border-radius: 2px; background: #fff; transform: rotate(45deg) scale(.82); }
.route-connector { position: absolute; top: 36px; left: 17px; z-index: 0; height: 28px; border-left: 1px dashed #aab7ad; }
.location-value { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.field-label, .section-heading label, .section-heading > span.summary-label { color: #87938d; font-size: 9px; font-weight: 700; letter-spacing: .9px; }
.search-wrap { position: relative; }
.search-wrap input { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 14px; }
.search-wrap input::placeholder { color: #9da7a1; }
.quiet-icon-button { display: grid; place-items: center; flex: 0 0 30px; width: 30px; height: 30px; border: 0; border-radius: 4px; color: #74827b; background: transparent; font-size: 20px; cursor: pointer; }
.quiet-icon-button:hover:not(:disabled) { background: var(--soft-green); color: var(--green); }
.quiet-icon-button:disabled { opacity: .35; cursor: default; }
.favorite-button { font-size: 22px; }
.search-results { position: absolute; top: calc(100% + 12px); left: -34px; right: -40px; z-index: 5; overflow: hidden; border: 1px solid var(--line); border-radius: 4px; background: #fff; box-shadow: 0 12px 32px rgba(25,53,45,.15); }
.search-result { display: block; width: 100%; padding: 12px 14px; border: 0; border-bottom: 1px solid #eff2ed; background: #fff; text-align: left; cursor: pointer; }
.search-result:last-child { border-bottom: 0; }.search-result:hover { background: #f4f7f0; }
.search-result strong { display: block; overflow: hidden; color: var(--ink); font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.search-result small { display: block; margin-top: 3px; color: #87938d; font-size: 10px; }
.vehicle-section { padding: 20px 0 17px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.section-heading > span { color: #7f8b84; font-size: 10px; font-weight: 600; }
.select-wrap { position: relative; display: flex; align-items: center; height: 48px; padding: 0 12px; border: 1px solid #e4e9e3; border-radius: 4px; background: #fff; }
.vehicle-symbol { color: var(--green); font-size: 17px; transform: scaleX(1.3); }
.select-wrap select { width: 100%; height: 100%; padding: 0 25px 0 10px; appearance: none; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 13px; cursor: pointer; }
.select-chevron { position: absolute; right: 13px; color: #718078; pointer-events: none; }
.vehicle-note { margin: 7px 0 0; color: #849089; font-size: 10px; line-height: 1.5; }
.primary-button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 48px; padding: 0 15px; border: 0; border-radius: 4px; color: #f7faef; background: var(--green); font-size: 13px; font-weight: 700; cursor: pointer; transition: background .18s ease, transform .18s ease; }
.primary-button:hover { background: var(--green-deep); transform: translateY(-1px); }
.primary-button:disabled { opacity: .65; cursor: wait; transform: none; }
.button-arrow { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 3px; color: var(--green-deep); background: var(--lime); font-size: 17px; }
.route-error { margin: 9px 0 0; padding: 10px 11px; border-left: 3px solid #bf654d; background: #fbf0eb; color: #8e4837; font-size: 11px; line-height: 1.45; }
.favorites-section { padding: 16px 0 17px; border-top: 1px solid var(--line); }
.favorites-section .section-heading { margin-bottom: 7px; }
.favorites-section h2, .directions-title { margin: 0; font: 700 12px/1.3 "Manrope", sans-serif; }
.local-label { font-size: 8px !important; letter-spacing: .55px; }
.favorites-list { display: grid; gap: 2px; }
.empty-favorites { padding: 7px 0; color: #9aa49e; font-size: 11px; }
.favorite-item { display: flex; align-items: center; justify-content: space-between; gap: 9px; min-width: 0; padding: 7px 4px; border: 0; border-radius: 3px; background: transparent; text-align: left; cursor: pointer; }
.favorite-item:hover { background: #f1f5ee; }
.favorite-item span { overflow: hidden; color: #475751; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.favorite-item small { color: #9aa49e; font-size: 9px; }
.route-details { padding: 14px 0 19px; border-top: 1px solid var(--line); animation: settle .25s ease both; }
.route-summary { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 8px; }
.route-summary > div { display: flex; flex-direction: column; gap: 5px; }
.summary-label { color: #89948e; font-size: 8px; font-weight: 700; letter-spacing: .65px; }
.route-summary strong { color: var(--green); font: 800 15px/1.1 "Manrope", sans-serif; }
.route-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 11px; color: #829087; font-size: 10px; }
.voice-button { padding: 5px 8px; border: 1px solid #e2e9df; border-radius: 3px; color: #52635b; background: #fff; font-size: 10px; cursor: pointer; }
.voice-button[aria-pressed="true"] { border-color: #c9d99e; color: #3f612a; background: #f2f7e7; }
.directions-title { margin: 17px 0 7px; }
.directions-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.direction-item { display: grid; grid-template-columns: 20px 1fr auto; align-items: baseline; gap: 8px; padding: 9px 0; border-top: 1px solid #edf0eb; }
.direction-number { color: #719078; font: 700 10px "Manrope", sans-serif; }
.direction-text { color: #46564f; font-size: 11px; line-height: 1.35; }
.direction-distance { color: #89948e; font-size: 9px; white-space: nowrap; }
.legal-note { display: flex; gap: 9px; margin: 4px 0 20px; padding: 10px 11px; border: 1px solid #e8ebdf; border-radius: 4px; background: #f5f7ef; }
.note-mark { display: grid; flex: 0 0 15px; place-items: center; width: 15px; height: 15px; margin-top: 1px; border: 1px solid #8a9e6e; border-radius: 50%; color: #657d4a; font: 700 9px Georgia, serif; }
.legal-note p { margin: 0; color: #758176; font-size: 9px; line-height: 1.5; }
.planner-footer { display: flex; align-items: center; justify-content: space-between; min-height: 43px; margin-top: auto; border-top: 1px solid var(--line); color: #a0aaa3; font-size: 9px; }
.planner-footer button { padding: 5px 8px; border: 1px solid #dfe7d8; border-radius: 3px; color: var(--green); background: #f7f9f3; font-size: 9px; cursor: pointer; }
.mobile-panel-toggle { display: none; }
.user-marker { display: grid; place-items: center; width: 22px; height: 22px; border: 3px solid white; border-radius: 50%; background: #3879d9; box-shadow: 0 1px 5px rgba(0,0,0,.32); }
.user-marker::after { width: 7px; height: 7px; border-radius: 50%; background: white; content: ""; }
.maplibregl-ctrl-group { overflow: hidden; border: 1px solid rgba(25,53,45,.12) !important; border-radius: 4px !important; box-shadow: 0 3px 12px rgba(26,53,44,.1) !important; }
.maplibregl-ctrl-group button { width: 34px !important; height: 34px !important; }
@keyframes settle { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 900px) {
  .app-shell { display: block; min-height: 0; }
  .map-stage { position: absolute; inset: 0; }
  .map-topline { top: max(14px, env(safe-area-inset-top)); left: 15px; right: 15px; }
  .planner { position: absolute; right: 0; bottom: 0; left: 0; max-height: min(78dvh, 700px); padding: 0 20px env(safe-area-inset-bottom); border: 0; border-top: 1px solid rgba(22,72,62,.12); border-radius: 10px 10px 0 0; box-shadow: 0 -8px 30px rgba(36,53,44,.13); transition: transform .26s ease; }
  .planner.collapsed { transform: translateY(calc(100% - 50px)); }
  .brand-row { height: 57px; }
  .intro { padding: 19px 0 14px; }
  h1 { font-size: 24px; }
  .map-attribution { bottom: calc(min(78dvh, 700px) + 5px); }
  .mobile-panel-toggle { position: absolute; top: -34px; left: 50%; z-index: 5; display: block; padding: 7px 14px; border: 1px solid rgba(22,72,62,.1); border-bottom: 0; border-radius: 6px 6px 0 0; color: var(--green); background: var(--paper); font-size: 10px; font-weight: 700; transform: translateX(-50%); cursor: pointer; }
}
@media (max-width: 420px) {
  .planner { padding-right: 16px; padding-left: 16px; }
  .edition { font-size: 8px; }
  .route-summary strong { font-size: 14px; }
  .local-label { max-width: 115px; text-align: right; line-height: 1.3; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }

.app-shell.navigation-mode { grid-template-columns: minmax(0, 1fr); }
.app-shell.navigation-mode .map-stage { position: absolute; inset: 0; }
.app-shell.navigation-mode .planner { position: absolute; top: 0; right: 0; bottom: 0; width: min(420px, 100%); transform: translateX(105%); visibility: hidden; pointer-events: none; }
.navigation-overlay { position: absolute; top: max(14px, env(safe-area-inset-top)); left: 50%; z-index: 6; width: min(460px, calc(100% - 28px)); overflow: hidden; border: 1px solid rgba(255,255,255,.12); border-radius: 7px; color: #f7faef; background: rgba(16,58,50,.96); box-shadow: 0 8px 28px rgba(18,37,31,.25); transform: translateX(-50%); backdrop-filter: blur(12px); }
.navigation-next { display: grid; gap: 5px; min-height: 73px; padding: 14px 16px 12px; }
.navigation-kicker { color: #cce86d; font-size: 9px; font-weight: 700; letter-spacing: .9px; }
.navigation-next strong { overflow: hidden; font: 700 17px/1.25 "Manrope", sans-serif; text-overflow: ellipsis; }
.navigation-next > span:last-child { color: #d2ded6; font-size: 11px; }
.navigation-controls { display: flex; align-items: center; gap: 9px; min-height: 48px; padding: 7px 10px 7px 16px; border-top: 1px solid rgba(255,255,255,.13); }
.navigation-controls > div { display: flex; flex: 1; align-items: baseline; gap: 9px; min-width: 0; }
.navigation-controls > div span { color: #e4f0dc; font: 700 13px "Manrope", sans-serif; white-space: nowrap; }
.navigation-controls small { overflow: hidden; color: #bdccc2; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.navigation-controls button { min-height: 31px; padding: 0 10px; border: 1px solid rgba(255,255,255,.2); border-radius: 3px; color: #f7faef; background: rgba(255,255,255,.08); font-size: 10px; font-weight: 600; cursor: pointer; }
.navigation-controls button:hover { background: rgba(255,255,255,.17); }
.navigation-controls .navigation-exit { width: 31px; padding: 0; font-size: 21px; line-height: 1; }
.app-shell.navigation-mode .map-topline { display: none; }
.app-shell.navigation-mode .map-attribution { bottom: 7px; }
@media (max-width: 900px) {
  .app-shell.navigation-mode { display: block; }
  .app-shell.navigation-mode .planner { top: 0; right: 0; bottom: 0; left: 0; width: 100%; transform: translateY(105%); border-radius: 0; }
  .navigation-overlay { top: max(10px, env(safe-area-inset-top)); width: calc(100% - 20px); }
  .navigation-next { min-height: 68px; padding: 12px 14px 10px; }
  .navigation-next strong { font-size: 16px; }
  .navigation-controls { min-height: 44px; padding-left: 14px; }
  .app-shell.navigation-mode .maplibregl-ctrl-bottom-right { bottom: max(18px, env(safe-area-inset-bottom)); }
}