:root {
  --bg: #f5f5f7;
  --bg-soft: #ffffff;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --surface-muted: rgba(0, 0, 0, 0.035);
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.14);
  --text: #1d1d1f;
  --text-secondary: rgba(29, 29, 31, 0.68);
  --text-muted: #6e6e73;
  --hero-title-blue: #1D1D1E;
  --accent: #1d1d1f;
  --accent-soft: rgba(29, 29, 31, 0.12);
  --success: #68d391;
  --danger: #f87171;
  --shadow: 0 28px 90px rgba(29, 29, 31, 0.12);
  --radius: 22px;
  --radius-sm: 14px;
  --radius-pill: 999px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", system-ui, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  padding: 32px 18px 72px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: none;
}

.shell {
  max-width: 1220px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.4s ease;
}

body.loaded .shell {
  opacity: 1;
}

body::after {
  content: none;
}

button,
input,
select,
textarea,
[role="button"] {
  touch-action: manipulation;
}

.shell-toolbar {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 20;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  animation: toggleEntrance 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) 0.1s both;
  transition: background 0.3s ease, box-shadow 0.3s ease,
              backdrop-filter 0.3s ease, -webkit-backdrop-filter 0.3s ease,
              border-radius 0.3s ease, padding 0.3s ease;
}

.shell-toolbar.scrolled {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
  border-radius: var(--radius-pill);
  padding: 4px 6px;
}

.header {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.65fr);
  gap: 22px;
  margin-bottom: 26px;
  align-items: stretch;
}

.hero,
.hero-note,
.preview-card-wrap,
.pay-section,
.result-box,
.generating-msg {
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: var(--shadow);
}

.panel {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.hero {
  border-radius: 30px;
  padding: 32px;
  position: relative;
  overflow: hidden;
  min-height: 300px;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 20%, rgba(29,29,31,0.12), transparent 34%),
    radial-gradient(circle at 78% 14%, rgba(255,255,255,0.72), transparent 22%),
    linear-gradient(135deg, rgba(255,255,255,0.52), transparent 52%);
}

.hero::after {
  content: '';
  position: absolute;
  inset: auto -40px -80px auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 1px solid rgba(29,29,31,0.14);
  opacity: 0.46;
}

.hero-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(390px, 1fr) minmax(280px, 360px);
  gap: clamp(58px, 6vw, 92px);
  align-items: center;
}

.hero-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: 520px;
  padding-right: 10px;
}

.hero-heading {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hero-art-wrap {
  position: relative;
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 270px;
  padding-right: 18px;
}

.hero-art-wrap::before {
  content: '';
  position: absolute;
  inset: auto 10% 0 10%;
  height: 26%;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(29,29,31,0.16), transparent 58%),
    radial-gradient(circle at 50% 30%, rgba(255,255,255,0.86), transparent 62%);
  filter: blur(20px);
  opacity: 0;
}

.hero-art-wrap::after {
  content: none;
}

.hero-art-stack {
  position: relative;
  z-index: 1;
  width: min(100%, 268px);
  height: 270px;
  display: grid;
  place-items: center;
  transform: translate(-8px, 18px);
  animation: fadeInUpArt 0.7s cubic-bezier(0.16,1,0.3,1) 360ms both;
}

.hero-art {
  position: absolute;
  inset: auto;
  max-width: 100%;
  max-height: 100%;
  display: block;
  object-fit: contain;
  border-radius: 18px;
  filter:
    saturate(0.78)
    brightness(1.08)
    drop-shadow(0 28px 48px rgba(29, 29, 31, 0.18));
  opacity: 0;
  transform: translateX(34px) scale(0.985);
  animation: heroImageSwap 12s ease-in-out infinite both;
}

.hero-art-main {
  width: min(100%, 268px);
}

.hero-art-feature {
  height: 100%;
  border-radius: 22px;
}

.hero-art-slide-1 {
  animation-delay: 0s;
}

.hero-art-slide-2 {
  animation-delay: 4s;
}

.hero-art-slide-3 {
  animation-delay: 8s;
}

.hero-art-mobile {
  display: none;
}

.hero-topline,
.brand-lockup,
.panel-title,
.mini-label,
.card-kicker,
.cp-qr-label,
.qr-label,
.meta-label {
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 700;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
  line-height: 1;
  color: var(--text);
}

.brand-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.brand-wordmark {
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -0.055em;
  text-transform: none;
}

.brand-symbol {
  width: 17px;
  height: 12px;
  display: block;
  overflow: visible;
}

.brand-symbol path {
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.logo-dot {
  width: 18px;
  height: 14px;
  display: block;
  overflow: visible;
  filter:
    brightness(1.12)
    saturate(0.92)
    drop-shadow(0 0 14px rgba(96, 126, 255, 0.24));
}

.logo-dot path,
.cp-mark path {
  fill: none;
  stroke: rgba(29,29,31,0.86);
  stroke-width: 3;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

h1 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", system-ui, Helvetica, Arial, sans-serif;
  font-size: clamp(34px, 2.75vw, 44px);
  line-height: 0.94;
  letter-spacing: -0.05em;
  max-width: min(100%, 500px);
  color: var(--hero-title-blue);
}

.hero-title-line,
.hero-title-support {
  display: block;
}

.hero-title-line {
  white-space: nowrap;
  animation: fadeInUp 0.7s cubic-bezier(0.16,1,0.3,1) 0ms both;
}

.hero-title-support {
  margin-top: 4px;
  font-size: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  font-weight: inherit;
  color: var(--hero-title-blue);
  max-width: none;
  white-space: nowrap;
  animation: fadeInUp 0.7s cubic-bezier(0.16,1,0.3,1) 120ms both;
}

.subtitle {
  max-width: none;
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.7;
  animation: fadeInUp 0.7s cubic-bezier(0.16,1,0.3,1) 240ms both;
}

.subtitle-line {
  display: block;
  white-space: nowrap;
}

.lang-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.76);
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 14px 34px rgba(29,29,31,0.08), inset 0 1px 0 rgba(255,255,255,0.88);
  overflow: hidden;
}

.lang-toggle::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 6px;
  width: 46px;
  height: calc(100% - 12px);
  border-radius: var(--radius-pill);
  background: rgba(29,29,31,0.92);
  box-shadow: 0 9px 22px rgba(29,29,31,0.16);
  transition: transform 0.34s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.lang-toggle.lang-en::before {
  transform: translateX(52px);
}

.lang-btn {
  position: relative;
  z-index: 1;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-pill);
  width: 46px;
  padding: 9px 14px;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 700;
  font-family: inherit;
  transition: 0.2s ease;
}

