/* Two thumb zones. Native buttons and pointer listeners remain the input source. */
@media (pointer:coarse),(max-width:640px){
 body.compact-play.playing #touch{--pad:54px;position:fixed;display:block!important;left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));bottom:max(12px,env(safe-area-inset-bottom));height:142px;min-height:142px;pointer-events:none}
 body.compact-play.playing #touch .col.move{position:absolute;left:0;bottom:0;display:grid!important;grid-template-columns:repeat(2,var(--pad));grid-template-rows:repeat(2,var(--pad));gap:8px;width:116px;height:116px;padding:0!important;background:none;border:0}
 body.compact-play.playing #touch .col.move [data-k=a]{grid-column:1;grid-row:2}
 body.compact-play.playing #touch .col.move [data-k=d]{grid-column:2;grid-row:2}
 body.compact-play.playing #touch .col.move [data-k=s]{grid-column:1/3;grid-row:1;justify-self:center;display:grid!important}
 body.compact-play.playing #touch .touch-btn{width:var(--pad)!important;height:var(--pad)!important;min-width:var(--pad)!important;min-height:var(--pad)!important;max-width:none!important;border-radius:50%!important;background:#152c40dc!important;border:1px solid #b8c9c05c!important;box-shadow:inset 0 1px 0 #fff1,0 3px 12px #07152344!important;display:grid;place-items:center;font-size:24px;color:#f0dfbc!important;pointer-events:auto}
 body.compact-play.playing #touch .touch-btn.held,body.compact-play.playing #touch .touch-btn:active{background:#456a6b!important;border-color:#f2d5a2!important;transform:scale(.96)}
 body.compact-play.playing #touch .act-row.powers{display:none!important}
 body.compact-play.playing #touch .col.act{position:absolute;right:0;bottom:0;width:136px;height:134px;display:block!important;padding:0!important;border:0;background:none}
 body.compact-play.playing #touch .act-row.main{display:block;position:absolute;inset:0}
 body.compact-play.playing #touch .act-row.main [data-k=h]{position:absolute;right:78px;bottom:0}
 body.compact-play.playing #touch .act-row.main [data-k=shift]{position:absolute;right:8px;bottom:78px;--pad:50px}
 body.compact-play.playing #touch .act-row.main .jump{position:absolute;right:0;bottom:0;--pad:64px;background:#3c6b63ed!important;border-color:#c5ddba8c!important;font-size:29px}
 body.compact-play.playing #touch #touch-power-toggle{display:grid!important;place-items:center;position:absolute;right:78px;bottom:76px;width:46px;height:46px;min-width:46px;min-height:46px;border-radius:50%;border:1px solid #e3c58c88;pointer-events:auto;background:conic-gradient(#e7c891 var(--charge,0%),#243b4d 0)!important;box-shadow:inset 0 0 0 3px #182b3c;color:#e7c58f;font-size:24px}
 body.compact-play.playing #touch>.interact{display:none!important;--pad:50px;left:calc(50% - 10px);bottom:84px;transform:translateX(-50%);background:#765b47ee!important;border:1px solid #e7c795!important;border-radius:16px!important;font:600 10px Outfit,sans-serif!important;gap:0}
 body.compact-play.playing:has(#prompt.show[data-touch-interact]) #touch>.interact{display:grid!important}
 body.compact-play.playing #touch>.interact svg{width:22px;height:22px;align-self:end}
 body.compact-play.playing #touch>.interact span{align-self:start;font-size:10px;line-height:13px}
 body.compact-play.playing.touch-powers-open #touch .act-row.powers{position:absolute;right:0;bottom:154px;display:grid!important;grid-template-columns:repeat(3,48px);gap:10px;padding:12px;background:#102239f5;border:1px solid #bfae8b66;border-radius:20px;box-shadow:0 10px 35px #06112166;pointer-events:auto}
 body.compact-play.playing.touch-powers-open #touch .act-row.powers .touch-btn{--pad:48px;width:48px!important;height:48px!important;min-width:48px!important;min-height:48px!important;border-radius:14px!important;font-size:13px}
 body.compact-play.playing #prompt{bottom:calc(176px + env(safe-area-inset-bottom))!important;left:50%;max-width:calc(100vw - 32px)!important;width:max-content;font-size:10px!important;padding:7px 11px!important;line-height:1.4;border-radius:10px;pointer-events:none}
 body.compact-play.playing #combo-chip{bottom:190px!important}
 body.compact-play.playing #notification-container{top:88px!important;left:12px!important;max-width:calc(100vw - 24px)!important;width:280px!important}
 body.compact-play.playing #notification-container .game-notification{padding:8px 10px!important}
 body.compact-play.playing #notification-container h2{font-size:11px!important;line-height:1.3}
 body.compact-play.playing #notification-container p{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.4}
 body.compact-play.playing #hud{display:grid!important;grid-template-columns:minmax(0,1fr) 76px;left:10px;right:56px;top:max(10px,env(safe-area-inset-top));gap:10px!important}
 body.compact-play.playing #hud .hud-block.player{width:auto!important;max-width:180px!important;min-width:0;padding:7px 8px}
 body.compact-play.playing #hud .hud-name{font-size:11px!important;white-space:normal;line-height:1.15;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
 body.compact-play.playing #hud .hud-block.world{width:76px!important;max-width:76px!important;min-width:0;align-self:start;padding:8px 0 0!important;margin:0!important}
 body.compact-play.playing #hud #hud-world,body.compact-play.playing #hud .journey{display:none!important}
}
@media (pointer:coarse) and (max-height:450px){
 body.compact-play.playing #touch{--pad:48px;height:118px;min-height:118px;bottom:max(8px,env(safe-area-inset-bottom))}
 body.compact-play.playing #touch .col.move{height:104px;width:104px}
 body.compact-play.playing #touch .act-row.main .jump{--pad:58px}
 body.compact-play.playing #touch .act-row.main [data-k=shift]{--pad:46px;bottom:68px}
 body.compact-play.playing #touch #touch-power-toggle{bottom:66px}
 body.compact-play.playing #touch>.interact{bottom:62px;left:50%}
 body.compact-play.playing #prompt{bottom:136px!important}
 body.compact-play.playing.touch-powers-open #touch .act-row.powers{bottom:132px;grid-template-columns:repeat(6,44px);gap:7px;padding:9px}
 body.compact-play.playing.touch-powers-open #touch .act-row.powers .touch-btn{width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important}
 body.compact-play.playing #notification-container{top:76px!important;max-width:260px!important}
}

@media(pointer:coarse),(max-width:640px){body.compact-play.playing.touch-powers-open #prompt{bottom:330px!important}}
@media(pointer:coarse) and (max-height:450px){body.compact-play.playing.touch-powers-open #prompt{bottom:218px!important}}

@media(pointer:coarse),(max-width:640px){body.compact-play.playing:has(#prompt.show[data-touch-interact]) #notification-container{visibility:hidden}}

@media(pointer:coarse),(max-width:640px){
 body.compact-play.playing #touch .powers .touch-btn{position:relative;grid-template-rows:24px 12px;gap:1px;padding:4px 2px!important}
 #touch .touch-skill-icon,#touch .touch-skill-name,#touch .touch-skill-status{pointer-events:none}
 #touch .touch-skill-icon svg{display:block;width:22px!important;height:22px!important}
 #touch .touch-skill-name{display:block;max-width:43px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:600 7.5px/12px Outfit,sans-serif;color:#e9dec5}
 #touch .touch-skill-status{position:absolute;right:2px;top:1px;padding:1px 2px;border-radius:3px;background:#102238d9;font:600 7px Outfit,sans-serif}
 #touch .touch-skill-status:empty{display:none}
}

/* Quimera owns its objective/attack layer; keep generic fallback cards off it. */
body.quimera-fight .game-notification.objective,
body.quimera-fight .game-notification.boss,
body.quimera-fight .game-notification.tutorial:not([data-message-key="tutorial:finale"]){display:none!important}
