.composer-settings {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 2px;
}

.settings-label {
  color: var(--neutral-400);
  font-size: 12px;
  font-weight: 600;
}

.segmented-control {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(148,163,184,.2);
  border-radius: 12px;
  background: var(--neutral-100);
}

.segmented-control button {
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--neutral-600);
  cursor: pointer;
  font-weight: 600;
}

.segmented-control button.is-selected {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(11,18,32,.07);
}

.segmented-control button:disabled,
.tool-button:disabled {
  cursor: wait;
  opacity: .56;
}

.pipeline-section,
.review-section {
  width: min(calc(100% - 48px), 980px);
  margin: 0 auto 72px;
}

.pipeline-panel,
.review-panel {
  padding: 30px;
  border: 1px solid rgba(148,163,184,.2);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.94);
  box-shadow: var(--shadow-soft);
}

.pipeline-panel h2,
.review-panel h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -.025em;
}

.pipeline-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 26px;
}

.pipeline-step {
  min-height: 112px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  border: 1px solid rgba(148,163,184,.18);
  border-radius: 16px;
  background: var(--off-white);
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.pipeline-step > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--neutral-200);
  color: var(--neutral-600);
  font-size: 12px;
  font-weight: 800;
}

.pipeline-step strong {
  margin-top: 4px;
  font-size: 13px;
}

.pipeline-step small {
  color: var(--neutral-400);
  font-size: 10px;
}

.pipeline-step.is-active {
  transform: translateY(-2px);
  border-color: rgba(16,185,129,.45);
  background: rgba(16,185,129,.055);
}

.pipeline-step.is-active > span {
  background: var(--green);
  color: #fff;
}

.pipeline-step.is-complete {
  border-color: rgba(16,185,129,.2);
  background: rgba(16,185,129,.035);
}

.pipeline-step.is-complete > span {
  background: rgba(16,185,129,.13);
  color: var(--green-strong);
}

.pipeline-step.is-error {
  border-color: rgba(180,35,24,.28);
  background: rgba(180,35,24,.035);
}

.pipeline-step.is-error > span {
  background: rgba(180,35,24,.1);
  color: var(--danger);
}

.pipeline-message {
  min-height: 25px;
  margin: 18px 0 0;
  color: var(--neutral-600);
  font-size: 14px;
}

.review-panel {
  background:
    radial-gradient(circle at 0 0, rgba(16,185,129,.08), transparent 24rem),
    var(--ink);
  color: #fff;
}

.review-request {
  max-width: 760px;
  margin: 12px 0 0;
  color: #D7E0EA;
  font-size: 17px;
  line-height: 1.8;
}

.review-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 24px 0;
}

.review-meta > div {
  min-width: 118px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  background: rgba(255,255,255,.05);
}

.review-meta dt {
  color: #8FA2B7;
  font-size: 10px;
}

.review-meta dd {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 700;
}

.review-assets {
  padding: 16px 0;
  border-top: 1px solid rgba(255,255,255,.08);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.review-assets h3 {
  margin: 0 0 10px;
  font-size: 13px;
}

#reviewAssetList {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.review-asset-chip {
  padding: 7px 9px;
  border-radius: 9px;
  background: rgba(255,255,255,.07);
  color: #D7E0EA;
  font-size: 11px;
}

.review-note {
  color: #9FB0C3;
  font-size: 12px;
  line-height: 1.75;
}

.review-panel .secondary-button {
  color: #fff;
  border-color: rgba(255,255,255,.15);
  background: rgba(255,255,255,.07);
}

@media (max-width: 860px) {
  .pipeline-section,
  .review-section {
    width: min(calc(100% - 28px), 980px);
  }

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

  .pipeline-step:last-child {
    grid-column: span 2;
  }
}

