/* feature:uv-state-unification | Pokémon Sanctuary — 2026-09-25
 * Final UI-only state skin. One independent 96px PNG/UV nine-slice PER control.
 * No nested active window frames, old 48px button crops, web gradients or
 * double-painted pseudo glyphs. Data-driven badges, maps and battle art stay.
 * Source UV: ../button/rpg-control-uv.json, bands 12px, destination 4px. */
:root{
 --rpg-control-idle:url("../button/rpg-control.png?v=cabare-uv-1");
 --rpg-control-on:url("../button/rpg-control-active.png?v=cabare-uv-1");
}
/* The screenshot's Menu button inherited old active PNG + an active icon well +
   generic browser focus outline. The entire selected surface is now ONE
   physical image; only the colored icon and real localized text sit on it. */
#game .premium-topbar .hud-global-nav>.hud-nav-item{
 border:4px solid transparent!important;
 border-image:var(--rpg-control-idle) 12 fill / 4px / 0 stretch!important;
 border-radius:0!important;
 background:#1f1720!important;background-image:none!important;
 box-shadow:none!important;clip-path:none!important;filter:none!important;
 outline:none!important;
 transform:none!important;transition:none!important;
}
#game .premium-topbar .hud-global-nav>.hud-nav-item:is(.active,:hover:not(:disabled),[aria-selected="true"],[aria-pressed="true"],:focus-visible){
 border:4px solid transparent!important;
 border-image:var(--rpg-control-on) 12 fill / 4px / 0 stretch!important;
 background:#402630!important;background-image:none!important;
 box-shadow:none!important;filter:none!important;transform:none!important;
}
#game .premium-topbar .hud-global-nav>.hud-nav-item::before,
#game .premium-topbar .hud-global-nav>.hud-nav-item::after{
 content:none!important;display:none!important;
 border:0!important;border-image:none!important;box-shadow:none!important;
}
/* The nine existing coloured GameIcon masters remain the sole visual glyph.
   The previous icon's second frame and its FA pseudo painted another border. */
#game .premium-topbar .hud-global-nav>.hud-nav-item>.hud-nav-icon,
#game .premium-topbar .hud-global-nav>.hud-nav-item:is(.active,[aria-pressed="true"])>.hud-nav-icon{
 display:grid!important;place-items:center!important;
 flex:0 0 24px!important;width:24px!important;height:24px!important;
 min-width:24px!important;min-height:24px!important;max-width:24px!important;
 max-height:24px!important;margin:0!important;padding:0!important;
 border:0!important;border-image:none!important;border-radius:0!important;
 background-color:transparent!important;
 background-image:var(--shutdown-icon-url)!important;
 background-size:23px 23px!important;background-repeat:no-repeat!important;
 background-position:center!important;box-shadow:none!important;
 outline:none!important;filter:none!important;
}
#game .premium-topbar .hud-global-nav>.hud-nav-item>.hud-nav-icon::before{
 content:none!important;display:none!important;background:none!important;
}
/* Keyboard focus stays visible but never adds a second external plate. */
#game .premium-topbar .hud-global-nav>.hud-nav-item:focus-visible{
 outline:1px solid #eac68d!important;outline-offset:-4px!important;
}
/* Key hints (the old tiny blue/red 'M' in the screenshot) use the same
   unobtrusive physical family instead of a CSS/web keyboard badge. */
#game .premium-key-dock :is(kbd,.key-cluster),
#game .premium-atlas-button kbd,
#game .hud-wide-command kbd,
:is(#game,#modal,#audio-dialog,#battle-dialog,#pad-menu,#osk) :is(kbd,.key-cluster){
 box-sizing:border-box!important;display:inline-grid!important;place-items:center!important;
 vertical-align:middle!important;min-width:19px;min-height:19px;
 padding:1px 4px!important;border:3px solid transparent!important;
 border-image:var(--rpg-control-idle) 12 fill / 3px / 0 stretch!important;
 border-radius:0!important;background:transparent!important;background-image:none!important;
 box-shadow:none!important;color:#efdbbf!important;
 font:700 max(11px,.64rem)/15px Arial,sans-serif!important;
 text-shadow:1px 1px 0 #0c0910!important;white-space:nowrap;
}
/* Shared compact game commands use the physical 96px image, not old 48px
   category exports. The rules intentionally avoid canvas, meters and badges. */
