/* Concept A layout (2026-11): the approved board's shapes in the app's own red palette.
   Loaded after style.css and post-flow.css; everything here overrides them, so keep it after both.
   1. Shared pieces (every width): line icons, row cards, section titles, search field, alerts, welcome card.
   2. Phone layout (to 760px wide, not a phone on its side): logo over a full-width search row, the conditions
      pill, a sheet above a tab bar fixed to the bottom edge, and the map credit as the top line of that bar.
   Sizes: headings 28px, section titles 22px, card titles 18px, body 16px, labels and meta 14px. Taps 44px.
   The only art is the logo and the pixel map (row thumbnails are crops of it, mapthumb.js). */

:root {
  --tb: 62px;            /* tab bar height before text scaling */
  --tb-credit: 20px;     /* the map credit line on top of the bar */
  --tb-z: min(var(--ui-scale, 1), 1.2);  /* bars grow less than panels at big text sizes, so the map keeps room */
  --dock: 0px;           /* height taken at the bottom edge by the bar and credit line (set in the phone layout) */
}

/* ---------- 1. Shared pieces ---------- */

.sn-ic { flex: none; display: inline-block; vertical-align: -0.22em; }

/* Row card: map crop, bold title, one meta line, chevron. One button. */
.row-cards { display: grid; gap: 8px; min-width: 0; }
button.row-card, summary.row-card { display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; min-height: 72px; margin: 0; padding: 8px 10px 8px 8px;
  border: 0; border-radius: var(--r-ctl); background-color: var(--field); box-shadow: 0 0 0 1px var(--line); color: var(--ink);
  font: 400 16px/1.3 var(--type); text-align: left; cursor: pointer; }
