/* v0.21.0: alignment and spacing polish, applied after the existing responsive styles. */
/* Mode dialog: single-line cancel label and coherent header/actions */
#modeSelectModal .mode-select-modal{min-width:0}
#modeSelectModal .mode-head{padding-right:40px}
#modeSelectModal .mode-head h2{margin-top:0}
#modeSelectModal .mode-actions{display:flex;align-items:stretch;justify-content:flex-end;flex-wrap:nowrap;gap:10px}
#modeSelectModal .mode-actions .button{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;text-align:center;flex:0 0 auto;min-width:105px;max-width:100%;white-space:nowrap!important;word-break:keep-all;overflow-wrap:normal;line-height:1.15!important;letter-spacing:normal!important}
#modeSelectModal #modeSelectCancel{min-width:94px;padding-inline:16px!important;white-space:nowrap!important}
#modeSelectModal #modeSelectStart{min-width:155px;gap:7px}
#modeSelectModal .mode-close{display:grid;place-items:center;line-height:1;padding:0}
#modeSelectModal .mode-card-copy strong{display:block;line-height:1.4;word-break:keep-all}
#modeSelectModal .mode-detail{align-items:center}
/* Utility heading center relative to the ENTIRE left rail, not to an inline block. */
.battle-utility-panel>.utility-group-heading{display:flex!important;flex:none!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;text-align:center!important;width:100%!important;min-width:0!important;margin:0 0 2px!important;padding:0 2px!important;box-sizing:border-box!important;line-height:1.3!important}
.battle-utility-panel>.utility-group-heading>strong{display:block;width:100%;font-size:11px;color:#e0ffe9;text-align:center}
.battle-utility-panel>.utility-group-heading>small{display:block;text-align:center;margin-top:2px!important}
/* Three equalized button zones: dummy left key-sized space | truly centered text | key right. */
.battle-utility-panel>.button{box-sizing:border-box!important;display:grid!important;grid-template-columns:19px minmax(0,1fr) 19px!important;align-items:center!important;justify-items:center!important;column-gap:0!important;padding:4px 3px!important;min-width:0!important;text-align:center!important;white-space:normal!important;line-height:1.25!important}
.battle-utility-panel>.button::before{content:"";display:block;grid-column:1;width:19px;height:1px}
.battle-utility-panel>.button>.utility-button-label{grid-column:2;display:flex!important;justify-content:center!important;align-items:center!important;flex-wrap:wrap!important;gap:2px!important;min-width:0!important;max-width:100%!important;margin:0!important;text-align:center!important;white-space:normal!important;word-break:keep-all!important;overflow-wrap:anywhere!important;line-height:1.25!important}
.battle-utility-panel>.button>.utility-button-label span{white-space:normal!important;text-align:center!important}
.battle-utility-panel>.button>.utility-hotkey{grid-column:3;position:static!important;top:auto!important;right:auto!important;transform:none!important;margin:0!important;justify-self:center!important;align-self:center!important;min-width:17px!important;box-sizing:border-box!important}
.battle-utility-panel>.auto-wave-count{box-sizing:border-box!important;justify-content:center!important;min-width:0!important;text-align:center!important;flex-wrap:nowrap!important}
.battle-utility-panel>.auto-wave-count span{flex:0 0 auto;white-space:nowrap!important}
.battle-utility-panel>.auto-wave-count input{text-align:center!important;min-width:0!important}
/* Pokedex search empty state must span all dynamic recipe columns and fill horizontal center. */
#recipeGrid>.recipe-empty{grid-column:1/-1!important;display:flex!important;align-items:center!important;justify-content:center!important;justify-self:stretch!important;width:100%!important;min-width:0!important;min-height:118px!important;box-sizing:border-box!important;padding:22px 12px!important;margin:0!important;text-align:center!important;line-height:1.5!important;white-space:normal!important;word-break:keep-all!important;color:#cde3dc!important}
/* Other central alignment fixes on controls, dialogs and empty messages. */
.sidebar-nav>.panel-tab{display:flex!important;justify-content:center!important;align-items:center!important;text-align:center!important;min-width:0!important;gap:5px!important}
.sidebar-nav>.panel-tab .tab-keys{flex:none!important;margin:0!important}
.battle-bottom-controls .button-wave{display:flex!important;justify-content:center!important;align-items:center!important;gap:7px!important;text-align:center!important;min-width:0!important}
#modeSelectModal .mode-actions button,.reset-confirm-actions button,.return-confirm-actions button,.recommend-sell-bottom button,.recipe-modal-bottom button{display:inline-flex;align-items:center;justify-content:center;text-align:center;box-sizing:border-box;word-break:keep-all}
#recommendedSellList>.sell-empty{width:100%;text-align:center;box-sizing:border-box;padding:18px 12px;line-height:1.5}
.recipe-filters>.recipe-filter,.sale-filter-list>button{display:inline-flex;align-items:center;justify-content:center;text-align:center;white-space:nowrap;line-height:1.3}
.exp-preset button,.exp-sections button{display:inline-flex;justify-content:center;align-items:center;text-align:center;word-break:keep-all}
@media(max-width:1000px){.battle-utility-panel>.utility-group-heading{display:flex!important}}
@media(max-width:700px){#modeSelectModal .mode-actions{gap:7px}#modeSelectModal .mode-actions .button{min-height:38px;min-width:0!important;padding:8px 10px!important;font-size:11px!important;white-space:nowrap!important}#modeSelectModal #modeSelectCancel{flex:0 0 82px!important}#modeSelectModal #modeSelectStart{flex:1 1 auto!important}#modeSelectModal .mode-head{padding-right:34px}.battle-utility-panel>.button{grid-template-columns:13px minmax(0,1fr) 13px!important;padding:2px 1px!important;font-size:9px!important}.battle-utility-panel>.button::before{width:13px!important}.battle-utility-panel>.button>.utility-hotkey{min-width:12px!important;height:15px!important;font-size:8px!important;padding:0 1px!important}}
@media(max-height:560px) and (orientation:landscape){.battle-utility-panel>.utility-group-heading{margin-bottom:0!important}.battle-utility-panel>.utility-group-heading>strong{font-size:9px}.battle-utility-panel>.utility-group-heading>small{font-size:7px}.battle-utility-panel>.button>.utility-button-label{font-size:inherit!important;line-height:1.06!important}#modeSelectModal .mode-actions .button{min-height:31px!important;padding-block:5px!important}}

/* v0.21.1: mode selection has ONE action only; prevent overflow at every viewport. */
#modeSelectModal .mode-actions{display:flex!important;width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important;justify-content:stretch!important;gap:0!important}
#modeSelectModal .mode-actions #modeSelectStart{display:inline-flex!important;flex:1 1 100%!important;width:100%!important;min-width:0!important;max-width:100%!important;box-sizing:border-box!important;align-items:center!important;justify-content:center!important;white-space:nowrap!important;margin:0!important}
@media(max-width:700px){#modeSelectModal .mode-actions #modeSelectStart{flex:1 1 100%!important;min-width:0!important;width:100%!important}}