#game :is(.hud-wide-command,.premium-atlas-button,.hud-panel-action,.hud-minimap-tools button,.chat-scroll button,.chat-tool,.chat-toggle,.gm-repel-toggle,.sky-widget),
#login :is(.segmented button,.sound-entry,.connection-card button),
#audio-dialog :is(.modal-header button,.audio-body button),
#modal[data-view] :is(.modal-actions button,.gm-tabs button,.town-map-tabs button,.forecast-tabs button,.relearn-button,.tcc-tab,.tc-remove,.friends-actions button,.friends-add button){
 border:4px solid transparent!important;
 border-image:var(--rpg-control-idle) 12 fill / 4px / 0 stretch!important;
 border-radius:0!important;background:#241b23!important;background-image:none!important;
 box-shadow:none!important;clip-path:none!important;
}
#game :is(.hud-wide-command,.premium-atlas-button,.hud-panel-action,.hud-minimap-tools button,.chat-scroll button,.chat-tool,.chat-toggle,.gm-repel-toggle,.sky-widget):is(:hover:not(:disabled),:focus-visible,.active,.selected,[aria-pressed="true"]),
#login :is(.segmented button,.sound-entry,.connection-card button):is(:hover:not(:disabled),:focus-visible,.selected),
#audio-dialog :is(.modal-header button,.audio-body button):is(:hover:not(:disabled),:focus-visible),
#modal[data-view] :is(.modal-actions button,.gm-tabs button,.town-map-tabs button,.forecast-tabs button,.relearn-button,.tcc-tab,.tc-remove,.friends-actions button,.friends-add button):is(:hover:not(:disabled),:focus-visible,.selected,.active,[aria-selected="true"],[aria-pressed="true"]){
 border-image:var(--rpg-control-on) 12 fill / 4px / 0 stretch!important;
 background:#3f2630!important;background-image:none!important;
 box-shadow:none!important;
}
/* First sweep of the old category-button UVs. Preserve the surrounding
   window/frame art and semantic rarity/type colors. */