button.row-card:hover, summary.row-card:hover { background-color: #fff; box-shadow: 0 0 0 1px var(--line-strong); }
.row-card .rc-thumb { flex: none; display: block; width: 72px; height: 56px; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.row-card .rc-thumb.no-thumb { display: none; }  /* no map crop for this spot: the text takes the row */
.row-card .rc-text, .list li .row-card .rc-text { flex: 1 1 0; min-width: 0; display: grid; gap: 3px; font-size: 16px; color: var(--ink); }
.row-card .rc-text strong, .list li .row-card .rc-text strong { font: 700 18px/1.25 var(--head); color: var(--ink); overflow-wrap: anywhere; }
.row-card .rc-meta, .list li .row-card .rc-meta { font-size: 14px; line-height: 1.35; color: var(--ink-soft); overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row-card .rc-open { color: var(--green); font-weight: 700; }
.row-card > .sn-ic { color: var(--ink-soft); }

/* Explore home: titled sections of row cards. */
#sn-results li.home-sec { border-bottom: 0 !important; gap: 10px; grid-template-columns: minmax(0, 1fr); }
#sn-results li.home-sec:not(.role-row) { padding: 10px 2px 8px !important; }
#sn-results li.home-sec:hover, #sn-results li.home-sec:focus { background: none; }
#sn-results .home-sec .sec-t { font: 700 22px/1.2 var(--head) !important; letter-spacing: 0; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.ca-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.ca-head .sec-t { flex: 1 1 auto; }
button.ca-all { flex: none; min-height: 44px; padding: 0 4px; border: 0; font-size: 14px; font-weight: 700; white-space: nowrap; }
#shorenav .list > li > span { font-size: 14px; }
#shorenav .chips button { min-height: 44px; }
.idea-chips { gap: 8px; }
.idea-chips button { min-height: 44px; padding: 6px 14px; font-size: 14px; border-radius: var(--r-pill); }
.browse-all { min-height: 44px; font-size: 16px; }
/* Shore Scout and the seasonal banner: one compact row each */
#sn-results li.sc-home, #sn-results li.occ-banner { margin: 2px 0; min-height: 64px; }
#sn-results li.sc-home b, #sn-results li.occ-banner b { font: 700 18px/1.25 var(--head); }
#sn-results li.sc-home span, #sn-results li.occ-banner span { font-size: 14px; }
#sn-results li.sc-home .chip { min-height: 44px; padding: 4px 16px; }
/* "I need…": one row that opens the buttons */
.need-fold > summary { list-style: none; min-height: 56px; padding-left: 14px; }
.need-fold > summary::-webkit-details-marker { display: none; }
#sn-results .home-sec .need-fold .sec-t { font: 700 18px/1.25 var(--head) !important; }
.need-fold > summary > .sn-ic { transition: transform .15s; }
.need-fold[open] > summary > .sn-ic { transform: rotate(90deg); }
.need-fold[open] > summary { margin-bottom: 8px; }
.need-fold .need-now { margin-top: 8px; }

/* Search: a leading magnifier, the mic at the right end, the gear after it. */
.gsearch-wrap .gs-ico { position: absolute; left: 14px; top: 24px; transform: translateY(-50%); z-index: 1; color: var(--ink-soft); pointer-events: none; }
html #gsearch { min-height: 48px; padding: 10px 14px 10px 44px; font-size: 16px; background: var(--field); border: 1px solid var(--line-strong); border-radius: var(--r-ctl); box-shadow: var(--shadow-sm); }
html .gsearch-wrap.has-mic #gsearch { padding-right: 50px; }
.gsearch-wrap .mic { top: 24px; right: 2px; width: 44px; height: 44px; padding: 0; display: grid; place-items: center; color: var(--ink-soft); }
#gear { display: inline-grid; place-items: center; }

/* Conditions pill: a small weather mark first. */
.today > .sn-ic { align-self: center; color: var(--red); }

/* Weather alerts: one line each until tapped (extras.js adds .open), so they stop covering the map. */
html .alerts { padding: 2px 4px 2px 12px; gap: 0; font-size: 14px; max-height: none; overflow: hidden; cursor: pointer; }
.alerts .alert-row { align-items: center; min-width: 0; min-height: 40px; }
.alerts:not(.open) .alert-row a, .alerts:not(.open) > a { display: block; flex: 1 1 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.alerts > a { min-height: 40px; line-height: 40px; }
.alerts.open > a { line-height: 1.4; padding: 8px 0; }
.alerts.open { max-height: 45dvh; overflow-y: auto; cursor: auto; }
.alerts.open .alert-row { align-items: flex-start; padding: 6px 0; }
.alerts .alert-x { width: 44px; height: 40px; padding: 0; border: 0; font-size: 20px; line-height: 1; background: transparent; color: #fff; box-shadow: none; }

/* Welcome card: one question in the middle of the screen. */
.where-card.first { top: 50%; bottom: auto; transform: translate(-50%, -50%); width: min(400px, calc(100vw - 32px)); gap: 10px; padding: 22px 16px 14px; }
.where-card.first > strong { font: 700 28px/1.15 var(--head); text-align: center; padding: 0 40px; }
.where-card.first > .fine { text-align: center; font-size: 14px; margin: -4px 0 2px; }
.where-field { position: relative; display: block; }
.where-field .sn-ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-soft); pointer-events: none; }
.where-card .where-in { width: 100%; min-height: 50px; padding: 10px 12px 10px 44px; font-size: 16px; }
.where-card .where-here { justify-self: center; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 10px; border: 0; font-size: 16px; font-weight: 700; }
.town-rows { display: grid; gap: 8px; }
.where-card.first .where-row { width: 100%; min-height: 50px; padding: 6px 12px; font: 700 18px/1.2 var(--head); text-align: center; }
.where-card .where-none { margin: 0; font-size: 14px; text-align: center; }
.where-card.first .where-easy { justify-self: center; min-height: 44px; padding: 0 8px; }
.where-card .first-lang { justify-content: center; flex-wrap: wrap; gap: 6px; margin: 0; }
.where-card .first-lang button { min-height: 44px; padding: 2px 14px; font-size: 14px; }
@media (max-height: 640px) { .where-card.first > .fine { display: none; } .where-card.first { gap: 8px; padding-top: 16px; } }

/* The sheet's title line is for the folded phone sheet only. */
#sn-toggle .sn-title { display: none; }
#sn-toggle .sn-chev { display: inline-block; }

/* ---------- 2. Phone layout ---------- */
@media (max-width: 760px) and (orientation: portrait), (max-width: 760px) and (min-height: 521px) {
  :root { --dock: calc(var(--tb) * var(--tb-z) + var(--tb-credit) + env(safe-area-inset-bottom, 0px)); }  /* :root, not html: it must outrank the 0px default above */

  /* Top: logo centered, then search and the gear on one row. */
  html .bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "logo logo" "search gear"; gap: 8px; align-items: center;
    top: calc(8px + env(safe-area-inset-top, 0px)); left: 12px; right: 12px; zoom: var(--tb-z); }
  html .bar h1.h1-mark { grid-area: logo; justify-self: center; margin: 0; }
  html .bar h1.h1-mark img { height: 48px; }
  html .gsearch-wrap { grid-area: search; max-width: none; min-width: 0; margin: 0; }
  html .controls { grid-area: gear; flex-wrap: nowrap; align-items: center; gap: 6px; }
  html .controls #gear { width: 48px; height: 48px; padding: 0; border-width: 0; color: var(--ink); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }

  /* Conditions pill and alerts: the width of the search row. */
  html .today { left: 12px; right: 12px; max-width: none; min-height: 44px; align-items: center; padding: 6px 14px; font-size: 14px; }
  html .alerts { left: 12px; right: 12px; max-width: none; }
  html .live-chips { top: calc(var(--stack, 170px) + 8px); }
  html .toast { top: calc(var(--stack, 170px) + 10px); }

  /* The sheet sits above the tab bar. Folded (peek, or collapsed by code) it is the handle and one title line. */
  html #shorenav { top: auto; left: 8px; right: 8px; width: auto; bottom: calc((var(--dock) + 6px) / var(--ui-scale, 1));
    border-width: 6px 10px 8px; padding-top: 0;
    --room: calc(100dvh - var(--stack, 170px) - var(--dock) - 16px); --full: calc(100dvh - var(--bar-b, 120px) - var(--dock) - 16px); }
  html #shorenav.sheet-half { max-height: calc(min(42dvh, var(--room)) / var(--ui-scale, 1)); }
  html #shorenav.sheet-full, html body.card-open #shorenav.sheet-full { max-height: calc(var(--full) / var(--ui-scale, 1)); }
  html body:not(.card-open) #shorenav.sheet-full:not(.collapsed) { height: calc(var(--full) / var(--ui-scale, 1)); }
  html #shorenav.sheet-peek { max-height: 84px; }
  html #shorenav .grip { display: flex; align-items: center; justify-content: center; height: 20px; margin: 0; }
  html #shorenav .grip i { margin: 0; width: 40px; height: 4px; border-radius: var(--r-pill); background: var(--line-strong); }
  html #shorenav .sn-head { gap: 0; }
  html #shorenav #sn-toggle { display: none; }
  html #shorenav:is(.collapsed, .sheet-peek) #sn-toggle { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-width: 0; min-height: 44px;
    padding: 0 8px; border: 0; transform: none; font: 700 18px/1.2 var(--head); text-align: left; color: var(--ink); }
  html #shorenav #sn-toggle .sn-title { display: block; flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  html #shorenav:is(.collapsed, .sheet-peek) #sn-toggle .sn-chev { transform: rotate(180deg); color: var(--ink-soft); }
  html.detail-open #shorenav:is(.collapsed, .sheet-peek) #sn-toggle { display: none; }  /* a place is open: its name is the title line */
  #sn-results > li.explore-head { display: none; }  /* the first section title leads the sheet */

  /* Tab bar: fixed to the bottom edge, full width, always there. It stays inside the sheet's markup, so the
     sheet must never carry a transform here (a transform would pin the bar to the sheet). */
  html #shorenav .sn-head > [role=tablist].tabs4 { position: fixed; left: 0; right: 0; bottom: 0; z-index: 2; width: auto; min-width: 0;
    zoom: calc(var(--tb-z) / var(--ui-scale, 1));  /* the sheet is zoomed by the text size; the bar by less */
    height: calc(var(--tb) + env(safe-area-inset-bottom, 0px) / var(--tb-z));
    padding: 5px max(8px, env(safe-area-inset-left, 0px)) calc(5px + env(safe-area-inset-bottom, 0px) / var(--tb-z)) max(8px, env(safe-area-inset-right, 0px));
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; align-items: stretch; overflow: visible;
    background: var(--surface); box-shadow: 0 -1px 0 var(--line); }
  html #shorenav .tabs4 [role=tab] { min-height: 0; height: 100%; gap: 3px; padding: 4px 2px; border-radius: 14px; }
  html #shorenav .tabs4 [role=tab] .tab-lbl, html #shorenav .tabs4 [role=tab][aria-selected="false"] .tab-lbl { font-size: 14px; line-height: 1.1; }
  /* You's full-screen page: the bar stays, with You drawn as the active tab */
  html.profile-open body #shorenav { display: flex !important; visibility: hidden; z-index: 71; }
  html.profile-open body #shorenav .tabs4 { visibility: visible; }
  html.profile-open #shorenav .tabs4 #tab-you { background-color: var(--red) !important; color: #fff !important; }
  html.profile-open #shorenav .tabs4 [role=tab][aria-selected="true"]:not(#tab-you) { background-color: transparent !important; color: var(--ink-soft) !important; }
  html.profile-open #shorenav .tabs4 [role=tab][aria-selected="true"]:not(#tab-you) svg { color: var(--ink-soft) !important; }
  html.profile-open .mys { padding-bottom: calc(var(--tb) * var(--tb-z) + env(safe-area-inset-bottom, 0px) + 6px); }
  /* Conditions take the sheet's place; the bar stays. */
  html body.cond-open #shorenav { display: flex; visibility: hidden; }
  html body.cond-open #shorenav .tabs4 { visibility: visible; }
  html .conditions { left: 8px; right: 8px; width: auto; max-height: none; bottom: calc((var(--dock) + 6px) / var(--ui-scale, 1)); z-index: 7; }
  /* While the map is dragged, or the interface is tapped away, the top and the sheet step aside; the bar stays. */
  .bar, .today, .alerts, .locate { transition: opacity .2s, transform .25s; }
  body.map-moving .bar, body.chrome-off .bar, body.map-moving .today, body.chrome-off .today, body.map-moving .alerts, body.chrome-off .alerts { opacity: 0; transform: translateY(-12px); pointer-events: none; }
  body.map-moving .locate, body.chrome-off .locate { opacity: 0; pointer-events: none; }
  body.chrome-off .rr-btn { display: none; }
  html body.map-moving #shorenav, html body.chrome-off #shorenav { opacity: 1; transform: none; visibility: hidden; pointer-events: none; }
  html body.map-moving #shorenav .tabs4, html body.chrome-off #shorenav .tabs4 { visibility: visible; pointer-events: auto; }

  /* Map credit: the top line of the bar area, always visible, never covered. */
  html footer.attrib, html body.chrome-off footer.attrib { left: 0; right: 0; bottom: calc(var(--tb) * var(--tb-z) + env(safe-area-inset-bottom, 0px)); height: var(--tb-credit);
    display: flex; align-items: center; justify-content: center; gap: 4px; padding: 0 10px; border: 0; border-top: 1px solid var(--line); border-radius: 0;
    font-size: 11px; line-height: 1; white-space: nowrap; overflow: hidden; z-index: 6;
    background: var(--surface) !important; color: var(--ink-soft) !important; box-shadow: 0 -4px 12px rgba(20, 16, 10, .1); }
  html footer.attrib a { color: var(--ink-soft) !important; }
  footer.attrib .pages { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }  /* the page links give way first; the credit never does */
  footer.attrib .credit { flex: none; }

  /* Small things that used to sit at the bottom edge now clear the bar. */
  html .sn-tip, html .install-hint, html .rr-card, html .rr-sheet, html .person-pop, html .wx-pop { bottom: calc(var(--dock) + 12px); }
  html .dv-recentre { bottom: calc(var(--dock) + 16px); }

  /* The area card (from Settings) keeps its place low on the screen, above the bar. */
  .where-card:not(.first) { bottom: calc(var(--dock) + 12px); max-height: calc(100dvh - var(--dock) - 90px); }
  /* Welcome card: under the logo, with nothing else on screen but the map and the credit. */
  .where-card.first { --where-top: calc(env(safe-area-inset-top, 0px) + (8px + 48px) * var(--tb-z) + 14px);
    top: var(--where-top); transform: translateX(-50%); max-height: calc(100dvh - var(--where-top) - var(--tb-credit) - env(safe-area-inset-bottom, 0px) - 12px); }
  body:has(.where-card.first) :is(.gsearch-wrap, .controls, .today, .alerts, #shorenav, .locate, .rr-btn) { visibility: hidden; }
  html body:has(.where-card.first) #shorenav .tabs4 { visibility: hidden; }
  html body:has(.where-card.first) footer.attrib { bottom: 0; height: calc(var(--tb-credit) + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px); }
}
@media (max-width: 600px) {
  html .pin-pop { bottom: calc(var(--dock) + 8px); }
}
@media (max-width: 760px) and (max-height: 520px) and (orientation: portrait), (max-width: 760px) and (min-height: 521px) and (max-height: 640px) {
  html #shorenav.sheet-half { max-height: calc(min(36dvh, var(--room)) / var(--ui-scale, 1)); }  /* short screens: leave some map */
}
@media (prefers-reduced-motion: reduce) { .need-fold > summary > .sn-ic { transition: none; } }

