/* KamMono 2D v0.7.227 — correction of step navigation, sidebar scroll,
   drawing size and LED toggle positioning. Additive only, after 0.7.226. */

/* Desktop: steps are centered on the entire toolbar, not on the free grid cell.
   Changes to Back/Next width cannot move the five-stage navigation. */
@media (min-width:1101px) {
 html.kw-staged .kw-stepnav {
   position:relative!important;
   display:grid!important;
   grid-template-columns:max-content max-content minmax(0,1fr) max-content!important;
   grid-template-rows:minmax(38px,auto)!important;
   gap:7px!important;
   padding:6px 11px!important;
   min-height:51px!important;
   box-sizing:border-box!important;
 }
 html.kw-staged .kw-stepnav .kw-stepnav-list {
   position:absolute!important;
   grid-column:auto!important;grid-row:auto!important;
   top:50%!important;left:50%!important;
   transform:translate(-50%,-50%)!important;
   width:max-content!important;max-width:calc(100% - 480px)!important;
   justify-content:center!important;justify-self:auto!important;
   margin:0!important;padding:0!important;
   display:flex!important;flex-wrap:nowrap!important;overflow:visible!important;
   white-space:nowrap!important;
   z-index:1!important;
 }
 html.kw-staged .kw-stepnav .kw-stepnav-actions {
   grid-column:4!important;grid-row:1!important;justify-self:end!important;
   position:relative!important;z-index:2!important;
   margin:0!important;min-width:0!important;
 }
 html.kw-staged .kw-stepnav .kw-brand-mark,
 html.kw-staged .kw-stepnav #kwTutorBtn {position:relative!important;z-index:2!important;}
 /* The right-hand setup must grow naturally when decorations are expanded.
    The browser page is the only vertical scroll container. */
 html.kw-staged #kwSideDock {
   position:static!important;top:auto!important;
   max-height:none!important;height:auto!important;
   overflow:visible!important;
   align-self:start!important;
 }
 /* Show a larger elevation without cropping the SVG viewBox or measurement leaders. */
 html.kw-staged #planner-settings svg#draw.drawing {
   height:clamp(510px,calc(68vh + 46px),765px)!important;
   max-height:clamp(510px,calc(68vh + 46px),765px)!important;
   min-height:0!important;
   width:100%!important;
   display:block!important;
 }
}
@media (min-width:1101px) and (max-width:1279px) {
 html.kw-staged .kw-stepnav {gap:4px!important;padding-inline:7px!important;}
 html.kw-staged .kw-stepnav .kw-stepnav-list {max-width:calc(100% - 400px)!important;}
 html.kw-staged .kw-stepnav .kw-stepnav-txt b {font-size:9px!important;}
 html.kw-staged .kw-stepnav .kw-stepnav-btn {padding:4px 3px!important;gap:3px!important;}
 html.kw-staged .kw-stepnav .kw-stepnav-no {height:19px!important;width:19px!important;min-width:19px!important;}
 html.kw-staged .kw-stepnav #kwTutorBtn {max-width:108px!important;}
}
/* Tablet/phone: the step bar is its own full-width centered row. */
@media (max-width:1100px) {
 html.kw-staged .kw-stepnav {position:relative!important;}
 html.kw-staged .kw-stepnav .kw-stepnav-list {
   position:static!important;left:auto!important;top:auto!important;
   transform:none!important;justify-self:stretch!important;
   justify-content:center!important;margin-inline:auto!important;
   max-width:100%!important;min-width:0!important;
 }
 html.kw-staged #kwSideDock {
   max-height:none!important;overflow:visible!important;
   height:auto!important;position:relative!important;
 }
}
@media (min-width:601px) and (max-width:900px) {
 html.kw-staged .kw-stepnav .kw-stepnav-list {grid-column:1/-1!important;grid-row:2!important;}
}
@media (max-width:600px) {
 html.kw-staged .kw-stepnav .kw-stepnav-list {
   display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;
   grid-column:1/-1!important;grid-row:2!important;width:100%!important;
 }
 html.kw-staged #planner-settings svg#draw.drawing {
   width:100%!important;height:auto!important;max-height:none!important;
   overflow:visible!important;
 }
}
/* Pull the central LED control up slightly; keep it in normal layout flow
   so dimensions and the top of the drawing remain visible. */
#planner-settings .kw-led-row {
 position:relative!important;
 top:-7px!important;
 margin-bottom:-6px!important;
 padding-top:1px!important;
}
@media (max-width:740px) {
 #planner-settings .kw-led-row {top:-3px!important;margin-bottom:-2px!important;}
}
