/* Near, Route and Explore on the phone (phone spec §2): a bottom sheet over the flat map, in Expedition's warm dusk.
   expedition.css's scope also matches these views (its variables, .btn, .chip, the command bar, the markers and the page
   content); this file lays out the sheet and overrides at the same specificity, loaded after expedition.css. */
body[data-mode="phone"]:where([data-tab="near"],[data-tab="route"],[data-tab="explore"]){
  /* MapLibre's attribution rides above the sheet: go.js sets --go-h after each snap */
  .maplibregl-ctrl-bottom-right{bottom:calc(var(--go-h,136px) + 8px);right:8px;transition:bottom .32s var(--ease)}
  .go-probe{position:fixed;top:0;left:0;width:0;height:env(safe-area-inset-top);visibility:hidden;pointer-events:none}
  .go-locate{position:fixed;top:calc(env(safe-area-inset-top) + 12px);right:12px;z-index:9;display:grid;place-items:center;width:44px;height:44px;border-radius:50%;border:1px solid var(--line);background:var(--glass);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);color:var(--teal);font-size:20px;box-shadow:0 4px 14px rgba(0,0,0,.35)}

  /* ---------- the sheet ---------- */
  .go-sheet{position:fixed;left:0;right:0;bottom:var(--bar);z-index:10;display:flex;flex-direction:column;height:136px;border-radius:20px 20px 0 0;border-top:1px solid var(--line);background:var(--glass);backdrop-filter:blur(14px) saturate(1.2);-webkit-backdrop-filter:blur(14px) saturate(1.2);box-shadow:0 -10px 30px rgba(0,0,0,.35);transition:height .32s var(--ease)}
  .go-sheet.drag{transition:none}
  .go-grab{flex:none;padding:0 16px 6px;touch-action:none;cursor:grab;user-select:none;-webkit-user-select:none}
  .go-handle{position:relative;display:block;width:100%;height:28px}
  .go-handle::before{content:"";position:absolute;inset:-16px 0 0} /* a 44 px target with no layout: 16 px over the sheet's top edge, none over the peek strip below */
  .go-handle i{display:block;width:40px;height:5px;margin:0 auto;border-radius:3px;background:rgba(255,246,230,.35)}
  .go-peek{min-height:72px}
  .go-sheet.paged .go-peek{display:none}
  .go-pk{display:grid;grid-template-columns:72px 1fr;gap:12px;align-items:center;width:100%;text-align:left;border-radius:12px}
  .go-pk :is(img,.img-ph,.np){display:block;width:72px;height:72px;border-radius:12px;object-fit:cover;background:var(--c)}
  .go-pk span{min-width:0}
  .go-pk i{display:block;font:600 11px var(--sans);font-style:normal;letter-spacing:.12em;text-transform:uppercase;color:var(--amber)}
  .go-pk b{display:block;font:700 18px/1.2 var(--disp);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .go-pk small{display:block;color:var(--mute);font-size:13px}
  .go-sum{margin:0;padding:12px 0;font:600 16px/1.35 var(--disp);color:var(--text)}
  .go-body,.go-page{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain}
  .go-body{padding:4px 16px 24px}
  .go-hd{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:4px 0 8px}
  .go-hd h2{margin:0;font:700 20px/1.2 var(--disp)}
  .go-hd small{color:var(--mute);font-size:12.5px;text-align:right}

  /* ---------- a page in the sheet ---------- */
  .go-page:focus{outline:0}
  .go-back{position:sticky;top:8px;z-index:2;margin:4px 0 -48px 12px;min-height:44px;background:rgba(28,22,17,.8);backdrop-filter:blur(8px)}
  .go-page .hero{height:220px;border-radius:0}
  .go-page .pbody{padding:16px 18px 28px}
  .go-page h1{font-size:26px}
  .go-page .gal{display:flex;gap:10px;overflow-x:auto;scroll-snap-type:x mandatory;margin:0 -18px;padding:0 18px 4px;scrollbar-width:none}
  .go-page .gal figure{flex:0 0 82%;scroll-snap-align:center}
  .go-page .gal.two figure{flex-basis:60%}
  .go-page .near{grid-template-columns:1fr}
  .go-page .nav a{display:inline-flex;align-items:center;min-height:44px}

  /* ---------- rows (Near, Explore) ---------- */
  .go-note{margin:0 0 10px;padding:12px;border:1px solid var(--line);border-radius:12px;background:rgba(255,226,180,.05);color:var(--text);font-size:14px;line-height:1.45}
  .go-note .btn{margin-top:8px;min-height:44px}
  .go-note a{color:var(--amber)}
  .go-rows{list-style:none;margin:0;padding:0}
  .go-sub{padding:6px 0 2px;font:600 11px var(--sans);letter-spacing:.12em;text-transform:uppercase;color:var(--mute)}
  .go-row{display:flex;align-items:center;gap:12px;padding:8px 0;border-bottom:1px solid var(--line)}
  .go-open{flex:1;min-width:0;display:grid;grid-template-columns:56px 1fr;gap:12px;align-items:center;min-height:56px;text-decoration:none}
  .go-open :is(img,.img-ph,.np){display:block;width:56px;height:56px;border-radius:10px;object-fit:cover;background:var(--c)}
  .go-open span{min-width:0}
  .go-open b{display:block;font-weight:600;line-height:1.25;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .go-open small{color:var(--mute);font-size:12.5px}
  .go-open em{font-style:normal;color:var(--c)}
  .go-nav{flex:none;display:grid;place-items:center;width:44px;height:44px;border-radius:50%;border:1px solid var(--line);background:rgba(94,200,192,.12);color:var(--teal);font-size:18px;text-decoration:none}

  /* ---------- Route ---------- */
  .go-far{margin:-2px 0 10px;color:var(--amber);font-size:13.5px}
  .go-next{margin:0 0 14px;padding:14px;border-radius:16px;border:1px solid var(--line);background:linear-gradient(135deg,rgba(242,180,90,.18),rgba(94,200,192,.1))}
  .go-next .k{margin:0;font:600 11px var(--sans);letter-spacing:.12em;text-transform:uppercase;color:var(--amber)}
  .go-next h3{margin:2px 0;font:700 22px/1.15 var(--disp)}
  .go-next .m{margin:0;color:var(--mute);font-size:13.5px}
  .go-next .acts{display:flex;gap:8px;margin-top:12px}
  .go-next .acts .btn{flex:1;min-height:44px}
  .go-stops{list-style:none;margin:0;padding:0}
  .go-stops li{position:relative;display:flex;align-items:center;gap:4px;padding:2px 0 2px 26px}
  .go-stops li::before{content:"";position:absolute;left:6px;top:20px;width:10px;height:10px;border-radius:50%;background:var(--c);box-shadow:0 0 0 3px var(--deep)}
  .go-stops li::after{content:"";position:absolute;left:10px;top:32px;bottom:-12px;width:2px;background:var(--line)}
  .go-stops li:last-child::after{display:none}
  .go-stops li.done{opacity:.45}
  .go-stops li.moved{animation:e-flash .7s ease-out}
  .go-stops .stop{flex:1;min-width:0;min-height:44px;text-align:left;border-radius:8px}
  .go-stops .stop b{display:block;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .go-stops .stop .here{color:var(--teal);font-size:12px}
  .go-stops .stop small{display:block;color:var(--mute);font-size:12px}
  .go-stops .ctl{display:flex;flex:none}
  .go-stops .ctl button{width:44px;height:44px;border:4px solid transparent;background-clip:padding-box;border-radius:50%;color:var(--mute);font-size:13px} /* a 36 px circle */
  .go-stops .ctl button[aria-pressed=true]{background-color:var(--amber);color:var(--ink)}
  .go-stops .ctl button:disabled{opacity:.3;cursor:default}
  .go-foot{display:flex;flex-wrap:wrap;gap:8px;margin:18px 0 0;padding-top:12px;border-top:1px solid var(--line)}
  .go-foot .btn{min-height:44px} /* 44 px targets (M3): Send to laptop and Offline */
  .go-off{margin:12px 0 0;padding:12px 14px;border:1px solid var(--line);border-radius:14px;background:rgba(255,226,180,.05)} /* the Offline panel (M4) */
  .go-off .st{margin:0;font-weight:600}
  .go-off .acts{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0 0}
  .go-off .btn{min-height:44px}
  .go-off .note{margin:10px 0 0;color:var(--mute);font-size:13px;line-height:1.45}

  /* ---------- Explore: Expedition's command bar and chips, in the sheet ---------- */
  .cmd{margin:0 0 10px}
  #e-q{font-size:16px} /* 16 px: iOS zooms into a smaller input */
  #e-res{position:static;max-height:none;margin-top:6px}
  .chips{flex-wrap:nowrap;overflow-x:auto;margin:0 -16px 8px;padding:4px 16px;scrollbar-width:none}
  .chip{position:relative;flex:none;min-height:36px}
  .chip.scale{min-width:44px}
  .chip::after{content:"";position:absolute;inset:-5px 0} /* a 44 px target: 4 px above and below the 36 px chip, inside the row's padding */
  .status{margin:0 0 4px}
  .go-more{width:100%;margin-top:10px;min-height:44px}
}
