:root {
  --background: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f8faff;
  --text: #172033;
  --muted: #677086;
  --border: #dfe4ee;
  --primary: #635bff;
  --primary-dark: #4d45e6;
  --primary-soft: #eeecff;
  --success: #168a5b;
  --danger: #c33d4b;
  --shadow: 0 16px 45px rgba(32, 43, 72, 0.08);
  --radius-large: 24px;
  --radius-medium: 16px;
  --radius-small: 11px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, rgba(99, 91, 255, 0.09), transparent 30rem),
    var(--background);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  line-height: 1.5;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
label,
select {
  -webkit-tap-highlight-color: transparent;
}

button,
label[for],
.style-option {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  padding: 0 5vw;
  border-bottom: 1px solid rgba(223, 228, 238, 0.85);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 1.12rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.brand strong {
  color: var(--primary);
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: linear-gradient(145deg, #756dff, #4d45e6);
  box-shadow: 0 8px 20px rgba(99, 91, 255, 0.27);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--muted);
  font-size: 0.91rem;
  font-weight: 650;
}

.site-nav a {
  transition: color 160ms ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--text);
}

.site-nav a[aria-disabled="true"] {
  cursor: default;
}

.account-button,
.secondary-button {
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  background: white;
  font-weight: 700;
}

.account-button {
  padding: 9px 15px;
}

.page-shell {
  width: min(1040px, calc(100% - 36px));
  margin: 0 auto;
  padding: 64px 0 36px;
}

.intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 34px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 680px;
  margin-bottom: 13px;
  font-size: clamp(2.05rem, 5vw, 3.45rem);
  line-height: 1.06;
  letter-spacing: -0.05em;
}

.intro-copy {
  max-width: 650px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.video-summary {
  display: flex;
  flex-shrink: 0;
  gap: 7px;
  padding-bottom: 6px;
}

.video-summary span {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.75);
  font-size: 0.76rem;
  font-weight: 750;
}

.creation-form {
  display: grid;
  gap: 20px;
}

.form-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 22px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.step-number,
.final-step {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 13px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 0.95rem;
  font-weight: 850;
}

.step-content {
  min-width: 0;
}

.step-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.step-heading h2,
.create-card h2 {
  margin-bottom: 4px;
  font-size: 1.25rem;
  letter-spacing: -0.025em;
}

.step-heading p,
.create-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.step-status {
  flex-shrink: 0;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 0.76rem;
  font-weight: 750;
}

.upload-zone {
  display: flex;
  min-height: 205px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 28px;
  border: 2px dashed #cfd5e3;
  border-radius: var(--radius-medium);
  color: var(--muted);
  background: var(--surface-soft);
  text-align: center;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.upload-zone:hover,
.upload-zone.dragging {
  border-color: var(--primary);
  background: #f2f0ff;
}

.upload-zone.dragging {
  transform: scale(1.005);
}

.upload-zone strong {
  margin: 12px 0 2px;
  color: var(--text);
  font-size: 1rem;
}

.upload-zone span:not(.upload-icon) {
  font-size: 0.9rem;
}

.upload-zone small {
  margin-top: 9px;
  font-size: 0.75rem;
}

.upload-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--primary);
  font-size: 1.8rem;
  font-weight: 300;
  box-shadow: 0 9px 22px rgba(99, 91, 255, 0.25);
}

.image-preview-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 11px;
  margin-top: 14px;
}

.image-preview {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
}

.image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.remove-image {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: white;
  background: rgba(20, 25, 38, 0.78);
  font-size: 1rem;
}

.logo-row {
  display: flex;
  min-height: 58px;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: 13px;
}