.lang-btn.active {
  color: #fff;
}

@keyframes toggleEntrance {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

@keyframes fadeInUpArt {
  from { opacity: 0; transform: translate(-8px, 38px); }
  to   { opacity: 1; transform: translate(-8px, 18px); }
}

@keyframes fadeInUpArtMobile {
  from { opacity: 0; transform: translateY(34px); }
  to   { opacity: 1; transform: translateY(14px); }
}

@keyframes heroImageSwap {
  0%    { opacity: 0; transform: translateX(34px) scale(0.985); }
  4%    { opacity: 1; transform: translateX(0) scale(1); }
  29%   { opacity: 1; transform: translateX(0) scale(1); }
  33%   { opacity: 0; transform: translateX(-34px) scale(0.985); }
  100%  { opacity: 0; transform: translateX(-34px) scale(0.985); }
}

@keyframes float {
  0%, 100% { transform: translate(-8px, 18px); }
  50%       { transform: translate(-8px, 8px); }
}

.hero-note {
  border-radius: 26px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 18px;
  min-height: 260px;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.7s cubic-bezier(0.16,1,0.3,1) 360ms both;
}

.hero-note::after { content: none; }

.note-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.note-card p {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 15px;
}

.note-metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.metric {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.58);
  border: 1px solid rgba(0,0,0,0.07);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16,1,0.3,1),
              transform 0.6s cubic-bezier(0.16,1,0.3,1);
}

.metric.revealed {
  opacity: 1;
  transform: none;
}

.metric strong {
  display: block;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", system-ui, Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.15;
  letter-spacing: -0.05em;
  margin-bottom: 4px;
}

.metric span {
  color: var(--text-secondary);
  font-size: 13px;
}

.layout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: stretch;
  margin-top: 40px;
}

.form-stack {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.preview-panel {
  grid-column: 3;
}

.panel {
  border-radius: 24px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.16,1,0.3,1),
              transform 0.6s cubic-bezier(0.16,1,0.3,1),
              box-shadow 0.3s ease;
}

.panel.revealed {
  opacity: 1;
  transform: none;
}

.panel:hover {
  box-shadow: var(--shadow), 0 4px 24px rgba(0,0,0,0.07);
}

.panel::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.72), transparent 42%);
}

.panel-title {
  color: var(--text-muted);
  margin-bottom: 16px;
}

.field {
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.card-type-switch {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: 20px;
  background: rgba(255,255,255,0.56);
}

.card-type-eyebrow {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.card-type-control {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(0,0,0,0.045);
}

.card-type-option {
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(29,29,31,0.58);
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.card-type-option.active {
  background: rgba(255,255,255,0.92);
  color: #1d1d1f;
  box-shadow: 0 10px 26px rgba(29,29,31,0.09), inset 0 1px 0 rgba(255,255,255,0.9);
}

.card-type-option:hover {
  transform: translateY(-1px);
}

.card-type-hint {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.45;
}

.is-company-flow #name-field,
.is-company-flow #role-field,
.is-company-flow #avatar-upload-field {
  display: none;
}

.is-company-flow .upload-grid {
  grid-template-columns: 1fr;
}

.field:last-child {
  margin-bottom: 0;
}

label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 700;
}

input[type=text],
input[type=email],
input[type=tel],
select {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.78);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
  outline: none;
}

@media (max-width: 720px) {
  input,
  select,
  textarea {
    font-size: 16px;
  }
}

input[type=text]::placeholder,
input[type=email]::placeholder,
input[type=tel]::placeholder {
  color: rgba(29,29,31,0.32);
}

input[type=text]:focus,
input[type=email]:focus,
input[type=tel]:focus,
select:focus {
  border-color: rgba(29,29,31,0.58);
  background: rgba(255,255,255,0.94);
  box-shadow: 0 0 0 5px rgba(29,29,31,0.1);
}

.field-note {
  margin: 8px 2px 0;
  color: #6e6e73;
  font-size: 11px;
  line-height: 1.45;
}

select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236e6e73' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
}

.phone-field {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 10px;
}

.country-select {
  width: 100% !important;
  padding-right: 16px !important;
  background-image: none !important;
}

.colors {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.color-field {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.color-swatch-btn {
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  border: none;
}

.color-swatch-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}

.color-field-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
  letter-spacing: 0.01em;
}

input[type=color] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  border: none;
  padding: 0;
  margin: 0;
  -webkit-appearance: none;
}

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

.visual-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
}

.visual-section + .visual-section {
  border-top: 1px solid rgba(0,0,0,0.08);
  padding-top: 20px;
}

.visual-section .panel-title {
  margin-bottom: 16px;
}

.upload-area {
  min-height: 118px;
  border-radius: 20px;
  border: 1px dashed rgba(29,29,31,0.26);
  background:
    linear-gradient(180deg, rgba(29,29,31,0.055), transparent),
    rgba(255,255,255,0.68);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  text-align: center;
  padding: 14px;
  position: relative;
  overflow: hidden;
  transition: 0.2s ease;
  cursor: pointer;
}

.upload-area:hover {
  border-color: rgba(29,29,31,0.5);
  transform: translateY(-1px);
}

.upload-area input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-preview {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 16px;
  display: none;
  box-shadow: 0 14px 38px rgba(29,29,31,0.12);
}

.upload-preview.round {
  border-radius: 16px;
}

.upload-area p {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
  max-width: 14ch;
}

.upload-area.uploaded p {
  color: var(--accent);
  font-weight: 700;
}

.social-primary-grid,
.social-extra-grid,
.calendar-grid {
  display: grid;
  gap: 10px;
}

.social-primary-grid {
  margin-bottom: 12px;
}

.social-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(0,0,0,0.07);
  background: rgba(255,255,255,0.62);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  cursor: text;
  margin-bottom: 0;
  -webkit-tap-highlight-color: transparent;
}

.social-card:hover,
.social-card.active {
  border-color: rgba(29,29,31,0.38);
  background: linear-gradient(135deg, rgba(29,29,31,0.09), rgba(255,255,255,0.72));
  box-shadow: inset 0 0 0 1px rgba(29,29,31,0.06), 0 12px 32px rgba(29,29,31,0.08);
}

@media (hover: hover) and (pointer: fine) {
  .social-card:hover {
    transform: scale(1.02);
  }
}

.social-card:active {
  transform: none;
}

.social-card svg {
  flex-shrink: 0;
}