#modal[data-view="menu"] .main-menu-entry,
#modal[data-view="bag"] :is(.bag-pocket,.bag-list-item,.bag-action-option,.bag-detail-actions button,.bag-close,.bag-buy-action,.bag-search-clear),
#modal[data-view="pokemon"] :is(.info-tab,.info-step,.info-step-pick,.info-plus,.info-minus,.info-reset,.info-rename,.info-foot-actions button,.info-evo button,.info-confirm-actions button),
#modal[data-view="ranking"] .ai-tabs>button,
#modal[data-view="ai"] .ai-tabs>button,
#modal[data-view="storage"] :is(.pc-tool,.pc-button,.pc-arrow,.pc-confirm,.storage-actions button),
#modal[data-view="friends"] :is(.friends-add button,.friends-actions button),
#modal[data-view="forecast"] .forecast-row,
#modal[data-view="skins"] .skins-close{
 border:4px solid transparent!important;
 border-image:var(--rpg-control-idle) 12 fill / 4px / 0 stretch!important;
 border-radius:0!important;background:#241b23!important;background-image:none!important;
 box-shadow:none!important;clip-path:none!important;transform:none!important;
}
#modal[data-view="menu"] .main-menu-entry:is(.selected,:hover:not(:disabled),:focus-visible),
#modal[data-view="bag"] :is(.bag-pocket,.bag-list-item,.bag-action-option,.bag-detail-actions button,.bag-close,.bag-buy-action,.bag-search-clear):is(.selected,:hover:not(:disabled),:focus-visible,[aria-selected="true"]),
#modal[data-view="pokemon"] :is(.info-tab,.info-step,.info-step-pick,.info-plus,.info-minus,.info-reset,.info-rename,.info-foot-actions button,.info-evo button,.info-confirm-actions button):is(.selected,.active,:hover:not(:disabled),:focus-visible,[aria-selected="true"]),
#modal[data-view="ranking"] .ai-tabs>button:is(.selected,:hover:not(:disabled),:focus-visible,[aria-selected="true"]),
#modal[data-view="ai"] .ai-tabs>button:is(.selected,:hover:not(:disabled),:focus-visible,[aria-selected="true"]),
#modal[data-view="storage"] :is(.pc-tool,.pc-button,.pc-arrow,.pc-confirm,.storage-actions button):is(.selected,:hover:not(:disabled),:focus-visible),
#modal[data-view="friends"] :is(.friends-add button,.friends-actions button):is(.selected,:hover:not(:disabled),:focus-visible),
#modal[data-view="forecast"] .forecast-row:is(.selected,:hover:not(:disabled),:focus-visible),
#modal[data-view="skins"] .skins-close:is(:hover:not(:disabled),:focus-visible){
 border:4px solid transparent!important;
 border-image:var(--rpg-control-on) 12 fill / 4px / 0 stretch!important;
 background:#402630!important;background-image:none!important;
 box-shadow:none!important;clip-path:none!important;transform:none!important;
}
/* Actual selection rows inherit multiple nested active frames from the
   different legacy layers. One selected row is enough; the inner icon well
   keeps its unchanged neutral slot rather than also becoming gold/red. */
#modal[data-view] :is(.relearn-party-card.selected,.relearn-move.selected,.friends-row.selected,.ferry-row.selected,.raid-gm-choice.selected,.pc-cell.selected,.pc-box.selected,.pc-party-slot.selected,.tc-chip.selected,.tcc-tab.selected){
 border:4px solid transparent!important;
 border-image:var(--rpg-control-on) 12 fill / 4px / 0 stretch!important;
 background:#402630!important;background-image:none!important;
 box-shadow:none!important;clip-path:none!important;transform:none!important;
}
#modal[data-view="titles"] .tc-title:is(.worn,:hover:not(:disabled),:focus-visible),
#modal[data-view="skins"] .skin-card:is(.selected,:hover:not(:disabled),:focus-visible):not(.equipped){
 border:4px solid transparent!important;
 border-image:var(--rpg-control-on) 12 fill / 4px / 0 stretch!important;
 background:#402630!important;background-image:none!important;
 box-shadow:none!important;clip-path:none!important;transform:none!important;
}
#modal[data-view="menu"] .main-menu-entry.selected .main-menu-hex,
#modal[data-view="titles"] .tc-title.worn .tc-title-hex,
#modal[data-view="storage"] :is(.pc-cell.selected,.pc-party-slot.selected) .pc-icon-wrap{
 border-image:url("../login/slot.png?v=cabare-uv-1") 24 fill / 4px / 0 stretch!important;
 background:#201821!important;box-shadow:none!important;
}
/* Focus is a single inside hairline, not another 6-12px external frame. */
#modal[data-view] :is(.main-menu-entry,.bag-pocket,.bag-list-item,.info-tab,.info-step-pick,.ai-tabs>button,.pc-tool,.pc-button,.tc-title,.tc-remove,.skins-close):focus-visible,
#game :is(.hud-wide-command,.premium-atlas-button,.hud-panel-action):focus-visible{
 outline:1px solid #e6bf82!important;outline-offset:-4px!important;
 box-shadow:none!important;
}

/* An old 3px focus outline plus selected border made selected PC/choice rows
   look like stacked frames. Keep ONE small inset keyboard ring; click focus
   has no extra ring, and gamepad focus receives the active physical state. */
