/* ═══════════════════════════════════════════════════════
   Uncle Apps · panel de inicio (mismo estilo que los juegos UNCLE)
   ═══════════════════════════════════════════════════════ */
@font-face { font-family: 'Fredoka'; src: url(../fonts/fredoka-latin.woff2) format('woff2'); font-weight: 300 700; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fredoka'; src: url(../fonts/fredoka-latin-ext.woff2) format('woff2'); font-weight: 300 700; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Nunito'; src: url(../fonts/nunito-latin.woff2) format('woff2'); font-weight: 200 1000; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Nunito'; src: url(../fonts/nunito-latin-ext.woff2) format('woff2'); font-weight: 200 1000; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg-0: #050f26; --bg-1: #0a2150; --bg-2: #14408a;
  --ink: #0b1e3f; --text: #eef4ff; --muted: #9fb6dd;
  --gold: #ffd23f; --gold-2: #ff9f1c; --coral: #ff5d73; --mint: #2ee59d; --sky: #4cc9f0; --violet: #9b5de5;
  --glass: rgba(13, 32, 72, .72); --glass-2: rgba(22, 50, 104, .6); --glass-b: rgba(255, 255, 255, .13);
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
  --f-display: 'Fredoka', 'Segoe UI', system-ui, sans-serif;
  --f-ui: 'Nunito', 'Segoe UI', system-ui, sans-serif;
  --wrap: min(1240px, calc(100% - 48px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
/* Nada se sale por los lados (en el móvil no se puede arrastrar la página en horizontal) */
html, body { overflow-x: hidden; overflow-x: clip; max-width: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; min-height: 100vh; font-family: var(--f-ui); color: var(--text);
  background: radial-gradient(ellipse at 50% -10%, var(--bg-2) 0%, var(--bg-1) 38%, var(--bg-0) 78%) fixed, var(--bg-0);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
h1, h2, h3 { font-family: var(--f-display); margin: 0; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 10px; }

/* ── Cielo ── */
.sky { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.stars { position: absolute; inset: -50%; background-repeat: repeat; }
.stars.s1 {
  background-image: radial-gradient(1.5px 1.5px at 20px 30px, #fff, transparent), radial-gradient(1px 1px at 120px 80px, #cfe3ff, transparent),
    radial-gradient(1.5px 1.5px at 200px 160px, #fff, transparent), radial-gradient(1px 1px at 60px 210px, #bcd6ff, transparent);
  background-size: 260px 260px; opacity: .55; animation: drift 160s linear infinite;
}
.stars.s2 {
  background-image: radial-gradient(2px 2px at 80px 40px, #fff, transparent), radial-gradient(1.5px 1.5px at 300px 220px, #ffe9a8, transparent);
  background-size: 380px 380px; opacity: .45; animation: drift 240s linear infinite reverse, twinkle 4s ease-in-out infinite;
}
@keyframes drift { to { transform: translate(260px, 130px); } }
@keyframes twinkle { 50% { opacity: .2; } }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .32; animation: float 18s ease-in-out infinite; }
.b1 { width: 42vw; height: 42vw; left: -12vw; top: 8vh; background: #2563eb; }
.b2 { width: 34vw; height: 34vw; right: -10vw; top: 30vh; background: #9b5de5; animation-delay: -6s; }
.b3 { width: 30vw; height: 30vw; left: 30vw; top: 85vh; background: #0ea5a4; animation-delay: -12s; }
@keyframes float { 50% { transform: translate(4vw, -5vh) scale(1.08); } }

/* ── Botones (como en los juegos) ── */
.btn {
  display: inline-flex; align-items: center; gap: .55em; padding: .8em 1.5em; border-radius: 18px; text-decoration: none;
  font-family: var(--f-display); font-weight: 700; font-size: 1.15rem; letter-spacing: .02em; white-space: nowrap;
  transition: transform .15s, box-shadow .15s, filter .15s;
}
.btn:active { transform: translateY(3px) scale(.98); }
.btn-play {
  color: var(--ink); background: linear-gradient(180deg, #ffe066, var(--gold) 45%, var(--gold-2));
  box-shadow: 0 6px 0 #b86a00, 0 14px 26px rgba(255, 159, 28, .35); border: 3px solid var(--ink);
}
.btn-play:hover { filter: brightness(1.06); transform: translateY(-2px); box-shadow: 0 8px 0 #b86a00, 0 18px 30px rgba(255, 159, 28, .45); }
.btn-glass { color: #fff; background: var(--glass-2); border: 2px solid var(--glass-b); box-shadow: 0 6px 0 rgba(0, 0, 0, .35); backdrop-filter: blur(8px); }
.btn-glass:hover { background: rgba(40, 80, 150, .7); transform: translateY(-2px); }
.btn-ico { font-size: .95em; }

/* ── Barra superior ── */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 20px;
  padding: 10px max(24px, calc((100% - 1240px) / 2)); background: rgba(5, 15, 38, .55); backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .06); transition: background .3s, box-shadow .3s;
}
.topbar.scrolled { background: rgba(5, 15, 38, .88); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.brand-mascot { width: 34px; height: 42px; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .4)); }
.brand-name { font-family: var(--f-display); font-weight: 700; font-size: 1.45rem; letter-spacing: .03em; }
.brand-name b, .foot-brand b { color: var(--gold); }
.top-links { display: flex; gap: 6px; margin-left: 10px; }
.top-links a { text-decoration: none; font-weight: 800; color: var(--muted); padding: .45em .9em; border-radius: 12px; transition: color .2s, background .2s; }
.top-links a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 14px; border-radius: 14px; font-weight: 800;
  background: var(--glass); border: 1px solid var(--glass-b); transition: background .2s, transform .15s;
}
.icon-btn:hover { background: rgba(40, 80, 150, .8); }
.icon-btn:active { transform: scale(.95); }
.icon-btn.round { width: 42px; padding: 0; justify-content: center; font-size: 1.15rem; }
.icon-btn[hidden] { display: none; }

/* «Propón tu temática»: botón destacado de la barra */
.btn-propose {
  display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 16px; border-radius: 14px; text-decoration: none; white-space: nowrap;
  font-family: var(--f-display); font-weight: 700; font-size: 1rem; color: var(--ink);
  background: linear-gradient(180deg, #ffe066, var(--gold) 45%, var(--gold-2)); border: 2px solid var(--ink); box-shadow: 0 4px 0 #b86a00;
  transition: transform .15s, box-shadow .15s, filter .15s;
}
.btn-propose:hover { filter: brightness(1.06); transform: translateY(-2px); box-shadow: 0 6px 0 #b86a00; }
.btn-propose:active { transform: translateY(2px); box-shadow: 0 2px 0 #b86a00; }

/* Login (próximamente) */
.btn-login {
  display: inline-flex; align-items: center; gap: 9px; height: 42px; padding: 0 14px 0 6px; border-radius: 14px;
  background: var(--glass); border: 1px dashed rgba(255, 255, 255, .3); cursor: help; transition: background .2s;
}
.btn-login:hover { background: rgba(40, 80, 150, .8); }
.login-ico { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; background: rgba(255, 255, 255, .1); font-size: 1rem; }
.login-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.05; }
.login-text b { font-family: var(--f-display); font-size: 1rem; }
.login-text small { font-size: .68rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); }
.teach-cta { margin-top: 16px; font-size: 1.05rem; }

/* ── Portada ── */
.hero {
  width: var(--wrap); margin: 0 auto; display: grid; grid-template-columns: 1.25fr .75fr; align-items: center; gap: 24px;
  padding: clamp(18px, 5vh, 56px) 0 clamp(8px, 2vh, 24px);
}
.kicker { margin: 0 0 6px; display: inline-flex; gap: 8px; align-items: center; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; font-size: .82rem;
  color: #bfe3ff; padding: .45em 1em; border-radius: 99px; background: rgba(76, 201, 240, .14); border: 1px solid rgba(76, 201, 240, .35); }
.wordmark { display: flex; flex-wrap: wrap; column-gap: .28em; line-height: .9; font-weight: 700; font-size: clamp(3.2rem, 8.4vw, 7.6rem); margin: 4px 0 10px; }
.wordmark .ch {
  display: inline-block; transform-origin: 50% 80%; color: #fff;
  -webkit-text-stroke: .07em var(--ink); paint-order: stroke fill;
  text-shadow: 0 .07em 0 var(--ink), 0 .13em 0 rgba(0, 0, 0, .35), 0 .25em .35em rgba(0, 0, 0, .35);
}
.wm-2 .ch {
  background: linear-gradient(180deg, #fff27a 10%, #ffb703 60%, #ff7b00); -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: none; filter: drop-shadow(0 .07em 0 var(--ink)) drop-shadow(0 .14em .18em rgba(0, 0, 0, .4));
}
.lead { margin: 0 0 22px; max-width: 600px; font-size: clamp(1.05rem, 1.45vw, 1.3rem); font-weight: 700; color: #cfe0ff; line-height: 1.45; }
.lead b { color: var(--gold); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-uncle { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; min-height: 300px; }
.uncle { position: relative; width: clamp(140px, 15vw, 210px); aspect-ratio: 120 / 150; padding: 0; }
.uncle-svg { position: relative; z-index: 2; width: 100%; height: 100%; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .45)); transform-origin: 50% 95%; }
.uncle-glow { position: absolute; inset: -30%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 210, 63, .35), transparent 62%); z-index: 1; }
.uncle-shadow { position: absolute; left: 18%; right: 18%; bottom: -14px; height: 16px; border-radius: 50%; background: rgba(0, 0, 0, .45); filter: blur(6px); }
.bubble {
  position: relative; z-index: 3; max-width: 330px; margin-bottom: 14px; padding: 14px 18px; border-radius: 20px; color: var(--ink);
  background: #fff; font-weight: 800; font-size: 1.02rem; line-height: 1.35; box-shadow: 0 6px 0 rgba(11, 30, 63, .6), var(--shadow);
  border: 3px solid var(--ink); text-align: center;
}
.bubble::after { content: ''; position: absolute; left: 50%; bottom: -15px; width: 22px; height: 22px; background: #fff; border-right: 3px solid var(--ink); border-bottom: 3px solid var(--ink); transform: translateX(-50%) rotate(45deg); border-bottom-right-radius: 6px; }

/* ── Juegos ── */
.games { width: var(--wrap); margin: 0 auto; padding: 8px 0 30px; }
.games-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.games-head h2, .how h2 { font-size: clamp(1.6rem, 2.6vw, 2.3rem); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: .5em 1em; border-radius: 99px; font-weight: 800; background: var(--glass); border: 2px solid var(--glass-b); color: var(--muted);
  transition: all .2s;
}
.chip i { font-style: normal; margin-left: 4px; font-size: .8em; padding: .1em .55em; border-radius: 99px; background: rgba(255, 255, 255, .1); }
.chip:hover { color: #fff; }
.chip.on { color: var(--ink); background: linear-gradient(180deg, #ffe066, var(--gold)); border-color: var(--ink); box-shadow: 0 3px 0 var(--ink); }
.chip.on i { background: rgba(11, 30, 63, .15); }

.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; perspective: 1200px; }
.card {
  position: relative; display: flex; flex-direction: column; text-decoration: none; border-radius: 26px; overflow: hidden; isolation: isolate;
  background: linear-gradient(180deg, rgba(22, 50, 104, .85), rgba(9, 24, 58, .92)); border: 2px solid var(--glass-b);
  box-shadow: 0 10px 0 rgba(0, 0, 0, .3), var(--shadow); transform-style: preserve-3d; will-change: transform;
  --mx: 50%; --my: 30%;
}
.card::before {   /* brillo que sigue al puntero */
  content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx) var(--my), color-mix(in srgb, var(--c1) 30%, transparent), transparent 60%);
}
.card:hover::before, .card:focus-visible::before { opacity: 1; }
.card:hover, .card:focus-visible { border-color: color-mix(in srgb, var(--c1) 70%, white); }
.card.hidden { display: none; }
.card.daily::after {
  content: '⭐ Reto de hoy'; position: absolute; top: 14px; right: -38px; z-index: 4; transform: rotate(35deg); padding: 5px 44px;
  font-family: var(--f-display); font-weight: 700; font-size: .82rem; color: var(--ink); background: linear-gradient(180deg, #ffe066, var(--gold-2));
  border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); box-shadow: 0 4px 10px rgba(0, 0, 0, .3);
}

.card-art {
  position: relative; height: clamp(150px, 19vh, 200px); display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--c1) 45%, transparent), transparent 70%),
    linear-gradient(160deg, color-mix(in srgb, var(--c2) 55%, #050f26), #071634);
  border-bottom: 2px solid rgba(255, 255, 255, .08);
}
.card-art > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; padding: 12px; }
.card-emoji { position: absolute; left: 12px; top: 10px; font-size: 1.7rem; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .4)); }

/* globo que gira */
.globe-halo { fill: none; stroke: rgba(76, 201, 240, .35); stroke-width: 6; }
.globe-spin { animation: spin 22s linear infinite; }
.globe-spin use { fill: #3ddc84; stroke: #0b1e3f; stroke-width: 1.4; }
@keyframes spin { to { transform: translateX(-320px); } }
.globe-pins use { filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .5)); }
.land { fill: inherit; stroke: inherit; }

/* España */
.art-spain svg .cc { stroke: #0b1e3f; stroke-width: 1.6; stroke-linejoin: round; transform-box: fill-box; transform-origin: 50% 50%; transition: filter .2s; }
.art-spain svg .cc.lit { filter: brightness(1.35) drop-shadow(0 0 6px #fff7b0); }
.art-spain svg .inset { fill: rgba(23, 80, 143, .4); stroke: rgba(160, 210, 255, .6); stroke-width: 2; stroke-dasharray: 7 5; }
.art-spain svg { filter: drop-shadow(0 6px 0 rgba(11, 30, 63, .7)); }

/* Cuerpo */
.art-body svg .skin { fill: rgba(44, 74, 122, .95); stroke: #6d93cf; stroke-width: 4; stroke-linejoin: round; }
.art-body svg .organ { transform-box: fill-box; transform-origin: 50% 50%; }
.art-body svg .organ path { stroke: #0b1e3f; stroke-width: 2.5; stroke-linejoin: round; }
.art-body svg { padding: 6px 0 !important; }

/* Neurona */
.art-neuron .spark { filter: drop-shadow(0 0 6px #fff36b) drop-shadow(0 0 14px #ffd23f); }
.art-neuron .dendrites, .art-neuron .terminals { filter: drop-shadow(0 2px 0 #0b1e3f); }
.art-neuron #axon { filter: drop-shadow(0 2px 0 #0b1e3f); }

.card-body { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 14px 18px 18px; }
.tag { align-self: flex-start; font-weight: 900; font-size: .74rem; letter-spacing: .04em; text-transform: uppercase; padding: .35em .8em; border-radius: 99px;
  color: #fff; background: color-mix(in srgb, var(--c2) 70%, #0b1e3f); border: 1px solid color-mix(in srgb, var(--c1) 60%, transparent); }
.card h3 { font-size: 1.42rem; line-height: 1.05; margin-top: 4px; }
.sub { margin: 0; color: #cfe0ff; font-weight: 700; font-size: .95rem; }
.facts { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.facts li { font-size: .78rem; font-weight: 800; color: var(--muted); padding: .25em .6em; border-radius: 8px; background: rgba(255, 255, 255, .06); }
.facts b { color: #fff; }
.mine { margin-top: auto; padding-top: 8px; min-height: 46px; font-size: .84rem; font-weight: 800; color: var(--muted); }
.mine .row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.mine .row span b { color: #fff; }
.mine .new { color: var(--mint); }
.mine .bar { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .1); overflow: hidden; margin-top: 6px; }
.mine .bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--c1), var(--mint)); transition: width 1.2s cubic-bezier(.2, .8, .2, 1); }
.play {
  align-self: stretch; margin-top: 10px; text-align: center; padding: .6em; border-radius: 14px; font-family: var(--f-display); font-weight: 700; font-size: 1.1rem;
  color: var(--ink); background: linear-gradient(180deg, color-mix(in srgb, var(--c1) 60%, #fff), var(--c1)); border: 3px solid var(--ink);
  box-shadow: 0 5px 0 var(--ink); transition: transform .15s, box-shadow .15s;
}
.play span { display: inline-block; transition: transform .2s; }
.card:hover .play { transform: translateY(-2px); box-shadow: 0 7px 0 var(--ink); }
.card:hover .play span { transform: translateX(4px); }
.card:active .play { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }

/* ── Cómo funciona ── */
.how { width: var(--wrap); margin: 0 auto; padding: 40px 0 20px; }
.how h2 { text-align: center; margin-bottom: 26px; }
.steps { list-style: none; margin: 0 0 30px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; }
.step { position: relative; padding: 26px 22px 22px; border-radius: 24px; background: var(--glass); border: 1px solid var(--glass-b); }
.step-n { position: absolute; top: -16px; left: 22px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; font-family: var(--f-display); font-weight: 700;
  color: var(--ink); background: linear-gradient(180deg, #ffe066, var(--gold-2)); border: 2px solid var(--ink); box-shadow: 0 3px 0 var(--ink); }
.step-ico { font-size: 2.2rem; display: block; margin-bottom: 6px; }
.step h3 { font-size: 1.3rem; margin-bottom: 6px; }
.step p, .feat p { margin: 0; color: #cfe0ff; font-weight: 600; line-height: 1.45; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.feat { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; row-gap: 2px; padding: 16px 18px; border-radius: 18px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .07); }
.feat span { grid-row: 1 / 3; font-size: 1.8rem; }
.feat h3 { font-size: 1.08rem; }
.feat p { font-size: .92rem; }

/* ── Docentes ── */
.teachers { width: var(--wrap); margin: 0 auto; padding: 30px 0 50px; }
.teach-card { display: flex; gap: 26px; align-items: center; padding: 26px 30px; border-radius: 28px;
  background: linear-gradient(120deg, rgba(155, 93, 229, .35), rgba(37, 99, 235, .3)); border: 2px solid rgba(255, 255, 255, .14); box-shadow: var(--shadow); }
.teach-mascot { flex: none; width: 96px; height: 120px; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .4)); transform: rotate(-8deg); }
.teach-card h2 { font-size: clamp(1.35rem, 2.2vw, 1.9rem); margin-bottom: 10px; }
.teach-card ul { margin: 0; padding-left: 1.1em; display: grid; gap: 6px; color: #dce8ff; font-weight: 600; line-height: 1.4; }
.teach-card b { color: #fff; }

/* ── Pie ── */
.footer { width: var(--wrap); margin: 0 auto; padding: 22px 0 34px; border-top: 1px solid rgba(255, 255, 255, .08); display: flex; align-items: center; gap: 18px; flex-wrap: wrap; color: var(--muted); font-weight: 700; font-size: .9rem; }
.footer p { margin: 0; }
.foot-brand { display: flex; align-items: center; gap: 6px; font-family: var(--f-display); font-weight: 700; color: #fff; font-size: 1.1rem; }
.foot-brand svg { width: 22px; height: 28px; }
.footer nav { margin-left: auto; display: flex; gap: 14px; flex-wrap: wrap; }
.footer nav a { text-decoration: none; }
.footer nav a:hover { color: #fff; text-decoration: underline; }

/* ── Transición al juego ── */
.warp { position: fixed; inset: 0; z-index: 50; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: radial-gradient(circle at 50% 50%, var(--c1, #4cc9f0), var(--c2, #2563eb) 60%, #050f26); }
.warp.on { display: flex; }
/* al final la cortina se funde con el azul noche de los juegos: el cambio de página no se nota */
.warp-dark { position: absolute; inset: 0; background: #050f26; opacity: 0; pointer-events: none; }
.warp-mascot { width: 130px; height: 162px; filter: drop-shadow(0 16px 20px rgba(0, 0, 0, .45)); }
.warp b { font-family: var(--f-display); font-size: clamp(2rem, 5vw, 3.4rem); color: #fff; -webkit-text-stroke: .06em var(--ink); paint-order: stroke fill; text-shadow: 0 .08em 0 var(--ink); }

/* ── Ventana de instalación (iOS) ── */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgba(2, 8, 22, .7); backdrop-filter: blur(6px); padding: 20px; }
.modal[hidden] { display: none; }
.modal-card { max-width: 420px; padding: 26px; border-radius: 24px; background: linear-gradient(180deg, #16326a, #0b1e46); border: 2px solid var(--glass-b); box-shadow: var(--shadow); text-align: center; }
.modal-card h3 { font-size: 1.5rem; margin-bottom: 10px; }
.modal-card p { color: #cfe0ff; font-weight: 700; line-height: 1.5; margin: 0 0 18px; }
.ios-share { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: #fff; color: #1f6feb; font-size: .9rem; }

/* ── Tamaños ── */
@media (max-width: 1180px) { .top-links { display: none; } }
@media (max-width: 980px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .hero-uncle { min-height: 0; flex-direction: row; gap: 14px; }
  .bubble { margin: 0; }
  .bubble::after { display: none; }
  .steps, .features { grid-template-columns: 1fr; }
  .login-text small { display: none; }
  .btn-propose { font-size: .9rem; padding: 0 12px; }
  .teach-card { flex-direction: column; text-align: center; }
  .teach-card ul { text-align: left; }
}
@media (max-width: 520px) {
  .cards { grid-template-columns: 1fr; }
  .icon-btn span, .login-text { display: none; }
  .btn-login { padding: 0 6px; }
}

/* Móvil en horizontal (la capa web ajusta la escala a ~520 px de alto): todo más compacto para ver juegos sin desplazar */
@media (max-height: 620px) and (min-width: 900px) {
  html { scroll-padding-top: 60px; }
  .topbar { padding-top: 6px; padding-bottom: 6px; }
  .brand-mascot { width: 28px; height: 35px; }
  .brand-name { font-size: 1.25rem; }
  .btn-propose, .btn-login { height: 36px; }
  .btn-propose { font-size: .92rem; }
  .login-ico { width: 26px; height: 26px; }
  .icon-btn { height: 36px; }
  .icon-btn.round { width: 36px; }
  .hero { grid-template-columns: 1fr auto; padding: 10px 0 0; gap: 18px; }
  .kicker { display: none; }
  .wordmark { font-size: 3.3rem; margin: 0 0 6px; }
  .lead { margin-bottom: 12px; font-size: .98rem; max-width: 640px; }
  .btn { font-size: 1rem; padding: .55em 1.15em; }
  .hero-uncle { min-height: 0; flex-direction: row; align-items: center; gap: 12px; }
  .uncle { width: 84px; }
  .bubble { max-width: 250px; font-size: .84rem; padding: 9px 12px; margin: 0; }
  .bubble::after { left: auto; right: -14px; top: 50%; bottom: auto; transform: translateY(-50%) rotate(-45deg); }
  .games-head { margin-bottom: 10px; }
  .games-head h2 { font-size: 1.4rem; }
  .cards { gap: 14px; }
  .card-art { height: 118px; }
  .card-body { padding: 10px 14px 14px; gap: 4px; }
  .card h3 { font-size: 1.2rem; }
  .sub { font-size: .85rem; }
  .facts li { font-size: .72rem; }
  .mine { min-height: 34px; font-size: .78rem; }
  .play { margin-top: 6px; padding: .45em; font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .stars, .blob, .globe-spin { animation: none !important; }
}

/* ── Página legal ── */
.legal { width: min(860px, calc(100% - 40px)); margin: 0 auto; padding: 30px 0 50px; line-height: 1.6; }
.legal-back { font-size: .95rem; padding: .55em 1.1em; }
.legal-toc { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.legal-toc a { text-decoration: none; font-weight: 800; padding: .4em .9em; border-radius: 99px; background: var(--glass); border: 1px solid var(--glass-b); }
.legal-toc a:hover { background: rgba(40, 80, 150, .8); }
.legal section { padding: 22px 26px; margin-bottom: 18px; border-radius: 22px; background: var(--glass); border: 1px solid var(--glass-b); }
.legal h1, .legal h2 { font-size: 1.7rem; margin-bottom: 10px; color: #fff; }
.legal p, .legal li { color: #dce8ff; font-weight: 600; }
.legal b { color: #fff; }
.legal a { color: var(--sky); }
.legal-data, .credits { padding-left: 1.2em; display: grid; gap: 4px; }
.legal .todo { color: var(--ink); background: var(--gold); padding: .05em .45em; border-radius: 6px; font-weight: 800; }

/* ── Página «Propón tu temática» (contacto y errores) ── */
.page { width: var(--wrap); margin: 0 auto; padding: 10px 0 40px; }
.page h2 { font-size: clamp(1.4rem, 2.2vw, 1.9rem); }
.page-hero { display: grid; grid-template-columns: 1.4fr .6fr; align-items: center; gap: 24px; padding: clamp(16px, 4vh, 44px) 0 10px; }
.page-hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.8rem); line-height: 1.02; margin: 4px 0 12px; color: #fff; -webkit-text-stroke: .05em var(--ink); paint-order: stroke fill; text-shadow: 0 .07em 0 var(--ink), 0 .16em .3em rgba(0, 0, 0, .35); }
.ph-uncle { display: flex; flex-direction: column; align-items: center; }
.ph-uncle .bubble { margin-bottom: 14px; }
.ph-mascot { width: clamp(120px, 13vw, 180px); height: clamp(150px, 16.3vw, 225px); filter: drop-shadow(0 16px 22px rgba(0, 0, 0, .45)); }
.steps-4 { grid-template-columns: repeat(4, 1fr); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 10px 0 26px; }
.panel { padding: 22px 24px; border-radius: 24px; background: var(--glass); border: 1px solid var(--glass-b); }
.panel h2 { margin-bottom: 12px; }
.panel p { color: #dce8ff; font-weight: 600; line-height: 1.5; margin: 0 0 10px; }
.checklist { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.checklist li { position: relative; padding-left: 30px; color: #dce8ff; font-weight: 600; line-height: 1.4; }
.checklist li::before { content: '✔'; position: absolute; left: 0; top: 0; width: 21px; height: 21px; display: grid; place-items: center; border-radius: 7px; font-size: .75rem; color: var(--ink); background: var(--mint); }
.checklist b { color: #fff; }
.checklist.small li { font-size: .95rem; }
.note { font-size: .9rem; color: var(--muted) !important; font-style: italic; }
.ideas { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.ideas span { padding: .45em .85em; border-radius: 99px; font-weight: 800; font-size: .9rem; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); transition: transform .2s, background .2s; }
.ideas span:hover { transform: translateY(-2px) rotate(-2deg); background: rgba(255, 210, 63, .18); }
.mail-card { display: flex; align-items: center; gap: 26px; padding: 26px 30px; margin-bottom: 26px; border-radius: 28px;
  background: linear-gradient(120deg, rgba(255, 210, 63, .22), rgba(255, 159, 28, .12) 40%, rgba(37, 99, 235, .25)); border: 2px solid rgba(255, 210, 63, .35); box-shadow: var(--shadow); }
.mail-card p { color: #e8f0ff; font-weight: 700; line-height: 1.5; margin: 8px 0 14px; }
.mail-mascot { flex: none; width: 100px; height: 125px; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .4)); transform: rotate(8deg); }
.mail-addr { color: var(--gold); font-weight: 900; text-decoration: none; border-bottom: 2px dashed rgba(255, 210, 63, .5); word-break: break-all; }
.mail-addr:hover { border-bottom-style: solid; }
.mail-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.mail-actions .btn { font-size: 1.02rem; }
.btn.done { background: var(--mint); color: var(--ink); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.contact { position: relative; padding-top: 26px; scroll-margin-top: 80px; }
.contact-ico { position: absolute; top: -18px; left: 22px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; font-size: 1.4rem;
  background: linear-gradient(180deg, #ffe066, var(--gold-2)); border: 2px solid var(--ink); box-shadow: 0 3px 0 var(--ink); }
.contact.bug .contact-ico { background: linear-gradient(180deg, #ff9aa8, var(--coral)); }
.mail-line { font-size: 1.05rem; }
.btn-bug { background: linear-gradient(180deg, #ff9aa8, var(--coral) 55%, #e63962); box-shadow: 0 6px 0 #9b1c3c, 0 14px 26px rgba(255, 93, 115, .3); }
.btn-bug:hover { box-shadow: 0 8px 0 #9b1c3c, 0 18px 30px rgba(255, 93, 115, .4); }
#propon { scroll-margin-top: 80px; }
@media (max-width: 980px) { .steps-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) {
  .page-hero, .two-col, .contact-grid { grid-template-columns: 1fr; }
  .ph-uncle { display: none; }
  .mail-card { flex-direction: column; text-align: center; }
  .mail-actions { justify-content: center; }
}
@media (max-height: 620px) and (min-width: 900px) {
  .page-hero { padding-top: 8px; }
  .page-hero h1 { font-size: 2.6rem; }
  .ph-mascot { width: 96px; height: 120px; }
  .steps-4 .step { padding: 22px 16px 16px; }
}

/* ── Página 404 ── */
.lost { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 24px; }
.lost svg { width: 140px; height: 175px; filter: drop-shadow(0 16px 20px rgba(0, 0, 0, .45)); animation: lost 2.4s ease-in-out infinite; transform-origin: 50% 95%; }
@keyframes lost { 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }
.lost h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
.lost p { margin: 0 0 8px; color: #cfe0ff; font-weight: 700; font-size: 1.15rem; }
