/* VectorElements SVG Studio — mobile layout. Desktop stays unchanged. */
.ve-mobile-actions{display:none}
@media(max-width:760px){
 :root{--header:54px;--left:0px;--right:0px}
 html,body{width:100%;height:100%;overflow:hidden}
 .studio{height:100vh;height:100dvh;min-width:0}
 .studio-header{height:54px;min-height:54px;padding:0 10px;gap:8px;z-index:70}
 .studio-brand{min-width:0;flex:0 0 auto;gap:0}
 .studio-brand__mark{width:32px;height:32px;font-size:19px}
 .studio-brand__name,.studio-brand__product{display:none}
 .studio-header__modules{display:none;position:absolute;left:8px;right:8px;top:calc(100% + 4px);height:auto;max-height:min(65dvh,440px);overflow:auto;z-index:100;flex-direction:column;align-items:stretch;gap:5px;padding:12px;background:#171c20;border:1px solid #39434b;border-radius:12px;box-shadow:0 15px 35px #0009}
 .studio-header.ve-mobile-menu-open .studio-header__modules{display:flex}
 .studio-header__modules>.ve-top-group,.studio-header__modules>.ve-top-group[data-module="history"],.studio-header__modules>.ve-top-group[data-module="export"]{display:flex;flex-wrap:wrap;margin:0;gap:4px;justify-content:flex-start}
 .studio-header__modules .ve-btn{width:auto;min-width:40px;padding:0 12px}
 .studio-header__modules .ve-btn span{display:inline}
 .ve-mobile-actions{display:flex;align-items:center;gap:5px;margin-left:auto}
 .ve-mobile-action{height:34px;min-width:34px;padding:0 7px;display:inline-flex;align-items:center;justify-content:center;gap:4px;border:1px solid #343e45;border-radius:8px;background:#20262b;color:#eaf1f4;cursor:pointer}
 .ve-mobile-action[aria-expanded="true"]{color:#8AE749;border-color:#6eac3d;background:#263423}
 .ve-mobile-action svg{width:18px;height:18px;pointer-events:none}
 .ve-native-fullscreen{margin:0;flex:0 0 34px}
 .studio-workspace{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) 62px;min-height:0;position:relative}
 .studio-editor{grid-column:1;grid-row:1;min-width:0;min-height:0;overflow:hidden}
 .studio-sidebar--left{grid-column:1;grid-row:2;min-height:62px;height:62px;width:100%;display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:8px;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;padding:7px 10px;border-top:1px solid #39434b;border-right:0;overscroll-behavior-x:contain;touch-action:pan-x}
 .studio-sidebar--left .ve-tool-button{flex:0 0 42px;width:42px;height:42px}
 .studio-sidebar--left .ve-divider{flex:0 0 1px;width:1px;height:30px;margin:0 2px}
 .studio-sidebar--right{display:block;position:absolute;right:0;top:0;bottom:62px;width:min(88vw,340px);max-width:100%;z-index:61;transform:translateX(105%);transition:transform .2s ease;overflow-y:auto;border-left:1px solid #39434b;box-shadow:-12px 0 30px #0008;visibility:hidden}
 .studio.ve-mobile-inspector-open .studio-sidebar--right{transform:translateX(0);visibility:visible}
 .ve-mobile-scrim{display:none;position:absolute;inset:0 0 62px 0;background:#0008;z-index:60;border:0;padding:0}
 .studio.ve-mobile-inspector-open .ve-mobile-scrim{display:block}
 .studio-editor__viewport{overflow:auto;overscroll-behavior:contain}
 .studio-artboard-wrap{min-width:100%;min-height:100%;width:100%;height:100%;padding:24px!important;display:flex;align-items:center;justify-content:center}
 #svgCanvas.studio-artboard{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;flex-shrink:1}
 .ve-toast-wrap{right:10px;left:10px;bottom:75px}
 .ve-color-dialog{max-width:calc(100vw - 24px)}
 .ve-modal{max-width:calc(100vw - 24px)}
}
@media(max-width:380px){.studio-header{padding-inline:6px;gap:5px}.ve-mobile-action{padding:0 5px}.studio-artboard-wrap{padding:16px!important}}
@media(prefers-reduced-motion:reduce){.studio-sidebar--right{transition:none}}

/* v52: separate mobile background chooser; never wrap background controls in toolbar */
.ve-mobile-background-trigger,.ve-mobile-background-panel{display:none}
@media(max-width:760px){
 .studio-sidebar--left .ve-background-shapes,.studio-sidebar--left .ve-bg-more-wrap{display:none!important}
 .studio-sidebar--left .ve-mobile-background-trigger{display:grid;flex:0 0 42px;width:42px;height:42px}
 .ve-mobile-background-panel{display:none;position:absolute;left:8px;right:8px;bottom:70px;z-index:65;max-height:min(55dvh,390px);overflow-y:auto;padding:12px;background:#171c20;border:1px solid #39434b;border-radius:12px;box-shadow:0 12px 35px #0009}
 .studio.ve-mobile-background-open .ve-mobile-background-panel{display:block}
 .ve-mobile-background-head{display:flex;justify-content:space-between;align-items:center;color:#eaf1f4;font-size:13px;margin-bottom:12px}
 .ve-mobile-background-close{width:32px;height:32px;border:0;background:#273039;border-radius:7px;color:#fff;font-size:22px;cursor:pointer}
 .ve-mobile-background-panel .ve-background-shapes{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;align-items:center;justify-items:center;width:100%;margin:0;padding:0}
 .ve-mobile-background-panel .ve-background-shapes>button,.ve-mobile-background-panel .ve-bg-more-wrap{width:100%;max-width:48px;margin:0;padding:0;border:0}
 .ve-mobile-background-panel .ve-background-shapes>button,.ve-mobile-background-panel .ve-bg-more{width:100%;height:44px;min-height:44px}
 .ve-mobile-background-panel .ve-bg-more-wrap{display:block}
 .ve-bg-flyout{width:min(300px,calc(100vw - 24px));max-height:65dvh}
}

/* v54: use full Vector wordmark on mobile without covering actions */
@media(max-width:760px){.studio-brand{min-width:0;max-width:32vw}.studio-brand__logo{width:clamp(78px,25vw,112px);max-width:100%;height:auto;max-height:26px}}
@media(max-width:380px){.studio-brand__logo{width:78px}}

/* v55: two-row mobile header with the complete VectorElements wordmark. */
@media (max-width:600px) {
 :root { --header:112px; }
 .studio-header {
   height:112px; min-height:112px;
   display:grid; grid-template-columns:minmax(0,1fr) 44px;
   grid-template-rows:52px 46px;
   align-items:center; column-gap:6px; row-gap:0;
   padding:6px 12px 8px;
 }
 .studio-brand {
   grid-column:1 / -1; grid-row:1;
   width:100%; max-width:none; min-width:0;
   display:flex; justify-content:center; align-items:center;
   height:52px;
 }
@media (max-width: 600px) {
    .studio-brand__logo {
        display: block;
        width: auto;
        height: 22px;
        max-height: 22px;
        max-width: 100%;
        object-fit: contain;
    }
}
 .studio-header .ve-mobile-actions {
   grid-column:1; grid-row:2; margin:0;
   display:flex; justify-content:space-around; gap:6px;
   width:100%; min-width:0;
 }
 .studio-header .ve-mobile-action {
   width:40px; height:38px; min-width:0; flex:0 1 40px;
   padding:0; border-radius:8px;
 }
 .studio-header .ve-native-fullscreen {
   grid-column:2; grid-row:2;
   width:40px; height:38px; min-width:0; margin:0;
   justify-self:end;
 }
 .studio-header .studio-header__modules {
   top:calc(100% + 4px);
 }
}
@media (max-width:360px) {
 .studio-header {padding-inline:8px;column-gap:3px}
 .studio-header .ve-mobile-actions {gap:3px}
 .studio-header .ve-mobile-action {width:36px;height:36px;flex-basis:36px}
 .studio-header .ve-native-fullscreen {width:36px;height:36px}
}