#modal[data-view] :is(.pc-cell,.pc-party-slot,.pc-box,.relearn-party-card,.relearn-move,.friends-row,.ferry-row,.raid-gm-choice,.tc-chip,.tcc-tab,.forecast-row,.tc-title,.skin-card):focus-visible,
body.pad-active #modal[data-view] :is(.pc-cell,.pc-party-slot,.pc-box,.relearn-party-card,.relearn-move,.friends-row,.ferry-row,.raid-gm-choice,.tc-chip,.tcc-tab,.forecast-row,.tc-title,.skin-card).pad-focus{
 outline:1px solid #e6bf82!important;outline-offset:-4px!important;
 box-shadow:none!important;
}
#modal[data-view="storage"] :is(.pc-cell,.pc-party-slot,.pc-tool,.pc-box):focus:not(:focus-visible){
 outline:none!important;box-shadow:none!important;
}
#game .premium-topbar .hud-global-nav>.hud-nav-item.pad-focus{
 border-image:var(--rpg-control-on) 12 fill / 4px / 0 stretch!important;
 outline:1px solid #eac68d!important;outline-offset:-4px!important;
 box-shadow:none!important;
}

/* Restore golden menu hover and fixed navbar overlay. The generic state sweep
   must not override these specialized PNG/UV controls. No border-size change. */
#modal[data-view="menu"] .main-menu-entry{
 border:6px solid transparent!important;
 border-image:url("../login/button.png?v=cabare-uv-1") 24 fill / 6px / 0 stretch!important;
 outline:none!important;
}
#modal[data-view="menu"] .main-menu-entry:is(.selected,:hover:not(:disabled),:focus-visible,.pad-focus){
 border:6px solid transparent!important;
 border-image:url("../login/button-active.png?v=cabare-uv-1") 24 fill / 6px / 0 stretch!important;
 background-color:#49262f!important;box-shadow:none!important;
}
/* Restore the original gold selection marker. It belongs to the selected row
   (mouse, keyboard or pad), not to hover alone; an inset outline is paint-only
   and cannot resize the fixed button or push its neighbours apart. */
#modal[data-view="menu"] .main-menu-entry:is(.selected,:focus-visible,.pad-focus){
 outline:2px solid #ffe0a0!important;
 outline-offset:-2px!important;
}
/* Navbar frame is an overlay: never change the clickable box geometry. */
#game .premium-topbar .hud-global-nav>.hud-nav-item,
#game .premium-topbar .hud-global-nav>.hud-nav-item:is(.active,:hover:not(:disabled),:focus,:focus-visible,[aria-pressed="true"],.pad-focus){
 border:0!important;border-image:none!important;
 padding:6px 7px!important;background:transparent!important;
 outline:0!important;box-shadow:none!important;
}
#game .premium-topbar .hud-global-nav>.hud-nav-item::before{
 content:none!important;display:none!important;
}
#game .premium-topbar .hud-global-nav>.hud-nav-item::after{
 content:""!important;display:block!important;pointer-events:none!important;
 box-sizing:border-box!important;position:absolute!important;z-index:-1!important;
 inset:0!important;width:100%!important;height:100%!important;
 margin:0!important;padding:0!important;border:6px solid transparent!important;
 border-image:url("../login/button.png?v=cabare-uv-1") 24 fill / 6px / 0 stretch!important;
 background-color:#251b22!important;box-shadow:none!important;
 transform:none!important;transition:none!important;
}
#game .premium-topbar .hud-global-nav>.hud-nav-item:is(.active,:hover:not(:disabled),:focus,:focus-visible,[aria-pressed="true"],.pad-focus)::after{
 border-image-source:url("../login/button-active.png?v=cabare-uv-1")!important;
 background-color:#49262f!important;
}
#game .premium-topbar .hud-global-nav>.hud-nav-item:is(:hover:not(:disabled),:focus,:focus-visible,.pad-focus)::after{
 box-shadow:inset 0 0 0 2px #ffe0a0!important;
}
