
.bmpvideo-shell .bmv-app {
  min-width: 0;
}

.bmpvideo-shell .bmv-topbar,
.bmpvideo-shell.bmpcenter-theme .bmv-topbar {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(360px, 1.15fr);
  align-items: center;
  gap: clamp(16px, 3vw, 30px);
}

.bmpvideo-shell .bmv-brand {
  min-width: 0;
}

.bmpvideo-shell .bmv-brand h1 {
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.bmpvideo-shell .bmv-brand p {
  margin: 5px 0 0;
  color: var(--bmp-text-meta, #c9daf2);
  font-size: 13px;
}

.bmpvideo-shell .bmv-topbar .bmv-project-controls {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
  width: 100%;
  max-width: 720px;
  min-width: 0;
  margin-left: auto;
}

.bmpvideo-shell .bmv-project-controls > .bmv-project-status {
  width: auto;
  margin: 0;
  justify-self: end;
  color: var(--bmp-text-meta, #687789);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-align: right;
}

.bmpvideo-shell .bmv-project-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: end;
  gap: 10px;
  min-width: 0;
}

.bmpvideo-shell .bmv-project-title-field {
  display: grid;
  gap: 5px;
  min-width: 0;
  margin: 0;
}

.bmpvideo-shell .bmv-project-title-field > span,
.bmpvideo-shell .bmv-project-search > span {
  display: block;
  margin: 0;
  color: var(--bmp-text-meta, #687789);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.bmpvideo-shell .bmv-project-title-field input[data-field="title"] {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 9px 12px;
  border-color: var(--bmp-border-color, #cfc6a8);
  border-radius: 10px;
  background: var(--bmp-bg-soft, #f6f1dc);
  color: var(--bmp-text, #2c2718);
}

.bmpvideo-shell .bmv-project-picker {
  position: relative;
  min-width: 0;
}

.bmpvideo-shell .bmv-project-picker-trigger,
.bmpvideo-shell .bmv-new-project {
  min-height: 42px;
  white-space: nowrap;
}

.bmpvideo-shell .bmv-project-picker-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 142px;
}

.bmpvideo-shell .bmv-project-picker-trigger[aria-expanded="true"] > span {
  transform: rotate(180deg);
}

.bmpvideo-shell .bmv-project-picker-trigger > span {
  display: inline-block;
  margin: 0;
  color: inherit;
  font-size: 12px;
  transition: transform 160ms ease;
}

.bmpvideo-shell .bmv-project-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-sizing: border-box;
  width: min(420px, calc(100vw - 32px));
  min-width: 0;
  max-height: min(440px, calc(100vh - 36px));
  overflow: hidden;
  padding: 12px;
  border: 1px solid var(--bmp-border-color, #cfc6a8);
  border-radius: 14px;
  background: var(--bmp-bg-soft, #f6f1dc);
  box-shadow: 0 18px 44px rgba(32, 28, 14, 0.22);
}

.bmpvideo-shell .bmv-project-search {
  display: grid;
  flex: 0 0 auto;
  gap: 5px;
  min-width: 0;
  margin: 0;
}

.bmpvideo-shell .bmv-project-search input[data-project-search] {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 9px 12px;
  border-color: var(--bmp-border-color, #cfc6a8);
  border-radius: 10px;
  background: var(--bmp-surface, #fff);
  color: var(--bmp-text, #2c2718);
}

.bmpvideo-shell .bmv-project-list {
  display: grid;
  flex: 1 1 auto;
  gap: 7px;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.bmpvideo-shell .bmv-project-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
  padding: 4px;
  border: 1px solid var(--bmp-border-color, #d7d1b8);
  border-radius: 10px;
  background: var(--bmp-surface, #fff);
}

.bmpvideo-shell .bmv-project-row[hidden] {
  display: none !important;
}

.bmpvideo-shell .bmv-project-row .bmv-project-select {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 4px;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 56px;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  text-align: left;
}

.bmpvideo-shell .bmv-project-row .bmv-project-select b,
.bmpvideo-shell .bmv-project-row .bmv-project-select small {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.bmpvideo-shell .bmv-project-row .bmv-project-select b {
  font-size: 14px;
  line-height: 1.35;
}

.bmpvideo-shell .bmv-project-row .bmv-project-select small {
  color: var(--bmp-text-meta, #687789);
  font-size: 12px;
  line-height: 1.35;
}

.bmpvideo-shell .bmv-project-row .bmv-project-delete {
  align-self: center;
  box-sizing: border-box;
  min-width: 64px;
  min-height: 38px;
  padding: 7px 10px;
  white-space: nowrap;
}

.bmpvideo-shell .bmv-project-picker-trigger:focus-visible,
.bmpvideo-shell .bmv-new-project:focus-visible,
.bmpvideo-shell .bmv-project-search input:focus-visible,
.bmpvideo-shell .bmv-project-title-field input:focus-visible,
.bmpvideo-shell .bmv-project-row button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--bmp-primary, #2457e6) 35%, transparent);
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .bmpvideo-shell .bmv-topbar,
  .bmpvideo-shell.bmpcenter-theme .bmv-topbar {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .bmpvideo-shell .bmv-topbar .bmv-project-controls {
    max-width: none;
    margin-left: 0;
  }
}

@media (max-width: 640px) {
  .bmpvideo-shell .bmv-topbar,
  .bmpvideo-shell.bmpcenter-theme .bmv-topbar {
    padding: 18px;
  }

  .bmpvideo-shell .bmv-project-actions {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .bmpvideo-shell .bmv-project-title-field {
    grid-column: 1 / -1;
  }

  .bmpvideo-shell .bmv-project-picker,
  .bmpvideo-shell .bmv-project-picker-trigger {
    width: 100%;
  }

  .bmpvideo-shell .bmv-project-controls > .bmv-project-status {
    justify-self: start;
    text-align: left;
  }
}

@media (max-width: 420px) {
  .bmpvideo-shell .bmv-topbar,
  .bmpvideo-shell.bmpcenter-theme .bmv-topbar {
    padding: 14px;
  }

  .bmpvideo-shell .bmv-project-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .bmpvideo-shell .bmv-project-title-field,
  .bmpvideo-shell .bmv-project-picker,
  .bmpvideo-shell .bmv-new-project {
    grid-column: 1;
    width: 100%;
  }

  .bmpvideo-shell .bmv-new-project {
    white-space: normal;
  }
}

.bmpvideo-shell .bmv-generation-sequence{display:flex;align-items:center;gap:10px;margin:0 0 12px;padding:11px 13px;border:1px solid var(--bmv-line,#d7e1ec);border-radius:10px;background:var(--bmv-soft,#f6f9fc)}
.bmpvideo-shell .bmv-generation-sequence__index{flex:0 0 auto;color:var(--bmv-teal,#11746b);font-size:12px;font-weight:800}
.bmpvideo-shell .bmv-generation-sequence__hint{min-width:0;color:var(--bmv-muted,#687789);font-size:12px;line-height:1.55}
.bmpvideo-shell .bmv-batch-progress{display:grid;gap:7px;margin-top:11px}
.bmpvideo-shell .bmv-batch-progress>strong{font-size:12px}
.bmpvideo-shell .bmv-batch-progress article{display:grid;grid-template-columns:10px minmax(0,1fr);align-items:start;gap:9px;padding:9px 11px;border:1px solid var(--bmv-line,#d7e1ec);border-radius:8px;background:var(--bmv-paper,#fff)}
.bmpvideo-shell .bmv-batch-progress article>div{min-width:0}
.bmpvideo-shell .bmv-batch-progress__head{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0}
.bmpvideo-shell .bmv-batch-progress__head b{min-width:0}
.bmpvideo-shell .bmv-batch-progress article b,.bmpvideo-shell .bmv-batch-progress article small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bmpvideo-shell .bmv-batch-progress article small{margin-top:2px;color:var(--bmv-muted,#687789);font-size:11px}
.bmpvideo-shell .bmv-batch-progress article small.is-error{color:#9d302b;font-weight:700;white-space:pre-wrap;overflow-wrap:anywhere}
.bmpvideo-shell .bmv-progress-detail.is-error{color:#9d302b;font-weight:700;white-space:pre-wrap;overflow-wrap:anywhere}
.bmpvideo-shell .bmv-batch-progress__head .bmv-batch-percent{flex:0 0 auto;margin:0;font-size:11px;font-weight:700;color:var(--bmv-muted,#687789)}
.bmpvideo-shell .bmv-batch-progress__bar{height:6px;margin-top:7px;overflow:hidden;border-radius:999px;background:var(--bmp-lightest,#f5f2df)}
.bmpvideo-shell .bmv-batch-progress__bar i{display:block;height:100%;border-radius:inherit;background:var(--bmp-darkest,#55533b);transition:width .35s ease}
.bmpvideo-shell .bmv-result-prompt{display:block;max-width:100%;white-space:normal!important;overflow-wrap:anywhere;word-break:break-word}
@media(max-width:600px){.bmpvideo-shell .bmv-generation-sequence{align-items:flex-start;flex-direction:column;gap:3px}}
