/* Ahorcado Pop: on top of the shared pasatiempos.css. */
body.ahorcado{ --sky1:#45c4ff; --sky2:#3a86ff; --sky3:#6c5cff; --accent:#ff4f7b; --accent2:#3a86ff; }

/* ── Menú ── */
.ahorcado .logo .line{gap:4px}
.ahorcado .logo .t{width:clamp(30px,9.4vw,50px);height:clamp(36px,10.6vw,56px);font-size:clamp(22px,7vw,36px)}
.ahorcado .menu-hero{position:relative;width:min(460px,100%);margin:0 0 -4px;align-items:center}
.menu-scene{width:100%;height:clamp(150px,27vh,230px);border-radius:26px;overflow:hidden;box-shadow:0 8px 0 rgba(30,10,90,.18),0 16px 30px rgba(30,10,90,.25);border:3px solid rgba(255,255,255,.75)}
.menu-scene svg{width:100%;height:100%;display:block}
.ahorcado .bubble{position:absolute;left:8px;top:10px;margin:0;max-width:52%;font-size:14px}
.ahorcado .bubble::after{left:auto;right:-8px;bottom:12px;border:8px solid transparent;border-left-color:#fff;border-right:0}
.cards.six{grid-template-columns:repeat(3,1fr)}
.cards.six .card{min-height:96px}

/* ── Escena ── */
.scene-svg .sky-a{stop-color:#5fd0ff}.scene-svg .sky-b{stop-color:#a8e6ff}.scene-svg .sky-c{stop-color:#e8f9ff}
.scene-svg .hill-far{fill:#8fd99a}.scene-svg .hill-near{fill:#5fc66e}.scene-svg .leaf{fill:#3fae55}
.scene-svg .stars{display:none}
.scene-svg .moon-cut{display:none}
.scene-svg.th-tarde .sky-a{stop-color:#ff8a5c}.scene-svg.th-tarde .sky-b{stop-color:#ffc36b}.scene-svg.th-tarde .sky-c{stop-color:#ffe6a8}
.scene-svg.th-tarde .hill-far{fill:#d99a7a}.scene-svg.th-tarde .hill-near{fill:#8fbf5a}
.scene-svg.th-amanecer .sky-a{stop-color:#8fa8ff}.scene-svg.th-amanecer .sky-b{stop-color:#ffb3d1}.scene-svg.th-amanecer .sky-c{stop-color:#ffe3c2}
.scene-svg.th-amanecer .hill-far{fill:#b3a3e0}
.scene-svg.th-noche .sky-a{stop-color:#1b1f5c}.scene-svg.th-noche .sky-b{stop-color:#3b3592}.scene-svg.th-noche .sky-c{stop-color:#6a4fb8}
.scene-svg.th-noche .stars{display:inline}
.scene-svg.th-noche .rays{display:none}
.scene-svg.th-noche .sun circle:not(.moon-cut){fill:#fff3c4}
.scene-svg.th-noche .moon-cut{display:inline;fill:#2c2a7a}
.scene-svg.th-noche .hill-far{fill:#3a4f8a}.scene-svg.th-noche .hill-near{fill:#2f6b5a}.scene-svg.th-noche .leaf{fill:#2a5c48}
.scene-svg.th-noche .cloud{opacity:.35}

.pingo .eyes>g,.pingo .mouth>*{display:none}
.pingo.m-normal .e-normal,.pingo.m-happy .e-happy,.pingo.m-worried .e-worried,.pingo.m-scared .e-scared,.pingo.m-dizzy .e-dizzy{display:inline}
.pingo.m-normal .m-smile,.pingo.m-happy .m-smile,.pingo.m-worried .m-oh,.pingo.m-scared .m-oh,.pingo.m-dizzy .m-oh{display:inline}
.pingo.m-worried .m-oh{transform:scale(.6);transform-box:fill-box;transform-origin:center}
.balloon .ball{transform-box:fill-box;transform-origin:50% 100%}
.balloon.inflate .ball{animation:inflate .55s cubic-bezier(.3,1.7,.5,1) backwards;animation-delay:inherit}
.balloon.inflate .string{animation:fadeIn .3s backwards;animation-delay:inherit}
@keyframes inflate{from{transform:scale(0)}}
@keyframes fadeIn{from{opacity:0}}
.balloon.popped .ball{animation:popB .22s ease-out forwards;transform-origin:50% 50%}
.balloon.popped .string{animation:dropS .8s ease-in forwards}
@keyframes popB{40%{transform:scale(1.35)}100%{transform:scale(.1);opacity:0}}
@keyframes dropS{to{transform:translateY(60px) rotate(30deg);opacity:0}}

/* ── Pantalla de juego ── */
#scr-game{align-items:stretch}
.play{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;width:100%;max-width:1100px;margin:0 auto;padding:0 10px calc(8px + env(safe-area-inset-bottom,0px));gap:8px}
.scene{position:relative;flex:1 1 auto;min-height:150px;border-radius:24px;overflow:hidden;border:3px solid rgba(255,255,255,.75);box-shadow:0 6px 0 rgba(30,10,90,.18),0 12px 26px rgba(30,10,90,.22)}
.scene-host{position:absolute;inset:0}
.scene svg{position:absolute;inset:0;width:100%;height:100%}
.win-scene{height:150px;border-radius:20px;overflow:hidden;margin:-4px 0 8px;position:relative;border:3px solid #fff;box-shadow:0 4px 0 #e3daf8}
.win-scene svg{width:100%;height:100%;display:block}
.wcard u,.learned u{text-decoration:none;color:#e0457b;background:#fff1a8;border-radius:4px;padding:0 1px}
.scene .dots{position:absolute;z-index:2;left:8px;top:8px;display:flex;gap:5px;background:rgba(255,255,255,.55);padding:5px 8px;border-radius:999px;backdrop-filter:blur(3px)}
.scene .dots i{width:11px;height:11px;border-radius:50%;background:rgba(42,22,96,.18);display:block;transition:background .3s,transform .3s}
.scene .dots i.cur{background:#fff;box-shadow:0 0 0 2px var(--accent2);transform:scale(1.15)}
.scene .dots i.ok{background:var(--ok)}
.scene .dots i.ko{background:#7fb6ff}
.left-badge{position:absolute;z-index:2;right:8px;bottom:8px;background:rgba(255,255,255,.88);border-radius:999px;padding:4px 10px;font-weight:700;font-size:15px;color:var(--ink);box-shadow:0 3px 0 rgba(30,10,90,.15)}
.left-badge.bump{animation:bump .4s}
@keyframes bump{40%{transform:scale(1.35);background:#ffd0da}}
.panel{flex:0 0 auto;display:flex;flex-direction:column;align-items:center;gap:8px}

.hclue{width:min(640px,100%);display:flex;align-items:center;gap:10px;background:#fff;border-radius:18px;padding:7px 10px;min-height:58px;box-shadow:0 5px 0 rgba(40,10,90,.2)}
.hclue .e{font-size:38px;line-height:1;flex:0 0 auto;animation:pop .35s}
.hclue .e.q{width:44px;height:44px;border-radius:12px;display:grid;place-items:center;background:#f1ebff;font-size:24px;color:var(--muted)}
.hclue .t{flex:1;min-width:0;display:flex;flex-direction:column;line-height:1.2}
.hclue .t b{font-size:12.5px;color:var(--muted);text-transform:uppercase;letter-spacing:.03em}
.hclue .t span{font-size:16px;font-weight:600}
.hclue .t span.hid{color:var(--muted);font-style:italic;font-weight:500}
.hclue .say{width:40px;height:40px;border:0;border-radius:12px;background:#f1ebff;font-size:18px;flex:0 0 auto}
.hclue .rule{display:block;font-size:13px;color:#6a3fd0;font-weight:600;margin-top:2px}

.hword{display:flex;flex-wrap:wrap;justify-content:center;gap:var(--g,6px);min-height:58px;align-items:flex-end;padding:2px 0}
.hword .l{width:var(--w,40px);height:calc(var(--w,40px) * 1.24);border-radius:12px;background:rgba(255,255,255,.95);display:grid;place-items:center;font-family:var(--display);font-size:calc(var(--w,40px) * .7);color:var(--ink);box-shadow:inset 0 -4px 0 rgba(42,22,96,.12),0 4px 0 rgba(40,10,90,.2);position:relative}
.hword .l::after{content:"";position:absolute;left:18%;right:18%;bottom:12%;height:3px;border-radius:3px;background:#d9ccff}
.hword .l.on::after{display:none}
.hword .l.on{animation:flip .45s cubic-bezier(.3,1.6,.5,1)}
.hword .l.given{color:#6a3fd0}
.hword .l.miss{color:#ff4a5a;background:#ffe3e7}
.hword .l.mark{background:#fff1a8;color:#a14b00}
.hword .l.win{animation:wave .5s cubic-bezier(.3,1.8,.5,1) both}
.hword .l.sp{background:none;box-shadow:none;width:calc(var(--w,40px) * .45)}
.hword .l.sp::after{display:none}
@keyframes flip{0%{transform:rotateX(90deg) scale(.8)}100%{transform:none}}

.akb{width:min(560px,100%);display:flex;flex-direction:column;gap:6px}
.akb .r{display:flex;gap:6px;justify-content:center}
.akb button{flex:1 1 0;max-width:64px;height:var(--kh,50px);border:0;border-radius:13px;background:#fff;font-family:var(--display);font-size:24px;color:var(--ink);box-shadow:0 4px 0 rgba(40,10,90,.25);position:relative;transition:background .2s,transform .1s,opacity .2s}
.akb button.v{background:#fff4c9}
.akb button:active,.akb button.hit{transform:translateY(3px);box-shadow:0 1px 0 rgba(40,10,90,.25)}
.akb button.ok{background:#5fd77e;color:#fff;box-shadow:0 4px 0 #2a9a4c;animation:keyOk .35s}
.akb button.no{background:rgba(255,255,255,.35);color:rgba(42,22,96,.45);box-shadow:none}
.akb button.no::after{content:"";position:absolute;left:22%;right:22%;top:50%;height:3px;border-radius:3px;background:#ff4a5a;transform:rotate(-30deg)}
.akb button:disabled{cursor:default}
.akb button.ghostkey{visibility:hidden}
@keyframes keyOk{40%{transform:scale(1.18)}}
.akb.locked{pointer-events:none}

/* Fin de palabra (encima del teclado). */
.result{width:min(560px,100%);background:#fff;border-radius:20px;padding:10px 12px 12px;box-shadow:0 6px 0 rgba(40,10,90,.2);display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center;animation:sheetIn .35s cubic-bezier(.3,1.4,.5,1)}
.result h3{margin:0;font-family:var(--display);font-weight:400;font-size:24px}
.result p{margin:0;font-size:15px;line-height:1.35;color:var(--ink)}
.result .def{color:var(--muted);font-weight:600}
.result .rl{font-size:14px;color:#6a3fd0;font-weight:600}
.result .row{gap:8px}
.result.lost h3{color:#2a7fd6}
.result .btn.ghost{background:#f1ebff;border-color:#d9ccff;color:var(--ink)}

/* ── Cursos ── */
#scr-cursos .body{flex:1;overflow-y:auto;padding:0 12px calc(16px + env(safe-area-inset-bottom,0px));width:100%;max-width:820px;margin:0 auto;display:flex;flex-direction:column;gap:12px}
.curso{background:rgba(255,255,255,.95);border-radius:22px;padding:12px;box-shadow:0 5px 0 color-mix(in srgb,var(--c) 55%,#2a1660),0 10px 18px rgba(40,10,90,.18);animation:cardIn .4s cubic-bezier(.3,1.4,.5,1) backwards}
.curso-h{display:flex;align-items:center;gap:10px;margin-bottom:8px}
.curso-h .tema-ico{width:50px;height:50px;font-size:28px}
.curso-h b{font-size:19px;display:block}
.curso-h small{color:var(--muted);font-weight:600}
.curso-h .cst{margin-left:auto;font-weight:700;color:var(--muted);font-size:14px;white-space:nowrap}
.etapas{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}
.etapa{border:0;border-radius:16px;background:color-mix(in srgb,var(--c) 14%,#fff);padding:9px 8px;display:flex;align-items:center;gap:8px;text-align:left;color:var(--ink);box-shadow:0 3px 0 color-mix(in srgb,var(--c) 35%,#fff)}
.etapa:active{transform:scale(.97)}
.etapa .ei{font-size:26px;flex:0 0 auto}
.etapa span{display:flex;flex-direction:column;min-width:0;line-height:1.15}
.etapa b{font-size:14.5px}
.etapa small{font-size:13px;letter-spacing:1px}

/* Dos jugadores */
.dos label{display:block;font-weight:700;margin:10px 0 4px}
.dos input{width:100%;font:inherit;font-size:20px;font-weight:600;padding:10px 14px;border-radius:14px;border:2px solid #d9ccff;background:#fff;color:var(--ink);user-select:text}
.dos input.secret{font-family:var(--display);letter-spacing:.12em;text-transform:uppercase}
.dos .names{display:flex;gap:8px}
.dos .err{color:var(--bad);font-weight:700;min-height:1.3em;margin:6px 0 0}
.score{display:flex;justify-content:center;gap:10px;margin:8px 0}
.score span{background:#efe9ff;border-radius:14px;padding:6px 12px;font-weight:700}
.score span.turn{background:#fff3c2;box-shadow:0 0 0 2px #ffc21a}

/* Imprimir */
.page .hrows{display:flex;flex-direction:column;gap:4.2mm}
.page .hrow{display:flex;align-items:center;gap:4mm;break-inside:avoid}
.page .hrow .n{font-family:var(--display);font-size:18px;color:var(--c);width:7mm}
.page .hrow .em{font-size:26px;width:10mm;text-align:center}
.page .hrow .q{flex:1;display:flex;flex-direction:column;gap:1.6mm}
.page .hrow .q p{margin:0;font-size:14px;font-weight:600}
.page .boxes{display:flex;gap:1.4mm;flex-wrap:wrap}
.page .boxes i{font-style:normal;width:8.5mm;height:9.5mm;border:1.6px solid #2a1660;border-radius:2mm;display:grid;place-items:center;font-family:var(--display);font-size:18px;color:#6a3fd0}
.page .boxes i.sp{border:0;width:4mm}
.page .balls{display:flex;gap:1.2mm;align-items:center}
.page .balls b{display:block;width:4.6mm;height:5.6mm;border-radius:50%;border:1.4px solid #9a8cc8}
.page .instr{font-size:13.5px;color:#4a3d7a;margin:0}
.page .sol-list{columns:2;column-gap:10mm;font-size:16px}
.page .sol-list p{margin:0 0 2.4mm}

/* ── Ordenador y móvil en horizontal: escena a la izquierda ── */
@media (min-width:860px) and (min-aspect-ratio:4/3){
  .play{flex-direction:row;align-items:stretch;padding-bottom:14px}
  .scene{flex:1 1 50%}
  .panel{flex:1 1 50%;justify-content:center;gap:12px}
  .akb{--kh:58px}
  .akb button{font-size:27px}
}
@media (max-height:520px) and (min-aspect-ratio:3/2){
  .play{flex-direction:row}
  .scene{flex:1 1 42%}
  .panel{flex:1 1 58%;justify-content:center;gap:5px}
  .akb{--kh:38px;gap:4px}
  .akb .r{gap:4px}
  .hclue{min-height:46px;padding:4px 8px}
  .hclue .e{font-size:28px}
}
@media (max-height:700px){
  .akb{--kh:44px}
  .hclue .t span{font-size:15px}
}
@media (max-height:600px){
  .akb{--kh:40px}
  .menu-scene{height:130px}
}
@media (max-width:370px){
  .akb .r{gap:4px}
  .akb button{font-size:21px}
  .cards.six .card b{font-size:13.5px}
}