.social-card-body {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.social-card-title {
  display: block;
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
}

.social-card input {
  width: 100%;
  border: none;
  background: transparent;
  padding: 0;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  outline: none;
  box-shadow: none;
  text-transform: lowercase;
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
  touch-action: auto;
}

.field input,
.phone-number {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
  touch-action: auto;
}

.social-card input::placeholder {
  color: rgba(29,29,31,0.3);
  /* El valor se escribe en minúscula; el placeholder ("Tu LinkedIn") conserva su forma */
  text-transform: none;
}

.social-more {
  border-radius: 18px;
  border: 1px solid rgba(0,0,0,0.07);
  background: rgba(255,255,255,0.6);
  overflow: hidden;
}

.social-more[open] {
  border-color: rgba(29,29,31,0.22);
  background: rgba(255,255,255,0.74);
}

.social-more summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  user-select: none;
}

.social-more summary::-webkit-details-marker {
  display: none;
}

.social-more summary::after {
  content: '+';
  font-size: 18px;
  line-height: 1;
  color: var(--text-muted);
}

.social-more[open] summary::after {
  content: '−';
}

.social-extra-grid {
  padding: 0 14px 14px;
}

#card-twitter { order: 1; }
#card-facebook { order: 2; }
#card-youtube { order: 3; }
#card-spotify { order: 4; }
#card-twitch { order: 5; }

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

.calendar-card input {
  text-transform: none;
}

.preview-panel {
  display: block;
}

.preview-card-wrap {
  border-radius: 28px;
  padding: 22px;
  position: sticky;
  top: 24px;
  overflow: hidden;
  background: rgba(255,255,255,0.92);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.preview-label {
  position: relative;
  z-index: 1;
  color: var(--text-muted);
  margin-bottom: 14px;
  display: block;
  text-transform: none;
  letter-spacing: normal;
  font-size: 11px;
  font-weight: 600;
}

.preview-wrap {
  position: relative;
  z-index: 1;
}

.card-preview {
  --accent-live: var(--accent);
  --preview-block-bg: rgba(255,255,255,0.64);
  --preview-block-border: rgba(0,0,0,0.075);
  --preview-label-color: rgba(29,29,31,0.42);
  width: 100%;
  border-radius: 28px;
  padding: 24px;
  min-height: 540px;
  position: relative;
  overflow: hidden;
  background: #f5f5f7;
  color: #1d1d1f;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.86);
}

.card-preview::before { content: none; }

.watermark {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.watermark::before {
  content: 'DICARD · PREVIEW · DICARD · PREVIEW · DICARD';
  position: absolute;
  top: 55%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-32deg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", system-ui, Helvetica, Arial, sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: rgba(128, 128, 128, 0.18);
  white-space: nowrap;
}

.cp-metal-bar {
  display: none;
}

.cp-mark {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 1;
  width: 18px;
  height: 14px;
  overflow: visible;
  opacity: 0.88;
  filter: none;
}

.cp-logo-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}

.cp-logo-img {
  width: auto;
  height: 28px;
  max-width: 120px;
  border-radius: 10px;
  object-fit: contain;
  display: none;
}

.cp-logo {
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 16px;
}

.cp-top {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px;
  gap: 18px;
  align-items: start;
  margin-bottom: 22px;
}

.card-preview.company-preview .cp-top {
  grid-template-columns: minmax(0, 1fr) 104px;
  gap: 16px;
  align-items: start;
  margin: 16px 0 18px;
}

.card-preview.company-preview .cp-mark {
  top: 4px;
  right: 22px;
}

.card-preview.company-preview .cp-role {
  display: none;
}

.card-preview.company-preview .cp-name {
  max-width: 13ch;
  min-height: auto;
  font-size: 34px;
  line-height: 1;
}

.card-preview.company-preview .cp-logo-wrap {
  display: none;
}

.card-preview.company-preview .cp-avatar {
  width: 104px;
  height: 104px;
  padding: 10px;
  border-radius: 24px;
  background: var(--preview-block-bg) !important;
  border-color: var(--preview-block-border);
  margin-top: 2px;
}

.card-preview.company-preview.has-company-logo .cp-avatar {
  padding: 0;
  background: transparent !important;
  border-color: transparent;
}

.card-preview.company-preview .cp-avatar img {
  object-fit: contain;
}

.cp-company-slogan {
  position: relative;
  z-index: 1;
  display: block;
  max-width: 23ch;
  margin-top: 11px;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 700;
  letter-spacing: -0.01em;
  opacity: 0.58;
}

.cp-company-slogan:empty {
  display: none;
}

.cp-role {
  text-transform: none;
  letter-spacing: 0.04em;
  font-size: 11px;
  font-weight: 600;
  color: var(--preview-label-color, rgba(29,29,31,0.42));
  margin-bottom: 8px;
}

.cp-name {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", system-ui, Helvetica, Arial, sans-serif;
  font-size: 34px;
  line-height: 0.98;
  letter-spacing: -0.06em;
  max-width: 8ch;
  min-height: 67px;
}

.cp-avatar {
  width: 88px;
  height: 88px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", system-ui, Helvetica, Arial, sans-serif;
  font-size: 28px;
  font-weight: 700;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: none;
  margin-top: -14px;
}

.cp-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
  border-radius: 0 !important;
  clip-path: none !important;
}

