.bmpvideo-shell,
.bmpvideo-shell * { box-sizing: border-box; }
.bmpvideo-shell { width: 100%; min-width: 0; }
.bmpvideo-shell :is(img, video, canvas, iframe) { max-width: 100%; }
.bmpvideo-shell :is(input, select, textarea) { min-width: 0; max-width: 100%; }
.bmpvideo-shell button { min-height: 40px; touch-action: manipulation; }
.bmpvideo-shell .bmv-app { width: min(100%, 1440px); min-width: 0; }
.bmpvideo-shell .bmv-card,
.bmpvideo-shell .bmv-advanced-grid > :is(aside, main),
.bmpvideo-shell .bmv-result { min-width: 0; }
.bmpvideo-shell .bmv-result { overflow: hidden; }
.bmpvideo-shell .bmv-result footer { align-items: flex-start; min-width: 0; gap: 12px; }
.bmpvideo-shell .bmv-result footer > div { flex: 1 1 0%; min-width: 0; max-width: 100%; }
.bmpvideo-shell .bmv-result footer strong,
.bmpvideo-shell .bmv-result footer small { max-width: 100%; overflow-wrap: anywhere; word-break: break-word; }
.bmpvideo-shell .bmv-result footer .bmv-result-prompt { display: block; white-space: normal; line-height: 1.55; }
.bmpvideo-shell .bmv-result footer > a { flex: 0 0 auto; }
.bmpvideo-shell .bmv-result :is(img, video) { display: block; width: 100%; height: auto; max-height: 62vh; object-fit: contain; }
.bmpvideo-shell .bmv-advanced-grid { min-width: 0; }
.bmpvideo-shell .bmv-advanced-foot { flex-wrap: wrap; }
.bmpvideo-shell .bmv-advanced-foot > span { min-width: 180px; }

@media (max-width: 1100px) {
  .bmpvideo-shell .bmv-param-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .bmpvideo-shell .bmv-advanced-grid { grid-template-columns: minmax(0, 1fr); overflow: auto; }
  .bmpvideo-shell .bmv-advanced-grid > :is(aside, main) { max-height: none; min-height: 180px; border-right: 0; border-bottom: 1px solid var(--bmv-line); }
  .bmpvideo-shell .bmv-advanced-grid > :last-child { border-bottom: 0; }
}

@media (max-width: 782px) {
  .bmpvideo-shell .bmv-app { margin: 10px auto; padding: 0 10px; }
  .bmpvideo-shell .bmv-card { padding: 14px; }
  .bmpvideo-shell .bmv-param-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bmpvideo-shell .bmv-director-row,
  .bmpvideo-shell .bmv-crew-members { grid-template-columns: minmax(0, 1fr); gap: 5px; }
  .bmpvideo-shell .bmv-guidance,
  .bmpvideo-shell .bmv-progress-body,
  .bmpvideo-shell .bmv-advanced-foot { align-items: stretch; flex-direction: column; }
  .bmpvideo-shell .bmv-advanced { height: 100dvh; min-height: 100vh; }
  .bmpvideo-shell .bmv-advanced-top { align-items: flex-start; flex-wrap: wrap; gap: 8px; padding: 10px 12px; }
  .bmpvideo-shell .bmv-advanced-top > div:last-child { flex-wrap: wrap; gap: 8px; }
  .bmpvideo-shell .bmv-my-assets__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 480px) {
  .bmpvideo-shell .bmv-app { padding: 0 7px; }
  .bmpvideo-shell .bmv-card { padding: 11px; border-radius: 11px; }
  .bmpvideo-shell .bmv-param-grid { grid-template-columns: minmax(0, 1fr); }
  .bmpvideo-shell .bmv-section-head { align-items: flex-start; flex-wrap: wrap; }
  .bmpvideo-shell .bmv-head-actions { width: 100%; flex-wrap: wrap; }
  .bmpvideo-shell .bmv-head-actions > button { flex: 1 1 auto; }
  .bmpvideo-shell .bmv-crew-tabs { overflow-x: auto; flex-wrap: nowrap; }
  .bmpvideo-shell .bmv-crew-tab { flex: 0 0 auto; min-height: 40px; }
  .bmpvideo-shell .bmv-my-assets__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bmpvideo-shell .bmv-result-grid { grid-template-columns: minmax(0, 1fr); }
  .bmpvideo-shell .bmv-my-assets__modal { padding: 8px; }
  .bmpvideo-shell .bmv-my-assets__dialog { width: 100%; max-height: calc(100dvh - 16px); }
  .bmpvideo-shell .bmv-advanced-top > div:last-child > * { max-width: 100%; }
}
