@import url("https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap");

* {
  box-sizing: border-box;
  overscroll-behavior: contain;
}

body {
  margin: 0;
  font-family: "Poppins", "Segoe UI", Tahoma, sans-serif;
  background: #fff6f8;
  color: #2a1b21;
  min-height: 100vh;
  line-height: 1.6;
  overscroll-behavior: none;
}

body.modal-locked {
  overflow: hidden;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.site-brand {
  text-align: center;
  margin: 1.2rem 0 0.6rem;
}

.site-brand img {
  width: 420px;
  max-width: 90vw;
  filter: drop-shadow(0 6px 22px rgba(234, 110, 137, 0.3));
}

.heart-background {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  filter: saturate(0.95) brightness(1);
}

.hero-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, rgba(234, 110, 137, 0.08), rgba(255, 255, 255, 0.9));
  z-index: -1;
}

.page-content {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 3rem;
  padding: 4rem 2rem 6rem;
}

.section-shell {
  width: min(900px, 100%);
}

.journey-step {
  display: none;
}

.journey-step.is-active {
  display: block;
}

.quiz__card,
.bridge__card {
  background: #ffffff;
  border: 1px solid rgba(234, 110, 137, 0.15);
  border-radius: 20px;
  box-shadow: 0 22px 60px rgba(234, 110, 137, 0.12);
}

.quiz__card {
  padding: 2.5rem;
}

.bridge__card {
  padding: 2.5rem;
}

.bridge__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2a1b21;
  margin: 0;
}

.bridge__list {
  list-style: none;
  padding-left: 1rem;
  margin: 0 0 0.5rem;
  color: #5c3a45;
}

.bridge__list li::before {
  content: "•";
  color: #ea6e89;
  margin-right: 0.35rem;
}

.bridge__list--icons li::before {
  content: "";
  margin-right: 0;
}

