:root {
  color-scheme: light;
  --ink: #082e29;
  --ink-soft: #37534f;
  --green: #0a6b52;
  --green-bright: #18a870;
  --yellow: #ffd447;
  --blue: #2764d8;
  --cream: #f9f3df;
  --paper: #fffef9;
  --red: #c8382e;
  --line: rgba(8, 46, 41, 0.16);
  --shadow: 0 24px 70px rgba(8, 46, 41, 0.16);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--cream);
  color: var(--ink);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--cream);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 16% 12%, rgba(255, 212, 71, 0.44), transparent 24rem),
    radial-gradient(circle at 86% 78%, rgba(39, 100, 216, 0.13), transparent 28rem),
    var(--cream);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topbar,
footer {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.topbar {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  appearance: none;
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  padding: 6px 0;
}

.brand img {
  display: block;
  width: 174px;
  height: 54px;
  object-fit: contain;
  object-position: left center;
}

.topbar-note {
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

main {
  flex: 1;
  display: grid;
}

.screen {
  display: none;
  min-height: calc(100vh - 150px);
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
  padding: 48px 0 64px;
}

.screen.is-active {
  display: grid;
  animation: screen-in 480ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

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

.welcome-screen {
  grid-template-columns: minmax(0, 0.86fr) minmax(460px, 1.14fr);
  align-items: center;
  gap: 52px;
}

.welcome-copy {
  max-width: 560px;
}

.eyebrow,
.step-label,
.payment-kicker,
.sample-edition {
  color: var(--green);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: -0.055em;
  line-height: 0.96;
}

h1 {
  position: relative;
  margin: 18px 0 22px;
  font-size: clamp(3.8rem, 7.3vw, 7rem);
  max-width: 760px;
}

h1 em {
  color: var(--green);
  font-style: italic;
}

.hero-flag-icon {
  position: absolute;
  z-index: 3;
  right: 24px;
  bottom: -0.16em;
  width: clamp(54px, 5.8vw, 76px);
  height: auto;
  pointer-events: none;
  filter: drop-shadow(0 10px 12px rgba(8, 46, 41, 0.22));
  animation: hero-flag-float 3.2s ease-in-out infinite;
}

@keyframes hero-flag-float {
  0%, 100% {
    transform: translateY(4px) rotate(7deg);
  }
  50% {
    transform: translateY(-9px) rotate(3deg);
  }
}

.welcome-copy > p {
  max-width: 510px;
  margin-bottom: 28px;
  color: var(--ink-soft);
  font-size: 1.08rem;
  line-height: 1.7;
}

.welcome-copy > small {
  display: block;
  margin-top: 13px;
  color: var(--ink-soft);
}

.primary-button {
  min-height: 54px;
  border: 0;
  border-radius: 999px;
  padding: 0 28px;
  background: var(--ink);
  color: white;
  font-weight: 850;
  box-shadow: 0 12px 26px rgba(8, 46, 41, 0.2);
  transition: transform 180ms ease, background 180ms ease, opacity 180ms ease;
}

.primary-button:hover:not(:disabled) {
  transform: translateY(-2px);
  background: var(--green);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
  box-shadow: none;
}

.welcome-cta,
.payment-button {
  position: relative;
  isolation: isolate;
  min-height: 68px;
  padding-inline: 42px;
  overflow: hidden;
  background: linear-gradient(135deg, #075c45 0%, #0a7d59 52%, #075c45 100%);
  border: 2px solid rgba(255, 255, 255, 0.58);
  font-size: 1.08rem;
  letter-spacing: 0.01em;
  box-shadow:
    0 15px 32px rgba(8, 83, 63, 0.34),
    0 0 0 7px rgba(24, 168, 112, 0.12),
    0 0 28px rgba(255, 212, 71, 0.34);
  animation: welcome-cta-pulse 2.4s ease-in-out infinite;
}

.welcome-cta::after,
.payment-button::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -65%;
  left: -35%;
  width: 24%;
  height: 230%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent);
  transform: rotate(18deg);
  animation: welcome-cta-shine 3.2s ease-in-out infinite;
}

.welcome-cta:hover:not(:disabled),
.payment-button:hover:not(:disabled) {
  background: linear-gradient(135deg, #087254 0%, #13a06d 52%, #087254 100%);
  transform: translateY(-3px) scale(1.025);
  box-shadow:
    0 20px 38px rgba(8, 83, 63, 0.4),
    0 0 0 8px rgba(24, 168, 112, 0.16),
    0 0 34px rgba(255, 212, 71, 0.42);
}

@keyframes welcome-cta-pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.035);
  }
}

