
.carousel-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.15rem;
}
.carousel-modal.hidden { display: none !important; }
.carousel-dialog {
  width: min(1220px, 96vw);
  max-height: 93vh;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.carousel-embedded-shell {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.carousel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.2rem;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
  flex-wrap: wrap;
}
.carousel-head-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: #0f172a;
  margin: 0;
}
.carousel-platforms {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.carousel-plat-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #334155;
  border-radius: 999px;
  padding: 0.34rem 0.82rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.14s ease;
}
.carousel-plat-btn:hover { background: #f8fafc; border-color: #cbd5e1; }
.carousel-plat-btn.active {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1e3a8a;
}
.carousel-body {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(330px, 0.85fr);
  min-height: 0;
  flex: 1;
  overflow: hidden;
}
.carousel-embedded-shell .carousel-body { min-height: 650px; }
@media (max-width: 920px) {
  .carousel-body { grid-template-columns: 1fr; overflow-y: auto; }
}
.carousel-stage-pane {
  background: #f8fafc;
  border-right: 1px solid #e2e8f0;
  padding: 0.9rem 1.15rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  min-height: 0;
  overflow: hidden;
}
.carousel-canvas-wrap {
  width: 100%;
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0;
}
#carouselPreviewCanvas {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
  background: #ffffff;
  display: block;
}
.carousel-storyboard-grid {
  width: 100%;
  flex: 1 1 0;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.75rem;
  align-content: start;
  overflow-y: auto;
  padding: 0.25rem;
}
.carousel-storyboard-grid.hidden { display: none !important; }
.carousel-sb-card {
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  cursor: pointer;
  padding: 0;
  transition: border-color 0.14s ease, transform 0.12s ease;
}
.carousel-sb-card:hover { border-color: #93c5fd; transform: translateY(-2px); }
.carousel-sb-card.active { border-color: #2563eb; box-shadow: 0 6px 18px rgba(37, 99, 235, 0.18); }
.carousel-sb-card canvas { width: 100%; height: auto; display: block; }
.carousel-bible-note {
  font-size: 0.77rem;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.5rem 0.7rem;
  line-height: 1.4;
}
.carousel-filmstrip {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  overflow-x: auto;
  padding-bottom: 0.2rem;
}
.carousel-thumb {
  flex: 0 0 auto;
  min-width: 98px;
  max-width: 132px;
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  border-radius: 10px;
  padding: 0.4rem 0.55rem;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: border-color 0.14s ease, background 0.14s ease;
}
.carousel-thumb:hover { border-color: #93c5fd; }
.carousel-thumb.active { border-color: #2563eb; background: #eff6ff; }
.carousel-thumb-num {
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}
.carousel-thumb-txt {
  font-size: 0.74rem;
  font-weight: 500;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.12rem;
}
.carousel-editor-pane {
  padding: 1.1rem 1.25rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: #ffffff;
}
.carousel-section-box {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.carousel-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
}
.carousel-input, .carousel-select, .carousel-textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 0.5rem 0.7rem;
  font-family: var(--font-sans);
  font-size: 0.86rem;
  color: #0f172a;
  background: #ffffff;
}
.carousel-textarea { resize: vertical; min-height: 60px; line-height: 1.45; }
.carousel-input:focus, .carousel-select:focus, .carousel-textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.carousel-style-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.42rem;
}
.carousel-style-pill {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.45rem 0.65rem;
  background: #ffffff;
  color: #1e293b;
  font-size: 0.79rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.14s ease;
}
.carousel-style-pill:hover { border-color: #93c5fd; background: #f8fafc; }
.carousel-style-pill.active {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1e3a8a;
}
.carousel-theme-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.carousel-theme-pill {
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 0.28rem 0.68rem;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  background: #ffffff;
  color: #334155;
}
.carousel-theme-pill.active {
  border-color: #2563eb;
  background: #dbeafe;
  color: #1e3a8a;
}
.carousel-caption-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.78rem 0.88rem;
}
.carousel-tweak-details {
  border-top: 1px solid #e2e8f0;
  padding-top: 0.75rem;
}
.carousel-tweak-details summary {
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.carousel-format-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.carousel-format-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 40px;
  padding: 0.42rem 0.88rem;
  border-radius: 999px;
  border: 1.5px solid #93c5fd;
  background: #dbeafe;
  color: #1e3a8a;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 140ms ease, border-color 140ms ease;
}
.carousel-format-trigger:hover { background: #bfdbfe; border-color: #60a5fa; }
.carousel-picker-backdrop {
  position: fixed;
  inset: 0;
  z-index: 140;
  background: rgba(15, 23, 42, 0.42);
}
.carousel-picker-backdrop.hidden { display: none !important; }
.carousel-format-picker {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 150;
  width: 340px;
  max-width: calc(100vw - 2rem);
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.22);
  padding: 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.carousel-format-picker.hidden { display: none !important; }
.carousel-format-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0.55rem 0.5rem;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 0.2rem;
}
.carousel-format-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  width: 100%;
  min-height: 54px;
  padding: 0.6rem 0.78rem;
  border: 1.5px solid transparent;
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: background 120ms ease, border-color 120ms ease;
}
.carousel-format-option:hover { background: #f8fafc; border-color: #e2e8f0; }
.carousel-format-option.active {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1e3a8a;
}
.carousel-format-opt-title {
  font-size: 0.9rem;
  font-weight: 700;
  display: block;
}
.carousel-format-opt-sub {
  font-size: 0.76rem;
  color: #475569;
  display: block;
  margin-top: 0.1rem;
}
@media (max-width: 920px) {
  .carousel-head { padding: 0.7rem 0.85rem; gap: 0.5rem; }
  .carousel-format-picker {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 20px 20px 0 0;
    padding: 0.85rem 0.9rem 1.35rem;
    box-shadow: 0 -16px 48px rgba(15, 23, 42, 0.26);
    animation: slideUpSheet 180ms cubic-bezier(0.16, 1, 0.3, 1);
  }
  .carousel-format-option { min-height: 58px; padding: 0.7rem 0.85rem; }
}
@keyframes slideUpSheet {
  from { transform: translateY(24px); opacity: 0.6; }
  to { transform: translateY(0); opacity: 1; }
}
.carousel-export-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.85rem 1.2rem;
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
  flex-wrap: wrap;
}
