/* Shape & Template live beside Focus/Fit. Keep the design canvas heading and
   its details visible; position the tools toward the center/right without
   letting flex shrink the heading to an ellipsis. */
#app .lb-canvas-head{
 display:flex;flex:0 0 auto;flex-wrap:wrap;column-gap:12px;row-gap:5px;
 min-height:43px;height:auto;padding:4px 14px;
}
#app .lb-canvas-head>div:first-child{
 display:flex;align-items:baseline;flex:0 0 auto;min-width:max-content;
 gap:12px;white-space:nowrap;
}
#app .lb-canvas-head #lb-design-label{
 display:inline;max-width:none;min-width:max-content;overflow:visible;
 text-overflow:clip;white-space:nowrap;
}
#app .lb-canvas-head-actions{
 display:flex;flex:1 1 360px;min-width:0;align-items:center;
 justify-content:flex-end;gap:6px;
}
#app .lb-canvas-shape-controls{
 display:flex;align-items:center;gap:7px;min-width:0;flex:0 1 auto;
 margin-left:auto;margin-right:12px;
}
#app .lb-canvas-shape-controls .lb-preview-shape-label{
 display:flex;flex-direction:row;align-items:center;gap:6px;
 flex:0 1 180px;min-width:112px;max-width:180px;
 margin:0;font-size:10px;white-space:nowrap;
}
#app .lb-canvas-shape-controls .lb-canvas-shape-label{flex:0 0 auto}
#app .lb-canvas-shape-controls #lb-preview-shape-select{
 flex:1 1 auto;min-width:0;width:100%;height:32px;min-height:32px;
 border-radius:7px;padding:4px 22px 4px 7px;font-size:11px;
}
#app .lb-canvas-shape-controls #lb-preview-choose-template{
 flex:0 0 auto;min-height:32px;padding:5px 8px;font-size:10px;white-space:nowrap;
}
/* The old 90px cap was needlessly truncating short template names.
   Use the label's actual content width up to 260px and shrink only if
   the canvas header really needs the room. Keep its full title tooltip. */
#app #lb-preview-template-current{
 display:inline-block;flex:0 1 auto;width:max-content;
 max-width:260px;min-width:0;overflow:hidden;text-overflow:ellipsis;
 white-space:nowrap;font-size:11px;align-self:center;
}
#app .lb-preview-panel{padding-top:6px}
/* The header can reflow in narrow editing windows instead of overlapping
   or clipping Design canvas details. Mobile retains its compact controls. */
@media(max-width:960px){
 #app .lb-canvas-head{gap:5px 8px;padding:4px 8px}
 #app .lb-canvas-head-actions{flex:1 1 100%;justify-content:flex-end}
 #app .lb-canvas-shape-controls{margin-right:8px}
}
@media(max-width:700px){
 #app .lb-canvas-head{gap:4px;padding:4px 6px}
 #app .lb-canvas-head-actions{flex-wrap:wrap;justify-content:flex-end}
 #app .lb-canvas-shape-controls{flex:1 1 200px;min-width:0;margin:0 6px 0 0}
 #app .lb-canvas-shape-controls .lb-preview-shape-label{flex:1 1 auto;min-width:90px}
 #app .lb-canvas-shape-controls .lb-canvas-shape-label{display:none}
 #app #lb-preview-template-current{max-width:180px;font-size:10px}
}
@media(max-width:610px){
 #app .lb-canvas-head #lb-design-label{display:none}
}
/* Fit test eye icons and frame coupon part selection live in their sections. */
:is(#app,#stl-modal) .lb-fit-test-actions{display:flex;align-items:center;gap:8px;margin:8px 0 0}
:is(#app,#stl-modal) .lb-fit-test-actions[hidden]{display:none!important}
:is(#app,#stl-modal) .lb-fit-eye{display:inline-grid;place-items:center;flex:0 0 35px;width:35px;height:35px;min-width:35px;margin:0;padding:6px;border:1px solid #497b94;border-radius:8px;background:#15394e;color:#c4e5ee;cursor:pointer;line-height:1}
:is(#app,#stl-modal) .lb-fit-eye:hover,:is(#app,#stl-modal) .lb-fit-eye.active{color:#fff;border-color:#67d7e9;background:#145970}
:is(#app,#stl-modal) .lb-fit-eye:focus-visible{outline:2px solid #7fe4f3;outline-offset:2px}
:is(#app,#stl-modal) .lb-fit-eye svg{display:block;pointer-events:none}
:is(#app,#stl-modal) .lb-fit-test-actions>.lb-lowkey{flex:1 1 auto;min-width:0;margin:0}
:is(#app,#stl-modal) .lb-frame-fit-actions{align-items:center;gap:8px;flex-wrap:nowrap}
:is(#app,#stl-modal) .lb-frame-fit-actions>.lb-lowkey{flex:1 1 auto;min-width:0}
:is(#app,#stl-modal) .lb-frame-fit-parts{display:flex;align-items:center;gap:9px;margin:5px 0;color:#c8dfe9;font-size:11px}
:is(#app,#stl-modal) .lb-frame-fit-parts select{flex:1 1 auto;min-width:0;max-width:220px;min-height:33px;padding:5px 8px;border:1px solid #4b8195;border-radius:7px;background:#102e43;color:#effaff}
:is(#app,#stl-modal) .lb-accessory-preview-parts[hidden]{display:none!important}
/* Sidebar collapse buttons: draw symmetric centered carets instead of glyphs
   whose optical centers vary by platform font. Existing behavior unchanged. */
#app #lb-collapse-left,#app #lb-collapse-right{
 position:relative!important;display:grid!important;place-items:center!important;
 padding:0!important;width:27px!important;height:27px!important;
 min-width:27px!important;min-height:27px!important;
 text-align:center!important;line-height:0!important;font-size:0!important;
}
#app #lb-collapse-left::before,#app #lb-collapse-right::before{
 content:"";display:block;position:absolute;
 /* The original (invisible) text must not occupy a grid cell that moves
    the chevron. Slight optical correction for the open-sided stroke. */
 top:calc(50% + 1px);left:50%;width:8px;height:8px;box-sizing:border-box;
 border-top:2px solid currentColor;border-right:2px solid currentColor;
 transform-origin:center center;pointer-events:none;
}
#app #lb-collapse-left::before{transform:translate(-50%,-50%) rotate(-135deg)}
#app #lb-collapse-right::before{transform:translate(-50%,-50%) rotate(45deg)}
#app #lb-collapse-left[aria-expanded="false"]::before{transform:translate(-50%,-50%) rotate(45deg)}
#app #lb-collapse-right[aria-expanded="false"]::before{transform:translate(-50%,-50%) rotate(-135deg)}
