html.embed,
html.embed body {
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  overflow: hidden !important;
}

html.embed .app {
  position: fixed;
  inset: 0;
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
  overflow: hidden !important;
}

/* 汇总页已有顶栏，子页顶栏在嵌入时隐藏，画板占满剩余区域 */
html.embed .topbar {
  display: none !important;
}

html.embed .stage-wrap {
  flex: 1 1 0% !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

html.embed .canvas-shell,
html.embed .canvas-flame-wrap,
html.embed .square-canvas {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 0% !important;
  min-height: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
}

/* 生图/视频：与歌曲页一致的画布内层，避免 94vw 在 iframe 内撑出滚动条 */
html.embed .studio-center {
  position: absolute !important;
  inset: 0 !important;
  z-index: 3 !important;
  display: block !important;
  padding: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

html.embed .studio-center .block-wrap {
  position: absolute !important;
  pointer-events: auto !important;
  width: auto !important;
  max-width: min(520px, 92%) !important;
  height: auto !important;
}
