/* Compact web studio for phones and touch tablets. The full workspace stays mounted. */
.studio-layout-switch[hidden]{display:none}
.studio-layout-switch{
  position:relative;z-index:2;display:flex;justify-content:flex-end;
  width:min(100%,760px);margin:0 auto;padding:0 12px;box-sizing:border-box
}
#studio-layout-toggle{
  min-height:36px;padding:4px 8px;border:0;background:transparent;
  color:#d5d9dc;font:inherit;font-size:.82rem;text-decoration:underline;text-underline-offset:3px
}
#studio-layout-toggle:focus-visible{outline:2px solid #d2ff02;outline-offset:-3px}

html.studio-mobile-mode body.site-shell{
  padding-inline:0;background-color:#111415
}
html.studio-mobile-mode body.site-shell > .app-header{
  display:grid;grid-template-columns:minmax(0,1fr) auto;gap:0 8px;
  width:100%;min-height:0;height:auto;padding:8px 12px 0;margin:0;
  box-sizing:border-box;align-items:center;background:#171a1b;backdrop-filter:none
}
html.studio-mobile-mode body.site-shell .app-header .brand{
  display:flex;grid-row:1;grid-column:1;gap:5px;min-width:0;font-size:clamp(.8rem,3.4vw,1rem);
  margin:0;padding:0
}
html.studio-mobile-mode .app-header .brand-mark{width:23px;height:23px}
html.studio-mobile-mode .app-header .header-actions{
  display:flex;grid-row:1;grid-column:2;justify-content:flex-end;align-items:center;flex-wrap:wrap;
  gap:4px;min-width:0;margin:0
}
html.studio-mobile-mode .app-header .studio-balance{
  display:inline-flex;align-items:center;min-height:44px;white-space:nowrap;
  padding-inline:6px;font-size:.82rem
}
html.studio-mobile-mode .studio-balance > span,
html.studio-mobile-mode .app-header :is(.connection-badge,.header-catalog,.studio-split-link,[data-action=settings]),
html.studio-mobile-mode #composer .studio-type-tabs,
html.studio-mobile-mode .studio-code-video-entry{display:none}
html.studio-mobile-mode .app-header .studio-profile .avatar{
  display:grid;min-width:44px;min-height:44px
}
html.studio-mobile-mode .app-header .nav-tabs{
  display:grid;grid-column:1/-1;grid-row:2;
  grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;min-width:0;height:auto;overflow:visible;margin:0
}
html.studio-mobile-mode .app-header .nav-tab{
  min-width:0;min-height:44px;padding:5px 2px;text-align:center;
  white-space:normal;font-size:clamp(.72rem,3.15vw,.9rem)
}
html.studio-mobile-mode .app-header .nav-tab.active{
  color:#f5ffc8;box-shadow:inset 0 -2px #d2ff02
}
html.studio-mobile-mode .app-header > .vizurai-language-switch,
html.studio-mobile-mode .app-header > .vizurai-community-header{
  grid-row:3;margin:0;min-height:36px
}
html.studio-mobile-mode .app-header > .vizurai-language-switch{grid-column:1;justify-self:start}
html.studio-mobile-mode .app-header > .vizurai-community-header{grid-column:2;justify-self:end}
html.studio-mobile-mode body.site-shell:not(.studio-embedded) .workspace{
  display:flex;flex-direction:column;gap:0;width:min(100%,760px);
  min-width:0;margin:0 auto;padding:0 12px;box-sizing:border-box
}
html.studio-mobile-mode body.site-shell:not(.studio-embedded):is([data-tab=video],[data-tab=image]) #composer{
  position:relative;inset:auto;transform:none;align-self:stretch;
  display:flex;flex-direction:column;gap:12px;width:100%!important;
  flex:none;grid-area:auto;height:auto;min-height:0;max-height:none;min-width:0;max-width:none;margin:0;
  padding:12px;box-sizing:border-box;border-radius:14px;
  background:#1a1d1e;backdrop-filter:none
}
html.studio-mobile-mode body.site-shell[data-tab=library] #composer{display:none}
html.studio-mobile-mode #composer .composer-editor{
  display:grid;grid-template-columns:44px minmax(0,1fr);
  gap:8px;align-items:start;width:100%;height:auto;min-height:0;max-height:none
}
html.studio-mobile-mode #composer .upload-zone{
  grid-column:1;grid-row:2;width:44px;max-width:none;
  height:auto;min-height:44px;max-height:none;overflow:visible
}
html.studio-mobile-mode #composer .upload-button{width:44px;height:44px}
html.studio-mobile-mode #composer .upload-zone:has(.reference-preview:not(:empty)){
  grid-column:1/-1;width:100%
}
html.studio-mobile-mode #composer .prompt-field{
  grid-column:1/-1;grid-row:1;min-width:0;width:100%;max-width:none
}
html.studio-mobile-mode #composer .prompt-input{
  box-sizing:border-box;width:100%;min-width:0;
  height:82px;min-height:82px;max-height:175px;font-size:16px
}
html.studio-mobile-mode #composer .improve-prompt{
  grid-column:2;grid-row:2;justify-self:end;width:auto;max-width:100%;
  min-height:44px;max-height:none;padding-inline:8px;font-size:.76rem
}
html.studio-mobile-mode #composer .upload-zone:has(.reference-preview:not(:empty)) ~ .improve-prompt{
  grid-row:3
}
html.studio-mobile-mode #composer .composer-toolbar{
  display:flex;flex-direction:column;align-items:stretch;gap:10px;height:auto;min-height:0
}
html.studio-mobile-mode #composer .composer-params{
  flex:0 0 auto;display:flex;gap:6px;flex-wrap:wrap;width:100%;height:auto;max-height:none;overflow:visible;padding:0
}
html.studio-mobile-mode #composer .composer-model-slot,
html.studio-mobile-mode #composer .model-picker-field{
  flex:1 0 100%;width:100%;min-width:0
}
html.studio-mobile-mode #composer .parameter-pill,
html.studio-mobile-mode #composer .composer-tabs,
html.studio-mobile-mode #composer .composer-tabs button{min-height:44px}
html.studio-mobile-mode #composer .composer-footer{
  position:static;flex:0 0 auto;width:100%;background:none
}
html.studio-mobile-mode #composer .generate-button{width:100%;min-height:52px}
html.studio-mobile-mode #composer .composer-meta,
html.studio-mobile-mode #composer .composer-status{position:static;height:auto}
html.studio-mobile-mode #composer .composer-status #price{white-space:normal}
html.studio-mobile-mode body.site-shell:not(.studio-embedded) .gallery-panel{
  display:flex;flex-direction:column;width:100%;min-width:0;
  grid-area:auto;padding:20px 0 32px;box-sizing:border-box
}
html.studio-mobile-mode .gallery-heading{display:flex;flex-wrap:wrap;gap:10px}
html.studio-mobile-mode .gallery-panel #gallery{min-width:0}
html.studio-mobile-mode .gallery-panel #image-presets{order:1}
html.studio-mobile-mode .gallery-foot{display:none}
html.studio-mobile-mode #toast{
  top:auto;right:12px;bottom:max(12px,env(safe-area-inset-bottom));left:12px;
  width:auto;max-width:none;transform:none
}

