/* The Directions screen (platform/dir.js) and the /directions page.
 *
 * platform/ui.css's tokens; the storefront has its own copy of them (and the
 * console none), so every token carries ui.css's light value as a fallback.
 * Dark mode comes with the tokens. Map tiles stay plain. No motion but the
 * map's own, and none of that under reduced motion (dir.js). Taps 44 px.
 */
.dir{position:fixed;inset:0;z-index:2147482000;background:var(--bg,#f8f7fb);color:var(--ink,#13111c);
  font-family:var(--sans,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif);
  -webkit-tap-highlight-color:transparent;overscroll-behavior:contain}
.dir [hidden]{display:none!important}
html.dir-on,html.dir-on body{overflow:hidden}
.dir__map{position:absolute;inset:0;background:var(--surface-2,#f4f3f8)}
.dir__map.is-off{background:var(--surface-2,#f4f3f8)}
.dir__x,.dir__aim{width:44px;height:44px;padding:0;border-radius:999px;border:1px solid var(--line,#e6e4ee);
  background:var(--surface,#fff);color:var(--ink,#13111c);display:grid;place-items:center;cursor:pointer;
  box-shadow:var(--lift,0 1px 2px rgba(11,16,32,.04),0 4px 12px -4px rgba(11,16,32,.08))}
.dir__x{position:absolute;z-index:1001;top:calc(12px + env(safe-area-inset-top,0px));left:12px}
.dir__x svg,.dir__aim svg{width:22px;height:22px}
.dir__x:focus-visible,.dir__aim:focus-visible,.dir__m:focus-visible,.dir__go:focus-visible,.dir__st:focus-visible,
.dir__again:focus-visible,.dir__pick a:focus-visible{outline:2px solid var(--brand-fill,#6d28d9);outline-offset:2px}

/* the card: the foot of the screen on a phone, a panel on the left from 900 px */
.dir__card{position:absolute;z-index:1000;left:0;right:0;bottom:0;background:var(--surface,#fff);color:var(--ink,#13111c);
  border-radius:20px 20px 0 0;border-top:1px solid var(--line,#e6e4ee);
  padding:16px 16px calc(16px + env(safe-area-inset-bottom,0px));
  box-shadow:var(--lift-2,0 8px 28px -8px rgba(11,16,32,.18))}
.dir__aim{position:absolute;right:12px;bottom:calc(100% + 36px)}
.dir__credit{position:absolute;right:8px;bottom:calc(100% + 8px);margin:0;padding:2px 6px;border-radius:6px;
  background:rgba(255,255,255,.88);color:#3d3a4a;font-size:11px;line-height:1.5;white-space:nowrap}
.dir__credit a{color:inherit;text-decoration:underline}

.dir__who{display:flex;align-items:center;gap:12px;min-width:0}
.dir__ini{flex:none;width:40px;height:40px;border-radius:12px;display:grid;place-items:center;font-weight:750;font-size:16px;
  background:var(--brand-wash,#f4f1fe);color:var(--brand-ink,#5b21b6)}
.dir__nm{min-width:0;flex:1}
.dir__nm h2{margin:0;font-size:16px;font-weight:720;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dir__nm p{margin:0;font-size:13px;line-height:1.4;color:var(--mute,#6d6982);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.dir__modes{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}
.dir__modes[data-one]{grid-template-columns:1fr}
.dir__m{display:flex;align-items:center;gap:10px;min-height:56px;padding:8px 12px;border-radius:12px;min-width:0;
  border:1px solid var(--line,#e6e4ee);background:var(--surface,#fff);color:var(--ink,#13111c);font:inherit;text-align:left;cursor:pointer}
.dir__m svg{flex:none;width:24px;height:24px;color:var(--mute,#6d6982)}
.dir__m[aria-checked="true"]{background:var(--brand-wash,#f4f1fe);border-color:var(--brand-fill,#6d28d9)}
.dir__m[aria-checked="true"] svg{color:var(--brand-ink,#5b21b6)}
.dir__mt{min-width:0}
.dir__mt b{display:block;font-size:16px;font-weight:750;line-height:1.25;white-space:nowrap}
.dir__mt small{display:block;font-size:12.5px;line-height:1.35;color:var(--mute,#6d6982);white-space:nowrap}
.dir__mt small.dir__skel{width:56px;height:10px;margin-top:5px;border-radius:5px;background:var(--line,#e6e4ee)}

.dir__say{margin:12px 0 0;font-size:14px;line-height:1.45;color:var(--mute,#6d6982)}
.dir__say.is-done{display:flex;align-items:center;gap:6px;color:var(--good,#15803d);font-weight:700;font-size:16px}
.dir__say.is-done svg{width:20px;height:20px}
.dir__fix{margin-top:8px}
.dir__again{height:40px;padding:0 16px;border-radius:12px;border:1px solid var(--line,#e6e4ee);background:var(--surface,#fff);
  color:var(--ink,#13111c);font:inherit;font-weight:650;font-size:14px;cursor:pointer}

.dir__do{display:flex;gap:8px;margin-top:12px}
.dir__go{flex:1;display:inline-flex;align-items:center;justify-content:center;gap:8px;height:48px;border-radius:12px;
  background:var(--brand-fill,#6d28d9);color:#fff;font-weight:700;font-size:16px;text-decoration:none}
.dir__go:hover{background:var(--brand-fill-hover,#5b21b6);color:#fff;text-decoration:none}
.dir__go svg{width:20px;height:20px}
.dir__st{flex:none;height:48px;padding:0 16px;border-radius:12px;border:1px solid var(--line,#e6e4ee);
  background:var(--surface,#fff);color:var(--ink,#13111c);font:inherit;font-weight:650;font-size:14px;cursor:pointer;
  display:inline-flex;align-items:center;gap:6px}
.dir__st svg{width:20px;height:20px}
.dir__st[aria-expanded="true"]{background:var(--surface-2,#f4f3f8)}
.dir__pick{display:grid;gap:8px;margin-top:8px}
.dir__pick a{display:flex;align-items:center;height:44px;padding:0 16px;border-radius:12px;border:1px solid var(--line,#e6e4ee);
  color:var(--ink,#13111c);font-weight:650;font-size:15px;text-decoration:none}
.dir__list{list-style:none;margin:12px 0 0;padding:0;max-height:36vh;overflow:auto;border-top:1px solid var(--line-2,#f0eff5)}
.dir__list li{display:flex;align-items:flex-start;gap:12px;padding:10px 0;border-bottom:1px solid var(--line-2,#f0eff5)}
.dir__list svg{flex:none;width:22px;height:22px;color:var(--brand-ink,#5b21b6)}
.dir__list span{flex:1;min-width:0;font-size:14px;line-height:1.45;overflow-wrap:anywhere}
.dir__list small{flex:none;font-size:12.5px;line-height:1.7;color:var(--mute,#6d6982)}
.dir__sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* on the map: the place, you, the line */
.dir .dir-pin{background:none;border:0}
.dir .dir-pin svg{display:block}
.dir .dir-pin__body{fill:var(--brand-fill,#6d28d9);stroke:#fff;stroke-width:2}
.dir .dir-pin__dot{fill:#fff}
.dir .dir-pin__chip{position:absolute;left:50%;bottom:calc(100% + 2px);transform:translateX(-50%);white-space:nowrap;
  padding:3px 8px;border-radius:999px;background:var(--ink,#13111c);color:var(--surface,#fff);font-size:12px;font-weight:700;line-height:1.4}
/* .dir first: Leaflet's own sheet loads after this one. */
.dir path.dir-line__edge{stroke:#fff;stroke-opacity:1;stroke-width:10;stroke-linecap:round;stroke-linejoin:round;fill:none}
.dir path.dir-line{stroke:var(--brand-fill,#6d28d9);stroke-opacity:1;stroke-width:6;stroke-linecap:round;stroke-linejoin:round;fill:none}
.dir path.dir-line--walk{stroke-width:6;stroke-dasharray:0.5 11}
.dir path.dir-line--crow{stroke-width:4;stroke-dasharray:8 9;stroke-linecap:butt}
.dir path.dir-dot{fill:var(--brand-fill,#6d28d9);fill-opacity:1;stroke:#fff;stroke-width:3;stroke-opacity:1}
.dir path.dir-halo{fill:var(--brand-fill,#6d28d9);fill-opacity:.12;stroke:var(--brand-fill,#6d28d9);stroke-opacity:.35;stroke-width:1}
.dir .leaflet-container{font:inherit;background:var(--surface-2,#f4f3f8)}

@media (min-width:900px){
  .dir__card{left:16px;right:auto;top:72px;bottom:auto;width:400px;max-height:calc(100% - 88px);overflow:auto;
    border:1px solid var(--line,#e6e4ee);border-radius:16px;padding:16px}
  .dir__aim{position:fixed;right:16px;bottom:44px}
  .dir__credit{position:fixed;right:8px;bottom:8px}
  .dir__list{max-height:none}
}

/* the page /directions without a script: the place and two ways there */
.dirpg{min-height:100vh;display:grid;place-items:center;padding:24px 16px;background:var(--bg,#f8f7fb);color:var(--ink,#13111c);
  font-family:var(--sans,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif)}
.dirpg__card{width:100%;max-width:420px;background:var(--surface,#fff);border:1px solid var(--line,#e6e4ee);border-radius:16px;padding:20px}
.dirpg__card h1{margin:0 0 4px;font-size:20px;line-height:1.3}
.dirpg__card p{margin:0 0 16px;color:var(--mute,#6d6982);font-size:14px}
.dirpg__do{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.dirpg__do a{display:flex;align-items:center;justify-content:center;height:48px;border-radius:12px;font-weight:700;text-decoration:none;
  background:var(--brand-fill,#6d28d9);color:#fff}
.dirpg__do a + a{background:var(--brand-wash,#f4f1fe);color:var(--brand-ink,#5b21b6)}
.dirpg__back{display:inline-flex;align-items:center;min-height:44px;margin-top:8px;color:var(--brand-ink,#5b21b6);font-weight:650;text-decoration:none}
