/* Room for a complete staggered party, with UI outside the combat floor. */
.battle-layout #battle-arena{height:480px}
#battle-arena .hero-label{top:88px;bottom:auto;left:24px;width:30%;transform:none}
#battle-arena .scene-label{top:78px;left:auto;right:24px;width:30%;max-width:210px;transform:none}
#battle-arena .boss-telegraph{right:24px;left:auto;width:28%;bottom:48px!important}
@media(max-width:599px){.battle-layout #battle-arena{height:460px}#battle-arena .hero-label{left:20px;top:86px;width:34%}#battle-arena .scene-label{right:20px;top:82px;width:44%}#battle-arena .boss-telegraph{right:20px;width:30%}}

/* Collection density follows available panel width; keep touch layouts readable. */
@media(min-width:760px){
 #pet-collection{grid-template-columns:repeat(auto-fit,minmax(175px,1fr))}
 .relic-category-items{grid-template-columns:repeat(auto-fit,minmax(175px,1fr))}
 .shell{max-width:1800px}
}
@media(min-width:1200px){#pet-collection,.relic-category-items{gap:14px}}
@media(max-width:599px){#pet-collection{grid-template-columns:repeat(2,minmax(0,1fr))}.relic-category-items{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:359px){#pet-collection .collection-name{font-size:18px}}

/* Compact inventory tiles keep a bounded width even in small categories. */
.relic-category-items{grid-template-columns:repeat(auto-fill,minmax(104px,120px));justify-content:start;gap:8px}
#relic-inventory .relic-item{min-height:112px;padding:8px 6px;gap:5px;justify-content:flex-start}
#relic-inventory .relic-item .artifact-art{width:48px;height:48px}
#relic-inventory .relic-item b{font-size:13px;line-height:1.2;overflow-wrap:break-word}
#relic-inventory .relic-item small,#relic-inventory .relic-item em{font-size:9px;line-height:1.3}
#relic-inventory .relic-item>span:not(.artifact-art){gap:3px}
.relic-slots{grid-template-columns:repeat(6,minmax(0,120px));justify-content:start;gap:8px}
.relic-slot{min-height:112px;padding:8px 5px;gap:5px}
.relic-slot .artifact-art{width:44px;height:44px;margin:0 auto}
.relic-slot b{font-size:12px}.relic-slot small{font-size:9px}
@media(max-width:599px){
 .relic-category-items{grid-template-columns:repeat(auto-fill,minmax(88px,104px));gap:7px}
 #relic-inventory .relic-item{min-height:108px;padding:7px 5px}
 #relic-inventory .relic-item .artifact-art{width:44px;height:44px}
 #relic-inventory .relic-item b{font-size:12px}
 .relic-slots{grid-template-columns:repeat(3,minmax(0,104px))}
}
/* Each artifact family gets its own column when the panel has room. */
@media(min-width:900px){
 #relic-inventory{grid-template-columns:repeat(auto-fit,minmax(280px,1fr))!important;gap:24px;align-items:start}
 .relic-category{align-self:start}
}

.pet-rarity-heading{grid-column:1/-1;margin:18px 0 0;padding:0 0 8px;border-bottom:1px solid var(--rarity-color);color:var(--rarity-color);font:22px 'CK Titles',Georgia}
.pet-rarity-heading:first-child{margin-top:0}
.hero-combat-stats{display:flex;flex-direction:column;gap:5px;font:11px/1.5 'CK Text',sans-serif;color:#bacbb8;margin:8px 0 12px}
.hero-combat-stats strong{font-size:12px;color:#d8dfca}.hero-combat-stats span{display:block}
.compact-member .hero-combat-stats{grid-column:1/-1;margin:0;padding-top:8px;border-top:1px solid #c6a76126}
.bestiary-grid{grid-template-columns:repeat(auto-fill,minmax(156px,1fr))}
@media(max-width:599px){.bestiary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.hero-combat-stats{font-size:10px}}