.cp-meta {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.cp-meta-card {
  border-radius: 18px;
  border: 1px solid var(--preview-block-border);
  background: var(--preview-block-bg);
  padding: 12px 14px;
}

.meta-label {
  color: var(--preview-label-color);
  margin-bottom: 4px;
  display: block;
}

.cp-info,
.cp-site {
  font-size: 13px;
  line-height: 1.5;
  min-height: 18px;
}

.cp-contact-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.cp-contact-row .cp-info {
  min-height: auto;
}

.cp-contact-row .cp-contact-phone {
  flex-shrink: 0;
  white-space: nowrap;
}

.cp-contact-row .cp-contact-email {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cp-contact-row .cp-contact-phone:not(:empty):not([style*="display: none"]) + .cp-contact-email:not(:empty):not([style*="display: none"])::before {
  content: '';
  display: inline-block;
  width: 1px;
  height: 12px;
  background: color-mix(in srgb, currentColor 22%, transparent);
  margin-right: 10px;
  flex-shrink: 0;
  pointer-events: none;
}

body.ce-final .cp-contact-row:has(.cp-contact-phone.is-ghost) .cp-contact-email::before,
body.ce-final .cp-contact-row:has(.cp-contact-email.is-ghost) .cp-contact-email::before {
  display: none !important;
}

.cp-site {
  letter-spacing: 0.04em;
  word-break: break-word;
  color: inherit;
  text-transform: none;
}

.cp-socials {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 18px;
  min-height: 36px;
}

.cp-social-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--preview-block-border);
  background: var(--preview-block-bg);
  color: currentColor;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cp-social-badge svg {
  flex-shrink: 0;
}

.cp-social-badge--scheduling {
  width: 34px;
  height: 34px;
  padding: 0;
  justify-content: center;
}

.scheduling-provider-icon {
  display: block;
  width: 15px;
  height: 15px;
  color: currentColor;
}

.scheduling-provider-icon--hubspot { color: #ff7a59; }
.scheduling-provider-icon--calendly { color: #006bff; }
.scheduling-provider-icon--google-calendar { color: #4285f4; }

.cp-divider {
  height: 1px;
  opacity: 0.12;
  margin-bottom: 18px;
}

.cp-footer {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  justify-items: center;
  align-items: center;
}

.cp-signoff {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 80px;
  justify-content: flex-end;
  width: 100%;
}

.mini-label {
  color: rgba(29,29,31,0.4);
}

.cp-signoff p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.cp-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 150px;
}

#qr-canvas {
  display: block;
  width: 130px;
  height: 130px;
  border-radius: 14px;
  background: white;
  padding: 6px;
  flex-shrink: 0;
}

.cp-qr-label {
  display: block;
  font-size: 9px;
  font-weight: 700;
  /* El color de texto del tema, como en la tarjeta pública (.qr-label usa --card-text). Un gris fijo
     daba 3,4:1 en Océano, 2,7:1 en Grafito y 1,07:1 en Rojo EPM. */
  color: inherit;
  margin-top: 6px;
  letter-spacing: 0.10em;
  text-transform: lowercase;
  text-align: center;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
  max-width: 130px;
  min-height: 12px;
}

.pay-section,
.result-box,
.generating-msg {
  border-radius: 24px;
  padding: 30px 28px;
}

.purchase-copy {
  text-align: center;
  margin-bottom: 18px;
}

.purchase-copy h3 {
  font-size: 24px;
  line-height: 1.08;
  letter-spacing: -0.04em;
  margin-bottom: 10px;
}

.purchase-copy p {
  max-width: 48ch;
  margin: 0 auto;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

.price-tag {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.price-tag::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -80%;
  width: 50%;
  height: 200%;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255,255,255,0.75) 50%,
    transparent 70%
  );
  animation: shine 3s ease-in-out 2s infinite;
  pointer-events: none;
}

.price-amount {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", system-ui, Helvetica, Arial, sans-serif;
  font-size: 36px;
  letter-spacing: -0.05em;
}

.price-kicker {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.terms-consent {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 14px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}

.terms-consent input {
  width: 16px;
  height: 16px;
  accent-color: var(--text);
  flex: 0 0 auto;
}

.terms-consent.needs-attention {
  animation: consent-nudge 0.42s ease;
  color: var(--text);
}

@keyframes consent-nudge {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-3px); }
}

.terms-link {
  border: none;
  padding: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.stripe-btn-wrap {
  position: relative;
  text-align: center;
  width: 100%;
}

stripe-buy-button {
  display: inline-block;
}

.checkout-gate {
  position: absolute;
  inset: 0;
  z-index: 2;
  cursor: pointer;
  border: 0;
  background: transparent;
}

.checkout-gate.unlocked {
  display: none;
}

.terms-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(245,245,247,0.56);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.terms-modal.active {
  display: flex;
}

.terms-dialog {
  width: min(100%, 520px);
  border-radius: 24px;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.94);
  box-shadow: var(--shadow);
  padding: 24px;
}

.terms-dialog h3 {
  font-size: 22px;
  letter-spacing: -0.04em;
  margin-bottom: 10px;
}

.terms-dialog p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 18px;
}

