/* V4.7 handheld controls, accessible reading, restrained battle effects. */
:root{--game-text-scale:1;--touch-size:54px;--touch-opacity:.9;--touch-lift:0px}
#modalBody p,#modalBody li{font-size:calc(14px * var(--game-text-scale));line-height:1.55}
#dialogue p{font-size:calc(16px * var(--game-text-scale))}
#battleLog{font-size:calc(14px * var(--game-text-scale));cursor:pointer}
#modalBody button,#modalBody label,#modalBody select{font-size:calc(13px * var(--game-text-scale))}
#modalBody button{min-height:44px}#modalBody select{max-width:100%;padding:9px;background:#fffdec;color:#37554f;border:1px solid #9aaf9c;border-radius:5px}
button:focus-visible,select:focus-visible,input:focus-visible,.atlas-stop:focus-visible{outline:3px solid #c48b33;outline-offset:3px}
.preferences47{display:grid;gap:14px}.preferences47>label{display:grid;gap:7px;color:#37554f;font-weight:600}.preferences47 output{font-weight:400;font-size:12px;color:#657b70}.preferences47 input[type=range]{width:100%;min-height:32px;accent-color:#6b8a6b}.preferences47 .check47{display:flex;align-items:center;gap:12px;background:#edf1df;padding:11px;border-radius:5px;font-weight:400}.preferences47 input[type=checkbox]{width:22px;height:22px;accent-color:#527756;flex-shrink:0}.settings-shortcuts47{display:grid;grid-template-columns:1fr 1fr;gap:9px}.settings-shortcuts47 .menu-btn{margin:0;text-align:left}.save-status47{font-size:12px!important;padding:9px;background:#ecf0df;border-radius:4px}
.context-action{opacity:var(--touch-opacity);bottom:calc(max(10px,env(safe-area-inset-bottom)) + 82px + var(--touch-lift))}.context-action>b{width:var(--touch-size);height:var(--touch-size)}
.touch-pad47{position:absolute;z-index:7;left:16px;bottom:calc(max(10px,env(safe-area-inset-bottom)) + 80px + var(--touch-lift));display:grid;grid-template-columns:repeat(3,calc(var(--touch-size) * .85));grid-template-rows:repeat(2,calc(var(--touch-size) * .85));gap:3px;opacity:var(--touch-opacity);touch-action:none}.touch-pad47[hidden]{display:none}.touch-pad47 button{background:#eff1dbdf;border:2px solid #849977;color:#496451;border-radius:7px;font-size:18px;touch-action:none;user-select:none;-webkit-user-select:none;min-width:38px;min-height:38px;box-shadow:0 2px #445b4b55}.touch-pad47 button:active{background:#bfd1a7}.touch-pad47 button[data-touch47=up]{grid-column:2;grid-row:1}.touch-pad47 button[data-touch47=left]{grid-column:1;grid-row:2}.touch-pad47 button[data-touch47=down]{grid-column:2;grid-row:2}.touch-pad47 button[data-touch47=right]{grid-column:3;grid-row:2}
[data-hand=left] .context-action{left:17px;right:auto}[data-hand=left] .touch-pad47{left:auto;right:16px}
/* With a fixed pad both controls stay together for one-handed use. */
[data-controls=pad][data-hand=right] .touch-pad47{left:auto;right:16px}[data-controls=pad][data-hand=right] .context-action{right:18px;bottom:calc(max(10px,env(safe-area-inset-bottom)) + 188px + var(--touch-lift))}
[data-controls=pad][data-hand=left] .touch-pad47{right:auto;left:16px}[data-controls=pad][data-hand=left] .context-action{left:18px;bottom:calc(max(10px,env(safe-area-inset-bottom)) + 188px + var(--touch-lift))}
.gym-intro47{padding:15px;border-left:5px solid var(--gym-color);background:#eaf0df;margin-bottom:13px}.gym-intro47 h3{margin:8px 0;color:#35534e}.gym-intro47 small{letter-spacing:.6px;font-size:10px}.trial-progress47,.trial-buttons47{display:flex;gap:10px;justify-content:center;margin:17px 0}.trial-progress47 span{display:grid;place-items:center;width:55px;height:48px;border:2px solid #adb99e;background:#e9eed9;font-size:25px;color:#536c61}.trial-buttons47 .menu-btn{font-size:26px!important;min-width:65px;margin:0}.combat-history47{padding-left:23px}.combat-history47 li{padding:8px 0;border-bottom:1px solid #cbd5c0}
#combatEffects{position:absolute;inset:0;pointer-events:none;overflow:hidden;z-index:4}.type-particle47{position:absolute;display:block;width:12px;height:18px;background:var(--effect-color);opacity:0;box-shadow:inset -3px -3px #0002;animation:projectile47 .48s ease-out both;animation-delay:calc(var(--i) * 22ms)}
.type-particle47.to-enemy{left:24%;top:65%;--fx-x:170px;--fx-y:-90px}.type-particle47.to-player{left:75%;top:35%;--fx-x:-170px;--fx-y:90px}
.type-particle47.flame{clip-path:polygon(50% 0,70% 30%,85% 15%,100% 70%,65% 100%,20% 90%,0 55%,30% 30%)}.type-particle47.drop{border-radius:70% 5% 60% 55%;transform:rotate(-30deg)}.type-particle47.leaf{border-radius:90% 0 80% 0}.type-particle47.bolt{clip-path:polygon(40% 0,100% 0,65% 40%,95% 40%,20% 100%,40% 55%,0 55%);width:17px;height:24px}.type-particle47.shard{clip-path:polygon(50% 0,100% 40%,70% 100%,10% 75%,0 25%)}.type-particle47.orb{border-radius:50%;box-shadow:0 0 9px var(--effect-color)}.type-particle47.ring{border-radius:50%;background:transparent;border:3px solid var(--effect-color);width:23px;height:23px}.type-particle47.star{clip-path:polygon(50% 0,64% 36%,100% 50%,64% 64%,50% 100%,36% 64%,0 50%,36% 36%)}.type-particle47.wind{width:25px;height:4px;border-radius:80%}
@keyframes projectile47{0%{opacity:0;translate:0 calc(var(--i) * 4px)}20%{opacity:.85}85%{opacity:.85}100%{opacity:0;translate:var(--fx-x) calc(var(--fx-y) + var(--i) * 5px);rotate:35deg}}
.passive-notice{position:absolute;z-index:5;max-width:78%;padding:7px 10px;border:2px solid #779384;background:#fff9e6ee;color:#36564d;font-size:calc(11px * var(--game-text-scale));line-height:1.35;border-radius:5px;pointer-events:none}.passive-notice[hidden]{display:none}#enemyPassive{top:6px;right:7px}#playerPassive{bottom:4px;left:7px}
.heal-number47{position:absolute;color:#2e744a;background:#f2ffe8dd;padding:3px 6px;border-radius:4px;font:bold 13px monospace;animation:healing47 .9s ease-out both}.heal-number47.player{left:18%;top:60%}.heal-number47.enemy{left:70%;top:35%}@keyframes healing47{0%{opacity:0;translate:0 8px}20%{opacity:1}100%{opacity:0;translate:0 -25px}}
[data-reduced-motion=true] .enemy-sprite,[data-reduced-motion=true] .my-sprite,[data-reduced-motion=true] .type-particle47,[data-reduced-motion=true] .heal-number47{animation:none!important}[data-reduced-motion=true] .type-particle47{display:none}[data-reduced-motion=true] .heal-number47{opacity:1}[data-reduced-motion=true] .bar i{transition:none!important}
[data-low-flash=true] .attack-pulse .arena:after{display:none!important}[data-low-flash=true] .type-particle47{box-shadow:none;opacity:.55}[data-low-flash=true] .hit{animation:none!important}
@media(prefers-reduced-motion:reduce){.enemy-sprite,.my-sprite,.type-particle47,.heal-number47{animation:none!important}.type-particle47{display:none}}
@media(max-width:430px){.settings-shortcuts47{grid-template-columns:1fr}.preferences47{gap:12px}#dialogue p{font-size:calc(14px * var(--game-text-scale))}}
@media(max-height:540px) and (orientation:landscape){.context-action{bottom:calc(16px + var(--touch-lift))}.touch-pad47{bottom:calc(16px + var(--touch-lift))}[data-controls=pad] .context-action{bottom:calc(116px + var(--touch-lift))!important}.shortcut-dock{left:50%}.type-particle47.to-enemy{--fx-x:120px;--fx-y:-60px}.type-particle47.to-player{--fx-x:-120px;--fx-y:60px}}

#battleLog[data-waiting=true]:after{content:'Toca para seguir ▸';display:block;text-align:right;font-size:11px;color:#f4e3b1;margin-top:5px}
/* Discovered optional stories share the existing paper journal. */
.resident49{padding:14px;background:#e8efdb;border-left:4px solid #789875;margin-bottom:12px}.resident49 h3,.side-card49 h3{margin:8px 0;color:#39594e}.resident49 small,.side-card49>small{font-size:11px;color:#6a7f69}.side-card49{padding:14px;margin:14px 0;border:1px solid #b5c2a5;border-radius:6px;background:#f4f5e7}.side-card49 .menu-btn{margin-bottom:0}
.landscape-note52{margin:12px 0;padding:12px 14px;border-left:3px solid #849c74;background:#e8eddf;border-radius:0 8px 8px 0;color:#334b45}
.landscape-note52 small{font-weight:700;letter-spacing:.08em;text-transform:uppercase}
.landscape-note52 p{margin:6px 0 0;line-height:1.55}
.bag-pockets{grid-template-columns:repeat(3,minmax(0,1fr))}
.bag-pockets button{min-width:0;white-space:normal;overflow-wrap:anywhere;line-height:1.35}
.bag-screen{grid-template-columns:76px minmax(0,1fr)}
.bag-item-list,.bag-item-list b{min-width:0}
.bag-item-list b{overflow-wrap:anywhere}
.bag-item-list span{flex-shrink:0}
@media(max-width:370px){.bag-pockets{grid-template-columns:repeat(2,minmax(0,1fr))}.bag-screen{grid-template-columns:60px minmax(0,1fr)}}
