/* Scoped to the shared customer editor. Physical artwork and clipping are unchanged. */
/* ZV_ORIGINAL_DESKTOP_CSS_V34: mobile layout overrides stay below desktop. */
@media(max-width:1023px){
html.editor-document .studio-app.editor-shell .canvas-stage{box-sizing:content-box!important;width:max-content!important;height:max-content!important;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;flex:0 0 auto!important;overflow:visible!important;padding:36px!important;margin:auto!important;display:block!important}
html.editor-document .studio-app.editor-shell #canvasWrap{max-width:none!important;max-height:none!important;margin:0!important;padding:0!important;flex:none!important}
html.editor-document .studio-app.editor-shell #canvasWrap .canvas-container{max-width:none!important;max-height:none!important}
html.editor-document .studio-app.editor-shell #canvasWrap canvas{max-width:none!important;max-height:none!important;touch-action:none!important}
html.editor-document .studio-app.editor-shell #zvSurfacePicker{display:block!important;min-width:0!important;max-width:240px;width:clamp(120px,20vw,240px);height:40px;font-size:16px;background:#fff;border:1px solid #cbd5e1;color:#172b4d}
}
@media(max-width:1023px){
html.editor-document .studio-app.editor-shell main.canvas-area.studio-workspace{display:flex!important;flex-direction:column!important;min-width:0!important;min-height:0!important;overflow:hidden!important}
html.editor-document .studio-app.editor-shell main.canvas-area.studio-workspace>#contextToolbar{position:relative!important;inset:auto!important;flex:0 0 48px!important;height:48px!important;min-height:48px!important;width:100%!important;box-sizing:border-box!important;border-radius:0!important;margin:0!important;padding:2px 6px!important;overflow-x:auto!important;overflow-y:hidden!important;display:flex!important}
html.editor-document .studio-app.editor-shell #contextToolbar .context-controls{display:flex!important;min-width:max-content!important;flex:0 0 auto!important;gap:5px!important}
html.editor-document .studio-app.editor-shell #contextToolbar :is(input,select,textarea){font-size:16px!important}
html.editor-document .studio-app.editor-shell #contextToolbar :is(button,select){min-height:40px!important}
html.editor-document .studio-app.editor-shell main.canvas-area.studio-workspace>.studio-canvas-scroll{position:relative!important;inset:auto!important;flex:1 1 0!important;min-width:0!important;min-height:0!important;width:100%!important;height:auto!important;margin:0!important;padding:4px!important;box-sizing:border-box!important;overflow:auto!important;display:flex!important;align-items:flex-start!important;justify-content:flex-start!important;overscroll-behavior:contain}
html.editor-document .studio-app.editor-shell .canvas-stage{padding:32px!important}
html.editor-document .studio-app.editor-shell .studio-bottom-bar{height:88px!important;min-height:88px!important;max-height:88px!important;display:flex!important;flex-direction:column!important;flex-wrap:nowrap!important;gap:4px!important;padding:4px 8px!important;overflow:hidden!important}
html.editor-document .studio-app.editor-shell .zv-bottom-pages{display:flex!important;flex:0 0 40px!important;width:100%!important;min-width:0!important;justify-content:center!important;gap:4px!important}
html.editor-document .studio-app.editor-shell .zv-bottom-pages .page-status,html.editor-document .studio-app.editor-shell #pageCountBadge{display:none!important}
html.editor-document .studio-app.editor-shell #zvSurfacePicker{flex:1 1 auto!important;width:auto!important;max-width:360px!important}
html.editor-document .studio-app.editor-shell .zoom-controls{display:flex!important;flex:0 0 36px!important;align-items:center!important;justify-content:center!important;gap:8px!important;order:2!important;width:100%!important;margin:0!important}
html.editor-document .studio-app.editor-shell .zoom-controls button{height:36px!important;min-width:40px!important}
html.editor-document .studio-app.editor-shell .zoom-controls input{width:100px!important;min-width:0!important}
html.editor-document .studio-app.editor-shell .studio-primary-actions button{touch-action:manipulation}
html.editor-document .studio-app.editor-shell .studio-panel.editor-sidebar{overscroll-behavior:contain!important;-webkit-overflow-scrolling:touch}
html.editor-document :is(.studio-modal-card,.zv-template-dialog,.zv-universal-export section){box-sizing:border-box;max-width:calc(100vw - 20px)!important;max-height:85dvh!important;overflow:auto!important}
}
@media(max-width:767px){
html.editor-document .studio-app.editor-shell .studio-topbar{grid-template-rows:36px 44px!important;min-height:104px!important}
html.editor-document .studio-app.editor-shell .studio-topbar .studio-primary-actions{display:grid!important;grid-template-columns:1fr 1fr 1fr 1.5fr!important;gap:4px!important;overflow:visible!important;min-width:0!important}
html.editor-document .studio-app.editor-shell .studio-topbar .studio-primary-actions :is(#threeDViewBtn,#downloadBtn,#saveDraftBtn,#saveBtn){display:flex!important;min-width:0!important;width:100%!important;max-width:none!important;flex:none!important;min-height:44px!important;height:44px!important;font-size:11px!important;padding:4px!important;white-space:normal!important;align-items:center!important;justify-content:center!important}
html.editor-document .studio-app.editor-shell main.canvas-area.studio-workspace,html.editor-document .studio-app.editor-shell.zv-panel-collapsed main.canvas-area.studio-workspace{top:var(--zv-editor-header,104px)!important;bottom:calc(64px + env(safe-area-inset-bottom,0px) + 88px)!important;left:0!important;right:0!important;width:100%!important}
html.editor-document .studio-app.editor-shell .studio-bottom-bar{position:fixed!important;top:auto!important;left:0!important;right:0!important;bottom:calc(64px + env(safe-area-inset-bottom,0px))!important;width:100%!important}
html.editor-document .studio-app.editor-shell .studio-panel.editor-sidebar{bottom:calc(64px + env(safe-area-inset-bottom,0px) + 88px)!important;max-height:calc(100dvh - var(--zv-editor-header,104px) - 170px)!important}
html.editor-document .studio-app.editor-shell .studio-rail .rail-tab{min-width:64px!important;touch-action:pan-x}
}
@media(min-width:768px) and (max-width:1023px){
html.editor-document .studio-app.editor-shell main.canvas-area.studio-workspace{bottom:88px!important}
html.editor-document .studio-app.editor-shell .studio-bottom-bar{position:fixed!important;left:72px!important;right:0!important;bottom:0!important;width:auto!important}
html.editor-document .studio-app.editor-shell .studio-panel.editor-sidebar{bottom:88px!important}
}
@media(prefers-reduced-motion:reduce){html.editor-document .studio-app.editor-shell *{scroll-behavior:auto!important;transition:none!important}}
/* V2: the footer and keyboard editor use shell-relative coordinates. */
#zvMobileTextDock[hidden]{display:none!important}
#zvMobileTextDock{display:none}
@media(max-width:767px){
html.editor-document .studio-app.editor-shell{height:var(--zv-mobile-height,100dvh)!important;top:var(--zv-mobile-top,0px)!important;bottom:auto!important}
html.editor-document .studio-app.editor-shell>.studio-bottom-bar{position:absolute!important;left:0!important;right:0!important;bottom:calc(64px + env(safe-area-inset-bottom,0px))!important}
html.editor-document .studio-app.editor-shell .canvas-stage{padding:30px 12px 12px 30px!important}
html.editor-document .studio-app.editor-shell #zvMobileTextDock{display:grid;position:absolute;bottom:0;left:0;right:0;height:108px;box-sizing:border-box;padding:6px 10px;gap:4px 8px;grid-template-columns:minmax(0,1fr) 64px;grid-template-rows:18px 1fr 14px;z-index:100010;background:#fff;border-top:1px solid #ccd5e2;color:#172b4d}
#zvMobileTextDock label{grid-column:1/-1;font:700 13px Lato,Arial,sans-serif;margin:0}
#zvMobileTextDock textarea{grid-column:1;grid-row:2;min-width:0;width:100%;height:100%;resize:none;box-sizing:border-box;font:18px/1.3 Lato,Arial,sans-serif!important;padding:5px;border:1px solid #7f9aba;color:#172b4d;background:#fff;border-radius:4px}
#zvMobileTextDock button{grid-column:2;grid-row:2;min-height:44px;background:#075fc6;color:white;border:0;font:700 14px Lato,Arial,sans-serif}
#zvMobileTextDock [role=status]{grid-column:1/-1;font:12px Lato,Arial,sans-serif}
html.editor-document .studio-app.editor-shell.zv-mobile-typing .studio-rail,html.editor-document .studio-app.editor-shell.zv-mobile-typing>.studio-bottom-bar,html.editor-document .studio-app.editor-shell.zv-mobile-typing .studio-panel.editor-sidebar{display:none!important}
html.editor-document .studio-app.editor-shell.zv-mobile-typing .studio-topbar{height:48px!important;min-height:48px!important;max-height:48px!important;padding:4px 8px!important;display:flex!important;flex-wrap:nowrap!important;overflow:hidden!important}
html.editor-document .studio-app.editor-shell.zv-mobile-typing .studio-primary-actions{display:none!important}
html.editor-document .studio-app.editor-shell.zv-mobile-typing main.canvas-area.studio-workspace,html.editor-document .studio-app.editor-shell.zv-panel-collapsed.zv-mobile-typing main.canvas-area.studio-workspace{top:48px!important;bottom:108px!important}
html.editor-document .studio-app.editor-shell.zv-mobile-typing main.canvas-area.studio-workspace>#contextToolbar{display:none!important}
}
@media(min-width:768px) and (max-width:1023px){html.editor-document .studio-app.editor-shell>.studio-bottom-bar{position:absolute!important;left:72px!important;right:0!important;bottom:0!important}}
/* V3: compact mobile chrome; rulers are optional and cannot cover artwork. */
#zvMobileActions[hidden],#zvMobileEditText[hidden]{display:none!important}
#zvMobileMore,#zvMobileActions,#zvMobilePan,#zvMobileFit,#zvMobileEditText{display:none}
@media(max-width:767px){
html.editor-document .studio-app.editor-shell .studio-topbar{height:56px!important;min-height:56px!important;max-height:56px!important;display:flex!important;grid-template:none!important;flex-wrap:nowrap!important;align-items:center!important;padding:6px 8px!important;gap:6px!important}
html.editor-document .studio-app.editor-shell .studio-topbar .studio-brand-group{flex:0 0 40px!important;min-width:0!important;width:40px!important}
html.editor-document .studio-app.editor-shell .studio-topbar .studio-history-actions{display:flex!important;flex:0 0 auto!important;margin:0!important;gap:4px!important}
html.editor-document .studio-app.editor-shell .studio-topbar .studio-primary-actions{display:flex!important;flex:1 1 auto!important;width:auto!important;min-width:0!important;justify-content:flex-end!important;margin:0!important}
html.editor-document .studio-app.editor-shell .studio-topbar .studio-primary-actions #saveBtn{width:auto!important;min-width:0!important;max-width:150px!important;height:44px!important;min-height:44px!important;font-size:12px!important;padding:4px 8px!important;line-height:1.15!important}
html.editor-document .studio-app.editor-shell #zvMobileMore{display:block!important;flex:0 0 48px!important;min-height:44px!important;padding:4px!important;font-size:12px!important;background:#edf3fc;color:#172b4d;border:1px solid #ccd5e2}
html.editor-document .studio-app.editor-shell #zvMobileActions{position:absolute;right:8px;top:56px;z-index:100020;display:grid;gap:4px;padding:8px;width:180px;box-sizing:border-box;max-height:calc(var(--zv-mobile-height,100dvh) - 70px);overflow:auto;border:1px solid #ccd5e2;background:#fff;box-shadow:0 8px 30px #172b4d33}
html.editor-document .studio-app.editor-shell #zvMobileActions button{display:block!important;min-height:44px!important;padding:8px!important;background:#edf3fc;color:#172b4d;border:1px solid #ccd5e2;font-size:14px!important}
html.editor-document .studio-app.editor-shell main.canvas-area.studio-workspace,html.editor-document .studio-app.editor-shell.zv-panel-collapsed main.canvas-area.studio-workspace{top:56px!important;bottom:calc(56px + env(safe-area-inset-bottom,0px) + 54px)!important}
html.editor-document .studio-app.editor-shell>.studio-bottom-bar{height:54px!important;min-height:54px!important;max-height:54px!important;display:flex!important;flex-direction:row!important;gap:4px!important;padding:4px!important}
html.editor-document .studio-app.editor-shell .zv-bottom-pages{flex:1 1 auto!important;width:auto!important;min-width:0!important;gap:2px!important}
html.editor-document .studio-app.editor-shell #zvSurfacePicker{font-size:13px!important;height:40px!important;max-width:none!important;width:100%!important;flex:1 1 0!important}
html.editor-document .studio-app.editor-shell .zv-page-arrow{width:26px!important;min-width:26px!important;max-width:26px!important}
html.editor-document .studio-app.editor-shell .zoom-controls{display:flex!important;flex:0 0 auto!important;width:auto!important;gap:2px!important;min-width:0!important}
html.editor-document .studio-app.editor-shell #bottomZoomRange,html.editor-document .studio-app.editor-shell #zoomLabel{display:none!important}
html.editor-document .studio-app.editor-shell .zoom-controls button{display:block!important;width:30px!important;min-width:30px!important;height:40px!important;min-height:40px!important;font-size:15px!important;padding:0!important}
html.editor-document .studio-app.editor-shell .zoom-controls #zvMobilePan{display:none!important}
html.editor-document .studio-app.editor-shell #zvMobileEditText:not([hidden]){display:block!important;flex:0 0 auto!important;min-height:40px!important;padding:6px!important;white-space:nowrap;background:#075fc6;color:white;border:0;position:sticky;left:0;z-index:10}
html.editor-document .studio-app.editor-shell.zv-mobile-rulers-hidden .canvas-ruler{display:none!important}
html.editor-document .studio-app.editor-shell.zv-mobile-rulers-hidden .canvas-stage{padding:12px!important}
html.editor-document .studio-app.editor-shell .studio-panel.editor-sidebar{bottom:calc(56px + env(safe-area-inset-bottom,0px) + 54px)!important;max-height:calc(var(--zv-mobile-height,100dvh) - 180px)!important}
html.editor-document .studio-app.editor-shell .studio-rail{height:calc(56px + env(safe-area-inset-bottom,0px))!important;min-height:56px!important}
html.editor-document .studio-app.editor-shell .studio-rail .rail-tab{height:56px!important;min-height:56px!important}
html.editor-document .studio-app.editor-shell.zv-mobile-typing main.canvas-area.studio-workspace,html.editor-document .studio-app.editor-shell.zv-panel-collapsed.zv-mobile-typing main.canvas-area.studio-workspace{top:48px!important;bottom:108px!important}
html.editor-document .studio-app.editor-shell.zv-mobile-typing #zvMobileMore{display:none!important}
html.editor-document .studio-app.editor-shell.zv-mobile-typing>.studio-bottom-bar{display:none!important}
}

@media(max-width:767px){html.editor-document .studio-app.editor-shell>.studio-bottom-bar{bottom:calc(56px + env(safe-area-inset-bottom,0px))!important}html.editor-document .studio-app.editor-shell.zv-mobile-pan #canvasWrap canvas{cursor:grab!important}}

@media(max-width:767px){html.editor-document .studio-app.editor-shell #zvSurfacePicker{font-size:16px!important}html.editor-document .studio-app.editor-shell #zoomLabel{display:block!important;font-size:11px!important;min-width:30px!important;max-width:36px!important;white-space:nowrap!important}}

@media(min-width:1024px){html.editor-document .studio-app.editor-shell #zvSurfacePicker{display:none!important}}
