/* PARCHE04 — Optional readable presentation; no SERVER combat authority. */
#hud-root .caelytte-workspace{padding-top:clamp(42px,7vh,80px);gap:10px;}
#hud-root .caelytte-workspace .caelytte-workspace-panel{height:min(82dvh,850px);max-height:calc(100dvh - 50px);}
#hud-root .caelytte-workspace .inventory-dialog{width:min(865px,59vw);}
#hud-root .caelytte-workspace .statistics-dialog{width:min(465px,34vw);}
#hud-root .caelytte-workspace .inventory-doll-formation{grid-template-columns:42px minmax(0,1fr) 42px;min-height:210px;}
#hud-root .caelytte-workspace .inventory-doll{min-height:215px;}
#hud-root .caelytte-workspace .inventory-doll-image{max-height:215px;}
#hud-root .caelytte-workspace .inventory-bottom-slots{min-height:88px;}
#hud-root .caelytte-workspace .inventory-reserved-grid{display:grid;grid-template-columns:repeat(7,minmax(38px,1fr));gap:5px;}
#hud-root .caelytte-workspace .inventory-reserved-grid .inventory-equip-slot{width:100%;height:42px;min-width:38px;max-width:54px;border:1px solid #a68cc4;border-radius:5px;}
#hud-root .caelytte-workspace .inventory-wings-group .wings-square{width:43px;height:43px;}
#hud-root .caelytte-workspace .inventory-mini-heading{font-size:10px;}
#hud-root .caelytte-workspace .inventory-grid{min-height:200px!important;max-height:350px!important;}
#hud-root .caelytte-workspace .inventory-categories{grid-template-columns:repeat(4,minmax(0,1fr))!important;}
#hud-root .caelytte-workspace .inventory-category{font-size:11px!important;}
#hud-root .caelytte-workspace .statistics-main-grid{min-width:0;}
#hud-root .caelytte-workspace .statistics-dialog{font-size:13px;}
#n16-pve .n37-history-messages{font:500 15px/1.5 system-ui,sans-serif!important;color:#f0f2f7;}
#n16-pve .n37-history-messages>div{padding:6px 2px!important;overflow-wrap:anywhere;}
#n16-pve .n37-history-top{font-size:13px!important;}
#n16-pve .n37-history{flex-basis:240px;max-height:clamp(185px,34vh,310px);}
#n16-pve .n37-history.is-large{max-height:65vh;}
/* P04 FIX1: the creature button is a viewport-fixed sibling, precisely under Modo normal/táctico. */
#n16-pve>.p04-creature-toggle{position:fixed!important;top:172px!important;right:16px!important;left:auto!important;bottom:auto!important;
 z-index:20023!important;display:flex!important;justify-content:center;align-items:center;
 width:clamp(152px,12vw,190px)!important;min-height:43px!important;
 border:1px solid #87adcc;border-radius:12px;background:linear-gradient(145deg,#17222de8,#090e15e8);
 color:#f0f8ff;font:700 14px Georgia,serif;padding:8px 12px;box-shadow:0 7px 18px #0009;cursor:pointer;pointer-events:auto;}
#n16-pve .p04-creature-toggle[aria-pressed="true"]{border-color:#63d9fd;box-shadow:0 0 9px #46a7de99;}
#n16-pve .p04-creature{filter:drop-shadow(0 0 2px #000) drop-shadow(0 0 3px #88b8ff);}
#n16-pve .p04-creature-ally{filter:drop-shadow(0 0 2px #2e76ff) drop-shadow(0 0 5px #2e76ff);}
#n16-pve .p04-creature-enemy{filter:drop-shadow(0 0 2px #ef3434) drop-shadow(0 0 5px #ef3434);}
#n16-pve .p04-creature-boss{filter:drop-shadow(0 0 2px #9b41fc) drop-shadow(0 0 5px #9b41fc);}
#n16-pve .p04-creature-name{font:700 9px system-ui,sans-serif;fill:#fff;stroke:#06111e;stroke-width:1.8;paint-order:stroke;}
#n16-pve .p04-creature-health{font:700 9px system-ui,sans-serif;stroke:#06111e;stroke-width:1.7;paint-order:stroke;}
@media(max-width:980px){#hud-root .caelytte-workspace .inventory-reserved-grid{grid-template-columns:repeat(4,minmax(38px,1fr));}#hud-root .caelytte-workspace .inventory-dialog{width:100%;}#hud-root .caelytte-workspace .statistics-dialog{width:100%;}}
@media(max-width:850px){#hud-root .caelytte-workspace{padding:8px;}#hud-root .caelytte-workspace .caelytte-workspace-panel{height:min(74dvh,660px);}}
@media(max-width:680px){#n16-pve>.p04-creature-toggle{top:113px!important;right:7px!important;width:125px!important;min-height:35px!important;padding:6px 8px!important;font-size:11px!important;}}

/* P09 FIX4 — Approved layout: two panels shift right as one group; ONLY
   Mochila grows to fit ALAS plus seven relics. Estadísticas is unchanged.
   Right boundary follows Director's red mark at ~11% viewport width. */
@media(min-width:981px){
 #hud-root .caelytte-workspace.has-both{
  justify-content:flex-end;align-items:flex-start;
  padding-right:clamp(18px,11.2vw,230px);
 }
 #hud-root .caelytte-workspace .inventory-dialog{
  box-sizing:border-box;flex:0 1 min(925px,65vw);
  width:min(925px,65vw);max-width:none;
 }
 #hud-root .caelytte-workspace .inventory-columns{
  grid-template-columns:minmax(330px,41%) minmax(0,1fr);
 }
 #hud-root .caelytte-workspace .inventory-bottom-slots{
  display:flex;flex-wrap:nowrap;overflow:visible;gap:6px;
 }
 #hud-root .caelytte-workspace .inventory-reserved{
  min-width:0;flex:1 1 auto;
 }
 #hud-root .caelytte-workspace .inventory-reserved-grid{
  display:grid;grid-template-columns:repeat(7,minmax(34px,1fr));gap:4px;
 }
 #hud-root .caelytte-workspace .inventory-reserved-grid .inventory-equip-slot{
  min-width:34px;max-width:none;width:100%;height:38px;
 }
 #hud-root .caelytte-workspace .inventory-wings-group{
  flex:0 0 auto;padding-right:4px;
 }
}
/* Laptop fallback: fit on screen instead of clipping the seventh relic. */
@media(min-width:981px) and (max-width:1280px){
 #hud-root .caelytte-workspace.has-both{padding-right:16px;gap:7px;}
 #hud-root .caelytte-workspace.has-both .inventory-dialog{width:min(925px,67vw);flex-basis:min(925px,67vw);}
 #hud-root .caelytte-workspace.has-both .inventory-columns{grid-template-columns:minmax(310px,43%) minmax(0,1fr);}
}
