/* Art2 owns sprite layout and material presentation. One canvas, one coordinate system. */
.art2-character { position: relative; width:128px; height:160px; flex:none; isolation:isolate; }
.art2-rig,.art2-layer,.art2-layer img { position:absolute; inset:0; width:100%; height:100%; padding:0; margin:0; border:0; }
.art2-rig { transform-origin:50% 92%; animation:art2-breathe 3.8s steps(4,end) infinite; }
.art2-layer { pointer-events:none; }
.art2-layer img { object-fit:contain; image-rendering:pixelated; }
.art2-pose-part,.art2-motion-part,.art2-cut { position:absolute; inset:0; width:100%; height:100%; }

.art2-cut[data-clip="head"],
.art2-cut[data-clip="cloth-head"] { clip-path:inset(0 0 63.125% 0); }
.art2-cut[data-clip="leftArm"] { clip-path:inset(36.875% 60.9375% 30% 0); }
.art2-cut[data-clip="rightArm"] { clip-path:inset(36.875% 0 30% 62.5%); }
.art2-cut[data-clip="torso"] { clip-path:inset(36.875% 37.5% 30% 39.0625%); }
.art2-cut[data-clip="leftLeg"],
.art2-cut[data-clip="cloth-leftLeg"] { clip-path:inset(70% 50% 0 0); }
.art2-cut[data-clip="rightLeg"],
.art2-cut[data-clip="cloth-rightLeg"] { clip-path:inset(70% 0 0 50%); }
.art2-cut[data-clip="cloth-leftArm"] { clip-path:inset(36.875% 60.9375% 47.5% 0); }
.art2-cut[data-clip="cloth-rightArm"] { clip-path:inset(36.875% 0 47.5% 62.5%); }
.art2-cut[data-clip="cloth-torso"] { clip-path:polygon(39.0625% 36.875%,62.5% 36.875%,62.5% 52.5%,100% 52.5%,100% 70%,0 70%,0 52.5%,39.0625% 52.5%); }
.art2-action-fx-reduced { opacity:.55; }
.art2-pose-part[data-part="head"],.art2-motion-part[data-part="head"] { transform-origin:50% 36%; }
.art2-pose-part[data-part="head"] { scale:.88; }
.art2-pose-part[data-part="leftArm"],.art2-motion-part[data-part="leftArm"] { transform-origin:35% 41%; }
.art2-pose-part[data-part="rightArm"],.art2-motion-part[data-part="rightArm"] { transform-origin:65.6% 41%; }
.art2-pose-part[data-part="leftLeg"],.art2-motion-part[data-part="leftLeg"] { transform-origin:43% 70%; }
.art2-pose-part[data-part="rightLeg"],.art2-motion-part[data-part="rightLeg"] { transform-origin:58% 70%; }
[data-pose="duelist"] .art2-pose-part[data-part="rightArm"] { transform:rotate(18deg); }
[data-pose="duelist"] .art2-pose-part[data-part="leftArm"] { transform:rotate(-18deg); }
[data-pose="duelist"] .art2-pose-part[data-part="leftLeg"] { transform:rotate(8deg); }
[data-pose="duelist"] .art2-pose-part[data-part="rightLeg"] { transform:rotate(-8deg); }
[data-pose="channeling"] .art2-pose-part[data-part="leftArm"] { transform:rotate(38deg); }
[data-pose="channeling"] .art2-pose-part[data-part="rightArm"] { transform:rotate(-18deg); }
[data-pose="channeling"] .art2-pose-part[data-part="head"] { transform:rotate(-4deg); }
[data-pose="confident"] .art2-pose-part[data-part="leftArm"] { transform:rotate(-34deg); }
[data-pose="confident"] .art2-pose-part[data-part="rightLeg"] { transform:rotate(-6deg); }
[data-pose="confident"] .art2-pose-part[data-part="head"] { transform:rotate(4deg); }
.art2-action-fx { position:absolute; inset:0; z-index:25; pointer-events:none; color:#b8eeff; }
.art2-action-fx svg { width:100%;height:100%;overflow:visible;fill:currentColor;shape-rendering:crispEdges;filter:drop-shadow(0 0 3px #62afff); }
.art2-fx-stroke-0 { opacity:.75; }.art2-fx-stroke-1 { fill:#fff8d9; }
.art2-action-fx[data-kind="cast"] { color:#c697ff; }
.art2-action-fx[data-kind="heal"] { color:#8ce4b1; }
.art2-action-fx[data-kind="smash"] { color:#f0b56e; }
.art2-action-fx[data-kind="thrust"] { color:#9ddcff; }
.art2-action-fx[data-kind="guard"] svg { fill:none;stroke:#d9be7f;stroke-width:2; }
.art2-character[data-idle="sway"] .art2-rig { animation:art2-sway 4s steps(8,end) infinite; }
.art2-character[data-idle="vigilant"] .art2-rig { animation:art2-vigilant 5s steps(8,end) infinite; }
.art2-character[data-idle="vigilant"] .art2-motion-part[data-part="head"] { animation:art2-look 6.7s steps(12,end) infinite; }
.art2-character[data-action] .art2-motion-part { animation:none!important; }
@keyframes art2-sway { 0%,100% {transform:translateX(0) rotate(0)} 50% {transform:translateX(1px) rotate(1deg)} }
@keyframes art2-vigilant { 0%,100% {transform:translateY(0)} 40%,65% {transform:translateY(-1px)} }
@keyframes art2-look { 0%,25%,100% {transform:rotate(0)} 45%,65% {transform:rotate(-3deg)} }
.art2-layer[data-layer="hair-back"],.art2-layer[data-layer="hair-front"] { animation:art2-hair 4.3s steps(4,end) infinite; transform-origin:50% 22%; }
.art2-layer[data-layer="weapon"] { animation:art2-weapon 3.8s steps(4,end) infinite; transform-origin:71.1% 64.4%; }
.art2-layer[data-layer^="wings-"] { animation:art2-wings 4.6s steps(5,end) infinite; transform-origin:50% 44%; }
.art2-layer[data-layer^="aura-"],.art2-layer[data-layer="ring-amulet-fx"] { animation:art2-glimmer 3.4s steps(5,end) infinite; }
.art2-character[data-idle="ready"] .art2-rig { animation:art2-ready 2.7s steps(4,end) infinite; }
.art2-character[data-idle="float"] .art2-rig { animation:art2-hover 4s steps(6,end) infinite; }
.art2-character[data-idle="still"] * { animation:none!important; }
.art2-character[data-action] .art2-rig,.art2-character[data-action] .art2-layer,
.art2-creature[data-action] img,.ko .art2-rig,.ko .art2-layer,
.art2-character.ko * { animation:none!important; }
.art2-profile-character { width:256px; height:320px; margin:70px auto 0; z-index:2; }
.animation-preview-mount:has(.art2-character) { width:192px; height:240px; flex-basis:192px; }
.animation-character:has(.art2-character) { width:100%; height:100%; }
.animation-preview-character.art2-character { width:192px; height:240px; margin:0; }
.pixel-fighter-unit .pixel-fighter.art2-character { width:128px!important; height:160px!important; background:none!important; border:0!important; box-shadow:none!important; border-radius:0!important; filter:none; }
.pixel-fighter-unit:has(.art2-character) { flex:0 0 128px!important; min-width:128px!important; max-width:128px!important; height:160px!important; }
.pixel-fighter.art2-character::before,.pixel-fighter.art2-character::after { content:none!important; }
.art2-creature { position:relative; isolation:isolate; background:none!important; border:0!important; border-radius:0!important; box-shadow:none!important; }
.art2-creature::before,.art2-creature::after { content:none!important; }
.art2-creature-image { display:block; width:100%; height:100%; object-fit:contain; image-rendering:pixelated; transform-origin:50% 90%; }
.art2-creature[data-creature-idle="squish"] img { animation:art2-squish 3.8s steps(5,end) infinite; }
.art2-creature[data-creature-idle="heavy"] img { animation:art2-heavy 5s steps(4,end) infinite; }
.art2-creature[data-creature-idle="hover"] img { animation:art2-hover 4.5s steps(6,end) infinite; }
.art2-creature[data-creature-idle="breathe"] img { animation:art2-breathe 3.9s steps(4,end) infinite; }
.art2-creature[data-creature-idle="flutter"] img { animation:art2-flutter 3.2s steps(5,end) infinite; }
.art2-creature[data-creature-idle="pulse"] img { animation:art2-pulse 4s steps(5,end) infinite; }
.art2-creature[data-variant="mastery"] img { filter:brightness(1.15) saturate(1.1) drop-shadow(0 0 3px #e9c581); }
.art2-creature[data-variant="prismatic"] img { filter:hue-rotate(55deg) drop-shadow(0 0 3px #9473ca); }
.art2-creature[data-evolution="evolved"] img { scale:1.07; }
.art2-creature[data-evolution="ascended"] img { scale:1.14; }
.pixel-boss.art2-creature { width:256px!important; height:256px!important; }
.fighter-pet.art2-creature {
    position:absolute;
    width:var(--fighter-pet-size,44px)!important;
    height:var(--fighter-pet-size,44px)!important;
    right:var(--fighter-pet-right,-4px);
    bottom:6px;
}
.character-pet.art2-creature { position:absolute; width:88px; height:88px; }
/* Layout scales complete rigs proportionally, never individual equipment layers. */
.pixel-battle,body.overlay-mode-minimal .pixel-battle { height:290px!important; }
.pixel-party,body.overlay-mode-minimal .pixel-party { display:grid; grid-template-columns:repeat(var(--party-columns,3),minmax(0,1fr)); align-content:end; height:auto; gap:36px 4px; padding:36px 8px 26px!important; }
.pixel-party .pixel-fighter-unit:has(.art2-character) { width:100%; min-width:0!important; max-width:128px!important; height:auto!important; aspect-ratio:4/5; }
.pixel-party .pixel-fighter-unit .pixel-fighter.art2-character { width:100%!important; height:100%!important; }
.pixel-boss-wrap { padding-bottom:26px!important; }
.pixel-boss.art2-creature { max-width:100%; height:auto!important; aspect-ratio:1; }
.duel-fighter-unit:has(.art2-character) { --duel-fighter-scale:1!important; }
.duel-fighter-unit .pixel-fighter.art2-character { transform:scaleX(var(--duel-facing)); }
.duel-fighter-unit.duel-right { --duel-facing:-1; }
.art2-item { --rarity:#8c9aa9; display:grid; place-items:center; position:relative; width:64px; height:64px; flex:none;
    background:linear-gradient(145deg,#1a243b,#0a101d)!important;
    image-rendering:pixelated; border:1px solid var(--rarity)!important; border-radius:2px!important;
    box-shadow:inset 0 0 0 3px #0c1322,inset 0 0 0 4px color-mix(in srgb,var(--rarity) 28%,transparent)!important; }
.art2-item-image { position:relative; z-index:2; display:block; width:86%; height:86%; object-fit:contain; image-rendering:pixelated; pointer-events:none; }
.art2-item::before,.art2-item::after { content:""!important; position:absolute!important; width:5px!important; height:5px!important; background:var(--rarity)!important; transform:rotate(45deg)!important; border:1px solid #0b1221!important; box-shadow:none!important; }
.art2-item::before { left:-3px!important; top:-3px!important; }
.art2-item::after { right:-3px!important; bottom:-3px!important; left:auto!important; top:auto!important; }
.art2-item[data-rarity="UNCOMMON"] { --rarity:#8ec5a2; }
.art2-item[data-rarity="RARE"] { --rarity:#75b9ed; }
.art2-item[data-rarity="EPIC"] { --rarity:#bb91e3; }
.art2-item[data-rarity="LEGENDARY"] { --rarity:#e7b665; filter:drop-shadow(0 0 5px #b2763333); }
.wardrobe-preview { float:right; margin:0 0 14px 12px; }
#giveawayReward .art2-item { display:block; width:96px; height:96px; margin:16px auto; }
[data-art2-ui] { color:#dae1ef; background:#0b1221 url('ui/moonlit-courtyard.png') center top/cover fixed; }
[data-art2-ui]::before { content:""; position:fixed; inset:0; z-index:-1; background:linear-gradient(180deg,#080e1e88,#080d19ed 70%); pointer-events:none; }
[data-art2-ui] .community-card,[data-art2-ui] .profile-summary-card,[data-art2-ui] .gear-card,
[data-art2-ui] .catalog-item,[data-art2-ui] .wardrobe-item,[data-art2-ui] .pet-card,
[data-art2-ui] .boss-pool-card { background:linear-gradient(140deg,#172139ed,#0d1425f5); border:1px solid #35425a; border-radius:8px; box-shadow:0 10px 30px #0004,inset 0 1px 0 #c7dbff0a; }
[data-art2-ui] h1,[data-art2-ui] h2,[data-art2-ui] h3 { color:#edf0f7; letter-spacing:.025em; }
[data-art2-ui] .eyebrow { color:#d5b986; letter-spacing:.18em; }
[data-art2-ui] .character-stage { background:linear-gradient(#0b132744,#0b1327aa),url('ui/moonlit-courtyard.png') center/cover; border:1px solid #42506b; border-radius:6px; min-height:350px; overflow:visible; }
[data-art2-ui] .character-slot { background:#0b1421db; border:1px solid #53607a; box-shadow:0 3px 10px #0004; }
[data-art2-ui] button,[data-art2-ui] .button { border-radius:4px; }
[data-art2-ui] input,[data-art2-ui] select { background:#0c1527; color:#e2e9f6; border:1px solid #53607b; border-radius:4px; }
[data-art2-ui] :focus-visible { outline:2px solid #d6b879; outline-offset:3px; }
[data-art2-ui] .appearance-option { display:grid; gap:6px; min-width:130px; }
[data-art2-ui] .appearance-option span { font-size:12px; color:#c7cfdf; }
.boss-chest-opening-chest[data-art2-chest] { background:url('items/treasure-chest.svg') center/contain no-repeat; image-rendering:pixelated; }
.boss-chest-opening-chest[data-art2-chest]>* { visibility:hidden; }
.boss-chest-opening-chest[data-art2-chest]::before,.boss-chest-opening-chest[data-art2-chest]::after { content:none; }
@keyframes art2-breathe { 0%,100% { transform:translateY(0); } 50% { transform:translateY(-1px); } }
@keyframes art2-ready { 0%,100% { transform:translate(0,0); } 50% { transform:translate(1px,1px); } }
@keyframes art2-hair { 0%,100% { transform:translateX(0); } 50% { transform:translateX(1px); } }
@keyframes art2-weapon { 0%,100% { transform:rotate(0); } 50% { transform:rotate(1deg); } }
@keyframes art2-wings { 0%,100% { transform:scaleX(1); } 50% { transform:scaleX(.97); } }
@keyframes art2-glimmer { 0%,100% { opacity:.72; } 50% { opacity:1; } }
@keyframes art2-hover { 0%,100% { transform:translateY(0); } 50% { transform:translateY(-3px); } }
@keyframes art2-squish { 0%,100% { transform:scale(1); } 50% { transform:scale(1.015,.98); } }
@keyframes art2-heavy { 0%,100% { transform:translateY(0); } 50% { transform:translateY(1px); } }
@keyframes art2-flutter { 0%,100% { transform:translateY(0) scaleX(1); } 50% { transform:translateY(-2px) scaleX(.99); } }
@keyframes art2-pulse { 0%,100% { transform:scale(1); } 50% { transform:scale(1.015); } }
@media(max-width:640px) { .art2-profile-character { width:192px; height:240px; } [data-art2-ui] .character-stage { min-height:290px; } }
@media(prefers-reduced-motion:reduce) { .art2-rig,.art2-layer,.art2-creature-image { animation:none!important; } }


.pixel-battle,
body.overlay-mode-minimal .pixel-battle {
    height: clamp(210px, 24vh, 290px) !important;
    overflow: hidden !important;
    background:
        linear-gradient(180deg, rgba(7, 13, 28, .12), rgba(5, 9, 20, .50)),
        url('ui/moonlit-courtyard.png') center 62% / cover no-repeat !important;
}

body.overlay-mode-minimal .pixel-battle {
    height: clamp(170px, 19vh, 220px) !important;
}

body.overlay-mode-pause .pixel-battle {
    height: clamp(250px, 31vh, 320px) !important;
}

.pixel-boss-wrap {
    min-width: 0;
    overflow: hidden;
    padding: 32px 10px 26px !important;
}

.pixel-boss.art2-creature {
    width: min(100%, 220px) !important;
    height: min(calc(100% - 44px), 220px) !important;
    max-width: 100% !important;
    max-height: 100% !important;
    aspect-ratio: auto !important;
    margin: 0 auto;
    transform: none !important;
}

body.overlay-mode-minimal .pixel-boss.art2-creature {
    width: min(100%, 160px) !important;
    height: min(calc(100% - 40px), 160px) !important;
}

body.overlay-mode-pause .pixel-boss.art2-creature {
    --boss-scale: 1;
    width: min(100%, 240px) !important;
    height: min(calc(100% - 54px), 240px) !important;
    transform: none !important;
}

.pixel-boss.art2-creature .art2-creature-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: 50% 100%;
}

/* Unified item scale and boss encounter proportions */

.item-visual-shell > .item-visual-icon.art2-item {
    width: 96px !important;
    height: 96px !important;
    max-width: 76% !important;
    max-height: 76% !important;
}

.item-visual-shell.compact > .item-visual-icon.art2-item {
    width: 72px !important;
    height: 72px !important;
    max-width: 76% !important;
    max-height: 76% !important;
}

.art2-item .art2-item-image {
    width: 78%;
    height: 78%;
    transform-origin: 50% 50%;
}

.art2-item[data-item-slot="amulet"] .art2-item-image,
.art2-item[data-item-slot="ring"] .art2-item-image {
    transform: scale(1.7);
}

.art2-item[data-item-slot="helmet"] .art2-item-image {
    transform: scale(1.18);
}

.art2-item[data-item-slot="gloves"] .art2-item-image {
    transform: scale(1.08);
}

.art2-item[data-item-slot="boots"] .art2-item-image,
.art2-item[data-item-slot="weapon"] .art2-item-image {
    transform: scale(1.04);
}

.pixel-battle,
body.overlay-mode-minimal .pixel-battle {
    height: clamp(250px, 29vh, 330px) !important;
    grid-template-columns: minmax(0, 1.85fr) 34px minmax(220px, .8fr) !important;
}

body.overlay-mode-minimal .pixel-battle {
    height: clamp(210px, 23vh, 270px) !important;
}

.pixel-party,
body.overlay-mode-minimal .pixel-party {
    gap: 26px 2px;
    padding: 38px 8px 24px !important;
}

.pixel-party .pixel-fighter-unit:has(.art2-character) {
    max-width: 112px !important;
}

.pixel-boss-wrap {
    padding: 18px 6px 20px !important;
}

.pixel-boss.art2-creature {
    width: min(100%, 278px) !important;
    height: min(calc(100% - 24px), 278px) !important;
}

body.overlay-mode-minimal .pixel-boss.art2-creature {
    width: min(100%, 220px) !important;
    height: min(calc(100% - 20px), 220px) !important;
}

body.overlay-mode-pause .pixel-boss.art2-creature {
    width: min(100%, 292px) !important;
    height: min(calc(100% - 24px), 292px) !important;
}

/* Grounded weight shifts and staggered recovery, rather than metronomic bouncing. */
.art2-character:not([data-action]):not([data-idle="still"]) .art2-motion-part[data-part="leftArm"] { animation:art2-rest-arm 5.4s steps(12,end) infinite; }
.art2-character:not([data-action]):not([data-idle="still"]) .art2-motion-part[data-part="rightArm"] { animation:art2-rest-hand 5.4s steps(12,end) infinite; }
@keyframes art2-rest-arm { 0%,100% {transform:rotate(0)} 30% {transform:rotate(-1.4deg)} 65% {transform:rotate(.6deg)} }
@keyframes art2-rest-hand { 0%,100% {transform:rotate(0)} 36% {transform:rotate(1deg)} 70% {transform:rotate(-.4deg)} }
.art2-creature[data-creature-kind="boss"] img { animation-timing-function:steps(18,end); transform-origin:50% 88%; }
.art2-creature[data-creature-kind="boss"][data-creature-idle="breathe"] img { animation-name:art2-beast-rest; animation-duration:6.2s; }
.art2-creature[data-creature-kind="boss"][data-creature-idle="heavy"] img { animation-name:art2-armored-rest; animation-duration:7.6s; }
.art2-creature[data-creature-kind="boss"][data-creature-idle="flutter"] img { animation-name:art2-winged-rest; animation-duration:5.8s; }
.art2-creature[data-creature-code="abyssal_leviathan"] img { transform-origin:53% 88%; animation-duration:7.1s!important; }
.art2-creature[data-creature-code="thorn_empress"] img { transform-origin:50% 94%; animation-duration:6.8s!important; }
.art2-creature[data-creature-code="astral_archivist"] img { animation-duration:6.4s!important; }
.art2-creature[data-creature-code="obsidian_manticore"] img { transform-origin:45% 88%; animation-duration:5.7s!important; }
@keyframes art2-beast-rest { 0%,100% {transform:scale(1)} 28% {transform:scale(1.003,1.012) rotate(-.25deg)} 49% {transform:scale(1.004,1.014) rotate(-.25deg)} 76% {transform:scale(1,.998) rotate(.15deg)} }
@keyframes art2-armored-rest { 0%,100% {transform:translate(0,0)} 22% {transform:translate(-1px,0) rotate(-.2deg)} 43% {transform:translate(-1px,-1px) scaleY(1.006)} 65% {transform:translate(0,0)} 83% {transform:translate(1px,0) rotate(.15deg)} }
@keyframes art2-winged-rest { 0%,100% {transform:translateY(0) scaleX(1)} 27% {transform:translateY(-2px) scaleX(.992) rotate(-.3deg)} 44% {transform:translateY(-3px) scaleX(.99)} 77% {transform:translateY(-1px) scaleX(1.005) rotate(.2deg)} }
.art2-action-fx[data-effect="comet"] {color:#9ceaff}
.art2-action-fx[data-effect="void"] {color:#9e70e3}
.art2-action-fx[data-effect="judgment"],.art2-action-fx[data-effect="radiant"] {color:#ffe39a}
.art2-action-fx[data-effect="roar"] svg {fill:#eac17e;stroke:none}
.art2-action-fx[data-effect="execution"] {color:#f48c88}
@media(prefers-reduced-motion:reduce) { .art2-motion-part {animation:none!important} }

.relic-row { display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:16px;border-bottom:1px solid #394359; }
.relic-row h3 {width:100px;color:#e9cf9c}.relic-row .art2-item {width:64px;height:64px;flex:none}

.art2-item[data-rarity="UR"] { --rarity:#a8f4f5; border-color:#d8baff; box-shadow:inset 0 0 0 1px #90deef,0 0 9px #8a66dd55; }

/* Effects retain hard pixel silhouettes while their pieces move independently. */
.art2-fx-piece { transform-box:view-box;transform-origin:64px 82px; }
.art2-action-fx svg {filter:none}
.art2-motion-part[data-part="torso"] {transform-origin:50% 62%}

/* Ultra RAID: the original boss artwork gains a distinct astral/rift form. */
.art2-creature.art2-ultra{isolation:isolate;position:relative;overflow:visible}
.art2-creature.art2-ultra::before{content:""!important;position:absolute;inset:-14%;background:url("/community/_art2/bosses/ultra-halo.svg") center/contain no-repeat;opacity:.85;z-index:-1;animation:ultra-orbit 18s linear infinite;pointer-events:none}
.art2-creature.art2-ultra::after{content:"ULTRA"!important;position:absolute;bottom:2%;left:50%;transform:translateX(-50%);padding:3px 8px;border:1px solid #bffcff;border-radius:5px;background:#2d144ee8;color:#ecdaff;font:bold 11px system-ui;letter-spacing:2px;box-shadow:0 0 14px #aa66ff;pointer-events:none}
.art2-ultra>.art2-creature-image{filter:grayscale(.7) sepia(.4) hue-rotate(170deg) saturate(2.4) drop-shadow(0 0 5px #68f4ff) drop-shadow(0 0 12px #a75bff)}
@keyframes ultra-orbit{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.art2-ultra::before{animation:none}}

.art2-item[data-rarity="MYTHIC"]{--rarity:#dca4ff;filter:drop-shadow(0 0 6px #b169df55)}