.logo-row > div {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.logo-row strong {
  font-size: 0.87rem;
}

.logo-row span {
  color: var(--muted);
  font-size: 0.76rem;
}

.secondary-button {
  padding: 8px 13px;
  font-size: 0.8rem;
}

.file-name {
  overflow: hidden;
  max-width: 180px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-label {
  display: block;
  margin-bottom: 7px;
  font-size: 0.84rem;
  font-weight: 750;
}

.field-label span {
  color: var(--muted);
  font-weight: 500;
}

textarea,
input[type="text"],
select {
  width: 100%;
  border: 1px solid #cfd5e3;
  border-radius: var(--radius-small);
  outline: none;
  color: var(--text);
  background: white;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

textarea {
  min-height: 132px;
  padding: 14px 15px;
  resize: vertical;
}

input[type="text"],
select {
  min-height: 48px;
  padding: 0 13px;
}

textarea:focus,
input[type="text"]:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99, 91, 255, 0.11);
}

textarea::placeholder,
input::placeholder {
  color: #9ba3b5;
}

.text-meta {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.74rem;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 19px;
}

.style-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
  margin: 0;
  padding: 0;
  border: 0;
}

.style-option {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: white;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.style-option:hover {
  transform: translateY(-2px);
  border-color: #aaa4ff;
}

.style-option.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.1);
}

.style-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.style-option strong {
  margin-top: 11px;
  font-size: 0.91rem;
}

.style-option small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.style-swatch {
  display: block;
  height: 60px;
  border-radius: 10px;
}

