/* One shared navigation height, matching Inicio. */
:root{--xr-header-height:56px;--xr-nav-height:calc(66px + env(safe-area-inset-bottom,0px))}
html{scroll-padding-top:70px}
body:has(>.bottom-nav){padding-top:0!important}
body>header{position:sticky!important;top:0;z-index:1100;height:var(--xr-header-height)!important;min-height:var(--xr-header-height);padding:7px 14px!important;margin:0 auto!important;background:#151b1e;box-sizing:border-box;gap:12px}
body>header img{width:90px!important;height:auto;display:block}
body>header .top-back{font-size:14px!important;font-weight:600;line-height:1.3}
body>.bottom-nav{height:var(--xr-nav-height);min-height:var(--xr-nav-height);box-sizing:border-box;z-index:1100;padding:5px 6px max(5px,env(safe-area-inset-bottom))}
body.route-video-feed main{height:calc(100dvh - var(--xr-header-height) - var(--xr-nav-height))}
/* Keep Inicio's route details above navigation, including mobile browser chrome changes. */
body.home-feed>main{position:fixed;top:var(--xr-header-height);bottom:var(--xr-nav-height);left:50%;transform:translateX(-50%);width:100%;height:auto;min-height:0;margin:0;overflow:hidden}
.home-feed .video-feed-stage:has(>.real-video-player){display:grid;grid-template-rows:minmax(0,1fr) auto;overflow:hidden}
.home-feed .home-info{display:flex;flex-direction:column;min-width:0}
.home-feed .home-info .video-feed-title{order:0;min-height:36px}
.home-feed .home-info .creator-link{order:1;margin:5px 0 0}
.home-feed .home-info .home-description{order:2;min-width:0}
body>header.media-header{display:grid;grid-template-columns:90px minmax(0,1fr) minmax(74px,100px);gap:8px}
.media-header #media-classification{border:0;padding:0;border-radius:0;font-size:11px;line-height:1.3;text-align:center;max-height:42px;overflow:hidden;color:#dce1e3}
body>header.media-header .top-back{white-space:normal;text-align:right;font-size:12px!important}
body.full-map-page{height:100dvh;overflow:hidden;padding:0!important}
body.full-map-page>header,body.full-map-page>.bottom-nav{max-width:none;width:100%}
body.full-map-page>header .top-back{display:none}
body.full-map-page>main{position:fixed;inset:var(--xr-header-height) 0 var(--xr-nav-height);max-width:none;width:100%;height:auto;min-height:0;padding:0;border-radius:0;overflow:hidden}
.full-map-page #screen,.full-map-page #route-results,.full-map-page .routes-overview{width:100%;height:100%;max-height:none;margin:0;border-radius:0}
.full-map-page #notice:empty,.full-map-page .routes-heading,.full-map-page .routes-list-meta,.full-map-page #map-route-links,.full-map-page #route-results>.caption,.full-map-page #screen>.caption{display:none}
.full-map-page .route-toolbar{position:absolute;right:12px;top:12px;z-index:500;margin:0}
.full-map-page .route-toolbar>#toggle-filters,.full-map-page #view-map{display:none}
.full-map-page .route-view-switch{box-shadow:0 2px 10px #0002;background:white}
.full-map-page #view-list{min-height:40px;color:#253642}
#map-open-filters{display:inline-flex;align-items:center;gap:6px;background:#ff692f;color:#171e22;border:1px solid #ff692f;border-radius:10px;min-height:40px;padding:8px 11px;font:700 13px system-ui;cursor:pointer}
#map-open-filters[hidden]{display:none}#map-open-filters svg{width:17px;height:17px}#map-open-filters span{border:0;border-radius:5px;background:#172024;color:white;padding:1px 4px;font-size:12px}
.map-results-status{position:absolute;bottom:26px;left:50%;transform:translateX(-50%);z-index:500;max-width:calc(100% - 110px);padding:5px 12px;background:#fffffff0;box-shadow:0 1px 8px #0002;border-radius:14px;font-size:12px;text-align:center;pointer-events:none}
.map-filter-dialog{position:fixed;inset:0;width:calc(100% - 24px);max-width:440px;max-height:85dvh;padding:0;border:0;border-radius:20px;overflow:auto;color:#20282d;background:white;font:14px/1.5 system-ui}
.map-filter-dialog::backdrop{background:#0009}
.map-filter-dialog #route-filters{margin:0;border:0;border-radius:0;padding:0 20px;background:white}
.map-filter-dialog .filters-heading{position:sticky;top:0;background:white;z-index:2;padding:14px 0 10px}
.map-filter-dialog .filters-heading h2{font-size:20px}
.map-filter-dialog .route-search{margin:4px 0 18px}
.map-filter-dialog .row-actions{position:sticky;bottom:0;background:white;display:flex;flex-wrap:nowrap;gap:8px;padding:14px 0;margin:0;border-top:1px solid #e1e5e8;z-index:2}
.map-filter-dialog .row-actions button{flex:1;min-width:0;font-size:14px}
.map-filter-dialog .row-actions .primary{background:#ff692f;border-color:#ff692f;color:#171e22}

/* Creation and publication share the orange navigation action colour. */
body .button-link.primary.create-route,body button.primary.xr-publish-action{background:#ff692f;border-color:#ff692f;color:#171e22;font-weight:700}
body .button-link.primary.create-route:hover,body button.primary.xr-publish-action:not(:disabled):hover{background:#ff824d;border-color:#ff824d}

/* Match the logo's solid black background on every navigation bar. */
body:has(>.bottom-nav),body>header,body>.bottom-nav,#map-modal>header,#map-modal>.bottom-nav{background:#000!important}
.public-profile-tabs{display:flex;align-items:stretch;border-top:1px solid #edf0f2;border-bottom:1px solid #e1e5e8;padding:0 12px;gap:8px}
.public-profile-tabs .public-gallery-heading,.public-realized-link{flex:1;display:flex;align-items:center;justify-content:center;gap:7px;padding:14px 4px;min-height:54px;font-size:14px;text-decoration:none;margin:0;border:0;white-space:nowrap}
.public-profile-tabs .public-gallery-heading{border-bottom:2px solid #1764ac;color:#1764ac}
.public-realized-link{color:#60717a}.public-realized-link:hover{color:#1764ac;background:#f4f7f9}
.public-realized-link svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8}
#public-realized-count{font-size:12px;background:#edf2f6;border-radius:12px;padding:2px 7px}

.xr-creator-link{display:inline-flex;align-items:center;gap:7px;min-height:32px;padding:3px 0;color:inherit;text-decoration:none;cursor:pointer;max-width:100%}
.xr-creator-link img{width:26px;height:26px;border-radius:50%;object-fit:cover;flex-shrink:0}
.xr-creator-link:hover,.creator-link:hover{text-decoration:underline}
.xr-creator-link:focus-visible,.creator-link:focus-visible{outline:2px solid #ff824d;outline-offset:3px}
.xr-media-card,.owned-video{margin-bottom:14px}.xr-media-card>.real-video-card,.owned-video>.real-video-card{margin-bottom:0}
.xr-media-card>.xr-creator-link,.owned-video>.xr-creator-link{margin-left:12px;color:#1764ac;font-size:13px}
.home-info .creator-link{position:relative;z-index:1;width:100%;cursor:pointer;pointer-events:auto}
.video-feed-meta>.xr-creator-link{min-width:0}.xr-creator-link span{overflow:hidden;text-overflow:ellipsis}
/* Primary filter actions share the XRutas orange across Home and every route list/map. */
#filter-form .filter-actions button[type="submit"],#route-filters button[type="submit"]{background:#ff692f;color:#171e22;border-color:#ff692f;font-weight:700}
#filter-form .filter-actions button[type="submit"]:hover,#route-filters button[type="submit"]:hover{background:#ff824d;border-color:#ff824d}
#filters #filter-form label,.home-zone-field>span{font-size:14px;font-weight:600}
#filters #filter-form select{font-size:16px;min-height:46px;border-radius:10px;width:100%;margin-top:7px}
#filters #difficulty-help{display:block;font-size:12px;color:#627077;margin-top:6px;font-weight:400}
#filters .dialog-heading button{border-radius:50%;background:#f1f3f4}
#filters .home-zone-field{margin-bottom:18px}
#filters #zone-toggle{display:flex;align-items:center;justify-content:space-between;width:100%;text-align:left;margin-top:7px;font-size:16px;border-color:#ccd3d6}
#filters #zone-panel{border:1px solid #ccd3d6;border-radius:12px;padding:10px;margin-top:8px}
#filters #zone-search{font-size:16px;margin:0 0 6px;background:#f6f8f9}
#filters #zone-results{max-height:220px;overflow:auto}
#filters #zone-results button{display:block;width:100%;text-align:left;color:#1764ac;border:0;border-bottom:1px solid #edf0f1;border-radius:0;padding:10px 5px;min-height:44px}
#filters #zone-results small{display:block;font-size:12px;color:#627077}
#filters #zone-results p{font-size:14px;margin:10px 0}
#filters .filter-actions{padding-top:14px;border-top:1px solid #e7eaeb}
#filters .filter-label-icon{width:18px;height:18px;vertical-align:-3px;margin-right:7px;color:#63747d}
/* Searchable primary and secondary route zones. */
#route-filters .route-zone-picker{margin-bottom:14px}
#route-filters .route-zone-label{display:flex;gap:7px;align-items:center;font-size:14px;font-weight:600;margin-bottom:7px}
#route-filters .route-zone-label svg{width:18px;height:18px;color:#63747d}
#route-filters .route-zone-picker>button{width:100%;display:flex;justify-content:space-between;gap:8px;align-items:center;text-align:left;font-size:16px;background:white}
#route-filters .route-zone-picker>div{background:white;border:1px solid #ccd3d6;border-radius:12px;padding:10px;margin-top:8px}
#route-filters .route-zone-picker input[type="search"]{font-size:16px;margin:0 0 6px}
#route-filters .route-zone-results{max-height:220px;overflow:auto}
#route-filters .route-zone-results button{width:100%;display:block;text-align:left;border:0;border-bottom:1px solid #edf0f1;border-radius:0;color:#1764ac;background:white;min-height:44px;padding:10px 5px}
#route-filters .route-zone-results small{display:block;font-size:12px;color:#627077}
#route-filters .route-zone-results p{font-size:14px;margin:10px 0}
/* Expanded route map owns its navigation above the underlying route page. */
body:has(>#map-modal:not([hidden])){overflow:hidden}
body:has(>#map-modal:not([hidden]))>header,body:has(>#map-modal:not([hidden]))>main,body:has(>#map-modal:not([hidden]))>.bottom-nav{visibility:hidden}
#map-modal{z-index:2000;padding-bottom:var(--xr-nav-height);height:100dvh;box-sizing:border-box}
#map-modal>header{position:relative;width:100%;max-width:none;height:var(--xr-header-height);min-height:var(--xr-header-height);margin:0;padding:7px 14px;box-sizing:border-box;gap:12px}
#map-modal>header img{width:90px;height:auto;display:block}
#map-modal #close-map{color:#ff824d;background:transparent;border:0;font-size:14px;font-weight:600;line-height:1.3;padding:8px 0;min-height:40px}
#map-modal #full-map{min-height:0;flex:1;margin:0;width:100%}
#map-modal>.bottom-nav{width:100%;max-width:none;height:var(--xr-nav-height);min-height:var(--xr-nav-height);padding:5px 6px max(5px,env(safe-area-inset-bottom));box-sizing:border-box}
#map-modal .map-download{bottom:calc(var(--xr-nav-height) + 20px)}

.route-pagination{display:flex;align-items:center;justify-content:center;gap:12px;padding:18px 0}.route-pagination button:disabled{opacity:.45;cursor:default}.full-map-page .route-pagination{position:fixed;z-index:500;bottom:calc(var(--xr-nav-height,80px) + 12px);left:50%;transform:translateX(-50%);background:white;color:#222;border-radius:12px;padding:8px;box-shadow:0 2px 12px #0003;white-space:nowrap}.route-pagination button{min-height:44px}

.route-pagination[hidden]{display:none}
