/* Large, readable maps for phone and desktop. Loaded after mobile UX. */
#route .rr-route-map-layout{display:flex;flex-direction:column;gap:0;min-width:0}
#route .rr-route-map-layout>.map{order:0;flex:0 0 auto}
#route .rr-route-map-layout>.map-credit{order:1}
#route .rr-route-map-layout>.rr-nav-panel{order:2;margin-top:8px}
#route .rr-route-map-layout>.map{
  height:clamp(490px,66dvh,800px)!important;
  min-height:0!important;
  width:100%;
}
#home #homeMap,#create #homeMap{height:clamp(335px,48dvh,580px);min-height:335px}
.rr-map-toggle{
  position:absolute;left:14px;bottom:16px;z-index:1100;
  min-width:160px;min-height:48px;border:1px solid #9ec7b3;
  border-radius:14px;padding:10px 14px;
  color:#f9fff9;background:rgba(13,71,54,.94);
  font:800 14px/1.3 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  box-shadow:0 6px 22px rgba(0,0,0,.24);
  cursor:pointer;touch-action:manipulation;
}
.rr-map-toggle:focus-visible{outline:3px solid #ffdd82;outline-offset:3px}
.rr-map-toggle:hover{background:#146b4e}
.app.rr-map-modal-open .content{overflow:hidden!important}
.app .rr-map-expanded{
  position:fixed!important;inset:0!important;
  z-index:2000!important;width:100vw!important;height:100dvh!important;
  min-height:0!important;max-width:none!important;max-height:none!important;
  margin:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;
  display:block!important;background:#e6eee9!important;
}
.app .rr-map-expanded .rr-map-toggle{
  left:16px;bottom:calc(18px + env(safe-area-inset-bottom));z-index:2500;
  min-width:165px;min-height:54px;background:#145b45;
}
.app .rr-map-expanded .map-follow{right:15px!important;bottom:calc(18px + env(safe-area-inset-bottom))!important}
.app .rr-map-expanded .map-label{top:calc(12px + env(safe-area-inset-top))}
.app .rr-map-expanded .gps-state{top:calc(12px + env(safe-area-inset-top))}
@media(min-width:900px){
 #route .rr-route-map-layout{
   display:grid;grid-template-columns:minmax(0,1.8fr) minmax(300px,.68fr);
   grid-template-areas:"map nav" "credit nav";
   column-gap:20px;align-items:start;
 }
 #route .rr-route-map-layout>.map{grid-area:map;order:initial}
 #route .rr-route-map-layout>.map-credit{grid-area:credit;order:initial}
 #route .rr-route-map-layout>.rr-nav-panel{grid-area:nav;order:initial;margin:0}
 #route .rr-route-map-layout>.map{height:clamp(560px,73dvh,960px)!important}
 #home #homeMap,#create #homeMap{height:clamp(470px,62dvh,780px);min-height:470px}
}
@media(min-width:600px) and (max-width:899px){
 #route .rr-route-map-layout>.map{height:clamp(480px,68dvh,720px)!important}
}
@media(max-width:599px){
 #route .rr-route-map-layout>.map{
   height:clamp(435px,67dvh,700px)!important;min-height:0!important;
   margin-bottom:7px;
 }
 #home #homeMap,#create #homeMap{height:clamp(325px,48dvh,535px);min-height:325px}
 #route .rr-route-map-layout>.rr-nav-panel{margin-top:9px}
 .rr-map-toggle{left:11px;bottom:12px;min-height:50px;padding:11px 12px;font-size:13px}
}
@media(orientation:landscape) and (max-height:600px) and (max-width:1050px){
 #route .rr-route-map-layout>.map{height:clamp(270px,76dvh,530px)!important}
 #home #homeMap,#create #homeMap{height:clamp(235px,67dvh,460px);min-height:235px}
 .app .rr-map-expanded{height:100dvh!important}
}

/* Live walking instructions stay visible in full-screen mode. They mirror
   the existing navigation panel; maps underneath remain draggable/zoomable. */
.rr-map-hud{display:none;pointer-events:none}
.app .rr-map-expanded .rr-map-hud{
  display:block;position:absolute;z-index:2300;
  top:calc(61px + env(safe-area-inset-top));
  left:50%;transform:translateX(-50%);width:calc(100% - 24px);
  max-width:570px;padding:13px 15px 11px;border-radius:19px;
  background:rgba(16,43,38,.94);border:1px solid rgba(160,220,185,.68);
  box-shadow:0 14px 35px rgba(0,0,0,.28);color:#f2fff6;
  backdrop-filter:blur(10px);
}
.rr-map-hud-main{display:flex;align-items:center;gap:11px;min-width:0}
.rr-map-hud-arrow{display:grid;place-items:center;flex:0 0 51px;
  width:51px;height:51px;border-radius:14px;background:#276c50;
  color:#effff4;font-size:36px;line-height:1}
.rr-map-hud-copy{display:flex;flex-direction:column;min-width:0;gap:4px}
.rr-map-hud-instruction{font-size:clamp(16px,3.7vw,21px);line-height:1.25;color:#fff;
  overflow-wrap:anywhere}
.rr-map-hud-detail{font-size:13px;line-height:1.35;color:#d5f2e0;overflow-wrap:anywhere}
.rr-map-hud-stats{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;
  gap:6px 12px;margin-top:10px;font-size:12px;line-height:1.35;color:#d5e9df}
.rr-map-hud-stats b{font-size:16px;font-weight:900;color:#fff;margin-left:3px;white-space:nowrap}
.rr-map-hud-gps{padding:4px 7px;border-radius:8px;background:rgba(69,142,105,.55);
  color:#fff;font-size:11px;font-weight:850}
.rr-map-hud-legend{display:block;font-size:10px;line-height:1.35;
  color:#c5dfd0;margin-top:9px}
.rr-map-hud.rr-map-hud-poor{border-color:#d8b777}
.rr-map-hud.rr-map-hud-poor .rr-map-hud-gps{background:#735b29}
.rr-map-hud.rr-map-hud-offtrack{border-color:#f0a095;background:#523332}
.rr-map-hud.rr-map-hud-offtrack .rr-map-hud-arrow{background:#754441}
@media(max-width:599px){
 .app .rr-map-expanded .rr-map-hud{
   top:calc(56px + env(safe-area-inset-top));padding:11px 12px 10px;
   border-radius:16px;
 }
 .rr-map-hud-arrow{flex-basis:43px;width:43px;height:43px;font-size:31px}
 .rr-map-hud-instruction{font-size:16px}
 .rr-map-hud-detail{font-size:12px}
 .rr-map-hud-stats{font-size:11px;margin-top:7px}
 .rr-map-hud-stats b{font-size:14px}
 .rr-map-hud-legend{font-size:10px;margin-top:6px}
}
@media(orientation:landscape) and (max-height:500px){
 .app .rr-map-expanded .rr-map-hud{
   top:calc(42px + env(safe-area-inset-top));padding:7px 11px;
   width:min(540px,calc(100% - 20px));border-radius:13px;
 }
 .rr-map-hud-main{gap:8px}
 .rr-map-hud-arrow{flex-basis:34px;width:34px;height:34px;font-size:26px;border-radius:9px}
 .rr-map-hud-instruction{font-size:14px}
 .rr-map-hud-detail,.rr-map-hud-legend{display:none}
 .rr-map-hud-stats{margin-top:5px;font-size:10px}
 .rr-map-hud-stats b{font-size:12px}
}