@media (max-width: 560px) {
  .composer-settings {
    justify-content: space-between;
  }

  .pipeline-panel,
  .review-panel {
    padding: 22px;
    border-radius: 20px;
  }

  .pipeline-steps {
    display: flex;
    flex-direction: column;
  }

  .pipeline-step {
    min-height: auto;
    display: grid;
    grid-template-columns: 34px 1fr auto;
    align-items: center;
  }

  .pipeline-step strong { margin: 0; }
  .pipeline-step:last-child { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .pipeline-step { transform: none !important; }
}


.auth-gate {
  width: min(calc(100% - 48px), 980px);
  margin: 28px auto 0;
}

.auth-gate-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px 24px;
  align-items: center;
  padding: 22px 24px;
  border: 1px solid rgba(148,163,184,.2);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.88);
  box-shadow: var(--shadow-soft);
}

.auth-gate-panel h2 {
  margin: 0;
  font-size: 21px;
  letter-spacing: -.02em;
}

.auth-gate-panel p {
  margin: 8px 0 0;
  color: var(--neutral-600);
  line-height: 1.7;
  font-size: 13px;
}

.auth-gate-note {
  grid-column: 1 / -1;
  min-height: 20px;
  margin: 0 !important;
  color: var(--neutral-400) !important;
}

.primary-button {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 13px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
}

.primary-button:hover { background: var(--green-strong); }

.creative-summary {
  margin: 24px 0 0;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  background: rgba(255,255,255,.045);
}

.creative-summary-label {
  margin: 0 0 8px;
  color: #8FA2B7;
  font-size: 11px;
  font-weight: 700;
}

.creative-summary-goal {
  margin: 0;
  color: #F8FAFC;
  line-height: 1.8;
  font-size: 15px;
}

.creative-summary-spec {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.creative-summary-spec span {
  padding: 7px 9px;
  border-radius: 9px;
  background: rgba(255,255,255,.07);
  color: #D7E0EA;
  font-size: 11px;
}

.quote-summary {
  margin: 18px 0 0;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 16px;
  border-radius: 14px;
  background: rgba(16,185,129,.1);
  border: 1px solid rgba(16,185,129,.18);
}

.quote-summary span,
.quote-summary small {
  color: #A7C8BE;
  font-size: 11px;
}

.quote-summary strong {
  grid-row: span 2;
  align-self: center;
  font-size: 18px;
}

@media (max-width: 560px) {
  .auth-gate {
    width: min(calc(100% - 28px), 980px);
    margin-top: 16px;
  }

  .auth-gate-panel {
    grid-template-columns: 1fr;
    padding: 18px;
  }

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


.review-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 18px;
}

.action-status {
  color: #9FB0C3;
  font-size: 12px;
  line-height: 1.6;
}

.generation-section,
.result-section {
  width: min(calc(100% - 48px), 980px);
  margin: 0 auto 72px;
}

.generation-panel {
  min-height: 440px;
  padding: 44px;
  display: grid;
  grid-template-columns: minmax(280px, .9fr) 1.1fr;
  gap: 48px;
  align-items: center;
  overflow: hidden;
  border-radius: 30px;
  background:
    radial-gradient(circle at 25% 30%, rgba(20,184,166,.13), transparent 22rem),
    radial-gradient(circle at 85% 70%, rgba(16,185,129,.09), transparent 20rem),
    var(--ink);
  color: #fff;
  box-shadow: 0 28px 80px rgba(11,18,32,.2);
}

.generation-stage {
  min-height: 300px;
  position: relative;
  perspective: 900px;
}

.generation-frame {
  width: min(72%, 220px);
  aspect-ratio: 9 / 16;
  position: absolute;
  inset: 50% auto auto 50%;
  border: 1px solid rgba(94,234,212,.18);
  border-radius: 24px;
  background:
    linear-gradient(155deg, rgba(20,184,166,.08), rgba(16,185,129,.025)),
    rgba(255,255,255,.025);
  box-shadow: 0 22px 60px rgba(0,0,0,.2);
  transform-origin: center;
}

.generation-frame-back {
  transform: translate(-64%, -52%) rotateY(18deg) translateZ(-110px);
  opacity: .36;
}

.generation-frame-mid {
  transform: translate(-51%, -50%) rotateY(8deg) translateZ(-45px);
  opacity: .62;
}

.generation-frame-front {
  transform: translate(-38%, -48%) rotateY(-4deg) translateZ(25px);
}

.generation-frame-front::after {
  content: "";
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: 16%;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #0F766E, var(--green), #5EEAD4);
}

.generation-copy h2,
.result-panel h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.15rem);
  letter-spacing: -.035em;
}

