.dark-road-tiles {
  filter: none;
}

.trip-map-shell .leaflet-control-attribution {
  background: rgb(255 255 255 / 88%) !important;
  color: #52605a !important;
}

.trip-map-shell .leaflet-control-attribution a {
  color: #245d43 !important;
}

.trip-map-shell .leaflet-control-zoom a {
  background: #fff !important;
  border-color: #d8dfda !important;
  color: #17211d !important;
}

.trip-map-shell .leaflet-control-scale-line {
  background: rgb(255 255 255 / 78%) !important;
  border-color: #34463d !important;
  color: #24332c !important;
}

.map-load-error {
  align-items: center;
  color: #dfe9e3;
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  justify-content: center;
  padding: 28px;
  text-align: center;
}

.map-load-error span {
  color: #91a098;
  font-size: 12px;
}

/* Fullscreen map workspace; the mobile inspector overlays, never replaces, the map. */
html.route-editor-active { overflow:hidden; }
.route-editor { position:fixed;inset:0;width:100vw;max-width:none;height:100vh;height:100dvh;max-height:none;margin:0;padding:0;border:0;border-radius:0;background:#f7f9f6;color:#173c2a;overflow:hidden; }
.route-editor[open] { display:flex;flex-direction:column; }
.route-editor::backdrop { background:#0c211c; }
.route-editor-head { flex-shrink:0;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 24px;padding-top:max(12px,env(safe-area-inset-top));border-bottom:1px solid #dce4dd;background:white; }
.route-editor-head>div { display:flex;flex-direction:column;align-items:flex-start;min-width:0; }
.route-editor-head .kicker { font-size:9px;line-height:1.4; }
.route-editor h2 { font:700 20px Manrope,system-ui,sans-serif;margin:4px 0 0;overflow-wrap:anywhere; }
.route-close { flex-shrink:0;border:0;border-radius:50%;width:44px;height:44px;font-size:25px;background:#e8eee8;color:#254c35; }
.route-editor-workspace { position:relative;min-height:0;flex:1;display:grid;grid-template-columns:minmax(0,1fr) 310px;overflow:hidden; }
.route-editor-map-wrap { position:relative;min-height:0; }
.route-editor-map { height:100%;width:100%; }
.route-map-tools { position:absolute;z-index:500;top:16px;left:16px;right:16px;display:flex;gap:6px;flex-wrap:wrap;pointer-events:none; }
.route-map-tools button { pointer-events:auto;border:1px solid #c6d4cb;background:#fffffff2;padding:10px 12px;border-radius:7px;font:600 12px system-ui;box-shadow:0 2px 8px #153e2714;min-height:44px; }
.route-map-tools button[aria-pressed=true] { background:#173f2b;color:white;border-color:#173f2b; }
.route-map-hint { position:absolute;z-index:500;bottom:14px;left:14px;max-width:calc(100% - 80px);background:#fffffff0;color:#334c3d;padding:8px 12px;border-radius:6px;font-size:12px;pointer-events:none; }
.route-selected-tools { position:absolute;z-index:500;top:72px;left:16px;display:flex;align-items:center;gap:12px;background:#fffffff5;padding:5px 6px 5px 12px;border-radius:7px;box-shadow:0 2px 8px #153e2724;font-size:12px; }
.route-selected-tools button { min-height:44px;padding:8px 12px;border:1px solid #dbcec3;border-radius:5px;color:#91432c;background:white;font:600 12px system-ui; }
.route-editor-panel { overflow:auto;border-left:1px solid #dce4dd;background:#fff; }
.route-editor-panel-content>section,.route-layers { padding:20px;margin:0;border:0;border-bottom:1px solid #e5ebe5; }
.route-panel-toggle { display:none; }
.route-distance>span { display:block;font-size:12px;color:#536c5b; }
.route-distance strong { display:block;font:750 32px Manrope,system-ui,sans-serif;letter-spacing:-1px;margin:8px 0; }
.route-distance small { color:#687c6d;font-size:12px; }
.route-distance p { font-size:12px;line-height:1.5;color:#3b7352;margin:12px 0 0;min-height:36px; }
.route-distance p.is-error { color:#a43c2c; }
.route-layers legend { float:left;width:100%;padding:0;margin-bottom:10px;font-weight:700;font-size:13px; }
.route-layers label { clear:both;display:flex;align-items:center;gap:10px;min-height:44px;font-size:13px; }
.route-layers input { accent-color:#276547;width:18px;height:18px; }
.route-layers small { display:block;font-size:11px;color:#687c6d; }
.route-points-head { display:flex;align-items:center;justify-content:space-between;gap:8px; }
.route-points h3 { font-size:13px;margin:0; }
.route-points h3 span { font-weight:400;color:#687c6d;font-size:11px; }
.route-points-head button { border:1px solid #d5dfd5;border-radius:5px;background:white;font-size:20px;min-width:44px;min-height:44px; }
.route-help { font-size:11px;color:#687c6d;line-height:1.5; }
.route-point-list { max-height:230px;overflow:auto;overscroll-behavior:contain; }
.route-point-list button { display:flex;align-items:center;gap:12px;width:100%;min-height:44px;text-align:left;background:white;border:0;border-bottom:1px solid #edf0ec;padding:9px 6px;color:#264c34; }
.route-point-list button[aria-pressed=true] { background:#ecf4ed; }
.route-point-list b { font-size:11px;border:1px solid #c7d7ca;border-radius:50%;width:25px;height:25px;display:grid;place-items:center; }
.route-point-list span { font-size:12px; }
.route-point-list small { display:block;font-size:10px;color:#687c6d; }
.route-coordinate-form { display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:15px; }
.route-coordinate-form label { font-size:11px;display:block;color:#687c6d; }
.route-coordinate-form input { display:block;width:100%;min-height:44px;padding:9px 6px;border:1px solid #d6dfd4;border-radius:5px;color:#244532;background:white;font-size:14px; }
.route-coordinate-form>div { grid-column:1/-1;display:flex;gap:8px; }
.route-coordinate-form button,.route-reset { border:1px solid #cbd9cc;border-radius:6px;background:white;color:#315e42;padding:9px 12px;font-size:12px;min-height:44px; }
.route-reset { margin:18px 20px;color:#9c4930;border-color:#e1cbbf; }
.route-editor-footer { flex-shrink:0;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 24px;padding-bottom:max(12px,env(safe-area-inset-bottom));border-top:1px solid #dce4dd;background:white; }
.route-editor-footer>span { font-size:12px;color:#687c6d; }
.route-editor-footer>div { display:flex;gap:8px; }
.route-editor-footer button { border:1px solid #ccdacd;background:white;border-radius:7px;padding:12px 18px;color:#2e523b;font:600 13px system-ui;min-height:44px; }
.route-editor-footer .route-save { background:#173f2b;color:white;border-color:#173f2b; }
.route-editor button:disabled { opacity:.45;cursor:default; }
.route-editor button:not(:disabled) { cursor:pointer;transition:background .15s; }
.route-editor :focus-visible { outline:3px solid #3b9964;outline-offset:2px; }
.route-control-point { border:0!important;background:transparent!important;display:grid!important;place-items:center; }
.route-control-point>span { border:2px solid #236d48;background:white;border-radius:50%;width:30px;height:30px;display:grid;place-items:center;color:#174c32;box-shadow:0 2px 7px #12372830;font:700 11px system-ui; }
.route-control-point.selected>span { background:#174c32;color:white;border-color:white; }
.fuel-marker { background:white;border:1px solid #d2c2a4;border-radius:7px;display:grid!important;place-items:center;box-shadow:0 2px 7px #18302433;font-size:17px; }
.adding-point { cursor:crosshair; }
.trip-map-controls { display:flex;gap:16px;flex-wrap:wrap;padding:10px 0;font-size:12px;color:#526559; }
.trip-map-controls label { display:flex;align-items:center;gap:6px; }
.trip-map-controls input { accent-color:#276547; }
.map-edit-action { margin-right:auto!important;background:#173f2b!important;color:white!important; }
.route-preview-retry { border:0;background:none;color:#2a6e49;text-decoration:underline;cursor:pointer;font-size:12px;min-height:44px;padding:8px 0; }
@media(max-width:800px) {
  .route-editor-workspace { display:block; }
  .route-editor-map-wrap { height:100%; }
  .route-editor-head { padding:8px 16px;padding-top:max(8px,env(safe-area-inset-top)); }
  .route-editor h2 { font-size:17px;max-height:42px;overflow:auto; }
  .route-editor-panel { position:absolute;z-index:650;bottom:0;left:0;right:0;max-height:70%;border:0;border-top:1px solid #d6dfd4;border-radius:12px 12px 0 0;box-shadow:0 -3px 18px #1b3b251a;overscroll-behavior:contain; }
  .route-panel-toggle { display:flex;align-items:center;gap:16px;justify-content:space-between;width:100%;min-height:52px;padding:10px 18px;border:0;background:#fffffff5;color:#254c35;font:600 13px system-ui;position:sticky;top:0;z-index:1; }
  .route-panel-toggle b { margin-left:auto;font-size:16px; }
  .route-editor-panel-content { display:none; }
  .panel-open .route-editor-panel-content { display:block;animation:route-panel-reveal .16s ease-out; }
  .route-editor-panel-content>section,.route-layers { padding:16px 20px; }
  .route-editor-footer { padding:10px 12px;padding-bottom:max(10px,env(safe-area-inset-bottom)); }
  .route-editor-footer>span { font-size:10px;max-width:110px; }
  .route-editor-footer button { padding:11px 13px; }
  .route-map-tools { top:10px;left:10px;right:10px;flex-wrap:nowrap; }
  .route-map-tools button { font-size:11px;padding:9px;white-space:nowrap; }
  .route-selected-tools { top:64px;left:10px;font-size:11px;gap:8px; }
  .route-selected-tools button { font-size:11px;padding:8px; }
  .route-map-hint { bottom:63px;left:10px;max-width:calc(100% - 70px);font-size:10px;padding:7px 9px; }
  .route-editor-map .leaflet-bottom { bottom:52px; }
  .route-coordinate-form input { font-size:16px; }
}
@keyframes route-panel-reveal { from{opacity:0;transform:translateY(6px)} to{opacity:1;transform:none} }
@media(prefers-reduced-motion:reduce) { .route-editor *{transition:none!important;animation:none!important} }
@media(max-height:480px) {
  .route-editor-head .kicker { display:none; }
  .route-editor-head { padding-top:6px;padding-bottom:6px; }
  .route-editor h2 { margin:0;font-size:16px; }
  .route-editor-footer { padding-top:6px;padding-bottom:max(6px,env(safe-area-inset-bottom)); }
  .route-map-hint { display:none; }
}
.route-editor-map-wrap { isolation:isolate;z-index:0; }
.route-control-point.route-point-hidden { display:none!important; }
.route-map-hint.is-error { color:#8c3928;background:#fff2eaf5;border:1px solid #e7c4b3; }
.route-panel-toggle.is-error { color:#8c3928; }
.map-tile-notice { width:270px;box-sizing:border-box;padding:12px;background:#fffdf7;color:#56452c;border:1px solid #e1d5b8;border-radius:10px;box-shadow:0 2px 8px #18302424;overflow-wrap:anywhere;text-align:left;margin-bottom:calc(10px + var(--map-notice-clearance,0px))!important; }
.map-tile-notice[hidden] { display:none!important; }
.map-tile-notice p { margin:0;font:600 12px/1.4 system-ui; }
.map-tile-notice small { display:block;margin-top:3px;font:11px/1.4 system-ui; }
.map-tile-notice button { display:block;margin-top:7px;min-height:44px;padding:6px 10px;border:1px solid #cbbd9a;border-radius:6px;background:white;color:inherit;font:600 12px system-ui;cursor:pointer; }
.map-tile-notice button:disabled { opacity:.65;cursor:wait; }
.map-tile-notice button:focus-visible { outline:3px solid #3b9964;outline-offset:2px; }
.route-editor:has([data-route-status].is-error) .route-map-hint.is-error { display:none; }
.detail-section>[data-more-gps] { border:1px solid #cfdbd0;border-radius:6px;background:white;color:#315e42;padding:10px 12px;margin-top:10px;min-height:44px;font-size:12px; }
.route-map-hint.is-error { display:block; }

.fuel-marker-content { position:relative;display:grid;place-items:center;width:32px;height:32px;overflow:hidden;border-radius:4px; }
.fuel-marker-content .fuel-default { font-size:21px;line-height:1; }
.fuel-marker-content img { position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:white;padding:2px; }

/* Quiet map workspace: details are available when needed. */
.route-editor-workspace { grid-template-columns:minmax(0,1fr) 260px; }
.route-map-tools { gap:4px;right:12px; }
.route-map-tools button { padding:9px 12px;box-shadow:0 2px 6px #153e2710; }
.route-history-tools { display:inline-flex;gap:4px;pointer-events:auto;margin-left:6px; }
.route-history-tools button,[data-route-fit] { min-width:44px;font-size:20px;line-height:1; }
.route-map-hint { display:none; }
.route-map-hint.is-error,.route-map-hint.is-guidance { display:block; }
.route-selected-tools { gap:8px;padding:3px 4px 3px 12px; }
.route-selected-tools button { font-size:22px;min-width:38px;padding:4px;border:0; }
.route-distance strong { font-size:30px;margin:6px 0; }
.route-distance p { min-height:0;margin:10px 0 0; }
.route-options { border-bottom:1px solid #e5ebe5;padding:0 18px; }
.route-options>summary { padding:17px 0;min-height:52px;cursor:pointer;font-size:13px;font-weight:600;color:#355842; }
.route-options>summary span { float:right;font-size:11px;font-weight:500;color:#7b8e80; }
.route-options .route-layers { padding:0 0 14px;border:0; }
.route-options .route-point-list { max-height:220px;margin-bottom:10px; }
.route-point-list small { display:none; }
.route-coordinate-details { padding-bottom:16px; }
.route-coordinate-details>summary { cursor:pointer;color:#718477;font-size:11px;padding:10px 0; }
.route-coordinate-form { margin:6px 0 0; }
.route-help-details p { font-size:12px;color:#718477;line-height:1.6;margin:0 0 14px; }
.route-help-details .route-reset { margin:0 0 18px;font-size:11px; }
.route-editor-footer { padding:10px 20px; }
.route-editor-footer>span { font-size:11px; }
@media(max-width:800px) {
 .route-editor-workspace { display:block; }
 .route-map-tools { flex-wrap:wrap;gap:4px; }
 .route-map-tools button { font-size:12px;padding:9px 11px; }
 .route-map-tools [data-route-fit],.route-history-tools button { font-size:20px;padding:8px;min-width:40px; }
 .route-history-tools { gap:3px;margin-left:2px; }
 .route-editor-panel { max-height:62%; }
 .route-options { padding:0 18px; }
 .route-editor-footer { padding:8px 12px;padding-bottom:max(8px,env(safe-area-inset-bottom)); }
 .route-selected-tools { top:64px; }
}
