/* Desktop only: existing controls and actions; mobile keeps its original layout. */
@media(min-width:921px){
 :root{--pf-chrome:#202930;--pf-line:#41505a;--pf-text:#edf4f6;--pf-muted:#b4c4cc;--pf-toolbar:#f4f6f7;--pf-border:#cfd9dd}
 html[data-theme=dark]{--pf-chrome:#151d23;--pf-line:#384951;--pf-toolbar:#253139;--pf-border:#43565e}
 body:not(.presentation)>header{position:relative!important;display:grid!important;box-sizing:border-box;grid-template-columns:auto auto auto minmax(0,1fr) auto!important;grid-template-rows:50px 36px!important;height:86px!important;min-height:86px!important;padding:0 14px!important;gap:0 7px!important;background:var(--pf-chrome)!important;color:var(--pf-text)!important;border:0!important;border-bottom:1px solid var(--pf-line)!important;align-items:center!important}
 body:not(.presentation)>header::after{content:'';position:absolute;top:49px;left:14px;right:14px;height:1px;background:var(--pf-line);pointer-events:none}
 body:not(.presentation)>header #appActions,body:not(.presentation)>header #projectActions{display:contents!important}
 body:not(.presentation)>header #mobileBrand{grid-area:1/1;order:initial!important;display:flex!important;height:40px!important;width:146px;min-width:0;padding:0 8px 0 0!important;margin:0!important;border:0!important;border-right:1px solid var(--pf-line)!important}
 body:not(.presentation)>header #mobileBrand #packformaLogo{width:136px!important;height:40px!important;min-width:0!important;max-width:136px!important;object-fit:contain}
 body:not(.presentation)>header #appFile{grid-area:1/2;order:initial!important}
 body:not(.presentation)>header #saveproject{grid-area:1/3;order:initial!important}
 body:not(.presentation)>header #outputActions{grid-area:1/5;order:initial!important;justify-self:end}
 body:not(.presentation)>header #pfToolSearchShell{grid-area:2/1/3/3;order:initial!important;width:100%!important;min-width:0!important;max-width:250px;height:27px!important;margin:0!important;box-sizing:border-box;background:#141d24!important;border:1px solid var(--pf-line)!important;border-radius:5px!important;box-shadow:none!important;color:var(--pf-text)!important}
 body:not(.presentation)>header #pfToolQuery{font-size:11px!important;color:var(--pf-text)!important}
 body:not(.presentation)>header #pfToolQuery::placeholder{color:var(--pf-muted)!important}
 body:not(.presentation)>header #pfTextOpen{grid-area:2/3/3/5;order:initial!important;justify-self:start;width:auto!important;max-width:none!important;margin:0!important}
 body:not(.presentation)>header #pfTextOpen .pf-text-long{display:inline!important}
 body:not(.presentation)>header #pfTextOpen .pf-text-short{display:none!important}
 body:not(.presentation)>header #pfTextOpen .pf-action-icon,body:not(.presentation)>header #pfToolSearchShell .pf-tool-search-icon{stroke:#61d8d0!important}
 body:not(.presentation)>header #appRight{grid-area:2/5;order:initial!important;display:flex!important;align-items:center;justify-self:end;gap:8px!important;padding:0!important;margin:0!important}
 body:not(.presentation)>header .polish-group{display:flex;align-items:center!important;gap:3px!important;padding:0!important;border:0!important}
 body:not(.presentation)>header .polish-caption{display:none!important}
 body:not(.presentation)>header button{min-height:30px!important;height:30px!important;padding:5px 9px!important;margin:0!important;border:1px solid transparent!important;border-radius:5px!important;background:transparent!important;color:var(--pf-text)!important;font-size:11px!important;box-shadow:none!important;white-space:nowrap}
 body:not(.presentation)>header button:hover{background:#ffffff12!important;border-color:#ffffff25!important}
 body:not(.presentation)>header #appActions button{color:var(--pf-text)!important;background:transparent!important}
 body:not(.presentation)>header #appActions button:hover{background:#ffffff12!important}
 body:not(.presentation)>header button:disabled{opacity:.38!important;cursor:default}
 body:not(.presentation)>header #saveproject{border-color:#546b76!important}
 body:not(.presentation)>header #historyBar{border:0!important;padding:0!important;gap:2px!important}
 body:not(.presentation)>header #appRight button{width:28px!important;min-width:28px!important;height:27px!important;min-height:27px!important;padding:0!important;font-size:17px!important}
 body:not(.presentation)>header #appSaveState{max-width:110px;overflow:hidden;text-overflow:ellipsis;color:var(--pf-muted)!important;font-size:10px!important}
 body:not(.presentation)>header #appSaveState[data-dirty=true]{color:#75e6d7!important}
 body:not(.presentation)>header #pfModeSwitch{grid-area:auto!important;position:absolute!important;top:25px!important;left:50%!important;transform:translate(-50%,-50%)!important;display:flex!important;flex-wrap:nowrap!important;align-items:center;gap:3px!important;width:auto!important;min-width:0!important;max-width:none!important;padding:3px!important;margin:0!important;border:1px solid #536872!important;border-radius:7px!important;background:#111b22!important;z-index:2}
 body:not(.presentation)>header #pfModeSwitch button{flex:0 0 auto!important;min-width:96px!important;min-height:34px!important;height:34px!important;padding:6px 12px!important;border:0!important;font:750 12px/1.2 system-ui!important;letter-spacing:.07em!important;color:var(--pf-muted)!important;background:transparent!important}
 body:not(.presentation)>header #pfModeSwitch button[aria-pressed=true]{background:#087d89!important;color:#fff!important;box-shadow:inset 0 -3px #48d8ce!important}
 body:not(.presentation)>header #pfStudioView{position:absolute;top:47px;left:50%;transform:translateX(-50%);width:195px;min-width:195px!important;max-width:195px!important;min-height:28px!important;height:28px!important;padding:3px 6px!important;margin:0!important;background:#263740;color:var(--pf-text);border:1px solid #536872;border-radius:5px;font:11px system-ui}
 body:not(.presentation)>header #pfStudioView[hidden]{display:none!important}
 body:not(.presentation) #appToolbar{box-sizing:border-box;display:flex;flex-wrap:wrap!important;align-items:stretch!important;gap:0!important;padding:3px 12px!important;min-height:46px;background:var(--pf-toolbar)!important;border:0!important;border-bottom:1px solid var(--pf-border)!important}
 body:not(.presentation) #appToolbar>.polish-group{display:flex;align-items:center!important;flex:0 1 auto;gap:4px!important;min-height:42px;padding:13px 8px 3px!important;margin:0!important;border-right:1px solid var(--pf-border)!important}
 body:not(.presentation) #appToolbar .polish-caption{top:2px!important;left:8px!important;font-size:8px!important;line-height:10px!important;letter-spacing:.08em!important;color:var(--app-muted)!important}
 body:not(.presentation) #appToolbar button,body:not(.presentation) #appToolbar select{height:28px!important;min-height:28px!important;margin:0!important;padding:4px 7px!important;font-size:11px!important;border-radius:4px!important;box-shadow:none!important}
 body:not(.presentation) #appToolbar button[aria-pressed=true]{background:#096570!important;color:#fff!important;border-color:#218f95!important;box-shadow:inset 0 -2px #55dcca!important;font-weight:700!important}
 body:not(.presentation) #appToolbar #freeRotation[aria-pressed=true]{outline:2px solid #49bdb7;outline-offset:1px}
 body:not(.presentation) #appToolbar #freeRotation[aria-pressed=true]::before{content:'✓ ';font-weight:900}
 body:not(.presentation) #appToolbar #familyNav{gap:2px!important}
 body:not(.presentation) #appToolbar #familyNav button{font-size:12px!important}
 body:not(.presentation) #appToolbar .jar-switch{border-left:0!important;padding-left:0!important;min-width:160px!important}
 body:not(.presentation) #appToolbar .jar-switch select{min-width:155px;max-width:220px}
 body:not(.presentation) #appToolbar .toolbar{border-left:0!important;padding:0!important}
 body:not(.presentation) main{height:calc(100dvh - 86px - var(--app-toolbar-height,0px))!important}
 body:not(.presentation)>header button:focus-visible,body:not(.presentation) #appToolbar button:focus-visible{outline:2px solid #e4b957!important;outline-offset:2px}
 body.pf-pbr-active:not(.presentation){--pf-mode-header:86px!important}
 body.pf-pbr-active:not(.presentation)>header #appActions,body.pf-pbr-active:not(.presentation)>header #appRight,body.pf-pbr-active:not(.presentation)>header #pfTextOpen,body.pf-pbr-active:not(.presentation)>header #pfToolSearchShell{display:none!important}
 body.pf-pbr-active:not(.presentation) #pfPBRDialog{top:86px!important;inset-block-start:86px!important;height:calc(100dvh - 86px - var(--polish-footer-height,36px))!important;max-height:calc(100dvh - 86px - var(--polish-footer-height,36px))!important}
 body.pf-pbr-active:not(.presentation):not(:has(.pf-legal-wrap)) #pfPBRDialog{height:calc(100dvh - 86px)!important;max-height:calc(100dvh - 86px)!important}
 @media(max-width:1100px){
  body:not(.presentation)>header{padding-inline:10px!important;column-gap:4px!important}
  body:not(.presentation)>header #mobileBrand{width:125px}
  body:not(.presentation)>header #mobileBrand #packformaLogo{width:115px!important;max-width:115px!important}
  body:not(.presentation)>header #pfModeSwitch button{min-width:86px!important;padding-inline:9px!important}
  body:not(.presentation)>header #outputActions button{padding-inline:6px!important}
 }
}
