/* Gambito para niños — colores alegres, botones grandes y animaciones suaves */
:root {
  --sky1: #7cc8f8; --sky2: #bfe8ff; --grass: #8fd16f; --sun: #ffd447;
  --ink: #2b2a4a; --muted: #5d6585; --card: #ffffff; --line: #e3e8f5;
  --pri: #ff8a3d; --pri-dk: #d9601a; --ok: #3cbf6b; --bad: #ef5a5a;
  --light: #fff4dc; --dark: #9ccfa9; --hl: rgba(255, 212, 71, .55);
  --r: 22px;
  --font: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font: 17px/1.4 var(--font); color: var(--ink); overflow-x: hidden;
  background: linear-gradient(180deg, var(--sky1) 0%, var(--sky2) 55%, #d8f3c8 100%) fixed;
  -webkit-tap-highlight-color: transparent;
}
body::before {   /* nubes */
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .85;
  background:
    radial-gradient(60px 26px at 12% 14%, #fff 98%, transparent), radial-gradient(44px 22px at 16% 11%, #fff 98%, transparent),
    radial-gradient(70px 28px at 78% 22%, #fff 98%, transparent), radial-gradient(48px 24px at 83% 19%, #fff 98%, transparent),
    radial-gradient(56px 22px at 52% 8%, #fff 98%, transparent);
}
button { font: inherit; color: inherit; }
a { color: #2f6fd6; }
[hidden] { display: none !important; }

/* Cabecera */
.kx-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 14px 8px; background: rgba(255, 255, 255, .78); backdrop-filter: blur(8px); box-shadow: 0 4px 18px rgba(40, 80, 140, .12); }
.kx-brand { display: flex; align-items: center; gap: 8px; min-width: 0; }
.kx-brand img { width: 34px; height: 34px; }
.kx-brand b { font-size: 19px; letter-spacing: .3px; }
.kx-brand em { font-style: normal; font-weight: 800; font-size: 13px; color: #fff; background: linear-gradient(90deg, #ff8a3d, #f15fa5); padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.kx-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.kx-total { font-weight: 900; font-size: 17px; background: #fff7d6; border: 2px solid #ffd447; padding: 4px 12px; border-radius: 999px; }
.kx-round { width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; box-shadow: 0 3px 0 #c9d6ec; font-size: 21px; cursor: pointer; display: grid; place-items: center; flex: none; }
.kx-round:active { transform: translateY(2px); box-shadow: 0 1px 0 #c9d6ec; }

.kx-main { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; padding: 14px 14px 40px; }

/* Botones */
.kx-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 22px; border-radius: 18px; border: 0;
  font-weight: 900; font-size: 18px; cursor: pointer; text-decoration: none; color: var(--ink); background: #fff; box-shadow: 0 4px 0 #c9d6ec; }
.kx-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #c9d6ec; }
.kx-btn.primary { background: linear-gradient(180deg, #ffa25c, var(--pri)); color: #fff; box-shadow: 0 5px 0 var(--pri-dk); text-shadow: 0 1px 0 rgba(0, 0, 0, .15); }
.kx-btn.primary:active { box-shadow: 0 2px 0 var(--pri-dk); }
.kx-btn.big { min-height: 64px; font-size: 22px; padding: 0 30px; border-radius: 22px; }
.kx-btn.ghost { background: #fff; }
.kx-btn.danger { color: #c0392b; }

/* Personajes */
.kc { width: 100%; height: 100%; display: block; overflow: visible; }
.kc .kc-eyes { transform-origin: 50% 50%; transform-box: fill-box; animation: blink 5s infinite; }
.kc.bob { animation: bob 2.4s ease-in-out infinite; }
.kc.talk { animation: bob 1.6s ease-in-out infinite; }
.kc.cheer { animation: cheer .8s ease-in-out infinite; }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5%); } }
@keyframes cheer { 0%, 100% { transform: translateY(0) rotate(0); } 25% { transform: translateY(-10%) rotate(-6deg); } 75% { transform: translateY(-10%) rotate(6deg); } }

/* Mapa */
.kx-path { position: relative; width: 100%; margin: 6px auto 0; }
.kx-trail { position: absolute; left: 0; top: 0; pointer-events: none; }
.kx-trail path { fill: none; stroke: #fff; stroke-width: 12; stroke-linecap: round; stroke-dasharray: 2 22; opacity: .9; }
.kx-node { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 4px; width: 150px;
  border: 0; background: none; cursor: pointer; padding: 0; text-align: center; }
.kx-island { position: relative; width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center; padding: 14px;
  background: radial-gradient(circle at 35% 30%, #ffffff, #e8f4ff 70%); border: 5px solid #fff; box-shadow: 0 7px 0 #5aa0d6, 0 14px 24px rgba(30, 70, 130, .25); }
.kx-node.done .kx-island { background: radial-gradient(circle at 35% 30%, #fffbe6, #ffe48a 75%); box-shadow: 0 7px 0 #d9a514, 0 14px 24px rgba(160, 110, 0, .25); }
.kx-node.cur .kx-island { animation: pulse 1.6s ease-in-out infinite; }
.kx-node.off .kx-island { filter: grayscale(1) brightness(.92); opacity: .75; }
.kx-node b { font-size: 16px; line-height: 1.15; background: rgba(255, 255, 255, .92); padding: 3px 10px; border-radius: 12px; box-shadow: 0 2px 0 rgba(0, 0, 0, .06); }
.kx-node small { font-weight: 800; font-size: 13px; color: var(--muted); }
.kx-num { position: absolute; top: -6px; left: -6px; width: 34px; height: 34px; border-radius: 50%; background: var(--pri); color: #fff; font-weight: 900; display: grid; place-items: center; border: 3px solid #fff; }
.kx-lock { position: absolute; bottom: -4px; right: -4px; font-size: 26px; }
.kx-here { position: absolute; top: -34px; background: var(--ok); color: #fff; font-weight: 900; font-size: 14px; padding: 3px 12px; border-radius: 999px; animation: bob 1.2s ease-in-out infinite; white-space: nowrap; }
@keyframes pulse { 0%, 100% { box-shadow: 0 7px 0 #5aa0d6, 0 0 0 0 rgba(255, 138, 61, .6); } 50% { box-shadow: 0 7px 0 #5aa0d6, 0 0 0 18px rgba(255, 138, 61, 0); } }

/* Capítulo */
.kx-back { border: 0; background: rgba(255, 255, 255, .85); border-radius: 999px; padding: 8px 16px; font-weight: 800; cursor: pointer; margin-bottom: 10px; }
.kx-chcard { background: var(--card); border-radius: 28px; padding: 22px 18px; text-align: center; box-shadow: 0 10px 30px rgba(30, 70, 130, .18); }
.kx-chcard small { color: var(--pri); font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.kx-chcard h1 { margin: 2px 0 14px; font-size: clamp(28px, 7vw, 40px); }
.kx-chstory { display: flex; gap: 12px; align-items: center; text-align: left; margin-bottom: 16px; }
.kx-bigchar { width: 130px; height: 130px; flex: none; }
.kx-bubble { position: relative; flex: 1; background: #f3f8ff; border: 3px solid #d6e6fb; border-radius: 22px; padding: 12px 46px 12px 14px; font-size: 18px; font-weight: 600; }
.kx-bubble.big { font-size: 19px; }
.kx-bubble p { margin: 0; }
.kx-speak { position: absolute; right: 6px; top: 6px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: #fff; box-shadow: 0 2px 0 #c9d6ec; cursor: pointer; font-size: 17px; }
.kx-exrow { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 6px 0 18px; }
.kx-exb { width: 64px; padding: 8px 0 6px; border-radius: 18px; border: 0; background: #eef4ff; box-shadow: 0 4px 0 #c9d6ec; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.kx-exb span { font-weight: 900; font-size: 22px; }
.kx-exb em { font-style: normal; font-size: 12px; color: #f0a500; letter-spacing: 1px; }
.kx-exb.done { background: #fff4c7; box-shadow: 0 4px 0 #e2bf3c; }
.kx-exb.off { opacity: .55; }

/* Ejercicio */
.kx-exhead { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.kx-dots { flex: 1; display: flex; gap: 6px; }
.kx-dots i { flex: 1; height: 12px; border-radius: 999px; background: rgba(255, 255, 255, .7); }
.kx-dots i.ok { background: var(--ok); }
.kx-dots i.cur { background: var(--pri); }
.kx-moves { font-weight: 900; background: #fff; padding: 6px 12px; border-radius: 999px; box-shadow: 0 2px 0 #c9d6ec; white-space: nowrap; }
.kx-say { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.kx-avatar { width: 82px; height: 82px; flex: none; }
.kx-stage { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.kx-stage.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.kx-tools { display: flex; justify-content: center; margin-top: 14px; }

/* Quiz */
.kx-options { display: grid; gap: 12px; width: 100%; max-width: 520px; }
.kx-opt { min-height: 64px; border-radius: 20px; border: 0; background: #fff; box-shadow: 0 5px 0 #c9d6ec; font-weight: 900; font-size: 21px; cursor: pointer; padding: 10px 16px; }
.kx-opt:active { transform: translateY(3px); box-shadow: 0 2px 0 #c9d6ec; }
.kx-opt.right { background: var(--ok); color: #fff; box-shadow: 0 5px 0 #23884a; }
.kx-opt.wrong { background: #ffe3e3; color: #b23b3b; box-shadow: 0 5px 0 #f2b4b4; }
.kx-mini { width: min(300px, 80vw); }

/* Tablero */
.kx-boardwrap { width: min(92vw, 62vh, 540px); }
.kb { position: relative; width: 100%; aspect-ratio: 1; border-radius: 18px; overflow: hidden; border: 6px solid #fff; box-shadow: 0 8px 0 #5aa0d6, 0 18px 30px rgba(30, 70, 130, .25); background: #fff; }
.kb-sqs { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); }
.kb-sq { position: relative; cursor: pointer; }
.kb-sq.l { background: var(--light); }
.kb-sq.d { background: var(--dark); }
.kb-rank, .kb-file { position: absolute; font-size: clamp(10px, 2.4vw, 14px); font-weight: 900; color: rgba(43, 42, 74, .55); pointer-events: none; }
.kb-rank { top: 2px; left: 4px; }
.kb-file { bottom: 1px; right: 4px; }
.kb.coords .kb-rank, .kb.coords .kb-file { color: #2b2a4a; font-size: clamp(12px, 3vw, 17px); }
.kb-sq.dot::after { content: ''; position: absolute; inset: 34%; border-radius: 50%; background: rgba(255, 138, 61, .65); box-shadow: 0 0 0 3px rgba(255, 255, 255, .7); animation: dotIn .25s; }
.kb-sq.cap::after { content: ''; position: absolute; inset: 4%; border-radius: 50%; border: 5px solid rgba(239, 90, 90, .75); }
.kb-sq.sel, .kb-sq.hero { box-shadow: inset 0 0 0 5px var(--sun); }
.kb-sq.ok { background: #8fe0a6 !important; }
.kb-sq.ok::before { content: '✓'; position: absolute; inset: 0; display: grid; place-items: center; font-weight: 900; font-size: clamp(18px, 5vw, 30px); color: #1b7a3c; }
.kb-sq.bad { background: #ffb3b3 !important; }
.kb-sq.danger { background-image: repeating-linear-gradient(45deg, rgba(239, 90, 90, .38) 0 8px, rgba(239, 90, 90, .22) 8px 16px); }
.kb-sq.glow { box-shadow: inset 0 0 0 6px #ffd447, inset 0 0 22px #ffd447; animation: glow 1s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: inset 0 0 0 6px #fff3a6, inset 0 0 30px #ffd447; } }
@keyframes dotIn { from { transform: scale(0); } }
.kb-ov { position: absolute; inset: 0; display: grid; place-items: center; font-size: clamp(22px, 6.5vw, 40px); pointer-events: none; }
.kb-ov.star { animation: twinkle 1.6s ease-in-out infinite; }
.kb-ov.got { animation: collect .45s ease-out forwards; }
@keyframes twinkle { 50% { transform: scale(1.15) rotate(10deg); } }
@keyframes collect { to { transform: scale(2.2) translateY(-30%); opacity: 0; } }
.kb-pcs { position: absolute; inset: 0; pointer-events: none; }
.kb-pc { position: absolute; left: 0; top: 0; width: 12.5%; height: 12.5%; transform: translate(var(--x), var(--y)); transition: transform .28s cubic-bezier(.3, 1.4, .5, 1); padding: .45%; }
.kb-pc.mine { padding: .15%; }
.kb-pc.moving { z-index: 3; }
.kb-pc.poof { animation: poof .38s ease-in forwards; }
@keyframes poof { to { opacity: 0; filter: blur(2px); scale: 1.6; } }
.kb-foe { width: 100%; height: 100%; display: block; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .25)); }

/* Ventanas */
.kx-modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(40, 70, 120, .45); backdrop-filter: blur(3px); animation: fade .2s; }
.kx-modal.rest { background: linear-gradient(180deg, #2b3a6e, #1b2347); }
@keyframes fade { from { opacity: 0; } }
.kx-card { position: relative; width: min(460px, 100%); max-height: calc(100dvh - 32px); overflow: auto; background: #fff; border-radius: 28px; padding: 24px 20px; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); animation: pop .3s cubic-bezier(.3, 1.4, .5, 1); }
.kx-card.center { text-align: center; }
.kx-card.wide { width: min(640px, 100%); }
.kx-card h1 { margin: 6px 0; font-size: 34px; }
.kx-card h2 { margin: 6px 0 10px; font-size: 26px; }
@keyframes pop { from { transform: scale(.85); opacity: 0; } }
.kx-close { position: absolute; top: 12px; right: 12px; }
.kx-small { font-size: 14px; color: var(--muted); }
.kx-welcome-chars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin: 0 auto 6px; max-width: 360px; }
.kx-welcome-chars svg:nth-child(2n) { animation-delay: .4s; }
.kx-reschar { width: 130px; height: 130px; margin: 0 auto; }
.kx-resstars { font-size: 56px; letter-spacing: 6px; line-height: 1.1; }
.kx-resstars i { font-style: normal; color: #e4e8f0; display: inline-block; }
.kx-resstars i.on { color: #ffc61a; text-shadow: 0 3px 0 #e09b00; animation: starIn .5s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes starIn { from { transform: scale(0) rotate(-60deg); } }
.kx-resbtns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 12px; }

/* Pegatinas */
.kx-album { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; margin-top: 10px; }
.kx-stk { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px; border-radius: 20px; background: #f3f8ff; border: 4px dashed #c9d6ec; text-align: center; }
.kx-stk svg { width: 80px; height: 80px; }
.kx-stk b { font-size: 14px; line-height: 1.15; }
.kx-stk small { font-size: 12px; color: var(--muted); }
.kx-stk.off svg { filter: brightness(0) opacity(.15); }
.kx-stk:not(.off) { border-style: solid; background: #fff; box-shadow: 0 4px 0 #c9d6ec; transform: rotate(-2deg); }
.kx-stk:not(.off):nth-child(2n) { transform: rotate(2deg); }
.kx-stk.gold { background: linear-gradient(160deg, #fff6c9, #ffd96a); border-color: #f0b400; box-shadow: 0 4px 0 #d39b00, 0 0 18px rgba(255, 198, 26, .6); }
.kx-stkbig { width: 200px; margin: 0 auto 16px; }
.kx-stkbig .kx-stk svg { width: 130px; height: 130px; }
.kx-stkbig .kx-stk { animation: pop .5s cubic-bezier(.3, 1.6, .5, 1); }

/* Padres */
.kx-gateq { font-size: 40px; font-weight: 900; margin: 6px 0; }
.kx-input { width: 140px; height: 56px; font: 900 26px var(--font); text-align: center; border-radius: 16px; border: 3px solid #c9d6ec; margin-bottom: 10px; }
.kx-err { color: var(--bad); font-weight: 800; }
.parents { font-size: 16px; }
.kx-safe { background: #eefaf0; border: 2px solid #bfe6c8; border-radius: 16px; padding: 10px 12px; font-size: 15px; }
.kx-prow { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.kx-prow select { font: 600 15px var(--font); padding: 6px 8px; border-radius: 10px; border: 2px solid #c9d6ec; background: #fff; }
.kx-prow input[type="checkbox"] { width: 24px; height: 24px; accent-color: var(--pri); }
.kx-pbtns { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.kx-pbtns .kx-btn { min-height: 46px; font-size: 15px; }
.kx-moon { font-size: 80px; animation: bob 2.4s ease-in-out infinite; }
.kx-modal.rest .kx-card { background: #fffdf5; }

/* Confeti y avisos */
.kx-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.kx-confetti i { position: absolute; top: -20px; width: 11px; height: 16px; border-radius: 3px; animation: fall 2s ease-in forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }
.kx-toast { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 70; background: var(--ink); color: #fff; font-weight: 800; padding: 12px 20px; border-radius: 999px; max-width: calc(100vw - 32px); text-align: center; }

@media (max-width: 520px) {
  body { font-size: 16px; }
  .kx-brand em { display: none; }
  .kx-round { width: 40px; height: 40px; font-size: 19px; }
  .kx-total { font-size: 15px; padding: 3px 10px; }
  .kx-node { width: 120px; }
  .kx-island { width: 92px; height: 92px; padding: 10px; }
  .kx-node b { font-size: 14px; }
  .kx-bigchar { width: 96px; height: 96px; }
  .kx-chstory { flex-direction: column; text-align: center; }
  .kx-avatar { width: 64px; height: 64px; }
  .kx-bubble { font-size: 16px; }
  .kx-bubble.big { font-size: 17px; }
  .kx-boardwrap { width: min(94vw, 60vh); }
}
@media (prefers-reduced-motion: reduce) {
  .kc, .kc .kc-eyes, .kx-node.cur .kx-island, .kx-here, .kb-ov.star, .kx-moon { animation: none !important; }
}

/* ---------------- Gambito Bambino: logo y banner principal ---------------- */
.kx-logo { margin: 0; font-weight: 900; font-size: clamp(34px, 6.4vw, 60px); line-height: 1; letter-spacing: .5px; color: #fff;
  text-shadow: 0 3px 0 #2f6fd6, 0 6px 0 #1d4f9e, 0 10px 18px rgba(0, 0, 0, .18); }
.kx-logo span { color: #ffd447; text-shadow: 0 3px 0 #f0832a, 0 6px 0 #c4561a, 0 10px 18px rgba(0, 0, 0, .18); display: inline-block; animation: wiggle 3.2s ease-in-out infinite; }
.kx-logo.sm { font-size: 20px; text-shadow: 0 2px 0 #2f6fd6; color: #2f6fd6; }
.kx-logo.sm span { font-size: 20px; text-shadow: 0 2px 0 #c4561a; color: #ff8a3d; animation: none; }
.kx-logo.dark { color: #2f6fd6; text-shadow: 0 3px 0 #1d4f9e; margin-top: 6px; }
.kx-logo.dark span { color: #ff8a3d; text-shadow: 0 3px 0 #c4561a; }
@keyframes wiggle { 0%, 80%, 100% { transform: rotate(0); } 85% { transform: rotate(-4deg) scale(1.04); } 90% { transform: rotate(3deg) scale(1.04); } 95% { transform: rotate(-2deg); } }

.kx-hero { position: relative; height: 330px; border-radius: 30px; overflow: hidden; margin: 0 0 18px; border: 5px solid #fff;
  box-shadow: 0 8px 0 #5aa0d6, 0 18px 34px rgba(30, 70, 130, .25); isolation: isolate; }
.kx-scene { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.kx-sun .kx-rays { transform-box: view-box; transform-origin: 1080px 80px; animation: spin 18s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.kx-cloud { animation: drift 26s ease-in-out infinite alternate; }
.kx-cloud.c2 { animation-duration: 34s; animation-direction: alternate-reverse; }
@keyframes drift { to { transform: translateX(70px); } }
.kx-flag { transform-box: fill-box; transform-origin: 0 50%; animation: flag 1.4s ease-in-out infinite; }
@keyframes flag { 50% { transform: scaleX(.75) skewY(4deg); } }
.kx-hero-txt { position: absolute; left: 26px; top: 22px; max-width: 54%; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.kx-hero-txt p { margin: 0; font-size: 21px; font-weight: 900; color: #1d4f9e; background: rgba(255, 255, 255, .85); padding: 4px 14px; border-radius: 999px; }
.kx-hero-stats { display: flex; flex-wrap: wrap; gap: 8px; }
.kx-hero-stats span { font-weight: 900; font-size: 15px; background: #fff; padding: 5px 12px; border-radius: 999px; box-shadow: 0 3px 0 #c9d6ec; }
.kx-hero-txt .kx-btn.big { min-height: 56px; font-size: 19px; }
.kx-hero-chars { position: absolute; right: 12px; bottom: 6px; width: 44%; display: flex; align-items: flex-end; justify-content: flex-end; gap: 2px; }
.kx-hc { flex: 1 1 0; max-width: 84px; aspect-ratio: .9; border: 0; background: none; padding: 0; cursor: pointer; filter: drop-shadow(0 6px 4px rgba(0, 60, 0, .25)); }
.kx-hc svg.bob { animation-delay: var(--d, 0s); }
.kx-hc:nth-child(2n) { margin-bottom: 14px; }
.kx-hc:hover svg { transform: translateY(-6px); }

@media (max-width: 760px) {
  .kx-hero { height: 360px; }
  .kx-hero-txt { left: 0; right: 0; max-width: none; align-items: center; text-align: center; padding: 0 14px; }
  .kx-hero-txt p { font-size: 17px; }
  .kx-hero-chars { left: 0; right: 0; width: auto; justify-content: center; padding: 0 10px; }
  .kx-hc { max-width: 64px; }
}
@media (max-width: 520px) {
  .kx-hero { height: 350px; border-radius: 24px; }
  .kx-logo { font-size: 38px; }
  .kx-hero-txt .kx-btn.big { min-height: 50px; font-size: 17px; padding: 0 18px; }
  .kx-hero-stats span { font-size: 13px; }
  .kx-logo.sm, .kx-logo.sm span { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) { .kx-sun .kx-rays, .kx-cloud, .kx-flag, .kx-logo span { animation: none !important; } }

.kx-gameend { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.kx-gameend .kx-btn { font-size: 16px; padding: 10px 16px; }
.kx-gameend .kx-btn.armed { background: #ffe1e1; box-shadow: 0 4px 0 #e5a3a3; }

/* ---------------- Gambito Bambino: más aventuras ---------------- */
.kb-sq.hl { box-shadow: inset 0 0 0 4px rgba(255, 138, 61, .9); }
.kb-ov.crown { font-size: clamp(26px, 8vw, 48px); z-index: 6; animation: crownUp 1.5s ease-out forwards; }
@keyframes crownUp { 0% { transform: translateY(30%) scale(.3); opacity: 0; } 30% { opacity: 1; transform: translateY(-30%) scale(1.35); } 100% { transform: translateY(-70%) scale(1.1); opacity: 1; } }
.kx-scale { width: min(440px, 92vw); display: grid; gap: 6px; margin: 0 auto 14px; padding: 10px 12px; background: #fff; border-radius: 20px; box-shadow: 0 5px 0 #c9d6ec; }
.kx-srow { display: grid; grid-template-columns: 44px 1fr 40px; align-items: center; gap: 8px; }
.kx-srow svg { width: 44px; height: 44px; }
.kx-srow i { display: block; height: 20px; width: var(--w); min-width: 12px; background: linear-gradient(90deg, #ffd447, #ff8a3d); border-radius: 10px; }
.kx-srow i.inf { width: 100%; background: repeating-linear-gradient(45deg, #ffd447 0 10px, #ffe58a 10px 20px); }
.kx-srow b { font-size: 20px; text-align: right; }
.kx-showbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 14px auto 0; width: min(520px, 100%); font-weight: 900; color: var(--muted); }
.kx-adv { position: absolute; left: 50%; transform: translateX(-50%); z-index: 2; display: flex; align-items: center; gap: 10px; background: #fff; border: 4px solid var(--pri); border-radius: 999px; padding: 6px 18px; font-size: 17px; white-space: nowrap; box-shadow: 0 4px 0 var(--pri-dk); max-width: calc(100% - 16px); }
.kx-adv em { font-style: normal; font-weight: 900; color: #b8860b; font-size: 14px; }
.kx-adv.off { filter: grayscale(.6); opacity: .85; }
.kx-daily { display: flex; align-items: center; gap: 14px; width: min(520px, calc(100% - 24px)); margin: 0 auto 14px; padding: 12px 18px; border: 0; border-radius: 22px; font: inherit; text-align: left; cursor: pointer;
  background: linear-gradient(180deg, #fff, #fff1d2); box-shadow: 0 5px 0 #e0b25a; color: var(--ink); }
.kx-daily:active { transform: translateY(3px); box-shadow: 0 2px 0 #e0b25a; }
.kx-daily.done { background: linear-gradient(180deg, #fff, #e8f8ec); box-shadow: 0 5px 0 #9fd6ae; }
.kx-daily-ico { font-size: 34px; }
.kx-daily-txt { display: grid; flex: 1; min-width: 0; }
.kx-daily-txt b { font-size: 19px; }
.kx-daily-txt small { color: var(--muted); font-weight: 800; font-size: 14px; }
.kx-daily-go { font-size: 22px; color: var(--pri); }
.kx-spicon { font-size: 64px; line-height: 1.1; }
.kx-stk.special { border-color: #f0b400; }
@media (prefers-reduced-motion: reduce) { .kb-ov.crown { animation: none; } }
