/* App-specific structure is activated only by the mobile interaction layer. */
.mobileAppNav,.mobileRunBar,.mobileAppBackdrop,.mobileSourceHead,.mobileStartCard,.mobilePreviewTabs,.mobileFinalizerControls,#mobileMore,.mobileAccountBalance{display:none}
@media(max-width:900px){
 body.mobileAppShell{--app-nav:76px;--app-run:66px;--app-safe:env(safe-area-inset-bottom,0px);background:#f2f5fb;padding-bottom:calc(var(--app-nav) + var(--app-run) + var(--app-safe));overscroll-behavior-y:none}
 body.mobileAppShell :is(header.topbar,header.top,main>header,.main>header){position:sticky!important;top:0;min-height:66px!important;flex-wrap:nowrap!important;border-radius:0!important;padding:10px 14px!important;gap:10px!important;z-index:60;box-shadow:0 2px 14px #143b521a}
 body.mobileAppShell :is(.top-actions,.header-actions,.topbar-actions,.top>.actions){display:none!important}
 body.mobileAppShell .platformMobileTitle{font-size:16px;letter-spacing:-.4px;max-width:150px;flex:0 1 auto}
 body.mobileAppShell #platformDock{margin:0 0 0 auto!important;flex:1 1 0!important;padding:0;gap:6px;justify-content:flex-end}
 body.mobileAppShell #platformDock .dockBalance{border:0;background:#ffffff15;color:white;padding:5px 8px;min-height:36px}
 body.mobileAppShell #platformDock .dockBalance small{display:none}
 body.mobileAppShell #platformDock .dockBalance strong{font-size:11px}
 body.mobileAppShell #platformDock .dockBalance>svg{display:none}
 body.mobileAppShell #platformDock summary>svg{width:32px;height:32px}
 body.mobileAppShell .platformMenuButton{min-width:38px;width:38px;min-height:38px;border:0!important;background:#ffffff15!important;border-radius:12px!important}
 body.mobileAppShell #mobileMore{display:grid;place-items:center;flex:0 0 36px;width:36px;min-height:38px;padding:7px;background:#ffffff15;border:0;border-radius:12px;color:#fff}
 body.mobileAppShell #mobileMore svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:2}
 body.mobileAppShell .mobileAccountBalance{display:block;margin-left:auto;white-space:nowrap;text-decoration:none;background:#ffffff18;border:1px solid #ffffff25;border-radius:12px;padding:10px;color:white;font-size:11px}
 body.mobileAppShell :is(.page-heading,.heading,.studio-heading,.workflow,.studio-workflow,.platformWorkspaceNav,.platformControlToggle,.mobile-project-picker){display:none!important}
 body.mobileAppShell :is(.workbench,.studio-workbench,.editor:not(.editor-view)){display:block!important;padding:16px 12px 24px!important;width:100%;max-width:840px;margin:auto!important}
 body.mobileAppShell .workspace,body.mobileAppShell .studio-preview-column{width:100%;min-width:0;scroll-margin-top:80px}
 body.mobileAppShell .settings-column{display:contents}
 body.mobileAppShell:not(.appHasImage) :is(.workspace,.studio-preview-column)>:not(.mobileStartCard){display:none!important}
 body.mobileAppShell:not(.appHasImage) .editor .workspace>.canvas-toolbar{display:none!important}
 body.mobileAppShell .mobileStartCard{display:flex;flex-direction:column;align-items:center;text-align:center;min-height:calc(100svh - 250px);justify-content:center;padding:28px 18px 24px;border-radius:28px;background:radial-gradient(ellipse at 50% 20%,#d8f3f0 0%,#ecf3fe 45%,#fff 80%);border:1px solid #e0e8f1;box-shadow:0 10px 40px #24435707}
 body.mobileAppShell.appHasImage .mobileStartCard{display:none}
 .mobileStartArt{width:114px;height:114px;position:relative;display:grid;place-items:center;background:linear-gradient(145deg,#fff,#dbf2f2);border:1px solid #fff;box-shadow:8px 12px 0 #b4a8ee28,0 16px 28px #145f6b13;border-radius:30px;transform:rotate(-7deg);margin:8px 0 38px;color:#07909c}
 .mobileStartArt>svg{width:58px;height:58px;stroke:currentColor;stroke-width:1.4;fill:none}
 .mobileStartArt>span{position:absolute;right:-16px;top:-14px;color:#8d6bd8;font-size:38px}
 .mobileStartEyebrow{font-size:9px;letter-spacing:1.7px;font-weight:700;color:#5893a1}
 body.mobileAppShell .mobileStartCard h1{font:750 26px/1.2 'Segoe UI',sans-serif;letter-spacing:-.8px;color:#163c51;margin:12px 0}
 .mobileStartCard p{font:14px/1.65 'Segoe UI',sans-serif;color:#71889c;margin:0 0 24px}
 body.mobileAppShell .mobileStartCard>button{width:100%;max-width:330px;min-height:52px;border:0;background:linear-gradient(115deg,#078a94,#147b98);border-radius:15px;color:white;display:flex;align-items:center;justify-content:center;gap:10px;font:650 14px 'Segoe UI',sans-serif;box-shadow:0 6px 16px #10859624}
 .mobileStartCard button svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:1.8}
 .mobileStartCard small{font:11px/1.5 'Segoe UI',sans-serif;color:#7c93a4;margin:14px 0}
 body.mobileAppShell .mobileStartCard>.mobileStartSecondary{background:transparent;color:#45798c;box-shadow:none;font-size:12px;min-height:42px}
 body.mobileAppShell .comparison{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:10px}
 body.mobileAppShell .mobilePreviewTabs{display:flex;gap:5px;background:#e5edf5;padding:5px;border-radius:14px;grid-column:1/-1}
 .mobilePreviewTabs button{flex:1;min-height:42px!important;border:0;border-radius:10px;background:transparent;color:#6a8195;font:600 13px 'Segoe UI',sans-serif}
 .mobilePreviewTabs button[aria-pressed=true]{background:#fff;color:#0b7e8c;box-shadow:0 2px 6px #25445b0b}
 body.mobileAppShell .comparison[data-mobile-preview=original]>section:last-child,body.mobileAppShell .comparison[data-mobile-preview=result]>section:nth-child(2){display:none!important}
 body.mobileAppShell :is(.image-stage,.studio-image-stage,.preview){height:clamp(260px,52svh,520px)!important;min-height:240px!important}
 body.mobileAppShell .comparison>.preview{height:auto!important}
 body.mobileAppShell .preview-card,body.mobileAppShell .image-card{box-shadow:0 5px 20px #27495e08}
 body.mobileAppShell :is(.workspace-toolbar,.canvas-toolbar){border-radius:16px!important}
 body.mobileAppShell .zoom-control{display:flex!important;align-items:center;gap:8px;max-width:100%;font-size:11px}
 body.mobileAppShell .zoom-control input{min-width:60px;width:100px}
 body.mobileAppShell :is(#sourceStage,#resultStage,#originalStage,#vectorStage,#preview,.studio-image-stage){touch-action:pan-y;overflow:clip}
 body.mobileAppShell #preview.selecting-background{touch-action:none}
 body.mobileAppShell #preview .expansion-handle{touch-action:none}
 body.mobileAppShell .toast{pointer-events:none}
 body.mobileAppShell .workspace-toolbar{display:flex;flex-wrap:wrap;gap:10px;margin:0 0 14px}
 body.mobileAppShell .workspace-toolbar h2{font-size:14px;margin:0}
 body.mobileAppShell .workspace-toolbar .zoom-controls{display:flex;margin-left:auto}
 body.mobileAppShell .versions,body.mobileAppShell .version-list{scrollbar-width:none;overscroll-behavior-x:contain;scroll-snap-type:x proximity}
 body.mobileAppShell .versions>*{scroll-snap-align:start}
 body.mobileAppShell .mobileAppNav{position:fixed;inset:auto 0 0;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:2px;height:calc(var(--app-nav) + var(--app-safe));padding:9px 6px calc(9px + var(--app-safe));background:#fffffff2;backdrop-filter:blur(20px);border-top:1px solid #dce6ee;z-index:1200;box-shadow:0 -4px 22px #17374a08}
 .mobileAppNav>button,.mobileAppNav>a{display:flex!important;align-items:center;justify-content:center;flex-direction:column;gap:5px;min-width:0;min-height:48px!important;background:transparent;border:0;border-radius:13px;text-decoration:none;color:#6e8398;padding:2px!important;font:600 10px/1.2 'Segoe UI',sans-serif;touch-action:manipulation}
 .mobileAppNav>a>span{font:inherit!important;width:auto!important;text-align:center}
 .mobileAppNav svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
 .mobileAppNav>[aria-current=page]{color:#087f8c;background:#e9f6f5}
 .mobileAppNav>.mobileUploadAction svg{color:white;width:42px;height:36px;padding:7px 10px;background:linear-gradient(130deg,#10a7ad,#087e91);border-radius:13px;box-shadow:0 4px 12px #0b869431}
 .mobileAppNav>.mobileUploadAction{color:#087b88}
 body.mobileAppShell .mobileRunBar{position:fixed;inset:auto 0 calc(var(--app-nav) + var(--app-safe));min-height:var(--app-run);display:flex;align-items:center;gap:8px;padding:9px 12px;background:#f2f5fbef;backdrop-filter:blur(16px);z-index:1100;border-top:1px solid #dce6ed88}
 .mobileRunBar>button{border-radius:14px;min-height:48px!important;border:0;cursor:pointer}
 .mobileRunSettings{display:grid;place-items:center;flex:0 0 48px;background:white;color:#0a8291;box-shadow:inset 0 0 0 1px #dae7ed}
 .mobileRunSettings svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:1.8}
 .mobileRunPrimary{flex:1;min-width:0;padding:12px!important;background:linear-gradient(115deg,#078895,#156f91);color:white;font:650 13px/1.35 'Segoe UI',sans-serif;box-shadow:0 4px 12px #077e8d1a}
 .mobileRunPrimary.needsReview{background:#e1eef4;color:#215d72;box-shadow:inset 0 0 0 1px #c8dfe8}
 body.mobileAppShell:not(:has(.mobileRunBar)){--app-run:0px}
 body.mobileAppShell.appLayerEditor{--app-run:0px;overflow:hidden!important;padding-bottom:0}
 body.mobileAppShell.appLayerEditor .mobileRunBar{display:none}
 body.mobileAppShell .appSourcePanel{display:none!important;position:fixed!important;inset:auto 0 0!important;height:calc(89dvh - var(--app-safe));max-height:calc(100dvh - 30px)!important;width:100%!important;max-width:680px!important;margin:0 auto!important;background:#fff!important;overflow:auto!important;overscroll-behavior:contain;border-radius:27px 27px 0 0!important;z-index:1560!important;padding:0 20px calc(24px + var(--app-safe))!important;box-shadow:0 -18px 70px #0e2e4f33!important;border:1px solid #dce7ed!important;animation:mobileSheetEnter .2s ease}
 body.mobileAppShell.appSourceOpen .appSourcePanel{display:block!important}
 body.mobileAppShell.appSourceOpen{overflow:hidden!important}
 body.mobileAppShell .mobileSourceHead{display:flex!important;align-items:center;justify-content:space-between;gap:12px;position:sticky;top:0;margin:0 -20px 22px;padding:25px 20px 17px;background:#fffffff5;backdrop-filter:blur(15px);border-bottom:1px solid #e6edf3;z-index:5;touch-action:pan-x}
 .mobileSourceHead:before{content:'';position:absolute;top:8px;left:calc(50% - 20px);width:40px;height:4px;border-radius:6px;background:#c9d8e0}
 .mobileSourceHead>div{display:grid;gap:4px}.mobileSourceHead span{font-size:8px;letter-spacing:1.5px;color:#7294a1}.mobileSourceHead strong{font-size:17px;color:#173c51}
 .mobileSourceClose{border:0;background:#e3f4f0;color:#087f88;padding:10px 13px;border-radius:12px;font-size:12px;font-weight:650}
 body.mobileAppShell.appSourceOpen .mobileAppBackdrop{position:fixed;inset:0;display:block;background:#102c4b66;backdrop-filter:blur(4px);border:0;border-radius:0;z-index:1550}
 body.mobileAppShell .appSourcePanel>h2,body.mobileAppShell .appSourcePanel>.panel-heading{margin-top:0}
 body.mobileAppShell .appSourcePanel .tool-tabs{position:relative;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 body.mobileAppShell .appSourcePanel .tool-tabs button{min-height:64px!important;font-size:13px!important;text-align:center}
 body.mobileAppShell .platformEditorTabs,body.mobileAppShell .platformVectorTabs{bottom:calc(var(--app-nav) + var(--app-safe));min-height:var(--app-run);padding:9px 12px;border-radius:0;background:#f2f5fbef;z-index:1120;box-shadow:none}
 body.mobileAppShell .platformEditorTabs button,body.mobileAppShell .platformVectorTabs button{max-width:none;min-height:46px!important}
 body.mobileAppShell.appLayerEditor .editor-view{height:calc(100dvh - var(--platform-header-height,66px) - var(--app-nav) - var(--app-safe) - 66px)!important;min-height:200px;padding-bottom:0!important}
 body.mobileAppShell .editor-view :is(.layers-panel,.properties-panel),body.mobileAppShell #refinePanel{z-index:1450!important;inset:auto 0 0!important;height:86dvh!important;padding-bottom:calc(36px + var(--app-safe))!important}
 body.mobileAppShell .platformSheetBackdrop{z-index:1400}
 body.mobileAppShell .download-panel{z-index:1460!important;max-height:85dvh!important;padding-bottom:calc(24px + var(--app-safe))}
 body.mobileAppShell .toast{bottom:calc(var(--app-nav) + var(--app-run) + var(--app-safe) + 14px)}
 body.mobileAppShell .stage-help{padding:8px 4px!important}
 body.mobileAppShell.appProjectsOpen :is(.sidebar,.studio-sidebar) :is(.nav-label,.studio-nav-label,.nav-item,.nav-active,.studio-nav-item,nav,.sidebar-divider,.studio-divider){display:none!important}
 body.mobileAppShell :is(.sidebar,.studio-sidebar){border-radius:0 26px 26px 0}
 body.mobileAppShell .content{padding:20px 14px}
 body.mobileAppShell .module-card{display:grid;grid-template-columns:48px 1fr;column-gap:14px;align-items:center;padding:19px!important}
 body.mobileAppShell .module-card .module-icon{grid-row:1/4;margin:0}
 body.mobileAppShell .module-card h2{margin:0 0 5px;font-size:16px}
 body.mobileAppShell .module-card p{margin:0;font-size:12px}
 body.mobileAppShell .module-card>span{font-size:12px;margin-top:7px}
 body.mobileAppShell .table-wrap{border-radius:12px;background:linear-gradient(90deg,#fff,#f4f8fc);border:1px solid #e2eaf1;scrollbar-width:thin}
 body.mobileAppShell :is(button,a){-webkit-tap-highlight-color:transparent}
 body.mobileAppShell :is(.mobileAppNav button,.mobileAppNav a,.mobileRunPrimary,.mobileModuleCard,.mobileActionRow):active{transform:scale(.97);transition:transform .1s}
 body.mobileAppShell :is(dialog,#platformGate){border-radius:24px!important;padding:22px 18px;max-height:90dvh!important}
 body.mobileAppShell #mobileAppDialog{position:fixed;inset:auto 0 0!important;margin:0 auto!important;width:100%!important;max-width:680px!important;max-height:88dvh!important;border-radius:28px 28px 0 0!important;border:0;padding:23px 20px calc(26px + var(--app-safe))!important;box-shadow:0 -20px 80px #0e2e4f33;animation:mobileSheetEnter .2s ease;overscroll-behavior:contain}
 .mobileAppDialog::backdrop{background:#102c4b66;backdrop-filter:blur(4px)}
 .mobileDialogHead{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}.mobileDialogHead h2{font:750 23px/1.25 'Segoe UI',sans-serif;letter-spacing:-.7px;color:#173c51;margin:0}.mobileDialogClose{min-width:42px;min-height:42px;border:0;border-radius:13px;background:#f0f5f8;color:#527185;font-size:25px}
 .mobileDialogIntro{font:13px/1.5 'Segoe UI',sans-serif;color:#708b9d;margin:0 0 22px}
 .mobileModuleGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 .mobileModuleCard{display:flex;flex-direction:column;min-width:0;gap:9px;padding:19px 14px;border-radius:19px;border:1px solid #dfe9ee;background:linear-gradient(145deg,#f2faf8,#f7f7ff);text-decoration:none;color:#193e53}
 .mobileModuleCard[aria-current=page]{border-color:#42b2b8;box-shadow:inset 0 0 0 1px #42b2b844}
 .mobileModuleCard>svg{width:35px;height:35px;stroke:#1499a2;stroke-width:1.4;fill:none;margin-bottom:4px}.mobileModuleCard strong{font:650 14px/1.3 'Segoe UI',sans-serif}.mobileModuleCard span{font:11px/1.5 'Segoe UI',sans-serif;color:#7791a2}
 .mobileSupportLink{display:block;text-align:center;margin:24px 0 0;font:12px/1.6 'Segoe UI',sans-serif;color:#188894;text-decoration:none}
 .mobileActionList{display:grid;gap:9px;margin-top:20px}.mobileActionRow{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:52px!important;padding:14px 16px!important;border:1px solid #dce8ef;border-radius:14px;background:#f5f9fc;color:#214e67;font:600 14px/1.4 'Segoe UI',sans-serif;text-align:left}.mobileActionRow>span[aria-hidden]{font-size:22px;color:#7d9daa}.mobileActionRow:disabled{opacity:.42}
}
@media(max-width:360px){body.mobileAppShell .platformMobileTitle{font-size:14px;max-width:110px}body.mobileAppShell #platformDock .dockAccount{display:none}.mobileAppNav>button,.mobileAppNav>a{font-size:9px}.mobileModuleCard{padding:15px 12px}.mobileModuleCard strong{font-size:13px}}
@media(max-height:500px) and (orientation:landscape){body.mobileAppShell{--app-nav:60px}.mobileAppNav svg{width:18px;height:18px}.mobileAppNav>button,.mobileAppNav>a{gap:2px}body.mobileAppShell .mobileStartCard{min-height:220px}.mobileStartArt{width:65px;height:65px;margin:0 0 18px}.mobileStartArt>svg{width:35px;height:35px}body.mobileAppShell .appSourcePanel{height:94dvh!important}.mobileModuleGrid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@keyframes mobileSheetEnter{from{transform:translateY(35px);opacity:.6}to{transform:translateY(0);opacity:1}}
@media(prefers-reduced-motion:reduce){.mobileAppShell *{animation:none!important;transition:none!important}}

/* Compact phone controls; desktop and tablet layouts keep their original controls. */
@media(max-width:600px),(max-width:900px) and (max-height:500px){
 body.mobileAppShell :is(header.topbar,header.top,main>header,.main>header){height:64px!important;min-height:64px!important;align-items:center!important;gap:8px!important;padding:8px 12px!important}
 body.mobileAppShell .platformMenuButton,body.mobileAppShell #mobileMore{width:36px;height:36px;min-width:36px;min-height:36px!important;flex:0 0 36px;padding:6px!important;margin:0}
 body.mobileAppShell .platformMobileTitle{flex:1 1 auto;min-width:0;max-width:none;font-size:14px;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0}
 body.mobileAppShell #platformDock{flex:0 0 auto!important;order:0!important;align-items:center;gap:6px;margin:0!important;padding:0!important;border:0!important;inset:auto!important}
 body.mobileAppShell #platformDock .dockBalance{height:36px;min-height:36px;padding:0 8px;line-height:1}
 body.mobileAppShell #platformDock .dockBalance span{display:flex;align-items:center}
 body.mobileAppShell #platformDock .dockAccount{display:block!important;margin:0}
 body.mobileAppShell #platformDock .dockAccount summary{display:flex;align-items:center;justify-content:center;width:36px;height:36px;min-height:36px;padding:0;margin:0}
 body.mobileAppShell #platformDock .dockAccount summary>svg{display:block;width:30px;height:30px;margin:0}
 body.mobileAppShell #platformDock .dockAccount summary :is(span,i){display:none}
 body.mobileAppShell #marketingPrivacy{display:none!important}
 .mobilePrivacyAction{display:block;width:100%;min-height:40px;margin-top:8px;padding:8px;border:0;background:transparent;color:#637f93;font:12px/1.4 'Segoe UI',sans-serif}
 body.mobileAppShell:has(.mobileFinalizerControls) :is(.part-tabs,.workspace>.canvas-toolbar,.comparison>.mobilePreviewTabs){display:none!important}
 body.mobileAppShell .mobileFinalizerControls{display:grid;gap:8px;margin:0 0 12px;padding:0}
 .mobileFinalizerPart{display:flex;align-items:center;gap:12px;min-width:0;margin:0;color:#526c7f;font:600 12px/1.3 'Segoe UI',sans-serif}
 body.mobileAppShell .mobileFinalizerPart select{flex:1;min-width:0;width:auto;margin:0;min-height:42px!important;height:42px;padding:8px 12px;border:1px solid #d5e2eb;border-radius:11px;background:#fff;color:#214c61;font:600 14px 'Segoe UI',sans-serif}
 .mobileFinalizerView{display:flex;align-items:center;gap:8px;min-width:0}
 .mobileFinalizerPreview{display:flex;gap:3px;min-width:0;flex:1;padding:3px;background:#e2edf3;border-radius:11px}
 body.mobileAppShell .mobileFinalizerPreview button{flex:1;min-width:0;min-height:36px!important;padding:7px 8px;border:0;border-radius:8px;background:transparent;color:#637d8f;font:600 12px 'Segoe UI',sans-serif}
 body.mobileAppShell .mobileFinalizerPreview button[aria-pressed=true]{background:#fff;color:#087e8b;box-shadow:0 1px 4px #25445b0d}
 .mobileFinalizerZoom{display:flex;align-items:center;gap:3px;flex:0 0 auto}
 body.mobileAppShell .mobileFinalizerZoom button{display:grid;place-items:center;min-height:36px!important;width:32px;padding:0;border:1px solid #d7e3eb;border-radius:9px;background:#fff;color:#267081;font:600 20px 'Segoe UI',sans-serif}
 .mobileFinalizerZoom output{min-width:34px;text-align:center;color:#6c8394;font:11px 'Segoe UI',sans-serif}
}
