/* Readability and short-viewport safeguards shared by all visual styles. */
body.pc #battle .bstats :is(.lvchip,.ab),body.pc #battle .bstats small{font-size:11px}
body #home #spinbtn{white-space:normal;text-overflow:clip;line-height:1.25;min-height:44px;padding-inline:10px}
@media(max-width:999px){
 body .ucard .lvbar,body #battle .blvl{font-size:11px;line-height:1.2}
 body #league :is(.pdelta,.lpwin,.lplose,.lpslash){font-size:12px}
 body:not(.pc) #battle.active{justify-content:flex-start}
}
@media(max-width:399px) and (max-height:700px){
 body:not(.pc) #battle .arena{min-height:48px;height:56px}
 body:not(.pc) #battle .head .bigav{width:48px;height:48px}
 body:not(.pc) #battle .combat-side.enemy{min-height:0}
 body:not(.pc) #battle .pfoot{gap:3px;padding-block:4px}
 body #guideov.guide-tutorial .guide-card{padding:8px 10px}
 body #guideov.guide-tutorial .guide-kicker{display:none}
 body #guideov.guide-tutorial .guide-title{font-size:13px;line-height:1.2;margin:0 0 4px}
 body #guideov.guide-tutorial .guide-text{font-size:12px;line-height:1.3}
 body #guideov.guide-tutorial .guide-actions{margin-top:5px}
 body #guideov.guide-tutorial .guide-skip{font-size:12px;min-height:26px;padding:4px}
 body #guideov.guide-placement-hint .guide-title{display:none}
 body #guideov.guide-placement-hint .guide-card{display:grid;grid-template-columns:minmax(0,1fr) 76px;gap:6px}
 body #guideov.guide-placement-hint .guide-text{grid-column:1;font-size:11px;line-height:1.25}
 body #guideov.guide-placement-hint .guide-actions{grid-column:2;align-self:center;margin:0}
}
@media(min-width:600px) and (max-width:999px){
 body #profile #cgrid{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
 body #shopsheet .shopgrid{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
 body #shopsheet .shopcell{gap:6px}
 body #shopsheet .shopcell .ucard{width:min(120px,100%);align-self:center}
 body #shopsheet .shopcell .sc-n{font-size:14px;line-height:1.3;min-height:2.6em}
 body #shopsheet .shopcell .market-meta{font-size:13px;line-height:1.3;gap:3px;margin:0}
 body #shopsheet .shopcell .market-missing{font-size:12px;line-height:1.3;min-height:2.6em}
 body #shopsheet .shopcell .si-b{min-height:38px;padding:6px}
}
@media(min-width:1000px) and (max-width:1199px){
 body.pc #deck #top-fuse .fuserow{grid-template-columns:minmax(0,1fr) 18px minmax(0,1fr) 108px minmax(0,1fr) 200px;gap:8px}
 body.pc #deck #top-fuse .fusion-empty{padding:10px 6px;gap:6px}
 body.pc #deck #top-fuse .fusion-empty img{width:34%;flex:none}
 body.pc #deck #top-fuse .fusion-empty span{font-size:11px;line-height:1.35}
 body.pc #deck #top-fuse .wk-summary-copy{font-size:12px;line-height:1.3}
 body.pc #deck #top-fuse .wk-summary-copy p{margin-top:6px}
 /* Keep the actual drag instruction visible, with a fixed two-line action and price.
    The section already names fusion; omit its repeated heading in this narrow panel. */
 body.pc #deck #top-fuse .wk-summary-copy>strong{display:none}
 body.pc #deck #top-fuse .fuse-summary{padding:8px;gap:6px;grid-template-rows:minmax(0,1fr) 84px}
 body.pc #deck #top-fuse .fuse-summary .workshop-cost{height:84px;padding:6px;grid-template-rows:minmax(0,1fr) 28px}
 body.pc #deck #top-fuse .wk-action-label{font-size:14px;line-height:1.25}
 body #league .tour-board{padding:10px 10px 18px}
 body #league .row,body #league .tour-table-heading{grid-template-columns:24px 34px minmax(80px,1fr) 66px 176px 74px;gap:8px}
 body #league .row{min-height:56px;padding:6px 0}
 body #league .ava{width:34px;height:36px}
 body #league .reward{min-height:32px;font-size:12px;padding:4px}
 body #league .reward :is(.ritem,b){font-size:12px}
 body #league .reward .ric{width:22px;height:24px}
 body #league .pdelta{font-size:12px;margin-top:2px}
 body #league .atk{font-size:12px;min-height:30px;padding:4px}
}
@media(min-width:1000px) and (max-height:800px){
 body.pc #deck #top-fuse .wk-summary-copy>strong{display:none}
}
#home :is(#home-lead,.home-tournament-status)[hidden]{display:none!important}
#home .home-standing .home-rival{display:flex;align-items:baseline;gap:6px;overflow:visible}
#home .home-standing .home-rival .home-player-name{min-width:0;overflow:hidden;text-overflow:ellipsis}
#home .home-standing .home-rival small{flex:none;margin-left:0}
body.pc #home .home-tournament-header{padding-left:24px;padding-top:22px}
body #home #giftbox{gap:12px;min-height:58px;padding:8px 18px}
body #home #giftbox img{display:block;width:44px;height:44px;flex:none}
body.pc .ucard .shell-ability,body.pc .strip .ucard .shell-ability{font-size:clamp(11px,calc(var(--card-width,200px)*.055),14px);line-height:1.15}
body.pc .ucard .shell-ability .mini-ic{width:clamp(14px,calc(var(--card-width,200px)*.087),28px);height:clamp(14px,calc(var(--card-width,200px)*.087),28px)}
body.pc .ucard .lvbar,body.pc .strip .ucard .lvbar{padding-left:max(6px,calc(var(--frame-w)*.45));padding-right:max(6px,calc(var(--frame-w)*.45));font-size:clamp(11px,calc(var(--card-width,200px)*.0652),21px)}
body.pc .ucard .lvbar .card-levels{flex:0 0 auto;width:auto}
/* The drop is scaled to 80%; keep its rendered numeral at least 11px. */
body.pc #deck .ucard .shell-mana{font-size:max(13.75px,calc(var(--card-width,322px)*.1056))}
body.pc #deck .strip .ucard .shell-mana{font-size:max(13.75px,calc(var(--card-width,180px)*.0889))}
@media(min-width:1000px) and (max-height:700px){
 body #shopsheet>.card{padding:20px 24px}
 #shopsheet #shoprenew{margin:6px 0 10px}
 #shopsheet .market-hint{margin:0 0 10px;line-height:1.35}
 #shopsheet .shopgrid{grid-template-columns:repeat(2,minmax(0,1fr))}
 #shopsheet .shopcell{display:grid;grid-template-columns:84px minmax(0,1fr);gap:5px 12px;align-items:center}
 #shopsheet .shopcell .ucard{grid-column:1;grid-row:1/5;width:84px;align-self:start}
 #shopsheet .shopcell>:not(.ucard){grid-column:2}
 #shopsheet .shopcell .sc-n{min-height:0;line-height:1.3}
 #shopsheet .shopcell .market-meta{font-size:13px;gap:2px;margin:0}
 #shopsheet .shopcell .market-missing{min-height:18px;font-size:12px}
 #shopsheet .shopcell .si-b{min-height:34px;padding:5px 10px}
}
@media(min-width:1000px) and (max-width:1199px){
 /* The table is the primary content; summary panels follow it on small laptops. */
 #league .tour-sidebar{order:1}
 #league .tour-board{order:0;flex:none;min-height:320px}
}
@media(max-width:999px){
 body #battle .result-columns{grid-template-columns:minmax(0,1fr);gap:18px;min-width:0}
 body #battle .result-rewards{padding:0 0 12px;border-right:0;border-bottom:1px solid #96acba26}
 body #battle .rewline{flex-direction:row;flex-wrap:wrap}
 body #battle .res-xp{min-height:0;max-height:100%;overflow:auto}
 body .ucard .st2,body #battle .bstats{font-size:10px;gap:3px 1px;padding:3px 1px}
 body :is(.st2,.bstats) span{gap:1px}
 body :is(.st2,.bstats) .mini-ic{width:7px;height:7px}
 body #battle .brow{gap:4px}
 body:not(.pc) #deck #top-burn :is(.burn-gain-title,.burn-gain-row){font-size:11px}
 body:not(.pc) #deck :is(#top-burn,#top-fuse) :is(.burn-status,.fusion-status){font-size:11px;line-height:15px}
 body:not(.pc) #deck :is(#top-burn,#top-fuse) .ritual-shell:has(.bempty){height:100%}
 body:not(.pc) #deck :is(#top-burn,#top-fuse) .ucard.bempty{height:100%;aspect-ratio:auto}
 body:not(.pc) #deck #top-fuse .fuserow{grid-template-rows:184px 78px 136px}
 body:not(.pc) #deck :is(.burn-empty,.fusion-empty){padding:9px 7px;gap:6px}
 body:not(.pc) #deck :is(.burn-empty,.fusion-empty) img{width:32px;height:32px;flex:none}
 body:not(.pc) #deck :is(.burn-empty,.fusion-empty) strong{font-size:12px;line-height:1.3;overflow-wrap:normal;hyphens:auto}
 body:not(.pc) #deck :is(.burn-empty,.fusion-empty) span{font-size:11px;line-height:1.3;overflow-wrap:normal;hyphens:auto}
}
@media(max-width:399px){
 body:not(.pc) #deck .deckrow{gap:4px}
 body:not(.pc) #deck .deckrow .ucard{padding:3px}
 body .ucard .st2,body #battle .bstats{grid-template-columns:max-content max-content;justify-content:space-between}
 body #guideov.guide-action-hint .guide-card{display:grid;grid-template-columns:minmax(0,1fr) 84px;gap:8px;padding:8px 10px}
 #guideov.guide-action-hint :is(.guide-kicker,.guide-title){display:none}
 #guideov.guide-action-hint .guide-text{grid-column:1;grid-row:1}
 #guideov.guide-action-hint .guide-actions{grid-column:2;grid-row:1;align-self:center;margin:0}
 #guideov.guide-action-hint .guide-skip{font-size:12px;padding:5px 4px;margin:0}
 body #guideov:is(.guide-placement-hint,.guide-action-hint) .guide-actions{gap:4px}
 body #guideov:is(.guide-placement-hint,.guide-action-hint) .guide-btn{min-height:28px;padding:4px 8px}
 .language-picker{flex-wrap:wrap}
 .language-picker>span{flex:none;white-space:nowrap;overflow-wrap:normal}
 .language-select{min-width:0;width:100%;max-width:100%;flex:1 1 100%}
 .wallet-top .language-picker,#tutintro .welcome-topline .language-picker{flex-wrap:wrap}
 .wallet-top .language-select,#tutintro .welcome-topline .language-select{flex:1 1 100%}
 body:not(.pc) .shell-sidebar .nav{gap:4px;padding-left:4px;padding-right:4px}
 body:not(.pc) .shell-sidebar .nav button::after{font-size:13px;line-height:16px;overflow-wrap:normal;hyphens:auto}
 body:not(.pc) #battle .pfoot{display:flex;flex-direction:column;align-items:stretch;gap:6px}
 body:not(.pc) #battle .pfoot .head.player{flex:none;width:100%}
 body:not(.pc) #battle .pfoot .head.player .nick{overflow-wrap:normal;white-space:normal}
 body:not(.pc) #battle .pfoot>.bctrl{flex:none;width:100%;align-self:center}
 body:not(.pc) #battle .pfoot>.bctrl .bbtn{min-height:36px}
}