/* ---------- 3. Route view, route chip, map controls, driving fixes (2026-11, qol.js / extras.js / app.js) ---------- */

/* Route bar: destination, Drive / Walk / Bike, time and distance, Start, Open in Maps, Steps. Docked above the tab
   bar on phones (the sheet steps aside), a floating card at the bottom on wide screens. */
#route-bar { position: fixed; z-index: 7; left: 50%; bottom: 40px; transform: translateX(-50%); width: min(440px, calc(100vw - 24px)); max-height: min(70dvh, 560px); overflow-y: auto;
  display: grid; gap: 8px; padding: 10px 14px 12px; border-radius: var(--r-ctl); background-color: var(--surface); color: var(--ink);
  box-shadow: var(--shadow-sm), 0 0 0 1px var(--line-strong); font: 400 16px/1.35 var(--type); touch-action: pan-y; }
#route-bar[hidden], #route-chip[hidden] { display: none !important; }
.rb-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rb-head strong { flex: 1 1 0; min-width: 0; font: 700 18px/1.25 var(--head); overflow-wrap: anywhere; }
#route-bar .rb-x, #route-chip .rc-x { flex: none; width: 44px; height: 44px; padding: 0; border: 0 !important; background: transparent !important; box-shadow: none !important; font-size: 24px; line-height: 1; color: var(--ink-soft); }
.rb-modes { display: flex; gap: 6px; }
.rb-modes button { flex: 1 1 0; min-height: 44px; font-size: 14px; }
.rb-sum { margin: 0; font-size: 14px; color: var(--ink-soft); overflow-wrap: anywhere; }
.rb-sum b { font: 700 20px/1.2 var(--head); color: var(--ink); margin-right: 4px; white-space: nowrap; }
.rb-msg { margin: 0; font-size: 16px; }
.rb-busy { color: var(--ink-soft); }
.rb-busy::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: -2px; border: 2px solid var(--line-strong); border-top-color: var(--red); border-radius: 50%; animation: sn-spin .8s linear infinite; }
@keyframes sn-spin { to { transform: rotate(360deg); } }
.rb-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rb-acts > * { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 16px; font-size: 16px; font-weight: 700; border-radius: var(--r-pill); }
.rb-acts .rb-start { flex: 1 1 auto; }
.rb-acts .rb-maps { text-decoration: none; color: var(--ink); background-color: var(--field); box-shadow: 0 0 0 1px var(--line-strong); }
.rb-acts .rb-maps.primary { flex: 1 1 auto; background-color: var(--red); color: #fff; box-shadow: none; }
.rb-steps { margin: 0; padding: 0 0 0 24px; max-height: 30dvh; overflow-y: auto; font-size: 14px; line-height: 1.45; }
.rb-steps li { padding: 4px 0; }
.rb-steps em { font-style: normal; color: var(--ink-soft); }
.rb-note { font-size: 12px; line-height: 1.35; color: var(--ink-soft); }
.rb-steps[hidden], .rb-steps[hidden] + .rb-note { display: none; }  /* the fine print opens with the steps, so the bar stays small */

/* "Route to ..." chip: the way back to a route while something else is on screen. */
#route-chip { position: fixed; z-index: 72; left: 50%; bottom: 40px; transform: translateX(-50%); display: flex; align-items: center; max-width: calc(100vw - 24px);
  border-radius: var(--r-pill); background-color: var(--ink); color: #fff; box-shadow: var(--shadow-sm); }
#route-chip .rc-go { flex: 1 1 auto; min-width: 0; min-height: 44px; padding: 0 2px 0 16px; border: 0 !important; background: transparent !important; box-shadow: none !important;
  color: #fff !important; font: 700 14px/1.2 var(--type); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#route-chip .rc-x { color: #fff !important; }
html.screensaver #route-bar, html.screensaver #route-chip, html.bgmap #route-bar, html.bgmap #route-chip, html.driving #route-chip { display: none !important; }

/* Zoom buttons: the same round style as Near me and Report, stacked above them (extras.js sets the height). */
.zoom-col { position: fixed; right: 14px; bottom: 140px; z-index: 6; display: grid; gap: 8px; transition: opacity .2s; }
.zoom-col .zoom-btn { display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 0 !important; border-radius: 50% !important;
  background-color: var(--field) !important; box-shadow: var(--shadow-sm), 0 0 0 1px var(--line-strong) !important; color: var(--ink); font: 700 24px/1 var(--type); }
.zoom-col.no-room, body.cond-open .zoom-col, html.screensaver .zoom-col, html.profile-open .zoom-col, html.driving .zoom-col, html.bgmap .zoom-col { display: none !important; }

/* Near me while it waits for a fix (up to 10 seconds). */
.locate.busy { outline: 3px solid var(--red); outline-offset: 2px; animation: sn-busy 1s ease-in-out infinite; }
@keyframes sn-busy { 50% { outline-color: transparent; } }

/* Stacked pins: how many are under the one that shows. A tap zooms in until they come apart. */
.mpin .pin-n { position: absolute; top: -6px; right: -10px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--ink); color: #fff;
  font: 700 11px/18px var(--type); font-style: normal; text-align: center; box-shadow: 0 0 0 2px #fff; pointer-events: none; }
body.clean-map .mpin .pin-n { display: none; }

/* Slow or failed map tiles: one quiet line under the top stack. */
.map-slow { position: fixed; z-index: 8; left: 50%; top: calc(var(--stack, 120px) + 8px); transform: translateX(-50%); margin: 0; padding: 6px 14px; max-width: calc(100vw - 24px);
  border-radius: var(--r-pill); background: var(--surface); color: var(--ink); font: 400 14px/1.3 var(--type); text-align: center; box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); pointer-events: none; }