@keyframes welcome-cta-shine {
  0%, 45% {
    left: -35%;
  }
  75%, 100% {
    left: 120%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .welcome-cta,
  .welcome-cta::after,
  .payment-button,
  .payment-button::after,
  .hero-flag-icon {
    animation: none;
  }
}

.floating-stage {
  position: relative;
  min-height: 590px;
  isolation: isolate;
  perspective: 1500px;
}

.flag-backdrop {
  position: absolute;
  z-index: 1;
  width: 650px;
  height: 650px;
  left: 50%;
  top: 55%;
  transform: translate(-50%, -50%);
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 22px 30px rgba(8, 46, 41, 0.16));
}

.example-card {
  position: absolute;
  width: 350px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.94);
  border-radius: 26px;
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0.96;
  transform-style: preserve-3d;
  backface-visibility: visible;
  transition: opacity 260ms ease, filter 260ms ease, box-shadow 260ms ease;
  animation: float-card 5.4s ease-in-out infinite;
}

.example-card:hover,
.example-card:focus-visible {
  opacity: 1;
  box-shadow: 0 30px 80px rgba(8, 46, 41, 0.25);
}

.example-card:focus-visible {
  outline: 4px solid var(--blue);
  outline-offset: 5px;
}

.final-card::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(8, 46, 41, 0.22);
  border-radius: 14px;
  pointer-events: none;
}

.example-card-one {
  --card-left: 1%;
  --card-top: 62px;
  --card-rotation: -8deg;
  left: var(--card-left);
  top: var(--card-top);
  z-index: 2;
  transform: rotate(var(--card-rotation));
}

.example-card-two {
  --card-left: calc(100% - 350px);
  --card-top: 102px;
  --card-rotation: 8deg;
  left: var(--card-left);
  top: var(--card-top);
  z-index: 3;
  transform: rotate(var(--card-rotation));
  animation-delay: -2.7s;
}

.floating-stage.has-selected-card .example-card:not(.is-preview-source) {
  opacity: 0.42;
  filter: saturate(0.72) blur(1px);
}

.example-card.is-preview-source {
  opacity: 0;
}

.card-preview-clone {
  position: fixed;
  z-index: 1000;
  display: block;
  margin: 0;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.96);
  border-radius: 26px;
  box-shadow: 0 38px 95px rgba(8, 46, 41, 0.4);
  backface-visibility: visible;
  transform-style: preserve-3d;
  pointer-events: none;
}

@keyframes float-card {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -16px; }
}

.spark {
  position: absolute;
  z-index: 20;
  color: var(--blue);
  font-size: 2.4rem;
  animation: sparkle 2.8s ease-in-out infinite;
}

.spark-one { left: 8%; top: 11%; }
.spark-two { right: 4%; top: 25%; animation-delay: -1s; }
.spark-three { right: 14%; bottom: 10%; animation-delay: -2s; }

@keyframes sparkle {
  0%, 100% { transform: scale(0.75) rotate(0deg); opacity: 0.48; }
  50% { transform: scale(1.15) rotate(18deg); opacity: 1; }
}

.flow-screen {
  place-items: center;
}

.flow-card {
  width: min(650px, 100%);
  padding: clamp(28px, 5vw, 54px);
  border: 1px solid rgba(8, 46, 41, 0.13);
  border-radius: 30px;
  background: rgba(255, 254, 249, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.flow-card-wide {
  width: min(820px, 100%);
}

.compact-card {
  width: min(700px, 100%);
}

.flow-heading {
  text-align: center;
  margin-bottom: 30px;
}

.flow-heading h2,
.result-copy h2 {
  margin: 12px 0 14px;
  font-size: clamp(2.4rem, 6vw, 4.7rem);
}

.two-line-title > span {
  display: block;
  white-space: nowrap;
}

.rival-accent {
  color: var(--red);
  font-family: "Segoe UI", Arial, sans-serif;
  font-style: italic;
  font-weight: 950;
  letter-spacing: -0.07em;
}

.winner-accent {
  color: var(--green-bright);
  font-family: "Segoe UI", Arial, sans-serif;
  font-style: italic;
  font-weight: 950;
  letter-spacing: -0.07em;
}

.flow-heading p,
.result-copy > p {
  max-width: 570px;
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.65;
}

.upload-zone {
  position: relative;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px dashed rgba(8, 46, 41, 0.28);
  border-radius: 24px;
  background: rgba(255, 212, 71, 0.1);
  overflow: hidden;
  cursor: pointer;
  transition: border 180ms ease, background 180ms ease;
}

.upload-zone:hover,
.upload-zone.is-dragging {
  border-color: var(--green);
  background: rgba(24, 168, 112, 0.08);
}

.upload-zone[hidden] {
  display: none;
}

.upload-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.upload-zone strong,
.upload-zone > span:not(.upload-icon) {
  position: relative;
  z-index: 2;
}

.upload-zone > span:not(.upload-icon) {
  color: var(--ink-soft);
  font-size: 0.84rem;
}

.upload-icon {
  position: relative;
  z-index: 2;
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--ink);
  font-size: 2rem;
  font-weight: 300;
}

#photoPreview {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-zone.has-photo #photoPreview {
  display: block;
}