html.studio-mobile-mode #composer .improve-prompt::after{content:none}
html.studio-mobile-mode #composer .model-picker-trigger{height:auto;min-height:44px}
html.studio-mobile-mode #composer .composer-info summary{min-height:44px;display:flex;align-items:center}
html.studio-mobile-mode #composer .composer-info-content{
  position:static;width:100%;max-height:none;margin-top:4px;padding:12px;box-shadow:none
}
html.studio-mobile-mode #composer .composer-meta:has(.composer-info[open]){flex-wrap:wrap}
html.studio-mobile-mode #composer .composer-info[open]{flex-basis:100%}
html.studio-mobile-mode body.site-shell:not(.studio-embedded) #vizurai-support{
  display:flex;justify-content:flex-end;width:min(100%,760px);
  margin:0 auto;padding:12px;box-sizing:border-box
}
html.studio-mobile-mode body.site-shell:not(.studio-embedded) #vizurai-support .support-launch{
  position:static;min-height:44px
}


/* Keep the creation task above secondary entry points in the compact view. */
html.studio-mobile-mode body.site-shell > .site-announcement--header,
html.studio-mobile-mode #video-mode-nav{display:none}
@media(max-width:1100px){
  html.studio-mobile-mode body.site-shell .app-header .brand{margin-left:52px}
  html.studio-mobile-mode body.site-shell:not(.site-menu-open) > .vizurai-nav-toggle{top:8px}
}
