/* AMCAEN Book Creator 36.1 — full-width stable cover design workspace
   Scope: DESIGN ONLY. Write/editor logic from 36.0 is intentionally untouched. */

/* The approved premium cover studio is a THREE-column workspace:
   controls | live cover canvas | smart remote.
   36.0 temporarily used a four-column grid while repairing fullscreen routing;
   that left an unused column and visually squeezed the design engine. */
html.amcaen-book-direct-360 body.amcaen-book-direct-360 #bookView.design-library-open #bookDesignLibrary{
  position:fixed!important;
  inset:0!important;
  left:0!important;
  right:0!important;
  top:0!important;
  bottom:0!important;
  width:100vw!important;
  max-width:none!important;
  height:100vh!important;
  min-height:100vh!important;
  margin:0!important;
  border:0!important;
  border-radius:0!important;
  box-sizing:border-box!important;
  overflow:hidden!important;
  z-index:2147483000!important;
  display:grid!important;
  grid-template-columns:clamp(250px,20vw,310px) minmax(0,1fr) clamp(320px,25vw,390px)!important;
  grid-template-rows:64px minmax(0,1fr) 58px!important;
}

/* Explicitly place the three production regions so no historic fourth-column rule can win. */
html.amcaen-book-direct-360 #bookDesignLibrary .dl-topbar{
  grid-column:1 / -1!important;
  grid-row:1!important;
  width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
}
html.amcaen-book-direct-360 #bookDesignLibrary .dl-library{
  grid-column:1!important;
  grid-row:2!important;
  min-width:0!important;
  width:auto!important;
  height:100%!important;
  overflow:auto!important;
  box-sizing:border-box!important;
}
html.amcaen-book-direct-360 #bookDesignLibrary .dl-stage{
  grid-column:2!important;
  grid-row:2!important;
  min-width:0!important;
  width:100%!important;
  height:100%!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
}
html.amcaen-book-direct-360 #bookDesignLibrary .dl-inspector{
  grid-column:3!important;
  grid-row:2!important;
  min-width:0!important;
  width:auto!important;
  height:100%!important;
  overflow:auto!important;
  box-sizing:border-box!important;
}
html.amcaen-book-direct-360 #bookDesignLibrary #continuumFooter227,
html.amcaen-book-direct-360 #bookDesignLibrary .dl-bottom{
  grid-column:1 / -1!important;
}
html.amcaen-book-direct-360 #bookDesignLibrary #continuumFooter227{
  grid-row:3!important;
  width:100%!important;
  box-sizing:border-box!important;
}

/* Let the actual cover/3D canvas use the new middle-column width. */
html.amcaen-book-direct-360 #bookDesignLibrary #continuumWrap226{
  left:18px!important;
  right:18px!important;
  width:auto!important;
  max-width:none!important;
}
html.amcaen-book-direct-360 #bookDesignLibrary .wrap-card226{
  width:min(98%,1280px)!important;
  max-width:1280px!important;
}
html.amcaen-book-direct-360 #bookDesignLibrary #continuum3dStage,
html.amcaen-book-direct-360 #bookDesignLibrary .continuum-3d-stage,
html.amcaen-book-direct-360 #bookDesignLibrary #dlBook{
  max-width:100%!important;
}

/* The current smart remote and left controls stay readable instead of being miniaturised. */
html.amcaen-book-direct-360 #bookDesignLibrary #continuumPremiumLeft227,
html.amcaen-book-direct-360 #bookDesignLibrary #continuumSmartRemote227{
  box-sizing:border-box!important;
  width:100%!important;
  max-width:none!important;
}

/* Safety fallback for older cover views if one is opened from a legacy button. */
html.amcaen-book-direct-360 #bookView.cover-design-open .cover-studio-161{
  position:fixed!important;
  inset:64px 0 0 0!important;
  width:100vw!important;
  max-width:none!important;
  height:calc(100vh - 64px)!important;
  grid-template-columns:minmax(0,1fr) clamp(320px,28vw,430px)!important;
  gap:0!important;
  overflow:hidden!important;
}
html.amcaen-book-direct-360 #bookView.cover-design-186-open #coverDesign186{
  position:fixed!important;
  inset:64px 0 0 0!important;
  width:100vw!important;
  max-width:none!important;
  height:calc(100vh - 64px)!important;
  grid-template-columns:minmax(0,1fr) clamp(320px,28vw,420px)!important;
  border-radius:0!important;
}
html.amcaen-book-direct-360 #bookView.cover-design-186-open #coverDesign186 .cover-stage186{
  min-width:0!important;
  width:100%!important;
}

/* Laptop breakpoints: preserve the full canvas first, then reduce side panels. */
@media(max-width:1350px){
  html.amcaen-book-direct-360 body.amcaen-book-direct-360 #bookView.design-library-open #bookDesignLibrary{
    grid-template-columns:240px minmax(0,1fr) 320px!important;
  }
}
@media(max-width:1120px){
  html.amcaen-book-direct-360 body.amcaen-book-direct-360 #bookView.design-library-open #bookDesignLibrary{
    grid-template-columns:210px minmax(0,1fr) 285px!important;
  }
  html.amcaen-book-direct-360 #bookDesignLibrary .c227-dpad{transform:scale(.88);transform-origin:top center!important}
}
