/* Mobile-only additions: retain the existing editor shell and canvas. */
@media(min-width:0px){
html[data-view-mode="phone"] [data-editor-print-guide]{display:none!important}
html[data-view-mode="phone"] .clipart-open{display:none!important}
html[data-view-mode="phone"] .mobile-design-source-tool{display:flex!important;align-items:center;justify-content:center;min-height:44px;padding:6px 10px;border:1px solid #b5d5e0;border-radius:6px;background:#edf8fc;color:#176078;font:500 12px/1.3 'Noto Sans KR',sans-serif;cursor:pointer}
html[data-view-mode="phone"] .mobile-design-source-tool:disabled{opacity:.45;cursor:default}
html[data-view-mode="phone"] .source-library-popup{box-sizing:border-box;width:calc(100vw - 20px)!important;max-width:560px!important;height:calc(100dvh - 32px)!important;max-height:calc(100dvh - 32px)!important;padding:0!important;margin:auto;border:0;border-radius:14px;overflow:hidden;background:#fff}
html[data-view-mode="phone"] .source-library-popup::backdrop{background:#142d4977}
html[data-view-mode="phone"] .source-library-popup:not([open]){display:none!important}
html[data-view-mode="phone"] .source-library-popup[open]{display:flex!important;flex-direction:column}
html[data-view-mode="phone"] .source-library-popup>.source-library-close{position:absolute;right:10px;top:10px;z-index:3;width:36px;height:36px;padding:0;border:0;border-radius:50%;background:#f0f5f7;color:#234657;font-size:25px;line-height:1}
html[data-view-mode="phone"] .source-library-popup .design-source-dock{display:flex!important;flex:1;flex-direction:column;box-sizing:border-box;width:100%!important;height:100%!important;min-height:0;max-height:none;margin:0;border:0;border-radius:0;box-shadow:none;overflow:hidden}
html[data-view-mode="phone"] .source-library-popup .design-source-dock header{padding:16px 54px 12px 16px;min-height:28px}
html[data-view-mode="phone"] .source-library-popup .design-source-dock h2{font-size:18px;margin:0}
html[data-view-mode="phone"] .source-library-popup .design-source-dock>header>div:first-child{display:flex!important;align-items:center!important;flex-wrap:nowrap!important;gap:8px!important;min-width:0}
html[data-view-mode="phone"] .source-library-popup .design-source-dock>header h2{flex:none;margin:0!important}
html[data-view-mode="phone"] .source-library-popup .design-source-dock>header .source-color-feature{flex:none;align-self:center;margin:0!important}
html[data-view-mode="phone"] .source-library-expand,html[data-view-mode="phone"] .design-source-dock>footer{display:none!important}
html[data-view-mode="phone"] .design-search-filters{display:flex;flex-wrap:wrap;gap:8px;padding:0 16px 10px}
html[data-view-mode="phone"] .design-search-filters :is(input,.design-category-bar){flex:1 1 110px;width:auto;min-width:0;height:38px;border:1px solid #cbdbe3;border-radius:6px;background:#fff;padding:0 9px;font:400 13px 'Noto Sans KR',sans-serif}
html[data-view-mode="phone"] .design-source-dock>.design-search-count{margin:0;padding:0 16px 8px;font-size:11px}
html[data-view-mode="phone"] .design-search-body>section{padding:0 16px 16px;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
html[data-view-mode="phone"] .source-library-popup .design-search-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
html[data-view-mode="phone"] .design-search-card{padding:6px;text-align:left}
html[data-view-mode="phone"] .design-search-card strong{display:none}
html[data-view-mode="phone"] .design-source-preview-dialog{box-sizing:border-box;width:calc(100vw - 24px)!important;max-width:540px;max-height:calc(100dvh - 36px)!important;padding:16px 12px!important;overflow:auto;border:0;border-radius:12px}
html[data-view-mode="phone"] .design-source-preview-dialog>img{width:100%;height:min(45dvh,360px)!important;object-fit:contain}
html[data-view-mode="phone"] .design-source-preview-dialog>header h2{font-size:16px!important;line-height:1.5}
html[data-view-mode="phone"] .design-source-preview-dialog>footer{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}
html[data-view-mode="phone"] .design-search-layer-colors:not([hidden]){display:flex!important;align-items:center;gap:6px;flex-wrap:wrap;position:fixed;left:10px;right:10px;bottom:calc(74px + env(safe-area-inset-bottom,0px));z-index:1200;box-sizing:border-box;max-width:480px;margin:0 auto;padding:8px 10px;max-height:none;overflow:visible;background:#f5f8fa;border:1px solid #d2dfe6;border-radius:10px;box-shadow:0 -3px 12px #17365312}
html[data-view-mode="phone"] .design-source-color-controls{display:flex;align-items:center;flex-wrap:wrap;justify-content:flex-start;gap:7px;width:100%;margin-bottom:10px}
html[data-view-mode="phone"] .design-source-color-controls>strong{width:auto;margin:0 4px 0 0;font-size:12px}
html[data-view-mode="phone"] .design-source-color-controls>.design-source-color-chip{width:26px;min-width:26px;height:26px;min-height:26px}
html[data-view-mode="phone"] .design-source-color-controls>.design-source-reset{width:auto;min-height:26px;height:26px;margin:0;padding:2px 8px;font-size:11px}
html[data-view-mode="phone"] .placement-editor-caption .mobile-design-source-tool,html[data-view-mode="phone"] .placement-editor-caption .mobile-design-source-tool>span{color:#173653!important;font-weight:600!important}
html[data-view-mode="phone"] .design-search-layer-colors>.design-source-palette{padding:4px 0;width:100%;flex-basis:100%}
html[data-view-mode="phone"] .design-search-layer-colors>button:last-child{min-height:24px;height:24px;padding:2px 8px;font-size:11px;margin-left:auto}
html[data-view-mode="phone"] .design-source-palette{grid-template-columns:repeat(10,minmax(0,1fr));gap:4px}
html[data-view-mode="phone"] .design-source-palette button,html[data-view-mode="phone"] .design-source-palette .design-source-custom-card{box-sizing:border-box;width:100%!important;min-width:0!important;height:auto!important;min-height:0!important;aspect-ratio:1;padding:0!important;border:0!important;border-radius:5px!important;box-shadow:none!important}
html[data-view-mode="phone"] .design-source-palette button[aria-label="색상 #ffffff"]{border:1px solid #d4dce1!important}
}

html[data-view-mode="phone"] .source-library-popup .design-search-grid{grid-template-columns:repeat(var(--source-columns,2),minmax(0,1fr))!important}
html:root[data-view-mode="phone"] .source-library-popup .design-source-dock .source-saved-shelf{display:grid!important;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:6px}
html[data-view-mode="phone"] .source-library-popup .source-saved-toggle{grid-column:1;min-width:0}
html[data-view-mode="phone"] .source-library-popup .source-saved-items{grid-column:1/-1}
html[data-view-mode="phone"] .source-library-popup .source-density-controls{display:flex;grid-column:2;grid-row:1;margin:0}
html[data-view-mode="phone"] .source-library-popup .source-density-controls>:is(span,button){display:none!important}
html[data-view-mode="phone"] .source-library-popup .source-density-select{display:block;width:112px;height:30px;padding:0 6px;border:1px solid #d4e1e8;border-radius:5px;background:#fff;color:#526b7b;font:11px sans-serif}


