/* Apresentação mobile isolada: as regras e os dados das cartas são compartilhados. */
.battle-log-toggle,.battle-log-close{display:none}
@media(max-width:800px){
 body.battle-mobile .shell{position:relative;padding:calc(4px + env(safe-area-inset-top,0px)) calc(6px + env(safe-area-inset-right,0px)) calc(4px + env(safe-area-inset-bottom,0px)) calc(6px + env(safe-area-inset-left,0px));max-width:none}
 body.battle-mobile .site-header{display:block;height:0;padding:0;border:0;min-height:0}
 body.battle-mobile .site-header :is(.brand,.counter,.record){display:none}
 body.battle-mobile .header-right{display:block}
 body.battle-mobile #home-btn{position:absolute;top:0;left:0;min-height:44px;min-width:64px;padding:8px;font-size:12px}
 body.battle-mobile .shell>footer{display:none}
 body.battle-mobile #battle-screen{display:grid;gap:4px;min-height:0}
 body.battle-mobile .battle-header{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:6px;min-height:44px;margin:0;padding-left:70px}
 body.battle-mobile .battle-header .eyebrow{display:none}
 body.battle-mobile #round-label{font-size:14px;line-height:16px;margin:0}
 body.battle-mobile #turn-hint{font-size:11px;line-height:14px;margin:0;color:#cbd7ed;overflow-wrap:anywhere}
 body.battle-mobile .battle-summary{max-width:112px;padding:4px 6px;font-size:10px;line-height:13px;border-radius:6px}
 body.battle-mobile .battle-area{display:flex;flex-direction:column;align-items:center;width:100%;max-width:none;margin:0;gap:4px}
 body.battle-mobile .battle-area .versus{display:none}
 body.battle-mobile .battle-area .fighter{flex:none;max-width:min(350px,100%);margin:0;zoom:var(--battle-card-scale,1)}
 body.battle-mobile .battle-area .fighter-player{order:2}
 body.battle-mobile .battle-area .fighter-enemy{order:0}
 body.battle-mobile .battle-area .fighter-player{width:var(--battle-player-width,200px)}
 body.battle-mobile .battle-area .fighter-enemy{width:var(--battle-enemy-width,170px)}
 body.battle-mobile .fighter-label{position:absolute;right:8px;top:32px;z-index:1;width:max-content;max-width:calc(100% - 16px);overflow-wrap:anywhere;font:800 9px/11px Arial,sans-serif;letter-spacing:0;margin:0;padding:2px 4px;border-radius:3px;background:#132033e6;color:#f6f5fb}
 body.battle-mobile .battle-area .tcg-card.tcg-card{padding:4px;border-width:3px;border-radius:9px;gap:2px;grid-template-rows:minmax(22px,max-content) minmax(28px,1fr) 0 0 8px minmax(92px,max-content) 24px 0}
 body.battle-mobile .battle-area .tcg-card .card-head{grid-row:1}
 body.battle-mobile .battle-area .tcg-card .portrait{grid-row:2;border-width:1px;outline-width:1px}
 body.battle-mobile .battle-area .tcg-card :is(.dex-number,.card-print-footer){display:none}
 body.battle-mobile .battle-area .tcg-card .hp-track{grid-row:4 / 6}
 body.battle-mobile .battle-area .tcg-card .moves{grid-row:6;gap:4px;grid-template-rows:repeat(2,minmax(44px,max-content))}
 body.battle-mobile .battle-area .tcg-card .stats{grid-row:7;padding:0;gap:1px}
 body.battle-mobile .battle-area .tcg-card .card-name{font-size:12px;line-height:16px;letter-spacing:-.3px}
 body.battle-mobile .battle-area .tcg-card .type-tag{font-size:9px;line-height:11px;padding:2px 3px}
 body.battle-mobile .battle-area .tcg-card .type-tags .type-tag{font-size:9px;line-height:9px;padding:0 3px}
 body.battle-mobile .battle-area .tcg-card .shiny-label{position:absolute;top:31px;left:8px;z-index:1;font-size:8px;line-height:10px;padding:0 2px;margin:0}
 body.battle-mobile .battle-area .tcg-card .card-hp{font-size:11px;line-height:14px;margin:0}
 body.battle-mobile .battle-area .tcg-card .hp-current{font-size:14px}
 body.battle-mobile .battle-area .tcg-card :is(.hp-total,.card-hp strong>small,.hp-percent){font-size:10px}
 body.battle-mobile .battle-area .tcg-card .move{height:auto;min-height:44px;padding:2px;gap:1px}
 body.battle-mobile .battle-area .tcg-card .move>*{flex-shrink:0}
 body.battle-mobile .battle-area .tcg-card .move-name{font-size:12px;line-height:14px}
 body.battle-mobile .battle-area .tcg-card .move-details{gap:1px;flex-wrap:wrap}
 body.battle-mobile .battle-area .tcg-card .move-details :is(small,b){font-size:12px;line-height:14px}
 body.battle-mobile .battle-area .tcg-card .move-pp{font-size:12px;line-height:14px}
 body.battle-mobile .battle-area .tcg-card .stats>div{gap:0}
 body.battle-mobile .battle-area .tcg-card .stats small{font:700 9px/10px Arial,sans-serif;letter-spacing:-.25px}
 body.battle-mobile .battle-area .tcg-card .stats strong{font-size:10px;line-height:11px}
 body.battle-mobile .fighter-enemy .tcg-card.tcg-card{grid-template-rows:minmax(20px,max-content) minmax(24px,1fr) 0 0 8px minmax(92px,max-content) 24px 0}
 body.battle-mobile .fighter-enemy .tcg-card .card-name{font-size:11px;line-height:15px}
 body.battle-mobile .fighter-enemy .tcg-card .move-name{font-size:11px;line-height:13px}
 body.battle-mobile .fighter-enemy .tcg-card .move-details :is(small,b){font-size:11px;line-height:13px}
 body.battle-mobile .fighter-enemy .tcg-card .move-pp{font-size:11px;line-height:13px}
 body.battle-mobile .combat-status{margin:0;font-size:11px;line-height:14px;gap:3px}
 body.battle-mobile .combat-badge{padding:3px 5px}
 body.battle-mobile .battle-bottom{display:flex;flex-direction:column;gap:4px;width:100%;max-width:none;margin:0}
 body.battle-mobile .action-wrap{order:0;display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:4px;padding:0;border:0;background:none;border-radius:0}
 body.battle-mobile .action-wrap>h3,body.battle-mobile .action-wrap>div.tiny{display:none}
 body.battle-mobile #switch-button{min-height:44px;margin:0;padding:6px;font-size:12px}
 body.battle-mobile .action-wrap>label{display:flex;align-items:center;gap:3px;min-height:44px;padding:3px;font-size:10px;max-width:95px}
 body.battle-mobile #fast-animation{flex:none;width:18px;height:18px;margin:0}
 body.battle-mobile .battle-log-toggle,body.battle-mobile .battle-log-close{display:block;min-height:44px;min-width:44px;padding:6px;margin:0;font-size:11px}
 body.battle-mobile .feed-wrap{display:none;position:fixed;z-index:30;inset:auto max(10px,env(safe-area-inset-right,0px)) calc(10px + env(safe-area-inset-bottom,0px)) max(10px,env(safe-area-inset-left,0px));max-height:calc(75dvh - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));overflow:auto;overscroll-behavior:contain;order:1;padding:10px;box-shadow:0 -8px 28px #0009}
 body.battle-mobile.battle-log-open .feed-wrap{display:block;background:#10263d}
 body.battle-mobile .feed-wrap h3{margin:0 0 6px;font-size:14px}
 body.battle-mobile .feed{height:auto;max-height:none;min-height:80px;overflow:visible}
 body.battle-mobile .battle-log-close{position:sticky;bottom:-10px;min-width:100%;margin-top:6px;background:#20344c}
 body.battle-mobile .overlay .dialog{max-height:calc(100vh - 30px);max-height:calc(100dvh - 30px);overflow:auto}
}
/* Nas cartas pequenas, o rodapé do golpe quebra sem reduzir a fonte. */
@container(max-width:220px){
 body.battle-mobile .battle-area .tcg-card .move{grid-template-rows:auto auto auto auto}
 body.battle-mobile .battle-area .tcg-card .move-details b{grid-column:1 / -1}
 body.battle-mobile .battle-area .tcg-card .move-pp{grid-column:1 / -1;grid-row:4}
}
/* Na paisagem baixa, os controles usam as laterais para sobrar altura às cartas. */
@media(min-width:500px) and (max-width:800px) and (max-height:500px){
 body.battle-mobile #battle-screen{grid-template-columns:minmax(110px,1fr) minmax(0,2fr) minmax(110px,1fr);grid-template-rows:auto}
 body.battle-mobile .battle-area{grid-column:2;grid-row:1}
 body.battle-mobile .battle-header{grid-column:1;grid-row:1;display:flex;flex-direction:column;align-items:stretch;align-self:start;padding:48px 0 0;min-height:0}
 body.battle-mobile .battle-summary{max-width:none}
 body.battle-mobile .combat-status{grid-column:1 / -1;grid-row:2;align-self:start;overflow-wrap:anywhere}
 body.battle-mobile .battle-bottom{grid-column:3;grid-row:1;align-self:start}
 body.battle-mobile .action-wrap{display:flex;flex-direction:column}
 body.battle-mobile .action-wrap>label{max-width:none}
}
