/* The profile occupies the existing island frame; radio and app header stay outside. */
.home-screen.profile-open>:not(#profile-dialog){visibility:hidden}
.profile-dialog{position:absolute;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;padding:0;border:0;border-radius:inherit;overflow:hidden;color:#184e68;background:linear-gradient(100deg,#c4f5eeed 0%,#d3f4e9e8 62%,#8edbea22 82%);box-shadow:none;z-index:5;font-size:12px}
.profile-dialog button{border:2px solid #eafff5;background:linear-gradient(#e9fff7,#b4ecdf);color:#22576c;border-radius:10px;padding:7px 11px;font-weight:900;font-size:11px;box-shadow:0 3px 0 #4b99a8,0 4px 8px #0c576719}
.profile-dialog button:hover{background:linear-gradient(#fff,#d5fff1);border-color:#fff}
.profile-dialog button:disabled{opacity:1;cursor:default;color:#705e36;background:linear-gradient(#fff0b4,#f2d68e);border-color:#fff6cd;box-shadow:0 2px 0 #b99c5c}
.profile-dialog strong{color:inherit}
.profile-top{height:68px;display:flex;align-items:center;gap:16px;padding:10px 22px;border-bottom:2px solid #d4ffec;background:linear-gradient(110deg,#53c8dbef,#80dddcef);box-shadow:0 3px 0 #1d899322}
.profile-top h1{font:800 31px/1 'Baloo 2',sans-serif;margin:0 7px 0 0;letter-spacing:-.6px;color:#164e70;text-shadow:0 2px 0 #d1fff2}
.profile-top nav{display:flex;align-items:center;gap:6px;flex:1;min-width:0;overflow-x:auto;padding:3px 2px 6px;scrollbar-width:none}
.profile-top nav::-webkit-scrollbar{display:none}
.profile-top nav button{white-space:nowrap;padding:9px 10px;font-size:10px;border-radius:10px;background:#cff9f1;box-shadow:0 3px 0 #4399ae;color:#26647a}
.profile-top nav button[aria-selected=true]{color:#72511a;border-color:#fff8d6;background:linear-gradient(#fff2ad,#ffd878);box-shadow:0 3px 0 #ba9046}
.profile-top .profile-back{flex:none;white-space:nowrap;background:linear-gradient(#5ca9d7,#327db6);color:white;border-color:#b4ebff;box-shadow:0 3px 0 #265c95}
.profile-body{display:grid;grid-template-columns:minmax(0,2.1fr) minmax(210px,1fr);gap:24px;height:calc(100% - 68px);padding:26px 28px 24px}
.profile-info-column{display:flex;flex-direction:column;gap:12px;min-width:0;min-height:0}
.profile-identity{position:relative;display:grid;grid-template-columns:79px minmax(0,1fr) auto;gap:14px;padding:13px 16px;background:linear-gradient(120deg,#fffdf1,#edfdf4);border:2px solid #fff;border-radius:20px;min-height:127px;box-shadow:0 4px 0 #58aeb65e,0 6px 18px #4b939422}
.profile-dialog .profile-avatar{position:relative;align-self:start;width:76px;height:96px;padding:2px;border:0;background:linear-gradient(#ffe6a2,#f6bb77);overflow:hidden;border-radius:14px;box-shadow:0 2px 0 #267f8b}
.profile-dialog .profile-avatar-frame{position:absolute;inset:0;z-index:2;background-position:center;background-repeat:no-repeat;background-size:contain;pointer-events:none}
.profile-avatar img{position:relative;z-index:1;display:block;width:68%;height:70px;margin:0 auto;object-fit:contain;object-position:50% 43%}
.profile-avatar span:not(.profile-avatar-frame){position:relative;z-index:3;display:block;font-size:7px;letter-spacing:1px;padding:3px 0;color:#267385;background:#edfff2}
.profile-name-row{display:flex;align-items:center;gap:9px;height:31px}
.profile-name-row>strong{font:800 19px/1 'Baloo 2',sans-serif;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#214f71}
.profile-name-row button,.profile-title-row button,.profile-label-row button{padding:2px 5px;min-width:24px;min-height:23px;font-size:14px;line-height:1;border-radius:7px;box-shadow:0 2px 0 #7fb5b6}
.profile-club{border-left:1px solid #9acac6;padding-left:9px;color:#518290;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.profile-title-row,.profile-label-row{display:flex;align-items:center;justify-content:space-between;gap:8px;border-radius:8px;background:#d9f3e9;margin-top:5px;min-height:25px;padding-left:9px;font-size:10px;color:#538178}
.profile-id{display:flex;align-items:flex-end;gap:6px;padding-top:6px;font-size:8px;color:#5c8994;white-space:nowrap;flex-direction:column}
.profile-dialog #copy-profile-id{font-size:8px;padding:4px 6px;border-width:1px;box-shadow:0 2px 0 #6dacb1}
.profile-dialog #profile-edit-form{position:absolute;inset:8px;z-index:2;display:grid;grid-template-columns:1fr auto auto;gap:8px;align-content:center;padding:14px;background:#edfff9;border:2px solid #63c5bf;border-radius:14px;box-shadow:0 4px 14px #27748533}
#profile-edit-form label{grid-column:1/-1;font-size:13px;font-weight:800}
#profile-edit-form input{min-width:0;padding:9px;border:2px solid #8bd3d0;border-radius:8px;color:#174f69;background:#fffef5}
#profile-tab-content{flex:1;min-height:0;overflow:auto;padding:0;background:#e8fff2dc;border:2px solid #effff8;border-radius:19px;box-shadow:0 4px 0 #4a9ca758}
#profile-tab-content>h2{font:800 28px/1.1 'Baloo 2',sans-serif;margin:20px 20px 6px;color:#226385;letter-spacing:-.5px}
#profile-tab-content>p{margin:0 20px 18px;color:#598293;font-size:12px;line-height:1.5}
.profile-overview{display:grid;grid-template-columns:35% minmax(0,1fr);gap:8px;height:100%;min-height:0}
.profile-stats-side{padding:13px;background:linear-gradient(#c9f6e5,#b6e5df);min-width:0;min-height:0}
.profile-collection{display:flex;justify-content:center;align-items:center;gap:10px;padding:7px 0;color:#437b76;font-size:10px;font-weight:800}
.profile-collection .collection-star{font-size:39px;line-height:1;color:#d69c37;text-shadow:0 1px 0 white}
.profile-collection strong{display:block;font:800 28px/1 'Baloo 2',sans-serif;color:#2b717f;margin-top:3px}
.profile-collection-stats{display:flex;justify-content:space-around;text-align:center;gap:5px;padding:14px 0 16px}
.profile-collection-stats strong,.profile-season-stats strong{display:block;font:800 22px/1.15 'Baloo 2',sans-serif;color:#1b617b}
.profile-collection-stats span,.profile-season-stats span{font-size:10px;color:#538188}
.profile-favorite-heroes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.profile-dialog .profile-favorite-heroes button{padding:1px;height:104px;border:2px solid #f6fff0;border-radius:12px;background:linear-gradient(#c0f6f1,#6cbccf);box-shadow:0 3px 0 #4d9aaa}
.profile-favorite-heroes button:nth-child(2){background:linear-gradient(#ffefbb,#ecc38a)}
.profile-favorite-heroes button:nth-child(3){background:linear-gradient(#e7deff,#b7b2e4)}
.profile-favorite-heroes img{width:100%;height:100%;object-fit:contain}
.profile-mode-counts{display:grid;gap:5px;margin-top:14px}
.profile-mode-counts>div{display:flex;justify-content:space-between;gap:7px;padding:9px 10px;font-size:10px;background:#effff9a6;border:1px solid #f8fff8;border-radius:8px;color:#47757a}
.profile-mode-counts strong{font-weight:900;color:#33727d}
.profile-rank-card{display:flex;flex-direction:column;min-width:0;min-height:0;background:linear-gradient(#eefdf5,#daf4ea);overflow:hidden}
.profile-season{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:41px;padding:7px 12px;font-size:11px;font-weight:900;color:#376d80;background:#abdfda}
.profile-dialog .profile-season button{font-size:9px;padding:4px 7px;border-width:1px;border-radius:7px}
.profile-season-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));background:#fffdf0;border-bottom:1px solid #c5e3d9}
.profile-season-stats>div{padding:16px 6px;text-align:center;border-right:1px solid #c5e3d9}
.profile-ranks{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:24px 15px 10px;flex:1;min-height:0;align-items:center;text-align:center;background:radial-gradient(ellipse at 50% 60%,#fff9bf,transparent 70%)}
.profile-ranks>div>span{display:block;font:800 19px/1 'Baloo 2',sans-serif;color:#4c817f;margin-bottom:14px}
.profile-ranks svg{display:block;width:100%;max-height:110px;fill:#d9e8c9;stroke:#78a590;stroke-width:2;filter:drop-shadow(0 4px 0 #acc9b755)}
.profile-ranks>div:nth-child(2) svg{transform:scale(1.1);stroke:#c3a35e;fill:#f3e4ad}
.profile-ranks small{display:inline-block;font-size:8px;letter-spacing:1.3px;color:#68887a;font-weight:900;padding:4px 8px;background:#f3fbdf;border:1px solid #d2e6c4;border-radius:6px}
.profile-rank-label{text-align:center;padding:15px 10px 19px}
.profile-rank-label strong{display:block;color:#648375;font:800 20px/1.1 'Baloo 2',sans-serif}
.profile-rank-label span{display:block;font-size:10px;line-height:1.5;color:#799688;margin-top:5px}
.profile-career{display:flex;align-items:center;justify-content:center;gap:14px;min-height:39px;background:#b4dbd2;font-size:10px;color:#4c7d76;font-weight:800;flex:none}
.profile-career strong{color:#4b837f;font-size:19px}
.profile-notice{min-height:0;font-size:10px!important;line-height:1.2!important;margin:0!important;color:#24747d!important}
.profile-notice:empty{display:none}
.profile-hero{position:relative;min-width:0;min-height:0}
.profile-character-stage{position:absolute;inset:0}
#profile-character{position:absolute;left:0;bottom:23%;width:100%;height:66%;z-index:1;pointer-events:none;filter:drop-shadow(0 10px 5px #456c8022)}
#profile-character>img{width:100%;height:100%;object-fit:contain;object-position:bottom}
#profile-character canvas{position:absolute;pointer-events:none}
#profile-character canvas[hidden]{display:none}
#profile-character.dance-ready>img{visibility:hidden}
.profile-pedestal{position:absolute;bottom:17%;left:3%;width:94%;height:15%;border-radius:50%;background:radial-gradient(ellipse at 50% 30%,#fffbe0 0%,#f8e2a4 48%,#dfb976 51%,#f6d68d 57%,#abdfc0 60%,#61bdb9 72%);border:3px solid #b8f9df;box-shadow:0 7px 0 #338f9b,0 16px 16px #326d6340;transform:rotate(-3deg)}
.profile-hero-actions{position:absolute;bottom:4%;left:0;right:0;text-align:center;z-index:2}
.profile-hero-actions h2{font:800 31px/1 'Baloo 2',sans-serif;margin:0 0 10px;color:#194b70;text-shadow:0 2px 0 #f1fff3,0 0 12px #fff9;letter-spacing:-.5px}
.profile-hero-actions>div{display:flex;justify-content:center;gap:7px}
.profile-dialog #profile-change-character{background:linear-gradient(#fffdf2,#c7eee5);border-color:#fff;box-shadow:0 4px 0 #4596a5;padding:10px 16px}
.profile-avatar-grid,.profile-hero-stats,.profile-frame-grid,.profile-collection-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;padding:0 18px 18px}
.profile-avatar-grid article,.profile-hero-stats article,.profile-collection-grid article{min-width:0;text-align:center;background:linear-gradient(#fffef3,#d1eee6);border:2px solid #fff;padding:9px;border-radius:14px;box-shadow:0 3px 0 #91c9c1}
.profile-avatar-grid img,.profile-collection-grid img{width:100%;height:100px;object-fit:contain}
.profile-avatar-grid strong,.profile-collection-grid strong{display:block;font:800 17px/1.1 'Baloo 2',sans-serif;color:#376d86}
.profile-avatar-grid span,.profile-collection-grid span{display:block;font-size:9px;color:#72988c}
.profile-avatar-grid button{display:block;width:100%;margin-top:7px;font-size:9px}
.profile-dialog button[aria-pressed=true]{border-color:#fffbdd;background:linear-gradient(#ffe7a4,#ffc875);box-shadow:0 3px 0 #c09a57;color:#7a5b2e}
.profile-hero-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
.profile-hero-stats article{display:flex;align-items:center;gap:12px;text-align:left}
.profile-hero-stats img{width:50px;height:64px;object-fit:contain}
.profile-hero-stats strong{display:block;font-size:13px;color:#326779}.profile-hero-stats span{font-size:10px;color:#739587}
[data-frame=mint]{--frame-color:#6acfc0}[data-frame=gold]{--frame-color:#e5bf62}[data-frame=coral]{--frame-color:#ea9a86}[data-frame=violet]{--frame-color:#b8a1ed}
.profile-dialog .profile-frame-grid button{border:4px solid var(--frame-color);padding:9px;border-radius:14px}
.profile-frame-grid img{display:block;width:100%;height:110px;object-fit:contain}
.profile-match,.profile-achievement{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px;margin:0 18px 10px;border:2px solid #fff;background:#f9fff1;border-radius:12px;box-shadow:0 3px 0 #a8d7ca}
.profile-match img{width:42px;height:52px;object-fit:contain}.profile-match strong,.profile-achievement strong{display:block;font-size:13px;color:#3b6f7d}.profile-match span,.profile-achievement span{font-size:10px;color:#7e9a8e}
.profile-empty{display:grid;place-items:center;min-height:160px;margin:16px;padding:25px;text-align:center;font-size:14px;border:2px solid #fff;color:#698c83;background:#d5eee1;border-radius:14px}
.profile-season-stats>div,.profile-collection-stats>div{font-size:11px;line-height:1.3}
.profile-ranks>div{font-size:10px;line-height:1.2}
@media(max-width:1450px){.profile-top{gap:10px;padding:10px 19px}.profile-top nav{gap:5px}.profile-top nav button{padding:9px 8px}.profile-body{gap:20px;padding:22px}.profile-identity{grid-template-columns:76px minmax(0,1fr);gap:10px 13px;padding:12px;min-height:127px}.profile-id{position:absolute;right:13px;top:10px;flex-direction:row;align-items:center;gap:5px}.profile-club{display:none}.profile-name-row{padding-right:150px}.profile-favorite-heroes button{height:95px!important}}
@media(max-width:1100px){.profile-top h1{font-size:27px}.profile-top nav button{font-size:9px;padding:8px 6px}.profile-top{padding:9px 13px;gap:8px}.profile-body{gap:15px;padding:18px;grid-template-columns:minmax(0,2.3fr) minmax(165px,1fr)}.profile-name-row{padding-right:0}.profile-id{position:static;grid-column:2;flex-direction:row;padding:0;align-items:center}.profile-identity{min-height:132px;gap:4px 10px}.profile-avatar{grid-row:1/3}.profile-rank-label strong{font-size:17px}.profile-stats-side{padding:9px}.profile-favorite-heroes button{height:76px!important}.profile-ranks svg{max-height:85px}.profile-hero-actions h2{font-size:28px}}
@media(max-height:600px){
 .profile-top{height:44px;gap:8px;padding:4px 11px}.profile-top h1{font-size:22px;margin:0 2px 0 0}.profile-top nav{gap:4px;padding:2px 1px 4px}.profile-top nav button{font-size:8px;padding:6px 5px;border-width:1px;border-radius:7px;box-shadow:0 2px 0 #4399ae}.profile-top .profile-back{padding:5px 7px;font-size:8px;border-width:1px;border-radius:7px}
 .profile-body{height:calc(100% - 44px);padding:9px 11px 10px;gap:10px;grid-template-columns:minmax(0,2.65fr) minmax(140px,1fr)}.profile-info-column{gap:7px}.profile-identity{min-height:72px;height:72px;flex:none;grid-template-columns:45px minmax(0,1fr);padding:5px 7px;gap:0 8px;border-radius:12px;border-width:1px;box-shadow:0 3px 0 #58aeb650}.profile-dialog .profile-avatar{width:43px;height:60px;border-radius:9px;border-width:2px;grid-row:1}.profile-avatar img{height:42px}.profile-avatar span{font-size:5px;padding:3px 0}.profile-name-row{height:20px;gap:6px;padding-right:0}.profile-name-row>strong{font-size:13px}.profile-name-row button,.profile-title-row button,.profile-label-row button{min-width:18px;min-height:16px;padding:1px 4px;font-size:10px;border-width:1px;border-radius:5px}.profile-title-row,.profile-label-row{font-size:8px;min-height:17px;margin-top:3px;padding-left:6px;border-radius:5px}.profile-id{position:absolute;right:7px;top:6px;grid-column:auto;flex-direction:row;gap:5px;align-items:center;font-size:6px;padding:0}.profile-id>span{display:none}.profile-dialog #copy-profile-id{font-size:6px;padding:3px 4px;border-radius:5px;box-shadow:0 1px 0 #6dacb1}
 #profile-tab-content{border-radius:12px;border-width:1px;box-shadow:0 3px 0 #4a9ca748}.profile-overview{gap:5px}.profile-stats-side{padding:5px 6px}.profile-collection{padding:2px 0;gap:7px;font-size:7px}.profile-collection .collection-star{font-size:25px}.profile-collection strong{font-size:18px;margin:0}.profile-collection-stats{padding:6px 0 7px}.profile-collection-stats strong,.profile-season-stats strong{font-size:14px}.profile-collection-stats span,.profile-season-stats span{font-size:7px}.profile-favorite-heroes{gap:4px}.profile-dialog .profile-favorite-heroes button{height:43px!important;border-radius:7px;border-width:1px;box-shadow:0 2px 0 #4d9aaa}.profile-mode-counts{gap:3px;margin-top:7px}.profile-mode-counts>div{font-size:7px;padding:3px 5px;border-radius:5px}
 .profile-season{min-height:23px;padding:4px 6px;font-size:8px;gap:4px}.profile-dialog .profile-season button{font-size:6px;padding:3px 4px;border-radius:5px;box-shadow:0 1px 0 #b99c5c}.profile-season-stats>div{padding:5px 3px}.profile-ranks{padding:7px 6px 3px;gap:4px}.profile-ranks>div>span{font-size:12px;margin-bottom:3px}.profile-ranks svg{max-height:38px}.profile-ranks small{font-size:5px;letter-spacing:1px;padding:2px 4px;border-radius:4px}.profile-rank-label{padding:4px 5px 6px}.profile-rank-label strong{font-size:12px}.profile-rank-label span{font-size:7px;line-height:1.25;margin-top:2px}.profile-career{min-height:21px;font-size:7px;gap:8px;line-height:1.1}.profile-career strong{font-size:12px}.profile-notice{font-size:7px!important}
 #profile-character{height:70%;bottom:23%}.profile-pedestal{bottom:18%;height:13%;border-width:2px;box-shadow:0 4px 0 #338f9b,0 10px 10px #326d6330}.profile-hero-actions{bottom:2%}.profile-hero-actions h2{font-size:20px;margin-bottom:6px}.profile-dialog #profile-change-character{font-size:8px;padding:6px 9px;border-radius:8px;border-width:1px;box-shadow:0 3px 0 #4596a5}
 #profile-tab-content>h2{font-size:20px;margin:9px 11px 4px}#profile-tab-content>p{font-size:9px;margin:0 11px 9px}.profile-avatar-grid,.profile-hero-stats,.profile-frame-grid,.profile-collection-grid{padding:0 9px 9px;gap:6px}.profile-avatar-grid article,.profile-hero-stats article,.profile-collection-grid article{border-width:1px;padding:5px;border-radius:9px}.profile-avatar-grid img,.profile-collection-grid img{height:56px}.profile-frame-grid .profile-frame-swatch{height:94px}.profile-avatar-grid strong,.profile-collection-grid strong{font-size:12px}.profile-avatar-grid span,.profile-collection-grid span{font-size:7px}.profile-avatar-grid button{font-size:7px;padding:4px;margin-top:5px;border-width:1px;border-radius:6px;box-shadow:0 2px 0 #4b99a8}.profile-hero-stats article{gap:6px}.profile-hero-stats img{width:32px;height:46px}.profile-hero-stats strong{font-size:10px}.profile-hero-stats span{font-size:8px}.profile-dialog .profile-frame-grid button{border-width:3px;border-radius:9px;font-size:9px;padding:5px}.profile-empty{font-size:10px;min-height:95px;margin:9px;padding:15px}.profile-match,.profile-achievement{padding:7px;margin:0 9px 6px;border-width:1px;border-radius:8px}.profile-match strong,.profile-achievement strong{font-size:10px}.profile-match span,.profile-achievement span{font-size:8px}.profile-match img{width:32px;height:42px}
}
@media(max-height:600px) and (max-width:720px){.profile-top{padding-left:8px;padding-right:8px;gap:6px}.profile-top h1{font-size:20px}.profile-body{grid-template-columns:minmax(0,2.85fr) minmax(118px,1fr);gap:7px;padding-left:8px;padding-right:8px}.profile-overview{grid-template-columns:35% minmax(0,1fr)}.profile-stats-side{padding:5px 4px}.profile-collection{font-size:6px;gap:4px}.profile-collection .collection-star{font-size:22px}.profile-collection-stats span{font-size:6px}.profile-collection-stats{padding-top:7px;padding-bottom:8px}.profile-dialog .profile-favorite-heroes button{height:40px!important}.profile-mode-counts>div{font-size:6px;padding:4px}.profile-season{font-size:7px}.profile-rank-label strong{font-size:11px}.profile-rank-label span{font-size:6px}.profile-season-stats span{font-size:6px}.profile-hero-actions h2{font-size:18px}.profile-dialog #profile-change-character{font-size:7px;padding:6px 7px}.profile-id{right:6px;top:6px}}
/* Landscape phones keep the full overview visible; avoid inherited text struts inflating rows. */
@media(max-height:600px){
 .profile-body{padding-top:7px;padding-bottom:8px}.profile-identity{height:68px;min-height:68px}.profile-info-column{gap:6px}
 .profile-stats-side{line-height:1.2}.profile-collection{line-height:1.15}.profile-collection-stats{padding:4px 0 6px}.profile-collection-stats>div,.profile-season-stats>div{font-size:7px;line-height:1.1}.profile-collection-stats span,.profile-season-stats span{display:block;margin-top:2px}.profile-mode-counts{gap:3px;margin-top:6px}.profile-mode-counts>div{padding:3px 4px;line-height:1.15}
 .profile-rank-card{display:grid;grid-template-rows:24px 34px minmax(59px,1fr)26px 19px}.profile-season{min-height:0;padding:3px 6px}.profile-season-stats>div{padding:4px 3px}.profile-ranks{padding:2px 6px;min-height:59px}.profile-ranks>div{font-size:6px;line-height:1}.profile-ranks>div>span{font-size:11px;margin-bottom:2px}.profile-ranks svg{max-height:30px}.profile-ranks small{font-size:5px;line-height:1;padding:2px 4px;margin-top:1px}.profile-rank-label{padding:1px 4px 2px}.profile-rank-label strong{font-size:11px}.profile-rank-label span{font-size:6px;line-height:1.15;margin-top:2px}.profile-career{min-height:0;font-size:7px}.profile-career strong{font-size:12px}
}
/* Secondary text uses solid island navy; compact layout trades padding for readable labels. */
.profile-title-row,.profile-label-row,.profile-club,.profile-id,#profile-tab-content>p,.profile-collection-stats span,.profile-season-stats span,.profile-mode-counts>div,.profile-rank-label span,.profile-career,.profile-avatar-grid span,.profile-collection-grid span,.profile-hero-stats span,.profile-match span,.profile-achievement span{color:#356477}
.profile-rank-label strong,.profile-ranks>div>span,.profile-ranks small{color:#3c716f}
@media(min-height:601px){
 .profile-title-row,.profile-label-row{font-size:12px}.profile-id{font-size:10px}.profile-dialog #copy-profile-id{font-size:9px}.profile-club{font-size:12px}.profile-name-row>strong{font-size:22px}
 .profile-collection{font-size:12px}.profile-collection-stats span,.profile-season-stats span{font-size:12px}.profile-collection-stats strong,.profile-season-stats strong{font-size:25px}.profile-mode-counts>div{font-size:12px}.profile-favorite-heroes button{height:120px!important}.profile-season{font-size:12px}.profile-dialog .profile-season button{font-size:10px}.profile-ranks small{font-size:10px}.profile-rank-label span,.profile-career{font-size:12px}.profile-top nav button{font-size:11px}
}
@media(max-height:600px){
 .profile-top{height:42px}.profile-top nav button{font-size:9px;padding:6px}.profile-top .profile-back{font-size:9px}.profile-body{height:calc(100% - 42px);padding-top:5px;padding-bottom:7px}
 .profile-identity{height:62px;min-height:62px;padding-top:3px;padding-bottom:3px}.profile-dialog .profile-avatar{height:54px}.profile-avatar img{height:46px}.profile-avatar span{display:none}.profile-name-row{height:18px}.profile-name-row>strong{font-size:14px}.profile-title-row,.profile-label-row{font-size:9px;min-height:16px;margin-top:2px}.profile-name-row button,.profile-title-row button,.profile-label-row button{min-height:16px}.profile-dialog #copy-profile-id{font-size:8px;padding:3px 5px}.profile-id{top:4px}
 .profile-stats-side{padding:4px}.profile-collection{font-size:9px;padding:1px 0;gap:4px}.profile-collection .collection-star{font-size:23px}.profile-collection strong{font-size:17px}.profile-collection-stats{padding:3px 0 5px;gap:2px}.profile-collection-stats>div{font-size:9px;line-height:1.05}.profile-collection-stats strong{font-size:14px;line-height:1.05}.profile-collection-stats span{font-size:9px;line-height:1.1;white-space:nowrap;letter-spacing:-.25px;margin-top:2px}.profile-dialog .profile-favorite-heroes button{height:35px!important}.profile-mode-counts{gap:3px;margin-top:6px}.profile-mode-counts>div{font-size:9px;padding:3px 4px;line-height:1.1}
 .profile-rank-card{grid-template-rows:25px 35px minmax(65px,1fr)31px 23px}.profile-season{font-size:9px}.profile-dialog .profile-season button{font-size:8px;padding:3px 4px}.profile-season-stats>div{font-size:9px;line-height:1.05;padding:3px}.profile-season-stats strong{font-size:15px;line-height:1.05}.profile-season-stats span{font-size:9px;line-height:1.1;margin-top:2px}.profile-ranks{min-height:65px;padding:2px 6px}.profile-ranks>div>span{font-size:12px}.profile-ranks svg{max-height:28px}.profile-ranks small{font-size:8px;line-height:1;padding:2px 4px;letter-spacing:.5px}.profile-rank-label{padding:2px 4px}.profile-rank-label strong{font-size:12px}.profile-rank-label span{font-size:9px;line-height:1.1;margin-top:2px}.profile-career{font-size:9px}.profile-hero-actions h2{font-size:20px}.profile-dialog #profile-change-character{font-size:9px;padding:6px 8px}
}
@media(max-height:600px){.profile-dialog #profile-edit-form{inset:3px;min-height:82px;padding:8px;border-radius:10px;box-shadow:0 5px 15px #27748555}#profile-edit-form label{font-size:11px}#profile-edit-form input{font-size:11px;padding:6px}}
@media(max-height:600px){.profile-dialog .profile-season button,.profile-ranks small{font-size:9px}}
/* Match list and battle details share the full inner frame, like the reference. */
.profile-dialog[data-tab="Match History"] .profile-body{grid-template-columns:minmax(0,1fr)}
.profile-dialog[data-tab="Match History"] .profile-identity,.profile-dialog[data-tab="Match History"] .profile-hero{display:none}
.profile-dialog[data-tab="Match History"] .profile-info-column{gap:0}
.profile-dialog[data-tab="Collections"] .profile-body{grid-template-columns:minmax(0,1fr)}
.profile-dialog[data-tab="Collections"] .profile-identity,.profile-dialog[data-tab="Collections"] .profile-hero{display:none}
.profile-dialog[data-tab="Collections"] .profile-info-column{gap:0}
#profile-tab-content[data-tab="Collections"]{padding:14px 17px}
@media(max-height:600px){#profile-tab-content[data-tab="Collections"]{padding:7px 9px}}
.profile-season-status{padding:4px 9px;border:1px solid #fff7c4;border-radius:7px;background:#ffe5a3;color:#7b6030;font-size:10px;font-weight:900}
.profile-live-ranks{align-items:center;gap:10px}.profile-dialog .profile-live-ranks button{background:#f5fff1b8;border:2px solid #faffee;border-radius:15px;padding:12px 7px;box-shadow:0 3px 0 #a0c7b4;min-width:0;color:#3b706f}
.profile-dialog .profile-live-ranks button[aria-pressed=true]{background:linear-gradient(#fff5c2,#f8dea1);border-color:#fff;box-shadow:0 3px 0 #c4a675;color:#785d30}
.profile-live-ranks button>span{display:block;font:800 19px/1 'Baloo 2',sans-serif;margin-bottom:7px}.profile-live-ranks button>strong{display:block;font:800 16px/1.2 'Baloo 2',sans-serif;margin:3px 0 6px}.profile-live-ranks button>small{font-size:11px;letter-spacing:0;padding:3px 7px;background:#f8ffec;color:inherit;border-radius:5px;border:1px solid #d8e8c3}
.profile-live-ranks button svg{max-height:104px;fill:#dce8c7;stroke:#87a283}.profile-live-ranks button[data-tier="Bronze"] svg{fill:#e5c4a0;stroke:#ac8258}.profile-live-ranks button[data-tier="Silver"] svg{fill:#d3e9ea;stroke:#7199a1}.profile-live-ranks button[data-tier="Gold"] svg{fill:#f9e2a0;stroke:#c5a15e}.profile-live-ranks button[data-tier="Platinum"] svg{fill:#c4e8df;stroke:#5a9d98}.profile-live-ranks button[data-tier="Solar"] svg{fill:#fde193;stroke:#df9453}
.profile-rank-progress{height:7px;margin:9px auto 0;width:78%;border-radius:10px;background:#b1d9d0;border:1px solid #8cbcb4;overflow:hidden}.profile-rank-progress>span{display:block;height:100%;margin:0;background:linear-gradient(90deg,#45aeb9,#92d5b5);border-radius:inherit}
#profile-tab-content[data-tab="Season Stats"]>.profile-rank-card{height:calc(100% - 92px);margin:0 15px 15px;border:1px solid #b5d6ca;border-radius:13px}
.hero-performance>header .hero-points-badge{font-weight:900;color:#427483}.hero-mode-filter{flex-wrap:wrap;justify-content:flex-end}
@media(max-height:600px){.profile-season-status{font-size:8px;padding:3px 5px;border-radius:5px}.profile-live-ranks{gap:5px;padding:2px 6px}.profile-dialog .profile-live-ranks button{border-width:1px;border-radius:7px;padding:4px 3px;box-shadow:0 2px 0 #a0c7b4}.profile-live-ranks button>span{font-size:11px;margin-bottom:1px}.profile-live-ranks button svg{max-height:27px}.profile-live-ranks button>strong{font-size:10px;margin:1px 0 3px}.profile-live-ranks button>small{font-size:9px;padding:1px 4px;border-radius:4px}.profile-rank-card{grid-template-rows:25px 35px minmax(70px,1fr)31px 23px}.profile-rank-label>strong{display:none}.profile-rank-progress{height:5px;margin-top:4px}.profile-rank-label>span{font-size:9px}.profile-career strong{font-size:11px}#profile-tab-content[data-tab="Season Stats"]>.profile-rank-card{height:calc(100% - 62px);margin:0 8px 8px}}
.profile-dialog[data-tab="Season Stats"] .profile-identity{display:none}.profile-dialog[data-tab="Season Stats"] .profile-info-column{gap:0}
.profile-rank-emblem{width:104px;height:104px;max-width:100%;margin:0 auto}
@media(max-height:600px){.profile-rank-emblem{width:32px;height:32px}.profile-live-ranks .rank-badge>img{filter:drop-shadow(0 1px 1px #165d6b55)}}
@media(max-height:600px){/* V32 (root final check 4): same row sizes as minimums. The cards row never shrinks below its content; the other rows grow to their content only when the card has spare height, so on the shortest phone frames the season and summary rows can stay at 22px/32px with up to 3px of content past them, without text overlap or clipping (measured, root final-v1-finish-02) */.profile-rank-card{grid-template-rows:minmax(22px,auto) minmax(32px,auto) minmax(min-content,1fr) minmax(24px,auto) minmax(22px,auto)}.profile-dialog .profile-live-ranks button{padding:2px 3px}.profile-live-ranks button svg{max-height:23px}.profile-live-ranks button>strong{font-size:9px;line-height:1;margin:1px 0}.profile-live-ranks button>small{font-size:9px;line-height:1;padding:1px 4px}.profile-live-ranks button>span{font-size:11px;line-height:1;margin-bottom:1px}}
.profile-favorite-empty{display:grid;place-items:center;min-height:90px;color:#7eafb8;font-size:32px;border:2px dashed #b8ded6;border-radius:12px;background:#eaffed88}

/* Collection is opened directly from the island, outside profile navigation. */
.profile-dialog[data-tab="Collections"] .profile-top nav{display:none}
.profile-dialog[data-tab="Collections"] .profile-back{margin-left:auto}
.profile-dialog .profile-avatar{border-color:var(--avatar-frame-color,var(--frame-color,#61cbbd));box-shadow:0 2px 0 var(--avatar-frame-accent,#e6fff1)}
.profile-dialog .profile-avatar img{object-fit:cover;object-position:50% 43%;height:70px}
.profile-avatar-option{display:flex;flex-direction:column;align-items:stretch;gap:4px}
.profile-avatar-option .profile-avatar-art{aspect-ratio:1;min-height:0;overflow:hidden;border:3px solid var(--avatar-frame-color,#52c9bd);border-radius:11px;background:#dff8ef;box-shadow:0 2px 0 var(--avatar-frame-accent,#e6fff1)}
.profile-avatar-option .profile-avatar-art img{display:block;width:100%;height:100%;object-fit:cover;object-position:50% 43%}
.profile-avatar-option strong,.profile-avatar-option span{display:block}
.profile-avatar-option[data-avatar-kind="legendary"] .profile-avatar-art{background:linear-gradient(145deg,#fff3ba,#d4a84d 45%,#6b4a87)}
.profile-frame-grid{align-items:stretch}
.profile-frame-grid button{display:flex;flex-direction:column;align-items:stretch;gap:5px;background:linear-gradient(#fffef3,#d1eee6);border-color:var(--avatar-frame-color,#52c9bd);box-shadow:0 3px 0 var(--avatar-frame-accent,#e6fff1)}
.profile-frame-grid .profile-frame-swatch{height:128px;border:0;border-radius:10px;background-color:#e9f8f1;background-size:contain;background-position:center;background-repeat:no-repeat;display:block;overflow:hidden}
.profile-frame-grid .profile-frame-swatch img{display:none}
.profile-frame-grid button strong{font-size:12px;color:#376d86}
.profile-frame-grid button small{font-size:8px;color:#72988c}
/* Avatar and frame share one square outer edge; the label sits inside the lower edge. */
.profile-dialog .profile-avatar{width:86px;height:86px;aspect-ratio:1;padding:0;border-radius:14px}
.profile-dialog .profile-avatar img{position:absolute;left:16.5%;top:16.5%;width:67%;height:67%;margin:0;object-fit:contain;object-position:50% 43%}
.profile-dialog .profile-avatar span:not(.profile-avatar-frame){position:absolute;left:4px;right:4px;bottom:3px;padding:3px 0;border-radius:5px;background:#edfff2e8}
.profile-dialog .profile-avatar-frame{inset:0}
.profile-frame-grid .profile-frame-swatch{width:100%;height:auto;aspect-ratio:1}
@media(max-height:600px){
 .profile-dialog .profile-avatar{width:54px;height:54px;border-radius:9px}
 .profile-dialog .profile-avatar img{width:67%;height:67%}
 .profile-dialog .profile-avatar span:not(.profile-avatar-frame){left:2px;right:2px;bottom:2px;padding:2px 0;font-size:5px}
}
/* Profile tabs use the full dialog width; the decorative character stage is omitted. */
.profile-body{grid-template-columns:minmax(0,1fr)}
.profile-dialog .profile-hero{display:none}
/* Every standalone emblem gets the same square paint box and scale. */
.profile-avatar-option .profile-avatar-art{width:100%;height:auto;aspect-ratio:1;box-sizing:border-box;display:grid;place-items:center}
.profile-avatar-option .profile-avatar-art img{width:100%;height:100%;aspect-ratio:1;object-fit:cover;object-position:center}
/* The frame owns the square edge; remove the old yellow card backing. */
.profile-dialog .profile-avatar{background:transparent}

/* Source viewports remove each tile's own gutters; no rarity-specific zoom. */
.profile-avatar-option .profile-avatar-art{position:relative;flex:none}
.profile-avatar-option .profile-avatar-art img{position:absolute;inset:0;display:block;max-width:none;max-height:none;transform:none}
.profile-avatar-option>strong{min-height:2.2em}
.profile-avatar-option>button{margin-top:auto}
@media(max-width:600px){
 .profile-avatar-grid,.profile-frame-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:0 12px 14px}
 .profile-avatar-grid strong{font-size:14px;line-height:1.2}
 .profile-dialog .profile-frame-grid button{padding:8px}
 .profile-frame-grid button strong{font-size:12px;line-height:1.25;min-height:2.5em}
}
/* V32 (user economy decision 2026-10-01): Season Stats shows what each season-end rank pays (Mochi's Legendary items and,
   from Platinum, Splash Chests). On wide screens it sits beside the heading, in the band the heading already takes, so
   the rank card keeps its size (it ends at the tab's foot, where its bottom margin used to scroll); on short (phone) screens it is a compact strip under the heading (in place of the 9px
   line) and the rank card keeps its size below it, so the tab scrolls a little. Text keeps the 11px phone floor. */
#profile-tab-content[data-tab="Season Stats"]:has(>.profile-season-rewards){display:grid;grid-template-columns:minmax(0,auto) minmax(0,1fr);grid-template-rows:auto auto minmax(0,1fr)}
#profile-tab-content[data-tab="Season Stats"]:has(>.profile-season-rewards)>h2{grid-column:1;grid-row:1}
#profile-tab-content[data-tab="Season Stats"]:has(>.profile-season-rewards)>p{grid-column:1;grid-row:2}
#profile-tab-content[data-tab="Season Stats"]>.profile-season-rewards{grid-column:2;grid-row:1/3;align-self:center}
#profile-tab-content[data-tab="Season Stats"]>.profile-season-rewards~.profile-rank-card{grid-column:1/-1;grid-row:3;height:auto;min-height:0;margin-bottom:1px}
.profile-season-rewards{display:flex;flex-direction:column;gap:5px;margin:10px 15px 8px 0;padding:6px 10px;border:1px solid #ecd49a;border-radius:13px;background:#fff8e6;color:#5b4a1e;min-width:0}
.profile-season-rewards-head{display:flex;align-items:baseline;gap:2px 10px;flex-wrap:wrap}
.profile-season-rewards h3{margin:0;font:800 15px/1.2 'Baloo 2',sans-serif;color:#7a5200}
.profile-season-rewards-rule{font-size:12px;line-height:1.3;color:#5b4a1e}
.profile-season-rewards-list{display:flex;flex-wrap:wrap;gap:5px;margin:0;padding:0;list-style:none}
.profile-season-rewards-list li{display:flex;align-items:baseline;gap:5px;margin:0;padding:3px 8px;border-radius:9px;background:#fff;border:1px solid #f0dfb2;min-width:0}
.profile-season-rewards-list b{font-size:12px;font-weight:900;line-height:1.25;color:#6b4800;white-space:nowrap}
.profile-season-rewards-list span{font-size:12px;line-height:1.25;color:#4d3d12}
.profile-season-rewards-last{margin:0!important;font-size:12px!important;line-height:1.3!important;font-weight:800;color:#4d3d12!important}
@media(max-height:600px){
 #profile-tab-content[data-tab="Season Stats"]:has(>.profile-season-rewards){display:flex;flex-direction:column}
 #profile-tab-content[data-tab="Season Stats"]:has(>.profile-season-rewards)>*{flex:none}
 #profile-tab-content[data-tab="Season Stats"]:has(>.profile-season-rewards)>p{display:none}
 #profile-tab-content[data-tab="Season Stats"]>.profile-season-rewards{align-self:stretch;margin:0 8px 5px}
 #profile-tab-content[data-tab="Season Stats"]>.profile-season-rewards~.profile-rank-card{height:calc(100% - 62px);min-height:0;margin-bottom:8px}
 .profile-season-rewards{padding:3px 8px;gap:2px;border-radius:9px}
 .profile-season-rewards h3{font-size:13px}
 .profile-season-rewards-rule,.profile-season-rewards-list b,.profile-season-rewards-list span,.profile-season-rewards-last{font-size:11px!important}
 .profile-season-rewards-list{gap:4px}
 .profile-season-rewards-list li{padding:1px 6px;border-radius:6px}
}
/* V32 (root final check 4): in My Info and Season Stats the selected-rank caption and its progress bar sit below the
   three format cards, never on them. The cards' row keeps its content height (it used to shrink, so the cards spilled
   under the caption) and the rank card scrolls inside its frame when that frame is shorter. */
.profile-rank-card{overflow-x:hidden;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#80c6cd transparent}
.profile-rank-card>.profile-live-ranks{flex:1 0 auto}
/* V32 (root final check 5): owned counts carry their catalog size ("3 of 12"), at label size beside the number. */
.profile-collection strong>small,.profile-collection-stats strong>small{font-size:12px;font-weight:800;letter-spacing:0;color:#356477}
.profile-collection-stats strong{white-space:nowrap}
@media(max-height:600px){.profile-collection strong>small,.profile-collection-stats strong>small{font-size:9px}}
/* V32 (root final check 5 r1): owned outfits still waiting for their hero, as visible text under the tile label. Above
   600px tall the note takes 12px of the row's padding, so the row keeps its height and nothing below it moves. */
.profile-collection-stats .profile-count-note{display:block;margin-top:1px;font-size:.9em;font-weight:800;line-height:1.1;white-space:normal;color:#356477}
@media(min-height:601px){.profile-collection-stats:has(.profile-count-note){padding-top:8px;padding-bottom:10px}}
/* root final-v1-finish-02: while the account loads a count shows the same dash as before (not styled as a tile label)
   and screen readers read "Loading" instead. */
.profile-dialog .profile-count-dash{display:inline;margin:0;font:inherit;letter-spacing:inherit;color:inherit;white-space:inherit}
.profile-dialog .profile-sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