.bridge__cta-lead {
  font-weight: 700;
  color: #ea6e89;
  margin: 1rem 0 0;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bridge__cta {
  align-self: flex-end;
  margin-top: 0.5rem;
  background: linear-gradient(130deg, #ea6e89, #f3a2b5);
  border: none;
  color: #fff;
  padding: 0.9rem 1.5rem;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 15px 40px rgba(234, 110, 137, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bridge__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 45px rgba(234, 110, 137, 0.35);
}

.bridge__cta--ghost {
  background: transparent;
  border: 1px solid rgba(234, 110, 137, 0.35);
  color: #ea6e89;
  box-shadow: none;
}

.bridge__cta:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  filter: saturate(0.6);
}

.bridge__nav {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.bridge__cta--primary {
  border: none;
  background: linear-gradient(130deg, #ea6e89, #f3a2b5);
  box-shadow: 0 15px 40px rgba(234, 110, 137, 0.3);
}

.bridge__cta.is-hidden {
  display: none !important;
}

.quiz__header {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 2rem;
  text-align: center;
  color: #5c3a45;
}

.quiz__lead-image {
  width: min(680px, 90vw);
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.quiz__progress {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.quiz__progress-track {
  width: 100%;
  height: 6px;
  background: rgba(234, 110, 137, 0.15);
  border-radius: 999px;
  overflow: hidden;
}

.quiz__progress-bar {
  display: block;
  height: 100%;
  width: 20%;
  background: linear-gradient(130deg, #ea6e89, #f3a2b5);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.quiz__form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.quiz-step {
  display: none;
  animation: fadeIn 0.4s ease;
}

.quiz-step.is-active {
  display: block;
}

.quiz-step h3 {
  margin: 0 0 2rem;
  font-size: 1.45rem;
  text-align: start;
}

.quiz-step__subtitle {
  margin: 0 0 1rem;
  color: #7c5c68;
}

.quiz-step--template {
  text-align: center;
}

.template-picker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem auto 2rem;
  max-width: 420px;
}

.template-picker__select {
  border: none;
  background: linear-gradient(130deg, #ea6e89, #f3a2b5);
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 1rem 1.5rem;
  border-radius: 16px;
  cursor: pointer;
  width: 100%;
  box-shadow: 0 18px 45px rgba(234, 110, 137, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.template-picker__select:hover {
  transform: translateY(-2px);
  box-shadow: 0 25px 55px rgba(234, 110, 137, 0.35);
}

.template-picker__select.is-hidden {
  display: none;
}

.template-picker__preview {
  width: 100%;
  background: #fff;
  border-radius: 18px;
  border: 2px dashed rgba(234, 110, 137, 0.35);
  padding: 0.75rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  box-shadow: 0 18px 45px rgba(234, 110, 137, 0.08);
}

.template-picker__preview[hidden] {
  display: none !important;
}

.template-picker__preview img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

.template-picker__preview span {
  font-size: 0.9rem;
  color: #7c5c68;
  font-weight: 600;
}

.quiz-final-cta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  margin: 1.25rem auto 1rem;
  width: min(520px, 100%);
}

.quiz-final-back {
  min-width: 180px;
}

.quiz-submit {
  min-width: min(280px, 100%);
}

.quiz-final-back,
.quiz-submit {
  flex: 1;
}

.quiz-loading {
  display: none;
  flex-direction: column;
  gap: 0.4rem;
  align-items: center;
  color: #7c5c68;
  font-weight: 600;
  margin-top: 0.5rem;
}

.quiz-loading.is-active {
  display: flex;
}

.quiz-loading__bar {
  width: min(320px, 100%);
  height: 6px;
  border-radius: 999px;
  background: rgba(234, 110, 137, 0.2);
  overflow: hidden;
  display: block;
}

.quiz-loading__bar span {
  display: block;
  width: 45%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #fbd3e1, #ea6e89, #fbd3e1);
  animation: quizLoading 1.4s infinite;
}

@keyframes quizLoading {
  0% {
    transform: translateX(-100%);
  }

  50% {
    transform: translateX(30%);
  }

  100% {
    transform: translateX(120%);
  }
}

.quiz-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.8rem;
}

.quiz-options[data-state-key="relationship"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 720px;
  margin-inline: auto;
}

.quiz-options[data-state-key="relationship"] .quiz-option {
  height: 90px;
  padding: 0.6rem;
  font-size: 0.95rem;
  line-height: 1.25;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.quiz-step[data-dynamic="true"] .quiz-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.8rem;
}

.quiz-step[data-dynamic="true"] .quiz-option {
  width: 100%;
  height: 90px;
  padding: 0.6rem;
  font-size: 0.95rem;
  line-height: 1.25;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.quiz-options[data-state-key="letterType"] {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  max-width: 720px;
  margin-inline: auto;
}

.quiz-options[data-state-key="letterType"] .quiz-option {
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.6rem;
  line-height: 1.25;
}

.quiz-tabs {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  width: fit-content;
  max-width: 100%;
  background: #fff8fb;
  padding: 0.25rem;
  border-radius: 12px;
  border: 1px solid rgba(234, 110, 137, 0.15);
  margin: 0 auto 1rem;
}

.quiz-tab {
  border: none;
  background: transparent;
  color: #7c5c68;
  padding: 0.55rem 0.9rem;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.quiz-tab--pulse {
  animation: tabGlow 1.4s ease-in-out infinite;
}

.quiz-tab--pulse.quiz-tab.is-active {
  animation: none;
}

.quiz-tab--pulse:hover {
  animation-play-state: paused;
}

.quiz-tab--pulse:focus-visible {
  outline: 2px solid rgba(234, 110, 137, 0.6);
  outline-offset: 2px;
}

.quiz-tab--pulse::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 14px;
  background: radial-gradient(circle, rgba(234, 110, 137, 0.16) 0%, rgba(234, 110, 137, 0) 60%);
  z-index: -1;
  pointer-events: none;
}

.quiz-tab.is-active {
  background: linear-gradient(130deg, #ea6e89, #f3a2b5);
  color: #fff;
  box-shadow: 0 10px 22px rgba(234, 110, 137, 0.2);
}

@keyframes tabGlow {
  0% {
    box-shadow: 0 0 0px rgba(234, 110, 137, 0.35);
  }

  50% {
    box-shadow: 0 0 16px rgba(234, 110, 137, 0.6);
  }

  100% {
    box-shadow: 0 0 0px rgba(234, 110, 137, 0.35);
  }
}

.quiz-tab-panel {
  display: none;
}

.quiz-tab-panel.is-active {
  display: block;
}

.quiz-option {
  border: 2px solid rgba(234, 110, 137, 0.3);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, #f8c0d6, #ce6a8fee);
  background: #f7f6f6;
  color: #ffffff;
  color: #2a1b21;
  text-align: left;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: normal;
  overflow-wrap: break-word;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(233, 114, 149, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease, filter 0.2s ease;
}

.quiz-option:hover {
  border-color: rgba(234, 110, 137, 0.5);
  transform: translateY(-2px) scale(1.01);
  background: linear-gradient(135deg, #f6b2cc, #e5588f);
  box-shadow: 0 14px 28px rgba(233, 114, 149, 0.32);
  filter: saturate(1.05);
}

.quiz-option.is-selected {
  border-color: #d92e62;
  color: white;
  background: linear-gradient(135deg, #f8a1bc, #c91d54);
  box-shadow: 0 18px 34px rgba(210, 52, 95, 0.42);
}

.quiz-input-label {
  display: block;
  margin-bottom: 0.5rem;
  color: #4a2e37;
}

.quiz-step input[type="text"],
.quiz-step input[type="tel"] {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(234, 110, 137, 0.2);
  background: #fff;
  color: #2a1b21;
  font-size: 1.1rem;
}

.quiz-step input[type="text"]::placeholder,
.quiz-step input[type="tel"]::placeholder {
  color: #888;
}

.quiz-step textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(234, 110, 137, 0.2);
  background: #fff;
  color: #2a1b21;
  font-size: 1rem;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
  resize: vertical;
}

.quiz-step textarea::placeholder {
  color: #888;
}

.quiz-input-hint {
  font-size: 0.9rem;
  color: #5a3d4a;
  margin: 0.35rem 0 1rem;
}

.quiz__hint {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: #7c5c68;
}

.quiz__nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
}

.quiz__nav.is-hidden {
  display: none;
}

.quiz-nav {
  flex: 1;
  padding: 0.9rem 1.1rem;
  border-radius: 12px;
  border: 1px solid rgba(234, 110, 137, 0.25);
  background: #fff;
  color: #ea6e89;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.quiz-nav.is-hidden {
  display: none;
}

.quiz-nav--next {
  border: none;
  background: linear-gradient(135deg, #f8a1bc, #CD6178);
  color: #fff;
  box-shadow: none;
}

.quiz-nav:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.quiz-step--templates~.quiz__nav {
  justify-content: center;
}

.quiz-step--templates~.quiz__nav .quiz-nav--prev {
  flex: 0 1 auto;
  min-width: 180px;
}

.quiz-step--templates~.quiz__nav .quiz-nav--next {
  display: none;
}

.quiz__success {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: #6ee7b7;
  min-height: 1.2em;
}

.result-card {
  padding: 2.5rem;
}

.result__header h2 {
  margin: 0;
  color: #2a1b21;
}

.result__status {
  margin: 0.25rem 0 0;
  color: #5c3a45;
  font-size: 0.95rem;
}

.result__status.is-error {
  color: #d1436c;
}

.result__status.is-success {
  color: #2c9c7c;
}

.result__actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.2rem;
}

.text-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.text-actions--primary {
  justify-content: center;
}

.text-actions--editor {
  justify-content: flex-start;
}

.text-actions--primary.is-inline {
  justify-content: flex-start;
  margin-bottom: 0.5rem;
}

.variation-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.5rem;
  margin: 1rem 0;
}

.variation-tab {
  border: 1px solid rgba(234, 110, 137, 0.2);
  background: #fff;
  color: #7c5c68;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.variation-tab:hover {
  border-color: rgba(234, 110, 137, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(234, 110, 137, 0.12);
}

.variation-tab.is-active {
  border-color: #d92e62;
  background: linear-gradient(135deg, #fbd3e1, #f19aba);
  color: #2a1b21;
  box-shadow: 0 12px 28px rgba(210, 52, 95, 0.2);
}

.result__textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(234, 110, 137, 0.25);
  background: #fff;
  padding: 1rem 1.1rem;
  font-size: 1rem;
  font-family: "Poppins", "Segoe UI", Tahoma, sans-serif;
  line-height: 1.5;
  resize: vertical;
  min-height: 200px;
  color: #2a1b21;
}

.result__textarea:focus {
  outline: 2px solid rgba(234, 110, 137, 0.4);
  border-color: transparent;
}

.result__generate {
  min-width: 180px;
  text-align: center;
}

.result__output {
  display: none;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
  border-top: 1px solid rgba(234, 110, 137, 0.12);
  padding-top: 1.2rem;
}

.result__output.is-visible {
  display: flex;
}

.result__image {
  width: 100%;
  max-width: 720px;
  border-radius: 14px;
  border: 1px solid rgba(234, 110, 137, 0.25);
  box-shadow: 0 20px 60px rgba(234, 110, 137, 0.15);
}

.result__output-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.result__action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.7rem 1.4rem;
  border-radius: 14px;
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0.02em;
  font-weight: 600;
  min-width: 180px;
  border: none;
  box-shadow: 0 14px 28px rgba(234, 110, 137, 0.2);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  color: #fff;
  background: linear-gradient(130deg, #ea6e89, #f3a2b5);
}

.result__action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(234, 110, 137, 0.25);
}

.result__action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}


.template-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 0.75rem;
  row-gap: 1rem;
  max-height: 560px;
  overflow-y: auto;
  overflow-x: auto;
  padding: 0.5rem 0.25rem 1.5rem;
  align-items: start;
}

.template-option {
  position: relative;
  padding: 0;
  border-radius: 12px;
  border: 2px solid transparent;
  background: #fff;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  min-height: 150px;
  aspect-ratio: 7 / 5;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.template-option:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px rgba(234, 110, 137, 0.18);
}

.template-option.is-selected {
  border-color: #ea6e89;
  box-shadow: 0 15px 40px rgba(234, 110, 137, 0.25);
  transform: scale(1.01);
  z-index: 2;
}

.template-option img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #f8f8f8;
}

.template-modal--editor .template-modal__content {
  width: min(640px, 90vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.template-modal--editor .template-modal__content form {
  max-height: 80vh;
  overflow-y: auto;
  padding-right: 0.25rem;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .page-content {
    padding: 1.5rem 1.25rem 4rem;
    gap: 2rem;
  }

  .quiz__card {
    padding: 1.75rem;
  }

  .bridge__card {
    padding: 1.75rem;
  }

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

  .quiz-options[data-state-key="relationship"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 100%;
  }

  .quiz-options[data-state-key="relationship"] .quiz-option {
    height: 80px;
    padding: 0.55rem;
    font-size: 0.9rem;
  }

  .quiz-options[data-state-key="letterType"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 100%;
  }

  .quiz-options[data-state-key="letterType"] .quiz-option {
    height: 80px;
    padding: 0.55rem;
    font-size: 0.9rem;
  }

  .quiz-step[data-dynamic="true"] .quiz-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 100%;
  }

  .quiz-step[data-dynamic="true"] .quiz-option {
    height: 80px;
    padding: 0.55rem;
    font-size: 0.9rem;
  }

  .quiz-nav {
    letter-spacing: 0.05em;
  }

  .result-card {
    padding: 1.75rem;
  }

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

  .result__download {
    justify-content: center;
  }

  .template-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 420px;
  }
}

.result__editor {
  display: none;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.result__editor.is-visible {
  display: flex;
}

.result__fields {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.result__field {
  width: 100%;
}

.result__textarea--body {
  min-height: 220px;
}

.result__textarea--compact {
  min-height: 20px;
  max-height: 50px;
  padding: 0.65rem 1rem;
  resize: none;
  line-height: 1.4;
}

@media (max-width: 640px) {
  .variation-tabs {
    display: flex;
    flex-direction: column;
  }

  .variation-tab {
    width: 100%;
  }

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

  .result__output-actions>* {
    width: 100%;
    text-align: center;
  }

  .result__output-actions .result__action-btn {
    width: 100%;
  }

}

.result__change-template {
  background: linear-gradient(130deg, #f7adc1, #f17ca0);
  color: #fff;
  text-transform: none;
  letter-spacing: 0.02em;
  font-weight: 600;
}

.result-layout {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding-inline: clamp(1rem, 3vw, 2.5rem);
}

.result-plan-column {
  max-width: 780px;
  width: 100%;
  margin: 2rem auto 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.result-plan-column[hidden] {
  display: none !important;
}

.result-panel {
  background: #fff;
  border-radius: 26px;
  padding: min(2.5rem, 6vw);
  box-shadow: 0 25px 80px rgba(234, 110, 137, 0.15);
  margin-bottom: 2rem;
  min-height: 520px;
}

.result-panel__header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.result-panel__logo {
  width: min(680px, 100%);
  max-width: 100%;
  height: auto;
  margin: 0 auto 0.75rem;
  display: block;
}

.result-panel__status {
  color: #7c5c68;
  font-weight: 600;
}

.result-panel__status.is-error {
  color: #d92e62;
}

.result-panel__status.is-success {
  text-align: center;
  color: #1f8f63;
}

.result-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 4rem 1.5rem;
  text-align: center;
  color: #76405a;
}

.result-loading[hidden] {
  display: none;
}

.result-loading__spinner {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 6px solid rgba(241, 153, 174, 0.25);
  border-top-color: #f199ae;
  animation: loadingSpin 0.9s linear infinite;
}

.result-loading p {
  font-weight: 600;
}

.result-retry {
  margin-top: 1rem;
  padding: 0.85rem 1.5rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(130deg, #ea6e89, #f3a2b5);
  color: #fff;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(234, 110, 137, 0.25);
}

.result-retry[hidden] {
  display: none !important;
}

@keyframes loadingSpin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.section-shell [data-result-shell][hidden] {
  display: none;
}

.result-panel__visual {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.result-panel__lead {
  font-weight: 700;
  color: #1f8f63;
  text-align: center;
  margin: 0;
  line-height: 1.4;
}

.result-panel__media {
  position: relative;
  min-height: 320px;
  border-radius: 20px;
  background: transparent;
  display: flex;
  justify-content: center;
  align-items: center;
  user-select: none;
}

.result-panel__media img,
.result-panel__media canvas {
  pointer-events: none;
}

.result-zoom-btn {
  align-self: center;
  margin-top: -0.25rem;
  border: none;
  background: none;
  color: #7c5c68;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.2s ease;
}

.result-zoom-btn::before {
  content: "+";
  font-size: 1rem;
  font-weight: 700;
}

.result-zoom-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.result-zoom-btn:not(:disabled):hover {
  color: #ea6e89;
}

.result-panel__image {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.15);
  display: none;
  background: #fff;
}

.result-panel__image.is-visible {
  display: block;
}

.result-skeleton {
  width: 100%;
  aspect-ratio: 3 / 4.5;
  border-radius: 20px;
  background: linear-gradient(90deg, rgba(234, 110, 137, 0.08), rgba(234, 110, 137, 0.15), rgba(234, 110, 137, 0.08));
  background-size: 200% 100%;
  animation: pulseSkeleton 1.4s infinite;
}

@keyframes pulseSkeleton {
  0% {
    background-position: 200% 0;
  }

  50% {
    background-position: 100% 0;
  }

  100% {
    background-position: 0 0;
  }
}

.result-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 0.5rem;
}

.result-panel__actions .bridge__cta,
.result-panel__actions .bridge__cta--ghost {
  min-width: 220px;
  text-transform: none;
  letter-spacing: 0.02em;
}

.result-error-cta {
  border: none;
  border-radius: 999px;
  background: linear-gradient(130deg, #ea6e89, #f3a2b5);
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(234, 110, 137, 0.25);
  align-self: center;
  margin-top: 0.25rem;
}

.result-error-cta[hidden] {
  display: none;
}

.image-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(7, 4, 6, 0.85);
  backdrop-filter: blur(6px);
  z-index: 999;
  padding: 1.5rem;
}

.image-modal.is-open {
  display: flex;
}

.image-modal__dialog {
  position: relative;
  width: min(1200px, 100%);
  max-height: 90vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.image-modal__canvas {
  width: 100%;
  height: auto;
  max-height: 90vh;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.45);
}

.image-modal__close {
  position: absolute;
  top: -0.75rem;
  right: -0.75rem;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: none;
  background: #eb748e;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(235, 116, 142, 0.35);
}

.image-modal__close:hover {
  background: #fff;
}

.canvas-overlay {
  position: absolute;
  inset: 0;
  background: rgb(247, 173, 193);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
}

.canvas-overlay[hidden] {
  display: none;
}

.canvas-overlay__spinner {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 5px solid rgba(255, 255, 255, 0.5);
  border-top-color: #fff;
  animation: loadingSpin 0.9s linear infinite;
}

.editor-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.editor-size-controls {
  border: 1px solid rgba(234, 110, 137, 0.25);
  border-radius: 16px;
  padding: 0.85rem 1rem 1rem;
  background: rgba(235, 116, 142, 0.05);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.editor-size-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: #5e3a45;
  font-size: 0.95rem;
}

.editor-size-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.editor-size-option {
  border-radius: 12px;
  border: 1px solid rgba(235, 116, 142, 0.35);
  background: #fff;
  color: #744658;
  font-weight: 600;
  padding: 0.55rem 0.75rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.editor-size-option.is-selected {
  background: linear-gradient(130deg, #ea6e89, #f3a2b5);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 25px rgba(234, 110, 137, 0.2);
}

.editor-size-option:not(.is-selected):hover {
  border-color: rgba(235, 116, 142, 0.8);
  color: #eb748e;
}

.editor-label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-weight: 600;
  color: #593945;
}

.editor-input {
  border-radius: 14px;
  border: 1px solid rgba(234, 110, 137, 0.25);
  padding: 0.85rem 1rem;
  background: rgba(235, 116, 142, 0.05);
  font-family: "Poppins", "Segoe UI", Tahoma, sans-serif;
  font-size: 1rem;
  resize: vertical;
  width: 100%;
}

.editor-input--compact {
  min-height: 48px;
  resize: none;
}

.editor-input--body {
  min-height: 220px;
}

.editor-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.editor-actions .bridge__cta,
.editor-actions .editor-cancel {
  width: 100%;
}

@media (min-width: 768px) {
  .editor-actions {
    flex-direction: row;
  }

  .editor-actions .bridge__cta,
  .editor-actions .editor-cancel {
    width: auto;
    flex: 1;
  }
}

.editor-cancel {
  border: 1px solid rgba(234, 110, 137, 0.35);
  background: #fff;
  color: #cc6178;
  font-weight: 600;
  cursor: pointer;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  text-align: center;
}

.plan-card--result {
  width: 100%;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0;
}

[data-plan-block][hidden] {
  display: none !important;
}

.plan-card__badge {
  width: 100%;
  align-self: center;
}

.plan-card__lead {
  padding: 20px;
  font-size: 1.3rem;
  font-weight: 700;
  text-align: center;
  color: #d92e62;
  margin: 0.25rem 0;
  line-height: 1.2;
  text-transform: uppercase;
}

.plan-card__price-text {
  font-weight: 700;
  color: #d92e62;
  text-align: center;
  margin: 0.25rem 0 0.5rem;
  text-transform: uppercase;
}

.plan-benefits {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.4rem;
  color: #5c3a45;
  font-size: 0.95rem;
}

.plan-benefits li {
  position: relative;
  padding-left: 2.4rem;
  line-height: 1.4;
}

.plan-benefits li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15rem;
  width: 1.8rem;
  height: 1.8rem;
  background: url("../assets/sparkles.png") no-repeat center / contain;
}

.plan-card__checkout {
  margin: 0;
  width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(234, 110, 137, 0.2);
  padding: 1.2rem;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

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

.plan-card__instructions {
  margin: 0;
  border-radius: 18px;
  border: 1px solid rgba(234, 110, 137, 0.18);
  background: white;
  padding: 1.2rem 1.5rem;
  color: black;
}

.plan-checkout-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.plan-checkout-grid>* {
  width: 100%;
}

.plan-card__instructions p {
  margin: 0 0 0.4rem;
  font-weight: 700;
}

.plan-card__instructions ol {
  margin: 0;
  padding-left: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.plan-card__logo-mini {
  width: 120px;
  display: block;
  margin: 1rem auto 0;
}

.has-access-grant [data-plan-block],
.has-access-grant [data-checkout-block],
.has-access-grant [data-checkout-instructions],
.has-access-grant [data-checkout-logo],
.has-access-grant [data-checkout-trigger] {
  display: none !important;
}

.plan-cta--primary {
  font-size: 16px;
  margin-top: 0.5rem;
  text-transform: uppercase;
}

.plan-cta {
  border: none;
  border-radius: 999px;
  padding: 0.85rem 2rem;
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  cursor: pointer;
  font-family: "Lilita One", "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #fff;
  background: #cc6178;
  box-shadow: none;
  transition: none;
}

.plan-cta--ghost {
  background: transparent;
  color: #cc6178;
  border: 2px solid rgba(204, 97, 120, 0.4);
  box-shadow: none;
}

.plan-cta:active {
  transform: none;
  box-shadow: none;
}

.plan-cta.is-hidden {
  display: none;
}

.checkout-code {
  display: none;
}

.checkout-status {
  text-align: start;
  font-weight: 600;
  color: #7c5c68;
  margin: 0.25rem 0;
}

.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.checkout-label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-weight: 600;
  color: #5a3d4a;
}

.checkout-label input {
  border-radius: 12px;
  border: 1px solid rgba(234, 110, 137, 0.3);
  padding: 0.85rem 1rem;
  font-size: 1rem;
  font-family: inherit;
}

.checkout-submit {
  text-align: center;
}

.checkout-summary {
  font-size: 0.95rem;
  color: #6f4d58;
}

.checkout-summary[hidden] {
  display: none;
}

.checkout-status:empty,
.checkout-feedback:empty,
.checkout-message:empty {
  display: none;
}

.checkout-pix {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(234, 110, 137, 0.2);
}

.checkout-pix.is-visible {
  display: flex;
}

.checkout-pix img {
  width: 220px;
  height: 220px;
  object-fit: contain;
  background: #fff;
  border-radius: 12px;
}

.checkout-code {
  font-family: "Courier New", Courier, monospace;
  font-size: 0.85rem;
  text-align: center;
  word-break: break-all;
}

.checkout-feedback {
  color: #1f8f63;
  font-weight: 600;
  text-align: center;
}

.checkout-message {
  font-weight: 600;
  color: #6f4d58;
  margin-top: 0.5rem;
  text-align: center;
}

@media (max-width: 768px) {
  .result-panel {
    padding: 1.25rem 1rem 1.5rem;
    margin-bottom: 1.25rem;
    min-height: auto;
  }

  .result-panel__visual {
    gap: 1rem;
  }

  .result-panel__media {
    min-height: auto;
  }

  .result-panel__actions {
    flex-direction: column;
    margin-top: 0.25rem;
  }

  .result-panel__actions .bridge__cta,
  .result-panel__actions .bridge__cta--ghost {
    width: 100%;
  }

  .quiz-final-cta {
    flex-direction: column-reverse;
    width: 100%;
    margin: 1rem auto;
  }

  .quiz-final-back,
  .quiz-submit {
    width: 100%;
  }
}

@media (min-width: 1024px) {
  .result-panel {
    background: linear-gradient(180deg, #ffffff 0%, #fff9fb 100%);
    border-radius: 32px;
    border: 1px solid rgba(234, 110, 137, 0.12);
    padding: clamp(1.5rem, 3vw, 3rem);
    box-shadow: 0 35px 80px rgba(21, 7, 13, 0.1);
    margin-bottom: clamp(1.5rem, 4vw, 3rem);
    gap: clamp(1rem, 2vw, 2rem);
  }

  .result-panel__header {
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(234, 110, 137, 0.15);
    margin-bottom: 0;
  }

  .result-panel__logo {
    width: min(360px, 65vw);
  }

  .result-panel__status {
    color: #8c6675;
    font-size: 0.95rem;
  }

  .result-panel__visual {
    gap: clamp(1rem, 2vw, 1.75rem);
  }

  .result-panel__lead {
    font-size: clamp(1.15rem, 2vw, 1.45rem);
  }

  .result-panel__media {
    min-height: clamp(320px, 45vw, 520px);
    border-radius: 28px;
    background: radial-gradient(circle at top, rgba(244, 197, 209, 0.45), transparent 65%), #fff;
    border: 1px solid rgba(234, 110, 137, 0.2);
    padding: clamp(1rem, 2vw, 2rem);
  }

  .result-panel__image {
    border-radius: 24px;
    box-shadow: 0 25px 80px rgba(17, 6, 14, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.8);
  }

  .result-panel__actions {
    padding-top: 1rem;
    border-top: 1px solid rgba(234, 110, 137, 0.12);
  }

  .result-panel__actions .bridge__cta,
  .result-panel__actions .bridge__cta--ghost {
    min-width: clamp(200px, 22vw, 260px);
  }

  .plan-card--result {
    padding: clamp(1.5rem, 3vw, 2.25rem);
    border-radius: 30px;
    background: linear-gradient(160deg, #fde7ee, #ffffff);
    border: 1px solid rgba(234, 110, 137, 0.15);
    box-shadow: 0 32px 70px rgba(20, 7, 13, 0.1);
    gap: 1.25rem;
  }

  .plan-card__badge {
    width: 80%;
  }

  .plan-card__lead {
    padding: 0;
    padding-bottom: 20px;
    font-size: clamp(1.4rem, 2.5vw, 1.75rem);
    font-weight: 800;
    color: #c23c62;
    line-height: 1.25;
  }

  .plan-card__price-text {
    letter-spacing: 0.08em;
  }

  .plan-benefits {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    font-size: 1rem;
  }

  .plan-benefits li {
    padding-left: 2.5rem;
    line-height: 1.45;
  }

  .plan-card__checkout {
    border-radius: 26px;
    border: 1px solid rgba(234, 110, 137, 0.18);
    padding: clamp(1.25rem, 2vw, 1.75rem);
    box-shadow: 0 20px 60px rgba(18, 8, 12, 0.08);
  }

  .plan-card__instructions {
    border-radius: 22px;
    border: 1px solid rgba(234, 110, 137, 0.12);
    background: #fff8fb;
    color: #593945;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  }

  .plan-card__instructions p {
    letter-spacing: 0.02em;
  }

  .plan-card__instructions ol {
    font-weight: 600;
  }

  .plan-cta {
    background: linear-gradient(125deg, #f06585, #ea4189);
    box-shadow: 0 15px 35px rgba(234, 110, 137, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  }

  .plan-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(234, 110, 137, 0.4);
  }

  .plan-cta--ghost {
    transition: color 0.2s ease, border-color 0.2s ease;
  }

  .plan-cta--ghost:hover {
    color: #eb748e;
    border-color: rgba(235, 116, 142, 0.8);
  }
}

@media (min-width: 1100px) {
  .result-layout.result-layout--split {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.85fr);
    gap: 2.5rem;
    align-items: flex-start;
  }

  .result-layout.result-layout--split .result-panel {
    margin-bottom: 0;
  }

  .result-layout.result-layout--split .result-plan-column {
    margin: 0;
    position: sticky;
    top: 2rem;
  }

  .result-layout.result-layout--split .plan-checkout-grid {
    flex-direction: row;
    gap: 1.5rem;
  }

  .result-layout.result-layout--split .plan-checkout-grid>* {
    flex: 1;
  }
}

/* Delivery page */
.delivery-body {
  min-height: 100vh;
}

.delivery-shell {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 24px;
  padding: clamp(1.5rem, 4vw, 3rem);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.delivery-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.delivery-header h1 {
  margin: 0.25rem 0 0;
}

.delivery-kicker {
  text-transform: uppercase;
  font-weight: 700;
  color: #d02f5d;
  letter-spacing: 0.08em;
  margin: 0;
}

.delivery-email {
  margin: 0;
  font-weight: 600;
  color: #6b4553;
}

.delivery-status,
.delivery-error {
  border-radius: 16px;
  padding: 1rem 1.25rem;
  font-weight: 600;
}

.delivery-status {
  background: rgba(243, 219, 230, 0.7);
  color: #5c2f40;
}

.delivery-error {
  background: rgba(255, 227, 227, 0.9);
  color: #8c1f2d;
}

.delivery-summary,
.delivery-instructions {
  border-radius: 20px;
  border: 1px solid rgba(234, 110, 137, 0.25);
  background: linear-gradient(145deg, #fff4fa, #ffe5f0);
  box-shadow: 0 20px 45px rgba(93, 42, 59, 0.12);
}

.delivery-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  padding: 1.5rem;
}

.delivery-summary[hidden] {
  display: none;
}

.delivery-credits {
  text-align: center;
  min-width: 140px;
  color: #5d2a3b;
}

.delivery-credits strong {
  display: block;
  font-size: clamp(2.2rem, 5vw, 3rem);
  color: #d02f5d;
  line-height: 1;
}

.delivery-summary-hint {
  margin: 0;
  color: #6f4d58;
  font-size: 0.95rem;
}

.delivery-instructions {
  margin: 1.5rem auto 2rem;
  padding: 1.1rem 1.4rem;
  max-width: 760px;
  color: #5c3a45;
  font-weight: 600;
  text-align: center;
  line-height: 1.45;
}

.delivery-letters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.delivery-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 1.5rem;
  border-radius: 18px;
  background: rgba(240, 226, 233, 0.6);
  font-weight: 600;
  color: #5c3a45;
}

.delivery-letter-card {
  background: white;
  border-radius: 22px;
  border: 1px solid rgba(210, 98, 123, 0.2);
  box-shadow: 0 15px 45px rgba(40, 8, 24, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.delivery-letter-preview {
  background: #fff6fb;
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.delivery-letter-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1rem;
}

.delivery-letter-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.delivery-letter-body h3 {
  margin: 0;
}

.delivery-letter-status {
  font-weight: 600;
  color: #6b4a58;
  margin: 0;
}

.delivery-letter-meta {
  margin: 0;
  font-size: 0.9rem;
  color: #937086;
}

.delivery-letter-actions {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.delivery-action {
  flex: 1;
  min-width: 120px;
}

.delivery-action.is-disabled {
  pointer-events: none;
  opacity: 0.6;
}

.delivery-button {
  border: none;
  border-radius: 10px;
  padding: 0.85rem 2rem;
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  font-family: "Lilita One", "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #fff;
  background: #cc6178;
  box-shadow: none;
  transition: none;
}

.delivery-button--primary {
  background: #cc6178;
}

.delivery-button--ghost {
  background: transparent;
  color: #cc6178;
  border: 2px solid rgba(204, 97, 120, 0.4);
}

.delivery-button:active {
  transform: none;
  box-shadow: none;
}

.delivery-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.delivery-actions {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.delivery-actions .bridge__cta {
  min-width: 220px;
}

.delivery-create-btn {
  border: none;
  border-radius: 10px;
  padding: 0.95rem 2.4rem;
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  color: white;
  cursor: pointer;
  background: linear-gradient(135deg, #ff5a7c, #cc6178);
  box-shadow: 0 12px 30px rgba(204, 97, 120, 0.35);
  transition: none;
}

.delivery-create-btn:active {
  transform: none;
  box-shadow: 0 12px 30px rgba(204, 97, 120, 0.35);
}

@media (max-width: 768px) {
  .delivery-header {
    flex-direction: column;
  }

  .delivery-summary {
    width: 100%;
  }

  .delivery-summary-actions .bridge__cta {
    width: 100%;
  }

  .delivery-letter-actions {
    flex-direction: column;
  }

  .delivery-action {
    width: 100%;
  }

  .delivery-actions {
    flex-direction: column;
  }

  .delivery-actions .bridge__cta {
    width: 100%;
  }
}
