/* v0.17.24: scoped corrections for profile dialog and catalog modes. */
#headerPsnOverlay .header-psn-dialog{display:flex!important;flex-direction:column!important;}
#headerPsnOverlay .psn-tool-head{height:auto!important;min-height:0!important;flex:0 0 auto!important;padding:22px 26px!important;align-items:flex-start!important;}
#headerPsnOverlay .psn-tool-title-wrap{display:flex;flex-direction:column;gap:8px;flex:1;}
#headerPsnDialogTitle{display:block!important;font-size:24px!important;font-weight:800!important;line-height:1.25!important;letter-spacing:-.025em!important;}
#headerPsnOverlay .psn-tool-subtitle{margin:0!important;font-size:14px!important;line-height:1.5!important;font-weight:400;color:var(--muted)!important;white-space:normal;}
#headerPsnOverlay .header-psn-dialog-body{padding:22px 26px 26px!important;flex:0 0 auto;}
#headerPsnForm .psn-field label{display:block;line-height:1.4!important;font-size:12px!important;font-weight:700!important;letter-spacing:.04em;}
#headerPsnInput{font-family:inherit;font-size:16px!important;line-height:1.4!important;font-weight:400!important;}
#headerPsnSubmit{font-family:inherit;font-size:14px!important;font-weight:700!important;line-height:1.4!important;}
#headerPsnOverlay .psn-tool-close svg{width:18px!important;height:18px!important;}
#headerPsnMessage:empty{display:none!important;}
#headerPsnMessage{font-weight:400!important;}
#masterlistProfileGate[hidden],#listBuilderControls[hidden],#libraryList .library-list-entry[hidden]{display:none!important;}
html.home-profile-locked #masterlistProfileGate{display:flex!important;visibility:visible!important;opacity:1!important;pointer-events:auto!important;background:rgba(12,12,12,.82);backdrop-filter:blur(5px);}
html.home-profile-locked #gameListBody{filter:blur(4px);pointer-events:none;user-select:none;}
#masterlistProfileGate .masterlist-profile-gate-inner{width:min(540px,100%);min-height:186px;padding:28px 24px;gap:16px;}
#masterlistProfileGate .masterlist-profile-gate-icon{width:52px;height:52px;flex:none;}
#masterlistProfileGate .masterlist-profile-gate-icon svg{width:24px;height:24px;}
#masterlistProfileGate .masterlist-profile-gate-text{max-width:480px;font-size:14px;font-weight:800;line-height:1.5;}
html.home-profile-locked .main-grid>.side-stack>.side-card.side-tools-card{display:none!important;}
html:is(.library-mode,.admin-catalog-mode) .main-grid>.side-stack>#latestCombinedCard{display:none!important;}
html.home-profile-locked .main-grid>.side-stack>#latestCombinedCard{flex:1 1 0!important;height:100%!important;max-height:none!important;min-height:0!important;}
html:is(.library-mode,.admin-catalog-mode) .main-grid>.side-stack>.side-card.side-tools-card{flex:1 1 0!important;height:100%!important;min-height:0!important;max-height:none!important;}
html:is(.library-mode,.admin-catalog-mode) #libraryList{flex:1 1 auto;min-height:0;overflow-y:auto;}
html:is(.library-mode,.admin-catalog-mode) .tools-platform-badges{display:inline-flex!important;gap:4px;flex-wrap:wrap;}
html:not(.library-mode):not(.admin-catalog-mode) .tools-platform-badges .lists-only-badge{display:none!important;}
html.list-builder-mode #listBuilderControls{display:flex!important;flex:none;align-items:center;justify-content:flex-end;}
#listBuilderControls .instant-gamelist-actions{display:flex;gap:6px;flex-wrap:wrap;}
#builderDownload svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7;}
html.list-builder-mode .game-row[data-selectable=true]{cursor:pointer;}
html.list-builder-mode .game-row:focus-visible{outline:1px solid #aaa;outline-offset:-2px;}
@media(max-width:760px){
#headerPsnOverlay .psn-tool-head{padding:20px!important;}
#headerPsnDialogTitle{font-size:22px!important;}
#headerPsnOverlay .header-psn-dialog-body{padding:20px!important;}
#headerPsnForm{grid-template-columns:minmax(0,1fr)!important;}
#headerPsnSubmit{width:100%!important;}
#masterlistProfileGate .masterlist-profile-gate-inner{min-height:150px;padding:20px 16px;}
#masterlistProfileGate .masterlist-profile-gate-text{font-size:13px;}
html.home-profile-locked .main-grid>.side-stack{display:flex!important;}
html.home-profile-locked .main-grid>.side-stack>#latestCombinedCard{height:auto!important;min-height:48px!important;}
html.home-profile-locked #latestCombinedCard .side-list{max-height:50dvh!important;overflow-y:auto!important;}
}

@media(max-width:760px){
html:is(.home-profile-locked,.library-mode,.admin-catalog-mode) .app{height:auto!important;max-height:none!important;overflow:visible!important;}
html:is(.home-profile-locked,.library-mode,.admin-catalog-mode) .main-grid{height:auto!important;overflow:visible!important;grid-template-columns:minmax(0,1fr)!important;}
html:is(.home-profile-locked,.library-mode,.admin-catalog-mode) .main-grid>.list-card{height:55dvh!important;min-height:300px!important;}
html:is(.home-profile-locked,.library-mode,.admin-catalog-mode) .main-grid>.side-stack{display:flex!important;content-visibility:visible!important;contain:none!important;height:auto!important;max-height:none!important;}
html:is(.library-mode,.admin-catalog-mode) .main-grid>.side-stack>.side-card.side-tools-card{height:auto!important;min-height:200px!important;max-height:60dvh!important;}
}

/* v0.17.25: inactive panels cannot occupy space or intercept input. */
html .main-grid>.side-stack>.side-card[hidden],
html .main-grid>.side-stack>.side-card>.tools-list[hidden],
html .main-grid>.side-stack>.side-card>#libraryList[hidden]{display:none!important;pointer-events:none!important;}
html[data-ui-mode="psn"] .main-grid>.side-stack>#latestCombinedCard,
html[data-ui-mode="psn"] #libraryList{display:none!important;pointer-events:none!important;}
:is(.header-psn-overlay,.game-cloner-overlay,.psn-tool-overlay,.psn-editor-overlay,.psn-profile-overlay,.profile-tool-overlay,.mobile-experience-overlay):not(.is-open){display:none!important;pointer-events:none!important;}
html[data-ui-mode="psn"] .main-grid>.side-stack>.side-card.side-tools-card{flex:1 1 0!important;height:100%!important;min-height:0!important;max-height:100%!important;position:relative!important;overflow:hidden!important;}
html[data-ui-mode="psn"]:not(.cloner-inline-detail-mode):not(.editor-trophy-detail-mode) .main-grid>.side-stack>.side-card.side-tools-card .tools-list{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(min(200px,100%),1fr));align-content:start;gap:5px;flex:1 1 auto!important;min-height:0!important;height:auto!important;max-height:none!important;overflow-y:auto!important;overflow-x:hidden!important;}
html[data-ui-mode="psn"] .tools-list .tool-entry{min-height:32px!important;height:auto!important;max-height:none!important;}
html[data-ui-mode="psn"] .tools-list .tool-entry-name{white-space:normal!important;line-height:1.35!important;}
html[data-ui-mode="psn"] #toolsInfoBox{position:relative!important;flex:0 1 auto;max-height:35%;overflow:auto;}
html[data-ui-mode="psn"] .trophy-detail-sidebar{min-height:0;overflow:auto;}
#libraryList .latest-menu-icon{display:flex;align-items:center;justify-content:center;width:16px;height:16px;font-family:inherit;font-size:5.5px;font-weight:800;line-height:1;letter-spacing:-.04em;color:currentColor;border:1px solid currentColor;border-radius:3px;}
.trophy-ranking-meta{font-variant-numeric:tabular-nums;}
@media(max-width:760px){
html[data-ui-mode="psn"] .app{height:auto!important;max-height:none!important;overflow:visible!important;}
html[data-ui-mode="psn"] .main-grid{height:auto!important;overflow:visible!important;grid-template-columns:minmax(0,1fr)!important;}
html[data-ui-mode="psn"] .main-grid>.list-card{height:55dvh!important;min-height:300px!important;}
html[data-ui-mode="psn"] .main-grid>.side-stack{display:flex!important;content-visibility:visible!important;contain:none!important;height:auto!important;}
html[data-ui-mode="psn"] .main-grid>.side-stack>.side-card.side-tools-card{height:auto!important;min-height:200px!important;max-height:60dvh!important;}
}
