:root { --navy: #0B2E44; --navy2: #123f5c; --gold: #D4B06A; --beige: #F4E9D8; --ink: #23323c; --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px); }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--navy); font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); user-select: none; -webkit-user-select: none; touch-action: none; }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
button { font: inherit; cursor: pointer; border: 0; }
[hidden] { display: none !important; }
.serif { font-family: Georgia, "Times New Roman", serif; }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; pointer-events: none; }
#hud > * { pointer-events: auto; }
#virt { position: absolute; top: calc(10px + var(--sat)); left: 10px; display: flex; gap: 6px; }
.v { display: flex; align-items: center; gap: 5px; background: rgba(11, 46, 68, .82); color: #fff; border-radius: 999px; padding: 5px 11px 5px 8px; font-size: 13px; border: 1px solid rgba(212, 176, 106, .5); }
.v svg { width: 15px; height: 15px; fill: var(--gold); }
.v svg.ln { fill: none; stroke: var(--gold); stroke-width: 2.4; stroke-linecap: round; }
.v b { font-size: 15px; min-width: 10px; text-align: center; transition: transform .25s; }
.v b.pop { transform: scale(1.7); color: var(--gold); }
.v em { font-style: normal; opacity: .8; font-size: 12px; }
#topbtns { position: absolute; top: calc(10px + var(--sat)); right: 10px; display: flex; gap: 6px; }
#topbtns button { background: rgba(244, 233, 216, .93); color: var(--navy); border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 600; border: 1px solid var(--gold); }
#obj { position: absolute; top: calc(52px + var(--sat)); left: 10px; width: min(330px, calc(100vw - 20px)); background: rgba(244, 233, 216, .93); border-left: 4px solid var(--gold); border-radius: 10px; padding: 9px 12px 9px 12px; box-shadow: 0 4px 14px rgba(0, 0, 0, .18); pointer-events: none; }
#objTitle { font: 700 12px/1.2 system-ui; letter-spacing: .06em; text-transform: uppercase; color: #8a6a2a; }
#objText { font: 600 15px/1.3 Georgia, serif; color: var(--navy); margin-top: 3px; padding-right: 62px; }
#objSides { font-size: 12.5px; color: #4b5a63; margin-top: 4px; }
#objSides div::before { content: "◆ "; color: #3f8fae; }
#nav { position: absolute; right: 10px; top: 9px; display: flex; flex-direction: column; align-items: center; gap: 1px; }
#arrow { width: 0; height: 0; border-left: 9px solid transparent; border-right: 9px solid transparent; border-bottom: 20px solid var(--navy); transition: transform .1s linear; }
#dist { font-size: 11px; color: var(--navy); font-weight: 700; }
#banner { position: absolute; top: 24%; left: 50%; transform: translateX(-50%); text-align: center; color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, .55); animation: ban 3.2s ease forwards; pointer-events: none; width: 92vw; }
#banner small { display: block; letter-spacing: .25em; text-transform: uppercase; font-size: 12px; color: var(--gold); font-weight: 700; }
#banner strong { font: 700 clamp(26px, 6vw, 44px)/1.15 Georgia, serif; }
@keyframes ban { 0% { opacity: 0; transform: translate(-50%, 12px); } 12%, 78% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -8px); } }
#dwell { position: absolute; left: 50%; bottom: calc(150px + var(--sab)); transform: translateX(-50%); background: rgba(11, 46, 68, .88); color: #fff; border-radius: 12px; padding: 8px 14px; text-align: center; font-size: 13px; min-width: 190px; }
#dwell .bar { height: 7px; border-radius: 4px; background: rgba(255, 255, 255, .2); margin-top: 6px; overflow: hidden; }
#dwellBar { height: 100%; width: 0; background: var(--gold); }
#toasts { position: absolute; left: 50%; top: 34%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.toast { background: rgba(11, 46, 68, .9); color: #fff; padding: 6px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; animation: toast 1.9s ease forwards; border: 1px solid rgba(212, 176, 106, .6); white-space: nowrap; }
.toast.gold { background: var(--gold); color: var(--navy); }
@keyframes toast { 0% { opacity: 0; transform: translateY(10px); } 12%, 75% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-14px); } }
#joyZone { position: absolute; left: 0; bottom: 0; width: 55%; height: 62%; display: none; }
#joy { position: absolute; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; background: rgba(244, 233, 216, .28); border: 2px solid rgba(244, 233, 216, .65); }
#joyKnob { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: rgba(244, 233, 216, .92); box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
#act { position: absolute; right: 16px; bottom: calc(26px + var(--sab)); background: var(--gold); color: var(--navy); font-weight: 700; font-size: 16px; padding: 15px 22px; border-radius: 999px; box-shadow: 0 5px 16px rgba(0, 0, 0, .35); border: 2px solid #fff; max-width: 62vw; animation: pulse 1.4s ease-in-out infinite; }
#act kbd { background: var(--navy); color: #fff; border-radius: 5px; padding: 1px 7px; font: 700 13px system-ui; margin-right: 7px; }
@keyframes pulse { 50% { transform: scale(1.05); } }
#help { position: absolute; left: 50%; bottom: calc(12px + var(--sab)); transform: translateX(-50%); color: #fff; font-size: 12.5px; text-shadow: 0 1px 4px rgba(0, 0, 0, .7); opacity: .9; pointer-events: none; text-align: center; width: 60vw; transition: opacity 1s; }
@media (pointer: coarse) { #joyZone { display: block; } #act kbd { display: none; } #help { display: none; } }
@media (max-width: 560px) { .v em { display: none; } #obj { top: calc(50px + var(--sat)); } }

/* ---------- Diálogo ---------- */
#dlg { position: fixed; left: 50%; bottom: calc(14px + var(--sab)); transform: translateX(-50%); width: min(680px, calc(100vw - 20px)); background: rgba(250, 244, 232, .97); border-radius: 16px; border: 2px solid var(--gold); padding: 16px 18px 14px; box-shadow: 0 10px 34px rgba(0, 0, 0, .4); max-height: 72vh; overflow-y: auto; touch-action: pan-y; }
#dlgWho { font: 700 13px system-ui; letter-spacing: .05em; text-transform: uppercase; color: #8a6a2a; margin-bottom: 5px; }
#dlgWho.jesus { color: #a9443a; }
#dlgText { font: 400 18px/1.45 Georgia, serif; color: var(--navy); min-height: 52px; }
#dlgText.narr { font-style: italic; color: #3d4f5a; }
#dlgText.q { font-weight: 700; }
#dlgOpts { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
#dlgOpts button { text-align: left; background: #fff; border: 1.5px solid #d9cdb4; border-radius: 12px; padding: 12px 14px; font: 500 15.5px/1.35 system-ui; color: var(--navy); }
#dlgOpts button:hover, #dlgOpts button:focus { border-color: var(--gold); background: #fffaf0; outline: none; }
#dlgOpts button span { display: inline-block; width: 22px; height: 22px; border-radius: 50%; background: var(--navy); color: #fff; text-align: center; font: 700 12px/22px system-ui; margin-right: 9px; }
#dlgNext { display: block; margin: 10px 0 0 auto; background: var(--navy); color: #fff; border-radius: 999px; padding: 9px 20px; font-weight: 600; font-size: 14px; }

/* ---------- Tarjetas ---------- */
#card { position: fixed; inset: 0; background: rgba(8, 30, 45, .72); display: flex; align-items: center; justify-content: center; padding: 14px; backdrop-filter: blur(3px); }
#cardIn { background: var(--beige); border-radius: 18px; width: min(520px, 100%); max-height: 92vh; overflow-y: auto; padding: 24px 22px 20px; box-shadow: 0 16px 50px rgba(0, 0, 0, .5); border: 2px solid var(--gold); text-align: center; animation: cardin .35s ease; touch-action: pan-y; }
@keyframes cardin { from { opacity: 0; transform: translateY(18px) scale(.97); } }
#cardIn .k { font: 700 12px system-ui; letter-spacing: .22em; text-transform: uppercase; color: #8a6a2a; }
#cardIn h2 { font: 700 26px/1.2 Georgia, serif; color: var(--navy); margin: 8px 0 10px; }
#cardIn p { font: 400 16.5px/1.55 Georgia, serif; color: #2f404a; margin: 0 0 12px; text-align: left; }
#cardIn .ref { font: 600 13px system-ui; color: #8a6a2a; }
#cardIn .gain { display: flex; justify-content: center; gap: 8px; margin: 12px 0 4px; flex-wrap: wrap; }
#cardIn .gain span { background: var(--navy); color: #fff; border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 600; }
.btn { background: var(--navy); color: #fff; border-radius: 999px; padding: 12px 24px; font-weight: 700; font-size: 15px; margin: 10px 4px 0; }
.btn.alt { background: transparent; color: var(--navy); border: 1.5px solid var(--navy); }
.btn.gold { background: var(--gold); color: var(--navy); }
.estampa { background: linear-gradient(170deg, #fffdf6, #f3e3bd); border: 3px double #b8904a; border-radius: 12px; padding: 16px 14px; margin: 12px auto; max-width: 320px; }
.estampa img { width: 150px; height: 190px; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .25)); }
.estampa h3 { font: 700 20px Georgia, serif; color: var(--navy); margin: 6px 0; }
.estampa blockquote { font: italic 15.5px/1.45 Georgia, serif; color: #3d4f5a; margin: 6px 4px; }
.estampa small { color: #8a6a2a; font-weight: 600; }
.jl { text-align: left; border-top: 1px solid #dccfb2; padding: 12px 0 2px; }
.jl h4 { margin: 0 0 4px; font: 700 16px Georgia, serif; color: var(--navy); }
.jl p { font-size: 14.5px !important; margin-bottom: 6px !important; }
.jl small { color: #8a6a2a; font-weight: 600; }
.stats { display: flex; justify-content: center; gap: 10px; margin: 8px 0 14px; flex-wrap: wrap; }
.stats div { background: #fff; border: 1px solid #dccfb2; border-radius: 12px; padding: 8px 14px; min-width: 86px; }
.stats b { display: block; font: 700 22px Georgia, serif; color: var(--navy); }
.stats small { font-size: 12px; color: #6a7a83; }

/* ---------- Pantallas de menú ---------- */
#screen { position: fixed; inset: 0; background: linear-gradient(180deg, rgba(11, 46, 68, .30) 0%, rgba(11, 46, 68, .66) 42%, rgba(7, 29, 44, .95) 100%); color: #fff; overflow-y: auto; display: flex; flex-direction: column; align-items: center; padding: calc(26px + var(--sat)) 16px calc(30px + var(--sab)); touch-action: pan-y; }
#screen.off { display: none; }
#screen .logo { margin-top: 6vh; text-align: center; }
#screen .logo .cross { color: var(--gold); font-size: 30px; }
#screen h1 { font: 700 clamp(46px, 11vw, 84px)/1 Georgia, serif; margin: 6px 0 4px; letter-spacing: -.01em; }
#screen .tag { color: var(--gold); letter-spacing: .2em; text-transform: uppercase; font-size: 12.5px; font-weight: 600; }
#screen .lead { font: 400 18px/1.5 Georgia, serif; max-width: 560px; text-align: center; opacity: .92; margin: 22px auto 8px; }
#screen h2 { font: 700 clamp(26px, 5vw, 36px) Georgia, serif; margin: 6px 0 4px; text-align: center; }
#screen .sub { opacity: .85; text-align: center; margin: 0 0 18px; max-width: 620px; font-size: 15.5px; line-height: 1.5; }
.col { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; width: min(320px, 100%); }
.col .btn { margin: 0; padding: 15px 24px; font-size: 16.5px; }
#screen .btn { background: var(--gold); color: var(--navy); }
#screen .btn.alt { background: transparent; color: #fff; border: 1.5px solid rgba(255, 255, 255, .55); }
.grid { display: grid; gap: 14px; width: min(1000px, 100%); grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.pick { background: rgba(244, 233, 216, .97); color: var(--ink); border-radius: 18px; padding: 16px 16px 18px; text-align: center; border: 2px solid transparent; transition: transform .15s, border-color .15s; display: flex; flex-direction: column; align-items: center; }
.pick:hover, .pick:focus { transform: translateY(-4px); border-color: var(--gold); outline: none; }
.pick img { width: 132px; height: 168px; object-fit: contain; }
.pick .duo { display: flex; justify-content: center; }
.pick .duo img { width: 96px; height: 124px; margin: 0 -8px; }
.pick h3 { font: 700 21px/1.2 Georgia, serif; color: var(--navy); margin: 6px 0 2px; }
.pick .s { font: 700 11.5px system-ui; letter-spacing: .12em; text-transform: uppercase; color: #8a6a2a; }
.pick p { font-size: 14.5px; line-height: 1.45; margin: 8px 0 0; color: #3d4f5a; }
.pick .prog { margin-top: 10px; font-size: 12.5px; font-weight: 700; color: var(--navy); background: #fff; border-radius: 999px; padding: 4px 12px; border: 1px solid #dccfb2; }
.pick .prog.done { background: var(--gold); border-color: var(--gold); }
.back { align-self: flex-start; background: transparent; color: #fff; opacity: .85; font-size: 15px; padding: 6px 4px; margin-bottom: 4px; }
.seg { display: inline-flex; background: rgba(255, 255, 255, .12); border-radius: 999px; padding: 4px; margin: 0 0 16px; }
.seg button { background: transparent; color: #fff; border-radius: 999px; padding: 7px 18px; font-weight: 600; font-size: 14px; }
.seg button.on { background: var(--gold); color: var(--navy); }
.foot { margin-top: 26px; font-size: 12.5px; opacity: .6; text-align: center; max-width: 560px; line-height: 1.5; }
.coll { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; width: min(760px, 100%); }
.coll .estampa { margin: 0; max-width: none; color: var(--ink); text-align: center; }
.coll .estampa img { width: 96px; height: 122px; }
.coll .estampa h3 { font-size: 15px; }
.coll .estampa.locked { filter: grayscale(1); opacity: .45; }

/* ---------- pulido ---------- */
#vig { position: fixed; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 46%, rgba(0, 0, 0, 0) 52%, rgba(9, 28, 42, .38) 100%); }
#fade { position: fixed; inset: 0; background: #071d2c; opacity: 0; pointer-events: none; transition: opacity .25s ease; z-index: 50; }
#fade.on { opacity: 1; pointer-events: auto; }
#mini { position: absolute; top: calc(52px + var(--sat)); right: 10px; width: 132px; height: 132px; border-radius: 16px; border: 2px solid var(--gold); box-shadow: 0 4px 14px rgba(0, 0, 0, .25); opacity: .95; pointer-events: none; }
@media (max-width: 560px) { #mini { width: 88px; height: 88px; border-radius: 12px; } }
#dlg.haspic { padding-left: 100px; }
#dlgPic { position: absolute; left: 16px; top: 14px; width: 70px; height: 70px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #fff, #ecdcb8); border: 2px solid var(--gold); object-fit: cover; }
@media (max-width: 560px) { #dlg.haspic { padding-left: 82px; } #dlgPic { width: 54px; height: 54px; left: 14px; } #dlgText { font-size: 16.5px; } }
.you { background: #fff; border: 1px solid #dccfb2; border-left: 4px solid var(--gold); border-radius: 10px; padding: 10px 12px 2px; margin: 12px 0 4px; text-align: left; }
.you b { font: 700 11.5px system-ui; letter-spacing: .16em; text-transform: uppercase; color: #8a6a2a; }
.you p { font-size: 15px !important; margin: 4px 0 8px !important; font-style: italic; }
.you p.reto { font-style: normal; font-family: system-ui !important; font-size: 13.5px !important; color: var(--navy) !important; }
.you p.reto i { font-weight: 700; font-style: normal; color: #8a6a2a; }
.jq { font-size: 13.5px !important; font-style: italic; color: #5a6a73 !important; border-left: 3px solid var(--gold); padding-left: 8px; }
#screen h1 { text-shadow: 0 4px 30px rgba(0, 0, 0, .45); }
#screen .lead, #screen .sub, #screen h2 { text-shadow: 0 2px 10px rgba(0, 0, 0, .5); }
@media (max-width: 560px) {
  #obj { width: calc(100vw - 118px); padding: 8px 10px; }
  #objText { font-size: 14px; padding-right: 44px; }
  #topbtns button { padding: 7px 11px; font-size: 12.5px; }
  .v { padding: 5px 9px 5px 7px; }
  #cardIn { padding: 20px 16px 16px; }
  #cardIn h2 { font-size: 23px; }
  #cardIn p { font-size: 15.5px; }
  .grid { grid-template-columns: 1fr; }
  .pick { padding: 12px 14px 14px; }
  .pick img { width: 104px; height: 132px; }
  .pick p { font-size: 14px; }
}

/* ---------- vida diaria, pesca, capítulos y personaje propio ---------- */
#life{position:absolute;left:12px;top:58px;display:flex;gap:6px;flex-wrap:wrap;font-size:12.5px;color:#0B2E44;pointer-events:none}
#life span{background:rgba(244,233,216,.92);border-radius:999px;padding:4px 10px;box-shadow:0 2px 8px rgba(0,0,0,.18)}
#life b{color:#8a6a24}
#fish{position:fixed;inset:0;z-index:40;display:flex;align-items:flex-end;justify-content:center;padding:0 16px 22vh;cursor:pointer}
#fish[hidden]{display:none}
#fishBox{width:min(440px,100%);background:rgba(11,46,68,.94);border:1px solid rgba(212,176,106,.6);border-radius:16px;padding:14px 16px;color:#F4E9D8;text-align:center;box-shadow:0 10px 30px rgba(0,0,0,.4)}
#fishInfo{font-size:13px;letter-spacing:.04em;text-transform:uppercase;color:#D4B06A;margin-bottom:10px}
#fishBar{position:relative;height:26px;border-radius:13px;background:#1f5d7e;overflow:hidden}
#fishZone{position:absolute;top:0;bottom:0;background:rgba(244,233,216,.75)}
#fishDot{position:absolute;top:3px;width:20px;height:20px;margin-left:-10px;border-radius:50%;background:#D4B06A;border:2px solid #fff;box-sizing:border-box}
#fishMsg{margin-top:10px;font-size:14.5px;min-height:20px}
.jch{font-family:Georgia,serif;color:#0B2E44;font-size:17px;margin:18px 0 6px;border-bottom:1px solid rgba(11,46,68,.15);padding-bottom:4px}
.mebtn{display:flex;align-items:center;gap:12px;margin:0 auto 16px;background:rgba(244,233,216,.95);border:0;border-radius:14px;padding:8px 16px 8px 8px;cursor:pointer;color:#0B2E44;text-align:left;font:inherit}
.mebtn img{width:52px;height:52px;border-radius:50%;background:#e6d6b8}
.mebtn b{display:block;font-size:15px}.mebtn small{opacity:.7}
.me{display:flex;gap:20px;align-items:flex-start;justify-content:center;max-width:720px;margin:0 auto 16px;background:rgba(244,233,216,.96);border-radius:18px;padding:18px;color:#0B2E44}
.me>img{width:190px;border-radius:14px;background:#e6d6b8;flex:none}
.meOpts{display:grid;gap:12px;flex:1;min-width:0}
.meOpts b{display:block;font-size:12px;letter-spacing:.05em;text-transform:uppercase;color:#8a6a24;margin-bottom:6px}
.meOpts label{font-size:12px;letter-spacing:.05em;text-transform:uppercase;color:#8a6a24;font-weight:700;display:grid;gap:6px}
.meOpts input{font:inherit;font-size:16px;text-transform:none;letter-spacing:0;font-weight:400;padding:9px 12px;border-radius:10px;border:1px solid rgba(11,46,68,.25);background:#fff;color:#0B2E44;min-width:0}
.sws{display:flex;gap:8px;flex-wrap:wrap}
.sw{width:36px;height:36px;border-radius:50%;border:2px solid rgba(11,46,68,.2);cursor:pointer;color:#0B2E44;font-size:14px;padding:0}
.sw.on{border-color:#0B2E44;box-shadow:0 0 0 3px #D4B06A}
.seg.small{margin:8px 0 0;justify-content:flex-start;background:transparent;padding:0;gap:6px;flex-wrap:wrap}
.seg.small button{font-size:13px;padding:6px 12px;background:rgba(11,46,68,.08);color:#0B2E44}
.seg.small button.on{background:#0B2E44;color:#F4E9D8}
@media (max-width:560px){.me{flex-direction:column;align-items:center}.me>img{width:130px}#life{top:52px;font-size:11.5px}}

#cargando{position:fixed;left:50%;bottom:14vh;transform:translateX(-50%);z-index:60;background:rgba(11,46,68,.92);color:#F4E9D8;border:1px solid rgba(212,176,106,.6);border-radius:999px;padding:9px 18px;font-size:14px;white-space:nowrap}
#cargando[hidden]{display:none}
.pick img,.estampa img,.duo img,#dlgPic{object-fit:cover;object-position:top}

/* ---------- minijuegos ---------- */
#mg{position:fixed;inset:0;z-index:45;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(7,29,44,.55)}
#mg[hidden]{display:none}
#mgIn{width:min(480px,100%);background:#F4E9D8;color:#0B2E44;border-radius:18px;padding:18px 18px 16px;text-align:center;box-shadow:0 14px 40px rgba(0,0,0,.45)}
.mgk{font-size:11.5px;letter-spacing:.12em;text-transform:uppercase;color:#8a6a24;font-weight:700}
#mgIn h3{font-family:Georgia,serif;font-size:21px;margin:4px 0 4px}
.mgp{font-size:14.5px;margin:0 0 14px;opacity:.85}
#mgMsg{min-height:44px;margin-top:12px;font-size:14.5px}
.mgs{font-size:26px;color:#D4B06A;letter-spacing:4px}.mgs span{color:rgba(11,46,68,.18)}
.mgFrase{min-height:52px;font-family:Georgia,serif;font-size:18px;line-height:1.35;background:#fff;border-radius:12px;padding:12px;margin-bottom:12px;border:1px dashed rgba(11,46,68,.25)}
.mgFichas{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}
.mgFichas button{font:inherit;font-size:16px;padding:10px 14px;border-radius:12px;border:2px solid #0B2E44;background:#fff;color:#0B2E44;cursor:pointer;min-height:44px}
.mgFichas button.bien{background:#0B2E44;color:#F4E9D8;opacity:.45}.mgFichas button.mal{background:#c0392b;color:#fff;border-color:#c0392b}
.mgFichas button.pesa{width:56px;height:56px;border-radius:50%;font-weight:700;font-size:18px}.mgFichas button.pesa.bien{opacity:1;background:#D4B06A;color:#0B2E44;border-color:#8a6a24}
.mgRed{display:grid;grid-template-columns:1fr 1fr;gap:10px;max-width:260px;margin:0 auto}
.mgRed button{aspect-ratio:1;border-radius:16px;border:3px solid #8a6a24;background:#c9a26b;cursor:pointer;background-image:repeating-linear-gradient(45deg,transparent 0 9px,rgba(90,60,30,.35) 9px 11px),repeating-linear-gradient(-45deg,transparent 0 9px,rgba(90,60,30,.35) 9px 11px)}
.mgRed button.on{background-color:#fff3c4;box-shadow:0 0 0 4px #D4B06A}.mgRed button:disabled{cursor:default}
.mgBal{height:120px;position:relative;margin-bottom:38px}
.mgBrazo{position:absolute;left:12%;right:12%;top:38px;height:6px;background:#5c3d24;border-radius:3px;transition:transform .35s ease;transform-origin:50% 50%}
.mgPlato{position:absolute;top:8px;width:74px;height:46px;margin-left:-37px;border-radius:0 0 40px 40px;background:#D4B06A;border:2px solid #8a6a24;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:20px}
.mgPlato.a{left:0}.mgPlato.b{left:100%}
.mgPlato.a::after{content:"peces";position:absolute;top:48px;font-size:11px;font-weight:400}.mgPlato.b::after{content:"pesas";position:absolute;top:48px;font-size:11px;font-weight:400}
.mgPie{position:absolute;left:50%;top:38px;width:10px;height:74px;margin-left:-5px;background:#5c3d24;border-radius:4px}
.mgMar{position:relative;height:84px;border-radius:14px;background:linear-gradient(#2b6f8f,#1b4f6b);overflow:hidden}
.mgZonaOk{position:absolute;left:36.8%;width:26.4%;top:0;bottom:0;background:rgba(244,233,216,.22);border-left:2px dashed rgba(255,255,255,.5);border-right:2px dashed rgba(255,255,255,.5)}
.mgBarca{position:absolute;top:24px;left:50%;width:54px;height:30px;border-radius:6px 6px 26px 26px;background:#8a5a36;border:2px solid #5c3d24;transform:translateX(-50%)}
.mgBarca::after{content:"";position:absolute;left:50%;top:-22px;width:3px;height:24px;background:#5c3d24}
.mgT{height:6px;border-radius:3px;background:rgba(11,46,68,.15);margin:10px 0;overflow:hidden}#mgTiempo{height:100%;width:0;background:#D4B06A}
.mgLados{display:flex;gap:10px}.mgLados button{flex:1;font:inherit;font-weight:700;font-size:16px;padding:16px 8px;border-radius:14px;border:0;background:#0B2E44;color:#F4E9D8;cursor:pointer;touch-action:none;user-select:none}
/* ---------- cada día: racha, reto y palabra ---------- */
.hoy{display:flex;gap:10px;align-items:stretch;max-width:760px;margin:0 auto 18px;flex-wrap:wrap;justify-content:center}
.hoy>div{background:rgba(244,233,216,.95);color:#0B2E44;border-radius:14px;padding:10px 14px;text-align:left}
.hoy small{display:block;font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:#8a6a24;font-weight:700}
.hoy p{margin:3px 0 0;font-size:14.5px;line-height:1.35}
.hoyR{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:86px;text-align:center!important}.hoyR b{font-family:Georgia,serif;font-size:30px;line-height:1}.hoyR small{color:#0B2E44;opacity:.7;letter-spacing:0;text-transform:none;font-weight:400}
.hoyC{flex:1 1 250px}.hoyP{flex:1 1 220px}.hoyP p{font-family:Georgia,serif;font-style:italic}
.hoyC button{margin-top:8px;font:inherit;font-weight:700;font-size:13.5px;padding:7px 14px;border-radius:999px;border:0;background:#0B2E44;color:#F4E9D8;cursor:pointer}
.hoyC .hecho{display:inline-block;margin-top:8px;font-size:13.5px;font-weight:700;color:#3a7d44}
@media (max-width:560px){.hoy{margin-bottom:12px}.hoyR{flex:1 1 100%;flex-direction:row;gap:8px}}
/* ---------- minijuegos: parejas, reparto y ritmo ---------- */
#mgIn{max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);overflow-y:auto}
.mgPlato[data-u]::after{content:attr(data-u);white-space:nowrap}
.mgPar{display:grid;grid-template-columns:1fr 1fr;gap:8px;align-items:stretch}
.mgPar button{font:inherit;font-size:14.5px;line-height:1.25;padding:8px;min-height:48px;min-width:0;border-radius:12px;border:2px solid #0B2E44;background:#fff;color:#0B2E44;cursor:pointer;overflow-wrap:break-word;touch-action:manipulation}
.mgPar button.b{border-color:#8a6a24;background:#fbf6ea}
.mgPar button.sel{background:#D4B06A;border-color:#8a6a24;box-shadow:0 0 0 3px rgba(212,176,106,.45)}
.mgPar button.bien{background:#0B2E44;border-color:#0B2E44;color:#F4E9D8;opacity:.6;cursor:default}
.mgPar button.mal{background:#c0392b;border-color:#c0392b;color:#fff}
.mgCesta{background:#fff;border:1px dashed rgba(11,46,68,.25);border-radius:12px;padding:8px 10px;margin-bottom:10px;font-size:14.5px}
.mgCesta b{font-family:Georgia,serif;font-size:22px}
.mgPts{display:flex;flex-wrap:wrap;gap:4px;justify-content:center;margin-top:6px}
.mgPts i{width:12px;height:12px;border-radius:50%;background:#D4B06A;border:1px solid #8a6a24}
.mgPts i.ido{background:transparent;border-color:rgba(11,46,68,.2)}
.mgRep{display:flex;flex-direction:column;gap:8px}
.mgQ{display:flex;align-items:center;gap:6px;background:#fff;border:2px solid rgba(11,46,68,.2);border-radius:12px;padding:6px 6px 6px 10px;text-align:left}
.mgQ.ok{border-color:#3a7d44}.mgQ.mal{border-color:#c0392b}
.mgQn{flex:1;min-width:0;font-size:14.5px;line-height:1.2}
.mgQn small{display:block;font-size:12.5px;opacity:.8;margin-top:2px}
.mgQn em{display:block;font-style:normal;font-size:12.5px;font-weight:700;color:#c0392b}.mgQn em:empty{display:none}
.mgQ button{flex:none;width:44px;height:44px;padding:0;border-radius:50%;border:0;background:#0B2E44;color:#F4E9D8;font:inherit;font-size:22px;font-weight:700;line-height:1;cursor:pointer;touch-action:manipulation}
.mgQ button.menos{background:#fff;color:#0B2E44;box-shadow:inset 0 0 0 2px #0B2E44}
.mgQ button:disabled{opacity:.3;cursor:default}
.mgQc{flex:none;width:26px;text-align:center;font-weight:700;font-size:18px}
.mgRit{position:relative;height:156px;display:flex;align-items:center;justify-content:center}
.mgAro{position:absolute;left:50%;top:50%;width:92px;height:92px;margin:-46px 0 0 -46px;border-radius:50%;border:4px solid #D4B06A;pointer-events:none;transform:scale(1.6);opacity:.3}
.mgPulso{width:92px;height:92px;padding:0;border-radius:50%;border:0;background:#0B2E44;color:#F4E9D8;font:inherit;font-weight:700;font-size:16px;cursor:pointer;touch-action:manipulation;user-select:none;-webkit-user-select:none}
.mgPulso.si{background:#3a7d44}.mgPulso.no{background:#c0392b}
.mgVerso{min-height:46px;font-family:Georgia,serif;font-size:16.5px;line-height:1.35;margin:0 0 8px}.mgVerso:empty{display:none}
.mgCuentas{display:flex;flex-wrap:wrap;gap:6px;justify-content:center}
.mgCuentas i{width:14px;height:14px;border-radius:50%;background:rgba(11,46,68,.15)}
.mgCuentas i.si{background:#D4B06A;box-shadow:inset 0 0 0 1px #8a6a24}.mgCuentas i.no{background:rgba(192,57,43,.45)}
#mgIn{box-sizing:border-box;max-width:100%}
/* ---------- minijuegos: lo común (marcador, vidas, botón grande, «no ha salido») ---------- */
.mgI{display:block;width:100%;height:100%}
.mgPalabra{display:block;font-size:13px;line-height:1.15;font-weight:700;overflow-wrap:anywhere}
.mgNota{font-size:13px;font-weight:700;color:#8a6a24;margin:0 0 8px}
.mgMarca{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:14.5px;margin:0 2px 10px;min-height:24px}
.mgMarca b{font-family:Georgia,serif;font-size:19px}
.mgVidas{display:flex;gap:5px}
.mgVidas i{width:13px;height:13px;border-radius:50%;background:#c0392b}
.mgVidas.tiros i{background:#0B2E44}
.mgVidas i.ido{background:rgba(11,46,68,.15)}
.mgGran{display:block;width:100%;min-height:56px;font:inherit;font-weight:700;font-size:17px;border-radius:14px;border:0;background:#0B2E44;color:#F4E9D8;cursor:pointer;touch-action:none;user-select:none;-webkit-user-select:none}
.mgGran.on,.mgGran:active{background:#8a6a24}
.mgLados button{min-height:52px}
.mgFl{width:22px;height:22px;vertical-align:-5px;pointer-events:none}
#mgZona.mgFuera{opacity:.5;pointer-events:none}
.mgNo{color:#c0392b}
.mgOtra{display:flex;gap:10px;margin-top:10px}
.mgOtra button{flex:1;min-width:0;min-height:48px;font:inherit;font-weight:700;font-size:16px;border-radius:12px;border:0;background:#0B2E44;color:#F4E9D8;cursor:pointer;touch-action:manipulation}
.mgOtra button.alt{background:#fff;color:#0B2E44;box-shadow:inset 0 0 0 2px #0B2E44}
.mgFichas button.fuera{opacity:.4;text-decoration:line-through;border-style:dashed;cursor:default}
.mgRed.n6{grid-template-columns:repeat(3,minmax(0,1fr));max-width:292px}
.mgRed+.mgCuentas,.mgFichas+.mgCuentas,.mgCub+.mgCuentas{margin-top:12px}
/* ---------- atrapa y carrera ---------- */
.mgCampo,.mgPista{position:relative;height:230px;border-radius:14px;overflow:hidden;touch-action:none;user-select:none;-webkit-user-select:none;border:1px solid rgba(11,46,68,.18)}
.mgCampo{background:linear-gradient(#fbf6ea,#efe2c4)}
.mgCae{position:absolute;top:-12%;left:50%;width:38px;height:38px;margin:-19px 0 0 -19px;pointer-events:none}
.mgCae.buena{filter:drop-shadow(0 0 5px rgba(212,176,106,.95))}
.mgCesto{position:absolute;left:50%;top:86%;width:28%;height:26px;margin-left:-14%;box-sizing:border-box;border-radius:4px 4px 18px 18px;border:2px solid #5c3d24;background-color:#b9773f;background-image:repeating-linear-gradient(60deg,transparent 0 6px,rgba(92,61,36,.45) 6px 8px),repeating-linear-gradient(-60deg,transparent 0 6px,rgba(92,61,36,.45) 6px 8px);pointer-events:none}
.mgCesto.mal{background-color:#c0392b}
.mgPista{height:240px;background:linear-gradient(90deg,transparent 33%,rgba(11,46,68,.14) 33% 33.7%,transparent 33.7% 66.3%,rgba(11,46,68,.14) 66.3% 67%,transparent 67%),linear-gradient(#e9dcbd,#dccb9f)}
.mgYo{position:absolute;top:84%;left:50%;width:44px;height:44px;margin:-22px 0 0 -22px;box-sizing:border-box;border-radius:50%;background:#0B2E44 center/cover no-repeat;border:3px solid #D4B06A;box-shadow:0 3px 8px rgba(0,0,0,.3);transition:left .09s ease-out;pointer-events:none;z-index:2}
.mgYo.mal{border-color:#c0392b;box-shadow:0 0 0 5px rgba(192,57,43,.45)}
/* ---------- memoria ---------- */
.mgMem{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin-bottom:10px}
.mgMem button{aspect-ratio:1;min-width:0;padding:0;border-radius:12px;border:2px solid #8a6a24;cursor:pointer;touch-action:manipulation;color:#0B2E44;font:inherit;background-color:#0B2E44;background-image:repeating-linear-gradient(45deg,transparent 0 8px,rgba(212,176,106,.35) 8px 10px),repeating-linear-gradient(-45deg,transparent 0 8px,rgba(212,176,106,.35) 8px 10px)}
.mgMem button span{display:flex;align-items:center;justify-content:center;width:100%;height:100%;padding:16%;box-sizing:border-box;visibility:hidden}
.mgMem button.vista{background:#fff}
.mgMem button.vista span{visibility:visible}
.mgMem button.hecha{background:#f3e3b8;border-color:#D4B06A;cursor:default;opacity:.75}
/* ---------- puzle ---------- */
.mgPuzC{display:flex;justify-content:center;align-items:flex-start;gap:8px;margin-bottom:4px}
.mgPuz{display:grid;gap:2px;width:min(216px,72%);box-sizing:border-box;background:#0B2E44;border:3px solid #0B2E44;border-radius:10px;overflow:hidden}
.mgPuz button{min-width:0;min-height:0;padding:0;border:0;border-radius:0;background-color:#e9dcbd;background-repeat:no-repeat;cursor:pointer;touch-action:manipulation;font:inherit;font-weight:700;font-size:18px;color:#0B2E44}
.mgPuz button.sel{outline:3px solid #D4B06A;outline-offset:-3px;filter:brightness(1.18)}
.mgPuz.num button{background-image:none!important}
.mgPuz.hecho{gap:0;border-color:#D4B06A}
.mgPuzRef{width:60px;height:auto;border-radius:8px;border:2px solid #8a6a24}
/* ---------- sopa de letras ---------- */
.mgSopa{display:grid;gap:3px;margin:0 auto;max-width:330px}
.mgSopa button{aspect-ratio:1;min-width:0;padding:0;border:0;border-radius:8px;background:#fff;color:#0B2E44;font:700 19px Georgia,serif;cursor:pointer;touch-action:manipulation}
.mgSopa button.hecha{background:#0B2E44;color:#F4E9D8}
.mgSopa button.sel{background:#D4B06A;color:#0B2E44;box-shadow:inset 0 0 0 3px #8a6a24}
.mgSopa button.mal{background:#c0392b;color:#fff}
.mgPal{display:flex;flex-wrap:wrap;gap:6px;justify-content:center;margin-top:10px}
.mgPal span{font-size:13px;font-weight:700;letter-spacing:.04em;padding:4px 9px;border-radius:999px;background:#fff;border:1px solid rgba(11,46,68,.25)}
.mgPal span.ok{background:#0B2E44;color:#F4E9D8;text-decoration:line-through;opacity:.6}
/* ---------- la red ---------- */
.mgAgua{position:relative;height:210px;border-radius:14px;overflow:hidden;cursor:pointer;touch-action:none;user-select:none;-webkit-user-select:none;background:linear-gradient(#bfe0ec 0,#bfe0ec 11%,#3d86a6 11.5%,#1b4f6b 60%,#123a51)}
.mgAgua::before{content:"";position:absolute;left:39%;width:22%;top:12%;bottom:0;box-sizing:border-box;border-left:1px dashed rgba(244,233,216,.3);border-right:1px dashed rgba(244,233,216,.3)}
.mgBote{position:absolute;left:50%;top:3%;width:84px;height:22px;margin-left:-42px;box-sizing:border-box;border-radius:4px 4px 26px 26px;background:#8a5a36;border:2px solid #5c3d24;z-index:2}
.mgMalla{position:absolute;left:39%;width:22%;top:14%;height:0;box-sizing:border-box;border:2px solid rgba(244,233,216,.9);border-top:0;border-radius:0 0 16px 16px;background-image:repeating-linear-gradient(45deg,transparent 0 6px,rgba(244,233,216,.55) 6px 7px),repeating-linear-gradient(-45deg,transparent 0 6px,rgba(244,233,216,.55) 6px 7px);pointer-events:none}
.mgPezR{position:absolute;left:-20%;width:30px;height:30px;margin:-15px 0 0 -15px;pointer-events:none}
.mgPezR.der{transform:scaleX(-1)}
/* ---------- lámpara ---------- */
.mgLam{display:flex;gap:12px;height:200px}
.mgTubo{position:relative;flex:none;width:76px;border-radius:14px;background:#0B2E44;overflow:hidden}
.mgBanda{position:absolute;left:0;right:0;top:40%;box-sizing:border-box;background:rgba(212,176,106,.5);border-top:2px solid #D4B06A;border-bottom:2px solid #D4B06A}
.mgPunto{position:absolute;left:50%;top:50%;width:36px;height:36px;margin:-18px 0 0 -18px;filter:grayscale(.7) brightness(.85)}
.mgPunto.ok{filter:none}
.mgFarol{flex:1;min-width:0;border-radius:14px;background:radial-gradient(circle at 50% 45%,#fff6d6,#f1e3c0 55%,#e0cda1);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px}
.mgFarolI{width:96px;height:96px}
.mgVida{width:70%;height:8px;border-radius:4px;background:rgba(11,46,68,.15);overflow:hidden}
#mgVida{height:100%;width:100%;background:#D4B06A}
/* ---------- cubiletes ---------- */
.mgCub{position:relative;height:132px}
.mgVaso{position:absolute;top:22px;left:50%;width:78px;height:104px;margin-left:-39px;padding:0;border:0;background:none;cursor:pointer;touch-action:manipulation;transition:left .3s ease-in-out,transform .3s ease-in-out}
.mgCub.n4 .mgVaso{width:66px;margin-left:-33px}
.mgVaso:disabled{cursor:default}
.mgVaso.pasa{transform:translateY(-16px);z-index:2}
.mgVaso .premio{position:absolute;left:50%;bottom:14px;width:30px;height:30px;margin-left:-15px;visibility:hidden}
.mgVaso.con .premio{visibility:visible}
.mgVaso .tapa{position:absolute;left:5px;right:5px;top:14px;height:76px;box-sizing:border-box;background:linear-gradient(90deg,#a5672f,#c98a4b 45%,#a5672f);border-bottom:4px solid #5c3d24;clip-path:polygon(16% 0,84% 0,100% 100%,0 100%);transition:transform .25s ease}
.mgVaso.alza .tapa{transform:translateY(-34px)}
/* pantallas bajas: que quepa sin desplazar */
@media (max-height:700px){#mgIn{padding:14px 16px 12px}#mgIn h3{font-size:19px}.mgp{font-size:13.5px;margin-bottom:10px}#mgMsg{min-height:36px;margin-top:8px}.mgCampo{height:206px}.mgPista{height:212px}.mgAgua{height:196px}.mgLam{height:184px}}

/* minijuegos nuevos: pantalla de inicio, laberinto, unir puntos, frotar y tocar */
.mgComo{font-size:16.5px;font-weight:700;margin:6px 0 6px}.mgAviso{font-size:13.5px;opacity:.75;margin:0 0 14px}
.mgGo{font:inherit;font-weight:700;font-size:18px;padding:14px 34px;border-radius:14px;border:0;background:#0B2E44;color:#F4E9D8;cursor:pointer;min-height:52px}
.mgGo:focus-visible{outline:3px solid #D4B06A;outline-offset:3px}
.mgLab{position:relative;display:grid;grid-template-columns:repeat(var(--n),1fr);width:min(100%,340px);aspect-ratio:1;margin:0 auto;background:#fbf6ea;border:3px solid #0B2E44;border-radius:8px;touch-action:none;user-select:none;-webkit-user-select:none;box-sizing:border-box}
.mgLab>i{box-sizing:border-box;border:0 solid #0B2E44;display:flex;align-items:center;justify-content:center;padding:14%}
.mgLab>i.d{border-right-width:3px}.mgLab>i.b{border-bottom-width:3px}
.mgLab>b{position:absolute;width:calc(100%/var(--n)*.72);aspect-ratio:1;transform:translate(-50%,-50%);pointer-events:none}
.mgLab #mgYo{border-radius:50%;background:#D4B06A;border:3px solid #8a6a24;box-sizing:border-box;transition:left .11s linear,top .11s linear;box-shadow:0 2px 5px rgba(0,0,0,.3)}
.mgLab #mgYo.mal{background:#c0392b;border-color:#8a2a20}
.mgCruz{display:flex;flex-direction:column;align-items:center;gap:6px;margin-top:10px}.mgCruz>div{display:flex;gap:6px}
.mgCruz button{width:64px;height:50px;border-radius:12px;border:0;background:#0B2E44;color:#F4E9D8;cursor:pointer;touch-action:none;user-select:none;-webkit-user-select:none;display:flex;align-items:center;justify-content:center}
.mgCruz .mgFl{width:26px;height:26px}
.mgUnir{position:relative;width:min(100%,320px);aspect-ratio:1;margin:0 auto;background:#12344b;border-radius:14px;overflow:hidden}
.mgUnir svg{position:absolute;inset:0;width:100%;height:100%}
.mgUnir button{position:absolute;width:44px;height:44px;margin:-22px 0 0 -22px;border-radius:50%;border:2px solid #D4B06A;background:#F4E9D8;color:#0B2E44;font:inherit;font-weight:700;font-size:15px;cursor:pointer;padding:0;touch-action:manipulation}
.mgUnir button.bien{background:#D4B06A;border-color:#fff3c4;color:#0B2E44;cursor:default}
.mgUnir button.mal{background:#c0392b;color:#fff;border-color:#c0392b}
.mgUnir button.ciego{color:transparent}
.mgUnir.hecho polyline{stroke:#fff3c4;stroke-width:3.4;transition:stroke .4s,stroke-width .4s}
.mgFrota{position:relative;width:min(100%,340px);aspect-ratio:320/220;margin:0 auto;border-radius:14px;overflow:hidden;background:#fbf6ea;border:2px solid #8a6a24;box-sizing:border-box}
.mgFondo{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:10px}.mgFondo img{width:100%;height:100%;object-fit:cover}.mgFondo .mgI{height:100%;width:auto}
#mgLienzo{position:absolute;inset:0;width:100%;height:100%;touch-action:none;cursor:grab}
.mgHuecos{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;width:min(100%,300px);margin:0 auto}
.mgHuecos button{aspect-ratio:1;border-radius:50%;border:3px solid #8a6a24;background:#e6d6b8;padding:16%;cursor:pointer;touch-action:none;user-select:none;-webkit-user-select:none;box-shadow:inset 0 6px 10px rgba(90,60,30,.35)}
.mgHuecos button.sale{background:#fff;animation:mgSale .16s ease-out}.mgHuecos button.sale.mala{background:#fff}
.mgHuecos button.si{background:#cfe8cf}.mgHuecos button.no{background:#f0b8b0}
@keyframes mgSale{from{transform:scale(.7)}to{transform:scale(1)}}
@media (prefers-reduced-motion:reduce){.mgHuecos button.sale{animation:none}.mgLab #mgYo{transition:none}}

/* ---- audio: volúmenes en el menú de pausa ---- */
.audioVol{display:flex;flex-direction:column;gap:8px;max-width:260px;margin:14px auto 0;font-size:14px}
.audioVol label{display:flex;align-items:center;justify-content:space-between;gap:10px}
.audioVol input[type=range]{flex:1;max-width:150px;accent-color:#8a6a24}

/* ---------- jugabilidad (motor: mando táctil, guía hacia el objetivo, ritmo) ---------- */
#fade { transition: opacity .18s ease; }
/* flecha en el borde de la pantalla cuando el objetivo queda fuera de la vista */
#guia { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none; will-change: transform; }
#guia i { position: absolute; left: -14px; top: -14px; width: 28px; height: 28px; background: #f2c14e; clip-path: polygon(50% 0, 96% 100%, 50% 76%, 4% 100%); }
#guia.side i { background: #58b7e0; }
#guia::before { content: ""; position: absolute; left: -21px; top: -21px; width: 42px; height: 42px; border-radius: 50%; background: rgba(11, 46, 68, .78); border: 1.5px solid rgba(244, 233, 216, .7); }
#guia b { position: absolute; left: -30px; top: 23px; width: 60px; text-align: center; font: 700 11.5px system-ui; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .9), 0 0 6px rgba(0, 0, 0, .6); }
.toast.larga { animation-duration: 4.4s; white-space: normal; text-align: center; max-width: 84vw; }
/* palanca: se ve dónde está antes de tocarla, y se enciende al correr */
#joyZone::after { content: ""; position: absolute; left: 34px; bottom: calc(44px + var(--sab)); width: 104px; height: 104px; border-radius: 50%; border: 2px dashed rgba(244, 233, 216, .5); background: radial-gradient(circle, rgba(244, 233, 216, .5) 0 19px, rgba(244, 233, 216, .1) 20px); pointer-events: none; transition: opacity .25s; }
#joyZone.on::after, #joyZone.quieto::after { opacity: 0; }
#joy.corre { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(212, 176, 106, .3); }
#joy.corre #joyKnob { background: var(--gold); }
@media (pointer: coarse) {
  #act { min-height: 62px; padding: 17px 26px; font-size: 17px; right: 18px; bottom: calc(36px + var(--sab)); }
  #joy { width: 132px; height: 132px; margin: -66px 0 0 -66px; }
  #joyKnob { width: 58px; height: 58px; margin: -29px 0 0 -29px; }
  #camBtns button { min-height: 38px; }
}
/* móvil tumbado: poco alto, así que el diálogo y los paneles se encogen */
@media (max-height: 460px) {
  #dlg { padding: 10px 14px 10px; max-height: 80vh; }
  #dlgText { font-size: 16px; min-height: 0; }
  #dlgNext { margin-top: 6px; padding: 7px 18px; }
  #banner { top: 16%; }
  #joyZone::after { bottom: calc(22px + var(--sab)); }
  #act { bottom: calc(18px + var(--sab)); }
}

/* minijuegos nuevos (v42): luces, torre, diferencias, clasifica y conteo */
.mgLuces{display:grid;gap:8px;width:min(100%,264px);margin:0 auto 10px}
.mgLuces.n3{grid-template-columns:repeat(3,1fr)}.mgLuces.n4{grid-template-columns:repeat(4,1fr);width:min(100%,288px);gap:7px}
.mgLuces button{aspect-ratio:1;min-width:0;padding:0;border-radius:14px;border:2px solid #0B2E44;background:#12344b;cursor:pointer;touch-action:manipulation;transition:background .18s,box-shadow .18s}
.mgLuces button span{display:flex;width:100%;height:100%;padding:18%;box-sizing:border-box;filter:grayscale(1) brightness(.55);opacity:.55;transition:filter .18s,opacity .18s}
.mgLuces button.on{background:#fff3c4;border-color:#D4B06A;box-shadow:0 0 14px rgba(233,162,59,.7)}
.mgLuces button.on span{filter:none;opacity:1}
.mgLuces button.pista{outline:3px solid #D4B06A;outline-offset:2px;animation:mgLate .9s ease-in-out infinite}
.mgLuces button:focus-visible,.mgDif button:focus-visible,.mgCajas button:focus-visible,.mgOpc button:focus-visible{outline:3px solid #D4B06A;outline-offset:2px}
@keyframes mgLate{50%{transform:scale(1.07)}}
.mgTorre{position:relative;height:236px;border-radius:14px;overflow:hidden;cursor:pointer;touch-action:none;user-select:none;-webkit-user-select:none;background:linear-gradient(#cfe6ef,#f1e7cf 70%,#d9c391);border:1px solid rgba(11,46,68,.18);margin-bottom:10px}
.mgTorreI{position:absolute;inset:0;transition:transform .35s ease}
.mgBl{position:absolute;box-sizing:border-box;border:2px solid #5c3d24;border-radius:4px;background:#c98a4b}
.mgBl.c-ladrillo{background:#c98a4b;background-image:linear-gradient(90deg,transparent 49%,rgba(92,61,36,.3) 49% 51%,transparent 51%)}
.mgBl.c-piedra{background:#b4b7bd;border-color:#5d6066;border-radius:7px}
.mgBl.c-plato{background:#fffdf6;border-color:#0B2E44;border-radius:3px 3px 12px 12px}
.mgBl.c-olla{background:#9a9da3;border-color:#0B2E44;border-radius:3px 3px 14px 14px}
.mgBl.c-pan{background:#D4B06A;border-color:#8a6a24;border-radius:12px}
.mgBl.viaja{box-shadow:0 0 0 3px rgba(212,176,106,.6)}
.mgBl.justo{box-shadow:0 0 12px 3px #fff3c4}
.mgBl.cae{transition:transform .7s ease-in,opacity .7s ease-in;pointer-events:none}
.mgDif{display:flex;gap:6px;justify-content:center;margin-bottom:10px}
.mgDifP{flex:1;min-width:0;max-width:220px}.mgDifP small{display:block;font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#8a6a24;margin-bottom:4px}
.mgDifP>div{display:grid;grid-template-columns:repeat(3,1fr);gap:3px;padding:3px;border-radius:12px;background:#fbf6ea;border:2px solid #8a6a24}
.mgDif button{aspect-ratio:1;min-width:0;min-height:44px;padding:14%;border-radius:10px;border:0;background:#fff;cursor:pointer;touch-action:manipulation}
.mgDif button.hallada{background:#cfe8cf;box-shadow:inset 0 0 0 3px #5d8a4a;cursor:default}
.mgDif button.mal{background:#f0b8b0}
.mgCarta{min-height:92px;display:flex;align-items:center;justify-content:center;padding:14px 16px;margin-bottom:12px;border-radius:16px;background:#fff;border:2px solid #8a6a24;font-family:Georgia,serif;font-size:19px;line-height:1.3;box-shadow:0 3px 0 rgba(138,106,36,.35)}
.mgCarta.entra{animation:mgEntra .22s ease-out}.mgCarta.mal{animation:mgTiembla .38s ease-in-out;border-color:#c0392b}
@keyframes mgEntra{from{transform:translateY(-14px) scale(.96);opacity:.2}to{transform:none;opacity:1}}
@keyframes mgTiembla{20%,60%{transform:translateX(-7px)}40%,80%{transform:translateX(7px)}}
.mgCajas{display:grid;gap:8px;margin-bottom:10px}.mgCajas.c2{grid-template-columns:1fr 1fr}.mgCajas.c3{grid-template-columns:repeat(3,1fr)}.mgCajas.c4{grid-template-columns:1fr 1fr}
.mgCajas button{position:relative;min-height:60px;padding:10px 8px;font:inherit;font-weight:700;font-size:16px;line-height:1.15;border-radius:12px;border:2px solid #0B2E44;background:#F4E9D8;color:#0B2E44;cursor:pointer;touch-action:manipulation;border-bottom-width:5px}
.mgCajas button kbd{position:absolute;left:6px;top:3px;font:700 11px sans-serif;opacity:.45}
.mgCajas button.bien{background:#cfe8cf;border-color:#5d8a4a}.mgCajas button.mal{background:#f0b8b0;border-color:#c0392b}
@media (hover:none){.mgCajas button kbd{display:none}}
.mgConteo{position:relative;height:170px;border-radius:14px;overflow:hidden;background:linear-gradient(#e9f1d8,#cfe0b0);border:1px solid rgba(11,46,68,.18);margin-bottom:10px}
.mgPasa{position:absolute;left:-10%;width:44px;height:44px;margin:-22px 0 0 -22px;pointer-events:none}
.mgOpc{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;min-height:52px}
.mgOpc button{min-height:52px;font:700 22px Georgia,serif;border-radius:12px;border:2px solid #0B2E44;background:#fff;color:#0B2E44;cursor:pointer;touch-action:manipulation}
.mgOpc button.bien{background:#cfe8cf;border-color:#5d8a4a}.mgOpc button.mal{background:#f0b8b0;border-color:#c0392b}
@media (prefers-reduced-motion:reduce){.mgLuces button.pista,.mgCarta.entra,.mgCarta.mal{animation:none}.mgTorreI{transition:none}}

.ciu{display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap;margin:0 0 4px;color:#fff;font-weight:600}
.ciu .seg{margin:0 0 12px}
.ciu span{margin-bottom:12px;opacity:.85}

/* móvil tumbado: el cartel del objetivo y el mapa, más pequeños, para que se vea el juego */
@media (max-height: 460px) {
  #obj { top: calc(44px + var(--sat)); width: min(250px, 38vw); padding: 6px 9px; }
  #objTitle { font-size: 10px; }
  #objText { font-size: 12.5px; padding-right: 46px; margin-top: 1px; }
  #objSides { display: none; }
  #mini { width: 84px; height: 84px; top: calc(46px + var(--sat)); border-radius: 12px; }
  .v em { display: none; }
  #life { display: none; }
}

/* pantallas bajas: la estampa final y el laberinto caben sin desplazar */
@media (max-height: 700px) {
  #cardIn { padding: 16px 18px 14px; }
  #cardIn h2 { font-size: 21px; margin: 4px 0 6px; }
  #cardIn p { font-size: 15px; line-height: 1.4; margin-bottom: 8px; }
  #cardIn .estampa { padding: 10px 12px; margin: 8px auto; }
  #cardIn .estampa img { width: 104px; height: 132px; }
  .mgLab { width: min(100%, 340px, calc(100vh - 400px)); width: min(100%, 340px, calc(100dvh - 400px)); min-width: 190px; }
  .mgCruz { margin-top: 6px; gap: 4px; } .mgCruz button { height: 40px; }
}

/* los botones de la estampa final, siempre a la vista aunque la tarjeta no quepa */
#cardIn .pie { position: sticky; bottom: -20px; margin: 6px -6px -6px; padding: 10px 6px 12px; background: linear-gradient(to bottom, rgba(244, 233, 216, 0), var(--beige) 22%); display: flex; flex-direction: column; align-items: center; gap: 8px; }
@media (max-height: 700px) { #cardIn .pie { bottom: -14px; flex-direction: row; justify-content: center; flex-wrap: wrap; } #cardIn .stats div { padding: 4px 10px; min-width: 70px; } #cardIn .stats b { font-size: 18px; } #cardIn .stats { margin: 4px 0 8px; } }

/* el botón de cualquier tarjeta, a la vista aunque el texto no quepa */
#cardIn > button.btn:last-child { position: sticky; bottom: -12px; box-shadow: 0 0 0 10px var(--beige); }

/* los botones del resultado de un minijuego, a la vista aunque el panel no quepa */
#mgIn .mgOtra, #mgIn #mgSigue, #mgIn .mgFinBot { position: sticky; bottom: -16px; background: #F4E9D8; padding: 8px 0 4px; box-shadow: 0 -8px 10px -6px rgba(244, 233, 216, .95); }

/* mientras se habla, el cartel del objetivo se aparta: no tapa la cara de nadie */
body:has(#dlg:not([hidden])) #obj { opacity: .16; transition: opacity .25s; }

/* ---------- lo recibido es para darlo ---------- */
.darSaldo { background: rgba(244, 233, 216, .96); color: var(--navy); border-radius: 14px; padding: 8px 22px; text-align: center; margin: 0 0 12px; }
.darSaldo b { display: block; font: 700 30px Georgia, serif; } .darSaldo small { font-size: 12.5px; color: #6a5a3a; }
.darMsg { background: rgba(212, 176, 106, .95); color: var(--navy); border-radius: 12px; padding: 9px 16px; font: italic 16px/1.4 Georgia, serif; max-width: 620px; text-align: center; margin: 0 0 12px; }
.dar { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 14px; width: min(860px, 100%); align-items: start; }
.dar section { background: rgba(244, 233, 216, .96); color: var(--navy); border-radius: 16px; padding: 14px; }
.dar h3 { font: 700 19px Georgia, serif; margin: 0 0 8px; display: flex; justify-content: space-between; align-items: baseline; } .dar h3 small { font: 600 12.5px system-ui; color: #8a6a2a; }
.darDib svg { display: block; width: 100%; height: auto; border-radius: 10px; }
.darBarra { display: flex; gap: 3px; margin: 8px 0 6px; } .darBarra i { flex: 1; height: 6px; border-radius: 3px; background: #dccfb2; } .darBarra i.on { background: #b8904a; }
.darHecho { font: italic 15px/1.4 Georgia, serif; color: #3d4f5a; margin: 4px 0 8px; } .darFin { font: 700 16px Georgia, serif; margin: 6px 0 0; }
#screen .dar .btn { background: var(--navy); color: #fff; margin: 4px 0 0; width: 100%; } #screen .dar .btn:disabled { opacity: .4; }
.darFalta { display: block; margin-top: 6px; font-size: 12.5px; color: #6a5a3a; line-height: 1.35; }
.darAy { border-top: 1px solid #dccfb2; padding: 9px 0; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; } .darAy:first-of-type { border-top: 0; }
.darAy b { font: 700 15px Georgia, serif; } .darAy p { grid-column: 1; margin: 0; font-size: 13.5px; line-height: 1.35; color: #3d4f5a; } .darAy.ya p { font-style: italic; }
.darAy button { grid-row: 1 / span 2; grid-column: 2; background: var(--navy); color: #fff; border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 13.5px; } .darAy button:disabled { opacity: .35; }
.darAy span { grid-row: 1 / span 2; grid-column: 2; font: 700 13px system-ui; color: #5f8a3a; }
@media (max-width: 700px) { .dar { grid-template-columns: 1fr; } }
.estPie { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; } .estPie small { font: 600 12px system-ui; color: #8a6a2a; }
.estPie button { background: var(--navy); color: #fff; border-radius: 999px; padding: 5px 12px; font-size: 12.5px; font-weight: 700; }

/* ---------- el año de la Iglesia ---------- */
.lit { display: flex; align-items: center; gap: 12px; width: min(760px, 100%); margin: 0 auto 10px; background: rgba(244, 233, 216, .95); color: var(--navy); border-radius: 14px; padding: 9px 14px; border-left: 8px solid var(--lc, #5f9a4a); text-align: left; flex-wrap: wrap; }
.litT { flex: 1 1 150px; min-width: 0; } .litT small { display: block; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: #8a6a24; font-weight: 700; }
.litT b { display: block; font: 700 17px Georgia, serif; margin-top: 2px; } .litT p { margin: 2px 0 0; font-size: 14px; line-height: 1.35; }
.litN { display: block; margin-top: 4px; font-size: 12.5px; font-weight: 700; color: #6a4a8a; }
.litV { flex: 0 0 auto; width: 62px; } .litV svg { display: block; width: 100%; height: auto; }
.lit button { background: var(--navy); color: #fff; border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 13px; }
.prog.fiesta { color: #8a5a10; font-weight: 700; }
.collH { margin-top: 26px; }
.esc { width: min(560px, 100%); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.escK { font: 700 12px system-ui; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.escDib { width: 100%; border-radius: 16px; overflow: hidden; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); } .escDib svg { display: block; width: 100%; height: auto; }
.escT { font: 19px/1.5 Georgia, serif; text-align: center; margin: 4px 0 0; min-height: 4.5em; max-width: 30em; }
.escP { display: flex; gap: 6px; } .escP i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .3); } .escP i.on { background: var(--gold); }
.darAy button.ver { grid-row: auto; grid-column: 1; justify-self: start; background: none; color: #8a5a10; padding: 2px 0; text-decoration: underline; font-size: 13px; }
@media (max-width: 560px) { .lit { padding: 7px 12px; gap: 10px; margin-bottom: 8px; } .litV { width: 46px; } .litT b { font-size: 15.5px; } .litT p { font-size: 13px; } .lit button { flex: 1 1 100%; } }
.estPie button.rep { background: none; color: #8a5a10; text-decoration: underline; padding: 2px 4px; }
.repL { width: min(620px, 100%); background: rgba(244, 233, 216, .96); color: var(--navy); border-radius: 16px; padding: 6px 14px; }
.repJ { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid #dccfb2; } .repJ:first-child { border-top: 0; }
.repJ b { display: block; font: 700 15.5px Georgia, serif; } .repJ small { font-size: 12.5px; color: #6a5a3a; }
.repJ span { color: #b8904a; font-size: 17px; letter-spacing: 1px; white-space: nowrap; } .repJ span i { font-style: normal; color: #dccfb2; }
.repJ button { background: var(--navy); color: #fff; border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 13.5px; }
.coll .estampa.lugar img { width: 100%; height: auto; aspect-ratio: 4 / 5; border-radius: 8px; filter: none; object-fit: cover; object-position: center; }
.lugarQ { aspect-ratio: 4 / 5; border-radius: 8px; background: #d9cdb4; display: flex; align-items: center; justify-content: center; font: 700 44px Georgia, serif; color: #a8987c; }
