/* The two room backdrops are original image assets. These rules arrange controls and text. */
#home.screen--home{background:linear-gradient(180deg,#06140d22,#050d0a44),url('./assets/ui/home-profile-v05444/home-lounge.png') center 55%/cover no-repeat!important}
#home .home-lobby-lights,#home .home-lobby-architecture,#home .home-carpet{display:none!important}
#profile.screen--profile{background:linear-gradient(90deg,#06150bd9,#06130fe8),url('./assets/ui/home-profile-v05444/profile-study.png') center/cover no-repeat!important}
#home .home-profile__copy small{display:block!important;max-width:7em;font-size:10px!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#home .home-profile__copy strong{font-size:10px!important}
#profile .profile-overview{display:block!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain;scrollbar-width:thin;padding:8px!important}
#profile .profile-overview[hidden]{display:none!important}
.profile-summary-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.profile-summary-cards article{display:flex;flex-direction:column;gap:3px;min-width:0;min-height:62px;padding:7px 9px;border:1px solid #9b8753;border-radius:8px;background:#102a20e8}
.profile-summary-cards small,.profile-summary-cards span{color:#c1c9a9;font-size:10px;line-height:1.25}
.profile-summary-cards strong{font-size:16px;line-height:1.25;color:#ffe2a1;overflow-wrap:anywhere}
#profileFavoriteGame{font-size:13px}
.profile-overview-note{margin:6px 1px;color:#c4cbb2;font-size:10px;line-height:1.4}
.profile-overview-detail{border:1px solid #788555;border-radius:8px;background:#0d251bdf;margin:6px 0;padding:5px 8px;color:#e9d9ac}
.profile-overview-detail summary{font-size:12px;line-height:1.4;font-weight:700;cursor:pointer;min-height:30px;display:flex;align-items:center;gap:6px;list-style:none}
.profile-overview-detail summary::-webkit-details-marker{display:none}.profile-overview-detail summary::before{content:'▸';color:#eac879}.profile-overview-detail[open] summary::before{content:'▾'}
.profile-game-breakdown{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;padding:5px 0}
.profile-game-breakdown article{display:flex;flex-direction:column;gap:3px;min-width:0;border:1px solid #6c7950;border-radius:6px;padding:6px;background:#193b29}
.profile-game-breakdown small{font-size:10px;line-height:1.3;overflow-wrap:anywhere}.profile-game-breakdown strong{font-size:13px;color:#ffe5a8}
#profileGameBreakdownStatus{font-size:10px;line-height:1.4;color:#bfcbb6;margin:4px 0}
#profile .profile-appearance{margin:7px 0!important;padding:8px!important;background:#102b20e8!important}
#profile .profile-appearance header h3{font-size:13px!important}
#profile #profileAppearanceItems{grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:4px!important;margin:6px 0!important}
#profile #profileAppearanceItems button{padding:6px!important;gap:3px!important;min-height:57px;overflow:hidden}
#profile #profileAppearanceItems small{font-size:9px!important;line-height:1.2}
#profile #profileAppearanceItems strong{font-size:10px!important;line-height:1.25;overflow-wrap:anywhere}
#profile #profileAppearanceItems span{font-size:9px!important;line-height:1.2}
#profile .profile-appearance p{font-size:10px!important;line-height:1.4}
#profile .profile-overview-detail .profile-stat-grid{height:auto!important;min-height:0!important;padding:4px 0;grid-template-columns:repeat(4,minmax(0,1fr))}
#profile .profile-overview-detail summary:focus-visible{outline:2px solid #ffe0a0;outline-offset:2px}
@media(max-width:760px){
 #profile .profile-summary-cards article{min-height:54px;padding:6px}#profile .profile-summary-cards strong{font-size:13px}#profile #profileFavoriteGame{font-size:11px}
 #profile #profileAppearanceItems{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}

#profileNameStatus{grid-column:1/-1;min-height:1em;color:#deca90;font-size:10px;line-height:1.3;overflow-wrap:anywhere}
@media(max-width:700px){#profile .profile-name-edit{grid-template-columns:minmax(0,1fr)!important;gap:3px}#profile .profile-name-edit input{width:100%;box-sizing:border-box;padding:0 5px!important}#profile .profile-name-edit button{width:100%;min-height:27px}#profileNameStatus{min-height:0;font-size:9px}}
/* iPhone keeps a 16px input without zooming; the full sidebar width is used for the name. */
#profileNameInput{font-size:16px!important}
@media(max-width:980px) and (orientation:landscape){
 #profile .profile-identity{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:auto auto auto minmax(0,1fr)!important;gap:4px!important}
 #profile .profile-name-edit{grid-column:1!important;grid-row:1!important;grid-template-columns:minmax(0,1fr) auto!important;gap:4px}
 #profile .profile-name-edit button{width:auto;min-width:36px}
 #profile .profile-equipped-title{grid-column:1!important;grid-row:2!important}
 #profile .profile-badge-strip{grid-column:1!important;grid-row:3!important}
 #profile .profile-avatar{grid-column:1!important;grid-row:4!important}
}
/* Informational toasts must never intercept HOME controls underneath. */
#home .home-toast{pointer-events:none!important;bottom:calc(max(8px,var(--safe-bottom)) + 65px)!important}
/* Keep the whole selected character visible inside the resized profile frame. */
#profile .profile-avatar img{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;max-height:100%!important;object-fit:contain!important;object-position:center!important;transform:none!important}
/* Keep the profile HOME shortcut below the header and its close button at desktop sizes. */
#profile.screen:not(#home) > nav.home-bottom-nav.profile-bottom-nav{top:max(64px,15%)!important}