.terms-close {
  width: 100%;
  border: none;
  border-radius: var(--radius-pill);
  padding: 13px 18px;
  background: var(--text);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.consent-popup {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(245,245,247,0.5);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.consent-popup.active {
  display: flex;
}

.consent-dialog {
  width: min(360px, 100%);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 28px;
  background: rgba(255,255,255,0.96);
  box-shadow: var(--shadow);
  text-align: center;
}

.consent-dialog h3 {
  margin: 0 0 10px;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.consent-dialog p {
  margin: 0 0 20px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.5;
}

.email-confirm-popup {
  position: fixed;
  inset: 0;
  z-index: 65;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background:
    radial-gradient(circle at 50% 20%, rgba(255,255,255,0.72), transparent 36%),
    rgba(245,245,247,0.58);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.email-confirm-popup.active {
  display: flex;
}

.email-confirm-dialog {
  width: min(420px, 100%);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 30px;
  padding: 26px;
  background: rgba(255,255,255,0.96);
  box-shadow: 0 30px 90px rgba(29,29,31,0.16);
  text-align: center;
}

.email-confirm-kicker {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.email-confirm-dialog h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.email-confirm-address {
  margin: 14px 0 12px;
  padding: 14px 16px;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 18px;
  background: rgba(245,245,247,0.78);
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.email-confirm-copy {
  margin: 0 0 20px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
}

.email-confirm-actions {
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
  gap: 10px;
}

.email-confirm-secondary,
.email-confirm-primary {
  min-height: 46px;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-weight: 850;
}

.email-confirm-secondary {
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.72);
  color: var(--text);
}

.email-confirm-primary {
  border: 0;
  background: var(--text);
  color: #fff;
}

@media (max-width: 520px) {
  .email-confirm-actions {
    grid-template-columns: 1fr;
  }
}

.generating-msg,
.result-box {
  text-align: center;
}

.generating-msg {
  color: var(--text-secondary);
  font-size: 15px;
}

.result-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(104,211,145,0.14);
  color: var(--success);
  font-size: 24px;
  font-weight: 800;
}

.result-box h3 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", system-ui, Helvetica, Arial, sans-serif;
  font-size: 26px;
  letter-spacing: -0.04em;
  margin-bottom: 6px;
}

.result-box p {
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.6;
}

.result-link {
  display: block;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  word-break: break-all;
  margin-bottom: 16px;
  text-decoration: none;
}

.copy-btn {
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.72);
  color: var(--text);
  border-radius: var(--radius-pill);
  padding: 11px 18px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}

.copy-btn:hover {
  background: rgba(255,255,255,0.92);
  border-color: rgba(29,29,31,0.28);
}

.generating-dots::after {
  content: '';
  animation: dots 1.5s infinite;
}

@keyframes dots {
  0% { content: ''; }
  33% { content: '.'; }
  66% { content: '..'; }
  100% { content: '...'; }
}

@media (min-width: 768px) {
  .hero-art-stack {
    animation: fadeInUpArt 0.7s cubic-bezier(0.16,1,0.3,1) 360ms both,
               float 4s ease-in-out 1.1s infinite;
  }
}

@media (max-width: 980px) {
  .header,
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .form-stack,
  .preview-panel {
    grid-column: auto;
  }

  .preview-panel {
    position: static;
  }

  .preview-card-wrap {
    position: static;
  }
}

@media (max-width: 720px) {
  body {
    padding: 16px 14px 54px;
  }

  .hero,
  .hero-note,
  .panel,
  .preview-card-wrap,
  .pay-section,
  .result-box,
  .generating-msg {
    border-radius: 22px;
  }

  .hero,
  .hero-note {
    padding: 22px;
    min-height: auto;
  }

  .panel,
  .preview-card-wrap,
  .pay-section,
  .result-box,
  .generating-msg {
    padding: 18px;
  }

  /* calendar stacks to 1 column on mobile */
  .calendar-grid {
    grid-template-columns: 1fr;
  }

  /* visual-panel stacks: FOTOS encima, COLORES abajo — cada sección ocupa todo el ancho */
  .visual-panel {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* quitar el borde izquierdo, poner borde top entre secciones */
  .visual-section + .visual-section {
    border-left: 0;
    border-top: 1px solid rgba(0,0,0,0.08);
    padding-left: 0;
    padding-top: 20px;
  }

  /* fotos: 2 columnas lado a lado con todo el ancho disponible */
  .upload-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  /* colores: 4 swatches en una fila con todo el ancho disponible */
  .colors {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
  }

  .phone-field {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 8px;
  }

  .cp-top {
    grid-template-columns: minmax(0, 1fr) 76px;
    gap: 14px;
  }

  .cp-avatar {
    width: 76px;
    height: 76px;
  }

  .cp-mark {
    top: 20px;
    right: 20px;
    width: 16px;
    height: 12px;
  }

  .cp-name {
    font-size: 30px;
  }

  .card-preview.company-preview .cp-name {
    font-size: 29px;
  }

  .card-preview.company-preview .cp-top {
    grid-template-columns: minmax(0, 1fr) 90px;
    gap: 12px;
  }

  .card-preview.company-preview .cp-avatar {
    width: 90px;
    height: 90px;
    border-radius: 22px;
  }

  .cp-company-slogan {
    max-width: 20ch;
    font-size: 12px;
  }

  .card-preview {
    min-height: auto;
  }

  .shell-toolbar {
    top: 14px;
    right: 14px;
  }

  .lang-toggle {
    padding: 3px;
    gap: 2px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .lang-toggle::before {
    top: 3px;
    left: 3px;
    width: 38px;
    height: calc(100% - 6px);
  }

  .lang-toggle.lang-en::before {
    transform: translateX(40px);
  }

  .lang-btn {
    width: 38px;
    padding: 6px 10px;
    font-size: 11.5px;
  }

  .note-metrics {
    grid-template-columns: 1fr;
  }

  .hero-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .hero-inner {
    display: flex;
    flex-direction: column;
    max-width: none;
    padding-right: 0;
    gap: 16px;
    align-items: center;
  }

  .logo-mark {
    order: 1;
    margin-bottom: 2px;
  }

  .hero-heading {
    order: 2;
    width: 100%;
    text-align: center;
  }

  h1 {
    font-size: clamp(28px, 7.8vw, 36px);
    line-height: 0.95;
    max-width: min(100%, 460px);
    margin: 0 auto;
    text-align: center;
  }

  .hero-title-line,
  .hero-title-support {
    white-space: nowrap;
  }

  .hero-title-support {
    max-width: none;
  }

  .subtitle {
    order: 3;
    width: 100%;
    text-align: center;
    margin-top: -2px;
  }

  .subtitle-line {
    white-space: normal;
    text-align: center;
  }

  .hero-actions {
    order: 4;
    width: 100%;
    max-width: 320px;
    margin-top: 8px;
    margin-bottom: 6px;
  }

  .hero-art-desktop {
    display: none;
  }

  .hero-art-mobile {
    order: 5;
    display: flex;
    height: 220px;
    width: min(100%, 260px);
    margin: 14px auto 4px;
    justify-content: center;
    overflow: visible;
  }

  .hero-art-mobile .hero-art-stack {
    width: min(100%, 220px);
    height: 220px;
    transform: translateY(0);
    animation: fadeInUpArtMobile 0.7s cubic-bezier(0.16,1,0.3,1) 360ms both;
  }

  .hero-note {
    padding-top: 18px;
    gap: 12px;
  }

  .note-card {
    gap: 8px;
  }
}

/* ── TEMAS SECTION ── */
.themes-section {
  margin-top: 14px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.55);
  overflow: visible;
}

.themes-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(29,29,31,0.62);
  cursor: pointer;
  list-style: none;
  user-select: none;
  gap: 8px;
}
.themes-summary::-webkit-details-marker { display: none; }

.themes-chevron {
  transition: transform 0.25s ease;
  flex-shrink: 0;
  color: rgba(29,29,31,0.40);
}
.themes-section[open] .themes-chevron { transform: rotate(180deg); }

.themes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 0;
}

.themes-section > .colors {
  margin-bottom: 0;
  padding: 4px 14px 14px;
}

.theme-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  border-radius: 12px;
  padding: 8px 6px;
  border: 2px solid transparent;
  transition: border-color 0.15s ease, background 0.15s ease;
  outline: none;
}
.theme-card:hover  { background: rgba(0,0,0,0.04); }
.theme-card:focus  { border-color: rgba(29,29,31,0.5); }
.theme-card.active { border-color: #1d1d1f; background: rgba(29,29,31,0.06); }

.theme-swatch {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 9px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 5px;
}

.swatch-avatar {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
}

.swatch-text {
  width: 22px;
  height: 6px;
  border-radius: 3px;
  flex-shrink: 0;
}

.theme-name {
  font-size: 11px;
  font-weight: 500;
  color: rgba(29,29,31,0.62);
  text-align: center;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.theme-card.active .theme-name { color: #1d1d1f; font-weight: 600; }

@media (max-width: 480px) {
  .themes-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
  }
  .theme-card { padding: 6px 3px; }
  .theme-name {
    font-size: 10px;
    white-space: normal;
  }
  .swatch-text { width: 14px; }
}

.show-name-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  cursor: pointer;
  user-select: none;
  width: fit-content;
}

/* Hide the native checkbox completely */
.show-name-toggle input[type=checkbox] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* The pill track */
.toggle-track {
  position: relative;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.14);
  transition: background 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  flex-shrink: 0;
}

/* The white thumb */
.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Checked state — track turns dark, thumb slides right */
.show-name-toggle input:checked ~ .toggle-track {
  background: #1d1d1f;
}

