
/* Publishing Studio · cinematic clear-glass workbench.
   Route-scoped final override: do not modify Book Creator, Publishing Wizard,
   studio JavaScript, or shared glass styles used by other pages. */

/* A hidden tab must remain hidden even when older screenfit styles force display. */
body.cps-body.cps-screenfit .cps-panel[hidden]{display:none!important}

/* The cinematic film must remain visible behind translucent panels. */
body.cps-body.cps-screenfit .cps-workspace{
  background:rgba(6,17,39,.06)!important;
  border:0!important;box-shadow:none!important;backdrop-filter:none!important;
}
body.cps-body.cps-screenfit .cps-panel{
  background:rgba(8,27,49,.13)!important;
  border:1px solid rgba(223,250,255,.38)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.19)!important;
  backdrop-filter:blur(8px) saturate(1.16)!important;
  -webkit-backdrop-filter:blur(8px) saturate(1.16)!important;
}
body.cps-body.cps-screenfit .cps-control-surface,
body.cps-body.cps-screenfit .cps-preview-shell,
body.cps-body.cps-screenfit .cps-check-results,
body.cps-body.cps-screenfit .cps-print-output{
  background:linear-gradient(130deg,rgba(255,255,255,.16),rgba(221,243,255,.09))!important;
  color:#fff!important;
  border:1px solid rgba(240,251,255,.45)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.23),0 8px 26px rgba(5,12,36,.14)!important;
  backdrop-filter:blur(9px) saturate(1.14)!important;
  -webkit-backdrop-filter:blur(9px) saturate(1.14)!important;
}
body.cps-body.cps-screenfit .cps-canvas-frame{
  background:rgba(1,12,29,.13)!important;
  border-color:rgba(237,253,255,.24)!important;
}
body.cps-body.cps-screenfit .cps-form-dock{
  background:rgba(11,29,58,.27)!important;
  border-color:rgba(225,244,255,.27)!important;
  backdrop-filter:blur(7px)!important;
}
body.cps-body.cps-screenfit .cps-style-tile{
  background:rgba(235,248,255,.14)!important;
  border-color:rgba(228,249,255,.36)!important;
  color:#f8ffff!important;
}
body.cps-body.cps-screenfit .cps-style-tile[aria-pressed="true"]{
  background:rgba(139,190,247,.31)!important;
  border-color:#ddffff!important;
  box-shadow:0 0 0 1px rgba(218,255,255,.53),0 0 14px rgba(142,235,255,.22)!important;
}
body.cps-body.cps-screenfit .cps-field,
body.cps-body.cps-screenfit .cps-style-picks legend,
body.cps-body.cps-screenfit .cps-switch,
body.cps-body.cps-screenfit .cps-preview-top,
body.cps-body.cps-screenfit .cps-check-row{
  color:#fff!important;text-shadow:0 1px 6px rgba(0,8,27,.5);
}
body.cps-body.cps-screenfit .cps-preview-top small,
body.cps-body.cps-screenfit .cps-status,
body.cps-body.cps-screenfit .cps-technical-note,
body.cps-body.cps-screenfit .cps-field-hint,
body.cps-body.cps-screenfit .cps-preview-quick span{color:#e5f5ff!important}
body.cps-body.cps-screenfit .cps-field input,
body.cps-body.cps-screenfit .cps-field select{
  background:rgba(250,253,255,.89)!important;
  color:#11253b!important;border-color:rgba(255,255,255,.63)!important;
}
body.cps-body.cps-screenfit .cps-field input[type="file"]{
  background:rgba(251,254,255,.22)!important;
  color:#f8ffff!important;border-style:dashed!important;
}
body.cps-body.cps-screenfit .cps-field input[type="file"]::file-selector-button{
  color:#15344a;background:#f5fcff;border:0;border-radius:6px;padding:5px 8px;margin-right:8px;cursor:pointer;
}
body.cps-body.cps-screenfit .cps-canvas-frame canvas{
  background:transparent!important;
}

/* Compact desktop stage: cover and all actions are on screen together. */
@media(min-width:1100px) and (min-height:680px){
  body.cps-body.cps-screenfit .cps-workspace{
    height:calc(100dvh - 62px)!important;min-height:0!important;
    display:flex!important;flex-direction:column!important;
    overflow:hidden!important;padding:8px 13px!important;margin:0!important;
  }
  body.cps-body.cps-screenfit .cps-tabs{
    flex:0 0 auto!important;margin:0 0 8px!important;gap:8px!important;
  }
  body.cps-body.cps-screenfit .cps-tab{
    min-height:43px!important;padding:6px 11px!important;
    grid-template-rows:auto!important;gap:5px 10px!important;
  }
  body.cps-body.cps-screenfit .cps-tab>span{font-size:1.2rem!important}
  body.cps-body.cps-screenfit .cps-tab strong{font-size:.85rem!important}
  body.cps-body.cps-screenfit .cps-tab small{font-size:.61rem!important}
  body.cps-body.cps-screenfit .cps-panel:not([hidden]){
    flex:1 1 auto!important;min-height:0!important;height:auto!important;
    display:flex!important;flex-direction:column!important;
    overflow:hidden!important;padding:9px 12px!important;
  }
  body.cps-body.cps-screenfit .cps-panel-heading{
    flex:0 0 auto!important;margin:0 0 8px!important;
  }
  body.cps-body.cps-screenfit .cps-panel-heading h3{
    font-size:clamp(1.06rem,1.38vw,1.55rem)!important;margin:0 0 2px!important;
  }
  body.cps-body.cps-screenfit .cps-panel-heading .cps-panel-index{display:none!important}
  body.cps-body.cps-screenfit .cps-panel-heading p:not(.cps-panel-index){
    font-size:.7rem!important;line-height:1.15!important;
  }
  body.cps-body.cps-screenfit .cps-stage-label{display:none!important}
  body.cps-body.cps-screenfit .cps-editor-layout{
    flex:1 1 auto!important;min-height:0!important;
    display:grid!important;grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr)!important;
    grid-template-rows:minmax(0,1fr)!important;align-items:stretch!important;gap:12px!important;
  }
  body.cps-body.cps-screenfit .cps-preview-shell{
    grid-column:1!important;grid-row:1!important;
    position:relative!important;top:auto!important;
    height:100%!important;max-height:100%!important;min-height:0!important;
    display:flex!important;flex-direction:column!important;
    overflow:hidden!important;padding:9px!important;
  }
  body.cps-body.cps-screenfit .cps-preview-top{flex:none!important;margin:0 0 6px!important}
  body.cps-body.cps-screenfit .cps-canvas-frame{
    flex:1 1 auto!important;min-height:0!important;max-height:none!important;
    width:100%!important;height:auto!important;display:flex!important;
    align-items:center!important;justify-content:center!important;overflow:hidden!important;padding:6px!important;
  }
  body.cps-body.cps-screenfit .cps-canvas-frame canvas{
    width:auto!important;height:100%!important;max-width:100%!important;
    max-height:100%!important;object-fit:contain!important;
  }
  body.cps-body.cps-screenfit .cps-preview-quick{
    flex:0 0 auto!important;margin:6px 0 0!important;gap:8px!important;
  }
  body.cps-body.cps-screenfit .cps-preview-quick .cps-button{
    min-height:32px!important;padding:5px 12px!important;font-size:.68rem!important;
  }
  body.cps-body.cps-screenfit .cps-preview-shell>.cps-technical-note{
    flex:0 0 auto!important;margin:5px 0 0!important;
    font-size:.6rem!important;line-height:1.15!important;
  }
  body.cps-body.cps-screenfit .cps-control-surface{
    grid-column:2!important;grid-row:1!important;
    height:100%!important;max-height:100%!important;min-height:0!important;
    display:flex!important;flex-direction:column!important;overflow:hidden!important;
  }
  body.cps-body.cps-screenfit .cps-form-fields{
    flex:1 1 auto!important;min-height:0!important;max-height:none!important;
    display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;
    align-content:start!important;gap:7px 9px!important;
    overflow-y:auto!important;overflow-x:hidden!important;
    padding:10px 11px 8px!important;
    scrollbar-color:rgba(198,236,248,.57) transparent!important;
  }
  body.cps-body.cps-screenfit .cps-form-fields>.cps-field:nth-child(1),
  body.cps-body.cps-screenfit .cps-form-fields>.cps-field:nth-child(2),
  body.cps-body.cps-screenfit .cps-form-fields>.cps-field:nth-child(3){grid-column:span 2!important}
  body.cps-body.cps-screenfit .cps-form-fields>.cps-grid-fields,
  body.cps-body.cps-screenfit .cps-form-fields>.cps-style-picks,
  body.cps-body.cps-screenfit .cps-form-fields>.cps-art-controls{grid-column:1/-1!important}
  body.cps-body.cps-screenfit .cps-form-fields>.cps-field:nth-of-type(4),
  body.cps-body.cps-screenfit .cps-form-fields>.cps-field:nth-of-type(5){grid-column:span 3!important}
  body.cps-body.cps-screenfit .cps-form-fields .cps-field{min-width:0!important;font-size:.7rem!important}
  body.cps-body.cps-screenfit .cps-form-fields .cps-field input,
  body.cps-body.cps-screenfit .cps-form-fields .cps-field select{
    height:33px!important;min-height:33px!important;border-radius:8px!important;
    padding:3px 9px!important;font-size:.78rem!important;
  }
  body.cps-body.cps-screenfit .cps-form-fields .cps-field input[type="file"]{
    height:33px!important;padding:3px 7px!important;font-size:.65rem!important;
  }
  body.cps-body.cps-screenfit .cps-form-fields .cps-field-hint{font-size:.58rem!important}
  body.cps-body.cps-screenfit .cps-grid-fields{gap:9px!important}
  body.cps-body.cps-screenfit .cps-style-picks legend{font-size:.69rem!important;margin:0 0 4px!important}
  body.cps-body.cps-screenfit .cps-style-grid{gap:6px!important}
  body.cps-body.cps-screenfit .cps-style-tile{padding:4px!important;gap:3px!important;min-height:53px!important}
  body.cps-body.cps-screenfit .cps-style-tile .cps-tile-art{
    width:36px!important;max-width:36px!important;height:32px!important;
    aspect-ratio:auto!important;border-radius:6px!important;
  }
  body.cps-body.cps-screenfit .cps-style-tile strong{font-size:.58rem!important}
  body.cps-body.cps-screenfit .cps-art-controls{justify-content:space-between!important}
  body.cps-body.cps-screenfit .cps-art-controls .cps-switch{font-size:.69rem!important}
  body.cps-body.cps-screenfit .cps-art-controls .cps-clear-art{font-size:.68rem!important;padding:0!important}
  body.cps-body.cps-screenfit .cps-form-dock{
    flex:0 0 auto!important;position:relative!important;bottom:auto!important;
    display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:6px!important;padding:9px 10px!important;z-index:1!important;
  }
  body.cps-body.cps-screenfit .cps-form-dock .cps-button-row{display:contents!important}
  body.cps-body.cps-screenfit .cps-form-dock .cps-button{
    flex:none!important;width:100%!important;min-height:32px!important;
    padding:5px 5px!important;font-size:.64rem!important;line-height:1.1!important;
  }
  body.cps-body.cps-screenfit .cps-form-dock .cps-status{
    grid-column:1/-1!important;margin:0!important;min-height:0!important;
    font-size:.62rem!important;line-height:1.2!important;
  }
  body.cps-body.cps-screenfit #cps-panel-check .cps-check-layout,
  body.cps-body.cps-screenfit #cps-panel-print .cps-print-layout{
    flex:1 1 auto!important;min-height:0!important;overflow:auto!important;
  }
}
/* Small desktops and mobiles get readable single-column layout and natural page
   scrolling rather than a clipped, inaccessible fixed-height workspace. */
@media(max-width:1099px), (max-height:679px){
  body.cps-body.cps-screenfit .cps-workspace{height:auto!important;overflow:visible!important}
  body.cps-body.cps-screenfit .cps-panel:not([hidden]){height:auto!important;overflow:visible!important}
  body.cps-body.cps-screenfit .cps-preview-shell{position:relative!important;top:auto!important}
  body.cps-body.cps-screenfit .cps-form-fields{overflow:visible!important}
}
