/* ==========================================================================
   4Search — maps.css
   The Maps service (/maps/...). Every class is mp- (or mi for the icons) and
   the colours run through the --mp-* tokens, so the colour modes of app.css
   section 14 need only the token block near the end: hybrid and light share
   the base (light panel), dark restates the tokens. Map data colours (routes,
   the AQI scale, radar, quakes) are the same in every mode.

   Layout: the header, then the app filling the rest of the window (--mp-top
   is the header's bottom, set by maps.js): the side panel on the left, the
   map beside it. Phones: the map fills the app and the panel is a sheet that
   slides up from the bottom (peek / half / full).
   ========================================================================== */

/* ------------------------------------------------------------------ tokens */
.mp-page{
  --mp-ink:#1f2328;
  --mp-ink-2:#3c4350;
  --mp-ink-3:#5f6875;
  --mp-ink-4:#8a929e;
  --mp-line:#e3e7ec;
  --mp-line-2:#eef1f4;
  --mp-surface:#ffffff;
  --mp-surface-2:#f6f8fa;
  --mp-surface-3:#edf1f5;
  --mp-page:#e9edf2;
  --mp-accent:#1a73e8;
  --mp-accent-ink:#ffffff;
  --mp-accent-soft:#e8f0fe;
  --mp-red:#ea4335;
  --mp-green:#188038;
  --mp-amber:#e37400;
  --mp-shadow:0 1px 2px rgba(60,64,67,.28), 0 2px 6px 2px rgba(60,64,67,.12);
  --mp-shadow-lg:0 4px 18px rgba(60,64,67,.25);
  --mp-panel-w:408px;
  --mp-radius:12px;
  font-variant-numeric:tabular-nums;
}

/* ---------------------------------------------------------- page and app */
.mp-page .mp-header{ position:relative; z-index:20; }

/* The ribbon of sections and map types, like Finance's and Weather's
   (rails.js adds the scroll arrows through data-fin-rail). */
