/* Work-ID 20260925-hover-solid-4f2a | feature:hover-geometry-bootstrap
 * LAST UI stylesheet: interactive state must repaint, never reflow.
 * This does not target the world canvas, sprites, particles or progress meters. */

/* All native buttons and semantic button/tab roles, including transient dialogs
 * outside the main game roots, opt into the same size-stable interaction rule. */
button:not(.raid-icon),[role="button"]:not(.raid-icon),[role="tab"]{
 border-image-outset:0!important;
 box-sizing:border-box!important;transform:none!important;
 translate:none!important;scale:1!important;
 transition-property:background-color,color,border-color,border-image-source,
   box-shadow,filter,opacity!important;
}

/* Keep one physical hit box through idle, hover, focus, selection and press.
 * Transitions may animate paint-only properties; they must never animate
 * padding, border geometry, margin, gap, width, height or transforms. */
:is(#login,#game,#modal[data-view],#battle-dialog,#audio-dialog,#pad-menu,#osk)
:is(button,[role="button"],[role="tab"],[role="menuitem"],a.hud-nav-item,
    .party-card,.main-menu-entry,.tc-title,.pc-cell,.pc-party-slot,.pc-box,
    .relearn-party-card,.relearn-move,.friends-row,.ferry-row,.raid-gm-choice,
    .forecast-row,.skin-card,.bag-list-item,.bag-pocket,.bag-action-option):not(.raid-icon){
 border-image-outset:0!important;
 box-sizing:border-box!important;
 transform:none!important;translate:none!important;scale:1!important;
 transition-property:background-color,color,border-color,border-image-source,
   box-shadow,filter,opacity!important;
}
:is(#login,#game,#modal[data-view],#battle-dialog,#audio-dialog,#pad-menu,#osk)
:is(button,[role="button"],[role="tab"],[role="menuitem"],a.hud-nav-item,
    .party-card,.main-menu-entry,.tc-title,.pc-cell,.pc-party-slot,.pc-box,
    .relearn-party-card,.relearn-move,.friends-row,.ferry-row,.raid-gm-choice,
    .forecast-row,.skin-card,.bag-list-item,.bag-pocket,.bag-action-option):not(.raid-icon)
:is(:hover:not(:disabled),:focus-visible,:active:not(:disabled),.active,.selected,
    .pad-focus,[aria-selected="true"],[aria-pressed="true"],[aria-current="true"]){
 transform:none!important;translate:none!important;scale:1!important;
}

/* The HUD nav is a fixed-height strip. Never borrow room from adjacent
 * buttons when a focused/hovered label or the active physical PNG is painted. */
#game .premium-topbar .hud-global-nav>.hud-nav-item{
 box-sizing:border-box!important;margin:0!important;padding:6px 7px!important;
 border-width:0!important;transform:none!important;scale:1!important;
}

/* The original Summary footer has different authored desktop/mobile padding.
 * Keep each authored value, rather than applying a universal zero-padding fix. */
@media (min-width:761px){
 body:not(.mobile-web) #modal[data-view="pokemon"] .info-evo button{
  box-sizing:border-box!important;padding:2px 6px!important;border-width:4px!important;
 }
 body:not(.mobile-web) #modal[data-view="pokemon"] .info-foot-actions button{
  box-sizing:border-box!important;padding:3px 5px!important;border-width:4px!important;
 }
}
body.mobile-web #modal[data-view="pokemon"] :is(.info-evo button,.info-foot-actions button){
 box-sizing:border-box!important;padding:2px 4px!important;border-width:4px!important;
}
/* A selected tab icon previously translated up one pixel; the complete
 * interactive control, including its PNG, now stays at its authored center. */
#modal[data-view="pokemon"] .info-tab>img.info-tab-art,
#modal[data-view="pokemon"] .info-tab:is(.selected,[aria-selected="true"])>img.info-tab-art{
 transform:none!important;translate:none!important;scale:1!important;
}

/* 2026-09-25 footer hover regression: the evolution buttons were intrinsic-
 * width flex items while several older PNG layers supplied a different
 * border shorthand on hover. Reserve the entire nine-slice and a real
 * flex-basis in idle. Hover/focus change only the image SOURCE, never the
 * border box, font metrics, or a neighbour's allotted space. */
