/* MYFLIX V10.5: controles compartidos, identidad original y ajustes móviles medidos. */
.header,.search-open .header{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;gap:12px;height:var(--header);min-height:var(--header);background:#000;padding-top:env(safe-area-inset-top,0px)}
.header .brand{width:154px;min-width:0;min-height:44px;grid-column:1;display:flex;align-items:center;background:#000}
.header .brand .user-wordmark{width:144px;height:auto;max-height:48px;object-fit:contain;filter:none}
.header .header-news{grid-column:2;grid-row:1;justify-self:center;min-width:0}
.header>.key-phones{grid-column:3;grid-row:1}
.header .header-actions,.search-open .header .header-actions{grid-column:4;grid-row:1;height:var(--header);gap:0;margin:0;justify-self:end}
.header-actions>.icon-button,.header-actions .header-search>.icon-button{flex:0 0 44px;width:44px;height:44px}
.menu-shortcuts{display:none}
.card-visual{position:relative}.card-actions{position:absolute;right:0;top:0;z-index:3;display:flex;opacity:0;pointer-events:none}
.card:hover .card-actions,.card:focus-within .card-actions,.page-tools .card-actions{opacity:1;pointer-events:auto}.card .card-actions .card-save,.card .card-actions .card-copy,.page-tools .icon-button{position:relative;inset:auto!important;display:inline-flex;align-items:center;justify-content:center;flex:none;width:44px;height:44px;min-height:44px;min-width:44px;border:0;border-radius:7px;background:transparent;opacity:1;pointer-events:auto;color:#fff;padding:0}.card-actions .icon-button:before,.personal-card .personal-edit:before{content:"";position:absolute;inset:9px;border-radius:7px;background:#121416d9;border:1px solid #ffffff44;pointer-events:none}.card-actions .icon-button svg{position:relative;width:16px;height:16px;stroke-width:1.6;fill:none;stroke:currentColor;z-index:1}
.card-actions .is-saved svg{fill:currentColor}
.card-actions .icon-button:focus-visible{outline:2px solid #fff;outline-offset:-3px}
.is-organizing .card-actions{display:none!important}
body .card:has(.topic-cover,.functional-cover) .topic-cover,body .card .functional-cover{justify-content:flex-end;position:relative;padding:7px 12px}
.topic-cover>svg{position:absolute;top:8px;left:12px;width:22px;height:22px;margin:0}
.functional-cover>img,.functional-cover>.functional-publisher{position:absolute;left:12px;top:8px;width:auto;max-width:52px;height:18px;object-fit:contain;font-size:10px;line-height:1.1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.card .topic-cover strong,.card .functional-cover strong{position:relative;max-width:100%}
.personal-card .personal-edit{right:0;top:0;background:transparent!important;isolation:isolate;font-size:20px}.personal-card .personal-edit:before{z-index:-1}
.personal-card .personal-identity{max-width:calc(100% - 104px)}
.page-tools{align-self:center;flex:none}.page-tools .card-actions{position:static;opacity:1;pointer-events:auto}.page-tools .icon-button:before{background:#242424;border-color:#ffffff40}
/* Los popups quedan por encima del zoom; el ancla persiste durante autoPan. */
.leaflet-container .leaflet-popup-close-button{width:44px;height:44px;line-height:44px;z-index:2}.leaflet-popup-content{padding-top:8px}
.geo-searchbar input[type=search],#pharmacySearch{min-height:44px}.pharmacy-context>a,.gas-scope>a{display:inline-flex;align-items:center;min-height:44px;padding-block:8px}
@media(max-width:1099px){.header,.search-open .header{grid-template-columns:auto minmax(0,1fr) auto auto;gap:8px;padding-inline:20px}.header .header-news{display:none}.header .brand{width:150px}.header .brand .user-wordmark{width:140px}.header .header-actions #organizeToggle{display:none}.header.news-expanded{height:auto;grid-template-rows:60px auto}.header.news-expanded .header-news{display:flex;grid-row:2;grid-column:1/-1;width:100%;height:auto;min-height:58px;flex-wrap:wrap;justify-content:center}.header .header-actions #newsLinksToggle{display:inline-flex!important}}
@media(max-width:760px){.header,.search-open .header{grid-template-columns:minmax(0,1fr) auto;gap:8px;padding-inline:max(12px,env(safe-area-inset-left)) max(12px,env(safe-area-inset-right))}.header .brand{width:auto;min-width:0}.header .brand .user-wordmark{width:min(132px,100%);height:auto;max-height:46px}.header .header-actions,.search-open .header .header-actions{grid-column:2;gap:0}.header .header-actions #newsLinksToggle,.header .header-actions #organizeToggle{display:none!important}.header>.key-phones{display:contents}.header #keyPhonesToggle{display:none}.header #keyPhonesPanel{position:fixed;inset:calc(var(--header) + 6px) 12px auto;max-width:calc(100vw - 24px);max-height:calc(var(--visual-height,100dvh) - var(--header) - 18px);overflow:auto;z-index:110}.header #headerNews{grid-column:1/-1;grid-row:2}.header .header-news .news-intro{display:none}.header .header-news .header-account{min-height:44px;padding-inline:5px}
.menu-shortcuts{display:flex;flex-wrap:wrap;gap:8px;margin-top:18px;padding-top:16px;border-top:1px solid #ffffff20}.menu-shortcuts button{min-height:44px;padding:10px 12px;border:1px solid #ffffff30;border-radius:8px;background:#292c2e;color:#eee;font-size:13px}.card-actions{opacity:1;pointer-events:auto}.personal-card .personal-edit{opacity:1;pointer-events:auto}.personal-editor{top:var(--visual-center,50%)!important;max-height:calc(var(--visual-height,100dvh) - 24px);scroll-padding-block:20px}.personal-editor input:not([type=range]),.personal-editor textarea{font-size:16px;min-height:44px}.personal-editor footer{position:sticky;bottom:-16px;background:#202222;padding:10px 0 3px;margin-bottom:-3px;z-index:2}.personal-editor .personal-image-options summary,.personal-editor .personal-order summary{min-height:44px}
.page-heading-row:has(.page-tools){align-items:center;gap:8px}.page-heading-row:has(.page-tools) h1{font-size:clamp(23px,6.5vw,29px)}.page-tools .card-actions{width:88px}.page-tools .icon-button:before{inset:7px}.menu-settings select{max-width:100%}.menu-settings label{max-width:100%;min-width:0;display:flex;flex-wrap:wrap;gap:8px}}
@media(pointer:coarse){.card-actions{opacity:1;pointer-events:auto}}
@media(prefers-reduced-motion:reduce){.card-actions,.header *{scroll-behavior:auto;transition:none}}

.functional-cover>.functional-publisher{max-width:60px;height:auto;max-height:23px;white-space:normal;text-overflow:clip}

@media(max-width:380px){.results-grid .functional-cover>.functional-publisher{max-width:40px;font-size:9px}.results-grid .functional-cover>img{max-width:40px}}
.header .header-search{width:44px;flex:0 0 44px}
.header .header-search{border-width:0}

#pharmacyModule .pharmacy-context>a,#geoDirectory .gas-scope>a{display:inline-flex;align-items:center;min-height:44px;padding-block:8px}
.map-popup-zoom{display:flex;justify-content:flex-start;padding-top:10px;margin-top:10px;border-top:1px solid #ffffff20;min-height:55px}
.map-popup-zoom .leaflet-control-zoom{display:flex;float:none;clear:none;margin:0;border-radius:7px;box-shadow:none;border:1px solid #ffffff30;overflow:hidden}
.map-popup-zoom .leaflet-control-zoom a{width:44px;height:44px;line-height:44px;border:0;border-radius:0}.map-popup-zoom .leaflet-control-zoom a+a{border-left:1px solid #ffffff30}
.leaflet-popup-content h2{padding-right:24px}

/* Área segura de móviles con notch; en escritorio env() vale cero. */
.header,.search-open .header{height:calc(var(--header) + env(safe-area-inset-top,0px));min-height:calc(var(--header) + env(safe-area-inset-top,0px))}
.header.news-expanded{height:auto}
@media(max-width:760px){.search-wrap,.search-wrap.open{top:calc(var(--header) + env(safe-area-inset-top,0px) + 6px)}.header #keyPhonesPanel{top:calc(var(--header) + env(safe-area-inset-top,0px) + 6px)}.personal-editor{padding-bottom:max(16px,env(safe-area-inset-bottom,0px))}}

@media(max-width:760px){.menu-shortcuts{margin:0 0 18px;padding:0 0 14px;border-top:0;border-bottom:1px solid #ffffff20}}

