/* Mapas de América Pop. The map pieces share Geografía Pop's look (geo-*). */
.pop-dom.ma-play { justify-content: center; gap: 8px; padding-top: 4px; }
.geo-card { width: min(560px, 100%); flex: 0 0 auto; display: flex; align-items: center; gap: 12px; padding: 8px 14px 8px 8px; border-radius: 22px; background: #fff; box-shadow: 0 5px 0 rgba(0, 0, 0, 0.16); min-height: 68px; }
.geo-card.pop { animation: geo-card 0.35s cubic-bezier(0.2, 1.6, 0.4, 1); }
.geo-card.good { background: #e3ffe9; }
.geo-card.miss { background: #fff1d6; }
.geo-ico { width: 52px; height: 52px; flex: 0 0 auto; border-radius: 16px; display: grid; place-items: center; font-size: 30px; background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.15); overflow: hidden; }
.ma-card-flag { width: 100%; height: 100%; object-fit: cover; }
.geo-txt { min-width: 0; line-height: 1.12; }
.geo-txt small { display: block; font-size: 14px; font-weight: 700; color: #6b6390; }
.geo-txt b { display: block; font-size: clamp(19px, 5.4vw, 27px); font-weight: 800; color: #1d1640; }
.geo-txt em { display: block; font-style: normal; font-size: 13.5px; font-weight: 700; color: #3c7a4c; margin-top: 2px; }
.geo-bar { width: min(560px, 100%); height: 8px; flex: 0 0 auto; border-radius: 99px; background: rgba(255, 255, 255, 0.35); overflow: hidden; }
.geo-bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: #ffd23f; transition: width 0.35s; }
.geo-wrap { position: relative; flex: 1 1 auto; min-height: 0; width: 100%; border-radius: 22px; overflow: hidden; box-shadow: 0 6px 0 rgba(0, 0, 0, 0.14); }
.ma-wrap { opacity: 0; transform: scale(0.97); transition: opacity 0.4s, transform 0.5s cubic-bezier(0.2, 1.4, 0.4, 1); }
.ma-wrap.in { opacity: 1; transform: none; }
.geo-svg { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 22px; box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.5); touch-action: none; }
.geo-opts { flex: 0 0 auto; width: min(560px, 100%); display: grid; gap: 8px; }
.geo-opt { border: 0; border-radius: 18px; padding: 10px 14px; min-height: 52px; background: #fff; font: inherit; font-weight: 800; font-size: 18px; line-height: 1.1; color: #1d1640; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.18); }
.geo-opt:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.18); }
.geo-opt.ok { background: #7cf06b; animation: geo-card 0.35s; }
.geo-opt.no { background: #ff8f9f; animation: geo-shake 0.35s; }
.geo-reg { stroke: #2a2350; stroke-width: 1.6px; stroke-opacity: 0.85; vector-effect: non-scaling-stroke; stroke-linejoin: round; transition: fill 0.35s; cursor: pointer; }
.geo-reg.slot { stroke-dasharray: 5 4; stroke-opacity: 0.6; }
.geo-reg.ok { animation: geo-pop 0.5s cubic-bezier(0.2, 1.6, 0.4, 1); transform-box: fill-box; transform-origin: center; }
.geo-reg.bad { fill: #ff5470 !important; }
.geo-reg.hint { animation: geo-blink 0.5s ease-in-out 4; }
.geo-reg.slot.hint { animation: geo-blink 0.6s ease-in-out infinite; }
.geo-reg.glow { animation: geo-glow 1s ease-in-out infinite; }
.geo-reg.near { fill: #fff3a8 !important; stroke: #ffb627; stroke-width: 3px; stroke-dasharray: none; }
.geo-reg.wave { animation: ma-wave 0.6s ease-in-out both; transform-box: fill-box; transform-origin: center; }
.geo-land { fill: #efe6cf; stroke: #cbbd9c; stroke-width: 1px; vector-effect: non-scaling-stroke; }
.geo-lbl { font-family: var(--font); font-weight: 800; fill: #1d1640; stroke: #fff; stroke-linejoin: round; paint-order: stroke; text-anchor: middle; dominant-baseline: middle; pointer-events: none; }
.geo-lbl.soft { fill: #5b5480; }
.geo-lbl.cap { fill: #7a2c00; }
.geo-lbl.sea { fill: #fff; stroke: #1b6dc1; font-style: italic; letter-spacing: 0.04em; }
.geo-lbl.nb { fill: #a3926d; stroke: none; letter-spacing: 0.16em; font-weight: 700; }
.geo-lbl.new { animation: geo-in 0.45s cubic-bezier(0.2, 1.6, 0.4, 1); transform-box: fill-box; transform-origin: center; }
.geo-city { fill: #fff; stroke: #1d1640; vector-effect: non-scaling-stroke; stroke-width: 2.5px; }
.ma-city { animation: ma-city 1s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.geo-mark { fill: none; stroke: #fff; stroke-width: 2.5px; vector-effect: non-scaling-stroke; stroke-dasharray: 4 3; pointer-events: none; }
.ma-ring.got { stroke: #ffd23f; stroke-dasharray: none; }
.ma-splash { fill: none; stroke-width: 4px; vector-effect: non-scaling-stroke; animation: ma-splash 0.7s ease-out forwards; transform-box: fill-box; transform-origin: center; pointer-events: none; }
.geo-zoom { position: absolute; right: 8px; bottom: 8px; display: flex; flex-direction: column; gap: 6px; z-index: 2; pointer-events: none; }
.geo-zoom button { pointer-events: auto; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.94); font-size: 24px; font-weight: 800; line-height: 1; box-shadow: 0 3px 0 rgba(0, 0, 0, 0.18); padding: 0; color: #1d1640; }

/* Puzzle */
.ma-tray { display: flex; align-items: center; gap: 14px; padding: 8px 14px 8px 8px; border-radius: 22px; background: rgba(255, 255, 255, 0.92); box-shadow: 0 5px 0 rgba(0, 0, 0, 0.16); }
.ma-piece { width: 92px; height: 92px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 18px; background: repeating-linear-gradient(45deg, #fffaf0 0 6px, #f6ecd6 6px 12px); touch-action: none; cursor: grab; animation: ma-bob 1.6s ease-in-out infinite; }
.ma-piece svg { width: 80px; height: 80px; overflow: visible; filter: drop-shadow(0 4px 0 rgba(0, 0, 0, 0.2)); }
.ma-piece.lift { opacity: 0.25; animation: none; }
.ma-piece.shake { animation: geo-shake 0.35s; }
.ma-tray-txt { line-height: 1.15; min-width: 0; }
.ma-tray-txt b { display: block; font-size: 21px; color: #1d1640; }
.ma-tray-txt small { display: block; font-size: 13.5px; font-weight: 700; color: #6b6390; }
.ma-ghost { pointer-events: none; filter: url(#ma-lift); opacity: 0.92; }
.ma-ghost path { stroke: #2a2350; stroke-width: 2.5px; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.ma-ghost.snap { transition: transform 0.22s cubic-bezier(0.2, 1.4, 0.4, 1); }
.ma-ghost.away { transition: opacity 0.25s; opacity: 0; }
.ma-ghost-ring { fill: none; stroke: #ffd23f; stroke-width: 3px; vector-effect: non-scaling-stroke; }

/* Clouds drifting over the sea */
.ma-sky { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.ma-cl { position: absolute; width: 120px; height: 38px; border-radius: 40px; background: rgba(255, 255, 255, 0.55); filter: blur(1px); animation: ma-drift 48s linear infinite; }
.ma-cl::before, .ma-cl::after { content: ""; position: absolute; background: inherit; border-radius: 50%; }
.ma-cl::before { width: 56px; height: 56px; left: 18px; top: -26px; }
.ma-cl::after { width: 40px; height: 40px; left: 62px; top: -16px; }
.ma-cl.a { top: 12%; animation-duration: 55s; animation-delay: -12s; }
.ma-cl.b { top: 58%; transform: scale(0.7); animation-duration: 70s; animation-delay: -40s; opacity: 0.8; }
.ma-cl.c { top: 34%; transform: scale(0.85); animation-duration: 62s; animation-delay: -25s; }
.ma-sky.small .ma-cl { top: 3%; background: rgba(255, 255, 255, 0.22); transform: scale(0.7); }

/* Level menu: flag logo and the painted album */
.ma-logo-flag { width: 76px; height: 76px; object-fit: cover; border-radius: 50%; box-shadow: 0 0 0 4px #fff, 0 4px 0 6px rgba(0, 0, 0, 0.12); }
.ma-album { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; width: min(460px, 100%); margin: 2px auto 8px; padding: 8px 14px 8px 8px; border: 0; border-radius: 22px; background: rgba(255, 255, 255, 0.95); box-shadow: 0 5px 0 rgba(0, 0, 0, 0.15); font: inherit; color: #1d1640; text-align: left; cursor: pointer; }
.ma-album svg { width: 96px; height: 80px; flex: 0 0 auto; border-radius: 14px; background: linear-gradient(160deg, #8fe0ff, #3aa3ea); }
.ma-album svg path[data-id] { stroke: #2a2350; stroke-width: 0.8px; vector-effect: non-scaling-stroke; stroke-linejoin: round; transition: fill 0.4s; }
.ma-al-txt { min-width: 0; flex: 1 1 auto; line-height: 1.15; }
.ma-al-txt b { display: block; font-size: 18px; }
.ma-al-txt small { display: block; font-size: 13px; font-weight: 700; color: #6b6390; }
.ma-album.full { background: linear-gradient(135deg, #fff6c9, #ffe28a); }
.ma-album.wiggle { animation: geo-card 0.4s; }
.ma-prog { display: block; height: 8px; margin-top: 5px; border-radius: 99px; background: #ece6f7; overflow: hidden; }
.ma-prog i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #3fbf7f, #ffd23f); }

/* ================= Portada ================= */
html.ma-hub-on, body.ma-hub-on { background: linear-gradient(170deg, #36c3f0 0%, #2f86e6 55%, #3b5fd6 100%); min-height: 100vh; min-height: 100dvh; }
.ma-hub { position: relative; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; gap: 12px; padding: max(12px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom)); box-sizing: border-box; max-width: 1180px; margin: 0 auto; color: #fff; font-family: var(--font); }
.ma-hub > .ma-sky { position: fixed; }
.ma-hub.leaving { animation: ma-out 0.65s ease-in forwards; }
.ma-head { position: relative; z-index: 2; display: flex; align-items: center; gap: 12px; }
.ma-logo { width: 62px; height: 62px; flex: 0 0 auto; display: grid; place-items: center; font-size: 42px; border-radius: 50%; background: rgba(255, 255, 255, 0.95); box-shadow: 0 5px 0 rgba(0, 0, 0, 0.15); animation: ma-spin 6s ease-in-out infinite; }
.ma-head h1 { margin: 0; font-size: clamp(26px, 7vw, 40px); line-height: 1; font-weight: 800; text-shadow: 0 3px 0 rgba(0, 0, 0, 0.18); }
.ma-head h1 span { color: #ffd23f; }
.ma-head p { margin: 4px 0 0; font-weight: 700; font-size: 15px; opacity: 0.95; }
.ma-total { margin-left: auto; align-self: flex-start; padding: 6px 12px; border-radius: 99px; background: rgba(255, 255, 255, 0.95); color: #1d1640; font-weight: 800; font-size: 16px; white-space: nowrap; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.15); }
.ma-main { position: relative; z-index: 2; display: grid; gap: 12px; grid-template-columns: 1fr; flex: 1 1 auto; }
.ma-bigmap { position: relative; height: min(46vh, 520px); border-radius: 24px; overflow: hidden; background: #2f97e6; box-shadow: 0 6px 0 rgba(0, 0, 0, 0.16), inset 0 0 0 3px rgba(255, 255, 255, 0.5); }
.ma-bigmap svg { width: 100%; height: 100%; display: block; }
.ma-bigmap svg.pulse { animation: geo-card 0.6s; }
.h-c { stroke: #2a2350; stroke-width: 0.8px; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.h-c.play { cursor: pointer; stroke-width: 1.4px; }
.h-c.play:hover { filter: brightness(1.08); }
.h-route { fill: none; stroke: #fff; stroke-width: 2.5px; stroke-dasharray: 2 9; stroke-linecap: round; opacity: 0.85; vector-effect: non-scaling-stroke; animation: ma-dash 2s linear infinite; pointer-events: none; }
.h-pin { cursor: pointer; }
.h-bob { animation: ma-bob 1.8s ease-in-out infinite; filter: drop-shadow(0 4px 2px rgba(0, 0, 0, 0.3)); }
.h-plane { pointer-events: none; filter: drop-shadow(0 6px 3px rgba(0, 0, 0, 0.3)); }
.h-sea { font-family: var(--font); font-weight: 800; font-style: italic; font-size: 17px; fill: #fff; opacity: 0.85; text-anchor: middle; pointer-events: none; letter-spacing: 0.04em; }
.ma-list { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; align-content: start; }
.ma-card { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px; border: 0; border-radius: 20px; background: #fff; color: #1d1640; font: inherit; text-align: left; box-shadow: 0 5px 0 var(--k2, rgba(0, 0, 0, 0.2)); cursor: pointer; transition: transform 0.15s; animation: ma-card-in 0.5s cubic-bezier(0.2, 1.5, 0.4, 1) both; }
.ma-card:nth-child(2) { animation-delay: 0.05s; }
.ma-card:nth-child(3) { animation-delay: 0.1s; }
.ma-card:nth-child(4) { animation-delay: 0.15s; }
.ma-card:nth-child(5) { animation-delay: 0.2s; }
.ma-card:nth-child(6) { animation-delay: 0.25s; }
.ma-card:hover { transform: translateY(-2px); }
.ma-card:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--k2); }
.ma-card.wide { grid-column: 1 / -1; background: linear-gradient(135deg, #fff, #eaf7ff); }
.ma-card.last { outline: 4px solid #ffd23f; }
.ma-flag { width: 54px; height: 54px; flex: 0 0 auto; display: grid; place-items: center; font-size: 34px; border-radius: 50%; overflow: hidden; background: #fff; box-shadow: 0 0 0 3px var(--k), 0 3px 0 4px rgba(0, 0, 0, 0.1); }
.ma-flag img { width: 100%; height: 100%; object-fit: cover; }
.ma-ct { min-width: 0; flex: 1 1 auto; line-height: 1.12; }
.ma-ct b { display: block; font-size: 19px; }
.ma-ct small { display: block; font-size: 12px; font-weight: 700; color: #6b6390; }
.ma-ct .ma-stats { margin-top: 3px; color: #1d1640; }
.ma-go { flex: 0 0 auto; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--k); color: #fff; font-size: 15px; }
.ma-badge { position: absolute; top: -10px; right: 10px; padding: 2px 9px; border-radius: 99px; background: #ffd23f; color: #1d1640; font-style: normal; font-weight: 800; font-size: 12px; box-shadow: 0 2px 0 rgba(0, 0, 0, 0.15); animation: ma-bob 1.4s ease-in-out infinite; }
.ma-foot { position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 14px; font-weight: 800; opacity: 0.95; }
@media (max-width: 420px) {
  .ma-list { grid-template-columns: 1fr; }
  .ma-head p { font-size: 13.5px; }
  .ma-total { font-size: 14px; }
}
@media (min-width: 900px) {
  .ma-main { grid-template-columns: 1.15fr 1fr; align-items: start; }
  .ma-bigmap { height: calc(100vh - 150px); max-height: 760px; }
}

@keyframes geo-card { 50% { transform: scale(1.05); } }
@keyframes geo-pop { 50% { transform: scale(1.12); } }
@keyframes geo-in { from { transform: scale(0.2); opacity: 0; } }
@keyframes geo-blink { 50% { fill: #ffd23f; stroke: #ffd23f; } }
@keyframes geo-glow { 50% { fill: #ffd23f; } }
@keyframes geo-shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@keyframes ma-wave { 40% { transform: scale(1.08); filter: brightness(1.25); } }
@keyframes ma-splash { from { transform: scale(0.3); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
@keyframes ma-city { 50% { transform: scale(1.5); } }
@keyframes ma-bob { 50% { transform: translateY(-5px); } }
@keyframes ma-drift { from { left: -180px; } to { left: 110%; } }
@keyframes ma-dash { to { stroke-dashoffset: -22; } }
@keyframes ma-spin { 0%, 70% { transform: rotate(0); } 85% { transform: rotate(-12deg) scale(1.06); } 100% { transform: rotate(0); } }
@keyframes ma-card-in { from { transform: translateY(16px) scale(0.94); opacity: 0; } }
@keyframes ma-out { to { opacity: 0; transform: scale(1.04); } }
@media (prefers-reduced-motion: reduce) {
  .ma-cl, .h-route, .h-bob, .ma-piece, .ma-badge, .ma-logo, .ma-city { animation: none; }
}
/* The cover scrolls on small phones (pop.css locks the page for the levels). */
html.ma-hub-on, body.ma-hub-on { height: auto; overflow-y: auto; touch-action: pan-y; overscroll-behavior: auto; }
