@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800;900&family=Luckiest+Guy&display=swap');
:root{font-family:'Nunito',ui-rounded,system-ui,-apple-system,sans-serif;color:#17344e;background:#fff;-webkit-tap-highlight-color:transparent;font-synthesis:none}
*{box-sizing:border-box}html,body,#app{height:100%;width:100%;margin:0;overflow:hidden}button{font:inherit;cursor:pointer}button:focus-visible{outline:4px solid #edb54d;outline-offset:3px}button:not(.poi-marker):active{transform:scale(.97)}.is-hidden{display:none!important}
.welcome{position:absolute;inset:0;display:grid;place-items:center;overflow:hidden;color:white;background:radial-gradient(ellipse at 55% 35%,#2e7f8e 0%,#1a5d72 31%,#163856 65%,#102a4c 100%)}.welcome:after{content:'';position:absolute;inset:0;opacity:.18;pointer-events:none;background-image:radial-gradient(white 1px,transparent 1px),radial-gradient(white 1px,transparent 1px);background-position:20px 25px,95px 83px;background-size:157px 167px,211px 197px}.welcome-glow{position:absolute;border-radius:50%;filter:blur(55px);opacity:.38}.welcome-glow-one{width:390px;height:390px;left:-200px;bottom:-200px;background:#24baad}.welcome-glow-two{width:360px;height:360px;right:-175px;top:-170px;background:#e9a15b}.welcome-content{position:relative;z-index:1;width:100%;padding:18px 25px 34px;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:100%;gap:0}.welcome-kicker{color:#ddf6f5;font-size:13px;letter-spacing:.18em;font-weight:900}.kicker-spark{color:#ffda84;padding:0 8px}.welcome-planet{position:relative;height:clamp(190px,33vh,270px);width:clamp(190px,33vh,270px);display:grid;place-items:center;margin:18px auto 10px}.welcome-planet-core{font-size:clamp(140px,24vh,210px);filter:drop-shadow(0 20px 25px #09243a90);animation:planet-float 5s ease-in-out infinite}@keyframes planet-float{0%,100%{transform:translateY(4px) rotate(-5deg)}50%{transform:translateY(-6px) rotate(2deg)}}.planet-star{position:absolute;color:#ffe29d}.star-one{top:10px;left:20px;font-size:30px}.star-two{right:1px;top:65px;font-size:46px}.star-three{bottom:13px;left:-15px;font-size:21px}.planet-orbit{position:absolute;inset:4px -25px;border:2px dashed #d7f9f766;border-radius:50%;transform:rotate(-26deg);pointer-events:none}.welcome h1{font-size:clamp(34px,5vw,55px);line-height:1.04;letter-spacing:-.03em;margin:4px 0 12px;font-weight:900}.welcome h1 span{color:#ffdc94}.welcome p{font-weight:600;color:#e3f3f5;line-height:1.48;font-size:clamp(15px,1.7vw,19px);margin:0 0 24px}.play-button{padding:16px 26px;background:#ffc967;border:0;border-bottom:5px solid #e7a946;color:#203d51;font-size:clamp(17px,2vw,21px);font-weight:900;border-radius:20px;box-shadow:0 12px 28px #061f3580;transition:transform .12s,box-shadow .12s}.play-button:hover{transform:translateY(-2px);box-shadow:0 17px 32px #061f3590}.play-symbol{font-size:.7em;background:#233e59;border-radius:50%;color:#ffcf6d;padding:7px 8px 7px 10px;margin-right:6px}.welcome-bottom{margin-top:24px;font-weight:800;color:#d4eaf0;font-size:12px;letter-spacing:.015em}
.atlas{position:absolute;inset:0;background:#92d5e5;isolation:isolate}.map-surface{position:absolute;inset:0;background:#152f50;overflow:hidden}#map{position:absolute;inset:0;background:linear-gradient(145deg,#163452,#1d4565);transition:background .3s}.atlas.mode-map #map{background:#cbe8ee}.atlas.mode-globe #map{background:radial-gradient(ellipse at 50% 47%,#204c6e 0%,#132b49 60%,#10223b 100%)}
.topbar{position:absolute;left:max(22px,env(safe-area-inset-left));right:max(22px,env(safe-area-inset-right));top:max(18px,env(safe-area-inset-top));display:flex;justify-content:space-between;align-items:start;gap:16px;pointer-events:none;z-index:6}.topbar>*{pointer-events:auto}.brand{display:flex;align-items:center;gap:10px;padding:12px 17px 11px 12px;min-width:162px;border-radius:20px;background:#ffffffee;box-shadow:0 6px 24px #14304720;backdrop-filter:blur(15px)}.brand-icon{display:grid;place-items:center;width:46px;height:46px;border-radius:15px;background:#e0f5ef;font-size:30px}.brand-text{display:flex;flex-direction:column;line-height:1.06}.brand-text strong{font-size:18px;font-weight:900;letter-spacing:-.4px;color:#173f58}.brand-text small{font-size:11px;color:#33968a;font-weight:900;margin-top:5px;letter-spacing:.06em}.toolbar{display:flex;gap:9px;align-items:flex-start}.toolbar-block{position:relative}.toolbar-button,.round-toolbar-button{border:1px solid #e2f0ee;box-shadow:0 5px 22px #19374e21;background:#fff;min-height:56px;border-radius:19px;color:#204257;font-weight:900;display:flex;align-items:center;justify-content:center;gap:8px;padding:0 16px;white-space:nowrap}.toolbar-button:hover,.round-toolbar-button:hover{background:#effaf7}.toolbar-emoji{font-size:23px}.toolbar-chevron{color:#84abae;font-size:20px;margin-left:2px;transform:translateY(-3px)}.round-toolbar-button{font-size:29px;min-width:56px;padding:0 10px}.popover{position:absolute;right:0;top:65px;background:#fff;border:1px solid #e7efec;box-shadow:0 18px 45px #0a294555;border-radius:21px;padding:10px;width:250px;z-index:12;max-height:min(75vh,560px);overflow-y:auto}.filter-popover{width:278px}.popover-header{text-transform:uppercase;color:#89a5ac;letter-spacing:.10em;font-size:10px;font-weight:900;padding:9px 11px 13px}.popover-option{border:0;background:transparent;width:100%;text-align:left;display:flex;gap:11px;align-items:center;border-radius:14px;padding:11px 12px;color:#264454;font-weight:800;font-size:15px}.popover-option>span:first-child{font-size:22px;min-width:29px}.popover-option:hover,.popover-option[aria-current=true]{background:#eaf7f2}.popover-option[aria-current=true]{color:#127c6a}.option-check{margin-left:auto;font-size:16px;color:#1aa186}
.map-label{position:absolute;left:max(28px,env(safe-area-inset-left));bottom:max(54px,calc(env(safe-area-inset-bottom) + 34px));pointer-events:none;background:#fffffff0;border-radius:24px;padding:16px 20px 17px;max-width:360px;box-shadow:0 9px 36px #18364c1d;z-index:2;backdrop-filter:blur(12px)}.eyebrow{font-weight:900;letter-spacing:.16em;color:#31a297;font-size:11px}.map-label h2{margin:5px 0 2px;font-weight:900;font-size:25px;letter-spacing:-.03em}.map-label p{margin:0;font-size:12px;color:#68848d;font-weight:700}.map-help{position:absolute;right:max(25px,env(safe-area-inset-right));bottom:max(49px,calc(env(safe-area-inset-bottom) + 29px));font-weight:900;border-radius:100px;font-size:12px;color:#3b5d6b;background:#ffffffd9;padding:10px 16px;box-shadow:0 6px 18px #18364c15;z-index:2;pointer-events:none}.map-help>span{margin-right:4px}
.poi-marker{position:relative;display:flex;align-items:center;justify-content:center;min-width:49px;height:49px;background:#fff;border:3px solid #fff;box-shadow:0 6px 17px #08304955;border-radius:18px;font-size:27px;cursor:pointer;transition:none}.poi-marker:after{content:'';position:absolute;bottom:-8px;width:12px;height:12px;transform:rotate(45deg);background:#fff;z-index:-1}.poi-marker:focus-visible{outline:3px solid #ffbb48}.maplibregl-marker{z-index:2}
.flags-screen{position:absolute;inset:0;background:#f6faf6;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}.flags-screen:before{content:'';pointer-events:none;position:absolute;left:-160px;top:-170px;width:500px;height:500px;background:#e5f3ea;border-radius:50%}.flags-inner{position:relative;max-width:1170px;margin:0 auto;padding:110px max(36px,4vw) 80px}.flags-heading{display:flex;gap:19px;align-items:center;margin:0 0 12px}.flags-mascot{width:88px;height:88px;border-radius:26px;background:#fceac6;display:grid;place-items:center;font-size:48px;box-shadow:0 6px 18px #c6b47921}.flags-heading h2{font-size:clamp(26px,3vw,38px);line-height:1.08;letter-spacing:-.025em;font-weight:900;margin:4px 0}.flags-heading p{font-size:14px;color:#698890;margin:0;font-weight:800}.flags-count{font-size:12px;letter-spacing:.04em;font-weight:900;color:#60a18c;margin:20px 0 14px}.flags-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:16px}.flag-card{border:1px solid #e5efeb;background:#fff;border-radius:23px;padding:16px 9px 14px;box-shadow:0 5px 17px #2c6b5113;display:flex;align-items:center;flex-direction:column;gap:8px;min-height:146px;justify-content:center;transition:transform .13s,box-shadow .13s}.flag-card:hover{transform:translateY(-3px);box-shadow:0 10px 25px #2c6b5122}.flag-card .flag-emoji{font-size:clamp(48px,6vw,65px);line-height:1.15;filter:drop-shadow(0 3px 4px #142c4221)}.flag-card .flag-name{font-size:12px;font-weight:900;line-height:1.22;text-align:center;color:#244554}
.sheet-backdrop{position:absolute;inset:0;background:#071c2e80;backdrop-filter:blur(2px);z-index:8}.country-sheet{position:absolute;z-index:9;right:0;top:0;bottom:0;width:min(535px,51vw);background:#fbfdfb;box-shadow:-19px 0 60px #091b3470;border-radius:31px 0 0 31px;overflow:hidden;animation:sheet-in .25s ease-out}@keyframes sheet-in{from{transform:translateX(30px);opacity:.45}to{transform:translateX(0);opacity:1}}.sheet-grabber{display:none}.sheet-scroll{height:100%;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:29px 28px max(44px,env(safe-area-inset-bottom))}.sheet-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.sheet-top-kicker{color:#37a58c;font-size:11px;font-weight:900;letter-spacing:.12em}.sheet-close{width:42px;height:42px;border:0;border-radius:15px;background:#e8f1ee;color:#376275;font-weight:900;font-size:18px;display:grid;place-items:center}.country-identity{display:flex;gap:17px;align-items:center;margin-bottom:22px}.country-flag{flex:0 0 auto;display:grid;place-items:center;background:#f1f6f2;border:1px solid #e3ebe7;border-radius:22px;width:92px;height:80px;font-size:57px;line-height:1}.country-identity-copy{min-width:0}.country-name-row,.country-continent-row{display:flex;gap:8px;align-items:center}.country-name-row h2{font-size:clamp(23px,2.8vw,32px);line-height:1.06;letter-spacing:-.045em;font-weight:900;margin:0;overflow-wrap:anywhere}.speak-button{border:0;background:#e1f5ef;border-radius:12px;color:#248e74;width:37px;height:37px;display:grid;place-items:center;font-size:19px;flex-shrink:0}.speak-button.small{width:28px;height:28px;font-size:13px;border-radius:10px}.country-continent-row{margin-top:7px;font-weight:900;font-size:15px;color:#81a3a2}.location-panel{border:1px solid #daeae7;border-radius:22px;padding:15px;background:#eff7f5;margin-bottom:24px}.location-panel-title{display:flex;justify-content:space-between;align-items:center;gap:10px;font-weight:900;font-size:15px;color:#28526a;margin-bottom:8px}.location-panel-sub{font-size:10px;color:#7ca1a1;font-weight:900;text-align:right}.mini-map{height:151px;overflow:hidden;border-radius:14px;background:#d3eaf2;position:relative}.mini-map svg{width:100%;height:100%;display:block}.mini-location-badge{position:absolute;right:8px;top:8px;border-radius:20px;background:#fff9;padding:5px 8px;font-weight:900;font-size:10px;color:#468486}.locate-button{margin-top:11px;background:#fff;color:#258c7f;border:1px solid #dcebe6;width:100%;border-radius:14px;padding:10px 16px;font-weight:900;font-size:13px;display:flex;justify-content:space-between;align-items:center}.locate-button span{font-size:17px}.discover-label{font-size:17px;font-weight:900;letter-spacing:-.025em;margin-bottom:12px}.category-tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:9px}.category-tab{border:2px solid #e5ecea;background:#fff;border-radius:17px;min-height:82px;padding:8px 3px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:5px;color:#50707b}.category-tab>span{font-size:27px;line-height:1.2}.category-tab small{font-size:11px;font-weight:900}.category-tab[aria-selected=true]{border-color:#8fdec6;background:#e3f8ee;color:#147f6b;box-shadow:0 4px 13px #45c09921}.content-items{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px;padding-top:15px}.content-item{border:1px solid #e3ece9;border-radius:18px;background:white;padding:12px;min-width:0}.content-picture{border-radius:13px;height:91px;display:grid;place-items:center;font-size:52px;background:linear-gradient(130deg,#cfece6,#f1e6ca);position:relative;overflow:hidden}.content-picture:before{content:'';position:absolute;inset:-25px;border:2px solid #ffffff3b;border-radius:50%;transform:translate(30%,-8%)}.content-picture>span{position:relative;filter:drop-shadow(0 5px 3px #223a4824)}.content-picture img{width:100%;height:100%;object-fit:cover;border-radius:13px}.content-item-head{margin-top:10px;display:flex;gap:3px;align-items:center;justify-content:space-between}.content-item strong{font-size:13px;line-height:1.25;font-weight:900}.content-item p{margin:5px 0 0;font-size:11.5px;line-height:1.42;color:#67808a;font-weight:700}.content-item .speak-button{width:32px;height:32px;min-width:32px;font-size:14px;border-radius:10px}.content-empty{grid-column:1/-1;background:#fff;border:2px dashed #dbe8e0;border-radius:18px;padding:23px;text-align:center;color:#809a9a;font-size:13px;font-weight:800}.content-empty-icon{display:block;font-size:36px;margin-bottom:8px}.content-spotlight{box-shadow:0 0 0 3px #f4be70}.map-failure{position:absolute;inset:0;z-index:2;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:10px;background:#d2ebef;padding:20px}.map-failure h3{margin:0;font-size:22px}.map-failure p{max-width:320px;font-size:14px;color:#607d86}.map-failure-icon{font-size:70px}.secondary-button{padding:12px 25px;background:#fff;border:2px solid #9ed5cd;border-radius:15px;font-weight:900;color:#257a72}
@media (max-width:900px){.toolbar-button{padding:0 12px;gap:6px}.brand{min-width:155px}.country-sheet{width:min(520px,63vw)}.flags-inner{padding-top:115px}.map-help{display:none}}
@media (max-width:680px){.topbar{left:12px;right:12px;top:12px;align-items:flex-start}.brand{padding:7px;min-width:0;border-radius:16px}.brand-icon{width:39px;height:40px;font-size:25px}.brand-text strong{font-size:13px}.brand-text small{font-size:9px;margin-top:3px}.toolbar{gap:5px}.toolbar-button,.round-toolbar-button{min-height:45px;border-radius:14px;padding:0 8px;gap:4px;font-size:11px}.toolbar-emoji{font-size:19px}.toolbar-chevron{font-size:14px}.round-toolbar-button{min-width:42px;font-size:22px}.filter-button #filter-label{display:none}.toolbar-button #mode-label{display:none}.popover{top:52px}.map-label{left:14px;bottom:35px;padding:11px 13px;max-width:270px}.map-label h2{font-size:20px}.map-label p{font-size:10px}.flags-inner{padding:95px 16px 60px}.flags-mascot{width:57px;height:57px;font-size:30px;border-radius:15px}.flags-heading{gap:11px}.flags-heading h2{font-size:25px}.flags-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.flag-card{min-height:127px;padding:11px 7px;border-radius:17px}.flag-card .flag-emoji{font-size:47px}.flag-card .flag-name{font-size:11px}.country-sheet{top:auto;left:0;right:0;bottom:0;width:100%;height:min(85dvh,840px);border-radius:27px 27px 0 0;animation:sheet-up .24s ease-out}.sheet-grabber{display:block;width:42px;height:5px;border-radius:99px;background:#d9e7e3;margin:9px auto -2px}.sheet-scroll{padding:13px 20px 30px}.country-flag{width:79px;height:69px;font-size:48px}.country-name-row h2{font-size:26px}.location-panel{padding:12px}.mini-map{height:115px}.location-panel-sub{display:none}.category-tab{min-height:73px}.category-tab>span{font-size:23px}.category-tab small{font-size:10px}}
@media (min-width:681px) and (orientation:portrait){.country-sheet{top:auto;left:0;right:0;bottom:0;width:100%;height:79dvh;border-radius:30px 30px 0 0;animation:sheet-up .24s ease-out}.sheet-grabber{display:block;width:46px;height:6px;border-radius:99px;background:#d9e7e3;margin:11px auto -4px}.sheet-scroll{padding-top:17px}.country-identity{margin-bottom:10px}.location-panel{max-width:600px}.mini-map{height:143px}}@keyframes sheet-up{from{transform:translateY(38px);opacity:.5}to{transform:translateY(0);opacity:1}}
@media (max-height:650px) and (min-width:681px){.welcome-planet{width:165px;height:165px;margin:5px auto}.welcome-planet-core{font-size:145px}.welcome-kicker{font-size:11px}.welcome h1{font-size:36px;margin-top:0}.welcome p{font-size:14px;margin-bottom:13px}.play-button{padding:12px 23px}.welcome-bottom{margin-top:12px}.sheet-scroll{padding-top:15px}.mini-map{height:115px}.country-identity{margin-bottom:12px}}
@media (prefers-reduced-motion:reduce){.welcome-planet-core{animation:none}.country-sheet{animation:none}*{scroll-behavior:auto!important}}

/* ==========================================================
   v0.2 — Pantalla despejada, fichas a pantalla completa
   ========================================================== */
.topbar{justify-content:space-between;align-items:flex-start;}
.mode-popover{left:0;right:auto;}
#home-btn,#map-label,#map-help{display:none!important;}

.poi-marker{
  display:flex;align-items:center;justify-content:center;
  width:61px;height:61px;min-width:61px;border-radius:50%;
  background:#fffdf4;border:3px solid #fff;
  box-shadow:0 4px 15px #081e3b60;font-size:32px;
  padding:0;cursor:pointer;touch-action:manipulation;
}
.poi-marker:after{display:none;}
.maplibregl-marker-covered{opacity:0!important;visibility:hidden!important;pointer-events:none!important;}
.country-name-marker{
  color:#315467;font-weight:900;font-size:clamp(10px,1.1vw,13px);line-height:1.15;
  white-space:nowrap;max-width:180px;text-align:center;
  text-shadow:0 1px 2px #ffffff,0 -1px 2px #ffffff,1px 0 2px #ffffff,-1px 0 2px #ffffff,0 2px 8px #ffffff;
  pointer-events:none!important;user-select:none;
}
.flag-art{display:block;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 3px 3px #16324921);}
.flag-card .flag-art{width:clamp(72px,8vw,112px);height:80px;max-width:90%;object-fit:contain;}
.flag-fallback{display:grid;place-items:center;width:100%;height:100%;font-weight:900;font-size:24px;letter-spacing:.08em;color:#74929b;background:#e4edf1;border-radius:10px;}
.flag-card .flag-fallback{width:95px;height:65px;}
.flag-card{min-height:154px;}

/* La ficha cubre toda la superficie tanto en iPad como en móvil. */
.sheet-backdrop{background:#08192988;backdrop-filter:none;}
.country-sheet{
  inset:0;width:100%;height:100%;max-width:none;
  background:#fbfefa;border-radius:0;box-shadow:none;
  animation:full-sheet-in .2s ease-out;
}
@keyframes full-sheet-in{from{opacity:.35;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}
.sheet-grabber{display:none!important;}
.sheet-scroll{
  height:100%;overflow-y:auto;
  padding:max(20px,env(safe-area-inset-top)) max(22px,env(safe-area-inset-right)) max(44px,env(safe-area-inset-bottom)) max(22px,env(safe-area-inset-left));
}
.sheet-top,.country-overview,.discover-label,.category-tabs,.content-items,.voice-panel{max-width:1280px;margin-left:auto;margin-right:auto;}
.sheet-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:clamp(18px,3vh,30px);}
.sheet-top-kicker{font-size:clamp(11px,1.3vw,14px);letter-spacing:.12em;}
.sheet-actions{display:flex;align-items:center;gap:12px;}
.sheet-close{width:50px;height:50px;border-radius:17px;font-size:22px;}
.voice-settings-button{min-height:43px;border:1px solid #d2e7e2;border-radius:14px;background:#eff8f4;color:#38756b;font-weight:900;padding:0 15px;}
.voice-panel{margin-bottom:22px;border:1px solid #dae9e5;background:#f0f8f5;border-radius:19px;padding:17px 20px;}
.voice-panel-heading{display:flex;align-items:baseline;flex-wrap:wrap;gap:8px;color:#2d6170;}
.voice-panel-heading strong{font-weight:900;font-size:16px;}
.voice-panel-heading span,.voice-help{color:#688990;font-size:12px;font-weight:700;}
.voice-settings-fields{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin:13px 0 7px;}
.voice-settings-fields label{font-size:12px;font-weight:900;color:#376571;}
.voice-settings-fields select{height:44px;min-width:180px;max-width:min(100%,350px);flex:1;border:1px solid #cee1dc;border-radius:12px;background:#fff;color:#24495b;padding:0 9px;font:inherit;font-size:13px;font-weight:700;}
.voice-settings-fields input[type=range]{width:112px;accent-color:#2d9b84;}
.voice-settings-fields button{font-size:13px;padding:10px 15px;}
.country-overview{display:grid;grid-template-columns:minmax(0,1fr) minmax(290px,1fr);gap:clamp(16px,4vw,50px);align-items:center;margin-bottom:clamp(18px,3vh,29px);}
.country-identity{display:flex;align-items:center;gap:clamp(14px,2vw,25px);margin:0;}
.country-flag{width:clamp(96px,15vw,185px);height:clamp(78px,11vw,138px);padding:10px;border-radius:24px;flex-shrink:0;}
.country-name-row,.country-continent-row{display:flex;align-items:center;gap:13px;}
.country-name-row h2{font-size:clamp(27px,4vw,52px);line-height:1.04;letter-spacing:-.045em;}
.country-continent-row{margin-top:16px;font-size:clamp(15px,2vw,22px);}
.country-identity .speak-button{width:48px;height:48px;font-size:22px;border-radius:15px;}
.country-identity .speak-button.small{width:41px;height:41px;font-size:18px;border-radius:13px;}
.location-panel{margin:0;padding:11px;border-radius:22px;background:#ebf5f4;}
.mini-map{height:clamp(142px,26vh,236px);border-radius:14px;background:#d5ecf5;}
.mini-map svg{width:100%;height:100%;}
.mini-location-badge{font-size:11px;}
.locate-button{margin-top:9px;min-height:43px;font-size:14px;}
.discover-label{font-size:clamp(20px,2.4vw,28px);margin-bottom:15px;}
.category-tabs{grid-template-columns:repeat(4,minmax(0,1fr));gap:clamp(10px,1.8vw,18px);}
.category-tab{min-height:clamp(91px,13vh,124px);border-radius:21px;gap:7px;}
.category-tab>span{font-size:clamp(30px,4vw,42px);}
.category-tab small{font-size:clamp(12px,1.5vw,16px);}
.content-items{grid-template-columns:repeat(auto-fit,minmax(min(210px,100%),1fr));gap:18px;padding:22px 0 0;}
.content-items:empty{display:none;}
.content-item{padding:14px;border-radius:20px;}
.content-picture{height:clamp(128px,21vh,220px);font-size:clamp(60px,9vw,90px);}
.content-item-head{justify-content:flex-start;align-items:center;gap:10px;margin-top:13px;}
.content-item strong{font-size:clamp(15px,1.6vw,19px);}
.content-item .speak-button{width:42px;height:42px;min-width:42px;font-size:18px;flex-shrink:0;}
.content-item-description{display:flex;gap:11px;align-items:flex-start;margin-top:8px;}
.content-item-description p{font-size:clamp(13px,1.5vw,16px);line-height:1.45;margin:0;padding-top:3px;}
.content-item-description .speak-button.small{width:36px;height:36px;min-width:36px;font-size:15px;border-radius:12px;}
.content-empty{font-size:17px;}

@media (max-width:850px){
  .country-overview{gap:15px;grid-template-columns:minmax(0,1fr) minmax(230px,1fr);}
  .country-identity{gap:12px;}
  .country-flag{width:110px;height:90px;}
  .country-name-row h2{font-size:clamp(24px,4.1vw,36px);}
  .country-identity .speak-button{width:41px;height:41px;font-size:19px;}
  .country-identity .speak-button.small{width:35px;height:35px;font-size:15px;}
  .country-continent-row{margin-top:9px;}
}
@media (max-width:680px){
  .topbar{left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));top:max(12px,env(safe-area-inset-top));}
  .mode-popover{left:0;right:auto;}
  .flags-inner{padding-top:88px;}
  .flag-card .flag-art{width:min(90%,104px);height:62px;}
  .flag-card{min-height:132px;}
  .country-sheet{inset:0;width:100%;height:100%;border-radius:0;animation:full-sheet-in .2s ease-out;}
  .sheet-scroll{padding:max(12px,env(safe-area-inset-top)) 16px max(30px,env(safe-area-inset-bottom));}
  .sheet-top{margin-bottom:14px;}
  .sheet-close{width:43px;height:43px;}
  .voice-settings-button{min-height:39px;padding:0 9px;font-size:12px;}
  .country-overview{display:flex;flex-direction:column;align-items:stretch;gap:14px;margin-bottom:22px;}
  .country-identity{gap:12px;}
  .country-flag{width:103px;height:84px;}
  .country-name-row h2{font-size:clamp(24px,6vw,33px);}
  .country-continent-row{font-size:15px;margin-top:7px;}
  .location-panel{padding:9px;}
  .mini-map{height:157px;}
  .category-tabs{gap:7px;}
  .category-tab{min-height:83px;border-radius:15px;}
  .category-tab>span{font-size:27px;}
  .category-tab small{font-size:11px;}
  .content-items{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;padding-top:14px;}
  .content-picture{height:114px;font-size:54px;}
  .content-item{padding:9px;}
  .content-item .speak-button{width:34px;height:34px;min-width:34px;font-size:15px;}
  .content-item-description .speak-button.small{width:32px;height:32px;min-width:32px;}
  .content-item-description{gap:6px;}
  .content-item-description p{font-size:12px;}
  .content-item strong{font-size:13px;}
  .voice-settings-fields{gap:9px;}
  .voice-settings-fields select{width:100%;flex-basis:100%;}
}
@media (min-width:681px) and (orientation:portrait){
  .country-sheet{inset:0;width:100%;height:100%;border-radius:0;animation:full-sheet-in .2s ease-out;}
  .country-overview{grid-template-columns:1fr;}
  .country-identity{margin-bottom:0;}
  .location-panel{max-width:none;}
  .mini-map{height:208px;}
}
@media (max-height:550px) and (min-width:681px){
  .sheet-scroll{padding-top:10px;}
  .sheet-top{margin-bottom:10px;}
  .country-overview{margin-bottom:12px;}
  .country-flag{width:100px;height:81px;}
  .mini-map{height:125px;}
  .category-tab{min-height:75px;}
}

/* ============================================================
   v0.3: iconos anclados, nombres de islas, MAYUSCULAS, mar azul
   ============================================================ */
/* Solo es un cambio visual: la sintesis de voz conserva acentos y
   escritura natural de los nombres originales en castellano. */
body,button,input,select,option,textarea{text-transform:uppercase;}
.atlas.mode-map #map{background:#77bfe0;}

/* IMPORTANTE: MapLibre posiciona el marcador exterior mediante transform.
   Ni las transiciones ni el hover pueden animar o sustituir ese transform. */
.maplibregl-marker.poi-marker{
  width:49px;height:49px;min-width:49px;
  background:transparent;border:0;border-radius:0;
  padding:0;box-shadow:none;
  transition:none!important;animation:none!important;
  display:flex;align-items:center;justify-content:center;
  line-height:1;
  -webkit-tap-highlight-color:transparent;
}
.maplibregl-marker.poi-marker:hover{transition:none!important;}
.poi-marker:after{display:none!important;}
.poi-glyph{
  display:block;font-size:38px;line-height:1;
  pointer-events:none;user-select:none;
  /* Silueta blanca fina y sombra para que se reconozca sobre nieve y mar. */
  filter:drop-shadow(1px 0 0 #fff) drop-shadow(-1px 0 0 #fff)
         drop-shadow(0 1px 0 #fff) drop-shadow(0 -1px 0 #fff)
         drop-shadow(0 3px 3px #10293b99);
  transform-origin:center;
}
.poi-glyph.poi-image{width:44px;height:44px;object-fit:contain;}
.poi-marker:hover .poi-glyph{transform:scale(1.07);}
.poi-marker:focus-visible{outline:3px solid #ffb84d;border-radius:12px;}
/* Los nombres de islas, que a veces estan en pleno oceano, ganan contraste. */
.country-name-island{
  color:#164a65;
  text-shadow:0 1px 3px #fff,0 -1px 3px #fff,1px 0 3px #fff,-1px 0 3px #fff;
}
@media(max-width:680px){
  .maplibregl-marker.poi-marker{width:46px;height:46px;min-width:46px;}
  .poi-glyph{font-size:36px;}
  .poi-glyph.poi-image{width:41px;height:41px;}
}

/* Evita que las palabras largas de los filtros empujen fuera del iPhone. */
@media(max-width:680px){
  .topbar{gap:8px;}
  .mode-toolbar{flex-shrink:0;}
  .filter-toolbar{min-width:0;}
  .toolbar-button{min-height:52px;font-size:clamp(11px,3vw,14px);padding:0 9px;gap:5px;}
  #filter-label{min-width:0;max-width:calc(100vw - 226px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  .toolbar-emoji{font-size:21px;}
}


/* ============================================================
   v0.4: POI con anclaje simple y estable
   ============================================================ */
/* El propio nodo de MapLibre es un DIV sin fondo, borde, transición ni
   transform visual. MapLibre es el único que escribe su transform de posición. */
.maplibregl-marker.poi-marker{
  position:absolute!important;top:0;left:0;
  width:46px;height:46px;min-width:46px;
  margin:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;
  transition:none!important;animation:none!important;transform-origin:initial;
  display:grid;place-items:center;line-height:1;cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
.poi-marker .poi-glyph{
  display:block;font-size:36px;line-height:1;pointer-events:none;user-select:none;
  filter:drop-shadow(1px 0 0 #fff) drop-shadow(-1px 0 0 #fff)
         drop-shadow(0 1px 0 #fff) drop-shadow(0 -1px 0 #fff)
         drop-shadow(0 3px 3px #10293b99);
}
.poi-marker .poi-glyph.poi-image{width:41px;height:41px;object-fit:contain;}
.poi-marker:hover .poi-glyph{transform:none;}
.poi-marker:focus-visible{outline:3px solid #ffb84d;outline-offset:2px;border-radius:10px;}

/* Banderas: contador limpio y grid inmediatamente debajo. */
.flags-count{margin:0 0 18px;text-align:center;font-size:clamp(22px,3vw,34px);font-weight:900;color:#2e6673;}

/* ============================================================
   v0.5: ficha en dos filas, contenidos en popup y SVG centrados
   ============================================================ */
/* Iconos de interfaz dibujados como SVG: evita el desplazamiento de glifos
   emoji/fuente que se observaba en WebKit de iPadOS 17. */
.ui-icon{display:block;width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.speak-button .ui-icon{width:22px;height:22px}
.speak-button.small .ui-icon{width:18px;height:18px}
.sheet-close .ui-icon{width:24px;height:24px}
.speak-button,.sheet-close,.icon-button{line-height:1;align-items:center;justify-content:center}
.toolbar-chevron{display:block;width:18px;height:18px;margin-left:2px;color:#84abae;fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;transform:none}

/* Ficha: primera fila = bandera + nombre/continente + acciones. */
.country-header{max-width:1280px;margin:0 auto clamp(20px,3vh,30px);display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:clamp(18px,3vw,38px)}
.country-header .country-identity{margin:0;min-width:0}
.country-header .country-identity-copy{min-width:0;max-width:100%}
.country-header .country-name-row{min-width:0}
.country-header .country-name-row h2{font-size:clamp(29px,4.4vw,52px);line-height:1.02;letter-spacing:-.04em;overflow-wrap:normal;word-break:normal;hyphens:none;white-space:normal}
.country-header .country-continent-row{margin-top:10px}
.country-header .sheet-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex-shrink:0}

/* Segunda fila: localizador a la izquierda y cuatro categorías apiladas. */
.country-main-grid{max-width:1280px;margin:0 auto;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:clamp(18px,4vw,52px);align-items:stretch}
.country-main-grid .location-panel{margin:0;padding:13px;display:flex;flex-direction:column}
.country-main-grid .mini-map{height:clamp(235px,38vh,365px);flex:1;min-height:210px}
.country-main-grid .locate-button{flex:0 0 auto}
.country-main-grid .category-tabs{max-width:none;margin:0;display:grid;grid-template-columns:1fr;grid-template-rows:repeat(4,minmax(0,1fr));gap:12px}
.country-main-grid .category-tab{min-height:68px;border-radius:20px;display:flex;flex-direction:row;justify-content:flex-start;align-items:center;gap:18px;padding:11px 22px;text-align:left}
.country-main-grid .category-tab>span{font-size:clamp(30px,4vw,43px);width:52px;text-align:center;flex:0 0 52px}
.country-main-grid .category-tab small{font-size:clamp(15px,2vw,21px);letter-spacing:.01em}

/* Popup de categoría: lectura vertical tipo documento, con soporte foto/vídeo. */
.category-panel{position:absolute;inset:0;z-index:20;background:#071c2e99;display:grid;place-items:center;padding:clamp(14px,3vw,36px)}
.category-panel-card{width:min(1040px,100%);height:min(900px,94%);overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;background:#fbfefa;border-radius:30px;box-shadow:0 24px 70px #06182a88;padding:0 clamp(18px,3vw,34px) clamp(28px,4vw,46px)}
.category-panel-header{position:sticky;top:0;z-index:3;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:clamp(18px,2.5vw,27px) 0 16px;background:#fbfefa;border-bottom:1px solid #e2ece8}
.category-panel-title{display:flex;align-items:center;gap:14px;min-width:0}
.category-panel-title>span{font-size:clamp(30px,4vw,46px);line-height:1}
.category-panel-title h3{margin:0;font-size:clamp(25px,3.5vw,40px);line-height:1;font-weight:900;color:#244e61}
.category-panel .content-items{display:block;max-width:880px;margin:0 auto;padding:26px 0 0}
.category-panel .content-item{display:block;margin:0 0 28px;padding:clamp(14px,2.2vw,23px);border-radius:24px;background:#fff}
.category-panel .content-item:last-child{margin-bottom:0}
.category-panel .content-media{width:100%;overflow:hidden;border-radius:18px;background:linear-gradient(130deg,#cfece6,#f1e6ca)}
.category-panel .content-picture{height:auto;min-height:clamp(190px,36vw,390px);aspect-ratio:16/9;font-size:clamp(76px,12vw,128px)}
.category-panel .content-picture img{width:100%;height:100%;object-fit:cover;border-radius:18px}
.category-panel .content-video{aspect-ratio:16/9;background:#10283e}
.category-panel .content-video iframe,.category-panel .content-video video{display:block;width:100%;height:100%;border:0;background:#000}
.category-panel .content-item-head{display:flex;justify-content:flex-start;align-items:center;gap:12px;margin-top:18px}
.category-panel .content-item strong{font-size:clamp(20px,2.5vw,29px);line-height:1.2}
.category-panel .content-item .speak-button{width:44px;height:44px;min-width:44px;border-radius:14px}
.category-panel .content-item-description{display:flex;align-items:flex-start;gap:12px;margin-top:12px}
.category-panel .content-item-description p{margin:0;padding-top:4px;font-size:clamp(15px,1.8vw,19px);line-height:1.55;color:#587580;font-weight:700}
.category-panel .content-item-description .speak-button.small{width:38px;height:38px;min-width:38px;border-radius:12px}
.category-panel .content-empty{margin-top:25px;font-size:17px}

@media (max-width:850px){
  .country-header{gap:14px}
  .country-header .country-flag{width:108px;height:88px}
  .country-header .country-name-row h2{font-size:clamp(27px,4.2vw,39px)}
  .country-main-grid{gap:18px}
  .country-main-grid .mini-map{height:clamp(220px,34vh,300px)}
  .country-main-grid .category-tab{min-height:62px;padding:9px 16px;gap:12px}
  .country-main-grid .category-tab>span{width:42px;flex-basis:42px;font-size:32px}
}

@media (max-width:680px){
  .country-header{grid-template-columns:minmax(0,1fr) auto;gap:8px;margin-bottom:16px}
  .country-header .country-identity{gap:9px}
  .country-header .country-flag{width:78px;height:66px;padding:6px;border-radius:16px}
  .country-header .country-name-row,.country-header .country-continent-row{gap:7px}
  .country-header .country-name-row h2{font-size:clamp(20px,6vw,28px);line-height:1.03}
  .country-header .country-continent-row{font-size:13px;margin-top:6px}
  .country-header .country-identity .speak-button{width:34px;height:34px;border-radius:11px}
  .country-header .country-identity .speak-button.small{width:30px;height:30px}
  .country-header .sheet-actions{gap:6px}
  .country-header .voice-settings-button{width:43px;min-width:43px;height:43px;min-height:43px;padding:0;font-size:0}
  .country-header .voice-settings-button::before{content:'⚙️';font-size:19px;line-height:1}
  .country-header .sheet-close{width:43px;height:43px}
  .country-main-grid{grid-template-columns:1fr;gap:13px}
  .country-main-grid .mini-map{height:155px;min-height:155px}
  .country-main-grid .category-tabs{grid-template-rows:repeat(4,64px);gap:8px}
  .country-main-grid .category-tab{min-height:64px;border-radius:15px;padding:7px 14px}
  .country-main-grid .category-tab>span{font-size:28px;width:40px;flex-basis:40px}
  .country-main-grid .category-tab small{font-size:14px}
  .category-panel{padding:8px}
  .category-panel-card{height:calc(100% - 2px);border-radius:22px;padding:0 13px 24px}
  .category-panel-header{padding:13px 2px 11px}
  .category-panel-title>span{font-size:31px}
  .category-panel-title h3{font-size:25px}
  .category-panel .content-items{padding-top:14px}
  .category-panel .content-item{padding:10px;margin-bottom:16px;border-radius:18px}
  .category-panel .content-picture{min-height:165px}
  .category-panel .content-item-head{margin-top:12px;gap:8px}
  .category-panel .content-item strong{font-size:18px}
  .category-panel .content-item .speak-button{width:36px;height:36px;min-width:36px}
  .category-panel .content-item-description p{font-size:14px}
}

/* ============================================================
   v0.6: pulido de ficha, contenido y etiquetas del mapa
   ============================================================ */
/* Título algo más contenido y bandera con un marco menos redondeado. */
.country-header .country-name-row h2{
  font-size:clamp(27px,4vw,42px);
}
.country-header .country-flag{
  height:clamp(78px,11vw,144px);
  padding:8px;
  border-radius:8px;
}

/* El texto de PAÍS y CONTINENTE empieza exactamente en la misma vertical.
   El botón pequeño del continente se centra en la misma columna del altavoz grande. */
.country-header .country-name-row,
.country-header .country-continent-row{
  display:grid;
  grid-template-columns:48px minmax(0,1fr);
  column-gap:13px;
  align-items:center;
}
.country-header .country-name-row .speak-button,
.country-header .country-continent-row .speak-button{justify-self:center;}

/* Popup más aprovechado: menos marco exterior y contenido sin tarjetas visuales. */
.category-panel{padding:clamp(8px,1.5vw,18px);}
.category-panel-card{
  width:min(1180px,100%);
  height:min(940px,97%);
  padding:0 clamp(14px,2vw,24px) clamp(22px,3vw,32px);
}
.category-panel .content-items{
  max-width:none;
  margin:0;
  padding:18px 0 0;
}
.category-panel .content-item{
  margin:0 0 clamp(24px,3.5vw,38px);
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
.category-panel .content-item:last-child{margin-bottom:0;}

/* Nombres largos del mapa político pueden ocupar varias líneas. */
.country-name-marker{
  display:block;
  width:max-content;
  max-width:150px;
  white-space:normal;
  overflow-wrap:normal;
  word-break:normal;
  text-align:center;
}

@media (max-width:850px){
  .country-header .country-name-row h2{font-size:clamp(25px,4vw,38px);}
  .country-header .country-name-row,
  .country-header .country-continent-row{grid-template-columns:41px minmax(0,1fr);column-gap:11px;}
  .country-header .country-flag{height:clamp(78px,11vw,112px);border-radius:8px;}
}

@media (max-width:680px){
  .country-header .country-name-row h2{font-size:clamp(20px,6vw,28px);}
  .country-header .country-name-row,
  .country-header .country-continent-row{grid-template-columns:34px minmax(0,1fr);column-gap:8px;}
  .country-header .country-flag{height:66px;border-radius:7px;padding:6px;}
  .category-panel{padding:5px;}
  .category-panel-card{height:calc(100% - 2px);padding:0 10px 18px;}
  .category-panel .content-items{padding-top:10px;}
  .category-panel .content-item{padding:0;margin-bottom:22px;border-radius:0;}
  .country-name-marker{max-width:125px;}
}


/* ============================================================
   v0.6.1: pequeños ajustes de ficha, minimapa y banderas
   ============================================================ */
.country-header .country-flag{
  padding:8px 8px 10px;
}
.country-header .country-flag .flag-art,
.country-header .country-flag .flag-fallback{
  display:block;
  width:100%;
  height:100%;
}
/* El altavoz del continente mantiene el mismo tamaño que el del país. */
.country-header .country-continent-row .speak-button{
  width:48px;
  height:48px;
  min-width:48px;
  border-radius:15px;
}
.country-header .country-continent-row .speak-button .ui-icon{
  width:22px;
  height:22px;
}
/* Un poco más de aire horizontal entre el icono y el texto, manteniendo la alineación. */
.country-header .country-name-row,
.country-header .country-continent-row{
  column-gap:12px;
}
@media (max-width:850px){
  .country-header .country-continent-row .speak-button{width:41px;height:41px;min-width:41px;border-radius:13px;}
  .country-header .country-continent-row .speak-button .ui-icon{width:19px;height:19px;}
  .country-header .country-flag{padding:7px 7px 9px;}
}
@media (max-width:680px){
  .country-header .country-continent-row .speak-button{width:34px;height:34px;min-width:34px;border-radius:11px;}
  .country-header .country-continent-row .speak-button .ui-icon{width:17px;height:17px;}
  .country-header .country-flag{padding:6px 6px 8px;}
}


/* ============================================================
   v0.6.2: safe areas, banderas en iPad y limpieza final
   ============================================================ */
html,body,#app{height:100%;min-height:100dvh;}
body{background:#fbfefa;}
.welcome,.atlas,.map-surface,#map,.flags-screen,.country-sheet{min-height:100dvh;}

/* Un poco más de aire superior en modo app de iPad y sin franja residual abajo. */
.sheet-scroll{
  min-height:100dvh;
  padding:max(26px,calc(env(safe-area-inset-top) + 10px)) max(22px,env(safe-area-inset-right)) max(44px,calc(env(safe-area-inset-bottom) + 8px)) max(22px,env(safe-area-inset-left));
}

/* En iPad apaisado algunas banderas quedaban demasiado justas abajo.
   En la ficha del país usamos un ajuste más conservador que no fuerza 100% exacto. */
.country-header .country-flag{
  padding:10px 10px 14px;
  overflow:hidden;
}
.country-header .country-flag .flag-art,
.country-header .country-flag .flag-fallback{
  width:auto;
  height:auto;
  max-width:100%;
  max-height:100%;
  place-self:center;
}

@media (max-width:850px){
  .sheet-scroll{padding:max(22px,calc(env(safe-area-inset-top) + 8px)) max(18px,env(safe-area-inset-right)) max(36px,calc(env(safe-area-inset-bottom) + 6px)) max(18px,env(safe-area-inset-left));}
  .country-header .country-flag{padding:8px 8px 11px;}
}
@media (max-width:680px){
  .sheet-scroll{padding:max(16px,calc(env(safe-area-inset-top) + 8px)) 16px max(30px,calc(env(safe-area-inset-bottom) + 6px));}
  .country-header .country-flag{padding:6px 6px 8px;}
}


/* ============================================================
   v0.6.3: iPad standalone, bandera y centrado visual del minimapa
   ============================================================ */
/* En la ficha dejamos que la altura de la fila gobierne el marco. En iPad
   apaisado evita que el SVG llegue visualmente al borde inferior. */
.country-header .country-flag{
  height:100%;
  padding:10px;
  overflow:hidden;
}
.country-header .country-flag .flag-art,
.country-header .country-flag .flag-fallback{
  width:auto;
  height:auto;
  max-width:100%;
  max-height:100%;
  place-self:center;
}

/* Al ejecutarse desde "Añadir a pantalla de inicio" damos aire real a la
   barra de iPadOS incluso en dispositivos donde safe-area-inset-top vale 0. */
.standalone .topbar{
  top:max(38px,calc(env(safe-area-inset-top) + 20px));
}
.standalone .sheet-scroll{
  padding-top:max(42px,calc(env(safe-area-inset-top) + 22px));
}

/* En iPad apaisado la ficha suele caber entera: centramos el bloque como una
   unidad. Si el contenido crece, los márgenes auto colapsan y sigue pudiendo
   hacerse scroll con normalidad. */
@media (min-width:681px) and (orientation:landscape){
  .standalone .sheet-scroll{display:flex;flex-direction:column;}
  .standalone .country-header{margin-top:auto;}
  .standalone .country-main-grid{margin-bottom:auto;}
}

@media (max-width:850px){
  .country-header .country-flag{height:100%;padding:10px;}
}
@media (max-width:680px){
  .country-header .country-flag{height:100%;padding:7px;}
}


/* ============================================================
   v0.6.4: iPad standalone a ancho completo + acabado de ficha
   ============================================================ */
/* La barra de estado de la PWA toma un fondo claro desde html/root. */
html{background:#fff;}
.standalone, .standalone body, .standalone #app{background:#fff;}

/* En standalone el centrado vertical convertía la ficha en un flex column;
   fijamos explícitamente el ancho para que los bloques sigan ocupando toda
   la superficie útil, igual que en el navegador normal. */
.standalone .country-header,
.standalone .country-main-grid,
.standalone .voice-panel{
  width:100%;
  max-width:1280px;
  align-self:center;
}

/* Ajuste probado en iPad: el marco conserva 10 px homogéneos y la altura de
   la fila gobierna el contenedor. La bandera interior vuelve a usar el
   object-fit:contain global en lugar de forzar un tamaño alternativo. */
.country-header .country-flag{
  height:100%;
  padding:10px;
  box-sizing:border-box;
}
.country-header .country-flag .flag-art,
.country-header .country-flag .flag-fallback{
  width:100%;
  height:100%;
  max-width:none;
  max-height:none;
  object-fit:contain;
}

@media (max-width:850px){
  .country-header .country-flag{height:100%;padding:10px;}
}
@media (max-width:680px){
  .country-header .country-flag{height:100%;padding:7px;}
}


/* ============================================================
   v0.7: landing personalizada de Adrián
   ============================================================ */
:root{--display-font:'Fredoka','Nunito',ui-rounded,system-ui,-apple-system,sans-serif;}
.welcome-content{padding:26px 26px 38px;}
.welcome-hero{position:relative;width:min(100%,720px);margin:0 auto 4px;display:grid;place-items:center;}
.welcome-planet,.planet-orbit,.welcome-kicker,.welcome p{display:none!important;}
.welcome-hero-glow{position:absolute;border-radius:50%;filter:blur(34px);opacity:.4;pointer-events:none;}
.hero-glow-one{width:180px;height:180px;left:13%;bottom:10%;background:#47d9cb;}
.hero-glow-two{width:160px;height:160px;right:16%;top:16%;background:#ffd384;}
.welcome-mascot{width:clamp(280px,44vw,520px);height:auto;display:block;position:relative;z-index:2;filter:drop-shadow(0 18px 32px #0a27438a);transform-origin:68% 30%;animation:mascot-scout 6.4s ease-in-out infinite;}
.welcome-binocular-glint{position:absolute;z-index:3;width:30px;height:30px;border-radius:50%;right:18%;top:22%;background:radial-gradient(circle,#fff8cc 0%,#fff2a8 36%,#ffffff44 58%,transparent 72%);box-shadow:0 0 22px #fff0b5;mix-blend-mode:screen;opacity:.18;animation:binocular-glint 6.4s ease-in-out infinite;pointer-events:none;}
@keyframes mascot-scout{0%,100%{transform:translateY(5px) rotate(-1.2deg) scale(1);}22%{transform:translateY(-3px) rotate(.4deg) scale(1.01);}45%{transform:translateY(1px) rotate(1.1deg) scale(1.02);}70%{transform:translateY(-4px) rotate(-.4deg) scale(1.01);}}
@keyframes binocular-glint{0%,18%,100%{opacity:.15;transform:translate(0,0) scale(.75);}28%{opacity:.75;transform:translate(6px,-5px) scale(1.06);}40%{opacity:.25;transform:translate(1px,1px) scale(.82);}58%{opacity:.82;transform:translate(-4px,-6px) scale(1.08);}76%{opacity:.2;transform:translate(3px,2px) scale(.85);}}
.welcome h1{font-family:var(--display-font);font-size:clamp(36px,5.3vw,66px);line-height:1.02;letter-spacing:-.03em;margin:6px 0 18px;max-width:12ch;text-wrap:balance;text-shadow:0 8px 20px #0a27444d;}
.welcome h1 span{display:inline-block;color:#ffe09d;}
.play-button{padding:17px 30px;background:#ffc967;border-bottom-width:5px;font-size:clamp(18px,2vw,24px);border-radius:22px;font-family:var(--display-font);}
.play-symbol{padding:7px 8px 7px 10px;margin-right:9px;}
.welcome-bottom{margin-top:22px;font-weight:900;color:#e3f2f6;font-size:clamp(15px,2vw,21px);line-height:1.5;letter-spacing:.01em;text-shadow:0 4px 16px #08263c48;}

/* En standalone y landscape, la ficha queda un poquito más alta que el centro matemático. */
@media (min-width:681px) and (orientation:landscape){
  .standalone .country-header,
  .standalone .country-main-grid,
  .standalone .voice-panel{transform:translateY(-10px);}
}

@media (max-width:850px){
  .welcome-content{padding:22px 20px 34px;}
  .welcome-mascot{width:clamp(260px,52vw,430px);}
  .welcome-binocular-glint{right:16%;top:20%;}
  .welcome-bottom{max-width:26ch;font-size:clamp(15px,2.4vw,19px);}
}
@media (max-width:680px){
  .welcome-content{padding:18px 16px 28px;}
  .welcome-hero{margin-bottom:2px;}
  .welcome-mascot{width:min(86vw,390px);}
  .welcome-binocular-glint{width:24px;height:24px;right:14%;top:19%;}
  .welcome h1{font-size:clamp(34px,10vw,49px);margin:8px 0 16px;}
  .play-button{padding:15px 23px;font-size:19px;}
  .welcome-bottom{font-size:16px;max-width:22ch;}
}


/* ============================================================
   v0.7.1: landing apaisada con Adrián animado
   ============================================================ */
:root{--display-font:'Luckiest Guy','Nunito',ui-rounded,system-ui,-apple-system,sans-serif;}
.welcome-content{
  position:relative;z-index:1;
  width:min(1120px,calc(100vw - 44px));
  padding:28px 26px 34px;
  display:grid;
  grid-template-columns:1fr;
  grid-template-areas:'top' 'button' 'topics';
  align-content:center;
  gap:20px;
  text-align:initial;
}
.welcome-top-row{grid-area:top;display:grid;grid-template-columns:minmax(300px,430px) minmax(0,1fr);align-items:center;gap:18px;width:100%;}
.welcome-copy{display:flex;align-items:center;justify-content:flex-start;min-width:0;margin-left: 30px;}
.welcome-hero{position:relative;width:min(100%,430px);margin:0 auto 0 0;display:grid;place-items:center;}
.welcome-character{position:relative;width:100%;aspect-ratio:1223/1286;animation:hero-bob 5.4s ease-in-out infinite;}
.welcome-mascot,.welcome-planet,.planet-orbit,.welcome-kicker,.welcome p{display:none!important;}
.welcome-mascot-base,.welcome-mascot-arms{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none;}
.welcome-mascot-arms{transform-origin:63.8% 38.9%;animation:binocular-pulse 3.8s ease-in-out infinite;will-change:transform;}
.welcome-hero-glow{position:absolute;border-radius:50%;filter:blur(36px);opacity:.45;pointer-events:none;}
.hero-glow-one{width:180px;height:180px;left:8%;bottom:12%;background:#47d9cb;}
.hero-glow-two{width:170px;height:170px;right:10%;top:14%;background:#ffd384;}
.welcome-binocular-glint{position:absolute;z-index:3;width:34px;height:34px;border-radius:50%;right:12%;top:26%;background:radial-gradient(circle,#fffce0 0%,#ffe37d 36%,#ffffff44 58%,transparent 72%);box-shadow:0 0 24px #fff1b8;mix-blend-mode:screen;opacity:.18;animation:binocular-glint 3.8s ease-in-out infinite;pointer-events:none;}
@keyframes hero-bob{0%,100%{transform:translateY(2px) rotate(-1deg)}50%{transform:translateY(-7px) rotate(.8deg)}}
@keyframes binocular-pulse{0%,100%{transform:translate(0,0) rotate(0deg) scale(1)}18%{transform:translate(-3px,-6px) rotate(-1.6deg) scale(1.018)}38%{transform:translate(-7px,-10px) rotate(-2.6deg) scale(1.03)}58%{transform:translate(-2px,-4px) rotate(-1deg) scale(1.012)}80%{transform:translate(1px,2px) rotate(.4deg) scale(.995)}}
@keyframes binocular-glint{0%,100%{opacity:.1;transform:translate(0,0) scale(.72)}24%{opacity:.8;transform:translate(7px,-4px) scale(1)}42%{opacity:.22;transform:translate(2px,0) scale(.82)}67%{opacity:.78;transform:translate(-4px,-5px) scale(1.04)}84%{opacity:.18;transform:translate(2px,1px) scale(.78)}}
.welcome h1{font-family:var(--display-font);font-size:clamp(46px,6vw,88px);line-height:.95;letter-spacing:.01em;margin:0;color:#fffaf0;text-shadow:0 10px 0 #144869,0 16px 24px #08263c85;transform:translateY(-10px) rotate(-6deg);max-width:none;white-space:nowrap;}
.welcome h1 .title-line{display:block;transform-origin:left center;}
.welcome h1 .line-one{margin-left:0;}
.welcome h1 .line-two{margin-left:90px;margin-top: 13px;transform:rotate(2deg);}
.welcome h1 span span{color:#ffe29d;}
.play-button{grid-area:button;justify-self:center;align-self:center;padding:20px 38px;min-height:74px;min-width:min(420px,92vw);margin:6px auto 4px;background:#ffc967;border:0;border-bottom:6px solid #e7a946;color:#203d51;font-size:clamp(20px,2.4vw,28px);font-weight:900;border-radius:24px;box-shadow:0 14px 28px #061f3570;transition:transform .12s,box-shadow .12s;font-family:'Nunito',system-ui,sans-serif;}
.play-button:hover{transform:translateY(-2px);box-shadow:0 18px 34px #061f3590}.play-symbol{font-size:.72em;background:#233e59;border-radius:999px;color:#ffcf6d;padding:9px 10px 9px 12px;margin-right:10px}.welcome-bottom,.welcome-bottom-grid{grid-area:topics;}
.welcome-bottom{display:none!important;}
.welcome-bottom-grid{display:flex;gap:2px;justify-self:center;}
.welcome-topic{display:flex;align-items:center;justify-content:center;gap:6px;padding:16px 18px;color:#effbff;font-weight:600;font-size:clamp(14px,2vw,18px);letter-spacing:.01em;backdrop-filter:blur(10px);}
.welcome-topic span{display:inline-block;transform:translateY(1px);}

@media (max-width:900px){
  .welcome-content{width:min(100vw - 28px,860px);padding:22px 16px 28px;gap:16px;}
  .welcome-top-row{grid-template-columns:1fr;gap:8px;}
  .welcome-hero{width:min(76vw,360px);margin:0 auto;}
  .welcome-copy{justify-content:center;}
  .welcome h1{font-size:clamp(40px,9vw,64px);text-align:center;transform:translateY(-4px) rotate(-4deg);white-space:normal;}
  .welcome h1 .line-one{margin-left:0;}
  .welcome h1 .line-two{margin-left:18px;}
  .welcome-bottom-grid{width:min(540px,100%);}
}
@media (max-width:680px){
  .welcome-content{width:calc(100vw - 20px);padding:18px 10px 24px;gap:14px;}
  .welcome-hero{width:min(84vw,320px);}
  .welcome-binocular-glint{width:26px;height:26px;right:12%;top:26%;}
  .play-button{min-width:min(92vw,360px);padding:18px 26px;min-height:68px;font-size:22px;}
  .welcome-bottom-grid{grid-template-columns:1fr;gap:10px;}
  .welcome-topic{font-size:18px;padding:14px 16px;}
}
@media (prefers-reduced-motion:reduce){
  .welcome-character,.welcome-mascot-arms,.welcome-binocular-glint{animation:none!important;}
}


/* ============================================================
   v0.8.1: POI tipo pegatina
   ============================================================ */
.poi-glyph.poi-image{
  filter:drop-shadow(0 3px 3px #10293b88);
}


/* ============================================================
   v0.8.2: validación visual de contenido, POIs y zoom del globo
   ============================================================ */
/* Contenidos: dejamos que la fotografía conserve una proporción natural y
   respire dentro del documento, sin marco/gradiente decorativo. */
.category-panel .content-media{
  background:transparent;
}
.category-panel .content-picture{
  aspect-ratio:auto;
  min-height:0;
  height:auto;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:visible;
  background:transparent;
}
.category-panel .content-picture::before{display:none;}
.category-panel .content-picture img{
  display:block;
  width:67%;
  height:auto;
  max-width:100%;
  object-fit:contain;
  border-radius:18px;
}

/* Cada bloque se lee como una pequeña sección de documento. */
.category-panel .content-item{
  margin:0;
  padding:0;
}
.category-panel .content-item:not(:last-child){
  padding-bottom:50px;
  margin-bottom:50px;
  border-bottom:2px solid #dfeae7;
}

/* Los dos botones de lectura de un contenido tienen exactamente el mismo tamaño. */
.category-panel .content-item .speak-button,
.category-panel .content-item-description .speak-button.small{
  width:44px;
  height:44px;
  min-width:44px;
  border-radius:14px;
}

/* Los PNG de los POI ganan casi el doble de superficie visible.
   El nodo exterior sigue sin transformaciones para no romper el anclaje de MapLibre. */
.maplibregl-marker.poi-marker{
  width:90px;
  height:90px;
  min-width:90px;
}
.poi-marker .poi-glyph.poi-image,
.poi-glyph.poi-image{
  width:82px;
  height:82px;
  object-fit:contain;
}
.poi-marker .poi-glyph:not(.poi-image){font-size:52px;}

@media (max-width:680px){
  .category-panel .content-picture img{width:82%;}
  .category-panel .content-item:not(:last-child){padding-bottom:30px;margin-bottom:30px;}
  .category-panel .content-item .speak-button,
  .category-panel .content-item-description .speak-button.small{width:36px;height:36px;min-width:36px;border-radius:12px;}
  .maplibregl-marker.poi-marker{width:78px;height:78px;min-width:78px;}
  .poi-marker .poi-glyph.poi-image,.poi-glyph.poi-image{width:70px;height:70px;}
  .poi-marker .poi-glyph:not(.poi-image){font-size:46px;}
}


/* ============================================================
   v0.8.3: saludos por país, filtro coherente y separación de acciones
   ============================================================ */
.greeting-actions{display:flex;align-items:center;gap:9px;}
.greeting-button{
  height:48px;min-width:112px;padding:0 14px;
  display:flex;align-items:center;justify-content:center;gap:8px;
  border:1px solid #d7e8e4;border-radius:16px;background:#eef8f4;
  color:#285e68;font-weight:900;box-shadow:0 3px 12px #153b4b10;
}
.greeting-button:hover{background:#e4f5ee;}
.greeting-emoji{font-size:22px;line-height:1;}
.greeting-word{font-size:14px;letter-spacing:.01em;}
.country-header .sheet-close{margin-left:18px;}

@media (max-width:850px){
  .greeting-button{height:44px;min-width:94px;padding:0 10px;gap:6px;}
  .greeting-emoji{font-size:20px;}
  .greeting-word{font-size:12px;}
  .country-header .sheet-close{margin-left:12px;}
}
@media (max-width:680px){
  .greeting-actions{gap:5px;}
  .greeting-button{width:42px;min-width:42px;height:42px;padding:0;border-radius:13px;}
  .greeting-word{display:none;}
  .greeting-emoji{font-size:20px;}
  .country-header .sheet-close{margin-left:6px;}
}


/* ============================================================
   v0.8.4: saludos visuales + fonoteca regional
   ============================================================ */
.greeting-actions{gap:10px;}
.greeting-button{
  width:56px;height:56px;min-width:56px;padding:0;
  display:grid;place-items:center;
  border-radius:18px;
}
.greeting-emoji{font-size:28px;line-height:1;transform:translateY(-1px);}
.greeting-word{display:none!important;}
.country-header .sheet-close{margin-left:26px;}
@media (max-width:850px){
  .greeting-button{width:54px;height:54px;min-width:54px;padding:0;border-radius:17px;}
  .greeting-emoji{font-size:27px;}
  .country-header .sheet-close{margin-left:22px;}
}
@media (max-width:680px){
  .greeting-actions{gap:7px;}
  .greeting-button{width:48px;height:48px;min-width:48px;border-radius:15px;}
  .greeting-emoji{font-size:24px;}
  .country-header .sheet-close{margin-left:16px;}
}
