/* v0.21.4: right-side fixed menu, consistent centered controls and viewport fit */
@media (min-width:1061px) and (pointer:fine){
 html,body{height:100%!important;min-height:0!important;overflow:hidden!important}
 body>.app-shell{box-sizing:border-box!important;height:100dvh!important;min-height:100dvh!important;padding-bottom:0!important;gap:3px!important}
 body>.app-shell>.main-layout{flex:1 1 0!important;height:0!important;min-height:0!important;margin-bottom:0!important;padding-bottom:0!important}
 body>.app-shell .battlefield-card{height:100%!important;margin-bottom:0!important}
 body>.app-shell .battlefield-card>.battle-play-row{min-height:0!important;flex:1 1 0!important}
 body>.app-shell .battlefield-card>.battle-play-row>.canvas-wrap{height:100%!important;min-height:0!important}
 /* Separate the persistent command area from the sidebar tabs, centered on available blank space. */
 body>.app-shell .topbar{position:relative!important}
 body>.app-shell .side-panel{position:relative!important;padding-bottom:285px!important;box-sizing:border-box!important}
 body>.app-shell .side-panel>.header-actions{display:flex!important;flex-direction:column!important;position:absolute!important;left:9px!important;right:9px!important;bottom:12px!important;top:auto!important;width:auto!important;height:auto!important;max-height:calc(100% - 56px)!important;overflow-y:auto!important;overflow-x:hidden!important;z-index:8!important;gap:7px!important;margin:0!important;padding:10px 7px!important;align-items:stretch!important;justify-content:center!important;background:linear-gradient(180deg,#183742e6,#112b35f5)!important;border:1px solid #386172!important;border-radius:12px!important;box-shadow:0 4px 16px #0004!important;flex:none!important}
 body>.app-shell .side-panel>.header-actions>button{display:flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;width:100%!important;max-width:100%!important;min-width:0!important;min-height:36px!important;height:36px!important;margin:0!important;padding:4px 7px!important;font-size:11px!important;text-align:center!important;white-space:nowrap!important;box-sizing:border-box!important;flex:0 0 36px!important}
 body>.app-shell .side-panel>.header-actions>button kbd{display:inline-flex!important;align-items:center!important;font-size:9px!important}
 body>.app-shell .side-panel>.header-actions #helpBtn{font-size:13px!important}
 body>.app-shell .side-panel>.header-actions #fieldInfoBtn,body>.app-shell .side-panel>.header-actions #soundBtn{font-size:11px!important}
 body>.app-shell .side-panel>.header-actions #fieldInfoBtn::before,body>.app-shell .side-panel>.header-actions #soundBtn::before{content:none!important}
 body>.app-shell .side-panel>.header-actions #quickRecipeBtn{display:flex!important}
 body>.app-shell .side-panel>.header-actions #fullscreenGameBtn{display:flex!important}
 body>.app-shell .side-panel>.header-actions #menuBtn{display:flex!important}
 body>.app-shell .side-panel>.header-actions .fullscreen-game-label{display:inline!important}
 body>.app-shell .side-panel>.header-actions .fullscreen-game-icon{font-size:15px!important}
 body>.app-shell .side-panel>.header-actions #helpBtn{width:100%!important}
 body>.app-shell .side-panel>.panel{max-height:calc(100% - 286px)!important;overflow-y:auto!important;min-height:0!important}
}
/* The text+shortcut form a single visually centered group rather than asymmetric padding. */
.battle-utility-panel>.button{display:flex!important;flex-direction:row!important;justify-content:center!important;align-items:center!important;gap:5px!important;padding:3px 3px!important;box-sizing:border-box!important;text-align:center!important;min-width:0!important}
.battle-utility-panel>.button::before{display:none!important;content:none!important}
.battle-utility-panel>.button>.utility-button-label{display:inline-flex!important;flex:0 1 auto!important;justify-content:center!important;align-items:center!important;width:auto!important;max-width:calc(100% - 21px)!important;min-width:0!important;margin:0!important;line-height:1.1!important;text-align:center!important;font-size:clamp(8px,.72vw,11px)!important;word-break:keep-all!important}
.battle-utility-panel>.button>.utility-hotkey{display:inline-flex!important;flex:0 0 auto!important;position:static!important;transform:none!important;inset:auto!important;min-width:15px!important;height:17px!important;line-height:1!important;font-size:9px!important;padding:0 2px!important;vertical-align:middle!important}
/* Apply the exact existing user-supplied star asset; enlarge 23px -> 46px. */
#recipeModal:not(.catalog-mode) .recipe-card .recipe-goal-star{width:46px!important;height:46px!important;min-width:46px!important;min-height:46px!important;max-width:46px!important;max-height:46px!important;top:5px!important;right:5px!important;padding:0!important;display:grid!important;place-items:center!important;border:0!important;overflow:visible!important;background:transparent!important;box-shadow:none!important;z-index:5!important}
#recipeModal:not(.catalog-mode) .recipe-card .recipe-goal-star img{display:block!important;width:46px!important;height:46px!important;max-width:none!important;max-height:none!important;object-fit:contain!important;image-rendering:pixelated!important;filter:grayscale(1) opacity(.6)!important}
#recipeModal:not(.catalog-mode) .recipe-card .recipe-goal-star.selected img{filter:drop-shadow(0 0 3px #ffdb52)!important}
#recipeModal .recipe-card .recipe-result{padding-right:50px!important;min-height:50px!important}
.favorite-limit-notice{padding:9px 14px;margin:3px auto 5px;width:100%;max-width:720px;text-align:center;background:#5d3229;color:#fff2de;border:1px solid #eab16d;border-radius:9px;font-weight:800;font-size:12px;line-height:1.4;box-sizing:border-box}
.favorite-limit-notice[hidden]{display:none!important}
/* Goal chips are centered in their dedicated right-side region, not forced against its right border. */
#canvasWrap .goal-target-list{align-items:center!important;text-align:center!important}
#canvasWrap .goal-target-list .goal-list-caption{text-align:center!important;width:100%!important}
#canvasWrap .goal-target-chip{justify-content:center!important;text-align:center!important}
/* The field and wave button must consume the available screen height. */
.battlefield-card>.battle-play-row{min-height:0!important}
.battlefield-card>.battle-play-row>.canvas-wrap{min-height:0!important;flex:1 1 auto!important}
@media(max-width:1060px){
 .topbar .header-actions{display:none!important}
 .side-panel{position:relative!important}
 .side-panel>.header-actions{display:flex!important;flex-wrap:wrap!important;gap:3px!important;align-items:center!important;justify-content:center!important;padding:4px 2px!important;border-top:1px solid #35535d!important;margin-top:4px!important}
 .side-panel>.header-actions>button{font-size:9px!important;min-height:26px!important;padding:2px 4px!important}
 .side-panel>.header-actions>button kbd{display:none!important}
 .side-panel>.header-actions #fieldInfoBtn,.side-panel>.header-actions #soundBtn{font-size:9px!important}
}
@media(max-width:950px) and (orientation:landscape){
 #recipeModal:not(.catalog-mode) .recipe-card .recipe-goal-star{width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;max-width:40px!important;max-height:40px!important}
 #recipeModal:not(.catalog-mode) .recipe-card .recipe-goal-star img{width:40px!important;height:40px!important}
 #recipeModal .recipe-card .recipe-result{padding-right:43px!important}
 .battle-utility-panel>.button{gap:2px!important;padding:1px!important}
 .battle-utility-panel>.button>.utility-button-label{font-size:8px!important}
 .battle-utility-panel>.button>.utility-hotkey{font-size:7px!important;min-width:12px!important;height:14px!important}
}