.upload-zone.has-photo::after {
  content: "Trocar fotografia";
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(8, 46, 41, 0.88);
  color: white;
  font-size: 0.8rem;
  font-weight: 800;
}

.upload-zone.has-photo > span,
.upload-zone.has-photo > strong {
  display: none;
}

.photo-editor {
  width: min(100%, 430px);
  margin-inline: auto;
  text-align: center;
}

.photo-editor[hidden] {
  display: none;
}

.photo-crop-frame {
  position: relative;
  width: min(100%, 390px);
  aspect-ratio: 1;
  margin-inline: auto;
  overflow: hidden;
  border: 3px solid rgba(8, 46, 41, 0.82);
  border-radius: 28px;
  background: #dfe7df;
  box-shadow: 0 18px 38px rgba(8, 46, 41, 0.18);
}

#photoCropCanvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

#photoCropCanvas.is-dragging {
  cursor: grabbing;
}

.photo-crop-guide {
  position: absolute;
  inset: 12%;
  border: 2px dashed rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  pointer-events: none;
  box-shadow: 0 0 0 999px rgba(8, 46, 41, 0.14);
}

.photo-editor-hint {
  margin: 14px 0 10px;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.photo-zoom-control {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.photo-zoom-control input {
  width: 100%;
  accent-color: var(--green);
  cursor: pointer;
}

.change-photo-button {
  margin-top: 8px;
}

.flow-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
}

.flow-actions .primary-button {
  width: min(100%, 350px);
}

.text-button {
  border: 0;
  background: transparent;
  padding: 12px 4px;
  color: var(--ink-soft);
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 4px;
}

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

.candidate-option {
  min-height: 122px;
  border: 1px solid var(--line);
  border-radius: 19px;
  padding: 14px;
  background: white;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  transition: transform 180ms ease, border 180ms ease, box-shadow 180ms ease;
}

.candidate-option:hover {
  transform: translateY(-2px);
  border-color: rgba(10, 107, 82, 0.48);
}

.candidate-option.is-selected {
  border: 2px solid var(--green);
  box-shadow: 0 10px 28px rgba(10, 107, 82, 0.14);
  background: #f6fff9;
}

.candidate-initials {
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  background: var(--candidate-color, var(--green));
  color: white;
  font-weight: 900;
}

.candidate-option strong {
  display: block;
  font-size: 0.94rem;
  line-height: 1.25;
}

.candidate-option span:last-child {
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 850;
}

.text-input {
  width: 100%;
  height: 58px;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 0 17px;
  background: white;
  color: var(--ink);
  font-size: 1rem;
  outline: none;
}

.text-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(10, 107, 82, 0.1);
}

.field-error {
  min-height: 18px;
  margin: 8px 0 0;
  color: var(--red);
  font-size: 0.82rem;
}

.demo-warning {
  color: var(--ink-soft);
  font-size: 0.76rem;
  line-height: 1.45;
}

.loading-screen {
  place-items: center;
}

.loading-card {
  width: min(520px, 100%);
  padding: clamp(38px, 7vw, 70px) 28px;
  border: 1px solid rgba(8, 46, 41, 0.13);
  border-radius: 30px;
  background: rgba(255, 254, 249, 0.94);
  box-shadow: var(--shadow);
  text-align: center;
}

.loading-card h2 {
  margin: 14px 0 12px;
  font-size: clamp(3rem, 8vw, 5.2rem);
}

#loadingTitleText {
  animation: loading-title-glow 2.8s ease-in-out infinite;
}

.loading-card p {
  color: var(--ink-soft);
}

.loading-art {
  position: relative;
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  margin: 0 auto 26px;
}