#modal[data-view="pokemon"] .info-foot :is(.info-evo,.info-foot-actions) button{
 box-sizing:border-box!important;
 border:4px solid transparent!important;
 border-image:var(--rpg-control-idle) 12 fill / 4px / 0 stretch!important;
 border-image-outset:0!important;
 margin:0!important;
 transform:none!important;translate:none!important;scale:1!important;
 transition:none!important;
}
#modal[data-view="pokemon"] .info-foot :is(.info-evo,.info-foot-actions) button:is(
 :hover:not(:disabled),:focus,:focus-visible,:active:not(:disabled),
 .selected,.active,.pad-focus,[aria-selected="true"],[aria-pressed="true"]){
 border:4px solid transparent!important;
 border-image:var(--rpg-control-on) 12 fill / 4px / 0 stretch!important;
 border-image-outset:0!important;
 transform:none!important;translate:none!important;scale:1!important;
}
#modal[data-view="pokemon"] .info-foot :is(.info-evo,.info-foot-actions) button:focus-visible{
 outline:1px solid #efd39b!important;outline-offset:-5px!important;
}
/* "Not now" and "Evolve into …" never use auto-content flex sizing:
 * even when the physical active frame is brighter, both hitboxes remain
 * exactly where they were before the mouse entered. */
@media (min-width:761px){
 body:not(.mobile-web) #modal[data-view="pokemon"] .info-evo button:first-of-type:not(:last-of-type){
  flex:0 0 100px!important;width:100px!important;min-width:100px!important;max-width:100px!important;
 }
 body:not(.mobile-web) #modal[data-view="pokemon"] .info-evo button:last-of-type{
  flex:0 0 192px!important;width:192px!important;min-width:192px!important;max-width:192px!important;
 }
 body:not(.mobile-web) #modal[data-view="pokemon"] .info-evo button{
  min-height:29px!important;height:auto!important;max-height:none!important;
  padding:2px 6px!important;
  font:700 12px/17px Arial,sans-serif!important;
  white-space:normal!important;overflow-wrap:anywhere!important;
 }
 body:not(.mobile-web) #modal[data-view="pokemon"] .info-foot-actions button{
  min-width:0!important;width:100%!important;max-width:100%!important;
  padding:3px 5px!important;font:700 12px/15px Arial,sans-serif!important;
 }
}
/* Small landscape touch panels keep their existing compact responsive sizing. */
body.mobile-web #modal[data-view="pokemon"] .info-foot :is(.info-evo,.info-foot-actions) button{
 border:4px solid transparent!important;
 border-image-width:4px!important;border-image-outset:0!important;
 padding:2px 4px!important;
}

/* Comprehensive UI/UV audit, 2026-09-25:
 * uv-shutdown-pass.css authored 5px IDLE slots but repainted some selected
 * states with 6px images; badge earned reached 7px, while PC boxes/skins
 * went from 7px to 6px. They look larger even when the CSS rectangle is
 * unchanged. Pin BOTH the layout edge and the drawn UV edge to the idle
 * geometry. Keep the authored image SOURCE, slice and foreground colors.
 *
 * Duplicate #modal increases specificity over old nested :is(.selected)
 * shorthands, without overwriting which active PNG they choose.
 * Apply the same pin in resting, hovered, focused and selected states. */
body:not(.mobile-web) #modal#modal[data-view="bag"] :is(.bag-pocket,.bag-list-item,.bag-action-option),
body:not(.mobile-web) #modal#modal[data-view="dex"] :is(.dex-card,.dex-row),
body:not(.mobile-web) #modal#modal[data-view="journal"] .badge-card,
body:not(.mobile-web) #modal#modal[data-view="friends"] .friends-row,
body:not(.mobile-web) #modal#modal[data-view="card"] .tc-chip,
body:not(.mobile-web) #modal#modal[data-view="forecast"] .forecast-row,
body:not(.mobile-web) #modal#modal[data-view="storage"] :is(.pc-cell,.pc-party-slot),
body:not(.mobile-web) #modal#modal[data-view="pokemon"] .info-move-card{
 box-sizing:border-box!important;
 border-width:5px!important;border-image-width:5px!important;
 border-image-outset:0!important;
}
/* These frames already occupy seven pixels at rest; a 6px active slice
 * was making the painted selected frame visibly contract. */
