:root {
  --fv-navy: #10184f;
  --fv-navy-2: #1c2a68;
  --fv-coral: #ff514d;
  --fv-ink: #111738;
  --fv-muted: #5f6783;
  --fv-line: #e7eaf3;
  --fv-soft-blue: #edf5ff;
  --fv-soft-coral: #fff0ef;
  color: var(--fv-ink);
  background: #f7f9fd;
  font-family: "DM Sans", ui-sans-serif, system-ui, sans-serif;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--fv-ink);
  background:
    radial-gradient(circle at 84% 5%, rgba(225, 240, 255, .85), transparent 28rem),
    linear-gradient(180deg, #fff 0, #f7f9fd 34rem);
}

.lab-header {
  width: 100%;
  height: 92px;
  padding: 0 max(24px, calc((100vw - 1320px) / 2));
  border-bottom: 1px solid var(--fv-line);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(16px);
}
.lab-header a { color: var(--fv-navy); }
.lab-brand { width: auto; display: inline-flex; align-items: center; gap: 12px; }
.lab-brand-mark { width: 52px; height: 52px; flex: 0 0 52px; object-fit: contain; }
.lab-brand-wordmark { width: 190px; height: auto; }
.back-to-site {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  border: 1px solid var(--fv-line);
  border-radius: 999px;
  background: #fff;
  transition: transform .2s ease, border-color .2s ease;
}
.back-to-site:hover { transform: translateY(-2px); border-color: rgba(255, 81, 77, .48); }

.lab-shell.public-shell {
  width: min(1160px, calc(100% - 48px));
  max-width: none;
  padding: 82px 0 112px;
}
.public-intro { max-width: 930px; margin-bottom: 58px; }
.lab-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  color: #58617e;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .22em;
}
.lab-eyebrow > span { width: 36px; height: 2px; border-radius: 99px; background: var(--fv-coral); }
.lab-intro h1 {
  max-width: 900px;
  margin-bottom: 28px;
  color: var(--fv-navy);
  font-family: "Manrope", "DM Sans", sans-serif;
  font-size: clamp(4rem, 7vw, 6.8rem);
  font-weight: 800;
  letter-spacing: -.07em;
  line-height: .95;
}
.lab-intro h1 em { color: var(--fv-coral); font-style: normal; font-weight: inherit; }
.public-intro > p:last-of-type {
  max-width: 720px;
  margin-bottom: 0;
  color: #505a78;
  font-size: 1.15rem;
  line-height: 1.7;
}
.intro-trust {
  margin: 30px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 26px;
  color: var(--fv-navy);
  list-style: none;
  font-size: .88rem;
  font-weight: 700;
}
.intro-trust li { display: flex; align-items: center; gap: 8px; }
.intro-trust span { color: var(--fv-coral); font-size: 1rem; }

