/* Phone presentation layer only; tablet and desktop keep the existing studio. */
.cz-phone-only{display:none!important}
@media(max-width:767px){
 body.cz-phone-studio{--phone-header:calc(58px + env(safe-area-inset-top,0px));--phone-tools:calc(74px + env(safe-area-inset-bottom,0px));height:var(--cz-vh,100dvh);min-height:0;overflow:hidden;overscroll-behavior:none;background:var(--cz-surface);color:var(--cz-text)}
 .cz-editor.cz-phone-studio [hidden]{display:none!important}
 .cz-phone-studio .cz-phone-only{display:flex!important}
 .cz-phone-studio .cz-mobile-header{height:var(--phone-header);min-height:var(--phone-header);padding:calc(5px + env(safe-area-inset-top,0px)) max(10px,env(safe-area-inset-right)) 5px max(8px,env(safe-area-inset-left));position:relative;display:grid!important;grid-template-columns:34px minmax(0,1fr) auto;grid-template-rows:28px 16px;gap:0 7px;z-index:60;border-bottom:1px solid var(--cz-border);box-shadow:0 2px 10px #17093b03}
 .cz-phone-studio .cz-mobile-header>a{font-size:30px;grid-column:1;grid-row:1/3;display:grid;place-items:center;min-height:44px;color:var(--cz-text)}
 .cz-phone-studio .cz-mobile-name{grid-column:2;grid-row:1;align-self:center}.cz-phone-studio .cz-mobile-name .project-name{width:100%;max-width:none;font-size:13px;line-height:20px;padding:4px 2px;border-radius:5px;min-height:28px;font-weight:650;text-overflow:ellipsis}
 .cz-phone-studio .cz-mobile-status{grid-column:2;grid-row:2;padding:0 2px;font-size:9px;line-height:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .cz-phone-studio .cz-phone-header-actions{grid-column:3;grid-row:1/3;gap:3px;align-items:center}
 .cz-phone-studio .cz-phone-icon{border:0;border-radius:12px;background:transparent;color:var(--cz-text);width:44px;min-width:44px;height:44px;min-height:44px;padding:10px;align-items:center;justify-content:center;cursor:pointer}
 .cz-phone-studio .cz-phone-icon svg{width:21px;height:21px;flex:none}.cz-phone-studio .cz-phone-download{background:var(--cz-purple);color:#fff;box-shadow:0 3px 9px #713de12a}.cz-phone-studio .cz-phone-icon:hover{background:color-mix(in srgb,var(--cz-purple) 10%,var(--cz-card))}.cz-phone-studio .cz-phone-download:hover{background:var(--cz-purple);color:#fff}
 .cz-phone-studio .cz-phone-icon:focus-visible,.cz-phone-studio .cz-bottom-toolbar button:focus-visible,.cz-phone-studio .cz-phone-menu button:focus-visible,.cz-phone-studio .cz-phone-menu a:focus-visible{outline:2px solid var(--cz-purple);outline-offset:2px}
 .cz-phone-studio .cz-phone-icon[data-state=saved]{color:#218256}.cz-phone-studio .cz-phone-icon[data-state=error],.cz-phone-studio .cz-phone-icon[data-state=warning]{color:#b54732}
 .cz-editor.cz-phone-studio .editor-layout{height:calc(var(--cz-vh,100dvh) - var(--phone-header) - var(--phone-tools));min-height:0;max-height:none;display:flex;flex-direction:column;padding:0;gap:0;overflow:hidden;background:var(--cz-surface)}
 .cz-editor.cz-phone-studio .canvas-workspace{display:flex;flex:1;flex-direction:column;min-height:0;min-width:0;max-width:none;width:100%;padding:0;align-self:stretch;position:relative;overflow:hidden}
 .cz-phone-studio .cz-canvas-actions{height:48px;min-height:48px;flex:none;display:flex;flex-wrap:nowrap;justify-content:space-between;align-items:center;gap:2px;margin:0;padding:2px 8px;border-bottom:1px solid color-mix(in srgb,var(--cz-border) 60%,transparent);background:var(--cz-card)}
 .cz-phone-studio .cz-canvas-actions .cz-mobile-history{display:flex;gap:0;flex:none;margin:0;align-items:center}.cz-phone-studio .cz-canvas-actions .cz-mobile-history button{width:44px;min-width:44px;min-height:44px;height:44px;border:0;border-radius:8px;background:transparent;padding:0;box-shadow:none;font-size:0}.cz-phone-studio .cz-mobile-history #edit-undo:before,.cz-phone-studio .cz-mobile-history #edit-redo:before{font-size:22px}
 .cz-phone-studio .cz-zoom{border:0;border-radius:9px;background:var(--cz-surface);height:44px;flex:none}.cz-phone-studio .cz-zoom button{min-width:44px;min-height:44px;height:44px;font-size:18px}.cz-phone-studio .cz-zoom output{display:none}.cz-phone-studio .cz-zoom [data-zoom=fit]{font-size:10px;min-width:44px}
 .cz-phone-studio .cz-canvas-actions [data-preview]{min-height:44px;height:44px;border:0;border-radius:8px;padding:4px 7px;margin:0;background:transparent;font-size:10px;white-space:normal;max-width:44px;min-width:44px;line-height:1.2;color:var(--cz-text);box-shadow:none;flex:none}
 .cz-phone-studio .cz-phone-quick-tools{align-items:center;gap:0;flex:none}.cz-phone-studio .cz-phone-quick-tools .cz-phone-icon{width:44px;min-width:44px;padding:10px;border-radius:8px}.cz-phone-studio .cz-phone-quick-tools svg{width:19px;height:19px}.cz-phone-studio .cz-phone-quick-tools [data-mobile-guide]{display:none!important}
 .cz-editor.cz-phone-studio .cz-canvas-actions [data-mobile-save],.cz-editor.cz-phone-studio .cz-canvas-actions [data-mobile-download],.cz-editor.cz-phone-studio .cz-canvas-actions>[data-image-format]{display:none!important}
 .cz-editor.cz-phone-studio .canvas-stage{display:flex;flex:1;min-height:0;max-height:none!important;width:100%;padding:10px 12px;overflow:auto;align-items:center;justify-content:center;border-radius:0;background-color:var(--cz-surface);background-image:radial-gradient(color-mix(in srgb,var(--cz-border) 76%,transparent) .75px,transparent .75px);background-size:14px 14px;overscroll-behavior:contain}
 .cz-phone-studio.cz-phone-fit .cz-canvas-wrap{width:var(--phone-fit-width)!important;height:var(--phone-fit-height)!important;align-self:flex-start;margin-top:var(--phone-fit-top,0px);margin-bottom:0;margin-inline:auto}
 .cz-phone-studio .cz-canvas-wrap{margin:auto;box-shadow:0 3px 9px #1c15300b,0 15px 40px #1c153014;outline:1px solid #17102406}
 .cz-editor.cz-phone-studio .preview-controls{height:28px;min-height:28px;flex:none;padding:0 12px 4px;gap:12px;justify-content:center;background:var(--cz-surface)}.cz-phone-studio .preview-controls .icon-button{display:none;border:0;background:transparent;min-width:44px;width:44px;min-height:28px;height:28px;font-size:17px}.cz-phone-studio .preview-controls #slide-position{font-size:10px;letter-spacing:.02em;color:var(--muted)}
 .cz-editor.cz-phone-studio .overflow-note{flex:none;font-size:10px;padding:4px 9px;border-radius:0;margin:0;max-height:45px;overflow:auto}
 .cz-editor.cz-phone-studio .slide-sidebar{height:88px;min-height:88px;flex:none;order:2;padding:7px 12px 6px;border-top:1px solid var(--cz-border);background:var(--cz-card);overflow:hidden}
 .cz-editor.cz-phone-studio .slide-list{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;max-height:none;width:100%;height:74px;min-height:0;margin:0;padding:1px 2px 5px;gap:9px;overflow-x:auto;overflow-y:hidden;scroll-padding-inline:12px;scrollbar-width:thin}
 .cz-editor.cz-phone-studio .slide-item{min-width:46px;min-height:62px;max-height:65px;gap:2px;padding:4px 5px;flex-direction:column-reverse;border-radius:7px;box-shadow:none;background:var(--cz-surface)}
 .cz-editor.cz-phone-studio .slide-item canvas{width:29px;max-height:43px;height:auto;object-fit:contain;border-radius:2px}.cz-editor.cz-phone-studio .slide-item>span{font-size:9px;line-height:11px;padding:0;color:var(--muted)}.cz-editor.cz-phone-studio .slide-item[aria-pressed=true]{border-color:var(--cz-purple);box-shadow:0 0 0 1px var(--cz-purple);background:color-mix(in srgb,var(--cz-purple) 7%,var(--cz-card))}.cz-editor.cz-phone-studio .slide-item[aria-pressed=true]>span{color:var(--cz-purple);font-weight:700}
 .cz-editor.cz-phone-studio .page-actions{display:none!important}
 .cz-phone-studio .cz-bottom-toolbar{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr));height:var(--phone-tools);min-height:var(--phone-tools);position:fixed;inset:auto 0 0;z-index:70;padding:5px max(5px,env(safe-area-inset-right)) calc(5px + env(safe-area-inset-bottom,0px)) max(5px,env(safe-area-inset-left));gap:2px;background:var(--cz-card);box-shadow:0 -5px 18px #20123e04;border-top:1px solid var(--cz-border)}
 .cz-phone-studio .cz-bottom-toolbar button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-height:56px;min-width:0;width:100%;padding:5px 1px;border:0;border-radius:11px;font-size:9px;font-weight:600;line-height:1.2;color:var(--muted);background:transparent;overflow:hidden}
 .cz-phone-studio .cz-bottom-toolbar button svg{height:23px;width:23px;flex:none}.cz-phone-studio .cz-bottom-toolbar button span{font-size:9px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cz-phone-studio .cz-bottom-toolbar button[aria-pressed=true]{background:color-mix(in srgb,var(--cz-purple) 9%,var(--cz-card));color:var(--cz-purple)}
 .cz-editor.cz-phone-studio .properties-panel{z-index:65;bottom:var(--phone-tools);height:46dvh;max-height:calc(var(--cz-vh,100dvh) - var(--phone-header) - var(--phone-tools) - 20px);padding:0 18px 24px;box-shadow:0 -10px 35px #17102416;border-radius:22px 22px 0 0;scroll-padding-top:64px;overscroll-behavior:contain}
 .cz-editor.cz-phone-studio .properties-panel[data-sheet=full]{height:calc(var(--cz-vh,100dvh) - var(--phone-header) - var(--phone-tools) - 12px)}
 .cz-phone-studio .cz-sheet-head{grid-template-columns:1fr 44px 44px;min-height:64px;padding:3px 0 7px;margin-bottom:12px;gap:0;background:var(--cz-card)}.cz-phone-studio .cz-sheet-head strong{font-size:16px;font-weight:700;letter-spacing:-.025em}.cz-phone-studio .cz-sheet-head>button:not([data-sheet-handle]){min-height:40px;font-size:23px;background:transparent}.cz-phone-studio .cz-sheet-head>[data-sheet-handle]{height:15px}
 .cz-phone-studio .cz-phone-manage-logo{display:none!important}.cz-phone-studio .properties-panel[data-phone-tool=brand] .cz-phone-manage-logo{display:flex!important;width:100%;min-height:44px;align-items:center;justify-content:center;margin-top:8px}
 .cz-phone-studio .cz-phone-panel-note{font-size:11px;line-height:1.55;color:var(--muted);padding:0 0 8px}
 .cz-editor.cz-phone-studio .properties-panel>[data-phone-group]{display:none!important}
 .cz-editor.cz-phone-studio .properties-panel[data-phone-tool=text]>[data-phone-group=text],.cz-editor.cz-phone-studio .properties-panel[data-phone-tool=photo]>[data-phone-group=photo],.cz-editor.cz-phone-studio .properties-panel[data-phone-tool=template]>[data-phone-group=template],.cz-editor.cz-phone-studio .properties-panel[data-phone-tool=background]>[data-phone-group=background],.cz-editor.cz-phone-studio .properties-panel[data-phone-tool=brand]>[data-phone-group=brand],.cz-editor.cz-phone-studio .properties-panel[data-phone-tool=more]>[data-phone-reveal]{display:block!important}
 .cz-editor.cz-phone-studio .properties-panel .cz-object-tools{display:none!important}
 .cz-editor.cz-phone-studio .properties-panel[data-phone-tool=text] .cz-object-tools,.cz-editor.cz-phone-studio .properties-panel[data-phone-tool=photo] .cz-object-tools,.cz-editor.cz-phone-studio .properties-panel[data-phone-tool=elements] .cz-object-tools,.cz-editor.cz-phone-studio .properties-panel[data-phone-tool=brand] .cz-object-tools{display:block!important}
 .cz-editor.cz-phone-studio .properties-panel[data-phone-tool=text] .cz-add-elements,.cz-editor.cz-phone-studio .properties-panel[data-phone-tool=photo] .cz-add-elements,.cz-editor.cz-phone-studio .properties-panel[data-phone-tool=brand] .cz-add-elements{display:flex!important}
 .cz-editor.cz-phone-studio .properties-panel[data-phone-tool=text] .cz-add-elements [data-add]:not([data-add=text]),.cz-editor.cz-phone-studio .properties-panel[data-phone-tool=photo] .cz-add-elements [data-add]:not([data-add=photo]),.cz-editor.cz-phone-studio .properties-panel[data-phone-tool=elements] .cz-add-elements [data-add=text],.cz-editor.cz-phone-studio .properties-panel[data-phone-tool=elements] .cz-add-elements [data-add=photo],.cz-editor.cz-phone-studio .properties-panel[data-phone-tool=elements] .cz-add-elements [data-add=logo],.cz-editor.cz-phone-studio .properties-panel[data-phone-tool=brand] .cz-add-elements [data-add]:not([data-add=logo]){display:none!important}
 .cz-editor.cz-phone-studio .properties-panel[data-phone-tool=elements] [data-text-tools],.cz-editor.cz-phone-studio .properties-panel[data-phone-tool=elements] [data-selected-photo],.cz-editor.cz-phone-studio .properties-panel[data-phone-tool=text] [data-selected-photo],.cz-editor.cz-phone-studio .properties-panel[data-phone-tool=text] [data-selected-shape]{display:none!important}
 .cz-editor.cz-phone-studio .properties-panel[data-phone-tool=brand] .cz-object-tools>label,.cz-editor.cz-phone-studio .properties-panel[data-phone-tool=brand] .cz-object-actions,.cz-editor.cz-phone-studio .properties-panel[data-phone-tool=brand] [data-text-tools],.cz-editor.cz-phone-studio .properties-panel[data-phone-tool=brand] [data-selected-photo],.cz-editor.cz-phone-studio .properties-panel[data-phone-tool=brand] [data-selected-shape],.cz-editor.cz-phone-studio .properties-panel[data-phone-tool=brand] .cz-position,.cz-editor.cz-phone-studio .properties-panel[data-phone-tool=brand] .cz-object-hint{display:none!important}
 .cz-editor.cz-phone-studio .properties-panel .cz-object-tools .cz-add-elements{border:1px solid var(--cz-border);padding:10px;border-radius:12px;margin:12px 0;background:var(--cz-surface)}.cz-phone-studio .cz-add-elements h4{font-size:11px;color:var(--muted)}.cz-phone-studio .cz-add-elements button{min-height:44px;font-size:12px;border-radius:9px}
 .cz-editor.cz-phone-studio .properties-panel>[data-phone-group][hidden],.cz-editor.cz-phone-studio .properties-panel .cz-object-tools [hidden]{display:none!important}
 .cz-phone-studio .properties-panel .field input:not([type=color]):not([type=file]),.cz-phone-studio .properties-panel .field select,.cz-phone-studio .properties-panel .field textarea{font-size:16px;border-radius:10px;min-height:44px;background:var(--cz-card);color:var(--cz-text)}.cz-phone-studio .properties-panel .field label:not(.upload-zone){color:var(--cz-text)}.cz-phone-studio .properties-panel .editor-details summary{font-size:13px;min-height:28px;color:var(--cz-text)}
 .cz-phone-studio .properties-panel .photo-field{padding-top:0;border-top:0}.cz-phone-studio .properties-panel .upload-zone{border-radius:14px;background:var(--cz-surface);min-height:100px}
 .cz-phone-studio .cz-phone-menu{--cz-card:var(--raised,#fff);--cz-text:var(--ink,#252134);--cz-border:var(--line,#e6e2ef);--cz-purple:#713de1;position:fixed;width:100%;max-width:none;height:auto;max-height:calc(var(--cz-vh,100dvh) - 24px);margin:auto 0 0;padding:0;border:1px solid var(--cz-border);border-bottom:0;border-radius:24px 24px 0 0;background:var(--cz-card);color:var(--cz-text);overflow:hidden;box-shadow:0 -12px 70px #1811252b}
 .cz-phone-studio .cz-phone-menu[open]{display:flex;flex-direction:column}.cz-phone-menu::backdrop{background:#130d245e;backdrop-filter:blur(3px)}
 .cz-phone-menu-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:19px 20px 15px;border-bottom:1px solid var(--cz-border);flex:none}.cz-phone-menu-heading span{display:block;margin-bottom:7px;font-size:9px;font-weight:700;letter-spacing:.14em;color:var(--cz-purple)}.cz-phone-menu-heading h2{font-size:20px;line-height:1.2;letter-spacing:-.045em;margin:0;color:var(--cz-text)}.cz-phone-menu-heading button{width:44px;min-width:44px;height:44px;border:0;border-radius:50%;background:var(--panel,#f7f5fa);color:var(--cz-text);font-size:25px;padding:0}
 .cz-phone-menu-content{overflow-y:auto;overscroll-behavior:contain;padding:4px 20px calc(24px + env(safe-area-inset-bottom));min-height:0}.cz-phone-menu-content section{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;padding:15px 0;border-bottom:1px solid var(--cz-border)}.cz-phone-menu-content section:last-child{border-bottom:0}.cz-phone-menu-content h3{grid-column:1/-1;margin:0 0 3px;font-size:12px;font-weight:700;letter-spacing:0;color:var(--cz-text)}
 .cz-phone-menu-action{border:1px solid var(--cz-border);border-radius:11px;background:var(--panel,#f7f5fa);color:var(--cz-text);font:inherit;font-size:12px;line-height:1.4;padding:12px 10px;min-height:46px;text-align:left;cursor:pointer}.cz-phone-menu-action:disabled{opacity:.4;cursor:default}.cz-phone-menu-action:hover{border-color:var(--cz-purple)}
 .cz-phone-format{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:16px;font-size:12px;color:var(--cz-text);min-height:46px}.cz-phone-format select{font:inherit;font-size:16px;background:var(--cz-card);color:var(--cz-text);border:1px solid var(--cz-border);border-radius:9px;min-height:44px;padding:6px 10px}
 .cz-phone-menu-links{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:4px 14px}.cz-phone-menu-links a{display:flex;align-items:center;min-height:44px;font-size:12px;color:var(--cz-purple)}
 .cz-editor.cz-phone-studio .toast{bottom:calc(var(--phone-tools) + 14px);z-index:150;font-size:12px;border-radius:13px}
 .cz-editor.cz-phone-studio.cz-preview-mode .editor-layout{height:calc(var(--cz-vh,100dvh) - var(--phone-header));display:flex}.cz-editor.cz-phone-studio.cz-preview-mode .canvas-workspace{max-width:none;margin:0;flex:1}.cz-editor.cz-phone-studio.cz-preview-mode .cz-bottom-toolbar,.cz-editor.cz-phone-studio.cz-preview-mode .cz-phone-quick-tools{display:none!important}.cz-editor.cz-phone-studio.cz-preview-mode [data-preview]{color:var(--cz-purple);font-weight:700;max-width:82px;background:color-mix(in srgb,var(--cz-purple) 7%,var(--cz-card))}
 .cz-editor.cz-phone-studio.cz-keyboard .editor-layout{height:calc(var(--cz-vh,100dvh) - var(--phone-header));padding:0}.cz-editor.cz-phone-studio.cz-keyboard .slide-sidebar,.cz-editor.cz-phone-studio.cz-keyboard .cz-bottom-toolbar,.cz-editor.cz-phone-studio.cz-keyboard .cz-canvas-actions{display:none!important}.cz-editor.cz-phone-studio.cz-keyboard .properties-panel{bottom:0;height:56%;max-height:calc(var(--cz-vh,100dvh) - var(--phone-header));padding-bottom:20px}
 .cz-editor.cz-phone-studio.cz-phone-gated{overflow:auto}.cz-editor.cz-phone-studio.cz-phone-gated .cz-mobile-header,.cz-editor.cz-phone-studio.cz-phone-gated .cz-bottom-toolbar{display:none!important}.cz-phone-studio .project-gate{margin:30px 16px}
}
@media(max-width:374px){.cz-phone-studio .cz-canvas-actions{padding-inline:4px;gap:0}.cz-phone-studio .cz-zoom [data-zoom=fit]{display:none}.cz-phone-studio .cz-phone-quick-tools .cz-phone-icon{min-width:44px;width:44px}.cz-phone-studio .cz-canvas-actions [data-preview]{padding-inline:4px;max-width:58px}}
@media(max-width:767px) and (max-height:600px){.cz-editor.cz-phone-studio .slide-sidebar{height:71px;min-height:71px;padding-top:3px}.cz-editor.cz-phone-studio .slide-list{height:64px}.cz-editor.cz-phone-studio .slide-item{min-height:53px;max-height:56px}.cz-editor.cz-phone-studio .slide-item canvas{max-height:34px}.cz-editor.cz-phone-studio .properties-panel{height:65dvh}}

/* Readable labels on the existing dark phone surfaces. */
@media(max-width:767px){
 :root[data-theme=dark] body.cz-phone-studio .cz-bottom-toolbar button[aria-pressed=true],
 :root[data-theme=dark] body.cz-phone-studio .slide-item[aria-pressed=true]>span,
 :root[data-theme=dark] body.cz-phone-studio.cz-preview-mode [data-preview],
 :root[data-theme=dark] body.cz-phone-studio .cz-phone-menu-heading span,
 :root[data-theme=dark] body.cz-phone-studio .cz-phone-menu-links a{color:#c4b5fd}
 :root[data-theme=dark] body.cz-phone-studio .cz-phone-icon[data-state=saved],
 :root[data-theme=dark] body.cz-phone-studio .cz-mobile-status[data-state=saved]{color:#86efac}
}