.show-name-toggle input:checked ~ .toggle-track .toggle-thumb {
  transform: translateX(18px);
}

/* Label text */
.toggle-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

.conexiones-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 0;
}

.conexion-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 8px;
  border-radius: 18px;
  border: 1px solid rgba(0,0,0,0.07);
  background: rgba(255,255,255,0.62);
  cursor: pointer;
  transition: 0.2s ease;
  font-family: inherit;
}

.conexion-tile:hover {
  border-color: rgba(29,29,31,0.38);
  background: linear-gradient(135deg, rgba(29,29,31,0.09), rgba(255,255,255,0.72));
  transform: scale(1.02);
}

.conexion-tile.active {
  border-color: rgba(29,29,31,0.5);
  background: linear-gradient(135deg, rgba(29,29,31,0.12), rgba(255,255,255,0.8));
  box-shadow: 0 4px 16px rgba(29,29,31,0.12);
}

.conexion-tile.has-value {
  border-color: rgba(29,29,31,0.6);
  background: linear-gradient(135deg, rgba(29,29,31,0.09), rgba(255,255,255,0.72));
  box-shadow: 0 4px 16px rgba(29,29,31,0.10);
}

.conexion-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.conexion-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-align: center;
}

.conexion-input-wrap {
  margin-top: 10px;
}

.conexion-input {
  width: 100%;
  padding: 13px 16px;
  border-radius: 14px;
  border: 1px solid rgba(29,29,31,0.3);
  background: rgba(255,255,255,0.8);
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  outline: none;
  box-shadow: 0 2px 12px rgba(29,29,31,0.08);
}

.conexion-input::placeholder {
  color: rgba(29,29,31,0.3);
}

.conexion-input-hint {
  margin: 7px 4px 0;
  color: rgba(29,29,31,0.52);
  font-size: 11px;
  line-height: 1.4;
}

.avatar-camera-btn {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
  width: 100%;
  padding: 11px 16px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.7);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
}

.upload-area.uploaded input[type=file] {
  pointer-events: none;
}

.upload-sheet-dialog {
  width: min(100%, 340px);
  padding: 22px;
}

.upload-sheet-dialog h3 {
  margin-bottom: 14px;
  text-align: center;
}

.upload-sheet-btn {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 13px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.8);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  transition: 0.2s ease;
}

.upload-sheet-btn:hover {
  border-color: rgba(29,29,31,0.3);
}

.upload-sheet-btn.is-danger {
  color: #b3261e;
  border-color: rgba(179,38,30,0.28);
}

.upload-sheet-btn.is-danger:hover {
  background: rgba(179,38,30,0.08);
  border-color: rgba(179,38,30,0.5);
}

.upload-sheet-btn.is-cancel {
  border-color: transparent;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 600;
}

.avatar-camera-btn:hover {
  background: rgba(255,255,255,0.95);
  border-color: rgba(29,29,31,0.3);
  color: #1d1d1f;
}

#checkout-btn {
  position: static;
  inset: auto;
  display: block;
  width: 100%;
  padding: 16px 28px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  margin-top: 4px;
  transition: background 0.15s ease, transform 0.12s ease;
}

#checkout-btn:hover {
  background: #000;
}

#checkout-btn:active {
  transform: scale(0.99);
}

#checkout-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.trial-note {
  margin: 10px 0 0;
  color: #6e6e73;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-align: center;
}

/* ── Secciones nuevas: Cómo funciona / Se comparte sola ── */
.section-eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.section-title {
  margin-top: 8px;
  font-size: clamp(24px, 1.4rem + 1.2vw, 34px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.08;
}

.howto { margin-top: 34px; }
.howto-head { margin-bottom: 20px; }
.howto-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.howto-step {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: 0 1px 2px rgba(29,29,31,0.04), 0 14px 34px -18px rgba(29,29,31,0.16);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.howto-no {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}
.howto-ic { color: var(--text); margin-top: 2px; }
.howto-step h3 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0;
}
.howto-step p {
  color: var(--text-secondary);
  font-size: 14.5px;
  line-height: 1.5;
  margin: 0;
}

@media (max-width: 900px) {
  .howto-grid { grid-template-columns: 1fr; }
}

/* ── Mobile Wizard & Preview Navigation ── */
.mobile-preview-pill {
  display: none;
}
.preview-header-mobile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.mobile-back-form-btn {
  display: none;
}

@media (max-width: 980px) {
  .wizard-steps-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 16px;
    scroll-margin-top: 18px;
  }
  .wizard-steps-wrap .wizard-steps {
    flex: 1;
    margin-bottom: 0;
  }
  .mobile-preview-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    min-height: 38px;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s ease, transform 0.15s ease;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
  }
  .mobile-preview-pill:active {
    transform: scale(0.96);
    background: rgba(0, 0, 0, 0.09);
  }
  .mobile-back-form-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    min-height: 38px;
    background: rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    transition: background 0.15s ease, transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
  }
  .mobile-back-form-btn:active {
    background: rgba(0, 0, 0, 0.12);
    transform: scale(0.96);
  }

  .wizard-nav {
    padding-bottom: 24px;
    margin-bottom: 16px;
  }

  .wizard-back {
    padding: 12px 14px;
    min-height: 46px;
    border-radius: 12px;
    -webkit-tap-highlight-color: transparent;
  }
  .wizard-back:active {
    background: rgba(0, 0, 0, 0.05);
  }

  .wizard-next {
    padding: 14px 22px;
    min-height: 48px;
    border-radius: 14px;
    -webkit-tap-highlight-color: transparent;
  }

}

.field-highlight {
  border-color: #0071e3 !important;
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.25) !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* ── Wizard por pasos (Datos → Diseño) ── */
.wizard-steps {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.wstep {
  flex: 1;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}
.wstep-bar {
  display: block;
  height: 3px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}
.wstep-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--text);
  transition: width 0.4s ease;
}
.wstep-active .wstep-bar i,
.wstep-done .wstep-bar i { width: 100%; }
.wstep-lbl {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}
.wstep-active .wstep-lbl,
.wstep-done .wstep-lbl { color: var(--text); }
.wstep-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  background: var(--surface-muted);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.wstep-active .wstep-num,
.wstep-done .wstep-num {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}
.wizard-step { display: grid; gap: 16px; }
.wizard-step[hidden] { display: none; }
.wizard-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
}
.wizard-back {
  background: transparent;
  border: 0;
  color: var(--text-muted);
  padding: 12px 6px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}
