/* 1.10: consistent map chrome and touch targets. Basemap colors remain provider data. */
:root{--control-ink:#183c56;--control-blue:#1769ed;--control-shadow:0 6px 22px #10314b30}
.map-scrim{pointer-events:none;background:linear-gradient(180deg,#112f491a,transparent 19%,transparent 75%,#0c2d4210)}
.topbar .brand,.planner-peek,.layers-fab,.map-actions button,
.map-scale,.measure-panel,.poi-search-area-btn,.search-area-btn{backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px)}
.brand{color:#12334d;text-shadow:none;box-shadow:0 6px 22px #102f4526}
.engine-status,.version{box-shadow:0 5px 18px #102f4522}
.layers-fab,.map-actions button{border:1px solid #dae7f0;background:#fffffff5;color:var(--control-ink);box-shadow:var(--control-shadow)}
.layers-fab:hover,.map-actions button:hover{background:#f3f9ff;border-color:#96c3ed}
.layers-fab:active,.map-actions button:active{transform:scale(.94)}
.layers-fab[aria-expanded="true"],.map-actions button[aria-pressed="true"]{background:#e7f2ff;border-color:#78aff2;color:#1359b6}
.map-actions #recenter-btn{background:#1769ed;color:#fff;border-color:#1769ed}
.map-actions #recenter-btn:hover{background:#155fd2;color:#fff}
.map-actions #recenter-btn.active{background:#0d705d;border-color:#0d705d;color:#fff}
.map-actions #map-style-fab,.map-actions #measure-fab{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;line-height:1.1}
.map-actions .control-symbol{font-size:25px;font-weight:750}
.map-actions .control-caption{font-size:9px;font-weight:850;line-height:1.1;max-width:62px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.map-actions #compass-fab{position:relative;display:grid;place-items:center;font-size:19px}
.compass-arrow{display:block;color:#e65b54;font-size:19px;line-height:1;transition:transform .2s ease}
.compass-n{position:absolute;right:8px;bottom:5px;font-size:9px;color:#26445a;font-weight:900}
.map-scale{position:fixed;z-index:610;bottom:27px;left:22px;display:flex;flex-direction:column;align-items:flex-start;gap:2px;background:#fffffff2;border:1px solid #dce9ef;box-shadow:0 3px 15px #10314b23;border-radius:11px;padding:6px 9px;color:#1c455d;font-size:10px;font-weight:850;pointer-events:none}
.map-scale i{display:block;height:5px;min-width:24px;border-left:2px solid #1c455d;border-right:2px solid #1c455d;border-bottom:2px solid #1c455d;box-sizing:border-box}
.measure-panel{position:fixed;z-index:795;left:18px;bottom:18px;width:min(330px,calc(100% - 108px));box-sizing:border-box;border:1px solid #d7e6ee;border-radius:18px;background:#fffffff4;box-shadow:0 12px 38px #092b4550;padding:13px;color:#173e59}
.measure-panel strong{font-size:13px;letter-spacing:-.01em}
.measure-panel p{font-size:12px;line-height:1.4;margin:6px 0 10px;color:#486575}
.measure-panel>div{display:flex;gap:7px}
.measure-panel button{min-height:44px;flex:1;border:1px solid #d1e2ec;border-radius:11px;background:#f1f7fb;color:#1d5272;font-size:11px;font-weight:850}
.measure-panel #measure-done{color:white;border-color:#1769ed;background:#1769ed}
.measure-pin{display:block;width:17px;height:17px;border:3px solid #fff;border-radius:50%;background:#155ed7;box-shadow:0 2px 9px #123f6877;pointer-events:none}
.measure-pin.end{background:#ef7860}
body.measuring .map-poi,body.measuring .place-icon{pointer-events:none}
body.measuring .map-scale,body.nav-active .map-scale,body.arrived .map-scale,
body.viewing-share .map-scale,body.discover-expanded .map-scale{display:none!important}
body.nav-active #map-style-fab,body.nav-active #measure-fab,
body.arrived #map-style-fab,body.arrived #measure-fab,
body.viewing-share .measure-panel{display:none!important}
.style-preview.color{background:
  linear-gradient(22deg,transparent 41%,#f7f4e8 42% 53%,transparent 54%),
  linear-gradient(-38deg,transparent 44%,#faf5e9 45% 55%,transparent 56%),
  linear-gradient(118deg,#b4d6a9 0 33%,#d5e6bf 33% 52%,#cee1ed 52% 69%,#eedfba 69%)}
.map-style-switch{grid-template-columns:repeat(4,minmax(0,1fr))}
.map-style-switch button{border-radius:15px;min-height:96px}
.map-style-switch button[aria-pressed="true"]{background:#eaf4ff;border-color:#1769ed;box-shadow:0 0 0 2px #1769ed24}
.layers-grid button{border-radius:14px;transition:box-shadow .18s,transform .18s}
.layers-grid button:active{transform:scale(.98)}
.layers-grid button[aria-pressed="true"]{background:#eaf4ff;border-color:#7ab7ed}
.discover-scroller button{border-color:#d9e7ef;background:#fffffff4;box-shadow:0 5px 16px #10374e26}
.discover-scroller button[aria-pressed="true"]{background:#1769ed;border-color:#1769ed;color:#fff}
.map-poi{border-radius:12px!important;border-color:#dce8ef!important;background:#fffffff5!important;box-shadow:0 3px 11px #143c532a!important;padding:3px 8px 3px 4px!important}
.map-poi .place-pin-glyph{border-radius:9px!important}
.map-poi.type-castle .place-pin-glyph,.map-poi.type-monument .place-pin-glyph,
.map-poi.type-museum .place-pin-glyph,.map-poi.type-attraction .place-pin-glyph{background:#f0ebff;color:#654aba}
.map-poi.type-nature_reserve .place-pin-glyph,.map-poi.type-beach .place-pin-glyph{background:#e8f4e9;color:#267951}
.poi-search-area-btn,.search-area-btn{border-color:#c7ddf1;background:#fffffff5;color:#165bb1}
.route-card.selected{box-shadow:0 6px 24px #1769ed24}
.navigation{background:#10465d}
.nav-sheet-actions button:focus-visible,.measure-panel button:focus-visible,.map-actions button:focus-visible{outline:3px solid #75aeff;outline-offset:2px}
body.ui-dark .measure-panel,body.ui-dark .map-scale{background:#17364bea;color:#ecf5f9;border-color:#426277}
body.ui-dark .measure-panel p{color:#c3d8e1}
body.ui-dark .measure-panel button{background:#24485e;color:#f1f8fb;border-color:#52748a}
body.ui-dark .measure-panel #measure-done{background:#1769ed;border-color:#1769ed;color:white}
body.ui-dark .map-scale i{border-color:#ecf5f9}
@media(max-width:760px){
  .topbar{left:12px;right:12px}
  .topbar .brand{min-height:46px;border:1px solid #e0eaf2;background:#fffffff2;border-radius:18px;padding:4px 10px 4px 4px;font-size:12px}
  .topbar .brand-icon{width:36px;height:36px;border-radius:13px;font-size:24px}
  .topbar .version{letter-spacing:0;font-size:9px;padding:7px 9px}
  .planner-peek{left:12px;width:calc(100% - 80px);height:54px;border-radius:17px;background:#fffffff4;font-size:15px;font-weight:800}
  .layers-fab{right:12px;width:54px;height:54px;border-radius:17px}
  .map-actions{right:12px;gap:8px;align-items:flex-end}
  .map-actions button,.map-actions #recenter-btn,.map-actions #map-style-fab,.map-actions #measure-fab,.map-actions #compass-fab{width:54px;height:54px;min-width:54px;border-radius:17px}
  .map-actions #reroute-btn,.map-actions #route-overview-fab{width:auto;height:48px;min-width:112px;border-radius:14px}
  .map-scale{left:12px;bottom:calc(86px + env(safe-area-inset-bottom))}
  .measure-panel{left:12px;right:76px;width:auto;bottom:calc(80px + env(safe-area-inset-bottom));padding:12px 13px}
  .style-preview{height:40px}
  .map-style-switch{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}
  .map-style-switch button{min-height:89px;padding:5px 3px 7px;border-radius:12px}
  .map-style-switch strong{font-size:10px;line-height:1.2}
  .map-style-switch small{font-size:9px}
  .discover-bar{top:calc(126px + env(safe-area-inset-top))}
  .discover-results,.place-card,.layers-sheet{box-shadow:0 -12px 44px #0b294638}
  .discover-results,.place-card,.mobile-more{bottom:calc(77px + env(safe-area-inset-bottom))}
  .discover-heading,.place-card-header{padding-top:14px}
  .discover-result{min-height:72px}
  .place-actions button{min-height:50px}
  .mobile-dock{left:8px;right:8px;bottom:calc(6px + env(safe-area-inset-bottom));min-height:63px;border:1px solid #dae7ef;border-radius:20px;box-shadow:0 7px 28px #0b29464b;padding:4px;background:#fffffff5}
  .mobile-dock button{border-radius:15px;min-height:55px;color:#285067}
  .mobile-dock button:active{background:#e9f3ff;transform:scale(.96)}
  .mobile-dock button span{font-size:23px}
  body.ui-dark .mobile-dock{background:#17364bea}
  body.nav-active .navigation{border-radius:19px;background:#10465df5}
  body.nav-active .navigation-stats{border-radius:23px 23px 0 0}
  body.nav-active .map-actions{bottom:calc(var(--nav-stats-height, 157px) + 12px)}
  body.nav-active .layers-fab{top:var(--nav-tools-top,calc(175px + env(safe-area-inset-top)))}
  body.nav-active .map-scale{display:none!important}
  body.planner-minimized.discover-open .measure-panel,body.place-open .measure-panel{display:none}
  body.ui-large .measure-panel p,body.ui-large .mobile-dock button{font-size:14px}
}
@media(max-width:390px){
  .header-meta .version{display:inline-flex}
  .topbar .brand{font-size:11px}
  .topbar .brand-icon{width:32px;height:32px}
  .engine-status{max-width:84px;font-size:8px;padding:7px}
  .map-style-switch small{font-size:8px}
  .measure-panel{right:74px}
}
@media(max-width:340px){.topbar .brand{font-size:10px}.header-meta .version{padding:6px}.map-style-switch{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(prefers-reduced-motion:reduce){.compass-arrow{transition:none}}
