.create-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(250, 250, 250, 0.94);
  backdrop-filter: blur(18px);
  overflow-y: auto;
}

.create-overlay.show { display: grid; }

.create-modal {
  width: min(520px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  display: grid;
  gap: 18px;
  border: 1px solid rgba(32, 197, 168, 0.18);
  border-radius: 18px;
  background:
    radial-gradient(circle at 8% 0%, rgba(32, 197, 168, 0.12), transparent 34%),
    radial-gradient(circle at 100% 22%, rgba(255, 204, 77, 0.12), transparent 36%),
    linear-gradient(180deg, #ffffff 0%, #fbfffc 42%, #fffdf8 100%);
  padding: clamp(20px, 5vw, 28px);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.18);
  animation: modal-pop 0.38s cubic-bezier(0.2, 0.9, 0.2, 1.15) both;
}

.create-modal.ready {
  width: min(760px, 100%);
}

.create-modal.form {
  width: min(760px, 100%);
}

.form-stage {
  position: relative;
  display: none;
  gap: 16px;
}

.create-modal.form .form-stage {
  display: grid;
}

.modal-close {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1);
}

.create-modal.form .build-mark,
.create-modal.form > .build-copy,
.create-modal.form .build-pills,
.create-modal.form .progress-card,
.create-modal.form .result-card {
  display: none;
}

.build-mark {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background:
    conic-gradient(from var(--spin, 0deg), var(--sun), var(--coral), var(--blue), var(--mint), var(--sun));
  color: #fff;
  font-size: 2.2rem;
  font-weight: 950;
  box-shadow: inset 0 0 0 7px #fff, 0 18px 34px rgba(0, 0, 0, 0.18);
  animation: spin-card 1.9s linear infinite, build-bounce 1.4s ease-in-out infinite;
}

.build-copy {
  display: grid;
  gap: 6px;
}

.create-modal.ready .build-mark,
.create-modal.ready .build-copy,
.create-modal.ready .build-pills,
.create-modal.ready .progress-card,
.create-modal.ready .form-stage {
  display: none;
}

.create-modal.ready .result-card {
  display: grid;
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  animation: ready-in 0.32s ease both;
}

.build-copy h2 {
  font-size: clamp(1.9rem, 5vw, 3rem);
}

.build-copy p {
  color: var(--muted);
  font-weight: 720;
}

.build-pills {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.build-pill {
  min-height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7f7f7;
  font-size: 0.78rem;
  font-weight: 880;
  text-transform: uppercase;
}

.build-pill:nth-child(1) { border-color: rgba(255, 204, 77, 0.42); background: rgba(255, 204, 77, 0.14); }
.build-pill:nth-child(2) { border-color: rgba(39, 100, 255, 0.24); background: rgba(39, 100, 255, 0.08); }
.build-pill:nth-child(3) { border-color: rgba(32, 197, 168, 0.34); background: rgba(32, 197, 168, 0.1); }

@property --spin {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

@keyframes spin-card {
  to { --spin: 360deg; }
}

@keyframes build-bounce {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-6px) rotate(2deg); }
}

@keyframes shimmer {
  from { transform: translateX(-110%); }
  to { transform: translateX(110%); }
}

@keyframes modal-pop {
  from { transform: translateY(16px) scale(0.96); }
  to { transform: translateY(0) scale(1); }
}

@keyframes ready-in {
  from { transform: translateY(10px); }
  to { transform: translateY(0); }
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes phone-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes phone-sheen {
  0% { opacity: 0; transform: translateX(-75%); }
  22% { opacity: 1; }
  100% { opacity: 0; transform: translateX(75%); }
}

@keyframes hero-drift-out {
  0% { opacity: 1; transform: scale(1); filter: saturate(1); }
  100% { opacity: 0.2; transform: scale(1.045) translateY(-6px); filter: saturate(0.92); }
}

@keyframes hero-drift-in {
  0% { opacity: 0; transform: scale(1.08) translateY(10px); filter: saturate(0.9) blur(3px); }
  46% { opacity: 1; filter: saturate(1.05) blur(0); }
  100% { opacity: 1; transform: scale(1); filter: saturate(1); }
}

@keyframes content-slide-in {
  0% { opacity: 0; transform: translateY(12px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes tile-cascade {
  0% { transform: translateY(14px) rotateX(10deg) scale(0.97); filter: saturate(0.94) brightness(0.94); }
  100% { transform: translateY(0) rotateX(0) scale(1); filter: saturate(1) brightness(1); }
}

@keyframes dot-load {
  0% { transform: scaleX(0); }
  100% { transform: scaleX(1); }
}

.view-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.38fr);
  gap: 22px;
  align-items: start;
  padding: 28px 0 64px;
}

.source-hero {
  position: relative;
  min-height: 540px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(140deg, #eef4f1 0%, #cfdad5 38%, #8c9b94 68%, #38413d 100%),
    var(--card);
  overflow: hidden;
}

.source-hero.no-image {
  background:
    linear-gradient(180deg, rgba(17, 17, 17, 0), rgba(17, 17, 17, 0.52)),
    linear-gradient(125deg, #f7f1df 0%, #dce8e2 34%, #9eaaa3 67%, #333c38 100%);
}

.source-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.source-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.08) 58%, rgba(0, 0, 0, 0.38)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.72));
}

.source-hero-text {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  z-index: 2;
  color: var(--card);
}