.generation-copy > p:not(.eyebrow):not(.generation-percent) {
  margin: 14px 0 0;
  color: #C3D0DC;
  font-size: 16px;
}

.generation-progress {
  height: 5px;
  margin-top: 28px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
}

.generation-progress span {
  width: 0;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, #0F766E, var(--green), #5EEAD4);
  transition: width .35s ease;
}

.generation-percent {
  min-height: 22px;
  margin: 8px 0 0;
  color: #8FA2B7;
  font-size: 12px;
}

.result-panel {
  padding: 40px;
  border: 1px solid rgba(148,163,184,.18);
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.result-panel #resultStatus {
  color: var(--neutral-600);
  line-height: 1.75;
}

.result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}

.result-meta span {
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--neutral-100);
  color: var(--neutral-600);
  font-size: 12px;
}

@media (max-width: 760px) {
  .generation-section,
  .result-section {
    width: min(calc(100% - 28px), 980px);
  }

  .generation-panel {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 28px 22px;
  }

  .generation-stage {
    min-height: 230px;
  }

  .review-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .review-actions .primary-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .generation-progress span { transition: none; }
  .generation-frame-back { transform: translate(-62%, -52%); }
  .generation-frame-mid { transform: translate(-50%, -50%); }
  .generation-frame-front { transform: translate(-38%, -48%); }
}


.auth-gate-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.auth-dialog {
  width: min(92vw, 430px);
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: transparent;
  color: var(--ink);
}

.auth-dialog::backdrop {
  background: rgba(11,18,32,.52);
  backdrop-filter: blur(8px);
}

.auth-dialog-card {
  position: relative;
  padding: 26px;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 30px 90px rgba(11,18,32,.24);
}

.auth-dialog-card h2 {
  margin: 0;
  font-size: 26px;
  letter-spacing: -.025em;
}

.auth-subtitle {
  margin: 8px 0 20px;
  color: var(--neutral-600);
  line-height: 1.7;
  font-size: 13px;
}

.auth-close {
  position: absolute;
  left: 16px;
  top: 16px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: var(--neutral-100);
  cursor: pointer;
  font-size: 20px;
}

.google-button {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(148,163,184,.28);
  border-radius: 13px;
  background: #fff;
  cursor: pointer;
  font-weight: 700;
}

.auth-divider {
  position: relative;
  margin: 18px 0;
  text-align: center;
  color: var(--neutral-400);
  font-size: 11px;
}

.auth-divider::before {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  height: 1px;
  background: var(--neutral-200);
}

.auth-divider span {
  position: relative;
  padding: 0 10px;
  background: var(--surface);
}

.auth-field {
  display: grid;
  gap: 7px;
  margin-top: 13px;
  color: var(--neutral-600);
  font-size: 12px;
  font-weight: 600;
}

.auth-field input {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid rgba(148,163,184,.3);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  outline: 0;
}

.auth-field input:focus {
  border-color: rgba(16,185,129,.5);
  box-shadow: 0 0 0 4px rgba(16,185,129,.08);
}

.auth-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-top: 16px;
  padding: 4px;
  border-radius: 12px;
  background: var(--neutral-100);
}

.auth-mode-tabs button {
  min-height: 36px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--neutral-600);
  cursor: pointer;
  font-weight: 700;
}

.auth-mode-tabs button.is-active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(11,18,32,.07);
}

.auth-submit {
  width: 100%;
  margin-top: 14px;
}

.auth-feedback {
  min-height: 22px;
  margin: 10px 0 0;
  color: var(--neutral-600);
  font-size: 12px;
  line-height: 1.6;
}

.auth-feedback.is-error {
  color: var(--danger);
}

.auth-feedback.is-success {
  color: var(--green-strong);
}
