/* Anatomical equipment layers. Upper-body breathing uses transforms, no frame swapping. */
.character-rig{position:relative;display:block;width:100%;height:100%;aspect-ratio:1/2;isolation:isolate;pointer-events:none;filter:drop-shadow(0 9px 5px #0009)}
.character-part{position:absolute;inset:0;display:block;transform-origin:50% 52%;background:none!important}
.character-part>img{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:contain;user-select:none}
.character-part>svg,.character-part>canvas{position:absolute;inset:0;display:block;width:100%;height:100%;overflow:hidden;pointer-events:none}
.character-part>.layer-ornament{mix-blend-mode:multiply;filter:brightness(.3) contrast(1.35);opacity:.94}
.raster-item-art{display:block;background:none!important;pointer-events:none;overflow:hidden;object-fit:contain;filter:drop-shadow(0 5px 4px #0009)}
.item-art .raster-item-art{width:94%;height:94%;max-height:205px}.belt-slot .raster-item-art{width:39px;height:43px;flex:none}
.character-lower{clip-path:polygon(0 51.5%,100% 51.5%,100% 100%,0 100%)}
.character-upper{clip-path:polygon(0 0,100% 0,100% 52%,0 52%)}
.breathing-rig>.character-upper{animation:wardrobeBreath 4.6s ease-in-out infinite}
@keyframes wardrobeBreath{0%,100%{transform:scale(1,1)}48%{transform:scale(1.004,1.011) translateY(-.07%)}}
.sprite.operative.wardrobe-operative{width:auto;aspect-ratio:1/2;background:none!important;animation:none!important;overflow:visible;filter:none}
.wardrobe-operative .character-rig{min-width:0}.wardrobe-operative.is-attacking .character-upper{animation:wardrobeStrike .4s ease-out}
@keyframes wardrobeStrike{40%{transform:translateX(2%) rotate(-2deg)}100%{transform:none}}
.portrait.hero-portrait,.social-avatar.has-character-rig{position:relative;overflow:hidden;background:radial-gradient(ellipse at 50% 30%,#3b5652,#101918)!important}
.hero-portrait:before,.social-avatar.has-character-rig:before{display:none!important}
.hero-portrait .portrait-rig,.social-avatar .portrait-rig{position:absolute;width:355%;height:auto;aspect-ratio:1/2;max-width:none;left:50%;top:-16%;transform:translateX(-50%);filter:none}
.social-avatar.has-character-rig .presence-dot{z-index:4}
img.unique-item-art{display:block;object-fit:contain;background:none!important;filter:drop-shadow(2px 4px 3px #0009)}
.item-art img.unique-item-art{width:92%;height:94%;max-width:205px;max-height:200px}
.belt-slot img.unique-item-art{width:39px;height:43px;flex:none}
.wardrobe-panel{display:grid;grid-template-columns:minmax(145px,.65fr) minmax(0,1fr);gap:18px;align-items:center;margin:0 0 22px;border:1px solid #49645c;background:radial-gradient(ellipse at 20% 30%,#30433c66,transparent 55%),linear-gradient(110deg,#152522,#151b1c);padding:18px;overflow:hidden}
.wardrobe-stage{height:360px;min-width:0;display:flex;justify-content:center;align-items:flex-end;background:radial-gradient(ellipse at 50% 95%,#a8c4a51c,transparent 45%)}
.wardrobe-stage .character-rig{width:180px;height:360px;flex:none}
.wardrobe-copy{min-width:0}.wardrobe-copy h3{font-size:26px;margin:5px 0 10px}.wardrobe-copy p{font-size:12px;line-height:1.65;color:#aeb9b0}
.wardrobe-equipped-list{display:flex;flex-wrap:wrap;gap:5px;margin-bottom:12px;max-height:135px;overflow:auto}
.wardrobe-equipped-list>span{font-size:10px;border:1px solid #45584f;background:#182a24;padding:5px 8px;max-width:100%;overflow-wrap:anywhere}
.wardrobe-copy .game-button{font-size:11px;min-height:44px;white-space:normal}
.metal-dialog.wardrobe-preview-dialog{width:min(690px,calc(100vw - 24px));max-width:calc(100vw - 24px)}.wardrobe-preview-dialog>.wardrobe-panel{grid-template-columns:1fr 1fr;margin-top:16px;padding:12px;gap:10px}
.metal-dialog.wardrobe-preview-dialog>.dialog-close{display:flex;margin-left:auto;flex:none}
.wardrobe-preview-dialog .wardrobe-stage{height:320px}.wardrobe-preview-dialog .wardrobe-stage .character-rig{width:160px;height:320px}
.wardrobe-preview-note{font-size:11px;color:#b5bfae;line-height:1.5;padding:9px 12px;border-left:2px solid #8baf9f;background:#1b2c25}
.wardrobe-preview-dialog>.dialog-item-art{display:none}
.wardrobe-preview-dialog .wardrobe-copy h3{font-size:19px}
.wardrobe-stage.is-inspecting .layer-cloth,.wardrobe-stage.is-inspecting .layer-weapon{display:none}
.fps-hands.unique-fps-hands{background-image:none!important;overflow:visible}
.fps-palm-layer{position:absolute;inset:0;z-index:2;background:url('/art/fps-hands-v1.png') 0 0/200% 200% no-repeat}
.fps-held-object{position:absolute;inset:0;width:100%;height:100%;z-index:1;overflow:visible}
.fps-hands[data-grip="worn"] .fps-held-object{z-index:3}.fps-hands[data-grip="worn"] .fps-palm-layer{clip-path:polygon(0 0,55% 0,55% 68%,80% 85%,100% 85%,100% 100%,0 100%)}
.fps-arena>.fps-hands{width:min(76%,560px)}
@media(max-width:580px){.fps-arena>.fps-hands{width:116%}}
@media(max-width:580px){body.in-fps-combat .battle-scene.fps-arena{height:240px;min-height:240px}.in-fps-combat .battle-controls{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-top:7px}.in-fps-combat .battle-controls>.attack-button,.in-fps-combat .battle-controls>.danger{grid-column:1/-1;min-height:40px}.in-fps-combat .battle-controls>button{min-width:0}.in-fps-combat .battle-controls>.ability-button{min-height:42px;padding:6px;font-size:10px;gap:2px;flex-direction:column}.in-fps-combat .battle-controls>.ability-button .icon{display:none}.in-fps-combat .battle-controls>.ability-button small{font-size:9px}.in-fps-combat .battle-team.fps-party{padding:5px 0}.in-fps-combat .fps-party .team-member{padding:5px 8px}.in-fps-combat .mobile-fight-hud{padding:5px 8px;gap:3px 8px;margin-bottom:5px}}
.fps-weapon-preview{position:relative;width:100%;height:100%;overflow:hidden;background:radial-gradient(ellipse at 50% 60%,#38504a,#111e1d)}
.fps-weapon-preview .fps-hands{width:145%;bottom:5%;left:50%;filter:drop-shadow(0 5px 7px #000b)}
.wardrobe-stage.show-fps>.character-rig{display:none}.fps-weapon-preview[hidden]{display:none}
.fps-item-skin{position:absolute;left:48%;bottom:2%;width:43%;height:135%;object-fit:contain;transform:rotate(6deg);transform-origin:50% 77%;filter:drop-shadow(4px 5px 3px #0009)}
.fps-item-skin.is-wrap{inset:0;width:100%;height:100%;transform:none;filter:none;mask-image:url('/art/fps-hands-v1.png');mask-size:200% 200%;mask-position:0 0;mask-repeat:no-repeat;mix-blend-mode:multiply;opacity:.68}
.fps-hands.unique-fps-hands[data-gloves]:after{content:'';position:absolute;inset:20% 0 0;background:var(--glove-color);opacity:.33;mix-blend-mode:color;mask:linear-gradient(90deg,#000 0 30%,transparent 44% 57%,#000 72%);pointer-events:none}
@media(max-width:580px){.wardrobe-panel{grid-template-columns:42% minmax(0,1fr);padding:10px;gap:10px}.wardrobe-stage{height:275px}.wardrobe-stage .character-rig{width:137.5px;height:275px}.wardrobe-copy h3{font-size:20px}.wardrobe-copy p{font-size:11px}.wardrobe-equipped-list{max-height:110px}.wardrobe-equipped-list>span{font-size:9px;padding:4px}.wardrobe-copy .game-button{width:100%;padding:7px}.wardrobe-preview-dialog>.wardrobe-panel{grid-template-columns:1fr}.wardrobe-preview-dialog .wardrobe-stage{height:300px}.wardrobe-preview-dialog .wardrobe-stage .character-rig{width:150px;height:300px}.item-art img.unique-item-art{width:90%;height:100%;max-height:140px}.belt-slot img.unique-item-art{width:32px;height:35px}}
@media(prefers-reduced-motion:reduce){.breathing-rig>.character-upper{animation:none}}
.reduce-motion .breathing-rig>.character-upper{animation:none}
.metal-dialog.social-dialog{width:min(650px,calc(100vw - 24px));max-width:calc(100vw - 24px)}
.metal-dialog.social-dialog>.dialog-close{display:flex;width:30px;margin:0 0 10px auto}
.friend-appearance{display:grid;grid-template-columns:44% minmax(0,1fr);align-items:center;gap:15px;padding:14px;margin:12px 0 18px;border:1px solid #49645c;background:linear-gradient(90deg,#152622e8,#122321de),url('/art/infirmary.png') center/cover}
.friend-appearance-body.wardrobe-stage{height:340px;width:100%;min-width:0}
.friend-appearance-body.wardrobe-stage .character-rig{width:170px;height:340px}
.friend-appearance-copy{min-width:0}.friend-appearance-copy small{font-size:10px;color:#9ab7a5}.friend-appearance-copy h3{margin:6px 0;font-size:23px}.friend-appearance-copy p{font-size:11px;color:#aeb9b0;line-height:1.5}.friend-appearance-copy .game-button{min-height:44px;font-size:11px;white-space:normal;width:100%}
@media(max-width:580px){.friend-appearance{grid-template-columns:43% minmax(0,1fr);padding:8px;gap:8px}.friend-appearance-body.wardrobe-stage{height:280px}.friend-appearance-body.wardrobe-stage .character-rig{width:140px;height:280px}.friend-appearance-copy h3{font-size:19px}.friend-appearance-copy .wardrobe-equipped-list{max-height:125px}}