.loading-orbit {
  position: absolute;
  inset: 0;
  border: 5px solid rgba(10, 107, 82, 0.12);
  border-top-color: var(--green-bright);
  border-right-color: var(--yellow);
  border-radius: 50%;
  animation: loading-spin 1.1s linear infinite;
}

.loading-flag {
  width: 66px;
  height: 66px;
  object-fit: contain;
  animation: loading-float 1.4s ease-in-out infinite;
}

.loading-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.loading-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  animation: loading-dot 1.2s ease-in-out infinite;
}

.loading-dots span:nth-child(2) { animation-delay: 160ms; }
.loading-dots span:nth-child(3) { animation-delay: 320ms; }

.loading-error {
  min-height: 0;
  margin: 18px auto 0;
  color: var(--red) !important;
  font-weight: 750;
}

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

.loading-retry {
  margin: 24px auto 0;
}

@keyframes loading-spin {
  to { transform: rotate(360deg); }
}

@keyframes loading-float {
  0%, 100% { transform: translateY(4px); }
  50% { transform: translateY(-5px); }
}

@keyframes loading-title-glow {
  0%, 100% {
    opacity: 0.58;
    filter: brightness(0.78);
    text-shadow: 0 0 0 rgba(0, 119, 85, 0);
  }
  50% {
    opacity: 1;
    filter: brightness(1.12);
    text-shadow: 0 0 18px rgba(0, 119, 85, 0.2);
  }
}

@keyframes loading-dot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.35; }
  30% { transform: translateY(-7px); opacity: 1; }
}

.result-screen {
  align-items: center;
}

.result-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(300px, 0.86fr) minmax(290px, 0.72fr);
  gap: clamp(22px, 3.5vw, 50px);
  align-items: center;
}

.result-copy h2 {
  margin-top: 14px;
}

.result-copy > p {
  margin-inline: 0;
}


.final-card-wrap {
  position: relative;
  width: min(100%, 380px);
  margin-inline: auto;
  perspective: 1000px;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.final-card-image {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 26px;
  box-shadow: 0 28px 80px rgba(8, 46, 41, 0.23);
  transition: filter 1.2s ease-in-out, opacity 1.2s ease-in-out;
}

.final-card-image-front {
  position: relative;
  z-index: 2;
  animation: result-card-front-float 9.5s ease-in-out infinite;
}

.final-card-image-back {
  position: absolute;
  z-index: 1;
  inset: 0;
  opacity: 0.78;
  filter: saturate(0.88) brightness(0.96);
  animation: result-card-back-float 11.7s ease-in-out infinite;
}

@keyframes result-card-front-float {
  0%, 100% { transform: translate(-3px, 2px) rotate(-1.8deg); }
  28% { transform: translate(4px, -7px) rotate(-0.6deg); }
  61% { transform: translate(-1px, -11px) rotate(-2.4deg); }
  82% { transform: translate(5px, -3px) rotate(-1.1deg); }
}

@keyframes result-card-back-float {
  0%, 100% { transform: translate(28px, 11px) rotate(5.5deg); }
  34% { transform: translate(36px, 2px) rotate(7deg); }
  67% { transform: translate(24px, -4px) rotate(4.2deg); }
  86% { transform: translate(33px, 8px) rotate(6.3deg); }
}

.final-card-wrap.is-protected .final-card-image {
  filter: blur(18px) saturate(0.45) brightness(0.72);
  opacity: 0.82;
}

.card-protection-label {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: min(88%, 280px);
  color: white;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.1em;
  text-align: center;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.98), 0 0 16px rgba(0, 0, 0, 0.9);
  text-transform: uppercase;
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.2s ease-in-out;
}

.card-protection-label svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 10px rgba(0, 0, 0, 0.75));
}

.final-card-wrap.is-protected .card-protection-label {
  opacity: 1;
}

.final-card-wrap.is-protected-immediate .final-card-image,
.final-card-wrap.is-protected-immediate .card-protection-label {
  transition: none;
}

.final-card {
  position: relative;
  width: min(100%, 380px);
  min-height: 540px;
  margin-inline: auto;
  padding: 14px;
  border: 8px solid var(--paper);
  border-radius: 30px;
  background: var(--paper);
  box-shadow: 0 28px 80px rgba(8, 46, 41, 0.23);
  transform: rotate(-1.5deg);
}