.wizard-back:hover { color: var(--text); }
.wizard-back[hidden] { display: none; }
.wizard-next {
  flex: 1;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 12px;
  padding: 15px 24px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-family: inherit;
  cursor: pointer;
}
.wizard-next:active { transform: scale(0.98); }

/* ── Bloque de compra (movido fuera de la columna del preview) ── */
.pay-block-inner {
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  display: grid;
  gap: 16px;
}
.wizard-next[hidden] { display: none; }

/* ── Toggle de plan (mensual / anual) ── */
.plan-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.plan-opt {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.plan-opt:hover { border-color: var(--text-muted); }
.plan-opt.active {
  border-color: var(--text);
  background: var(--bg);
  box-shadow: inset 0 0 0 1px var(--text);
}
.plan-name {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-secondary);
}
.plan-opt.active .plan-name { color: var(--text); }
.plan-price {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.plan-per {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 2px;
}
.plan-badge {
  position: absolute;
  top: -9px;
  right: 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
  background: var(--text);
  padding: 3px 8px;
  border-radius: 999px;
}
.plan-note {
  margin: 0;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ── Hero CTAs ── */
.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.hero-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--text);
  color: #fff !important;
  padding: 13px 24px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 14px rgba(29, 29, 31, 0.16);
}
.hero-price-note {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}
.hero-btn-primary:hover {
  transform: translateY(-1px);
  background: #000;
  box-shadow: 0 6px 20px rgba(29, 29, 31, 0.22);
}
.hero-btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 13px 20px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 600;
  color: var(--text) !important;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid var(--border);
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.hero-btn-secondary:hover {
  background: rgba(0, 0, 0, 0.08);
  border-color: var(--text-muted);
}

/* ── Barra de Compatibilidad e Integraciones ── */
.trust-strip {
  margin: 36px 0 10px;
  padding: 16px 20px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: 0 1px 3px rgba(29, 29, 31, 0.03);
}
.trust-strip-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}
.trust-strip-items {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}
.trust-pill svg {
  flex-shrink: 0;
}

/* ── Sección Comparativa (Papel vs Dicard) ── */
.compare-section {
  margin-top: 56px;
}
.compare-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 32px;
}
.compare-head .section-eyebrow {
  margin-bottom: 8px;
}
.compare-head .section-title {
  margin-bottom: 10px;
}
.compare-head p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.5;
}
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.compare-card {
  border-radius: var(--radius);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border: 1px solid var(--border);
  position: relative;
}
.compare-card.paper {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.08);
}
.compare-card.dicard {
  background: var(--bg-soft);
  border-color: rgba(29, 29, 31, 0.2);
  box-shadow: 0 18px 42px -16px rgba(29, 29, 31, 0.12);
}
.compare-badge {
  position: absolute;
  top: -11px;
  right: 24px;
  background: var(--text);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}
.compare-card-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}
.compare-card-sub {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-top: 2px;
}
.compare-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
}
.compare-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--text);
}
.compare-item.bad {
  color: var(--text-secondary);
}
.compare-item-ic {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 1px;
}
.compare-item-ic.neg {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}
.compare-item-ic.pos {
  background: rgba(16, 185, 129, 0.14);
  color: #059669;
}

