
    :root{
      --bg:#f4f1ea; --panel:#fffdf8; --panel-2:#f8f4ec; --text:#17202a; --muted:#667085;
      --primary:#fc4c02; --primary-dark:#d84200; --primary-soft:#fff1ea; --green:#216e4a;
      --line:rgba(23,32,42,.12); --shadow:0 20px 50px rgba(19,29,44,.18);
      --radius:24px; --panel-width:500px;
    }
    *{box-sizing:border-box} html,body,#app{height:100%;margin:0} body{font-family:Inter,system-ui,-apple-system,"Segoe UI",Arial,sans-serif;color:var(--text);background:var(--bg);overflow:hidden}
    #app{position:relative;width:100%;height:100dvh} #map{position:absolute;inset:0;z-index:1;background:#dfe8dd}
    .topbar{position:absolute;left:18px;top:18px;z-index:500;width:min(var(--panel-width),calc(100vw - 36px));display:grid;gap:10px;pointer-events:none}
    .brand-mini{pointer-events:auto;border-radius:22px;padding:14px 16px;color:#fff;background:linear-gradient(135deg,#216e4a 0%,#4d8d3d 55%,#fc4c02 100%);box-shadow:var(--shadow);display:grid;grid-template-columns:1fr auto;gap:12px;align-items:center}
    .brand-mini h1{font-size:18px;line-height:1.05;margin:0 0 4px;font-weight:900;letter-spacing:-.03em}.brand-mini p{margin:0;font-size:12px;line-height:1.35;opacity:.92}
    .brand-share-btn{width:40px;height:40px;min-width:40px;border:1px solid rgba(255,255,255,.30);border-radius:999px;background:rgba(255,255,255,.16);color:#fff;display:grid;place-items:center;cursor:pointer;box-shadow:inset 0 1px 0 rgba(255,255,255,.20),0 10px 22px rgba(15,23,42,.13);backdrop-filter:blur(8px);transition:background .18s ease,transform .18s ease,box-shadow .18s ease}
    .brand-share-btn:hover{background:rgba(255,255,255,.24);transform:translateY(-1px);box-shadow:inset 0 1px 0 rgba(255,255,255,.24),0 14px 28px rgba(15,23,42,.16)}
    .brand-share-btn svg{width:19px;height:19px;display:block;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
    .brand-actions{display:flex;gap:8px;align-items:center;justify-content:flex-end}
    .brand-info-btn{font-weight:950;font-size:15px;line-height:1}

    .brand-share-toast{position:absolute;left:18px;top:86px;z-index:900;max-width:min(var(--panel-width),calc(100vw - 36px));border-radius:18px;padding:10px 14px;line-height:1.35;background:rgba(23,32,42,.92);color:#fff;font-size:12px;font-weight:850;box-shadow:0 12px 26px rgba(23,32,42,.22);opacity:0;pointer-events:none;transform:translateY(-4px);transition:opacity .18s ease,transform .18s ease}
    .brand-share-toast.is-visible{opacity:1;transform:translateY(0)}
    .municipality-selector-overlay{position:absolute;inset:0;z-index:760;display:none;place-items:center;padding:18px;background:radial-gradient(circle at 20% 10%,rgba(252,76,2,.10),transparent 28%),radial-gradient(circle at 90% 86%,rgba(33,110,74,.12),transparent 30%),rgba(244,241,234,.42);backdrop-filter:blur(3px)}
    body.selector-mode .municipality-selector-overlay{display:grid}
    body.selector-mode .routes-panel,body.selector-mode .empty-state,body.selector-mode .map-floating-btn,body.selector-mode .profile-panel,body.selector-mode .route-detail-panel,body.selector-mode .route-detail-backdrop{display:none!important}
    body.selector-mode .topbar{display:none!important}
    .municipality-selector-card{width:min(520px,calc(100vw - 36px));border-radius:30px;background:rgba(255,253,248,.94);border:1px solid rgba(255,255,255,.78);box-shadow:0 24px 64px rgba(19,29,44,.20);padding:18px;display:grid;gap:14px}
    .municipality-selector-hero{border-radius:24px;padding:18px 18px 20px;color:#fff;background:radial-gradient(circle at 88% 16%,rgba(255,255,255,.32),transparent 24%),linear-gradient(135deg,#216e4a 0%,#4d8d3d 58%,#fc4c02 100%);box-shadow:0 16px 34px rgba(33,110,74,.18)}
    .municipality-selector-hero small{display:block;margin-bottom:7px;font-size:10px;font-weight:950;letter-spacing:.12em;text-transform:uppercase;opacity:.82}.municipality-selector-hero h1{margin:0;font-size:26px;line-height:1.04;letter-spacing:-.04em}.municipality-selector-hero p{margin:8px 0 0;font-size:13px;line-height:1.45;opacity:.92}
    .municipality-select-form{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:end}.municipality-select-form label{display:block;margin:0 0 6px;font-size:11px;font-weight:900;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}.municipality-select-form select{width:100%;height:46px;border-radius:15px;border:1px solid var(--line);background:#fff;padding:0 12px;font-weight:850;color:var(--text)}.municipality-select-form button{height:46px;border:0;border-radius:999px;padding:0 18px;background:linear-gradient(180deg,#ff7a42,#fc4c02);color:#fff;font-weight:950;box-shadow:0 12px 24px rgba(252,76,2,.20);cursor:pointer}
    .municipality-quick-links{display:none!important}.municipality-selector-note{margin:0;color:var(--muted);font-size:12px;line-height:1.45;background:#f8f4ec;border:1px solid var(--line);border-radius:16px;padding:10px 12px}
    @media(max-width:560px){.municipality-selector-card{padding:12px;border-radius:24px}.municipality-selector-hero{padding:16px;border-radius:20px}.municipality-selector-hero h1{font-size:22px}.municipality-select-form{grid-template-columns:1fr}.municipality-quick-links{grid-template-columns:1fr}}
    .municipality-intro-panel{position:absolute;left:18px;top:102px;z-index:455;width:min(var(--panel-width),calc(100vw - 36px));max-height:calc(100dvh - 120px);overflow:auto;border-radius:var(--radius);background:rgba(255,253,248,.94);border:1px solid rgba(255,255,255,.78);box-shadow:var(--shadow);backdrop-filter:blur(18px);padding:14px;display:none;gap:12px}
    body.municipality-intro-mode .municipality-intro-panel{display:grid}
    body.municipality-intro-mode .routes-panel,body.municipality-intro-mode .route-detail-panel,body.municipality-intro-mode .route-detail-backdrop,body.municipality-intro-mode .profile-panel{display:none!important}
    .municipality-intro-media{border-radius:20px;min-height:130px;background:#050505;display:grid;place-items:center;overflow:hidden;border:1px solid rgba(23,32,42,.10)}
    .municipality-intro-media img{max-width:100%;max-height:145px;object-fit:contain;display:block}
    .municipality-intro-body{display:grid;gap:9px;padding:2px 2px 0}
    .municipality-intro-kicker{display:none!important}
    .municipality-intro-body h2{margin:0;font-size:18px;line-height:1.16;letter-spacing:-.03em;color:#111827}
    .municipality-intro-body p{margin:0;color:#4b5563;font-size:13px;line-height:1.52;text-align:justify;text-justify:inter-word}
    .municipality-intro-btn{height:46px;border:0;border-radius:999px;background:linear-gradient(180deg,#ff7a42,#fc4c02);color:#fff;font-weight:950;box-shadow:0 12px 24px rgba(252,76,2,.22);cursor:pointer}
    .municipality-intro-btn:hover{filter:saturate(1.05);transform:translateY(-1px)}
    .routes-panel{position:absolute;left:18px;top:112px;bottom:18px;z-index:450;width:min(var(--panel-width),calc(100vw - 36px));border-radius:var(--radius);background:rgba(255,253,248,.92);border:1px solid rgba(255,255,255,.75);box-shadow:var(--shadow);backdrop-filter:blur(18px);display:flex;flex-direction:column;overflow:hidden;transition:transform .24s ease,opacity .24s ease}
    body.no-routes .routes-panel{display:none!important}.routes-panel.is-closed{transform:translateX(calc(-100% - 28px));opacity:0;pointer-events:none}
    .routes-head{flex:0 0 auto;padding:14px 16px 10px;border-bottom:1px solid var(--line);display:grid;gap:10px;background:linear-gradient(180deg,rgba(255,255,255,.62),rgba(255,255,255,0))}
    .routes-title-row{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.routes-title{display:grid;gap:3px}.routes-title small{font-size:10px;text-transform:uppercase;letter-spacing:.1em;color:var(--primary);font-weight:900}.routes-title strong{font-size:21px;line-height:1.02;letter-spacing:-.04em}.icon-btn{width:38px;height:38px;min-width:38px;border:0;border-radius:999px;background:#fff;box-shadow:0 8px 18px rgba(23,32,42,.10);font-size:18px;cursor:pointer}
    .search-row{display:flex;gap:8px}.search-row input{height:40px;border-radius:14px;border:1px solid var(--line);background:#fff;padding:0 12px;font-weight:700;outline:none;min-width:0;flex:1}.search-row button{width:auto;border:0;border-radius:14px;padding:0 12px;background:var(--primary-soft);color:var(--primary-dark);font-weight:900;cursor:pointer}
    .routes-list{flex:1;overflow-y:auto;padding:12px 12px;display:grid;align-content:start;gap:10px}.routes-list::-webkit-scrollbar{width:10px}.routes-list::-webkit-scrollbar-thumb{background:rgba(102,112,133,.25);border:3px solid transparent;border-radius:999px;background-clip:content-box}
    .route-card{display:grid;grid-template-columns:126px 1fr;gap:10px;min-height:146px;border-radius:22px;background:#fff;border:1px solid var(--line);box-shadow:0 8px 22px rgba(23,32,42,.08);padding:10px;cursor:pointer;transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease}.route-card:hover{transform:translateY(-1px);box-shadow:0 12px 30px rgba(23,32,42,.12)}.route-card.is-active{border-color:rgba(252,76,2,.78);box-shadow:0 0 0 4px rgba(252,76,2,.20),0 14px 34px rgba(252,76,2,.14),0 12px 30px rgba(23,32,42,.12)}
    .photo-wrap{position:relative;min-height:126px;border-radius:17px;overflow:hidden;background:#e9e2d4}.photo-wrap img{width:100%;height:100%;display:block;object-fit:cover}.route-number{position:absolute;left:8px;top:8px;width:32px;height:32px;border-radius:999px;display:grid;place-items:center;background:rgba(255,255,255,.92);color:var(--primary);font-weight:950;font-size:13px;box-shadow:0 6px 14px rgba(23,32,42,.15)}
    .route-info{min-width:0;display:grid;grid-template-rows:auto auto auto auto;gap:6px;padding:2px 2px 2px 0;align-content:stretch}.route-name{margin:0;font-size:14.5px;line-height:1.17;font-weight:900;letter-spacing:-.02em;color:#111827;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:34px}.route-place{font-size:11.5px;color:var(--muted);font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.route-metrics{display:flex;flex-wrap:wrap;gap:5px;align-content:start;min-height:25px}.chip{display:inline-flex;align-items:center;gap:4px;border-radius:999px;padding:5px 7px;font-size:10.5px;line-height:1;font-weight:900;background:#f3f4f6;color:#344054}.chip.easy{background:rgba(37,99,235,.11);color:#1d4ed8}.chip.medium{background:rgba(245,158,11,.14);color:#a15c07}.chip.hard{background:rgba(220,38,38,.12);color:#b42318}
    .route-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;align-items:center;margin-top:auto;min-width:0}.route-actions button,.route-actions a,.route-actions span{height:36px;min-width:0;border-radius:999px;border:1px solid rgba(23,32,42,.10);text-decoration:none;display:inline-flex;align-items:center;justify-content:center;font-size:10.5px;font-weight:950;cursor:pointer;line-height:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:0 8px}.action-btn{background:#fff;color:#344054}.map-btn{background:linear-gradient(180deg,#ff7a42,#fc4c02);color:#fff;border-color:rgba(252,76,2,.34)!important;box-shadow:0 8px 16px rgba(252,76,2,.18)}.wikiloc-btn{background:#eef8ef;color:#216e4a;border-color:rgba(33,110,74,.18)!important;padding:0!important}.wikiloc-logo{width:30px;height:30px;display:block;overflow:visible}.wikiloc-logo .wk-bg{fill:#ffffff;stroke:rgba(33,110,74,.32);stroke-width:1.2}.wikiloc-logo .wk-letter{fill:#216e4a;font-family:Arial,Helvetica,sans-serif;font-size:17px;font-weight:900;letter-spacing:-1px;dominant-baseline:middle}.wikiloc-btn:hover:not(.is-disabled){background:#e4f4e8}.pdf-btn{background:#fff4ee;color:#c2410c;border-color:rgba(252,76,2,.14)!important}.action-btn.is-disabled{opacity:.45;cursor:default;filter:grayscale(.6);pointer-events:none}.action-btn:hover:not(.is-disabled){transform:translateY(-1px);box-shadow:0 7px 14px rgba(23,32,42,.10)}
    
    .map-floating-btn{position:absolute;right:16px;top:18px;z-index:420;display:grid;gap:8px}.map-floating-btn button{width:42px;height:42px;border:0;border-radius:14px;background:rgba(255,255,255,.92);box-shadow:0 12px 26px rgba(23,32,42,.16);font-size:18px;cursor:pointer}.map-floating-btn button.is-active{background:linear-gradient(180deg,#ff7a42,#fc4c02);color:#fff}
    .profile-panel{position:absolute;left:calc(var(--panel-width) + 56px);right:88px;bottom:18px;z-index:430;width:auto;max-width:760px;min-width:360px;margin-left:auto;margin-right:auto;border-radius:22px;padding:14px;background:rgba(255,253,248,.90);border:1px solid rgba(255,255,255,.76);box-shadow:var(--shadow);backdrop-filter:blur(18px);display:none}.profile-panel.is-visible{display:block}.profile-top{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:8px}.profile-title{display:grid;gap:4px}.profile-title strong{font-size:14px}.profile-meta{display:flex;gap:6px;flex-wrap:wrap}.chart-box{height:142px;border-radius:16px;background:#fff;border:1px solid var(--line);padding:8px}
    .empty-state{position:absolute;left:18px;top:142px;z-index:440;width:min(var(--panel-width),calc(100vw - 36px));border-radius:22px;padding:16px;background:rgba(255,253,248,.90);border:1px solid rgba(255,255,255,.78);box-shadow:var(--shadow);display:none}body.no-routes .empty-state{display:block}.empty-state strong{display:block;margin-bottom:4px}.empty-state p{margin:0;color:var(--muted);font-size:13px;line-height:1.45}
    .leaflet-control-attribution{font-size:10px!important}.leaflet-control-zoom{border:0!important;box-shadow:0 12px 26px rgba(23,32,42,.16)!important}.leaflet-control-zoom a{border:0!important}
    @media (min-width: 981px){
      .profile-panel{
        left: calc(var(--panel-width) + 56px) !important;
        right: 88px !important;
        width: auto !important;
        max-width: 760px !important;
        margin-left: auto !important;
        margin-right: auto !important;
      }
      .leaflet-bottom.leaflet-right{
        right: 12px !important;
        bottom: 18px !important;
      }
    }

    @media (max-width:980px){
      .municipality-intro-panel{left:8px;right:8px;top:8px;bottom:8px;width:auto;max-height:none;border-radius:22px;z-index:655;padding:10px}
      .municipality-intro-media{min-height:112px;border-radius:17px}.municipality-intro-media img{max-height:116px}.municipality-intro-body h2{font-size:16px}.municipality-intro-body p{font-size:12.4px;line-height:1.45}
      .topbar{left:10px;top:10px;width:min(390px,calc(100vw - 20px))}.brand-mini{padding:12px 14px;border-radius:18px}.brand-mini h1{font-size:16px}.brand-mini p{font-size:11px}.brand-share-btn{width:38px;height:38px;min-width:38px}.brand-share-toast{left:10px;top:74px;max-width:calc(100vw - 20px)}
      .routes-panel{left:8px;right:8px;top:8px;bottom:8px;width:auto;border-radius:22px;z-index:650}.routes-panel.is-closed{transform:translateY(calc(100% + 18px));opacity:0;pointer-events:none}.routes-head{padding:14px 14px 10px}.routes-title strong{font-size:19px}.routes-list{padding:10px 10px}.route-card{grid-template-columns:124px 1fr;min-height:142px}.photo-wrap{min-height:122px}.profile-panel{left:8px;right:8px;bottom:8px;width:auto;min-width:0;z-index:610;padding:10px;border-radius:18px}.chart-box{height:112px}.map-floating-btn{right:10px;top:10px;z-index:620}.empty-state{left:8px;right:8px;top:84px;width:auto}
      body.panel-open-mobile .profile-panel{display:none!important}
    }
    @media (max-width:380px){.route-card{grid-template-columns:108px 1fr;gap:8px;min-height:132px}.route-name{font-size:13px;min-height:31px}.chip{font-size:10px;padding:4px 6px}.route-actions{gap:5px}.route-actions button,.route-actions a,.route-actions span{height:34px;font-size:9.5px;padding:0 5px}.photo-wrap{min-height:112px}}
    .routes-panel{top:102px;}
    .routes-head{padding:15px 17px 11px;}
    .routes-list{padding:14px 14px;gap:12px;}
    .route-card{
      grid-template-columns:158px minmax(0,1fr);
      gap:14px;
      min-height:178px;
      padding:12px;
      border-radius:24px;
      align-items:stretch;
    }
    .photo-wrap{min-height:154px;border-radius:18px;}
    .route-info{
      grid-template-rows:auto auto minmax(28px,auto) 40px;
      gap:7px;
      min-height:154px;
      align-content:stretch;
    }
    .route-name{font-size:15px;line-height:1.18;min-height:36px;max-height:36px;}
    .route-place{font-size:11.8px;}
    .route-metrics{min-height:28px;max-height:56px;overflow:hidden;}
    .route-actions{height:40px;align-self:end;gap:8px;}
    .route-actions button,.route-actions a,.route-actions span{
      height:40px;
      font-size:10.8px;
      padding:0 7px;
      min-width:0;
      max-width:100%;
    }
    .map-floating-btn{right:16px;top:18px;}
    .map-floating-btn button{font-size:17px;}
    .map-floating-btn button.is-muted{opacity:.55;}
    .poi-dot{border-radius:999px;background:#fff;border:1px solid rgba(23,32,42,.16);box-shadow:0 10px 22px rgba(23,32,42,.22);display:grid;place-items:center;}
    .poi-dot span{width:20px;height:20px;border-radius:999px;background:linear-gradient(180deg,#2e8b57,#216e4a);display:grid;place-items:center;color:#fff;font-size:12px;font-weight:900;}
    .info-backdrop{position:absolute;inset:0;z-index:800;display:none;background:rgba(15,23,42,.24);backdrop-filter:blur(2px);}
    .info-backdrop.is-open{display:block;}
    .info-panel{position:absolute;right:70px;top:18px;z-index:810;width:min(390px,calc(100vw - 96px));max-height:calc(100dvh - 36px);overflow:auto;border-radius:24px;background:rgba(255,253,248,.94);border:1px solid rgba(255,255,255,.76);box-shadow:var(--shadow);padding:14px;display:none;}
    .info-panel.is-open{display:grid;gap:12px;}
    .info-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:13px;border-radius:18px;background:linear-gradient(135deg,#216e4a,#fc4c02);color:#fff;}
    .info-panel-head h2{margin:0;font-size:18px;line-height:1.1;letter-spacing:-.03em;}.info-panel-head small{display:block;margin-bottom:4px;text-transform:uppercase;letter-spacing:.08em;font-size:10px;opacity:.82;font-weight:900;}
    .info-panel-close{width:34px;height:34px;border-radius:999px;border:1px solid rgba(255,255,255,.28);background:rgba(255,255,255,.15);color:#fff;font-size:18px;font-weight:900;cursor:pointer;}
    .info-panel p{margin:0;color:#4b5563;font-size:13px;line-height:1.48;}
    .info-steps{margin:0;padding-left:18px;color:#374151;font-size:13px;line-height:1.45;display:grid;gap:6px;}
    .info-note{padding:10px 12px;border-radius:16px;background:rgba(252,76,2,.08);border:1px solid rgba(252,76,2,.12);font-size:12px!important;color:#7c2d12!important;}
    @media (max-width:980px){
      .routes-panel{top:8px;}
      .routes-list{padding:12px 12px;gap:10px;}
      .route-card{grid-template-columns:138px minmax(0,1fr);gap:11px;min-height:164px;padding:10px;border-radius:22px;}
      .photo-wrap{min-height:142px;}
      .route-info{min-height:142px;grid-template-rows:auto auto minmax(27px,auto) 38px;gap:6px;}
      .route-name{font-size:14px;min-height:34px;max-height:34px;}
      .route-actions{height:38px;gap:6px;}
      .route-actions button,.route-actions a,.route-actions span{height:38px;font-size:10px;padding:0 6px;}
      .info-panel{left:8px;right:8px;top:auto;bottom:8px;width:auto;max-height:min(78dvh,calc(100dvh - 16px));border-radius:20px;}
      .info-backdrop{background:rgba(15,23,42,.32);}
    }
    @media (max-width:420px){
      .route-card{grid-template-columns:126px minmax(0,1fr);gap:9px;min-height:156px;padding:9px;}
      .photo-wrap{min-height:136px;}
      .route-info{min-height:136px;}
      .route-name{font-size:13.2px;line-height:1.17;min-height:31px;max-height:31px;}
      .chip{font-size:9.8px;padding:4px 6px;}
      .route-metrics{max-height:48px;}
      .route-actions{gap:5px;height:36px;}
      .route-actions button,.route-actions a,.route-actions span{height:36px;font-size:9.2px;padding:0 4px;}
    }
    .map-floating-btn button.is-muted{opacity:.45;filter:grayscale(.6)}
    .poi-marker-v5{width:36px;height:42px;position:relative;display:grid;place-items:center;background:transparent;border:0;}
    .poi-marker-v5::before{content:'';position:absolute;left:50%;bottom:3px;width:13px;height:13px;transform:translateX(-50%) rotate(45deg);border-radius:2px;background:var(--poi-bg,#216e4a);box-shadow:0 10px 18px rgba(23,32,42,.18);}
    .poi-marker-v5__circle{position:relative;z-index:2;width:34px;height:34px;border-radius:999px;display:grid;place-items:center;background:#fff;border:1px solid rgba(23,32,42,.16);box-shadow:0 10px 22px rgba(23,32,42,.22);}
    .poi-marker-v5__glyph{width:25px;height:25px;border-radius:999px;display:grid;place-items:center;color:#fff;background:var(--poi-bg,#216e4a);font-size:14px;font-weight:950;line-height:1;}
    .poi-popup-kicker{display:inline-flex;margin-bottom:5px;border-radius:999px;padding:4px 8px;font-size:10px;font-weight:950;letter-spacing:.07em;text-transform:uppercase;background:var(--poi-soft,rgba(33,110,74,.12));color:var(--poi-accent,#216e4a);}
    .user-location-marker{width:22px;height:22px;border-radius:999px;background:#1d4ed8;border:4px solid #fff;box-shadow:0 0 0 4px rgba(29,78,216,.18),0 8px 18px rgba(23,32,42,.25);display:block;}
    .map-floating-btn{right:16px;top:18px;z-index:700;display:grid;gap:8px;}
    .map-floating-btn button{
      width:40px;height:40px;border:1px solid rgba(15,23,42,.10);border-radius:14px;background:rgba(255,255,255,.96);
      box-shadow:0 12px 24px rgba(15,23,42,.14);display:grid;place-items:center;color:#334155;padding:0;backdrop-filter:blur(8px);
      transition:background-color .18s ease,color .18s ease,box-shadow .18s ease,transform .18s ease;
    }
    .map-floating-btn button:hover{background:#f8fafc;color:#0f172a;transform:translateY(-1px);}
    .map-floating-btn button.is-active{background:linear-gradient(180deg,#fc6a21 0%,#fc4c02 100%);color:#fff;box-shadow:inset 0 0 0 1px rgba(255,255,255,.18),0 0 0 2px rgba(252,76,2,.20),0 12px 24px rgba(15,23,42,.14);}
    .map-floating-btn button svg{width:19px;height:19px;display:block;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;}
    .map-floating-btn button svg [fill="currentColor"]{fill:currentColor;stroke:none;}
    .info-menu-intro{margin:0;padding:0 3px;font-size:12px;line-height:1.5;color:#4b5563;}
    .info-menu-list{display:grid;gap:8px;}
    .info-menu-link{display:grid;grid-template-columns:38px 1fr auto;align-items:center;gap:10px;padding:10px;border-radius:16px;background:rgba(255,255,255,.92);border:1px solid rgba(31,41,55,.08);color:#1f2937;text-decoration:none;box-shadow:inset 0 1px 0 rgba(255,255,255,.8),0 8px 18px rgba(31,41,55,.06);transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease,background .18s ease;}
    .info-menu-link:hover,.info-menu-link:focus-visible{transform:translateY(-1px);background:#fff;border-color:rgba(252,76,2,.18);box-shadow:0 12px 24px rgba(31,41,55,.10);outline:none;}
    .info-menu-icon{width:38px;height:38px;display:grid;place-items:center;border-radius:14px;background:var(--primary-soft);color:var(--primary);border:1px solid rgba(252,76,2,.12);font-size:17px;}
    .info-menu-text{display:grid;gap:2px;min-width:0;}.info-menu-text strong{font-size:13px;line-height:1.2;letter-spacing:-.01em;}.info-menu-text span{font-size:11px;line-height:1.35;color:#6b7280;}
    .info-menu-arrow{color:var(--primary);font-weight:900;font-size:16px;}
    .info-panel.info-menu-panel{width:min(380px,calc(100vw - 88px));}
    .poi-marker-v5__glyph svg{width:17px;height:17px;display:block;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;}
    .poi-marker-v5__glyph{font-size:0;}
    .route-actions{grid-template-columns:repeat(3,minmax(0,1fr))}
    .info-route-btn{background:#eef4ff;color:#1d4ed8;border-color:rgba(29,78,216,.14)!important}
    .route-detail-backdrop{display:none!important}
    body.route-detail-mode .routes-panel{display:none!important}
    .route-detail-panel{position:absolute;left:18px;top:112px;bottom:18px;z-index:650;width:min(var(--panel-width),calc(100vw - 36px));max-height:none;overflow:auto;border-radius:var(--radius);background:rgba(255,253,248,.94);border:1px solid rgba(255,255,255,.78);box-shadow:var(--shadow);backdrop-filter:blur(20px);padding:12px;display:none}
    .route-detail-panel.is-open{display:grid;gap:9px;align-content:start}
    .route-detail-panel::-webkit-scrollbar{width:10px}.route-detail-panel::-webkit-scrollbar-thumb{background:rgba(102,112,133,.25);border:3px solid transparent;border-radius:999px;background-clip:content-box}
    .route-detail-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:12px;border-radius:20px;color:#fff;background:linear-gradient(135deg,#216e4a 0%,#4d8d3d 55%,#fc4c02 100%);box-shadow:0 14px 28px rgba(33,110,74,.18)}
    .route-detail-head small{display:block;font-size:10px;text-transform:uppercase;letter-spacing:.09em;font-weight:950;opacity:.82;margin-bottom:4px}
    .route-detail-head h2{font-size:16px;line-height:1.12;margin:0;font-weight:950;letter-spacing:-.03em}
    .route-detail-close{width:34px;height:34px;border-radius:999px;border:1px solid rgba(255,255,255,.30);background:rgba(255,255,255,.16);color:#fff;font-size:20px;line-height:1;cursor:pointer}
    .route-detail-hero{border-radius:18px;overflow:hidden;border:1px solid rgba(23,32,42,.08);background:#f7f3ea;box-shadow:inset 0 1px 0 rgba(255,255,255,.78)}
    .route-detail-hero img{display:block;width:100%;height:126px;object-fit:cover;object-position:center;}
    .route-detail-summary{display:grid;gap:7px;margin:0;font-size:12.5px;line-height:1.43;color:#344054;text-align:justify;hyphens:auto;}
    .route-detail-summary p{margin:0}.route-detail-summary .route-detail-lead{font-weight:700;color:#243447}
    .route-detail-summary .route-detail-block{padding:8px 9px;border-radius:14px;background:#fff;border:1px solid rgba(23,32,42,.08);text-align:justify}
    .route-detail-summary .route-detail-block strong{display:block;margin-bottom:3px;color:#17202a;font-size:11px;letter-spacing:.06em;text-transform:uppercase}
    .route-detail-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-top:-2px}
    .route-detail-gallery a{display:block;border-radius:14px;overflow:hidden;border:1px solid rgba(23,32,42,.08);background:#f7f3ea;box-shadow:inset 0 1px 0 rgba(255,255,255,.78)}
    .route-detail-gallery img{display:block;width:100%;height:70px;object-fit:cover;transition:transform .18s ease}
    .route-detail-gallery a:hover img{transform:scale(1.04)}
    .route-detail-gallery[hidden]{display:none!important}
    .route-detail-section-title{display:flex;align-items:center;gap:8px;margin:2px 0 -2px;font-size:10.5px;font-weight:950;letter-spacing:.08em;text-transform:uppercase;color:#667085;}
    .route-detail-section-title::before{content:'';width:8px;height:8px;border-radius:999px;background:var(--primary);box-shadow:0 0 0 4px rgba(252,76,2,.10);}
    .route-detail-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
    .route-detail-grid-compact{margin-top:-2px}
    .route-detail-section-title-first{margin-top:0}
    .route-detail-item{padding:7px 8px;border-radius:14px;background:#fff;border:1px solid rgba(23,32,42,.08);box-shadow:inset 0 1px 0 rgba(255,255,255,.8);display:grid;grid-template-columns:22px minmax(0,1fr);gap:6px;align-items:center;min-height:48px}
    .route-detail-icon{width:22px;height:22px;border-radius:999px;display:grid;place-items:center;background:rgba(252,76,2,.09);color:var(--primary);font-size:12px;font-weight:950;line-height:1;flex:0 0 auto}
    .route-detail-item small{display:block;font-size:8.2px;text-transform:uppercase;letter-spacing:.055em;color:#667085;font-weight:900;margin-bottom:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
    .route-detail-item strong{display:block;font-size:11.3px;line-height:1.16;color:#17202a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
    .route-detail-note{margin:0;padding:9px 10px;border-radius:15px;background:rgba(33,110,74,.08);border:1px solid rgba(33,110,74,.12);color:#315b46!important;font-size:11.5px!important;line-height:1.42!important;text-align:left!important;}
    .route-detail-trace-btn{height:44px;border:0;border-radius:999px;background:linear-gradient(180deg,#ff7a42 0%,var(--primary) 100%);color:#fff;font-weight:950;cursor:pointer;box-shadow:0 12px 24px rgba(252,76,2,.22);display:flex;align-items:center;justify-content:center;gap:8px}
    .route-detail-trace-btn:hover{filter:saturate(1.05);transform:translateY(-1px)}
    @media (max-width:980px){
      .route-detail-panel{left:8px;right:8px;top:8px;bottom:8px;width:auto;max-height:none;border-radius:22px;z-index:680;padding:10px}
      body.route-detail-mode .profile-panel{display:none!important}
      .route-detail-head h2{font-size:15px}
      .route-detail-hero img{height:116px}
      .route-detail-summary{font-size:12.1px;line-height:1.4}
      .route-detail-grid{grid-template-columns:1fr 1fr}
      .route-detail-item{min-height:45px;padding:7px 8px}
      .route-detail-item strong{font-size:11.1px}
      .map-floating-btn{top:10px;right:10px;z-index:620}
    }
    @media (max-width:380px){.route-detail-grid{grid-template-columns:1fr}.route-detail-gallery{grid-template-columns:1fr 1fr}.route-detail-gallery img{height:66px}.route-detail-hero img{height:120px}}
    @media(max-width:430px){
      .route-actions button,.route-actions a,.route-actions span{font-size:10px;padding:0 5px}
    }
    .route-cursor-pulse{
      width:14px;height:14px;border-radius:999px;background:#9a4f2f;border:3px solid rgba(255,255,255,.96);
      box-shadow:0 0 0 4px rgba(154,79,47,.14),0 7px 15px rgba(15,23,42,.22);display:block;
    }
    .route-km-marker{background:transparent!important;border:0!important;}
    .route-km-marker-inner{
      width:28px;height:28px;padding:0;border-radius:999px;display:flex;flex-direction:column;align-items:center;justify-content:center;
      background:rgba(255,253,248,.96);border:1px solid rgba(252,76,2,.30);color:#b63b0a;
      box-shadow:0 7px 15px rgba(15,23,42,.16);white-space:nowrap;backdrop-filter:blur(8px);line-height:1;
    }
    .route-km-marker-inner strong{display:block;font-size:10.5px;font-weight:950;line-height:.95;letter-spacing:-.02em;}
    .route-km-marker-inner small{display:block;margin-top:1px;font-size:6.8px;font-weight:900;text-transform:uppercase;letter-spacing:.02em;opacity:.82;}
    @media (max-width:980px){
      .route-km-marker-inner{width:25px;height:25px;}
      .route-km-marker-inner strong{font-size:9.5px;}
      .route-km-marker-inner small{font-size:6.2px;}
    }
    @media (max-width:980px){
      body:not(.panel-open-mobile):not(.selector-mode) .map-floating-btn{
        top:44%!important;right:10px!important;transform:translateY(-50%)!important;
      }
      body.panel-open-mobile .map-floating-btn,
      body.route-detail-mode .map-floating-btn,
      body.selector-mode .map-floating-btn{
        transform:none!important;
      }
    }


    /* V46 FINAL · Mejora de nitidez visual en móvil
       Mantiene la carga y estructura de V44, pero evita que la ficha ampliada
       comprima demasiado la foto y el texto en pantallas pequeñas. */
    @media (max-width:980px){
      .route-detail-panel{
        padding:12px;
      }
      .route-detail-hero img{
        height:clamp(170px, 42vw, 240px) !important;
        object-fit:cover;
        object-position:center;
        image-rendering:auto;
      }
      .route-detail-summary{
        font-size:13.15px !important;
        line-height:1.52 !important;
        letter-spacing:.002em;
      }
      .route-detail-summary .route-detail-block{
        padding:10px 11px;
      }
      .route-detail-gallery{
        gap:8px;
      }
      .route-detail-gallery img{
        height:88px !important;
      }
      .route-detail-item{
        min-height:48px;
      }
      .route-detail-item strong{
        font-size:11.7px;
        line-height:1.18;
      }
    }
    @media (max-width:420px){
      .route-detail-hero img{
        height:180px !important;
      }
      .route-detail-gallery img{
        height:82px !important;
      }
      .route-detail-summary{
        font-size:13px !important;
        line-height:1.5 !important;
      }
    }
    @media (max-width:380px){
      .route-detail-hero img{
        height:170px !important;
      }
      .route-detail-gallery{
        grid-template-columns:1fr 1fr;
      }
      .route-detail-gallery img{
        height:78px !important;
      }
    }


    /* V51 · La foto principal queda solo en la tarjeta del sendero.
       Dentro de la ficha Info se elimina la imagen grande y se refuerza
       la galería interior de tres fotos procedentes del Excel. */
    .route-detail-hero{display:none!important;}
    .route-detail-gallery{
      grid-template-columns:repeat(3,minmax(0,1fr));
      gap:9px;
      margin-top:0;
      margin-bottom:2px;
    }
    .route-detail-gallery a{
      border-radius:16px;
      box-shadow:0 7px 16px rgba(23,32,42,.08), inset 0 1px 0 rgba(255,255,255,.78);
    }
    .route-detail-gallery img{
      height:108px!important;
      object-fit:cover;
      object-position:center;
    }
    @media (max-width:980px){
      .route-detail-gallery{
        grid-template-columns:1fr 1fr;
        gap:8px;
      }
      .route-detail-gallery a:first-child{
        grid-column:1 / -1;
      }
      .route-detail-gallery img{
        height:96px!important;
      }
      .route-detail-gallery a:first-child img{
        height:155px!important;
      }
    }
    @media (max-width:420px){
      .route-detail-gallery img{
        height:88px!important;
      }
      .route-detail-gallery a:first-child img{
        height:145px!important;
      }
    }
    @media (max-width:380px){
      .route-detail-gallery{
        grid-template-columns:1fr 1fr;
      }
      .route-detail-gallery img{
        height:82px!important;
      }
      .route-detail-gallery a:first-child img{
        height:136px!important;
      }
    }

  .sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}

    /* V51.4 · Botonera inferior tipo app
       Recoloca los controles del mapa en una barra inferior fija.
       Rutas abre/cierra el catálogo completo, Ficha recupera la ficha de la ruta seleccionada
       y el perfil de altitud se muestra por encima de la barra. */
    .map-floating-btn{
      position:absolute!important;
      left:50%!important;
      right:auto!important;
      top:auto!important;
      bottom:12px!important;
      transform:translateX(-50%)!important;
      z-index:720!important;
      width:min(720px,calc(100vw - 24px))!important;
      min-height:68px!important;
      padding:8px 10px!important;
      display:grid!important;
      grid-template-columns:repeat(6,minmax(0,1fr))!important;
      gap:6px!important;
      border-radius:24px!important;
      background:rgba(255,253,248,.94)!important;
      border:1px solid rgba(255,255,255,.72)!important;
      box-shadow:0 18px 42px rgba(15,23,42,.18)!important;
      backdrop-filter:blur(18px)!important;
    }
    .map-floating-btn button{
      width:100%!important;
      height:52px!important;
      min-width:0!important;
      border-radius:18px!important;
      border:0!important;
      background:transparent!important;
      box-shadow:none!important;
      color:#334155!important;
      display:flex!important;
      flex-direction:column!important;
      align-items:center!important;
      justify-content:center!important;
      gap:3px!important;
      padding:6px 4px!important;
      font-size:11px!important;
      font-weight:900!important;
      line-height:1!important;
      letter-spacing:-.01em!important;
    }
    .map-floating-btn button:hover{
      transform:none!important;
      background:rgba(33,110,74,.08)!important;
      color:#173b2d!important;
    }
    .map-floating-btn button.is-active{
      background:linear-gradient(180deg,#216e4a 0%,#1b5c3f 100%)!important;
      color:#fff!important;
      box-shadow:0 9px 18px rgba(33,110,74,.20)!important;
    }
    .map-floating-btn button.is-muted{
      opacity:.48!important;
      filter:grayscale(.35)!important;
    }
    .map-floating-btn button svg{
      width:20px!important;
      height:20px!important;
      flex:0 0 auto!important;
    }
    .map-floating-btn button::after{
      display:block;
      font-size:10px;
      line-height:1;
      white-space:nowrap;
      overflow:hidden;
      text-overflow:ellipsis;
      max-width:100%;
    }
    .map-floating-btn button:nth-child(1)::after{content:'Ver todas';}
    .map-floating-btn button:nth-child(2)::after{content:'Rutas';}
    .map-floating-btn button:nth-child(3)::after{content:'Perfil';}
    .map-floating-btn button:nth-child(4)::after{content:'Ficha';}
    .map-floating-btn button:nth-child(5)::after{content:'POIs';}
    .map-floating-btn button:nth-child(6)::after{content:'GPS';}
    .profile-panel{
      bottom:96px!important;
      z-index:690!important;
    }
    .routes-panel{
      bottom:96px!important;
    }
    .route-detail-panel{
      bottom:96px!important;
    }
    .empty-state{
      bottom:96px!important;
    }
    .leaflet-bottom.leaflet-right{
      bottom:96px!important;
    }
    body.selector-mode .map-floating-btn{display:none!important;}
    @media(max-width:980px){
      .map-floating-btn{
        left:8px!important;
        right:8px!important;
        bottom:8px!important;
        transform:none!important;
        width:auto!important;
        min-height:66px!important;
        border-radius:22px!important;
        grid-template-columns:repeat(6,minmax(0,1fr))!important;
        padding:7px!important;
      }
      .map-floating-btn button{
        height:50px!important;
        border-radius:16px!important;
        font-size:10px!important;
        padding:5px 2px!important;
      }
      .map-floating-btn button svg{
        width:19px!important;
        height:19px!important;
      }
      .map-floating-btn button::after{
        font-size:9.2px;
      }
      .profile-panel{
        bottom:86px!important;
        z-index:690!important;
      }
      .routes-panel,
      .route-detail-panel{
        bottom:86px!important;
      }
      .empty-state{
        bottom:86px!important;
      }
      .leaflet-bottom.leaflet-right{
        bottom:86px!important;
      }
      body.panel-open-mobile .profile-panel{display:none!important;}
    }
    @media(max-width:420px){
      .map-floating-btn{gap:3px!important;padding:6px 5px!important;}
      .map-floating-btn button::after{font-size:8.4px;}
    }


    /* V51.7 · Barra inferior móvil con etiquetas siempre visibles.
       En modo mapa + perfil se mantiene compacta, pero conserva el texto
       de cada botón para que la función sea clara. */
    @media(max-width:980px){
      body:not(.panel-open-mobile):not(.selector-mode) .map-floating-btn{
        left:8px!important;
        right:8px!important;
        bottom:8px!important;
        top:auto!important;
        transform:none!important;
        width:auto!important;
        min-height:62px!important;
        height:62px!important;
        padding:5px 7px!important;
        gap:4px!important;
        border-radius:18px!important;
        grid-template-columns:repeat(6,minmax(0,1fr))!important;
        align-items:center!important;
        z-index:720!important;
      }
      body:not(.panel-open-mobile):not(.selector-mode) .map-floating-btn button{
        height:52px!important;
        min-height:52px!important;
        border-radius:14px!important;
        padding:4px 2px!important;
        gap:3px!important;
        display:flex!important;
        flex-direction:column!important;
        align-items:center!important;
        justify-content:center!important;
      }
      body:not(.panel-open-mobile):not(.selector-mode) .map-floating-btn button::after{
        display:block!important;
        font-size:8.5px!important;
        line-height:1!important;
        font-weight:900!important;
        letter-spacing:-.02em!important;
        color:currentColor!important;
        opacity:.86!important;
        white-space:nowrap!important;
      }
      body:not(.panel-open-mobile):not(.selector-mode) #fitAllBtn::after{content:'Ver todas'!important;}
      body:not(.panel-open-mobile):not(.selector-mode) #routesToggleBtn::after{content:'Rutas'!important;}
      body:not(.panel-open-mobile):not(.selector-mode) #profileToggleBtn::after{content:'Perfil'!important;}
      body:not(.panel-open-mobile):not(.selector-mode) #routeInfoQuickBtn::after{content:'Ficha'!important;}
      body:not(.panel-open-mobile):not(.selector-mode) #poiToggleBtn::after{content:'POIs'!important;}
      body:not(.panel-open-mobile):not(.selector-mode) #gpsToggleBtn::after{content:'GPS'!important;}
      body:not(.panel-open-mobile):not(.selector-mode) .map-floating-btn button svg{
        width:18px!important;
        height:18px!important;
        flex:0 0 auto!important;
      }
      body:not(.panel-open-mobile):not(.selector-mode) .profile-panel{
        bottom:78px!important;
        left:8px!important;
        right:8px!important;
        z-index:690!important;
        padding:9px!important;
        border-radius:18px!important;
      }
      body:not(.panel-open-mobile):not(.selector-mode) .chart-box{
        height:92px!important;
      }
      body:not(.panel-open-mobile):not(.selector-mode) .leaflet-bottom.leaflet-right{
        bottom:78px!important;
      }
    }
    @media(max-width:420px){
      body:not(.panel-open-mobile):not(.selector-mode) .map-floating-btn{
        height:60px!important;
        min-height:60px!important;
        padding:4px 5px!important;
      }
      body:not(.panel-open-mobile):not(.selector-mode) .map-floating-btn button{
        height:50px!important;
      }
      body:not(.panel-open-mobile):not(.selector-mode) .map-floating-btn button::after{
        font-size:8px!important;
      }
      body:not(.panel-open-mobile):not(.selector-mode) .profile-panel{
        bottom:74px!important;
      }
      body:not(.panel-open-mobile):not(.selector-mode) .chart-box{
        height:86px!important;
      }
    }


    /* V51.9 · Ajuste PRO corregido:
       - botonera visible a la izquierda en escritorio, sin quedar escondida
       - perfil con menos tarjeta y más protagonismo de la línea */
    @media (min-width:981px){
      .map-floating-btn{
        left:18px!important;
        right:auto!important;
        top:auto!important;
        bottom:18px!important;
        width:min(var(--panel-width),calc(100vw - 36px))!important;
        min-height:70px!important;
        height:70px!important;
        padding:8px 10px!important;
        border-radius:24px!important;
        background:rgba(255,253,248,.97)!important;
        border:1px solid rgba(23,32,42,.08)!important;
        box-shadow:0 18px 42px rgba(19,29,44,.18)!important;
        backdrop-filter:blur(18px)!important;
        display:grid!important;
        grid-template-columns:repeat(6,minmax(0,1fr))!important;
        gap:8px!important;
        z-index:900!important;
        transform:none!important;
      }
      .routes-panel{
        bottom:110px!important;
      }
      .map-floating-btn button{
        width:auto!important;
        height:54px!important;
        min-height:54px!important;
        border-radius:18px!important;
        padding:5px 4px!important;
        display:flex!important;
        flex-direction:column!important;
        align-items:center!important;
        justify-content:center!important;
        gap:4px!important;
      }
      .map-floating-btn button::after{
        display:block!important;
        font-size:9.5px!important;
        line-height:1!important;
        font-weight:900!important;
        letter-spacing:-.02em!important;
        opacity:.86!important;
        color:currentColor!important;
      }
      #fitAllBtn::after{content:'Ver todas'!important;}
      #routesToggleBtn::after{content:'Rutas'!important;}
      #profileToggleBtn::after{content:'Perfil'!important;}
      #routeInfoQuickBtn::after{content:'Ficha'!important;}
      #poiToggleBtn::after{content:'POIs'!important;}
      #gpsToggleBtn::after{content:'GPS'!important;}
      .map-floating-btn button svg{
        width:20px!important;
        height:20px!important;
      }

      .profile-panel{
        left:calc(var(--panel-width) + 56px)!important;
        right:88px!important;
        bottom:18px!important;
        max-width:860px!important;
        min-width:480px!important;
        padding:8px 10px 10px!important;
        border-radius:18px!important;
        background:rgba(255,253,248,.58)!important;
        border:1px solid rgba(255,255,255,.48)!important;
        box-shadow:0 12px 30px rgba(19,29,44,.12)!important;
        backdrop-filter:blur(10px)!important;
      }
      .profile-top{
        display:flex!important;
        margin:0!important;
        height:0!important;
        overflow:visible!important;
      }
      .profile-title{
        display:none!important;
      }
      .profile-meta{
        display:none!important;
      }
      .profile-panel .icon-btn{
        position:absolute!important;
        right:8px!important;
        top:8px!important;
        width:28px!important;
        height:28px!important;
        min-width:28px!important;
        font-size:14px!important;
        z-index:3!important;
        background:rgba(255,255,255,.78)!important;
      }
      .chart-box{
        height:150px!important;
        border-radius:14px!important;
        padding:2px 8px 0!important;
        background:transparent!important;
        border:0!important;
      }
      .profile-panel::after{
        content:attr(data-profile-pro)!important;
        position:absolute!important;
        left:18px!important;
        bottom:10px!important;
        z-index:3!important;
        display:inline-flex!important;
        padding:6px 10px!important;
        border-radius:999px!important;
        background:rgba(255,253,248,.86)!important;
        color:#17202a!important;
        box-shadow:0 8px 18px rgba(19,29,44,.10)!important;
        font-size:12px!important;
        line-height:1!important;
        font-weight:950!important;
        letter-spacing:-.01em!important;
      }
      .leaflet-bottom.leaflet-right{
        bottom:108px!important;
      }
    }


    /* V51.10 · Perfil ultra limpio:
       sin datos repetidos, sin pastilla inferior y con la tarjeta casi invisible.
       Solo debe destacar la línea del perfil. */
    @media (min-width:981px){
      .profile-panel{
        background:transparent!important;
        border:0!important;
        box-shadow:none!important;
        backdrop-filter:none!important;
        padding:0 8px 2px!important;
        border-radius:0!important;
      }
      .profile-panel::after{
        display:none!important;
        content:''!important;
      }
      .profile-top{
        display:none!important;
      }
      .chart-box{
        height:150px!important;
        background:transparent!important;
        border:0!important;
        box-shadow:none!important;
        padding:0!important;
        border-radius:0!important;
      }
    }


    /* V51.11 · Perfil ultra limpio también en responsive.
       Mantiene la barra inferior y elimina cabecera/datos/tarjeta del perfil en móvil. */
    @media (max-width:980px){
      .profile-panel{
        background:transparent!important;
        border:0!important;
        box-shadow:none!important;
        backdrop-filter:none!important;
        padding:0 8px 2px!important;
        border-radius:0!important;
      }
      .profile-panel::after{
        display:none!important;
        content:''!important;
      }
      .profile-top{
        display:none!important;
      }
      .chart-box{
        background:transparent!important;
        border:0!important;
        box-shadow:none!important;
        padding:0!important;
        border-radius:0!important;
      }
      body:not(.panel-open-mobile):not(.selector-mode) .profile-panel{
        bottom:74px!important;
        left:8px!important;
        right:8px!important;
        padding:0 8px 2px!important;
        border-radius:0!important;
      }
      body:not(.panel-open-mobile):not(.selector-mode) .chart-box{
        height:96px!important;
      }
    }
    @media (max-width:420px){
      body:not(.panel-open-mobile):not(.selector-mode) .profile-panel{
        bottom:72px!important;
      }
      body:not(.panel-open-mobile):not(.selector-mode) .chart-box{
        height:88px!important;
      }
    }




.sendamap-reference-map { background-color:#eaf0e9; background-image:linear-gradient(#d8e3d9 1px,transparent 1px),linear-gradient(90deg,#d8e3d9 1px,transparent 1px); background-size:36px 36px; }
.sendamap-map-mode { border:1px solid #c6d4ca;border-radius:8px;padding:7px 9px;background:white;color:#33483d;font-size:12px;cursor:pointer; }
.sendamap-local-label { border-radius:7px;color:#263e34;font-weight:700; }


.route-number.route-number--matricula{width:auto;min-width:50px;height:32px;padding:0 8px;font-size:13px;white-space:nowrap;box-sizing:border-box}


.route-actions.route-actions-summary{grid-template-columns:minmax(0,1fr)}
.route-actions-summary .info-route-btn{font-size:13px;min-height:38px}
.route-detail-resources{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 12px}
.route-detail-resources a{min-height:40px;display:inline-flex;align-items:center;padding:7px 12px;border-radius:12px;border:1px solid #d3e3da;background:#edf6f0;color:#185631;text-decoration:none;font-weight:700;font-size:13px}
.route-detail-resources a:hover{text-decoration:underline}


.route-detail-follow{margin:8px 0 12px}.route-detail-follow p{margin:5px 0 0;font-size:12px;color:#43584d}


#routeDetailFollowBtn{display:flex;align-items:center;justify-content:center;gap:8px}
.sendamap-follow-icon{width:26px;height:26px;display:grid;place-items:center;background:#fff;border-radius:50%;flex:none}
.sendamap-follow-icon img{width:22px;height:22px;display:block}
body.following-route #gpsToggleBtn{background:#176340;color:#fff}



.route-detail-icon-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:10px 0 14px}
.route-detail-icon-links{display:contents}
.route-detail-icon-action{width:48px;height:48px;flex:0 0 48px;display:grid;place-items:center;padding:0;border-radius:14px;border:1px solid #d5e4da;background:#f0f8f2;color:#267148;text-decoration:none;cursor:pointer}
.route-detail-icon-action svg,.route-detail-icon-action img{width:28px;height:28px;display:block}
.route-detail-icon-pdf{color:#ad3829;background:#fff3ef;border-color:#f5d9d1}
.route-detail-icon-action:hover{filter:brightness(.93)}
.route-detail-icon-action:focus-visible{outline:2px solid #1c6741;outline-offset:2px}


#basePicker{margin:12px 0}#basePicker label{display:block;font-weight:700}#baseFolder{max-width:100%}#baseStatus{font-size:.85rem}


.visor-home{text-decoration:none;font:750 24px/1 system-ui;display:grid;place-items:center}
#localHomeLink{color:inherit;font-weight:700}
@media(max-width:980px){
 body.direct-route.route-detail-mode .route-detail-panel.is-open{top:43dvh!important;bottom:86px!important}
 body.direct-route.route-detail-mode.with-visible-profile .route-detail-panel.is-open{bottom:calc(86px + 128px)!important}
 body.direct-route.route-detail-mode .profile-panel.is-visible{display:block!important;bottom:86px!important;left:8px!important;right:8px!important;max-width:none;padding:4px 8px!important;background:#fff!important;border-radius:12px!important}
 body.direct-route.route-detail-mode .profile-panel .chart-box{height:88px!important}
}
@media(max-width:980px) and (max-height:520px){
 body.direct-route.route-detail-mode.with-visible-profile .route-detail-panel.is-open{top:32dvh!important;bottom:calc(86px + 96px)!important}
 body.direct-route.route-detail-mode .profile-panel .chart-box{height:54px!important}
}



#profileUnavailable{margin:7px 4px;color:#43584d;font-size:.82rem;line-height:1.3}
.profile-panel.is-unavailable .profile-meta,.profile-panel.is-unavailable .chart-box{display:none!important}
@media(max-width:980px){
 body.direct-route.route-detail-mode.with-visible-profile.without-valid-profile .route-detail-panel.is-open{bottom:156px!important}
}




.overview-start-marker{display:grid;place-items:center;cursor:pointer}
.overview-start-marker span{
  box-sizing:border-box;display:grid;place-items:center;width:16px;height:16px;
  border:1px solid #141414;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0004;
  pointer-events:none
}
.overview-start-marker span::before{
  content:'';width:0;height:0;margin-left:1px;
  border-top:3px solid transparent;border-bottom:3px solid transparent;border-left:5px solid #141414
}
.overview-start-popup .leaflet-popup-content{margin:10px 29px 10px 12px;line-height:1.35}
.overview-start-popup .leaflet-popup-close-button{width:28px;height:28px;line-height:28px}

.overview-start-popup__header{
  display:flex;align-items:center;gap:6px;margin-bottom:4px;color:#48503e;font-size:11px;font-weight:650
}
.overview-start-popup__number{
  display:inline-grid;place-items:center;min-width:22px;height:20px;padding:0 4px;
  box-sizing:border-box;border-radius:5px;background:#f4c430;color:#141414;font-weight:800
}
.overview-start-popup strong{display:block}

.overview-start-cluster{display:grid;place-items:center;cursor:pointer}
.overview-start-cluster span{
  display:grid;place-items:center;width:26px;height:26px;border:2px solid #fff;border-radius:50%;
  background:#75482d;color:#fff;font-size:12px;font-weight:750;box-shadow:0 1px 3px #0004
}