.final-card-topline {
  display: flex;
  justify-content: space-between;
  padding: 10px 9px 13px;
  color: var(--green);
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.final-card-picture {
  position: relative;
  height: 390px;
  overflow: hidden;
  border-radius: 19px;
  background: linear-gradient(145deg, #0b6e55, #ffd447);
}

.final-card-picture img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.candidate-seal {
  position: absolute;
  right: 17px;
  bottom: 17px;
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border: 4px solid white;
  border-radius: 50%;
  background: var(--green);
  color: white;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  font-weight: 900;
  box-shadow: 0 9px 24px rgba(8, 46, 41, 0.28);
}

.watermark-layer {
  position: absolute;
  inset: -30%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-content: space-around;
  gap: 28px;
  transform: rotate(-24deg);
  pointer-events: none;
}

.watermark-layer span {
  padding: 8px 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-align: center;
  text-shadow: 0 1px 10px rgba(8, 46, 41, 0.35);
}

.final-card-caption {
  display: grid;
  padding: 16px 10px 8px;
}

.final-card-caption > span {
  color: var(--green);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.final-card-caption strong {
  margin: 3px 0 5px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
}

.final-card-caption small {
  color: var(--ink-soft);
  font-size: 0.66rem;
}

.payment-card {
  min-width: 0;
  padding: 27px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 254, 249, 0.9);
  box-shadow: var(--shadow);
}

.payment-card h3 {
  margin: 10px 0 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.72rem;
  line-height: 1.05;
}

.payment-card ul {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.payment-card li::before {
  content: "✓";
  margin-right: 8px;
  color: var(--green);
  font-weight: 900;
}

.price-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.price-row span {
  color: var(--ink-soft);
  font-size: 0.76rem;
}

.price-row strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
}

.discount-summary {
  margin: 3px 0 0;
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 800;
  text-align: right;
}

.coupon-box {
  margin: 18px 0;
  padding-top: 15px;
  border-top: 1px dashed rgba(8, 46, 41, 0.13);
}

.coupon-box > label,
.pix-area > label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-soft);
  font-size: 0.64rem;
  font-weight: 750;
}

.coupon-row {
  display: flex;
  gap: 8px;
}

.coupon-row input {
  min-width: 0;
  flex: 1;
  height: 42px;
  border: 1px solid rgba(8, 46, 41, 0.16);
  border-radius: 12px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  outline: none;
}

.coupon-row input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(10, 107, 82, 0.1);
}

.coupon-row button,
.secondary-button {
  min-height: 42px;
  border: 1px solid rgba(8, 46, 41, 0.19);
  border-radius: 12px;
  padding: 0 14px;
  background: white;
  color: var(--ink);
  font-weight: 800;
}

#couponInput[readonly] {
  background: rgba(8, 46, 41, 0.06);
  cursor: not-allowed;
}

#applyCouponButton:disabled {
  border-color: #c8ccc9;
  background: #d9dcda;
  color: #747a76;
  cursor: not-allowed;
  opacity: 1;
}

#couponMessage,
.payer-field p,
.share-message {
  min-height: 1.1em;
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 0.68rem;
}

.payer-field {
  margin: -4px 0 18px;
}

.payer-field label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-soft);
  font-size: 0.64rem;
  font-weight: 750;
}

.payer-field input {
  width: 100%;
  height: 42px;
  border: 1px solid rgba(8, 46, 41, 0.16);
  border-radius: 12px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  outline: none;
}

.payer-field input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(10, 107, 82, 0.1);
}

.payer-field p.is-error {
  color: var(--red);
}

#couponMessage.is-error {
  color: var(--red);
}

.pix-area {
  margin: 18px 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
}

.pix-area img {
  width: min(180px, 100%);
  display: block;
  margin: 0 auto 14px;
}

.payment-button {
  width: 100%;
}

.payment-button:disabled {
  animation: none;
  opacity: 0.45;
  box-shadow: none;
}

.payment-button:disabled::after {
  animation: none;
  opacity: 0;
}

.demo-warning {
  margin: 12px 0 0;
  text-align: center;
}

.unlocked-panel > p {
  color: var(--ink-soft);
  line-height: 1.55;
}