.style-swatch.professional {
  background: linear-gradient(135deg, #172033, #5e70a4);
}

.style-swatch.energetic {
  background: linear-gradient(135deg, #ff4f73, #ffb33a);
}

.style-swatch.elegant {
  background: linear-gradient(135deg, #251a38, #a67bc5);
}

.style-swatch.simple {
  border: 1px solid #dfe4ee;
  background: linear-gradient(135deg, #ffffff, #e7ebf3);
}

.create-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 24px 28px;
  border-radius: var(--radius-large);
  color: white;
  background:
    radial-gradient(circle at 75% 20%, rgba(255, 255, 255, 0.16), transparent 18rem),
    linear-gradient(135deg, #24215b, #635bff);
  box-shadow: 0 18px 42px rgba(72, 63, 189, 0.24);
}

.create-card > div {
  display: flex;
  align-items: center;
  gap: 17px;
}

.create-card p {
  color: rgba(255, 255, 255, 0.73);
}

.final-step {
  color: white;
  background: rgba(255, 255, 255, 0.16);
}

.create-button {
  display: inline-flex;
  min-width: 210px;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 18px;
  border: 0;
  border-radius: 13px;
  color: #312b91;
  background: white;
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(22, 20, 62, 0.2);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

.create-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(22, 20, 62, 0.26);
}

.create-button:disabled {
  cursor: wait;
  opacity: 0.7;
  transform: none;
}

.field-error {
  min-height: 0;
  margin: 8px 0 0;
  color: var(--danger);
  font-size: 0.8rem;
  font-weight: 650;
}

.field-error:empty {
  display: none;
}

.form-message {
  display: none;
  padding: 14px 16px;
  border: 1px solid #a9dfc9;
  border-radius: 12px;
  color: #116841;
  background: #ecfaf4;
  font-size: 0.9rem;
  font-weight: 650;
}

.form-message.visible {
  display: block;
}

.promise-bar {
  display: flex;
  justify-content: center;
  gap: 36px;
  padding: 24px 10px 4px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 650;
}

.promise-bar span::before {
  margin-right: 7px;
  color: var(--success);
  content: "✓";
  font-weight: 900;
}

.site-footer {
  display: flex;
  width: min(1040px, calc(100% - 36px));
  justify-content: space-between;
  gap: 20px;
  margin: 30px auto 0;
  padding: 25px 0 35px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.78rem;
}

.visually-hidden {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  margin: -1px;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 820px) {
  .site-nav a:not(.active) {
    display: none;
  }

  .intro {
    align-items: flex-start;
    flex-direction: column;
  }

  .style-options {
    grid-template-columns: 1fr 1fr;
  }

  .image-preview-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .create-card {
    align-items: stretch;
    flex-direction: column;
  }

  .create-button {
    width: 100%;
  }
}

@media (max-width: 580px) {
  .site-header {
    min-height: 64px;
    padding: 0 18px;
  }

  .site-nav {
    gap: 10px;
  }

  .site-nav .active {
    display: none;
  }

  .account-button {
    padding: 8px 12px;
  }

  .page-shell {
    width: min(100% - 24px, 1040px);
    padding-top: 38px;
  }

  h1 {
    font-size: 2.25rem;
  }

  .video-summary {
    flex-wrap: wrap;
  }

  .form-card {
    grid-template-columns: 1fr;
    gap: 13px;
    padding: 20px;
    border-radius: 19px;
  }

  .step-number {
    width: 36px;
    height: 36px;
  }

  .step-heading {
    align-items: flex-start;
  }

  .upload-zone {
    min-height: 185px;
    padding: 20px 14px;
  }

  .image-preview-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .field-grid,
  .style-options {
    grid-template-columns: 1fr;
  }

  .text-meta {
    flex-direction: column;
    gap: 2px;
  }

  .style-option {
    display: grid;
    grid-template-columns: 72px 1fr;
    column-gap: 12px;
  }

  .style-swatch {
    grid-row: 1 / 3;
    width: 72px;
    height: 58px;
  }

  .style-option strong {
    align-self: end;
    margin-top: 0;
  }

  .style-option small {
    align-self: start;
  }

  .create-card {
    padding: 21px;
    border-radius: 19px;
  }

  .promise-bar,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .promise-bar {
    padding-left: 6px;
  }
}

.form-message.error {
  border-color: #efbdc3;
  color: #9f2937;
  background: #fff1f3;
}
.form-message.success-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 17px;
  margin-top: 18px;
  padding: 21px 23px;
  border: 2px solid #52c795;
  border-radius: 17px;
  color: #123f31;
  background:
    linear-gradient(
      135deg,
      #e9fff5 0%,
      #f8fffc 100%
    );
  box-shadow:
    0 14px 34px rgba(30, 139, 99, 0.17);
}

.success-mark {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background:
    linear-gradient(
      135deg,
      #209f69,
      #48d194
    );
  box-shadow:
    0 8px 20px rgba(34, 166, 111, 0.3);
  font-size: 29px;
  font-weight: 800;
  line-height: 1;
}

.success-content {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.success-title {
  color: #12392d;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.25;
}

.success-details {
  color: #21634d;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
}

.success-next {
  color: #527066;
  font-size: 13px;
  line-height: 1.4;
}
.form-message.success-popover {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 1000;
  width: min(620px, calc(100vw - 36px));
  margin: 0;
  transform: translate(-50%, -50%);
  border-width: 3px;
  box-shadow:
    0 0 0 100vmax rgba(20, 27, 48, 0.32),
    0 28px 70px rgba(20, 66, 50, 0.32);
  animation:
    success-pop-in 420ms ease-out,
    success-gentle-pulse 900ms ease-in-out 500ms;
}

@keyframes success-pop-in {
  from {
    opacity: 0;
    transform:
      translate(-50%, -44%)
      scale(0.9);
  }

  to {
    opacity: 1;
    transform:
      translate(-50%, -50%)
      scale(1);
  }
}

@keyframes success-gentle-pulse {
  0%,
  100% {
    border-color: #52c795;
  }

  50% {
    border-color: #27a873;
  }
}

@media (max-width: 600px) {
  .form-message.success-card {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 12px;
    padding: 17px;
  }

  .success-mark {
    width: 44px;
    height: 44px;
    font-size: 24px;
  }

  .success-title {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .form-message.success-popover {
    animation: none;
  }
}
.plan-review {
  display: grid;
  gap: 22px;
  margin-top: 24px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.plan-review[hidden] {
  display: none;
}

.plan-review-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.plan-review-heading > div {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.review-step {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  color: var(--primary);
  background: #eeecff;
  font-weight: 800;
}

.review-eyebrow {
  margin: 0 0 5px;
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.plan-review-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.35rem;
}

.plan-review-heading p:not(.review-eyebrow) {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.plan-badge {
  flex: 0 0 auto;
  padding: 8px 11px;
  border-radius: 999px;
  color: #116841;
  background: #e8faf2;
  font-size: 0.75rem;
  font-weight: 800;
}

.plan-scenes {
  display: grid;
  gap: 16px;
}

.scene-review-card {
  overflow: hidden;
  border: 1px solid #dce3f0;
  border-radius: 17px;
  background: #fbfcff;
}

.scene-review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 14px 16px;
  border-bottom: 1px solid #e4e9f2;
  background: #f5f7fc;
}

.scene-review-header > div {
  display: flex;
  align-items: center;
  gap: 11px;
}

.scene-review-header strong,
.scene-review-header small {
  display: block;
}

.scene-review-header small {
  margin-top: 3px;
  color: var(--muted);
  text-transform: capitalize;
}

.scene-review-number {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  color: var(--primary);
  background: #eae8ff;
  font-weight: 800;
}

.scene-approval-badge {
  padding: 6px 9px;
  border-radius: 999px;
  color: #5948cc;
  background: #ece9ff;
  font-size: 0.7rem;
  font-weight: 800;
}

.scene-review-body {
  display: grid;
  grid-template-columns: minmax(180px, 0.72fr) minmax(0, 1.28fr);
  gap: 18px;
  padding: 16px;
}

.scene-picture-column,
.scene-caption-column {
  display: grid;
  align-content: start;
  gap: 12px;
}

.scene-picture-frame {
  display: grid;
  overflow: hidden;
  min-height: 150px;
  place-items: center;
  border: 1px solid #d8dfec;
  border-radius: 13px;
  background: #07101f;
}

.scene-picture-frame img {
  display: block;
  width: 100%;
  height: 170px;
  object-fit: contain;
}

.scene-picture-column label,
.scene-caption-column label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 750;
}

.scene-picture-select,
.scene-caption-input {
  width: 100%;
  border: 1px solid #cbd5e6;
  border-radius: 10px;
  color: var(--ink);
  background: #ffffff;
  font: inherit;
}

.scene-picture-select {
  padding: 10px;
}

.scene-caption-input {
  min-height: 82px;
  padding: 12px;
  resize: vertical;
  line-height: 1.45;
}

.scene-picture-select:focus,
.scene-caption-input:focus {
  border-color: var(--primary);
  outline: 3px solid rgba(100, 83, 255, 0.13);
}

.scene-caption-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
}

.scene-caption-meta .limit-warning {
  color: #a25a00;
  font-weight: 800;
}

.scene-narration-label {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.scene-narration-text {
  margin: 0;
  padding: 12px 13px;
  border-left: 3px solid #8173ff;
  border-radius: 0 9px 9px 0;
  color: #4d5870;
  background: #f3f1ff;
  font-size: 0.82rem;
  line-height: 1.55;
}

.narrator-section {
  padding: 20px;
  border: 1px solid #dce3f0;
  border-radius: 17px;
  background: #fbfcff;
}

.narrator-section legend {
  padding: 0 7px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 800;
}

.narrator-section > p {
  margin: 0 0 15px;
  color: var(--muted);
  font-size: 0.82rem;
}

.narrator-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.narrator-option {
  position: relative;
  display: block;
  cursor: pointer;
}

.narrator-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.narrator-option span {
  display: grid;
  min-height: 88px;
  align-content: center;
  gap: 5px;
  padding: 12px;
  border: 1px solid #d7deec;
  border-radius: 12px;
  background: #ffffff;
}

.narrator-option small {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.35;
}

.narrator-option input:checked + span {
  border-color: var(--primary);
  background: #f0eeff;
  box-shadow:
    0 0 0 2px rgba(100, 83, 255, 0.12);
}

.plan-approval {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border-radius: 16px;
  color: #ffffff;
  background:
    linear-gradient(
      105deg,
      #30277c,
      #6757f5
    );
}

.plan-approval p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.77);
  font-size: 0.78rem;
}

.final-video-button {
  display: flex;
  min-width: 210px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 17px;
  border: 0;
  border-radius: 11px;
  color: #30277c;
  background: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

.final-video-button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

@media (max-width: 820px) {
  .scene-review-body {
    grid-template-columns: 1fr;
  }

  .narrator-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .plan-approval {
    align-items: stretch;
    flex-direction: column;
  }

  .final-video-button {
    width: 100%;
  }
}

@media (max-width: 580px) {
  .plan-review {
    padding: 18px;
    border-radius: 19px;
  }

  .plan-review-heading {
    flex-direction: column;
  }

  .plan-badge {
    align-self: flex-start;
  }

  .scene-review-header {
    align-items: flex-start;
  }

  .scene-approval-badge {
    display: none;
  }

  .narrator-options {
    grid-template-columns: 1fr;
  }
}
.scene-approval-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

.confirm-scene-button {
  min-width: 150px;
  padding: 11px 16px;
  border: 1px solid #6656ff;
  border-radius: 10px;
  color: #ffffff;
  background: #6656ff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 150ms ease,
    background 150ms ease,
    border-color 150ms ease;
}

.confirm-scene-button:hover {
  transform: translateY(-1px);
  background: #5142df;
}

.confirm-scene-button.approved {
  border-color: #28ad72;
  color: #12633f;
  background: #e5f8ef;
}

.scene-approval-badge.approved {
  color: #12633f;
  background: #dcf7ea;
}

.plan-status.approved {
  color: #12633f;
  font-weight: 800;
}

#final-video-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

#final-video-button:not(:disabled) {
  cursor: pointer;
  opacity: 1;
}
.scene-plan-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding: 11px 14px;
  border: 1px solid #dde4f0;
  border-radius: 12px;
  color: #56627a;
  background: #f8faff;
  font-size: 0.88rem;
  font-weight: 700;
}

.scene-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.delete-scene-button,
.undo-scene-button {
  padding: 7px 11px;
  border: 1px solid #d9a8ae;
  border-radius: 8px;
  color: #9f2937;
  background: #fff5f6;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.delete-scene-button:hover,
.undo-scene-button:hover {
  border-color: #c95765;
  background: #ffe9ec;
}

.delete-scene-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.undo-scene-button {
  border-color: #b9b1ff;
  color: #4d3ed0;
  background: #f1efff;
}

.undo-scene-button:hover {
  border-color: #7668ff;
  background: #e9e6ff;
}

@media (max-width: 640px) {
  .scene-plan-tools,
  .scene-header-actions {
    align-items: stretch;
    flex-direction: column;
  }
}
.plan-status.video-result-card {
  display: grid;
  gap: 7px;
  width: 100%;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 12px;
  color: #ffffff;
  background: rgba(17, 29, 82, 0.34);
}

.video-result-heading {
  display: block;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 900;
}

.video-result-summary {
  display: block;
  color: #ebe9ff;
  font-size: 0.82rem;
  font-weight: 700;
}

.video-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 5px;
}

.video-result-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 9px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 900;
  text-decoration: none;
}

.video-result-link:hover {
  color: #30239e;
  background: #ffffff;
}

.video-result-link.primary {
  color: #31259f;
  background: #ffffff;
}

.video-result-link.primary:hover {
  background: #eeecff;
}

@media (max-width: 640px) {
  .video-result-actions,
  .video-result-link {
    width: 100%;
  }
}
.custom-cta-field {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.custom-cta-field[hidden] {
  display: none;
}

.custom-cta-field input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #cfd8ea;
  border-radius: 9px;
  color: #111827;
  background: #ffffff;
  font: inherit;
}

.custom-cta-field input:focus {
  border-color: #6c5cff;
  outline: 3px solid rgba(108, 92, 255, 0.14);
}
.recent-projects {
  margin-bottom: 24px;
  padding: 22px;
  border: 1px solid #dfe4f2;
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff, #f7f6ff);
  box-shadow: 0 12px 32px rgba(39, 31, 107, 0.08);
}

.recent-projects[hidden] {
  display: none;
}

.recent-projects-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.recent-projects-header h2 {
  margin: 2px 0 4px;
  color: #17152b;
  font-size: 1.35rem;
}

.recent-projects-header p {
  margin: 0;
  color: #667085;
}

.clear-project-history {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid #d5dbea;
  border-radius: 9px;
  color: #4a4860;
  background: #ffffff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.clear-project-history:hover {
  border-color: #6c5cff;
  color: #4b3fd0;
}

.recent-project-list {
  display: grid;
  gap: 10px;
}

.recent-project-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid #e0e4ef;
  border-radius: 12px;
  background: #ffffff;
}

.recent-project-info {
  min-width: 0;
}

.recent-project-info strong,
.recent-project-info span {
  display: block;
}

.recent-project-info strong {
  overflow: hidden;
  color: #1c1933;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-project-info span {
  margin-top: 4px;
  color: #747188;
  font-size: 0.84rem;
}

.open-recent-project {
  min-height: 40px;
  padding: 8px 15px;
  border: 0;
  border-radius: 9px;
  color: #ffffff;
  background: #5d4ce6;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.open-recent-project:hover {
  background: #4939cf;
}

.open-recent-project:disabled {
  cursor: wait;
  opacity: 0.65;
}

.recent-project-status {
  min-height: 20px;
  margin: 12px 0 0;
  color: #5e5a73;
  font-size: 0.88rem;
  font-weight: 700;
}

.recent-project-status.error {
  color: #b42318;
}

@media (max-width: 640px) {
  .recent-projects-header,
  .recent-project-card {
    grid-template-columns: 1fr;
  }

  .recent-projects-header {
    display: grid;
  }

  .clear-project-history,
  .open-recent-project {
    width: 100%;
  }
}

/* Version 0.9.2: optional, locally hosted background music. */
.music-section { margin: 20px 0; padding: 20px; border: 1px solid #d9def0; border-radius: 16px; }
.music-section h3 { margin: 0 0 10px; }
.music-section p { color: #52617b; line-height: 1.5; }
#music-options { padding: 0; margin: 16px 0; border: 0; min-width: 0; }
.music-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 10px; }
.music-card { border: 1px solid #ccd3e8; border-radius: 10px; padding: 12px; }
.music-card:has(input:checked) { border-color: #6551ff; background: #f0edff; }
.music-card label { display: block; cursor: pointer; }
.music-card input { accent-color: #6551ff; }
.music-card small { display: block; margin-top: 8px; color: #52617b; }
.music-card button { margin-top: 12px; padding: 7px 12px; border: 1px solid #6551ff; border-radius: 6px; background: white; color: #4331bc; cursor: pointer; }
.music-card button:focus-visible, .music-card input:focus-visible { outline: 3px solid #6551ff; outline-offset: 3px; }
#music-options:disabled { opacity: .65; }
#music-preview { width: 100%; max-width: 420px; }
.music-credits { font-size: .8rem; }
.music-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

.music-volume-row { margin-top: 20px; display: grid; gap: 10px; }
.music-volume-row label { display: flex; justify-content: space-between; font-weight: 600; }
.music-volume-row input { width: 100%; accent-color: #6250ff; cursor: pointer; }
.music-volume-row small { color: #64748b; }

.recent-project-actions { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.delete-recent-project { padding: 0.65rem 0.9rem; border: 1px solid #b42318; border-radius: 8px; background: white; color: #b42318; cursor: pointer; }
.delete-recent-project:hover { background: #fff1f0; }
.delete-recent-project:disabled { opacity: 0.6; cursor: wait; }
.delete-recent-project:focus-visible { outline: 3px solid #6554ff; outline-offset: 3px; }
