/* Cammino Magnagati v85 — esploratore compatto e sincronizzato */
.explorer-page{padding:36px 0 68px;background:#f7f5f1}
.explorer-intro{max-width:820px;margin-bottom:20px}
.explorer-intro h1{margin:.12em 0 .25em;font-size:clamp(1.9rem,4.5vw,3.1rem);line-height:1.04}
.explorer-intro p{font-size:1.02rem;color:#4d4d4d;max-width:760px}
.explorer-toolbar{display:grid;grid-template-columns:auto minmax(280px,1fr);gap:16px;align-items:end;margin:20px 0}
.explorer-mode{display:flex;gap:9px;flex-wrap:wrap}
.explorer-stage-field{display:flex;flex-direction:column;gap:6px;font-weight:800}
.explorer-stage-field select{width:100%;min-height:46px;border:1px solid #b9b9b9;border-radius:10px;background:#fff;padding:9px 40px 9px 12px;font:inherit;color:#222}
.explorer-card{background:#fff;border:1px solid #ddd;border-radius:16px;overflow:hidden;box-shadow:0 8px 24px rgba(0,0,0,.035)}
.explorer-stage-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;padding:16px 18px;border-bottom:1px solid #e6e6e6}
.explorer-stage-head h2{margin:2px 0 0;font-size:clamp(1.25rem,2.5vw,1.75rem)}
.explorer-variant-note{margin:7px 0 0;color:#666;font-size:.88rem;font-weight:650;line-height:1.35}
.explorer-variant-note[hidden]{display:none}
.explorer-map{height:390px;background:#e8ece7;position:relative}
.explorer-map-message{position:absolute;z-index:700;left:14px;right:14px;top:14px;background:rgba(255,255,255,.95);border:1px solid #d7d7d7;border-radius:9px;padding:10px 12px;color:#444;display:none}
.explorer-map-message.is-visible{display:block}
.explorer-readout{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));height:56px;background:#fff;border-top:1px solid #e5e5e5;border-bottom:1px solid #e5e5e5}
.explorer-readout>div{display:flex;align-items:baseline;justify-content:center;gap:8px;padding:10px 14px;min-width:0;transition:opacity .14s ease}
.explorer-readout>div+div{border-left:1px solid #e7e7e7}
.explorer-readout span{color:#6a6a6a;font-size:.73rem;font-weight:750;text-transform:uppercase;letter-spacing:.035em;white-space:nowrap}
.explorer-readout strong{font-size:1.16rem;color:#171717;white-space:nowrap}
.explorer-readout:not(.is-visible)>div{opacity:0;visibility:hidden}
.profile-shell{padding:14px 18px 10px;background:#fff}
.profile-title-row{display:flex;justify-content:space-between;gap:16px;align-items:center;margin-bottom:6px}
.profile-title-row h3{margin:0;font-size:1.02rem}
.profile-title-row span{font-size:.82rem;color:#6a6a6a;text-align:right}
.route-profile{width:100%;height:180px;display:block;touch-action:none;cursor:crosshair;user-select:none;overflow:visible}
.route-profile .profile-area{fill:rgba(191,6,14,.12)}
.route-profile .profile-line{fill:none;stroke:#bf060e;stroke-width:3;vector-effect:non-scaling-stroke;stroke-linejoin:round;stroke-linecap:round}
.route-profile .profile-grid{stroke:#dedede;stroke-width:1;vector-effect:non-scaling-stroke}
.route-profile .profile-axis{stroke:#888;stroke-width:1;vector-effect:non-scaling-stroke}
.route-profile .profile-cursor{stroke:#1d1d1d;stroke-width:1.5;vector-effect:non-scaling-stroke;opacity:0}
.route-profile .profile-dot{fill:#fff;stroke:#bf060e;stroke-width:3;vector-effect:non-scaling-stroke;opacity:0}
.route-profile.is-active .profile-cursor,.route-profile.is-active .profile-dot{opacity:1}
.route-profile text{font-family:inherit;fill:#666;font-size:12px;font-weight:600}
.explorer-actions{display:flex;gap:10px;flex-wrap:wrap;padding:0 18px 18px}
.explorer-status{padding:28px;text-align:center;color:#555}
.explorer-note{font-size:.88rem;color:#666;margin:16px 2px 0;line-height:1.5}
.explorer-note strong{color:#333}
.explorer-cta{margin-top:24px;padding:20px;border-radius:15px;background:#fff;border:1px solid #ddd;display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap}
.explorer-cta p{margin:4px 0 0;color:#555}
.leaflet-container{font:inherit;background:#e7ebe7}
.leaflet-control-attribution{font-size:10px!important}
.stage-download-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end;align-items:center}
@media(max-width:760px){
 .explorer-page{padding-top:26px}
 .explorer-toolbar{grid-template-columns:1fr}
 .explorer-mode .btn{flex:1}
 .explorer-stage-head{padding:14px 14px 13px;flex-direction:column;gap:6px}
 .explorer-map{height:300px}
 .explorer-readout{height:54px}
 .explorer-readout>div{padding:8px 5px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px}
 .explorer-readout span{font-size:.61rem;letter-spacing:0}
 .explorer-readout strong{font-size:.98rem}
 .profile-shell{padding:12px 10px 8px}
 .profile-title-row{align-items:flex-start;flex-direction:column;gap:2px;margin-bottom:5px}
 .profile-title-row span{text-align:left;font-size:.76rem}
 .route-profile{height:152px}
 .explorer-actions{padding:0 10px 16px}
}
@media(max-width:560px){.stage-download-actions{justify-content:flex-start}}

/* v97 — comandi Leaflet e fullscreen con il profilo sincronizzato. */
.explorer-fit-control,.explorer-fs-control{background:#fff}
.explorer-fit-button,.explorer-fs-button{display:flex;align-items:center;justify-content:center;gap:5px;min-width:40px;min-height:40px;border:0;padding:2px 6px;background:#fff;color:#252525;cursor:pointer;font:800 12px system-ui,-apple-system,sans-serif}
.explorer-fs-button{padding:0 11px;min-width:88px}
.explorer-fit-button:focus-visible,.explorer-fs-button:focus-visible{outline:3px solid #0969aa;outline-offset:1px}
.explorer-fs-overlay{position:fixed!important;inset:0!important;z-index:2147483600!important;display:flex!important;flex-direction:column!important;box-sizing:border-box;width:100vw;height:100vh;height:100dvh;background:#e8ece7;overflow:hidden}
.explorer-fs-overlay .explorer-map{flex:1 1 auto!important;min-height:160px!important;height:auto!important;width:100%!important}
.explorer-fs-overlay .explorer-readout{flex:0 0 auto;min-height:51px}
.explorer-fs-overlay .explorer-readout:not(.is-visible)>div{opacity:1;visibility:visible}
.explorer-fs-overlay .explorer-readout:not(.is-visible) strong{color:#888}
.explorer-fs-overlay .profile-shell{flex:0 0 auto;max-height:min(30dvh,225px);box-sizing:border-box;padding:11px 14px max(10px,env(safe-area-inset-bottom));border-top:2px solid #bf060e;overflow:hidden}
.explorer-fs-overlay .route-profile{height:150px;max-height:calc(30dvh - 50px)}
.explorer-fs-overlay .leaflet-top{top:max(5px,env(safe-area-inset-top))}
.explorer-fs-overlay .leaflet-left{left:max(5px,env(safe-area-inset-left))}
.explorer-fs-overlay .leaflet-right{right:max(5px,env(safe-area-inset-right))}
body.explorer-fs-active{overflow:hidden!important}
@media(max-width:690px){.explorer-fs-overlay .profile-shell{padding:8px 9px max(6px,env(safe-area-inset-bottom))}.explorer-fs-overlay .route-profile{height:114px}.explorer-fs-overlay .explorer-readout{min-height:48px}}
@media(max-height:540px){.explorer-fs-overlay .profile-shell{max-height:133px}.explorer-fs-overlay .route-profile{height:82px}}

.explorer-fs-meta{display:flex;align-items:baseline;justify-content:space-between;gap:10px;font-size:.9rem;margin:0 0 6px;line-height:1.3}.explorer-fs-meta strong{max-width:68%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.explorer-fs-meta span{font-size:.8rem;color:#444;white-space:nowrap;font-weight:650}
@media(max-width:690px){.explorer-fs-meta{font-size:.77rem}.explorer-fs-meta span{font-size:.71rem}.explorer-fs-meta strong{max-width:60%}}