/* ── Sección de Preguntas Frecuentes (FAQ) ── */
.faq-section {
  margin-top: 60px;
}
.faq-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 34px;
}
.faq-head .section-eyebrow {
  margin-bottom: 8px;
}
.faq-head p {
  color: var(--text-secondary);
  font-size: 15px;
  margin-top: 8px;
}
.faq-list {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq-item {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.faq-item[open] {
  border-color: rgba(29, 29, 31, 0.22);
  box-shadow: 0 8px 24px -10px rgba(29, 29, 31, 0.08);
}
.faq-question {
  padding: 18px 22px;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-chevron {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
  color: var(--text-muted);
}
.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
  color: var(--text);
}
.faq-answer {
  padding: 0 22px 20px;
  color: var(--text-secondary);
  font-size: 14.5px;
  line-height: 1.6;
}

.faq-bullet-list {
  margin: 12px 0 0;
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.faq-bullet-list li {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
}
.faq-bullet-list li::before {
  content: "•";
  position: absolute;
  left: 4px;
  color: var(--text);
  font-weight: 700;
}

/* ── Footer Estilo Dot Cards Minimalista ── */
.site-footer {
  margin-top: 88px;
  padding-top: 56px;
  border-top: 1px solid var(--border);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 52px;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-brand-logo {
  height: 24px;
  width: auto;
  align-self: flex-start;
  opacity: 0.9;
}
.footer-col h4 {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  margin: 0 0 16px;
}
.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 0;
  margin: 0;
}
.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.15s ease, transform 0.15s ease;
}
.footer-link svg {
  flex-shrink: 0;
  opacity: 0.75;
}
.footer-link:hover {
  color: var(--text);
}
.footer-link:hover svg {
  opacity: 1;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  padding-bottom: 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 12px;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 14px;
}
.footer-bottom-links {
  display: flex;
  align-items: center;
  gap: 14px;
}
.footer-bottom-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}
.footer-bottom-links a:hover {
  color: var(--text);
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}
@media (max-width: 580px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .footer-link {
    padding: 6px 0;
    min-height: 38px;
    font-size: 13.5px;
  }
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  .hero-btn-primary {
    width: 100%;
    justify-content: center;
  }
}

/* ── Mobile UX Enhancements & Safe Touch Controls ── */
#builder,
#preview-section,
#pay-section,
.wizard-steps-wrap {
  scroll-margin-top: 24px;
}

@media (max-width: 720px) {
  #builder,
  #preview-section,
  #pay-section,
  .wizard-steps-wrap {
    scroll-margin-top: 18px;
  }

  .card-type-option {
    min-height: 42px;
    font-size: 13.5px;
  }

  .terms-consent {
    padding: 11px 14px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.035);
    border: 1px solid rgba(0, 0, 0, 0.07);
    justify-content: flex-start;
    text-align: left;
    font-size: 12.5px;
    gap: 12px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .terms-consent input {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
  }

  .themes-summary {
    min-height: 46px;
    padding: 14px 16px;
  }

  .faq-question {
    padding: 16px 18px;
    font-size: 15px;
    min-height: 52px;
  }

  .faq-answer {
    padding: 0 18px 18px;
    font-size: 14px;
  }

  .upload-area:active {
    transform: scale(0.98);
    background: rgba(0, 0, 0, 0.05);
  }

  .color-swatch-btn {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }
  .color-swatch-btn:active {
    transform: scale(0.92);
  }
}


/* ── Accesibilidad: foco, objetivos táctiles y movimiento ── */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
select:focus-visible,
input:focus-visible,
.upload-area:focus-within,
.theme-card:focus-visible {
  outline: 2px solid #0071e3;
  outline-offset: 2px;
}

/* Amplía el área clicable sin mover el layout (WCAG 2.5.8: mínimo 24px). */
.site-nav-link,
.site-nav-brand,
.footer-link,
.terms-link {
  position: relative;
}
.site-nav-link::after,
.site-nav-brand::after,
.footer-link::after,
.terms-link::after {
  content: "";
  position: absolute;
  inset: -4px -6px;
}

@media (pointer: coarse) {
  .site-nav-link::after,
  .site-nav-brand::after,
  .terms-link::after {
    inset: -14px -8px;
  }
  .footer-link::after {
    inset: -3px -8px;
  }
  .card-type-option {
    min-height: 44px;
  }
  .wstep {
    padding: 6px 0;
  }
  .terms-consent {
    min-height: 44px;
  }
  .terms-consent input {
    width: 20px;
    height: 20px;
  }
}

/* Pausa el carrusel del hero al pasar el cursor o enfocar. */
.hero-art-stack:hover .hero-art,
.hero-art-stack:focus-within .hero-art {
  animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .hero-art {
    animation: none !important;
    opacity: 0;
    transform: none;
  }
  .hero-art.hero-art-slide-1 {
    opacity: 1;
  }
}

/* Textos de ejemplo en la vista previa (se reemplazan al escribir) */
.card-preview .is-ghost {
  opacity: 0.5;
}

.preview-qr-note {
  margin: 10px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Mini tarjeta fija (móvil / 1 columna ≤980px) ── */
.mini-card-bar { display: none; }

@media (max-width: 980px) {
  .mini-card-bar {
    --mini-bg: #f5f5f7;
    --mini-text: #1d1d1f;
    --mini-avatar: #e8e8ed;
    display: flex;
    align-items: center;
    gap: 12px;
    position: fixed;
    top: max(8px, env(safe-area-inset-top));
    left: max(12px, env(safe-area-inset-left));
    right: max(12px, env(safe-area-inset-right));
    z-index: 55;
    min-height: 56px;
    padding: 8px 8px 8px 8px;
    background: var(--mini-bg);
    color: var(--mini-text);
    border: 1px solid rgba(0, 0, 0, 0.14);
    border-radius: 18px;
    box-shadow: 0 12px 30px -10px rgba(29, 29, 31, 0.5), 0 2px 6px rgba(29, 29, 31, 0.12);
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transform: translateY(-160%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease,
                visibility 0s linear 0.35s, background 0.25s ease, color 0.25s ease;
  }
  .mini-card-bar.is-visible {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
  }
  .mini-card-bar.is-dark { border-color: rgba(255, 255, 255, 0.16); }
  .mini-card-bar:active { transform: scale(0.985); }

  .mini-card-avatar {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--mini-avatar);
    background-size: cover;
    background-position: center;
    color: var(--mini-text);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.02em;
  }
  .mini-card-text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .mini-card-name,
  .mini-card-sub {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
  }
  .mini-card-name {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.01em;
  }
  .mini-card-sub {
    font-size: 12.5px;
    opacity: 0.72;
  }
  .mini-card-sub:empty { display: none; }
  .mini-card-name.is-ghost,
  .mini-card-sub.is-ghost { opacity: 0.5; }

  .mini-card-cta {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 40px;
    padding: 0 12px 0 14px;
    border-radius: 999px;
    background: rgba(127, 127, 127, 0.18);
    font-size: 13px;
    font-weight: 600;
  }

  /* La mini tarjeta cumple la función de la píldora "Ver tarjeta" */
  .mobile-preview-pill { display: none; }

  /* Evita que las barras fijas (mini tarjeta arriba, compra abajo) tapen el campo enfocado */
  .wizard-steps-wrap { scroll-margin-top: 80px; }
  .field,
  .social-card,
  .upload-area,
  .conexion-input-wrap,
  #builder input,
  #builder select {
    scroll-margin-top: 84px;
    scroll-margin-bottom: 96px;
  }
}

/* ── Resumen previo al pago y errores inline ── */
.pay-summary {
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  overflow: hidden;
}
.pay-summary-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 6px 10px 14px;
}
.pay-summary-row + .pay-summary-row { border-top: 1px solid var(--border); }
.pay-summary-avatar,
.pay-summary-icon {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
}
.pay-summary-avatar {
  border-radius: 12px;
  background: #e8e8ed;
  background-size: cover;
  background-position: center;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.pay-summary-avatar.has-image { font-size: 0; }
.pay-summary-icon { color: var(--text-secondary); }
.pay-summary-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}
.pay-summary-text strong,
.pay-summary-text > span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.25;
}
.pay-summary-text strong { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.pay-summary-text > span { font-size: 12.5px; color: var(--text-secondary); }
.pay-summary-text > span[hidden] { display: none; }
.pay-summary-text .is-ghost { opacity: 0.55; }
.pay-summary-edit {
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #0071e3;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.pay-summary-edit:active { background: rgba(0, 113, 227, 0.1); }

.pay-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid #f0b8b3;
  border-radius: 14px;
  background: #fdecea;
  color: #b3261e;
  font-size: 13.5px;
  line-height: 1.4;
  text-align: left;
}
.pay-error[hidden] { display: none; }
.checkout-field-error {
  margin: 4px 0 0;
  color: #b3261e;
  font-size: 14px;
}
.pay-error-action {
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  color: #b3261e;
  text-decoration: underline;
  cursor: pointer;
}
.pay-error-action[hidden] { display: none; }

/* ── Paso de pago en pantallas estrechas (≤360px) ──
   Sin min-width:0, el contenido mínimo de los hijos ensancha las columnas de la rejilla
   y el bloque queda más ancho que la pantalla (el body lo recorta con overflow-x:hidden). */
.form-stack,
.wizard-step,
.pay-block-inner,
.pay-section {
  min-width: 0;
}
.plan-toggle {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.plan-opt {
  min-width: 0;
}

@media (max-width: 400px) {
  .pay-section { padding: 22px 16px; }
  .plan-toggle { gap: 8px; }
  .plan-opt { padding: 12px 12px; }
  .plan-price { font-size: 18px; }
}

/* Vista previa: los bloques de contacto no deben ser más anchos que la tarjeta
   (un correo largo sin espacios los ensanchaba y la tarjeta los recortaba). */
.cp-meta {
  grid-template-columns: minmax(0, 1fr);
}
.cp-meta-card {
  min-width: 0;
}
.cp-info,
.cp-site {
  overflow-wrap: anywhere;
}