.mp-subnav{ position:relative; z-index:19; background:var(--mp-surface); border-bottom:1px solid var(--mp-line); }
.mp-subnav-track{ display:flex; gap:4px; overflow-x:auto; scrollbar-width:none; padding:6px 12px; }
.mp-subnav-track::-webkit-scrollbar{ display:none; }
.mp-subnav-link{
  flex:0 0 auto; display:inline-flex; align-items:center; gap:6px; padding:6px 12px; border-radius:999px; font-size:14px; font-weight:500;
  color:var(--mp-ink-2); text-decoration:none; white-space:nowrap; transition:background .15s ease, color .15s ease;
}
.mp-subnav-link:hover{ background:var(--mp-surface-2); color:var(--mp-ink); }
.mp-subnav-link.is-active{ background:var(--mp-accent-soft); color:var(--mp-accent); font-weight:650; }
.mp-subnav-ic{ width:16px; height:16px; flex:0 0 16px; }
.mp-subnav-n{ font-size:11.5px; font-weight:700; background:var(--mp-surface-3); color:var(--mp-ink-2); border-radius:999px; padding:0 7px; line-height:18px; }
.mp-subnav-n[hidden]{ display:none; }
button.mp-row{ width:100%; border:0; background:none; font:inherit; color:inherit; text-align:left; cursor:pointer; }
.mp-sec .mp-modes{ margin:12px 0 0; }
.mp-app{
  position:relative; display:flex; overflow:hidden; flex:0 0 auto;
  height:calc(100vh - var(--mp-top, 132px)); height:calc(var(--mp-vh, 100svh) - var(--mp-top, 132px)); min-height:420px;
  background:var(--mp-page); color:var(--mp-ink);
}
.mp-panel{
  position:relative; z-index:6; flex:0 0 var(--mp-panel-w); width:var(--mp-panel-w); max-width:100%;
  display:flex; flex-direction:column; background:var(--mp-surface); box-shadow:2px 0 8px rgba(60,64,67,.18);
  transition:margin-left .26s ease;
}
body.mp-panel-hidden .mp-panel{ margin-left:calc(-1 * var(--mp-panel-w)); }
.mp-panel-top{ display:flex; align-items:center; gap:6px; min-height:0; padding:0 8px; }
.mp-panel-top:has(button:not([hidden])){ min-height:44px; border-bottom:1px solid var(--mp-line-2); }
.mp-panel-top-t{ flex:1; min-width:0; font-weight:600; font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mp-back, .mp-panel-close{ width:36px; height:36px; border:0; border-radius:50%; background:none; color:var(--mp-ink-2); display:inline-flex; align-items:center; justify-content:center; cursor:pointer; }
.mp-back:hover, .mp-panel-close:hover{ background:var(--mp-surface-3); }
.mp-back[hidden], .mp-panel-close[hidden]{ display:none; }
.mp-panel-body{ flex:1; min-height:0; overflow-y:auto; overflow-x:hidden; scrollbar-width:thin; outline:none; }
.mp-sheet-grip{ display:none; }
.mp-panel-toggle{
  position:absolute; z-index:7; top:12px; left:var(--mp-panel-w); width:24px; height:48px; border:0; border-radius:0 8px 8px 0;
  background:var(--mp-surface); color:var(--mp-ink-3); box-shadow:2px 1px 4px rgba(60,64,67,.25); cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center; transition:left .26s ease;
}
.mp-panel-toggle:hover{ color:var(--mp-ink); }
body.mp-panel-hidden .mp-panel-toggle{ left:0; }
body.mp-panel-hidden .mp-toggle-ic{ transform:rotate(180deg); }
.mp-ad{ border-top:1px solid var(--mp-line-2); padding:8px; }

.mp-map-wrap{ position:relative; flex:1; min-width:0; background:#aad3df; }
.mp-map{ position:absolute; inset:0; }
.mp-nojs{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center; padding:24px; text-align:center; color:var(--mp-ink-2); background:var(--mp-page); }
body.mp-busy .mp-map-wrap::before{
  content:""; position:absolute; z-index:5; top:0; left:0; height:3px; width:40%; background:var(--mp-accent);
  animation:mp-busy 1.1s ease-in-out infinite;
}
@keyframes mp-busy{ 0%{ transform:translateX(-100%); } 100%{ transform:translateX(260%); } }
body.mp-measuring .maplibregl-canvas, body.mp-picking .maplibregl-canvas{ cursor:crosshair; }

/* ---------------------------------------------------------- search box */
.mp-search{ margin:6px 0 2px; }
.mp-search-box{
  position:relative; display:flex; align-items:center; gap:4px;
  background:#fff; border:1px solid #dfe5ec; border-radius:24px; padding:4px 5px 4px 14px;
  box-shadow:0 2px 10px rgba(9,14,22,.10); transition:box-shadow .2s ease, border-color .2s ease; max-width:760px;
}
.mp-search-box:focus-within{ border-color:#8ab4f8; box-shadow:0 0 0 3px rgba(26,115,232,.18), 0 8px 24px rgba(9,14,22,.12); }
.mp-search-ico{ color:#7a8391; display:inline-flex; }
.mp-search-input{ flex:1; min-width:0; border:0; outline:0; background:transparent; font-size:16px; color:#1f2328; padding:8px 4px; font-family:inherit; }
.mp-search-input::placeholder{ color:#8b94a3; }
.mp-search-input::-webkit-search-cancel-button{ display:none; }
.mp-search-clear, .mp-search-btn, .mp-search-dir{
  flex-shrink:0; width:40px; height:40px; border:0; border-radius:50%; background:none; color:#5f6368; cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center; text-decoration:none;
}
.mp-search-clear[hidden]{ display:none; }
.mp-search-clear:hover, .mp-search-btn:hover{ background:#f1f3f4; }
.mp-search-dir{ color:var(--mp-accent, #1a73e8); border-left:1px solid #e3e7ec; border-radius:0 20px 20px 0; width:46px; }
.mp-search-dir:hover{ background:#e8f0fe; }
.mp-suggest{
  position:absolute; left:0; right:0; top:calc(100% + 6px); z-index:1100;
  background:#fff; border:1px solid rgba(16,24,40,.10); border-radius:14px;
  box-shadow:0 18px 44px rgba(16,24,40,.20); padding:6px; max-height:min(460px, 70vh); overflow-y:auto;
}
.mp-suggest[hidden]{ display:none; }
.mp-sug{ display:flex; align-items:center; gap:12px; padding:8px 10px; border-radius:10px; color:#1f2328; cursor:pointer; }
.mp-sug.is-on, .mp-sug:hover{ background:#f1f3f4; }
.mp-sug-ic{ flex:0 0 32px; height:32px; border-radius:50%; background:#f1f3f4; color:#5f6368; display:inline-flex; align-items:center; justify-content:center; }
.mp-sug-main{ display:flex; flex-direction:column; min-width:0; }
.mp-sug-t{ font-size:14.5px; font-weight:500; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mp-sug-s{ font-size:12.5px; color:#5f6875; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mp-flag{ font-family:"Twemoji Country Flags", "Apple Color Emoji", "Noto Color Emoji", "Segoe UI Emoji", sans-serif; }

/* --------------------------------------------------------------- icons */
.mi{ flex-shrink:0; vertical-align:middle; }

/* -------------------------------------------------------- panel content */
.mp-pane{ padding:0 0 8px; }
.mp-hero{ height:190px; background:var(--mp-surface-3); overflow:hidden; }
.mp-hero img{ width:100%; height:100%; object-fit:cover; display:block; }
.mp-hero-region img{ object-fit:contain; background:var(--mp-surface-2); }
.mp-ph{ padding:18px 20px 6px; }
.mp-ph-home{ padding-bottom:10px; }
.mp-title{ font-size:22px; line-height:1.25; font-weight:600; margin:0; color:var(--mp-ink); letter-spacing:-.01em; outline:none; overflow-wrap:anywhere; }
.mp-title .mp-flag{ font-size:24px; vertical-align:-2px; }
.mp-sub{ margin:4px 0 0; color:var(--mp-ink-3); font-size:14px; line-height:1.45; }
.mp-sub-pad{ padding:0 20px; margin-bottom:6px; }
.mp-kicker{ margin:0 0 4px; font-size:12px; font-weight:600; color:var(--mp-ink-3); display:flex; align-items:center; gap:4px; text-transform:uppercase; letter-spacing:.05em; }
.mp-kicker-pin{ color:var(--mp-red); }
.mp-open{ margin:6px 0 0; font-size:14px; }
.mp-open-y{ color:var(--mp-green); font-weight:600; }
.mp-open-n{ color:#d93025; font-weight:600; }
.mp-soon{ color:var(--mp-amber); font-weight:600; }

.mp-acts{ display:flex; gap:4px; padding:10px 14px 12px; border-bottom:1px solid var(--mp-line-2); overflow-x:auto; scrollbar-width:none; }
.mp-acts::-webkit-scrollbar{ display:none; }
.mp-act{
  flex:1 0 64px; max-width:84px; display:flex; flex-direction:column; align-items:center; gap:6px; padding:2px 0; border:0; background:none;
  color:var(--mp-accent); font:inherit; font-size:12.5px; font-weight:500; text-decoration:none; cursor:pointer;
}
.mp-act-ic{ width:40px; height:40px; border-radius:50%; border:1px solid var(--mp-line); display:inline-flex; align-items:center; justify-content:center; background:var(--mp-surface); transition:background .15s ease; }
.mp-act:hover .mp-act-ic{ background:var(--mp-accent-soft); }
.mp-act.is-primary .mp-act-ic{ background:var(--mp-accent); color:var(--mp-accent-ink); border-color:var(--mp-accent); }
.mp-act.is-primary:hover .mp-act-ic{ filter:brightness(.94); }
.mp-act.is-saved .mp-act-ic{ background:var(--mp-accent-soft); }
.mp-act-tx{ color:var(--mp-accent); white-space:nowrap; }

.mp-facts{ list-style:none; margin:0; padding:6px 0; border-bottom:1px solid var(--mp-line-2); }
.mp-fact{ display:flex; align-items:center; gap:16px; padding:9px 16px 9px 22px; font-size:14px; color:var(--mp-ink-2); min-height:44px; }
.mp-fact-ic{ color:var(--mp-accent); display:inline-flex; }
.mp-fact-tx{ flex:1; min-width:0; overflow-wrap:anywhere; line-height:1.45; }
.mp-fact-tx a{ color:var(--mp-accent); text-decoration:none; }
.mp-fact-tx a:hover{ text-decoration:underline; }
.mp-copy{ flex-shrink:0; width:32px; height:32px; border:0; border-radius:50%; background:none; color:var(--mp-ink-4); cursor:pointer; display:inline-flex; align-items:center; justify-content:center; }
.mp-copy:hover{ background:var(--mp-surface-3); color:var(--mp-ink-2); }
.mp-dim{ color:var(--mp-ink-4); }
.mp-hours{ width:100%; }
.mp-hours summary{ cursor:pointer; list-style:none; display:flex; align-items:center; gap:6px; }
.mp-hours summary::-webkit-details-marker{ display:none; }
.mp-hours summary::after{ content:""; width:7px; height:7px; border-right:2px solid var(--mp-ink-4); border-bottom:2px solid var(--mp-ink-4); transform:rotate(45deg); margin:-3px 0 0 4px; }
.mp-hours[open] summary::after{ transform:rotate(-135deg); margin-top:3px; }
.mp-hours-list{ list-style:none; margin:8px 0 0; padding:0; font-size:13.5px; }
.mp-hours-list li{ display:flex; justify-content:space-between; gap:12px; padding:3px 0; color:var(--mp-ink-2); }
.mp-hours-list li.is-today{ font-weight:600; color:var(--mp-ink); }

.mp-sec{ padding:14px 20px; border-bottom:1px solid var(--mp-line-2); }
.mp-sec[hidden]{ display:none; }
.mp-sec > p{ margin:0 0 8px; font-size:14px; line-height:1.55; color:var(--mp-ink-2); }
.mp-h2{ font-size:15.5px; font-weight:600; margin:0 0 10px; color:var(--mp-ink); display:flex; align-items:center; gap:6px; }
.mp-h2 a{ color:inherit; text-decoration:none; }
.mp-h2 a:hover{ color:var(--mp-accent); }
.mp-more{ display:inline-block; margin-top:8px; font-size:14px; font-weight:500; color:var(--mp-accent); text-decoration:none; }
.mp-more:hover{ text-decoration:underline; }
.mp-note{ margin:10px 20px; font-size:14px; line-height:1.55; color:var(--mp-ink-3); }
.mp-note a{ color:var(--mp-accent); }
.mp-err{ color:#c5221f; }
.mp-src{ margin:10px 20px; font-size:12px; line-height:1.5; color:var(--mp-ink-4); }
.mp-src a{ color:inherit; text-decoration:underline; }
.mp-regions{ font-size:13.5px; line-height:1.8; color:var(--mp-ink-3); }
.mp-regions a{ color:var(--mp-accent); text-decoration:none; }

.mp-wiki-img{ float:right; width:104px; height:auto; max-height:120px; object-fit:cover; border-radius:8px; margin:0 0 8px 12px; }
.mp-wiki-desc{ font-weight:600; color:var(--mp-ink-2) !important; }
.mp-wiki-tx{ font-size:14px; line-height:1.6; color:var(--mp-ink-2); }
.mp-wiki-src{ clear:both; font-size:12px !important; color:var(--mp-ink-4) !important; }
.mp-wiki-src a{ color:inherit; }

.mp-chips{ display:flex; flex-wrap:wrap; gap:8px; }
.mp-chip{
  display:inline-flex; align-items:center; gap:6px; padding:6px 12px; border-radius:999px; border:1px solid var(--mp-line);
  background:var(--mp-surface); color:var(--mp-ink-2); font-size:13.5px; font-weight:500; text-decoration:none; cursor:pointer; white-space:nowrap;
  box-shadow:0 1px 1px rgba(60,64,67,.06); transition:background .15s ease, box-shadow .15s ease; font-family:inherit;
}
.mp-chip:hover{ background:var(--mp-surface-2); box-shadow:0 1px 3px rgba(60,64,67,.2); color:var(--mp-ink); }
.mp-chip .mi{ color:var(--mp-ink-3); }
.mp-chips-sm .mp-chip{ font-size:13px; padding:5px 10px; }
.mp-chips-grid{ display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:8px; padding:4px 20px 14px; border-bottom:1px solid var(--mp-line-2); }
.mp-chips-grid .mp-chip{ flex-direction:column; gap:4px; padding:10px 4px; border-radius:12px; font-size:12.5px; white-space:normal; text-align:center; line-height:1.2; }
.mp-chips-grid .mp-chip .mi{ width:22px; height:22px; color:var(--mp-accent); }

.mp-list{ list-style:none; margin:0; padding:0; }
.mp-cols{ display:grid; grid-template-columns:minmax(0,1fr); }
.mp-row{ display:flex; align-items:center; gap:12px; padding:8px 4px; border-radius:10px; color:var(--mp-ink); text-decoration:none; min-height:44px; }
.mp-row:hover{ background:var(--mp-surface-2); }
.mp-row-ic{ flex:0 0 32px; height:32px; border-radius:50%; background:var(--mp-surface-3); color:var(--mp-ink-3); display:inline-flex; align-items:center; justify-content:center; }
.mp-row-img{ flex:0 0 44px; width:44px; height:44px; border-radius:8px; object-fit:cover; }
.mp-row-n{ flex:0 0 26px; height:26px; border-radius:50%; background:var(--mp-red); color:#fff; font-size:12px; font-weight:700; display:inline-flex; align-items:center; justify-content:center; }
.mp-row-main{ flex:1; min-width:0; display:flex; flex-direction:column; gap:1px; }
.mp-row-t{ font-size:14.5px; font-weight:500; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mp-row-s{ font-size:12.8px; color:var(--mp-ink-3); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mp-row-h{ font-size:12.8px; }
.mp-row-r{ flex-shrink:0; font-size:12.8px; color:var(--mp-ink-3); }
.mp-results{ padding:4px 12px 8px; }
.mp-res[hidden]{ display:none; }
.mp-res.is-on .mp-row{ background:var(--mp-accent-soft); }
.mp-srcs-i{ display:flex; flex-direction:column; gap:2px; padding:8px 0; border-bottom:1px solid var(--mp-line-2); font-size:14px; }
.mp-srcs-i:last-child{ border-bottom:0; }
.mp-srcs-i a{ color:var(--mp-accent); font-weight:500; text-decoration:none; }
.mp-srcs-i .mp-row-s{ white-space:normal; }

.mp-tiles{ display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:8px; }
.mp-tile{
  display:grid; grid-template-columns:auto 1fr; grid-template-rows:auto auto; column-gap:10px; align-items:center; text-align:left;
  padding:10px 12px; border:1px solid var(--mp-line); border-radius:12px; background:var(--mp-surface); color:var(--mp-ink); cursor:pointer; font:inherit;
}
.mp-tile:hover{ background:var(--mp-surface-2); }
.mp-tile.is-on{ border-color:var(--mp-accent); background:var(--mp-accent-soft); }
.mp-tile.is-on .mp-tile-ic{ background:var(--mp-accent); color:var(--mp-accent-ink); }
.mp-row-static:hover{ background:none; }
.mp-tile-ic{ grid-row:1 / span 2; width:34px; height:34px; border-radius:10px; background:var(--mp-accent-soft); color:var(--mp-accent); display:inline-flex; align-items:center; justify-content:center; }
.mp-tile-t{ font-size:13.5px; font-weight:600; min-width:0; overflow-wrap:anywhere; hyphens:auto; }
.mp-tile-s{ font-size:12px; color:var(--mp-ink-3); min-width:0; overflow-wrap:anywhere; }
.mp-tip-list{ margin:0; padding-left:18px; font-size:13.5px; line-height:1.6; color:var(--mp-ink-3); }
kbd{ font-family:inherit; font-size:12px; padding:1px 6px; border:1px solid var(--mp-line); border-bottom-width:2px; border-radius:6px; background:var(--mp-surface-2); }

.mp-crumbs ol{ list-style:none; display:flex; flex-wrap:wrap; gap:4px; margin:12px 20px; padding:0; font-size:13px; color:var(--mp-ink-3); }
.mp-crumbs li + li::before{ content:"\203A"; margin-right:4px; color:var(--mp-ink-4); }
.mp-crumbs a{ color:var(--mp-accent); text-decoration:none; }
.mp-crumbs a:hover{ text-decoration:underline; }
.mp-credits{ padding:14px 20px 18px; font-size:11.5px; line-height:1.55; color:var(--mp-ink-4); }
.mp-credits p{ margin:0 0 6px; }
.mp-credits a{ color:inherit; text-decoration:underline; }
.mp-legal a{ text-decoration:none; color:var(--mp-ink-3); }
.mp-legal a:hover{ text-decoration:underline; }

.mp-filters{ display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:0 20px 8px; }
.mp-toggle{ display:inline-flex; align-items:center; gap:6px; font-size:13.5px; color:var(--mp-ink-2); cursor:pointer; }
.mp-toggle input{ width:16px; height:16px; accent-color:var(--mp-accent); }
.mp-pill{
  display:inline-flex; align-items:center; gap:6px; padding:6px 12px; border-radius:999px; border:1px solid var(--mp-line); background:var(--mp-surface);
  color:var(--mp-accent); font:inherit; font-size:13.5px; font-weight:500; cursor:pointer; text-decoration:none; white-space:nowrap;
}
.mp-pill:hover{ background:var(--mp-accent-soft); }
.mp-pill.is-on{ background:var(--mp-accent); color:#fff; border-color:var(--mp-accent); }
.mp-pill[disabled]{ opacity:.5; cursor:default; }
.mp-pill[hidden]{ display:none; }
.mp-btn{ display:inline-flex; align-items:center; justify-content:center; gap:6px; padding:9px 16px; border-radius:999px; border:1px solid var(--mp-line); background:var(--mp-surface); color:var(--mp-ink); font:inherit; font-size:14px; font-weight:500; cursor:pointer; }
.mp-btn-primary{ background:var(--mp-accent); border-color:var(--mp-accent); color:#fff; }
.mp-icon-btn{ flex-shrink:0; width:32px; height:32px; border:0; border-radius:50%; background:none; color:var(--mp-ink-3); cursor:pointer; display:inline-flex; align-items:center; justify-content:center; }
.mp-icon-btn:hover{ background:var(--mp-surface-3); color:#c5221f; }

.mp-feats{ list-style:none; margin:0; padding:0; display:flex; flex-wrap:wrap; gap:8px; }
.mp-feats li{ display:inline-flex; align-items:center; gap:6px; padding:5px 10px; border-radius:999px; background:var(--mp-surface-2); font-size:13px; color:var(--mp-ink-2); }
.mp-feats .mi{ color:var(--mp-ink-3); }

.mp-photo-strip{ display:flex; gap:8px; overflow-x:auto; padding-bottom:4px; scrollbar-width:thin; }
.mp-photo{ position:relative; flex:0 0 132px; height:92px; border:0; padding:0; border-radius:10px; overflow:hidden; background:var(--mp-surface-3); cursor:pointer; }
.mp-photo img{ width:100%; height:100%; object-fit:cover; display:block; transition:transform .2s ease; }
.mp-photo:hover img{ transform:scale(1.05); }
.mp-photo-360{ position:absolute; left:6px; bottom:6px; padding:1px 6px; border-radius:6px; background:rgba(0,0,0,.6); color:#fff; font-size:11px; font-weight:700; }
.mp-nearby-pick{ padding:12px 20px; border-bottom:1px solid var(--mp-line-2); background:var(--mp-surface-2); }

/* ------------------------------------------------------------ directions */
.mp-dir{ padding:4px 16px 8px; }
.mp-modes{ display:flex; gap:6px; margin:0 0 12px; }
.mp-mode{
  flex:1; display:inline-flex; align-items:center; justify-content:center; gap:6px; padding:8px 6px; border-radius:999px; border:1px solid var(--mp-line);
  color:var(--mp-ink-2); font-size:13.5px; font-weight:500; cursor:pointer; position:relative;
}
.mp-mode input{ position:absolute; opacity:0; pointer-events:none; }
.mp-mode.is-on{ background:var(--mp-accent-soft); border-color:#aecbfa; color:var(--mp-accent); }
.mp-mode:focus-within{ outline:2px solid var(--mp-accent); outline-offset:2px; }
.mp-stops{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; position:relative; }
.mp-stop{ position:relative; display:flex; align-items:center; gap:8px; }
.mp-stop-dot{
  flex:0 0 24px; height:24px; border-radius:50%; background:#5f6368; color:#fff; font-size:11px; font-weight:700;
  display:inline-flex; align-items:center; justify-content:center; position:relative;
}
.mp-stop:first-child .mp-stop-dot{ background:#188038; }
.mp-stop-dot.is-dest{ background:var(--mp-red); }
.mp-stop:not(:last-child) .mp-stop-dot::after{ content:""; position:absolute; top:26px; left:11px; width:2px; height:16px; background-image:linear-gradient(var(--mp-ink-4) 50%, transparent 0); background-size:2px 4px; }
.mp-stop input{
  flex:1; min-width:0; border:1px solid var(--mp-line); border-radius:10px; padding:9px 12px; font:inherit; font-size:14.5px; color:var(--mp-ink); background:var(--mp-surface);
}
.mp-stop input:focus{ outline:none; border-color:var(--mp-accent); box-shadow:0 0 0 2px rgba(26,115,232,.2); }
.mp-stop-pick, .mp-stop-x{ flex-shrink:0; width:32px; height:32px; border:0; border-radius:50%; background:none; color:var(--mp-ink-3); cursor:pointer; display:inline-flex; align-items:center; justify-content:center; }
.mp-stop-pick:hover, .mp-stop-x:hover{ background:var(--mp-surface-3); }
.mp-stop-sug{ top:calc(100% + 4px); left:32px; right:0; }
.mp-dir-tools{ display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:12px 0 4px; padding:0 4px; }
.mp-pane > .mp-dir-tools{ padding:0 20px; }
.mp-opts{ position:relative; }
.mp-opts summary{ list-style:none; display:inline-flex; align-items:center; gap:6px; padding:6px 12px; border-radius:999px; border:1px solid var(--mp-line); color:var(--mp-accent); font-size:13.5px; font-weight:500; cursor:pointer; }
.mp-opts summary::-webkit-details-marker{ display:none; }
.mp-opts-body{ position:absolute; z-index:5; top:calc(100% + 6px); left:0; min-width:200px; padding:10px 12px; display:flex; flex-direction:column; gap:8px; background:var(--mp-surface); border:1px solid var(--mp-line); border-radius:12px; box-shadow:var(--mp-shadow-lg); }
.mp-dir-out{ transition:opacity .2s ease; }
.mp-dir-out.is-loading{ opacity:.45; pointer-events:none; }
.mp-dir-hint{ padding:6px 20px 12px; font-size:14px; color:var(--mp-ink-3); display:flex; flex-direction:column; align-items:flex-start; gap:8px; }
.mp-dir-hint p{ margin:0; line-height:1.55; }
.mp-alts{ list-style:none; margin:6px 0 0; padding:0 12px; display:flex; flex-direction:column; gap:6px; }
.mp-alt{
  width:100%; display:grid; grid-template-columns:1fr auto; grid-template-rows:auto auto; gap:2px 12px; text-align:left; padding:10px 12px;
  border:1px solid var(--mp-line); border-radius:12px; background:var(--mp-surface); cursor:pointer; font:inherit; color:var(--mp-ink);
}
.mp-alt.is-on{ border-color:var(--mp-accent); box-shadow:inset 3px 0 0 var(--mp-accent); background:var(--mp-accent-soft); }
.mp-alt-t{ font-size:17px; font-weight:600; color:var(--mp-green); }
.mp-alt-d{ font-size:14px; color:var(--mp-ink-3); align-self:center; }
.mp-alt-v{ grid-column:1 / span 2; font-size:13px; color:var(--mp-ink-3); }
.mp-profile{ margin:12px 16px 0; padding:10px 12px; border:1px solid var(--mp-line); border-radius:12px; }
.mp-profile[hidden]{ display:none; }
.mp-prof-head{ display:flex; align-items:center; gap:6px; flex-wrap:wrap; font-size:13.5px; margin-bottom:6px; }
.mp-prof{ width:100%; height:auto; display:block; }
.mp-prof-area{ fill:rgba(26,115,232,.16); }
.mp-prof-line{ fill:none; stroke:#1a73e8; stroke-width:1.8; }
.mp-prof-tx{ font-size:10px; fill:var(--mp-ink-3); }
.mp-steps-tools{ display:flex; gap:8px; padding:12px 16px 0; }
.mp-leg{ display:flex; align-items:center; flex-wrap:wrap; gap:6px; margin:16px 16px 4px; font-size:14px; font-weight:600; color:var(--mp-ink); }
.mp-steps{ list-style:none; margin:0; padding:4px 8px; }
.mp-step{ display:flex; gap:14px; padding:10px 8px; border-radius:10px; cursor:pointer; }
.mp-step:hover{ background:var(--mp-surface-2); }
.mp-step.is-on{ background:var(--mp-accent-soft); }
.mp-step-ic{ flex:0 0 28px; color:var(--mp-ink-2); display:inline-flex; justify-content:center; padding-top:1px; }
.mp-step-main{ flex:1; min-width:0; display:flex; flex-direction:column; gap:3px; border-bottom:1px solid var(--mp-line-2); padding-bottom:10px; }
.mp-step-t{ font-size:14.5px; line-height:1.45; color:var(--mp-ink); }
.mp-step-d{ font-size:12.8px; color:var(--mp-ink-3); }

/* -------------------------------------------------------- your places */
.mp-saved-i{ display:flex; align-items:center; gap:6px; }
.mp-saved-i .mp-row{ flex:1; min-width:0; }
.mp-saved-list{ flex-shrink:0; max-width:120px; border:1px solid var(--mp-line); border-radius:8px; background:var(--mp-surface); color:var(--mp-ink-2); font:inherit; font-size:12.5px; padding:4px 6px; }

/* ------------------------------------------------------------ the map UI */
.mp-chipbar{ position:absolute; z-index:3; top:10px; left:12px; right:64px; pointer-events:none; }
.mp-chips-bar{ flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; padding:2px 2px 6px; pointer-events:auto; }
.mp-chips-bar::-webkit-scrollbar{ display:none; }
.mp-chips-bar .mp-chip{ box-shadow:0 1px 4px rgba(60,64,67,.3); border-color:transparent; }
.mp-redo{ position:absolute; z-index:3; top:58px; left:50%; transform:translateX(-50%); }
.mp-redo[hidden]{ display:none; }
.mp-redo-btn{ display:inline-flex; align-items:center; gap:6px; padding:8px 16px; border:0; border-radius:999px; background:var(--mp-surface); color:var(--mp-accent); font:inherit; font-size:14px; font-weight:500; box-shadow:var(--mp-shadow); cursor:pointer; }
.mp-redo-btn:hover{ background:var(--mp-surface-2); }
.mp-ctrls{ position:absolute; z-index:3; right:12px; bottom:36px; display:flex; flex-direction:column; align-items:center; gap:10px; }
.mp-ctrls[hidden]{ display:none; }
.mp-ctrl{ width:40px; height:40px; border:0; border-radius:50%; background:var(--mp-surface); color:var(--mp-ink-2); box-shadow:var(--mp-shadow); cursor:pointer; display:inline-flex; align-items:center; justify-content:center; }
.mp-ctrl:hover{ color:var(--mp-ink); background:var(--mp-surface-2); }
.mp-ctrl[aria-pressed="true"]{ color:var(--mp-accent); }
.mp-zoom{ display:flex; flex-direction:column; border-radius:10px; box-shadow:var(--mp-shadow); overflow:hidden; background:var(--mp-surface); }
.mp-zoom .mp-ctrl{ border-radius:0; box-shadow:none; }
.mp-zoom .mp-ctrl + .mp-ctrl{ border-top:1px solid var(--mp-line); }
.mp-compass .mi{ transition:transform .2s ease; }
.mp-layerbtn-wrap{ position:absolute; z-index:3; left:12px; bottom:30px; }
.mp-layerbtn-wrap[hidden]{ display:none; }
.mp-layerbtn{
  position:relative; width:76px; height:76px; padding:0; border:2px solid #fff; border-radius:10px; overflow:hidden; cursor:pointer; box-shadow:var(--mp-shadow);
  background:#ddd;
}
.mp-layerbtn-img{ position:absolute; inset:0; }
.mp-layerbtn-t{ position:absolute; left:0; right:0; bottom:0; display:flex; align-items:center; justify-content:center; gap:4px; padding:3px 0; color:#fff; font-size:12px; font-weight:600; background:linear-gradient(transparent, rgba(0,0,0,.65)); }
.mp-lb-satellite, .mp-lay-base-satellite .mp-lay-thumb{ background:radial-gradient(circle at 30% 30%, #6d7f4b 0 18%, transparent 19%), radial-gradient(circle at 72% 62%, #3d5a3f 0 22%, transparent 23%), linear-gradient(135deg, #556b3f, #2c3d2a 55%, #6a5d43); }
.mp-lb-map, .mp-lay-base-map .mp-lay-thumb{ background:linear-gradient(115deg, transparent 46%, #fff 46% 52%, transparent 52%), linear-gradient(25deg, transparent 60%, #fde293 60% 64%, transparent 64%), radial-gradient(circle at 75% 25%, #aadaff 0 22%, transparent 23%), #e8eaed; }
.mp-lay-base-terrain .mp-lay-thumb{ background:radial-gradient(ellipse at 40% 60%, #c9b98f 0 25%, transparent 26%), radial-gradient(ellipse at 65% 35%, #b5a37a 0 22%, transparent 23%), linear-gradient(140deg, #e7e2cf, #cfc6a8); }
.mp-lay-base-light .mp-lay-thumb{ background:linear-gradient(115deg, transparent 46%, #fff 46% 52%, transparent 52%), radial-gradient(circle at 75% 25%, #d4dadf 0 22%, transparent 23%), #f2f3f4; }
.mp-lay-base-dark .mp-lay-thumb{ background:linear-gradient(115deg, transparent 46%, #3a4452 46% 52%, transparent 52%), radial-gradient(circle at 75% 25%, #17263c 0 22%, transparent 23%), #222b36; }
.mp-layers{
  position:absolute; z-index:8; left:12px; bottom:116px; width:min(360px, calc(100% - 24px)); max-height:calc(100% - 140px); overflow-y:auto;
  background:var(--mp-surface); border-radius:14px; box-shadow:var(--mp-shadow-lg); padding:12px 14px 14px; color:var(--mp-ink);
}
.mp-layers[hidden]{ display:none; }
.mp-lay-head{ display:flex; align-items:center; justify-content:space-between; }
.mp-lay-title{ font-size:15px; font-weight:600; margin:0; }
.mp-lay-x{ width:32px; height:32px; border:0; border-radius:50%; background:none; color:var(--mp-ink-3); cursor:pointer; display:inline-flex; align-items:center; justify-content:center; }
.mp-lay-x:hover{ background:var(--mp-surface-3); }
.mp-lay-bases{ display:grid; grid-template-columns:repeat(5, minmax(0,1fr)); gap:8px; margin:10px 0 4px; }
.mp-lay-base{ display:flex; flex-direction:column; align-items:center; gap:4px; border:0; background:none; padding:0; font:inherit; font-size:12px; color:var(--mp-ink-2); cursor:pointer; }
.mp-lay-thumb{ width:100%; aspect-ratio:1; border-radius:10px; border:2px solid transparent; box-shadow:0 0 0 1px var(--mp-line); }
.mp-lay-base.is-on .mp-lay-thumb{ border-color:var(--mp-accent); }
.mp-lay-base.is-on{ color:var(--mp-accent); font-weight:600; }
.mp-lay-sub{ font-size:12px; font-weight:600; text-transform:uppercase; letter-spacing:.06em; color:var(--mp-ink-3); margin:14px 0 8px; }
.mp-lay-grid{ display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:8px; }
.mp-lay-ov{
  display:flex; flex-direction:column; align-items:center; gap:4px; padding:8px 4px; border:1px solid var(--mp-line); border-radius:10px; background:var(--mp-surface);
  color:var(--mp-ink-2); font:inherit; font-size:12px; line-height:1.2; text-align:center; cursor:pointer;
}
.mp-lay-ov:hover{ background:var(--mp-surface-2); }
.mp-lay-ov.is-on{ border-color:var(--mp-accent); background:var(--mp-accent-soft); color:var(--mp-accent); font-weight:600; }
.mp-lay-foot{ display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-top:14px; padding-top:10px; border-top:1px solid var(--mp-line-2); font-size:13px; color:var(--mp-ink-3); }
.mp-unit{ border:1px solid var(--mp-line); background:var(--mp-surface); color:var(--mp-ink-2); border-radius:8px; padding:3px 9px; font:inherit; font-size:12.5px; cursor:pointer; }
.mp-unit.is-on{ background:var(--mp-ink); color:var(--mp-surface); border-color:var(--mp-ink); }
.mp-lay-measure{ margin-left:auto; display:inline-flex; align-items:center; gap:4px; border:0; background:none; color:var(--mp-accent); font:inherit; font-size:13px; cursor:pointer; }
.mp-lay-about{ color:var(--mp-accent); text-decoration:none; font-size:13px; }
.mp-statusbar{ position:absolute; z-index:4; bottom:34px; left:50%; transform:translateX(-50%); max-width:min(520px, calc(100% - 200px)); padding:7px 14px; border-radius:999px; background:rgba(32,33,36,.9); color:#fff; font-size:13px; text-align:center; pointer-events:none; }
.mp-statusbar[hidden]{ display:none; }
.mp-legend{ position:absolute; z-index:3; bottom:6px; left:50%; transform:translateX(-50%); display:flex; flex-wrap:wrap; justify-content:center; gap:4px 12px; max-width:calc(100% - 190px); padding:4px 10px; border-radius:8px; background:rgba(255,255,255,.92); color:#3c4043; font-size:11.5px; box-shadow:0 1px 3px rgba(0,0,0,.2); }
.mp-legend[hidden]{ display:none; }
.mp-lg{ white-space:nowrap; }
.mp-page .maplibregl-ctrl-bottom-right{ max-width:calc(100% - 96px); }
.mp-lg{ display:inline-flex; align-items:center; gap:4px; }
.mp-lg-dot{ display:inline-block; width:9px; height:9px; border-radius:50%; }
.mp-lg-aq i, .mp-lg-radar i{ display:inline-block; width:10px; height:8px; }
.mp-measure{ position:absolute; z-index:4; top:58px; right:12px; width:260px; padding:10px 12px; border-radius:12px; background:var(--mp-surface); color:var(--mp-ink); box-shadow:var(--mp-shadow-lg); font-size:13.5px; }
.mp-measure[hidden]{ display:none; }
.mp-measure-t{ display:flex; flex-wrap:wrap; align-items:center; gap:4px 8px; margin-bottom:8px; }
.mp-measure-t span{ width:100%; padding-left:26px; }
.mp-measure-b{ display:flex; flex-wrap:wrap; gap:6px; }
.mp-ctx{ position:absolute; z-index:9; min-width:220px; padding:6px 0; border-radius:10px; background:var(--mp-surface); box-shadow:var(--mp-shadow-lg); }
.mp-ctx[hidden]{ display:none; }
.mp-ctx-i{ width:100%; display:flex; align-items:center; gap:12px; padding:8px 16px; border:0; background:none; color:var(--mp-ink); font:inherit; font-size:14px; text-align:left; cursor:pointer; }
.mp-ctx-i:hover, .mp-ctx-i:focus{ background:var(--mp-surface-2); outline:none; }
.mp-ctx-i .mi{ color:var(--mp-ink-3); }
.mp-toast{
  position:absolute; z-index:12; left:50%; bottom:28px; transform:translate(-50%, 20px); padding:10px 18px; border-radius:8px; background:#323232; color:#fff; font-size:14px;
  opacity:0; pointer-events:none; transition:opacity .2s ease, transform .2s ease; max-width:calc(100% - 32px); text-align:center;
}
.mp-toast.is-on{ opacity:1; transform:translate(-50%, 0); }

/* --------------------------------------------------------------- markers */
.mp-mk{ cursor:pointer; }
.mp-mk-pin .mp-mk-body{ fill:#ea4335; stroke:#b31412; stroke-width:1; }
.mp-mk-pin .mp-mk-dot{ fill:#a50e0e; }
.mp-mk-pin svg{ display:block; filter:drop-shadow(0 2px 2px rgba(0,0,0,.35)); }
.mp-mk-res{
  display:inline-flex; align-items:center; gap:4px; max-width:200px; padding:0; border:0; background:none; font:inherit; color:#202124;
}
.mp-mk-res-b{ width:22px; height:22px; border-radius:50%; background:#ea4335; color:#fff; border:2px solid #fff; box-shadow:0 1px 3px rgba(0,0,0,.4); display:inline-flex; align-items:center; justify-content:center; transition:transform .12s ease; }
.mp-mk-res-t{ font-size:12px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; text-shadow:0 0 2px #fff, 0 0 2px #fff, 0 0 3px #fff; }
.mp-mk-res.is-on{ z-index:2; }
.mp-mk-nolabel .mp-mk-res-t, .mp-z-low .mp-mk-res .mp-mk-res-t{ display:none; }
.mp-mk-res:hover .mp-mk-res-t, .mp-mk-res.is-on .mp-mk-res-t{ display:inline; }
.mp-mk-res:hover, .mp-mk-res.is-on{ z-index:3; }
.mp-mk-res.is-on .mp-mk-res-b, .mp-mk-res:hover .mp-mk-res-b{ transform:scale(1.35); background:#b31412; }
.mp-mk-stop{ width:26px; height:26px; border-radius:50%; background:#5f6368; color:#fff; border:2px solid #fff; box-shadow:0 1px 4px rgba(0,0,0,.45); display:inline-flex; align-items:center; justify-content:center; font-size:12px; font-weight:700; }
.mp-mk-stop.is-start{ background:#188038; }
.mp-mk-stop.is-dest{ background:#ea4335; }

/* ------------------------------------------------- MapLibre's own controls */
.mp-page .maplibregl-ctrl-geolocate{ display:none; }
.mp-page .maplibregl-ctrl-bottom-right .maplibregl-ctrl-group{ display:none; }
.mp-page .maplibregl-ctrl-bottom-left{ left:96px; bottom:30px; }
.mp-page .maplibregl-ctrl-scale{ background:rgba(255,255,255,.85); border-color:#5f6368; color:#3c4043; font-size:11px; }
.mp-page .maplibregl-ctrl-attrib{ font-size:11px; }
.mp-page .maplibregl-ctrl-attrib.maplibregl-compact{ margin:0 8px 6px 0; }
.mp-page .maplibregl-user-location-dot, .mp-page .maplibregl-user-location-dot::before{ background-color:#1a73e8; }
.mp-pop .maplibregl-popup-content{ border-radius:12px; padding:12px 32px 12px 14px; box-shadow:var(--mp-shadow-lg); font-size:13.5px; line-height:1.5; color:#202124; }
.mp-pop .maplibregl-popup-close-button{ width:28px; height:28px; font-size:18px; border-radius:50%; }
.mp-pop-b a{ color:#1a73e8; }
.mp-pop-l{ margin:4px 0 2px; padding-left:16px; font-size:12.8px; }
.mp-pop-l li{ margin:1px 0; }
.mp-pop-wiki img{ float:right; width:64px; height:64px; object-fit:cover; border-radius:6px; margin:0 0 6px 10px; }

/* -------------------------------------------------- street-level viewer */
.mp-viewer{ position:fixed; inset:0; z-index:2000; background:#000; display:flex; flex-direction:column; }
.mp-viewer[hidden]{ display:none; }
.mp-v-stage{ position:relative; flex:1; min-height:0; }
.mp-v-gl{ position:absolute; inset:0; width:100%; height:100%; cursor:grab; touch-action:none; }
.mp-v-gl:active{ cursor:grabbing; }
.mp-v-img{ position:absolute; inset:0; width:100%; height:100%; object-fit:contain; }
.mp-v-gl[hidden], .mp-v-img[hidden]{ display:none; }
.mp-v-bar{ display:flex; align-items:center; gap:8px; padding:10px 12px; background:#111; color:#e8eaed; font-size:13px; }
.mp-v-cap{ flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mp-v-cap a{ color:#8ab4f8; }
.mp-v-btn{ width:40px; height:40px; border:0; border-radius:50%; background:#2b2b2b; color:#fff; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; }
.mp-v-btn:hover{ background:#3c3c3c; }
body.mp-viewing{ overflow:hidden; }

/* ------------------------------------------------------- consent dialog */
.mp-dialog-back{ position:fixed; inset:0; z-index:2100; background:rgba(15,23,32,.45); }
.mp-dialog{
  position:fixed; z-index:2101; left:50%; top:50%; transform:translate(-50%,-50%); width:min(460px, calc(100% - 32px));
  background:var(--mp-surface, #fff); color:var(--mp-ink, #1f2328); border-radius:16px; padding:20px 22px; box-shadow:0 24px 60px rgba(0,0,0,.3);
}
.mp-dialog-title{ font-size:18px; font-weight:600; margin:0 0 10px; }
.mp-dialog p{ font-size:14px; line-height:1.55; margin:0 0 10px; }
.mp-dialog-small{ font-size:13px !important; color:var(--mp-ink-3, #5f6875); }
.mp-dialog-error{ color:#c5221f; }
.mp-dialog-actions{ display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; }

/* ---------------------------------------------------------- the footer */
.mp-page .content > footer, .mp-page footer.fs-footer{ position:relative; z-index:1; }

/* ======================================================================
   PHONES: the panel becomes a sheet over the map
   ====================================================================== */
@media (max-width: 767.98px){
  .mp-page{ --mp-peek:118px; }
  .mp-app{ display:block; min-height:380px; }
  .mp-map-wrap{ position:absolute; inset:0; }
  .mp-panel{
    position:absolute; left:0; right:0; top:0; bottom:0; width:auto; flex:none; z-index:8; border-radius:16px 16px 0 0;
    box-shadow:0 -2px 12px rgba(60,64,67,.28); transition:transform .28s cubic-bezier(.2,.7,.2,1); will-change:transform;
  }
  .mp-panel.is-dragging{ transition:none; }
  .mp-panel[data-mp-sheet="peek"]{ transform:translateY(calc(100% - var(--mp-peek))); }
  .mp-panel[data-mp-sheet="half"]{ transform:translateY(46%); }
  .mp-panel[data-mp-sheet="full"]{ transform:translateY(6px); }
  .mp-panel[data-mp-sheet="peek"] .mp-panel-body, .mp-panel[data-mp-sheet="half"] .mp-panel-body{ overflow-y:auto; }
  .mp-panel[data-mp-sheet="half"] .mp-panel-body{ padding-bottom:46%; }
  .mp-sheet-grip{ display:flex; justify-content:center; padding:8px 0 4px; cursor:grab; touch-action:none; }
  .mp-sheet-grip span{ width:36px; height:4px; border-radius:2px; background:#c4c7c5; }
  .mp-panel-top{ touch-action:none; }
  .mp-panel-toggle{ display:none; }
  body.mp-panel-hidden .mp-panel{ margin-left:0; }
  .mp-ph{ padding-top:6px; }
  .mp-title{ font-size:20px; }
  .mp-hero{ height:150px; }
  .mp-chipbar{ top:8px; left:8px; right:8px; }
  .mp-ctrls{ right:10px; bottom:calc(var(--mp-peek) + 18px); gap:8px; }
  .mp-ctrls .mp-compass, .mp-zoom{ display:none; }
  .mp-layerbtn-wrap{ left:10px; bottom:calc(var(--mp-peek) + 18px); }
  .mp-layerbtn{ width:56px; height:56px; }
  .mp-layerbtn-t{ font-size:10.5px; }
  .mp-layers{ left:8px; right:8px; width:auto; bottom:calc(var(--mp-peek) + 84px); max-height:60%; }
  .mp-lay-grid{ grid-template-columns:repeat(3, minmax(0,1fr)); }
  .mp-page .maplibregl-ctrl-bottom-left{ left:74px; bottom:calc(var(--mp-peek) + 16px); }
  .mp-page .maplibregl-ctrl-bottom-right{ bottom:calc(var(--mp-peek) + 4px); }
  .mp-statusbar, .mp-legend{ bottom:calc(var(--mp-peek) + 72px); max-width:calc(100% - 24px); }
  .mp-toast{ bottom:calc(var(--mp-peek) + 24px); }
  .mp-measure{ top:52px; right:8px; left:8px; width:auto; }
  .mp-redo{ top:52px; }
  .mp-chips-grid{ grid-template-columns:repeat(4, minmax(0,1fr)); }
  .mp-chips-grid .mp-chip{ font-size:11.5px; padding:8px 2px; }
  .mp-search-box{ padding-left:10px; }
  .mp-search-dir{ width:42px; }
}
@media (min-width: 768px) and (max-width: 1099.98px){
  .mp-page{ --mp-panel-w:360px; }
}
@media (min-width: 1500px){
  .mp-cols{ grid-template-columns:repeat(2, minmax(0,1fr)); column-gap:8px; }
  .mp-page{ --mp-panel-w:432px; }
}
@media (prefers-reduced-motion: reduce){
  .mp-panel, .mp-panel-toggle, .mp-toast, .mp-photo img{ transition:none !important; }
}

/* ======================================================================
   DARK MODE (html[data-fs-theme="dark"], app.css section 14)
   ====================================================================== */
html[data-fs-theme="dark"] .mp-page{
  --mp-ink:#e3e8ee;
  --mp-ink-2:#c3ccd6;
  --mp-ink-3:#97a4b3;
  --mp-ink-4:#73839a;
  --mp-line:#2b3644;
  --mp-line-2:#222c38;
  --mp-surface:#161d26;
  --mp-surface-2:#1c2530;
  --mp-surface-3:#26313e;
  --mp-page:#0f141b;
  --mp-accent:#8ab4f8;
  --mp-accent-ink:#0b1420;
  --mp-accent-soft:rgba(138,180,248,.14);
  --mp-green:#81c995;
  --mp-amber:#fdd663;
  --mp-shadow:0 1px 3px rgba(0,0,0,.6);
  --mp-shadow-lg:0 6px 22px rgba(0,0,0,.6);
}
html[data-fs-theme="dark"] .mp-open-n, html[data-fs-theme="dark"] .mp-err{ color:#f28b82; }
html[data-fs-theme="dark"] .mp-search-box{ background:#1a222d; border-color:#2a3542; box-shadow:0 2px 10px rgba(0,0,0,.35); }
html[data-fs-theme="dark"] .mp-search-input{ color:#dbe4ee; }
html[data-fs-theme="dark"] .mp-search-input::placeholder{ color:#6f7e90; }
html[data-fs-theme="dark"] .mp-search-clear, html[data-fs-theme="dark"] .mp-search-btn{ color:#c3ccd6; }
html[data-fs-theme="dark"] .mp-search-clear:hover, html[data-fs-theme="dark"] .mp-search-btn:hover{ background:#26313e; }
html[data-fs-theme="dark"] .mp-search-dir{ border-left-color:#2a3542; color:#8ab4f8; }
html[data-fs-theme="dark"] .mp-search-dir:hover{ background:rgba(138,180,248,.14); }
html[data-fs-theme="dark"] .mp-suggest{ background:#1a222d; border-color:#2a3542; box-shadow:0 18px 44px rgba(0,0,0,.6); }
html[data-fs-theme="dark"] .mp-sug{ color:#dbe4ee; }
html[data-fs-theme="dark"] .mp-sug.is-on, html[data-fs-theme="dark"] .mp-sug:hover{ background:#26313e; }
html[data-fs-theme="dark"] .mp-sug-ic{ background:#26313e; color:#c3ccd6; }
html[data-fs-theme="dark"] .mp-sug-s{ color:#97a4b3; }
html[data-fs-theme="dark"] .mp-layerbtn{ border-color:#2b3644; }
html[data-fs-theme="dark"] .mp-legend{ background:rgba(22,29,38,.92); color:#c3ccd6; }
html[data-fs-theme="dark"] .mp-page .maplibregl-ctrl-scale{ background:rgba(22,29,38,.85); color:#c3ccd6; border-color:#97a4b3; }
html[data-fs-theme="dark"] .mp-page .maplibregl-ctrl-attrib{ background:rgba(22,29,38,.85); color:#c3ccd6; }
html[data-fs-theme="dark"] .mp-page .maplibregl-ctrl-attrib a{ color:#c3ccd6; }
html[data-fs-theme="dark"] .mp-pop .maplibregl-popup-content{ background:#161d26; color:#e3e8ee; }
html[data-fs-theme="dark"] .mp-pop .maplibregl-popup-tip{ border-top-color:#161d26; border-bottom-color:#161d26; }
html[data-fs-theme="dark"] .mp-pop-b a{ color:#8ab4f8; }
html[data-fs-theme="dark"] .mp-mk-res-t{ color:#e3e8ee; text-shadow:0 0 2px #000, 0 0 2px #000, 0 0 3px #000; }
html[data-fs-theme="dark"] .mp-dialog-back{ background:rgba(0,0,0,.7); }
html[data-fs-theme="dark"] .mp-map-wrap{ background:#1b2531; }
html[data-fs-theme="dark"] .mp-btn-primary{ color:#0b1420; }
html[data-fs-theme="dark"] .mp-pill.is-on{ color:#0b1420; }
html[data-fs-theme="dark"] .mp-sheet-grip span{ background:#4a5563; }

/* ======================================================================
   PRINT: the map as a picture, then the panel (directions, a place)
   ====================================================================== */
.mp-print-map{ display:none; }
@media print{
  .mp-page .mp-header, .mp-page footer, .mp-map-wrap, .mp-panel-toggle, .mp-panel-top, .mp-sheet-grip, .mp-acts, .mp-ad, .mp-dir, .mp-steps-tools,
  .mp-chips, .mp-photos, .mp-credits .mp-legal, .mp-viewer, .automated-access-notice{ display:none !important; }
  .mp-app{ display:block; height:auto; overflow:visible; }
  .mp-panel{ width:auto; box-shadow:none; transform:none !important; position:static; }
  .mp-panel-body{ overflow:visible; }
  .mp-print-map{ display:block; width:100%; max-height:60vh; object-fit:contain; margin:0 0 12px; }
  .mp-step{ break-inside:avoid; }
}