body:not(.mobile-web) #modal#modal[data-view="skins"] .skin-card,
body:not(.mobile-web) #modal#modal[data-view="storage"] .pc-box{
 box-sizing:border-box!important;
 border-width:7px!important;border-image-width:7px!important;
 border-image-outset:0!important;
}
/* Reserve the six-pixel authored command frames on the other RPG panels. */
body:not(.mobile-web) #modal#modal[data-view="bag"] :is(.bag-close,.bag-detail-actions button,.bag-buy-action,.bag-search-clear),
body:not(.mobile-web) #modal#modal[data-view="dex"] :is(.dex-controls button,.dex-dup,.dex-shiny),
body:not(.mobile-web) #modal#modal[data-view="ai"] .ai-tabs>button,
body:not(.mobile-web) #modal#modal[data-view="friends"] :is(.friends-add button,.friends-actions button),
body:not(.mobile-web) #modal#modal[data-view="card"] :is(.tc-remove,.tcc-tab),
body:not(.mobile-web) #modal#modal[data-view="forecast"] .forecast-tabs button,
body:not(.mobile-web) #modal#modal[data-view="storage"] :is(.pc-button,.pc-tool,.pc-arrow,.pc-confirm,.pc-rename button),
body:not(.mobile-web) #modal#modal[data-view="menu"] .main-menu-entry{
 box-sizing:border-box!important;
 border-width:6px!important;border-image-width:6px!important;
 border-image-outset:0!important;
}
/* No second border may appear when the title's rare-state PNG is selected.
 * The separately authored dressing-room controls retain their 5px art on
 * desktop AND compact mobile; responsive size rules remain untouched. */
body:not(.mobile-web) #modal#modal[data-view="titles"] .tc-title{
 box-sizing:border-box!important;
 border-width:8px!important;border-image-width:8px!important;
 border-image-outset:0!important;
}
#modal#modal[data-view="titles"] :is(.tc-filter,.tc-preview-trigger,.tc-preview-direction,.tc-preview-motion,.tc-preview-close){
 box-sizing:border-box!important;
 border-width:5px!important;border-image-width:5px!important;
 border-image-outset:0!important;
}
/* Existing physical battle command and Summary control geometries. */
body:not(.mobile-web) #battle-dialog#battle-dialog.battle-window-solid :is(.battle-cmd,.battle-menu .move-button){
 box-sizing:border-box!important;
 border-width:8px!important;border-image-width:8px!important;
 border-image-outset:0!important;
}
body:not(.mobile-web) #modal#modal[data-view="pokemon"] :is(.info-tab,.info-step,.info-step-pick,.info-plus,.info-minus,.info-reset,.info-rename,.info-confirm-actions button,.info-evo button,.info-foot-actions button){
 box-sizing:border-box!important;
 border-width:4px!important;border-image-width:4px!important;
 border-image-outset:0!important;
}
/* Party rows and compact sidebar buttons have deliberately DIFFERENT idle
 * edge sizes. Protect their own 5 / 4 / 3px values, not a global 4px rule. */
body:not(.mobile-web) #game#game .party-panel #party-list>.party-card,
body:not(.mobile-web) #game#game .premium-right-rail .hud-minimap-tools button,
body:not(.mobile-web) #game#game .premium-right-rail #hud-missions-open{
 box-sizing:border-box!important;
 border-width:5px!important;border-image-width:5px!important;
 border-image-outset:0!important;
}
body:not(.mobile-web) #game#game :is(.party-panel>.hud-wide-command,.account-trigger,.account-menu button),
body:not(.mobile-web) #game#game .premium-right-rail .premium-chat-panel :is(.chat-toggle,.chat-tool,.hud-chat-send){
 box-sizing:border-box!important;
 border-width:4px!important;border-image-width:4px!important;
 border-image-outset:0!important;
}
body:not(.mobile-web) #game#game .premium-right-rail .premium-chat-panel .chat-scroll button{
 box-sizing:border-box!important;
 border-width:3px!important;border-image-width:3px!important;
 border-image-outset:0!important;
}
/* Global paint is always inside the clickable footprint, including any
 * future button whose idle PNG has a nonzero border-image-outset. */
/* Mobile catalog selection used to replace a zero/one-pixel border with a
 * two-pixel border. The painted marker is inset instead: no row reflow. */
body.mobile-web #modal[data-view="bag"] .bag-pocket:is(.selected,[aria-selected="true"]){
 border:0!important;border-image:none!important;
 box-shadow:inset 0 -2px #d09e70!important;
}
body.mobile-web #modal[data-view="bag"] .bag-list-item:is(.selected,[aria-selected="true"]){
 border:0!important;border-bottom:1px solid #5c414633!important;border-image:none!important;
 box-shadow:inset 2px 0 #d09e70!important;
}
body.mobile-web #modal[data-view="pokemon"] .info-move-card:is(.selected,[aria-pressed="true"]){
 border:0!important;border-bottom:1px solid #65484755!important;border-image:none!important;
 box-shadow:inset 2px 0 #d4a070!important;
}
body.mobile-web #modal[data-view="dex"] .dex-card:is(.caught,.selected){
 border:0!important;border-bottom:1px solid #684c4a55!important;border-image:none!important;
 box-shadow:inset 2px 0 #d5a06b!important;
}