.checkout-action-row {
  margin-top: 22px;
  display: grid;
  grid-template-columns: minmax(230px, auto) minmax(280px, 1fr);
  align-items: start;
  gap: 16px;
}
.checkout-action-row .restore-button { width: 100%; margin: 0; }
.invitation-compact { min-width: 0; }
.invitation-compact input {
  width: 100%;
  min-width: 0;
  height: 58px;
  padding: 0 18px;
  color: var(--fv-navy);
  border: 1px solid #cfd8e8;
  border-radius: 999px;
  background: #f8faff;
  font-size: .88rem;
  font-weight: 600;
  letter-spacing: .01em;
  text-transform: uppercase;
}
.invitation-compact input::placeholder { color: #7f89a2; text-transform: none; }
.invitation-compact input:focus { border-color: var(--fv-coral); outline: 3px solid rgba(255, 81, 77, .16); }
.invitation-compact input[aria-invalid="true"] { border-color: #b53636; }
.invitation-code-status { margin: 7px 18px 0; color: var(--fv-muted); font-size: .72rem; }
.invitation-code-status[data-state="error"] { color: #b53636; }
.invitation-code-status[data-state="success"] { color: #14713e; font-weight: 700; }

.lab-form { gap: 24px; }
.lab-card {
  padding: 40px;
  border: 1px solid var(--fv-line);
  border-radius: 26px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 18px 55px rgba(16, 24, 79, .07);
}
.lab-card-heading { align-items: center; gap: 22px; margin-bottom: 30px; }
.step-card-icon { width: 76px; height: 76px; flex: 0 0 76px; }
.lab-card-heading .step-kicker { margin: 0 0 5px; color: var(--fv-coral); font-size: .68rem; font-weight: 800; letter-spacing: .18em; }
.lab-card-heading h2 {
  margin-bottom: 6px;
  color: var(--fv-navy);
  font-family: "Manrope", "DM Sans", sans-serif;
  font-size: clamp(1.55rem, 2.3vw, 2rem);
  font-weight: 800;
  letter-spacing: -.035em;
}
.lab-card-heading p:not(.step-kicker) { color: var(--fv-muted); font-size: .93rem; }

.public-product > span {
  position: relative;
  padding: 28px 70px 28px 28px;
  border: 2px solid var(--fv-line);
  border-radius: 18px;
  background: #f8faff;
}
.public-product > span::after {
  content: "✓";
  position: absolute;
  top: 50%;
  right: 26px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 50%;
  background: var(--fv-coral);
  font-size: .9rem;
  opacity: 0;
  transform: translateY(-50%);
}
.public-product strong { color: var(--fv-navy); font-family: "Manrope", "DM Sans", sans-serif; font-size: 1.35rem; font-weight: 800; }
.public-product b { align-self: center; display: flex; align-items: baseline; gap: 8px; color: var(--fv-coral); line-height: .9; }
.price-value { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 800; letter-spacing: -.065em; }
.price-currency { color: var(--fv-navy); font-size: .85rem; font-weight: 800; letter-spacing: .08em; }
.public-product small { color: var(--fv-muted); }
.public-product input:checked + span { border-color: var(--fv-coral); background: #fff; box-shadow: 0 12px 28px rgba(255, 81, 77, .1); }
.public-product input:checked + span::after { opacity: 1; }
.public-product input:focus-visible + span { outline-color: rgba(255, 81, 77, .35); }

.family-pack-prompt { margin: 20px 4px 0; color: var(--fv-muted); font-size: .94rem; line-height: 1.5; }
.family-pack-prompt a { color: var(--fv-coral); font-weight: 700; text-decoration: none; }
.family-pack-prompt a:hover { text-decoration: underline; text-underline-offset: 4px; }
.family-pack-prompt a:focus-visible { outline: 3px solid rgba(255, 81, 77, .3); outline-offset: 4px; border-radius: 4px; }

.drop-zone {
  min-height: 270px;
  padding: 32px;
  color: var(--fv-navy);
  border: 2px dashed #bac7df;
  border-radius: 22px;
  background: #f7faff;
}
.drop-zone::before {
  content: "";
  width: 78px;
  height: 78px;
  margin-bottom: 10px;
  background: url("assets/icons/paso-01-subir-foto.svg") center / contain no-repeat;
}
.drop-zone:hover,
.drop-zone.is-dragging { border-color: var(--fv-coral); background: var(--fv-soft-coral); }
.drop-zone strong { font-size: 1.18rem; }
.drop-zone span { color: var(--fv-muted); }

.source-preview { padding: 22px; border: 1px solid var(--fv-line); border-radius: 20px; background: #f8faff; }
.source-preview img { border-radius: 14px; background: #eef1f7; }
.source-preview span { color: var(--fv-muted); }
.source-preview button { color: var(--fv-navy); border-bottom-color: var(--fv-coral); }

.privacy-check { padding: 18px 20px; color: #485272; border: 1px solid #dce7f7; border-radius: 16px; background: var(--fv-soft-blue); }
.privacy-check input { accent-color: var(--fv-coral); }
.turnstile-container { margin-top: 20px; }

.restore-button,
.download-button {
  min-height: 58px;
  padding: 16px 28px;
  color: #fff;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--fv-coral), #ff625c);
  box-shadow: 0 14px 30px rgba(255, 81, 77, .22);
  transition: transform .2s ease, box-shadow .2s ease;
}
.restore-button:hover:not(:disabled),
.download-button:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 18px 36px rgba(255, 81, 77, .3); }
.restore-button:disabled { opacity: .42; box-shadow: none; }
.secondary-button { min-height: 56px; padding: 15px 24px; color: var(--fv-navy); border: 1.5px solid var(--fv-navy); border-radius: 999px; background: #fff; }
.lab-status { color: var(--fv-muted); }
.lab-status[data-state="error"] { color: #b53636; }
.lab-status[data-state="success"] { color: #14713e; }
.lab-status[data-state="processing"] { color: var(--fv-navy-2); }

.restore-support {
  margin-top: 24px;
  padding: 24px 28px;
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 18px;
  color: #fff;
  border-radius: 22px;
  background: var(--fv-navy);
}
.restore-support > img { width: 56px; height: 56px; }
.restore-support strong { display: block; margin-bottom: 4px; font-size: 1rem; }
.restore-support p { margin: 0; color: #bdc6e3; font-size: .88rem; line-height: 1.5; }
.restore-support a { min-height: 46px; padding: 0 20px; display: inline-flex; align-items: center; justify-content: center; color: var(--fv-navy); border-radius: 999px; background: #fff; text-decoration: none; font-size: .85rem; font-weight: 800; white-space: nowrap; }

.public-order-card { margin-top: 24px; }
.public-order-total { padding: 22px 24px; border-color: var(--fv-line); border-radius: 16px; background: #f8faff; }
.public-order-total span { color: var(--fv-muted); }
.public-order-total strong { color: var(--fv-navy); }

.processing-panel { padding: 42px; border: 0; border-radius: 28px; background: var(--fv-navy); box-shadow: 0 24px 60px rgba(16, 24, 79, .2); }
.processing-indicator::before { border-top-color: var(--fv-coral); border-right-color: var(--fv-coral); }
.processing-panel .lab-eyebrow,
.lab-result .lab-eyebrow { color: #bdc6e3; }
.processing-content h2 { font-family: "Manrope", "DM Sans", sans-serif; font-weight: 800; letter-spacing: -.04em; }
.processing-stages li.is-active { border-color: var(--fv-coral); background: rgba(255, 81, 77, .12); }
.processing-stages li.is-active span { border-color: var(--fv-coral); background: var(--fv-coral); }

.lab-result { margin-top: 32px; padding: 38px; border-radius: 28px; background: var(--fv-navy); box-shadow: 0 24px 60px rgba(16, 24, 79, .2); }
.lab-result-heading h2 { font-family: "Manrope", "DM Sans", sans-serif; font-weight: 800; letter-spacing: -.04em; }
.lab-compare { border-radius: 20px; background: #080d2e; }
.compare-divider::after { content: "‹ ›"; position: absolute; top: 50%; left: 50%; width: 48px; height: 48px; display: grid; place-items: center; color: var(--fv-navy); border-radius: 50%; background: #fff; box-shadow: 0 5px 20px rgba(0, 0, 0, .28); font-size: 1.05rem; font-weight: 800; transform: translate(-50%, -50%); }
.lab-compare:has(input:focus-visible) { outline: 3px solid var(--fv-coral); outline-offset: 4px; }
.download-button { color: #fff; background: linear-gradient(135deg, var(--fv-coral), #ff625c); }

.restore-button:focus-visible,
.download-button:focus-visible,
.secondary-button:focus-visible,
.back-to-site:focus-visible,
.restore-support a:focus-visible { outline: 3px solid rgba(255, 81, 77, .35); outline-offset: 4px; }

@media (max-width: 720px) {
  .lab-header { height: 72px; padding: 0 16px; }
  .lab-brand { gap: 8px; }
  .lab-brand-mark { width: 42px; height: 42px; flex-basis: 42px; }
  .lab-brand-wordmark { width: 138px; }
  .back-to-site { min-height: 40px; padding: 0 13px; font-size: .75rem !important; }
  .back-to-site span { display: none; }
  .lab-shell.public-shell { width: min(100% - 28px, 560px); padding: 52px 0 76px; }
  .public-intro { margin-bottom: 40px; }
  .lab-intro h1 { font-size: clamp(3.15rem, 15vw, 4.6rem); }
  .public-intro > p:last-of-type { font-size: 1rem; }
  .intro-trust { align-items: flex-start; flex-direction: column; }
  .checkout-action-row { grid-template-columns: 1fr; }
  .lab-card { padding: 26px 20px; border-radius: 22px; }
  .lab-card-heading { align-items: flex-start; gap: 16px; }
  .step-card-icon { width: 62px; height: 62px; flex-basis: 62px; }
  .public-product > span { grid-template-columns: 1fr; padding: 24px 58px 24px 22px; }
  .public-product b,
  .public-product small { grid-column: 1; }
  .public-product > span::after { right: 18px; }
  .drop-zone { min-height: 240px; padding: 24px 18px; }
  .source-preview { padding: 16px; }
  .restore-button,
  .secondary-button { width: 100%; }
  .restore-support { grid-template-columns: 48px 1fr; padding: 22px 20px; }
  .restore-support > img { width: 48px; height: 48px; }
  .restore-support a { grid-column: 1 / -1; width: 100%; }
  .processing-panel,
  .lab-result { padding: 28px 20px; border-radius: 22px; }
}

@media (max-width: 440px) {
  .lab-brand-wordmark { width: 118px; }
  .back-to-site { padding-inline: 11px; }
  .processing-stages { grid-template-columns: 1fr; }
  .lab-compare { min-height: 440px; }
}

@media (prefers-reduced-motion: reduce) {
  .back-to-site,
  .restore-button,
  .download-button { transition: none; }
}

/* All input methods share the existing photo preview and restoration form. */
.photo-input-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:16px}
.photo-input-actions .secondary-button{border-radius:14px;min-height:48px}
.photo-input-actions button:disabled{opacity:.45;cursor:not-allowed}
.photo-input-help{color:var(--fv-muted);font-size:.88rem;line-height:1.6;margin:12px 0 18px}
@media(max-width:560px){.photo-input-actions>*{flex:1 1 180px}}