.map-slow[hidden] { display: none; }

/* Search: the line under "No matches". */
#gresults .g-none { list-style: none; padding: 4px 14px 10px; font-size: 14px; line-height: 1.4; color: var(--ink-soft); }

/* Driving mode: the drive bar replaces the top stack (the old rule named .topbar; the header is .bar), the step
   list and Retry / End sit clear of the tab bar and the map credit. */
html.driving .bar, html.driving .today, html.driving .alerts { visibility: hidden; }
#dv-steps { bottom: calc(max(var(--dock), 26px) + 8px); z-index: 69; }
#drive .dv-err { grid-column: 1 / -1; display: flex; gap: 8px; }
#drive .dv-err button { flex: 1 1 0; min-height: 44px; }

/* The sheet follows the finger: no slide while it is being dragged, and the handle takes the whole gesture. */
#shorenav.dragging { transition: none !important; }
#sn-grip { touch-action: none; }

@media (max-width: 760px) and (orientation: portrait), (max-width: 760px) and (min-height: 521px) {
  /* Route view: the bar takes the sheet's place above the tab bar; the map keeps the band above it. */
  #route-bar { left: 8px; right: 8px; width: auto; transform: none; bottom: calc(var(--dock) + 6px); max-height: calc(100dvh - var(--stack, 170px) - var(--dock) - 150px); }
  html.route-view body #shorenav { display: flex !important; visibility: hidden; }
  html.route-view #shorenav .tabs4 { visibility: visible; }
  html.route-view .locate, html.route-view .rr-btn, html.route-view .zoom-col, html.route-view .search-area { display: none !important; }
  /* The chip sits just above the tab bar and the map credit; the sheet and the You page leave it a line. */
  #route-chip { bottom: calc(var(--dock) + 8px); }
  html.route-chip-on #shorenav:not(.sheet-peek):not(.collapsed) { padding-bottom: 52px; }
  html.route-chip-on:has(#shorenav:is(.sheet-peek, .collapsed)) #route-chip { bottom: calc(var(--dock) + 96px); }
  html.route-chip-on.profile-open #route-chip, html.route-chip-on:has(body.cond-open) #route-chip { bottom: calc(var(--dock) + 8px); }
  html.route-chip-on.profile-open .mys { padding-bottom: calc(var(--tb) * var(--tb-z) + env(safe-area-inset-bottom, 0px) + 62px); }
  /* Zoom buttons follow Near me: away while the map moves, a card is open or the sheet is full. */
  body.map-moving .zoom-col, body.chrome-off .zoom-col { opacity: 0; pointer-events: none; }
  html:has(#shorenav.sheet-full) .zoom-col, body.card-open .zoom-col, body:has(.where-card.first) .zoom-col { visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) { .rb-busy::before, .locate.busy { animation: none; } .zoom-col { transition: none; } }
