
/* 1.0.0-beta.5.7.2 — compact, laptop-safe desktop Bestiary. */
#bestiary .beta52-right:empty{display:none!important}

/* Empty catalog: do not reserve a dead third column on wide desktop. */
@media (min-width:1280px){
  body.desktop-layout #bestiary .beta52-layout:has(>.beta52-right:empty){
    grid-template-columns:minmax(250px,300px) minmax(0,1fr)!important;
  }
}

/* Small and medium desktops / notebooks: catalog + dossier stay side by side.
   The Echo panel becomes a compact information strip below the dossier. */
@media (min-width:861px) and (max-width:1279px){
  body.desktop-layout #bestiary .beta52-shell{
    width:min(100%,calc(100vw - 24px))!important;
    max-width:none!important;
  }
  body.desktop-layout #bestiary .beta52-layout{
    display:grid!important;
    grid-template-columns:minmax(250px,280px) minmax(0,1fr)!important;
    grid-template-rows:auto auto!important;
    gap:12px!important;
    align-items:stretch!important;
    min-height:0!important;
  }
  body.desktop-layout #bestiary .beta52-sidebar{
    grid-column:1!important;
    grid-row:1 / span 2!important;
    min-width:0!important;
  }
  body.desktop-layout #bestiary .beta52-dossier{
    grid-column:2!important;
    grid-row:1!important;
    min-width:0!important;
    min-height:680px!important;
  }
  body.desktop-layout #bestiary .beta52-right:empty{display:none!important}
  body.desktop-layout #bestiary .beta52-right{
    grid-column:2!important;
    grid-row:2!important;
    display:block!important;
    min-width:0!important;
    min-height:0!important;
    padding:8px 12px 12px!important;
  }
  body.desktop-layout #bestiary .beta52-right-stage{
    display:none!important;
  }
  body.desktop-layout #bestiary .beta52-side-cards{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:7px!important;
    margin:0!important;
  }
  body.desktop-layout #bestiary .beta52-side-card{
    grid-template-columns:38px minmax(0,1fr)!important;
    min-width:0!important;
    min-height:64px!important;
    padding:8px 9px!important;
    text-align:left!important;
  }
  body.desktop-layout #bestiary .beta52-side-icon{
    width:36px!important;
    height:36px!important;
    margin:0!important;
  }
  body.desktop-layout #bestiary .beta52-side-card strong{
    overflow-wrap:anywhere!important;
  }
  body.desktop-layout #bestiary .beta52-filters{
    grid-template-columns:1fr!important;
  }
  body.desktop-layout #bestiary .beta52-add{
    grid-column:auto!important;
  }
  body.desktop-layout #bestiary .beta52-filters .select{
    width:100%!important;
    min-width:0!important;
    padding-right:34px!important;
    font-size:12px!important;
  }
  body.desktop-layout #bestiary .beta52-layout:has(>.beta52-right:empty){
    grid-template-rows:auto!important;
  }
  body.desktop-layout #bestiary .beta52-layout:has(>.beta52-right:empty)>.beta52-sidebar{
    grid-row:1!important;
  }
}

/* At the narrow edge of desktop mode keep tabs and facts readable. */
@media (min-width:861px) and (max-width:1040px){
  body.desktop-layout #bestiary .beta52-layout{
    grid-template-columns:minmax(244px,266px) minmax(0,1fr)!important;
    gap:9px!important;
  }
  body.desktop-layout #bestiary .beta52-dossier{
    padding:17px 15px 15px!important;
  }
  body.desktop-layout #bestiary .beta52-hero-grid{
    grid-template-columns:minmax(210px,.82fr) minmax(260px,1.18fr)!important;
    gap:12px!important;
  }
  body.desktop-layout #bestiary .beta52-fact{
    grid-template-columns:112px minmax(0,1fr)!important;
  }
  body.desktop-layout #bestiary .beta52-tabs{
    gap:2px!important;
  }
  body.desktop-layout #bestiary .beta52-tab{
    padding:9px 8px!important;
    font-size:10px!important;
  }
  body.desktop-layout #bestiary .beta52-side-card{
    grid-template-columns:32px minmax(0,1fr)!important;
    padding:7px!important;
  }
  body.desktop-layout #bestiary .beta52-side-icon{
    width:31px!important;
    height:31px!important;
  }
}
