.own-profile .account-tabs button{flex:1;width:auto}
.profile-cosmetic-hero{border-radius:16px;padding:8px;position:relative}
.profile-cosmetic-hero.has-profile-background{position:relative;isolation:isolate;overflow:hidden;color:white}
.profile-background-media,.has-profile-background::before{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.profile-background-media{object-fit:cover;z-index:-2}
.has-profile-background::before{content:"";background:linear-gradient(#12101670,#121016b0);z-index:-1}
.has-profile-background .creator-handle{color:#fff}
.creator-identity .cosmetic-avatar,.frame-sample{position:relative;overflow:visible}
.cosmetic-avatar img{border-radius:50%}
.cosmetic-frame{position:absolute;inset:-5px;pointer-events:none;border:3px var(--frame-line,solid) var(--frame-light);border-radius:var(--frame-shape,50%);box-shadow:0 0 9px var(--frame-dark),inset 0 0 8px var(--frame-dark)}
.cosmetic-frame::after{content:var(--frame-mark,'✦');position:absolute;top:-7px;left:calc(50% - .5em);font-size:18px;line-height:1;color:var(--frame-light);text-shadow:0 0 8px var(--frame-dark);animation:frame-orbit var(--frame-speed,3s) linear infinite;transform-origin:50% calc(3.5px + var(--frame-radius,49px))}
.frame-color-0{--frame-light:#ff9b9b;--frame-dark:#ec284c}
.frame-color-1{--frame-light:#ffe7a3;--frame-dark:#eaa53e}
.frame-color-2{--frame-light:#b5ffe7;--frame-dark:#22b58c}
.frame-color-3{--frame-light:#c4dfff;--frame-dark:#4385fb}
.frame-color-4{--frame-light:#f3c0ff;--frame-dark:#aa48e9}
.frame-shape-0{--frame-mark:'✸';--frame-speed:2s}
.frame-shape-1{--frame-mark:'☀';--frame-line:double;border-width:5px}
.frame-shape-2{--frame-mark:'◆';--frame-shape:38%;--frame-line:dotted}
.frame-shape-3{--frame-mark:'●';--frame-line:dashed;--frame-speed:4s}
.frame-shape-4{--frame-mark:'♛';--frame-line:double;--frame-shape:42%}
.frame-shape-5{--frame-mark:'✿';--frame-shape:48% 38%;--frame-speed:5s}
.frame-shape-6{--frame-mark:'≈';--frame-line:dashed;--frame-shape:48% 44%}
.frame-shape-7{--frame-mark:'☄';--frame-speed:1.8s;--frame-line:dotted}
.frame-shape-8{--frame-mark:'◌';--frame-line:double;--frame-speed:6s}
.frame-shape-9{--frame-mark:'✧';--frame-shape:45%;--frame-speed:4.5s}
@keyframes frame-orbit{to{transform:rotate(360deg)}}
.cosmetic-item{display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding:8px 0;border-bottom:1px solid #ffffff25}
.cosmetic-item strong{flex:1}
.cosmetic-item [data-sample]{flex-basis:100%;padding:12px}
.frame-sample{width:88px;height:88px;display:inline-grid;place-items:center;border-radius:50%;background:#29202c;font-size:32px}
.frame-sample img{width:100%;height:100%;object-fit:cover}
.gif-sample{max-width:100%;max-height:150px;border-radius:10px;object-fit:contain}
#gift-dialog{width:min(90vw,370px);border:1px solid #ba8755;border-radius:20px;background:#291e25;color:#fff4e1;text-align:center;padding:20px}
#gift-dialog::backdrop{background:#000a}
.gift-close{float:right}
.gift-scene{min-height:145px;display:grid;place-items:center;position:relative}
.gift-box{position:relative;width:88px;height:76px;grid-area:1/1}
.gift-lid,.gift-base{position:absolute;display:block;background:linear-gradient(90deg,#a5314c 43%,#ffd17b 43% 57%,#a5314c 57%);box-shadow:0 3px 8px #0005}
.gift-lid{top:5px;left:0;width:100%;height:22px;border-radius:6px;z-index:1}
.gift-lid::before{content:'🎀';position:absolute;inset:auto 0 15px;font-size:26px}
.gift-base{top:24px;left:6px;right:6px;height:48px;border-radius:0 0 9px 9px}
.gift-open .gift-lid{transform:translate(28px,-29px) rotate(24deg)}
.gift-animate .gift-lid{animation:gift-lid .45s ease-out both}
@keyframes gift-lid{from{transform:none}}
.rank-xp{margin-inline-start:5px;color:#f1c66f}
.gift-prize{grid-area:1/1;z-index:1}
.gift-open .gift-box{opacity:.18;transform:translateY(33px) scale(.6)}
.gift-token{display:inline-grid;place-items:center;background:#794626;color:#ffe8aa;border:2px solid #f3c573;border-radius:15px;padding:8px 12px;font-weight:800}
.gift-spark{display:inline-block;color:#ffdc91}
.gift-animate .gift-prize{animation:gift-pop .7s cubic-bezier(.17,.77,.31,1.32) both}
.gift-animate .gift-box{animation:gift-box-open .38s ease-out both}
@keyframes gift-pop{from{opacity:0;transform:translateY(34px) scale(.3)}}
@keyframes gift-box-open{from{opacity:1;transform:rotate(-9deg)}}
#gift-confirm:empty,.gift-result:empty{display:none}
#gift-gif-form{margin-top:16px}
@media(prefers-reduced-motion:reduce){.cosmetic-frame::after,.gift-animate .gift-prize,.gift-animate .gift-box,.gift-animate .gift-lid{animation:none}}

.cosmetic-avatar .profile-frame-art{position:absolute;inset:-17%;width:134%;height:134%;max-width:none;border:0;border-radius:0;object-fit:contain;pointer-events:none;z-index:1}
.gift-warehouse .gift-tile .gif-sample{width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;background:#101518}
.profile-cosmetic-hero.has-profile-background{overflow:visible}
.profile-background-media,.has-profile-background::before{border-radius:inherit}
.own-profile button.creator-avatar.cosmetic-avatar,
.creator-identity .creator-avatar.cosmetic-avatar{overflow:visible}
.creator-identity .cosmetic-avatar:has(.profile-frame-art){margin:15px 20px}
.cosmetic-avatar .profile-frame-art{inset:-33%;width:166%;height:166%}

.creator-identity .cosmetic-avatar:has(.profile-frame-art){margin:10px 14px}
.cosmetic-avatar .profile-frame-art{inset:-26%;width:152%;height:152%}
.gift-warehouse .gift-tile .gif-sample,.cosmetic-item [data-sample] .gif-sample,
.cosmetic-item [data-sample] .frame-sample{width:42px;height:42px;aspect-ratio:1;object-fit:cover;border-radius:5px}
.background-sound-setting{display:flex;align-items:center;gap:8px}
.background-sound-setting input{width:auto}

.cosmetic-actions{margin-inline-start:auto;display:flex;align-items:center;gap:4px}
.cosmetic-actions button{display:grid;place-items:center;width:34px;height:34px;padding:0;background:#ffffff09;border:1px solid #ffffff24;color:#b9cbc3}
.cosmetic-actions svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}

.store-shelf{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}
.store-shelf .store-tile{display:flex;flex-direction:column;align-items:center;gap:5px;min-width:0;padding:6px 2px;background:#ffffff08;border:1px solid #ffffff24}
.store-tile>img,.store-tile>.gif-sample,.store-tile>.frame-sample{width:min(100%,44px);height:auto;aspect-ratio:1;object-fit:cover;border-radius:5px}
.store-tile small{font-size:10px;line-height:1.3;overflow-wrap:anywhere}
.store-item-dialog{width:min(90vw,340px);padding:15px;border:1px solid #52685d;border-radius:13px;background:#17251e;color:#edf3ee}
.store-item-dialog::backdrop{background:#0009}
.store-item-dialog form{text-align:right}
.store-item-dialog .cosmetic-actions{flex-wrap:wrap;margin-top:8px}
.store-item-dialog .cosmetic-actions button{width:auto;height:auto;padding:7px 9px}
.store-detail-preview{padding:10px;margin-bottom:8px}

.cosmetic-avatar .profile-frame-art{inset:-24%;width:148%;height:148%;clip-path:circle(48%)}
.video-avatar-shell .profile-frame-art{inset:-22%;width:144%;height:144%}
.creator-identity .cosmetic-avatar:has(.profile-frame-art){margin:9px 12px}

.gift-box-item{display:block;width:100%;margin-block:8px}
.gift-box-item small{display:block}
.gift-scene.gift-animate::before{
  content:"";position:absolute;inset:5%;pointer-events:none;border-radius:50%;
  background:radial-gradient(ellipse,#fff1a2bf 0%,#9e62ff80 35%,transparent 70%);
  animation:gift-magic-burst 1s ease-out both
}
@keyframes gift-magic-burst{
  0%{opacity:0;transform:scale(.2) rotate(-18deg)}
  35%{opacity:1}
  100%{opacity:0;transform:scale(1.7) rotate(18deg)}
}
@media(prefers-reduced-motion:reduce){.gift-scene.gift-animate::before{animation:none;opacity:0}}

.saved-gift-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(100px,1fr));gap:10px}
.saved-gift-grid .gift-box-item{margin:0;overflow-wrap:anywhere}
.gift-box-icon{display:block;font-size:28px;margin-bottom:4px}

.gift-box-icon .stone-icon{width:36px;height:36px}
.gift-prize .stone-icon{width:60px;height:60px}

.opened-gift-grid:not([hidden]){display:grid;grid-template-columns:repeat(auto-fill,minmax(88px,1fr));gap:8px;margin-block:10px}
.opened-gift-grid .store-tile{padding:6px;min-width:0;overflow-wrap:anywhere}
.opened-gift-grid .store-tile :is(img,video){width:44px;height:44px;object-fit:contain}
.gift-in-use{display:block;color:#f1c66f}
.saved-gift-grid[hidden],.opened-gift-grid[hidden]{display:none}

.saved-gift-grid,.opened-gift-grid:not([hidden]){grid-template-columns:repeat(5,minmax(0,1fr));gap:4px}
.saved-gift-grid .gift-box-item,.opened-gift-grid .store-tile{width:100%;min-width:0;padding:4px 2px;font-size:11px;line-height:1.3}
.saved-gift-grid small,.opened-gift-grid small{font-size:10px;overflow-wrap:anywhere}
.saved-gift-grid .gift-box-icon{font-size:22px}
.opened-gift-grid .store-tile :is(img,video){width:100%;max-width:36px;height:36px}
.opened-gift-grid>p{grid-column:1/-1}

.saved-gift-grid>p{grid-column:1/-1;margin:0;font-size:13px}

.opened-gift-grid .store-tile>.frame-sample{
  display:grid;inline-size:min(36px,80%);block-size:auto;aspect-ratio:1;
  margin:4px auto 6px;border-radius:50%;
}
.opened-gift-grid .store-tile>.frame-sample>img:not(.profile-frame-art){
  display:block;width:100%;height:100%;max-width:none;object-fit:cover;border-radius:50%;
}
.cosmetic-avatar.cosmetic-avatar .profile-frame-art{
  inset:auto;left:50%;top:50%;translate:-50% -50%;
  width:138%;height:138%;max-width:none;max-height:none;
  object-fit:contain;clip-path:ellipse(49% 50%);animation:mmvp-frame-motion 3.8s ease-in-out infinite;
}
@keyframes mmvp-frame-motion{
  0%,100%{transform:rotate(-2deg);filter:brightness(1)}
  50%{transform:rotate(2deg) scale(1.025);filter:brightness(1.22)}
}
@media(prefers-reduced-motion:reduce){
  .cosmetic-avatar.cosmetic-avatar .profile-frame-art{animation:none}
}
