/* TO THE BEATZ v21.9.4: Cosmetics UI + battle header preservation */
#ttb2192-shop-tabs{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important;margin:12px 0 16px!important;position:relative;z-index:5}
#ttb2192-shop-tabs button{display:block!important;font-size:12px!important;min-height:46px!important;visibility:visible!important}
#ttb2191-cosmetics{display:block;overflow:visible!important}#ttb2191-cosmetics[hidden],.shop-panel-v12[hidden]{display:none!important}
.ttb2194-try{border:0!important;background:transparent!important;color:#b7ecff!important;width:100%;display:grid!important;justify-items:center;gap:3px;cursor:pointer;padding:0!important;min-height:0!important}
.ttb2194-try .ttb2191-art{display:grid;width:100%;min-height:0}.ttb2194-try>small{font-size:9px!important;font-weight:900!important;color:#70ddec}
.ttb2191-card .ttb2194-try:hover .ttb2191-art{filter:brightness(1.15)}
/* Circumvent old profile/button and battle overflow clips on overlay rings. */
.topbar .top-actions-v12,.topbar .ttb2191-user-avatar,.v200-mini-avatar.ttb2191-user-avatar,.ttb216-player-avatar-wrap.ttb2191-user-avatar,.ttb2194-local-avatar.ttb2191-user-avatar{overflow:visible!important;position:relative!important;isolation:isolate!important}
.ttb2191-user-avatar>.ttb2191-photo{inset:0!important;width:100%!important;height:100%!important;position:absolute!important;object-fit:cover!important;z-index:3!important;max-width:none!important;border-radius:50%!important}
.ttb2191-user-avatar>.ttb2191-frame-layer,.ttb2191-avatar-display>.ttb2191-frame-layer{position:absolute!important;inset:-23%!important;left:-23%!important;top:-23%!important;width:146%!important;height:146%!important;object-fit:contain!important;z-index:20!important;max-width:none!important;pointer-events:none!important;transform:none!important;box-shadow:none!important}
.ttb2194-local-avatar{width:30px;height:30px;display:grid;place-items:center;border-radius:50%;background:#14384c;color:white;font-size:14px;flex:0 0 30px}
/* Explicit three counters rather than a clipped single line. */
.battle-top-v11 .battle-player-v11{overflow:visible!important;min-width:0!important;min-height:46px!important;height:auto!important;display:flex!important;flex-wrap:wrap!important;align-content:center!important;gap:1px 6px!important;padding:3px 4px!important}
.battle-top-v11 .battle-player-v11>.ttb2194-local-avatar,.battle-top-v11 .battle-player-v11>.ttb216-player-avatar-wrap,.battle-top-v11 .battle-player-v11>.ttb216-player-avatar,.battle-top-v11 .battle-player-v11>.ttb216-rival-avatar{flex:0 0 28px!important;width:28px!important;height:28px!important;float:none!important;object-fit:cover!important;align-self:center!important}
.battle-top-v11 .battle-player-v11>b{font-size:10px!important;display:block!important;flex:1 1 calc(100% - 36px)!important;min-width:0!important;line-height:13px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.battle-top-v11 .battle-player-v11>span.ttb2194-battle-counts{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:2px!important;flex:1 1 100%!important;min-width:0!important;white-space:normal!important;line-height:1.1!important;margin:2px 0 0!important;overflow:visible!important}
.ttb2194-battle-counts em{display:grid;gap:1px;padding:2px 0;background:rgba(45,198,233,.1);border-radius:4px;color:#badcec;font-size:clamp(6px,1.7vw,9px)!important;font-style:normal;text-align:center;white-space:nowrap;font-weight:700}
.ttb2194-battle-counts em b{font-size:clamp(9px,2.2vw,13px)!important;color:white!important;line-height:1.1!important;overflow:visible!important}
.battle-top-v11 .battle-player-v11 .v200-top-profile{width:100%;height:auto;overflow:visible!important;display:flex!important;align-items:center!important;gap:6px!important}
.battle-top-v11 .v200-top-profile>div:last-child{display:grid;flex:1;min-width:0;gap:2px}
.battle-top-v11 .v200-top-profile .ttb2194-battle-counts{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:2px;white-space:normal!important;margin:0!important}
.battle-top-v11{grid-template-columns:32px minmax(0,1fr) 24px minmax(0,1fr) 32px!important;gap:3px!important;min-height:54px!important;overflow:visible!important}
.battle-top-v11 .v200-mini-avatar.ttb2191-user-avatar{width:31px!important;height:31px!important;flex:0 0 31px!important}
@media(max-width:390px){.battle-top-v11 .battle-player-v11{padding:2px!important;gap:1px 2px!important}.ttb2194-battle-counts em{font-size:6px!important}}

.ttb2194-local-avatar>img:not(.ttb2191-frame-layer):not(.ttb2191-photo){width:100%!important;height:100%!important;object-fit:cover!important;border-radius:50%!important;display:block!important}

/* TO THE BEATZ v21.9.5 - one avatar ring across all social and battle surfaces */
/* Allow only the avatar's own frame to overflow; keep nickname in adjacent independent box. */
.top-actions-v12 button[data-nav="profile"].ttb2191-user-avatar,
.topbar button[data-nav="profile"].ttb2191-user-avatar,
.ttb-social-person .ttb-avatar.ttb2191-user-avatar,
#ttb-v201-rank-root .v201-avatar.ttb2191-user-avatar,
#ttb-v201-rank-root .v2102-avatar.ttb2191-user-avatar,
#ttb-v198-root .ttb-chat-avatar.ttb2191-user-avatar,
.v203-social-avatar.ttb2191-user-avatar,
.v200-mini-avatar.ttb2191-user-avatar,
.ttb2194-local-avatar.ttb2191-user-avatar,
.ttb216-player-avatar-wrap.ttb2191-user-avatar,
.profile-card .avatar.ttb2191-user-avatar {
  position:relative!important; overflow:visible!important; isolation:isolate!important;
  border-radius:50%!important; aspect-ratio:1!important; box-sizing:border-box!important;
}
/* No disproportionate 146% ring or overflow on text. */
.ttb2191-user-avatar > .ttb2191-frame-layer,
.ttb2191-avatar-display > .ttb2191-frame-layer {
  position:absolute!important; top:-11%!important; left:-11%!important;
  width:122%!important; height:122%!important; max-width:none!important;
  object-fit:contain!important; z-index:10!important; pointer-events:none!important;
  border:0!important; border-radius:0!important; transform:none!important;
}
.ttb2191-user-avatar > .ttb2191-photo {position:absolute!important;inset:0!important;width:100%!important;height:100%!important;object-fit:cover!important;border-radius:50%!important;pointer-events:none!important;}
/* Do not apply display:grid/36px general avatar constraint to larger profile/ranked/chat icons */
#ttb-v201-rank-root .v201-avatar.ttb2191-user-avatar {width:43px!important;height:43px!important;flex:0 0 43px!important;}
#ttb-v201-rank-root .v2102-avatar.ttb2191-user-avatar {width:56px!important;height:56px!important;flex:0 0 56px!important;}
.ttb-social-person .ttb-avatar.ttb2191-user-avatar{width:46px!important;height:46px!important;flex:0 0 46px!important;}
#ttb-v198-root .ttb-chat-avatar.ttb2191-user-avatar{width:42px!important;height:42px!important;flex:0 0 42px!important;}
.v203-social-avatar.ttb2191-user-avatar{width:40px!important;height:40px!important;flex:0 0 40px!important;}
.profile-card .avatar.ttb2191-user-avatar{width:60px!important;height:60px!important;flex:0 0 60px!important;}
/* The avatar is a separate fixed-size column; nickname never moves under frame. */
.battle-top-v11 .battle-player-v11{gap:3px 7px!important;min-width:0!important;}
.battle-top-v11 .battle-player-v11 .v200-top-profile{display:grid!important;grid-template-columns:30px minmax(0,1fr)!important;gap:9px!important;align-items:center!important;min-width:0!important;}
.battle-top-v11 .battle-player-v11 .v200-top-profile > div:last-child{min-width:0!important;padding-left:2px!important;}
.battle-top-v11 .battle-player-v11 .v200-top-profile b,
.battle-top-v11 .battle-player-v11 > b{min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;position:relative!important;z-index:12!important;}
.battle-top-v11 .ttb2194-local-avatar.ttb2191-user-avatar,
.battle-top-v11 .v200-mini-avatar.ttb2191-user-avatar{width:28px!important;height:28px!important;flex:0 0 28px!important;}
/* Never let parents clip overlay or shove label behind the ring. */
#ttb-v201-rank-root .v201-player,#ttb-v201-rank-root .v2102-identity,
.ttb-social-person,#ttb-v198-root .ttb-chat-head,.v203-social-row {overflow:visible!important;align-items:center!important;}
#ttb-v201-rank-root .v201-person,.ttb-social-person .ttb-person-meta,
#ttb-v198-root .ttb-chat-heading,.v203-social-copy{position:relative!important;z-index:15!important;min-width:0!important;margin-left:3px!important;}
/* Header avatars frequently live in a 40px icon button, not the old .topbar button image selector */
.top-actions-v12 button[data-nav="profile"].ttb2191-user-avatar{width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;}

/* v23.19 override anchor */
.battle-top-v11 .battle-player-v11>span.ttb2194-battle-counts,.battle-top-v11 .battle-player-v11 .ttb2194-battle-counts{display:flex!important;grid-template-columns:none!important;flex-wrap:nowrap!important;white-space:nowrap!important}.battle-top-v11 .battle-player-v11 .ttb2194-battle-counts em{display:inline-flex!important;flex-direction:row!important;background:transparent!important;border:0!important;padding:0!important}