/* Garden controller navigation, consistent with the existing blue panel theme. */
.cg-gamepad-focused {outline:4px solid #ffe170!important;outline-offset:2px!important;box-shadow:0 0 0 2px #162e48,0 0 17px 3px rgba(255,225,112,.65)!important;position:relative;z-index:1}
#anchored-sidebar .cg-gamepad-focused{filter:brightness(1.28);border-radius:7px}
#cg-gamepad-quick-access{position:fixed;right:clamp(12px,3vw,55px);top:clamp(75px,13vh,170px);width:min(315px,calc(100vw - 24px));max-height:70vh;overflow:auto;z-index:2147482500;box-sizing:border-box;border:2px solid #569ac1;border-radius:14px;background:linear-gradient(145deg,#145078,#061e38);color:#f7fbff;box-shadow:0 14px 45px #000b;padding:14px;font-family:inherit}
#cg-gamepad-quick-access[hidden]{display:none!important}
.cg-gamepad-quick-title{font-weight:800;font-size:17px;text-align:center;text-transform:uppercase;border-bottom:1px solid #79a3c0;padding:4px 0 10px;margin-bottom:10px}
.cg-gamepad-quick-list{display:grid;gap:5px}
.cg-gamepad-quick-list>button{font-family:inherit;text-align:left;font-weight:700;font-size:14px;min-height:37px;color:#fff;border:1px solid #619bc1;border-radius:8px;background:#205778;padding:6px 12px;cursor:pointer}
.cg-gamepad-quick-list>button:hover{background:#3179a5}
#ui-options-panel .cg-gamepad-keybind-tabs{display:flex;gap:8px;margin:10px 0}
#ui-options-panel .cg-gamepad-keybind-tab{min-width:125px;padding:7px 11px;border-radius:7px;border:1px solid #5184a7;color:#e5f7ff;background:#143c5b;font-weight:700;cursor:pointer}
#ui-options-panel .cg-gamepad-keybind-tab.active{border-color:#a9e1ff;background:#236da1}
#ui-options-panel .cg-gamepad-keybind-page{display:none}
#ui-options-panel .cg-gamepad-keybind-page.active{display:block}
#ui-options-panel .cg-gamepad-binding-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(275px,1fr));gap:9px;margin:9px 0 14px}
#ui-options-panel .cg-gamepad-binding-row{display:grid;grid-template-columns:1fr minmax(120px,1fr);gap:8px;align-items:center}
#ui-options-panel .cg-gamepad-binding-row>select{min-width:0;width:100%;font:inherit;color:var(--panel-text,#fff);background:#163b59;border:1px solid #5f8cb0;padding:5px}

/* Twice the previous 11px legend scale, with discrete legible buttons. */
#cg-gamepad-hints{position:fixed;bottom:max(12px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:max-content;max-width:min(96vw,1350px);box-sizing:border-box;padding:10px 16px;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:10px 16px;line-height:1.25;font:800 20px/1.25 system-ui,sans-serif;color:#fff;letter-spacing:.015em;text-shadow:0 2px 4px #000;background:linear-gradient(180deg,rgba(19,67,103,.94),rgba(5,24,47,.94));border:2px solid rgba(97,189,241,.85);border-radius:13px;box-shadow:0 6px 25px #0009;pointer-events:none;z-index:2147482498}
#cg-gamepad-hints .cg-gamepad-hint-item{display:inline-flex;align-items:center;gap:7px;white-space:nowrap}
#cg-gamepad-hints .cg-gamepad-hint-button,.cg-gamepad-action-glyph,.cg-gamepad-sidebar-glyph{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;font-family:system-ui,sans-serif;font-weight:900;line-height:1;color:#ecfaff;background:linear-gradient(#305d83,#0a2f54);border:2px solid #73cef9;border-radius:9px;box-shadow:inset 0 1px 2px #fff4,0 2px 5px #000a;text-shadow:0 1px 2px #0009;white-space:nowrap;pointer-events:none}
#cg-gamepad-hints .cg-gamepad-hint-button{min-width:39px;min-height:34px;padding:5px 7px;font-size:19px}
/* Actual Garden sidebar toggle: keep the arrow, insert the LB/L1 badge inside it. */
#sidebar-visibility-toggle.cg-gamepad-sidebar-active{width:104px;min-width:104px;height:40px;min-height:40px;display:flex;align-items:center;padding:2px 5px;gap:3px;opacity:1}
#sidebar-visibility-toggle.cg-gamepad-sidebar-active>.sidebar-visibility-toggle-label{width:60%;height:100%;flex:1 1 auto;min-width:0}
#sidebar-visibility-toggle .cg-gamepad-sidebar-glyph{position:relative;flex:0 0 auto;min-width:33px;min-height:29px;padding:2px 4px;font-size:14px;border-radius:7px}
/* Real contextual Avatar buttons retain keyboard shortcuts AND show controller glyphs. */
#cg-player-avatar-interaction-prompt .cg-avatar-action-button.cg-gamepad-avatar-action{display:inline-flex;align-items:center;justify-content:center;gap:7px;vertical-align:middle;padding:4px 8px 4px 5px}
#cg-player-avatar-interaction-prompt .cg-gamepad-action-glyph{min-width:35px;min-height:32px;padding:4px;font-size:19px;flex:none}
@media(max-width:780px){#cg-gamepad-hints{font-size:16px;gap:6px 9px;padding:8px 10px}#cg-gamepad-hints .cg-gamepad-hint-button{font-size:15px;min-width:32px;min-height:29px}#cg-gamepad-hints .cg-gamepad-hint-item{gap:4px}}
#cg-gamepad-hints[hidden]{display:none!important}

/* Controller focus must never change positioning inside the player card. */
#sidebar-account-hud .cg-gamepad-focused{position:static!important;z-index:auto!important;transform:none!important;filter:none!important;outline:4px solid #ffe170!important;outline-offset:-3px!important;box-shadow:inset 0 0 0 3px #172c48!important}
#sidebar-account-hud .cg-gamepad-focused img{transform:none!important}
.cg-gamepad-editing{outline-color:#66eeff!important;box-shadow:0 0 0 3px #092533,0 0 14px #66eeff!important}
#avatar-bag-panel .cg-gamepad-focused,.stats-subscription-dropdown .cg-gamepad-focused,.sidebar-account-avatar-menu .cg-gamepad-focused{outline:3px solid #ffe170!important;outline-offset:2px!important}

/* WIP option: hide all panel header PIN controls project-wide by default.
   Enabled only in Debug WIP Options; release never exposes these controls. */
html:not([data-cg-wip-pin-buttons-enabled="true"]) .panel-pin-btn{display:none!important}
/* Controller-vs-button glyph for whichever Cheer UI is actually active. */
button[data-gamepad-cheer-glyph]::before{content:attr(data-gamepad-cheer-glyph);display:inline-flex;align-items:center;justify-content:center;min-width:1.7em;margin-right:6px;padding:1px 4px;border:1px solid #8ed5fc;border-radius:5px;background:#194665;color:#fff;font-weight:900}
#lp-game-drawer .lp-game-banner.cg-gamepad-focused,.paperdoll-slot-bag .cg-gamepad-focused,.paperdoll-unequip-prompt .cg-gamepad-focused,.stats-title-dropdown .cg-gamepad-focused{outline:3px solid #ffe170!important;outline-offset:2px!important}

/* v0.84a Tutorial / Quest Log controller glyphs; active family from controller runtime. */
.tutorial-gamepad-glyph{display:inline-flex;align-items:center;justify-content:center;vertical-align:baseline;padding:1px 5px;min-width:1.3em;border:1px solid currentColor;border-radius:4px;font-weight:700;font-size:.91em;line-height:1.28;white-space:nowrap;background:rgba(14,41,63,.65);color:#d8f4ff;letter-spacing:.01em}
.tutorial-dock-objective-text .tutorial-gamepad-glyph{margin-inline:2px}

/* v0.84ad: the Kindergarten seated Chao are real controller buttons.
   Display focus on the sprite itself, not only the large classroom seat. */
#kindergarten-building-panel .kindergarten-seated-chao.cg-gamepad-focused{
  outline:4px solid #ffe170!important;outline-offset:-3px!important;
  box-shadow:0 0 0 3px #13253d,0 0 18px 5px #ffe170!important;
  border-radius:9px!important;z-index:5!important;
}
#kindergarten-building-panel .kindergarten-seated-chao.cg-gamepad-focused .kindergarten-seat-chao{
  filter:drop-shadow(0 0 8px #ffe170)!important;
}
#city-builder-2-panel #city2-editor-canvas.cg-gamepad-focused{
  outline:4px solid #ffe170!important;outline-offset:3px!important;
}
#tutorial-welcome-backdrop .cg-gamepad-focused,
#tutorial-character-select-backdrop .cg-gamepad-focused,
[data-tutorial-dock] .cg-gamepad-focused{
  outline:4px solid #ffe170!important;outline-offset:3px!important;
  box-shadow:0 0 0 2px #213f53,0 0 15px 5px #ffe170!important;
}