.unlocked-actions {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.unlocked-actions .primary-button,
.unlocked-actions .secondary-button {
  width: 100%;
}

.payment-card.is-unlocked {
  border-color: rgba(10, 107, 82, 0.3);
  background: rgba(246, 255, 250, 0.94);
}

footer {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.72rem;
}

.footer-anthem {
  color: var(--green);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.9rem;
  font-style: italic;
  font-weight: 700;
  text-align: center;
}

.audio-toggle {
  position: fixed;
  z-index: 40;
  right: 18px;
  bottom: 18px;
  min-width: 72px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
  border: 1px solid rgba(8, 46, 41, 0.18);
  border-radius: 999px;
  background: rgba(255, 254, 249, 0.88);
  color: var(--ink-soft);
  box-shadow: 0 8px 24px rgba(8, 46, 41, 0.13);
  backdrop-filter: blur(12px);
  font-size: 0.72rem;
  font-weight: 800;
  opacity: 0.72;
  transition: opacity 180ms ease, color 180ms ease, border-color 180ms ease;
}

.audio-toggle:hover,
.audio-toggle:focus-visible,
.audio-toggle.is-playing {
  opacity: 1;
  color: var(--green);
  border-color: rgba(10, 107, 82, 0.38);
}

@media (max-width: 1120px) {
  .result-layout {
    grid-template-columns: 1fr 1fr;
  }

  .result-copy {
    grid-column: 1 / -1;
    max-width: 680px;
    margin-inline: auto;
    text-align: center;
  }
}

@media (max-width: 980px) {
  .welcome-screen {
    grid-template-columns: 1fr;
    padding-top: 72px;
    text-align: center;
  }

  .welcome-copy,
  .welcome-copy > p {
    margin-inline: auto;
  }

  .floating-stage {
    width: min(700px, 100%);
    margin-inline: auto;
  }

}

@media (max-width: 680px) {
  .topbar,
  footer,
  .screen {
    width: min(100% - 28px, 1180px);
  }

  .topbar {
    min-height: 70px;
  }

  .brand img {
    width: 150px;
    height: 47px;
  }

  .topbar-note {
    display: none;
  }

  .screen {
    min-height: calc(100vh - 122px);
    padding: 34px 0 48px;
  }

  .welcome-screen {
    padding-top: 24px;
    gap: 12px;
  }

  .welcome-copy {
    display: contents;
  }

  .welcome-copy .eyebrow {
    grid-row: 1;
  }

  .welcome-copy h1 {
    grid-row: 2;
    margin: 6px auto 0;
  }

  .welcome-copy > p {
    grid-row: 4;
    margin: 2px auto 10px;
    font-size: 0.98rem;
    line-height: 1.55;
  }

  .welcome-cta {
    grid-row: 5;
    justify-self: center;
  }

  .welcome-copy > small {
    grid-row: 6;
    margin-top: 0;
  }

  h1 {
    font-size: clamp(2.8rem, 13vw, 3.75rem);
  }

  .hero-flag-icon {
    right: 20px;
    bottom: -0.16em;
    width: 62px;
  }

  .floating-stage {
    grid-row: 3;
    min-height: 300px;
  }

  .flag-backdrop {
    width: 350px;
    height: 350px;
    top: 52%;
  }

  .example-card {
    width: 180px;
    border-width: 2px;
    border-radius: 18px;
  }

  .example-card-one {
    --card-left: 4%;
    --card-top: 24px;
  }

  .example-card-two {
    --card-left: calc(96% - 180px);
    --card-top: 46px;
  }

  .flow-card {
    padding: 25px 18px;
    border-radius: 24px;
  }

  .flow-heading h2,
  .result-copy h2 {
    font-size: clamp(2.35rem, 13vw, 3.6rem);
  }

  .flow-heading h2.two-line-title {
    font-size: clamp(1.75rem, 8.5vw, 3.05rem);
    line-height: 0.96;
  }

  .candidate-grid {
    grid-template-columns: 1fr 1fr;
  }

  .candidate-option {
    min-height: 110px;
    padding: 11px;
    flex-direction: column;
    align-items: flex-start;
  }

  .candidate-initials {
    width: 46px;
    height: 46px;
  }

  .flow-actions {
    align-items: center;
  }

  .flow-actions .primary-button {
    flex: none;
    width: 100%;
    padding-inline: 16px;
  }

  .result-layout {
    grid-template-columns: 1fr;
  }

  .result-copy {
    text-align: center;
  }

  .final-card {
    width: min(92vw, 380px);
  }

  .payment-card {
    width: min(92vw, 390px);
    margin-inline: auto;
  }

  footer {
    flex-direction: column;
    justify-content: center;
    padding: 12px 0;
    text-align: center;
  }

  .audio-toggle {
    right: 12px;
    bottom: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .final-card-image {
    filter: blur(22px) brightness(0.55) !important;
  }
}
