#r-screen:has(.r-bestiary){background:#0b1820f5;color:#d7e8f1;justify-content:flex-start;overflow:auto;backdrop-filter:none}
.r-bestiary{width:min(940px,100%);text-align:left;box-sizing:border-box}
.r-bestiary-head{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:0 0 12px;background:transparent;border:0;height:auto;min-height:0}
.r-bestiary-head h3{font-size:20px;color:#e6f3f8;margin:0}
.r-bestiary-tools{position:sticky;top:-1px;z-index:2;background:#0b1820f5;padding:8px 0 10px;border-bottom:1px solid #304a59;margin-bottom:12px}
.r-bestiary-tabs{display:flex;flex-direction:row;flex-wrap:wrap;gap:6px;margin-bottom:8px}
.r-bestiary .r-btn,.r-bestiary select,.r-bestiary input{height:32px;min-height:32px;border:1px solid #395768;border-radius:3px;background:#152c39;color:#d2e7f1;font:inherit;font-size:12px;padding:0 8px;box-sizing:border-box}
.r-bestiary .r-btn{display:inline-flex;align-items:center;justify-content:center}
.r-bestiary-tabs button{min-width:94px}
.r-bestiary-tabs [aria-pressed=true]{background:#265267;border-color:#70c9df;color:#f4fcff}
.r-bestiary-filters{display:flex;align-items:flex-end;gap:8px;flex-wrap:wrap}
.r-bestiary-filters label{display:flex;flex-direction:column;gap:4px;font-size:11px;color:#8cadc0;min-width:0}
.r-bestiary-filters label[hidden]{display:none}
.r-bestiary-filters .r-bestiary-search{flex:1;min-width:140px;max-width:260px}
.r-bestiary select{min-width:102px;max-width:155px}
.r-bestiary-count{margin:8px 0 4px;font-size:11px;color:#a4c4d6;font-variant-numeric:tabular-nums}
.r-bestiary-guide{font-size:12px;line-height:1.65;color:#9dbacd;border:1px solid #304a59;border-radius:3px;padding:7px 9px;background:#122633}
.r-bestiary-guide summary{cursor:pointer}
.r-bestiary-guide p{margin:8px 0 0;text-align:left}
.r-bestiary .r-monsters{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.r-bestiary .r-monster-card{display:flex;flex-direction:column;min-width:0;padding:10px;border-color:#355164;background:#142b39}
.r-bestiary .r-monster-card header{min-height:60px;gap:9px}
.r-bestiary .r-monster-image{width:60px;height:60px;flex:0 0 60px}
.r-bestiary .r-monster-card h4{min-height:20px;margin:0 0 4px;font-size:13px;line-height:1.45}
.r-bestiary .r-monster-role{display:block;font-size:11px;line-height:1.5}
.r-bestiary .r-monster-card>p{height:60px;min-height:60px;font-size:12px;line-height:20px;overflow:auto;margin:8px 0}
.r-bestiary .r-monster-affinities{margin-top:auto}
.r-boss-skills{margin-top:9px;border-top:1px solid #34505e;padding-top:8px;font-size:11px;line-height:1.6;color:#b8d0de}
.r-boss-skills summary{cursor:pointer;color:#98d9eb}
.r-boss-skills:not([open]) summary{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.r-boss-skills ul{padding:0;list-style:none;margin:8px 0}
.r-boss-skills li{padding:6px 0;border-bottom:1px solid #2a4351}
.r-boss-skills strong,.r-boss-skills span{display:block}
.r-boss-skills strong{color:#e2f0f7}
.r-boss-skills a{color:#8fd2e7;font-size:11px}
.r-bestiary-empty{grid-column:1/-1;padding:30px 12px;border:1px dashed #345263}
@media(max-width:700px){
 #r-screen:has(.r-bestiary){position:fixed;inset:56px 5px 5px;padding:12px 8px;z-index:40}
 .r-bestiary-head h3{font-size:18px}
 .r-bestiary-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
 .r-bestiary-filters .r-bestiary-search{grid-column:1/-1;max-width:none}
 .r-bestiary select{width:100%;min-width:0;max-width:none}
 .r-bestiary .r-monsters{gap:7px}
 .r-bestiary .r-monster-card{padding:8px}
 .r-bestiary .r-monster-card header{gap:6px;min-height:48px}
 .r-bestiary .r-monster-image{width:44px;height:44px;flex-basis:44px}
 .r-bestiary .r-monster-card h4{font-size:12px}
 .r-bestiary .r-monster-role{font-size:10px}
 .r-bestiary .r-monster-affinities{gap:4px;grid-template-columns:1fr}
 .r-bestiary .r-monster-affinities>span{padding:4px 6px;font-size:11px}
}

/* Only the entries scroll, so no cards can appear behind the fixed filters. */
#rogue-panel #r-screen:has(.r-bestiary){padding:0!important;overflow:hidden;align-items:stretch;justify-content:flex-start;background:#0b1820}
#rogue-panel #r-screen .r-bestiary{height:100%;min-height:0;max-width:100%;margin-inline:auto;display:flex;flex-direction:column;overflow:hidden}
#rogue-panel #r-screen .r-bestiary-head{flex:0 0 auto;padding:12px 12px 8px;background:#0b1820;margin:0}
#rogue-panel #r-screen .r-bestiary-tools{position:relative;top:0;flex:0 0 auto;max-height:55%;box-sizing:border-box;overflow:auto;overscroll-behavior:contain;padding:8px 12px 10px;margin:0;background:#0b1820}
#rogue-panel #r-screen .r-bestiary-list{flex:1 1 0;min-height:0;overflow:auto;overscroll-behavior:contain;align-content:start;box-sizing:border-box;padding:10px 12px 12px;margin:0;scrollbar-width:thin}
